Browse Source

优化代码

章政 8 years ago
parent
commit
97a10c7c7e

+ 111 - 81
UAS-MES/FunctionCode/Make/Make_BigBoxWeight.Designer.cs

@@ -73,9 +73,10 @@
             // 
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label15.Location = new System.Drawing.Point(22, 14);
+            this.label15.Location = new System.Drawing.Point(29, 18);
+            this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label15.Name = "label15";
-            this.label15.Size = new System.Drawing.Size(86, 31);
+            this.label15.Size = new System.Drawing.Size(107, 39);
             this.label15.TabIndex = 57;
             this.label15.Text = "大箱号";
             // 
@@ -85,10 +86,10 @@
             this.panel4.Controls.Add(this.pr_colorboxunit);
             this.panel4.Controls.Add(this.label22);
             this.panel4.Controls.Add(this.weight);
-            this.panel4.Location = new System.Drawing.Point(28, 68);
-            this.panel4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.panel4.Location = new System.Drawing.Point(37, 85);
+            this.panel4.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.panel4.Name = "panel4";
-            this.panel4.Size = new System.Drawing.Size(429, 79);
+            this.panel4.Size = new System.Drawing.Size(571, 98);
             this.panel4.TabIndex = 64;
             // 
             // pr_colorboxunit
@@ -97,9 +98,10 @@
             this.pr_colorboxunit.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.pr_colorboxunit.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_colorboxunit.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.pr_colorboxunit.Location = new System.Drawing.Point(384, 28);
+            this.pr_colorboxunit.Location = new System.Drawing.Point(512, 35);
+            this.pr_colorboxunit.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_colorboxunit.Name = "pr_colorboxunit";
-            this.pr_colorboxunit.Size = new System.Drawing.Size(31, 25);
+            this.pr_colorboxunit.Size = new System.Drawing.Size(38, 31);
             this.pr_colorboxunit.TabIndex = 42;
             this.pr_colorboxunit.Text = "克";
             // 
@@ -109,9 +111,10 @@
             this.label22.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.label22.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label22.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.label22.Location = new System.Drawing.Point(13, 28);
+            this.label22.Location = new System.Drawing.Point(17, 35);
+            this.label22.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label22.Name = "label22";
-            this.label22.Size = new System.Drawing.Size(50, 25);
+            this.label22.Size = new System.Drawing.Size(62, 31);
             this.label22.TabIndex = 20;
             this.label22.Text = "重量";
             // 
