Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 years ago
parent
commit
7e8da101f8

+ 4 - 1
UAS-MES/App.config

@@ -33,12 +33,15 @@
       <setting name="LastLoginResource" serializeAs="String">
         <value />
       </setting>
+      <setting name="DefaultCollectionValue" serializeAs="String">
+        <value>DefaultValue</value>
+      </setting>
     </UAS_MES.Properties.Settings>
   </userSettings>
   <applicationSettings>
     <UAS_MES.Properties.Settings>
       <setting name="MES" serializeAs="String">
-        <value>Password=select!#%*(;User ID=UAS_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.17.158.219)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
+        <value>Password=select!#%*(;User ID=UAS_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.253.6)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
       </setting>
     </UAS_MES.Properties.Settings>
   </applicationSettings>

+ 3 - 3
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.Designer.cs

@@ -42,7 +42,7 @@
             this.Search_Icon.Location = new System.Drawing.Point(183, 0);
             this.Search_Icon.Name = "Search_Icon";
             this.Search_Icon.Power = "";
-            this.Search_Icon.Size = new System.Drawing.Size(21, 25);
+            this.Search_Icon.Size = new System.Drawing.Size(21, 22);
             this.Search_Icon.TabIndex = 1;
             this.Search_Icon.TabStop = false;
             this.Search_Icon.Click += new System.EventHandler(this.Search_Icon_Click);
@@ -57,7 +57,7 @@
             this.TextBox.Lock = false;
             this.TextBox.Name = "TextBox";
             this.TextBox.Power = null;
-            this.TextBox.Size = new System.Drawing.Size(178, 25);
+            this.TextBox.Size = new System.Drawing.Size(178, 21);
             this.TextBox.Str = null;
             this.TextBox.Str1 = null;
             this.TextBox.Str2 = null;
@@ -72,7 +72,7 @@
             this.Controls.Add(this.Search_Icon);
             this.Controls.Add(this.TextBox);
             this.Name = "MaCodeSearchTextBox";
-            this.Size = new System.Drawing.Size(204, 25);
+            this.Size = new System.Drawing.Size(204, 22);
             this.Load += new System.EventHandler(this.SearchTextBox_Load);
             this.SizeChanged += new System.EventHandler(this.SearchTextBox_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.Search_Icon)).EndInit();

+ 0 - 2
UAS-MES/CustomControl/TextBoxWithIcon/TextBoxWithTextArea.Designer.cs

@@ -54,8 +54,6 @@
             // 
             // TextAreaIcon
             // 
-            this.TextAreaIcon.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Right)));
             this.TextAreaIcon.Cursor = System.Windows.Forms.Cursors.Hand;
             this.TextAreaIcon.Image = global::UAS_MES.Properties.Resources.notice_text_editor_16px_11373_easyicon_net;
             this.TextAreaIcon.Location = new System.Drawing.Point(239, 1);

+ 8 - 7
UAS-MES/CustomControl/TextBoxWithIcon/TextBoxWithTextArea.cs

@@ -1,7 +1,6 @@
 using System;
 using System.Drawing;
 using System.Windows.Forms;
-using UAS_MES.PublicMethod;
 
 namespace UAS_MES.CustomControl.TextBoxWithIcon
 {
@@ -35,11 +34,11 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             string FormName = this.FindForm().Name;
             int i = 0;
             //当前的this是控件的Icon
-            Control c=this;
+            Control c = this;
             //一直通过父级往上找,直到父级的名称和Form的名称相等,记录经过了多少级
             while (GetParent)
             {
-                c= c.Parent;
+                c = c.Parent;
                 if (c.Name == FormName)
                 {
                     GetParent = false;
@@ -47,13 +46,14 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
                 i++;
             }
             //指定一个数据用来存放查找过的Control的Name
-            string[] ControlsName=new string[i];
+            string[] ControlsName = new string[i];
             //指定Form的名称
             taf.FormName = FormName;
             //重置Icon
             c = this;
             //将控件的名称添加到字符串数组中
-            for (int j = 0; j < i; j++) {
+            for (int j = 0; j < i; j++)
+            {
                 if (c.Name != FormName)
                 {
                     ControlsName[j] = c.Name;
@@ -61,7 +61,8 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
                 c = c.Parent;
             }
             taf.ControlName = ControlsName;
-            BaseUtil.SetFormCenter(taf);
+            taf.X = screenPoint.X / 2;
+            taf.Y = screenPoint.Y / 2;
             taf.ShowDialog();
         }
 
@@ -75,4 +76,4 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             textBox1.BackColor = Color.GreenYellow;
         }
     }
-}
+}

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

@@ -160,7 +160,7 @@ namespace UAS_MES.Make
         {
             string ErrorMessage;
             dh.ExecuteSql("update package set pa_weight=" + weight.Text + ", pa_printcount= nvl(pa_printcount,0)+1 where pa_outboxcode='" + outboxcode.Text + "'", "update");
-            if (!LogicHandler.UpdateMakeMessage(pd_barcode.Text, ma_code.Text, User.UserSourceCode, User.UserName, "称量合格", out ErrorMessage))
+            if (!LogicHandler.UpdateMakeMessage(pd_barcode.Text, ma_code.Text,"卡通箱称重", User.UserSourceCode, User.UserName, "称量合格", out ErrorMessage))
                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
         }
 

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

@@ -486,7 +486,7 @@ namespace UAS_MES.Make
                     //上料采集成功,设置序列号栏目为空
                     RemainIndex = 0;
                     OperateResult.AppendText(">>上料采集完成!\n", Color.Green);
-                    if (LogicHandler.UpdateMakeMessage(sn_code.Text, ma_code, User.UserSourceCode, User.UserName, "上料成功", out ErrorMessage))
+                    if (LogicHandler.UpdateMakeMessage(sn_code.Text, ma_code,"上料采集", User.UserSourceCode, User.UserName, "上料成功", out ErrorMessage))
                     {
                         sn_code.Text = "";
                         if (mcd_remainqty.Text == "0")

+ 132 - 180
UAS-MES/FunctionCode/Make/Make_Repair.Designer.cs

@@ -84,13 +84,13 @@
             this.ms_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.Clean = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.cd_stepcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.cr_code = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.NewBadCode = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.SaveBadLocation = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.Scrap = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.RepairComplete = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.ms_sncode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.panel2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).BeginInit();
@@ -105,9 +105,8 @@
             this.panel2.Controls.Add(this.label1);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(0, 0);
-            this.panel2.Margin = new System.Windows.Forms.Padding(4);
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(1327, 36);
+            this.panel2.Size = new System.Drawing.Size(995, 29);
             this.panel2.TabIndex = 32;
             // 
             // label1
@@ -115,10 +114,9 @@
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.label1.Location = new System.Drawing.Point(16, 5);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(12, 4);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 0;
             this.label1.Text = "工单信息";
             // 
@@ -128,12 +126,11 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ma_craftcode_label.AutoSize = true;
             this.ma_craftcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_craftcode_label.Location = new System.Drawing.Point(16, 98);
-            this.ma_craftcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_craftcode_label.Location = new System.Drawing.Point(12, 78);
             this.ma_craftcode_label.Name = "ma_craftcode_label";
-            this.ma_craftcode_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_craftcode_label.Size = new System.Drawing.Size(74, 21);
             this.ma_craftcode_label.TabIndex = 66;
-            this.ma_craftcode_label.Text = "回流工艺";
+            this.ma_craftcode_label.Text = "回流途程";
             // 
             // st_rstepcode_label
             // 
@@ -141,10 +138,9 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.st_rstepcode_label.AutoSize = true;
             this.st_rstepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.st_rstepcode_label.Location = new System.Drawing.Point(415, 98);
-            this.st_rstepcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.st_rstepcode_label.Location = new System.Drawing.Point(311, 78);
             this.st_rstepcode_label.Name = "st_rstepcode_label";
-            this.st_rstepcode_label.Size = new System.Drawing.Size(92, 27);
+            this.st_rstepcode_label.Size = new System.Drawing.Size(74, 21);
             this.st_rstepcode_label.TabIndex = 65;
             this.st_rstepcode_label.Text = "回流工序";
             // 
@@ -154,10 +150,9 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_prodcode_label.AutoSize = true;
             this.ms_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode_label.Location = new System.Drawing.Point(622, 51);
-            this.ms_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_prodcode_label.Location = new System.Drawing.Point(466, 41);
             this.ms_prodcode_label.Name = "ms_prodcode_label";
-            this.ms_prodcode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_prodcode_label.TabIndex = 62;
             this.ms_prodcode_label.Text = "产品编号";
             // 
@@ -167,10 +162,9 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(927, 51);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(695, 41);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 61;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -178,10 +172,9 @@
             // 
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(988, 192);
-            this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label14.Location = new System.Drawing.Point(741, 154);
             this.label14.Name = "label14";
-            this.label14.Size = new System.Drawing.Size(92, 27);
+            this.label14.Size = new System.Drawing.Size(74, 21);
             this.label14.TabIndex = 46;
             this.label14.Text = "不良备注";
             // 
@@ -190,10 +183,9 @@
             this.bc_name_label.AutoSize = true;
             this.bc_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_name_label.ForeColor = System.Drawing.Color.Black;
-            this.bc_name_label.Location = new System.Drawing.Point(611, 192);
-            this.bc_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.bc_name_label.Location = new System.Drawing.Point(458, 154);
             this.bc_name_label.Name = "bc_name_label";
-            this.bc_name_label.Size = new System.Drawing.Size(92, 27);
+            this.bc_name_label.Size = new System.Drawing.Size(74, 21);
             this.bc_name_label.TabIndex = 44;
             this.bc_name_label.Text = "不良代码";
             // 
@@ -201,10 +193,9 @@
             // 
             this.bg_name_label.AutoSize = true;
             this.bg_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bg_name_label.Location = new System.Drawing.Point(234, 190);
-            this.bg_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.bg_name_label.Location = new System.Drawing.Point(176, 152);
             this.bg_name_label.Name = "bg_name_label";
-            this.bg_name_label.Size = new System.Drawing.Size(112, 27);
+            this.bg_name_label.Size = new System.Drawing.Size(90, 21);
             this.bg_name_label.TabIndex = 40;
             this.bg_name_label.Text = "不良代码组";
             // 
@@ -214,10 +205,9 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(16, 49);
-            this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_sncode_label.Location = new System.Drawing.Point(12, 39);
             this.ms_sncode_label.Name = "ms_sncode_label";
-            this.ms_sncode_label.Size = new System.Drawing.Size(72, 27);
+            this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_sncode_label.TabIndex = 38;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -227,10 +217,9 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(348, 51);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Location = new System.Drawing.Point(261, 41);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(72, 27);
+            this.ms_makecode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_makecode_label.TabIndex = 37;
             this.ms_makecode_label.Text = "工单号";
             // 
@@ -239,10 +228,9 @@
             this.mbr_brgcode_label.AutoSize = true;
             this.mbr_brgcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbr_brgcode_label.ForeColor = System.Drawing.Color.Black;
-            this.mbr_brgcode_label.Location = new System.Drawing.Point(234, 246);
-            this.mbr_brgcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mbr_brgcode_label.Location = new System.Drawing.Point(176, 197);
             this.mbr_brgcode_label.Name = "mbr_brgcode_label";
-            this.mbr_brgcode_label.Size = new System.Drawing.Size(112, 27);
+            this.mbr_brgcode_label.Size = new System.Drawing.Size(90, 21);
             this.mbr_brgcode_label.TabIndex = 93;
             this.mbr_brgcode_label.Text = "不良原因组";
             // 
@@ -251,10 +239,9 @@
             this.nr_name_label.AutoSize = true;
             this.nr_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.nr_name_label.ForeColor = System.Drawing.Color.Black;
-            this.nr_name_label.Location = new System.Drawing.Point(611, 245);
-            this.nr_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.nr_name_label.Location = new System.Drawing.Point(458, 196);
             this.nr_name_label.Name = "nr_name_label";
-            this.nr_name_label.Size = new System.Drawing.Size(92, 27);
+            this.nr_name_label.Size = new System.Drawing.Size(74, 21);
             this.nr_name_label.TabIndex = 95;
             this.nr_name_label.Text = "不良原因";
             // 
@@ -263,10 +250,9 @@
             this.mbr_dutycode_label.AutoSize = true;
             this.mbr_dutycode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbr_dutycode_label.ForeColor = System.Drawing.Color.Black;
-            this.mbr_dutycode_label.Location = new System.Drawing.Point(988, 243);
-            this.mbr_dutycode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mbr_dutycode_label.Location = new System.Drawing.Point(741, 194);
             this.mbr_dutycode_label.Name = "mbr_dutycode_label";
-            this.mbr_dutycode_label.Size = new System.Drawing.Size(72, 27);
+            this.mbr_dutycode_label.Size = new System.Drawing.Size(58, 21);
             this.mbr_dutycode_label.TabIndex = 97;
             this.mbr_dutycode_label.Text = "责任别";
             // 
@@ -275,10 +261,9 @@
             this.mbc_component_label.AutoSize = true;
             this.mbc_component_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbc_component_label.ForeColor = System.Drawing.Color.Black;
-            this.mbc_component_label.Location = new System.Drawing.Point(234, 297);
-            this.mbc_component_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mbc_component_label.Location = new System.Drawing.Point(176, 238);
             this.mbc_component_label.Name = "mbc_component_label";
-            this.mbc_component_label.Size = new System.Drawing.Size(92, 27);
+            this.mbc_component_label.Size = new System.Drawing.Size(74, 21);
             this.mbc_component_label.TabIndex = 99;
             this.mbc_component_label.Text = "不良组件";
             // 
@@ -287,10 +272,9 @@
             this.mbr_solution_label.AutoSize = true;
             this.mbr_solution_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbr_solution_label.ForeColor = System.Drawing.Color.Black;
-            this.mbr_solution_label.Location = new System.Drawing.Point(611, 299);
-            this.mbr_solution_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mbr_solution_label.Location = new System.Drawing.Point(458, 239);
             this.mbr_solution_label.Name = "mbr_solution_label";
-            this.mbr_solution_label.Size = new System.Drawing.Size(92, 27);
+            this.mbr_solution_label.Size = new System.Drawing.Size(74, 21);
             this.mbr_solution_label.TabIndex = 101;
             this.mbr_solution_label.Text = "解决方案";
             // 
@@ -299,10 +283,9 @@
             this.mbl_loc_label.AutoSize = true;
             this.mbl_loc_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbl_loc_label.ForeColor = System.Drawing.Color.Black;
-            this.mbl_loc_label.Location = new System.Drawing.Point(234, 369);
-            this.mbl_loc_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mbl_loc_label.Location = new System.Drawing.Point(176, 295);
             this.mbl_loc_label.Name = "mbl_loc_label";
-            this.mbl_loc_label.Size = new System.Drawing.Size(92, 27);
+            this.mbl_loc_label.Size = new System.Drawing.Size(74, 21);
             this.mbl_loc_label.TabIndex = 103;
             this.mbl_loc_label.Text = "不良位置";
             // 
@@ -311,19 +294,19 @@
             this.mbp_part_label.AutoSize = true;
             this.mbp_part_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbp_part_label.ForeColor = System.Drawing.Color.Black;
-            this.mbp_part_label.Location = new System.Drawing.Point(642, 372);
-            this.mbp_part_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mbp_part_label.Location = new System.Drawing.Point(482, 298);
             this.mbp_part_label.Name = "mbp_part_label";
-            this.mbp_part_label.Size = new System.Drawing.Size(92, 27);
+            this.mbp_part_label.Size = new System.Drawing.Size(74, 21);
             this.mbp_part_label.TabIndex = 105;
             this.mbp_part_label.Text = "不良零件";
             // 
             // panel1
             // 
             this.panel1.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.panel1.Location = new System.Drawing.Point(217, 350);
+            this.panel1.Location = new System.Drawing.Point(163, 280);
+            this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1105, 2);
+            this.panel1.Size = new System.Drawing.Size(829, 2);
             this.panel1.TabIndex = 108;
             // 
             // GetSNCode_Label
@@ -332,10 +315,9 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.GetSNCode_Label.AutoSize = true;
             this.GetSNCode_Label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.GetSNCode_Label.Location = new System.Drawing.Point(247, 677);
-            this.GetSNCode_Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.GetSNCode_Label.Location = new System.Drawing.Point(185, 542);
             this.GetSNCode_Label.Name = "GetSNCode_Label";
-            this.GetSNCode_Label.Size = new System.Drawing.Size(72, 27);
+            this.GetSNCode_Label.Size = new System.Drawing.Size(58, 21);
             this.GetSNCode_Label.TabIndex = 113;
             this.GetSNCode_Label.Text = "序列号";
             // 
@@ -344,27 +326,28 @@
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Black;
-            this.label2.Location = new System.Drawing.Point(16, 156);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(12, 125);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(92, 27);
+            this.label2.Size = new System.Drawing.Size(74, 22);
             this.label2.TabIndex = 117;
             this.label2.Text = "不良信息";
             // 
             // panel3
             // 
             this.panel3.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.panel3.Location = new System.Drawing.Point(1, 146);
+            this.panel3.Location = new System.Drawing.Point(1, 117);
+            this.panel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.panel3.Name = "panel3";
-            this.panel3.Size = new System.Drawing.Size(1320, 2);
+            this.panel3.Size = new System.Drawing.Size(990, 2);
             this.panel3.TabIndex = 109;
             // 
             // BadCodeTree
             // 
             this.BadCodeTree.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BadCodeTree.Location = new System.Drawing.Point(21, 192);
+            this.BadCodeTree.Location = new System.Drawing.Point(16, 154);
+            this.BadCodeTree.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.BadCodeTree.Name = "BadCodeTree";
-            this.BadCodeTree.Size = new System.Drawing.Size(193, 531);
+            this.BadCodeTree.Size = new System.Drawing.Size(146, 426);
             this.BadCodeTree.TabIndex = 118;
             this.BadCodeTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.BadCodeTree_NodeMouseClick);
             // 
@@ -373,10 +356,9 @@
             this.bc_code.AutoSize = true;
             this.bc_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_code.ForeColor = System.Drawing.Color.Black;
