diff --git a/ButcherFactory.BO/Bill/SegmentProduction.cs b/ButcherFactory.BO/Bill/SegmentProduction.cs index 71da01d..318ec5f 100644 --- a/ButcherFactory.BO/Bill/SegmentProduction.cs +++ b/ButcherFactory.BO/Bill/SegmentProduction.cs @@ -34,7 +34,17 @@ namespace ButcherFactory.BO public long ProductBatch_ID { get; set; } - public long Goods_ID { get; set; } + public long Goods_ID { get; set; } + + [DbColumn(DefaultValue = 0)] + public long TotalCode_ID { get; set; } + + [NonDmoProperty] + public bool Select { get; set; } + + [ReferenceTo(typeof(TotalCode), "BarCode")] + [Join("TotalCode_ID", "ID")] + public string TotalCode_Code { get; set; } public decimal Weight { get; set; } diff --git a/ButcherFactory.BO/Bill/TotalCode.cs b/ButcherFactory.BO/Bill/TotalCode.cs new file mode 100644 index 0000000..4172f37 --- /dev/null +++ b/ButcherFactory.BO/Bill/TotalCode.cs @@ -0,0 +1,30 @@ +using Forks.EnterpriseServices.DataDictionary; +using Forks.EnterpriseServices.DomainObjects2; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherFactory.BO +{ + [MapToTable("Butcher_TotalCode")] + public class TotalCode : SyncBill + { + public string BarCode { get; set; } + + + [NonDmoProperty] + public string ShortCode + { + get + { + if (string.IsNullOrEmpty(BarCode)) + return ""; + if (BarCode.Length>4) + return BarCode.Substring(BarCode.Length-4); + return BarCode; + } + } + } +} diff --git a/ButcherFactory.BO/ButcherFactory.BO.csproj b/ButcherFactory.BO/ButcherFactory.BO.csproj index 918a670..df4546a 100644 --- a/ButcherFactory.BO/ButcherFactory.BO.csproj +++ b/ButcherFactory.BO/ButcherFactory.BO.csproj @@ -66,6 +66,7 @@ + diff --git a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs index ad00f58..ef4268c 100644 --- a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs @@ -34,7 +34,9 @@ namespace ButcherFactory.BO.LocalBL query.Columns.Add(DQSelectColumn.Field("Goods_ID")); query.Columns.Add(DQSelectColumn.Field("Goods_Code")); query.Columns.Add(DQSelectColumn.Field("ShotPrintName")); - query.Columns.Add(DQSelectColumn.Field("MainUnit")); + query.Columns.Add(DQSelectColumn.Field("MainUnit")); + query.Columns.Add(DQSelectColumn.Field("TotalCode_ID")); + query.Columns.Add(DQSelectColumn.Field("TotalCode_Code")); query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("InStored", false), DQCondition.EQ("Delete", false), DQCondition.EQ("Submited", submited))); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true)); if (submited) @@ -52,18 +54,50 @@ namespace ButcherFactory.BO.LocalBL var entity = new SegmentProduction(); entity.ID = (long)reader[0]; entity.RowIndex = (int?)reader[1]; - entity.BarCode = (string)reader[2]; - entity.Weight = (decimal)reader[3]; - entity.Goods_Name = (string)reader[4]; - entity.GroupID = (long?)reader[5]; - entity.TrunOutID = (long?)reader[6]; - entity.Goods_Spec = (string)reader[7]; - entity.StandardPic = (bool)reader[8]; + entity.BarCode = (string)reader[2]; + entity.Weight = (decimal)reader[3]; + entity.Goods_Name = (string)reader[4]; + entity.GroupID = (long?)reader[5]; + entity.TrunOutID = (long?)reader[6]; + entity.Goods_Spec = (string)reader[7]; + entity.StandardPic = (bool)reader[8]; entity.Goods_ID = (long)reader[9]; entity.Goods_Code = (string)reader[10]; - entity.ShotPrintName = (string)reader[11]; - entity.Submited = submited; - entity.MainUnit = (string)reader[12]; + entity.ShotPrintName = (string)reader[11]; + entity.Submited = submited; + entity.MainUnit = (string)reader[12]; + entity.TotalCode_ID = (long)reader[13]; + entity.TotalCode_Code = (string)reader[14]; + list.Add(entity); + } + } + } + + return list; + } + + public static BindingList GetTotalCode( DateTime date) + { + var query = new DQueryDom(new JoinAlias(typeof(TotalCode))); + query.Columns.Add(DQSelectColumn.Field("ID")); + query.Columns.Add(DQSelectColumn.Field("RowIndex")); + query.Columns.Add(DQSelectColumn.Field("BarCode")); + query.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("CreateTime", date.Date)); + query.Where.Conditions.Add(DQCondition.LessThan("CreateTime", date.Date.AddDays(1))); + query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID")); + + var list = new BindingList(); + using (var session = DmoSession.New()) + { + using (var reader = session.ExecuteReader(query)) + { + while (reader.Read()) + { + var entity = new TotalCode(); + entity.ID = (long)reader[0]; + entity.RowIndex = (int?)reader[1]; + entity.BarCode = (string)reader[2]; + list.Add(entity); } } @@ -120,6 +154,36 @@ namespace ButcherFactory.BO.LocalBL session.Commit(); return entity; } + } + + public static TotalCode InsertTotalCode(TotalCode entity) + { + return InsertTotalCode(entity, DateTime.Now); + } + + public static TotalCode InsertTotalCode(TotalCode entity,DateTime date ) + { + using (var session = DmoSession.New()) + { + entity.UserID = AppContext.Worker.ID; + + entity.RowIndex = TotalCodeRowIndex(date, session); + // 年月日+2位机器号+4位顺序号 + entity.BarCode = string.Format("{0:yyyyMMdd}{1}{2:0000}", date, AppContext.ConnectInfo.ClientCode, entity.RowIndex); + + session.Insert(entity); + session.Commit(); + return entity; + } + } + + static int TotalCodeRowIndex( DateTime date, IDmoSession session) + { + var query = new DQueryDom(new JoinAlias("_main", typeof(TotalCode))); + query.Columns.Add(DQSelectColumn.Max("RowIndex")); + query.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("CreateTime", date.Date)); + query.Where.Conditions.Add(DQCondition.LessThan("CreateTime", date.Date.AddDays(1))); + return (query.EExecuteScalar(session) ?? 0) + 1; } static void FillGroupIDAsID(IDmoSession session, long id) @@ -331,6 +395,7 @@ namespace ButcherFactory.BO.LocalBL query.Columns.Add(DQSelectColumn.Field("StandardPic")); query.Columns.Add(DQSelectColumn.Field("MsgID")); query.Columns.Add(DQSelectColumn.Field("StatisticNumber")); + query.Columns.Add(DQSelectColumn.Field("TotalCode_Code")); query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Submited", true), DQCondition.EQ("Sync", false), DQCondition.EQ("Delete", false))); //query.Where.Conditions.Add(DQCondition.LessThan("CreateTime", DateTime.Now.AddMinutes(-1))); query.Range = SelectRange.Top(10); @@ -353,8 +418,9 @@ namespace ButcherFactory.BO.LocalBL obj.ProductTime = (DateTime)reader[8]; obj.Delete = (bool)reader[9]; obj.StandardPic = (bool)reader[10]; - obj.MsgID = (string)reader[11]; - obj.StatisticNumber = (decimal?)reader[12]; + obj.MsgID = (string)reader[11]; + obj.StatisticNumber = (decimal?)reader[12]; + obj.TotalCode_Code = (string)reader[13]; upload.Add(obj); } } @@ -468,7 +534,8 @@ namespace ButcherFactory.BO.LocalBL public bool Delete { get; set; } public bool StandardPic { get; set; } public string MsgID { get; set; } - public decimal? StatisticNumber { get; set; } + public decimal? StatisticNumber { get; set; } + public string TotalCode_Code { get; set; } } class TaskTemp diff --git a/ButcherFactory.Form/ButcherFactory.Form.csproj b/ButcherFactory.Form/ButcherFactory.Form.csproj index 70ea1af..7293c7b 100644 --- a/ButcherFactory.Form/ButcherFactory.Form.csproj +++ b/ButcherFactory.Form/ButcherFactory.Form.csproj @@ -78,6 +78,12 @@ Component + + UserControl + + + CodePanel.cs + Component @@ -244,6 +250,7 @@ WeightView.cs + Form @@ -337,6 +344,9 @@ CarcassSaleOutReadForm.cs + + CodePanel.cs + FormTemplate.cs diff --git a/ButcherFactory.Form/Controls/CodePanel.Designer.cs b/ButcherFactory.Form/Controls/CodePanel.Designer.cs new file mode 100644 index 0000000..d81c102 --- /dev/null +++ b/ButcherFactory.Form/Controls/CodePanel.Designer.cs @@ -0,0 +1,76 @@ +namespace ButcherFactory.Controls +{ + partial class CodePanel + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.Button = new ButcherFactory.Controls.ColorButton(); + this.SuspendLayout(); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.AutoScroll = true; + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 64); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(130, 534); + this.flowLayoutPanel1.TabIndex = 0; + this.flowLayoutPanel1.WrapContents = false; + // + // Button + // + this.Button.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.Button.Font = new System.Drawing.Font("黑体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Button.ForeColor = System.Drawing.Color.Black; + this.Button.Location = new System.Drawing.Point(0, 0); + this.Button.Name = "Button"; + this.Button.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107))))); + this.Button.Size = new System.Drawing.Size(127, 58); + this.Button.TabIndex = 1; + this.Button.UseVisualStyleBackColor = false; + // + // CodePanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.Controls.Add(this.Button); + this.Controls.Add(this.flowLayoutPanel1); + this.Name = "CodePanel"; + this.Size = new System.Drawing.Size(130, 598); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + public ColorButton Button ; + } +} diff --git a/ButcherFactory.Form/Controls/CodePanel.cs b/ButcherFactory.Form/Controls/CodePanel.cs new file mode 100644 index 0000000..91aa561 --- /dev/null +++ b/ButcherFactory.Form/Controls/CodePanel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ButcherFactory.Controls +{ + public partial class CodePanel : UserControl + { + public CodePanel() + { + InitializeComponent(); + } + + public void Add(Control v) + { + flowLayoutPanel1.Controls.Add(v); + } + } +} diff --git a/ButcherFactory.Form/Controls/CodePanel.resx b/ButcherFactory.Form/Controls/CodePanel.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ButcherFactory.Form/Controls/CodePanel.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ButcherFactory.Form/Controls/UserControl1.Designer.cs b/ButcherFactory.Form/Controls/UserControl1.Designer.cs index 11e2d42..687618c 100644 --- a/ButcherFactory.Form/Controls/UserControl1.Designer.cs +++ b/ButcherFactory.Form/Controls/UserControl1.Designer.cs @@ -32,15 +32,18 @@ this.Button = new ButcherFactory.Controls.ColorButton(); this.SuspendLayout(); // - // Tag - // + // Label + // this.Label.BackColor = System.Drawing.Color.DeepSkyBlue; - this.Label.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Label.Font = new System.Drawing.Font("黑体", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Label.ForeColor = System.Drawing.Color.White; this.Label.Location = new System.Drawing.Point(111, 0); - this.Label.Name = "Tag"; - this.Label.Size = new System.Drawing.Size(36, 33); + this.Label.MaxCount = 1; + this.Label.MinCount = 0; + this.Label.Name = "Label"; + this.Label.Size = new System.Drawing.Size(64, 56); this.Label.TabIndex = 1; + this.Label.Text = "1-0"; this.Label.UseVisualStyleBackColor = false; // // Button @@ -61,9 +64,8 @@ this.Controls.Add(this.Label); this.Controls.Add(this.Button); this.Name = "ButtonTag"; - this.Size = new System.Drawing.Size(147, 90); + this.Size = new System.Drawing.Size(178, 90); this.ResumeLayout(false); - this.PerformLayout(); } diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs index 3751a1e..da70b25 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs @@ -28,595 +28,549 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = 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 dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - this.uLabel3 = new WinFormControl.ULabel(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.taskDataGrid = new WinFormControl.UDataGridView(); - this.T_Item = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.T_Need = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.T_Done = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.GoodsLabel = new WinFormControl.ULabel(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.statisticNumberBox = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.logBtn = new ButcherFactory.Controls.ColorButton(); - this.msglbl = new System.Windows.Forms.Label(); - this.closeBtn = new ButcherFactory.Controls.ColorButton(); - this.uWeightControl1 = new ButcherFactory.Controls.WeightControl(); - this.barPrintCheck = new System.Windows.Forms.CheckBox(); - 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.uLabel2 = new WinFormControl.ULabel(); - this.netStateWatch1 = new WinFormControl.NetStateWatch(); - this.splitContainer2 = new System.Windows.Forms.SplitContainer(); - this.goodsSetBtn = new ButcherFactory.Controls.ColorButton(); - this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.viewTaskBtn = new ButcherFactory.Controls.ColorButton(); - this.deleteBtn = new ButcherFactory.Controls.ColorButton(); - this.rePrintBtn = new ButcherFactory.Controls.ColorButton(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.historyDataGrid = new WinFormControl.UDataGridView(); - this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.numberInput = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); - this.splitContainer2.Panel1.SuspendLayout(); - this.splitContainer2.Panel2.SuspendLayout(); - this.splitContainer2.SuspendLayout(); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).BeginInit(); - this.SuspendLayout(); - // - // uLabel3 - // - this.uLabel3.AutoSize = true; - this.uLabel3.BackColor = System.Drawing.Color.White; - this.uLabel3.Font = new System.Drawing.Font("宋体", 12F); - this.uLabel3.Location = new System.Drawing.Point(8, 0); - this.uLabel3.Name = "uLabel3"; - this.uLabel3.Size = new System.Drawing.Size(72, 16); - this.uLabel3.TabIndex = 1; - this.uLabel3.Text = "生产历史"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.taskDataGrid); - this.groupBox2.Controls.Add(this.GoodsLabel); - this.groupBox2.Location = new System.Drawing.Point(3, 3); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Padding = new System.Windows.Forms.Padding(5); - this.groupBox2.Size = new System.Drawing.Size(452, 120); - this.groupBox2.TabIndex = 4; - this.groupBox2.TabStop = false; - // - // taskDataGrid - // - this.taskDataGrid.AllowUserToAddRows = false; - this.taskDataGrid.AllowUserToDeleteRows = false; - this.taskDataGrid.AllowUserToResizeColumns = false; - this.taskDataGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.taskDataGrid.BackgroundColor = System.Drawing.Color.White; - this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; - 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.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; - this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + this.uLabel3 = new WinFormControl.ULabel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.taskDataGrid = new WinFormControl.UDataGridView(); + this.T_Item = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Need = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Done = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.GoodsLabel = new WinFormControl.ULabel(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.numberInput = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.statisticNumberBox = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.logBtn = new ButcherFactory.Controls.ColorButton(); + this.msglbl = new System.Windows.Forms.Label(); + this.closeBtn = new ButcherFactory.Controls.ColorButton(); + this.uWeightControl1 = new ButcherFactory.Controls.WeightControl(); + this.barPrintCheck = new System.Windows.Forms.CheckBox(); + 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.uLabel2 = new WinFormControl.ULabel(); + this.netStateWatch1 = new WinFormControl.NetStateWatch(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.goodsSetBtn = new ButcherFactory.Controls.ColorButton(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.colorButton2 = new ButcherFactory.Controls.ColorButton(); + this.viewTaskBtn = new ButcherFactory.Controls.ColorButton(); + this.colorButton1 = new ButcherFactory.Controls.ColorButton(); + this.deleteBtn = new ButcherFactory.Controls.ColorButton(); + this.rePrintBtn = new ButcherFactory.Controls.ColorButton(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // uLabel3 + // + this.uLabel3.AutoSize = true; + this.uLabel3.BackColor = System.Drawing.Color.White; + this.uLabel3.Font = new System.Drawing.Font("宋体", 12F); + this.uLabel3.Location = new System.Drawing.Point(8, 0); + this.uLabel3.Name = "uLabel3"; + this.uLabel3.Size = new System.Drawing.Size(72, 16); + this.uLabel3.TabIndex = 1; + this.uLabel3.Text = "生产历史"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.taskDataGrid); + this.groupBox2.Location = new System.Drawing.Point(3, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Padding = new System.Windows.Forms.Padding(5); + this.groupBox2.Size = new System.Drawing.Size(452, 120); + this.groupBox2.TabIndex = 4; + this.groupBox2.TabStop = false; + // + // taskDataGrid + // + this.taskDataGrid.AllowUserToAddRows = false; + this.taskDataGrid.AllowUserToDeleteRows = false; + this.taskDataGrid.AllowUserToResizeColumns = false; + this.taskDataGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.taskDataGrid.BackgroundColor = System.Drawing.Color.White; + this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; + 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.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.T_Item, this.T_Need, this.T_Done, this.T_Last}); - this.taskDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; - this.taskDataGrid.Location = new System.Drawing.Point(5, 19); - this.taskDataGrid.MultiSelect = false; - this.taskDataGrid.Name = "taskDataGrid"; - this.taskDataGrid.ReadOnly = true; - this.taskDataGrid.RowHeadersVisible = false; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle6; - this.taskDataGrid.RowTemplate.Height = 23; - this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.taskDataGrid.Size = new System.Drawing.Size(442, 96); - this.taskDataGrid.TabIndex = 2; - // - // T_Item - // - this.T_Item.DataPropertyName = "Item"; - this.T_Item.HeaderText = "项目"; - this.T_Item.Name = "T_Item"; - this.T_Item.ReadOnly = true; - // - // T_Need - // - this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.T_Need.DataPropertyName = "Need"; - dataGridViewCellStyle3.Format = "#0.######"; - this.T_Need.DefaultCellStyle = dataGridViewCellStyle3; - this.T_Need.HeaderText = "订货"; - this.T_Need.Name = "T_Need"; - this.T_Need.ReadOnly = true; - // - // T_Done - // - this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.T_Done.DataPropertyName = "Done"; - dataGridViewCellStyle4.Format = "#0.######"; - this.T_Done.DefaultCellStyle = dataGridViewCellStyle4; - this.T_Done.HeaderText = "完工"; - this.T_Done.Name = "T_Done"; - this.T_Done.ReadOnly = true; - // - // T_Last - // - this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.T_Last.DataPropertyName = "Last"; - dataGridViewCellStyle5.Format = "#0.######"; - this.T_Last.DefaultCellStyle = dataGridViewCellStyle5; - this.T_Last.HeaderText = "剩余"; - this.T_Last.Name = "T_Last"; - this.T_Last.ReadOnly = true; - // - // GoodsLabel - // - this.GoodsLabel.AutoSize = true; - this.GoodsLabel.BackColor = System.Drawing.Color.White; - this.GoodsLabel.Font = new System.Drawing.Font("宋体", 12F); - this.GoodsLabel.ForeColor = System.Drawing.Color.Red; - this.GoodsLabel.Location = new System.Drawing.Point(8, 0); - this.GoodsLabel.Name = "GoodsLabel"; - this.GoodsLabel.Size = new System.Drawing.Size(72, 16); - this.GoodsLabel.TabIndex = 1; - this.GoodsLabel.Text = "存货名称"; - // - // splitContainer1 - // - this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer1.IsSplitterFixed = true; - this.splitContainer1.Location = new System.Drawing.Point(0, 0); - this.splitContainer1.Name = "splitContainer1"; - this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.numberInput); - this.splitContainer1.Panel1.Controls.Add(this.label2); - this.splitContainer1.Panel1.Controls.Add(this.statisticNumberBox); - this.splitContainer1.Panel1.Controls.Add(this.label1); - this.splitContainer1.Panel1.Controls.Add(this.logBtn); - this.splitContainer1.Panel1.Controls.Add(this.msglbl); - this.splitContainer1.Panel1.Controls.Add(this.closeBtn); - this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1); - this.splitContainer1.Panel1.Controls.Add(this.barPrintCheck); - this.splitContainer1.Panel1.Controls.Add(this.uTimerLabel1); - this.splitContainer1.Panel1.Controls.Add(this.productBatchSelect); - this.splitContainer1.Panel1.Controls.Add(this.workUnitSelect); - this.splitContainer1.Panel1.Controls.Add(this.uLabel1); - this.splitContainer1.Panel1.Controls.Add(this.uLabel2); - this.splitContainer1.Panel1.Controls.Add(this.netStateWatch1); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); - this.splitContainer1.Size = new System.Drawing.Size(1226, 602); - this.splitContainer1.SplitterDistance = 87; - this.splitContainer1.TabIndex = 1; - // - // statisticNumberBox - // - this.statisticNumberBox.Font = new System.Drawing.Font("宋体", 15F); - this.statisticNumberBox.Location = new System.Drawing.Point(502, 47); - this.statisticNumberBox.Name = "statisticNumberBox"; - this.statisticNumberBox.Size = new System.Drawing.Size(115, 30); - this.statisticNumberBox.TabIndex = 27; - this.statisticNumberBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.StatisticNumberBox_MouseClick); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("宋体", 15F); - this.label1.Location = new System.Drawing.Point(400, 51); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(109, 20); - this.label1.TabIndex = 26; - this.label1.Text = "统计数量:"; - // - // logBtn - // - this.logBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.logBtn.BackColor = System.Drawing.Color.CadetBlue; - this.logBtn.Font = new System.Drawing.Font("宋体", 15F); - this.logBtn.ForeColor = System.Drawing.Color.White; - this.logBtn.Location = new System.Drawing.Point(670, 4); - this.logBtn.Name = "logBtn"; - this.logBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.logBtn.Size = new System.Drawing.Size(111, 41); - this.logBtn.TabIndex = 25; - this.logBtn.Text = "日志"; - this.logBtn.UseVisualStyleBackColor = false; - this.logBtn.Click += new System.EventHandler(this.logBtn_Click); - // - // msglbl - // - this.msglbl.AutoSize = true; - this.msglbl.ForeColor = System.Drawing.Color.Red; - this.msglbl.Location = new System.Drawing.Point(458, 14); - this.msglbl.Name = "msglbl"; - this.msglbl.Size = new System.Drawing.Size(101, 12); - this.msglbl.TabIndex = 24; - this.msglbl.Text = "正在获取基础信息"; - // - // closeBtn - // - this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25))))); - this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); - this.closeBtn.ForeColor = System.Drawing.Color.White; - this.closeBtn.Location = new System.Drawing.Point(1109, 7); - this.closeBtn.Name = "closeBtn"; - this.closeBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.closeBtn.Size = new System.Drawing.Size(111, 41); - this.closeBtn.TabIndex = 18; - this.closeBtn.Text = "关闭"; - this.closeBtn.UseVisualStyleBackColor = false; - this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); - // - // uWeightControl1 - // - this.uWeightControl1.BackColor = System.Drawing.Color.Transparent; - this.uWeightControl1.Location = new System.Drawing.Point(12, 7); - this.uWeightControl1.Name = "uWeightControl1"; - this.uWeightControl1.Size = new System.Drawing.Size(262, 74); - this.uWeightControl1.TabIndex = 17; - this.uWeightControl1.WeightFalg = null; - // - // barPrintCheck - // - this.barPrintCheck.AutoSize = true; - this.barPrintCheck.Font = new System.Drawing.Font("宋体", 15F); - this.barPrintCheck.Location = new System.Drawing.Point(292, 50); - this.barPrintCheck.Name = "barPrintCheck"; - this.barPrintCheck.Size = new System.Drawing.Size(108, 24); - this.barPrintCheck.TabIndex = 16; - this.barPrintCheck.Text = "启用打码"; - this.barPrintCheck.UseVisualStyleBackColor = true; - // - // uTimerLabel1 - // - this.uTimerLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.uTimerLabel1.AutoSize = true; - this.uTimerLabel1.BackColor = System.Drawing.Color.Transparent; - this.uTimerLabel1.Font = new System.Drawing.Font("黑体", 12F); - this.uTimerLabel1.Format = "M月d日 H:mm:ss"; - this.uTimerLabel1.Location = new System.Drawing.Point(1084, 53); - this.uTimerLabel1.Name = "uTimerLabel1"; - this.uTimerLabel1.Size = new System.Drawing.Size(136, 16); - this.uTimerLabel1.TabIndex = 14; - 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 - // - this.uLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.uLabel1.AutoSize = true; - this.uLabel1.BackColor = System.Drawing.Color.Transparent; - this.uLabel1.Font = new System.Drawing.Font("宋体", 15F); - this.uLabel1.Location = new System.Drawing.Point(802, 14); - this.uLabel1.Name = "uLabel1"; - this.uLabel1.Size = new System.Drawing.Size(109, 20); - this.uLabel1.TabIndex = 12; - this.uLabel1.Text = "工作单元:"; - // - // 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(802, 50); - this.uLabel2.Name = "uLabel2"; - this.uLabel2.Size = new System.Drawing.Size(109, 20); - this.uLabel2.TabIndex = 13; - this.uLabel2.Text = "生产批次:"; - // - // netStateWatch1 - // - this.netStateWatch1.BackColor = System.Drawing.Color.Transparent; - this.netStateWatch1.Location = new System.Drawing.Point(292, 2); - this.netStateWatch1.Name = "netStateWatch1"; - this.netStateWatch1.Size = new System.Drawing.Size(90, 39); - this.netStateWatch1.TabIndex = 1; - // - // 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.goodsSetBtn); - this.splitContainer2.Panel1.Controls.Add(this.flowLayoutPanel2); - this.splitContainer2.Panel1.Controls.Add(this.flowLayoutPanel1); - // - // splitContainer2.Panel2 - // - this.splitContainer2.Panel2.Controls.Add(this.viewTaskBtn); - this.splitContainer2.Panel2.Controls.Add(this.deleteBtn); - this.splitContainer2.Panel2.Controls.Add(this.rePrintBtn); - this.splitContainer2.Panel2.Controls.Add(this.groupBox1); - this.splitContainer2.Panel2.Controls.Add(this.groupBox2); - this.splitContainer2.Size = new System.Drawing.Size(1226, 511); - this.splitContainer2.SplitterDistance = 761; - this.splitContainer2.TabIndex = 0; - // - // goodsSetBtn - // - this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.goodsSetBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); - this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F); - this.goodsSetBtn.ForeColor = System.Drawing.Color.White; - this.goodsSetBtn.Location = new System.Drawing.Point(645, 3); - this.goodsSetBtn.Name = "goodsSetBtn"; - this.goodsSetBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.goodsSetBtn.Size = new System.Drawing.Size(111, 62); - this.goodsSetBtn.TabIndex = 19; - this.goodsSetBtn.Text = "产品设置"; - this.goodsSetBtn.UseVisualStyleBackColor = false; - this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_Click); - // - // flowLayoutPanel2 - // - this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.taskDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.taskDataGrid.Location = new System.Drawing.Point(5, 19); + this.taskDataGrid.MultiSelect = false; + this.taskDataGrid.Name = "taskDataGrid"; + this.taskDataGrid.ReadOnly = true; + this.taskDataGrid.RowHeadersVisible = false; + dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle6; + this.taskDataGrid.RowTemplate.Height = 23; + this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.taskDataGrid.Size = new System.Drawing.Size(442, 96); + this.taskDataGrid.TabIndex = 2; + // + // T_Item + // + this.T_Item.DataPropertyName = "Item"; + this.T_Item.HeaderText = "项目"; + this.T_Item.Name = "T_Item"; + this.T_Item.ReadOnly = true; + // + // T_Need + // + this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.T_Need.DataPropertyName = "Need"; + dataGridViewCellStyle3.Format = "#0.######"; + this.T_Need.DefaultCellStyle = dataGridViewCellStyle3; + this.T_Need.HeaderText = "订货"; + this.T_Need.Name = "T_Need"; + this.T_Need.ReadOnly = true; + // + // T_Done + // + this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.T_Done.DataPropertyName = "Done"; + dataGridViewCellStyle4.Format = "#0.######"; + this.T_Done.DefaultCellStyle = dataGridViewCellStyle4; + this.T_Done.HeaderText = "完工"; + this.T_Done.Name = "T_Done"; + this.T_Done.ReadOnly = true; + // + // T_Last + // + this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.T_Last.DataPropertyName = "Last"; + dataGridViewCellStyle5.Format = "#0.######"; + this.T_Last.DefaultCellStyle = dataGridViewCellStyle5; + this.T_Last.HeaderText = "剩余"; + this.T_Last.Name = "T_Last"; + this.T_Last.ReadOnly = true; + // + // GoodsLabel + // + this.GoodsLabel.AutoSize = true; + this.GoodsLabel.BackColor = System.Drawing.Color.White; + this.GoodsLabel.Font = new System.Drawing.Font("宋体", 12F); + this.GoodsLabel.ForeColor = System.Drawing.Color.Blue; + this.GoodsLabel.Location = new System.Drawing.Point(144, 178); + this.GoodsLabel.Name = "GoodsLabel"; + this.GoodsLabel.Size = new System.Drawing.Size(72, 16); + this.GoodsLabel.TabIndex = 1; + this.GoodsLabel.Text = "存货名称"; + // + // splitContainer1 + // + this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.IsSplitterFixed = true; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.numberInput); + this.splitContainer1.Panel1.Controls.Add(this.label2); + this.splitContainer1.Panel1.Controls.Add(this.statisticNumberBox); + this.splitContainer1.Panel1.Controls.Add(this.label1); + this.splitContainer1.Panel1.Controls.Add(this.logBtn); + this.splitContainer1.Panel1.Controls.Add(this.msglbl); + this.splitContainer1.Panel1.Controls.Add(this.closeBtn); + this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1); + this.splitContainer1.Panel1.Controls.Add(this.barPrintCheck); + this.splitContainer1.Panel1.Controls.Add(this.uTimerLabel1); + this.splitContainer1.Panel1.Controls.Add(this.productBatchSelect); + this.splitContainer1.Panel1.Controls.Add(this.workUnitSelect); + this.splitContainer1.Panel1.Controls.Add(this.uLabel1); + this.splitContainer1.Panel1.Controls.Add(this.uLabel2); + this.splitContainer1.Panel1.Controls.Add(this.netStateWatch1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); + this.splitContainer1.Size = new System.Drawing.Size(1226, 704); + this.splitContainer1.SplitterDistance = 87; + this.splitContainer1.TabIndex = 1; + // + // numberInput + // + this.numberInput.Font = new System.Drawing.Font("宋体", 15F); + this.numberInput.Location = new System.Drawing.Point(680, 47); + this.numberInput.Name = "numberInput"; + this.numberInput.Size = new System.Drawing.Size(115, 30); + this.numberInput.TabIndex = 29; + this.numberInput.Text = "1"; + this.numberInput.MouseClick += new System.Windows.Forms.MouseEventHandler(this.numberInput_MouseClick); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("宋体", 15F); + this.label2.Location = new System.Drawing.Point(623, 51); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(69, 20); + this.label2.TabIndex = 28; + this.label2.Text = "数量:"; + // + // statisticNumberBox + // + this.statisticNumberBox.Font = new System.Drawing.Font("宋体", 15F); + this.statisticNumberBox.Location = new System.Drawing.Point(502, 47); + this.statisticNumberBox.Name = "statisticNumberBox"; + this.statisticNumberBox.Size = new System.Drawing.Size(115, 30); + this.statisticNumberBox.TabIndex = 27; + this.statisticNumberBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.StatisticNumberBox_MouseClick); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 15F); + this.label1.Location = new System.Drawing.Point(400, 51); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(109, 20); + this.label1.TabIndex = 26; + this.label1.Text = "统计数量:"; + // + // logBtn + // + this.logBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.logBtn.BackColor = System.Drawing.Color.CadetBlue; + this.logBtn.Font = new System.Drawing.Font("宋体", 15F); + this.logBtn.ForeColor = System.Drawing.Color.White; + this.logBtn.Location = new System.Drawing.Point(670, 4); + this.logBtn.Name = "logBtn"; + this.logBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.logBtn.Size = new System.Drawing.Size(111, 41); + this.logBtn.TabIndex = 25; + this.logBtn.Text = "日志"; + this.logBtn.UseVisualStyleBackColor = false; + this.logBtn.Click += new System.EventHandler(this.logBtn_Click); + // + // msglbl + // + this.msglbl.AutoSize = true; + this.msglbl.ForeColor = System.Drawing.Color.Red; + this.msglbl.Location = new System.Drawing.Point(458, 14); + this.msglbl.Name = "msglbl"; + this.msglbl.Size = new System.Drawing.Size(101, 12); + this.msglbl.TabIndex = 24; + this.msglbl.Text = "正在获取基础信息"; + // + // closeBtn + // + this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25))))); + this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); + this.closeBtn.ForeColor = System.Drawing.Color.White; + this.closeBtn.Location = new System.Drawing.Point(1109, 7); + this.closeBtn.Name = "closeBtn"; + this.closeBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.closeBtn.Size = new System.Drawing.Size(111, 41); + this.closeBtn.TabIndex = 18; + this.closeBtn.Text = "关闭"; + this.closeBtn.UseVisualStyleBackColor = false; + this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); + // + // uWeightControl1 + // + this.uWeightControl1.BackColor = System.Drawing.Color.Transparent; + this.uWeightControl1.Location = new System.Drawing.Point(12, 7); + this.uWeightControl1.Name = "uWeightControl1"; + this.uWeightControl1.Size = new System.Drawing.Size(262, 74); + this.uWeightControl1.TabIndex = 17; + this.uWeightControl1.WeightFalg = null; + // + // barPrintCheck + // + this.barPrintCheck.AutoSize = true; + this.barPrintCheck.Font = new System.Drawing.Font("宋体", 15F); + this.barPrintCheck.Location = new System.Drawing.Point(292, 50); + this.barPrintCheck.Name = "barPrintCheck"; + this.barPrintCheck.Size = new System.Drawing.Size(108, 24); + this.barPrintCheck.TabIndex = 16; + this.barPrintCheck.Text = "启用打码"; + this.barPrintCheck.UseVisualStyleBackColor = true; + // + // uTimerLabel1 + // + this.uTimerLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.uTimerLabel1.AutoSize = true; + this.uTimerLabel1.BackColor = System.Drawing.Color.Transparent; + this.uTimerLabel1.Font = new System.Drawing.Font("黑体", 12F); + this.uTimerLabel1.Format = "M月d日 H:mm:ss"; + this.uTimerLabel1.Location = new System.Drawing.Point(1084, 53); + this.uTimerLabel1.Name = "uTimerLabel1"; + this.uTimerLabel1.Size = new System.Drawing.Size(136, 16); + this.uTimerLabel1.TabIndex = 14; + 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 + // + this.uLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.uLabel1.AutoSize = true; + this.uLabel1.BackColor = System.Drawing.Color.Transparent; + this.uLabel1.Font = new System.Drawing.Font("宋体", 15F); + this.uLabel1.Location = new System.Drawing.Point(802, 14); + this.uLabel1.Name = "uLabel1"; + this.uLabel1.Size = new System.Drawing.Size(109, 20); + this.uLabel1.TabIndex = 12; + this.uLabel1.Text = "工作单元:"; + // + // 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(802, 50); + this.uLabel2.Name = "uLabel2"; + this.uLabel2.Size = new System.Drawing.Size(109, 20); + this.uLabel2.TabIndex = 13; + this.uLabel2.Text = "生产批次:"; + // + // netStateWatch1 + // + this.netStateWatch1.BackColor = System.Drawing.Color.Transparent; + this.netStateWatch1.Location = new System.Drawing.Point(292, 2); + this.netStateWatch1.Name = "netStateWatch1"; + this.netStateWatch1.Size = new System.Drawing.Size(90, 39); + this.netStateWatch1.TabIndex = 1; + // + // 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.goodsSetBtn); + this.splitContainer2.Panel1.Controls.Add(this.flowLayoutPanel2); + this.splitContainer2.Panel1.Controls.Add(this.flowLayoutPanel1); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.colorButton2); + this.splitContainer2.Panel2.Controls.Add(this.viewTaskBtn); + this.splitContainer2.Panel2.Controls.Add(this.GoodsLabel); + this.splitContainer2.Panel2.Controls.Add(this.colorButton1); + this.splitContainer2.Panel2.Controls.Add(this.deleteBtn); + this.splitContainer2.Panel2.Controls.Add(this.rePrintBtn); + this.splitContainer2.Panel2.Controls.Add(this.groupBox1); + this.splitContainer2.Panel2.Controls.Add(this.groupBox2); + this.splitContainer2.Size = new System.Drawing.Size(1226, 613); + this.splitContainer2.SplitterDistance = 761; + this.splitContainer2.TabIndex = 0; + // + // goodsSetBtn + // + this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.goodsSetBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); + this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F); + this.goodsSetBtn.ForeColor = System.Drawing.Color.White; + this.goodsSetBtn.Location = new System.Drawing.Point(645, 3); + this.goodsSetBtn.Name = "goodsSetBtn"; + this.goodsSetBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.goodsSetBtn.Size = new System.Drawing.Size(111, 62); + this.goodsSetBtn.TabIndex = 19; + this.goodsSetBtn.Text = "产品设置"; + this.goodsSetBtn.UseVisualStyleBackColor = false; + this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_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(-1, 75); - this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(757, 434); - this.flowLayoutPanel2.TabIndex = 24; - // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.flowLayoutPanel2.AutoScroll = true; + this.flowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flowLayoutPanel2.Location = new System.Drawing.Point(-1, 75); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(757, 536); + this.flowLayoutPanel2.TabIndex = 24; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, -1); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(640, 70); - this.flowLayoutPanel1.TabIndex = 22; - // - // viewTaskBtn - // - this.viewTaskBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.viewTaskBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); - this.viewTaskBtn.Font = new System.Drawing.Font("宋体", 15F); - this.viewTaskBtn.ForeColor = System.Drawing.Color.White; - this.viewTaskBtn.Location = new System.Drawing.Point(14, 126); - this.viewTaskBtn.Name = "viewTaskBtn"; - this.viewTaskBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.viewTaskBtn.Size = new System.Drawing.Size(111, 41); - this.viewTaskBtn.TabIndex = 24; - this.viewTaskBtn.Text = "完工"; - this.viewTaskBtn.UseVisualStyleBackColor = false; - this.viewTaskBtn.Click += new System.EventHandler(this.ViewTaskBtn_Click); - // - // deleteBtn - // - this.deleteBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.deleteBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25))))); - this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F); - this.deleteBtn.ForeColor = System.Drawing.Color.White; - this.deleteBtn.Location = new System.Drawing.Point(178, 129); - this.deleteBtn.Name = "deleteBtn"; - this.deleteBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.deleteBtn.Size = new System.Drawing.Size(111, 41); - this.deleteBtn.TabIndex = 23; - this.deleteBtn.Text = "删除"; - this.deleteBtn.UseVisualStyleBackColor = false; - this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click); - // - // rePrintBtn - // - this.rePrintBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222))))); - this.rePrintBtn.Font = new System.Drawing.Font("宋体", 15F); - this.rePrintBtn.ForeColor = System.Drawing.Color.White; - this.rePrintBtn.Location = new System.Drawing.Point(338, 129); - this.rePrintBtn.Name = "rePrintBtn"; - this.rePrintBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); - this.rePrintBtn.Size = new System.Drawing.Size(111, 41); - this.rePrintBtn.TabIndex = 22; - this.rePrintBtn.Text = "补打"; - this.rePrintBtn.UseVisualStyleBackColor = false; - 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) + this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, -1); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(640, 70); + this.flowLayoutPanel1.TabIndex = 22; + // + // colorButton2 + // + this.colorButton2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); + this.colorButton2.Font = new System.Drawing.Font("宋体", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.colorButton2.ForeColor = System.Drawing.Color.White; + this.colorButton2.Location = new System.Drawing.Point(344, 178); + this.colorButton2.Name = "colorButton2"; + this.colorButton2.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107))))); + this.colorButton2.Size = new System.Drawing.Size(91, 38); + this.colorButton2.TabIndex = 5; + this.colorButton2.Text = "打总码"; + this.colorButton2.UseVisualStyleBackColor = false; + this.colorButton2.Click += new System.EventHandler(this.colorButton2_Click); + // + // viewTaskBtn + // + this.viewTaskBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.viewTaskBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); + this.viewTaskBtn.Font = new System.Drawing.Font("宋体", 15F); + this.viewTaskBtn.ForeColor = System.Drawing.Color.White; + this.viewTaskBtn.Location = new System.Drawing.Point(13, 124); + this.viewTaskBtn.Name = "viewTaskBtn"; + this.viewTaskBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.viewTaskBtn.Size = new System.Drawing.Size(100, 41); + this.viewTaskBtn.TabIndex = 24; + this.viewTaskBtn.Text = "完工"; + this.viewTaskBtn.UseVisualStyleBackColor = false; + this.viewTaskBtn.Click += new System.EventHandler(this.ViewTaskBtn_Click); + // + // colorButton1 + // + this.colorButton1.BackColor = System.Drawing.Color.Blue; + this.colorButton1.Font = new System.Drawing.Font("宋体", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.colorButton1.ForeColor = System.Drawing.Color.White; + this.colorButton1.Location = new System.Drawing.Point(13, 178); + this.colorButton1.Name = "colorButton1"; + this.colorButton1.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107))))); + this.colorButton1.Size = new System.Drawing.Size(100, 38); + this.colorButton1.TabIndex = 3; + this.colorButton1.Text = "+"; + this.colorButton1.UseVisualStyleBackColor = false; + this.colorButton1.Click += new System.EventHandler(this.colorButton1_Click); + // + // deleteBtn + // + this.deleteBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.deleteBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25))))); + this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F); + this.deleteBtn.ForeColor = System.Drawing.Color.White; + this.deleteBtn.Location = new System.Drawing.Point(178, 124); + this.deleteBtn.Name = "deleteBtn"; + this.deleteBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.deleteBtn.Size = new System.Drawing.Size(85, 41); + this.deleteBtn.TabIndex = 23; + this.deleteBtn.Text = "删除"; + this.deleteBtn.UseVisualStyleBackColor = false; + this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click); + // + // rePrintBtn + // + this.rePrintBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222))))); + this.rePrintBtn.Font = new System.Drawing.Font("宋体", 15F); + this.rePrintBtn.ForeColor = System.Drawing.Color.White; + this.rePrintBtn.Location = new System.Drawing.Point(344, 126); + this.rePrintBtn.Name = "rePrintBtn"; + this.rePrintBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.rePrintBtn.Size = new System.Drawing.Size(91, 39); + this.rePrintBtn.TabIndex = 22; + this.rePrintBtn.Text = "补打"; + this.rePrintBtn.UseVisualStyleBackColor = false; + 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))); - this.groupBox1.Controls.Add(this.historyDataGrid); - this.groupBox1.Controls.Add(this.uLabel3); - this.groupBox1.Location = new System.Drawing.Point(8, 169); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(5); - this.groupBox1.Size = new System.Drawing.Size(447, 332); - this.groupBox1.TabIndex = 5; - this.groupBox1.TabStop = false; - // - // historyDataGrid - // - this.historyDataGrid.AllowUserToAddRows = false; - this.historyDataGrid.AllowUserToDeleteRows = false; - this.historyDataGrid.AllowUserToResizeColumns = false; - this.historyDataGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; - this.historyDataGrid.BackgroundColor = System.Drawing.Color.White; - this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle8.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; - this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.H_ID, - this.H_RowIndex, - this.H_BarCode, - this.H_Goods_Name, - this.H_Weight}); - this.historyDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; - this.historyDataGrid.Location = new System.Drawing.Point(5, 19); - this.historyDataGrid.MultiSelect = false; - this.historyDataGrid.Name = "historyDataGrid"; - this.historyDataGrid.ReadOnly = true; - this.historyDataGrid.RowHeadersVisible = false; - 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.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle10; - this.historyDataGrid.RowTemplate.Height = 23; - this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.historyDataGrid.Size = new System.Drawing.Size(437, 308); - this.historyDataGrid.TabIndex = 2; - // - // H_ID - // - this.H_ID.DataPropertyName = "ID"; - this.H_ID.HeaderText = "ID"; - this.H_ID.Name = "H_ID"; - this.H_ID.ReadOnly = true; - this.H_ID.Visible = false; - // - // H_RowIndex - // - this.H_RowIndex.DataPropertyName = "RowIndex"; - this.H_RowIndex.HeaderText = "序号"; - this.H_RowIndex.Name = "H_RowIndex"; - this.H_RowIndex.ReadOnly = true; - this.H_RowIndex.Width = 70; - // - // H_BarCode - // - this.H_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.H_BarCode.DataPropertyName = "ShortCode"; - this.H_BarCode.HeaderText = "条码"; - this.H_BarCode.Name = "H_BarCode"; - this.H_BarCode.ReadOnly = true; - // - // H_Goods_Name - // - this.H_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.H_Goods_Name.DataPropertyName = "Goods_Name"; - this.H_Goods_Name.HeaderText = "产品"; - this.H_Goods_Name.Name = "H_Goods_Name"; - this.H_Goods_Name.ReadOnly = true; - // - // H_Weight - // - this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle9.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle9; - this.H_Weight.HeaderText = "重量"; - this.H_Weight.Name = "H_Weight"; - this.H_Weight.ReadOnly = true; - // - // numberInput - // - this.numberInput.Font = new System.Drawing.Font("宋体", 15F); - this.numberInput.Location = new System.Drawing.Point(680, 47); - this.numberInput.Name = "numberInput"; - this.numberInput.Size = new System.Drawing.Size(115, 30); - this.numberInput.TabIndex = 29; - this.numberInput.Text = "1"; - this.numberInput.MouseClick += new System.Windows.Forms.MouseEventHandler(this.numberInput_MouseClick); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("宋体", 15F); - this.label2.Location = new System.Drawing.Point(623, 51); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(69, 20); - this.label2.TabIndex = 28; - this.label2.Text = "数量:"; - // - // SegmentProductionAutoForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(1226, 602); - this.Controls.Add(this.splitContainer1); - this.Name = "SegmentProductionAutoForm"; - this.Text = "分割品车间称重计数"; - this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).EndInit(); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel1.PerformLayout(); - this.splitContainer1.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); - this.splitContainer1.ResumeLayout(false); - this.splitContainer2.Panel1.ResumeLayout(false); - this.splitContainer2.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); - this.splitContainer2.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).EndInit(); - this.ResumeLayout(false); + this.groupBox1.Controls.Add(this.flowLayoutPanel3); + this.groupBox1.Controls.Add(this.uLabel3); + this.groupBox1.Location = new System.Drawing.Point(8, 222); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Padding = new System.Windows.Forms.Padding(5); + this.groupBox1.Size = new System.Drawing.Size(447, 381); + this.groupBox1.TabIndex = 5; + this.groupBox1.TabStop = false; + // + // flowLayoutPanel3 + // + this.flowLayoutPanel3.AutoScroll = true; + this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel3.Location = new System.Drawing.Point(5, 19); + this.flowLayoutPanel3.Name = "flowLayoutPanel3"; + this.flowLayoutPanel3.Size = new System.Drawing.Size(437, 357); + this.flowLayoutPanel3.TabIndex = 4; + this.flowLayoutPanel3.WrapContents = false; + // + // SegmentProductionAutoForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(1226, 704); + this.Controls.Add(this.splitContainer1); + this.Name = "SegmentProductionAutoForm"; + this.Text = "分割品车间称重计数"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.groupBox2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).EndInit(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel1.PerformLayout(); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + this.splitContainer2.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); } @@ -637,9 +591,8 @@ private WinFormControl.ULabel uLabel1; private WinFormControl.ULabel uLabel2; private WinFormControl.NetStateWatch netStateWatch1; - private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.SplitContainer splitContainer2; private System.Windows.Forms.GroupBox groupBox1; - private WinFormControl.UDataGridView historyDataGrid; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private Controls.WeightControl uWeightControl1; @@ -647,18 +600,16 @@ private Controls.ColorButton closeBtn; private Controls.ColorButton goodsSetBtn; private Controls.ColorButton deleteBtn; - private System.Windows.Forms.Label msglbl; - private System.Windows.Forms.CheckBox barPrintCheck; - private System.Windows.Forms.DataGridViewTextBoxColumn H_ID; - private System.Windows.Forms.DataGridViewTextBoxColumn H_RowIndex; - private System.Windows.Forms.DataGridViewTextBoxColumn H_BarCode; - private System.Windows.Forms.DataGridViewTextBoxColumn H_Goods_Name; - private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; + private System.Windows.Forms.Label msglbl; + private System.Windows.Forms.CheckBox barPrintCheck; private Controls.ColorButton logBtn; private System.Windows.Forms.TextBox statisticNumberBox; private System.Windows.Forms.Label label1; private Controls.ColorButton viewTaskBtn; private System.Windows.Forms.TextBox numberInput; private System.Windows.Forms.Label label2; + private Controls.ColorButton colorButton1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3; + private Controls.ColorButton colorButton2; } } \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs index 5bab25b..6d7d15b 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs @@ -36,7 +36,8 @@ namespace ButcherFactory.SegmentProductionAuto_ Thread uploadData; Thread checkInStoreState; Thread initTask; - BindingList historyList; + BindingList historyList; + BindingList allCode; Dictionary> goodsSetDic; long? batchID; DateTime? batchDate; @@ -216,10 +217,10 @@ namespace ButcherFactory.SegmentProductionAuto_ if (batchID == null) throw new Exception("请先选择批次"); var weight = uWeightControl1.Weight; -//#if DEBUG -// if (weight == 0) -// weight = (item.StandardWeightLow ?? 4.0m) + 0.1m; -//#endif +#if DEBUG + if (weight == 0) + weight = (item.StandardWeightLow ?? 4.0m) + 0.1m; +#endif if (weight == 0) throw new Exception("重量不能为0"); if (item.StandardWeight.HasValue) @@ -289,12 +290,13 @@ namespace ButcherFactory.SegmentProductionAuto_ var btn = sender as ColorButton; var detail = btn.Tag as ClientGoodsSet_Detail; var weight = uWeightControl1.Weight; -//#if DEBUG -// if (weight == 0) -// weight = (detail.StandardWeightLow ?? 4.0m) + 0.1m; -//#endif +#if DEBUG if (weight == 0) + weight = (detail.StandardWeightLow ?? 4.0m) + 0.1m; +#endif + if (weight == 0) throw new Exception("重量不能为0"); + if (detail.StandardWeight.HasValue) { if (weight < (detail.StandardWeightLow ?? 0) || weight > (detail.StandardWeightUp ?? 0)) @@ -322,14 +324,22 @@ namespace ButcherFactory.SegmentProductionAuto_ entity.StandardPic = detail.StandardPic; if (!string.IsNullOrEmpty(statisticNumberBox.Text)) entity.StatisticNumber = decimal.Parse(statisticNumberBox.Text); + if (_totalCode == null || _codePanel==null) + { + throw new Exception(string.Format("请先选择总码!" )); + } + entity.TotalCode_ID = _totalCode.ID; SegmentProductionBL.InsertAndSetGroupID(entity, batchDate.Value); entity.Goods_Code = detail.Goods_Code; entity.Goods_Name = detail.Goods_Name; entity.Goods_Spec = detail.Goods_Spec; entity.MainUnit = detail.MainUnit; entity.ShotPrintName = detail.ShotPrintName; - + + _codePanel.Add(initSegmentBt(entity)); + historyList.Insert(0, entity); + if (historyList.Count > 30) historyList.RemoveAt(30); if (barPrintCheck.Checked) @@ -344,33 +354,89 @@ namespace ButcherFactory.SegmentProductionAuto_ } } GoodsLabel.Text = detail.Goods_Name; - historyDataGrid.FirstDisplayedScrollingRowIndex = 0; - historyDataGrid.ClearSelection(); - historyDataGrid.Refresh(); + var thd = new Thread(new ParameterizedThreadStart(RefreshTask)); thd.Start(entity); - } - - void RefreshTask(object obj) - { - var entity = obj as SegmentProduction; - var list = SegmentProductionBL.GetProductTask(batchDate ?? DateTime.Today, entity); - this.Invoke(new Action(() => - { - taskDataGrid.DataSource = list; - taskDataGrid.Refresh(); - })); - } + } + + SegmentProduction current; + private ColorButton initSegmentBt(SegmentProduction entity) + { + var bt = new ColorButton() { Text = entity.ShortCode }; + bt.Tag = entity; + bt.Width = 110; + bt.Height = 50; + bt.Font = new Font("黑体", 13, FontStyle.Bold); + bt.BackColor = Color.DarkCyan; + bt.SelectedColor = Color.DarkOrange; + bt.Click += delegate + { + bt.Selected = !bt.Selected; + if (bt.Selected) + { + current = entity; + GoodsLabel.Text = entity.Goods_Name; + } + else + { + current = null; + GoodsLabel.Text = ""; + } + foreach (var bt2 in segmentButtons) + { + if (bt2.Text != entity.ShortCode && bt2.Selected) + { + bt2.Selected = false; + bt2.Invalidate(); + } + } + + }; + segmentButtons.Add(bt); + return bt; + } + + void RefreshTask(object obj) + { + var entity = obj as SegmentProduction; + var list = SegmentProductionBL.GetProductTask(batchDate ?? DateTime.Today, entity); + this.Invoke(new Action(() => + { + taskDataGrid.DataSource = list; + taskDataGrid.Refresh(); + })); + } + + List codeButtons = new List(0); + List segmentButtons = new List(0); void BindGrid() { - historyList = SegmentProductionBL.GetListByState(true); - historyDataGrid.DataSource = historyList; - historyDataGrid.Refresh(); - + historyList = SegmentProductionBL.GetListByState(true); + allCode = SegmentProductionBL.GetTotalCode(DateTime.Now); + + RefreshCodePanel(); + var first = historyList.FirstOrDefault(); if (first != null) GoodsLabel.Text = first.Goods_Name; + } + + private void RefreshCodePanel() + { + flowLayoutPanel3.Controls.Clear(); + codeButtons.Clear(); + foreach (var item in allCode) + { + var details = historyList.Where(x => x.TotalCode_ID == item.ID); + var n = new CodePanel(); + AddCodeButton(n, item); + foreach (var seg in details) + { + n.Add(initSegmentBt(seg)); + } + flowLayoutPanel3.Controls.Add(n); + } } void UpLoadLocalData() @@ -410,8 +476,8 @@ namespace ButcherFactory.SegmentProductionAuto_ { foreach (var item in tag) historyList.Remove(item); - historyDataGrid.ClearSelection(); - historyDataGrid.Refresh(); + //historyDataGrid.ClearSelection(); + //historyDataGrid.Refresh(); })); } } @@ -439,13 +505,13 @@ namespace ButcherFactory.SegmentProductionAuto_ { if (historyList.Count == 0) throw new Exception("请先选择要补打的记录"); - SegmentProduction item; - var row = historyDataGrid.SelectedRows; - if (row.Count > 0) - item = row[0].DataBoundItem as SegmentProduction; - else - item = historyList.First(); - var template = config.Template; + SegmentProduction item; + + if (current != null) + item = current; + else + item = historyList.First(); + var template = config.Template; var goodsType = SegmentProductionBL.GetGoodsType(item.Goods_ID); if (goodsType.HasValue) template = goodsType == 0 ? "SegmentProductionPrint.html" : "SegmentProductionPrint1.html"; @@ -463,26 +529,24 @@ namespace ButcherFactory.SegmentProductionAuto_ private void deleteBtn_Click(object sender, EventArgs e) { - var row = historyDataGrid.SelectedRows; - if (row.Count == 0) - return; + + if (current == null) + return; if (MessageBox.Show("确定删除选中记录?", "删除确认", MessageBoxButtons.OKCancel) != DialogResult.OK) return; - var tag = historyDataGrid.SelectedRows[0].DataBoundItem as SegmentProduction; - if (tag.CreateTime.AddMinutes(1) < DateTime.Now) + + //var tag = historyDataGrid.SelectedRows[0].DataBoundItem as SegmentProduction; + + if (current.CreateTime.AddMinutes(1) < DateTime.Now) { MessageBox.Show("已超出可删除时间范围"); return; } - SegmentProductionBL.Delete(tag); - //SegmentProductionBL.SetAsDelete(tag.ID, tag.BarCode); - historyList.Remove(tag); - historyDataGrid.DataSource = historyList; - historyDataGrid.ClearSelection(); - historyDataGrid.Refresh(); - - var thd = new Thread(new ParameterizedThreadStart(RefreshTask)); - thd.Start(tag); + SegmentProductionBL.Delete(current); + historyList.Remove(current); + RefreshCodePanel(); + var thd = new Thread(new ParameterizedThreadStart(RefreshTask)); + thd.Start(current); } private void logBtn_Click(object sender, EventArgs e) @@ -545,5 +609,78 @@ namespace ButcherFactory.SegmentProductionAuto_ } } } + + CodePanel _codePanel; + TotalCode _totalCode; + private void colorButton1_Click(object sender, EventArgs e) + { + var n = new CodePanel(); + + var tCode = SegmentProductionBL.InsertTotalCode(new TotalCode()); + AddCodeButton(n, tCode,true); + flowLayoutPanel3.Controls.Add(n); + } + + private void AddCodeButton(CodePanel n, TotalCode tCode,bool add=false) + { + n.Button.Tag = tCode; + n.Button.Text = tCode.ShortCode; + n.Button.Click += delegate + { + + n.Button.Selected = !n.Button.Selected; + if (n.Button.Selected) + { + _codePanel = n; + _totalCode = tCode; + } + else + { + _codePanel = null; + _totalCode = null; + } + foreach (var bt in codeButtons) + { + if (bt.Text != n.Button.Text && bt.Selected) + { + bt.Selected = false; + bt.Invalidate(); + } + } + + }; + if (add) + { + _codePanel = n; + n.Button.Selected = true; + _totalCode = tCode; + foreach (var bt in codeButtons) + { + if (bt.Selected) + { + bt.Selected = false; + bt.Invalidate(); + } + } + } + codeButtons.Add(n.Button); + } + + private void colorButton2_Click(object sender, EventArgs e) + { + if (_totalCode == null || _codePanel == null) + { + throw new Exception(string.Format("请先选择总码!")); + } + var dmos= historyList.Where(x => x.TotalCode_ID == _totalCode.ID).ToArray(); + if (dmos.Length == 0) + { + throw new Exception(string.Format("此码不包含任何产品!")); + } + NotAuto.SegmentSumCodePrint.Print(dmos, "SegmentSumCode.html"); + var log = new SegmentLog(dmos[0].TotalCode_Code, "总码"); + log.Message = string.Format("总码:{0} ", dmos[0].TotalCode_Code); + SegmentProductionBL.InsertLog(log); + } } } diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx index f2185bc..08a9e5f 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx @@ -120,10 +120,4 @@ True - - True - - - True - \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProduction_/SegmentSumCodePrint.cs b/ButcherFactory.Form/SegmentProduction_/SegmentSumCodePrint.cs new file mode 100644 index 0000000..94ad319 --- /dev/null +++ b/ButcherFactory.Form/SegmentProduction_/SegmentSumCodePrint.cs @@ -0,0 +1,68 @@ +using ButcherFactory.BO; +using ButcherFactory.BO.Utils; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherFactory.SegmentProduction_ +{ + public static class SegmentSumCodePrint + { + static int id = 1; + const string PRINTFILE = @"PrintTemplate\"; + const string ENDFILE = @"PrintTemplate\SegmentProductionPrintEnd.html"; + const string IMGFILE = @"TempImg\_sum_img{0}.png"; + public static void Print(SegmentProduction[] entitys, string template) + { + if (AppContext.ConnectInfo.TraceBackUrl == "default") + throw new Exception("请先配置追溯服务器地址"); + + var dic = new Dictionary(); + var entity = entitys.FirstOrDefault(); + var groupByGoods = entitys.GroupBy(x => x.Goods_ID); + var info = string.Empty; + foreach (var item in groupByGoods) + { + var f = item.FirstOrDefault(); + info += string.Format("

{0}

", f.Goods_Name); + info += string.Format("

件数:{0}

", item.Count()); + } + + + dic.Add("$Goods_Name", info); + dic.Add("$Date", DateTime.Now.ToString("yyyy/MM/dd HH:mm")); + var code = entity.BarCode; + if (code.Length > 17) + code = code.Substring(17); + dic.Add("$Code", code); + var imgUrl = string.Format(IMGFILE, id); + var url = string.Format(AppContext.ConnectInfo.TraceBackUrl + "?code={0}", entity.BarCode); + BwpClientPrint.BwpClientWebPrint.Create2DPic(url, imgUrl, 120); + dic.Add("$ImageUrl", imgUrl); + + BwpClientPrint.BwpClientWebPrint.Print(PRINTFILE + template, dic); + AfterPrint(); + } + + static DirectoryInfo TempImage = null; + private static void AfterPrint() + { + if (id == 100) + id = 0; + id++; + if (TempImage == null) + TempImage = new DirectoryInfo("TempImg"); + var files = TempImage.GetFiles(); + while (files.Length > 100) + { + var last = files.OrderBy(x => x.CreationTime).First().FullName; + File.Delete(last); + files = TempImage.GetFiles(); + } + } + } +}