瀏覽代碼

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

章政 5 年之前
父節點
當前提交
64b0eee360
共有 40 個文件被更改,包括 3861 次插入1592 次删除
  1. 1 1
      UAS_MES_JH/App.config
  2. 10 10
      UAS_MES_JH/CustomControl/CustomCheckBox/LockCheckBox.cs
  3. 66 57
      UAS_MES_JH/FunctionCode/Make/Make_CollectElec.Designer.cs
  4. 21 23
      UAS_MES_JH/FunctionCode/Make/Make_CollectElec.cs
  5. 51 0
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint.Designer.cs
  6. 35 12
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint.cs
  7. 3 2
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLoadPrint.cs
  8. 139 75
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs
  9. 38 15
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.cs
  10. 38 0
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.resx
  11. 3 2
      UAS_MES_JH/FunctionCode/Make/Make_Decompose.cs
  12. 915 0
      UAS_MES_JH/FunctionCode/Make/Make_Decompose_Ex.Designer.cs
  13. 476 0
      UAS_MES_JH/FunctionCode/Make/Make_Decompose_Ex.cs
  14. 396 0
      UAS_MES_JH/FunctionCode/Make/Make_Decompose_Ex.resx
  15. 101 73
      UAS_MES_JH/FunctionCode/Make/Make_FeedingCollection.Designer.cs
  16. 6 5
      UAS_MES_JH/FunctionCode/Make/Make_FeedingCollection.cs
  17. 78 68
      UAS_MES_JH/FunctionCode/Make/Make_RePrintLabel.Designer.cs
  18. 48 48
      UAS_MES_JH/FunctionCode/Make/Make_RePrintLabel.cs
  19. 177 92
      UAS_MES_JH/FunctionCode/Make/Make_TestCollection.Designer.cs
  20. 83 0
      UAS_MES_JH/FunctionCode/Make/Make_TestCollection.cs
  21. 9 6
      UAS_MES_JH/FunctionCode/Make/Make_TestCollection.resx
  22. 4 0
      UAS_MES_JH/FunctionCode/OQC/OQC_BatchResultJudge.Designer.cs
  23. 143 56
      UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.Designer.cs
  24. 24 16
      UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.cs
  25. 115 4
      UAS_MES_JH/FunctionCode/Packing/Packing_PalletCollection.Designer.cs
  26. 22 4
      UAS_MES_JH/FunctionCode/Packing/Packing_PalletCollection.cs
  27. 46 14
      UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.Designer.cs
  28. 7 6
      UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.cs
  29. 3 0
      UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.resx
  30. 329 888
      UAS_MES_JH/FunctionCode/Query/Query_MakeInf.Designer.cs
  31. 1 14
      UAS_MES_JH/FunctionCode/Query/Query_MakeInf.cs
  32. 15 72
      UAS_MES_JH/FunctionCode/Query/Query_MakeInf.resx
  33. 120 0
      UAS_MES_JH/FunctionCode/Special/Special_ChecknoSpitBox.Designer.cs
  34. 130 0
      UAS_MES_JH/FunctionCode/Special/Special_ChecknoSpitBox.cs
  35. 159 0
      UAS_MES_JH/FunctionCode/Special/Special_ChecknoSpitBox.resx
  36. 8 7
      UAS_MES_JH/FunctionCode/Warehouse/Warehouse_ProductMakeIn.Designer.cs
  37. 0 21
      UAS_MES_JH/FunctionCode/Warehouse/Warehouse_ProductMakeIn.resx
  38. 18 1
      UAS_MES_JH/PublicMethod/LogicHandler.cs
  39. 4 0
      UAS_MES_JH/PublicMethod/Print.cs
  40. 19 0
      UAS_MES_JH/UAS_MES_JH.csproj

+ 1 - 1
UAS_MES_JH/App.config

@@ -72,7 +72,7 @@
   <applicationSettings>
     <UAS_MES_NEW.Properties.Settings>
       <setting name="MES" serializeAs="String">
-        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.5)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
+        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=joyhong.tpddns.cn)(PORT=1522)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
       </setting>
     </UAS_MES_NEW.Properties.Settings>
     <UAS_MES.Properties.Settings>

+ 10 - 10
UAS_MES_JH/CustomControl/CustomCheckBox/LockCheckBox.cs

@@ -49,21 +49,21 @@ namespace UAS_MES_NEW.CustomControl.CustomCheckBox
             {
                 if (MaCtl.Text != "")
                 {
-                    string ErrorMessage;
-                    if (LogicHandler.CheckMakeStatus(MaCtl.Text, out ErrorMessage))
-                        MaCtl.Enabled = false;
-                    else
-                    {
-                        Checked = false;
-                        MaCtl.Text = "";
-                        BaseUtil.ShowError(ErrorMessage);
-                    }
+                    //string ErrorMessage;
+                    //if (LogicHandler.CheckMakeStatus(MaCtl.Text, out ErrorMessage))
+                    MaCtl.Enabled = false;
+                    //else
+                    //{
+                    //    Checked = false;
+                    //    MaCtl.Text = "";
+                    //    BaseUtil.ShowError(ErrorMessage);
+                    //}
                 }
                 else
                 {
                     Checked = false;
                     MaCtl.Text = "";
-                    BaseUtil.ShowError("工单号不能为空");
+                    BaseUtil.ShowError("数据不能为空");
                 }
             }
             else

+ 66 - 57
UAS_MES_JH/FunctionCode/Make/Make_CollectElec.Designer.cs

@@ -28,23 +28,22 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_CollectElec));
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.sncode_label = new System.Windows.Forms.Label();
-            this.mcd_remainqty_label = new System.Windows.Forms.Label();
-            this.mcd_okqty_label = new System.Windows.Forms.Label();
             this.pr_code_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.ms_colorcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.Delete = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.pr_electricmax = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
-            this.pr_electricmin = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
             this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.enterTextBox1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label2 = new System.Windows.Forms.Label();
             this.SuspendLayout();
             // 
             // pr_detail_label
@@ -69,26 +68,6 @@
             this.sncode_label.TabIndex = 190;
             this.sncode_label.Text = "录入框";
             // 
-            // mcd_remainqty_label
-            // 
-            this.mcd_remainqty_label.AutoSize = true;
-            this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty_label.Location = new System.Drawing.Point(236, 70);
-            this.mcd_remainqty_label.Name = "mcd_remainqty_label";
-            this.mcd_remainqty_label.Size = new System.Drawing.Size(90, 21);
-            this.mcd_remainqty_label.TabIndex = 187;
-            this.mcd_remainqty_label.Text = "电量最大值";
-            // 
-            // mcd_okqty_label
-            // 
-            this.mcd_okqty_label.AutoSize = true;
-            this.mcd_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty_label.Location = new System.Drawing.Point(6, 70);
-            this.mcd_okqty_label.Name = "mcd_okqty_label";
-            this.mcd_okqty_label.Size = new System.Drawing.Size(90, 21);
-            this.mcd_okqty_label.TabIndex = 186;
-            this.mcd_okqty_label.Text = "电量最小值";
-            // 
             // pr_code_label
             // 
             this.pr_code_label.AutoSize = true;
@@ -103,12 +82,34 @@
             // 
             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(6, 22);
+            this.ms_makecode_label.Location = new System.Drawing.Point(14, 22);
             this.ms_makecode_label.Name = "ms_makecode_label";
             this.ms_makecode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_makecode_label.TabIndex = 184;
             this.ms_makecode_label.Text = "工单编号";
             // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(13, 70);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(90, 21);
+            this.label1.TabIndex = 201;
+            this.label1.Text = "工单颜色号";
+            // 
+            // ms_colorcode
+            // 
+            this.ms_colorcode.AutoSize = true;
+            this.ms_colorcode.CutLength = null;
+            this.ms_colorcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_colorcode.Location = new System.Drawing.Point(108, 70);
+            this.ms_colorcode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ms_colorcode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_colorcode.Name = "ms_colorcode";
+            this.ms_colorcode.Size = new System.Drawing.Size(0, 21);
+            this.ms_colorcode.TabIndex = 202;
+            // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
@@ -144,33 +145,13 @@
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.CutLength = null;
             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(92, 22);
+            this.ms_makecode.Location = new System.Drawing.Point(101, 24);
             this.ms_makecode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.ms_makecode.MaximumSize = new System.Drawing.Size(200, 0);
             this.ms_makecode.Name = "ms_makecode";
             this.ms_makecode.Size = new System.Drawing.Size(0, 21);
             this.ms_makecode.TabIndex = 198;
             // 
-            // pr_electricmax
-            // 
-            this.pr_electricmax.AutoSize = true;
-            this.pr_electricmax.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_electricmax.Location = new System.Drawing.Point(332, 70);
-            this.pr_electricmax.Name = "pr_electricmax";
-            this.pr_electricmax.Size = new System.Drawing.Size(19, 21);
-            this.pr_electricmax.TabIndex = 195;
-            this.pr_electricmax.Text = "0";
-            // 
-            // pr_electricmin
-            // 
-            this.pr_electricmin.AutoSize = true;
-            this.pr_electricmin.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_electricmin.Location = new System.Drawing.Point(102, 70);
-            this.pr_electricmin.Name = "pr_electricmin";
-            this.pr_electricmin.Size = new System.Drawing.Size(19, 21);
-            this.pr_electricmin.TabIndex = 194;
-            this.pr_electricmin.Text = "0";
-            // 
             // ms_prodcode
             // 
             this.ms_prodcode.AutoSize = true;
@@ -215,31 +196,59 @@
             // 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(10, 106);
+            this.OperateResult.Location = new System.Drawing.Point(12, 96);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(553, 306);
             this.OperateResult.TabIndex = 188;
             this.OperateResult.Text = "";
             // 
+            // enterTextBox1
+            // 
+            this.enterTextBox1.AllPower = null;
+            this.enterTextBox1.BackColor = System.Drawing.Color.White;
+            this.enterTextBox1.ID = null;
+            this.enterTextBox1.Location = new System.Drawing.Point(278, 70);
+            this.enterTextBox1.Name = "enterTextBox1";
+            this.enterTextBox1.Power = null;
+            this.enterTextBox1.Size = new System.Drawing.Size(196, 21);
+            this.enterTextBox1.Str = null;
+            this.enterTextBox1.Str1 = null;
+            this.enterTextBox1.Str2 = null;
+            this.enterTextBox1.TabIndex = 220;
+            this.enterTextBox1.Leave += new System.EventHandler(this.enterTextBox1_Leave);
+            this.enterTextBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.enterTextBox1_MouseDoubleClick);
+            // 
+            // label2
+            // 
+            this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(236, 70);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(36, 21);
+            this.label2.TabIndex = 219;
+            this.label2.Text = "sku";
+            // 
             // Make_CollectElec
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(741, 454);
+            this.ClientSize = new System.Drawing.Size(638, 454);
+            this.Controls.Add(this.enterTextBox1);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.ms_colorcode);
+            this.Controls.Add(this.label1);
             this.Controls.Add(this.StepCount);
             this.Controls.Add(this.Delete);
             this.Controls.Add(this.ms_makecode);
-            this.Controls.Add(this.pr_electricmax);
-            this.Controls.Add(this.pr_electricmin);
             this.Controls.Add(this.ms_prodcode);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.sncode_label);
             this.Controls.Add(this.sncode);
             this.Controls.Add(this.OperateResult);
-            this.Controls.Add(this.mcd_remainqty_label);
-            this.Controls.Add(this.mcd_okqty_label);
             this.Controls.Add(this.pr_code_label);
             this.Controls.Add(this.ms_makecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
@@ -256,20 +265,20 @@
         }
 
         #endregion
-        private CustomControl.ValueLabel.ValueNumLabel pr_electricmax;
-        private CustomControl.ValueLabel.ValueNumLabel pr_electricmin;
         private CustomControl.ValueLabel.ValueLabel ms_prodcode;
         private CustomControl.ValueLabel.ValueLabel pr_detail;
         private System.Windows.Forms.Label pr_detail_label;
         private System.Windows.Forms.Label sncode_label;
         private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
-        private System.Windows.Forms.Label mcd_remainqty_label;
-        private System.Windows.Forms.Label mcd_okqty_label;
         private System.Windows.Forms.Label pr_code_label;
         private System.Windows.Forms.Label ms_makecode_label;
         private CustomControl.ValueLabel.ValueLabel ms_makecode;
         private CustomControl.ButtonUtil.NormalButton Delete;
         private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.ValueLabel.ValueLabel ms_colorcode;
+        private CustomControl.TextBoxWithIcon.EnterTextBox enterTextBox1;
+        private System.Windows.Forms.Label label2;
     }
 }

+ 21 - 23
UAS_MES_JH/FunctionCode/Make/Make_CollectElec.cs

@@ -80,11 +80,11 @@ namespace UAS_MES_NEW.Make
                         if (LogicHandler.CheckStepSNAndMacode(ms_makecode.Text == "" ? oMakeCode : ms_makecode.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage2))
                         {
                             sql.Clear();
-                            sql.Append("select ms_makecode,ms_prodcode,pr_detail,nvl(pr_electricmax,0)pr_electricmax,nvl(pr_electricmin,0)pr_electricmin from makeserial left join product on ");
+                            sql.Append("select ms_makecode,ms_prodcode,pr_detail,nvl(pr_electricmax,0)pr_electricmax,nvl(pr_electricmin,0)pr_electricmin,ms_colorcode from makeserial left join product on ");
                             sql.Append(" ms_prodcode = pr_code where ms_id  = '"+oMsID+"'");
                             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                             BaseUtil.SetFormValue(this.Controls, dt);
-                            OperateResult.AppendText(">>请输入电量\n", Color.Black);
+                            OperateResult.AppendText(">>请输入COLOR\n", Color.Black);
                             sn_code = sncode.Text;
                             sncode.Text = "";
                             isnetcode = true;
@@ -99,37 +99,25 @@ namespace UAS_MES_NEW.Make
                 {
                     if (sncode.Text == "")
                     {
-                        OperateResult.AppendText(">>电量信息不能为空\n", Color.Red);
+                        OperateResult.AppendText(">>COLOR信息不能为空\n", Color.Red);
                         return;
                     }
-                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
-                    string ErrorMessage = "";
-
-                    try
-                    {
-                        net_code =  float.Parse(sncode.Text);
-                        if (!(net_code <= float.Parse(pr_electricmax.Text) && (net_code >= float.Parse(pr_electricmin.Text))))
-                        {
-                            sncode.Text = "";
-                            OperateResult.AppendText("<<输入值" + sncode.Text + "不符合维护范围,重新输入\n", Color.Red);
-                            return;
-                        }
-                    }
-                    catch (Exception ex)
+                    if (ms_colorcode.Text != "" && ms_colorcode.Text != sncode.Text)
                     {
-                        sncode.Text = "";
-                        OperateResult.AppendText("<<输入值" + sncode.Text + "错误,重新输入\n", Color.Red);
+                        OperateResult.AppendText(">>COLOR"+ sncode.Text + "与工单设定COLOR"+ms_colorcode.Text+"不一致\n", Color.Red);
                         return;
                     }
+                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
+                    string ErrorMessage = "";
 
-                        if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code, "电量采集", "电量采集完成", User.UserCode, out ErrorMessage))
+                        if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code, "COLOR采集", "COLOR采集完成", User.UserCode, out ErrorMessage))
                         {
                             //提示正确返回时传递的信息
                             if (ErrorMessage.Contains("AFTERSUCCESS"))
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n");
-                            dh.BatchInsert("update  makeserial set MS_ELEC = :netcode where ms_id = :oMsId", new String[] { "netcode", "oMsId" }, new string[] { sncode.Text }, new string[] { oMsID.ToString() });
-                            OperateResult.AppendText(">>电量信息采集完成\n", Color.Green);
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "电量采集", "采集成功", sn_code, "");                        
+                            dh.BatchInsert("update  makeserial set MS_COLORCODE = :netcode where ms_id = :oMsId", new String[] { "netcode", "oMsId" }, new string[] { sncode.Text }, new string[] { oMsID.ToString() });
+                            OperateResult.AppendText(">>COLOR信息采集完成\n", Color.Green);
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "COLOR采集", "采集成功", sn_code, "");                        
                             isnetcode = false;
                             sncode.Text = "";
                             sncode.Focus();
@@ -165,5 +153,15 @@ namespace UAS_MES_NEW.Make
                 sncode.Focus();
             }
         }
+
+        private void enterTextBox1_Leave(object sender, EventArgs e)
+        {
+            enterTextBox1.ReadOnly = true;
+        }
+
+        private void enterTextBox1_MouseDoubleClick(object sender, MouseEventArgs e)
+        {
+            enterTextBox1.ReadOnly = false;
+        }
     }
 }

+ 51 - 0
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint.Designer.cs

@@ -46,6 +46,8 @@
             this.label3 = new System.Windows.Forms.Label();
             this.StartWatch = new System.Windows.Forms.Button();
             this.StopWatch = new System.Windows.Forms.Button();
+            this.label5 = new System.Windows.Forms.Label();
+            this.US_SKU = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
@@ -59,6 +61,7 @@
             this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.lockCheckBox1 = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).BeginInit();
             this.SuspendLayout();
             // 
@@ -243,6 +246,36 @@
             this.StopWatch.UseVisualStyleBackColor = true;
             this.StopWatch.Click += new System.EventHandler(this.StopWatch_Click);
             // 
+            // label5
+            // 
+            this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            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(345, 450);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(41, 21);
+            this.label5.TabIndex = 203;
+            this.label5.Text = "SKU";
+            // 
+            // US_SKU
+            // 
+            this.US_SKU.AllPower = null;
+            this.US_SKU.Caller = null;
+            this.US_SKU.Condition = null;
+            this.US_SKU.DBTitle = null;
+            this.US_SKU.FormName = null;
+            this.US_SKU.Location = new System.Drawing.Point(392, 450);
+            this.US_SKU.Name = "US_SKU";
+            this.US_SKU.Power = null;
+            this.US_SKU.ReturnData = null;
+            this.US_SKU.SelectField = null;
+            this.US_SKU.SetValueField = null;
+            this.US_SKU.Size = new System.Drawing.Size(207, 21);
+            this.US_SKU.TabIndex = 204;
+            this.US_SKU.TableName = null;
+            this.US_SKU.TextBoxEnable = true;
+            // 
             // Remark
             // 
             this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -402,11 +435,26 @@
             this.OperateResult.TabIndex = 168;
             this.OperateResult.Text = "";
             // 
+            // lockCheckBox1
+            // 
+            this.lockCheckBox1.AutoSize = true;
+            this.lockCheckBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lockCheckBox1.LeaveEvent = false;
+            this.lockCheckBox1.Location = new System.Drawing.Point(605, 450);
+            this.lockCheckBox1.Name = "lockCheckBox1";
+            this.lockCheckBox1.Size = new System.Drawing.Size(51, 21);
+            this.lockCheckBox1.TabIndex = 205;
+            this.lockCheckBox1.Text = "锁定";
+            this.lockCheckBox1.UseVisualStyleBackColor = true;
+            // 
             // Make_ColorBoxLabelPrint
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(938, 480);
+            this.Controls.Add(this.lockCheckBox1);
+            this.Controls.Add(this.US_SKU);
+            this.Controls.Add(this.label5);
             this.Controls.Add(this.StopWatch);
             this.Controls.Add(this.StartWatch);
             this.Controls.Add(this.ChooseFolder);
@@ -482,5 +530,8 @@
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Button StartWatch;
         private System.Windows.Forms.Button StopWatch;
+        private System.Windows.Forms.Label label5;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox US_SKU;
+        private CustomControl.CustomCheckBox.LockCheckBox lockCheckBox1;
     }
 }

+ 35 - 12
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -60,7 +60,18 @@ namespace UAS_MES_NEW.Make
             ma_code.SetValueField = new string[] { "ma_code", "pr_code", "pr_detail" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
-            OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+
+            lockCheckBox1.GetMakeCodeCtl(US_SKU);
+            US_SKU.SetLockCheckBox(lockCheckBox1);
+            US_SKU.TableName = "upcsku"; 
+            US_SKU.SelectField = "US_PRODUCTCOLOR # PRODUCT_COLOR,US_COLORCODE # 颜色号,US_SKU # SKU,US_UPC # UPC";
+            US_SKU.FormName = Name;
+            US_SKU.SetValueField = new string[] { "US_SKU" };
+            US_SKU.Condition = "1=1";
+            US_SKU.DbChange += US_SKU_DbChange;
+
+
+            OperateResult.AppendText(">>请输入SN\n", Color.Black);
             dh = SystemInf.dh;
             FolderPath.Text = BaseUtil.GetCacheData("FolderPath").ToString();
             StepCount.StepCode = User.CurrentStepCode;
@@ -70,6 +81,12 @@ namespace UAS_MES_NEW.Make
             StepCount.Start();
         }
 
+        private void US_SKU_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = US_SKU.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
         private void Ma_code_DbChange(object sender, EventArgs e)
         {
             Dbfind = ma_code.ReturnData;
@@ -180,16 +197,16 @@ namespace UAS_MES_NEW.Make
                             OperateResult.AppendText("<<工单号:" + ma_code.Text + "\n", Color.Black);
                             //提示用户“<< 序列号:XXXX”
                             OperateResult.AppendText("<<序列号:" + sncode.Text + "\n", Color.Black);
-                            if (pr_change)
-                            {
-                                String dialog = MessageBox.Show("是否使用当前标签模板", "提示", MessageBoxButtons.OKCancel).ToString();
-                                if (dialog != "OK")
-                                {
-                                    OperateResult.AppendText(">>请重新选择标签模板\n", Color.Green);
-                                    return;
-                                }
-                                else pr_change = false;
-                            }
+                            //if (pr_change)
+                            //{
+                            //    String dialog = MessageBox.Show("是否使用当前标签模板", "提示", MessageBoxButtons.OKCancel).ToString();
+                            //    if (dialog != "OK")
+                            //    {
+                            //        OperateResult.AppendText(">>请重新选择标签模板\n", Color.Green);
+                            //        return;
+                            //    }
+                            //    else pr_change = false;
+                            //}
                         }
                         else
                         {
@@ -235,11 +252,15 @@ namespace UAS_MES_NEW.Make
                                     {
                                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                                     }
+                                    if (US_SKU.Text != "")
+                                    {
+                                      dh.ExecuteSql("update makeserial set ms_sku = '"+US_SKU.Text+"' where ms_sncode = '"+sncode.Text+"' and ms_makecode = '"+ma_code.Text+"'","update");
+                                    }
                                     if (CollectRemark.Checked && Remark.Text != "")
                                     {
                                         LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, pr_code.Text, Remark.Text);
                                     }
-                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒打印", "彩盒打印成功", sncode.Text, "");
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒打印", "彩盒打印成功", sncode.Text, US_SKU.Text);
                                     //刷新打印数量和剩余数量
                                     dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,mcd_okqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
                                     BaseUtil.SetFormValue(Controls, dt);
@@ -447,5 +468,7 @@ namespace UAS_MES_NEW.Make
                 FolderPath.Text = folder.SelectedPath;
             }
         }
+
+     
     }
 }

+ 3 - 2
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -137,7 +137,7 @@ namespace UAS_MES_NEW.Make
                                 code.Text = "";
                             }
                             sql.Clear();