-            this.bc_code.Location = new System.Drawing.Point(1264, 93);
-            this.bc_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.bc_code.Location = new System.Drawing.Point(948, 74);
             this.bc_code.Name = "bc_code";
-            this.bc_code.Size = new System.Drawing.Size(0, 27);
+            this.bc_code.Size = new System.Drawing.Size(0, 21);
             this.bc_code.TabIndex = 122;
             this.bc_code.Visible = false;
             // 
@@ -385,10 +367,9 @@
             this.bg_code.AutoSize = true;
             this.bg_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bg_code.ForeColor = System.Drawing.Color.Black;
-            this.bg_code.Location = new System.Drawing.Point(1264, 51);
-            this.bg_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.bg_code.Location = new System.Drawing.Point(948, 41);
             this.bg_code.Name = "bg_code";
-            this.bg_code.Size = new System.Drawing.Size(0, 27);
+            this.bg_code.Size = new System.Drawing.Size(0, 21);
             this.bg_code.TabIndex = 123;
             this.bg_code.Visible = false;
             // 
@@ -397,10 +378,9 @@
             this.nr_code.AutoSize = true;
             this.nr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.nr_code.ForeColor = System.Drawing.Color.Black;
-            this.nr_code.Location = new System.Drawing.Point(1235, 93);
-            this.nr_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.nr_code.Location = new System.Drawing.Point(926, 74);
             this.nr_code.Name = "nr_code";
-            this.nr_code.Size = new System.Drawing.Size(0, 27);
+            this.nr_code.Size = new System.Drawing.Size(0, 21);
             this.nr_code.TabIndex = 125;
             this.nr_code.Visible = false;
             // 
@@ -411,12 +391,13 @@
             this.prodcode.Condition = null;
             this.prodcode.DBTitle = null;
             this.prodcode.FormName = null;
-            this.prodcode.Location = new System.Drawing.Point(747, 374);
+            this.prodcode.Location = new System.Drawing.Point(560, 299);
+            this.prodcode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.prodcode.Name = "prodcode";
             this.prodcode.Power = null;
             this.prodcode.SelectField = null;
             this.prodcode.SetValueField = null;
-            this.prodcode.Size = new System.Drawing.Size(209, 25);
+            this.prodcode.Size = new System.Drawing.Size(157, 21);
             this.prodcode.TabIndex = 124;
             this.prodcode.TableName = null;
             this.prodcode.TextBoxEnable = true;
@@ -429,10 +410,11 @@
             this.mbp_partdgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.mbp_part1,
             this.mbp_id});
-            this.mbp_partdgv.Location = new System.Drawing.Point(647, 419);
+            this.mbp_partdgv.Location = new System.Drawing.Point(485, 335);
+            this.mbp_partdgv.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.mbp_partdgv.Name = "mbp_partdgv";
             this.mbp_partdgv.RowTemplate.Height = 27;
-            this.mbp_partdgv.Size = new System.Drawing.Size(360, 190);
+            this.mbp_partdgv.Size = new System.Drawing.Size(270, 152);
             this.mbp_partdgv.TabIndex = 121;
             // 
             // mbp_part1
@@ -456,10 +438,11 @@
             this.mbl_locdgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.mbl_loc1,
             this.mbl_id});
-            this.mbl_locdgv.Location = new System.Drawing.Point(248, 419);
+            this.mbl_locdgv.Location = new System.Drawing.Point(186, 335);
+            this.mbl_locdgv.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.mbl_locdgv.Name = "mbl_locdgv";
             this.mbl_locdgv.RowTemplate.Height = 27;
-            this.mbl_locdgv.Size = new System.Drawing.Size(360, 190);
+            this.mbl_locdgv.Size = new System.Drawing.Size(270, 152);
             this.mbl_locdgv.TabIndex = 120;
             // 
             // mbl_loc1
@@ -481,10 +464,11 @@
             this.RefreshTreeView.AllPower = null;
             this.RefreshTreeView.Cursor = System.Windows.Forms.Cursors.Hand;
             this.RefreshTreeView.Image = global::UAS_MES.Properties.Resources.refresh;
-            this.RefreshTreeView.Location = new System.Drawing.Point(112, 158);
+            this.RefreshTreeView.Location = new System.Drawing.Point(84, 126);
+            this.RefreshTreeView.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.RefreshTreeView.Name = "RefreshTreeView";
             this.RefreshTreeView.Power = null;
-            this.RefreshTreeView.Size = new System.Drawing.Size(27, 27);
+            this.RefreshTreeView.Size = new System.Drawing.Size(20, 22);
             this.RefreshTreeView.TabIndex = 119;
             this.RefreshTreeView.TabStop = false;
             this.RefreshTreeView.Click += new System.EventHandler(this.RefreshTreeView_Click);
@@ -496,11 +480,10 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.GetSNCode.BackColor = System.Drawing.Color.White;
             this.GetSNCode.ID = null;
-            this.GetSNCode.Location = new System.Drawing.Point(354, 679);
-            this.GetSNCode.Margin = new System.Windows.Forms.Padding(4);
+            this.GetSNCode.Location = new System.Drawing.Point(266, 543);
             this.GetSNCode.Name = "GetSNCode";
             this.GetSNCode.Power = null;
-            this.GetSNCode.Size = new System.Drawing.Size(249, 25);
+            this.GetSNCode.Size = new System.Drawing.Size(188, 21);
             this.GetSNCode.Str = null;
             this.GetSNCode.Str1 = null;
             this.GetSNCode.Str2 = null;
@@ -515,13 +498,12 @@
             this.NewRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.DownImage")));
             this.NewRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.Image")));
             this.NewRepairInf.IsShowBorder = true;
-            this.NewRepairInf.Location = new System.Drawing.Point(395, 631);
-            this.NewRepairInf.Margin = new System.Windows.Forms.Padding(4);
+            this.NewRepairInf.Location = new System.Drawing.Point(296, 502);
             this.NewRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.MoveImage")));
             this.NewRepairInf.Name = "NewRepairInf";
             this.NewRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.NormalImage")));
             this.NewRepairInf.Power = null;
-            this.NewRepairInf.Size = new System.Drawing.Size(130, 30);
+            this.NewRepairInf.Size = new System.Drawing.Size(98, 24);
             this.NewRepairInf.TabIndex = 112;
             this.NewRepairInf.Tag = "IfWrite";
             this.NewRepairInf.Text = "新增维修信息";
@@ -535,13 +517,12 @@
             this.SaveRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.DownImage")));
             this.SaveRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.Image")));
             this.SaveRepairInf.IsShowBorder = true;
-            this.SaveRepairInf.Location = new System.Drawing.Point(548, 631);
-            this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(4);
+            this.SaveRepairInf.Location = new System.Drawing.Point(411, 502);
             this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
             this.SaveRepairInf.Name = "SaveRepairInf";
             this.SaveRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.NormalImage")));
             this.SaveRepairInf.Power = null;
-            this.SaveRepairInf.Size = new System.Drawing.Size(130, 30);
+            this.SaveRepairInf.Size = new System.Drawing.Size(98, 24);
             this.SaveRepairInf.TabIndex = 111;
             this.SaveRepairInf.Tag = "IfWrite";
             this.SaveRepairInf.Text = "保存维修信息";
@@ -555,13 +536,12 @@
             this.DeleteRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.DownImage")));
             this.DeleteRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.Image")));
             this.DeleteRepairInf.IsShowBorder = true;
-            this.DeleteRepairInf.Location = new System.Drawing.Point(700, 631);
-            this.DeleteRepairInf.Margin = new System.Windows.Forms.Padding(4);
+            this.DeleteRepairInf.Location = new System.Drawing.Point(525, 502);
             this.DeleteRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.MoveImage")));
             this.DeleteRepairInf.Name = "DeleteRepairInf";
             this.DeleteRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.NormalImage")));
             this.DeleteRepairInf.Power = null;
-            this.DeleteRepairInf.Size = new System.Drawing.Size(91, 30);
+            this.DeleteRepairInf.Size = new System.Drawing.Size(68, 24);
             this.DeleteRepairInf.TabIndex = 110;
             this.DeleteRepairInf.Tag = "IfWrite";
             this.DeleteRepairInf.Text = "删除";
@@ -575,11 +555,10 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.mbl_loc.BackColor = System.Drawing.Color.White;
             this.mbl_loc.ID = null;
-            this.mbl_loc.Location = new System.Drawing.Point(354, 374);
-            this.mbl_loc.Margin = new System.Windows.Forms.Padding(4);
+            this.mbl_loc.Location = new System.Drawing.Point(266, 299);
             this.mbl_loc.Name = "mbl_loc";
             this.mbl_loc.Power = null;
-            this.mbl_loc.Size = new System.Drawing.Size(187, 25);
+            this.mbl_loc.Size = new System.Drawing.Size(141, 21);
             this.mbl_loc.Str = null;
             this.mbl_loc.Str1 = null;
             this.mbl_loc.Str2 = null;
@@ -596,11 +575,10 @@
             this.mbr_solutioncode.BackColor = System.Drawing.Color.White;
             this.mbr_solutioncode.Enabled = false;
             this.mbr_solutioncode.ID = null;
-            this.mbr_solutioncode.Location = new System.Drawing.Point(747, 299);
-            this.mbr_solutioncode.Margin = new System.Windows.Forms.Padding(4);
+            this.mbr_solutioncode.Location = new System.Drawing.Point(560, 239);
             this.mbr_solutioncode.Name = "mbr_solutioncode";
             this.mbr_solutioncode.Power = null;
-            this.mbr_solutioncode.Size = new System.Drawing.Size(187, 25);
+            this.mbr_solutioncode.Size = new System.Drawing.Size(141, 21);
             this.mbr_solutioncode.Str = null;
             this.mbr_solutioncode.Str1 = null;
             this.mbr_solutioncode.Str2 = null;
@@ -615,11 +593,10 @@
             this.mbc_component.BackColor = System.Drawing.Color.White;
             this.mbc_component.Enabled = false;
             this.mbc_component.ID = null;
-            this.mbc_component.Location = new System.Drawing.Point(354, 299);
-            this.mbc_component.Margin = new System.Windows.Forms.Padding(4);
+            this.mbc_component.Location = new System.Drawing.Point(266, 239);
             this.mbc_component.Name = "mbc_component";
             this.mbc_component.Power = null;
-            this.mbc_component.Size = new System.Drawing.Size(187, 25);
+            this.mbc_component.Size = new System.Drawing.Size(141, 21);
             this.mbc_component.Str = null;
             this.mbc_component.Str1 = null;
             this.mbc_component.Str2 = null;
@@ -634,11 +611,10 @@
             this.mbr_dutycode.BackColor = System.Drawing.Color.White;
             this.mbr_dutycode.Enabled = false;
             this.mbr_dutycode.ID = null;
-            this.mbr_dutycode.Location = new System.Drawing.Point(1094, 248);
-            this.mbr_dutycode.Margin = new System.Windows.Forms.Padding(4);
+            this.mbr_dutycode.Location = new System.Drawing.Point(820, 198);
             this.mbr_dutycode.Name = "mbr_dutycode";
             this.mbr_dutycode.Power = null;
-            this.mbr_dutycode.Size = new System.Drawing.Size(187, 25);
+            this.mbr_dutycode.Size = new System.Drawing.Size(141, 21);
             this.mbr_dutycode.Str = null;
             this.mbr_dutycode.Str1 = null;
             this.mbr_dutycode.Str2 = null;
@@ -653,11 +629,10 @@
             this.nr_name.BackColor = System.Drawing.Color.White;
             this.nr_name.Enabled = false;
             this.nr_name.ID = null;
-            this.nr_name.Location = new System.Drawing.Point(747, 245);
-            this.nr_name.Margin = new System.Windows.Forms.Padding(4);
+            this.nr_name.Location = new System.Drawing.Point(560, 196);
             this.nr_name.Name = "nr_name";
             this.nr_name.Power = null;
-            this.nr_name.Size = new System.Drawing.Size(187, 25);
+            this.nr_name.Size = new System.Drawing.Size(141, 21);
             this.nr_name.Str = null;
             this.nr_name.Str1 = null;
             this.nr_name.Str2 = null;
@@ -673,11 +648,10 @@
             this.nrg_name.BackColor = System.Drawing.Color.White;
             this.nrg_name.Enabled = false;
             this.nrg_name.ID = null;
-            this.nrg_name.Location = new System.Drawing.Point(354, 248);
-            this.nrg_name.Margin = new System.Windows.Forms.Padding(4);
+            this.nrg_name.Location = new System.Drawing.Point(266, 198);
             this.nrg_name.Name = "nrg_name";
             this.nrg_name.Power = null;
-            this.nrg_name.Size = new System.Drawing.Size(187, 25);
+            this.nrg_name.Size = new System.Drawing.Size(141, 21);
             this.nrg_name.Str = null;
             this.nrg_name.Str1 = null;
             this.nrg_name.Str2 = null;
@@ -692,11 +666,10 @@
             this.bc_name.BackColor = System.Drawing.Color.White;
             this.bc_name.Enabled = false;
             this.bc_name.ID = null;
-            this.bc_name.Location = new System.Drawing.Point(747, 192);
-            this.bc_name.Margin = new System.Windows.Forms.Padding(4);
+            this.bc_name.Location = new System.Drawing.Point(560, 154);
             this.bc_name.Name = "bc_name";
             this.bc_name.Power = null;
-            this.bc_name.Size = new System.Drawing.Size(187, 25);
+            this.bc_name.Size = new System.Drawing.Size(141, 21);
             this.bc_name.Str = null;
             this.bc_name.Str1 = null;
             this.bc_name.Str2 = null;
@@ -712,11 +685,10 @@
             this.bg_name.Enabled = false;
             this.bg_name.ForeColor = System.Drawing.Color.Red;
             this.bg_name.ID = null;
-            this.bg_name.Location = new System.Drawing.Point(354, 192);
-            this.bg_name.Margin = new System.Windows.Forms.Padding(4);
+            this.bg_name.Location = new System.Drawing.Point(266, 154);
             this.bg_name.Name = "bg_name";
             this.bg_name.Power = null;
-            this.bg_name.Size = new System.Drawing.Size(187, 25);
+            this.bg_name.Size = new System.Drawing.Size(141, 21);
             this.bg_name.Str = null;
             this.bg_name.Str1 = null;
             this.bg_name.Str2 = null;
@@ -725,19 +697,17 @@
             // 
             // mb_badremark
             // 
-            this.mb_badremark.Location = new System.Drawing.Point(1094, 194);
-            this.mb_badremark.Margin = new System.Windows.Forms.Padding(4);
+            this.mb_badremark.Location = new System.Drawing.Point(820, 155);
             this.mb_badremark.Name = "mb_badremark";
-            this.mb_badremark.Size = new System.Drawing.Size(187, 25);
+            this.mb_badremark.Size = new System.Drawing.Size(140, 20);
             this.mb_badremark.TabIndex = 90;
             // 
             // OperatResult
             // 
             this.OperatResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperatResult.Location = new System.Drawing.Point(1060, 372);
-            this.OperatResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperatResult.Location = new System.Drawing.Point(795, 298);
             this.OperatResult.Name = "OperatResult";
-            this.OperatResult.Size = new System.Drawing.Size(247, 318);
+            this.OperatResult.Size = new System.Drawing.Size(186, 255);
             this.OperatResult.TabIndex = 87;
             this.OperatResult.Text = "";
             // 
@@ -747,10 +717,9 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(455, 51);
-            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode.Location = new System.Drawing.Point(341, 41);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
             this.ms_makecode.TabIndex = 85;
             // 
             // ms_prodcode
@@ -759,10 +728,9 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_prodcode.AutoSize = true;
             this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode.Location = new System.Drawing.Point(750, 51);
-            this.ms_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_prodcode.Location = new System.Drawing.Point(562, 41);
             this.ms_prodcode.Name = "ms_prodcode";
-            this.ms_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
             this.ms_prodcode.TabIndex = 83;
             // 
             // pr_detail
@@ -771,10 +739,9 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(1055, 51);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail.Location = new System.Drawing.Point(791, 41);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 27);
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 82;
             // 
             // Clean
@@ -784,36 +751,17 @@
             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(1130, 697);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4);
+            this.Clean.Location = new System.Drawing.Point(848, 558);
             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 = 81;
             this.Clean.Tag = "IfWrite";
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
             // 
-            // ms_sncode
-            // 
-            this.ms_sncode.AllPower = null;
-            this.ms_sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left)));
-            this.ms_sncode.BackColor = System.Drawing.Color.White;
-            this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(123, 51);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
-            this.ms_sncode.Name = "ms_sncode";
-            this.ms_sncode.Power = null;
-            this.ms_sncode.Size = new System.Drawing.Size(178, 25);
-            this.ms_sncode.Str = null;
-            this.ms_sncode.Str1 = null;
-            this.ms_sncode.Str2 = null;
-            this.ms_sncode.TabIndex = 80;
-            this.ms_sncode.Tag = "Read";
-            // 
             // cd_stepcode
             // 
             this.cd_stepcode.AllPower = null;
@@ -823,13 +771,12 @@
             this.cd_stepcode.Condition = null;
             this.cd_stepcode.DBTitle = "回流工序";
             this.cd_stepcode.FormName = null;
-            this.cd_stepcode.Location = new System.Drawing.Point(535, 99);
-            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(4);
+            this.cd_stepcode.Location = new System.Drawing.Point(401, 79);
             this.cd_stepcode.Name = "cd_stepcode";
             this.cd_stepcode.Power = null;
             this.cd_stepcode.SelectField = null;
             this.cd_stepcode.SetValueField = null;
-            this.cd_stepcode.Size = new System.Drawing.Size(256, 25);
+            this.cd_stepcode.Size = new System.Drawing.Size(192, 21);
             this.cd_stepcode.TabIndex = 68;
             this.cd_stepcode.TableName = null;
             this.cd_stepcode.Tag = "ms_stepcode";
@@ -842,15 +789,14 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.cr_code.Caller = null;
             this.cr_code.Condition = null;
-            this.cr_code.DBTitle = "回流工艺";
+            this.cr_code.DBTitle = "回流途程";
             this.cr_code.FormName = null;
