Browse Source

分割品称重计数调整。

master
yibo 7 years ago
parent
commit
d50510a36f
10 changed files with 292 additions and 261 deletions
  1. +4
    -2
      ButcherFactory.BO/Bill/SegmentProduction.cs
  2. +3
    -0
      ButcherFactory.BO/LocalBL/CarcassTakeOutBL.cs
  3. +12
    -10
      ButcherFactory.BO/LocalBL/SegmentProductionBL.cs
  4. +87
    -87
      ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.Designer.cs
  5. +143
    -142
      ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.Designer.cs
  6. +23
    -14
      ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs
  7. +3
    -3
      ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.resx
  8. +11
    -0
      ButcherFactory.Form/SegmentProduction_/TrunOutDialog.Designer.cs
  9. +3
    -3
      ButcherFactory.Form/SegmentProduction_/TrunOutDialog.cs
  10. +3
    -0
      ButcherFactory.Form/SegmentProduction_/TrunOutDialog.resx

+ 4
- 2
ButcherFactory.BO/Bill/SegmentProduction.cs View File

@ -31,7 +31,9 @@ namespace ButcherFactory.BO
public bool Submited { get; set; } public bool Submited { get; set; }
//挂起状态
public bool TrunOut { get; set; }
////挂起状态
//public bool TrunOut { get; set; }
public long? TrunOutID { get; set; }
} }
} }

+ 3
- 0
ButcherFactory.BO/LocalBL/CarcassTakeOutBL.cs View File

@ -235,6 +235,7 @@ namespace ButcherFactory.BO.LocalBL
query.Columns.Add(DQSelectColumn.Field("Goods_ID")); query.Columns.Add(DQSelectColumn.Field("Goods_ID"));
query.Columns.Add(DQSelectColumn.Field("Weight")); query.Columns.Add(DQSelectColumn.Field("Weight"));
query.Columns.Add(DQSelectColumn.Field("CreateTime")); query.Columns.Add(DQSelectColumn.Field("CreateTime"));
query.Columns.Add(DQSelectColumn.Field("GroupID"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Submited", true), DQCondition.EQ("Sync", false))); query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Submited", true), DQCondition.EQ("Sync", false)));
query.Range = SelectRange.Top(10); query.Range = SelectRange.Top(10);
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID")); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID"));
@ -257,6 +258,7 @@ namespace ButcherFactory.BO.LocalBL
} }
obj.Weight = (decimal)reader[7]; obj.Weight = (decimal)reader[7];
obj.Time = (DateTime)reader[8]; obj.Time = (DateTime)reader[8];
obj.GroupID = (long?)reader[9];
upload.Add(obj); upload.Add(obj);
} }
} }
@ -283,5 +285,6 @@ namespace ButcherFactory.BO.LocalBL
public long? Goods_ID { get; set; } public long? Goods_ID { get; set; }
public decimal? Weight { get; set; } public decimal? Weight { get; set; }
public DateTime? Time { get; set; } public DateTime? Time { get; set; }
public long? GroupID { get; set; }
} }
} }

+ 12
- 10
ButcherFactory.BO/LocalBL/SegmentProductionBL.cs View File

@ -24,7 +24,7 @@ namespace ButcherFactory.BO.LocalBL
query.Columns.Add(DQSelectColumn.Field("Weight")); query.Columns.Add(DQSelectColumn.Field("Weight"));
query.Columns.Add(DQSelectColumn.Field("Goods_Name")); query.Columns.Add(DQSelectColumn.Field("Goods_Name"));
query.Columns.Add(DQSelectColumn.Field("GroupID")); query.Columns.Add(DQSelectColumn.Field("GroupID"));
query.Columns.Add(DQSelectColumn.Field("TrunOut"));
query.Columns.Add(DQSelectColumn.Field("TrunOutID"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Delete", false), DQCondition.EQ("Submited", submited))); query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Delete", false), DQCondition.EQ("Submited", submited)));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true)); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true));
if (submited) if (submited)
@ -43,7 +43,7 @@ namespace ButcherFactory.BO.LocalBL
entity.Weight = (decimal)reader[3]; entity.Weight = (decimal)reader[3];
entity.Goods_Name = (string)reader[4]; entity.Goods_Name = (string)reader[4];
entity.GroupID = (long?)reader[5]; entity.GroupID = (long?)reader[5];
entity.TrunOut = (bool)reader[6];
entity.TrunOutID = (long?)reader[6];
entity.Submited = submited; entity.Submited = submited;
list.Add(entity); list.Add(entity);
} }
@ -83,20 +83,13 @@ namespace ButcherFactory.BO.LocalBL
{ {
using (var session = DmoSession.New()) using (var session = DmoSession.New())
{ {
var groupID = GenerateGroupID(session);
var groupID = ids.Max();
BatchUpdate(ids, session, new Tuple<string, object>("GroupID", groupID)); BatchUpdate(ids, session, new Tuple<string, object>("GroupID", groupID));
session.Commit(); session.Commit();
return groupID; return groupID;
} }
} }
static long GenerateGroupID(IDmoSession session)
{
var query = new DQueryDom(new JoinAlias("_main", typeof(SegmentProduction)));
query.Columns.Add(DQSelectColumn.Max("GroupID"));
return (query.EExecuteScalar<int?>(session) ?? 0) + 1;
}
static void BatchUpdate(IEnumerable<long> ids, IDmoSession session, params Tuple<string, object>[] keyValues) static void BatchUpdate(IEnumerable<long> ids, IDmoSession session, params Tuple<string, object>[] keyValues)
{ {
var update = new DQUpdateDom(typeof(SegmentProduction)); var update = new DQUpdateDom(typeof(SegmentProduction));
@ -116,5 +109,14 @@ namespace ButcherFactory.BO.LocalBL
session.Commit(); session.Commit();
} }
} }
public static void TrunBack(IEnumerable<long> ids)
{
using (var session = DmoSession.New())
{
BatchUpdate(ids, session, new Tuple<string, object>("TrunOutID", null));
session.Commit();
}
}
} }
} }

