소스 검색

BUG调整

callm 3 년 전
부모
커밋
b10c350ada

+ 16 - 9
UAS-出货标签管理(泽天)/CustomControl/GroupBoxWithBorder.cs

@@ -13,14 +13,21 @@ namespace UAS_LabelMachine.CustomControl.GroupBoxWithBorder
 
         private void groupBox1_Paint(object sender, PaintEventArgs e)
         {
-            e.Graphics.Clear(this.BackColor);
-            e.Graphics.DrawString(this.Text, this.Font, Brushes.Black, 10, 1);
-            Pen LineColor = Pens.Gray;
-            e.Graphics.DrawLine(LineColor, 1, 7, 8, 7);
-            e.Graphics.DrawLine(LineColor, e.Graphics.MeasureString(this.Text, this.Font).Width + 8, 7, this.Width - 2, 7);
-            e.Graphics.DrawLine(LineColor, 1, 7, 1, this.Height - 2);
-            e.Graphics.DrawLine(LineColor, 1, this.Height - 2, this.Width - 2, this.Height - 2);
-            e.Graphics.DrawLine(LineColor, this.Width - 2, 7, this.Width - 2, this.Height - 2);
+            try
+            {
+                e.Graphics.Clear(this.BackColor);
+                e.Graphics.DrawString(this.Text, this.Font, Brushes.Black, 10, 1);
+                Pen LineColor = Pens.Gray;
+                e.Graphics.DrawLine(LineColor, 1, 7, 8, 7);
+                e.Graphics.DrawLine(LineColor, e.Graphics.MeasureString(this.Text, this.Font).Width + 8, 7, this.Width - 2, 7);
+                e.Graphics.DrawLine(LineColor, 1, 7, 1, this.Height - 2);
+                e.Graphics.DrawLine(LineColor, 1, this.Height - 2, this.Width - 2, this.Height - 2);
+                e.Graphics.DrawLine(LineColor, this.Width - 2, 7, this.Width - 2, this.Height - 2);
+            }
+            catch (System.Exception)
+            {
+            
+            }
         }
     }
-}
+}

+ 51 - 36
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs

@@ -79,6 +79,7 @@
             this.同步出货数据ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.贴标机参数设置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.贴标角度设置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.断开贴标机ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.MenuManage = new System.Windows.Forms.Button();
             this.Connect = new System.Windows.Forms.Button();
             this.MixPrCode = new System.Windows.Forms.CheckBox();
@@ -212,6 +213,7 @@
             this.MidLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.MidLabelCombox = new System.Windows.Forms.ComboBox();
             this.OutBoxLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.AutoPrintOutBox = new System.Windows.Forms.CheckBox();
             this.AutoSetOutBox = new System.Windows.Forms.CheckBox();
             this.DiffDetno = new System.Windows.Forms.CheckBox();
             this.DiffCPN = new System.Windows.Forms.CheckBox();
@@ -639,9 +641,10 @@
             this.重置单据ToolStripMenuItem,
             this.同步出货数据ToolStripMenuItem,
             this.贴标机参数设置ToolStripMenuItem,
-            this.贴标角度设置ToolStripMenuItem});
+            this.贴标角度设置ToolStripMenuItem,
+            this.断开贴标机ToolStripMenuItem});
             this.ShowMenu_Total.Name = "ShowMenu";
-            this.ShowMenu_Total.Size = new System.Drawing.Size(257, 364);
+            this.ShowMenu_Total.Size = new System.Drawing.Size(257, 400);
             this.ShowMenu_Total.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ShowMenu_Total_ItemClicked);
             // 
             // 清除明细ToolStripMenuItem
@@ -704,6 +707,12 @@
             this.贴标角度设置ToolStripMenuItem.Size = new System.Drawing.Size(256, 36);
             this.贴标角度设置ToolStripMenuItem.Text = "贴标角度设置";
             // 
+            // 断开贴标机ToolStripMenuItem
+            // 
+            this.断开贴标机ToolStripMenuItem.Name = "断开贴标机ToolStripMenuItem";
+            this.断开贴标机ToolStripMenuItem.Size = new System.Drawing.Size(256, 36);
+            this.断开贴标机ToolStripMenuItem.Text = "断开贴标机";
+            // 
             // MenuManage
             // 
             this.MenuManage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1208,12 +1217,11 @@
             this.Weight.AutoSize = true;
             this.Weight.Font = new System.Drawing.Font("微软雅黑", 30F);
             this.Weight.ForeColor = System.Drawing.Color.Red;
-            this.Weight.Location = new System.Drawing.Point(33, 81);
+            this.Weight.Location = new System.Drawing.Point(36, 84);
             this.Weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.Weight.Name = "Weight";
             this.Weight.Size = new System.Drawing.Size(0, 104);
             this.Weight.TabIndex = 113;