-            this.cr_code.Location = new System.Drawing.Point(123, 99);
-            this.cr_code.Margin = new System.Windows.Forms.Padding(4);
+            this.cr_code.Location = new System.Drawing.Point(92, 79);
             this.cr_code.Name = "cr_code";
             this.cr_code.Power = null;
             this.cr_code.SelectField = null;
             this.cr_code.SetValueField = null;
-            this.cr_code.Size = new System.Drawing.Size(255, 25);
+            this.cr_code.Size = new System.Drawing.Size(191, 21);
             this.cr_code.TabIndex = 67;
             this.cr_code.TableName = null;
             this.cr_code.Tag = "ms_craftcode";
@@ -864,13 +810,12 @@
             this.NewBadCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.DownImage")));
             this.NewBadCode.Image = ((System.Drawing.Image)(resources.GetObject("NewBadCode.Image")));
             this.NewBadCode.IsShowBorder = true;
-            this.NewBadCode.Location = new System.Drawing.Point(248, 631);
-            this.NewBadCode.Margin = new System.Windows.Forms.Padding(4);
+            this.NewBadCode.Location = new System.Drawing.Point(186, 502);
             this.NewBadCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.MoveImage")));
             this.NewBadCode.Name = "NewBadCode";
             this.NewBadCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.NormalImage")));
             this.NewBadCode.Power = null;
-            this.NewBadCode.Size = new System.Drawing.Size(130, 30);
+            this.NewBadCode.Size = new System.Drawing.Size(98, 24);
             this.NewBadCode.TabIndex = 60;
             this.NewBadCode.Tag = "IfWrite";
             this.NewBadCode.Text = "新增不良代码";
@@ -885,13 +830,12 @@
             this.SaveBadLocation.Enabled = false;
             this.SaveBadLocation.Image = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.Image")));
             this.SaveBadLocation.IsShowBorder = true;
-            this.SaveBadLocation.Location = new System.Drawing.Point(549, 372);
-            this.SaveBadLocation.Margin = new System.Windows.Forms.Padding(4);
+            this.SaveBadLocation.Location = new System.Drawing.Point(412, 298);
             this.SaveBadLocation.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.MoveImage")));
             this.SaveBadLocation.Name = "SaveBadLocation";
             this.SaveBadLocation.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.NormalImage")));
             this.SaveBadLocation.Power = null;
-            this.SaveBadLocation.Size = new System.Drawing.Size(61, 30);
+            this.SaveBadLocation.Size = new System.Drawing.Size(46, 24);
             this.SaveBadLocation.TabIndex = 59;
             this.SaveBadLocation.Tag = "IfWrite";
             this.SaveBadLocation.Text = "保存";
@@ -905,13 +849,12 @@
             this.Scrap.DownImage = ((System.Drawing.Image)(resources.GetObject("Scrap.DownImage")));
             this.Scrap.Image = ((System.Drawing.Image)(resources.GetObject("Scrap.Image")));
             this.Scrap.IsShowBorder = true;
-            this.Scrap.Location = new System.Drawing.Point(964, 95);
-            this.Scrap.Margin = new System.Windows.Forms.Padding(4);
+            this.Scrap.Location = new System.Drawing.Point(723, 76);
             this.Scrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("Scrap.MoveImage")));
             this.Scrap.Name = "Scrap";
             this.Scrap.NormalImage = ((System.Drawing.Image)(resources.GetObject("Scrap.NormalImage")));
             this.Scrap.Power = null;
-            this.Scrap.Size = new System.Drawing.Size(91, 30);
+            this.Scrap.Size = new System.Drawing.Size(68, 24);
             this.Scrap.TabIndex = 56;
             this.Scrap.Tag = "IfWrite";
             this.Scrap.Text = "报废";
@@ -925,24 +868,35 @@
             this.RepairComplete.DownImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.DownImage")));
             this.RepairComplete.Image = ((System.Drawing.Image)(resources.GetObject("RepairComplete.Image")));
             this.RepairComplete.IsShowBorder = true;
-            this.RepairComplete.Location = new System.Drawing.Point(838, 95);
-            this.RepairComplete.Margin = new System.Windows.Forms.Padding(4);
+            this.RepairComplete.Location = new System.Drawing.Point(628, 76);
             this.RepairComplete.MoveImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.MoveImage")));
             this.RepairComplete.Name = "RepairComplete";
             this.RepairComplete.NormalImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.NormalImage")));
             this.RepairComplete.Power = null;
-            this.RepairComplete.Size = new System.Drawing.Size(91, 30);
+            this.RepairComplete.Size = new System.Drawing.Size(68, 24);
             this.RepairComplete.TabIndex = 55;
             this.RepairComplete.Tag = "IfWrite";
             this.RepairComplete.Text = "完成维修";
             this.RepairComplete.UseVisualStyleBackColor = true;
             this.RepairComplete.Click += new System.EventHandler(this.RepairComplete_Click);
             // 
+            // ms_sncode
+            // 
+            this.ms_sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_sncode.AutoSize = true;
+            this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_sncode.Location = new System.Drawing.Point(94, 41);
+            this.ms_sncode.Name = "ms_sncode";
+            this.ms_sncode.Size = new System.Drawing.Size(0, 21);
+            this.ms_sncode.TabIndex = 126;
+            // 
             // Make_Repair
             // 
-            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(1327, 735);
+            this.ClientSize = new System.Drawing.Size(995, 588);
+            this.Controls.Add(this.ms_sncode);
             this.Controls.Add(this.nr_code);
             this.Controls.Add(this.prodcode);
             this.Controls.Add(this.bg_code);
@@ -982,7 +936,6 @@
             this.Controls.Add(this.ms_prodcode_label);
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.Clean);
-            this.Controls.Add(this.ms_sncode);
             this.Controls.Add(this.cd_stepcode);
             this.Controls.Add(this.cr_code);
             this.Controls.Add(this.ma_craftcode_label);
@@ -998,7 +951,6 @@
             this.Controls.Add(this.ms_makecode_label);
             this.Controls.Add(this.panel2);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_Repair";
             this.Tag = "Make!Repair";
             this.Text = "维修作业";
@@ -1034,7 +986,6 @@
         private System.Windows.Forms.Label bg_name_label;
         private System.Windows.Forms.Label ms_sncode_label;
         private System.Windows.Forms.Label ms_makecode_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ms_sncode;
         private CustomControl.ButtonUtil.NormalButton Clean;
         private CustomControl.ValueLabel.ValueLabel pr_detail;
         private CustomControl.ValueLabel.ValueLabel ms_prodcode;
@@ -1078,5 +1029,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn mbp_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn mbl_loc1;
         private System.Windows.Forms.DataGridViewTextBoxColumn mbl_id;
+        private CustomControl.ValueLabel.ValueLabel ms_sncode;
     }
 }

+ 31 - 38
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -80,7 +80,6 @@ namespace UAS_MES.Make
             cd_stepcode.SetValueField = new string[] { "cd_stepcode" };
             cd_stepcode.SelectField = "cd_stepname # 工序名称 ,cd_stepcode # 工序编号,cd_stepno # 执行顺序";
 
-
             prodcode.FormName = Name;
             prodcode.TableName = dbtable1.Replace(":macode", macode).Replace(":sncode", GetSNCode.Text);
             prodcode.SetValueField = new string[] { "prodcode" };
@@ -103,27 +102,21 @@ namespace UAS_MES.Make
                 //验证工序是否正确
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
-
                     BadInf_1.Clear();
                     if (LogicHandler.GetMakeInfo(GetSNCode.Text, out macode, out ErrorMessage))
                     {
-                        if (LogicHandler.CheckStepSNAndMacode(macode, User.UserSourceCode, GetSNCode.Text, User.UserCode, out macode, out msid, out ErrorMessage))
+                        //验证makeserial或者ms_firstsn表序列号是否存在
+                        sql.Clear();
+                        sql.Append("select max(ms_id) ms_id,ms_makecode,ms_prodcode,ms_sncode,pr_detail ");
+                        sql.Append("ms_stepcode,ms_craftcode from makeserial left join product on pr_code=ms_prodcode where ms_makecode ='" + macode + "' and(ms_sncode");
+                        sql.Append("='" + GetSNCode.Text + "' or ms_firstsn in (select firstsn from makesnrelation ");
+                        sql.Append("where sn='" + GetSNCode.Text + "')) group by ms_makecode,ms_prodcode,ms_sncode,pr_detail,ms_stepcode,ms_craftcode");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        if (dt.Rows.Count > 0)
                         {
-                            //验证makeserial或者ms_firstsn表序列号是否存在
-                            sql.Clear();
-                            sql.Append("select max(ms_id) ms_id,ms_makecode,ms_prodcode,ms_sncode,pr_detail ");
-                            sql.Append("ms_stepcode,ms_craftcode from makeserial left join product on pr_code=ms_prodcode where ms_makecode ='" + macode + "' and(ms_sncode");
-                            sql.Append("='" + GetSNCode.Text + "' or ms_firstsn in (select firstsn from makesnrelation ");
-                            sql.Append("where sn='" + GetSNCode.Text + "')) group by ms_makecode,ms_prodcode,ms_sncode,pr_detail,ms_stepcode,ms_craftcode");
-                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                            if (dt.Rows.Count > 0)
-                            {
-                                msid = dt.Rows[0]["ms_id"].ToString();
-                                BaseUtil.SetFormValue(this.Controls, dt);
-                                LoadBadInfTree(sender, e);
-                            }
-                            else
-                                OperatResult.AppendText(">>序列号" + GetSNCode.Text + "不存在\n", Color.Red);
+                            msid = dt.Rows[0]["ms_id"].ToString();
+                            BaseUtil.SetFormValue(this.Controls, dt);
+                            LoadBadInfTree(sender, e);
                         }
                         else
                             OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
@@ -238,32 +231,32 @@ namespace UAS_MES.Make
 
         private void RepairComplete_Click(object sender, EventArgs e)
         {
-            int RejectNum = int.Parse(dh.getFieldDataByCondition("makebad", "count(0) cn", "mb_sncode='" + GetSNCode.Text + "' and mb_status not in (1,-1)").ToString());
-            if (RejectNum > 0)
-            {
-                OperatResult.AppendText(">>维修结果必须为已维修或无不良\n", Color.Red);
-            }
-            else
+            string ErrorMessage = "";
+            string oMakeCode = "";
+            string MsID = "";
+            if (LogicHandler.CheckStepSNAndMacode(ms_makecode.Text, User.UserSourceCode, GetSNCode.Text,User.UserCode,out oMakeCode,out MsID,out ErrorMessage))
             {
-                dt = (DataTable)dh.ExecuteSql("select cr_id from craft where cr_statuscode='AUDITED' and cr_code='" + cr_code.Text + "'", "select");
-                if (dt.Rows.Count == 0)
-                {
-                    OperatResult.AppendText(">>回流工序不存在\n", Color.Red);
-                }
+                int RejectNum = int.Parse(dh.getFieldDataByCondition("makebad", "count(0) cn", "mb_sncode='" + GetSNCode.Text + "' and mb_status not in (1,-1)").ToString());
+                if (RejectNum > 0)
+                    OperatResult.AppendText(">>维修结果必须为已维修或无不良\n", Color.Red);
                 else
                 {
-                    string cr_id = dt.Rows[0]["cr_id"].ToString();
-                    dt = (DataTable)dh.ExecuteSql("select cd_ifinput from craftdetail left join step on st_code=cd_stepcode where cd_crid='" + cr_id + "' and cd_stepcode='" + cd_stepcode.Text + "' and st_statuscode='AUDITED'", "select");
+                    dt = (DataTable)dh.ExecuteSql("select cr_id from craft where cr_statuscode='AUDITED' and cr_code='" + cr_code.Text + "'", "select");
                     if (dt.Rows.Count == 0)
-                    {
-                        OperatResult.AppendText(">>回流工序不在回流工艺中\n", Color.Red);
-                    }
+                        OperatResult.AppendText(">>回流工序不存在\n", Color.Red);
                     else
                     {
-                        dh.UpdateByCondition("makeserial", "ms_nextstepcode='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_status=1", "ms_sncode='" + ms_sncode.Text + "'");
-                        dh.ExecuteSql(insert_makeprocess.Replace("#", "完成维修"), "insert", ms_sncode.Text, User.CurrentStepCode);
-                        OperatResult.AppendText(">>序列号" + ms_sncode.Text + "回流成功\n", Color.Green);
-                        GetSNCode.Clear();
+                        string cr_id = dt.Rows[0]["cr_id"].ToString();
+                        dt = (DataTable)dh.ExecuteSql("select cd_ifinput from craftdetail left join step on st_code=cd_stepcode where cd_crid='" + cr_id + "' and cd_stepcode='" + cd_stepcode.Text + "' and st_statuscode='AUDITED'", "select");
+                        if (dt.Rows.Count == 0)
+                            OperatResult.AppendText(">>回流工序不在回流工艺中\n", Color.Red);
+                        else
+                        {
+                            dh.UpdateByCondition("makeserial", "ms_nextstepcode='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_status=1", "ms_sncode='" + ms_sncode.Text + "'");
+                            dh.ExecuteSql(insert_makeprocess.Replace("#", "完成维修"), "insert", ms_sncode.Text, User.CurrentStepCode);
+                            OperatResult.AppendText(">>序列号" + ms_sncode.Text + "回流成功\n", Color.Green);
+                            GetSNCode.Clear();
+                        }
                     }
                 }
             }

+ 84 - 114
UAS-MES/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -83,9 +83,8 @@
             this.panel2.Controls.Add(this.label1);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(0, 0);
-            this.panel2.Margin = new System.Windows.Forms.Padding(4);
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(1230, 36);
+            this.panel2.Size = new System.Drawing.Size(922, 29);
             this.panel2.TabIndex = 30;
             // 
             // label1
@@ -93,10 +92,9 @@
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.label1.Location = new System.Drawing.Point(16, 5);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(12, 4);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 0;
             this.label1.Text = "工单信息";
             // 
@@ -104,10 +102,9 @@
             // 
             this.bc_remark_label.AutoSize = true;
             this.bc_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_remark_label.Location = new System.Drawing.Point(447, 203);
-            this.bc_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.bc_remark_label.Location = new System.Drawing.Point(335, 162);
             this.bc_remark_label.Name = "bc_remark_label";
-            this.bc_remark_label.Size = new System.Drawing.Size(92, 27);
+            this.bc_remark_label.Size = new System.Drawing.Size(74, 21);
             this.bc_remark_label.TabIndex = 25;
             this.bc_remark_label.Text = "不良备注";
             // 
@@ -115,10 +112,9 @@
             // 
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(308, 653);
-            this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_sncode_label.Location = new System.Drawing.Point(231, 522);
             this.ms_sncode_label.Name = "ms_sncode_label";
-            this.ms_sncode_label.Size = new System.Drawing.Size(72, 27);
+            this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_sncode_label.TabIndex = 18;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -126,10 +122,9 @@
             // 
             this.bc_groupcode_label.AutoSize = true;
             this.bc_groupcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_groupcode_label.Location = new System.Drawing.Point(27, 203);
-            this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.bc_groupcode_label.Location = new System.Drawing.Point(20, 162);
             this.bc_groupcode_label.Name = "bc_groupcode_label";
-            this.bc_groupcode_label.Size = new System.Drawing.Size(92, 27);
+            this.bc_groupcode_label.Size = new System.Drawing.Size(74, 21);
             this.bc_groupcode_label.TabIndex = 24;
             this.bc_groupcode_label.Text = "不良组别";
             // 
@@ -138,10 +133,9 @@
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Blue;
-            this.label2.Location = new System.Drawing.Point(26, 154);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(20, 123);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(92, 27);
+            this.label2.Size = new System.Drawing.Size(74, 21);
             this.label2.TabIndex = 0;
             this.label2.Text = "采集信息";
             // 
@@ -149,10 +143,9 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(27, 253);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(20, 202);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(92, 27);
+            this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 34;
             this.label3.Text = "不良代码";
             // 
@@ -161,10 +154,9 @@
             this.GoodProduct.AutoSize = true;
             this.GoodProduct.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GoodProduct.ForeColor = System.Drawing.Color.Blue;
-            this.GoodProduct.Location = new System.Drawing.Point(31, 647);
-            this.GoodProduct.Margin = new System.Windows.Forms.Padding(4);
+            this.GoodProduct.Location = new System.Drawing.Point(23, 518);
             this.GoodProduct.Name = "GoodProduct";
-            this.GoodProduct.Size = new System.Drawing.Size(83, 35);
+            this.GoodProduct.Size = new System.Drawing.Size(68, 29);
             this.GoodProduct.TabIndex = 35;
             this.GoodProduct.TabStop = true;
             this.GoodProduct.Text = "良品";
@@ -175,10 +167,9 @@
             this.Reject.AutoSize = true;
             this.Reject.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Reject.ForeColor = System.Drawing.Color.Red;
-            this.Reject.Location = new System.Drawing.Point(141, 647);
-            this.Reject.Margin = new System.Windows.Forms.Padding(4);
+            this.Reject.Location = new System.Drawing.Point(106, 518);
             this.Reject.Name = "Reject";
-            this.Reject.Size = new System.Drawing.Size(107, 35);
+            this.Reject.Size = new System.Drawing.Size(87, 29);
             this.Reject.TabIndex = 36;
             this.Reject.TabStop = true;
             this.Reject.Text = "不良品";
@@ -192,10 +183,10 @@
             this.columnHeader4,
             this.columnHeader1,
             this.columnHeader2});
-            this.WaitRejectList.Location = new System.Drawing.Point(29, 329);
-            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4);
+            this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.WaitRejectList.Location = new System.Drawing.Point(22, 263);
             this.WaitRejectList.Name = "WaitRejectList";
-            this.WaitRejectList.Size = new System.Drawing.Size(393, 304);
+            this.WaitRejectList.Size = new System.Drawing.Size(296, 244);
             this.WaitRejectList.TabIndex = 37;
             this.WaitRejectList.UseCompatibleStateImageBehavior = false;
             this.WaitRejectList.View = System.Windows.Forms.View.Details;
@@ -209,13 +200,13 @@
             // 
             this.columnHeader4.Text = "不良代码组";
             this.columnHeader4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            this.columnHeader4.Width = 100;
+            this.columnHeader4.Width = 130;
             // 
             // columnHeader1
             // 
             this.columnHeader1.Text = "不良代码";
             this.columnHeader1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            this.columnHeader1.Width = 80;