-                            sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,max(sp_checkbarcode)sp_checkbarcode,min(sp_checksalecode)sp_checksalecode,sp_fsoncode,max(sp_barcoderule)");
+                            sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,min(sp_iflabelcheck)sp_iflabelcheck,max(sp_checkbarcode)sp_checkbarcode,min(sp_checksalecode)sp_checksalecode,sp_fsoncode,max(sp_barcoderule)");
                             sql.Append("sp_barcoderule,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
                             sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
                             sql.Append("sp_regex,max(pr_detail)pr_detail from stepproduct left join product on pr_code=sp_fsoncode where ");
@@ -217,7 +217,8 @@ namespace UAS_MES_NEW.Make
                         string sp_barcoderule = ListA.Rows[RemainIndex]["sp_barcoderule"].ToString();
                         string sp_checkbarcode = ListA.Rows[RemainIndex]["sp_checkbarcode"].ToString();
                         string sp_checksalecode = ListA.Rows[RemainIndex]["sp_checksalecode"].ToString();
-                        if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
+                        string sp_iflabelcheck = ListA.Rows[RemainIndex]["sp_iflabelcheck"].ToString();
+                        if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, sp_iflabelcheck, out ErrorMessage))
                         {
                             //判断采集的条码和本次采集的也不能重复
                             if (CollectData.Contains(code.Text) && sp_ifrepeat != "-1")

+ 139 - 75
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs

@@ -56,6 +56,12 @@
             this.mcd_remainqty_label = new System.Windows.Forms.Label();
             this.CollectRemark = new System.Windows.Forms.CheckBox();
             this.locksalecode = new System.Windows.Forms.CheckBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.DeleteAll = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.lockCheckBox1 = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.US_SKU = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
@@ -71,7 +77,6 @@
             this.ob_batchqty_label = new System.Windows.Forms.Label();
             this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.pr_colorboxgw = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.AutoPrint = new UAS_MES_NEW.CustomControl.CustomCheckBox.AutoPrintCheckBox();
             this.pr_code = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
@@ -79,14 +84,12 @@
             this.StartWeight = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.Confirm = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ma_qty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.pr_spec = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.ma_salecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ma_colorcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_sku = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.normalButton1 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
-            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
-            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.panel4.SuspendLayout();
             this.groupBoxWithBorder2.SuspendLayout();
             this.SuspendLayout();
@@ -174,9 +177,9 @@
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_detail_label.Location = new System.Drawing.Point(16, 402);
             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(52, 27);
             this.pr_detail_label.TabIndex = 53;
-            this.pr_detail_label.Text = "产品规格";
+            this.pr_detail_label.Text = "颜色";
             // 
             // ma_qty_label
             // 
@@ -194,9 +197,9 @@
             this.ma_salecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ma_salecode_label.Location = new System.Drawing.Point(16, 355);
             this.ma_salecode_label.Name = "ma_salecode_label";
-            this.ma_salecode_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_salecode_label.Size = new System.Drawing.Size(52, 27);
             this.ma_salecode_label.TabIndex = 54;
-            this.ma_salecode_label.Text = "订单编号";
+            this.ma_salecode_label.Text = "SKU";
             // 
             // ms_makecode_label
             // 
@@ -331,12 +334,13 @@
             this.CollectRemark.Checked = true;
             this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.CollectRemark.Location = new System.Drawing.Point(772, 174);
+            this.CollectRemark.Location = new System.Drawing.Point(938, 555);
             this.CollectRemark.Name = "CollectRemark";
             this.CollectRemark.Size = new System.Drawing.Size(84, 24);
             this.CollectRemark.TabIndex = 195;
             this.CollectRemark.Text = "采集备注";
             this.CollectRemark.UseVisualStyleBackColor = true;
+            this.CollectRemark.Visible = false;
             // 
             // locksalecode
             // 
@@ -351,16 +355,109 @@
             this.locksalecode.TabIndex = 204;
             this.locksalecode.Text = "当前订单锁定";
             this.locksalecode.UseVisualStyleBackColor = true;
+            this.locksalecode.Visible = false;
+            // 
+            // label5
+            // 
+            this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            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(781, 184);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(41, 21);
+            this.label5.TabIndex = 207;
+            this.label5.Text = "SKU";
+            // 
+            // DeleteAll
+            // 
+            this.DeleteAll.AllPower = null;
+            this.DeleteAll.BackColor = System.Drawing.Color.Transparent;
+            this.DeleteAll.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteAll.DownImage")));
+            this.DeleteAll.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.DeleteAll.Image = null;
+            this.DeleteAll.IsShowBorder = true;
+            this.DeleteAll.Location = new System.Drawing.Point(858, 250);
+            this.DeleteAll.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteAll.MoveImage")));
+            this.DeleteAll.Name = "DeleteAll";
+            this.DeleteAll.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteAll.NormalImage")));
+            this.DeleteAll.Power = "ifspecial";
+            this.DeleteAll.Size = new System.Drawing.Size(70, 24);
+            this.DeleteAll.TabIndex = 210;
+            this.DeleteAll.Text = "更新SKU";
+            this.DeleteAll.UseVisualStyleBackColor = true;
+            this.DeleteAll.Click += new System.EventHandler(this.DeleteAll_Click);
+            // 
+            // lockCheckBox1
+            // 
+            this.lockCheckBox1.AutoSize = true;
+            this.lockCheckBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lockCheckBox1.LeaveEvent = false;
+            this.lockCheckBox1.Location = new System.Drawing.Point(950, 213);
+            this.lockCheckBox1.Name = "lockCheckBox1";
+            this.lockCheckBox1.Size = new System.Drawing.Size(51, 21);
+            this.lockCheckBox1.TabIndex = 209;
+            this.lockCheckBox1.Text = "锁定";
+            this.lockCheckBox1.UseVisualStyleBackColor = true;
+            // 
+            // US_SKU
+            // 
+            this.US_SKU.AllPower = null;
+            this.US_SKU.Caller = null;
+            this.US_SKU.Condition = null;
+            this.US_SKU.DBTitle = null;
+            this.US_SKU.FormName = null;
+            this.US_SKU.Location = new System.Drawing.Point(784, 213);
+            this.US_SKU.Name = "US_SKU";
+            this.US_SKU.Power = null;
+            this.US_SKU.ReturnData = null;
+            this.US_SKU.SelectField = null;
+            this.US_SKU.SetValueField = null;
+            this.US_SKU.Size = new System.Drawing.Size(160, 21);
+            this.US_SKU.TabIndex = 208;
+            this.US_SKU.TableName = null;
+            this.US_SKU.TextBoxEnable = true;
+            // 
+            // LockMakeCode
+            // 
+            this.LockMakeCode.AutoSize = true;
+            this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LockMakeCode.LeaveEvent = false;
+            this.LockMakeCode.Location = new System.Drawing.Point(280, 268);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(51, 21);
+            this.LockMakeCode.TabIndex = 206;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = null;
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = null;
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(114, 267);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = null;
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(149, 21);
+            this.ma_code.TabIndex = 205;
+            this.ma_code.TableName = null;
+            this.ma_code.TextBoxEnable = true;
             // 
             // Remark
             // 
             this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Remark.Location = new System.Drawing.Point(768, 202);
+            this.Remark.Location = new System.Drawing.Point(812, 572);
             this.Remark.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Remark.Name = "Remark";
-            this.Remark.Size = new System.Drawing.Size(240, 80);
+            this.Remark.Size = new System.Drawing.Size(10, 10);
             this.Remark.TabIndex = 194;
             this.Remark.Text = "";
+            this.Remark.Visible = false;
             // 
             // mcd_remainqty
             // 
@@ -543,15 +640,6 @@
             this.pr_colorboxgw.TabIndex = 80;
             this.pr_colorboxgw.Tag = "1";
             // 
-            // AutoPrint
-            // 
-            this.AutoPrint.Checked = false;
-            this.AutoPrint.Location = new System.Drawing.Point(774, 22);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(105, 22);
-            this.AutoPrint.TabIndex = 174;
-            // 
             // pr_code
             // 
             this.pr_code.AutoSize = true;
@@ -652,27 +740,27 @@
             this.ma_qty.Size = new System.Drawing.Size(0, 27);
             this.ma_qty.TabIndex = 76;
             // 
-            // pr_spec
+            // ma_colorcode
             // 
-            this.pr_spec.AutoSize = true;
-            this.pr_spec.CutLength = null;
-            this.pr_spec.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_spec.Location = new System.Drawing.Point(128, 402);
-            this.pr_spec.MaximumSize = new System.Drawing.Size(150, 0);
-            this.pr_spec.Name = "pr_spec";
-            this.pr_spec.Size = new System.Drawing.Size(0, 27);
-            this.pr_spec.TabIndex = 75;
+            this.ma_colorcode.AutoSize = true;
+            this.ma_colorcode.CutLength = null;
+            this.ma_colorcode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_colorcode.Location = new System.Drawing.Point(128, 402);
+            this.ma_colorcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ma_colorcode.Name = "ma_colorcode";
+            this.ma_colorcode.Size = new System.Drawing.Size(0, 27);
+            this.ma_colorcode.TabIndex = 75;
             // 
-            // ma_salecode
+            // ms_sku
             // 
-            this.ma_salecode.AutoSize = true;
-            this.ma_salecode.CutLength = null;
-            this.ma_salecode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_salecode.Location = new System.Drawing.Point(128, 355);
-            this.ma_salecode.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ma_salecode.Name = "ma_salecode";
-            this.ma_salecode.Size = new System.Drawing.Size(0, 27);
-            this.ma_salecode.TabIndex = 75;
+            this.ms_sku.AutoSize = true;
+            this.ms_sku.CutLength = null;
+            this.ms_sku.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_sku.Location = new System.Drawing.Point(128, 355);
+            this.ms_sku.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_sku.Name = "ms_sku";
+            this.ms_sku.Size = new System.Drawing.Size(0, 27);
+            this.ms_sku.TabIndex = 75;
             // 
             // Clean
             // 
@@ -738,41 +826,15 @@
             this.OperateResult.TabIndex = 58;
             this.OperateResult.Text = "";
             // 
-            // LockMakeCode
-            // 
-            this.LockMakeCode.AutoSize = true;
-            this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.LockMakeCode.LeaveEvent = false;
-            this.LockMakeCode.Location = new System.Drawing.Point(280, 268);
-            this.LockMakeCode.Name = "LockMakeCode";
-            this.LockMakeCode.Size = new System.Drawing.Size(51, 21);
-            this.LockMakeCode.TabIndex = 206;
-            this.LockMakeCode.Text = "锁定";
-            this.LockMakeCode.UseVisualStyleBackColor = true;
-            // 
-            // ma_code
-            // 
-            this.ma_code.AllPower = null;
-            this.ma_code.Caller = null;
-            this.ma_code.Condition = null;
-            this.ma_code.DBTitle = null;
-            this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(114, 267);
-            this.ma_code.Name = "ma_code";
-            this.ma_code.Power = null;
-            this.ma_code.ReturnData = null;
-            this.ma_code.SelectField = null;
-            this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(149, 21);
-            this.ma_code.TabIndex = 205;
-            this.ma_code.TableName = null;
-            this.ma_code.TextBoxEnable = true;
-            // 
             // Make_ColorBoxWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1013, 584);
+            this.Controls.Add(this.DeleteAll);
+            this.Controls.Add(this.lockCheckBox1);
+            this.Controls.Add(this.US_SKU);
+            this.Controls.Add(this.label5);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.locksalecode);
@@ -788,7 +850,6 @@
             this.Controls.Add(this.PrintNum);
             this.Controls.Add(this.groupBoxWithBorder2);
             this.Controls.Add(this.pr_colorboxgw);
-            this.Controls.Add(this.AutoPrint);
             this.Controls.Add(this.pr_colorboxgw_label);
             this.Controls.Add(this.pr_code);
             this.Controls.Add(this.WeighRecord);
@@ -804,8 +865,8 @@
             this.Controls.Add(this.StartWeight);
             this.Controls.Add(this.Confirm);
             this.Controls.Add(this.ma_qty);
-            this.Controls.Add(this.pr_spec);
-            this.Controls.Add(this.ma_salecode);
+            this.Controls.Add(this.ma_colorcode);
+            this.Controls.Add(this.ms_sku);
             this.Controls.Add(this.ms_makecode_label);
             this.Controls.Add(this.Clean);
             this.Controls.Add(this.normalButton1);
@@ -849,8 +910,8 @@
         private System.Windows.Forms.Label ma_salecode_label;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private System.Windows.Forms.Label ms_makecode_label;
-        private CustomControl.ValueLabel.ValueLabel ma_salecode;
-        private CustomControl.ValueLabel.ValueLabel pr_spec;
+        private CustomControl.ValueLabel.ValueLabel ms_sku;
+        private CustomControl.ValueLabel.ValueLabel ma_colorcode;
         private CustomControl.ValueLabel.ValueLabel ma_qty;
         private CustomControl.ValueLabel.ValueLabel pr_code;
         private CustomControl.ValueLabel.ValueLabel pr_colorboxgw;
@@ -869,7 +930,6 @@
         private System.Windows.Forms.ColumnHeader columnHeader2;
         private System.Windows.Forms.ColumnHeader columnHeader3;
         private System.Windows.Forms.ColumnHeader columnHeader4;
-        private CustomControl.CustomCheckBox.AutoPrintCheckBox AutoPrint;
         private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder2;
         private System.Windows.Forms.Label ob_nowcheckqty;
         private System.Windows.Forms.Label ob_batchqty;
@@ -891,5 +951,9 @@
         public System.Windows.Forms.Label ob_checkno;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private System.Windows.Forms.Label label5;
+        private CustomControl.CustomCheckBox.LockCheckBox lockCheckBox1;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox US_SKU;
+        private CustomControl.ButtonUtil.NormalButton DeleteAll;
     }
 }

+ 38 - 15
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -71,9 +71,20 @@ namespace UAS_MES_NEW.Make
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
             ma_code.SelectField = "ma_code # 工单号,pr_code # 产品编号,pr_spec # 产品规格";
             ma_code.FormName = Name;
-            ma_code.SetValueField = new string[] { "ma_code", "pr_code", "pr_spec" };
+            ma_code.SetValueField = new string[] { "ma_code", "pr_code"};
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
+
+            lockCheckBox1.GetMakeCodeCtl(US_SKU);
+            US_SKU.SetLockCheckBox(lockCheckBox1);
+            US_SKU.TableName = "upcsku";
+            US_SKU.SelectField = "US_PRODUCTCOLOR # PRODUCT_COLOR,US_COLORCODE # 颜色号,US_SKU # SKU,US_UPC # UPC";
+            US_SKU.FormName = Name;
+            US_SKU.SetValueField = new string[] { "US_SKU" };
+            US_SKU.Condition = "1=1";
+            US_SKU.DbChange += US_SKU_DbChange;
+
+
             StartWeight.PerformClick();
             dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
@@ -83,13 +94,19 @@ namespace UAS_MES_NEW.Make
             StepCount.Start();
         }
 
+        private void US_SKU_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = US_SKU.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
         private void Ma_code_DbChange(object sender, EventArgs e)
         {
             Dbfind = ma_code.ReturnData;
             BaseUtil.SetFormValue(this.Controls, Dbfind);
             //获取工单的其他信息
             sql.Clear();
-            sql.Append("select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode as pr_code ,pr_spec,");
+            sql.Append("select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode as pr_code,ma_colorcode,");
             sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
             sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -129,7 +146,7 @@ namespace UAS_MES_NEW.Make
                       //    return;
                       //}
                     sql.Clear();
-                    sql.Append("select ms_makecode ma_code,ma_qty,ma_salecode,pr_spec,pr_colorboxunit,pr_code,pr_colorboxgw,");
+                    sql.Append("select ms_makecode ma_code,ma_qty,ma_salecode,ma_colorcode,pr_colorboxunit,pr_code,ms_sku,pr_colorboxgw,");
                     sql.Append("pr_colorboxunit,pr_colorboxmaxw,pr_colorboxminw,nvl(PR_CHECKCOLORBOXW,'0') PR_CHECKCOLORBOXW,nvl(pr_sendchecktype,'LineCode')");
                     sql.Append("pr_sendchecktype from makeserial left join make on ms_makecode=ma_code left join product on ");
                     sql.Append("ms_prodcode=pr_code where ms_sncode='" + sncode.Text + "' order by ms_id desc");
@@ -148,13 +165,13 @@ namespace UAS_MES_NEW.Make
                         Weight = double.Parse(_weight == "" ? "0" : _weight);
                         MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
                         MinWeight = double.Parse(_minweight == "" ? "0" : _minweight);
-                        if (locksalecode.Checked && ma_salecode.Text != "" && ma_salecode.Text != ma_salecode_text)
-                        {
-                            OperateResult.AppendText(">>序列号" + sncode.Text + "所属订单号" + ma_salecode_text + "与界面订单号" + ma_salecode.Text + "不同,无法采集\n", Color.Red, sncode);
-                            return;
-                        }
-                        ma_salecode.Text = dt.Rows[0]["ma_salecode"].ToString();
+                        ms_sku.Text = dt.Rows[0]["ma_salecode"].ToString();
                         BaseUtil.SetFormValue(this.Controls, dt);
+                            if (ms_sku.Text != US_SKU.Text)
+                            {
+                                OperateResult.AppendText(">>成品" + sncode.Text + "SKU为"+ ms_sku.Text + "与界面维护sku"+US_SKU.Text+"不一致\n", Color.Red);
+                                return;
+                            }
                         if (Weight - MinWeight == MaxWeight - Weight)
                             pr_colorboxgw.Text = Weight + "±" + (MaxWeight - Weight) + dt.Rows[0]["pr_colorboxunit"].ToString();
                         else
@@ -210,11 +227,6 @@ namespace UAS_MES_NEW.Make
                                 LoadCheckQTY();
                                 //记录送检前的最后一个序列号
                                 LastSncode = sncode.Text;
-                                if (AutoPrint.Checked)
-                                {
-                                    OperateResult.AppendText(">>打印条码号" + sncode.Text + "\n", Color.Green);
-                                    Confirm.PerformClick();
-                                }
                             }
                             else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                             if (CollectRemark.Checked && Remark.Text != "")
@@ -384,7 +396,7 @@ namespace UAS_MES_NEW.Make
             }
             if (pr_sendchecktype.Text == "SaleCode")
             {
-                condition += " and ob_salecode='" + ma_salecode.Text + "'";
+                condition += " and ob_salecode='" + ms_sku.Text + "'";
             }
             sql.Append("select ob_batchqty,ob_nowcheckqty,ob_checkno from oqcbatch where ");
             sql.Append("ob_linecode='" + User.UserLineCode + "' and ob_prodcode='" + pr_code.Text + "' and ");
@@ -473,5 +485,16 @@ namespace UAS_MES_NEW.Make
             dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
             BaseUtil.SetFormValue(Controls, dt);
         }
+
+        private void DeleteAll_Click(object sender, EventArgs e)
+        {
+            if (sncode.Text == "" || US_SKU.Text == "")
+            {
+                OperateResult.AppendText(">>成品SN号以及SKU均不可为空\n", Color.Red);
+                return;
+            }
+            dh.ExecuteSql("update makeserial set ms_sku = '" + US_SKU.Text + "' where ms_sncode = '" + sncode.Text + "'", "update");
+            OperateResult.AppendText(">>成品SN号"+ sncode.Text + "更新SKU"+ US_SKU.Text + "成功\n", Color.Green);
+        }
     }
 }

+ 38 - 0
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.resx

@@ -118,6 +118,44 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="DeleteAll.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="DeleteAll.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="DeleteAll.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
   <data name="RefreshWeigh.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 3 - 2
UAS_MES_JH/FunctionCode/Make/Make_Decompose.cs

@@ -259,7 +259,7 @@ namespace UAS_MES_NEW.Make
                             }
                             dtbar = new DataTable();
                             sql.Clear();
