From 57ce2b814572bb15d920a77e4229af90e36807d9 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Fri, 28 Feb 2020 13:44:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8D=95No.147204=201?= =?UTF-8?q?=E3=80=81=E2=80=9C=E5=88=86=E5=89=B2=E7=A7=B0=E9=87=8D=E2=80=9D?= =?UTF-8?q?=E6=89=93=E7=A0=81=E5=AE=A2=E6=88=B7=E7=AB=AF=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E2=80=9C=E7=BB=9F=E8=AE=A1=E6=95=B0=E9=87=8F=E2=80=9D=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E5=8A=9F=E8=83=BD=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ButcherFactory.BO/Bill/SegmentProduction.cs | 2 + .../LocalBL/SegmentProductionBL.cs | 3 + .../SegmentProductionAutoForm.Designer.cs | 273 ++++++++++-------- .../SegmentProductionAutoForm.cs | 23 +- 4 files changed, 176 insertions(+), 125 deletions(-) diff --git a/ButcherFactory.BO/Bill/SegmentProduction.cs b/ButcherFactory.BO/Bill/SegmentProduction.cs index 5744c7a..a55e5e8 100644 --- a/ButcherFactory.BO/Bill/SegmentProduction.cs +++ b/ButcherFactory.BO/Bill/SegmentProduction.cs @@ -70,6 +70,8 @@ namespace ButcherFactory.BO [ReferenceTo(typeof(Goods), "MainUnit")] [Join("Goods_ID", "ID")] public string MainUnit { get; set; } + + public decimal? StatisticNumber { get; set; } } [MapToTable("Butcher_SegmentLog")] diff --git a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs index 68af8ff..3c1f5ca 100644 --- a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs @@ -281,6 +281,7 @@ namespace ButcherFactory.BO.LocalBL query.Columns.Add(DQSelectColumn.Field("Delete")); query.Columns.Add(DQSelectColumn.Field("StandardPic")); query.Columns.Add(DQSelectColumn.Field("MsgID")); + query.Columns.Add(DQSelectColumn.Field("StatisticNumber")); 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); @@ -304,6 +305,7 @@ namespace ButcherFactory.BO.LocalBL obj.Delete = (bool)reader[9]; obj.StandardPic = (bool)reader[10]; obj.MsgID = (string)reader[11]; + obj.StatisticNumber = (decimal?)reader[12]; upload.Add(obj); } } @@ -417,6 +419,7 @@ namespace ButcherFactory.BO.LocalBL public bool Delete { get; set; } public bool StandardPic { get; set; } public string MsgID { get; set; } + public decimal? StatisticNumber { get; set; } } class TaskTemp diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs index 99e77d1..6bc7c58 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs @@ -28,16 +28,16 @@ /// 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(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); this.uLabel3 = new WinFormControl.ULabel(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.taskDataGrid = new WinFormControl.UDataGridView(); @@ -47,7 +47,10 @@ this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.GoodsLabel = new WinFormControl.ULabel(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + 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(); @@ -56,8 +59,11 @@ 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.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(); @@ -65,12 +71,8 @@ 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.logBtn = new ButcherFactory.Controls.ColorButton(); - this.closeBtn = new ButcherFactory.Controls.ColorButton(); - this.uWeightControl1 = new ButcherFactory.Controls.WeightControl(); - this.goodsSetBtn = new ButcherFactory.Controls.ColorButton(); - this.deleteBtn = new ButcherFactory.Controls.ColorButton(); - this.rePrintBtn = new ButcherFactory.Controls.ColorButton(); + this.label1 = new System.Windows.Forms.Label(); + this.statisticNumberBox = new System.Windows.Forms.TextBox(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -113,15 +115,15 @@ 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; + dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11; 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; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle12.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12; this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.T_Item, @@ -134,9 +136,9 @@ 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; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle16; this.taskDataGrid.RowTemplate.Height = 23; this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.taskDataGrid.Size = new System.Drawing.Size(442, 96); @@ -153,8 +155,8 @@ // this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Need.DataPropertyName = "Need"; - dataGridViewCellStyle3.Format = "#0.######"; - this.T_Need.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle13.Format = "#0.######"; + this.T_Need.DefaultCellStyle = dataGridViewCellStyle13; this.T_Need.HeaderText = "订货"; this.T_Need.Name = "T_Need"; this.T_Need.ReadOnly = true; @@ -163,8 +165,8 @@ // this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Done.DataPropertyName = "Done"; - dataGridViewCellStyle4.Format = "#0.######"; - this.T_Done.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle14.Format = "#0.######"; + this.T_Done.DefaultCellStyle = dataGridViewCellStyle14; this.T_Done.HeaderText = "完工"; this.T_Done.Name = "T_Done"; this.T_Done.ReadOnly = true; @@ -173,8 +175,8 @@ // this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Last.DataPropertyName = "Last"; - dataGridViewCellStyle5.Format = "#0.######"; - this.T_Last.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle15.Format = "#0.######"; + this.T_Last.DefaultCellStyle = dataGridViewCellStyle15; this.T_Last.HeaderText = "剩余"; this.T_Last.Name = "T_Last"; this.T_Last.ReadOnly = true; @@ -203,6 +205,8 @@ // // splitContainer1.Panel1 // + 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); @@ -222,6 +226,21 @@ this.splitContainer1.SplitterDistance = 87; this.splitContainer1.TabIndex = 1; // + // 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, 7); + 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; @@ -232,6 +251,30 @@ 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; @@ -332,6 +375,21 @@ 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) @@ -354,6 +412,35 @@ this.flowLayoutPanel1.Size = new System.Drawing.Size(640, 70); this.flowLayoutPanel1.TabIndex = 22; // + // 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) @@ -373,15 +460,15 @@ 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; + dataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle17; 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; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle18.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle18; this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.H_ID, @@ -395,9 +482,9 @@ 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; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle20; this.historyDataGrid.RowTemplate.Height = 23; this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.historyDataGrid.Size = new System.Drawing.Size(437, 308); @@ -438,94 +525,30 @@ // H_Weight // this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle9.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle19.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle19; this.H_Weight.HeaderText = "重量"; this.H_Weight.Name = "H_Weight"; this.H_Weight.ReadOnly = true; // - // 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, 7); - 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); - // - // 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); + // label1 // - // uWeightControl1 + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 15F); + this.label1.Location = new System.Drawing.Point(430, 51); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(109, 20); + this.label1.TabIndex = 26; + this.label1.Text = "统计数量:"; // - 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; + // statisticNumberBox // - // 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); - // - // 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); + this.statisticNumberBox.Font = new System.Drawing.Font("宋体", 15F); + this.statisticNumberBox.Location = new System.Drawing.Point(532, 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); // // SegmentProductionAutoForm // @@ -590,6 +613,8 @@ private System.Windows.Forms.DataGridViewTextBoxColumn H_BarCode; private System.Windows.Forms.DataGridViewTextBoxColumn H_Goods_Name; private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; - private Controls.ColorButton logBtn; + private Controls.ColorButton logBtn; + private System.Windows.Forms.TextBox statisticNumberBox; + private System.Windows.Forms.Label label1; } } \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs index b59935a..bb04776 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs @@ -202,6 +202,8 @@ namespace ButcherFactory.SegmentProductionAuto_ entity.WorkUnit_ID = config.WorkUnitID; entity.ProductBatch_ID = batchID.Value; entity.StandardPic = detail.StandardPic; + if (!string.IsNullOrEmpty(statisticNumberBox.Text)) + entity.StatisticNumber = decimal.Parse(statisticNumberBox.Text); SegmentProductionBL.InsertAndSetGroupID(entity, batchDate.Value); entity.Goods_Code = detail.Goods_Code; entity.Goods_Name = detail.Goods_Name; @@ -366,6 +368,25 @@ namespace ButcherFactory.SegmentProductionAuto_ private void logBtn_Click(object sender, EventArgs e) { new LogForm().ShowDialog(); - } + } + + private void StatisticNumberBox_MouseClick(object sender, MouseEventArgs e) + { + var keyBoard = new NumberPad(); + if (keyBoard.ShowDialog() == true) + { + var box = (sender as TextBox); + if (string.IsNullOrEmpty(keyBoard.Result)) + box.Text = string.Empty; + else + { + decimal num = 0; + + if (!decimal.TryParse(keyBoard.Result, out num)) + throw new Exception("数量输入有误"); + box.Text = keyBoard.Result; + } + } + } } }