+ 87
- 87
ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.Designer.cs View File

@ -43,6 +43,8 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
this.workUnitSelect = new System.Windows.Forms.ComboBox(); this.workUnitSelect = new System.Windows.Forms.ComboBox();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.productBatchSelect = new System.Windows.Forms.ComboBox();
this.uLabel2 = new WinFormControl.ULabel();
this.noBarCode = new WinFormControl.UButton(); this.noBarCode = new WinFormControl.UButton();
this.closeBtn = new WinFormControl.UButton(); this.closeBtn = new WinFormControl.UButton();
this.uTimerLabel1 = new WinFormControl.UTimerLabel(); this.uTimerLabel1 = new WinFormControl.UTimerLabel();
@ -50,6 +52,7 @@
this.netStateWatch1 = new WinFormControl.NetStateWatch(); this.netStateWatch1 = new WinFormControl.NetStateWatch();
this.uWeightControl1 = new WinFormControl.UWeightControl(); this.uWeightControl1 = new WinFormControl.UWeightControl();
this.uLabel1 = new WinFormControl.ULabel(); this.uLabel1 = new WinFormControl.ULabel();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.historyDataGrid = new WinFormControl.UDataGridView(); this.historyDataGrid = new WinFormControl.UDataGridView();
this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -65,18 +68,15 @@
this.W_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.W_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.W_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.W_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.needSubmitGrid = new WinFormControl.UDataGridView(); this.needSubmitGrid = new WinFormControl.UDataGridView();
this.readBtn = new WinFormControl.UButton();
this.submitBtn = new WinFormControl.UButton();
this.uLabel3 = new WinFormControl.ULabel();
this.productBatchSelect = new System.Windows.Forms.ComboBox();
this.uLabel2 = new WinFormControl.ULabel();
this.U_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.U_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.U_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.U_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.U_BeforeWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_BeforeWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.U_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.readBtn = new WinFormControl.UButton();
this.submitBtn = new WinFormControl.UButton();
this.uLabel3 = new WinFormControl.ULabel();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
@ -136,6 +136,28 @@
this.splitContainer1.SplitterDistance = 86; this.splitContainer1.SplitterDistance = 86;
this.splitContainer1.TabIndex = 1; this.splitContainer1.TabIndex = 1;
// //
// productBatchSelect
//
this.productBatchSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.productBatchSelect.Font = new System.Drawing.Font("宋体", 15F);
this.productBatchSelect.FormattingEnabled = true;
this.productBatchSelect.Location = new System.Drawing.Point(984, 50);
this.productBatchSelect.Name = "productBatchSelect";
this.productBatchSelect.Size = new System.Drawing.Size(170, 28);
this.productBatchSelect.TabIndex = 15;
//
// uLabel2
//
this.uLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.uLabel2.AutoSize = true;
this.uLabel2.BackColor = System.Drawing.Color.Transparent;
this.uLabel2.Font = new System.Drawing.Font("宋体", 15F);
this.uLabel2.Location = new System.Drawing.Point(883, 53);
this.uLabel2.Name = "uLabel2";
this.uLabel2.Size = new System.Drawing.Size(109, 20);
this.uLabel2.TabIndex = 16;
this.uLabel2.Text = "生产批次:";
//
// noBarCode // noBarCode
// //
this.noBarCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.noBarCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -156,7 +178,7 @@
this.noBarCode.TabIndex = 14; this.noBarCode.TabIndex = 14;
this.noBarCode.Text = "无 码"; this.noBarCode.Text = "无 码";
this.noBarCode.UseVisualStyleBackColor = true; this.noBarCode.UseVisualStyleBackColor = true;
this.noBarCode.WithStataHode = false;
this.noBarCode.WithStataHode = true;
this.noBarCode.Click += new System.EventHandler(this.noBarCode_Click); this.noBarCode.Click += new System.EventHandler(this.noBarCode_Click);
// //
// closeBtn // closeBtn
@ -233,6 +255,17 @@
this.uLabel1.TabIndex = 5; this.uLabel1.TabIndex = 5;
this.uLabel1.Text = "工作单元:"; this.uLabel1.Text = "工作单元:";
// //
// flowLayoutPanel1
//
this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel1.Location = new System.Drawing.Point(793, -1);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(514, 521);
this.flowLayoutPanel1.TabIndex = 4;
//
// groupBox2 // groupBox2
// //
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -465,6 +498,53 @@
this.needSubmitGrid.Size = new System.Drawing.Size(508, 200); this.needSubmitGrid.Size = new System.Drawing.Size(508, 200);
this.needSubmitGrid.TabIndex = 1; this.needSubmitGrid.TabIndex = 1;
// //
// U_ID
//
this.U_ID.DataPropertyName = "ID";
this.U_ID.HeaderText = "ID";
this.U_ID.Name = "U_ID";
this.U_ID.ReadOnly = true;
this.U_ID.Visible = false;
//
// U_RowIndex
//
this.U_RowIndex.DataPropertyName = "RowIndex";
this.U_RowIndex.HeaderText = "序号";
this.U_RowIndex.Name = "U_RowIndex";
this.U_RowIndex.ReadOnly = true;
//
// U_BarCode
//
this.U_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.U_BarCode.DataPropertyName = "BarCode";
this.U_BarCode.HeaderText = "条码";
this.U_BarCode.Name = "U_BarCode";
this.U_BarCode.ReadOnly = true;
//
// U_Goods_Name
//
this.U_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.U_Goods_Name.DataPropertyName = "Goods_Name";
this.U_Goods_Name.HeaderText = "产品名称";
this.U_Goods_Name.Name = "U_Goods_Name";
this.U_Goods_Name.ReadOnly = true;
//
// U_BeforeWeight
//
this.U_BeforeWeight.DataPropertyName = "BeforeWeight";
dataGridViewCellStyle11.Format = "#0.######";
this.U_BeforeWeight.DefaultCellStyle = dataGridViewCellStyle11;
this.U_BeforeWeight.HeaderText = "入库重量";
this.U_BeforeWeight.Name = "U_BeforeWeight";
this.U_BeforeWeight.ReadOnly = true;
//
// U_Weight
//
this.U_Weight.DataPropertyName = "Weight";
this.U_Weight.HeaderText = "重量";
this.U_Weight.Name = "U_Weight";
this.U_Weight.ReadOnly = true;
//
// readBtn // readBtn
// //
this.readBtn.AsClicked = false; this.readBtn.AsClicked = false;
@ -520,86 +600,6 @@
this.uLabel3.TabIndex = 0; this.uLabel3.TabIndex = 0;
this.uLabel3.Text = "领料明细"; this.uLabel3.Text = "领料明细";
// //
// productBatchSelect
//
this.productBatchSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.productBatchSelect.Font = new System.Drawing.Font("宋体", 15F);
this.productBatchSelect.FormattingEnabled = true;
this.productBatchSelect.Location = new System.Drawing.Point(984, 50);
this.productBatchSelect.Name = "productBatchSelect";
this.productBatchSelect.Size = new System.Drawing.Size(170, 28);
this.productBatchSelect.TabIndex = 15;
//
// uLabel2
//
this.uLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.uLabel2.AutoSize = true;
this.uLabel2.BackColor = System.Drawing.Color.Transparent;
this.uLabel2.Font = new System.Drawing.Font("宋体", 15F);
this.uLabel2.Location = new System.Drawing.Point(883, 53);
this.uLabel2.Name = "uLabel2";
this.uLabel2.Size = new System.Drawing.Size(109, 20);
this.uLabel2.TabIndex = 16;
this.uLabel2.Text = "生产批次:";
//
// U_ID
//
this.U_ID.DataPropertyName = "ID";
this.U_ID.HeaderText = "ID";
this.U_ID.Name = "U_ID";
this.U_ID.ReadOnly = true;
this.U_ID.Visible = false;
//
// U_RowIndex
//
this.U_RowIndex.DataPropertyName = "RowIndex";
this.U_RowIndex.HeaderText = "序号";
this.U_RowIndex.Name = "U_RowIndex";
this.U_RowIndex.ReadOnly = true;
//
// U_BarCode
//
this.U_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.U_BarCode.DataPropertyName = "BarCode";
this.U_BarCode.HeaderText = "条码";
this.U_BarCode.Name = "U_BarCode";
this.U_BarCode.ReadOnly = true;
//
// U_Goods_Name
//
this.U_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.U_Goods_Name.DataPropertyName = "Goods_Name";
this.U_Goods_Name.HeaderText = "产品名称";
this.U_Goods_Name.Name = "U_Goods_Name";
this.U_Goods_Name.ReadOnly = true;
//
// U_BeforeWeight
//
this.U_BeforeWeight.DataPropertyName = "BeforeWeight";
dataGridViewCellStyle11.Format = "#0.######";
this.U_BeforeWeight.DefaultCellStyle = dataGridViewCellStyle11;
this.U_BeforeWeight.HeaderText = "入库重量";
this.U_BeforeWeight.Name = "U_BeforeWeight";
this.U_BeforeWeight.ReadOnly = true;
//
// U_Weight
//
this.U_Weight.DataPropertyName = "Weight";
this.U_Weight.HeaderText = "重量";
this.U_Weight.Name = "U_Weight";
this.U_Weight.ReadOnly = true;
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel1.Location = new System.Drawing.Point(793, -1);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(514, 521);
this.flowLayoutPanel1.TabIndex = 4;
//
// CarcassTakeOutForm // CarcassTakeOutForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);