-          
             // 
             // DCCheck
             // 
@@ -1453,7 +1461,7 @@
             // 
             this.label18.AutoSize = true;
             this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label18.Location = new System.Drawing.Point(133, 249);
+            this.label18.Location = new System.Drawing.Point(136, 252);
             this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(24, 31);
@@ -1488,7 +1496,7 @@
             // 
             this.label16.AutoSize = true;
             this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label16.Location = new System.Drawing.Point(130, 122);
+            this.label16.Location = new System.Drawing.Point(133, 125);
             this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(24, 31);
@@ -1523,7 +1531,7 @@
             // 
             this.label12.AutoSize = true;
             this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label12.Location = new System.Drawing.Point(33, 197);
+            this.label12.Location = new System.Drawing.Point(36, 200);
             this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(110, 31);
@@ -1534,7 +1542,7 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(29, 73);
+            this.label7.Location = new System.Drawing.Point(32, 76);
             this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(110, 31);
@@ -1863,7 +1871,7 @@
             // 
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(33, 293);
+            this.label14.Location = new System.Drawing.Point(36, 296);
             this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label14.Name = "label14";
             this.label14.Size = new System.Drawing.Size(155, 36);
@@ -1883,7 +1891,7 @@
             // 
             this.label13.AutoSize = true;
             this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label13.Location = new System.Drawing.Point(33, 237);
+            this.label13.Location = new System.Drawing.Point(36, 240);
             this.label13.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label13.Name = "label13";
             this.label13.Size = new System.Drawing.Size(155, 36);
@@ -1913,7 +1921,7 @@
             // 
             this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrint.Location = new System.Drawing.Point(17, 354);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(64, 354);
             this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
             this.SingleLabelPrint.Size = new System.Drawing.Size(136, 52);
@@ -1925,10 +1933,8 @@
             // SingleLabelAutoPrint
             // 
             this.SingleLabelAutoPrint.AutoSize = true;
-            this.SingleLabelAutoPrint.Checked = true;
-            this.SingleLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Unchecked;
             this.SingleLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(17, 183);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(20, 186);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
@@ -1973,10 +1979,8 @@
             // AutoPrintMidBox
             // 
             this.AutoPrintMidBox.AutoSize = true;
-            this.AutoPrintMidBox.Checked = true;
-            this.AutoPrintMidBox.CheckState = System.Windows.Forms.CheckState.Unchecked;
             this.AutoPrintMidBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoPrintMidBox.Location = new System.Drawing.Point(18, 370);
+            this.AutoPrintMidBox.Location = new System.Drawing.Point(21, 373);
             this.AutoPrintMidBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AutoPrintMidBox.Name = "AutoPrintMidBox";
             this.AutoPrintMidBox.Size = new System.Drawing.Size(166, 35);
@@ -1987,10 +1991,8 @@
             // CurrentRowOnly
             // 
             this.CurrentRowOnly.AutoSize = true;
-            this.CurrentRowOnly.Checked = true;
-            this.CurrentRowOnly.CheckState = System.Windows.Forms.CheckState.Unchecked;
             this.CurrentRowOnly.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CurrentRowOnly.Location = new System.Drawing.Point(171, 193);
+            this.CurrentRowOnly.Location = new System.Drawing.Point(174, 196);
             this.CurrentRowOnly.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.CurrentRowOnly.Name = "CurrentRowOnly";
             this.CurrentRowOnly.Size = new System.Drawing.Size(166, 35);
@@ -2016,7 +2018,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(26, 249);
+            this.label2.Location = new System.Drawing.Point(29, 252);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(62, 31);
@@ -2040,7 +2042,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(26, 313);
+            this.label5.Location = new System.Drawing.Point(29, 316);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(62, 31);
@@ -2071,10 +2073,8 @@
             // MidLabelAutoPrint
             // 
             this.MidLabelAutoPrint.AutoSize = true;
-            this.MidLabelAutoPrint.Checked = true;
-            this.MidLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Unchecked;
             this.MidLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelAutoPrint.Location = new System.Drawing.Point(17, 191);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(20, 194);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(142, 35);
@@ -2096,6 +2096,7 @@
             // 
             // OutBoxLabel
             // 
+            this.OutBoxLabel.Controls.Add(this.AutoPrintOutBox);
             this.OutBoxLabel.Controls.Add(this.AutoSetOutBox);
             this.OutBoxLabel.Controls.Add(this.DiffDetno);
             this.OutBoxLabel.Controls.Add(this.DiffCPN);
@@ -2123,11 +2124,23 @@
             this.OutBoxLabel.TabStop = false;
             this.OutBoxLabel.Text = "外箱标签";
             // 