-                            sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,sp_fsoncode,max(sp_barcoderule)");
+                            sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,min(sp_iflabelcheck) sp_iflabelcheck,sp_fsoncode,max(sp_barcoderule)");
                             sql.Append("sp_barcoderule, min(sp_checksalecode)sp_checksalecode,sp_tracekind,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
                             sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
                             sql.Append("sp_regex,max(pr_detail)pr_detail from stepproduct left join product on pr_code=sp_fsoncode where ");
@@ -279,10 +279,11 @@ namespace UAS_MES_NEW.Make
                                 string sp_ifrepeat = dtbar.Rows[0]["sp_ifrepeat"].ToString();
                                 string sp_barcoderule = dtbar.Rows[0]["sp_barcoderule"].ToString();
                                 string sp_checksalecode = dtbar.Rows[0]["sp_checksalecode"].ToString();
+                                string sp_iflabelcheck = dtbar.Rows[0]["sp_iflabelcheck"].ToString();
                                 if (sp_tracekind == "1")
                                 {
                                     //上料校验规则判断
-                                    if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString(), LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
+                                    if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString(), LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, sp_iflabelcheck, out ErrorMessage))
                                     {
                                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                                         LoadData(sncode_1, sender, new KeyEventArgs(Keys.Enter));

+ 915 - 0
UAS_MES_JH/FunctionCode/Make/Make_Decompose_Ex.Designer.cs

@@ -0,0 +1,915 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_Decompose_Ex
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_Decompose_Ex));
+            this.pa_makecode_label = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.LabelDataGridView = new System.Windows.Forms.DataGridView();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.cm_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_spid = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_firstsn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_wccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_fsoncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_stepcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_stepname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_craftname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_craftcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_bgcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_badcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.AddBad = new System.Windows.Forms.DataGridViewImageColumn();
+            this.cm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail_ = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.New_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_status_1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_maid = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_materialtype = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_maprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.change = new System.Windows.Forms.RadioButton();
+            this.nochange = new System.Windows.Forms.RadioButton();
+            this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
+            this.dataGridViewTextBoxColumn14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn15 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn16 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn17 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn19 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn20 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn21 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn22 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_name = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_wccode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_craftname = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_craftcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.deccount = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_sncode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.Decompose = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.dataGridViewCheckBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // pa_makecode_label
+            // 
+            this.pa_makecode_label.AutoSize = true;
+            this.pa_makecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_makecode_label.Location = new System.Drawing.Point(33, 529);
+            this.pa_makecode_label.Name = "pa_makecode_label";
+            this.pa_makecode_label.Size = new System.Drawing.Size(72, 27);
+            this.pa_makecode_label.TabIndex = 173;
+            this.pa_makecode_label.Text = "序列号";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(33, 18);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(58, 21);
+            this.label1.TabIndex = 177;
+            this.label1.Text = "序列号";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(33, 66);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(74, 21);
+            this.label2.TabIndex = 178;
+            this.label2.Text = "产品编号";
+            // 
+            // label3
+            // 
+            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(315, 66);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(74, 21);
+            this.label3.TabIndex = 179;
+            this.label3.Text = "产品名称";
+            // 
+            // label4
+            // 
+            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(315, 18);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(58, 21);
+            this.label4.TabIndex = 180;
+            this.label4.Text = "工单号";
+            // 
+            // label5
+            // 
+            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(727, 18);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(74, 21);
+            this.label5.TabIndex = 181;
+            this.label5.Text = "已采集数";
+            // 
+            // LabelDataGridView
+            // 
+            this.LabelDataGridView.AllowUserToAddRows = false;
+            this.LabelDataGridView.AllowUserToResizeRows = false;
+            this.LabelDataGridView.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
+            this.LabelDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Choose,
+            this.cm_status,
+            this.cm_spid,
+            this.cm_firstsn,
+            this.cm_wccode,
+            this.cm_fsoncode,
+            this.cm_stepcode,
+            this.cm_stepname,
+            this.cm_craftname,
+            this.cm_craftcode,
+            this.cm_id,
+            this.pr_detail,
+            this.mb_bgcode,
+            this.mb_badcode,
+            this.AddBad,
+            this.cm_makecode,
+            this.pr_detail_,
+            this.cm_soncode,
+            this.cm_barcode,
+            this.New_BarCode,
+            this.cm_status_1,
+            this.cm_maid,
+            this.cm_materialtype,
+            this.cm_maprodcode,
+            this.cm_sncode});
+            this.LabelDataGridView.Location = new System.Drawing.Point(12, 102);
+            this.LabelDataGridView.Name = "LabelDataGridView";
+            this.LabelDataGridView.RowHeadersVisible = false;
+            this.LabelDataGridView.RowTemplate.Height = 23;
+            this.LabelDataGridView.Size = new System.Drawing.Size(889, 233);
+            this.LabelDataGridView.TabIndex = 188;
+            this.LabelDataGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelDataGridView_CellContentClick);
+            this.LabelDataGridView.Sorted += new System.EventHandler(this.LabelDataGridView_Sorted);
+            // 
+            // Choose
+            // 
+            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Choose.HeaderText = "勾选";
+            this.Choose.MinimumWidth = 80;
+            this.Choose.Name = "Choose";
+            this.Choose.Width = 80;
+            // 
+            // cm_status
+            // 
+            this.cm_status.DataPropertyName = "cm_status";
+            this.cm_status.HeaderText = "";
+            this.cm_status.Name = "cm_status";
+            this.cm_status.Visible = false;
+            // 
+            // cm_spid
+            // 
+            this.cm_spid.DataPropertyName = "cm_spid";
+            this.cm_spid.HeaderText = "";
+            this.cm_spid.Name = "cm_spid";
+            this.cm_spid.Visible = false;
+            // 
+            // cm_firstsn
+            // 
+            this.cm_firstsn.DataPropertyName = "cm_firstsn";
+            this.cm_firstsn.HeaderText = "";
+            this.cm_firstsn.Name = "cm_firstsn";
+            this.cm_firstsn.Visible = false;
+            // 
+            // cm_wccode
+            // 
+            this.cm_wccode.DataPropertyName = "cm_wccode";
+            this.cm_wccode.HeaderText = "";
+            this.cm_wccode.Name = "cm_wccode";
+            this.cm_wccode.Visible = false;
+            // 
+            // cm_fsoncode
+            // 
+            this.cm_fsoncode.DataPropertyName = "cm_fsoncode";
+            this.cm_fsoncode.HeaderText = "";
+            this.cm_fsoncode.Name = "cm_fsoncode";
+            this.cm_fsoncode.Visible = false;
+            // 
+            // cm_stepcode
+            // 
+            this.cm_stepcode.DataPropertyName = "cm_stepcode";
+            this.cm_stepcode.HeaderText = "";
+            this.cm_stepcode.Name = "cm_stepcode";
+            this.cm_stepcode.Visible = false;
+            // 
+            // cm_stepname
+            // 
+            this.cm_stepname.DataPropertyName = "cm_stepname";
+            this.cm_stepname.HeaderText = "";
+            this.cm_stepname.Name = "cm_stepname";
+            this.cm_stepname.Visible = false;
+            // 
+            // cm_craftname
+            // 
+            this.cm_craftname.DataPropertyName = "cm_craftname";
+            this.cm_craftname.HeaderText = "";
+            this.cm_craftname.Name = "cm_craftname";
+            this.cm_craftname.Visible = false;
+            // 
+            // cm_craftcode
+            // 
+            this.cm_craftcode.DataPropertyName = "cm_craftcode";
+            this.cm_craftcode.HeaderText = "";
+            this.cm_craftcode.Name = "cm_craftcode";
+            this.cm_craftcode.Visible = false;
+            // 
+            // cm_id
+            // 
+            this.cm_id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.cm_id.DataPropertyName = "cm_id";
+            this.cm_id.HeaderText = "cm_id";
+            this.cm_id.MinimumWidth = 40;
+            this.cm_id.Name = "cm_id";
+            this.cm_id.Visible = false;
+            this.cm_id.Width = 40;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.DataPropertyName = "pr_detail";
+            this.pr_detail.HeaderText = "pr_detail";
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Visible = false;
+            this.pr_detail.Width = 80;
+            // 
+            // mb_bgcode
+            // 
+            this.mb_bgcode.HeaderText = "不良代码组编号";
+            this.mb_bgcode.Name = "mb_bgcode";
+            this.mb_bgcode.ReadOnly = true;
+            this.mb_bgcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.mb_bgcode.Visible = false;
+            this.mb_bgcode.Width = 80;
+            // 
+            // mb_badcode
+            // 
+            this.mb_badcode.HeaderText = "不良代码";
+            this.mb_badcode.Name = "mb_badcode";
+            this.mb_badcode.ReadOnly = true;
+            this.mb_badcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.mb_badcode.Width = 80;
+            // 
+            // AddBad
+            // 
+            this.AddBad.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.AddBad.HeaderText = "";
+            this.AddBad.Image = global::UAS_MES_NEW.Properties.Resources.plus;
+            this.AddBad.Name = "AddBad";
+            this.AddBad.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.AddBad.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.AddBad.Width = 20;
+            // 
+            // cm_makecode
+            // 
+            this.cm_makecode.DataPropertyName = "cm_makecode";
+            this.cm_makecode.HeaderText = "上料工单号";
+            this.cm_makecode.Name = "cm_makecode";
+            // 
+            // pr_detail_
+            // 
+            this.pr_detail_.DataPropertyName = "pr_detail";
+            this.pr_detail_.HeaderText = "子件名称";
+            this.pr_detail_.Name = "pr_detail_";
+            // 
+            // cm_soncode
+            // 
+            this.cm_soncode.DataPropertyName = "cm_soncode";
+            this.cm_soncode.HeaderText = "子件编号";
+            this.cm_soncode.Name = "cm_soncode";
+            this.cm_soncode.ReadOnly = true;
+            this.cm_soncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // cm_barcode
+            // 
+            this.cm_barcode.DataPropertyName = "cm_barcode";
+            this.cm_barcode.HeaderText = "物料批号";
+            this.cm_barcode.Name = "cm_barcode";
+            this.cm_barcode.ReadOnly = true;
+            this.cm_barcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // New_BarCode
+            // 
+            this.New_BarCode.HeaderText = "新批号";
+            this.New_BarCode.MinimumWidth = 300;
+            this.New_BarCode.Name = "New_BarCode";
+            this.New_BarCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.New_BarCode.Width = 300;
+            // 
+            // cm_status_1
+            // 
+            this.cm_status_1.HeaderText = "上线状态";
+            this.cm_status_1.Name = "cm_status_1";
+            // 
+            // cm_maid
+            // 
+            this.cm_maid.DataPropertyName = "cm_maid";
+            this.cm_maid.HeaderText = "";
+            this.cm_maid.Name = "cm_maid";
+            this.cm_maid.Visible = false;
+            // 
+            // cm_materialtype
+            // 
+            this.cm_materialtype.DataPropertyName = "cm_materialtype";
+            this.cm_materialtype.HeaderText = "";
+            this.cm_materialtype.Name = "cm_materialtype";
+            this.cm_materialtype.Visible = false;
+            // 
+            // cm_maprodcode
+            // 
+            this.cm_maprodcode.DataPropertyName = "cm_maprodcode";
+            this.cm_maprodcode.HeaderText = "";
+            this.cm_maprodcode.Name = "cm_maprodcode";
+            this.cm_maprodcode.Visible = false;
+            // 
+            // cm_sncode
+            // 
+            this.cm_sncode.DataPropertyName = "cm_sncode";
+            this.cm_sncode.HeaderText = "";
+            this.cm_sncode.Name = "cm_sncode";
+            this.cm_sncode.Visible = false;
+            // 
+            // change
+            // 
+            this.change.AutoSize = true;
+            this.change.Location = new System.Drawing.Point(731, 80);
+            this.change.Name = "change";
+            this.change.Size = new System.Drawing.Size(71, 16);
+            this.change.TabIndex = 193;
+            this.change.TabStop = true;
+            this.change.Text = "拆解更换";
+            this.change.UseVisualStyleBackColor = true;
+            // 
+            // nochange
+            // 
+            this.nochange.AutoSize = true;
+            this.nochange.Location = new System.Drawing.Point(731, 57);
+            this.nochange.Name = "nochange";
+            this.nochange.Size = new System.Drawing.Size(47, 16);
+            this.nochange.TabIndex = 194;
+            this.nochange.TabStop = true;
+            this.nochange.Text = "拆解";
+            this.nochange.UseVisualStyleBackColor = true;
+            // 
+            // dataGridViewCheckBoxColumn1
+            // 
+            this.dataGridViewCheckBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewCheckBoxColumn1.HeaderText = "拆解更料";
+            this.dataGridViewCheckBoxColumn1.MinimumWidth = 10;
+            this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1";
+            this.dataGridViewCheckBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.dataGridViewCheckBoxColumn1.Width = 60;
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "cm_id";
+            this.dataGridViewTextBoxColumn1.HeaderText = "cm_id";
+            this.dataGridViewTextBoxColumn1.MinimumWidth = 40;
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.Visible = false;
+            this.dataGridViewTextBoxColumn1.Width = 40;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "pr_detail";
+            this.dataGridViewTextBoxColumn2.HeaderText = "pr_detail";
+            this.dataGridViewTextBoxColumn2.MinimumWidth = 40;
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.Visible = false;
+            this.dataGridViewTextBoxColumn2.Width = 80;
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "pr_detail";
+            this.dataGridViewTextBoxColumn3.HeaderText = "不良代码组编号";
+            this.dataGridViewTextBoxColumn3.MinimumWidth = 40;
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.ReadOnly = true;
+            this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn3.Visible = false;
+            this.dataGridViewTextBoxColumn3.Width = 80;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "pr_detail";
+            this.dataGridViewTextBoxColumn4.HeaderText = "不良代码";
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.ReadOnly = true;
+            this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn4.Visible = false;
+            this.dataGridViewTextBoxColumn4.Width = 80;
+            // 
+            // dataGridViewTextBoxColumn5
+            // 
+            this.dataGridViewTextBoxColumn5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn5.DataPropertyName = "cm_soncode";
+            this.dataGridViewTextBoxColumn5.HeaderText = "子件编号";
+            this.dataGridViewTextBoxColumn5.MinimumWidth = 40;
+            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.ReadOnly = true;
+            this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn5.Visible = false;
+            this.dataGridViewTextBoxColumn5.Width = 80;
+            // 
+            // dataGridViewTextBoxColumn6
+            // 
+            this.dataGridViewTextBoxColumn6.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn6.DataPropertyName = "cm_barcode";
+            this.dataGridViewTextBoxColumn6.HeaderText = "物料批号";
+            this.dataGridViewTextBoxColumn6.MinimumWidth = 40;
+            this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.ReadOnly = true;
+            this.dataGridViewTextBoxColumn6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn6.Visible = false;
+            this.dataGridViewTextBoxColumn6.Width = 80;
+            // 
+            // dataGridViewTextBoxColumn7
+            // 
+            this.dataGridViewTextBoxColumn7.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn7.DataPropertyName = "cm_barcode";
+            this.dataGridViewTextBoxColumn7.HeaderText = "新批号";
+            this.dataGridViewTextBoxColumn7.MinimumWidth = 100;
+            this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
+            this.dataGridViewTextBoxColumn7.ReadOnly = true;
+            this.dataGridViewTextBoxColumn7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn7.Visible = false;
+            this.dataGridViewTextBoxColumn7.Width = 300;
+            // 
+            // dataGridViewTextBoxColumn8
+            // 
+            this.dataGridViewTextBoxColumn8.DataPropertyName = "cm_maid";
+            this.dataGridViewTextBoxColumn8.HeaderText = "";
+            this.dataGridViewTextBoxColumn8.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
+            this.dataGridViewTextBoxColumn8.ReadOnly = true;
+            this.dataGridViewTextBoxColumn8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn8.Visible = false;
+            this.dataGridViewTextBoxColumn8.Width = 300;
+            // 
+            // dataGridViewTextBoxColumn9
+            // 
+            this.dataGridViewTextBoxColumn9.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn9.DataPropertyName = "cm_maid";
+            this.dataGridViewTextBoxColumn9.HeaderText = "";
+            this.dataGridViewTextBoxColumn9.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9";
+            this.dataGridViewTextBoxColumn9.ReadOnly = true;
+            this.dataGridViewTextBoxColumn9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn9.Visible = false;
+            this.dataGridViewTextBoxColumn9.Width = 300;
+            // 
+            // dataGridViewTextBoxColumn10
+            // 
+            this.dataGridViewTextBoxColumn10.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn10.DataPropertyName = "cm_materialtype";
+            this.dataGridViewTextBoxColumn10.HeaderText = "";
+            this.dataGridViewTextBoxColumn10.MinimumWidth = 40;
+            this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
+            this.dataGridViewTextBoxColumn10.ReadOnly = true;
+            this.dataGridViewTextBoxColumn10.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn10.Visible = false;
+            this.dataGridViewTextBoxColumn10.Width = 80;
+            // 
+            // dataGridViewTextBoxColumn11
+            // 
+            this.dataGridViewTextBoxColumn11.DataPropertyName = "cm_sncode";
+            this.dataGridViewTextBoxColumn11.HeaderText = "";
+            this.dataGridViewTextBoxColumn11.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11";
+            this.dataGridViewTextBoxColumn11.ReadOnly = true;
+            this.dataGridViewTextBoxColumn11.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn11.Visible = false;
+            this.dataGridViewTextBoxColumn11.Width = 300;
+            // 
+            // dataGridViewTextBoxColumn12
+            // 
+            this.dataGridViewTextBoxColumn12.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn12.HeaderText = "";
+            this.dataGridViewTextBoxColumn12.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn12.Name = "dataGridViewTextBoxColumn12";
+            this.dataGridViewTextBoxColumn12.ReadOnly = true;
+            this.dataGridViewTextBoxColumn12.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn12.Visible = false;
+            this.dataGridViewTextBoxColumn12.Width = 300;
+            // 
+            // dataGridViewTextBoxColumn13
+            // 
+            this.dataGridViewTextBoxColumn13.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn13.HeaderText = "";
+            this.dataGridViewTextBoxColumn13.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn13.Name = "dataGridViewTextBoxColumn13";
+            this.dataGridViewTextBoxColumn13.ReadOnly = true;
+            this.dataGridViewTextBoxColumn13.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn13.Visible = false;
+            this.dataGridViewTextBoxColumn13.Width = 300;
+            // 
+            // dataGridViewImageColumn1
+            // 
+            this.dataGridViewImageColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewImageColumn1.HeaderText = "";
+            this.dataGridViewImageColumn1.Image = global::UAS_MES_NEW.Properties.Resources.plus;
+            this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1";
+            this.dataGridViewImageColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.dataGridViewImageColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.dataGridViewImageColumn1.Width = 20;
+            // 
+            // dataGridViewTextBoxColumn14
+            // 
+            this.dataGridViewTextBoxColumn14.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn14.HeaderText = "";
+            this.dataGridViewTextBoxColumn14.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn14.Name = "dataGridViewTextBoxColumn14";
+            this.dataGridViewTextBoxColumn14.ReadOnly = true;
+            this.dataGridViewTextBoxColumn14.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn14.Visible = false;
+            this.dataGridViewTextBoxColumn14.Width = 300;
+            // 
+            // dataGridViewTextBoxColumn15
+            // 
+            this.dataGridViewTextBoxColumn15.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn15.HeaderText = "";
+            this.dataGridViewTextBoxColumn15.Name = "dataGridViewTextBoxColumn15";
+            this.dataGridViewTextBoxColumn15.ReadOnly = true;
+            this.dataGridViewTextBoxColumn15.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn15.Visible = false;
+            // 
+            // dataGridViewTextBoxColumn16
+            // 
+            this.dataGridViewTextBoxColumn16.DataPropertyName = "cm_sncode";
+            this.dataGridViewTextBoxColumn16.HeaderText = "";
+            this.dataGridViewTextBoxColumn16.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn16.Name = "dataGridViewTextBoxColumn16";
+            this.dataGridViewTextBoxColumn16.ReadOnly = true;
+            this.dataGridViewTextBoxColumn16.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn16.Visible = false;
+            this.dataGridViewTextBoxColumn16.Width = 300;
+            // 
+            // dataGridViewTextBoxColumn17
+            // 
+            this.dataGridViewTextBoxColumn17.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn17.HeaderText = "";
+            this.dataGridViewTextBoxColumn17.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn17.Name = "dataGridViewTextBoxColumn17";
+            this.dataGridViewTextBoxColumn17.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn17.Visible = false;
+            this.dataGridViewTextBoxColumn17.Width = 300;
+            // 
+            // dataGridViewTextBoxColumn18
+            // 
+            this.dataGridViewTextBoxColumn18.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn18.HeaderText = "";
+            this.dataGridViewTextBoxColumn18.Name = "dataGridViewTextBoxColumn18";
+            this.dataGridViewTextBoxColumn18.Visible = false;
+            // 
+            // dataGridViewTextBoxColumn19
+            // 
+            this.dataGridViewTextBoxColumn19.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn19.HeaderText = "";
+            this.dataGridViewTextBoxColumn19.Name = "dataGridViewTextBoxColumn19";
+            this.dataGridViewTextBoxColumn19.Visible = false;
+            // 
+            // dataGridViewTextBoxColumn20
+            // 
+            this.dataGridViewTextBoxColumn20.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn20.HeaderText = "";
+            this.dataGridViewTextBoxColumn20.Name = "dataGridViewTextBoxColumn20";
+            this.dataGridViewTextBoxColumn20.Visible = false;
+            // 
+            // dataGridViewTextBoxColumn21
+            // 
+            this.dataGridViewTextBoxColumn21.DataPropertyName = "cm_sncode";
+            this.dataGridViewTextBoxColumn21.HeaderText = "";
+            this.dataGridViewTextBoxColumn21.Name = "dataGridViewTextBoxColumn21";
+            this.dataGridViewTextBoxColumn21.Visible = false;
+            // 
+            // dataGridViewTextBoxColumn22
+            // 
+            this.dataGridViewTextBoxColumn22.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn22.HeaderText = "";
+            this.dataGridViewTextBoxColumn22.Name = "dataGridViewTextBoxColumn22";
+            this.dataGridViewTextBoxColumn22.Visible = false;
+            // 
+            // dataGridViewTextBoxColumn23
+            // 
+            this.dataGridViewTextBoxColumn23.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn23.HeaderText = "";
+            this.dataGridViewTextBoxColumn23.Name = "dataGridViewTextBoxColumn23";
+            this.dataGridViewTextBoxColumn23.Visible = false;
+            // 
+            // pr_name
+            // 
+            this.pr_name.AutoSize = true;
+            this.pr_name.CutLength = null;
+            this.pr_name.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_name.Location = new System.Drawing.Point(413, 66);
+            this.pr_name.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_name.Name = "pr_name";
+            this.pr_name.Size = new System.Drawing.Size(0, 21);
+            this.pr_name.TabIndex = 195;
+            this.pr_name.Tag = "1";
+            // 
+            // ms_wccode
+            // 
+            this.ms_wccode.AutoSize = true;
+            this.ms_wccode.CutLength = null;
+            this.ms_wccode.Location = new System.Drawing.Point(916, 73);
+            this.ms_wccode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_wccode.Name = "ms_wccode";
+            this.ms_wccode.Size = new System.Drawing.Size(0, 12);
+            this.ms_wccode.TabIndex = 191;
+            this.ms_wccode.Visible = false;
+            // 
+            // ms_craftname
+            // 
+            this.ms_craftname.AutoSize = true;
+            this.ms_craftname.CutLength = null;
+            this.ms_craftname.Location = new System.Drawing.Point(856, 87);
+            this.ms_craftname.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_craftname.Name = "ms_craftname";
+            this.ms_craftname.Size = new System.Drawing.Size(0, 12);
+            this.ms_craftname.TabIndex = 190;
+            this.ms_craftname.Visible = false;
+            // 
+            // ms_craftcode
+            // 
+            this.ms_craftcode.AutoSize = true;
+            this.ms_craftcode.CutLength = null;
+            this.ms_craftcode.Location = new System.Drawing.Point(720, 87);
+            this.ms_craftcode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_craftcode.Name = "ms_craftcode";
+            this.ms_craftcode.Size = new System.Drawing.Size(0, 12);
+            this.ms_craftcode.TabIndex = 189;
+            this.ms_craftcode.Visible = false;
+            // 
+            // deccount
+            // 
+            this.deccount.AutoSize = true;
+            this.deccount.CutLength = null;
+            this.deccount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.deccount.Location = new System.Drawing.Point(825, 18);
+            this.deccount.MaximumSize = new System.Drawing.Size(150, 0);
+            this.deccount.Name = "deccount";
+            this.deccount.Size = new System.Drawing.Size(0, 21);
+            this.deccount.TabIndex = 187;
+            this.deccount.Tag = "1";
+            // 
+            // ms_makecode
+            // 
+            this.ms_makecode.AutoSize = true;
+            this.ms_makecode.CutLength = null;
+            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(413, 18);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
+            this.ms_makecode.TabIndex = 186;
+            this.ms_makecode.Tag = "1";
+            // 
+            // ms_prodcode
+            // 
+            this.ms_prodcode.AutoSize = true;
+            this.ms_prodcode.CutLength = null;
+            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(125, 66);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_prodcode.Name = "ms_prodcode";
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.ms_prodcode.TabIndex = 184;
+            this.ms_prodcode.Tag = "1";
+            // 
+            // ms_sncode
+            // 
+            this.ms_sncode.AutoSize = true;
+            this.ms_sncode.CutLength = null;
+            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(125, 18);
+            this.ms_sncode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_sncode.Name = "ms_sncode";
+            this.ms_sncode.Size = new System.Drawing.Size(0, 21);
+            this.ms_sncode.TabIndex = 183;
+            this.ms_sncode.Tag = "1";
+            // 
+            // Decompose
+            // 
+            this.Decompose.AllPower = null;
+            this.Decompose.BackColor = System.Drawing.Color.Transparent;
+            this.Decompose.DownImage = ((System.Drawing.Image)(resources.GetObject("Decompose.DownImage")));
+            this.Decompose.Image = ((System.Drawing.Image)(resources.GetObject("Decompose.Image")));
+            this.Decompose.IsShowBorder = true;
+            this.Decompose.Location = new System.Drawing.Point(533, 533);
+            this.Decompose.MoveImage = ((System.Drawing.Image)(resources.GetObject("Decompose.MoveImage")));
+            this.Decompose.Name = "Decompose";
+            this.Decompose.NormalImage = ((System.Drawing.Image)(resources.GetObject("Decompose.NormalImage")));
+            this.Decompose.Power = null;
+            this.Decompose.Size = new System.Drawing.Size(76, 27);
+            this.Decompose.TabIndex = 175;
+            this.Decompose.Text = "确定拆解";
+            this.Decompose.UseVisualStyleBackColor = true;
+            this.Decompose.Click += new System.EventHandler(this.Decompose_Click);
+            // 
+            // sn_code
+            // 
+            this.sn_code.AllPower = null;
+            this.sn_code.BackColor = System.Drawing.Color.White;
+            this.sn_code.ID = null;
+            this.sn_code.Location = new System.Drawing.Point(147, 535);
+            this.sn_code.Name = "sn_code";
+            this.sn_code.Power = null;
+            this.sn_code.Size = new System.Drawing.Size(196, 21);
+            this.sn_code.Str = null;
+            this.sn_code.Str1 = null;
+            this.sn_code.Str2 = null;
+            this.sn_code.TabIndex = 174;
+            this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
+            // 
+            // 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(12, 355);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(889, 152);
+            this.OperateResult.TabIndex = 172;
+            this.OperateResult.Text = "";
+            // 
+            // dataGridViewCheckBoxColumn2
+            // 
+            this.dataGridViewCheckBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewCheckBoxColumn2.HeaderText = "拆解";
+            this.dataGridViewCheckBoxColumn2.Name = "dataGridViewCheckBoxColumn2";
+            this.dataGridViewCheckBoxColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.dataGridViewCheckBoxColumn2.Width = 40;
+            // 
+            // Make_Decompose_Ex
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(928, 573);
+            this.Controls.Add(this.pr_name);
+            this.Controls.Add(this.nochange);
+            this.Controls.Add(this.change);
+            this.Controls.Add(this.ms_wccode);
+            this.Controls.Add(this.ms_craftname);
+            this.Controls.Add(this.ms_craftcode);
+            this.Controls.Add(this.LabelDataGridView);
+            this.Controls.Add(this.deccount);
+            this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.ms_prodcode);
+            this.Controls.Add(this.ms_sncode);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.Decompose);
+            this.Controls.Add(this.sn_code);
+            this.Controls.Add(this.pa_makecode_label);
+            this.Controls.Add(this.OperateResult);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Make_Decompose_Ex";
+            this.Tag = "Make!Decompose_EX";
+            this.Text = "特殊拆解处理";
+            this.Load += new System.EventHandler(this.Make_Decompose_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_Decompose_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.Label pa_makecode_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sn_code;
+        private CustomControl.ButtonUtil.NormalButton Decompose;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label5;
+        private CustomControl.ValueLabel.ValueLabel ms_sncode;
+        private CustomControl.ValueLabel.ValueLabel ms_prodcode;
+        private CustomControl.ValueLabel.ValueLabel ms_makecode;
+        private CustomControl.ValueLabel.ValueLabel deccount;
+        private System.Windows.Forms.DataGridView LabelDataGridView;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
+        private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
+        private CustomControl.ValueLabel.ValueLabel ms_craftcode;
+        private CustomControl.ValueLabel.ValueLabel ms_craftname;
+        private CustomControl.ValueLabel.ValueLabel ms_wccode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;
+        private System.Windows.Forms.RadioButton change;
+        private System.Windows.Forms.RadioButton nochange;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn12;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn13;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn14;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn15;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn16;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn17;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn18;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn19;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn20;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn21;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn22;
+        private CustomControl.ValueLabel.ValueLabel pr_name;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn23;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_status;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_spid;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_firstsn;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_wccode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_fsoncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_stepcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_stepname;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_craftname;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_craftcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mb_bgcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mb_badcode;
+        private System.Windows.Forms.DataGridViewImageColumn AddBad;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_makecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail_;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_soncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_barcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn New_BarCode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_status_1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_maid;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_materialtype;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_maprodcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_sncode;
+    }
+}

+ 476 - 0
UAS_MES_JH/FunctionCode/Make/Make_Decompose_Ex.cs