+ 143
- 142
ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.Designer.cs View File

@ -29,40 +29,38 @@
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SegmentProductionForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SegmentProductionForm));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle67 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle68 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle70 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle69 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle61 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle62 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle66 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle63 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle64 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle65 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.barPrintCheck = new System.Windows.Forms.CheckBox(); this.barPrintCheck = new System.Windows.Forms.CheckBox();
this.productBatchSelect = new System.Windows.Forms.ComboBox();
this.workUnitSelect = new System.Windows.Forms.ComboBox();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.closeBtn = new WinFormControl.UButton(); this.closeBtn = new WinFormControl.UButton();
this.uTimerLabel1 = new WinFormControl.UTimerLabel(); this.uTimerLabel1 = new WinFormControl.UTimerLabel();
this.productBatchSelect = new System.Windows.Forms.ComboBox();
this.workUnitSelect = new System.Windows.Forms.ComboBox();
this.uLabel1 = new WinFormControl.ULabel(); this.uLabel1 = new WinFormControl.ULabel();
this.uLabel2 = new WinFormControl.ULabel(); this.uLabel2 = new WinFormControl.ULabel();
this.netStateWatch1 = new WinFormControl.NetStateWatch(); this.netStateWatch1 = new WinFormControl.NetStateWatch();
this.uWeightControl1 = new WinFormControl.UWeightControl(); this.uWeightControl1 = new WinFormControl.UWeightControl();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.submitBtn = new WinFormControl.UButton(); this.submitBtn = new WinFormControl.UButton();
this.deleteBtn = new WinFormControl.UButton(); this.deleteBtn = new WinFormControl.UButton();
this.rePrintBtn = new WinFormControl.UButton(); this.rePrintBtn = new WinFormControl.UButton();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.historyDataGrid = new WinFormControl.UDataGridView(); this.historyDataGrid = new WinFormControl.UDataGridView();
this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uLabel3 = new WinFormControl.ULabel(); this.uLabel3 = new WinFormControl.ULabel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.taskDataGrid = new WinFormControl.UDataGridView(); this.taskDataGrid = new WinFormControl.UDataGridView();
this.T_Item = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.T_Item = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.T_Need = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.T_Need = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -70,9 +68,11 @@
this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GoodsLabel = new WinFormControl.ULabel(); this.GoodsLabel = new WinFormControl.ULabel();
this.trunOutBtn = new WinFormControl.UButton(); this.trunOutBtn = new WinFormControl.UButton();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.switchBtn = new WinFormControl.UButton(); this.switchBtn = new WinFormControl.UButton();
this.goodsSetBtn = new WinFormControl.UButton(); this.goodsSetBtn = new WinFormControl.UButton();
this.endBtn = new WinFormControl.UButton(); this.endBtn = new WinFormControl.UButton();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.startBtn = new WinFormControl.UButton(); this.startBtn = new WinFormControl.UButton();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
@ -83,8 +83,8 @@
this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout(); this.splitContainer2.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -128,101 +128,6 @@
this.barPrintCheck.Text = "启用打码"; this.barPrintCheck.Text = "启用打码";
this.barPrintCheck.UseVisualStyleBackColor = true; this.barPrintCheck.UseVisualStyleBackColor = true;
// //
// productBatchSelect
//
this.productBatchSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.productBatchSelect.Font = new System.Drawing.Font("宋体", 15F);
this.productBatchSelect.FormattingEnabled = true;
this.productBatchSelect.Location = new System.Drawing.Point(903, 47);
this.productBatchSelect.Name = "productBatchSelect";
this.productBatchSelect.Size = new System.Drawing.Size(170, 28);
this.productBatchSelect.TabIndex = 11;
//
// workUnitSelect
//
this.workUnitSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.workUnitSelect.Font = new System.Drawing.Font("宋体", 15F);
this.workUnitSelect.FormattingEnabled = true;
this.workUnitSelect.Location = new System.Drawing.Point(903, 11);
this.workUnitSelect.Name = "workUnitSelect";
this.workUnitSelect.Size = new System.Drawing.Size(170, 28);
this.workUnitSelect.TabIndex = 10;
//
// splitContainer2
//
this.splitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.submitBtn);
this.splitContainer2.Panel1.Controls.Add(this.deleteBtn);
this.splitContainer2.Panel1.Controls.Add(this.rePrintBtn);
this.splitContainer2.Panel1.Controls.Add(this.groupBox1);
this.splitContainer2.Panel1.Controls.Add(this.groupBox2);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.trunOutBtn);
this.splitContainer2.Panel2.Controls.Add(this.flowLayoutPanel2);
this.splitContainer2.Panel2.Controls.Add(this.switchBtn);
this.splitContainer2.Panel2.Controls.Add(this.goodsSetBtn);
this.splitContainer2.Panel2.Controls.Add(this.endBtn);
this.splitContainer2.Panel2.Controls.Add(this.flowLayoutPanel1);
this.splitContainer2.Panel2.Controls.Add(this.startBtn);
this.splitContainer2.Size = new System.Drawing.Size(1226, 511);
this.splitContainer2.SplitterDistance = 554;
this.splitContainer2.TabIndex = 0;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.historyDataGrid);
this.groupBox1.Controls.Add(this.uLabel3);
this.groupBox1.Location = new System.Drawing.Point(10, 174);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(5);
this.groupBox1.Size = new System.Drawing.Size(533, 332);
this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false;
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.taskDataGrid);
this.groupBox2.Controls.Add(this.GoodsLabel);
this.groupBox2.Location = new System.Drawing.Point(9, 8);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(5);
this.groupBox2.Size = new System.Drawing.Size(533, 120);
this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false;
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel2.Location = new System.Drawing.Point(-3, 125);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(670, 384);
this.flowLayoutPanel2.TabIndex = 21;
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel1.Location = new System.Drawing.Point(-3, 49);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(547, 70);
this.flowLayoutPanel1.TabIndex = 0;
//
// closeBtn // closeBtn
// //
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -259,6 +164,26 @@
this.uTimerLabel1.TabIndex = 14; this.uTimerLabel1.TabIndex = 14;
this.uTimerLabel1.Text = "4月21日 16:32:19"; this.uTimerLabel1.Text = "4月21日 16:32:19";
// //
// productBatchSelect
//
this.productBatchSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.productBatchSelect.Font = new System.Drawing.Font("宋体", 15F);
this.productBatchSelect.FormattingEnabled = true;
this.productBatchSelect.Location = new System.Drawing.Point(903, 47);
this.productBatchSelect.Name = "productBatchSelect";
this.productBatchSelect.Size = new System.Drawing.Size(170, 28);
this.productBatchSelect.TabIndex = 11;
//
// workUnitSelect
//
this.workUnitSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.workUnitSelect.Font = new System.Drawing.Font("宋体", 15F);
this.workUnitSelect.FormattingEnabled = true;
this.workUnitSelect.Location = new System.Drawing.Point(903, 11);
this.workUnitSelect.Name = "workUnitSelect";
this.workUnitSelect.Size = new System.Drawing.Size(170, 28);
this.workUnitSelect.TabIndex = 10;
//
// uLabel1 // uLabel1
// //
this.uLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.uLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -300,6 +225,35 @@
this.uWeightControl1.TabIndex = 0; this.uWeightControl1.TabIndex = 0;
this.uWeightControl1.WeightFalg = null; this.uWeightControl1.WeightFalg = null;
// //
// splitContainer2
//
this.splitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.submitBtn);
this.splitContainer2.Panel1.Controls.Add(this.deleteBtn);
this.splitContainer2.Panel1.Controls.Add(this.rePrintBtn);
this.splitContainer2.Panel1.Controls.Add(this.groupBox1);
this.splitContainer2.Panel1.Controls.Add(this.groupBox2);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.trunOutBtn);
this.splitContainer2.Panel2.Controls.Add(this.flowLayoutPanel2);
this.splitContainer2.Panel2.Controls.Add(this.switchBtn);
this.splitContainer2.Panel2.Controls.Add(this.goodsSetBtn);
this.splitContainer2.Panel2.Controls.Add(this.endBtn);
this.splitContainer2.Panel2.Controls.Add(this.flowLayoutPanel1);
this.splitContainer2.Panel2.Controls.Add(this.startBtn);
this.splitContainer2.Size = new System.Drawing.Size(1226, 511);
this.splitContainer2.SplitterDistance = 554;
this.splitContainer2.TabIndex = 0;
//
// submitBtn // submitBtn
// //
this.submitBtn.AsClicked = false; this.submitBtn.AsClicked = false;
@ -366,21 +320,35 @@
this.rePrintBtn.WithStataHode = false; this.rePrintBtn.WithStataHode = false;
this.rePrintBtn.Click += new System.EventHandler(this.rePrintBtn_Click); this.rePrintBtn.Click += new System.EventHandler(this.rePrintBtn_Click);
// //
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.historyDataGrid);
this.groupBox1.Controls.Add(this.uLabel3);
this.groupBox1.Location = new System.Drawing.Point(10, 174);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(5);
this.groupBox1.Size = new System.Drawing.Size(533, 332);
this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false;
//
// historyDataGrid // historyDataGrid
// //
this.historyDataGrid.AllowUserToAddRows = false; this.historyDataGrid.AllowUserToAddRows = false;
this.historyDataGrid.AllowUserToDeleteRows = false; this.historyDataGrid.AllowUserToDeleteRows = false;
this.historyDataGrid.AllowUserToResizeColumns = false; this.historyDataGrid.AllowUserToResizeColumns = false;
this.historyDataGrid.AllowUserToResizeRows = false; this.historyDataGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle67.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle67;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.historyDataGrid.BackgroundColor = System.Drawing.Color.White; this.historyDataGrid.BackgroundColor = System.Drawing.Color.White;
this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle68.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle68.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle68.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle68.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle68;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_RowIndex, this.H_RowIndex,
@ -393,9 +361,9 @@
this.historyDataGrid.Name = "historyDataGrid"; this.historyDataGrid.Name = "historyDataGrid";
this.historyDataGrid.ReadOnly = true; this.historyDataGrid.ReadOnly = true;
this.historyDataGrid.RowHeadersVisible = false; this.historyDataGrid.RowHeadersVisible = false;
dataGridViewCellStyle70.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle70.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle70;
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.historyDataGrid.RowTemplate.Height = 23; this.historyDataGrid.RowTemplate.Height = 23;
this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.historyDataGrid.Size = new System.Drawing.Size(523, 308); this.historyDataGrid.Size = new System.Drawing.Size(523, 308);
@ -428,8 +396,8 @@
// H_Weight // H_Weight
// //
this.H_Weight.DataPropertyName = "Weight"; this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle69.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle69;
dataGridViewCellStyle3.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle3;
this.H_Weight.HeaderText = "重量"; this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight"; this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true; this.H_Weight.ReadOnly = true;
@ -445,21 +413,34 @@
this.uLabel3.TabIndex = 1; this.uLabel3.TabIndex = 1;
this.uLabel3.Text = "生产历史"; this.uLabel3.Text = "生产历史";
// //
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.taskDataGrid);
this.groupBox2.Controls.Add(this.GoodsLabel);
this.groupBox2.Location = new System.Drawing.Point(9, 8);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(5);
this.groupBox2.Size = new System.Drawing.Size(533, 120);
this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false;
//
// taskDataGrid // taskDataGrid
// //
this.taskDataGrid.AllowUserToAddRows = false; this.taskDataGrid.AllowUserToAddRows = false;
this.taskDataGrid.AllowUserToDeleteRows = false; this.taskDataGrid.AllowUserToDeleteRows = false;
this.taskDataGrid.AllowUserToResizeColumns = false; this.taskDataGrid.AllowUserToResizeColumns = false;
this.taskDataGrid.AllowUserToResizeRows = false; this.taskDataGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle61.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle61;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
this.taskDataGrid.BackgroundColor = System.Drawing.Color.White; this.taskDataGrid.BackgroundColor = System.Drawing.Color.White;
this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle62.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle62.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle62.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle62.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle62;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle6.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.T_Item, this.T_Item,
@ -472,9 +453,9 @@
this.taskDataGrid.Name = "taskDataGrid"; this.taskDataGrid.Name = "taskDataGrid";
this.taskDataGrid.ReadOnly = true; this.taskDataGrid.ReadOnly = true;
this.taskDataGrid.RowHeadersVisible = false; this.taskDataGrid.RowHeadersVisible = false;
dataGridViewCellStyle66.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle66.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle66;
dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle10;
this.taskDataGrid.RowTemplate.Height = 23; this.taskDataGrid.RowTemplate.Height = 23;
this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.taskDataGrid.Size = new System.Drawing.Size(523, 96); this.taskDataGrid.Size = new System.Drawing.Size(523, 96);
@ -491,8 +472,8 @@
// //
this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Need.DataPropertyName = "Need"; this.T_Need.DataPropertyName = "Need";
dataGridViewCellStyle63.Format = "#0.######";
this.T_Need.DefaultCellStyle = dataGridViewCellStyle63;
dataGridViewCellStyle7.Format = "#0.######";
this.T_Need.DefaultCellStyle = dataGridViewCellStyle7;
this.T_Need.HeaderText = "订货"; this.T_Need.HeaderText = "订货";
this.T_Need.Name = "T_Need"; this.T_Need.Name = "T_Need";
this.T_Need.ReadOnly = true; this.T_Need.ReadOnly = true;
@ -501,8 +482,8 @@
// //
this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Done.DataPropertyName = "Done"; this.T_Done.DataPropertyName = "Done";
dataGridViewCellStyle64.Format = "#0.######";
this.T_Done.DefaultCellStyle = dataGridViewCellStyle64;
dataGridViewCellStyle8.Format = "#0.######";
this.T_Done.DefaultCellStyle = dataGridViewCellStyle8;
this.T_Done.HeaderText = "完工"; this.T_Done.HeaderText = "完工";
this.T_Done.Name = "T_Done"; this.T_Done.Name = "T_Done";
this.T_Done.ReadOnly = true; this.T_Done.ReadOnly = true;
@ -511,8 +492,8 @@
// //
this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Last.DataPropertyName = "Last"; this.T_Last.DataPropertyName = "Last";
dataGridViewCellStyle65.Format = "#0.######";
this.T_Last.DefaultCellStyle = dataGridViewCellStyle65;
dataGridViewCellStyle9.Format = "#0.######";
this.T_Last.DefaultCellStyle = dataGridViewCellStyle9;
this.T_Last.HeaderText = "剩余"; this.T_Last.HeaderText = "剩余";
this.T_Last.Name = "T_Last"; this.T_Last.Name = "T_Last";
this.T_Last.ReadOnly = true; this.T_Last.ReadOnly = true;
@ -552,6 +533,18 @@
this.trunOutBtn.WithStataHode = false; this.trunOutBtn.WithStataHode = false;
this.trunOutBtn.Click += new System.EventHandler(this.trunOutBtn_Click); this.trunOutBtn.Click += new System.EventHandler(this.trunOutBtn_Click);
// //
// flowLayoutPanel2
//
this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel2.AutoScroll = true;
this.flowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel2.Location = new System.Drawing.Point(-3, 125);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(670, 384);
this.flowLayoutPanel2.TabIndex = 21;
//
// switchBtn // switchBtn
// //
this.switchBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.switchBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -621,6 +614,14 @@
this.endBtn.WithStataHode = false; this.endBtn.WithStataHode = false;
this.endBtn.Click += new System.EventHandler(this.endBtn_Click); this.endBtn.Click += new System.EventHandler(this.endBtn_Click);
// //
// flowLayoutPanel1
//
this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel1.Location = new System.Drawing.Point(-3, 49);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(547, 70);
this.flowLayoutPanel1.TabIndex = 0;
//
// startBtn // startBtn
// //
this.startBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.startBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -664,9 +665,9 @@
this.splitContainer2.ResumeLayout(false); this.splitContainer2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).EndInit();
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout(); this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);