+            // AutoPrintOutBox
+            // 
+            this.AutoPrintOutBox.AutoSize = true;
+            this.AutoPrintOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.AutoPrintOutBox.Location = new System.Drawing.Point(155, 175);
+            this.AutoPrintOutBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.AutoPrintOutBox.Name = "AutoPrintOutBox";
+            this.AutoPrintOutBox.Size = new System.Drawing.Size(118, 35);
+            this.AutoPrintOutBox.TabIndex = 101;
+            this.AutoPrintOutBox.Text = "自动打";
+            this.AutoPrintOutBox.UseVisualStyleBackColor = true;
+            // 
             // AutoSetOutBox
             // 
             this.AutoSetOutBox.AutoSize = true;
             this.AutoSetOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoSetOutBox.Location = new System.Drawing.Point(21, 227);
+            this.AutoSetOutBox.Location = new System.Drawing.Point(12, 215);
             this.AutoSetOutBox.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AutoSetOutBox.Name = "AutoSetOutBox";
             this.AutoSetOutBox.Size = new System.Drawing.Size(142, 35);
@@ -2139,7 +2152,7 @@
             // 
             this.DiffDetno.AutoSize = true;
             this.DiffDetno.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffDetno.Location = new System.Drawing.Point(269, 380);
+            this.DiffDetno.Location = new System.Drawing.Point(272, 383);
             this.DiffDetno.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffDetno.Name = "DiffDetno";
             this.DiffDetno.Size = new System.Drawing.Size(133, 34);
@@ -2151,7 +2164,7 @@
             // 
             this.DiffCPN.AutoSize = true;
             this.DiffCPN.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffCPN.Location = new System.Drawing.Point(269, 336);
+            this.DiffCPN.Location = new System.Drawing.Point(272, 339);
             this.DiffCPN.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffCPN.Name = "DiffCPN";
             this.DiffCPN.Size = new System.Drawing.Size(135, 34);
@@ -2163,7 +2176,7 @@
             // 
             this.BoxCount.AutoSize = true;
             this.BoxCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BoxCount.Location = new System.Drawing.Point(281, 393);
+            this.BoxCount.Location = new System.Drawing.Point(284, 396);
             this.BoxCount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.BoxCount.Name = "BoxCount";
             this.BoxCount.Size = new System.Drawing.Size(0, 31);
@@ -2173,7 +2186,7 @@
             // 
             this.DiffLotNo.AutoSize = true;
             this.DiffLotNo.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffLotNo.Location = new System.Drawing.Point(269, 288);
+            this.DiffLotNo.Location = new System.Drawing.Point(272, 291);
             this.DiffLotNo.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffLotNo.Name = "DiffLotNo";
             this.DiffLotNo.Size = new System.Drawing.Size(118, 34);
@@ -2185,7 +2198,7 @@
             // 
             this.DiffDC.AutoSize = true;
             this.DiffDC.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.DiffDC.Location = new System.Drawing.Point(269, 236);
+            this.DiffDC.Location = new System.Drawing.Point(272, 239);
             this.DiffDC.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.DiffDC.Name = "DiffDC";
             this.DiffDC.Size = new System.Drawing.Size(121, 34);
@@ -2197,7 +2210,7 @@
             // 
             this.OnlyOneRow.AutoSize = true;
             this.OnlyOneRow.Font = new System.Drawing.Font("微软雅黑", 8F);
-            this.OnlyOneRow.Location = new System.Drawing.Point(269, 188);
+            this.OnlyOneRow.Location = new System.Drawing.Point(272, 191);
             this.OnlyOneRow.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.OnlyOneRow.Name = "OnlyOneRow";
             this.OnlyOneRow.Size = new System.Drawing.Size(111, 34);
@@ -2209,7 +2222,7 @@
             // 
             this.AllLabel.AutoSize = true;
             this.AllLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AllLabel.Location = new System.Drawing.Point(21, 185);
+            this.AllLabel.Location = new System.Drawing.Point(12, 173);
             this.AllLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.AllLabel.Name = "AllLabel";
             this.AllLabel.Size = new System.Drawing.Size(142, 35);
@@ -2232,7 +2245,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(245, 33);
+            this.LogingOut.Location = new System.Drawing.Point(248, 36);
             this.LogingOut.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(82, 41);
@@ -2260,7 +2273,7 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(41, 323);
+            this.label10.Location = new System.Drawing.Point(44, 326);
             this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(62, 31);
@@ -2271,7 +2284,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(41, 274);
+            this.label6.Location = new System.Drawing.Point(44, 277);
             this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(62, 31);
@@ -2612,5 +2625,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_remark2;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
+        private System.Windows.Forms.ToolStripMenuItem 断开贴标机ToolStripMenuItem;
+        private System.Windows.Forms.CheckBox AutoPrintOutBox;
     }
 }