@@ -0,0 +1,476 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_Decompose_Ex : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        DataTable dt;
+
+        DataTable dt1;
+
+        DataTable dtbar;
+
+        DataTable dtst;
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        DataHelper dh;
+        //记录当前序列号的ms_id
+        string ms_id;
+        //采集计数
+        int count;
+
+        //Bom版本
+        string ma_bomversion;
+
+        int rowindex;
+
+        Make_NewBadCode_DE badcode;
+
+        //记录当前输入框的值
+        string sncode_1;
+        string sncode_2;
+        string[] bccode;
+        string[] bgcode;
+        string[] id;
+
+        public Make_Decompose_Ex()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_Decompose_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            sn_code.Focus();
+            OperateResult.AppendText(">>请输入序列号\n");
+            count = 0;
+            deccount.Text = count + "";
+            dh = SystemInf.dh;
+        }
+
+        private void sn_code_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                sql.Clear();
+                sql.Append("select max(ms_id) from makeserial where ms_sncode ='" + sn_code.Text + "' or ms_sncode = (select  max(SN)");
+                sql.Append(" from  makesnrelation left join makeserial on ms_makecode=makecode where beforesn='" + sn_code.Text + "')");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                ms_id = dt.Rows[0][0].ToString();
+                sncode_1 = sn_code.Text;
+                BaseUtil.CleanForm(this);
+                deccount.Text = count + "";
+                if (ms_id != "")
+                {
+                    sql.Clear();
+                    sql.Append("select ms_id,ms_status,ms_makecode,ms_prodcode,pr_detail pr_name,ms_sncode,ms_firstsn,ms_craftcode,ms_craftname,ms_wccode from makeserial left join product on pr_code=ms_prodcode where ms_id='" + ms_id + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    //if (dt.Rows[0]["ms_status"].ToString() == "0" || dt.Rows[0]["ms_status"].ToString() == "3")
+                    //{
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        LoadData(ms_sncode.Text, sender, e);
+                    //}
+                    //else
+                    //{
+                    //    OperateResult.AppendText(">>序列号" + sncode_1 + "必须处于维修或未采集状态才能做拆解\n", Color.Red, sn_code);
+                    //    BaseUtil.CleanForm(this);
+                    //    sn_code.Focus();
+                    //    return;
+                    //}
+                }
+                else
+                {
+                    ms_id = null;
+                    OperateResult.AppendText(">>序列号" + sncode_1 + "不存在\n", Color.Red, sn_code);
+                    BaseUtil.CleanForm(this);
+                    sn_code.Focus();
+                    return;
+                }
+            }
+        }
+
+        //加载此序列号上料记录
+        private void LoadData(string sncode, object sender, KeyEventArgs e)
+        {
+            //cm_wccode
+            sncode_1 = sncode;
+            sql.Clear();
+            sql.Append("select cm_craftcode,cm_spid,cm_craftname,cm_firstsn,cm_makecode,cm_stepcode,cm_stepname,cm_maprodcode,cm_fsoncode,cm_wccode,cm_maid,cm_soncode,cm_materialtype,");
+            sql.Append("max(cm_status) cm_status,max(cm_id) cm_id from craftmaterial where(cm_sncode  in (select '" + sncode_1 + "' from dual union select firstsn from makesnrelation where sn ");
+            sql.Append(" ='" + sncode_1 + "'union  select sn from makesnrelation where firstsn = '" + sncode_1 + "')");
+            sql.Append(") group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_status DESC");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            if (dt.Rows.Count > 0)
+            {
+                BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt);
+                for (int i = 0; i < LabelDataGridView.Rows.Count; i++)
+                {
+                    DataTable datatable = (DataTable)dh.ExecuteSql("select cm_barcode,cm_sncode from CRAFTMATERIAL where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'", "select");
+                    LabelDataGridView.Rows[i].Cells["cm_barcode"].Value = datatable.Rows[0]["cm_barcode"].ToString();
+                    LabelDataGridView.Rows[i].Cells["cm_sncode"].Value = datatable.Rows[0]["cm_sncode"].ToString();
+                    string[] cm_sncodedetail = LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString().Split(',');
+                    string pr_name = "";
+                    foreach (string item in cm_sncodedetail)
+                    {
+                        pr_name += "'" + item + "',";
+                    }
+                    pr_name = pr_name.TrimEnd(',');
+                    LabelDataGridView.Rows[i].Cells["pr_detail_"].Value = dh.getFieldDataByCondition("product", "wm_concat(pr_detail)", "pr_code in (" + pr_name + ")");
+                    LabelDataGridView.Rows[i].Cells["cm_status_1"].Value = (LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() == "-1") ? "已拆解" : "上线";
+                }
+            }
+            else
+            {
+                OperateResult.AppendText(">>序列号" + ms_sncode.Text + "无上料数据\n", Color.Red);
+            }
+        }
+
+
+        private void Make_Decompose_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void LabelDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (e.ColumnIndex >= 0 && e.RowIndex >= 0)
+            {
+                if (LabelDataGridView.Columns[e.ColumnIndex].Name == "AddBad")
+                {
+                    if (ms_sncode.Text == "" || ms_makecode.Text == "")
+                    {
+                        OperateResult.AppendText(">>序列号和工单号不允许为空\n", Color.Red);
+                    }
+                    else
+                    {
+                        rowindex = e.RowIndex;
+                        badcode = new Make_NewBadCode_DE(ms_sncode.Text, ms_makecode.Text);
+                        badcode.Controls["Save"].Click += LoadBadcode;
+                        BaseUtil.SetFormCenter(badcode);
+                        badcode.ShowDialog();
+                    }
+                }
+            }
+        }
+
+        //加载之前在新增不良代码界面选择的不良代码
+        private void LoadBadcode(object sender, EventArgs e)
+        {
+            sql.Clear();
+            for (int i = 0; i < badcode.bccode.Length; i++)
+            {
+                sql.Append(badcode.bgcode[i] + " : " + badcode.bccode[i] + " |");
+            }
+            LabelDataGridView.Rows[rowindex].Cells["mb_badcode"].Value = sql.GetString();
+            badcode.Close();
+        }
+
+        private void Decompose_Click(object sender, EventArgs e)
+        {
+            sql.Clear();
+            sql.Append("select max(ms_id) from makeserial where ms_sncode ='" + ms_sncode.Text + "' or ms_sncode = (select  max(SN)");
+            sql.Append(" from  makesnrelation left join makeserial on ms_makecode=makecode where beforesn='" + ms_sncode.Text + "')");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            ms_id = dt.Rows[0][0].ToString();
+            if (ms_id != "")
+            {
+                sql.Clear();
+                sql.Append("select ms_id,ms_status,ms_makecode,ms_prodcode,pr_detail pr_name,ms_sncode,ms_firstsn,ms_craftcode,ms_craftname,ms_wccode from makeserial left join product on pr_code=ms_prodcode where ms_id='" + ms_id + "'");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                //if (!(dt.Rows[0]["ms_status"].ToString() == "0" || dt.Rows[0]["ms_status"].ToString() == "3"))
+                //{
+                //    OperateResult.AppendText(">>序列号" + ms_sncode.Text + "必须处于维修或未采集状态才能做拆解\n", Color.Red, sn_code);
+                //    BaseUtil.CleanForm(this);
+                //    sn_code.Focus();
+                //    return;
+                //}
+            }
+            else
+            {
+                ms_id = null;
+                OperateResult.AppendText(">>序列号" + ms_sncode.Text + "不存在\n", Color.Red, sn_code);
+                BaseUtil.CleanForm(this);
+                sn_code.Focus();
+                return;
+            }
+            Boolean decompose = false;
+            for (int i = 0; i < LabelDataGridView.Rows.Count; i++)
+            {
+                if (LabelDataGridView.Rows[i].Cells["Choose"].Value != null)
+                {
+                    if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true && change.Checked && (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value == null || LabelDataGridView.Rows[i].Cells["New_BarCode"].Value == null) && LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
+                    {
+                        OperateResult.AppendText("第" + (i + 1) + "行没有采集不良代码或新批号\n", Color.Red);
+                        return;
+                    }
+                    if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true && change.Checked && LabelDataGridView.Rows[i].Cells["New_BarCode"].Value == null && LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() == "-1")
+                    {
+                        OperateResult.AppendText("第" + (i + 1) + "行没有采集新批号\n", Color.Red);
+                        return;
+                    }
+                    if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true && nochange.Checked && (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value == null) && LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
+                    {
+                        OperateResult.AppendText("第" + (i + 1) + "行没有采集不良代码\n", Color.Red);
+                        return;
+                    }
+                }
+            }
+
+            for (int i = 0; i < LabelDataGridView.Rows.Count; i++)
+            {
+                if (LabelDataGridView.Rows[i].Cells["Choose"].Value != null)
+                {
+                    if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true)
+                    {
+                        if (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value != null)
+                        {
+                            String[] badcodetol = LabelDataGridView.Rows[i].Cells["mb_badcode"].Value.ToString().Split('|');
+                            bgcode = new string[badcodetol.Length - 1];
+                            bccode = new string[badcodetol.Length - 1];
+                            for (int h = 0; h < badcodetol.Length - 1; h++)
+                            {
+                                bgcode[h] = badcodetol[h].Split(':')[0].Trim();
+                                bccode[h] = badcodetol[h].Split(':')[1].Trim();
+                            }
+                        }
+                        if (change.Checked)
+                        {
+                            dt1 = new DataTable();
+                            sql.Clear();
+                            sql.Append("select ma_bomversion from makeserial left join make on ma_code=ms_makecode ");
+                            sql.Append("left join product on ms_prodcode=pr_code where ms_makecode='" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value + "' order by ms_id desc");
+                            dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            if (dt1.Rows.Count > 0)
+                            {
+                                ma_bomversion = dt1.Rows[0][0].ToString();
+                            }
+                            dtbar = new DataTable();
+                            sql.Clear();
+                            sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,min(sp_iflabelcheck)sp_iflabelcheck,sp_fsoncode,max(sp_barcoderule)");
+                            sql.Append("sp_barcoderule, min(sp_checksalecode)sp_checksalecode,sp_tracekind,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
+                            sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
+                            sql.Append("sp_regex,max(pr_detail)pr_detail from stepproduct left join product on pr_code=sp_fsoncode where ");
+                            sql.Append("sp_bomversion='" + ma_bomversion + "' and  sp_craftcode='" + LabelDataGridView.Rows[i].Cells["cm_craftcode"].Value + "'and sp_mothercode ='" + LabelDataGridView.Rows[i].Cells["cm_maprodcode"].Value + "'");
+                            sql.Append(" group by sp_fsoncode,sp_tracekind  order by SP_DETNO asc");
+                            dtbar = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            DataRow[] dtrows = dtbar.Select("sp_soncode like '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
+                            dtbar = BaseUtil.ToDataTable(dtrows);
+                            if (dtbar.Rows.Count > 0)
+                            {
+                                String ErrorMessage;
+                                string sp_tracekind = dtbar.Rows[0]["sp_tracekind"].ToString();
+                                string sp_soncode = dtbar.Rows[0]["sp_soncode"].ToString();
+                                string sp_prefix = dtbar.Rows[0]["sp_prefix"].ToString();
+                                string sp_fsoncode = dtbar.Rows[0]["sp_fsoncode"].ToString();
+                                string length = dtbar.Rows[0]["sp_length"].ToString();
+                                string sp_ifrepeat = dtbar.Rows[0]["sp_ifrepeat"].ToString();
+                                string sp_barcoderule = dtbar.Rows[0]["sp_barcoderule"].ToString();
+                                string sp_checksalecode = dtbar.Rows[0]["sp_checksalecode"].ToString();
+                                string sp_iflabelcheck = dtbar.Rows[0]["sp_iflabelcheck"].ToString();
+                                if (sp_tracekind == "1")
+                                {
+                                    //上料校验规则判断
+                                    if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString(), LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, sp_iflabelcheck, out ErrorMessage))
+                                    {
+                                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                                        LoadData(sncode_1, sender, new KeyEventArgs(Keys.Enter));
+                                        continue;
+                                    }
+                                    dh.UpdateByCondition("makeserial", "ms_nextmacode='" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() + "'", "ms_id=(select max(ms_id) from makeserial where ms_sncode='" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "')");
+                                }
+                                else if (sp_tracekind == "2")
+                                {
+                                    if (!dh.CheckExist("makesourcestock", " (MSS_FPRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "' or MSS_PRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "') and mss_barcode = '" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "'"))
+                                    {
+                                        OperateResult.AppendText(">>物料" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "岗位备料无条码" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "\n", Color.Red);
+                                        continue;
+                                    }
+                                    else
+                                    {
+                                        sql.Clear();
+                                        sql.Append("select mss_id,MSS_REMAIN,MSS_BASEQTY from makesourcestock where  (MSS_FPRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "' or MSS_PRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "') and mss_barcode = '" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "'");
+                                        dtst = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                        int MSS_REMAIN = int.Parse(dtst.Rows[0]["MSS_REMAIN"].ToString());
+                                        int MSS_BASEQTY = int.Parse(dtst.Rows[0]["MSS_BASEQTY"].ToString());
+                                        if (MSS_REMAIN < MSS_BASEQTY)
+                                        {
+                                            OperateResult.AppendText(">>物料" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "条码" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "备料不足\n", Color.Red);
+                                            continue;
+                                        }
+                                        else
+                                        {
+                                            dh.UpdateByCondition("makesourcestock", "MSS_REMAIN = NVL(MSS_REMAIN, 0) - MSS_BASEQTY,MSS_USEQTY = NVL(MSS_USEQTY, 0) + MSS_BASEQTY,mss_madeqty=NVL(mss_madeqty,0)+ceil(MSS_USEQTY/MSS_BASEQTY)", " mss_id = '" + dtst.Rows[0]["mss_id"].ToString() + "' and (MSS_FPRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "' or MSS_PRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "') and mss_barcode = '" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "'");
+                                        }
+                                    }
+                                }
+                            }
+                            else
+                            {
+                                //当前备料信息不再工序BOM中,为BOM之外的批管控物料备料
+                                if (!dh.CheckExist("makesourcestock", " (MSS_FPRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "' or MSS_PRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "') and mss_barcode = '" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "'"))
+                                {
+                                    OperateResult.AppendText(">>物料" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "不在当前工序BOM" + ma_bomversion + "中\n", Color.Black);
+                                    OperateResult.AppendText(">>物料" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "岗位备料无条码" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "\n", Color.Red);
+                                    continue;
+                                }
+                                else
+                                {
+                                    sql.Clear();
+                                    sql.Append("select mss_id,MSS_REMAIN,MSS_BASEQTY from makesourcestock where  (MSS_FPRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "' or MSS_PRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "') and mss_barcode = '" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "'");
+                                    dtst = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                    int MSS_REMAIN = int.Parse(dtst.Rows[0]["MSS_REMAIN"].ToString());
+                                    int MSS_BASEQTY = int.Parse(dtst.Rows[0]["MSS_BASEQTY"].ToString());
+                                    if (MSS_REMAIN < MSS_BASEQTY)
+                                    {
+                                        OperateResult.AppendText(">>物料" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "条码" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "备料不足\n", Color.Red);
+                                        continue;
+                                    }
+                                    else
+                                    {
+                                        dh.UpdateByCondition("makesourcestock", "MSS_REMAIN = NVL(MSS_REMAIN, 0) - MSS_BASEQTY,MSS_USEQTY = NVL(MSS_USEQTY, 0) + MSS_BASEQTY,mss_madeqty=NVL(mss_madeqty,0)+ceil(MSS_USEQTY/MSS_BASEQTY)", " mss_id = '" + dtst.Rows[0]["mss_id"].ToString() + "' and (MSS_FPRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "' or MSS_PRODCODE = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value.ToString() + "') and mss_barcode = '" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + "'");
+                                    }
+                                }
+                            }
+                            if (LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
+                            {
+                                //判断生产信息
+                                sql.Clear();
+                                sql.Append("select ms_id,ms_sncode,cm_barcode from craftmaterial left join makeserial on cm_barcode = ms_sncode and cm_soncode = ms_prodcode where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "' and cm_materialtype ='1' and ms_id>'0' and ms_nextmacode = '" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() + "'");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                //制造件
+                                if (dt.Rows.Count > 0)
+                                {
+                                    string makecode = (String)dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode = '" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "' and ms_prodcode = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
+                                    string mss_id = dt.Rows[0]["ms_id"].ToString();
+                                    ////MakeBad表插入物料批号不良信息
+                                    sql.Clear();
+                                    sql.Append(" insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode, mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
+                                    sql.Append("values (MakeBad_seq.nextval,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bg_code ,'" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',");
+                                    sql.Append(":bc_code,'" + makecode + "')");
+                                    dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code" }, bgcode, bccode);
+                                    //更新子件序列号为待维修                               
+                                    sql.Clear();
+                                    sql.Append("update makeserial set ms_status=3 ,ms_badtimes = ms_badtimes+1,ms_nextmacode = '' where ms_id='" + mss_id + "' ");
+                                    dh.ExecuteSql(sql.GetString(), "update");
+                                }
+                                //没有生产信息,判定为采购件,则将不良信息插入不良零件表中MAKEBADRSPART
+                                else
+                                {
+                                    sql.Clear();
+                                    sql.Append("insert into  MAKEBADRSPART(mbp_id,mbp_indate,mbp_inman,mbp_sncode, mbp_badcode, mbp_part, mbp_makecode, mbp_sccode,mbp_barcode)values");
+                                    sql.Append("(MAKEBADRSPART_seq.nextval, sysdate, '" + User.UserCode + "','" + ms_sncode.Text + "',:bc_code,'" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "','" + ms_makecode.Text + "','" + User.UserSourceCode + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "')");
+                                    dh.BatchInsert(sql.GetString(), new string[] { "bc_code" }, bccode);
+                                }
+                            }
+
+                            //此物料上线状态更新为-1,代表被拆解
+                            sql.Clear();
+                            sql.Append("update craftmaterial set cm_status=-1,cm_lastdeco=-1,cm_dropman='" + User.UserCode + "',");
+                            sql.Append("cm_dropdate =sysdate,cm_dropstep='" + User.CurrentStepCode + "',");
+                            sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_id='" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'");
+                            dh.ExecuteSql(sql.GetString(), "update");
+
+
+                            ////将新批号绑定到序列号中
+                            //dt = (DataTable)dh.ExecuteSql("select sp_id from stepproduct where sp_mothercode='" + LabelDataGridView.Rows[i].Cells["cm_maprodcode"].Value + "'", "select");
+                            //string sp_id = dt.Rows[0]["sp_id"].ToString();
+                            sql.Clear();
+                            sql.Append("insert into craftmaterial (cm_id, cm_makecode,cm_maid,cm_maprodcode,cm_soncode,cm_mscode,cm_sncode,cm_stepcode,cm_stepname,");
+                            sql.Append("cm_craftcode,cm_craftname,cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid, cm_materialtype,cm_status,cm_fsoncode,cm_firstsn)");
+                            sql.Append("values(Craftmaterial_seq.nextval,'" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_maid"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_maprodcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
+                            sql.Append(",'" + LabelDataGridView.Rows[i].Cells["cm_sncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_sncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepname"].Value + "',");
+                            sql.Append("'" + LabelDataGridView.Rows[i].Cells["cm_craftcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_craftname"].Value + "','" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value + "',1,sysdate,'" + User.UserCode + "','" + User.UserLineCode + "','" + LabelDataGridView.Rows[i].Cells["cm_wccode"].Value + "',");
+                            sql.Append("'" + User.UserSourceCode + "','" + LabelDataGridView.Rows[i].Cells["cm_spid"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_materialtype"].Value + "','0','" + LabelDataGridView.Rows[i].Cells["cm_fsoncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_firstsn"].Value + "')");
+                            dh.ExecuteSql(sql.GetString(), "insert");
+                            dh.ExecuteSql("update makeserial set ms_nextmacode='" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value + "' where ms_id=(select max(ms_id) from makeserial where ms_sncode='" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value + "' and ms_makecode<>'" + ms_makecode.Text + "')", "update");
+                            OperateResult.AppendText("物料" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "拆解换料成功\n", Color.Green);
+                            decompose = true;
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "物料" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "拆解换料", "拆解换料成功", ms_sncode.Text, "");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "物料" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value + "拆解换料上料", "拆解换料上料成功", ms_sncode.Text, "");
+                        }
+                        else if (nochange.Checked)
+                        {
+                            if (LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
+                            {
+                                //判断生产信息
+                                sql.Clear();
+                                sql.Append("select ms_id,ms_sncode,cm_barcode from craftmaterial left join makeserial on cm_barcode = ms_sncode and cm_soncode = ms_prodcode where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "' and cm_materialtype ='1' and ms_id>'0' and ms_nextmacode = '" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() + "'");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                //制造件
+                                if (dt.Rows.Count > 0)
+                                {
+                                    string makecode = (String)dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode = '" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "' and ms_prodcode = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
+                                    string mss_id = dt.Rows[0]["ms_id"].ToString();
+                                    ////MakeBad表插入物料批号不良信息
+                                    sql.Clear();
+                                    sql.Append(" insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode, mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
+                                    sql.Append("values (MakeBad_seq.nextval,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bg_code ,'" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',");
+                                    sql.Append(":bc_code,'" + makecode + "')");
+                                    dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code" }, bgcode, bccode);
+                                    //更新子件序列号为待维修                               
+                                    sql.Clear();
+                                    sql.Append("update makeserial set ms_status=3 ,ms_badtimes = ms_badtimes+1,ms_nextmacode = '' where ms_id='" + mss_id + "' ");
+                                    dh.ExecuteSql(sql.GetString(), "update");
+                                }
+                                //没有生产信息,判定为采购件,则将不良信息插入不良零件表中MAKEBADRSPART
+                                else
+                                {
+                                    sql.Clear();
+                                    sql.Append("insert into  MAKEBADRSPART(mbp_id,mbp_indate,mbp_inman,mbp_sncode, mbp_badcode, mbp_part, mbp_makecode, mbp_sccode,mbp_barcode)values");
+                                    sql.Append("(MAKEBADRSPART_seq.nextval, sysdate, '" + User.UserCode + "','" + ms_sncode.Text + "',:bc_code,'" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "','" + ms_makecode.Text + "','" + User.UserSourceCode + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "')");
+                                    dh.BatchInsert(sql.GetString(), new string[] { "bc_code" }, bccode);
+                                }
+                                //craftmaterial解除相应物料绑定
+                                sql.Clear();
+                                sql.Append("update craftmaterial set cm_status=-1,cm_dropman='" + User.UserCode + "',");
+                                sql.Append("cm_dropdate =sysdate,cm_dropstep='" + User.CurrentStepCode + "',");
+                                sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_id='" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'");
+                                dh.ExecuteSql(sql.GetString(), "update");
+                            }
+
+                            //更新序列号信息
+                            sql.Clear();
+                            sql.Append("update makeserial set ms_nextmacode = '' where ms_sncode = (select cm_barcode from craftmaterial where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "' and CM_MATERIALTYPE = '1') and ms_nextmacode='" + ms_makecode.Text + "'");
+                            dh.ExecuteSql(sql.GetString(), "update");
+                            OperateResult.AppendText("物料" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "拆解成功\n", Color.Green);
+                            decompose = true;
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "物料" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "拆解", "拆解成功", ms_sncode.Text, "");
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(">>>没有选择拆解方式\n", Color.Red);
+                            return;
+                        }
+                    }
+                }
+            }
+            if (decompose)
+            {
+                count++;
+                deccount.Text = count + "";
+                LoadData(sncode_1, sender, new KeyEventArgs(Keys.Enter));
+            }
+            else
+            {
+                OperateResult.AppendText("没有成功拆解项\n", Color.Red);
+            }
+        }
+
+        private void LabelDataGridView_Sorted(object sender, EventArgs e)
+        {
+        }
+    }
+}

+ 396 - 0
UAS_MES_JH/FunctionCode/Make/Make_Decompose_Ex.resx

@@ -0,0 +1,396 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="cm_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_spid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_firstsn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_wccode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_fsoncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_stepcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_stepname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_craftname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_craftcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mb_bgcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mb_badcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="AddBad.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_detail_.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_soncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="New_BarCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_status_1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_maid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_materialtype.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_maprodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_spid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_firstsn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_wccode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_fsoncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_stepcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_stepname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_craftname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_craftcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mb_bgcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mb_badcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="AddBad.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_detail_.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_soncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="New_BarCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_status_1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_maid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_materialtype.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_maprodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="Decompose.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Decompose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
+        DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
+        bGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUis
+        iGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQ
+        sf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJO
+        yhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaI
+        b4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArou
+        S49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0i
+        vQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424
+        HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxR
+        RKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKb
+        F6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQ
+        DtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJE
+        geQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhM
+        gqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgs
+        wkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYr
+        oQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHms
+        AdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8
+        Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQ
+        tJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzy
+        pOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4
+        UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrC
+        WbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o
+        3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0Svo
+        PfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05b
+        RztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAU
+        vdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZv
+        xjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa
+        2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHI
+        dmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Sn
+        t+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z
+        /z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4Rz
+        wzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8Yqpj
+        ZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbj
+        kqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09m
+        SWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvN
+        e70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quF
+        nbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/
+        VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1F
+        DR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TL
+        d1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/E
+        XRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPq
+        RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
+        lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
+        f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEwAACxMBAJqcGAAACfBJREFUeF7t3dtuFFcC
+        heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
+        X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
+        HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
+        ZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSw
+        I4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOA
+        DHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2
+        BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEf5/vsnj6pvqpnqr6oAePDU
+        qppVu49c2+PsWC/8urpZXV0rR8fH5f2HD+XDGH0N4GH47zbVrNpVw2rZNX7voy/qi7+sHvd6C2U0Oi03
+        7z+Um5v35RpAZ6hZtauG1bKaVtvjrd/76Iv6om/7/UG9+PZGV9c3d67L5RWAh06t3nfbHAa1ZTVd2/5m
+        vPV7f/+hvuCr6q8r3UQ3u7wqF9X5xSWAjlG7avi+ZbVd/Ws8fhk/AL5dXl75O/qz84tyenZ+56yMTgE8
+        dGr1vls1fH8YLNW2a+P/eAoYPwAWD4ZH5fT8sozqxSf1Zsejs3J0cgqgY9SuGlbLavrgcKgDYDAev4wf
+        AH+OTmv4o/NyrJscjcqwOhyeAOgYtauG1fJ907Xxs/H4ZfwAqC+sf+Mfn9aLT+qJcVwdlf0DAF2jdtWw
+        WlbTaluN3/d+76MDQC88PDxpbrC7N6wOy7tdAF2jdtWwWlbTarv1ANCJsbc/bG6ws7Nftrb3AHSUGlbL
+        avqwtt16AOzV02Jn96Bs1Qs3t3fLxua7sg6gc9SuGlbLalpttx4AOi10wcbmblnb2Cmr69tlZQ1A16hd
+        NayW1bTabj0AtncObuNf3ykrq1tleWWzLC0D6Bq1q4bVsppW260HwObWbfy6eHFpo7xdXC9v3q4B6Bi1
+        q4bVsppW260HwPr6u3rBVr14owzerJWFwWrpL6wA6Bi1q4bVsppW260HwMrqdnNq6MJef6W87i2X+ddL
+        ADpG7aphtaym1XbrAbBUHxcG9fGht7Bc5l4vllfzb8vs3BsAHaN21bBaVtNqu/UA0PcNenzQhTOv3pSX
+        s4MyPbMAoGPUrhpWy2pabbceAHpceN1bKrOKv95karpfJqd6ADpG7aphtaym1XbrAdAf1L/95xfrhYMy
+        Od0rLyZfl+cT8wA6Ru2qYbWsptV26wHQ6y833z9MvezXG8yXP17Mld+fvwLQMWpXDatlNa22Ww8AvXuo
+        E2Nislf+eD5Xnv3+qjx9NgugY9SuGlbLalpttx4Ac3OLZXp6oTx/MV9vMFt+ezpTfv3tJYCOUbtqWC2r
+        abXdegDMzr2t3zf06yPEXPnt2Uz5pd7o51+nAXSM2lXDallNq+3WA2BmdtC8eaCTQzf46Zep8uPPkwA6
+        Ru2qYbWsptV26wGg7xX0DuLT32eaU0Q3evLTBICOUbtqWC2rabXdegDoBwiev7h9/NcJohv98OMLAB2j
+        dtWwWlbTarv1AJh6udC8c/jr05l6gkzVG02U75+8ANAxalcNq2U1rbbbD4C7NwD1vcOTnyabGz3+4TmA
+        jlG7algtq2m1zQEAhOAAAIJ92gHAewDAZ+GT3gPgXwGAz8Mn/SsAPwcAfB4+6ecA+ElA4POgdtXw//WT
+        gPxfAODzoHbVsFr+n/8vgD44YPrlQn1kqE8Bf7yqN5ht3kQA0C1qVw2rZTWttlsPgPneUvNZYhNTveYD
+        BXSDp/URAkC3qF01rJbVtNpuPQB6CyvlVX1U0DuGE1O3HwemmwDoFrWrhtWymlbbrQfAYLDafHLIzOyb
+        +thw+4GgE5OvAXSM2lXDallNq+3WA+DN4vrtU0D9fqE5BGYGzQ8QAOgWtauG1bKaVtutB8Di8mZZ0EeD
+        95ebC/XOoT5bHEC3qF01rJbVtNpuPQD020TfLq3XC1abC/XGgX6xAIBuUbu38a82Tavt1gNgbf1dWVrZ
+        qo8LG82p0a/fN+jxAUC3qF01rJbVtNpuPQD49eDA5+GTfj349s5B2di8PQT020R18VL93gFAt6hdNayW
+        1bTabj0AdncP6wv3y2a9YH1jp168XVbXAHSN2lXDallN7+4dth8A+wfHd4fAQdna3quPDXvN6QGgW9Su
+        GlbLalpttx4Aw+FJfeFRPS2G5d3uQdl5d9CcHgC6Re2qYbWsptV22wHw59HxqAyPTsrB4XFz0d7+sHl0
+        ANAtalcNq2U1LbXxy/H4ZfwAWNk/GJaT0Vk5Oj6tF4zKYT01dAMA3aJ21bBaVtN7+817AIPx+GX8APhu
+        aXmlnJ1flNHZeXPR8clpOboz1NMBgAftvle1q4bVsppeXGr+M9C34/HL+AHwVfXXxcVVOa/Ozi/L6dlF
+        dV5GpwC6Qs2qXTWsltW02lbj4/HLR1/UF3zX7w/K1fVNuby6LheXt4fBLd3sjm4M4GEYb/OuV7WrhtWy
+        mq5t/+Nvf/noi/qiL6vHvV6/PkKMynW9WDe4uq43qjfTDQE8TGq0abU2q3bVsFpW02p7vPV7/xikvvjr
+        6mZlZbUcHR2Xm/cfxrwH8OD8p1E1q3bVsFp2jd+zo9QLH1XfVHOVbgagG9Ss2n3k2h5nRwAZ7Agggx0B
+        ZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSw
+        I4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOA
+        DHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2
+        BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQ
+        wY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGO
+        ADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy
+        2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="Decompose.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Decompose.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 101 - 73
UAS_MES_JH/FunctionCode/Make/Make_FeedingCollection.Designer.cs

@@ -50,24 +50,26 @@
             this.sir_remark_label = new System.Windows.Forms.CheckBox();
             this.NoteForChange = new System.Windows.Forms.CheckBox();
             this.LabelDataGridView = new System.Windows.Forms.DataGridView();
-            this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_detail_ = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.label1 = new System.Windows.Forms.Label();
+            this.ma_colorcode = new System.Windows.Forms.Label();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail_ = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.sir_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
             this.ma_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pr_spec = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ma_qty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
@@ -206,7 +208,7 @@
             this.ma_softversion_label.Checked = true;
             this.ma_softversion_label.CheckState = System.Windows.Forms.CheckState.Checked;
             this.ma_softversion_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_softversion_label.Location = new System.Drawing.Point(680, 151);
+            this.ma_softversion_label.Location = new System.Drawing.Point(864, 151);
             this.ma_softversion_label.Name = "ma_softversion_label";
             this.ma_softversion_label.Size = new System.Drawing.Size(93, 25);
             this.ma_softversion_label.TabIndex = 74;
@@ -220,7 +222,7 @@
             this.ma_ecncode_label.Checked = true;
             this.ma_ecncode_label.CheckState = System.Windows.Forms.CheckState.Checked;
             this.ma_ecncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_ecncode_label.Location = new System.Drawing.Point(680, 192);
+            this.ma_ecncode_label.Location = new System.Drawing.Point(864, 192);
             this.ma_ecncode_label.Name = "ma_ecncode_label";
             this.ma_ecncode_label.Size = new System.Drawing.Size(78, 25);
             this.ma_ecncode_label.TabIndex = 75;
@@ -262,7 +264,7 @@
             // 
             this.ma_bomversion_label.AutoSize = true;
             this.ma_bomversion_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_bomversion_label.Location = new System.Drawing.Point(682, 108);
+            this.ma_bomversion_label.Location = new System.Drawing.Point(674, 108);
             this.ma_bomversion_label.Name = "ma_bomversion_label";
             this.ma_bomversion_label.Size = new System.Drawing.Size(77, 21);
             this.ma_bomversion_label.TabIndex = 144;
@@ -284,7 +286,7 @@
             this.sir_remark_label.Checked = true;
             this.sir_remark_label.CheckState = System.Windows.Forms.CheckState.Checked;
             this.sir_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sir_remark_label.Location = new System.Drawing.Point(680, 232);
+            this.sir_remark_label.Location = new System.Drawing.Point(864, 232);
             this.sir_remark_label.Name = "sir_remark_label";
             this.sir_remark_label.Size = new System.Drawing.Size(93, 25);
             this.sir_remark_label.TabIndex = 190;
@@ -325,57 +327,24 @@
             this.LabelDataGridView.Size = new System.Drawing.Size(641, 227);
             this.LabelDataGridView.TabIndex = 193;
             // 
-            // 序号
-            // 
-            this.序号.DataPropertyName = "sp_detno";
-            this.序号.HeaderText = "序号";
-            this.序号.Name = "序号";
-            this.序号.ReadOnly = true;
-            this.序号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.序号.Width = 50;
-            // 
-            // cm_makecode
-            // 
-            this.cm_makecode.DataPropertyName = "sp_fsoncode";
-            this.cm_makecode.HeaderText = "上料料号";
-            this.cm_makecode.Name = "cm_makecode";
-            this.cm_makecode.ReadOnly = true;
-            this.cm_makecode.Width = 80;
-            // 
-            // pr_detail_
-            // 
-            this.pr_detail_.DataPropertyName = "pr_detail";
-            this.pr_detail_.HeaderText = "上料名称";
-            this.pr_detail_.Name = "pr_detail_";
-            this.pr_detail_.ReadOnly = true;
-            this.pr_detail_.Width = 130;
-            // 
-            // cm_soncode
-            // 
-            this.cm_soncode.DataPropertyName = "sp_prefix";
-            this.cm_soncode.HeaderText = "前缀";
-            this.cm_soncode.Name = "cm_soncode";
-            this.cm_soncode.ReadOnly = true;
-            this.cm_soncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.cm_soncode.Width = 60;
-            // 
-            // cm_barcode
+            // label1
             // 
-            this.cm_barcode.DataPropertyName = "sp_length";
-            this.cm_barcode.HeaderText = "长度";
-            this.cm_barcode.Name = "cm_barcode";
-            this.cm_barcode.ReadOnly = true;
-            this.cm_barcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.cm_barcode.Width = 60;
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(674, 155);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(58, 21);
+            this.label1.TabIndex = 194;
+            this.label1.Text = "颜色号";
             // 
-            // BarCode
+            // ma_colorcode
             // 
-            this.BarCode.HeaderText = "条码号";
-            this.BarCode.MinimumWidth = 300;
-            this.BarCode.Name = "BarCode";
-            this.BarCode.ReadOnly = true;
-            this.BarCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.BarCode.Width = 300;
+            this.ma_colorcode.AutoSize = true;
+            this.ma_colorcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_colorcode.Location = new System.Drawing.Point(768, 155);
+            this.ma_colorcode.Name = "ma_colorcode";
+            this.ma_colorcode.Size = new System.Drawing.Size(0, 21);
+            this.ma_colorcode.TabIndex = 195;
             // 
             // dataGridViewTextBoxColumn1
             // 
@@ -391,6 +360,8 @@
             this.dataGridViewTextBoxColumn2.DataPropertyName = "pr_detail";
             this.dataGridViewTextBoxColumn2.HeaderText = "上料名称";
             this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.ReadOnly = true;
+            this.dataGridViewTextBoxColumn2.Width = 80;
             // 
             // dataGridViewTextBoxColumn3
             // 
@@ -425,9 +396,62 @@
             this.dataGridViewTextBoxColumn6.HeaderText = "条码号";
             this.dataGridViewTextBoxColumn6.MinimumWidth = 300;
             this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.ReadOnly = true;
             this.dataGridViewTextBoxColumn6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.dataGridViewTextBoxColumn6.Width = 300;
             // 
+            // 序号
+            // 
+            this.序号.DataPropertyName = "sp_detno";
+            this.序号.HeaderText = "序号";
+            this.序号.Name = "序号";
+            this.序号.ReadOnly = true;
+            this.序号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.序号.Width = 50;
+            // 
+            // cm_makecode
+            // 
+            this.cm_makecode.DataPropertyName = "sp_fsoncode";
+            this.cm_makecode.HeaderText = "上料料号";
+            this.cm_makecode.Name = "cm_makecode";
+            this.cm_makecode.ReadOnly = true;
+            this.cm_makecode.Width = 80;
+            // 
+            // pr_detail_
+            // 
+            this.pr_detail_.DataPropertyName = "pr_detail";
+            this.pr_detail_.HeaderText = "上料名称";
+            this.pr_detail_.Name = "pr_detail_";
+            this.pr_detail_.ReadOnly = true;
+            this.pr_detail_.Width = 130;
+            // 
+            // cm_soncode
+            // 
+            this.cm_soncode.DataPropertyName = "sp_prefix";
+            this.cm_soncode.HeaderText = "前缀";
+            this.cm_soncode.Name = "cm_soncode";
+            this.cm_soncode.ReadOnly = true;
+            this.cm_soncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.cm_soncode.Width = 60;
+            // 
+            // cm_barcode
+            // 
+            this.cm_barcode.DataPropertyName = "sp_length";
+            this.cm_barcode.HeaderText = "长度";
+            this.cm_barcode.Name = "cm_barcode";
+            this.cm_barcode.ReadOnly = true;
+            this.cm_barcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.cm_barcode.Width = 60;
+            // 
+            // BarCode
+            // 
+            this.BarCode.HeaderText = "条码号";
+            this.BarCode.MinimumWidth = 300;
+            this.BarCode.Name = "BarCode";
+            this.BarCode.ReadOnly = true;
+            this.BarCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.BarCode.Width = 300;
+            // 
             // sir_remark
             // 
             this.sir_remark.AllPower = null;
@@ -435,7 +459,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.sir_remark.BackColor = System.Drawing.Color.White;
             this.sir_remark.ID = null;
-            this.sir_remark.Location = new System.Drawing.Point(680, 267);
+            this.sir_remark.Location = new System.Drawing.Point(864, 267);
             this.sir_remark.Multiline = true;
             this.sir_remark.Name = "sir_remark";
             this.sir_remark.Power = null;
@@ -502,16 +526,16 @@
             this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
             this.ma_prodcode.TabIndex = 99;
             // 
-            // pr_detail
+            // pr_spec
             // 
-            this.pr_detail.AutoSize = true;
-            this.pr_detail.CutLength = null;
-            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(675, 12);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 21);
-            this.pr_detail.TabIndex = 98;
+            this.pr_spec.AutoSize = true;
+            this.pr_spec.CutLength = null;
+            this.pr_spec.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_spec.Location = new System.Drawing.Point(675, 12);
+            this.pr_spec.MaximumSize = new System.Drawing.Size(300, 0);
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.Size = new System.Drawing.Size(0, 21);
+            this.pr_spec.TabIndex = 98;
             // 
             // mcd_remainqty
             // 
@@ -581,7 +605,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ma_softversion.BackColor = System.Drawing.Color.White;
             this.ma_softversion.ID = null;
-            this.ma_softversion.Location = new System.Drawing.Point(772, 151);
+            this.ma_softversion.Location = new System.Drawing.Point(956, 151);
             this.ma_softversion.Name = "ma_softversion";
             this.ma_softversion.Power = null;
             this.ma_softversion.Size = new System.Drawing.Size(106, 21);
@@ -598,7 +622,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ma_ecncode.BackColor = System.Drawing.Color.White;
             this.ma_ecncode.ID = null;
-            this.ma_ecncode.Location = new System.Drawing.Point(772, 196);
+            this.ma_ecncode.Location = new System.Drawing.Point(956, 196);
             this.ma_ecncode.Name = "ma_ecncode";
             this.ma_ecncode.Power = null;
             this.ma_ecncode.Size = new System.Drawing.Size(106, 21);
@@ -663,6 +687,8 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(898, 487);
+            this.Controls.Add(this.ma_colorcode);
+            this.Controls.Add(this.label1);
             this.Controls.Add(this.LabelDataGridView);
             this.Controls.Add(this.NoteForChange);
             this.Controls.Add(this.sir_remark);
@@ -676,7 +702,7 @@
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.ClearSn_code);
             this.Controls.Add(this.ma_prodcode);
-            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.pr_spec);
             this.Controls.Add(this.mcd_remainqty);
             this.Controls.Add(this.mcd_inqty);
             this.Controls.Add(this.ma_qty);
@@ -737,7 +763,7 @@
         private CustomControl.ValueLabel.ValueLabel ma_qty;
         private CustomControl.ValueLabel.ValueLabel mcd_inqty;
         private CustomControl.ValueLabel.ValueLabel mcd_remainqty;
-        private CustomControl.ValueLabel.ValueLabel pr_detail;
+        private CustomControl.ValueLabel.ValueLabel pr_spec;
         private CustomControl.ValueLabel.ValueLabel ma_prodcode;
         private System.Windows.Forms.PictureBox ClearSn_code;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
@@ -763,5 +789,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_soncode;
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_barcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn BarCode;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label ma_colorcode;
     }
 }

+ 6 - 5
UAS_MES_JH/FunctionCode/Make/Make_FeedingCollection.cs

@@ -70,10 +70,10 @@ namespace UAS_MES_NEW.Make
             ma_code.SetLockCheckBox(LockMakeCode);
             //工单号放大镜配置
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
-            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,ma_craftcode # 途程编号,pr_spec # 产品名称,ma_bomversion # Bom版本,ma_softversion # 软件版本,ma_ecncode # ECN号";
+            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,ma_craftcode # 途程编号,pr_spec # 产品规格,ma_bomversion # Bom版本,ma_softversion # 软件版本,ma_ecncode # ECN号,ma_colorcode # 颜色号";
             ma_code.FormName = Name;
             ma_code.DBTitle = "工单查询";
-            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_spec", "ma_craftcode", "ma_bomversion", "ma_softversion", "ma_ecncode" };
+            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_spec", "ma_craftcode", "ma_bomversion", "ma_softversion", "ma_ecncode","ma_colorcode" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DBChange;
             code.Focus();
@@ -142,7 +142,7 @@ namespace UAS_MES_NEW.Make
                             //索引超出长度表示内容均已提醒
                             if (RemainIndex >= RemainList.Length)
                             {
-                                OperateResult.AppendText(">>当前序列号" + sn_code.Text + "不在本道工序,请采集其它序列号\n", Color.Black);
+                                OperateResult.AppendText(">>当前序列号" + sn_code.Text + "不在本道工序,请采集其它序列号\n", Color.Red);
                                 sn_code.Text = "";
                                 code.Text = "";
                                 return;
@@ -158,7 +158,8 @@ namespace UAS_MES_NEW.Make
                             string sp_barcoderule = dt1.Rows[RemainIndex]["sp_barcoderule"].ToString();
                             string sp_checkbarcode = dt1.Rows[RemainIndex]["sp_checkbarcode"].ToString();
                             string sp_checksalecode = dt1.Rows[RemainIndex]["sp_checksalecode"].ToString();
-                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
+                            string sp_iflabelcheck = dt1.Rows[RemainIndex]["sp_iflabelcheck"].ToString();
+                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, sp_iflabelcheck, out ErrorMessage))
                             {
                                 //判断采集的条码和本次采集的也不能重复
                                 if (CollectData.Contains(code.Text) && sp_ifrepeat != "-1")
@@ -365,7 +366,7 @@ namespace UAS_MES_NEW.Make
             //单独用一个DataTable存储一个
             dt1 = new DataTable();
             sql.Clear();
-            sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,max(sp_checkbarcode)sp_checkbarcode,min(sp_checksalecode)sp_checksalecode,");
+            sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,min(sp_iflabelcheck) sp_iflabelcheck,max(sp_checkbarcode)sp_checkbarcode,min(sp_checksalecode)sp_checksalecode,");
             sql.Append("sp_fsoncode,max(sp_barcoderule)sp_barcoderule,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
             sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
             sql.Append("sp_regex,max(pr_detail)pr_detail from stepproduct left join product on pr_code=sp_fsoncode where ");

+ 78 - 68
UAS_MES_JH/FunctionCode/Make/Make_RePrintLabel.Designer.cs

@@ -28,6 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_RePrintLabel));
             this.giftBox = new System.Windows.Forms.RadioButton();
             this.CartonBox = new System.Windows.Forms.RadioButton();
@@ -36,7 +37,7 @@
             this.label3 = new System.Windows.Forms.Label();
             this.label111 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
-            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip();
+            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.label6 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
             this.label8 = new System.Windows.Forms.Label();
@@ -61,10 +62,10 @@
             this.giftBox.AutoSize = true;
             this.giftBox.Checked = true;
             this.giftBox.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.giftBox.Location = new System.Drawing.Point(83, 52);
-            this.giftBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.giftBox.Location = new System.Drawing.Point(55, 35);
+            this.giftBox.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.giftBox.Name = "giftBox";
-            this.giftBox.Size = new System.Drawing.Size(135, 35);
+            this.giftBox.Size = new System.Drawing.Size(92, 25);
             this.giftBox.TabIndex = 1;
             this.giftBox.TabStop = true;
             this.giftBox.Text = "彩标打印";
@@ -75,10 +76,10 @@
             // 
             this.CartonBox.AutoSize = true;
             this.CartonBox.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.CartonBox.Location = new System.Drawing.Point(431, 52);
-            this.CartonBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.CartonBox.Location = new System.Drawing.Point(287, 35);
+            this.CartonBox.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.CartonBox.Name = "CartonBox";
-            this.CartonBox.Size = new System.Drawing.Size(164, 35);
+            this.CartonBox.Size = new System.Drawing.Size(112, 25);
             this.CartonBox.TabIndex = 2;
             this.CartonBox.Text = "Carton打印";
             this.CartonBox.UseVisualStyleBackColor = true;
@@ -88,22 +89,24 @@
             // 
             this.fuselagel.AutoSize = true;
             this.fuselagel.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.fuselagel.Location = new System.Drawing.Point(845, 52);
-            this.fuselagel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.fuselagel.Location = new System.Drawing.Point(563, 35);
+            this.fuselagel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.fuselagel.Name = "fuselagel";
-            this.fuselagel.Size = new System.Drawing.Size(159, 35);
+            this.fuselagel.Size = new System.Drawing.Size(108, 25);
             this.fuselagel.TabIndex = 3;
             this.fuselagel.Text = "机身标打印";
             this.fuselagel.UseVisualStyleBackColor = true;
+            this.fuselagel.Visible = false;
             this.fuselagel.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChange);
             // 
             // label
             // 
             this.label.AutoSize = true;
             this.label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label.Location = new System.Drawing.Point(38, 133);