+ 23
- 14
ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs View File

@ -43,7 +43,8 @@ namespace ButcherFactory.SegmentProduction_
startBtn.Enabled = !start; startBtn.Enabled = !start;
endBtn.Enabled = start; endBtn.Enabled = start;
} }
//GroupID 标识有没有结束,同时是总码的标识。
//TrunOutID 标识挂起,同时标识挂起的组。 点击挂起 或者切换,需要给该字段赋值,点击切换回来,需要清空
public SegmentProductionForm() public SegmentProductionForm()
{ {
InitializeComponent(); InitializeComponent();
@ -147,11 +148,15 @@ namespace ButcherFactory.SegmentProduction_
throw new Exception(string.Format("重量必须在{0:#0.######}-{1:#0.######}之间", detail.StandardWeightLow, detail.StandardWeightUp)); throw new Exception(string.Format("重量必须在{0:#0.######}-{1:#0.######}之间", detail.StandardWeightLow, detail.StandardWeightUp));
weight = detail.StandardWeight.Value; weight = detail.StandardWeight.Value;
} }
if (startBtn.Enabled)
Start(true);
var entity = SegmentProductionBL.Insert(detail.Goods_ID, weight, workUnitID, batchID.Value, batchDate.Value); var entity = SegmentProductionBL.Insert(detail.Goods_ID, weight, workUnitID, batchID.Value, batchDate.Value);
entity.Goods_Name = detail.Goods_Name; entity.Goods_Name = detail.Goods_Name;
GoodsLabel.Text = entity.Goods_Name; GoodsLabel.Text = entity.Goods_Name;
unSubmitList.Insert(0, entity); unSubmitList.Insert(0, entity);
historyList.Insert(0, entity); historyList.Insert(0, entity);
if (historyList.Count > 100)
historyList.RemoveAt(100);
historyDataGrid.FirstDisplayedScrollingRowIndex = 0; historyDataGrid.FirstDisplayedScrollingRowIndex = 0;
historyDataGrid.Refresh(); historyDataGrid.Refresh();
} }
@ -168,7 +173,7 @@ namespace ButcherFactory.SegmentProduction_
historyDataGrid.DataSource = historyList; historyDataGrid.DataSource = historyList;
historyDataGrid.Refresh(); historyDataGrid.Refresh();
var first = unSubmitList.FirstOrDefault(x => x.GroupID == null && !x.TrunOut);
var first = unSubmitList.FirstOrDefault(x => x.GroupID == null && x.TrunOutID == null);
if (first == null) if (first == null)
Start(false); Start(false);
else else
@ -206,7 +211,7 @@ namespace ButcherFactory.SegmentProduction_
private void endBtn_Click(object sender, EventArgs e) private void endBtn_Click(object sender, EventArgs e)
{ {
var arr = unSubmitList.Where(x => x.GroupID == null && !x.TrunOut);
var arr = unSubmitList.Where(x => x.GroupID == null && x.TrunOutID == null);
if (arr.Any()) if (arr.Any())
{ {
var groupID = SegmentProductionBL.SetListGroupID(arr.Select(x => x.ID)); var groupID = SegmentProductionBL.SetListGroupID(arr.Select(x => x.ID));
@ -224,11 +229,15 @@ namespace ButcherFactory.SegmentProduction_
private void trunOutBtn_Click(object sender, EventArgs e) private void trunOutBtn_Click(object sender, EventArgs e)
{ {
var arr = unSubmitList.Where(x => x.GroupID == null && !x.TrunOut);
var arr = unSubmitList.Where(x => x.GroupID == null && x.TrunOutID == null);
long id = 0;
if (arr.Any()) if (arr.Any())
SegmentProductionBL.BatchUpdate(arr.Select(x => x.ID), new Tuple<string, object>("TrunOut", true));
{
id = arr.First().ID;
SegmentProductionBL.BatchUpdate(arr.Select(x => x.ID), new Tuple<string, object>("TrunOutID", id));
}
foreach (var item in arr) foreach (var item in arr)
item.TrunOut = true;
item.TrunOutID = id;
GoodsLabel.Text = string.Empty; GoodsLabel.Text = string.Empty;
Start(false); Start(false);
} }
@ -236,19 +245,19 @@ namespace ButcherFactory.SegmentProduction_
private void switchBtn_Click(object sender, EventArgs e) private void switchBtn_Click(object sender, EventArgs e)
{ {
trunOutBtn_Click(sender, e); trunOutBtn_Click(sender, e);
var arr = unSubmitList.Where(x => x.GroupID == null);
var arr = unSubmitList.Where(x => x.GroupID == null && x.TrunOutID.HasValue);
var r = new BindingList<SegmentProduction>(); var r = new BindingList<SegmentProduction>();
foreach (var item in arr.GroupBy(x => x.Goods_Name))
foreach (var item in arr.GroupBy(x => x.TrunOutID))
r.Add(item.First()); r.Add(item.First());
var dialog = new TrunOutDialog(r); var dialog = new TrunOutDialog(r);
if (dialog.ShowDialog() == DialogResult.OK) if (dialog.ShowDialog() == DialogResult.OK)
{ {
var gName = dialog.backGoodsName;
var targets = arr.Where(x => x.Goods_Name == gName);
SegmentProductionBL.BatchUpdate(targets.Select(x => x.ID), new Tuple<string, object>("TrunOut", false));
var back = dialog.Back;
var targets = arr.Where(x => x.TrunOutID == back.TrunOutID);
SegmentProductionBL.TrunBack(targets.Select(x => x.ID));
foreach (var item in targets) foreach (var item in targets)
item.TrunOut = false;
GoodsLabel.Text = gName;
item.TrunOutID = null;
GoodsLabel.Text = back.Goods_Name;
Start(true); Start(true);
} }
} }
@ -270,7 +279,7 @@ namespace ButcherFactory.SegmentProduction_
private void submitBtn_Click(object sender, EventArgs e) private void submitBtn_Click(object sender, EventArgs e)
{ {
var arrs = unSubmitList.Where(x => x.GroupID.HasValue && !x.TrunOut).ToList();
var arrs = unSubmitList.Where(x => x.GroupID.HasValue).ToList();
if (arrs.Any()) if (arrs.Any())
{ {
SegmentProductionBL.BatchUpdate(arrs.Select(x => x.ID), new Tuple<string, object>("Submited", true)); SegmentProductionBL.BatchUpdate(arrs.Select(x => x.ID), new Tuple<string, object>("Submited", true));


+ 3
- 3
ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.resx View File

@ -150,6 +150,9 @@
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<metadata name="H_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="T_Last.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="T_Last.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
@ -193,7 +196,4 @@
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<metadata name="H_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root> </root>

+ 11
- 0
ButcherFactory.Form/SegmentProduction_/TrunOutDialog.Designer.cs View File

@ -35,6 +35,7 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.closeBtn = new WinFormControl.UButton(); this.closeBtn = new WinFormControl.UButton();
this.uDataGridView1 = new WinFormControl.UDataGridView(); this.uDataGridView1 = new WinFormControl.UDataGridView();
this.G_TrunOutID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.G_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.G_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.G_CreateTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.G_CreateTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.G_GoBack = new System.Windows.Forms.DataGridViewButtonColumn(); this.G_GoBack = new System.Windows.Forms.DataGridViewButtonColumn();
@ -81,6 +82,7 @@
this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.G_TrunOutID,
this.G_Goods_Name, this.G_Goods_Name,
this.G_CreateTime, this.G_CreateTime,
this.G_GoBack}); this.G_GoBack});
@ -97,6 +99,14 @@
this.uDataGridView1.Size = new System.Drawing.Size(595, 329); this.uDataGridView1.Size = new System.Drawing.Size(595, 329);
this.uDataGridView1.TabIndex = 17; this.uDataGridView1.TabIndex = 17;
// //
// G_TrunOutID
//
this.G_TrunOutID.DataPropertyName = "TrunOutID";
this.G_TrunOutID.HeaderText = "TrunOutID";
this.G_TrunOutID.Name = "G_TrunOutID";
this.G_TrunOutID.ReadOnly = true;
this.G_TrunOutID.Visible = false;
//
// G_Goods_Name // G_Goods_Name
// //
this.G_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.G_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
@ -144,6 +154,7 @@
private WinFormControl.UButton closeBtn; private WinFormControl.UButton closeBtn;
private WinFormControl.UDataGridView uDataGridView1; private WinFormControl.UDataGridView uDataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn G_TrunOutID;
private System.Windows.Forms.DataGridViewTextBoxColumn G_Goods_Name; private System.Windows.Forms.DataGridViewTextBoxColumn G_Goods_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn G_CreateTime; private System.Windows.Forms.DataGridViewTextBoxColumn G_CreateTime;
private System.Windows.Forms.DataGridViewButtonColumn G_GoBack; private System.Windows.Forms.DataGridViewButtonColumn G_GoBack;


+ 3
- 3
ButcherFactory.Form/SegmentProduction_/TrunOutDialog.cs View File

@ -13,7 +13,7 @@ namespace ButcherFactory.SegmentProduction_
{ {
public partial class TrunOutDialog : Form public partial class TrunOutDialog : Form
{ {
public string backGoodsName;
public SegmentProduction Back;
BindingList<SegmentProduction> list; BindingList<SegmentProduction> list;
public TrunOutDialog(BindingList<SegmentProduction> trunOutList) public TrunOutDialog(BindingList<SegmentProduction> trunOutList)
{ {
@ -31,9 +31,9 @@ namespace ButcherFactory.SegmentProduction_
void uDataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) void uDataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{ {
if (e.ColumnIndex != 2)
if (e.ColumnIndex != 3)
return; return;
backGoodsName = (string)uDataGridView1.CurrentRow.Cells[0].Value;
Back = uDataGridView1.CurrentRow.DataBoundItem as SegmentProduction;
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
this.Close(); this.Close();
} }


+ 3
- 0
ButcherFactory.Form/SegmentProduction_/TrunOutDialog.resx View File

@ -126,6 +126,9 @@
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<metadata name="G_TrunOutID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="G_Goods_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="G_Goods_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>


Loading…
Cancel
Save