Browse Source

新增卡通箱称重装栈板界面

Hcsy 8 years ago
parent
commit
ba885d6331

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -295,7 +295,7 @@ namespace UAS_MES.Make
                                     if (pa_standardqty.Text == pa_totalqty.Text)
                                     {
                                         dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
-                                        OperateResult.AppendText("栈板" + pa_outboxcode.Text + "已装满,封栈板成功");
+                                        OperateResult.AppendText("栈板" + pa_outboxcode.Text + "已装满,封栈板成功\n");
                                         pa_outboxcode.Focus();
                                         pa_outboxcode.SelectAll();
                                         if (AutoPrint.Checked)

+ 162 - 174
UAS-MES/FunctionCode/Make/Make_PalletWightCollection.Designer.cs

@@ -83,8 +83,10 @@
             this.BaudRate = new System.Windows.Forms.Label();
             this.StopWeight = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.StartWeight = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.pr_colorboxgw = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.pr_cartongw = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pr_colorboxgw_label = new System.Windows.Forms.Label();
+            this.ma_code = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.pr_code = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.panel4.SuspendLayout();
             this.SuspendLayout();
@@ -93,10 +95,9 @@
             // 
             this.pa_outboxcode_label.AutoSize = true;
             this.pa_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_outboxcode_label.Location = new System.Drawing.Point(5, 52);
-            this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_outboxcode_label.Location = new System.Drawing.Point(4, 42);
             this.pa_outboxcode_label.Name = "pa_outboxcode_label";
-            this.pa_outboxcode_label.Size = new System.Drawing.Size(72, 27);
+            this.pa_outboxcode_label.Size = new System.Drawing.Size(58, 21);
             this.pa_outboxcode_label.TabIndex = 102;
             this.pa_outboxcode_label.Text = "栈板号";
             // 
@@ -104,10 +105,9 @@
             // 
             this.pa_totalqty_label.AutoSize = true;
             this.pa_totalqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_totalqty_label.Location = new System.Drawing.Point(387, 104);
-            this.pa_totalqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_totalqty_label.Location = new System.Drawing.Point(290, 83);
             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(74, 21);
             this.pa_totalqty_label.TabIndex = 104;
             this.pa_totalqty_label.Text = "已装数量";
             // 
@@ -115,10 +115,9 @@
             // 
             this.pa_makecode_label.AutoSize = true;
             this.pa_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode_label.Location = new System.Drawing.Point(387, 52);
-            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_makecode_label.Location = new System.Drawing.Point(290, 42);
             this.pa_makecode_label.Name = "pa_makecode_label";
-            this.pa_makecode_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_makecode_label.Size = new System.Drawing.Size(74, 21);
             this.pa_makecode_label.TabIndex = 108;
             this.pa_makecode_label.Text = "制造单号";
             // 
@@ -126,10 +125,9 @@
             // 
             this.pa_restqty_label.AutoSize = true;
             this.pa_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_restqty_label.Location = new System.Drawing.Point(1079, 162);
-            this.pa_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_restqty_label.Location = new System.Drawing.Point(809, 130);
             this.pa_restqty_label.Name = "pa_restqty_label";
-            this.pa_restqty_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_restqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_restqty_label.TabIndex = 154;
             this.pa_restqty_label.Text = "打印张数";
             // 
@@ -137,10 +135,9 @@
             // 
             this.pa_salecode_label.AutoSize = true;
             this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode_label.Location = new System.Drawing.Point(1004, 52);
-            this.pa_salecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_salecode_label.Location = new System.Drawing.Point(753, 42);
             this.pa_salecode_label.Name = "pa_salecode_label";
-            this.pa_salecode_label.Size = new System.Drawing.Size(52, 27);
+            this.pa_salecode_label.Size = new System.Drawing.Size(42, 21);
             this.pa_salecode_label.TabIndex = 157;
             this.pa_salecode_label.Text = "合同";
             // 
@@ -148,10 +145,9 @@
             // 
             this.outboxcode_label.AutoSize = true;
             this.outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.outboxcode_label.Location = new System.Drawing.Point(21, 646);
-            this.outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.outboxcode_label.Location = new System.Drawing.Point(16, 517);
             this.outboxcode_label.Name = "outboxcode_label";
-            this.outboxcode_label.Size = new System.Drawing.Size(52, 27);
+            this.outboxcode_label.Size = new System.Drawing.Size(42, 21);
             this.outboxcode_label.TabIndex = 166;
             this.outboxcode_label.Text = "箱号";
             // 
@@ -159,10 +155,9 @@
             // 
             this.pa_prodcode_label.AutoSize = true;
             this.pa_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode_label.Location = new System.Drawing.Point(643, 52);
-            this.pa_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_prodcode_label.Location = new System.Drawing.Point(482, 42);
             this.pa_prodcode_label.Name = "pa_prodcode_label";
-            this.pa_prodcode_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.pa_prodcode_label.TabIndex = 169;
             this.pa_prodcode_label.Text = "产品编号";
             // 
@@ -170,10 +165,10 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1127, 104);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.PrintLabel.Location = new System.Drawing.Point(845, 83);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(157, 23);
+            this.PrintLabel.Size = new System.Drawing.Size(119, 20);
             this.PrintLabel.TabIndex = 172;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -181,10 +176,9 @@
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(1004, 104);
-            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrintLabel_label.Location = new System.Drawing.Point(753, 83);
             this.PrintLabel_label.Name = "PrintLabel_label";