+            this.columnHeader1.Width = 96;
             // 
             // columnHeader2
             // 
@@ -227,10 +218,9 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(27, 298);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Location = new System.Drawing.Point(20, 238);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(92, 27);
+            this.label4.Size = new System.Drawing.Size(74, 21);
             this.label4.TabIndex = 39;
             this.label4.Text = "待选不良";
             // 
@@ -238,10 +228,9 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(542, 298);
-            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Location = new System.Drawing.Point(406, 238);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(92, 27);
+            this.label5.Size = new System.Drawing.Size(74, 21);
             this.label5.TabIndex = 40;
             this.label5.Text = "已选不良";
             // 
@@ -249,10 +238,9 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(946, 172);
-            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label6.Location = new System.Drawing.Point(710, 138);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(92, 27);
+            this.label6.Size = new System.Drawing.Size(74, 21);
             this.label6.TabIndex = 46;
             this.label6.Text = "操作结果";
             // 
@@ -264,10 +252,10 @@
             this.columnHeader3,
             this.columnHeader7,
             this.columnHeader8});
-            this.ChoosedRejectList.Location = new System.Drawing.Point(544, 329);
-            this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4);
+            this.ChoosedRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ChoosedRejectList.Location = new System.Drawing.Point(408, 263);
             this.ChoosedRejectList.Name = "ChoosedRejectList";
-            this.ChoosedRejectList.Size = new System.Drawing.Size(393, 304);
+            this.ChoosedRejectList.Size = new System.Drawing.Size(296, 244);
             this.ChoosedRejectList.TabIndex = 50;
             this.ChoosedRejectList.UseCompatibleStateImageBehavior = false;
             this.ChoosedRejectList.View = System.Windows.Forms.View.Details;
@@ -281,13 +269,13 @@
             // 
             this.columnHeader3.Text = "不良代码组";
             this.columnHeader3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            this.columnHeader3.Width = 95;
+            this.columnHeader3.Width = 130;
             // 
             // columnHeader7
             // 
             this.columnHeader7.Text = "不良代码";
             this.columnHeader7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            this.columnHeader7.Width = 80;
+            this.columnHeader7.Width = 94;
             // 
             // columnHeader8
             // 
@@ -299,9 +287,10 @@
             // 
             this.AutoBadCode.AutoSize = true;
             this.AutoBadCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoBadCode.Location = new System.Drawing.Point(126, 301);
+            this.AutoBadCode.Location = new System.Drawing.Point(94, 241);
+            this.AutoBadCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.AutoBadCode.Name = "AutoBadCode";
-            this.AutoBadCode.Size = new System.Drawing.Size(151, 24);
+            this.AutoBadCode.Size = new System.Drawing.Size(123, 21);
             this.AutoBadCode.TabIndex = 69;
             this.AutoBadCode.Text = "自动产生不良代码";
             this.AutoBadCode.UseVisualStyleBackColor = true;
@@ -310,10 +299,9 @@
             // 
             this.ma_qty_label.AutoSize = true;
             this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty_label.Location = new System.Drawing.Point(26, 109);
-            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty_label.Location = new System.Drawing.Point(20, 87);
             this.ma_qty_label.Name = "ma_qty_label";
-            this.ma_qty_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_qty_label.Size = new System.Drawing.Size(74, 21);
             this.ma_qty_label.TabIndex = 11;
             this.ma_qty_label.Text = "工单数量";
             // 
@@ -321,10 +309,9 @@
             // 
             this.ma_prodcode_label.AutoSize = true;
             this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode_label.Location = new System.Drawing.Point(438, 59);
-            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_prodcode_label.Location = new System.Drawing.Point(328, 47);
             this.ma_prodcode_label.Name = "ma_prodcode_label";
-            this.ma_prodcode_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.ma_prodcode_label.TabIndex = 7;
             this.ma_prodcode_label.Text = "产品编号";
             // 
@@ -332,10 +319,9 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(792, 59);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(594, 47);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 6;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -343,10 +329,9 @@
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(26, 59);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Location = new System.Drawing.Point(20, 47);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_makecode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_makecode_label.TabIndex = 2;
             this.ms_makecode_label.Text = "归属工单";
             // 
@@ -354,10 +339,9 @@
             // 
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty_label.Location = new System.Drawing.Point(438, 109);
-            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(328, 87);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
-            this.mcd_inqty_label.Size = new System.Drawing.Size(92, 27);
+            this.mcd_inqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_inqty_label.TabIndex = 14;
             this.mcd_inqty_label.Text = "已采集数";
             // 
@@ -365,10 +349,9 @@
             // 
             this.mc_restqty_label.AutoSize = true;
             this.mc_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mc_restqty_label.Location = new System.Drawing.Point(792, 109);
-            this.mc_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mc_restqty_label.Location = new System.Drawing.Point(594, 87);
             this.mc_restqty_label.Name = "mc_restqty_label";
-            this.mc_restqty_label.Size = new System.Drawing.Size(92, 27);
+            this.mc_restqty_label.Size = new System.Drawing.Size(74, 21);
             this.mc_restqty_label.TabIndex = 17;
             this.mc_restqty_label.Text = "待采集数";
             // 
@@ -378,11 +361,10 @@
             this.bc_code.BackColor = System.Drawing.Color.White;
             this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_code.ID = null;
-            this.bc_code.Location = new System.Drawing.Point(148, 253);
-            this.bc_code.Margin = new System.Windows.Forms.Padding(4);
+            this.bc_code.Location = new System.Drawing.Point(111, 202);
             this.bc_code.Name = "bc_code";
             this.bc_code.Power = null;
-            this.bc_code.Size = new System.Drawing.Size(251, 28);
+            this.bc_code.Size = new System.Drawing.Size(189, 24);
             this.bc_code.Str = null;
             this.bc_code.Str1 = null;
             this.bc_code.Str2 = null;
@@ -396,13 +378,12 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(147, 59);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_code.Location = new System.Drawing.Point(110, 47);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(196, 25);
+            this.ma_code.Size = new System.Drawing.Size(147, 21);
             this.ma_code.TabIndex = 67;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "ma_code";
@@ -412,9 +393,10 @@
             // 
             this.LockMakeCode.AutoSize = true;
             this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.LockMakeCode.Location = new System.Drawing.Point(361, 62);
+            this.LockMakeCode.Location = new System.Drawing.Point(271, 50);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.LockMakeCode.Name = "LockMakeCode";
-            this.LockMakeCode.Size = new System.Drawing.Size(61, 24);
+            this.LockMakeCode.Size = new System.Drawing.Size(51, 21);
             this.LockMakeCode.TabIndex = 66;
             this.LockMakeCode.Text = "锁定";
             this.LockMakeCode.UseVisualStyleBackColor = true;
@@ -423,10 +405,9 @@
             // 
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(914, 109);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty.Location = new System.Drawing.Point(686, 87);
             this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 27);
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
             this.mcd_remainqty.TabIndex = 57;
             this.mcd_remainqty.Tag = "mcd_remainqty";
             // 
@@ -434,30 +415,27 @@
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(914, 59);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail.Location = new System.Drawing.Point(686, 47);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 27);
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 56;
             // 
             // ma_qty
             // 
             this.ma_qty.AutoSize = true;
             this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty.Location = new System.Drawing.Point(143, 109);
-            this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty.Location = new System.Drawing.Point(107, 87);
             this.ma_qty.Name = "ma_qty";
-            this.ma_qty.Size = new System.Drawing.Size(0, 27);
+            this.ma_qty.Size = new System.Drawing.Size(0, 21);
             this.ma_qty.TabIndex = 55;
             // 
             // mcd_inqty
             // 
             this.mcd_inqty.AutoSize = true;
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(561, 109);
-            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_inqty.Location = new System.Drawing.Point(421, 87);
             this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 27);
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
             this.mcd_inqty.TabIndex = 54;
             this.mcd_inqty.Tag = "mcd_inqty";
             // 
@@ -465,19 +443,17 @@
             // 
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(561, 59);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_prodcode.Location = new System.Drawing.Point(421, 47);
             this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
             this.ma_prodcode.TabIndex = 53;
             // 
             // 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(951, 203);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(713, 162);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(275, 430);
+            this.OperateResult.Size = new System.Drawing.Size(207, 345);
             this.OperateResult.TabIndex = 52;
             this.OperateResult.Text = "";
             // 
@@ -488,13 +464,12 @@
             this.CleanInfo.DownImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.DownImage")));
             this.CleanInfo.Image = ((System.Drawing.Image)(resources.GetObject("CleanInfo.Image")));
             this.CleanInfo.IsShowBorder = true;
-            this.CleanInfo.Location = new System.Drawing.Point(1046, 648);
-            this.CleanInfo.Margin = new System.Windows.Forms.Padding(4);
+            this.CleanInfo.Location = new System.Drawing.Point(784, 518);
             this.CleanInfo.MoveImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.MoveImage")));
             this.CleanInfo.Name = "CleanInfo";
             this.CleanInfo.NormalImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.NormalImage")));
             this.CleanInfo.Power = null;
-            this.CleanInfo.Size = new System.Drawing.Size(81, 30);
+            this.CleanInfo.Size = new System.Drawing.Size(61, 24);
             this.CleanInfo.TabIndex = 47;
             this.CleanInfo.Text = "清除内容";
             this.CleanInfo.UseVisualStyleBackColor = true;
@@ -503,10 +478,9 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(452, 538);
-            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4);
+            this.ChooseedReject.Location = new System.Drawing.Point(339, 430);
             this.ChooseedReject.Name = "ChooseedReject";
-            this.ChooseedReject.Size = new System.Drawing.Size(67, 29);
+            this.ChooseedReject.Size = new System.Drawing.Size(50, 23);
             this.ChooseedReject.TabIndex = 45;
             this.ChooseedReject.UseVisualStyleBackColor = true;
             this.ChooseedReject.Click += new System.EventHandler(this.ChooseedReject_Click);
@@ -514,10 +488,9 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(452, 458);
-            this.WaitReject.Margin = new System.Windows.Forms.Padding(4);
+            this.WaitReject.Location = new System.Drawing.Point(339, 366);
             this.WaitReject.Name = "WaitReject";
-            this.WaitReject.Size = new System.Drawing.Size(67, 29);
+            this.WaitReject.Size = new System.Drawing.Size(50, 23);
             this.WaitReject.TabIndex = 44;
             this.WaitReject.UseVisualStyleBackColor = true;
             this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
@@ -527,12 +500,11 @@
             this.bc_remark.AllPower = null;
             this.bc_remark.BackColor = System.Drawing.Color.White;
             this.bc_remark.ID = null;
-            this.bc_remark.Location = new System.Drawing.Point(547, 204);
-            this.bc_remark.Margin = new System.Windows.Forms.Padding(4);
+            this.bc_remark.Location = new System.Drawing.Point(410, 163);
             this.bc_remark.Multiline = true;
             this.bc_remark.Name = "bc_remark";
             this.bc_remark.Power = null;
-            this.bc_remark.Size = new System.Drawing.Size(393, 77);
+            this.bc_remark.Size = new System.Drawing.Size(296, 62);
             this.bc_remark.Str = null;
             this.bc_remark.Str1 = null;
             this.bc_remark.Str2 = null;
@@ -542,10 +514,9 @@
             // 
             this.bc_groupcode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_groupcode.FormattingEnabled = true;
-            this.bc_groupcode.Location = new System.Drawing.Point(148, 204);
-            this.bc_groupcode.Margin = new System.Windows.Forms.Padding(4);
+            this.bc_groupcode.Location = new System.Drawing.Point(111, 163);
             this.bc_groupcode.Name = "bc_groupcode";
-            this.bc_groupcode.Size = new System.Drawing.Size(251, 26);
+            this.bc_groupcode.Size = new System.Drawing.Size(189, 22);
             this.bc_groupcode.TabIndex = 21;
             this.bc_groupcode.SelectedIndexChanged += new System.EventHandler(this.bc_groupcode_SelectedIndexChanged);
             // 
@@ -555,11 +526,10 @@
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(423, 653);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.ms_sncode.Location = new System.Drawing.Point(317, 522);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
-            this.ms_sncode.Size = new System.Drawing.Size(240, 28);
+            this.ms_sncode.Size = new System.Drawing.Size(181, 24);
             this.ms_sncode.Str = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str2 = null;
@@ -574,12 +544,13 @@
             this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
             this.Save.Image = null;
             this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(705, 648);
+            this.Save.Location = new System.Drawing.Point(529, 518);
+            this.Save.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
             this.Save.Power = null;
-            this.Save.Size = new System.Drawing.Size(87, 33);
+            this.Save.Size = new System.Drawing.Size(65, 26);
             this.Save.TabIndex = 70;
             this.Save.Text = "保存";
             this.Save.UseVisualStyleBackColor = false;
@@ -587,10 +558,10 @@
             // 
             // Make_TestCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.Control;
-            this.ClientSize = new System.Drawing.Size(1230, 710);
+            this.ClientSize = new System.Drawing.Size(922, 568);
             this.Controls.Add(this.Save);
             this.Controls.Add(this.AutoBadCode);
             this.Controls.Add(this.bc_code);
@@ -629,7 +600,6 @@
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.KeyPreview = true;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_TestCollection";
             this.Tag = "Make!TestCollection";
             this.Text = " ";