+ 196 - 178
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -431,6 +431,7 @@ namespace UAS_LabelMachine
                     }
                     if (OutBoxNum.Items.Count > 2)
                         OutBoxNum.SelectedIndex = 2;
+                    BoxNum = LabelInfDataTable.Select("pib_outboxcode2='" + OutBoxNum.Text + "'").Length;
                 }
                 else
                 {
@@ -463,6 +464,7 @@ namespace UAS_LabelMachine
                         }
                         if (OutBoxNum.Items.Count > 2)
                             OutBoxNum.SelectedIndex = 2;
+                        BoxNum = LabelInfDataTable.Select("pib_outboxcode2='" + OutBoxNum.Text + "'").Length;
                     }
                     else
                     {
@@ -489,13 +491,16 @@ namespace UAS_LabelMachine
                 {
                     pib_outboxcode2 = OutBoxNum.Text;
                 }
-                if (BoxNum + CodeCount > OutboxCapacity.Value)
+                if (!AutoPrintOutBox.Checked)
                 {
-                    string close = MessageBox.Show(this.ParentForm, "箱号【" + OutBoxNum.Text + "】后超数量为" + (BoxNum + CodeCount) + ",超出容量" + OutboxCapacity.Value + ",是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
-                    if (close != "Yes")
+                    if (BoxNum + CodeCount > OutboxCapacity.Value)
                     {
-                        Input.SelectAll();
-                        return;
+                        string close = MessageBox.Show(this.ParentForm, "箱号【" + OutBoxNum.Text + "】后超数量为" + (BoxNum + CodeCount) + ",超出容量" + OutboxCapacity.Value + ",是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                        if (close != "Yes")
+                        {
+                            Input.SelectAll();
+                            return;
+                        }
                     }
                 }
             }
@@ -667,6 +672,13 @@ namespace UAS_LabelMachine
                     }
                 }
             }
+            if (AutoPrintOutBox.Checked)
+            {
+                if (BoxNum + CodeCount >= OutboxCapacity.Value)
+                {
+                    OutBoxLabelPrint.PerformClick();
+                }
+            }
             GridPrcode.Refresh();
             if (!IsSum)
                 Input.Clear();
@@ -2539,6 +2551,11 @@ namespace UAS_LabelMachine
                     BaseUtil.SetFormCenter(ms);
                     ms.ShowDialog();
                     break;
+                case "断开贴标机":
+                    receiveClient.Close();
+                    sendClient.Close();
+                    resetClient.Close();
+                    break;
                 case "贴标角度设置":
                     if (pi_cardcode.Text != "")
                     {
@@ -2649,48 +2666,41 @@ namespace UAS_LabelMachine
         {
             while (IsOnline(receiveClient))
             {
-                //try
-                //{
-                //创建接收数据的字节流  
-                byte[] getData = new byte[1024];
-                //从网络流中读取数据  
-                ns.Read(getData, 0, getData.Length);
-                //将字节数组转换成文本形式  
-                string getMsg = Encoding.Default.GetString(getData);
-                if (getMsg.Contains("ReadId"))
-                {
-                    string msgStr = getMsg.Trim('\0').Replace("ReadId1|,|", "");
-                    if (!msgStr.Contains("三星"))
-                    {
-                        msgStr = Regex.Match(msgStr, @"[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+").Value;
-                        //设置索引和内容
-                        // msgStr = msgStr.Split(ps_split.ToCharArray()[0])[dataindex];
-                        Input.Text = msgStr;
-                        IsSum = false;
-                    }
-                    else
+                try
+                {
+                    //创建接收数据的字节流  
+                    byte[] getData = new byte[1024];
+                    //从网络流中读取数据  
+                    ns.Read(getData, 0, getData.Length);
+                    //将字节数组转换成文本形式  
+                    string getMsg = Encoding.Default.GetString(getData);
+                    if (getMsg.Contains("ReadId"))
                     {
-                        IsSum = true;
-                    }
-                    Input_KeyDown(Input, new KeyEventArgs(Keys.Enter));
-                }
-                //}
-                //catch (ThreadAbortException)
-                //{
-                //    //捕捉到线程被终止异常则表示是人为的断开TCP连接  
-                //    //不弹出错误提示
-                //    break;
-                //}
-                //catch (Exception e)
-                //{
-                //    //接受消息发生异常  
-                //    MessageBox.Show(e.Message);
-                //    receiveClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|NG|,|Y"));
-                //    //并释放相关资源  
-                //    //if (ns != null)
-                //    //    ns.Dispose();
-                //    //break;
-                //}
+                        string msgStr = getMsg.Trim('\0').Replace("ReadId1|,|", "");
+                        if (!msgStr.Contains("三星"))
+                        {
+                            msgStr = Regex.Match(msgStr, @"[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+").Value;
+                            //设置索引和内容
+                            // msgStr = msgStr.Split(ps_split.ToCharArray()[0])[dataindex];
+                            Input.Text = msgStr;
+                            IsSum = false;
+                        }
+                        else
+                        {
+                            IsSum = true;
+                        }
+                        Input_KeyDown(Input, new KeyEventArgs(Keys.Enter));
+                    }
+                }
+                catch (Exception e)
+                {
+                    //接受消息发生异常  
+                    break;
+                    //并释放相关资源  
+                    //if (ns != null)
+                    //    ns.Dispose();
+                    //break;
+                }
             }
             MessageBox.Show("网络中断");
         }