-            this.PrintLabel_label.Size = new System.Drawing.Size(92, 27);
+            this.PrintLabel_label.Size = new System.Drawing.Size(74, 21);
             this.PrintLabel_label.TabIndex = 174;
             this.PrintLabel_label.Text = "标签文件";
             // 
@@ -192,10 +186,9 @@
             // 
             this.PrinterList_label.AutoSize = true;
             this.PrinterList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrinterList_label.Location = new System.Drawing.Point(643, 104);
-            this.PrinterList_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrinterList_label.Location = new System.Drawing.Point(482, 83);
             this.PrinterList_label.Name = "PrinterList_label";
-            this.PrinterList_label.Size = new System.Drawing.Size(112, 27);
+            this.PrinterList_label.Size = new System.Drawing.Size(90, 21);
             this.PrinterList_label.TabIndex = 173;
             this.PrinterList_label.Text = "打印机列表";
             // 
@@ -203,10 +196,9 @@
             // 
             this.pa_packageqty_label.AutoSize = true;
             this.pa_packageqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_packageqty_label.Location = new System.Drawing.Point(5, 104);
-            this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_packageqty_label.Location = new System.Drawing.Point(4, 83);
             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(74, 21);
             this.pa_packageqty_label.TabIndex = 176;
             this.pa_packageqty_label.Text = "栈板容量";
             // 
@@ -214,10 +206,9 @@
             // 
             this.AutoOutBoxCode.AutoSize = true;
             this.AutoOutBoxCode.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.AutoOutBoxCode.Location = new System.Drawing.Point(10, 20);
-            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4);
+            this.AutoOutBoxCode.Location = new System.Drawing.Point(8, 16);
             this.AutoOutBoxCode.Name = "AutoOutBoxCode";
-            this.AutoOutBoxCode.Size = new System.Drawing.Size(100, 27);
+            this.AutoOutBoxCode.Size = new System.Drawing.Size(84, 24);
             this.AutoOutBoxCode.TabIndex = 180;
             this.AutoOutBoxCode.Text = "自动生成";
             this.AutoOutBoxCode.UseVisualStyleBackColor = true;
@@ -226,10 +217,9 @@
             // 
             this.pa_status.AutoSize = true;
             this.pa_status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_status.Location = new System.Drawing.Point(1157, 218);
-            this.pa_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_status.Location = new System.Drawing.Point(868, 174);
             this.pa_status.Name = "pa_status";
-            this.pa_status.Size = new System.Drawing.Size(0, 27);
+            this.pa_status.Size = new System.Drawing.Size(0, 21);
             this.pa_status.TabIndex = 181;
             this.pa_status.Visible = false;
             // 
@@ -237,10 +227,9 @@
             // 
             this.Cancel.AutoSize = true;
             this.Cancel.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.Cancel.Location = new System.Drawing.Point(286, 648);
-            this.Cancel.Margin = new System.Windows.Forms.Padding(4);
+            this.Cancel.Location = new System.Drawing.Point(214, 518);
             this.Cancel.Name = "Cancel";
-            this.Cancel.Size = new System.Drawing.Size(100, 27);
+            this.Cancel.Size = new System.Drawing.Size(84, 24);
             this.Cancel.TabIndex = 185;
             this.Cancel.Text = "取消采集";
             this.Cancel.UseVisualStyleBackColor = true;
@@ -248,10 +237,9 @@
             // pr_packrule
             // 
             this.pr_packrule.AutoSize = true;
-            this.pr_packrule.Location = new System.Drawing.Point(999, 651);
-            this.pr_packrule.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_packrule.Location = new System.Drawing.Point(749, 521);
             this.pr_packrule.Name = "pr_packrule";
-            this.pr_packrule.Size = new System.Drawing.Size(0, 15);
+            this.pr_packrule.Size = new System.Drawing.Size(0, 12);
             this.pr_packrule.TabIndex = 186;
             this.pr_packrule.Visible = false;
             // 
@@ -259,39 +247,35 @@
             // 
             this.pa_salecode.AutoSize = true;
             this.pa_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode.Location = new System.Drawing.Point(1125, 52);
-            this.pa_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_salecode.Location = new System.Drawing.Point(844, 42);
             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, 21);
             this.pa_salecode.TabIndex = 187;
             // 
             // pd_makecode
             // 
             this.pd_makecode.AutoSize = true;
-            this.pd_makecode.Location = new System.Drawing.Point(1064, 375);
-            this.pd_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pd_makecode.Location = new System.Drawing.Point(798, 300);
             this.pd_makecode.Name = "pd_makecode";
-            this.pd_makecode.Size = new System.Drawing.Size(0, 15);
+            this.pd_makecode.Size = new System.Drawing.Size(0, 12);
             this.pd_makecode.TabIndex = 188;
             this.pd_makecode.Visible = false;
             // 
             // pd_prodcode
             // 
             this.pd_prodcode.AutoSize = true;
-            this.pd_prodcode.Location = new System.Drawing.Point(999, 374);
-            this.pd_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pd_prodcode.Location = new System.Drawing.Point(749, 299);
             this.pd_prodcode.Name = "pd_prodcode";
-            this.pd_prodcode.Size = new System.Drawing.Size(0, 15);
+            this.pd_prodcode.Size = new System.Drawing.Size(0, 12);
             this.pd_prodcode.TabIndex = 189;
             this.pd_prodcode.Visible = false;
             // 
             // pd_salecode
             // 
             this.pd_salecode.AutoSize = true;