+ 49 - 12
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -159,6 +159,11 @@ namespace UAS_MES.Make
                     string oMSID = "";
                     if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
                     {
+                        dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,pr_detail,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='"+oMakeCode+"'", "select");
+                        if (dt.Rows.Count > 0) {
+                            BaseUtil.SetFormValue(this.Controls, dt);
+                            LockMakeCode.Checked = true;
+                        }
                         if (GoodProduct.Checked)
                         {
                             dt = (DataTable)dh.ExecuteSql("select ms_nextstepcode,ms_stepcode,ms_status from makeserial where ms_id='" + oMSID + "'", "select");
@@ -199,11 +204,11 @@ namespace UAS_MES.Make
             if (dt.Rows.Count == 0)
             {
                 sql.Clear();
-                sql.Append("select bg_code||':'||bg_name bg_code from badgroup");
+                sql.Append("select bg_code||':'||bg_name bg_name,bg_code from badgroup");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                bc_groupcode.DataSource = dt;
-                bc_groupcode.DisplayMember = "bg_code";
+                bc_groupcode.DisplayMember = "bg_name";
                 bc_groupcode.ValueMember = "bg_code";
+                bc_groupcode.DataSource = dt;
                 //设置Combox的下拉值
             }
             else
@@ -220,7 +225,8 @@ namespace UAS_MES.Make
         private void LoadBadCodeListView()
         {
             sql.Clear();
-            sql.Append("select bg_code||':'||bg_name bg_code,bc_name,bc_note from badcode left join badgroup on bc_groupcode=bg_code where bc_groupcode='" + bc_groupcode.Text + "' and bg_code is not null");
+            object bg_code = bc_groupcode.SelectedValue;
+            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,bc_note from badcode left join badgroup on bc_groupcode=bg_code where bc_groupcode='" + (bg_code != null ? bg_code.ToString() : "") + "' and bg_code is not null");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             //往listview中添加数据
             WaitRejectList.Items.Clear();
@@ -235,6 +241,23 @@ namespace UAS_MES.Make
                 WaitRejectList.Items.Add(lvi);
             }
             WaitRejectList.EndUpdate();
+            sql.Clear();
+            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,mb_badremark from makebad  ") ;
+            sql.Append("left join badgroup on mb_bgcode=bg_code left join badcode on mb_badcode=bc_code ");
+            sql.Append(" where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "'");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            ChoosedRejectList.Items.Clear();
+            ChoosedRejectList.BeginUpdate();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                ListViewItem lvi = new ListViewItem();
+                //第一列是勾选列,设置列头文本为空
+                lvi.Text = "";
+                for (int j = 0; j < dt.Columns.Count; j++)
+                    lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                ChoosedRejectList.Items.Add(lvi);
+            }
+            ChoosedRejectList.EndUpdate();
         }
 
         /// <summary>
@@ -259,11 +282,11 @@ namespace UAS_MES.Make
                 string RejectRecordNum = dh.getFieldDataByCondition("makeBad", "count(1) cn", "mb_sncode='" + ms_sncode.Text + "' and mb_status not in (1,-1)").ToString();
                 //存在不良记录
                 if (int.Parse(RejectRecordNum) > 0)
-                    OperateResult.AppendText(">>" + ms_sncode.Text + "存在不良记录,不允许通过!\n", Color.Red);
+                    OperateResult.AppendText(">>" + ms_sncode.Text + "已经判为不良品,不允许修改!\n", Color.Red);
                 else
                 {
                     //良品信息采集
-                    if (LogicHandler.UpdateMakeMessage(ms_sncode.Text, ma_code.Text, User.UserSourceCode, User.UserCode, "检测合格", out ErrorMessage))
+                    if (LogicHandler.UpdateMakeMessage(ms_sncode.Text, ma_code.Text, "良品采集", User.UserSourceCode, User.UserCode, "检测合格", out ErrorMessage))
                         OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为良品\n", Color.Green);
                     else
                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
@@ -288,9 +311,10 @@ namespace UAS_MES.Make
             string ErrorMessage = "";
             if (AutoBadCode.Checked)
             {
-                bccode = new string[] { "DefaultValue" };
-                bcremark = new string[] { "DefaultValue" };
-                bgcode = new string[] { "DefaultValue" };
+                string defaultvalue = Properties.Settings.Default.DefaultCollectionValue;
+                bccode = new string[] { defaultvalue };
+                bcremark = new string[] { defaultvalue };
+                bgcode = new string[] { defaultvalue };
             }
             else
             {
@@ -305,7 +329,7 @@ namespace UAS_MES.Make
                     //如果长度不相等表示用户自行填写了
                     if (bccode.Length != RejectCount)
                     {
-                        bgcode[0] = bc_groupcode.Text;
+                        bgcode[0] = bc_groupcode.SelectedValue.ToString();
                         bccode[0] = bc_code.Text;
                         bcremark[0] = bc_remark.Text;
                     }
@@ -314,7 +338,8 @@ namespace UAS_MES.Make
                     {
                         if (!(bccode[0] == ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[1].Text))
                         {
-                            bgcode[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[1].Text;
+                            //截取分号前面的内容
+                            bgcode[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[1].Text.Split(':')[0];
                             //获取所有的不良代码
                             bccode[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[2].Text;
                             //获取所有的不良备注
@@ -323,7 +348,20 @@ namespace UAS_MES.Make
                     }
                 }
             }
+            //如果之前是良品的
+            dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno" }, "ms_sncode='" + ms_sncode.Text + "' and ms_stepcode='" + User.CurrentStepCode + "'");
+            if (dt.Rows.Count > 0)
+            {
+                string status = dt.Rows[0]["ms_status"].ToString();
+                if (status == "1" || status == "2")
+                    dh.UpdateByCondition("makecraftdetail", "mcd_okqty=mcd_okqty-1", "mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                string checkno = dt.Rows[0]["ms_checkno"].ToString();
+                //存在抽检批次更新为空
+                if (checkno != "")
+                    dh.UpdateByCondition("makeserial", "ms_checkno=''", "ms_sncode='" + ms_sncode.Text + "' and ms_makecode='" + ma_code.Text + "'");
+            }
             //不良信息采集
+            dh.ExecuteSql("delete from makebad where mb_sncode='"+ms_sncode.Text+"' and mb_makecode='"+ma_code.Text+"'","delete");
             if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserName, User.UserSourceCode, "检查未通过", bgcode, bccode, bcremark, out ErrorMessage))
             {
                 OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为不良\n", Color.Green);
@@ -337,7 +375,6 @@ namespace UAS_MES.Make
             }
             else
                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
-
         }
 
         private void bc_code_KeyDown(object sender, KeyEventArgs e)

+ 1 - 1
UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.cs

@@ -298,7 +298,7 @@ namespace UAS_MES.OQC
                 {
                     //更新下一工序
                     string ErrorMessage = "";
-                    LogicHandler.UpdateMakeMessage(ms_sncode.Text, ob_makecode.Text, User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
+                    LogicHandler.UpdateMakeMessage(ms_sncode.Text, ob_makecode.Text,"OQC批判过", User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
                     //记录操作日志
                     LogicHandler.InsertMakeProcess(ms_sncode.Text, ob_makecode.Text, "批结果判定", Operate, User.UserName);
                 }

+ 2 - 2
UAS-MES/Login.cs

@@ -64,8 +64,8 @@ namespace UAS_MES
             if (lgc == null)
                 lgc = new LogicHandler();
             BaseUtil.SetFormCenter(this);
-            try { CertImport(); }
-            catch (Exception) { }
+            //try { CertImport(); }
+            //catch (Exception) { }
         }
 
         //点击登陆按钮的时候

+ 14 - 2
UAS-MES/Properties/Settings.Designer.cs

@@ -86,12 +86,24 @@ namespace UAS_MES.Properties {
         [global::System.Configuration.ApplicationScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.Configuration.DefaultSettingValueAttribute("Password=select!#%*(;User ID=UAS_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDR" +
-            "ESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.17.158.219)(PORT=1521)))(CONNECT_DATA=" +
-            "(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
+            "ESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.253.6)(PORT=1521)))(CONNECT_DATA=(" +
+            "SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
         public string MES {
             get {
                 return ((string)(this["MES"]));
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("DefaultValue")]
+        public string DefaultCollectionValue {
+            get {
+                return ((string)(this["DefaultCollectionValue"]));
+            }
+            set {
+                this["DefaultCollectionValue"] = value;
+            }
+        }
     }
 }

+ 4 - 1
UAS-MES/Properties/Settings.settings

@@ -18,7 +18,10 @@
       <Value Profile="(Default)" />
     </Setting>
     <Setting Name="MES" Type="System.String" Scope="Application">
-      <Value Profile="(Default)">Password=select!#%*(;User ID=UAS_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.17.158.219)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
+      <Value Profile="(Default)">Password=select!#%*(;User ID=UAS_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.253.6)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
+    </Setting>
+    <Setting Name="DefaultCollectionValue" Type="System.String" Scope="User">
+      <Value Profile="(Default)">DefaultValue</Value>
     </Setting>
   </Settings>
 </SettingsFile>

+ 2 - 1
UAS-MES/PublicMethod/BaseUtil.cs

@@ -82,7 +82,7 @@ namespace UAS_MES.PublicMethod
                     string controlName = collection[i].Name;
                     string controlsTag = collection[i].Tag == null ? "" : collection[i].Tag.ToString();
                     //默认给TextBox和Label赋值
-                    if (collection[i] is TextBox || collection[i] is Label || collection[i] is SearchTextBox)
+                    if (collection[i] is TextBox || collection[i] is Label || collection[i] is SearchTextBox||collection[i] is MaCodeSearchTextBox)
                     {
                         for (int j = 0; j < dt.Columns.Count; j++)
                         {
@@ -140,6 +140,7 @@ namespace UAS_MES.PublicMethod
                                 {
                                     if (controlName.ToUpper() == dt.Columns[k].Caption.ToUpper())
                                     {
+                                        Console.WriteLine(controlName);
                                         collection[i].Controls[j].Text = dt.Rows[0][k].ToString();
                                     }
                                 }

+ 6 - 5
UAS-MES/PublicMethod/LogicHandler.cs

@@ -1088,19 +1088,19 @@ namespace UAS_MES.PublicMethod
             sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + iUserName + "',sysdate,'" + StepCode + "',ms_sourcecode,:bc_code,:bg_code,'',");
             sql.Append("sp_soncode,'0',:bc_remark from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
             sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + iSnCode + "'");
-            dh.BatchInsert(sql.ToString(), new string[] { "bg_code", "bc_code", "bc_remark" }, iBadGroupCode, iBadCode, iBadRemark);
+            dh.BatchInsert(sql.ToString(), new string[] { "bc_code", "bg_code", "bc_remark" }, iBadCode, iBadGroupCode, iBadRemark);
             //更新序列号状态,待维修,返修工序
             string st_rstepcode = dh.getFieldDataByCondition("step", "st_rstepcode", "st_code='" + StepCode + "'").ToString();
             sql.Clear();
             sql.Append("update makeserial set ms_status = 3,ms_nextstepcode ='" + st_rstepcode + "', ");
             sql.Append("ms_stepcode ='" + StepCode + "' where ms_sncode ='" + iSnCode + "' and ms_makecode ='" + iMakeCode + "'");
             dh.ExecuteSql(sql.ToString(), "update");
-            //更新makecraftdetail 工单采集记录表,根据工单号和工序编号 记录当前测试工序采集数量
-            dh.UpdateByCondition("makecraftdetail", "mcd_inqty=mcd_inqty+1,mcd_outqty = mcd_outqty + 1", "mcd_macode='" + iMakeCode + "' and mcd_stepcode='" + StepCode + "'");
+            ////更新makecraftdetail 工单采集记录表,根据工单号和工序编号 记录当前测试工序采集数量
+            //dh.UpdateByCondition("makecraftdetail", "mcd_inqty=mcd_inqty+1,mcd_outqty = mcd_outqty + 1", "mcd_macode='" + iMakeCode + "' and mcd_stepcode='" + StepCode + "'");
             //更新序列号已经采集的工序 ms_paststep 已采集数据,更新下一工序
             dh.UpdateByCondition("makeserial", "ms_paststep = ms_paststep ||'," + StepCode + "'", "ms_sncode='" + iSnCode + "'");
             //记录操作日志
-            InsertMakeProcess(iSnCode, iMakeCode, "测试采集", iResult, iUserName);
+            InsertMakeProcess(iSnCode, iMakeCode, "不良采集", iResult, iUserName);
             //判断当前采集点是否为扣料工序cd_ifreduce =-1 则为扣料工序
             SetStepFinish(iMakeCode, iSourceCode, iSnCode, iUserName, out oErrorMessage);
             //SetCollectionFinish(iSnCode, iMakeCode, iUserName, iSourceCode, out oErrorMessage);
@@ -1300,8 +1300,9 @@ namespace UAS_MES.PublicMethod
         /// <param name="iResult"></param>
         /// <param name="oErrorMessage"></param>
         /// <returns></returns>
-        public static bool UpdateMakeMessage(string iSnCode, string iMakeCode, string iSourceCode, string iUserName, string iResult, out string oErrorMessage)
+        public static bool UpdateMakeMessage(string iSnCode, string iMakeCode, string iMaKind, string iSourceCode, string iUserName, string iResult, out string oErrorMessage)
         {
+            InsertMakeProcess(iSnCode, iMakeCode, iMaKind, iResult, iUserName);
             return SetStepFinish(iMakeCode, iSourceCode, iSnCode, iUserName, out oErrorMessage);
             //oErrorMessage = "";
             //string StepCode = "";

+ 60 - 60
UAS-MES/UAS-MES.csproj

@@ -22,7 +22,7 @@
     </SccAuxPath>
     <SccProvider>
     </SccProvider>
-    <PublishUrl>F:\MESRelease\</PublishUrl>
+    <PublishUrl>ftp://192.168.253.9/MESSetting/</PublishUrl>
     <Install>true</Install>
     <InstallFrom>Web</InstallFrom>
     <UpdateEnabled>true</UpdateEnabled>
@@ -71,7 +71,7 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <PropertyGroup>
-    <ManifestCertificateThumbprint>4FA99E585616700DE7B55D9E1B52AECEA80A31C9</ManifestCertificateThumbprint>
+    <ManifestCertificateThumbprint>01BF432DDD776482A81ACE90FD6AEDAE068A5216</ManifestCertificateThumbprint>
   </PropertyGroup>
   <PropertyGroup>
     <ManifestKeyFile>
@@ -1158,292 +1158,292 @@
   <ItemGroup>
     <PublishFile Include="BtSystem.Client">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="BtSystem.Client.Reader">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="BtSystem.Interfaces">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="BtSystem.Network">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="BtSystem.Reprint.Support">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="BtSystem.Strings">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="BtSystem.Support">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="BtSystem.UI">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="DevComponents.DotNetBar2">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="DevExpress.Data.v11.1">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="DevExpress.Printing.v11.1.Core">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="DevExpress.Utils.v11.1">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="DevExpress.Xpo.v11.1">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="DevExpress.XtraBars.v11.1">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="DevExpress.XtraEditors.v11.1">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="DevExpress.XtraGrid.v11.1">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="DevExpress.XtraLayout.v11.1">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Interop.BarTender">
       <Visible>False</Visible>
-      <PublishState>Include</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Include</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Interop.DriverAutomationLibrary">
       <Visible>False</Visible>
-      <PublishState>Include</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Include</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Interop.NetFwTypeLib">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Maestro.Interface">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Maestro.Library">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Seagull.Framework">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Seagull.Framework.Interop">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Seagull.Interop">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Seagull.Librarian.Core">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Seagull.Security">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Seagull.Security.Interop">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
     <PublishFile Include="Seagull.XpoDataAccess">
       <Visible>False</Visible>
-      <PublishState>Exclude</PublishState>
-      <IncludeHash>True</IncludeHash>
       <Group>
       </Group>
       <TargetPath>
       </TargetPath>
+      <PublishState>Exclude</PublishState>
+      <IncludeHash>True</IncludeHash>
       <FileType>Assembly</FileType>
     </PublishFile>
   </ItemGroup>

+ 1 - 1
UAS-出货标签管理/Login.cs

@@ -29,7 +29,7 @@ namespace UAS_LabelMachine
         {
             dh = new DataHelper();
             //获取账套信息
-            dt = (DataTable)dh.ExecuteSql("select ma_function,ms_pwd,ma_user from master where ma_enable<>0", "select");
+            dt = (DataTable)dh.ExecuteSql("select ma_function,ms_pwd,ma_user from datacenter.master where ma_enable<>0", "select");
             MasterCombox.DisplayMember = "ma_function";
             MasterCombox.ValueMember = "ma_user";
             MasterCombox.DataSource = dt;

+ 31 - 4
UAS-出货标签管理/PublicMethod/DataHelper.cs

@@ -21,7 +21,7 @@ namespace UAS_LabelMachine
         //富为外网地址
         //private readonly string ConnectionStrings = "Data Source=richwellgroup.com.cn/orcl;User ID=DATACENTER;PassWord=select!#%*(";
         //怡海能达外网地址
-        private readonly string ConnectionStrings = "Data Source=sz.hi-mantech.com/orcl;User ID=DATACENTER;PassWord=select!#%*(";
+        private readonly string ConnectionStrings = "Data Source=sz.hi-mantech.com/orcl;User ID=YHND_SZ;PassWord=select!#%*(";
         //怡海能达内网地址
         //private readonly string ConnectionStrings = "Data Source=192.168.1.200/orcl;User ID=DATACENTER;PassWord=select!#%*(";
         //用户选择的数据库的连接字符串
@@ -29,6 +29,10 @@ namespace UAS_LabelMachine
         static OracleConnection connection = null;
         static OracleCommand command = null;
         /// <summary>
+        /// 重置连接的次数
+        /// </summary>
+        int ReconnectTime = 0;
+        /// <summary>
         /// 执行构造函数的时候打开数据库的链接
         /// </summary>
         public DataHelper()
@@ -98,7 +102,22 @@ namespace UAS_LabelMachine
             command = new OracleCommand(sql, connection);
             OracleDataAdapter ad = new OracleDataAdapter();
             ad.SelectCommand = command;
-            ad.Fill(dt);
+            try
+            {
+                ad.Fill(dt);
+                ReconnectTime = 0;
+            }
+            catch (Exception)
+            {
+                if (ReconnectTime == 0)
+                {
+                    ReconnectTime++;
+                    connection = new OracleConnection(DBConnectionString);
+                    //成功执行后将重复连接数置为0
+                    dt = (DataTable)getFieldDataByCondition(TableName, Field, Condition);
+                }
+            }
+
             if (dt.Rows.Count > 0)
             {
                 ad.Dispose();
@@ -743,6 +762,7 @@ namespace UAS_LabelMachine
             }
         }
 
+      
         /// <summary>
         /// 直接执行SQL,同时传入SQL的类型
         /// </summary>
@@ -790,11 +810,18 @@ namespace UAS_LabelMachine
                         OracleDataAdapter ad = new OracleDataAdapter(command);
                         ad.Fill((DataTable)result);
                         ad.Dispose();
+                        //成功执行后将重复连接数置为0
+                        ReconnectTime = 0;
                     }
                     catch (Exception)
                     {
-                        connection = new OracleConnection(DBConnectionString);
-                        result = ExecuteSql(SQL, Type, names);
+                        if (ReconnectTime == 0)
+                        {
+                            //重置的数据库链接后只执行一次
+                            ReconnectTime=ReconnectTime+1;
+                            connection = new OracleConnection(DBConnectionString);
+                            result = ExecuteSql(SQL, Type, names);
+                        }
                     }
                     break;
                 case "DELETE":

+ 1 - 0
UAS-出货标签管理/PublicMethod/ftpOperater.cs

@@ -149,6 +149,7 @@ namespace UAS_LabelMachine
                 reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;
                 reqFTP.UseBinary = true;
                 reqFTP.Credentials = new NetworkCredential(ftpUser, ftpPwd);
+                reqFTP.UsePassive = true;
                 FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
                 Stream ftpStream = response.GetResponseStream();
                 long cl = response.ContentLength;

+ 5 - 9
UAS-出货标签管理/UAS-出货标签管理.csproj

@@ -100,6 +100,11 @@
     <Reference Include="Analysis">
       <HintPath>tool\Analysis.dll</HintPath>
     </Reference>
+    <Reference Include="Interop.LabelManager2, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <EmbedInteropTypes>False</EmbedInteropTypes>
+      <HintPath>bin\Debug\Interop.LabelManager2.dll</HintPath>
+    </Reference>
     <Reference Include="NPOI">
       <HintPath>tool\NPOI.dll</HintPath>
     </Reference>
@@ -647,15 +652,6 @@
     <None Include="Resources\preview_16px_25980_easyicon.net.png" />
   </ItemGroup>
   <ItemGroup>
-    <COMReference Include="LabelManager2">
-      <Guid>{3624B9C2-9E5D-11D3-A896-00C04F324E22}</Guid>
-      <VersionMajor>6</VersionMajor>
-      <VersionMinor>0</VersionMinor>
-      <Lcid>0</Lcid>
-      <WrapperTool>tlbimp</WrapperTool>
-      <Isolated>False</Isolated>
-      <EmbedInteropTypes>False</EmbedInteropTypes>
-    </COMReference>
     <COMReference Include="stdole">
       <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
       <VersionMajor>2</VersionMajor>

+ 148 - 146
UAS-出货标签管理/UAS_出货标签管理.Designer.cs

@@ -111,11 +111,13 @@
             this.MessageLog = new UAS_LabelMachine.CustomControl.RichText.RichTextAutoBottom();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
             this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.pib_id1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_vendprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_cusbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -127,8 +129,6 @@
             this.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.SingleLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.ViVoPlate = new System.Windows.Forms.Button();
@@ -222,7 +222,7 @@
             this.AutoMatch.AutoSize = true;
             this.AutoMatch.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoMatch.Location = new System.Drawing.Point(192, 132);
-            this.AutoMatch.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.AutoMatch.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.AutoMatch.Name = "AutoMatch";
             this.AutoMatch.Size = new System.Drawing.Size(104, 28);
             this.AutoMatch.TabIndex = 49;
@@ -260,10 +260,10 @@
             "盘",
             "盒",
             "全部"});
-            this.CollectionUnit.Location = new System.Drawing.Point(395, 227);
-            this.CollectionUnit.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.CollectionUnit.Location = new System.Drawing.Point(395, 228);
+            this.CollectionUnit.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.CollectionUnit.Name = "CollectionUnit";
-            this.CollectionUnit.Size = new System.Drawing.Size(70, 28);
+            this.CollectionUnit.Size = new System.Drawing.Size(71, 28);
             this.CollectionUnit.TabIndex = 41;
             // 
             // CollectionUnit_label
@@ -281,9 +281,9 @@
             // 
             this.GenerateBarCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GenerateBarCode.Location = new System.Drawing.Point(499, 222);
-            this.GenerateBarCode.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.GenerateBarCode.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.GenerateBarCode.Name = "GenerateBarCode";
-            this.GenerateBarCode.Size = new System.Drawing.Size(91, 33);
+            this.GenerateBarCode.Size = new System.Drawing.Size(91, 32);
             this.GenerateBarCode.TabIndex = 41;
             this.GenerateBarCode.Text = "生成条码";
             this.GenerateBarCode.UseVisualStyleBackColor = true;
@@ -293,9 +293,9 @@
             // 
             this.LabelMainTain.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.LabelMainTain.Location = new System.Drawing.Point(597, 222);
-            this.LabelMainTain.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.LabelMainTain.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.LabelMainTain.Name = "LabelMainTain";
-            this.LabelMainTain.Size = new System.Drawing.Size(91, 33);
+            this.LabelMainTain.Size = new System.Drawing.Size(91, 32);
             this.LabelMainTain.TabIndex = 57;
             this.LabelMainTain.Text = "标签维护";
             this.LabelMainTain.UseVisualStyleBackColor = true;
@@ -305,9 +305,9 @@
             // 
             this.SaveGrid.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.SaveGrid.Location = new System.Drawing.Point(597, 270);
-            this.SaveGrid.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.SaveGrid.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.SaveGrid.Name = "SaveGrid";
-            this.SaveGrid.Size = new System.Drawing.Size(91, 33);
+            this.SaveGrid.Size = new System.Drawing.Size(91, 32);
             this.SaveGrid.TabIndex = 59;
             this.SaveGrid.Text = "保存明细";
             this.SaveGrid.UseVisualStyleBackColor = true;
@@ -328,9 +328,9 @@
             // 
             this.CollectionSetting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectionSetting.Location = new System.Drawing.Point(307, 130);
-            this.CollectionSetting.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.CollectionSetting.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.CollectionSetting.Name = "CollectionSetting";
-            this.CollectionSetting.Size = new System.Drawing.Size(117, 33);
+            this.CollectionSetting.Size = new System.Drawing.Size(117, 32);
             this.CollectionSetting.TabIndex = 63;
             this.CollectionSetting.Text = "采集策略设置";
             this.CollectionSetting.UseVisualStyleBackColor = true;
@@ -350,10 +350,10 @@
             this.si_expression,
             this.si_item});
             this.Si_ItemDGV.Location = new System.Drawing.Point(432, 20);
-            this.Si_ItemDGV.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.Si_ItemDGV.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.Si_ItemDGV.Name = "Si_ItemDGV";
             this.Si_ItemDGV.RowTemplate.Height = 23;
-            this.Si_ItemDGV.Size = new System.Drawing.Size(178, 180);
+            this.Si_ItemDGV.Size = new System.Drawing.Size(179, 180);
             this.Si_ItemDGV.TabIndex = 65;
             // 
             // si_detno
@@ -412,9 +412,9 @@
             // 
             this.CleanDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CleanDetail.Location = new System.Drawing.Point(499, 270);
-            this.CleanDetail.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.CleanDetail.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.CleanDetail.Name = "CleanDetail";
-            this.CleanDetail.Size = new System.Drawing.Size(91, 33);
+            this.CleanDetail.Size = new System.Drawing.Size(91, 32);
             this.CleanDetail.TabIndex = 66;
             this.CleanDetail.Text = "清除明细";
             this.CleanDetail.UseVisualStyleBackColor = true;
@@ -424,7 +424,7 @@
             // 
             this.pib_id.AutoSize = true;
             this.pib_id.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pib_id.Location = new System.Drawing.Point(190, 200);
+            this.pib_id.Location = new System.Drawing.Point(189, 200);
             this.pib_id.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pib_id.Name = "pib_id";
             this.pib_id.Size = new System.Drawing.Size(0, 24);
@@ -435,7 +435,7 @@
             // 
             this.pi_cardcode.AutoSize = true;
             this.pi_cardcode.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_cardcode.Location = new System.Drawing.Point(103, 47);
+            this.pi_cardcode.Location = new System.Drawing.Point(103, 48);
             this.pi_cardcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pi_cardcode.Name = "pi_cardcode";
             this.pi_cardcode.Size = new System.Drawing.Size(0, 24);
@@ -445,7 +445,7 @@
             // 
             this.pi_cardcode_label.AutoSize = true;
             this.pi_cardcode_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_cardcode_label.Location = new System.Drawing.Point(4, 47);
+            this.pi_cardcode_label.Location = new System.Drawing.Point(4, 48);
             this.pi_cardcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pi_cardcode_label.Name = "pi_cardcode_label";
             this.pi_cardcode_label.Size = new System.Drawing.Size(82, 24);
@@ -455,7 +455,7 @@
             // Fresh
             // 
             this.Fresh.AutoSize = true;
-            this.Fresh.Location = new System.Drawing.Point(304, 17);
+            this.Fresh.Location = new System.Drawing.Point(304, 18);
             this.Fresh.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Fresh.Name = "Fresh";
             this.Fresh.Size = new System.Drawing.Size(37, 15);
@@ -468,7 +468,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(3, 727);
+            this.label3.Location = new System.Drawing.Point(3, 728);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(92, 27);
@@ -479,8 +479,8 @@
             // 
             this.CleanInputAfterCollect.AutoSize = true;
             this.CleanInputAfterCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CleanInputAfterCollect.Location = new System.Drawing.Point(308, 273);
-            this.CleanInputAfterCollect.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.CleanInputAfterCollect.Location = new System.Drawing.Point(308, 272);
+            this.CleanInputAfterCollect.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.CleanInputAfterCollect.Name = "CleanInputAfterCollect";
             this.CleanInputAfterCollect.Size = new System.Drawing.Size(151, 24);
             this.CleanInputAfterCollect.TabIndex = 74;
@@ -491,9 +491,9 @@
             // 
             this.AllCollected.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AllCollected.Location = new System.Drawing.Point(695, 272);
-            this.AllCollected.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.AllCollected.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.AllCollected.Name = "AllCollected";
-            this.AllCollected.Size = new System.Drawing.Size(91, 33);
+            this.AllCollected.Size = new System.Drawing.Size(91, 32);
             this.AllCollected.TabIndex = 75;
             this.AllCollected.Text = "全部已采";
             this.AllCollected.UseVisualStyleBackColor = true;
@@ -502,10 +502,10 @@
             // PowerSetting
             // 
             this.PowerSetting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PowerSetting.Location = new System.Drawing.Point(695, 223);
-            this.PowerSetting.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.PowerSetting.Location = new System.Drawing.Point(695, 222);
+            this.PowerSetting.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.PowerSetting.Name = "PowerSetting";
-            this.PowerSetting.Size = new System.Drawing.Size(91, 33);
+            this.PowerSetting.Size = new System.Drawing.Size(91, 32);
             this.PowerSetting.TabIndex = 76;
             this.PowerSetting.Text = "权限设置";
             this.PowerSetting.UseVisualStyleBackColor = true;
@@ -516,8 +516,8 @@
             // 
             this.GetGridOnly.AutoSize = true;
             this.GetGridOnly.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.GetGridOnly.Location = new System.Drawing.Point(307, 47);
-            this.GetGridOnly.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.GetGridOnly.Location = new System.Drawing.Point(307, 48);
+            this.GetGridOnly.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.GetGridOnly.Name = "GetGridOnly";
             this.GetGridOnly.Size = new System.Drawing.Size(96, 23);
             this.GetGridOnly.TabIndex = 82;
@@ -732,9 +732,10 @@
             // 
             // ChooseAll
             // 
-            this.ChooseAll.Location = new System.Drawing.Point(3, 315);
+            this.ChooseAll.Location = new System.Drawing.Point(5, 315);
+            this.ChooseAll.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.ChooseAll.Name = "ChooseAll";
-            this.ChooseAll.Size = new System.Drawing.Size(51, 27);
+            this.ChooseAll.Size = new System.Drawing.Size(51, 28);
             this.ChooseAll.TabIndex = 84;
             this.ChooseAll.Text = "全选";
             this.ChooseAll.UseVisualStyleBackColor = true;
@@ -746,11 +747,11 @@
             this.pr_code.Condition = null;
             this.pr_code.FormName = null;
             this.pr_code.Location = new System.Drawing.Point(101, 228);
-            this.pr_code.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.pr_code.Name = "pr_code";
             this.pr_code.SelectField = null;
             this.pr_code.SetValueField = null;
-            this.pr_code.Size = new System.Drawing.Size(199, 27);
+            this.pr_code.Size = new System.Drawing.Size(199, 28);
             this.pr_code.TabIndex = 68;
             this.pr_code.TableName = null;
             this.pr_code.UserControlTextChanged += new UAS_LabelMachine.CustomControl.SearchTextBox.OnTextChange(this.pr_code_UserControlTextChanged);
@@ -782,7 +783,7 @@
             // 
             this.Capacity.AutoSize = true;
             this.Capacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Capacity.Location = new System.Drawing.Point(80, 79);
+            this.Capacity.Location = new System.Drawing.Point(75, 93);
             this.Capacity.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Capacity.Name = "Capacity";
             this.Capacity.Size = new System.Drawing.Size(0, 20);
@@ -792,7 +793,7 @@
             // 
             this.Process_midboxcode.AutoSize = true;
             this.Process_midboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_midboxcode.Location = new System.Drawing.Point(80, 134);
+            this.Process_midboxcode.Location = new System.Drawing.Point(75, 149);
             this.Process_midboxcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Process_midboxcode.Name = "Process_midboxcode";
             this.Process_midboxcode.Size = new System.Drawing.Size(18, 20);
@@ -803,7 +804,7 @@
             // 
             this.Process_outboxcode.AutoSize = true;
             this.Process_outboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_outboxcode.Location = new System.Drawing.Point(80, 104);
+            this.Process_outboxcode.Location = new System.Drawing.Point(75, 119);
             this.Process_outboxcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Process_outboxcode.Name = "Process_outboxcode";
             this.Process_outboxcode.Size = new System.Drawing.Size(18, 20);
@@ -815,7 +816,7 @@
             this.TotalCount.AutoSize = true;
             this.TotalCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.TotalCount.ForeColor = System.Drawing.Color.Blue;
-            this.TotalCount.Location = new System.Drawing.Point(125, 19);
+            this.TotalCount.Location = new System.Drawing.Point(120, 33);
             this.TotalCount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.TotalCount.Name = "TotalCount";
             this.TotalCount.Size = new System.Drawing.Size(18, 20);
@@ -826,7 +827,7 @@
             // 
             this.label17.AutoSize = true;
             this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label17.Location = new System.Drawing.Point(108, 19);
+            this.label17.Location = new System.Drawing.Point(103, 33);
             this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label17.Name = "label17";
             this.label17.Size = new System.Drawing.Size(15, 20);
@@ -838,7 +839,7 @@
             this.CollectedCount.AutoSize = true;
             this.CollectedCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectedCount.ForeColor = System.Drawing.Color.Red;
-            this.CollectedCount.Location = new System.Drawing.Point(84, 19);
+            this.CollectedCount.Location = new System.Drawing.Point(79, 33);
             this.CollectedCount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.CollectedCount.Name = "CollectedCount";
             this.CollectedCount.Size = new System.Drawing.Size(18, 20);
@@ -849,7 +850,7 @@
             // 
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(13, 105);
+            this.label14.Location = new System.Drawing.Point(8, 120);
             this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label14.Name = "label14";
             this.label14.Size = new System.Drawing.Size(39, 20);
@@ -860,7 +861,7 @@
             // 
             this.label11.AutoSize = true;
             this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label11.Location = new System.Drawing.Point(13, 134);
+            this.label11.Location = new System.Drawing.Point(8, 149);
             this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label11.Name = "label11";
             this.label11.Size = new System.Drawing.Size(39, 20);
@@ -871,7 +872,7 @@
             // 
             this.label13.AutoSize = true;
             this.label13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label13.Location = new System.Drawing.Point(13, 54);
+            this.label13.Location = new System.Drawing.Point(8, 69);
             this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label13.Name = "label13";
             this.label13.Size = new System.Drawing.Size(54, 20);
@@ -882,7 +883,7 @@
             // 
             this.Installed.AutoSize = true;
             this.Installed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Installed.Location = new System.Drawing.Point(80, 54);
+            this.Installed.Location = new System.Drawing.Point(75, 69);
             this.Installed.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Installed.Name = "Installed";
             this.Installed.Size = new System.Drawing.Size(0, 20);
@@ -892,7 +893,7 @@
             // 
             this.Process.AutoSize = true;
             this.Process.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process.Location = new System.Drawing.Point(13, 19);
+            this.Process.Location = new System.Drawing.Point(8, 33);
             this.Process.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Process.Name = "Process";
             this.Process.Size = new System.Drawing.Size(54, 20);
@@ -904,7 +905,7 @@
             this.sg_separator.Enabled = false;
             this.sg_separator.ID = null;
             this.sg_separator.Location = new System.Drawing.Point(387, 82);
-            this.sg_separator.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.sg_separator.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.sg_separator.Name = "sg_separator";
             this.sg_separator.Size = new System.Drawing.Size(36, 25);
             this.sg_separator.Str = null;
@@ -916,7 +917,7 @@
             // 
             this.Input.ID = null;
             this.Input.Location = new System.Drawing.Point(101, 272);
-            this.Input.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.Input.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.Input.Name = "Input";
             this.Input.Size = new System.Drawing.Size(199, 25);
             this.Input.Str = null;
@@ -929,7 +930,7 @@
             // 
             this.griddetno.ID = null;
             this.griddetno.Location = new System.Drawing.Point(101, 165);
-            this.griddetno.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.griddetno.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.griddetno.Name = "griddetno";
             this.griddetno.Size = new System.Drawing.Size(135, 25);
             this.griddetno.Str = null;
@@ -944,7 +945,7 @@
             this.sg_code.Condition = null;
             this.sg_code.FormName = null;
             this.sg_code.Location = new System.Drawing.Point(101, 82);
-            this.sg_code.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.sg_code.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.sg_code.Name = "sg_code";
             this.sg_code.SelectField = null;
             this.sg_code.SetValueField = null;
@@ -957,7 +958,7 @@
             // 
             this.MessageLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MessageLog.Location = new System.Drawing.Point(0, 762);
-            this.MessageLog.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.MessageLog.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.MessageLog.Name = "MessageLog";
             this.MessageLog.Size = new System.Drawing.Size(1460, 122);
             this.MessageLog.TabIndex = 28;
@@ -971,11 +972,13 @@
             this.LabelInf.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.LabelInf.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.Choose,
+            this.pib_ifpick,
+            this.pib_ifprint,
             this.pib_id1,
             this.pib_pdno,
             this.pib_prodcode,
-            this.pr_brand,
             this.pr_vendprodcode,
+            this.pr_brand,
             this.pib_lotno,
             this.pib_datecode,
             this.pib_cusbarcode,
@@ -986,16 +989,15 @@
             this.pd_pocode,
             this.pd_custprodcode,
             this.pib_outboxcode1,
-            this.pib_outboxcode2,
-            this.pib_ifpick,
-            this.pib_ifprint});
+            this.pib_outboxcode2});
             this.LabelInf.Location = new System.Drawing.Point(3, 315);