@@ -2699,170 +2709,169 @@ namespace UAS_LabelMachine
         {
             while (IsOnline(sendClient))
             {
-                //try
-                //{
-                //创建接收数据的字节流  
-                byte[] getData = new byte[1024];
-                //从网络流中读取数据  z
-                ns1.Read(getData, 0, getData.Length);
-                //将字节数组转换成文本形式  
-                string getMsg = Encoding.Default.GetString(getData);
-                if (getMsg.Contains("ReadId3"))
-                {
-                    string msgStr = getMsg.Trim('\0').Replace("ReadId3|,|", "");
-                    string temp = Regex.Match(msgStr, @"[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+").Value;
-                    string pr_code = "";
-                    //如果不存在原厂标签的话
-                    if (temp != "")
-                    {
-                        pr_code = temp.Split('*')[0];
-                    }
-                    //如果允许混料的话
-                    bool OutBoxSplit = false;
-                    if (PassSixTenCount > OutboxCapacity.Value)
-                    {
-                        string close = MessageBox.Show(this.ParentForm, "此箱号采集后超数量,是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly).ToString();
-                        if (close == "Yes")
-                        {
-                            OutBoxSplit = true;
-                            PassSixTenCount = 1;
-                            //sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|0"));
-                        }
-                        else
-                        {
-
-                        }
-                    }
-                    if (MixPrCode.Checked)
-                    {
-                        bool SendLast = false;
-                        for (int i = 0; i < GridPrcode.Rows.Count; i++)
-                        {
-                            //获取复核的数据
-                            int checknum = int.Parse(GridPrcode.Rows[i].Cells["checknum"].Value.ToString());
-                            double outqty = double.Parse(GridPrcode.Rows[i].Cells["pd_outqty"].Value.ToString());
-                            double zxbzs = double.Parse(GridPrcode.Rows[i].Cells["PJD_ZXBZS_USER"].Value.ToString());
-                            string Prcode = GridPrcode.Rows[i].Cells["pd_prodcode"].Value.ToString();
-                            string pdno = GridPrcode.Rows[i].Cells["pd_pdno"].Value.ToString();
-                            if (checknum < outqty / zxbzs)
-                            {
-                                checknum = checknum + 1;
-                                GridPrcode.Rows[i].Cells["checknum"].Value = checknum;
-                                dh.ExecuteSql("update CS$InoutPrcode set checknum=nvl(checknum,0)+1 where pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + pdno + "' and combined=" + combined, "update");
-                                if (i == GridPrcode.Rows.Count - 1 && checknum == outqty / zxbzs)
-                                    SendLast = true;
-                                break;
-                            }
-                        }
-                        if (PassTenCount == MidboxCapacity.Value)
+                try
+                {
+                    //创建接收数据的字节流  
+                    byte[] getData = new byte[1024];
+                    //从网络流中读取数据  z
+                    ns1.Read(getData, 0, getData.Length);
+                    //将字节数组转换成文本形式  
+                    string getMsg = Encoding.Default.GetString(getData);
+                    if (getMsg.Contains("ReadId3"))
+                    {
+                        string msgStr = getMsg.Trim('\0').Replace("ReadId3|,|", "");
+                        string temp = Regex.Match(msgStr, @"[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+\*[-{0,5}/{0,5}.{0,5}0-9A-Za-z]+").Value;
+                        string pr_code = "";
+                        //如果不存在原厂标签的话
+                        if (temp != "")
                         {
-                            sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|1"));
-                            PassTenCount = 0;
+                            pr_code = temp.Split('*')[0];
                         }
-                        else
+                        //如果允许混料的话
+                        bool OutBoxSplit = false;
+                        if (PassSixTenCount > OutboxCapacity.Value)
                         {
-                            if (SendLast)
+                            string close = MessageBox.Show(this.ParentForm, "此箱号采集后超数量,是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly).ToString();
+                            if (close == "Yes")
                             {
-                                sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|1"));
-                                string close = MessageBox.Show("采集完此行数据,是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly).ToString();
-                                if (close == "Yes")
-                                {
-                                }
-                                else
-                                {
-
-                                }
+                                OutBoxSplit = true;
+                                PassSixTenCount = 1;
+                                //sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|0"));
                             }
                             else
                             {
-                                if (!OutBoxSplit)
-                                    sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|0"));
+
                             }
                         }
-                    }
-                    else
-                    {
-                        bool SendLast = false;
-                        for (int i = 0; i < GridPrcode.Rows.Count; i++)
+                        if (MixPrCode.Checked)
                         {
-                            //获取复核的数据
-                            int checknum = int.Parse(GridPrcode.Rows[i].Cells["checknum"].Value.ToString());
-                            double outqty = double.Parse(GridPrcode.Rows[i].Cells["pd_outqty"].Value.ToString());
-                            double zxbzs = double.Parse(GridPrcode.Rows[i].Cells["PJD_ZXBZS_USER"].Value.ToString());
-                            string Prcode = GridPrcode.Rows[i].Cells["pd_prodcode"].Value.ToString();
-                            string pdno = GridPrcode.Rows[i].Cells["pd_pdno"].Value.ToString();
-                            string SelectPrCode = GridPrcode.Rows[MachineCollectRowIndex].Cells["pd_prodcode"].Value.ToString();
-                            if ((MachineCollectRowIndex == i && SelectPrCode == pr_code) || ((pr_code == Prcode || pr_code == "") && SelectPrCode != pr_code) && checknum < outqty / zxbzs)
+                            bool SendLast = false;
+                            for (int i = 0; i < GridPrcode.Rows.Count; i++)
                             {
-                                checknum = checknum + 1;
-                                GridPrcode.Rows[i].Cells["checknum"].Value = checknum;
+                                //获取复核的数据
+                                int checknum = int.Parse(GridPrcode.Rows[i].Cells["checknum"].Value.ToString());
+                                double outqty = double.Parse(GridPrcode.Rows[i].Cells["pd_outqty"].Value.ToString());
+                                double zxbzs = double.Parse(GridPrcode.Rows[i].Cells["PJD_ZXBZS_USER"].Value.ToString());
+                                string Prcode = GridPrcode.Rows[i].Cells["pd_prodcode"].Value.ToString();
+                                string pdno = GridPrcode.Rows[i].Cells["pd_pdno"].Value.ToString();
                                 if (checknum < outqty / zxbzs)
                                 {
+                                    checknum = checknum + 1;
+                                    GridPrcode.Rows[i].Cells["checknum"].Value = checknum;
                                     dh.ExecuteSql("update CS$InoutPrcode set checknum=nvl(checknum,0)+1 where pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + pdno + "' and combined=" + combined, "update");
+                                    if (i == GridPrcode.Rows.Count - 1 && checknum == outqty / zxbzs)
+                                        SendLast = true;
+                                    break;
                                 }
-                                else if (checknum == outqty / zxbzs)
+                            }
+                            if (PassTenCount == MidboxCapacity.Value)
+                            {
+                                sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|1"));
+                                PassTenCount = 0;
+                            }
+                            else
+                            {
+                                if (SendLast)
                                 {
-                                    dh.ExecuteSql("update CS$InoutPrcode set checknum=nvl(checknum,0)+1 where pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + pdno + "' and combined=" + combined, "update");
                                     sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|1"));
-                                    checknum = 0;
-                                    SendLast = true;
-                                    PassTenCount = 0;
                                     string close = MessageBox.Show("采集完此行数据,是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly).ToString();
                                     if (close == "Yes")
                                     {
-
                                     }
                                     else
                                     {
 
                                     }
                                 }
-                                break;
+                                else
+                                {
+                                    if (!OutBoxSplit)
+                                        sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|0"));
+                                }
                             }
                         }
-                        //达到了中盒容量之后
-                        if (PassTenCount == MidboxCapacity.Value)
-                        {
-                            sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|1"));
-                            PassTenCount = 0;
-                        }
                         else
                         {
-                            //如果发送了最后一盒,则不发送继续堆叠的指令 或者需要分盒的时候
-                            if ((!SendLast && !OutBoxSplit) || OutBoxSplit)
+                            bool SendLast = false;
+                            for (int i = 0; i < GridPrcode.Rows.Count; i++)
                             {
-                                sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|0"));
+                                //获取复核的数据
+                                int checknum = int.Parse(GridPrcode.Rows[i].Cells["checknum"].Value.ToString());
+                                double outqty = double.Parse(GridPrcode.Rows[i].Cells["pd_outqty"].Value.ToString());
+                                double zxbzs = double.Parse(GridPrcode.Rows[i].Cells["PJD_ZXBZS_USER"].Value.ToString());
+                                string Prcode = GridPrcode.Rows[i].Cells["pd_prodcode"].Value.ToString();
+                                string pdno = GridPrcode.Rows[i].Cells["pd_pdno"].Value.ToString();
+                                string SelectPrCode = GridPrcode.Rows[MachineCollectRowIndex].Cells["pd_prodcode"].Value.ToString();
+                                if ((MachineCollectRowIndex == i && SelectPrCode == pr_code) || ((pr_code == Prcode || pr_code == "") && SelectPrCode != pr_code) && checknum < outqty / zxbzs)
+                                {
+                                    checknum = checknum + 1;
+                                    GridPrcode.Rows[i].Cells["checknum"].Value = checknum;
+                                    if (checknum < outqty / zxbzs)
+                                    {
+                                        dh.ExecuteSql("update CS$InoutPrcode set checknum=nvl(checknum,0)+1 where pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + pdno + "' and combined=" + combined, "update");
+                                    }
+                                    else if (checknum == outqty / zxbzs)
+                                    {
+                                        dh.ExecuteSql("update CS$InoutPrcode set checknum=nvl(checknum,0)+1 where pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + pdno + "' and combined=" + combined, "update");
+                                        sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|1"));
+                                        checknum = 0;
+                                        SendLast = true;
+                                        PassTenCount = 0;
+                                        string close = MessageBox.Show("采集完此行数据,是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly).ToString();
+                                        if (close == "Yes")
+                                        {
+
+                                        }
+                                        else
+                                        {
+
+                                        }
+                                    }
+                                    break;
+                                }
+                            }
+                            //达到了中盒容量之后
+                            if (PassTenCount == MidboxCapacity.Value)
+                            {
+                                sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|1"));
+                                PassTenCount = 0;
+                            }
+                            else
+                            {
+                                //如果发送了最后一盒,则不发送继续堆叠的指令 或者需要分盒的时候
+                                if ((!SendLast && !OutBoxSplit) || OutBoxSplit)
+                                {
+                                    sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId3|,|OK|,|0"));
+                                }
                             }
                         }
-                    }
-                    //中盒当前进度
-                    CurrentBoxNum.Value = PassTenCount;
-                    PassTenCount = PassTenCount + 1;
-                    //外箱当前进度
-                    CurrentOutBoxNum.Value = PassSixTenCount;
-                    PassSixTenCount = PassSixTenCount + 1;
-                }
-                //设置索引和内容
-                //msgStr = msgStr.Split(ps_split.ToCharArray()[0])[dataindex];
-                //Input.Text = msgStr;
-                //Input_KeyDown(Input, new KeyEventArgs(Keys.Enter));
-                //}
-                //catch (ThreadAbortException)
-                //{
-                //    //捕捉到线程被终止异常则表示是人为的断开TCP连接  
-                //    //不弹出错误提示
-                //    break;
-                //}
-                //catch (Exception e)
-                //{
-                //    //接受消息发生异常  
-                //    MessageBox.Show(e.Message+e.StackTrace);
-                //    sendClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|NG|,|Y"));
-                //    //并释放相关资源  
-                //    //if (ns != null)
-                //    //    ns.Dispose();
-                //    //break;
-                //}
+                        //中盒当前进度
+                        CurrentBoxNum.Value = PassTenCount;
+                        PassTenCount = PassTenCount + 1;
+                        //外箱当前进度
+                        CurrentOutBoxNum.Value = PassSixTenCount;
+                        PassSixTenCount = PassSixTenCount + 1;
+                    }
+                    //设置索引和内容
+                    //msgStr = msgStr.Split(ps_split.ToCharArray()[0])[dataindex];
+                    //Input.Text = msgStr;
+                    //Input_KeyDown(Input, new KeyEventArgs(Keys.Enter));
+                    //}
+                    //catch (ThreadAbortException)
+                    //{
+                    //    //捕捉到线程被终止异常则表示是人为的断开TCP连接  
+                    //    //不弹出错误提示
+                    //    break;
+                }
+                catch (Exception e)
+                {
+                    //接受消息发生异常  
+                    break;
+                    //并释放相关资源  
+                    //if (ns != null)
+                    //    ns.Dispose();
+                    //break;
+                }
             }
             MessageBox.Show("网络中断");
         }
@@ -2890,7 +2899,16 @@ namespace UAS_LabelMachine
         /// <returns></returns>
         public bool IsOnline(TcpClient c)
         {
-            return !((c.Client.Poll(1000, SelectMode.SelectRead) && (c.Client.Available == 0)) || !c.Client.Connected);
+
+            try
+            {
+                bool result = !((c.Client.Poll(1000, SelectMode.SelectRead) && (c.Client.Available == 0)) || !c.Client.Connected);
+                return result;
+            }
+            catch
+            {
+                return false;
+            }
         }
 
         private void CurrentBoxNum_ValueChanged(object sender, EventArgs e)

+ 3 - 3
UAS-出货标签管理(贸易版)/UAS_出货标签管理.cs

@@ -2781,8 +2781,8 @@ namespace UAS_LabelMachine
             for (int i = 0; i < LabelInf.Rows.Count; i++)
             {
                 string midcapa = LabelInf.Rows[i].Cells["pr_midboxcapacity_user"].Value.ToString();
-                //if (!(midcapa == "" || midcapa == "0"))
-                //{
+                if (!(midcapa == "" || midcapa == "0"))
+                {
                     //如果出现值为空或者0默认界面上填写的值
                     MidBoxCapacity.Value = decimal.Parse((midcapa == "" || midcapa == "0") ? MidBoxCapacity.Value.ToString() : midcapa);
                     LabelInf.Rows[i].Cells["pib_outboxcode1"].Value = BoxCode;
@@ -2803,7 +2803,7 @@ namespace UAS_LabelMachine
                             innerboxcount = innerboxcount + 1;
                         }
                     }
-                //}
+                }
             }
             sdh.BatchInsert("prodiobarcode", LabelInf.DataSource as DataTable);
             DataTable dt1 = (DataTable)sdh.ExecuteSql("select pib_id,pib_outboxcode1,pib_outboxcode2,pib_custmidboxcode,pib_custoutboxcode,pib_lotno,pib_datecode,pib_ifupload,pib_ifpick,pib_ifprint from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' ", "select");

+ 1 - 1
UAS_MES_ODLF/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -159,7 +159,7 @@ namespace UAS_MES_NEW.Make
                     // 获取工单归属工单下一工序是否正确
                     string status = "";
                     LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out ErrorMessage);
-                    if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
+                    if (LogicHandler.CheckStepSNAndMacode(oMakeCode==""? ma_code.Text:oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
                     {
                         //获取工单的其他信息
                         sql.Clear();

+ 2 - 2
UAS_MES_ODLF/FunctionCode/Query/Query_SpecialReport.cs

@@ -62,8 +62,8 @@ namespace UAS_MES_NEW.Query
                 dt.Columns.Add("扩展栏位2");
                 dt.Columns.Add("扩展栏位3");
                 dt.Columns.Add("备注");
-                string prefix = BeginMac.Text.Substring(0, 7);
-                string suffix = BeginMac.Text.Substring(7, 5);
+                string prefix = BeginMac.Text.Substring(0, 6);
+                string suffix = BeginMac.Text.Substring(6, 6);
                 int num = Int32.Parse(suffix, System.Globalization.NumberStyles.HexNumber);
                 for (int i = 0; i < int.Parse(Num.Text); i++)
                 {

+ 7 - 11
UAS_MES_PW/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs

@@ -159,14 +159,12 @@
             // 
             // weight
             // 
-            this.weight.AutoSize = true;
             this.weight.Font = new System.Drawing.Font("微软雅黑", 40F);
             this.weight.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
             this.weight.Location = new System.Drawing.Point(148, 100);
             this.weight.Name = "weight";
-            this.weight.Size = new System.Drawing.Size(249, 140);
+            this.weight.Size = new System.Drawing.Size(249, 148);
             this.weight.TabIndex = 43;
-            this.weight.Text = "";
             // 
             // label15
             // 
@@ -365,8 +363,6 @@
             // locksalecode
             // 
             this.locksalecode.AutoSize = true;
-            this.locksalecode.Checked = true;
-            this.locksalecode.CheckState = System.Windows.Forms.CheckState.Checked;
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.ForeColor = System.Drawing.Color.Red;
             this.locksalecode.Location = new System.Drawing.Point(820, 1122);
@@ -482,7 +478,7 @@
             // 
             this.ob_checkno_label.AutoSize = true;
             this.ob_checkno_label.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_checkno_label.Location = new System.Drawing.Point(47, 153);
+            this.ob_checkno_label.Location = new System.Drawing.Point(48, 154);
             this.ob_checkno_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_checkno_label.Name = "ob_checkno_label";
             this.ob_checkno_label.Size = new System.Drawing.Size(160, 46);
@@ -493,7 +489,7 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_checkno.Location = new System.Drawing.Point(235, 153);
+            this.ob_checkno.Location = new System.Drawing.Point(236, 154);
             this.ob_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 46);
@@ -504,7 +500,7 @@
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(585, 61);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(586, 62);
             this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 46);
@@ -514,7 +510,7 @@
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_batchqty.Location = new System.Drawing.Point(235, 61);
+            this.ob_batchqty.Location = new System.Drawing.Point(236, 62);
             this.ob_batchqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 46);
@@ -524,7 +520,7 @@
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(397, 61);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(398, 62);
             this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
             this.ob_nowcheckqty_label.Size = new System.Drawing.Size(160, 46);
@@ -535,7 +531,7 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_batchqty_label.Location = new System.Drawing.Point(47, 61);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(48, 62);
             this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(160, 46);