-            this.pd_salecode.Location = new System.Drawing.Point(1221, 372);
-            this.pd_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pd_salecode.Location = new System.Drawing.Point(916, 298);
             this.pd_salecode.Name = "pd_salecode";
-            this.pd_salecode.Size = new System.Drawing.Size(0, 15);
+            this.pd_salecode.Size = new System.Drawing.Size(0, 12);
             this.pd_salecode.TabIndex = 190;
             this.pd_salecode.Visible = false;
             // 
@@ -300,11 +284,11 @@
             this.pa_standardqty.AllPower = null;
             this.pa_standardqty.BackColor = System.Drawing.Color.White;
             this.pa_standardqty.ID = null;
-            this.pa_standardqty.Location = new System.Drawing.Point(113, 105);
-            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.pa_standardqty.Location = new System.Drawing.Point(85, 84);
+            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(2);
             this.pa_standardqty.Name = "pa_standardqty";
             this.pa_standardqty.Power = null;
-            this.pa_standardqty.Size = new System.Drawing.Size(151, 25);
+            this.pa_standardqty.Size = new System.Drawing.Size(114, 21);
             this.pa_standardqty.Str = null;
             this.pa_standardqty.Str1 = null;
             this.pa_standardqty.Str2 = null;
@@ -317,11 +301,10 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(1190, 162);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintNum.Location = new System.Drawing.Point(892, 130);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(94, 25);
+            this.PrintNum.Size = new System.Drawing.Size(72, 21);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -334,13 +317,12 @@
             this.Packing.DownImage = ((System.Drawing.Image)(resources.GetObject("Packing.DownImage")));
             this.Packing.Image = ((System.Drawing.Image)(resources.GetObject("Packing.Image")));
             this.Packing.IsShowBorder = true;
-            this.Packing.Location = new System.Drawing.Point(648, 648);
-            this.Packing.Margin = new System.Windows.Forms.Padding(4);
+            this.Packing.Location = new System.Drawing.Point(486, 518);
             this.Packing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Packing.MoveImage")));
             this.Packing.Name = "Packing";
             this.Packing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Packing.NormalImage")));
             this.Packing.Power = null;
-            this.Packing.Size = new System.Drawing.Size(75, 30);
+            this.Packing.Size = new System.Drawing.Size(56, 24);
             this.Packing.TabIndex = 178;
             this.Packing.Text = "封栈板";
             this.Packing.UseVisualStyleBackColor = true;
@@ -348,10 +330,10 @@
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(789, 104);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
+            this.PrinterList.Location = new System.Drawing.Point(592, 83);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(4);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(176, 25);
+            this.PrinterList.Size = new System.Drawing.Size(132, 20);
             this.PrinterList.TabIndex = 171;
             // 
             // pa_prodcode
@@ -359,11 +341,10 @@
             this.pa_prodcode.AutoSize = true;
             this.pa_prodcode.CutLength = null;
             this.pa_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode.Location = new System.Drawing.Point(784, 52);
-            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.Location = new System.Drawing.Point(588, 42);
+            this.pa_prodcode.MaximumSize = new System.Drawing.Size(150, 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, 21);
             this.pa_prodcode.TabIndex = 170;
             this.pa_prodcode.Tag = "1";
             this.pa_prodcode.TextChanged += new System.EventHandler(this.pa_prodcode_TextChanged);
@@ -375,13 +356,12 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1105, 638);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4);
+            this.Clean.Location = new System.Drawing.Point(829, 510);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(80, 30);
+            this.Clean.Size = new System.Drawing.Size(60, 24);
             this.Clean.TabIndex = 168;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -390,10 +370,9 @@
             // 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(784, 376);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(588, 301);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(498, 254);
+            this.OperateResult.Size = new System.Drawing.Size(374, 204);
             this.OperateResult.TabIndex = 167;
             this.OperateResult.Text = "";
             // 
@@ -402,11 +381,10 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(89, 648);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.outboxcode.Location = new System.Drawing.Point(67, 518);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifread";
-            this.outboxcode.Size = new System.Drawing.Size(175, 25);
+            this.outboxcode.Size = new System.Drawing.Size(132, 21);
             this.outboxcode.Str = null;
             this.outboxcode.Str1 = null;
             this.outboxcode.Str2 = null;
@@ -419,11 +397,10 @@
             this.pa_outboxcode.AllPower = "ifall";
             this.pa_outboxcode.BackColor = System.Drawing.Color.White;
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(113, 55);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.pa_outboxcode.Location = new System.Drawing.Point(85, 44);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifread";
-            this.pa_outboxcode.Size = new System.Drawing.Size(229, 25);
+            this.pa_outboxcode.Size = new System.Drawing.Size(173, 21);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -438,13 +415,12 @@
             this.Printlab.DownImage = ((System.Drawing.Image)(resources.GetObject("Printlab.DownImage")));
             this.Printlab.Image = ((System.Drawing.Image)(resources.GetObject("Printlab.Image")));
             this.Printlab.IsShowBorder = true;
-            this.Printlab.Location = new System.Drawing.Point(546, 648);
-            this.Printlab.Margin = new System.Windows.Forms.Padding(4);
+            this.Printlab.Location = new System.Drawing.Point(410, 518);
             this.Printlab.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printlab.MoveImage")));
             this.Printlab.Name = "Printlab";
             this.Printlab.NormalImage = ((System.Drawing.Image)(resources.GetObject("Printlab.NormalImage")));
             this.Printlab.Power = null;
-            this.Printlab.Size = new System.Drawing.Size(60, 30);
+            this.Printlab.Size = new System.Drawing.Size(45, 24);
             this.Printlab.TabIndex = 161;
             this.Printlab.Text = "打印";
             this.Printlab.UseVisualStyleBackColor = true;