-            this.LabelInf.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.LabelInf.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.LabelInf.Name = "LabelInf";
             this.LabelInf.RowTemplate.Height = 23;
-            this.LabelInf.Size = new System.Drawing.Size(1456, 407);
+            this.LabelInf.Size = new System.Drawing.Size(1456, 408);
             this.LabelInf.TabIndex = 27;
             this.LabelInf.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.LabelInf_CellPainting);
+            this.LabelInf.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelInf_CellValueChanged);
             this.LabelInf.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelInf_DataError);
             // 
             // Choose
@@ -1007,6 +1009,22 @@
             this.Choose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
             this.Choose.Width = 55;
             // 
+            // pib_ifpick
+            // 
+            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifpick.DataPropertyName = "pib_ifpick";
+            this.pib_ifpick.HeaderText = "已采集";
+            this.pib_ifpick.Name = "pib_ifpick";
+            this.pib_ifpick.Width = 60;
+            // 
+            // pib_ifprint
+            // 
+            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifprint.DataPropertyName = "pib_ifprint";
+            this.pib_ifprint.HeaderText = "已打印";
+            this.pib_ifprint.Name = "pib_ifprint";
+            this.pib_ifprint.Width = 60;
+            // 
             // pib_id1
             // 
             this.pib_id1.DataPropertyName = "pib_id";
@@ -1032,13 +1050,6 @@
             this.pib_prodcode.ReadOnly = true;
             this.pib_prodcode.Width = 96;
             // 
-            // pr_brand
-            // 
-            this.pr_brand.DataPropertyName = "pr_brand";
-            this.pr_brand.HeaderText = "品牌";
-            this.pr_brand.Name = "pr_brand";
-            this.pr_brand.Width = 66;
-            // 
             // pr_vendprodcode
             // 
             this.pr_vendprodcode.DataPropertyName = "pr_vendprodcode";
@@ -1047,6 +1058,13 @@
             this.pr_vendprodcode.ReadOnly = true;
             this.pr_vendprodcode.Width = 60;
             // 
+            // pr_brand
+            // 
+            this.pr_brand.DataPropertyName = "pr_brand";
+            this.pr_brand.HeaderText = "品牌";
+            this.pr_brand.Name = "pr_brand";
+            this.pr_brand.Width = 66;
+            // 
             // pib_lotno
             // 
             this.pib_lotno.DataPropertyName = "pib_lotno";
@@ -1128,27 +1146,11 @@
             this.pib_outboxcode2.Name = "pib_outboxcode2";
             this.pib_outboxcode2.Width = 90;
             // 
-            // pib_ifpick
-            // 
-            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifpick.DataPropertyName = "pib_ifpick";
-            this.pib_ifpick.HeaderText = "已采集";
-            this.pib_ifpick.Name = "pib_ifpick";
-            this.pib_ifpick.Width = 60;
-            // 
-            // pib_ifprint
-            // 
-            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifprint.DataPropertyName = "pib_ifprint";
-            this.pib_ifprint.HeaderText = "已打印";
-            this.pib_ifprint.Name = "pib_ifprint";
-            this.pib_ifprint.Width = 60;
-            // 
             // pi_inoutno
             // 
             this.pi_inoutno.ID = null;
             this.pi_inoutno.Location = new System.Drawing.Point(101, 12);