@@ -120,18 +123,20 @@
             this.weight.AutoSize = true;
             this.weight.Font = new System.Drawing.Font("微软雅黑", 25.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.weight.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
-            this.weight.Location = new System.Drawing.Point(95, 18);
+            this.weight.Location = new System.Drawing.Point(127, 22);
+            this.weight.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.weight.Name = "weight";
-            this.weight.Size = new System.Drawing.Size(0, 46);
+            this.weight.Size = new System.Drawing.Size(0, 57);
             this.weight.TabIndex = 41;
             // 
             // pa_makecode_label
             // 
             this.pa_makecode_label.AutoSize = true;
             this.pa_makecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode_label.Location = new System.Drawing.Point(34, 166);
+            this.pa_makecode_label.Location = new System.Drawing.Point(45, 208);
+            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_makecode_label.Name = "pa_makecode_label";
-            this.pa_makecode_label.Size = new System.Drawing.Size(72, 27);
+            this.pa_makecode_label.Size = new System.Drawing.Size(90, 32);
             this.pa_makecode_label.TabIndex = 73;
             this.pa_makecode_label.Text = "工单号";
             // 
@@ -139,9 +144,10 @@
             // 
             this.PA_TOTALQTY_label.AutoSize = true;
             this.PA_TOTALQTY_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PA_TOTALQTY_label.Location = new System.Drawing.Point(34, 226);
+            this.PA_TOTALQTY_label.Location = new System.Drawing.Point(45, 282);
+            this.PA_TOTALQTY_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PA_TOTALQTY_label.Name = "PA_TOTALQTY_label";
-            this.PA_TOTALQTY_label.Size = new System.Drawing.Size(92, 27);
+            this.PA_TOTALQTY_label.Size = new System.Drawing.Size(115, 32);
             this.PA_TOTALQTY_label.TabIndex = 74;
             this.PA_TOTALQTY_label.Text = "箱内总数";
             // 
@@ -149,9 +155,10 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(34, 286);
+            this.label2.Location = new System.Drawing.Point(45, 358);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(92, 27);
+            this.label2.Size = new System.Drawing.Size(115, 32);
             this.label2.TabIndex = 75;
             this.label2.Text = "产品编号";
             // 
@@ -159,9 +166,10 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(34, 339);
+            this.pr_detail_label.Location = new System.Drawing.Point(45, 424);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(115, 32);
             this.pr_detail_label.TabIndex = 76;
             this.pr_detail_label.Text = "名称规格";
             // 
@@ -169,9 +177,10 @@
             // 
             this.pa_salecode_label.AutoSize = true;
             this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode_label.Location = new System.Drawing.Point(243, 166);
+            this.pa_salecode_label.Location = new System.Drawing.Point(324, 208);
+            this.pa_salecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_salecode_label.Name = "pa_salecode_label";
-            this.pa_salecode_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_salecode_label.Size = new System.Drawing.Size(115, 32);
             this.pa_salecode_label.TabIndex = 77;
             this.pa_salecode_label.Text = "订单编号";
             // 
@@ -179,9 +188,10 @@
             // 
             this.PA_PACKAGEQTY_label.AutoSize = true;
             this.PA_PACKAGEQTY_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PA_PACKAGEQTY_label.Location = new System.Drawing.Point(243, 226);
+            this.PA_PACKAGEQTY_label.Location = new System.Drawing.Point(324, 282);
+            this.PA_PACKAGEQTY_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PA_PACKAGEQTY_label.Name = "PA_PACKAGEQTY_label";
-            this.PA_PACKAGEQTY_label.Size = new System.Drawing.Size(92, 27);
+            this.PA_PACKAGEQTY_label.Size = new System.Drawing.Size(115, 32);
             this.PA_PACKAGEQTY_label.TabIndex = 78;
             this.PA_PACKAGEQTY_label.Text = "箱内件数";
             // 
@@ -189,9 +199,10 @@
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(659, 54);
+            this.PrintLabel_label.Location = new System.Drawing.Point(879, 68);
+            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrintLabel_label.Name = "PrintLabel_label";
-            this.PrintLabel_label.Size = new System.Drawing.Size(69, 20);
+            this.PrintLabel_label.Size = new System.Drawing.Size(88, 25);
             this.PrintLabel_label.TabIndex = 169;
             this.PrintLabel_label.Text = "打印标签";
             // 
@@ -199,9 +210,10 @@
             // 
             this.Printer_label.AutoSize = true;
             this.Printer_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Printer_label.Location = new System.Drawing.Point(659, 20);
+            this.Printer_label.Location = new System.Drawing.Point(879, 25);
+            this.Printer_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Printer_label.Name = "Printer_label";
-            this.Printer_label.Size = new System.Drawing.Size(84, 20);
+            this.Printer_label.Size = new System.Drawing.Size(107, 25);
             this.Printer_label.TabIndex = 168;
             this.Printer_label.Text = "打印机列表";
             // 
@@ -209,17 +221,18 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(764, 54);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.PrintLabel.Location = new System.Drawing.Point(1019, 68);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(120, 20);
+            this.PrintLabel.Size = new System.Drawing.Size(159, 23);
             this.PrintLabel.TabIndex = 166;
             // 
             // PrintNum
             // 
-            this.PrintNum.Location = new System.Drawing.Point(764, 86);
+            this.PrintNum.Location = new System.Drawing.Point(1019, 108);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
             this.PrintNum.Name = "PrintNum";
-            this.PrintNum.Size = new System.Drawing.Size(119, 21);
+            this.PrintNum.Size = new System.Drawing.Size(159, 25);
             this.PrintNum.TabIndex = 174;
             this.PrintNum.Value = new decimal(new int[] {
             1,
@@ -231,9 +244,10 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(659, 86);
+            this.label6.Location = new System.Drawing.Point(879, 108);
+            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(74, 21);
+            this.label6.Size = new System.Drawing.Size(92, 27);
             this.label6.TabIndex = 173;
             this.label6.Text = "打印张数";
             // 
@@ -244,9 +258,11 @@
             this.箱号,
             this.重量,
             this.称重时间});
-            this.showResult.Location = new System.Drawing.Point(481, 169);
+            this.showResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.showResult.Location = new System.Drawing.Point(641, 211);
+            this.showResult.Margin = new System.Windows.Forms.Padding(4);
             this.showResult.Name = "showResult";
-            this.showResult.Size = new System.Drawing.Size(404, 374);
+            this.showResult.Size = new System.Drawing.Size(537, 466);
             this.showResult.TabIndex = 188;
             this.showResult.UseCompatibleStateImageBehavior = false;
             this.showResult.View = System.Windows.Forms.View.Details;
@@ -259,11 +275,13 @@
             // 
             this.箱号.Text = "箱号";
             this.箱号.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.箱号.Width = 168;
             // 
             // 重量
             // 
             this.重量.Text = "重量";
             this.重量.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.重量.Width = 107;
             // 
             // 称重时间
             // 
@@ -275,19 +293,20 @@
             // 
             this.已称.AutoSize = true;
             this.已称.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.已称.Location = new System.Drawing.Point(480, 127);
+            this.已称.Location = new System.Drawing.Point(640, 159);
+            this.已称.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.已称.Name = "已称";
-            this.已称.Size = new System.Drawing.Size(58, 21);
+            this.已称.Size = new System.Drawing.Size(72, 27);
             this.已称.TabIndex = 184;
             this.已称.Text = "已打印";
             // 
             // autoprint
             // 
             this.autoprint.Checked = false;
-            this.autoprint.Location = new System.Drawing.Point(663, 122);
-            this.autoprint.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.autoprint.Location = new System.Drawing.Point(884, 152);
+            this.autoprint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.autoprint.Name = "autoprint";
-            this.autoprint.Size = new System.Drawing.Size(94, 27);
+            this.autoprint.Size = new System.Drawing.Size(125, 34);
             this.autoprint.TabIndex = 189;
             // 
             // BaudRate
@@ -295,12 +314,12 @@
             this.BaudRate.AllPower = null;
             this.BaudRate.BackColor = System.Drawing.Color.White;
             this.BaudRate.ID = null;
-            this.BaudRate.Location = new System.Drawing.Point(532, 79);
-            this.BaudRate.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.BaudRate.Location = new System.Drawing.Point(709, 99);
+            this.BaudRate.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.BaudRate.Name = "BaudRate";
             this.BaudRate.Negative = false;
             this.BaudRate.Power = null;
-            this.BaudRate.Size = new System.Drawing.Size(120, 21);
+            this.BaudRate.Size = new System.Drawing.Size(159, 25);
             this.BaudRate.Str = null;
             this.BaudRate.Str1 = null;
             this.BaudRate.Str2 = null;
@@ -312,10 +331,11 @@
             this.weightsum.AutoSize = true;
             this.weightsum.CutLength = null;
             this.weightsum.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.weightsum.Location = new System.Drawing.Point(540, 123);
-            this.weightsum.MaximumSize = new System.Drawing.Size(150, 0);
+            this.weightsum.Location = new System.Drawing.Point(720, 154);
+            this.weightsum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.weightsum.MaximumSize = new System.Drawing.Size(200, 0);
             this.weightsum.Name = "weightsum";
-            this.weightsum.Size = new System.Drawing.Size(0, 27);
+            this.weightsum.Size = new System.Drawing.Size(0, 32);
             this.weightsum.TabIndex = 185;
             this.weightsum.Tag = "1";
             // 
@@ -324,10 +344,11 @@
             this.pa_packageqty.AutoSize = true;
             this.pa_packageqty.CutLength = null;
             this.pa_packageqty.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_packageqty.Location = new System.Drawing.Point(343, 226);
-            this.pa_packageqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_packageqty.Location = new System.Drawing.Point(457, 282);
+            this.pa_packageqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_packageqty.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_packageqty.Name = "pa_packageqty";
-            this.pa_packageqty.Size = new System.Drawing.Size(0, 27);
+            this.pa_packageqty.Size = new System.Drawing.Size(0, 32);
             this.pa_packageqty.TabIndex = 183;
             this.pa_packageqty.Tag = "1";
             // 
@@ -336,10 +357,11 @@
             this.pa_salecode.AutoSize = true;
             this.pa_salecode.CutLength = null;
             this.pa_salecode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode.Location = new System.Drawing.Point(343, 166);
-            this.pa_salecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_salecode.Location = new System.Drawing.Point(457, 208);
+            this.pa_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_salecode.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_salecode.Name = "pa_salecode";
-            this.pa_salecode.Size = new System.Drawing.Size(0, 27);
+            this.pa_salecode.Size = new System.Drawing.Size(0, 32);
             this.pa_salecode.TabIndex = 182;
             this.pa_salecode.Tag = "1";
             // 
@@ -348,10 +370,11 @@
             this.pr_detail.AutoSize = true;
             this.pr_detail.CutLength = null;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(126, 340);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_detail.Location = new System.Drawing.Point(168, 425);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(200, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 27);
+            this.pr_detail.Size = new System.Drawing.Size(0, 32);
             this.pr_detail.TabIndex = 181;
             this.pr_detail.Tag = "1";
             // 
@@ -360,10 +383,11 @@
             this.pa_prodcode.AutoSize = true;
             this.pa_prodcode.CutLength = null;
             this.pa_prodcode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode.Location = new System.Drawing.Point(126, 286);
-            this.pa_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_prodcode.Location = new System.Drawing.Point(168, 358);
+            this.pa_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_prodcode.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_prodcode.Name = "pa_prodcode";
-            this.pa_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.pa_prodcode.Size = new System.Drawing.Size(0, 32);
             this.pa_prodcode.TabIndex = 180;
             this.pa_prodcode.Tag = "1";
             this.pa_prodcode.TextChanged += new System.EventHandler(this.pa_prodcode_TextChanged);
@@ -373,10 +397,11 @@
             this.pa_totalqty.AutoSize = true;
             this.pa_totalqty.CutLength = null;
             this.pa_totalqty.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_totalqty.Location = new System.Drawing.Point(126, 226);
-            this.pa_totalqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_totalqty.Location = new System.Drawing.Point(168, 282);
+            this.pa_totalqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_totalqty.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_totalqty.Name = "pa_totalqty";
-            this.pa_totalqty.Size = new System.Drawing.Size(0, 27);
+            this.pa_totalqty.Size = new System.Drawing.Size(0, 32);
             this.pa_totalqty.TabIndex = 179;
             this.pa_totalqty.Tag = "1";
             // 
@@ -385,10 +410,11 @@
             this.pa_makecode.AutoSize = true;
             this.pa_makecode.CutLength = null;
             this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode.Location = new System.Drawing.Point(126, 166);
-            this.pa_makecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_makecode.Location = new System.Drawing.Point(168, 208);
+            this.pa_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_makecode.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_makecode.Name = "pa_makecode";
-            this.pa_makecode.Size = new System.Drawing.Size(0, 27);
+            this.pa_makecode.Size = new System.Drawing.Size(0, 32);
             this.pa_makecode.TabIndex = 178;
             this.pa_makecode.Tag = "1";
             // 
@@ -399,12 +425,13 @@
             this.StartWeight.DownImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.DownImage")));
             this.StartWeight.Image = ((System.Drawing.Image)(resources.GetObject("StartWeight.Image")));
             this.StartWeight.IsShowBorder = true;
-            this.StartWeight.Location = new System.Drawing.Point(481, 14);
+            this.StartWeight.Location = new System.Drawing.Point(641, 18);
+            this.StartWeight.Margin = new System.Windows.Forms.Padding(4);
             this.StartWeight.MoveImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.MoveImage")));
             this.StartWeight.Name = "StartWeight";
             this.StartWeight.NormalImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.NormalImage")));
             this.StartWeight.Power = null;
-            this.StartWeight.Size = new System.Drawing.Size(75, 24);
+            this.StartWeight.Size = new System.Drawing.Size(100, 30);
             this.StartWeight.TabIndex = 177;
             this.StartWeight.Text = "开始称量";
             this.StartWeight.UseVisualStyleBackColor = true;
@@ -417,12 +444,13 @@
             this.StopWeight.DownImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.DownImage")));
             this.StopWeight.Image = ((System.Drawing.Image)(resources.GetObject("StopWeight.Image")));
             this.StopWeight.IsShowBorder = true;
-            this.StopWeight.Location = new System.Drawing.Point(576, 14);
+            this.StopWeight.Location = new System.Drawing.Point(768, 18);
+            this.StopWeight.Margin = new System.Windows.Forms.Padding(4);
             this.StopWeight.MoveImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.MoveImage")));
             this.StopWeight.Name = "StopWeight";
             this.StopWeight.NormalImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.NormalImage")));
             this.StopWeight.Power = null;
-            this.StopWeight.Size = new System.Drawing.Size(75, 24);
+            this.StopWeight.Size = new System.Drawing.Size(100, 30);
             this.StopWeight.TabIndex = 176;
             this.StopWeight.Text = "停止称量";
             this.StopWeight.UseVisualStyleBackColor = true;
@@ -431,18 +459,19 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(28, 378);
+            this.OperateResult.Location = new System.Drawing.Point(37, 472);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(431, 164);
+            this.OperateResult.Size = new System.Drawing.Size(573, 204);
             this.OperateResult.TabIndex = 171;
             this.OperateResult.Text = "";
             // 
             // Printer
             // 
-            this.Printer.Location = new System.Drawing.Point(764, 20);
-            this.Printer.Margin = new System.Windows.Forms.Padding(4);
+            this.Printer.Location = new System.Drawing.Point(1019, 25);
+            this.Printer.Margin = new System.Windows.Forms.Padding(5);
             this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(119, 20);
+            this.Printer.Size = new System.Drawing.Size(159, 25);
             this.Printer.TabIndex = 167;
             // 
             // pa_outboxcode
@@ -451,11 +480,11 @@
             this.pa_outboxcode.BackColor = System.Drawing.Color.White;
             this.pa_outboxcode.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(132, 14);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.pa_outboxcode.Location = new System.Drawing.Point(176, 18);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifwrite";
-            this.pa_outboxcode.Size = new System.Drawing.Size(325, 39);
+            this.pa_outboxcode.Size = new System.Drawing.Size(432, 47);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -464,9 +493,9 @@
             // 
             // Make_BigBoxWeight
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(910, 552);
+            this.ClientSize = new System.Drawing.Size(1213, 690);
             this.Controls.Add(this.autoprint);
             this.Controls.Add(this.showResult);
             this.Controls.Add(this.BaudRate);
@@ -497,16 +526,17 @@
             this.Controls.Add(this.pa_outboxcode);
             this.Controls.Add(this.label15);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_BigBoxWeight";
             this.Tag = "Make!BigBoxWeigh";
             this.Text = "大箱称重";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_BigBoxWeight_FormClosing);
             this.Load += new System.EventHandler(this.Make_BigBoxWeight_Load);
             this.SizeChanged += new System.EventHandler(this.Make_BigBoxWeight_SizeChanged);