@@ -457,13 +433,12 @@
             this.ReleasePallet.DownImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.DownImage")));
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
-            this.ReleasePallet.Location = new System.Drawing.Point(432, 648);
-            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4);
+            this.ReleasePallet.Location = new System.Drawing.Point(324, 518);
             this.ReleasePallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.MoveImage")));
             this.ReleasePallet.Name = "ReleasePallet";
             this.ReleasePallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.NormalImage")));
             this.ReleasePallet.Power = null;
-            this.ReleasePallet.Size = new System.Drawing.Size(75, 30);
+            this.ReleasePallet.Size = new System.Drawing.Size(56, 24);
             this.ReleasePallet.TabIndex = 160;
             this.ReleasePallet.Text = "解除栈板";
             this.ReleasePallet.UseVisualStyleBackColor = true;
@@ -476,13 +451,12 @@
             this.NewPalletCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.DownImage")));
             this.NewPalletCode.Image = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.Image")));
             this.NewPalletCode.IsShowBorder = true;
-            this.NewPalletCode.Location = new System.Drawing.Point(1215, 18);
-            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(4);
+            this.NewPalletCode.Location = new System.Drawing.Point(911, 14);
             this.NewPalletCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.MoveImage")));
             this.NewPalletCode.Name = "NewPalletCode";
             this.NewPalletCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.NormalImage")));
             this.NewPalletCode.Power = "ifread";
-            this.NewPalletCode.Size = new System.Drawing.Size(80, 30);
+            this.NewPalletCode.Size = new System.Drawing.Size(60, 24);
             this.NewPalletCode.TabIndex = 159;
             this.NewPalletCode.Text = "新增栈板";
             this.NewPalletCode.UseVisualStyleBackColor = true;
@@ -494,11 +468,10 @@
             this.pa_custcode.AutoSize = true;
             this.pa_custcode.CutLength = null;
             this.pa_custcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_custcode.Location = new System.Drawing.Point(965, 218);
-            this.pa_custcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_custcode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_custcode.Location = new System.Drawing.Point(724, 174);
+            this.pa_custcode.MaximumSize = new System.Drawing.Size(150, 0);
             this.pa_custcode.Name = "pa_custcode";
-            this.pa_custcode.Size = new System.Drawing.Size(0, 27);
+            this.pa_custcode.Size = new System.Drawing.Size(0, 21);
             this.pa_custcode.TabIndex = 158;
             this.pa_custcode.Tag = "1";
             // 
@@ -513,11 +486,10 @@
             this.Column4,
             this.Column5});
             this.PackageInf.EnableContentClick = true;
-            this.PackageInf.Location = new System.Drawing.Point(4, 161);
-            this.PackageInf.Margin = new System.Windows.Forms.Padding(4);
+            this.PackageInf.Location = new System.Drawing.Point(3, 129);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
-            this.PackageInf.Size = new System.Drawing.Size(766, 468);
+            this.PackageInf.Size = new System.Drawing.Size(574, 374);
             this.PackageInf.TabIndex = 156;
             // 
             // pd_outboxcode
@@ -570,11 +542,10 @@
             this.pa_makecode.AutoSize = true;
             this.pa_makecode.CutLength = null;
             this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode.Location = new System.Drawing.Point(499, 52);
-            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.Location = new System.Drawing.Point(374, 42);
+            this.pa_makecode.MaximumSize = new System.Drawing.Size(150, 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, 21);
             this.pa_makecode.TabIndex = 109;
             this.pa_makecode.Tag = "1";
             // 
@@ -583,31 +554,29 @@
             this.pa_totalqty.AutoSize = true;
             this.pa_totalqty.CutLength = null;
             this.pa_totalqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_totalqty.Location = new System.Drawing.Point(499, 104);
-            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.Location = new System.Drawing.Point(374, 83);
+            this.pa_totalqty.MaximumSize = new System.Drawing.Size(150, 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, 21);
             this.pa_totalqty.TabIndex = 105;
             this.pa_totalqty.Tag = "1";
             // 
             // AutoPrint
             // 
             this.AutoPrint.Checked = false;
-            this.AutoPrint.Location = new System.Drawing.Point(1195, 205);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.AutoPrint.Location = new System.Drawing.Point(896, 164);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(112, 28);
+            this.AutoPrint.Size = new System.Drawing.Size(84, 22);
             this.AutoPrint.TabIndex = 191;
             // 
             // OutBoxLength_label
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(122, 21);
-            this.OutBoxLength_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(92, 17);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
-            this.OutBoxLength_label.Size = new System.Drawing.Size(46, 24);
+            this.OutBoxLength_label.Size = new System.Drawing.Size(37, 20);
             this.OutBoxLength_label.TabIndex = 193;
             this.OutBoxLength_label.Text = "长度";
             // 
@@ -617,11 +586,11 @@
             this.OutBoxLength.BackColor = System.Drawing.Color.White;
             this.OutBoxLength.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.OutBoxLength.ID = null;
-            this.OutBoxLength.Location = new System.Drawing.Point(179, 20);
-            this.OutBoxLength.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
+            this.OutBoxLength.Location = new System.Drawing.Point(134, 16);
+            this.OutBoxLength.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.OutBoxLength.Name = "OutBoxLength";
             this.OutBoxLength.Power = null;