-            this.pi_inoutno.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.pi_inoutno.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.pi_inoutno.Name = "pi_inoutno";
             this.pi_inoutno.Size = new System.Drawing.Size(199, 25);
             this.pi_inoutno.Str = null;
@@ -1165,8 +1167,8 @@
             this.SingleLabel.Controls.Add(this.SingleLabelAutoPrint);
             this.SingleLabel.Controls.Add(this.SingleLabelCombox);
             this.SingleLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabel.Location = new System.Drawing.Point(800, 7);
-            this.SingleLabel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.SingleLabel.Location = new System.Drawing.Point(800, 8);
+            this.SingleLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.SingleLabel.Name = "SingleLabel";
             this.SingleLabel.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabel.Size = new System.Drawing.Size(208, 298);
@@ -1178,10 +1180,10 @@
             // 
             this.ViVoPlate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ViVoPlate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ViVoPlate.Location = new System.Drawing.Point(102, 203);
-            this.ViVoPlate.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.ViVoPlate.Location = new System.Drawing.Point(116, 199);
+            this.ViVoPlate.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.ViVoPlate.Name = "ViVoPlate";
-            this.ViVoPlate.Size = new System.Drawing.Size(91, 33);
+            this.ViVoPlate.Size = new System.Drawing.Size(91, 32);
             this.ViVoPlate.TabIndex = 41;
             this.ViVoPlate.Text = "ViVo料盘";
             this.ViVoPlate.UseVisualStyleBackColor = true;
@@ -1191,19 +1193,19 @@
             // 
             this.SingleLabelPrinter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.SingleLabelPrinter.Location = new System.Drawing.Point(8, 98);
-            this.SingleLabelPrinter.Margin = new System.Windows.Forms.Padding(7);
+            this.SingleLabelPrinter.Margin = new System.Windows.Forms.Padding(7, 8, 7, 8);
             this.SingleLabelPrinter.Name = "SingleLabelPrinter";
-            this.SingleLabelPrinter.Size = new System.Drawing.Size(189, 37);
+            this.SingleLabelPrinter.Size = new System.Drawing.Size(189, 38);
             this.SingleLabelPrinter.TabIndex = 40;
             // 
             // SingleLabelPrint
             // 
             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(102, 250);
-            this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(116, 245);
+            this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
-            this.SingleLabelPrint.Size = new System.Drawing.Size(91, 33);
+            this.SingleLabelPrint.Size = new System.Drawing.Size(91, 32);
             this.SingleLabelPrint.TabIndex = 36;
             this.SingleLabelPrint.Text = "打印盘标";
             this.SingleLabelPrint.UseVisualStyleBackColor = true;
@@ -1213,8 +1215,8 @@
             // 
             this.SingleLabelAutoPrint.AutoSize = true;
             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(9, 137);
-            this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(4, 134);
+            this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(91, 24);
             this.SingleLabelAutoPrint.TabIndex = 30;
@@ -1226,8 +1228,8 @@
             this.SingleLabelCombox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.SingleLabelCombox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.SingleLabelCombox.FormattingEnabled = true;
-            this.SingleLabelCombox.Location = new System.Drawing.Point(9, 57);
-            this.SingleLabelCombox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.SingleLabelCombox.Location = new System.Drawing.Point(9, 58);
+            this.SingleLabelCombox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.SingleLabelCombox.Name = "SingleLabelCombox";
             this.SingleLabelCombox.Size = new System.Drawing.Size(189, 28);
             this.SingleLabelCombox.TabIndex = 0;
@@ -1245,11 +1247,11 @@
             this.MidLabel.Controls.Add(this.MidLabelAutoPrint);
             this.MidLabel.Controls.Add(this.MidLabelCombox);
             this.MidLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabel.Location = new System.Drawing.Point(1011, 7);
-            this.MidLabel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.MidLabel.Location = new System.Drawing.Point(1011, 8);
+            this.MidLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.MidLabel.Name = "MidLabel";
             this.MidLabel.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.MidLabel.Size = new System.Drawing.Size(210, 298);
+            this.MidLabel.Size = new System.Drawing.Size(211, 298);
             this.MidLabel.TabIndex = 78;
             this.MidLabel.TabStop = false;
             this.MidLabel.Text = "中盒标签";
@@ -1259,7 +1261,7 @@
             this.MidLabelNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MidLabelNum.ID = null;
             this.MidLabelNum.Location = new System.Drawing.Point(59, 215);
-            this.MidLabelNum.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.MidLabelNum.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.MidLabelNum.Name = "MidLabelNum";
             this.MidLabelNum.Size = new System.Drawing.Size(84, 27);
             this.MidLabelNum.Str = null;
@@ -1271,7 +1273,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(8, 205);
+            this.label5.Location = new System.Drawing.Point(3, 205);
             this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(39, 20);
@@ -1282,7 +1284,7 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(7, 167);
+            this.label4.Location = new System.Drawing.Point(3, 170);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(39, 20);
@@ -1293,16 +1295,16 @@
             // 
             this.MidLabelPrinter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MidLabelPrinter.Location = new System.Drawing.Point(8, 98);
-            this.MidLabelPrinter.Margin = new System.Windows.Forms.Padding(7);
+            this.MidLabelPrinter.Margin = new System.Windows.Forms.Padding(7, 8, 7, 8);
             this.MidLabelPrinter.Name = "MidLabelPrinter";
-            this.MidLabelPrinter.Size = new System.Drawing.Size(189, 37);
+            this.MidLabelPrinter.Size = new System.Drawing.Size(189, 38);
             this.MidLabelPrinter.TabIndex = 41;
             // 
             // label15
             // 
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label15.Location = new System.Drawing.Point(119, 169);
+            this.label15.Location = new System.Drawing.Point(113, 170);
             this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label15.Name = "label15";
             this.label15.Size = new System.Drawing.Size(24, 20);
@@ -1312,8 +1314,8 @@
             // MidBoxCapacity
             // 
             this.MidBoxCapacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidBoxCapacity.Location = new System.Drawing.Point(60, 177);
-            this.MidBoxCapacity.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.MidBoxCapacity.Location = new System.Drawing.Point(60, 178);
+            this.MidBoxCapacity.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.MidBoxCapacity.Name = "MidBoxCapacity";
             this.MidBoxCapacity.Size = new System.Drawing.Size(51, 27);
             this.MidBoxCapacity.TabIndex = 30;
@@ -1322,9 +1324,9 @@
             // 
             this.MidLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MidLabelPrint.Location = new System.Drawing.Point(107, 252);
-            this.MidLabelPrint.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.MidLabelPrint.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.MidLabelPrint.Name = "MidLabelPrint";
-            this.MidLabelPrint.Size = new System.Drawing.Size(91, 33);
+            this.MidLabelPrint.Size = new System.Drawing.Size(91, 32);
             this.MidLabelPrint.TabIndex = 42;
             this.MidLabelPrint.Text = "打印盒签";
             this.MidLabelPrint.UseVisualStyleBackColor = true;
@@ -1334,8 +1336,8 @@
             // 
             this.MidLabelAutoPrint.AutoSize = true;
             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(12, 137);
-            this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(7, 134);
+            this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(91, 24);
             this.MidLabelAutoPrint.TabIndex = 41;
@@ -1347,8 +1349,8 @@
             this.MidLabelCombox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.MidLabelCombox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MidLabelCombox.FormattingEnabled = true;
-            this.MidLabelCombox.Location = new System.Drawing.Point(9, 57);
-            this.MidLabelCombox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.MidLabelCombox.Location = new System.Drawing.Point(9, 58);
+            this.MidLabelCombox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.MidLabelCombox.Name = "MidLabelCombox";
             this.MidLabelCombox.Size = new System.Drawing.Size(189, 28);
             this.MidLabelCombox.TabIndex = 40;
@@ -1372,11 +1374,11 @@
             this.OutBoxLabel.Controls.Add(this.OutBoxLabelAutoPrint);
             this.OutBoxLabel.Controls.Add(this.OutBoxCombox);
             this.OutBoxLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLabel.Location = new System.Drawing.Point(1228, 7);
+            this.OutBoxLabel.Location = new System.Drawing.Point(1228, 8);
             this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutBoxLabel.Name = "OutBoxLabel";
             this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.OutBoxLabel.Size = new System.Drawing.Size(229, 297);
+            this.OutBoxLabel.Size = new System.Drawing.Size(229, 298);
             this.OutBoxLabel.TabIndex = 79;
             this.OutBoxLabel.TabStop = false;
             this.OutBoxLabel.Text = "外箱标签";
@@ -1384,7 +1386,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(166, 6);
+            this.LogingOut.Location = new System.Drawing.Point(161, 13);
             this.LogingOut.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(52, 27);
@@ -1396,10 +1398,10 @@
             // GetOutBoxCode
             // 
             this.GetOutBoxCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.GetOutBoxCode.Location = new System.Drawing.Point(120, 137);
-            this.GetOutBoxCode.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.GetOutBoxCode.Location = new System.Drawing.Point(120, 138);
+            this.GetOutBoxCode.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.GetOutBoxCode.Name = "GetOutBoxCode";
-            this.GetOutBoxCode.Size = new System.Drawing.Size(101, 33);
+            this.GetOutBoxCode.Size = new System.Drawing.Size(101, 32);
             this.GetOutBoxCode.TabIndex = 93;
             this.GetOutBoxCode.Text = "获取箱号";
             this.GetOutBoxCode.UseVisualStyleBackColor = true;
@@ -1409,8 +1411,8 @@
             // 
             this.OutBoxNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxNum.ID = null;
-            this.OutBoxNum.Location = new System.Drawing.Point(61, 218);
-            this.OutBoxNum.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.OutBoxNum.Location = new System.Drawing.Point(61, 225);
+            this.OutBoxNum.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.OutBoxNum.Name = "OutBoxNum";
             this.OutBoxNum.Size = new System.Drawing.Size(48, 27);
             this.OutBoxNum.Str = null;
@@ -1422,7 +1424,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(11, 209);
+            this.label10.Location = new System.Drawing.Point(5, 220);
             this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(39, 20);
@@ -1434,7 +1436,7 @@
             this.WeightNet.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.WeightNet.ID = null;
             this.WeightNet.Location = new System.Drawing.Point(171, 262);
-            this.WeightNet.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.WeightNet.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.WeightNet.Name = "WeightNet";
             this.WeightNet.Size = new System.Drawing.Size(48, 27);
             this.WeightNet.Str = null;
@@ -1446,7 +1448,7 @@
             // 
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(120, 249);
+            this.label9.Location = new System.Drawing.Point(115, 256);
             this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(39, 20);
@@ -1458,7 +1460,7 @@
             this.WeightGross.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.WeightGross.ID = null;
             this.WeightGross.Location = new System.Drawing.Point(61, 262);
-            this.WeightGross.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.WeightGross.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.WeightGross.Name = "WeightGross";
             this.WeightGross.Size = new System.Drawing.Size(48, 27);
             this.WeightGross.Str = null;
@@ -1470,7 +1472,7 @@
             // 
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label8.Location = new System.Drawing.Point(11, 249);
+            this.label8.Location = new System.Drawing.Point(5, 256);
             this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(39, 20);
@@ -1481,7 +1483,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(8, 165);
+            this.label6.Location = new System.Drawing.Point(5, 179);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(39, 20);
@@ -1491,17 +1493,17 @@
             // OutBoxPrinter
             // 
             this.OutBoxPrinter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxPrinter.Location = new System.Drawing.Point(11, 97);
-            this.OutBoxPrinter.Margin = new System.Windows.Forms.Padding(7);
+            this.OutBoxPrinter.Location = new System.Drawing.Point(11, 98);
+            this.OutBoxPrinter.Margin = new System.Windows.Forms.Padding(7, 8, 7, 8);
             this.OutBoxPrinter.Name = "OutBoxPrinter";
-            this.OutBoxPrinter.Size = new System.Drawing.Size(211, 37);
+            this.OutBoxPrinter.Size = new System.Drawing.Size(211, 38);
             this.OutBoxPrinter.TabIndex = 82;
             // 
             // OutboxCapacity
             // 
             this.OutboxCapacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutboxCapacity.Location = new System.Drawing.Point(61, 177);
-            this.OutboxCapacity.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.OutboxCapacity.Location = new System.Drawing.Point(61, 184);
+            this.OutboxCapacity.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.OutboxCapacity.Name = "OutboxCapacity";
             this.OutboxCapacity.Size = new System.Drawing.Size(40, 27);
             this.OutboxCapacity.TabIndex = 84;
@@ -1515,9 +1517,9 @@
             // 
             this.OutBoxLabelPackage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxLabelPackage.Location = new System.Drawing.Point(120, 182);
-            this.OutBoxLabelPackage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.OutBoxLabelPackage.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.OutBoxLabelPackage.Name = "OutBoxLabelPackage";
-            this.OutBoxLabelPackage.Size = new System.Drawing.Size(100, 33);
+            this.OutBoxLabelPackage.Size = new System.Drawing.Size(100, 32);
             this.OutBoxLabelPackage.TabIndex = 81;
             this.OutBoxLabelPackage.Text = "Vivo打印";
             this.OutBoxLabelPackage.UseVisualStyleBackColor = true;
@@ -1527,9 +1529,9 @@
             // 
             this.OutBoxLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxLabelPrint.Location = new System.Drawing.Point(120, 222);
-            this.OutBoxLabelPrint.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.OutBoxLabelPrint.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.OutBoxLabelPrint.Name = "OutBoxLabelPrint";
-            this.OutBoxLabelPrint.Size = new System.Drawing.Size(101, 33);
+            this.OutBoxLabelPrint.Size = new System.Drawing.Size(101, 32);
             this.OutBoxLabelPrint.TabIndex = 80;
             this.OutBoxLabelPrint.Text = "打印箱标";
             this.OutBoxLabelPrint.UseVisualStyleBackColor = true;
@@ -1539,8 +1541,8 @@
             // 
             this.OutBoxLabelAutoPrint.AutoSize = true;
             this.OutBoxLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLabelAutoPrint.Location = new System.Drawing.Point(10, 135);
-            this.OutBoxLabelAutoPrint.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.OutBoxLabelAutoPrint.Location = new System.Drawing.Point(11, 134);
+            this.OutBoxLabelAutoPrint.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.OutBoxLabelAutoPrint.Name = "OutBoxLabelAutoPrint";
             this.OutBoxLabelAutoPrint.Size = new System.Drawing.Size(91, 24);
             this.OutBoxLabelAutoPrint.TabIndex = 79;
@@ -1553,9 +1555,9 @@
             this.OutBoxCombox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxCombox.FormattingEnabled = true;
             this.OutBoxCombox.Location = new System.Drawing.Point(11, 55);
-            this.OutBoxCombox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.OutBoxCombox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.OutBoxCombox.Name = "OutBoxCombox";
-            this.OutBoxCombox.Size = new System.Drawing.Size(210, 28);
+            this.OutBoxCombox.Size = new System.Drawing.Size(209, 28);
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
@@ -1564,7 +1566,7 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
-            this.ClientSize = new System.Drawing.Size(1461, 857);
+            this.ClientSize = new System.Drawing.Size(1461, 858);
             this.Controls.Add(this.ChooseAll);
             this.Controls.Add(this.GetGridOnly);
             this.Controls.Add(this.PowerSetting);
@@ -1605,7 +1607,7 @@
             this.Controls.Add(this.OutBoxLabel);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-            this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.Name = "UAS_出货标签打印";
             this.Text = " UAS-出货标签管理";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.贴标机条码打印_FormClosing);
@@ -1744,11 +1746,13 @@
         private System.Windows.Forms.BindingSource MidSource;
         private System.Windows.Forms.Button ChooseAll;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn pib_ifpick;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn pib_ifprint;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_id1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_pdno;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_prodcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pr_brand;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_vendprodcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_brand;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_lotno;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_datecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_cusbarcode;
@@ -1760,7 +1764,5 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_custprodcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
-        private System.Windows.Forms.DataGridViewCheckBoxColumn pib_ifpick;
-        private System.Windows.Forms.DataGridViewCheckBoxColumn pib_ifprint;
     }
 }

+ 111 - 82
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -15,6 +15,7 @@ using UAS_LabelMachine.CustomControl.GroupBoxWithBorder;
 using UAS_LabelMachine.PublicForm;
 using System.Threading;
 using System.IO;