+            this.label.Location = new System.Drawing.Point(25, 89);
+            this.label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label.Name = "label";
-            this.label.Size = new System.Drawing.Size(86, 31);
+            this.label.Size = new System.Drawing.Size(58, 21);
             this.label.TabIndex = 4;
             this.label.Text = "输入值";
             // 
@@ -111,9 +114,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label3.Location = new System.Drawing.Point(546, 133);
+            this.label3.Location = new System.Drawing.Point(364, 89);
+            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(110, 31);
+            this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 5;
             this.label3.Text = "工单代码";
             // 
@@ -121,9 +125,10 @@
             // 
             this.label111.AutoSize = true;
             this.label111.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label111.Location = new System.Drawing.Point(38, 173);
+            this.label111.Location = new System.Drawing.Point(25, 115);
+            this.label111.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label111.Name = "label111";
-            this.label111.Size = new System.Drawing.Size(110, 31);
+            this.label111.Size = new System.Drawing.Size(74, 21);
             this.label111.TabIndex = 6;
             this.label111.Text = "产品编号";
             // 
@@ -131,9 +136,10 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label5.Location = new System.Drawing.Point(546, 173);
+            this.label5.Location = new System.Drawing.Point(364, 115);
+            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(62, 31);
+            this.label5.Size = new System.Drawing.Size(42, 21);
             this.label5.TabIndex = 7;
             this.label5.Text = "名称";
             // 
@@ -141,20 +147,19 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(188, 269);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.PrintLabel.Location = new System.Drawing.Point(125, 179);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(222, 26);
+            this.PrintLabel.Size = new System.Drawing.Size(149, 20);
             this.PrintLabel.TabIndex = 189;
             // 
             // label6
             // 
             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(38, 218);
-            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label6.Location = new System.Drawing.Point(25, 145);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(134, 31);
+            this.label6.Size = new System.Drawing.Size(90, 21);
             this.label6.TabIndex = 188;
             this.label6.Text = "打印机列表";
             // 
@@ -162,10 +167,9 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(38, 264);
-            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label7.Location = new System.Drawing.Point(25, 176);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(110, 31);
+            this.label7.Size = new System.Drawing.Size(74, 21);
             this.label7.TabIndex = 187;
             this.label7.Text = "标签模板";
             // 
@@ -173,9 +177,10 @@
             // 
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label8.Location = new System.Drawing.Point(544, 222);
+            this.label8.Location = new System.Drawing.Point(363, 148);
+            this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(86, 31);
+            this.label8.Size = new System.Drawing.Size(58, 21);
             this.label8.TabIndex = 190;
             this.label8.Text = "输入框";
             // 
@@ -183,9 +188,10 @@
             // 
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label9.Location = new System.Drawing.Point(546, 269);
+            this.label9.Location = new System.Drawing.Point(364, 179);
+            this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(62, 31);
+            this.label9.Size = new System.Drawing.Size(42, 21);
             this.label9.TabIndex = 192;
             this.label9.Text = "份数";
             // 
@@ -193,9 +199,10 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label10.Location = new System.Drawing.Point(49, 576);
+            this.label10.Location = new System.Drawing.Point(33, 384);
+            this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(110, 31);
+            this.label10.Size = new System.Drawing.Size(74, 21);
             this.label10.TabIndex = 196;
             this.label10.Text = "补打核对";
             // 
@@ -203,18 +210,20 @@
             // 
             this.inputValue.AutoSize = true;
             this.inputValue.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.inputValue.Location = new System.Drawing.Point(182, 133);
+            this.inputValue.Location = new System.Drawing.Point(121, 89);
+            this.inputValue.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.inputValue.Name = "inputValue";
-            this.inputValue.Size = new System.Drawing.Size(0, 31);
+            this.inputValue.Size = new System.Drawing.Size(0, 21);
             this.inputValue.TabIndex = 199;
             // 
             // pr_code
             // 
             this.pr_code.AutoSize = true;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_code.Location = new System.Drawing.Point(182, 173);
+            this.pr_code.Location = new System.Drawing.Point(121, 115);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.pr_code.Name = "pr_code";
-            this.pr_code.Size = new System.Drawing.Size(0, 31);
+            this.pr_code.Size = new System.Drawing.Size(0, 21);
             this.pr_code.TabIndex = 200;
             this.pr_code.TextChanged += new System.EventHandler(this.PrintLabel_TextChanged);
             // 
@@ -222,18 +231,20 @@
             // 
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ms_makecode.Location = new System.Drawing.Point(656, 133);
+            this.ms_makecode.Location = new System.Drawing.Point(437, 89);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 31);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
             this.ms_makecode.TabIndex = 201;
             // 
             // pr_detail
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_detail.Location = new System.Drawing.Point(656, 173);
+            this.pr_detail.Location = new System.Drawing.Point(437, 115);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 31);
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 202;
             // 
             // rePrintCheck
@@ -241,11 +252,11 @@
             this.rePrintCheck.AllPower = null;
             this.rePrintCheck.BackColor = System.Drawing.Color.White;
             this.rePrintCheck.ID = null;
-            this.rePrintCheck.Location = new System.Drawing.Point(223, 576);
-            this.rePrintCheck.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.rePrintCheck.Location = new System.Drawing.Point(149, 384);
+            this.rePrintCheck.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.rePrintCheck.Name = "rePrintCheck";
             this.rePrintCheck.Power = null;
-            this.rePrintCheck.Size = new System.Drawing.Size(242, 28);
+            this.rePrintCheck.Size = new System.Drawing.Size(163, 21);
             this.rePrintCheck.Str = null;
             this.rePrintCheck.Str1 = null;
             this.rePrintCheck.Str2 = null;
@@ -255,10 +266,9 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(44, 316);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.OperateResult.Location = new System.Drawing.Point(29, 211);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(1134, 246);
+            this.OperateResult.Size = new System.Drawing.Size(757, 165);
             this.OperateResult.TabIndex = 195;
             this.OperateResult.Text = "";
             // 
@@ -269,13 +279,13 @@
             this.printBtn.DownImage = ((System.Drawing.Image)(resources.GetObject("printBtn.DownImage")));
             this.printBtn.Image = null;
             this.printBtn.IsShowBorder = true;
-            this.printBtn.Location = new System.Drawing.Point(923, 267);
-            this.printBtn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.printBtn.Location = new System.Drawing.Point(615, 178);
+            this.printBtn.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.printBtn.MoveImage = ((System.Drawing.Image)(resources.GetObject("printBtn.MoveImage")));
             this.printBtn.Name = "printBtn";
             this.printBtn.NormalImage = ((System.Drawing.Image)(resources.GetObject("printBtn.NormalImage")));
             this.printBtn.Power = null;
-            this.printBtn.Size = new System.Drawing.Size(75, 36);
+            this.printBtn.Size = new System.Drawing.Size(50, 24);
             this.printBtn.TabIndex = 194;
             this.printBtn.Text = "打印";
             this.printBtn.UseVisualStyleBackColor = false;
@@ -286,12 +296,12 @@
             this.printNum.AllPower = null;
             this.printNum.BackColor = System.Drawing.Color.White;
             this.printNum.ID = null;
-            this.printNum.Location = new System.Drawing.Point(663, 273);
-            this.printNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.printNum.Location = new System.Drawing.Point(442, 182);
+            this.printNum.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.printNum.Name = "printNum";
             this.printNum.Negative = false;
             this.printNum.Power = null;
-            this.printNum.Size = new System.Drawing.Size(222, 28);
+            this.printNum.Size = new System.Drawing.Size(149, 21);
             this.printNum.Str = null;
             this.printNum.Str1 = null;
             this.printNum.Str2 = null;
@@ -303,11 +313,11 @@
             this.inputText.AllPower = null;
             this.inputText.BackColor = System.Drawing.Color.White;
             this.inputText.ID = null;
-            this.inputText.Location = new System.Drawing.Point(662, 224);
-            this.inputText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.inputText.Location = new System.Drawing.Point(441, 149);
+            this.inputText.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.inputText.Name = "inputText";
             this.inputText.Power = null;
-            this.inputText.Size = new System.Drawing.Size(222, 28);
+            this.inputText.Size = new System.Drawing.Size(149, 21);
             this.inputText.Str = null;
             this.inputText.Str1 = null;
             this.inputText.Str2 = null;
@@ -316,10 +326,10 @@
             // 
             // Printer
             // 
-            this.Printer.Location = new System.Drawing.Point(188, 218);
-            this.Printer.Margin = new System.Windows.Forms.Padding(6);
+            this.Printer.Location = new System.Drawing.Point(125, 145);
+            this.Printer.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(222, 37);
+            this.Printer.Size = new System.Drawing.Size(148, 25);
             this.Printer.TabIndex = 186;
             // 
             // groupBoxWithBorder1
@@ -329,11 +339,11 @@
             this.groupBoxWithBorder1.Controls.Add(this.fuselagel);
             this.groupBoxWithBorder1.Controls.Add(this.giftBox);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(44, 14);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(29, 9);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1134, 108);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2, 3, 2, 3);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(756, 72);
             this.groupBoxWithBorder1.TabIndex = 204;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "打印类型";
@@ -341,9 +351,9 @@
             // 
             // Make_RePrintLabel
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1227, 625);
+            this.ClientSize = new System.Drawing.Size(818, 417);
             this.Controls.Add(this.groupBoxWithBorder1);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.ms_makecode);
@@ -366,16 +376,16 @@
             this.Controls.Add(this.label3);
             this.Controls.Add(this.label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.Name = "Make_RePrintLabel";
             this.Tag = "Make!RePrintLabel";
             this.Text = "Make_RePrintLabel";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_RePrintLabel_FormClosing);
             this.Load += new System.EventHandler(this.Make_RePrintLabel_Load);
             this.SizeChanged += new System.EventHandler(this.Make_RePrintLabel_SizeChanged);
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 48 - 48
UAS_MES_JH/FunctionCode/Make/Make_RePrintLabel.cs

@@ -133,11 +133,11 @@ namespace UAS_MES_NEW.Make
                         OperateResult.AppendText(">>请输入SN\n", Color.Black);
                         return;
                     }
-                    //判断是否装箱通过
-                    if (checkPacked())
-                    {
-                        return;
-                    }
+                    ////判断是否装箱通过
+                    //if (checkPacked())
+                    //{
+                    //    return;
+                    //}
                     //界面赋值
                     formValue = (DataTable)dh.ExecuteSql("select ms_makecode,pr_code,pr_detail from makeserial left join product on MS_PRODCODE=pr_code where ms_id='" + ms_id + "'", "select");
                     BaseUtil.SetFormValue(this.Controls, formValue);
@@ -214,12 +214,12 @@ namespace UAS_MES_NEW.Make
                     OperateResult.AppendText("<<序列号错误,不存在或已经发生转号\n", Color.Red);
                     return;
                 }
-                //如果ms_outboxcode 不为空,则提示用户,已经装箱不允许单独打印
-                if (mapB.Rows[0]["ms_outboxcode"].ToString() != "")
-                {
-                    OperateResult.AppendText("<<SN:" + inputValue.Text + "已经装箱" + mapB.Rows[0]["ms_outboxcode"].ToString() + "不允许单独补打\n", Color.Red);
-                    return;
-                }
+                ////如果ms_outboxcode 不为空,则提示用户,已经装箱不允许单独打印
+                //if (mapB.Rows[0]["ms_outboxcode"].ToString() != "")
+                //{
+                //    OperateResult.AppendText("<<SN:" + inputValue.Text + "已经装箱" + mapB.Rows[0]["ms_outboxcode"].ToString() + "不允许单独补打\n", Color.Red);
+                //    return;
+                //}
                 //判定通过进行打印 
                 //doc = lbl.Documents.Open(PrintLabel.Text);
                 if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, giftBox.Checked ? "彩盒标" : "机身标", "-1", out errorMessage))
@@ -234,13 +234,13 @@ namespace UAS_MES_NEW.Make
                 }
                 //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, giftBox.Checked ? "彩盒标补打印" : "机身标补打印", "补打印成功", inputValue.Text, "");
-                //如果ms_downstatus<>0,则更新ms_downstatus=-1 where ms_id=?id,同时插入记录至表 MAKEDOWN
-                if (mapB.Rows[0]["ms_downstatus"].ToString() == "0")
-                {
-                    dh.ExecuteSql("update makeserial set ms_downstatus='-1' where ms_id='" + ms_id + "'", "update");
-                    //插入数据
-                    putInfo2MakeDown();
-                }
+                ////如果ms_downstatus<>0,则更新ms_downstatus=-1 where ms_id=?id,同时插入记录至表 MAKEDOWN
+                //if (mapB.Rows[0]["ms_downstatus"].ToString() == "0")
+                //{
+                //    dh.ExecuteSql("update makeserial set ms_downstatus='-1' where ms_id='" + ms_id + "'", "update");
+                //    //插入数据
+                //    putInfo2MakeDown();
+                //}
             }
             //打印类型为卡通箱标签
             else if (CartonBox.Checked)
@@ -266,13 +266,13 @@ namespace UAS_MES_NEW.Make
                 }
                 //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱标签补打印,箱号:" + inputValue.Text, "补打印成功", inputValue.Text, "");
-                //如果pa_downstatus<>0,则更新pa_downstatus=-1 where pa_outboxcode=?code,同时插入记录至表 MAKEDOWN
-                if (mapB.Rows[0]["pa_downstatus"].ToString() == "0")
-                {
-                    dh.ExecuteSql("update package set pa_downstatus='-1' where pa_outboxcode='" + inputValue.Text + "'", "update");
-                    //插入MakeDown表
-                    putInfo2MakeDown();
-                }
+                ////如果pa_downstatus<>0,则更新pa_downstatus=-1 where pa_outboxcode=?code,同时插入记录至表 MAKEDOWN
+                //if (mapB.Rows[0]["pa_downstatus"].ToString() == "0")
+                //{
+                //    dh.ExecuteSql("update package set pa_downstatus='-1' where pa_outboxcode='" + inputValue.Text + "'", "update");
+                //    //插入MakeDown表
+                //    putInfo2MakeDown();
+                //}
             }
         }
 