-            this.OutBoxLength.Size = new System.Drawing.Size(49, 27);
+            this.OutBoxLength.Size = new System.Drawing.Size(38, 23);
             this.OutBoxLength.Str = null;
             this.OutBoxLength.Str1 = null;
             this.OutBoxLength.Str2 = null;
@@ -631,10 +600,10 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(643, 14);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.StepCount.Location = new System.Drawing.Point(482, 11);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(117, 28);
+            this.StepCount.Size = new System.Drawing.Size(88, 22);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 194;
@@ -643,10 +612,9 @@
             // 
             this.PalletPreFix_label.AutoSize = true;
             this.PalletPreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PalletPreFix_label.Location = new System.Drawing.Point(242, 21);
-            this.PalletPreFix_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PalletPreFix_label.Location = new System.Drawing.Point(182, 17);
             this.PalletPreFix_label.Name = "PalletPreFix_label";
-            this.PalletPreFix_label.Size = new System.Drawing.Size(46, 24);
+            this.PalletPreFix_label.Size = new System.Drawing.Size(37, 20);
             this.PalletPreFix_label.TabIndex = 196;
             this.PalletPreFix_label.Text = "前缀";
             // 
@@ -656,11 +624,11 @@
             this.PalletPreFix.BackColor = System.Drawing.Color.White;
             this.PalletPreFix.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.PalletPreFix.ID = null;
-            this.PalletPreFix.Location = new System.Drawing.Point(293, 20);
-            this.PalletPreFix.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
+            this.PalletPreFix.Location = new System.Drawing.Point(220, 16);
+            this.PalletPreFix.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.PalletPreFix.Name = "PalletPreFix";
             this.PalletPreFix.Power = null;
-            this.PalletPreFix.Size = new System.Drawing.Size(49, 27);
+            this.PalletPreFix.Size = new System.Drawing.Size(38, 23);
             this.PalletPreFix.Str = null;
             this.PalletPreFix.Str1 = null;
             this.PalletPreFix.Str2 = null;
@@ -673,10 +641,10 @@
             this.panel4.Controls.Add(this.pr_colorboxunit);
             this.panel4.Controls.Add(this.weight_label);
             this.panel4.Controls.Add(this.weight);
-            this.panel4.Location = new System.Drawing.Point(784, 203);
-            this.panel4.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.panel4.Location = new System.Drawing.Point(592, 164);
+            this.panel4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.panel4.Name = "panel4";
-            this.panel4.Size = new System.Drawing.Size(400, 158);
+            this.panel4.Size = new System.Drawing.Size(296, 125);
             this.panel4.TabIndex = 197;
             // 
             // pr_colorboxunit
@@ -685,10 +653,9 @@
             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(21, 122);
-            this.pr_colorboxunit.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_colorboxunit.Location = new System.Drawing.Point(16, 98);
             this.pr_colorboxunit.Name = "pr_colorboxunit";
-            this.pr_colorboxunit.Size = new System.Drawing.Size(38, 31);
+            this.pr_colorboxunit.Size = new System.Drawing.Size(31, 25);
             this.pr_colorboxunit.TabIndex = 42;
             this.pr_colorboxunit.Text = "克";
             this.pr_colorboxunit.Visible = false;
@@ -699,10 +666,9 @@
             this.weight_label.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.weight_label.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.weight_label.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.weight_label.Location = new System.Drawing.Point(21, 61);
-            this.weight_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.weight_label.Location = new System.Drawing.Point(16, 49);
             this.weight_label.Name = "weight_label";
-            this.weight_label.Size = new System.Drawing.Size(62, 31);
+            this.weight_label.Size = new System.Drawing.Size(50, 25);
             this.weight_label.TabIndex = 20;
             this.weight_label.Text = "重量";
             // 
@@ -711,20 +677,18 @@
             this.weight.AutoSize = true;
             this.weight.Font = new System.Drawing.Font("微软雅黑", 35F);
             this.weight.ForeColor = System.Drawing.Color.Green;
-            this.weight.Location = new System.Drawing.Point(115, 37);
-            this.weight.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.weight.Location = new System.Drawing.Point(86, 30);
             this.weight.Name = "weight";
-            this.weight.Size = new System.Drawing.Size(0, 78);
+            this.weight.Size = new System.Drawing.Size(0, 60);
             this.weight.TabIndex = 41;
             // 
             // ComList
             // 
             this.ComList.AutoSize = true;
             this.ComList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ComList.Location = new System.Drawing.Point(585, 20);
-            this.ComList.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ComList.Location = new System.Drawing.Point(439, 16);
             this.ComList.Name = "ComList";
-            this.ComList.Size = new System.Drawing.Size(86, 25);
+            this.ComList.Size = new System.Drawing.Size(68, 20);
             this.ComList.TabIndex = 198;
             this.ComList.Text = "ComList";
             this.ComList.Visible = false;
@@ -733,10 +697,9 @@
             // 
             this.BaudRate.AutoSize = true;
             this.BaudRate.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BaudRate.Location = new System.Drawing.Point(699, 20);
-            this.BaudRate.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.BaudRate.Location = new System.Drawing.Point(524, 16);
             this.BaudRate.Name = "BaudRate";
-            this.BaudRate.Size = new System.Drawing.Size(100, 25);
+            this.BaudRate.Size = new System.Drawing.Size(78, 20);
             this.BaudRate.TabIndex = 199;
             this.BaudRate.Text = "BaudRate";
             this.BaudRate.Visible = false;
@@ -748,16 +711,17 @@
             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(1215, 296);