+using System.Globalization;
 
 namespace UAS_LabelMachine
 {
@@ -133,8 +134,10 @@ namespace UAS_LabelMachine
         //使用二维数组进行排序
         ArrayList<ArrayList<string>> ScanData;
         ArrayList<string> GetData;
-
-
+        /// <summary>
+        /// 是否通过选择Combox来改变打开的文件
+        /// </summary>
+        bool ComBoxClickChangeLabelDoc = false;
 
         public UAS_出货标签打印()
         {
@@ -171,9 +174,7 @@ namespace UAS_LabelMachine
             pi_inoutno.Focus();
             //将本地读取的打印机设置进Combox,并选中默认打印机
             if (User.UserAccountType == "admin")
-            {
                 PowerSetting.Visible = true;
-            }
             MidBoxCacheData = new DataTable();
             SingleBoxCacheData = new DataTable();
             sg_code.FormName = Name;
@@ -188,29 +189,34 @@ namespace UAS_LabelMachine
 
             CollectionUnit.Text = "盘";
             Point pt = new Point();
-            int ScreenWidth = Screen.GetWorkingArea(pt).Width;
-            //如果分辨率大的设置的字体对应的变大 
-            if (ScreenWidth > 1366)
+            //禁止所有列的排序
+            foreach (DataGridViewColumn dgv in LabelInf.Columns)
             {
-                foreach (Control ctl in Controls)
-                {
-                    if (ctl is CheckBox || ctl is Label || ctl is RadioButton)
-                    {
-                        ctl.Font = new Font("微软雅黑", 10.5F, FontStyle.Regular, GraphicsUnit.Point, 134);
-                    }
-                    if (ctl is GroupBoxWithBorder)
-                    {
-                        GroupBoxWithBorder gb = ctl as GroupBoxWithBorder;
-                        for (int i = 0; i < gb.Controls.Count; i++)
-                        {
-                            if (gb.Controls[i] is CheckBox || gb.Controls[i] is Label || gb.Controls[i] is RadioButton)
-                            {
-                                gb.Controls[i].Font = new Font("微软雅黑", 10.5F, FontStyle.Regular, GraphicsUnit.Point, 134);
-                            }
-                        }
-                    }
-                }
+                dgv.SortMode = DataGridViewColumnSortMode.NotSortable;
             }
+            int ScreenWidth = Screen.GetWorkingArea(pt).Width;
+            //如果分辨率大的设置的字体对应的变大 
+            //if (ScreenWidth > 1366)
+            //{
+            //    foreach (Control ctl in Controls)
+            //    {
+            //        if (ctl is CheckBox || ctl is Label || ctl is RadioButton)
+            //        {
+            //            ctl.Font = new Font("微软雅黑", 10.5F, FontStyle.Regular, GraphicsUnit.Point, 134);
+            //        }
+            //        if (ctl is GroupBoxWithBorder)
+            //        {
+            //            GroupBoxWithBorder gb = ctl as GroupBoxWithBorder;
+            //            for (int i = 0; i < gb.Controls.Count; i++)
+            //            {
+            //                if (gb.Controls[i] is CheckBox || gb.Controls[i] is Label || gb.Controls[i] is RadioButton)
+            //                {
+            //                    gb.Controls[i].Font = new Font("微软雅黑", 10.5F, FontStyle.Regular, GraphicsUnit.Point, 134);
+            //                }
+            //            }
+            //        }
+            //    }
+            //}
             //设置获取当前屏幕大小自动全屏但是保留任务栏
             Rectangle ScreenArea = Screen.GetWorkingArea(this);
             Top = 0;
@@ -990,14 +996,15 @@ namespace UAS_LabelMachine
         /// </summary>
         private void GetInOutInfAndLabelFile()
         {
+            ComBoxClickChangeLabelDoc = false;
             sql.Clear();
             sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='单盘' order by cl_custcode");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
-            SingleLabelCombox.DataSource = dt;
             SingleLabelCombox.DisplayMember = "cl_labelname";
             SingleLabelCombox.ValueMember = "la_id";
+            SingleLabelCombox.DataSource = dt;
             if (SingleDoc != null)
                 SingleDoc.Close();
             if (!GetGridOnly.Checked)
@@ -1017,9 +1024,9 @@ namespace UAS_LabelMachine
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='中盒' order by cl_custcode");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
-            MidLabelCombox.DataSource = dt;
             MidLabelCombox.DisplayMember = "cl_labelname";
             MidLabelCombox.ValueMember = "la_id";
+            MidLabelCombox.DataSource = dt;
             if (MidDoc != null)
                 MidDoc.Close();
             if (!GetGridOnly.Checked)
@@ -1033,21 +1040,15 @@ namespace UAS_LabelMachine
                         BaseUtil.GetLabelUrl(LabelUrl, LabelName, time);
                 }
             if (MidLabelCombox.Text != "")
-            {
-                if (MidDoc != null)
-                    MidDoc.Close();
                 MidDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + MidLabelCombox.Text);
-            }
             sql.Clear();
             sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='外箱' order by cl_custcode");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
-            OutBoxCombox.DataSource = dt;
             OutBoxCombox.DisplayMember = "cl_labelname";
             OutBoxCombox.ValueMember = "la_id";
-            if (OutBoxDoc != null)
-                OutBoxDoc.Close();
+            OutBoxCombox.DataSource = dt;
             if (!GetGridOnly.Checked)
                 for (int i = 0; i < dt.Rows.Count; i++)
                 {
@@ -1064,6 +1065,7 @@ namespace UAS_LabelMachine
                     OutBoxDoc.Close();
                 OutBoxDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + OutBoxCombox.Text);
             }
+            ComBoxClickChangeLabelDoc = true;
         }
 
         /// <summary>
@@ -1119,6 +1121,25 @@ namespace UAS_LabelMachine
 
         private void SingleBoxPrint()
         {
+            try
+            {
+                if (SingleDoc.Variables.FreeVariables.Count == 0) { }
+            }
+            catch (Exception)
+            {
+                MessageBox.Show("单盘标签未维护参数");
+            }
+            if (MidLabelAutoPrint.Checked)
+            {
+                try
+                {
+                    if (MidDoc.Variables.FreeVariables.Count == 0) { }
+                }
+                catch (Exception)
+                {
+                    MessageBox.Show("中盘标签未维护参数");
+                }
+            }
             string la_id = SingleLabelCombox.SelectedValue.ToString().Split('#')[0];
             string cl_labelname = SingleLabelCombox.Text;
             string LabelUrl = dh.getFieldDataByCondition("label left join customerlabel on la_code=cl_labelcode", "cl_labelurl", "la_id='" + la_id + "' and cl_labelname='" + cl_labelname + "'").ToString();
@@ -1141,7 +1162,7 @@ namespace UAS_LabelMachine
                         //如果不存在中盒号则进行添加
                         if (!MidIDAndOutboxcode.ContainsValue(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()))
                             MidIDAndOutboxcode.Add(LabelInf.Rows[i].Cells["pib_id1"].Value.ToString(), LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString());
-                    }  
+                    }
                 }
                 if (SingleID.ToArray().Length == 0)
                 {
@@ -1149,10 +1170,10 @@ namespace UAS_LabelMachine
                     return;
                 }
                 //打印的时候如果不存在数据开始缓存
-                if (MidBoxCacheData.Rows.Count == 0)
-                    GetMidBoxData();
                 if (SingleBoxCacheData.Rows.Count == 0)
                     GetSingleBoxData();
+                if (MidBoxCacheData.Rows.Count == 0)
+                    GetMidBoxData();
                 for (int i = 0; i < LabelInf.RowCount; i++)
                 {
                     if (i + 1 < LabelInf.RowCount)
@@ -1207,7 +1228,7 @@ namespace UAS_LabelMachine
                                 }
                                 else if (arg.Contains(SingleDoc.Variables.FreeVariables.Item(j + 1).Name))
                                     SingleDoc.Variables.FreeVariables.Item(j + 1).Value = dr[0][SingleDoc.Variables.FreeVariables.Item(j + 1).Name].ToString();
-                                ParamLog.AppendLine("打印参数【" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取到值" + SingleDoc.Variables.FreeVariables.Item(j + 1).Value);
+                                ParamLog.AppendLine("pib_id:" + LabelInf.Rows[i].Cells["pib_id1"].Value.ToString() + ",SingleDoc打印参数【" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取到值" + SingleDoc.Variables.FreeVariables.Item(j + 1).Value);
                             }
                             LogManager.DoLog(ParamLog.ToString());
                             //保存参数打印
@@ -1235,6 +1256,7 @@ namespace UAS_LabelMachine
                         }
                     }
                 }
+                dh.BatchInsert("update prodiobarcode set pib_printdate=sysdate where pib_id=:pib_id", new string[] { "pib_id" }, SingleID.ToArray());
                 if (CheckedRowCount == 0)
                     MessageBox.Show("未勾选打印明细!");
                 else if (CurrentRowIndex + 1 < LabelInf.Rows.Count)
@@ -1260,7 +1282,6 @@ namespace UAS_LabelMachine
             int pib_id_length = pib_id_arr.Length;
             //将所有的列存在在这里
             List<DataTable> AllSingleBoxCacheData = new List<DataTable>();
-
             //每五百条拼接一次条件
             int fivehundred_count = pib_id_length / 500 + 1;
             //当前打印的索引
@@ -1286,10 +1307,10 @@ namespace UAS_LabelMachine
                 if (i + 1 != fivehundred_count)
                     pib_id_string.Append(" or pib_id in ");
             }
-
             //手动添加ID列
             DataColumn datacolumn = new DataColumn("pib_id");
-            SingleBoxCacheData.Columns.Add(datacolumn);
+            if (!SingleBoxCacheData.Columns.Contains("pib_id"))
+                SingleBoxCacheData.Columns.Add(datacolumn);
             //获取打印的SQL
             for (int j = 0; j < SingleDoc.Variables.FreeVariables.Count; j++)
             {
@@ -1304,7 +1325,7 @@ namespace UAS_LabelMachine
                         string sql = dt.Rows[k]["lp_sql"].ToString();
                         sql = sql.Substring(0, sql.IndexOf("{"));
                         sql = sql.Substring(0, sql.LastIndexOf("="));
-                        DataTable temp = dh.getFieldsDatasByCondition(sql + " in " + pib_id_string.ToString());
+                        DataTable temp = dh.getFieldsDatasByCondition(sql.Replace(" from ", " ,pib_id PIBID from ") + " in " + pib_id_string.ToString() + " ORDER by pib_id");
                         temp.Columns[0].ColumnName = SingleDoc.Variables.FreeVariables.Item(j + 1).Name;
                         AllSingleBoxCacheData.Add(temp);
                     }
@@ -1320,7 +1341,7 @@ namespace UAS_LabelMachine
                     //由于之前加了一个ID列,导致j从1开始
                     for (int j = 1; j < SingleBoxCacheData.Columns.Count; j++)
                     {
-                        dr[Temp[j - 1].Columns[0].ColumnName] = Temp[j - 1].Rows[i][0].ToString();
+                        dr[Temp[j - 1].Columns[0].ColumnName] = (Temp[j - 1].Select("PIBID=" + pib_id_arr[i]))[0][0];
                     }
                     SingleBoxCacheData.Rows.Add(dr);
                 }
@@ -1374,8 +1395,10 @@ namespace UAS_LabelMachine
             //手动添加ID列
             DataColumn IDColumn = new DataColumn("pib_id");
             DataColumn OutBoxColumn = new DataColumn("pib_outboxcode1");
-            MidBoxCacheData.Columns.Add(IDColumn);
-            MidBoxCacheData.Columns.Add(OutBoxColumn);
+            if (!MidBoxCacheData.Columns.Contains("pib_id"))
+                MidBoxCacheData.Columns.Add(IDColumn);
+            if (!MidBoxCacheData.Columns.Contains("pib_outboxcode1"))
+                MidBoxCacheData.Columns.Add(OutBoxColumn);
             string la_id = MidLabelCombox.SelectedValue.ToString().Split('#')[0];
             DataTable dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + la_id, "select");
             for (int j = 0; j < MidDoc.Variables.FreeVariables.Count; j++)
@@ -1393,13 +1416,13 @@ namespace UAS_LabelMachine
                         {
                             sql = sql.Substring(0, sql.IndexOf("{")) + pib_id + sql.Substring(sql.IndexOf("}") + 1);
                             sql = sql.Substring(0, sql.LastIndexOf("=")) + " in " + pib_qtycondition_string.ToString() + sql.Substring(sql.LastIndexOf("}") + 1);
-                            Console.WriteLine(sql);
+                            sql = "select * from (" + sql + ") order by instr ('" + pib_qtycondition_string.ToString() + "',pib_outboxcode1)";
                         }
                         else
                         {
                             sql = sql.Substring(0, sql.IndexOf("{"));
                             sql = sql.Substring(0, sql.LastIndexOf("="));
-                            sql = sql + " in " + pib_condition_string.ToString();
+                            sql = sql + " in " + pib_condition_string.ToString() + " order by instr('" + pib_condition_string.ToString() + "',pib_id)";
                         }
                         DataTable temp = dh.getFieldsDatasByCondition(sql);
                         temp.Columns[0].ColumnName = MidDoc.Variables.FreeVariables.Item(j + 1).Name;
@@ -1418,9 +1441,7 @@ namespace UAS_LabelMachine
                     dr["pib_outboxcode1"] = pib_outbox_arr[i];
                     //由于之前加了一个ID列和箱号,导致j从2开始
                     for (int j = 2; j < MidBoxCacheData.Columns.Count; j++)
-                    {
                         dr[Temp[j - 2].Columns[0].ColumnName] = Temp[j - 2].Rows[i][0].ToString();
-                    }
                     MidBoxCacheData.Rows.Add(dr);
                 }
             }
@@ -1587,7 +1608,6 @@ namespace UAS_LabelMachine
                             else
                             {
                                 DataRow[] dr = MidBoxCacheData.Select("pib_outboxcode1='" + pib_outboxcode1 + "'");
-                                Console.WriteLine(pib_outboxcode1);
                                 if (MidDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower().Contains("datecode1"))
                                 {
                                     if (LabelInf.Rows[rowindex].Cells["DateCode1"].Value != null)
@@ -2009,21 +2029,21 @@ namespace UAS_LabelMachine
         /// <param name="e"></param>
         private void LabelInf_CellValueChanged(object sender, DataGridViewCellEventArgs e)
         {
-            //if (LabelInf.Columns[e.ColumnIndex].Name == "pib_datecode")
-            //{
-            //    string datecode = LabelInf.Rows[e.RowIndex].Cells["pib_datecode"].Value.ToString();
-            //    try
-            //    {
-            //        System.DateTime dt = System.DateTime.ParseExact(datecode, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture);
-            //        GregorianCalendar gc = new GregorianCalendar();
-            //        int weekOfYear = gc.GetWeekOfYear(dt, CalendarWeekRule.FirstDay, DayOfWeek.Monday);
-            //        if (weekOfYear < 10)
-            //            LabelInf.Rows[e.RowIndex].Cells["DateCode1"].Value = dt.Year.ToString().Substring(2, 2) + "0" + weekOfYear;
-            //        else
-            //            LabelInf.Rows[e.RowIndex].Cells["DateCode1"].Value = dt.Year.ToString().Substring(2, 2) + weekOfYear;
-            //    }
-            //    catch (Exception) { }
-            //}
+            if (LabelInf.Columns[e.ColumnIndex].Name == "pib_datecode")
+            {
+                string datecode = LabelInf.Rows[e.RowIndex].Cells["pib_datecode"].Value.ToString();
+                try
+                {
+                    System.DateTime dt = System.DateTime.ParseExact(datecode, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture);
+                    GregorianCalendar gc = new GregorianCalendar();
+                    int weekOfYear = gc.GetWeekOfYear(dt, CalendarWeekRule.FirstDay, DayOfWeek.Monday);
+                    if (weekOfYear < 10)
+                        LabelInf.Rows[e.RowIndex].Cells["DateCode1"].Value = dt.Year.ToString().Substring(2, 2) + "0" + weekOfYear;
+                    else
+                        LabelInf.Rows[e.RowIndex].Cells["DateCode1"].Value = dt.Year.ToString().Substring(2, 2) + weekOfYear;
+                }
+                catch (Exception) { }
+            }
         }
 
         private void AllCollected_Click(object sender, EventArgs e)
@@ -2031,13 +2051,13 @@ namespace UAS_LabelMachine
             if (AllCollect == false)
             {
                 foreach (DataGridViewRow dr in LabelInf.Rows)
-                    dr.Cells[CloumnCount - 2].Value = true;
+                    dr.Cells[1].Value = true;
                 AllCollect = true;
             }
             else
             {
                 foreach (DataGridViewRow dr in LabelInf.Rows)
-                    dr.Cells[CloumnCount - 2].Value = false;
+                    dr.Cells[1].Value = false;
                 AllCollect = false;
             }
         }
@@ -2103,12 +2123,15 @@ namespace UAS_LabelMachine
         {
             try
             {
-                if (SingleDoc != null)
-                    SingleDoc.Close();
-                if (SingleLabelCombox.Text != "" && SingleLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
+                if (ComBoxClickChangeLabelDoc)
                 {
-                    System.DateTime time = Convert.ToDateTime(SingleLabelCombox.SelectedValue.ToString().Split('#')[2]);
-                    SingleDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(SingleLabelCombox.SelectedValue.ToString().Split('#')[1], SingleLabelCombox.Text, time));
+                    if (SingleDoc != null)
+                        SingleDoc.Close();
+                    if (SingleLabelCombox.Text != "" && SingleLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
+                    {
+                        System.DateTime time = Convert.ToDateTime(SingleLabelCombox.SelectedValue.ToString().Split('#')[2]);
+                        SingleDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(SingleLabelCombox.SelectedValue.ToString().Split('#')[1], SingleLabelCombox.Text, time));
+                    }
                 }
             }
             catch (Exception) { }
@@ -2123,12 +2146,15 @@ namespace UAS_LabelMachine
         {
             try
             {
-                if (MidDoc != null)
-                    MidDoc.Close();
-                if (MidLabelCombox.Text != "" && MidLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
+                if (ComBoxClickChangeLabelDoc)
                 {
-                    System.DateTime time = Convert.ToDateTime(MidLabelCombox.SelectedValue.ToString().Split('#')[2]);
-                    MidDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(MidLabelCombox.SelectedValue.ToString().Split('#')[1], MidLabelCombox.Text, time));
+                    if (MidDoc != null)
+                        MidDoc.Close();
+                    if (MidLabelCombox.Text != "" && MidLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
+                    {
+                        System.DateTime time = Convert.ToDateTime(MidLabelCombox.SelectedValue.ToString().Split('#')[2]);
+                        MidDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(MidLabelCombox.SelectedValue.ToString().Split('#')[1], MidLabelCombox.Text, time));
+                    }
                 }
             }
             catch (Exception) { }
@@ -2143,12 +2169,15 @@ namespace UAS_LabelMachine
         {
             try
             {
-                if (OutBoxDoc != null)
-                    OutBoxDoc.Close();
-                if (OutBoxCombox.Text != "" && OutBoxCombox.SelectedValue != null && !GetGridOnly.Checked)
+                if (ComBoxClickChangeLabelDoc)
                 {
-                    System.DateTime time = Convert.ToDateTime(OutBoxCombox.SelectedValue.ToString().Split('#')[2]);
-                    OutBoxDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(OutBoxCombox.SelectedValue.ToString().Split('#')[1], OutBoxCombox.Text, time));
+                    if (OutBoxDoc != null)
+                        OutBoxDoc.Close();
+                    if (OutBoxCombox.Text != "" && OutBoxCombox.SelectedValue != null && !GetGridOnly.Checked)
+                    {
+                        System.DateTime time = Convert.ToDateTime(OutBoxCombox.SelectedValue.ToString().Split('#')[2]);
+                        OutBoxDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(OutBoxCombox.SelectedValue.ToString().Split('#')[1], OutBoxCombox.Text, time));
+                    }
                 }
             }
             catch (Exception) { }