@@ -351,18 +351,18 @@ namespace UAS_MES_NEW.Make
                         if (rePrintCheck.Text == TSN)
                         {
                             OperateResult.AppendText("<<核对成功\n", Color.Green);
-                            //如果序列号是下地状态 ms_downstatus<>0 ,更新ms_downstatus=0;
-                            if (infoc.Rows[0]["ms_downstatus"].ToString() != "0")
-                            {
-                                ////判断下地原因是否是补打标签,是才能取消下地
-                                if (dh.CheckExist("makedown", "Md_SNCODE='" + TSN + "' AND Md_MACODE='" + infoc.Rows[0]["ms_makecode"].ToString() + "' AND Md_STATUS=-1 AND MD_DOWNREASON='补打标签'"))
-                                {
-                                    //同时更新 update makedown set ms_status=0,MS_UPREASON=’标签补打核对’,MS_UPMAN=’人员编号’,MS_UPDATE=SYSDATE WHERE MS_SNCODE=? AND MS_MACODE=? AND MS_STATUS=-1
-                                    sql.Clear();
-                                    sql.Append("update makedown set md_status=0,Md_UPREASON='标签补打核对',Md_UPMAN='" + User.UserCode + "',Md_UPDATE=SYSDATE WHERE Md_SNCODE='" + TSN + "' AND Md_MACODE='" + infoc.Rows[0]["ms_makecode"].ToString() + "' AND Md_STATUS=-1 AND MD_DOWNREASON='补打标签'");
-                                    dh.ExecuteSQLTran("update makeserial set ms_downstatus='0' where ms_id='" + re_ms_id + "'", sql.GetString());
-                                }
-                            }
+                            ////如果序列号是下地状态 ms_downstatus<>0 ,更新ms_downstatus=0;
+                            //if (infoc.Rows[0]["ms_downstatus"].ToString() != "0")
+                            //{
+                            //    ////判断下地原因是否是补打标签,是才能取消下地
+                            //    if (dh.CheckExist("makedown", "Md_SNCODE='" + TSN + "' AND Md_MACODE='" + infoc.Rows[0]["ms_makecode"].ToString() + "' AND Md_STATUS=-1 AND MD_DOWNREASON='补打标签'"))
+                            //    {
+                            //        //同时更新 update makedown set ms_status=0,MS_UPREASON=’标签补打核对’,MS_UPMAN=’人员编号’,MS_UPDATE=SYSDATE WHERE MS_SNCODE=? AND MS_MACODE=? AND MS_STATUS=-1
+                            //        sql.Clear();
+                            //        sql.Append("update makedown set md_status=0,Md_UPREASON='标签补打核对',Md_UPMAN='" + User.UserCode + "',Md_UPDATE=SYSDATE WHERE Md_SNCODE='" + TSN + "' AND Md_MACODE='" + infoc.Rows[0]["ms_makecode"].ToString() + "' AND Md_STATUS=-1 AND MD_DOWNREASON='补打标签'");
+                            //        dh.ExecuteSQLTran("update makeserial set ms_downstatus='0' where ms_id='" + re_ms_id + "'", sql.GetString());
+                            //    }
+                            //}
                             printBtn.Enabled = true;
                             //记录操作日志commandlog , 补打核对,核对成功
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, infoc.Rows[0]["ms_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "标签补打核对", "核对成功", TSN, "");
@@ -402,17 +402,17 @@ namespace UAS_MES_NEW.Make
                         {
                             //提示用户核对成功
                             OperateResult.AppendText("<<核对成功\n", Color.Green);
-                            //如果卡通箱号是下地状态 pa_downstatus<>0 ,更新pa_downstatus=0;
-                            if (infoc.Rows[0]["pa_downstatus"].ToString() != "0")
-                            {
-                                //判断下地原因是否是补打标签,是才能取消下地
-                                if (dh.CheckExist("makedown", "Md_OUTBOXCODE='" + TSN + "' AND Md_PRODCODE='" + infoc.Rows[0]["pa_prodcode"].ToString() + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'"))
-                                {
-                                    sql.Clear();
-                                    sql.Append("update makedown set md_status=0,Md_UPREASON='标签补打核对',Md_UPMAN='" + User.UserCode + "',Md_UPDATE=SYSDATE WHERE Md_OUTBOXCODE='" + TSN + "' AND Md_PRODCODE='" + infoc.Rows[0]["pa_prodcode"].ToString() + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'");
-                                    dh.ExecuteSQLTran("update package set pa_downstatus='0' where pa_outboxcode='" + TSN + "'", sql.GetString());
-                                }
-                            }
+                            ////如果卡通箱号是下地状态 pa_downstatus<>0 ,更新pa_downstatus=0;
+                            //if (infoc.Rows[0]["pa_downstatus"].ToString() != "0")
+                            //{
+                            //    //判断下地原因是否是补打标签,是才能取消下地
+                            //    if (dh.CheckExist("makedown", "Md_OUTBOXCODE='" + TSN + "' AND Md_PRODCODE='" + infoc.Rows[0]["pa_prodcode"].ToString() + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'"))
+                            //    {
+                            //        sql.Clear();
+                            //        sql.Append("update makedown set md_status=0,Md_UPREASON='标签补打核对',Md_UPMAN='" + User.UserCode + "',Md_UPDATE=SYSDATE WHERE Md_OUTBOXCODE='" + TSN + "' AND Md_PRODCODE='" + infoc.Rows[0]["pa_prodcode"].ToString() + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'");
+                            //        dh.ExecuteSQLTran("update package set pa_downstatus='0' where pa_outboxcode='" + TSN + "'", sql.GetString());
+                            //    }
+                            //}
                             printBtn.Enabled = true;
                             //记录操作日志commandlog , 补打核对,核对成功
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, infoc.Rows[0]["pa_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "标签补打核对,卡通箱号:" + TSN, "核对成功", TSN, "");

+ 177 - 92
UAS_MES_JH/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -59,10 +59,16 @@
             this.mcd_inqty_label = new System.Windows.Forms.Label();
             this.mc_restqty_label = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.label7 = new System.Windows.Forms.Label();
             this.ob_checkno = new System.Windows.Forms.Label();
+            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
+            this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
+            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.ma_softversion_label = new System.Windows.Forms.Label();
             this.BadInfSource = new System.Windows.Forms.BindingSource(this.components);
@@ -74,12 +80,6 @@
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.Filter = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.ma_softversion = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.Save = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.bc_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
@@ -94,19 +94,27 @@
             this.bc_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.bc_groupcode = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.ms_sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.StopWatch = new System.Windows.Forms.Button();
+            this.StartWatch = new System.Windows.Forms.Button();
+            this.ChooseFolder = new System.Windows.Forms.Button();
+            this.FolderPath = new System.Windows.Forms.TextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.XmlWatcher = new System.IO.FileSystemWatcher();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).BeginInit();
             this.SuspendLayout();
             // 
             // bc_remark_label
             // 
             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(287, 181);
+            this.bc_remark_label.Location = new System.Drawing.Point(786, 505);
             this.bc_remark_label.Name = "bc_remark_label";
             this.bc_remark_label.Size = new System.Drawing.Size(74, 21);
             this.bc_remark_label.TabIndex = 25;
             this.bc_remark_label.Text = "不良备注";
+            this.bc_remark_label.Visible = false;
             // 
             // ms_sncode_label
             // 
@@ -382,6 +390,19 @@
             this.panel1.Size = new System.Drawing.Size(315, 127);
             this.panel1.TabIndex = 71;
             // 
+            // ob_sendqty
+            // 
+            this.ob_sendqty.AutoSize = true;
+            this.ob_sendqty.CutLength = null;
+            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_sendqty.Location = new System.Drawing.Point(109, 91);
+            this.ob_sendqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_sendqty.Name = "ob_sendqty";
+            this.ob_sendqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_sendqty.TabIndex = 78;
+            this.ob_sendqty.Tag = "ob_batchqty";
+            // 
             // label7
             // 
             this.label7.AutoSize = true;
@@ -406,6 +427,39 @@
             this.ob_checkno.Visible = false;
             this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
             // 
+            // SendCheck
+            // 
+            this.SendCheck.AllPower = null;
+            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
+            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
+            this.SendCheck.Enabled = false;
+            this.SendCheck.Image = null;
+            this.SendCheck.IsShowBorder = true;
+            this.SendCheck.Location = new System.Drawing.Point(229, 90);
+            this.SendCheck.Margin = new System.Windows.Forms.Padding(2);
+            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
+            this.SendCheck.Name = "SendCheck";
+            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
+            this.SendCheck.Power = null;
+            this.SendCheck.Size = new System.Drawing.Size(65, 26);
+            this.SendCheck.TabIndex = 72;
+            this.SendCheck.Text = "送检";
+            this.SendCheck.UseVisualStyleBackColor = false;
+            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
+            // 
+            // ob_batchqty
+            // 
+            this.ob_batchqty.AutoSize = true;
+            this.ob_batchqty.CutLength = null;
+            this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_batchqty.Location = new System.Drawing.Point(109, 51);
+            this.ob_batchqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_batchqty.Name = "ob_batchqty";
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_batchqty.TabIndex = 75;
+            this.ob_batchqty.Tag = "ob_batchqty";
+            // 
             // ob_batchqty_label
             // 
             this.ob_batchqty_label.AutoSize = true;
@@ -417,6 +471,19 @@
             this.ob_batchqty_label.TabIndex = 74;
             this.ob_batchqty_label.Text = "抽检批数";
             // 
+            // ob_nowcheckqty
+            // 
+            this.ob_nowcheckqty.AutoSize = true;
+            this.ob_nowcheckqty.CutLength = null;
+            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(248, 51);
+            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_nowcheckqty.TabIndex = 73;
+            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
+            // 
             // ob_nowcheckqty_label
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
@@ -428,6 +495,30 @@
             this.ob_nowcheckqty_label.TabIndex = 72;
             this.ob_nowcheckqty_label.Text = "当前批数";
             // 
+            // mcd_remainqty
+            // 
+            this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.CutLength = null;
+            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(109, 12);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
+            this.mcd_remainqty.TabIndex = 57;
+            this.mcd_remainqty.Tag = "mcd_remainqty";
+            // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.CutLength = null;
+            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(248, 12);
+            this.mcd_inqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
+            this.mcd_inqty.TabIndex = 54;
+            this.mcd_inqty.Tag = "mcd_inqty";
+            // 
             // pr_detail_label
             // 
             this.pr_detail_label.AutoSize = true;
@@ -526,89 +617,6 @@
             this.ma_softversion.Size = new System.Drawing.Size(0, 21);
             this.ma_softversion.TabIndex = 73;
             // 
-            // ob_sendqty
-            // 
-            this.ob_sendqty.AutoSize = true;
-            this.ob_sendqty.CutLength = null;
-            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_sendqty.Location = new System.Drawing.Point(109, 91);
-            this.ob_sendqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_sendqty.Name = "ob_sendqty";
-            this.ob_sendqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_sendqty.TabIndex = 78;
-            this.ob_sendqty.Tag = "ob_batchqty";
-            // 
-            // SendCheck
-            // 
-            this.SendCheck.AllPower = null;
-            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
-            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
-            this.SendCheck.Enabled = false;
-            this.SendCheck.Image = null;
-            this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(229, 90);
-            this.SendCheck.Margin = new System.Windows.Forms.Padding(2);
-            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
-            this.SendCheck.Name = "SendCheck";
-            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
-            this.SendCheck.Power = null;
-            this.SendCheck.Size = new System.Drawing.Size(65, 26);
-            this.SendCheck.TabIndex = 72;
-            this.SendCheck.Text = "送检";
-            this.SendCheck.UseVisualStyleBackColor = false;
-            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
-            // 
-            // ob_batchqty
-            // 
-            this.ob_batchqty.AutoSize = true;
-            this.ob_batchqty.CutLength = null;
-            this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_batchqty.Location = new System.Drawing.Point(109, 51);
-            this.ob_batchqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_batchqty.Name = "ob_batchqty";
-            this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_batchqty.TabIndex = 75;
-            this.ob_batchqty.Tag = "ob_batchqty";
-            // 
-            // ob_nowcheckqty
-            // 
-            this.ob_nowcheckqty.AutoSize = true;
-            this.ob_nowcheckqty.CutLength = null;
-            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(248, 51);
-            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_nowcheckqty.TabIndex = 73;
-            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
-            // 
-            // mcd_remainqty
-            // 
-            this.mcd_remainqty.AutoSize = true;
-            this.mcd_remainqty.CutLength = null;
-            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(109, 12);
-            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
-            this.mcd_remainqty.TabIndex = 57;
-            this.mcd_remainqty.Tag = "mcd_remainqty";
-            // 
-            // mcd_inqty
-            // 
-            this.mcd_inqty.AutoSize = true;
-            this.mcd_inqty.CutLength = null;
-            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(248, 12);
-            this.mcd_inqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
-            this.mcd_inqty.TabIndex = 54;
-            this.mcd_inqty.Tag = "mcd_inqty";
-            // 
             // Save
             // 
             this.Save.AllPower = null;
@@ -763,15 +771,16 @@
             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(370, 182);
+            this.bc_remark.Location = new System.Drawing.Point(817, 512);
             this.bc_remark.Multiline = true;
             this.bc_remark.Name = "bc_remark";
             this.bc_remark.Power = null;
-            this.bc_remark.Size = new System.Drawing.Size(264, 62);
+            this.bc_remark.Size = new System.Drawing.Size(33, 12);
             this.bc_remark.Str = null;
             this.bc_remark.Str1 = null;
             this.bc_remark.Str2 = null;
             this.bc_remark.TabIndex = 41;
+            this.bc_remark.Visible = false;
             // 
             // bc_groupcode
             // 
@@ -800,12 +809,81 @@
             this.ms_sncode.Tag = "IfRead";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown);
             // 
+            // StopWatch
+            // 
+            this.StopWatch.Enabled = false;
+            this.StopWatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.StopWatch.Location = new System.Drawing.Point(521, 221);
+            this.StopWatch.Margin = new System.Windows.Forms.Padding(2);
+            this.StopWatch.Name = "StopWatch";
+            this.StopWatch.Size = new System.Drawing.Size(64, 28);
+            this.StopWatch.TabIndex = 207;
+            this.StopWatch.Text = "停止监控";
+            this.StopWatch.UseVisualStyleBackColor = true;
+            this.StopWatch.Click += new System.EventHandler(this.StopWatch_Click);
+            // 
+            // StartWatch
+            // 
+            this.StartWatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.StartWatch.Location = new System.Drawing.Point(409, 221);
+            this.StartWatch.Margin = new System.Windows.Forms.Padding(2);
+            this.StartWatch.Name = "StartWatch";
+            this.StartWatch.Size = new System.Drawing.Size(64, 28);
+            this.StartWatch.TabIndex = 206;
+            this.StartWatch.Text = "开始监控";
+            this.StartWatch.UseVisualStyleBackColor = true;
+            this.StartWatch.Click += new System.EventHandler(this.StartWatch_Click);
+            // 
+            // ChooseFolder
+            // 
+            this.ChooseFolder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ChooseFolder.Location = new System.Drawing.Point(549, 182);
+            this.ChooseFolder.Margin = new System.Windows.Forms.Padding(2);
+            this.ChooseFolder.Name = "ChooseFolder";
+            this.ChooseFolder.Size = new System.Drawing.Size(78, 24);
+            this.ChooseFolder.TabIndex = 205;
+            this.ChooseFolder.Text = "选择文件夹";
+            this.ChooseFolder.UseVisualStyleBackColor = true;
+            this.ChooseFolder.Click += new System.EventHandler(this.ChooseFolder_Click);
+            // 
+            // FolderPath
+            // 
+            this.FolderPath.Enabled = false;
+            this.FolderPath.Location = new System.Drawing.Point(381, 186);
+            this.FolderPath.Margin = new System.Windows.Forms.Padding(2);
+            this.FolderPath.Name = "FolderPath";
+            this.FolderPath.Size = new System.Drawing.Size(159, 21);
+            this.FolderPath.TabIndex = 204;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(447, 151);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(84, 20);
+            this.label1.TabIndex = 203;
+            this.label1.Text = "监控文件夹";
+            // 
+            // XmlWatcher
+            // 
+            this.XmlWatcher.EnableRaisingEvents = true;
+            this.XmlWatcher.Filter = "*.xml";
+            this.XmlWatcher.SynchronizingObject = this;
+            this.XmlWatcher.Created += new System.IO.FileSystemEventHandler(this.XmlWatcher_Created);
+            // 
             // Make_TestCollection
             // 
             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(862, 535);
+            this.Controls.Add(this.StopWatch);
+            this.Controls.Add(this.StartWatch);
+            this.Controls.Add(this.ChooseFolder);
+            this.Controls.Add(this.FolderPath);
+            this.Controls.Add(this.label1);
             this.Controls.Add(this.StepCount);
             this.Controls.Add(this.pr_sendchecktype);
             this.Controls.Add(this.ma_salecode);
@@ -858,6 +936,7 @@
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -928,5 +1007,11 @@
         private System.Windows.Forms.Label ma_salecode;
         private System.Windows.Forms.Label pr_sendchecktype;
         private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private System.Windows.Forms.Button StopWatch;
+        private System.Windows.Forms.Button StartWatch;
+        private System.Windows.Forms.Button ChooseFolder;
+        private System.Windows.Forms.TextBox FolderPath;
+        private System.Windows.Forms.Label label1;
+        private System.IO.FileSystemWatcher XmlWatcher;
     }
 }

+ 83 - 0
UAS_MES_JH/FunctionCode/Make/Make_TestCollection.cs

@@ -9,6 +9,8 @@ using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
 using System.Collections.Generic;
 using UAS_MES_NEW.CustomControl.PowerControlForm;
+using System.Xml;
+using System.IO;
 
 namespace UAS_MES_NEW.Make
 {
@@ -719,6 +721,7 @@ namespace UAS_MES_NEW.Make
 
         private void Make_TestCollection_FormClosing(object sender, FormClosingEventArgs e)
         {
+            XmlWatcher.EnableRaisingEvents = false;
             dh.Dispose();
         }
 
@@ -790,5 +793,85 @@ namespace UAS_MES_NEW.Make
                 }
             }
         }
+
+        private void XmlWatcher_Created(object sender, System.IO.FileSystemEventArgs e)
+        {
+            while (true)
+            {
+                try
+                {
+                    using (Stream stream = File.Open(e.FullPath, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
+                    {
+                        if (stream != null)
+                            break;
+                    }
+                }
+                catch (Exception ex)
+                {
+                    Console.WriteLine(ex.Message);
+                }
+            }
+            string test_date = "";
+            string test_result = "";
+            string test_sn = "";
+            string imageurl = "";
+            string oMSID = "";
+            string oErrMessage = "";
+            XmlReader myReader = XmlReader.Create(FolderPath.Text + @"\" + e.Name);
+            OperateResult.AppendText("读取文件" + e.Name + "\n");
+            myReader.Close();
+            //获取文件名的序列号,如SA123456.xml,如果开头为-表示无条码需要自动获取
+            string sn_code = e.Name.Split('.')[0];
+            ms_sncode.Text = sn_code;
+            ms_code_KeyDown(this, new KeyEventArgs(Keys.Enter));
+            File.Delete(e.FullPath);
+        }
+
+        private void ChooseFolder_Click(object sender, EventArgs e)
+        {
+            FolderBrowserDialog folder = new FolderBrowserDialog();
+            folder.Description = "选择监控文件夹";
+            DialogResult result = folder.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                FolderPath.Text = folder.SelectedPath;
+            }
+        }
+
+        private void StartWatch_Click(object sender, EventArgs e)
+        {
+            if (FolderPath.Text == "")
+            {
+                OperateResult.AppendText("请选择监控文件夹\n");
+                return;
+            }
+            else
+            {
+                if (!Directory.Exists(FolderPath.Text))
+                {
+                    OperateResult.AppendText("监控文件夹不存在\n");
+                    return;
+                }
+            }
+            XmlWatcher.Path = FolderPath.Text;
+            XmlWatcher.Filter = "*.xml";
+            XmlWatcher.EnableRaisingEvents = true;
+            //设置缓存数据
+            BaseUtil.SetCacheData("FolderPath", FolderPath.Text);
+            //设置按钮不可点击
+            StartWatch.Enabled = false;
+            ChooseFolder.Enabled = false;
+            StopWatch.Enabled = true;
+            OperateResult.AppendText("开始执行监控\n");
+        }
+
+        private void StopWatch_Click(object sender, EventArgs e)
+        {
+            XmlWatcher.EnableRaisingEvents = false;
+            StartWatch.Enabled = true;
+            ChooseFolder.Enabled = true;
+            StopWatch.Enabled = false;
+            OperateResult.AppendText("停止执行监控\n");
+        }
     }
 }

+ 9 - 6
UAS_MES_JH/FunctionCode/Make/Make_TestCollection.resx

@@ -117,12 +117,6 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="BadInfSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
-  <metadata name="ControlLockTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>172, 17</value>
-  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="SendCheck.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
@@ -162,6 +156,12 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
+  <metadata name="BadInfSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="ControlLockTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>172, 17</value>
+  </metadata>
   <data name="Save.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
@@ -369,4 +369,7 @@
         fgAAAABJRU5ErkJggg==
 </value>
   </data>
+  <metadata name="XmlWatcher.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>329, 17</value>
+  </metadata>
 </root>

+ 4 - 0
UAS_MES_JH/FunctionCode/OQC/OQC_BatchResultJudge.Designer.cs

@@ -135,6 +135,7 @@
             this.ReworkRequire.TabIndex = 168;
             this.ReworkRequire.Text = "发起返工需求";
             this.ReworkRequire.UseVisualStyleBackColor = true;
+            this.ReworkRequire.Visible = false;
             // 
             // ob_aqlcode_label
             // 
@@ -567,6 +568,7 @@
             this.BatchRejection.TabIndex = 166;
             this.BatchRejection.Text = "批判退";
             this.BatchRejection.UseVisualStyleBackColor = true;
+            this.BatchRejection.Visible = false;
             this.BatchRejection.Click += new System.EventHandler(this.BatchRejection_Click);
             // 
             // ForcePass
@@ -605,6 +607,7 @@
             this.ForceRejection.TabIndex = 164;
             this.ForceRejection.Text = "强制批退";
             this.ForceRejection.UseVisualStyleBackColor = true;
+            this.ForceRejection.Visible = false;
             this.ForceRejection.Click += new System.EventHandler(this.ForceRejection_Click);
             // 
             // WithdrawRejection
@@ -624,6 +627,7 @@
             this.WithdrawRejection.TabIndex = 163;
             this.WithdrawRejection.Text = "撤销判退";
             this.WithdrawRejection.UseVisualStyleBackColor = true;
+            this.WithdrawRejection.Visible = false;
             this.WithdrawRejection.Click += new System.EventHandler(this.WithdrawRejection_Click);
             // 
             // BatchPass

+ 143 - 56
UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.Designer.cs

@@ -108,6 +108,12 @@
             this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.AAQ = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.pa_colorcode = new System.Windows.Forms.Label();
+            this.pa_sku = new System.Windows.Forms.Label();
+            this.pa_productcolor = new System.Windows.Forms.Label();
             this.groupBoxWithBorder2.SuspendLayout();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
@@ -117,7 +123,7 @@
             // 
             this.pa_makecode.AutoSize = true;
             this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode.Location = new System.Drawing.Point(831, 427);
+            this.pa_makecode.Location = new System.Drawing.Point(978, 427);
             this.pa_makecode.Name = "pa_makecode";
             this.pa_makecode.Size = new System.Drawing.Size(0, 21);
             this.pa_makecode.TabIndex = 76;
@@ -149,7 +155,7 @@
             // 
             this.pa_id.AutoSize = true;
             this.pa_id.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_id.Location = new System.Drawing.Point(799, 427);
+            this.pa_id.Location = new System.Drawing.Point(946, 427);
             this.pa_id.Name = "pa_id";
             this.pa_id.Size = new System.Drawing.Size(0, 21);
             this.pa_id.TabIndex = 153;
@@ -159,7 +165,7 @@
             // 
             this.pr_packrule.AutoSize = true;
             this.pr_packrule.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_packrule.Location = new System.Drawing.Point(849, 418);
+            this.pr_packrule.Location = new System.Drawing.Point(996, 418);
             this.pr_packrule.Name = "pr_packrule";
             this.pr_packrule.Size = new System.Drawing.Size(0, 21);
             this.pr_packrule.TabIndex = 173;
@@ -169,7 +175,7 @@
             // 
             this.pa_status.AutoSize = true;
             this.pa_status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_status.Location = new System.Drawing.Point(780, 456);
+            this.pa_status.Location = new System.Drawing.Point(927, 456);
             this.pa_status.Name = "pa_status";
             this.pa_status.Size = new System.Drawing.Size(0, 21);
             this.pa_status.TabIndex = 174;
@@ -179,7 +185,7 @@
             // 
             this.pa_sccode.AutoSize = true;
             this.pa_sccode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_sccode.Location = new System.Drawing.Point(831, 456);
+            this.pa_sccode.Location = new System.Drawing.Point(978, 456);
             this.pa_sccode.Name = "pa_sccode";
             this.pa_sccode.Size = new System.Drawing.Size(0, 21);
             this.pa_sccode.TabIndex = 176;
@@ -189,7 +195,7 @@
             // 
             this.pa_checkno.AutoSize = true;
             this.pa_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_checkno.Location = new System.Drawing.Point(825, 456);
+            this.pa_checkno.Location = new System.Drawing.Point(972, 456);
             this.pa_checkno.Name = "pa_checkno";
             this.pa_checkno.Size = new System.Drawing.Size(0, 21);
             this.pa_checkno.TabIndex = 177;
@@ -199,7 +205,7 @@
             // 
             this.pa_downstatus.AutoSize = true;
             this.pa_downstatus.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_downstatus.Location = new System.Drawing.Point(837, 456);
+            this.pa_downstatus.Location = new System.Drawing.Point(984, 456);
             this.pa_downstatus.Name = "pa_downstatus";
             this.pa_downstatus.Size = new System.Drawing.Size(0, 21);
             this.pa_downstatus.TabIndex = 178;
@@ -209,7 +215,7 @@
             // 
             this.pa_standardqty.AutoSize = true;
             this.pa_standardqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_standardqty.Location = new System.Drawing.Point(849, 470);
+            this.pa_standardqty.Location = new System.Drawing.Point(996, 470);
             this.pa_standardqty.Name = "pa_standardqty";
             this.pa_standardqty.Size = new System.Drawing.Size(0, 21);
             this.pa_standardqty.TabIndex = 180;
@@ -229,7 +235,7 @@
             // 
             this.mcd_remainqty_label.AutoSize = true;
             this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty_label.Location = new System.Drawing.Point(435, 469);
+            this.mcd_remainqty_label.Location = new System.Drawing.Point(435, 464);
             this.mcd_remainqty_label.Name = "mcd_remainqty_label";
             this.mcd_remainqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_remainqty_label.TabIndex = 196;
@@ -239,7 +245,7 @@
             // 
             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(517, 469);
+            this.mcd_remainqty.Location = new System.Drawing.Point(520, 464);
             this.mcd_remainqty.Name = "mcd_remainqty";
             this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
             this.mcd_remainqty.TabIndex = 197;
@@ -248,7 +254,7 @@
             // 
             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(435, 437);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(435, 430);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
             this.mcd_inqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_inqty_label.TabIndex = 194;
@@ -258,7 +264,8 @@
             // 
             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(517, 437);
+            this.mcd_inqty.ForeColor = System.Drawing.Color.Lime;
+            this.mcd_inqty.Location = new System.Drawing.Point(517, 430);
             this.mcd_inqty.Name = "mcd_inqty";
             this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
             this.mcd_inqty.TabIndex = 195;
@@ -267,61 +274,67 @@
             // 
             this.pa_remark_label.AutoSize = true;
             this.pa_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_remark_label.Location = new System.Drawing.Point(437, 501);
+            this.pa_remark_label.Location = new System.Drawing.Point(822, 485);
             this.pa_remark_label.Name = "pa_remark_label";
             this.pa_remark_label.Size = new System.Drawing.Size(42, 21);
             this.pa_remark_label.TabIndex = 198;
             this.pa_remark_label.Text = "备注";
+            this.pa_remark_label.Visible = false;
             // 
             // CollecRemark
             // 
             this.CollecRemark.AutoSize = true;
-            this.CollecRemark.Location = new System.Drawing.Point(524, 557);
+            this.CollecRemark.Location = new System.Drawing.Point(826, 553);
             this.CollecRemark.Name = "CollecRemark";
             this.CollecRemark.Size = new System.Drawing.Size(96, 16);
             this.CollecRemark.TabIndex = 201;
             this.CollecRemark.Text = "采集备注信息";
             this.CollecRemark.UseVisualStyleBackColor = true;
+            this.CollecRemark.Visible = false;
             // 
             // Port_label
             // 
             this.Port_label.AutoSize = true;
             this.Port_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Port_label.Location = new System.Drawing.Point(692, 464);
+            this.Port_label.Location = new System.Drawing.Point(839, 464);
             this.Port_label.Name = "Port_label";
             this.Port_label.Size = new System.Drawing.Size(42, 21);
             this.Port_label.TabIndex = 204;
             this.Port_label.Text = "端口";
+            this.Port_label.Visible = false;
             // 
             // IP_label
             // 
             this.IP_label.AutoSize = true;
             this.IP_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.IP_label.Location = new System.Drawing.Point(692, 431);
+            this.IP_label.Location = new System.Drawing.Point(839, 431);
             this.IP_label.Name = "IP_label";
             this.IP_label.Size = new System.Drawing.Size(25, 21);
             this.IP_label.TabIndex = 202;
             this.IP_label.Text = "IP";
+            this.IP_label.Visible = false;
             // 
             // AllowRepeat
             // 
             this.AllowRepeat.AutoSize = true;
-            this.AllowRepeat.Location = new System.Drawing.Point(629, 556);
+            this.AllowRepeat.Location = new System.Drawing.Point(1014, 540);
             this.AllowRepeat.Name = "AllowRepeat";
             this.AllowRepeat.Size = new System.Drawing.Size(96, 16);
             this.AllowRepeat.TabIndex = 208;
             this.AllowRepeat.Text = "允许重复备注";
             this.AllowRepeat.UseVisualStyleBackColor = true;
+            this.AllowRepeat.Visible = false;
             // 
             // label2
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(437, 528);
+            this.label2.Location = new System.Drawing.Point(822, 512);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(37, 20);
             this.label2.TabIndex = 210;
             this.label2.Text = "前缀";
+            this.label2.Visible = false;
             // 
             // Remark_PreFix
             // 
@@ -329,7 +342,7 @@
             this.Remark_PreFix.BackColor = System.Drawing.Color.White;
             this.Remark_PreFix.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.Remark_PreFix.ID = null;
-            this.Remark_PreFix.Location = new System.Drawing.Point(479, 526);
+            this.Remark_PreFix.Location = new System.Drawing.Point(864, 510);
             this.Remark_PreFix.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.Remark_PreFix.Name = "Remark_PreFix";
             this.Remark_PreFix.Power = null;
@@ -338,6 +351,7 @@
             this.Remark_PreFix.Str1 = null;
             this.Remark_PreFix.Str2 = null;
             this.Remark_PreFix.TabIndex = 209;
+            this.Remark_PreFix.Visible = false;
             this.Remark_PreFix.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Remark_PreFix_KeyDown);
             // 
             // CloseServer
@@ -347,7 +361,7 @@
             this.CloseServer.DownImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.DownImage")));
             this.CloseServer.Image = null;
             this.CloseServer.IsShowBorder = true;
-            this.CloseServer.Location = new System.Drawing.Point(781, 502);
+            this.CloseServer.Location = new System.Drawing.Point(928, 502);
             this.CloseServer.MoveImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.MoveImage")));
             this.CloseServer.Name = "CloseServer";
             this.CloseServer.NormalImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.NormalImage")));
@@ -356,6 +370,7 @@
             this.CloseServer.TabIndex = 207;
             this.CloseServer.Text = "关闭服务";
             this.CloseServer.UseVisualStyleBackColor = true;
+            this.CloseServer.Visible = false;
             this.CloseServer.Click += new System.EventHandler(this.CloseServer_Click);
             // 
             // BuildServer
@@ -365,7 +380,7 @@
             this.BuildServer.DownImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.DownImage")));
             this.BuildServer.Image = null;
             this.BuildServer.IsShowBorder = true;
-            this.BuildServer.Location = new System.Drawing.Point(700, 502);
+            this.BuildServer.Location = new System.Drawing.Point(847, 502);
             this.BuildServer.MoveImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.MoveImage")));
             this.BuildServer.Name = "BuildServer";
             this.BuildServer.NormalImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.NormalImage")));
@@ -374,6 +389,7 @@
             this.BuildServer.TabIndex = 206;
             this.BuildServer.Text = "开启服务";
             this.BuildServer.UseVisualStyleBackColor = true;
+            this.BuildServer.Visible = false;
             this.BuildServer.Click += new System.EventHandler(this.BuildServer_Click);
             // 
             // Port
@@ -382,7 +398,7 @@
             this.Port.BackColor = System.Drawing.Color.White;
             this.Port.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Port.ID = null;
-            this.Port.Location = new System.Drawing.Point(752, 466);
+            this.Port.Location = new System.Drawing.Point(899, 466);
             this.Port.Name = "Port";
             this.Port.Power = null;
             this.Port.Size = new System.Drawing.Size(114, 23);
@@ -390,6 +406,7 @@
             this.Port.Str1 = null;
             this.Port.Str2 = null;
             this.Port.TabIndex = 205;
+            this.Port.Visible = false;
             // 
             // IP
             // 
@@ -397,7 +414,7 @@
             this.IP.BackColor = System.Drawing.Color.White;
             this.IP.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.IP.ID = null;
-            this.IP.Location = new System.Drawing.Point(752, 431);
+            this.IP.Location = new System.Drawing.Point(899, 431);
             this.IP.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.IP.Name = "IP";
             this.IP.Power = null;
@@ -406,13 +423,14 @@
             this.IP.Str1 = null;
             this.IP.Str2 = null;
             this.IP.TabIndex = 203;
+            this.IP.Visible = false;
             // 
             // pa_remark
             // 
             this.pa_remark.AllPower = null;
             this.pa_remark.BackColor = System.Drawing.Color.White;
             this.pa_remark.ID = null;
-            this.pa_remark.Location = new System.Drawing.Point(524, 502);
+            this.pa_remark.Location = new System.Drawing.Point(909, 486);
             this.pa_remark.Margin = new System.Windows.Forms.Padding(2);
             this.pa_remark.Multiline = true;
             this.pa_remark.Name = "pa_remark";
@@ -422,6 +440,7 @@
             this.pa_remark.Str1 = null;
             this.pa_remark.Str2 = null;
             this.pa_remark.TabIndex = 200;
+            this.pa_remark.Visible = false;
             this.pa_remark.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pa_remark_KeyDown);
             // 
             // groupBoxWithBorder2
@@ -476,7 +495,7 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(264, 15);
+            this.label1.Location = new System.Drawing.Point(263, 14);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 181;
@@ -498,7 +517,7 @@
             this.checkweightlabel.AutoSize = true;
             this.checkweightlabel.CutLength = null;
             this.checkweightlabel.ForeColor = System.Drawing.Color.Red;
-            this.checkweightlabel.Location = new System.Drawing.Point(27, 23);
+            this.checkweightlabel.Location = new System.Drawing.Point(26, 22);
             this.checkweightlabel.MaximumSize = new System.Drawing.Size(200, 0);
             this.checkweightlabel.Name = "checkweightlabel";
             this.checkweightlabel.Size = new System.Drawing.Size(0, 21);
@@ -508,7 +527,7 @@
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(345, 87);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(344, 86);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
             this.ob_nowcheckqty.TabIndex = 178;
@@ -517,7 +536,7 @@
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.Location = new System.Drawing.Point(345, 49);
+            this.ob_batchqty.Location = new System.Drawing.Point(344, 48);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
             this.ob_batchqty.TabIndex = 177;
@@ -526,7 +545,7 @@
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(264, 87);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(263, 86);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
             this.ob_nowcheckqty_label.Size = new System.Drawing.Size(74, 21);
             this.ob_nowcheckqty_label.TabIndex = 176;
@@ -536,7 +555,7 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.Location = new System.Drawing.Point(264, 51);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(263, 50);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(74, 21);
             this.ob_batchqty_label.TabIndex = 175;
@@ -546,7 +565,7 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno.Location = new System.Drawing.Point(345, 15);
+            this.ob_checkno.Location = new System.Drawing.Point(344, 14);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 21);
             this.ob_checkno.TabIndex = 175;
@@ -608,7 +627,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(7, 88);
+            this.label3.Location = new System.Drawing.Point(6, 87);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 160;
@@ -656,7 +675,7 @@
             // 
             this.PrintList_label.AutoSize = true;
             this.PrintList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintList_label.Location = new System.Drawing.Point(7, 48);
