Browse Source

.发货页面用错了。任务查看调整。

master
yibo 5 years ago
parent
commit
9c75ae5a69
3 changed files with 55 additions and 15 deletions
  1. +3
    -2
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs
  2. +6
    -9
      ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.Designer.cs
  3. +46
    -4
      ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.cs

+ 3
- 2
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs View File

@ -20,8 +20,9 @@ namespace ButcherFactory.CarcassSaleOut_
{
#region IWithRoleForm
public List<short> RoleName
{
get { return new List<short> { (short). }; }
{
// get { return new List<short> { (short)设备类别.白条发货 }; }
get { return new List<short> { 150 }; }
}
public Form Generate()


+ 6
- 9
ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.Designer.cs View File

@ -56,11 +56,10 @@
this.closeBtn.ClickColor = System.Drawing.Color.YellowGreen;
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.ForeColor = System.Drawing.Color.White;
this.closeBtn.Location = new System.Drawing.Point(1560, 14);
this.closeBtn.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.closeBtn.Location = new System.Drawing.Point(803, 7);
this.closeBtn.Name = "closeBtn";
this.closeBtn.PlaySound = false;
this.closeBtn.Size = new System.Drawing.Size(180, 90);
this.closeBtn.Size = new System.Drawing.Size(90, 45);
this.closeBtn.SoundType = WinFormControl.SoundType.Click;
this.closeBtn.TabIndex = 13;
this.closeBtn.Text = "关闭";
@ -95,8 +94,7 @@
this.I_OrderWeight,
this.I_FinishWeight,
this.I_LastWeight});
this.taskGrid.Location = new System.Drawing.Point(24, 116);
this.taskGrid.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.taskGrid.Location = new System.Drawing.Point(12, 58);
this.taskGrid.MultiSelect = false;
this.taskGrid.Name = "taskGrid";
this.taskGrid.ReadOnly = true;
@ -106,7 +104,7 @@
this.taskGrid.RowsDefaultCellStyle = dataGridViewCellStyle9;
this.taskGrid.RowTemplate.Height = 23;
this.taskGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.taskGrid.Size = new System.Drawing.Size(1716, 1078);
this.taskGrid.Size = new System.Drawing.Size(881, 533);
this.taskGrid.TabIndex = 12;
//
// I_Goods_Name
@ -174,12 +172,11 @@
//
// ViewTaskForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1764, 1208);
this.ClientSize = new System.Drawing.Size(905, 603);
this.Controls.Add(this.closeBtn);
this.Controls.Add(this.taskGrid);
this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.Name = "ViewTaskForm";
this.Text = "任务完工情况";
((System.ComponentModel.ISupportInitialize)(this.taskGrid)).EndInit();


+ 46
- 4
ButcherFactory.Form/SegmentProductionAuto_/ViewTaskForm.cs View File

@ -23,14 +23,56 @@ namespace ButcherFactory.SegmentProductionAuto_
InitializeComponent();
mDate = date;
mBatchId = batchId;
mGoods = goods;
}
mGoods = goods;
taskGrid.RowPrePaint += uDataGridView1_RowPrePaint;
taskGrid.CellPainting += uDataGridView1_CellPainting;
}
private void uDataGridView1_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
{
if (e.RowIndex == taskGrid.Rows.Count - 1)
{
var row = taskGrid.Rows[e.RowIndex];
row.DefaultCellStyle.SelectionForeColor = Color.Black;
row.DefaultCellStyle.BackColor = Color.Khaki;
row.DefaultCellStyle.SelectionBackColor = Color.Khaki;
}
}
private void uDataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
var last = taskGrid.Rows.Count - 1;
if (e.RowIndex == last)
{
//if (e.ColumnIndex == 2)
//{
// e.PaintBackground(e.ClipBounds, false);
// e.Handled = true;
//}
// else
if (e.ColumnIndex == 0)
{
using (Brush foreColor = new SolidBrush(e.CellStyle.ForeColor))
{
e.PaintBackground(e.ClipBounds, false);
StringFormat drawFormat = new StringFormat();
drawFormat.LineAlignment = StringAlignment.Center;
drawFormat.Alignment = System.Drawing.StringAlignment.Center;
e.Graphics.DrawString("合计", e.CellStyle.Font, foreColor, e.CellBounds, drawFormat);
e.Handled = true;
}
}
}
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
list = new BindingList<ProductTaskFull>(SegmentProductionBL.GetProductTaskFull(mDate, mBatchId, mGoods));
list = new BindingList<ProductTaskFull>(SegmentProductionBL.GetProductTaskFull(mDate, mBatchId, mGoods));
list.Add(new ProductTaskFull { OrderNumber = list.Sum(x => x.OrderNumber ?? 0), FinishNumber = list.Sum(x => x.FinishNumber ), OrderWeight = list.Sum(x => x.OrderWeight ?? 0), FinishWeight = list.Sum(x => x.FinishWeight) });
taskGrid.DataSource = list;
taskGrid.Refresh();
}


Loading…
Cancel
Save