-            this.panel4.ResumeLayout(false);
+            this.panel4.ResumeLayout(true);
             this.panel4.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 9 - 21
UAS-MES/FunctionCode/Make/Make_BigBoxWeight.cs

@@ -73,11 +73,12 @@ namespace UAS_MES.Make
             SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
-            dh = new DataHelper();
             pa_outboxcode.Focus();
             OperateResult.AppendText(">>请输入大箱号\n");
             printcount = 0;
             weightsum.Text = printcount + "";
+            StartWeight.PerformClick();
+            dh = new DataHelper();
         }
 
 
@@ -104,12 +105,11 @@ namespace UAS_MES.Make
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append(" select pa_id,pa_prodcode,pr_spec,pr_detail,pa_makecode,pa_salecode,pa_totalqty, ");
-                sql.Append(" pa_packageqty from package left join product on pr_code=pa_prodcode where ");
-                sql.Append(" pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=2");
+                sql.Append("select pa_id,pa_prodcode,pr_spec,pr_detail,pa_makecode,pa_salecode,pa_totalqty,");
+                sql.Append("pa_packageqty from package left join product on pr_code=pa_prodcode where ");
+                sql.Append("pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=2");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 outboxcode = pa_outboxcode.Text;
-                BaseUtil.CleanForm(this);
                 weightsum.Text = printcount + "";
                 if (dt.Rows.Count > 0)
                 {
@@ -129,15 +129,7 @@ namespace UAS_MES.Make
                     sql.Append("update package set pa_weight='" + ActualWeight + "' where pa_outboxcode= '" + pa_outboxcode.Text + "'");
                     dh.ExecuteSql(sql.GetString(), "update");
                     OperateResult.AppendText("<<<箱号:" + pa_outboxcode.Text + ",重量:" + ActualWeight + "克\n", Color.Green);
-                    //记录makeprocess     
-                    sql.Clear();
-                    sql.Append("insert into MakeProcess(mp_id,mp_makecode,mp_maid,mp_stepcode,mp_stepname ,");
-                    sql.Append("mp_kind,mp_result,mp_indate,mp_inman,mp_wccode,mp_linecode,mp_sourcecode,mp_snoutboxcode)");
-                    sql.Append("select MakeProcess_seq.nextval, ma_code,ma_id,'" + User.CurrentStepCode + "','" + User.CurrentStepName + "',");
-                    sql.Append("'" + "大箱称重" + "','" + "称重成功,大箱箱号" + pa_outboxcode.Text + ",重量:" + ActualWeight + "克" + "',sysdate,'" + User.UserName + "',ma_wccode,'" + User.UserLineCode + "','" + User.UserSourceCode + "',");
-                    sql.Append("'" + pa_outboxcode.Text + "' from make left join makeserial on ms_makecode=ma_code  ");
-                    sql.Append("where ma_code='" + pa_makecode.Text + "'");
-                    dh.ExecuteSql(sql.GetString(), "insert");
+                    LogicHandler.InsertMakeProcess(pa_outboxcode.Text, pa_makecode.Text, User.UserSourceCode, "大箱称量", "大箱称量合格", User.UserCode);
                     OperateResult.AppendText("<<<更新成功\n", Color.Green);
                     //刷新grid的历史称重信息;
                     recordResult(pa_outboxcode.Text, weight.Text, System.DateTime.Now.ToString());
@@ -162,14 +154,9 @@ namespace UAS_MES.Make
                                 OperateResult.AppendText(">>产品:" + pa_prodcode.Text + "未维护大箱标签模板\n", Color.Red, pa_outboxcode);
                                 pa_outboxcode.Focus();
                             }
-                            else
-                                OperateResult.AppendText("<<<打印失败:" + eb.Message + "\n", Color.Red);
+                            else OperateResult.AppendText("<<<打印失败:" + eb.Message + "\n", Color.Red);
                         }
                     }
-                    else
-                    {
-                        OperateResult.AppendText("<<<需打印请勾选自动打印\n", Color.Red);
-                    }
                 }
                 else
                 {
@@ -263,6 +250,7 @@ namespace UAS_MES.Make
         private void Make_BigBoxWeight_FormClosing(object sender, FormClosingEventArgs e)
         {
             BaseUtil.ClosePrint(lbl);
+            StopWeight.PerformClick();
             if (serialPort1.IsOpen)
             {
                 GetData = false;
@@ -272,4 +260,4 @@ namespace UAS_MES.Make
             }
         }
     }
-}
+}