+            this.PrintList_label.Location = new System.Drawing.Point(6, 47);
             this.PrintList_label.Name = "PrintList_label";
             this.PrintList_label.Size = new System.Drawing.Size(90, 21);
             this.PrintList_label.TabIndex = 116;
@@ -666,7 +685,7 @@
             // 
             this.PrintNum_label.AutoSize = true;
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintNum_label.Location = new System.Drawing.Point(207, 129);
+            this.PrintNum_label.Location = new System.Drawing.Point(206, 128);
             this.PrintNum_label.Name = "PrintNum_label";
             this.PrintNum_label.Size = new System.Drawing.Size(42, 21);
             this.PrintNum_label.TabIndex = 124;
@@ -710,22 +729,21 @@
             // locksalecode
             // 
             this.locksalecode.AutoSize = true;
-            this.locksalecode.Checked = true;
-            this.locksalecode.CheckState = System.Windows.Forms.CheckState.Checked;
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.ForeColor = System.Drawing.Color.Red;
-            this.locksalecode.Location = new System.Drawing.Point(291, 16);
+            this.locksalecode.Location = new System.Drawing.Point(290, 15);
             this.locksalecode.Name = "locksalecode";
             this.locksalecode.Size = new System.Drawing.Size(96, 16);
             this.locksalecode.TabIndex = 196;
             this.locksalecode.Text = "当前订单锁定";
             this.locksalecode.UseVisualStyleBackColor = true;
+            this.locksalecode.Visible = false;
             // 
             // PreFix_label
             // 
             this.PreFix_label.AutoSize = true;
             this.PreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PreFix_label.Location = new System.Drawing.Point(178, 14);
+            this.PreFix_label.Location = new System.Drawing.Point(177, 13);
             this.PreFix_label.Name = "PreFix_label";
             this.PreFix_label.Size = new System.Drawing.Size(37, 20);
             this.PreFix_label.TabIndex = 195;
@@ -752,7 +770,7 @@
             // 
             this.pa_salecode_label.AutoSize = true;
             this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode_label.Location = new System.Drawing.Point(209, 136);
+            this.pa_salecode_label.Location = new System.Drawing.Point(208, 135);
             this.pa_salecode_label.Name = "pa_salecode_label";
             this.pa_salecode_label.Size = new System.Drawing.Size(74, 21);
             this.pa_salecode_label.TabIndex = 185;
@@ -762,7 +780,7 @@
             // 
             this.ma_code_label.AutoSize = true;
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(5, 136);
+            this.ma_code_label.Location = new System.Drawing.Point(4, 135);
             this.ma_code_label.Name = "ma_code_label";
             this.ma_code_label.Size = new System.Drawing.Size(58, 21);
             this.ma_code_label.TabIndex = 186;
@@ -772,7 +790,7 @@
             // 
             this.ms_salecode.AutoSize = true;
             this.ms_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_salecode.Location = new System.Drawing.Point(290, 136);
+            this.ms_salecode.Location = new System.Drawing.Point(289, 135);
             this.ms_salecode.Name = "ms_salecode";
             this.ms_salecode.Size = new System.Drawing.Size(0, 21);
             this.ms_salecode.TabIndex = 188;
@@ -781,7 +799,7 @@
             // 
             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(91, 136);
+            this.ms_makecode.Location = new System.Drawing.Point(90, 135);
             this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_makecode.Name = "ms_makecode";
             this.ms_makecode.Size = new System.Drawing.Size(0, 21);
@@ -791,7 +809,7 @@
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(80, 14);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(79, 13);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
             this.OutBoxLength_label.Size = new System.Drawing.Size(37, 20);
             this.OutBoxLength_label.TabIndex = 184;
@@ -852,7 +870,7 @@
             // AutoGenBoxCode
             // 
             this.AutoGenBoxCode.AutoSize = true;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(247, 44);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(246, 43);
             this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(2);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
             this.AutoGenBoxCode.Size = new System.Drawing.Size(93, 25);
@@ -865,7 +883,7 @@
             // 
             this.pa_currentqty_label.AutoSize = true;
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty_label.Location = new System.Drawing.Point(211, 76);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(210, 75);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
             this.pa_currentqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_currentqty_label.TabIndex = 95;
@@ -875,7 +893,7 @@
             // 
             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(209, 104);
+            this.pr_detail_label.Location = new System.Drawing.Point(208, 103);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 80;
@@ -903,7 +921,7 @@
             // 
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty.Location = new System.Drawing.Point(289, 74);
+            this.pa_currentqty.Location = new System.Drawing.Point(288, 73);
             this.pa_currentqty.Name = "pa_currentqty";
             this.pa_currentqty.Size = new System.Drawing.Size(0, 21);
             this.pa_currentqty.TabIndex = 169;
@@ -912,7 +930,7 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(5, 104);
+            this.pr_code_label.Location = new System.Drawing.Point(4, 103);
             this.pr_code_label.Name = "pr_code_label";
             this.pr_code_label.Size = new System.Drawing.Size(74, 21);
             this.pr_code_label.TabIndex = 81;
@@ -922,7 +940,7 @@
             // 
             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(290, 104);
+            this.pr_detail.Location = new System.Drawing.Point(289, 103);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 168;
@@ -931,7 +949,7 @@
             // 
             this.pr_outboxinnerqty_label.AutoSize = true;
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(5, 73);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(4, 72);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
             this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(74, 21);
             this.pr_outboxinnerqty_label.TabIndex = 97;
@@ -941,7 +959,7 @@
             // 
             this.pr_code.AutoSize = true;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(91, 104);
+            this.pr_code.Location = new System.Drawing.Point(90, 103);
             this.pr_code.MaximumSize = new System.Drawing.Size(150, 0);
             this.pr_code.Name = "pr_code";
             this.pr_code.Size = new System.Drawing.Size(0, 21);
@@ -952,7 +970,7 @@
             // 
             this.pa_code_label.AutoSize = true;
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_code_label.Location = new System.Drawing.Point(5, 43);
+            this.pa_code_label.Location = new System.Drawing.Point(4, 42);
             this.pa_code_label.Name = "pa_code_label";
             this.pa_code_label.Size = new System.Drawing.Size(42, 21);
             this.pa_code_label.TabIndex = 113;
@@ -1015,7 +1033,7 @@
             this.pa_indate,
             this.pd_id});
             this.PackageDetail.EnableContentClick = true;
-            this.PackageDetail.Location = new System.Drawing.Point(4, 179);
+            this.PackageDetail.Location = new System.Drawing.Point(8, 181);
             this.PackageDetail.Name = "PackageDetail";
             this.PackageDetail.ReadOnly = true;
             this.PackageDetail.RowTemplate.Height = 23;
@@ -1077,12 +1095,75 @@
             this.pd_id.ReadOnly = true;
             this.pd_id.Visible = false;
             // 
+            // AAQ
+            // 
+            this.AAQ.AutoSize = true;
+            this.AAQ.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.AAQ.Location = new System.Drawing.Point(437, 487);
+            this.AAQ.Name = "AAQ";
+            this.AAQ.Size = new System.Drawing.Size(58, 21);
+            this.AAQ.TabIndex = 211;
+            this.AAQ.Text = "颜色号";
+            // 
+            // label4
+            // 
+            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(437, 519);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(41, 21);
+            this.label4.TabIndex = 212;
+            this.label4.Text = "SKU";
+            // 
+            // label5
+            // 
+            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(437, 547);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(147, 21);
+            this.label5.TabIndex = 213;
+            this.label5.Text = "PRODUCT COLOR";
+            // 
+            // pa_colorcode
+            // 
+            this.pa_colorcode.AutoSize = true;
+            this.pa_colorcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_colorcode.Location = new System.Drawing.Point(609, 491);
+            this.pa_colorcode.Name = "pa_colorcode";
+            this.pa_colorcode.Size = new System.Drawing.Size(0, 21);
+            this.pa_colorcode.TabIndex = 214;
+            // 
+            // pa_sku
+            // 
+            this.pa_sku.AutoSize = true;
+            this.pa_sku.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_sku.Location = new System.Drawing.Point(609, 519);
+            this.pa_sku.Name = "pa_sku";
+            this.pa_sku.Size = new System.Drawing.Size(0, 21);
+            this.pa_sku.TabIndex = 215;
+            // 
+            // pa_productcolor
+            // 
+            this.pa_productcolor.AutoSize = true;
+            this.pa_productcolor.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_productcolor.Location = new System.Drawing.Point(609, 552);
+            this.pa_productcolor.Name = "pa_productcolor";
+            this.pa_productcolor.Size = new System.Drawing.Size(0, 21);
+            this.pa_productcolor.TabIndex = 216;
+            // 
             // Packing_PackageCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
             this.ClientSize = new System.Drawing.Size(879, 584);
+            this.Controls.Add(this.pa_productcolor);
+            this.Controls.Add(this.pa_sku);
+            this.Controls.Add(this.pa_colorcode);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.AAQ);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.Remark_PreFix);
             this.Controls.Add(this.AllowRepeat);
@@ -1124,12 +1205,12 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PackCollection_FormClosing);
             this.Load += new System.EventHandler(this.PackCollection_Load);
             this.SizeChanged += new System.EventHandler(this.PackCollection_SizeChanged);
-            this.groupBoxWithBorder2.ResumeLayout(true);
+            this.groupBoxWithBorder2.ResumeLayout(false);
             this.groupBoxWithBorder2.PerformLayout();
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -1214,5 +1295,11 @@
         private System.Windows.Forms.CheckBox AllowRepeat;
         private System.Windows.Forms.Label label2;
         private CustomControl.TextBoxWithIcon.SnCollectionBox Remark_PreFix;
+        private System.Windows.Forms.Label AAQ;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label pa_colorcode;
+        private System.Windows.Forms.Label pa_sku;
+        private System.Windows.Forms.Label pa_productcolor;
     }
 }

+ 24 - 16
UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -110,7 +110,7 @@ namespace UAS_MES_NEW.Packing
         {
             //加载表单数据
             sql.Clear();
-            sql.Append("select pr_code,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,pa_remark,pa_outboxcode,pa_prodcode,pa_salecode,pa_makecode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,pa_status,pr_packrule,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,pr_detail,pa_packageqty,nvl(pa_standardqty,0) pa_standardqty,nvl(pr_outboxinnerqty,0)pr_outboxinnerqty,pa_currentqty from package left join product on pa_prodcode=");
+            sql.Append("select pr_code,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,pa_remark,pa_outboxcode,pa_prodcode,pa_salecode,pa_makecode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,pa_status,pr_packrule,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,pr_detail,pa_packageqty,nvl(pa_standardqty,0) pa_standardqty,nvl(pr_outboxinnerqty,0)pr_outboxinnerqty,pa_currentqty,pa_colorcode,pa_sku,pa_productcolor from package left join product on pa_prodcode=");
             sql.Append("pr_code where pa_outboxcode='" + pa_outboxcode.Text + "'");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count > 0)
@@ -787,7 +787,7 @@ namespace UAS_MES_NEW.Packing
             string Delete = MessageBox.Show(this.ParentForm, "是否确认拆箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
             if (Delete == "Yes")
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_checkno,ob_status,pa_mothercode,nvl(pa_downstatus,0)pa_downstatus from package left join oqcbatch on pa_checkno=ob_checkno where pa_outboxcode='" + pa_outboxcode.Text + "'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_status,pa_checkno,ob_status,pa_mothercode,nvl(pa_downstatus,0)pa_downstatus from package left join oqcbatch on pa_checkno=ob_checkno where pa_outboxcode='" + pa_outboxcode.Text + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
                     if (dt.Rows[0]["pa_outno"].ToString() != "")
@@ -800,15 +800,20 @@ namespace UAS_MES_NEW.Packing
                         OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.Red);
                         return;
                     }
+                    if (dt.Rows[0]["pa_status"].ToString() != "1")
+                    {
+                        OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "未封箱,不允许操作\n", Color.Red);
+                        return;
+                    }
                     if (dt.Rows[0]["pa_mothercode"].ToString() == "")
                     {
                         if (dt.Rows[0]["pa_downstatus"].ToString() == "0")
                         {
                             string ob_status = dt.Rows[0]["ob_status"].ToString();
                             string pa_checkno = dt.Rows[0]["pa_checkno"].ToString();
-                            //不存在抽检批次或者还未检验可以拆解
-                            if (ob_status == "" || ob_status == "ENTERING" || ob_status == "UNCHECK")
-                            {
+                            ////不存在抽检批次或者还未检验可以拆解
+                            //if (ob_status == "" || ob_status == "ENTERING" || ob_status == "UNCHECK")
+                            //{
                                 sql.Clear();
                                 sql.Append("select pd_makecode,count(1) num from packagedetail left join makeserial  ");
                                 sql.Append("on ms_sncode=pd_barcode and ms_makecode=pd_makecode where pd_outboxcode='" + pa_outboxcode.Text + "' group by pd_makecode");
@@ -831,19 +836,22 @@ namespace UAS_MES_NEW.Packing
                                     SQLS1.Add("delete from oqcbatchdetail where obd_outboxcode='" + pa_outboxcode.Text + "'");
                                 }
                                 //更新序列号状态
-                                SQLS1.Add("update makeserial set ms_status=1,ms_outboxcode='',ms_nextstepcode= (case when ms_nextstepcode='" + User.CurrentStepCode + "' then ms_nextstepcode else ms_stepcode end ),ms_paststep=replace(ms_paststep,'," + User.CurrentStepCode + "','') where ms_outboxcode='" + pa_outboxcode.Text + "'");
+                                SQLS1.Add("update makeserial set ms_status=1,ms_outboxcode='',ms_nextstepcode= (case when ms_nextstepcode='" + User.CurrentStepCode + "' then ms_nextstepcode else '"+ User.CurrentStepCode + "' end ),ms_paststep=replace(ms_paststep,'," + User.CurrentStepCode + "','') where ms_outboxcode='" + pa_outboxcode.Text + "'");
                                 //抽检批次不为空的时候进行移除
                                 dh.ExecuteSQLTran(SQLS1.ToArray());
                                 string prcode = dh.getFieldDataByCondition("packagedetail", "pd_prodcode", "pd_outboxcode = '" + pa_outboxcode.Text + "'").ToString();
                                 string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + prcode + "'").ToString();
-                                if (standqty != "")
-                                {
-                                    //置空原箱
-                                    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
-                                }
-                                else
-                                    //置空原箱
-                                    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                                //if (standqty != "")
+                                //{
+                                //    //置空原箱
+                                //    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                                //}
+                                //else
+                                //    //置空原箱
+                                //    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                                dh.ExecuteSql("insert into PACKAGEBACKUP select * from package where pa_outboxcode='" + pa_outboxcode.Text + "'", "insert");
+                                dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "insert");
+                                dh.ExecuteSql("delete from package where pa_outboxcode = '" + pa_outboxcode.Text + "'", "delete");
                                 pa_status.Text = "0";
                                 //删除箱的明细
                                 dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
@@ -851,8 +859,8 @@ namespace UAS_MES_NEW.Packing
                                 OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "成功拆解!\n", Color.Green);
                                 LoadGridData();
                                 LoadCheckQTY();
-                            }
-                            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已送检,不允许解除\n", Color.Red);
+                            //}
+                            //else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已送检,不允许解除\n", Color.Red);
                         }
                         else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已下地,不允许解除\n", Color.Red);
                     }

+ 115 - 4
UAS_MES_JH/FunctionCode/Packing/Packing_PalletCollection.Designer.cs

@@ -76,6 +76,15 @@
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.PalletPreFix_label = new System.Windows.Forms.Label();
             this.PalletPreFix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.pa_productcolor = new System.Windows.Forms.Label();
+            this.pa_sku = new System.Windows.Forms.Label();
+            this.pa_colorcode = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.AAQ = new System.Windows.Forms.Label();
+            this.pd_colorcode = new System.Windows.Forms.Label();
+            this.pd_sku = new System.Windows.Forms.Label();
+            this.pd_productcolor = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -273,7 +282,7 @@
             this.pa_standardqty.BackColor = System.Drawing.Color.White;
             this.pa_standardqty.ID = null;
             this.pa_standardqty.Location = new System.Drawing.Point(85, 84);
-            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(2);
             this.pa_standardqty.Name = "pa_standardqty";
             this.pa_standardqty.Power = null;
             this.pa_standardqty.Size = new System.Drawing.Size(114, 21);
@@ -319,7 +328,7 @@
             // PrinterList
             // 
             this.PrinterList.Location = new System.Drawing.Point(592, 83);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(4);
             this.PrinterList.Name = "PrinterList";
             this.PrinterList.Size = new System.Drawing.Size(132, 20);
             this.PrinterList.TabIndex = 171;
@@ -588,8 +597,8 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(482, 11);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Location = new System.Drawing.Point(888, 174);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2);
             this.StepCount.Name = "StepCount";
             this.StepCount.Size = new System.Drawing.Size(88, 22);
             this.StepCount.Source = null;
@@ -623,11 +632,104 @@
             this.PalletPreFix.TabIndex = 195;
             this.PalletPreFix.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PalletPreFix_KeyDown);
             // 
+            // pa_productcolor
+            // 
+            this.pa_productcolor.AutoSize = true;
+            this.pa_productcolor.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_productcolor.Location = new System.Drawing.Point(822, 11);
+            this.pa_productcolor.Name = "pa_productcolor";
+            this.pa_productcolor.Size = new System.Drawing.Size(0, 21);
+            this.pa_productcolor.TabIndex = 222;
+            // 
+            // pa_sku
+            // 
+            this.pa_sku.AutoSize = true;
+            this.pa_sku.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_sku.Location = new System.Drawing.Point(565, 11);
+            this.pa_sku.Name = "pa_sku";
+            this.pa_sku.Size = new System.Drawing.Size(0, 21);
+            this.pa_sku.TabIndex = 221;
+            // 
+            // pa_colorcode
+            // 
+            this.pa_colorcode.AutoSize = true;
+            this.pa_colorcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_colorcode.Location = new System.Drawing.Point(395, 10);
+            this.pa_colorcode.Name = "pa_colorcode";
+            this.pa_colorcode.Size = new System.Drawing.Size(0, 21);
+            this.pa_colorcode.TabIndex = 220;
+            // 
+            // label5
+            // 
+            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(651, 10);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(147, 21);
+            this.label5.TabIndex = 219;
+            this.label5.Text = "PRODUCT COLOR";
+            // 
+            // label4
+            // 
+            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(482, 9);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(41, 21);
+            this.label4.TabIndex = 218;
+            this.label4.Text = "SKU";
+            // 
+            // AAQ
+            // 
+            this.AAQ.AutoSize = true;
+            this.AAQ.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.AAQ.Location = new System.Drawing.Point(290, 9);
+            this.AAQ.Name = "AAQ";
+            this.AAQ.Size = new System.Drawing.Size(58, 21);
+            this.AAQ.TabIndex = 217;
+            this.AAQ.Text = "颜色号";
+            // 
+            // pd_colorcode
+            // 
+            this.pd_colorcode.AutoSize = true;
+            this.pd_colorcode.Location = new System.Drawing.Point(498, 270);
+            this.pd_colorcode.Name = "pd_colorcode";
+            this.pd_colorcode.Size = new System.Drawing.Size(0, 12);
+            this.pd_colorcode.TabIndex = 223;
+            this.pd_colorcode.Visible = false;
+            // 
+            // pd_sku
+            // 
+            this.pd_sku.AutoSize = true;
+            this.pd_sku.Location = new System.Drawing.Point(506, 278);
+            this.pd_sku.Name = "pd_sku";
+            this.pd_sku.Size = new System.Drawing.Size(0, 12);
+            this.pd_sku.TabIndex = 224;
+            this.pd_sku.Visible = false;
+            // 
+            // pd_productcolor
+            // 
+            this.pd_productcolor.AutoSize = true;
+            this.pd_productcolor.Location = new System.Drawing.Point(514, 286);
+            this.pd_productcolor.Name = "pd_productcolor";
+            this.pd_productcolor.Size = new System.Drawing.Size(0, 12);
+            this.pd_productcolor.TabIndex = 225;
+            this.pd_productcolor.Visible = false;
+            // 
             // Packing_PalletCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(997, 552);
+            this.Controls.Add(this.pd_productcolor);
+            this.Controls.Add(this.pd_sku);
+            this.Controls.Add(this.pd_colorcode);
+            this.Controls.Add(this.pa_productcolor);
+            this.Controls.Add(this.pa_sku);
+            this.Controls.Add(this.pa_colorcode);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.AAQ);
             this.Controls.Add(this.PalletPreFix_label);
             this.Controls.Add(this.PalletPreFix);
             this.Controls.Add(this.StepCount);
@@ -729,5 +831,14 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
+        private System.Windows.Forms.Label pa_productcolor;
+        private System.Windows.Forms.Label pa_sku;
+        private System.Windows.Forms.Label pa_colorcode;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label AAQ;
+        private System.Windows.Forms.Label pd_colorcode;
+        private System.Windows.Forms.Label pd_sku;
+        private System.Windows.Forms.Label pd_productcolor;
     }
 }

+ 22 - 4
UAS_MES_JH/FunctionCode/Packing/Packing_PalletCollection.cs

@@ -88,7 +88,7 @@ namespace UAS_MES_NEW.Packing
             {
                 LoadGridData();
                 sql.Clear();
-                sql.Append("select pa_makecode,pa_id,pa_status,nvl(pa_standardqty,PR_PALLETQTY)pa_standardqty,pa_prodcode,pa_packageqty,pa_totalqty,pa_salecode,pa_currentqty,pr_code pa_prodcode,pa_outboxcode,pa_totalqty,pa_custcode ");
+                sql.Append("select pa_makecode,pa_id,pa_status,nvl(pa_standardqty,PR_PALLETQTY)pa_standardqty,pa_prodcode,pa_packageqty,pa_totalqty,pa_salecode,pa_currentqty,pr_code pa_prodcode,pa_outboxcode,pa_totalqty,pa_custcode,pa_colorcode,pa_sku,pa_productcolor ");
                 sql.Append("from package left join packagedetail on pa_id =pd_paid left join product on pr_code=pd_prodcode where pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type =3");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
@@ -119,7 +119,7 @@ namespace UAS_MES_NEW.Packing
                         return;
                     }
                     sql.Clear();
-                    sql.Append("select nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_makecode pd_makecode,nvl(pa_downstatus,0)pa_downstatus,pa_salecode pd_salecode,pr_packrule,pa_id,pa_prodcode pd_prodcode,pa_status,pa_mothercode,pa_nextstep  ");
+                    sql.Append("select nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_makecode pd_makecode,nvl(pa_downstatus,0)pa_downstatus,pa_salecode pd_salecode,pr_packrule,pa_id,pa_prodcode pd_prodcode,pa_status,pa_mothercode,pa_nextstep,pa_colorcode pd_colorcode,pa_sku pd_sku,pa_productcolor pd_productcolor  ");
                     sql.Append("from packagedetail left join package on pd_paid=pa_id left join product on pd_prodcode=pr_code where pd_outboxcode='" + outboxcode.Text + "'");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     if (dt.Rows.Count > 0)
@@ -207,6 +207,7 @@ namespace UAS_MES_NEW.Packing
                             else
                             {
                                 pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pd_prodcode.Text, User.UserCode);
+                                pa_standardqty.Text = dh.getFieldDataByCondition("product", "pr_palletqty", "pr_code = '" + pd_prodcode.Text + "'").ToString();
                             }
                         }
                         else if (pa_outboxcode.Text != "" && pa_status.Text == "1" && AutoOutBoxCode.Checked)
@@ -227,8 +228,8 @@ namespace UAS_MES_NEW.Packing
                         {
                             pa_id = dh.GetSEQ("package_seq");
                             sql.Clear();
-                            sql.Append("insert into package (pa_id,pa_outboxcode,PA_STANDARDQTY,pa_makecode,pa_indate,pa_packageqty,pa_type,pa_prodcode,pa_level,PA_STATUS,pa_sccode,pa_currentstep,pa_salecode)values");
-                            sql.Append("(" + pa_id + ",'" + pa_outboxcode.Text + "','" + pa_standardqty.Text + "','" + pd_makecode.Text + "',sysdate,'0',3,'" + pd_prodcode.Text + "',0,0,'" + User.UserSourceCode + "','" + User.CurrentStepCode + "','" + pd_salecode.Text + "')");
+                            sql.Append("insert into package (pa_id,pa_outboxcode,PA_STANDARDQTY,pa_makecode,pa_indate,pa_packageqty,pa_type,pa_prodcode,pa_level,PA_STATUS,pa_sccode,pa_currentstep,pa_salecode,pa_colorcode,pa_sku,pa_productcolor)values");
+                            sql.Append("(" + pa_id + ",'" + pa_outboxcode.Text + "','" + pa_standardqty.Text + "','" + pd_makecode.Text + "',sysdate,'0',3,'" + pd_prodcode.Text + "',0,0,'" + User.UserSourceCode + "','" + User.CurrentStepCode + "','" + pd_salecode.Text + "','" + pd_colorcode.Text + "','" + pd_sku.Text + "','" + pd_productcolor.Text + "')");
                             dh.ExecuteSql(sql.GetString(), "insert");
                         }
                         else
@@ -243,6 +244,22 @@ namespace UAS_MES_NEW.Packing
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, outboxcode);
                                 return;
                             }
+                            if (pa_colorcode.Text != pd_colorcode.Text)
+                            {
+                                OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "对应颜色号"+ pa_colorcode.Text + "与箱"+ outboxcode.Text + "对应颜色号"+ pd_colorcode.Text + "不相同\n", Color.Red, outboxcode);
+                                return;
+                            }
+                            if (pa_sku.Text != pd_sku.Text)
+                            {
+                                OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "对应SKU" + pa_sku.Text + "与箱" + outboxcode.Text + "对应SKU" + pd_sku.Text + "不相同\n", Color.Red, outboxcode);
+                                return;
+                            }
+                            if (pa_productcolor.Text != pd_productcolor.Text)
+                            {
+                                OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "对应PRODUCT COLOR" + pa_productcolor.Text + "与箱" + outboxcode.Text + "对应PRODUCT COLOR" + pd_productcolor.Text + "不相同\n", Color.Red, outboxcode);
+                                return;
+                            }
+
                         }
                         dt = (DataTable)dh.ExecuteSql("select pa_totalqty,pa_mothercode,nvl(pa_status,0) pa_status from package where pa_outboxcode='" + outboxcode.Text + "'", "select");
                         if (dt.Rows.Count > 0)
@@ -472,6 +489,7 @@ namespace UAS_MES_NEW.Packing
                         SQLS.Add("update package set pa_mothercode='' where pa_mothercode='" + pa_outboxcode.Text + "'");
                         dh.ExecuteSQLTran(SQLS.ToArray());
                     }
+                    dh.ExecuteSql("delete package where pa_outboxcode = '"+ pa_outboxcode.Text + "'","select");
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "栈板采集", "解除栈板" + pa_outboxcode.Text + "成功", pa_outboxcode.Text, "");
                     OperateResult.AppendText(">>栈板号" + pa_outboxcode.Text + "解除成功\n", Color.Green);
                     palletcode_KeyDown(new object(), new KeyEventArgs(Keys.Enter));

+ 46 - 14
UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.Designer.cs

@@ -35,6 +35,7 @@
             this.mp_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ma_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mp_sourcecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_stepname = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mp_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ma_craftcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.sc_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -51,9 +52,11 @@
             this.label3 = new System.Windows.Forms.Label();
             this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.ma_code_label = new System.Windows.Forms.Label();
-            this.ma_code = new System.Windows.Forms.Label();
+            this.ma_code = new System.Windows.Forms.TextBox();
             this.label5 = new System.Windows.Forms.Label();
-            this.ms_checkno = new System.Windows.Forms.Label();
+            this.ms_checkno = new System.Windows.Forms.TextBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.ms_outboxcode = new System.Windows.Forms.TextBox();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
@@ -79,7 +82,7 @@
             this.SerialPanel.AutoScroll = true;
             this.SerialPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.SerialPanel.Location = new System.Drawing.Point(14, 106);
-            this.SerialPanel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.SerialPanel.Margin = new System.Windows.Forms.Padding(2);
             this.SerialPanel.Name = "SerialPanel";
             this.SerialPanel.Size = new System.Drawing.Size(950, 254);
             this.SerialPanel.TabIndex = 194;
@@ -96,6 +99,7 @@
             this.mp_makecode,
             this.ma_prodcode,
             this.mp_sourcecode,
+            this.mp_stepname,
             this.mp_indate,
             this.ma_craftcode,
             this.sc_linecode,
@@ -103,7 +107,7 @@
             this.em_name});
             this.CraftInfDgv.EnableContentClick = true;
             this.CraftInfDgv.Location = new System.Drawing.Point(0, 388);