-            this.StopWeight.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.StopWeight.Location = new System.Drawing.Point(911, 237);
+            this.StopWeight.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             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(72, 30);
+            this.StopWeight.Size = new System.Drawing.Size(54, 24);
             this.StopWeight.TabIndex = 201;
             this.StopWeight.Text = "停止称量";
             this.StopWeight.UseVisualStyleBackColor = true;
+            this.StopWeight.Click += new System.EventHandler(this.StopWeight_Click);
             // 
             // StartWeight
             // 
@@ -766,47 +730,70 @@
             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(1215, 245);
-            this.StartWeight.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.StartWeight.Location = new System.Drawing.Point(911, 196);
+            this.StartWeight.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             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(72, 30);
+            this.StartWeight.Size = new System.Drawing.Size(54, 24);
             this.StartWeight.TabIndex = 200;
             this.StartWeight.Text = "开始称量";
             this.StartWeight.UseVisualStyleBackColor = true;
+            this.StartWeight.Click += new System.EventHandler(this.StartWeight_Click);
             // 
-            // pr_colorboxgw
+            // pr_cartongw
             // 
-            this.pr_colorboxgw.AutoSize = true;
-            this.pr_colorboxgw.CutLength = null;
-            this.pr_colorboxgw.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_colorboxgw.Location = new System.Drawing.Point(891, 161);
-            this.pr_colorboxgw.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_colorboxgw.MaximumSize = new System.Drawing.Size(200, 0);
-            this.pr_colorboxgw.Name = "pr_colorboxgw";
-            this.pr_colorboxgw.Size = new System.Drawing.Size(0, 27);
-            this.pr_colorboxgw.TabIndex = 203;
-            this.pr_colorboxgw.Tag = "1";
+            this.pr_cartongw.AutoSize = true;
+            this.pr_cartongw.CutLength = null;
+            this.pr_cartongw.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pr_cartongw.Location = new System.Drawing.Point(668, 129);
+            this.pr_cartongw.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_cartongw.Name = "pr_cartongw";
+            this.pr_cartongw.Size = new System.Drawing.Size(0, 21);
+            this.pr_cartongw.TabIndex = 203;
+            this.pr_cartongw.Tag = "1";
             // 
             // pr_colorboxgw_label
             // 
             this.pr_colorboxgw_label.AutoSize = true;
             this.pr_colorboxgw_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_colorboxgw_label.Location = new System.Drawing.Point(778, 161);
-            this.pr_colorboxgw_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_colorboxgw_label.Location = new System.Drawing.Point(584, 129);
             this.pr_colorboxgw_label.Name = "pr_colorboxgw_label";
-            this.pr_colorboxgw_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_colorboxgw_label.Size = new System.Drawing.Size(74, 21);
             this.pr_colorboxgw_label.TabIndex = 202;
             this.pr_colorboxgw_label.Text = "标准重量";
             // 
+            // ma_code
+            // 
+            this.ma_code.AutoSize = true;
+            this.ma_code.CutLength = null;
+            this.ma_code.Location = new System.Drawing.Point(757, 11);
+            this.ma_code.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Size = new System.Drawing.Size(0, 12);
+            this.ma_code.TabIndex = 204;
+            this.ma_code.Visible = false;
+            // 
+            // pr_code
+            // 
+            this.pr_code.AutoSize = true;
+            this.pr_code.CutLength = null;
+            this.pr_code.Location = new System.Drawing.Point(612, 11);
+            this.pr_code.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pr_code.Name = "pr_code";
+            this.pr_code.Size = new System.Drawing.Size(0, 12);
+            this.pr_code.TabIndex = 205;
+            this.pr_code.Visible = false;
+            // 
             // Make_PalletWightCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1325, 690);
-            this.Controls.Add(this.pr_colorboxgw);
+            this.ClientSize = new System.Drawing.Size(994, 552);
+            this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.pr_cartongw);
             this.Controls.Add(this.pr_colorboxgw_label);
             this.Controls.Add(this.StopWeight);
             this.Controls.Add(this.StartWeight);
@@ -855,17 +842,16 @@
             this.Controls.Add(this.pa_totalqty_label);
             this.Controls.Add(this.pa_outboxcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_PalletWightCollection";
-            this.Tag = "Make!BigBoxCollection";
+            this.Tag = "Make!PalletWightCollection";
             this.Text = " ";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_PalletCollection_FormClosing);
             this.Load += new System.EventHandler(this.Make_PalletCollection_Load);
             this.SizeChanged += new System.EventHandler(this.Make_PalletCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).EndInit();
-            this.panel4.ResumeLayout(false);
+            this.panel4.ResumeLayout(true);
             this.panel4.PerformLayout();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -925,7 +911,9 @@
         private System.Windows.Forms.Label BaudRate;
         private CustomControl.ButtonUtil.NormalButton StopWeight;
         private CustomControl.ButtonUtil.NormalButton StartWeight;
-        private CustomControl.ValueLabel.ValueLabel pr_colorboxgw;
+        private CustomControl.ValueLabel.ValueLabel pr_cartongw;
         private System.Windows.Forms.Label pr_colorboxgw_label;
+        private CustomControl.ValueLabel.ValueLabel ma_code;
+        private CustomControl.ValueLabel.ValueLabel pr_code;
     }
 }

+ 160 - 9
UAS-MES/FunctionCode/Make/Make_PalletWightCollection.cs

@@ -4,6 +4,8 @@ using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
+using System.IO;
+using System.IO.Ports;
 using System.Linq;
 using System.Text;
 using System.Threading;
@@ -27,29 +29,45 @@ namespace UAS_MES.Make
 
         Make_NewPallet NewPallet;
 
