From 7283a63ba954567b31aea9a6d938eda352abb38c Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Sat, 14 Aug 2021 14:27:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8D=95No.158934=20?= =?UTF-8?q?=E5=88=86=E5=89=B2=E8=AE=A1=E6=95=B0=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B1=A0=E5=AE=B0=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ButcherFactory.BO/Bill/SegmentProduction.cs | 2 + .../LocalBL/SegmentProductionBL.cs | 5 +- .../ButcherFactory.Form.csproj | 9 + .../SegmentProductionAuto_/Form1.Designer.cs | 77 ++++++ .../SegmentProductionAuto_/Form1.cs | 34 +++ .../SegmentProductionAuto_/Form1.resx | 120 ++++++++++ .../SegmentProductionAutoForm.Designer.cs | 226 ++++++++++-------- .../SegmentProductionAutoForm.cs | 14 ++ 8 files changed, 387 insertions(+), 100 deletions(-) create mode 100644 ButcherFactory.Form/SegmentProductionAuto_/Form1.Designer.cs create mode 100644 ButcherFactory.Form/SegmentProductionAuto_/Form1.cs create mode 100644 ButcherFactory.Form/SegmentProductionAuto_/Form1.resx diff --git a/ButcherFactory.BO/Bill/SegmentProduction.cs b/ButcherFactory.BO/Bill/SegmentProduction.cs index ec95d17..01eb94c 100644 --- a/ButcherFactory.BO/Bill/SegmentProduction.cs +++ b/ButcherFactory.BO/Bill/SegmentProduction.cs @@ -94,6 +94,8 @@ namespace ButcherFactory.BO public decimal? StatisticNumber { get; set; } public string Identify { get; set; } public string IdentifyRemark { get; set; } + + public DateTime? ButcherDate { get; set; } } [MapToTable("Butcher_SegmentLog")] diff --git a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs index 39b2a36..68b4733 100644 --- a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs @@ -530,6 +530,7 @@ namespace ButcherFactory.BO.LocalBL query.Columns.Add(DQSelectColumn.Field("NoTotalCode")); query.Columns.Add(DQSelectColumn.Field("Identify")); query.Columns.Add(DQSelectColumn.Field("IdentifyRemark")); + query.Columns.Add(DQSelectColumn.Field("ButcherDate")); 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); @@ -553,11 +554,12 @@ namespace ButcherFactory.BO.LocalBL obj.Delete = (bool)reader[9]; obj.StandardPic = (bool)reader[10]; obj.MsgID = (string)reader[11]; - obj.StatisticNumber = (decimal?)reader[12]; + obj.StatisticNumber = (decimal?)reader[12]; obj.TotalCode_Code = (string)reader[13]; obj.NoTotalCode = (bool)reader[14]; obj.Identify = (string)reader[15]; obj.IdentifyRemark = (string)reader[16]; + obj.ButcherDate = ((DateTime?)reader[17] ?? DateTime.Today); upload.Add(obj); } } @@ -711,6 +713,7 @@ namespace ButcherFactory.BO.LocalBL public bool NoTotalCode { get; set; } public string Identify { get; set; } public string IdentifyRemark { get; set; } + public DateTime ButcherDate { get; set; } } class TaskTemp diff --git a/ButcherFactory.Form/ButcherFactory.Form.csproj b/ButcherFactory.Form/ButcherFactory.Form.csproj index 6ca5200..c5609aa 100644 --- a/ButcherFactory.Form/ButcherFactory.Form.csproj +++ b/ButcherFactory.Form/ButcherFactory.Form.csproj @@ -203,6 +203,12 @@ SegmentPickUpForm.cs + + Form + + + Form1.cs + Form @@ -340,6 +346,9 @@ SegmentPickUpForm.cs + + Form1.cs + GoodsNumberInputDialog.cs diff --git a/ButcherFactory.Form/SegmentProductionAuto_/Form1.Designer.cs b/ButcherFactory.Form/SegmentProductionAuto_/Form1.Designer.cs new file mode 100644 index 0000000..c6cb98f --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/Form1.Designer.cs @@ -0,0 +1,77 @@ + +namespace ButcherFactory.SegmentProductionAuto_ +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.uWeightControl1 = new ButcherFactory.Controls.WeightControl(); + this.roundPanel1 = new ButcherFactory.Controls.RoundPanel(this.components); + this.uWeightControl1.SuspendLayout(); + this.SuspendLayout(); + // + // uWeightControl1 + // + this.uWeightControl1.BackColor = System.Drawing.Color.Transparent; + this.uWeightControl1.Controls.Add(this.roundPanel1); + this.uWeightControl1.Location = new System.Drawing.Point(214, 162); + this.uWeightControl1.Name = "uWeightControl1"; + this.uWeightControl1.Size = new System.Drawing.Size(262, 74); + this.uWeightControl1.TabIndex = 18; + this.uWeightControl1.WeightFalg = null; + // + // roundPanel1 + // + this.roundPanel1._setRoundRadius = 15; + this.roundPanel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.roundPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.roundPanel1.Location = new System.Drawing.Point(0, 0); + this.roundPanel1.Margin = new System.Windows.Forms.Padding(0); + this.roundPanel1.Name = "roundPanel1"; + this.roundPanel1.Size = new System.Drawing.Size(262, 74); + this.roundPanel1.TabIndex = 0; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.uWeightControl1); + this.Name = "Form1"; + this.Text = "Form1"; + this.uWeightControl1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private Controls.WeightControl uWeightControl1; + private Controls.RoundPanel roundPanel1; + } +} \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProductionAuto_/Form1.cs b/ButcherFactory.Form/SegmentProductionAuto_/Form1.cs new file mode 100644 index 0000000..bf901e6 --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/Form1.cs @@ -0,0 +1,34 @@ +using ButcherFactory.BO; +using ButcherFactory.BO.Utils; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ButcherFactory.SegmentProductionAuto_ +{ + public partial class Form1 : Form//, IWithRoleForm + { + + public List RoleName + { + //get { return new List { (short)设备类别.分割生产自动化 }; } + get { return new List { (short)设备类别.分割生产 }; } + } + + public Form Generate() + { + return this; + } + + public Form1() + { + InitializeComponent(); + } + } +} diff --git a/ButcherFactory.Form/SegmentProductionAuto_/Form1.resx b/ButcherFactory.Form/SegmentProductionAuto_/Form1.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/Form1.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/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs index 7679a07..2e27557 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs @@ -47,10 +47,7 @@ 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(); @@ -59,17 +56,22 @@ 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.groupBox1 = new System.Windows.Forms.GroupBox(); + this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); + this.label3 = new System.Windows.Forms.Label(); + this.butcherDateBox = new WinFormControl.ULabel(); + this.logBtn = new ButcherFactory.Controls.ColorButton(); + this.closeBtn = new ButcherFactory.Controls.ColorButton(); + this.uWeightControl1 = new ButcherFactory.Controls.WeightControl(); + this.goodsSetBtn = new ButcherFactory.Controls.ColorButton(); 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.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); - this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -200,6 +202,8 @@ // // splitContainer1.Panel1 // + this.splitContainer1.Panel1.Controls.Add(this.butcherDateBox); + this.splitContainer1.Panel1.Controls.Add(this.label3); this.splitContainer1.Panel1.Controls.Add(this.numberInput); this.splitContainer1.Panel1.Controls.Add(this.label2); this.splitContainer1.Panel1.Controls.Add(this.statisticNumberBox); @@ -262,55 +266,16 @@ 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(680, 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(101, 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(388, 11); + this.msglbl.Location = new System.Drawing.Point(388, 6); 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; @@ -415,21 +380,6 @@ 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) @@ -452,6 +402,119 @@ this.flowLayoutPanel1.Size = new System.Drawing.Size(640, 70); this.flowLayoutPanel1.TabIndex = 22; // + // 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.flowLayoutPanel4); + 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; + // + // flowLayoutPanel4 + // + this.flowLayoutPanel4.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.flowLayoutPanel4.AutoScroll = true; + this.flowLayoutPanel4.Location = new System.Drawing.Point(5, 90); + this.flowLayoutPanel4.Name = "flowLayoutPanel4"; + this.flowLayoutPanel4.Size = new System.Drawing.Size(437, 286); + this.flowLayoutPanel4.TabIndex = 5; + // + // flowLayoutPanel3 + // + this.flowLayoutPanel3.AutoScroll = true; + this.flowLayoutPanel3.BackColor = System.Drawing.Color.White; + this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Top; + this.flowLayoutPanel3.Location = new System.Drawing.Point(5, 19); + this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); + this.flowLayoutPanel3.Name = "flowLayoutPanel3"; + this.flowLayoutPanel3.Size = new System.Drawing.Size(437, 68); + this.flowLayoutPanel3.TabIndex = 4; + this.flowLayoutPanel3.WrapContents = false; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 15F); + this.label3.Location = new System.Drawing.Point(400, 21); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(109, 20); + this.label3.TabIndex = 30; + this.label3.Text = "屠宰日期:"; + // + // butcherDateBox + // + this.butcherDateBox.BackColor = System.Drawing.Color.Transparent; + this.butcherDateBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.butcherDateBox.Font = new System.Drawing.Font("宋体", 15F); + this.butcherDateBox.Location = new System.Drawing.Point(502, 15); + this.butcherDateBox.Name = "butcherDateBox"; + this.butcherDateBox.Size = new System.Drawing.Size(115, 30); + this.butcherDateBox.TabIndex = 35; + this.butcherDateBox.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.butcherDateBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.butcherDateBox_MouseClick); + // + // 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(680, 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(101, 41); + this.logBtn.TabIndex = 25; + this.logBtn.Text = "日志"; + this.logBtn.UseVisualStyleBackColor = false; + this.logBtn.Click += new System.EventHandler(this.logBtn_Click); + // + // 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; + // + // 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); + // // colorButton2 // this.colorButton2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); @@ -524,43 +587,6 @@ 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.flowLayoutPanel4); - 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; - // - // flowLayoutPanel4 - // - this.flowLayoutPanel4.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.flowLayoutPanel4.AutoScroll = true; - this.flowLayoutPanel4.Location = new System.Drawing.Point(5, 90); - this.flowLayoutPanel4.Name = "flowLayoutPanel4"; - this.flowLayoutPanel4.Size = new System.Drawing.Size(437, 286); - this.flowLayoutPanel4.TabIndex = 5; - // - // flowLayoutPanel3 - // - this.flowLayoutPanel3.AutoScroll = true; - this.flowLayoutPanel3.BackColor = System.Drawing.Color.White; - this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Top; - this.flowLayoutPanel3.Location = new System.Drawing.Point(5, 19); - this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel3.Name = "flowLayoutPanel3"; - this.flowLayoutPanel3.Size = new System.Drawing.Size(437, 68); - this.flowLayoutPanel3.TabIndex = 4; - this.flowLayoutPanel3.WrapContents = false; - // // SegmentProductionAutoForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -627,5 +653,7 @@ private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3; private Controls.ColorButton colorButton2; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4; + private System.Windows.Forms.Label label3; + private WinFormControl.ULabel butcherDateBox; } } \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs index 01d03d0..e236c28 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs @@ -42,12 +42,14 @@ namespace ButcherFactory.SegmentProductionAuto_ Dictionary> goodsSetDic; long? batchID; DateTime? batchDate; + DateTime butcherDate = DateTime.Today; NotAuto.SegmentProductionFormConfig config; List identityList; List specialGoodsCodes; public SegmentProductionAutoForm() { InitializeComponent(); + butcherDateBox.Text = butcherDate.ToString("yyyy-MM-dd"); netStateWatch1.GetConnectState = () => LoginUtil.TestConnection(500); this.FormClosing += SegmentProductionAutoForm_FormClosing; workUnitSelect.SelectedIndexChanged += delegate @@ -374,6 +376,7 @@ namespace ButcherFactory.SegmentProductionAuto_ entity.StandardPic = detail.StandardPic; entity.GoodsType = detail.GoodsType; entity.NoTotalCode = detail.NoTotalCode; + entity.ButcherDate = butcherDate; if (detail.SelectedIdentify != null) { entity.Identify = detail.SelectedIdentify.Identify; @@ -1061,5 +1064,16 @@ namespace ButcherFactory.SegmentProductionAuto_ } } + + private void butcherDateBox_MouseClick(object sender, MouseEventArgs e) + { + var simpleLbl = sender as Label; + var cs = new CalendarSelecter(); + if (cs.ShowDialog() == true) + { + butcherDate = cs.Result; + butcherDateBox.Text = butcherDate.ToString("yyyy-MM-dd"); + } + } } }