-            this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(2);
             this.CraftInfDgv.Name = "CraftInfDgv";
             this.CraftInfDgv.RowTemplate.Height = 27;
             this.CraftInfDgv.Size = new System.Drawing.Size(975, 190);
@@ -137,6 +141,13 @@
             this.mp_sourcecode.Name = "mp_sourcecode";
             this.mp_sourcecode.Width = 120;
             // 
+            // mp_stepname
+            // 
+            this.mp_stepname.DataPropertyName = "mp_stepname";
+            this.mp_stepname.HeaderText = "工序名称";
+            this.mp_stepname.Name = "mp_stepname";
+            this.mp_stepname.Width = 130;
+            // 
             // mp_indate
             // 
             this.mp_indate.DataPropertyName = "mp_indate";
@@ -303,11 +314,10 @@
             // 
             // ma_code
             // 
-            this.ma_code.AutoSize = true;
             this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code.Location = new System.Drawing.Point(332, 13);
+            this.ma_code.Location = new System.Drawing.Point(321, 13);
             this.ma_code.Name = "ma_code";
-            this.ma_code.Size = new System.Drawing.Size(0, 21);
+            this.ma_code.Size = new System.Drawing.Size(133, 29);
             this.ma_code.TabIndex = 196;
             // 
             // label5
@@ -322,18 +332,37 @@
             // 
             // ms_checkno
             // 
-            this.ms_checkno.AutoSize = true;
             this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ms_checkno.Location = new System.Drawing.Point(562, 13);
+            this.ms_checkno.Location = new System.Drawing.Point(544, 13);
             this.ms_checkno.Name = "ms_checkno";
-            this.ms_checkno.Size = new System.Drawing.Size(0, 21);
+            this.ms_checkno.Size = new System.Drawing.Size(117, 29);
             this.ms_checkno.TabIndex = 198;
             // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label6.Location = new System.Drawing.Point(667, 14);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(74, 21);
+            this.label6.TabIndex = 199;
+            this.label6.Text = "卡通箱号";
+            // 
+            // ms_outboxcode
+            // 
+            this.ms_outboxcode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ms_outboxcode.Location = new System.Drawing.Point(757, 15);
+            this.ms_outboxcode.Name = "ms_outboxcode";
+            this.ms_outboxcode.Size = new System.Drawing.Size(138, 29);
+            this.ms_outboxcode.TabIndex = 200;
+            // 
             // Query_ExeProgress
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(975, 578);
+            this.Controls.Add(this.ms_outboxcode);
+            this.Controls.Add(this.label6);
             this.Controls.Add(this.ms_checkno);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.ma_code);
@@ -376,18 +405,21 @@
         private System.Windows.Forms.Panel SerialPanel;
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.PictureBox pictureBox4;
+        private System.Windows.Forms.Label ma_code_label;
+        private System.Windows.Forms.TextBox ma_code;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.TextBox ms_checkno;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.TextBox ms_outboxcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_sncode;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_makecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn ma_prodcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_sourcecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mp_stepname;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_indate;
         private System.Windows.Forms.DataGridViewTextBoxColumn ma_craftcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn sc_linecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_inman;
         private System.Windows.Forms.DataGridViewTextBoxColumn em_name;
-        private System.Windows.Forms.Label ma_code_label;
-        private System.Windows.Forms.Label ma_code;
-        private System.Windows.Forms.Label label5;
-        private System.Windows.Forms.Label ms_checkno;
     }
 }

+ 7 - 6
UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.cs

@@ -67,12 +67,12 @@ namespace UAS_MES_NEW.Query
                 if (ms_id.Rows.Count > 0)
                 {
                     //说明有过转号
-                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_checkno from makeserial where ms_sncode='" + ms_id.Rows[0]["beforesn"].ToString() + "' or ms_sncode='" + ms_id.Rows[0]["sn"].ToString() + "' order by ms_id", "select");
+                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_checkno,ms_outboxcode from makeserial where ms_sncode='" + ms_id.Rows[0]["beforesn"].ToString() + "' or ms_sncode='" + ms_id.Rows[0]["sn"].ToString() + "' order by ms_id", "select");
                 }
                 else
                 {
                     //没有过转号
-                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_checkno from makeserial where ms_sncode='" + sn_code.Text + "' order by ms_id", "select");
+                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_checkno,ms_outboxcode from makeserial where ms_sncode='" + sn_code.Text + "' order by ms_id", "select");
                 }
                 if (ms_id.Rows.Count == 0)
                 {
@@ -84,13 +84,14 @@ namespace UAS_MES_NEW.Query
                 //设置界面工单号
                 ma_code.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_makecode"].ToString();
                 ms_checkno.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_checkno"].ToString();
+                ms_outboxcode.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_outboxcode"].ToString();
                 int idCount = ms_id.Rows.Count;
                 for (int i = 0; i < idCount; i++)
                 {
                     ms_ids.Append("'" + ms_id.Rows[i]["ms_id"].ToString() + "',");
                 }
                 ListA = (DataTable)dh.ExecuteSql("select ms_beforesn,ms_sncode,ms_firstsn,ms_makecode from makeserial where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ")", "select");
-                dt = (DataTable)dh.ExecuteSql("select ms_status,ms_nextstepcode,ms_paststep,ms_stepcode,ms_checkno,NVL(ms_ifrework, 0) ms_ifrework,NVL(ms_reworkstatus, 0) ms_reworkstatus from makeserial where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ") order by ms_id", "select");
+                dt = (DataTable)dh.ExecuteSql("select ms_status,ms_nextstepcode,ms_paststep,ms_stepcode,ms_checkno,ms_outboxcode,NVL(ms_ifrework, 0) ms_ifrework,NVL(ms_reworkstatus, 0) ms_reworkstatus from makeserial where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ") order by ms_id", "select");
                 if (dt.Rows.Count > 0)
                 {
                     if (Step != null && Step.Count > 0)
@@ -161,7 +162,7 @@ namespace UAS_MES_NEW.Query
                     }
                     //查询执行过的步骤
                     sql.Clear();
-                    sql.Append("select CD_DETNO,CD_STEPCODE,cd_ifoqc,ms_makecode,ms_id from craft left join craftdetail on cd_crid = cr_id  left join makeserial ");
+                    sql.Append("select CD_DETNO,CD_STEPCODE,CD_STEPNAME,cd_ifoqc,ms_makecode,ms_id from craft left join craftdetail on cd_crid = cr_id  left join makeserial ");
                     sql.Append("on ms_craftcode=cr_code and ms_prodcode=cr_prodcode where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ") order by ms_id,cd_detno");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     Step = new Dictionary<int, string>();
@@ -172,7 +173,7 @@ namespace UAS_MES_NEW.Query
                         else if (i == dt.Rows.Count + 1)
                             Step.Add(i, "结束");
                         else
-                            Step.Add(i, dt.Rows[i - 1]["CD_STEPCODE"].ToString());
+                            Step.Add(i, dt.Rows[i - 1]["CD_STEPNAME"].ToString());
                     }
                     //添加中间节点
                     bool passed = true;
@@ -302,7 +303,7 @@ namespace UAS_MES_NEW.Query
                         makecodes.Append("'" + ListA.Rows[i]["ms_makecode"].ToString() + "',");
                     }
                     sql.Clear();
-                    sql.Append("select mp_makecode,ma_prodcode,sc_linecode,ma_craftcode,mp_sourcecode,mp_sncode,");
+                    sql.Append("select mp_makecode,ma_prodcode,sc_linecode,ma_craftcode,mp_sourcecode,mp_sncode,mp_stepname,");
                     sql.Append("mp_indate,mp_inman,em_name from makeprocess left join make on mp_makecode=ma_code left join employee on mp_inman = em_code left join source on ");
                     sql.Append("mp_sourcecode=sc_code where mp_sncode in (" + mp_sncodes.ToString().Substring(0, mp_sncodes.ToString().Length - 1) + ") and ma_code in (" + makecodes.ToString().Substring(0, makecodes.ToString().Length - 1) + ") order by mp_indate");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");

+ 3 - 0
UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.resx

@@ -129,6 +129,9 @@
   <metadata name="mp_sourcecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="mp_stepname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="mp_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

文件差異過大導致無法顯示
+ 329 - 888
UAS_MES_JH/FunctionCode/Query/Query_MakeInf.Designer.cs


+ 1 - 14
UAS_MES_JH/FunctionCode/Query/Query_MakeInf.cs

@@ -85,7 +85,6 @@ namespace UAS_MES_NEW.Query
                     rangeafter = dt.Rows[0]["aftersn_qty"].ToString();
                     BaseUtil.SetFormValue(this.Controls, dt);
                 }
-                rangesn_qty.Text = rangebefore + "/" + rangeafter;
                 sql.Clear();
                 sql.Append("select count(1) beforesn_qty from makesnlist where msl_makecode='" + MakeCode.Text + "' and msl_type='before'");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -102,25 +101,13 @@ namespace UAS_MES_NEW.Query
                     rangeafter = dt.Rows[0]["aftersn_qty"].ToString();
                     BaseUtil.SetFormValue(this.Controls, dt);
                 }
-                importsn_qty.Text = rangebefore + "/" + rangeafter;
-                //获取SN关联信息
-                Mac_Num.Text = dh.getFieldDataByCondition("Makeaddresslist", "count(1)", "mal_makecode='" + MakeCode.Text + "' and mal_mac is not null").ToString();
-                BT_Num.Text = dh.getFieldDataByCondition("Makeaddresslist", "count(1)", "mal_makecode='" + MakeCode.Text + "' and mal_bt is not null").ToString();
-                IMEI_Num.Text = dh.getFieldDataByCondition("Makeimeilist", "count(1)", "mil_makecode='" + MakeCode.Text + "' and mil_imei1 is not null").ToString();
                 sql.Clear();
-                sql.Append("select * from StepProduct left join product on pr_code=sp_soncode where sp_bomversion='" + ma_bomversion + "' and sp_mothercode='" + ma_prodcode + "' and sp_craftcode='" + ma_craftcode + "'");
+                sql.Append("select mcd_detno,mcd_stepcode,mcd_stepname,nvl(count(distinct ms_sncode),0) n,mcd_outqty from MAKECRAFTdetail left join makeserial on mcd_macode= ms_makecode and mcd_stepcode = ms_nextstepcode where mcd_macode = '" + MakeCode.Text + "' group by mcd_detno, mcd_stepcode, mcd_stepname,mcd_outqty order by mcd_detno asc");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
                 {
                     BaseUtil.FillDgvWithDataTable(BOM, dt);
                 }
-                sql.Clear();
-                sql.Append("select * from label where la_prodcode='" + ma_prodcode + "'");
-                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                if (dt.Rows.Count > 0)
-                {
-                    BaseUtil.FillDgvWithDataTable(Label, dt);
-                }
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, MakeCode.Text, User.UserLineCode, User.UserSourceCode, "查询工单综合信息", "查询成功", "", "");
             }
             else MessageBox.Show("工单号不存在");

+ 15 - 72
UAS_MES_JH/FunctionCode/Query/Query_MakeInf.resx

@@ -117,6 +117,21 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="mcd_detno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mcd_stepcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mcd_stepname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="n.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mcd_outqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="CD_STEPNO.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -189,78 +204,6 @@
   <metadata name="CD_TABLE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="SP_MOTHERCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_SONCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_STEPCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_REPCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_TYPE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_DESCRIPTION.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_DETNO.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_PREFIX.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_TRACEKIND.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_LENGTH.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_ONEUSEQTY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_UPDATEMAN.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_UPDATEDATE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_CODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_NAME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_STATUS.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_INDATE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_INMAN.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_PRINTNOS.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_URL.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_ISDEFAULT.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_TEMPLATETYPE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_SOFTTYPE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_PRODCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="Search.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 120 - 0
UAS_MES_JH/FunctionCode/Special/Special_ChecknoSpitBox.Designer.cs

@@ -0,0 +1,120 @@
+namespace UAS_MES_NEW.Special
+{
+    partial class Special_ChecknoSpitBox
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Special_ChecknoSpitBox));
+            this.Split = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Pallet_label = new System.Windows.Forms.Label();
+            this.checkno = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperatResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.SuspendLayout();
+            // 
+            // Split
+            // 
+            this.Split.AllPower = null;
+            this.Split.BackColor = System.Drawing.Color.Transparent;
+            this.Split.DownImage = ((System.Drawing.Image)(resources.GetObject("Split.DownImage")));
+            this.Split.Image = null;
+            this.Split.IsShowBorder = true;
+            this.Split.Location = new System.Drawing.Point(267, 133);
+            this.Split.Margin = new System.Windows.Forms.Padding(2);
+            this.Split.MoveImage = ((System.Drawing.Image)(resources.GetObject("Split.MoveImage")));
+            this.Split.Name = "Split";
+            this.Split.NormalImage = ((System.Drawing.Image)(resources.GetObject("Split.NormalImage")));
+            this.Split.Power = null;
+            this.Split.Size = new System.Drawing.Size(56, 22);
+            this.Split.TabIndex = 0;
+            this.Split.Text = "拆解";
+            this.Split.UseVisualStyleBackColor = false;
+            this.Split.Click += new System.EventHandler(this.Split_Click);
+            // 
+            // Pallet_label
+            // 
+            this.Pallet_label.AutoSize = true;
+            this.Pallet_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Pallet_label.Location = new System.Drawing.Point(18, 131);
+            this.Pallet_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.Pallet_label.Name = "Pallet_label";
+            this.Pallet_label.Size = new System.Drawing.Size(74, 21);
+            this.Pallet_label.TabIndex = 1;
+            this.Pallet_label.Text = "抽检批号";
+            // 
+            // checkno
+            // 
+            this.checkno.AllPower = null;
+            this.checkno.BackColor = System.Drawing.Color.White;
+            this.checkno.ID = null;
+            this.checkno.Location = new System.Drawing.Point(91, 133);
+            this.checkno.Margin = new System.Windows.Forms.Padding(2);
+            this.checkno.Name = "checkno";
+            this.checkno.Power = null;
+            this.checkno.Size = new System.Drawing.Size(148, 21);
+            this.checkno.Str = null;
+            this.checkno.Str1 = null;
+            this.checkno.Str2 = null;
+            this.checkno.TabIndex = 2;
+            // 
+            // 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(368, 60);
+            this.OperatResult.Margin = new System.Windows.Forms.Padding(2);
+            this.OperatResult.Name = "OperatResult";
+            this.OperatResult.Size = new System.Drawing.Size(204, 310);
+            this.OperatResult.TabIndex = 3;
+            this.OperatResult.Text = "";
+            // 
+            // Special_ChecknoSpitBox
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(692, 527);
+            this.Controls.Add(this.OperatResult);
+            this.Controls.Add(this.checkno);
+            this.Controls.Add(this.Pallet_label);
+            this.Controls.Add(this.Split);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Name = "Special_ChecknoSpitBox";
+            this.Tag = "Special!ChecknoSpitBox";
+            this.Text = "抽检批批量拆箱";
+            this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.ButtonUtil.NormalButton Split;
+        private System.Windows.Forms.Label Pallet_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox checkno;
+        private CustomControl.RichText.RichTextAutoBottom OperatResult;
+    }
+}

+ 130 - 0
UAS_MES_JH/FunctionCode/Special/Special_ChecknoSpitBox.cs

@@ -0,0 +1,130 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Special
+{
+    public partial class Special_ChecknoSpitBox : Form
+    {
+        DataHelper dh;
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        public Special_ChecknoSpitBox()
+        {
+            InitializeComponent();
+        }
+
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+            dh = SystemInf.dh;
+        }
+
+        private void Split_Click(object sender, EventArgs e)
+        {
+            if (dh.getFieldDataByCondition("step", "st_ifpack", "st_code = '" + User.CurrentStepCode + "'").ToString() != "-1")
+            {
+                OperatResult.AppendText(">>当前登陆资源非包装资源,不允许采集\n", Color.Red);
+                return;
+            }
+            if (checkno.Text == "")
+            {
+                OperatResult.AppendText(">>抽检批不能为空\n", Color.Red);
+                return;
+            }
+            string Delete = MessageBox.Show(this.ParentForm, "是否确认批量拆箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+            if (Delete == "Yes")
+            {
+                DataTable dt = (DataTable)dh.ExecuteSql("select pa_makecode,pa_outboxcode,nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_status,pa_checkno,ob_status,pa_mothercode,nvl(pa_downstatus,0)pa_downstatus from package  join oqcbatch on pa_checkno=ob_checkno where ob_checkno='"+checkno.Text+"'", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    for (int jk = 0; jk < dt.Rows.Count; jk++)
+                    {
+                        if (dt.Rows[jk]["pa_outno"].ToString() != "")
+                        {
+                            OperatResult.AppendText(">>卡通箱" + dt.Rows[jk]["pa_outboxcode"].ToString() + "已被出货单" + dt.Rows[jk]["pa_outno"].ToString() + "采集,不允许操作\n", Color.Red);
+                            return;
+                        }
+                        if (dt.Rows[0]["pa_iostatus"].ToString() != "0")
+                        {
+                            OperatResult.AppendText(">>卡通箱" + dt.Rows[jk]["pa_outboxcode"].ToString() + "处于入库状态,不允许操作\n", Color.Red);
+                            return;
+                        }
+                        if (dt.Rows[0]["pa_status"].ToString() != "1")
+                        {
+                            OperatResult.AppendText(">>卡通箱" + dt.Rows[jk]["pa_outboxcode"].ToString() + "未封箱,不允许操作\n", Color.Red);
+                            return;
+                        }
+                        if (dt.Rows[0]["pa_mothercode"].ToString() == "")
+                        {
+                            if (dt.Rows[0]["pa_downstatus"].ToString() == "0")
+                            {
+                                string ob_status = dt.Rows[0]["ob_status"].ToString();
+                                string pa_checkno = dt.Rows[0]["pa_checkno"].ToString();
+                                ////不存在抽检批次或者还未检验可以拆解
+                                //if (ob_status == "" || ob_status == "ENTERING" || ob_status == "UNCHECK")
+                                //{
+                                sql.Clear();
+                                sql.Append("select pd_makecode,count(1) num from packagedetail left join makeserial  ");
+                                sql.Append("on ms_sncode=pd_barcode and ms_makecode=pd_makecode where pd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' group by pd_makecode");
+                                DataTable dtB = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                List<string> SQLS1 = new List<string>();
+                                for (int i = 0; i < dt.Rows.Count; i++)
+                                {
+                                    string ma_code = dtB.Rows[i]["pd_makecode"].ToString();
+                                    string num = dtB.Rows[i]["num"].ToString();
+                                    SQLS1.Add("delete from makeprocess where mp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' and ms_makecode='" + ma_code + "') and mp_makecode='" + ma_code + "' and mp_stepcode='" + User.CurrentStepCode + "'");
+                                    SQLS1.Add("delete from steppassed where sp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' and ms_makecode='" + ma_code + "') and sp_makecode='" + ma_code + "' and sp_stepcode='" + User.CurrentStepCode + "'");
+                                    SQLS1.Add("update makecraftdetail set mcd_inqty=mcd_inqty-" + num + ",mcd_outqty=mcd_outqty-" + num + ",mcd_okqty=mcd_okqty-" + num + " where mcd_macode='" + ma_code + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                                    //扣减已完工数
+                                    SQLS1.Add("update make set ma_madeqty=ma_madeqty-(select count(1) from makeserial where  ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' and ms_makecode='" + ma_code + "' and ms_status=2) where ma_code='" + ma_code + "'");
+                                }
+                                if (pa_checkno != "")
+                                {
+                                    SQLS1.Add("update makeserial set ms_checkno='' where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'");
+                                    SQLS1.Add("update oqcbatch set ob_nowcheckqty=ob_nowcheckqty-(select count(1) from oqcbatchdetail where obd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "') where ob_checkno='" + pa_checkno + "'");
+                                    SQLS1.Add("delete from oqcbatchdetail where obd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'");
+                                }
+                                //更新序列号状态
+                                SQLS1.Add("update makeserial set ms_status=1,ms_outboxcode='',ms_nextstepcode= (case when ms_nextstepcode='" + User.CurrentStepCode + "' then ms_nextstepcode else '" + User.CurrentStepCode + "' end ),ms_paststep=replace(ms_paststep,'," + User.CurrentStepCode + "','') where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'");
+                                //抽检批次不为空的时候进行移除
+                                dh.ExecuteSQLTran(SQLS1.ToArray());
+                                string prcode = dh.getFieldDataByCondition("packagedetail", "pd_prodcode", "pd_outboxcode = '" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'").ToString();
+                                string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + prcode + "'").ToString();
+                                //if (standqty != "")
+                                //{
+                                //    //置空原箱
+                                //    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where checkno='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "update");
+                                //}
+                                //else
+                                //    //置空原箱
+                                //    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where checkno='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "update");
+                                dh.ExecuteSql("insert into PACKAGEBACKUP select * from package where pa_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "insert");
+                                dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "insert");
+                                dh.ExecuteSql("delete from package where pa_outboxcode = '" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "delete");
+                                //删除箱的明细
+                                dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "delete");
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, dt.Rows[jk]["pa_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", dt.Rows[jk]["pa_outboxcode"].ToString(), dt.Rows[jk]["pa_outboxcode"].ToString());
+                                OperatResult.AppendText(">>箱号" + dt.Rows[jk]["pa_outboxcode"].ToString() + "成功拆解!\n", Color.Green);
+                                //}
+                                //else OperatResult.AppendText(">>箱号" + dt.Rows[jk]["pa_outboxcode"].ToString() + "已送检,不允许解除\n", Color.Red);
+                            }
+                            else OperatResult.AppendText(">>箱号" + dt.Rows[jk]["pa_outboxcode"].ToString() + "已下地,不允许解除\n", Color.Red);
+                        }
+                        else OperatResult.AppendText(">>箱号" + dt.Rows[jk]["pa_outboxcode"].ToString() + "已装箱" + dt.Rows[0]["pa_mothercode"].ToString() + ",不允许解除\n", Color.Red);
+                    }
+
+                }
+                else OperatResult.AppendText(">>抽检批" + checkno.Text + "不存在\n", Color.Red);
+            }
+        }
+    }
+}

+ 159 - 0
UAS_MES_JH/FunctionCode/Special/Special_ChecknoSpitBox.resx

@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="Split.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Split.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Split.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 8 - 7
UAS_MES_JH/FunctionCode/Warehouse/Warehouse_ProductMakeIn.Designer.cs

@@ -145,6 +145,7 @@
             // 
             // cancel
             // 
+            this.cancel.AllPower = null;
             this.cancel.AutoSize = true;
             this.cancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.cancel.Location = new System.Drawing.Point(234, 447);
@@ -206,11 +207,11 @@
             // 
             // pim_outboxcode
             // 
+            this.pim_outboxcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.pim_outboxcode.DataPropertyName = "pim_outboxcode";
             this.pim_outboxcode.HeaderText = "栈板/箱号";
             this.pim_outboxcode.Name = "pim_outboxcode";
             this.pim_outboxcode.ReadOnly = true;
-            this.pim_outboxcode.Width = 124;
             // 
             // pim_id
             // 
@@ -221,19 +222,19 @@
             // 
             // pim_mac
             // 
+            this.pim_mac.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.pim_mac.DataPropertyName = "pim_mac";
             this.pim_mac.HeaderText = "SN号";
             this.pim_mac.Name = "pim_mac";
             this.pim_mac.ReadOnly = true;
-            this.pim_mac.Width = 125;
             // 
             // pim_prodcode
             // 
+            this.pim_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.pim_prodcode.DataPropertyName = "pim_prodcode";
             this.pim_prodcode.HeaderText = "产品代码";
             this.pim_prodcode.Name = "pim_prodcode";
             this.pim_prodcode.ReadOnly = true;
-            this.pim_prodcode.Width = 124;
             // 
             // pr_detail
             // 
@@ -241,7 +242,7 @@
             this.pr_detail.HeaderText = "名称";
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.ReadOnly = true;
-            this.pr_detail.Width = 125;
+            this.pr_detail.Width = 150;
             // 
             // pr_spec
             // 
@@ -285,7 +286,7 @@
             this.SizeChanged += new System.EventHandler(this.Warehouse_ProductMakeIn_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.InOutDetailDGV)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -303,6 +304,8 @@
         private System.Windows.Forms.Label label1;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private System.Windows.Forms.BindingSource bindingSource1;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder pallecode;
+        private System.Windows.Forms.Button Search;
         private System.Windows.Forms.DataGridViewTextBoxColumn pim_outboxcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pim_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn pim_mac;
@@ -310,7 +313,5 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
         private System.Windows.Forms.DataGridViewTextBoxColumn Sp;
-        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder pallecode;
-        private System.Windows.Forms.Button Search;
     }
 }

+ 0 - 21
UAS_MES_JH/FunctionCode/Warehouse/Warehouse_ProductMakeIn.resx

@@ -141,25 +141,4 @@
   <metadata name="Sp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="pim_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pim_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pim_mac.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pim_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Sp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>

+ 18 - 1
UAS_MES_JH/PublicMethod/LogicHandler.cs

@@ -1025,10 +1025,27 @@ namespace UAS_MES_NEW.PublicMethod
             return param[4];
         }
 
-        public static bool CheckSNBeforeLoad(string iMakeCode, string iSN, string iFSonCode, string iSonCode, string iRule, string iPrefix, string iLength, string iIfRepeat, string iChecksalecode, out string ErrMessage)
+        public static bool CheckSNBeforeLoad(string iMakeCode, string iSN, string iFSonCode, string iSonCode, string iRule, string iPrefix, string iLength, string iIfRepeat, string iChecksalecode,string iflabelcheck, out string ErrMessage)
         {
             DataTable dt;
             ErrMessage = "";
+            if (iflabelcheck == "-1")
+            {
+                dt = (DataTable)dh.ExecuteSql("select US_COLORCODE from upcsku where us_upc = '"+iSN+"'", "select");
+                if (dt.Rows.Count == 0)
+                {
+                    ErrMessage = "UPC:" + iSN + "已未导入至系统,无法采集";
+                    return false;
+                }
+                string makecolorcode = dh.getFieldDataByCondition("make", "ma_colorcode", "ma_code = '" + iMakeCode + "'").ToString();
+                if (makecolorcode != dt.Rows[0]["US_COLORCODE"].ToString())
+                {
+                    ErrMessage = "工单"+iMakeCode+"对应颜色号"+ makecolorcode + "与UPC"+ iSN + "对应颜色号"+ dt.Rows[0]["US_COLORCODE"].ToString() + "不一致,无法采集";
+                    return false;
+                }
+            }
+
+
             switch (iRule)
             {
                 case "TSN":

+ 4 - 0
UAS_MES_JH/PublicMethod/Print.cs

@@ -155,6 +155,10 @@ namespace UAS_MES_NEW.PublicMethod
                 MessageBox.Show("标签文件打开失败");
                 return false;
             }
+            for (int k = 0; k < doc.Variables.FormVariables.Count; k++)
+            {
+                doc.Variables.FormVariables.Item(k + 1).Value = null;
+            }
             //执行全部的SQL
             for (int i = 0; i < dt.Rows.Count; i++)
             {

+ 19 - 0
UAS_MES_JH/UAS_MES_JH.csproj

@@ -526,6 +526,12 @@
     <Compile Include="FunctionCode\Make\Make_CollectElec.Designer.cs">
       <DependentUpon>Make_CollectElec.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_Decompose_Ex.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_Decompose_Ex.Designer.cs">
+      <DependentUpon>Make_Decompose_Ex.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_SmtTestCollection.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -880,6 +886,12 @@
     <Compile Include="FunctionCode\SMT\SMT_WaringSetting.Designer.cs">
       <DependentUpon>SMT_WaringSetting.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Special\Special_ChecknoSpitBox.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_ChecknoSpitBox.Designer.cs">
+      <DependentUpon>Special_ChecknoSpitBox.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Special\Special_BoxSplit.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1220,6 +1232,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_CollectElec.resx">
       <DependentUpon>Make_CollectElec.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_Decompose_Ex.resx">
+      <DependentUpon>Make_Decompose_Ex.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_SmtTestCollection.resx">
       <DependentUpon>Make_SmtTestCollection.cs</DependentUpon>
     </EmbeddedResource>
@@ -1397,6 +1412,9 @@
     <EmbeddedResource Include="FunctionCode\SMT\SMT_WaringSetting.resx">
       <DependentUpon>SMT_WaringSetting.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_ChecknoSpitBox.resx">
+      <DependentUpon>Special_ChecknoSpitBox.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_BoxSplit.resx">
       <DependentUpon>Special_BoxSplit.cs</DependentUpon>
     </EmbeddedResource>
@@ -1483,6 +1501,7 @@
     <None Include="App.config">
       <SubType>Designer</SubType>
     </None>
+    <None Include="ClassDiagram1.cd" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>

部分文件因文件數量過多而無法顯示