+        //称量的标准重量
+        Double Weight;
+        //最大重量
+        Double MaxWeight;
+        //最小重量
+        Double MinWeight;
+
+        //true的时候表示从串口读取数据
+        bool GetData = true;
+
         string pa_nextstep = "";
         //箱类型
         string pa_type;
-        //物料编号
-        string pr_code;
+
         //Package表的主键
         string pa_id;
 
+        string PR_CHECKCARTONW = "0";
+
         ApplicationClass lbl;
 
         Document doc;
 
+        Thread InitPrint;
+
         Thread thread;
 
         string ErrorMessage = "";
 
+        //创建串口实例
+        SerialPort serialPort1 = new SerialPort();
+
         public Make_PalletWightCollection()
         {
             InitializeComponent();
         }
 
         //创建打印进程
-        private void NewPrint()
+        private void InPrint()
         {
             try
             {
@@ -65,8 +83,8 @@ namespace UAS_MES.Make
         private void Make_PalletCollection_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            thread = new Thread(NewPrint);
-            SetLoadingWindow stw = new SetLoadingWindow(thread, "初始化打印程序");
+            InitPrint = new Thread(InPrint);
+            SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
             OutBoxLength.Text = BaseUtil.GetCacheData("PalletLength").ToString();
@@ -120,6 +138,69 @@ namespace UAS_MES.Make
                         OperateResult.AppendText(">>箱号不能为空\n", Color.Red);
                         return;
                     }
+                    //根据箱号查询表单数据
+                    sql.Clear();
+                    sql.Append("select pa_totalqty,ma_code,ma_qty,ma_salecode,PA_STANDARDQTY,PA_CURRENTQTY,pr_detail,pr_cartonunit,pr_code,pr_cartongw,");
+                    sql.Append("pr_cartonmaxw,pr_cartonminw,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype from package left join packagedetail ");
+                    sql.Append("on pa_id=pd_paid left join makeserial on ms_sncode=pd_barcode and ms_makecode=pa_makecode left join product on pr_code=pd_prodcode left join make on ma_code=pd_makecode ");
+                    sql.Append(" where pa_outboxcode='" + outboxcode.Text + "' and pa_nextstep='" + User.CurrentStepCode + "'");
+                    DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    //填充打印文件选项的DataGridView
+                    if (dt.Rows.Count > 0)
+                    {
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        string ErrorMessage;
+                        //重量的临时变量
+                        PR_CHECKCARTONW = dt.Rows[0]["PR_CHECKCARTONW"].ToString();
+                        string _weight = dt.Rows[0]["pr_cartongw"].ToString();
+                        string _maxweight = dt.Rows[0]["pr_cartonmaxw"].ToString();
+                        string _minweight = dt.Rows[0]["pr_cartonminw"].ToString();
+                        string pa_pr_cartonunit = dt.Rows[0]["pr_cartonunit"].ToString();
+                        string PA_STANDARDQTY = dt.Rows[0]["PA_STANDARDQTY"].ToString();
+                        string PA_CURRENTQTY = dt.Rows[0]["PA_CURRENTQTY"].ToString();
+                        Weight = double.Parse(_weight == "" ? "0" : _weight);
+                        MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
+                        MinWeight = double.Parse(_minweight == "" ? "0" : _minweight);
+                        if (Weight - MinWeight == MaxWeight - Weight)
+                            pr_cartongw.Text = Weight + "±" + (MaxWeight - Weight) + dt.Rows[0]["pr_cartonunit"].ToString();
+                        else
+                            pr_cartongw.Text = MinWeight + "-" + MaxWeight + dt.Rows[0]["pr_cartonunit"].ToString();
+                        double ActualWeight = double.Parse(weight.Text == "" ? "0" : weight.Text.Replace("kg", "").Trim());
+                        //需要检查称重重量
+                        if (PR_CHECKCARTONW != "0" && PA_STANDARDQTY == PA_CURRENTQTY)
+                        {
+                            //称量合格或不合格都记录重量
+                            if (ActualWeight >= MinWeight && ActualWeight <= MaxWeight && ActualWeight != 0)
+                            {
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量合格:" + weight.Text.Trim(), outboxcode.Text, "");
+                                LogicHandler.RecordProdWeight(outboxcode.Text, "CARTON", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
+                                OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测合格\n", Color.Green);
+                            }
+                            else
+                            {
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量不合格:" + weight.Text.Trim(), outboxcode.Text, "");
+                                LogicHandler.RecordProdWeight(outboxcode.Text, "CARTON", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
+                                OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测未通过\n", Color.Red, outboxcode);
+                                return;
+                            }
+                        }
+                        else
+                        {
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量完成:" + weight.Text.Trim(), outboxcode.Text, "");
+                            LogicHandler.RecordProdWeight(outboxcode.Text, "CARTON", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
+                        }
+                        OperateResult.AppendText(">>箱号" + outboxcode.Text + "称重完成\n", Color.Green);
+                        if (LogicHandler.CartonBoxStepPass(ma_code.Text, User.UserSourceCode, outboxcode.Text, User.UserCode, "卡通箱:" + outboxcode.Text + "整箱过站", out ErrorMessage))
+                        {
+                            dh.UpdateByCondition("package", "pa_printcount= nvl(pa_printcount,0)+1,pa_weight='" + ActualWeight + "',pa_status=1,pa_packageqty=pa_currentqty,pa_totalqty=pa_currentqty", "pa_outboxcode='" + outboxcode.Text + "'");
+                            dh.UpdateByCondition("package", "pa_nextstep='" + dh.getFieldDataByCondition("packagedetail left join makeserial on ms_sncode=pd_barcode and ms_makecode=pd_makecode", "max(ms_nextstepcode)", "pd_outboxcode='" + outboxcode.Text + "'").ToString() + "' ,PA_CURRENTSTEP = '' ", "pa_outboxcode='" + outboxcode.Text + "'");
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                        }
+                    }
+                    else OperateResult.AppendText(">>箱号" + outboxcode.Text + "当前执行工序不是" + User.CurrentStepCode + "\n", Color.Black);
                     sql.Clear();
                     sql.Append("select nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_makecode pd_makecode,nvl(pa_downstatus,0)pa_downstatus,pa_salecode pd_salecode,pr_packrule,pa_id,pa_prodcode pd_prodcode,pa_status,pa_mothercode,pa_nextstep  ");
                     sql.Append("from packagedetail left join package on pd_paid=pa_id left join product on pd_prodcode=pr_code where pd_outboxcode='" + outboxcode.Text + "'");
@@ -295,7 +376,7 @@ namespace UAS_MES.Make
                                     if (pa_standardqty.Text == pa_totalqty.Text)
                                     {
                                         dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
-                                        OperateResult.AppendText("栈板" + pa_outboxcode.Text + "已装满,封栈板成功");
+                                        OperateResult.AppendText("栈板" + pa_outboxcode.Text + "已装满,封栈板成功\n");
                                         pa_outboxcode.Focus();
                                         pa_outboxcode.SelectAll();
                                         if (AutoPrint.Checked)
@@ -323,10 +404,10 @@ namespace UAS_MES.Make
                         sql.Clear();
                         sql.Append("select nvl(pa_iostatus,0)pa_iostatus from packagedetail left join package on pa_id =pd_paid where pd_outboxcode='" + pa_outboxcode.Text + "' ");
                         sql.Append("and pd_innerboxcode='" + outboxcode.Text + "'");
-                        DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                        if (dt.Rows.Count > 0)
+                        DataTable dta = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        if (dta.Rows.Count > 0)
                         {
-                            if (dt.Rows[0]["pa_iostatus"].ToString() == "0")
+                            if (dta.Rows[0]["pa_iostatus"].ToString() == "0")
                             {
                                 List<string> SQLS = new List<string>();
                                 //删除明细
@@ -467,6 +548,16 @@ namespace UAS_MES.Make
         private void Make_PalletCollection_FormClosing(object sender, FormClosingEventArgs e)
         {
             BaseUtil.ClosePrint(lbl);
+            StopWeight.PerformClick();
+            InitPrint.Abort();
+            if (serialPort1.IsOpen)
+            {
+                GetData = false;
+                serialPort1.Close();
+                SystemInf.OpenPort.Remove(serialPort1.PortName);
+                thread.Interrupt();
+            }
+            //thread.Abort();
         }
 
         private void Packing_Click(object sender, EventArgs e)
@@ -609,5 +700,65 @@ namespace UAS_MES.Make
                 pa_outboxcode.Focus();
             }
         }
+
+        private void StartWeight_Click(object sender, EventArgs e)
+        {
+            thread = new Thread(getSerialData);
+            try
+            {
+                GetData = true;
+                serialPort1.PortName = this.ComList.Text;
+                serialPort1.BaudRate = int.Parse(BaudRate.Text);
+                serialPort1.Open();
+                thread.Start();
+            }
+            catch (Exception mes)
+            {
+                if (BaudRate.Text == "" || ComList.Text == "")
+                    OperateResult.AppendText(">>请先在电子秤调试界面维护波特率和串口\n", Color.Red);
+                else
+                    OperateResult.AppendText(">>" + mes.Message + "\n", Color.Red);
+            }
+        }
+
+
+        private void getSerialData()
+        {
+            if (serialPort1.IsOpen)
+            {
+                if (!SystemInf.OpenPort.Contains(serialPort1.PortName))
+                {
+                    SystemInf.OpenPort.Add(serialPort1.PortName);
+                    try
+                    {
+                        while (GetData)
+                        {
+                            try
+                            {
+                                weight.Text = serialPort1.ReadLine();
+                                //weight.Text = Regex.Replace(serialPort1.ReadLine(), "\\D+", "");
+                            }
+                            catch (Exception)
+                            {
+                                GetData = false;
+                            }
+                        }
+                    }
+                    catch (IOException ex) { OperateResult.AppendText(">>" + ex.Message + "\n", Color.Red, outboxcode); }
+                }
+                else OperateResult.AppendText(">>端口已被占用,请关闭其他窗口\n", Color.Red, outboxcode);
+            }
+        }
+
+        private void StopWeight_Click(object sender, EventArgs e)
+        {
+            if (serialPort1.IsOpen)
+            {
+                GetData = false;
+                serialPort1.Close();
+                SystemInf.OpenPort.Remove(serialPort1.PortName);
+                thread.Abort();
+            }
+        }
     }
 }

+ 1 - 1
UAS-MES/PublicMethod/Print.cs

@@ -148,7 +148,7 @@ namespace UAS_MES.PublicMethod
             //查询模板对应的取值SQL和参数名称
             dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql from label left join LABELPARAMETER on la_id=lp_laid where la_id='" + LaID + "'", "select");
             StringBuilder sb = new StringBuilder();
-            if (PrintFile == null)
+            if (!PrintFile.Exists)
             {
                 MessageBox.Show("打印文件不存在");
                 return false;