Selaa lähdekoodia

正通MES近期修改提交

caosy 3 vuotta sitten
vanhempi
commit
db364859bd
40 muutettua tiedostoa jossa 2768 lisäystä ja 681 poistoa
  1. 37 0
      UAS_MES_ZT/CustomControl/RichText/RichTextAutoBottom.cs
  2. 1 1
      UAS_MES_ZT/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.Designer.cs
  3. 1 1
      UAS_MES_ZT/CustomControl/TextBoxWithIcon/SearchTextBox.Designer.cs
  4. 2 0
      UAS_MES_ZT/FunctionCode/Make/Make_Aging.Designer.cs
  5. 2 2
      UAS_MES_ZT/FunctionCode/Make/Make_Aging.cs
  6. 0 9
      UAS_MES_ZT/FunctionCode/Make/Make_Aging.resx
  7. 25 3
      UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.Designer.cs
  8. 24 1
      UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.cs
  9. 3 12
      UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.resx
  10. 246 243
      UAS_MES_ZT/FunctionCode/Make/Make_StepReport.Designer.cs
  11. 6 6
      UAS_MES_ZT/FunctionCode/Make/Make_StepReport.cs
  12. 42 42
      UAS_MES_ZT/FunctionCode/Make/Make_StepReport.resx
  13. 63 57
      UAS_MES_ZT/FunctionCode/Make/Make_StepReportDetail.Designer.cs
  14. 90 34
      UAS_MES_ZT/FunctionCode/Make/Make_StepReportDetail.cs
  15. 24 23
      UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.Designer.cs
  16. 48 30
      UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.cs
  17. 4 0
      UAS_MES_ZT/FunctionCode/OQC/OQC_PlanMaintain.cs
  18. 199 143
      UAS_MES_ZT/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs
  19. 23 3
      UAS_MES_ZT/FunctionCode/OQC/OQC_SamplingDataCollection.cs
  20. 42 29
      UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.Designer.cs
  21. 6 0
      UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs
  22. 194 0
      UAS_MES_ZT/FunctionCode/Query/Query_Employee.Designer.cs
  23. 41 0
      UAS_MES_ZT/FunctionCode/Query/Query_Employee.cs
  24. 123 0
      UAS_MES_ZT/FunctionCode/Query/Query_Employee.resx
  25. 167 0
      UAS_MES_ZT/FunctionCode/Special/Special_ReSNBD.Designer.cs
  26. 154 0
      UAS_MES_ZT/FunctionCode/Special/Special_ReSNBD.cs
  27. 120 0
      UAS_MES_ZT/FunctionCode/Special/Special_ReSNBD.resx
  28. 1 1
      UAS_MES_ZT/FunctionCode/Special/Special_Reset.cs
  29. 409 0
      UAS_MES_ZT/FunctionCode/Special/Special_ResetCheck.Designer.cs
  30. 315 0
      UAS_MES_ZT/FunctionCode/Special/Special_ResetCheck.cs
  31. 238 0
      UAS_MES_ZT/FunctionCode/Special/Special_ResetCheck.resx
  32. 30 26
      UAS_MES_ZT/FunctionCode/SystemSetting/SystemSetting_PrinterTest.Designer.cs
  33. 30 12
      UAS_MES_ZT/FunctionCode/SystemSetting/SystemSetting_PrinterTest.cs
  34. 1 1
      UAS_MES_ZT/Program.cs
  35. 29 2
      UAS_MES_ZT/PublicMethod/LogicHandler.cs
  36. BIN
      UAS_MES_ZT/Resources/Sound/4082.wav
  37. BIN
      UAS_MES_ZT/Resources/Sound/FAIL.wav
  38. BIN
      UAS_MES_ZT/Resources/Sound/PASS.wav
  39. BIN
      UAS_MES_ZT/Resources/Sound/失败.wav
  40. 28 0
      UAS_MES_ZT/UAS_MES_ZT.csproj

+ 37 - 0
UAS_MES_ZT/CustomControl/RichText/RichTextAutoBottom.cs

@@ -55,6 +55,13 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 thread.Start();
                 thread = new Thread(PlaySound);
             }
+            else if (color == Color.OrangeRed && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\失败.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
             LogManager.DoLog(FindForm().Tag + str);
         }
 
@@ -75,6 +82,7 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 FileName = Application.StartupPath + @"\Resources\Sound\FAIL.wav";
                 thread.Start();
                 thread = new Thread(PlaySound);
+
             }
             else if (color == Color.Green && Entity.SystemInf.CheckAudioEnable)
             {
@@ -83,6 +91,20 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 thread.Start();
                 thread = new Thread(PlaySound);
             }
+            else if (color == Color.Blue && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\4082.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.OrangeRed && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\失败.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
             LogManager.DoLog(FindForm().Tag + str);
         }
 
@@ -105,6 +127,7 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 FileName = Application.StartupPath + @"\Resources\Sound\FAIL.wav";
                 thread.Start();
                 thread = new Thread(PlaySound);
+
             }
             else if (color == Color.Green && Entity.SystemInf.CheckAudioEnable)
             {
@@ -113,6 +136,20 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 thread.Start();
                 thread = new Thread(PlaySound);
             }
+            else if (color == Color.Blue && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\4082.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.OrangeRed && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\失败.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
             LogManager.DoLog(FindForm().Tag + str);
         }
 

+ 1 - 1
UAS_MES_ZT/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.Designer.cs

@@ -57,7 +57,7 @@
             this.TextBox.Lock = false;
             this.TextBox.Name = "TextBox";
             this.TextBox.Power = null;
-            this.TextBox.Size = new System.Drawing.Size(178, 21);
+            this.TextBox.Size = new System.Drawing.Size(178, 28);
             this.TextBox.Str = null;
             this.TextBox.Str1 = null;
             this.TextBox.Str2 = null;

+ 1 - 1
UAS_MES_ZT/CustomControl/TextBoxWithIcon/SearchTextBox.Designer.cs

@@ -56,7 +56,7 @@
             this.TextBox.Location = new System.Drawing.Point(0, 0);
             this.TextBox.Name = "TextBox";
             this.TextBox.Power = null;
-            this.TextBox.Size = new System.Drawing.Size(178, 25);
+            this.TextBox.Size = new System.Drawing.Size(178, 28);
             this.TextBox.Str = null;
             this.TextBox.Str1 = null;
             this.TextBox.Str2 = null;

+ 2 - 0
UAS_MES_ZT/FunctionCode/Make/Make_Aging.Designer.cs

@@ -258,6 +258,8 @@
             // checkBox1
             // 
             this.checkBox1.AutoSize = true;
+            this.checkBox1.Checked = true;
+            this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
             this.checkBox1.Location = new System.Drawing.Point(492, 76);
             this.checkBox1.Name = "checkBox1";
             this.checkBox1.Size = new System.Drawing.Size(106, 22);

+ 2 - 2
UAS_MES_ZT/FunctionCode/Make/Make_Aging.cs

@@ -73,7 +73,7 @@ namespace UAS_MES_NEW.Make
                                 return;
                             }
                         }
-                        OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
+                        //OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
                         dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_nextstepcode,ms_craftcode,ms_prodcode from makeserial left join product on ms_prodcode = pr_code where ms_sncode ='" + sncode.Text + "' order by ms_id desc", "select");
                         if (dt.Rows.Count == 0)
                         {
@@ -127,7 +127,7 @@ namespace UAS_MES_NEW.Make
                             return;
                         }
 
-                        if (dh.CheckExist("craft left join craftdetail on cr_id = cd_crid", "cr_code = '" + dt.Rows[0]["ms_craftcode"].ToString() + "' and cr_prodcode = '" + dt.Rows[0]["ms_prodcode"].ToString() + "' and cd_stepcode = 'AGEING'"))
+                        if (dh.CheckExist("craft left join craftdetail on cr_id = cd_crid", "cr_code = '" + dt.Rows[0]["ms_craftcode"].ToString() + "' and cr_prodcode = '" + dt.Rows[0]["ms_prodcode"].ToString() + "' and cd_stepcode = 'Aging'"))
                         {
                             if (LogicHandler.CheckStepSNAndMacode(ms_makecode.Text == "" ? oMakeCode : ms_makecode.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage2))
                             {

+ 0 - 9
UAS_MES_ZT/FunctionCode/Make/Make_Aging.resx

@@ -165,13 +165,4 @@
   <metadata name="AGD_INDATE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="AGD_MAKECODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="AGD_SNCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="AGD_INDATE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>

+ 25 - 3
UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.Designer.cs

@@ -61,6 +61,8 @@
             this.ma_craftcode_label = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.ms_prodcode_label = new System.Windows.Forms.Label();
+            this.autoin = new System.Windows.Forms.CheckBox();
+            this.timer1 = new System.Windows.Forms.Timer(this.components);
             this.cd_stepcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.RepairComplete = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ms_sncode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
@@ -325,7 +327,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.retsnlabel.AutoSize = true;
             this.retsnlabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.retsnlabel.Location = new System.Drawing.Point(704, 807);
+            this.retsnlabel.Location = new System.Drawing.Point(782, 807);
             this.retsnlabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.retsnlabel.Name = "retsnlabel";
             this.retsnlabel.Size = new System.Drawing.Size(150, 31);
@@ -463,6 +465,23 @@
             this.ms_prodcode_label.TabIndex = 149;
             this.ms_prodcode_label.Text = "产品编号";
             // 
+            // autoin
+            // 
+            this.autoin.AutoSize = true;
+            this.autoin.Location = new System.Drawing.Point(665, 809);
+            this.autoin.Margin = new System.Windows.Forms.Padding(4);
+            this.autoin.Name = "autoin";
+            this.autoin.Size = new System.Drawing.Size(142, 22);
+            this.autoin.TabIndex = 159;
+            this.autoin.Text = "直接完成维修";
+            this.autoin.UseVisualStyleBackColor = true;
+            // 
+            // timer1
+            // 
+            this.timer1.Enabled = true;
+            this.timer1.Interval = 1000;
+            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+            // 
             // cd_stepcode
             // 
             this.cd_stepcode.AllPower = "ifall";
@@ -611,7 +630,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.retsn.BackColor = System.Drawing.Color.White;
             this.retsn.ID = null;
-            this.retsn.Location = new System.Drawing.Point(866, 810);
+            this.retsn.Location = new System.Drawing.Point(944, 810);
             this.retsn.Margin = new System.Windows.Forms.Padding(4);
             this.retsn.Name = "retsn";
             this.retsn.Power = null;
@@ -998,7 +1017,7 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = null;
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1173, 813);
+            this.Clean.Location = new System.Drawing.Point(1251, 813);
             this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
@@ -1058,6 +1077,7 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1350, 880);
+            this.Controls.Add(this.autoin);
             this.Controls.Add(this.nr_code);
             this.Controls.Add(this.cd_stepcode);
             this.Controls.Add(this.ms_reworkcheckno);
@@ -1205,5 +1225,7 @@
         private CustomControl.ValueLabel.ValueLabel pr_detail;
         private CustomControl.ValueLabel.ValueLabel ms_prodcode;
         private CustomControl.ValueLabel.ValueLabel ms_makecode;
+        private System.Windows.Forms.CheckBox autoin;
+        private System.Windows.Forms.Timer timer1;
     }
 }

+ 24 - 1
UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.cs

@@ -346,6 +346,10 @@ namespace UAS_MES_NEW.Make
                             {
                                 OperatResult.AppendText(">>SN:" + ms_sncode.Text + "累计维修次数超过3次,提示\n", Color.Red);
                             }
+                            if (autoin.Checked)
+                            {
+                                RepairComplete_Click(sender, e);
+                            }
                         }
                         else OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                     }
@@ -605,7 +609,7 @@ namespace UAS_MES_NEW.Make
                         else
                             SQLS.Add("update makeserial set ms_checkno='',ms_paststep = ms_paststep || case when instr(','||ms_paststep||',','" + User.CurrentStepCode + "')=0 then ','||'" + User.CurrentStepCode + "' end , ms_nextstepcode ='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_reworkstatus=1 where ms_id='" + msid + "'");
                     }
-                    SQLS.Add("update makebad set mb_status=-1 where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ms_makecode.Text + "'");
+                    SQLS.Add("update makebad set mb_status=-1,mb_okman ='"+User.UserName+"' where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ms_makecode.Text + "'");
                     //取消最近拆解部件
                     SQLS.Add("update craftmaterial set cm_lastdeco=0 where cm_sncode='" + ms_sncode.Text + "' and cm_makecode='" + ms_makecode.Text + "' and nvl(cm_lastdeco,0)<>0");
                     //if (checkBox1.Checked)
@@ -624,11 +628,14 @@ namespace UAS_MES_NEW.Make
                     LogicHandler.InsertMakeProcess(ms_sncode.Text, ms_makecode.Text, User.UserSourceCode, "回流工序", "完成维修回流", User.UserCode);
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, macode, User.UserLineCode, User.UserSourceCode, "回流工序", "完成维修回流", ms_sncode.Text, ms_checkno.Text);
                     OperatResult.AppendText(">>序列号" + ms_sncode.Text + "回流成功\n", Color.Green);
+                    string cdstepcode = cd_stepcode.Text;
                     cd_stepcode.Enabled = true;
                     BaseUtil.CleanForm(this);
+                    cd_stepcode.Text = cdstepcode;
                     BadCodeTree.Nodes.Clear();
                     GetSNCode.Clear();
                     GetSNCode.Focus();
+                    i = 0;
                 }
             }
         }
@@ -1090,5 +1097,21 @@ namespace UAS_MES_NEW.Make
                 else OperatResult.AppendText(">>" + retsn.Text + "录入不可为空\n", Color.Red, retsn);
             }
         }
+
+        int i = 0;
+
+        private void timer1_Tick(object sender, EventArgs e)
+        {
+            if (GetSNCode.Text == "" && cd_stepcode.Text != "")
+            {
+                i = i + 1;
+            }
+            if (i > 300 && GetSNCode.Text == "" && cd_stepcode.Text != "")
+            {
+                i = 0;
+                cd_stepcode.Text = "";
+                OperatResult.AppendText(">>清空回流工序\n", Color.Black);
+            }
+        }
     }
 }

+ 3 - 12
UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.resx

@@ -123,6 +123,9 @@
   <metadata name="ComponentSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>190, 17</value>
   </metadata>
+  <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>418, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="RepairComplete.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
@@ -244,18 +247,6 @@
   <metadata name="DeleteCom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mbp_part1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="DeleteCom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="DeletePos.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 246 - 243
UAS_MES_ZT/FunctionCode/Make/Make_StepReport.Designer.cs

@@ -38,22 +38,25 @@
             this.ma_craftcode_label = new System.Windows.Forms.Label();
             this.ma_craftcode = new System.Windows.Forms.ComboBox();
             this.ma_bomversion = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.label8 = new System.Windows.Forms.Label();
+            this.normalButton2 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ngqty = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.okqty = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.ngsum = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.oksum = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ma_qty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.Lock = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.pr_batchnum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.BatchProductDGV56 = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
-            this.ms_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_stepcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_sourcecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_okqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_ngqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.AddBad = new System.Windows.Forms.DataGridViewImageColumn();
-            this.ms_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.DeleteRow = new System.Windows.Forms.DataGridViewImageColumn();
             this.sc_stepcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ma_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
@@ -72,19 +75,16 @@
             this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
-            this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
-            this.ma_qty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.label1 = new System.Windows.Forms.Label();
-            this.oksum = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.label4 = new System.Windows.Forms.Label();
-            this.ngsum = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.label5 = new System.Windows.Forms.Label();
-            this.okqty = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
-            this.label6 = new System.Windows.Forms.Label();
-            this.label7 = new System.Windows.Forms.Label();
-            this.ngqty = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
-            this.normalButton2 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.label8 = new System.Windows.Forms.Label();
+            this.ms_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ms_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ms_stepcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ms_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ms_sourcecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ms_okqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ms_ngqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.AddBad = new System.Windows.Forms.DataGridViewImageColumn();
+            this.ms_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DeleteRow = new System.Windows.Forms.DataGridViewImageColumn();
             ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV56)).BeginInit();
             this.SuspendLayout();
             // 
@@ -191,6 +191,172 @@
             this.ma_bomversion.TabIndex = 186;
             this.ma_bomversion.Visible = false;
             // 
+            // 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(6, 563);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(86, 31);
+            this.label1.TabIndex = 229;
+            this.label1.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(387, 563);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(86, 31);
+            this.label4.TabIndex = 231;
+            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(743, 563);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(86, 31);
+            this.label5.TabIndex = 233;
+            this.label5.Text = "不良数";
+            // 
+            // 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(43, 719);
+            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(134, 31);
+            this.label6.TabIndex = 236;
+            this.label6.Text = "良品数录入";
+            // 
+            // label7
+            // 
+            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(453, 718);
+            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(134, 31);
+            this.label7.TabIndex = 238;
+            this.label7.Text = "不良数录入";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.ForeColor = System.Drawing.Color.Black;
+            this.label8.Location = new System.Drawing.Point(13, 593);
+            this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(62, 31);
+            this.label8.TabIndex = 240;
+            this.label8.Text = "备注";
+            // 
+            // normalButton2
+            // 
+            this.normalButton2.AllPower = null;
+            this.normalButton2.BackColor = System.Drawing.Color.Transparent;
+            this.normalButton2.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.DownImage")));
+            this.normalButton2.Image = ((System.Drawing.Image)(resources.GetObject("normalButton2.Image")));
+            this.normalButton2.IsShowBorder = true;
+            this.normalButton2.Location = new System.Drawing.Point(942, 718);
+            this.normalButton2.Margin = new System.Windows.Forms.Padding(4);
+            this.normalButton2.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.MoveImage")));
+            this.normalButton2.Name = "normalButton2";
+            this.normalButton2.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.NormalImage")));
+            this.normalButton2.Power = null;
+            this.normalButton2.Size = new System.Drawing.Size(90, 36);
+            this.normalButton2.TabIndex = 239;
+            this.normalButton2.Tag = "IfRead";
+            this.normalButton2.Text = "报工确认";
+            this.normalButton2.UseVisualStyleBackColor = true;
+            this.normalButton2.Click += new System.EventHandler(this.normalButton2_Click);
+            // 
+            // ngqty
+            // 
+            this.ngqty.AllPower = null;
+            this.ngqty.BackColor = System.Drawing.Color.White;
+            this.ngqty.ID = null;
+            this.ngqty.Location = new System.Drawing.Point(570, 719);
+            this.ngqty.Name = "ngqty";
+            this.ngqty.Negative = false;
+            this.ngqty.Power = null;
+            this.ngqty.Size = new System.Drawing.Size(196, 28);
+            this.ngqty.Str = null;
+            this.ngqty.Str1 = null;
+            this.ngqty.Str2 = null;
+            this.ngqty.TabIndex = 237;
+            // 
+            // okqty
+            // 
+            this.okqty.AllPower = null;
+            this.okqty.BackColor = System.Drawing.Color.White;
+            this.okqty.ID = null;
+            this.okqty.Location = new System.Drawing.Point(160, 720);
+            this.okqty.Name = "okqty";
+            this.okqty.Negative = false;
+            this.okqty.Power = null;
+            this.okqty.Size = new System.Drawing.Size(196, 28);
+            this.okqty.Str = null;
+            this.okqty.Str1 = null;
+            this.okqty.Str2 = null;
+            this.okqty.TabIndex = 235;
+            // 
+            // ngsum
+            // 
+            this.ngsum.AutoSize = true;
+            this.ngsum.CutLength = null;
+            this.ngsum.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ngsum.Location = new System.Drawing.Point(837, 563);
+            this.ngsum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ngsum.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ngsum.Name = "ngsum";
+            this.ngsum.Size = new System.Drawing.Size(0, 31);
+            this.ngsum.TabIndex = 234;
+            this.ngsum.Tag = "ma_prodcode";
+            // 
+            // oksum
+            // 
+            this.oksum.AutoSize = true;
+            this.oksum.CutLength = null;
+            this.oksum.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.oksum.Location = new System.Drawing.Point(481, 563);
+            this.oksum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.oksum.MaximumSize = new System.Drawing.Size(225, 0);
+            this.oksum.Name = "oksum";
+            this.oksum.Size = new System.Drawing.Size(0, 31);
+            this.oksum.TabIndex = 232;
+            this.oksum.Tag = "ma_prodcode";
+            // 
+            // ma_qty
+            // 
+            this.ma_qty.AutoSize = true;
+            this.ma_qty.CutLength = null;
+            this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty.Location = new System.Drawing.Point(100, 563);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ma_qty.Name = "ma_qty";
+            this.ma_qty.Size = new System.Drawing.Size(0, 31);
+            this.ma_qty.TabIndex = 230;
+            this.ma_qty.Tag = "ma_prodcode";
+            // 
+            // 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(0, 626);
+            this.Remark.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.Remark.Name = "Remark";
+            this.Remark.Size = new System.Drawing.Size(1032, 74);
+            this.Remark.TabIndex = 228;
+            this.Remark.Text = "";
+            // 
             // Lock
             // 
             this.Lock.AutoSize = true;
@@ -299,80 +465,6 @@
             this.BatchProductDGV56.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.BatchProductDGV_CellFormatting);
             this.BatchProductDGV56.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.BatchProductDGV_CellPainting);
             // 
-            // ms_id
-            // 
-            this.ms_id.DataPropertyName = "ms_id";
-            this.ms_id.HeaderText = "ID";
-            this.ms_id.Name = "ms_id";
-            this.ms_id.Visible = false;
-            // 
-            // ms_makecode
-            // 
-            this.ms_makecode.DataPropertyName = "ms_makecode";
-            this.ms_makecode.HeaderText = "报工工单";
-            this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.ReadOnly = true;
-            this.ms_makecode.Visible = false;
-            // 
-            // ms_stepcode
-            // 
-            this.ms_stepcode.DataPropertyName = "ms_stepcode";
-            this.ms_stepcode.HeaderText = "报工工序";
-            this.ms_stepcode.Name = "ms_stepcode";
-            this.ms_stepcode.ReadOnly = true;
-            this.ms_stepcode.Visible = false;
-            // 
-            // ms_linecode
-            // 
-            this.ms_linecode.DataPropertyName = "ms_linecode";
-            this.ms_linecode.HeaderText = "报工线别";
-            this.ms_linecode.Name = "ms_linecode";
-            this.ms_linecode.ReadOnly = true;
-            // 
-            // ms_sourcecode
-            // 
-            this.ms_sourcecode.DataPropertyName = "ms_sourcecode";
-            this.ms_sourcecode.HeaderText = "报工资源";
-            this.ms_sourcecode.Name = "ms_sourcecode";
-            this.ms_sourcecode.Visible = false;
-            // 
-            // ms_okqty
-            // 
-            this.ms_okqty.DataPropertyName = "ms_okqty";
-            this.ms_okqty.HeaderText = "良品数";
-            this.ms_okqty.Name = "ms_okqty";
-            this.ms_okqty.ReadOnly = true;
-            // 
-            // ms_ngqty
-            // 
-            this.ms_ngqty.DataPropertyName = "ms_ngqty";
-            this.ms_ngqty.HeaderText = "不良数";
-            this.ms_ngqty.Name = "ms_ngqty";
-            this.ms_ngqty.ReadOnly = true;
-            // 
-            // 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.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.AddBad.Width = 20;
-            // 
-            // ms_indate
-            // 
-            this.ms_indate.DataPropertyName = "ms_indate";
-            this.ms_indate.HeaderText = "报工时间";
-            this.ms_indate.Name = "ms_indate";
-            this.ms_indate.ReadOnly = true;
-            // 
-            // DeleteRow
-            // 
-            this.DeleteRow.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.DeleteRow.HeaderText = "删除";
-            this.DeleteRow.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.DeleteRow.Name = "DeleteRow";
-            // 
             // sc_stepcode
             // 
             this.sc_stepcode.AutoSize = true;
@@ -529,171 +621,82 @@
             this.dataGridViewImageColumn1.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
             this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1";
             // 
-            // 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(0, 626);
-            this.Remark.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
-            this.Remark.Name = "Remark";
-            this.Remark.Size = new System.Drawing.Size(1032, 74);
-            this.Remark.TabIndex = 228;
-            this.Remark.Text = "";
-            // 
-            // ma_qty
-            // 
-            this.ma_qty.AutoSize = true;
-            this.ma_qty.CutLength = null;
-            this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty.Location = new System.Drawing.Point(100, 563);
-            this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_qty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.ma_qty.Name = "ma_qty";
-            this.ma_qty.Size = new System.Drawing.Size(0, 31);
-            this.ma_qty.TabIndex = 230;
-            this.ma_qty.Tag = "ma_prodcode";
-            // 
-            // 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(6, 563);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(86, 31);
-            this.label1.TabIndex = 229;
-            this.label1.Text = "工单数";
-            // 
-            // oksum
+            // ms_id
             // 
-            this.oksum.AutoSize = true;
-            this.oksum.CutLength = null;
-            this.oksum.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.oksum.Location = new System.Drawing.Point(481, 563);
-            this.oksum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.oksum.MaximumSize = new System.Drawing.Size(225, 0);
-            this.oksum.Name = "oksum";
-            this.oksum.Size = new System.Drawing.Size(0, 31);
-            this.oksum.TabIndex = 232;
-            this.oksum.Tag = "ma_prodcode";
+            this.ms_id.DataPropertyName = "ms_id";
+            this.ms_id.HeaderText = "ID";
+            this.ms_id.Name = "ms_id";
+            this.ms_id.Visible = false;
             // 
-            // label4
+            // ms_makecode
             // 
-            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(387, 563);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(86, 31);
-            this.label4.TabIndex = 231;
-            this.label4.Text = "良品数";
+            this.ms_makecode.DataPropertyName = "ms_makecode";
+            this.ms_makecode.HeaderText = "报工工单";
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.ReadOnly = true;
+            this.ms_makecode.Visible = false;
             // 
-            // ngsum
+            // ms_stepcode
             // 
-            this.ngsum.AutoSize = true;
-            this.ngsum.CutLength = null;
-            this.ngsum.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ngsum.Location = new System.Drawing.Point(837, 563);
-            this.ngsum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ngsum.MaximumSize = new System.Drawing.Size(225, 0);
-            this.ngsum.Name = "ngsum";
-            this.ngsum.Size = new System.Drawing.Size(0, 31);
-            this.ngsum.TabIndex = 234;
-            this.ngsum.Tag = "ma_prodcode";
+            this.ms_stepcode.DataPropertyName = "ms_stepcode";
+            this.ms_stepcode.HeaderText = "报工工序";
+            this.ms_stepcode.Name = "ms_stepcode";
+            this.ms_stepcode.ReadOnly = true;
+            this.ms_stepcode.Visible = false;
             // 
-            // label5
+            // ms_linecode
             // 
-            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(743, 563);
-            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(86, 31);
-            this.label5.TabIndex = 233;
-            this.label5.Text = "不良数";
+            this.ms_linecode.DataPropertyName = "ms_linecode";
+            this.ms_linecode.HeaderText = "报工线别";
+            this.ms_linecode.Name = "ms_linecode";
+            this.ms_linecode.ReadOnly = true;
             // 
-            // okqty
+            // ms_sourcecode
             // 
-            this.okqty.AllPower = null;
-            this.okqty.BackColor = System.Drawing.Color.White;
-            this.okqty.ID = null;
-            this.okqty.Location = new System.Drawing.Point(160, 720);
-            this.okqty.Name = "okqty";
-            this.okqty.Negative = false;
-            this.okqty.Power = null;
-            this.okqty.Size = new System.Drawing.Size(196, 28);
-            this.okqty.Str = null;
-            this.okqty.Str1 = null;
-            this.okqty.Str2 = null;
-            this.okqty.TabIndex = 235;
+            this.ms_sourcecode.DataPropertyName = "ms_sourcecode";
+            this.ms_sourcecode.HeaderText = "报工资源";
+            this.ms_sourcecode.Name = "ms_sourcecode";
+            this.ms_sourcecode.Visible = false;
             // 
-            // label6
+            // ms_okqty
             // 
-            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(43, 719);
-            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(134, 31);
-            this.label6.TabIndex = 236;
-            this.label6.Text = "良品数录入";
+            this.ms_okqty.DataPropertyName = "ms_okqty";
+            this.ms_okqty.HeaderText = "良品数";
+            this.ms_okqty.Name = "ms_okqty";
+            this.ms_okqty.ReadOnly = true;
             // 
-            // label7
+            // ms_ngqty
             // 
-            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(453, 718);
-            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(134, 31);
-            this.label7.TabIndex = 238;
-            this.label7.Text = "不良数录入";
+            this.ms_ngqty.DataPropertyName = "ms_ngqty";
+            this.ms_ngqty.HeaderText = "不良数";
+            this.ms_ngqty.Name = "ms_ngqty";
+            this.ms_ngqty.ReadOnly = true;
             // 
-            // ngqty
+            // AddBad
             // 
-            this.ngqty.AllPower = null;
-            this.ngqty.BackColor = System.Drawing.Color.White;
-            this.ngqty.ID = null;
-            this.ngqty.Location = new System.Drawing.Point(570, 719);
-            this.ngqty.Name = "ngqty";
-            this.ngqty.Negative = false;
-            this.ngqty.Power = null;
-            this.ngqty.Size = new System.Drawing.Size(196, 28);
-            this.ngqty.Str = null;
-            this.ngqty.Str1 = null;
-            this.ngqty.Str2 = null;
-            this.ngqty.TabIndex = 237;
+            this.AddBad.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.AddBad.HeaderText = "录不良";
+            this.AddBad.Image = global::UAS_MES_NEW.Properties.Resources.plus;
+            this.AddBad.MinimumWidth = 75;
+            this.AddBad.Name = "AddBad";
+            this.AddBad.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.AddBad.Width = 75;
             // 
-            // normalButton2
+            // ms_indate
             // 
-            this.normalButton2.AllPower = null;
-            this.normalButton2.BackColor = System.Drawing.Color.Transparent;
-            this.normalButton2.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.DownImage")));
-            this.normalButton2.Image = ((System.Drawing.Image)(resources.GetObject("normalButton2.Image")));
-            this.normalButton2.IsShowBorder = true;
-            this.normalButton2.Location = new System.Drawing.Point(942, 718);
-            this.normalButton2.Margin = new System.Windows.Forms.Padding(4);
-            this.normalButton2.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.MoveImage")));
-            this.normalButton2.Name = "normalButton2";
-            this.normalButton2.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.NormalImage")));
-            this.normalButton2.Power = null;
-            this.normalButton2.Size = new System.Drawing.Size(90, 36);
-            this.normalButton2.TabIndex = 239;
-            this.normalButton2.Tag = "IfRead";
-            this.normalButton2.Text = "报工确认";
-            this.normalButton2.UseVisualStyleBackColor = true;
-            this.normalButton2.Click += new System.EventHandler(this.normalButton2_Click);
+            this.ms_indate.DataPropertyName = "ms_indate";
+            this.ms_indate.HeaderText = "报工时间";
+            this.ms_indate.Name = "ms_indate";
+            this.ms_indate.ReadOnly = true;
             // 
-            // label8
+            // DeleteRow
             // 
-            this.label8.AutoSize = true;
-            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label8.ForeColor = System.Drawing.Color.Black;
-            this.label8.Location = new System.Drawing.Point(13, 593);
-            this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(62, 31);
-            this.label8.TabIndex = 240;
-            this.label8.Text = "备注";
+            this.DeleteRow.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.DeleteRow.HeaderText = "删除";
+            this.DeleteRow.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeleteRow.MinimumWidth = 50;
+            this.DeleteRow.Name = "DeleteRow";
+            this.DeleteRow.Width = 50;
             // 
             // Make_StepReport
             // 

+ 6 - 6
UAS_MES_ZT/FunctionCode/Make/Make_StepReport.cs

@@ -276,7 +276,7 @@ namespace UAS_MES_NEW.Make
                 dta = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 for (int i = 0; i < dta.Rows.Count; i++)
                 {
-                    int baseqty = int.Parse(dta.Rows[i]["baseqty"].ToString());
+                    double baseqty = double.Parse(dta.Rows[i]["baseqty"].ToString());
                     sql.Clear();
                     sql.Append(" select mss_id,mss_remain,mss_barcode,mss_prodcode,mss_baseqty from makesourcestock where mss_linecode='" + User.UserLineCode + "' AND mss_stepcode='" + User.CurrentStepCode + "'  ");
                     sql.Append(" and mss_fprodcode='"+dta.Rows[i]["mss_fprodcode"].ToString() +"' AND mss_invalidtime is null order by mss_id asc  ");
@@ -285,17 +285,17 @@ namespace UAS_MES_NEW.Make
                     {
                         if (baseqty > 0)
                         {
-                            int v_v_useqty = 0;
-                            if (int.Parse(dtb.Rows[j]["mss_remain"].ToString()) >= baseqty || j == dtb.Rows.Count - 1)
+                            double v_v_useqty = 0;
+                            if (double.Parse(dtb.Rows[j]["mss_remain"].ToString()) >= baseqty || j == dtb.Rows.Count - 1)
                             {
                                  v_v_useqty = baseqty;
                                 baseqty = 0;
-                                dh.UpdateByCondition("makesourcestock", "mss_remain= mss_remain - " + v_v_useqty + ",mss_useqty=NVL(mss_useqty,0)+" + v_v_useqty + ",mss_madeqty=NVL(mss_madeqty,0)+ceil(" + v_v_useqty + "/" + int.Parse(dtb.Rows[j]["mss_baseqty"].ToString()) + "),mss_validtime=(case when mss_validtime is null then sysdate else mss_validtime end),MSS_UABLE=-1  ", "mss_id=" + dtb.Rows[j]["mss_id"].ToString() + "");
+                                dh.UpdateByCondition("makesourcestock", "mss_remain= mss_remain - " + v_v_useqty + ",mss_useqty=NVL(mss_useqty,0)+" + v_v_useqty + ",mss_madeqty=NVL(mss_madeqty,0)+ceil(" + v_v_useqty + "/" + double.Parse(dtb.Rows[j]["mss_baseqty"].ToString()) + "),mss_validtime=(case when mss_validtime is null then sysdate else mss_validtime end),MSS_UABLE=-1  ", "mss_id=" + dtb.Rows[j]["mss_id"].ToString() + "");
                             }
                             else {
-                                 v_v_useqty = int.Parse(dtb.Rows[j]["mss_remain"].ToString());
+                                 v_v_useqty = double.Parse(dtb.Rows[j]["mss_remain"].ToString());
                                 baseqty = baseqty- v_v_useqty;
-                                dh.UpdateByCondition("makesourcestock", "mss_remain= mss_remain - " + v_v_useqty + ",mss_useqty=NVL(mss_useqty,0)+" + v_v_useqty + ",mss_madeqty=NVL(mss_madeqty,0)+ceil(" + v_v_useqty + "/" + int.Parse(dtb.Rows[j]["mss_baseqty"].ToString()) + "),mss_validtime=(case when mss_validtime is null then sysdate else mss_validtime end),MSS_UABLE=-1  ", "mss_id=" + dtb.Rows[j]["mss_id"].ToString() + "");
+                                dh.UpdateByCondition("makesourcestock", "mss_remain= mss_remain - " + v_v_useqty + ",mss_useqty=NVL(mss_useqty,0)+" + v_v_useqty + ",mss_madeqty=NVL(mss_madeqty,0)+ceil(" + v_v_useqty + "/" + double.Parse(dtb.Rows[j]["mss_baseqty"].ToString()) + "),mss_validtime=(case when mss_validtime is null then sysdate else mss_validtime end),MSS_UABLE=-1  ", "mss_id=" + dtb.Rows[j]["mss_id"].ToString() + "");
                             }
                             dh.UpdateByCondition("barcode", "bar_remain=bar_remain-"+ v_v_useqty + "", "bar_code='"+ dtb.Rows[j]["mss_barcode"].ToString() + "' and bar_remain>0");
                             dh.ExecuteSql("insert into craftmaterial(CM_ID,CM_MAKECODE,CM_MAID,CM_MAPRODCODE,CM_STEPCODE,CM_CRAFTCODE,CM_BARCODE,CM_SONCODE,CM_FSONCODE,CM_INQTY,CM_INDATE,CM_INMAN,CM_LINECODE,CM_WCCODE,CM_SOURCECODE,CM_STATUS,CM_MSID) SELECT craftmaterial_seq.nextval,MA_CODE,ma_id,ma_prodcode,'"+User.CurrentStepCode+"', '"+ma_craftcode.Text+"','"+ dtb.Rows[j]["mss_barcode"].ToString() + "','"+ dtb.Rows[j]["mss_prodcode"].ToString() + "','"+ dtb.Rows[j]["mss_prodcode"].ToString() + "',"+ v_v_useqty + ",sysdate,'"+User.UserName+"','"+User.UserLineCode+"','"+User.WorkCenter+"','"+User.UserSourceCode+"',0,'"+ msid + "'  FROM MAKE WHERE MA_CODE='"+ma_code.Text+"'", "select");

+ 42 - 42
UAS_MES_ZT/FunctionCode/Make/Make_StepReport.resx

@@ -118,7 +118,7 @@
     <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="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="normalButton2.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -130,7 +130,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Clean.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="normalButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -223,7 +223,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="Clean.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="normalButton2.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -236,7 +236,7 @@
         gg==
 </value>
   </data>
-  <data name="Clean.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="normalButton2.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -249,37 +249,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="ms_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ms_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ms_stepcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ms_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ms_sourcecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ms_okqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ms_ngqty.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="ms_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="DeleteRow.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <data name="Screen.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -291,7 +261,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Screen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Clean.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -384,7 +354,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="Screen.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Clean.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -397,7 +367,7 @@
         gg==
 </value>
   </data>
-  <data name="Screen.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Clean.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -410,7 +380,37 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="normalButton2.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <metadata name="ms_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ms_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ms_stepcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ms_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ms_sourcecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ms_okqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ms_ngqty.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="ms_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="DeleteRow.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <data name="Screen.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -422,7 +422,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="normalButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Screen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -515,7 +515,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="normalButton2.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Screen.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -528,7 +528,7 @@
         gg==
 </value>
   </data>
-  <data name="normalButton2.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Screen.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE

+ 63 - 57
UAS_MES_ZT/FunctionCode/Make/Make_StepReportDetail.Designer.cs

@@ -30,12 +30,6 @@
         {
             this.headBar1 = new UAS_MES_NEW.CustomControl.HeadBar();
             this.BatchProductDGV = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
-            this.msd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.msd_msid = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.msd_badname = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.msd_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.msd_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.DeleteRow = new System.Windows.Forms.DataGridViewImageColumn();
             this.label7 = new System.Windows.Forms.Label();
             this.ngqty = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.label1 = new System.Windows.Forms.Label();
@@ -47,6 +41,12 @@
             this.ma_code = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
             this.button1 = new System.Windows.Forms.Button();
+            this.msd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_msid = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_badname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DeleteRow = new System.Windows.Forms.DataGridViewImageColumn();
             ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV)).BeginInit();
             this.SuspendLayout();
             // 
@@ -83,49 +83,7 @@
             this.BatchProductDGV.TabIndex = 175;
             this.BatchProductDGV.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.BatchProductDGV_CellContentClick66);
             this.BatchProductDGV.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.BatchProductDGV_CellFormatting12);
-            // 
-            // msd_id
-            // 
-            this.msd_id.DataPropertyName = "msd_id";
-            this.msd_id.HeaderText = "ID";
-            this.msd_id.Name = "msd_id";
-            this.msd_id.Visible = false;
-            // 
-            // msd_msid
-            // 
-            this.msd_msid.DataPropertyName = "msd_msid";
-            this.msd_msid.HeaderText = "";
-            this.msd_msid.Name = "msd_msid";
-            this.msd_msid.ReadOnly = true;
-            this.msd_msid.Visible = false;
-            // 
-            // msd_badname
-            // 
-            this.msd_badname.DataPropertyName = "msd_badname";
-            this.msd_badname.HeaderText = "不良现象";
-            this.msd_badname.Name = "msd_badname";
-            this.msd_badname.ReadOnly = true;
-            // 
-            // msd_qty
-            // 
-            this.msd_qty.DataPropertyName = "msd_qty";
-            this.msd_qty.HeaderText = "不良数";
-            this.msd_qty.Name = "msd_qty";
-            this.msd_qty.ReadOnly = true;
-            // 
-            // msd_indate
-            // 
-            this.msd_indate.DataPropertyName = "msd_indate";
-            this.msd_indate.HeaderText = "录入时间";
-            this.msd_indate.Name = "msd_indate";
-            this.msd_indate.ReadOnly = true;
-            // 
-            // DeleteRow
-            // 
-            this.DeleteRow.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.DeleteRow.HeaderText = "删除";
-            this.DeleteRow.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.DeleteRow.Name = "DeleteRow";
+            this.BatchProductDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.BatchProductDGV_CellPainting);
             // 
             // label7
             // 
@@ -233,10 +191,57 @@
             // 
             this.button1.Location = new System.Drawing.Point(538, 587);
             this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(75, 23);
+            this.button1.Size = new System.Drawing.Size(112, 32);
             this.button1.TabIndex = 253;
-            this.button1.Text = "button1";
+            this.button1.Text = "确认录入";
             this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click_2);
+            // 
+            // msd_id
+            // 
+            this.msd_id.DataPropertyName = "msd_id";
+            this.msd_id.HeaderText = "ID";
+            this.msd_id.Name = "msd_id";
+            this.msd_id.Visible = false;
+            // 
+            // msd_msid
+            // 
+            this.msd_msid.DataPropertyName = "msd_msid";
+            this.msd_msid.HeaderText = "";
+            this.msd_msid.Name = "msd_msid";
+            this.msd_msid.ReadOnly = true;
+            this.msd_msid.Visible = false;
+            // 
+            // msd_badname
+            // 
+            this.msd_badname.DataPropertyName = "msd_badname";
+            this.msd_badname.HeaderText = "不良现象";
+            this.msd_badname.Name = "msd_badname";
+            this.msd_badname.ReadOnly = true;
+            // 
+            // msd_qty
+            // 
+            this.msd_qty.DataPropertyName = "msd_qty";
+            this.msd_qty.HeaderText = "不良数";
+            this.msd_qty.Name = "msd_qty";
+            this.msd_qty.ReadOnly = true;
+            // 
+            // msd_indate
+            // 
+            this.msd_indate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.msd_indate.DataPropertyName = "msd_indate";
+            this.msd_indate.HeaderText = "录入时间";
+            this.msd_indate.MinimumWidth = 150;
+            this.msd_indate.Name = "msd_indate";
+            this.msd_indate.ReadOnly = true;
+            this.msd_indate.Width = 150;
+            // 
+            // DeleteRow
+            // 
+            this.DeleteRow.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.DeleteRow.HeaderText = "删除";
+            this.DeleteRow.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeleteRow.Name = "DeleteRow";
             // 
             // Make_StepReportDetail
             // 
@@ -259,6 +264,7 @@
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(3);
             this.Name = "Make_StepReportDetail";
+            this.Tag = "ShowDialogWindow";
             this.Text = "Make_StepReportDetail";
             this.Load += new System.EventHandler(this.Warehouse_ProdDetail_Load);
             ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV)).EndInit();
@@ -275,12 +281,6 @@
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox ngqty;
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Label ngsum;
-        private System.Windows.Forms.DataGridViewTextBoxColumn msd_id;
-        private System.Windows.Forms.DataGridViewTextBoxColumn msd_msid;
-        private System.Windows.Forms.DataGridViewTextBoxColumn msd_badname;
-        private System.Windows.Forms.DataGridViewTextBoxColumn msd_qty;
-        private System.Windows.Forms.DataGridViewTextBoxColumn msd_indate;
-        private System.Windows.Forms.DataGridViewImageColumn DeleteRow;
         private System.Windows.Forms.Label stepcode;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Label label2;
@@ -288,5 +288,11 @@
         private System.Windows.Forms.Label ma_code;
         private System.Windows.Forms.Label label5;
         private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_msid;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_badname;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_qty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_indate;
+        private System.Windows.Forms.DataGridViewImageColumn DeleteRow;
     }
 }

+ 90 - 34
UAS_MES_ZT/FunctionCode/Make/Make_StepReportDetail.cs

@@ -55,7 +55,35 @@ namespace UAS_MES_NEW.Make
             ngsum.Text = badqty.ToString();
             ma_code.Text = macode;
             stepcode.Text = User.CurrentStepCode;
-            comBoxWithFocus1.Items.Add("1234");
+            comBoxWithFocus1.Items.Add("线缺陷");
+            comBoxWithFocus1.Items.Add("破片");
+            comBoxWithFocus1.Items.Add("切割不良");
+            comBoxWithFocus1.Items.Add("mura");
+            comBoxWithFocus1.Items.Add("LCD刮伤");
+            comBoxWithFocus1.Items.Add("LCD脏污");
+            comBoxWithFocus1.Items.Add("线缺陷");
+            comBoxWithFocus1.Items.Add("亮点/碎亮点");
+            comBoxWithFocus1.Items.Add("画异");
+            comBoxWithFocus1.Items.Add("发黄");
+            if (User.CurrentStepCode == "CT1")
+            {
+                comBoxWithFocus1.Items.Add("来料液漏液&打X");
+            }
+            else if (User.CurrentStepCode == "CT2")
+            {
+                comBoxWithFocus1.Items.Add("上POL异物");
+                comBoxWithFocus1.Items.Add("上POL偏移");
+                comBoxWithFocus1.Items.Add("下POL异物");
+                comBoxWithFocus1.Items.Add("下POL偏移");
+                comBoxWithFocus1.Items.Add("上POL脏污");
+                comBoxWithFocus1.Items.Add("上POL刮伤");
+                comBoxWithFocus1.Items.Add("下POL脏污");
+                comBoxWithFocus1.Items.Add("下POL刮伤");
+                comBoxWithFocus1.Items.Add("上POL白边");
+                comBoxWithFocus1.Items.Add("上POL气泡");
+                comBoxWithFocus1.Items.Add("下POL白边");
+                comBoxWithFocus1.Items.Add("下POL气泡");
+            }
             FillDataGridView();
         }
 
@@ -107,39 +135,67 @@ namespace UAS_MES_NEW.Make
             }
         }
 
+        private void button1_Click_1(object sender, EventArgs e)
+        {
+
+        }
+
+        private void BatchProductDGV_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
+        {
+            bool mouseOver = e.CellBounds.Contains(this.PointToClient(Cursor.Position));
+            if (e.ColumnIndex > 0)
+            {
+                if (BatchProductDGV.Columns[e.ColumnIndex].Name == "msd_qty")
+                {
+                    SolidBrush solidBrush = new SolidBrush(Color.FromArgb(51, 153, 255));
+                    e.Graphics.FillRectangle(mouseOver ? solidBrush : Brushes.LightSeaGreen, e.CellBounds);
+                    Rectangle border = e.CellBounds;
+                    border.Width -= 1;
+                    e.Graphics.DrawRectangle(Pens.White, border);
+                    e.PaintContent(e.CellBounds);
+                    e.Handled = true;
+                }
+            }
+        }
+
+        private void button1_Click_2(object sender, EventArgs e)
+        {
+            try
+            {
+                if (comBoxWithFocus1.Text == "" || ngqty.Text == "")
+                {
+                    MessageBox.Show("必填项为空");
+                    return;
+                }
+                double ng = double.Parse(ngqty.Text);
+                double nowng = double.Parse(dh.getFieldDataByCondition("MES_STEPREPORTdet", "nvl(sum(msd_qty),0)", " msd_msid = '" + msid + "' and msd_stepcode = '" + User.CurrentStepCode + "' and msd_status = 0 ").ToString());
+                if (nowng + double.Parse(ngqty.Text) > badqty)
+                {
+                    MessageBox.Show("已录入不良" + nowng + "+待录入不良" + ng + "大于不良总数" + badqty + "");
+                    return;
+                }
+                else
+                {
+                    string msdid = dh.GetSEQ("MES_STEPREPORTDET_seq");
+                    sql.Clear();
+                    sql.Append("insert into MES_STEPREPORTdet (MSD_ID,MSD_MSID,MSD_BADNAME ,MSD_QTY,");
+                    sql.Append("MSD_INDATE,MSD_STATUS,MSD_STEPCODE");
+                    sql.Append(") values(" + msdid + "," + msid + ",'" + comBoxWithFocus1.Text + "',");
+                    sql.Append("'" + ng + "',sysdate,'0','" + User.CurrentStepCode + "')");
+                    dh.ExecuteSql(sql.GetString(), "insert");
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "工序不良报工", "现象:" + comBoxWithFocus1.Text + ",数量:" + ng + "", "", "");
+                    FillDataGridView();
+                    comBoxWithFocus1.Text = "";
+                    ngqty.Text = "";
+                }
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.Message);
+            }
+        }
+
+
 
-        //try
-        //{
-        //    if (comBoxWithFocus1.Text == "" || ngqty.Text == "")
-        //    {
-        //        MessageBox.Show("必填项为空");
-        //        return;
-        //    }
-        //    double ng = double.Parse(ngqty.Text);
-        //    double nowng = double.Parse(dh.getFieldDataByCondition("MES_STEPREPORTdet", "nvl(sum(msd_qty),0)", " msd_msid = '" + msid + "' and msd_stepcode = '" + User.CurrentStepCode + "' and msd_status = 0 ").ToString());
-        //    if (nowng + double.Parse(ngqty.Text) > badqty)
-        //    {
-        //        MessageBox.Show("已录入不良" + nowng + "+待录入不良" + ng + "大于不良总数" + badqty + "");
-        //        return;
-        //    }
-        //    else
-        //    {
-        //        string msdid = dh.GetSEQ("MES_STEPREPORTDET_seq");
-        //        sql.Clear();
-        //        sql.Append("insert into MES_STEPREPORTdet (MSD_ID,MSD_MSID,MSD_BADNAME ,MSD_QTY,");
-        //        sql.Append("MSD_INDATE,MSD_STATUS,MSD_STEPCODE");
-        //        sql.Append(") values(" + msdid + "," + msd_id + ",'" + comBoxWithFocus1.Text + "',");
-        //        sql.Append("'" + ng + "',sysdate,'0','" + User.CurrentStepCode + "')");
-        //        dh.ExecuteSql(sql.GetString(), "insert");
-        //        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "工序不良报工", "现象:" + comBoxWithFocus1.Text + ",数量:" + ng + "", "", "");
-        //        FillDataGridView();
-        //        comBoxWithFocus1.Text = "";
-        //        ngqty.Text = "";
-        //    }
-        //}
-        //catch (Exception ex)
-        //{
-        //    Console.WriteLine(ex.Message);
-        //}
     }
 }

+ 24 - 23
UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -83,6 +83,8 @@ namespace UAS_MES_NEW.Make
             this.label12 = new System.Windows.Forms.Label();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
             this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
+            this.lastsn = new System.Windows.Forms.Label();
+            this.lastresult = new System.Windows.Forms.Label();
             this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
@@ -113,8 +115,6 @@ namespace UAS_MES_NEW.Make
             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.lastsn = new System.Windows.Forms.Label();
-            this.lastresult = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).BeginInit();
             this.SuspendLayout();
@@ -632,6 +632,25 @@ namespace UAS_MES_NEW.Make
             this.ob_nowcheckqty_label.TabIndex = 219;
             this.ob_nowcheckqty_label.Text = "当前批数";
             // 
+            // lastsn
+            // 
+            this.lastsn.AutoSize = true;
+            this.lastsn.Font = new System.Drawing.Font("宋体", 25F, System.Drawing.FontStyle.Bold);
+            this.lastsn.Location = new System.Drawing.Point(499, 291);
+            this.lastsn.Name = "lastsn";
+            this.lastsn.Size = new System.Drawing.Size(0, 50);
+            this.lastsn.TabIndex = 225;
+            // 
+            // lastresult
+            // 
+            this.lastresult.AutoSize = true;
+            this.lastresult.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Bold);
+            this.lastresult.ForeColor = System.Drawing.Color.Red;
+            this.lastresult.Location = new System.Drawing.Point(681, 363);
+            this.lastresult.Name = "lastresult";
+            this.lastresult.Size = new System.Drawing.Size(0, 60);
+            this.lastresult.TabIndex = 226;
+            // 
             // ob_sendqty
             // 
             this.ob_sendqty.AutoSize = true;
@@ -711,7 +730,7 @@ namespace UAS_MES_NEW.Make
             this.mcd_okqty.AutoSize = true;
             this.mcd_okqty.CutLength = null;
             this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty.Location = new System.Drawing.Point(1039, 89);
+            this.mcd_okqty.Location = new System.Drawing.Point(1013, 89);
             this.mcd_okqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_okqty.MaximumSize = new System.Drawing.Size(225, 0);
             this.mcd_okqty.Name = "mcd_okqty";
@@ -799,7 +818,7 @@ namespace UAS_MES_NEW.Make
             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(1036, 32);
+            this.mcd_inqty.Location = new System.Drawing.Point(1010, 32);
             this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty.MaximumSize = new System.Drawing.Size(225, 0);
             this.mcd_inqty.Name = "mcd_inqty";
@@ -887,6 +906,7 @@ namespace UAS_MES_NEW.Make
             this.bc_code.Str2 = null;
             this.bc_code.TabIndex = 70;
             this.bc_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bc_code_KeyDown);
+            this.bc_code.KeyUp += new System.Windows.Forms.KeyEventHandler(this.bc_code_KeyUp);
             // 
             // ma_code
             // 
@@ -1056,25 +1076,6 @@ namespace UAS_MES_NEW.Make
             this.ms_sncode.Tag = "IfRead";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown);
             // 
-            // lastsn
-            // 
-            this.lastsn.AutoSize = true;
-            this.lastsn.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
-            this.lastsn.Location = new System.Drawing.Point(566, 291);
-            this.lastsn.Name = "lastsn";
-            this.lastsn.Size = new System.Drawing.Size(0, 30);
-            this.lastsn.TabIndex = 225;
-            // 
-            // lastresult
-            // 
-            this.lastresult.AutoSize = true;
-            this.lastresult.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
-            this.lastresult.ForeColor = System.Drawing.Color.Red;
-            this.lastresult.Location = new System.Drawing.Point(681, 363);
-            this.lastresult.Name = "lastresult";
-            this.lastresult.Size = new System.Drawing.Size(0, 30);
-            this.lastresult.TabIndex = 226;
-            // 
             // Make_TestCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);

+ 48 - 30
UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.cs

@@ -202,7 +202,13 @@ namespace UAS_MES_NEW.Make
                     OperateResult.AppendText(">>采集人员编号"+ biduisn.Text+"\n", Color.Green, ms_sncode);
                     return;
                 }
-
+                if (ms_sncode.Text.Contains("CHANGE:"))
+                {
+                    GoodProduct.Checked = !GoodProduct.Checked;
+                    Reject.Checked = !GoodProduct.Checked;
+                    OperateResult.AppendText(">>切换良品不良采集\n", Color.Black, ms_sncode);
+                    return;
+                }
                 if (bidui.Checked && biduisn.Text =="")
                 {
                     OperateResult.AppendText(">>勾选人员采集需先采集人员\n", Color.Red, ms_sncode);
@@ -365,7 +371,7 @@ namespace UAS_MES_NEW.Make
             {
                 LoadBadCodeListView();
                 LoadChoosedBadListView();
-                OperateResult.AppendText(">>请采集不良代码\n", Color.Green);
+                OperateResult.AppendText(">>请采集不良代码\n", Color.Black);
                 bc_code.Focus();
             }
             else if (GoodProduct.Checked)
@@ -577,34 +583,36 @@ namespace UAS_MES_NEW.Make
                 //normalButton1_Click(this, e);
                 if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, biduisn.Text == "" ? User.UserCode : biduisn.Text, User.UserSourceCode, "检查未通过", bgcode, bccode, bgname, bcname, bcremark, out ErrorMessage))
                 {
-                    //存在的不良代码和
-                    dt = (DataTable)dh.ExecuteSql("select sr_badcode from STEPRETURN where sr_stepcode='" + User.CurrentStepCode + "'", "select");
-                    if (dt.Rows.Count > 0)
+
+                    for (int i = 0; i < bccode.Length; i++)
                     {
-                        int BadCodeInStep = 0;
-                        string badname = "";
-                        for (int i = 0; i < dt.Rows.Count; i++)
-                        {
-                            for (int j = 0; j < bccode.Length; j++)
-                            {
-                                if (dt.Rows[i]["sr_badcode"].ToString() == bccode[j])
-                                {
-                                    badname += "[" + bcname[j] + "]";
-                                    BadCodeInStep += 1;
-                                }
-                            }
-                        }
-                        //选中的不良代码必须全在工序默认的不良代码中才通过判断
-                        if (BadCodeInStep == bccode.Length)
+                        if (dh.CheckExist("badgroupdetail left join badgroup on bgd_bgid = bg_id", "bgd_badcode = '" + bccode[i] + "' and bg_code = '" + bgcode[i] + "' and  bgd_brcode is not null and  bgd_dutycode is not null and bgd_solutioncode is not null "))
                         {
-                            dh.UpdateByCondition("makebad", "mb_status=-1", "mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and mb_stepcode='" + User.CurrentStepCode + "'");
-                            dh.UpdateByCondition("makeserial", "ms_stepcode='',ms_status=1,ms_nextstepcode='" + User.CurrentStepCode + "'", "ms_id='" + oMSID + "'");
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "快速维修成功", "快速维修", "", ob_checkno.Text);
-                            OperateResult.AppendText(">>本次采集不良代码" + badname + "存在于本工序" + User.CurrentStepCode + "中,请解除故障后重新测试本站\n", Color.Black);
+                            string makebadid = dh.getFieldDataByCondition("makebad", "mb_id", "mb_sncode = '" + ms_sncode.Text + "' and mb_makecode = '" + ma_code.Text + "' and mb_badcode = '" + bccode[i] + "' order by mb_id desc").ToString();
+                            DataTable temp = dh.getFieldsDatasByCondition(" badgroupdetail left join badgroup on bgd_bgid = bg_id  left join QUA_NGReason on nr_code = bgd_brcode left join QUA_NGReasonGroup on nrg_code = bgd_brgcode left join NGDuty on nd_code = bgd_dutycode left join solution on so_code = bgd_solutioncode", new string[] { "bgd_brgcode", "bgd_dutycode", "bgd_solutioncode", "bgd_brcode", "nrg_name", "nr_name", "nd_name", "so_name" }, "bgd_badcode= '" + bccode[i] + "' and bg_code = '" + bgcode[i] + "'");
+                            string bgd_brgcode = temp.Rows[0]["bgd_brgcode"].ToString();
+                            string bgd_brcode = temp.Rows[0]["bgd_brcode"].ToString();
+                            string bgd_dutycode = temp.Rows[0]["bgd_dutycode"].ToString();
+                            string bgd_solutioncode = temp.Rows[0]["bgd_solutioncode"].ToString();
+
+                            string mbr_id = dh.GetSEQ("makebadreason_seq");
+
+                            string bgd_brgname = temp.Rows[0]["nrg_name"].ToString();
+                            string bgd_brname = temp.Rows[0]["nr_name"].ToString();
+                            string bgd_dutyname = temp.Rows[0]["nd_name"].ToString();
+                            string bgd_solutionname = temp.Rows[0]["so_name"].ToString();
+
+                            sql.Clear();
+                            sql.Append("insert into makebadreason (mbr_mbid,mbr_id,mbr_brcode,mbr_solutioncode,");
+                            sql.Append("mbr_dutycode,mbr_brgcode,mbr_badcode,mbr_sncode,mbr_makecode,mbr_indate,");
+                            sql.Append("mbr_inman,mbr_brname,mbr_solutionname,mbr_badname,mbr_brgname,mbr_dutyname) select '" + makebadid + "','" + mbr_id + "','" + bgd_brcode + "',");
+                            sql.Append("'" + bgd_solutioncode + "','" + bgd_dutycode + "','" + bgd_brgcode + "','" + bccode[i] + "',");
+                            sql.Append("'" + ms_sncode.Text + "','" + ma_code.Text + "',sysdate,'" + User.UserCode + "','" + bgd_brname + "','" + bgd_solutionname + "','" + bcname[i] + "','" + bgd_brgname + "','" + bgd_dutyname + "' from dual");
+                            dh.ExecuteSql(sql.GetString(), "insert");
                         }
-                        else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
-                    }
-                    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                   }
+
+                    OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.OrangeRed);
                     lastsn.Text = ms_sncode.Text;
                     lastresult.Text = "FAILED";
                     lastresult.ForeColor = Color.Red;
@@ -656,6 +664,7 @@ namespace UAS_MES_NEW.Make
                 }
                 else OperateResult.AppendText(">>" + bc_code.Text + "不良代码不存在\n", Color.Red, bc_code);
             }
+
         }
 
         private void LoadCheckQTY()
@@ -690,11 +699,11 @@ namespace UAS_MES_NEW.Make
                 batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
                 if (nowcheckqty == batchqty)
                 {
-                    ob_nowcheckqty.ForeColor = Color.Red;
-                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.Red);
+                    //ob_nowcheckqty.ForeColor = Color.Red;
+                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.Black);
                     if (AutoCut)
                     {
-                        OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.Blue);
+                        OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动送检成功\n", Color.Blue);
                     }
                 }
             }
@@ -1068,5 +1077,14 @@ namespace UAS_MES_NEW.Make
                 }
             }
         }
+
+        private void bc_code_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Add && Save.Visible)
+            {
+                Save_Click(sender, e);
+                bc_code.Clear();
+            }
+        }
     }
 }

+ 4 - 0
UAS_MES_ZT/FunctionCode/OQC/OQC_PlanMaintain.cs

@@ -77,6 +77,10 @@ namespace UAS_MES_NEW.OQC
                         ob_checkno.Text = temp.Rows[0]["ms_reworkcheckno"].ToString();
                     }
                 }
+                if (ms_sncode.Text != "")
+                {
+                    ob_checkno.Text = "";
+                }
                 DataTable[] dt = LogicHandler.GetOQCBatch(ms_sncode.Text, obd_outboxcode.Text, ob_checkno.Text, "OQCPlanMaintain", out ErrorMessage);
                 if (dt != null)
                 {

+ 199 - 143
UAS_MES_ZT/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -57,6 +57,12 @@
             this.ob_prodcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_makecode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ChoosedDGV = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewExpand();
+            this.choose1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.or_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bg_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bg_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.WaitChooseDGV = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
             this.ChooseAll = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.bg_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -96,12 +102,7 @@
             this.Filter = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.BadInfoSource = new System.Windows.Forms.BindingSource(this.components);
             this.label2 = new System.Windows.Forms.Label();
-            this.choose1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.or_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bg_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bg_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.checkBox1 = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -114,9 +115,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_checkno_label.AutoSize = true;
             this.ob_checkno_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno_label.Location = new System.Drawing.Point(13, 26);
+            this.ob_checkno_label.Location = new System.Drawing.Point(20, 39);
+            this.ob_checkno_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_checkno_label.Name = "ob_checkno_label";
-            this.ob_checkno_label.Size = new System.Drawing.Size(58, 21);
+            this.ob_checkno_label.Size = new System.Drawing.Size(86, 31);
             this.ob_checkno_label.TabIndex = 156;
             this.ob_checkno_label.Text = "抽检批";
             // 
@@ -126,9 +128,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.obd_outboxcode_label.AutoSize = true;
             this.obd_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.obd_outboxcode_label.Location = new System.Drawing.Point(13, 58);
+            this.obd_outboxcode_label.Location = new System.Drawing.Point(20, 87);
+            this.obd_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.obd_outboxcode_label.Name = "obd_outboxcode_label";
-            this.obd_outboxcode_label.Size = new System.Drawing.Size(42, 21);
+            this.obd_outboxcode_label.Size = new System.Drawing.Size(62, 31);
             this.obd_outboxcode_label.TabIndex = 154;
             this.obd_outboxcode_label.Text = "箱号";
             // 
@@ -138,9 +141,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(13, 92);
+            this.ms_sncode_label.Location = new System.Drawing.Point(20, 138);
+            this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_sncode_label.Name = "ms_sncode_label";
-            this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
+            this.ms_sncode_label.Size = new System.Drawing.Size(86, 31);
             this.ms_sncode_label.TabIndex = 152;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -150,9 +154,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.bc_code_label.AutoSize = true;
             this.bc_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_code_label.Location = new System.Drawing.Point(807, 171);
+            this.bc_code_label.Location = new System.Drawing.Point(1210, 256);
+            this.bc_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_code_label.Name = "bc_code_label";
-            this.bc_code_label.Size = new System.Drawing.Size(74, 21);
+            this.bc_code_label.Size = new System.Drawing.Size(110, 31);
             this.bc_code_label.TabIndex = 177;
             this.bc_code_label.Text = "不良代码";
             // 
@@ -162,9 +167,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             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(807, 41);
+            this.label1.Location = new System.Drawing.Point(1210, 62);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(58, 21);
+            this.label1.Size = new System.Drawing.Size(86, 31);
             this.label1.TabIndex = 179;
             this.label1.Text = "实批数";
             // 
@@ -174,9 +180,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             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(807, 139);
+            this.label4.Location = new System.Drawing.Point(1210, 208);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(74, 21);
+            this.label4.Size = new System.Drawing.Size(110, 31);
             this.label4.TabIndex = 185;
             this.label4.Text = "不合格数";
             // 
@@ -186,9 +193,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             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(807, 105);
+            this.label5.Location = new System.Drawing.Point(1210, 158);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(58, 21);
+            this.label5.Size = new System.Drawing.Size(86, 31);
             this.label5.TabIndex = 187;
             this.label5.Text = "合格数";
             // 
@@ -198,9 +206,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.oi_sampleqty_label.AutoSize = true;
             this.oi_sampleqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.oi_sampleqty_label.Location = new System.Drawing.Point(807, 72);
+            this.oi_sampleqty_label.Location = new System.Drawing.Point(1210, 108);
+            this.oi_sampleqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.oi_sampleqty_label.Name = "oi_sampleqty_label";
-            this.oi_sampleqty_label.Size = new System.Drawing.Size(58, 21);
+            this.oi_sampleqty_label.Size = new System.Drawing.Size(86, 31);
             this.oi_sampleqty_label.TabIndex = 189;
             this.oi_sampleqty_label.Text = "样本数";
             // 
@@ -208,9 +217,10 @@
             // 
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(466, 174);
+            this.label9.Location = new System.Drawing.Point(699, 261);
+            this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(106, 21);
+            this.label9.Size = new System.Drawing.Size(158, 31);
             this.label9.TabIndex = 192;
             this.label9.Text = "待选不良分组";
             // 
@@ -220,9 +230,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.sncode_label.AutoSize = true;
             this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sncode_label.Location = new System.Drawing.Point(13, 531);
+            this.sncode_label.Location = new System.Drawing.Point(20, 796);
+            this.sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.sncode_label.Name = "sncode_label";
-            this.sncode_label.Size = new System.Drawing.Size(58, 21);
+            this.sncode_label.Size = new System.Drawing.Size(86, 31);
             this.sncode_label.TabIndex = 200;
             this.sncode_label.Text = "序列号";
             // 
@@ -232,9 +243,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_remark_label.AutoSize = true;
             this.ob_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_remark_label.Location = new System.Drawing.Point(13, 565);
+            this.ob_remark_label.Location = new System.Drawing.Point(20, 848);
+            this.ob_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_remark_label.Name = "ob_remark_label";
-            this.ob_remark_label.Size = new System.Drawing.Size(42, 21);
+            this.ob_remark_label.Size = new System.Drawing.Size(62, 31);
             this.ob_remark_label.TabIndex = 202;
             this.ob_remark_label.Text = "备注";
             // 
@@ -244,9 +256,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.obd_makecode_label.AutoSize = true;
             this.obd_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.obd_makecode_label.Location = new System.Drawing.Point(13, 128);
+            this.obd_makecode_label.Location = new System.Drawing.Point(20, 192);
+            this.obd_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.obd_makecode_label.Name = "obd_makecode_label";
-            this.obd_makecode_label.Size = new System.Drawing.Size(58, 21);
+            this.obd_makecode_label.Size = new System.Drawing.Size(86, 31);
             this.obd_makecode_label.TabIndex = 206;
             this.obd_makecode_label.Text = "工单号";
             // 
@@ -254,18 +267,20 @@
             // 
             this.ob_prodcode_label.AutoSize = true;
             this.ob_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_prodcode_label.Location = new System.Drawing.Point(240, 128);
+            this.ob_prodcode_label.Location = new System.Drawing.Point(360, 192);
+            this.ob_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_prodcode_label.Name = "ob_prodcode_label";
-            this.ob_prodcode_label.Size = new System.Drawing.Size(74, 21);
+            this.ob_prodcode_label.Size = new System.Drawing.Size(110, 31);
             this.ob_prodcode_label.TabIndex = 208;
             this.ob_prodcode_label.Text = "产品编号";
             // 
             // ob_status
             // 
             this.ob_status.AutoSize = true;
-            this.ob_status.Location = new System.Drawing.Point(15, 9);
+            this.ob_status.Location = new System.Drawing.Point(22, 14);
+            this.ob_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_status.Name = "ob_status";
-            this.ob_status.Size = new System.Drawing.Size(0, 12);
+            this.ob_status.Size = new System.Drawing.Size(0, 18);
             this.ob_status.TabIndex = 212;
             this.ob_status.Visible = false;
             // 
@@ -275,9 +290,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_aqlcode_label.AutoSize = true;
             this.ob_aqlcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_aqlcode_label.Location = new System.Drawing.Point(807, 7);
+            this.ob_aqlcode_label.Location = new System.Drawing.Point(1210, 10);
+            this.ob_aqlcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_aqlcode_label.Name = "ob_aqlcode_label";
-            this.ob_aqlcode_label.Size = new System.Drawing.Size(42, 21);
+            this.ob_aqlcode_label.Size = new System.Drawing.Size(63, 31);
             this.ob_aqlcode_label.TabIndex = 214;
             this.ob_aqlcode_label.Text = "AQL";
             // 
@@ -287,9 +303,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_maxngacceptqty_label.AutoSize = true;
             this.ob_maxngacceptqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_maxngacceptqty_label.Location = new System.Drawing.Point(641, 7);
+            this.ob_maxngacceptqty_label.Location = new System.Drawing.Point(962, 10);
+            this.ob_maxngacceptqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_maxngacceptqty_label.Name = "ob_maxngacceptqty_label";
-            this.ob_maxngacceptqty_label.Size = new System.Drawing.Size(138, 21);
+            this.ob_maxngacceptqty_label.Size = new System.Drawing.Size(206, 31);
             this.ob_maxngacceptqty_label.TabIndex = 216;
             this.ob_maxngacceptqty_label.Text = "最大不合格通过数";
             // 
@@ -299,19 +316,19 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_projectcode_label.AutoSize = true;
             this.ob_projectcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_projectcode_label.Location = new System.Drawing.Point(641, 72);
+            this.ob_projectcode_label.Location = new System.Drawing.Point(962, 108);
+            this.ob_projectcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_projectcode_label.Name = "ob_projectcode_label";
-            this.ob_projectcode_label.Size = new System.Drawing.Size(74, 21);
+            this.ob_projectcode_label.Size = new System.Drawing.Size(110, 31);
             this.ob_projectcode_label.TabIndex = 218;
             this.ob_projectcode_label.Text = "检验方案";
             // 
             // BadGroupCode
             // 
             this.BadGroupCode.FormattingEnabled = true;
-            this.BadGroupCode.Location = new System.Drawing.Point(570, 177);
-            this.BadGroupCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.BadGroupCode.Location = new System.Drawing.Point(855, 266);
             this.BadGroupCode.Name = "BadGroupCode";
-            this.BadGroupCode.Size = new System.Drawing.Size(131, 20);
+            this.BadGroupCode.Size = new System.Drawing.Size(194, 26);
             this.BadGroupCode.TabIndex = 219;
             this.BadGroupCode.SelectedIndexChanged += new System.EventHandler(this.BadGroupCode_SelectedIndexChanged);
             // 
@@ -320,10 +337,11 @@
             this.ob_maxngacceptqty.AllPower = null;
             this.ob_maxngacceptqty.BackColor = System.Drawing.Color.White;
             this.ob_maxngacceptqty.ID = null;
-            this.ob_maxngacceptqty.Location = new System.Drawing.Point(645, 41);
+            this.ob_maxngacceptqty.Location = new System.Drawing.Point(968, 62);
+            this.ob_maxngacceptqty.Margin = new System.Windows.Forms.Padding(4);
             this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
             this.ob_maxngacceptqty.Power = null;
-            this.ob_maxngacceptqty.Size = new System.Drawing.Size(146, 21);
+            this.ob_maxngacceptqty.Size = new System.Drawing.Size(217, 28);
             this.ob_maxngacceptqty.Str = null;
             this.ob_maxngacceptqty.Str1 = null;
             this.ob_maxngacceptqty.Str2 = null;
@@ -336,10 +354,11 @@
             this.ob_aqlcode.BackColor = System.Drawing.Color.White;
             this.ob_aqlcode.Enabled = false;
             this.ob_aqlcode.ID = null;
-            this.ob_aqlcode.Location = new System.Drawing.Point(908, 7);
+            this.ob_aqlcode.Location = new System.Drawing.Point(1362, 10);
+            this.ob_aqlcode.Margin = new System.Windows.Forms.Padding(4);
             this.ob_aqlcode.Name = "ob_aqlcode";
             this.ob_aqlcode.Power = null;
-            this.ob_aqlcode.Size = new System.Drawing.Size(146, 21);
+            this.ob_aqlcode.Size = new System.Drawing.Size(217, 28);
             this.ob_aqlcode.Str = null;
             this.ob_aqlcode.Str1 = null;
             this.ob_aqlcode.Str2 = null;
@@ -352,10 +371,11 @@
             this.ob_projectcode.BackColor = System.Drawing.Color.White;
             this.ob_projectcode.Enabled = false;
             this.ob_projectcode.ID = null;
-            this.ob_projectcode.Location = new System.Drawing.Point(645, 106);
+            this.ob_projectcode.Location = new System.Drawing.Point(968, 159);
+            this.ob_projectcode.Margin = new System.Windows.Forms.Padding(4);
             this.ob_projectcode.Name = "ob_projectcode";
             this.ob_projectcode.Power = null;
-            this.ob_projectcode.Size = new System.Drawing.Size(146, 21);
+            this.ob_projectcode.Size = new System.Drawing.Size(217, 28);
             this.ob_projectcode.Str = null;
             this.ob_projectcode.Str1 = null;
             this.ob_projectcode.Str2 = null;
@@ -370,12 +390,13 @@
             this.Clean.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1012, 569);
+            this.Clean.Location = new System.Drawing.Point(1518, 854);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(48, 24);
+            this.Clean.Size = new System.Drawing.Size(72, 36);
             this.Clean.TabIndex = 211;
             this.Clean.Tag = "OQC!Inspection";
             this.Clean.Text = "清除";
@@ -385,9 +406,10 @@
             // 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(687, 470);
+            this.OperateResult.Location = new System.Drawing.Point(1030, 705);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(320, 123);
+            this.OperateResult.Size = new System.Drawing.Size(478, 182);
             this.OperateResult.TabIndex = 210;
             this.OperateResult.Text = "";
             // 
@@ -397,10 +419,11 @@
             this.ob_prodcode.BackColor = System.Drawing.Color.White;
             this.ob_prodcode.Enabled = false;
             this.ob_prodcode.ID = null;
-            this.ob_prodcode.Location = new System.Drawing.Point(345, 131);
+            this.ob_prodcode.Location = new System.Drawing.Point(518, 196);
+            this.ob_prodcode.Margin = new System.Windows.Forms.Padding(4);
             this.ob_prodcode.Name = "ob_prodcode";
             this.ob_prodcode.Power = null;
-            this.ob_prodcode.Size = new System.Drawing.Size(116, 21);
+            this.ob_prodcode.Size = new System.Drawing.Size(172, 28);
             this.ob_prodcode.Str = null;
             this.ob_prodcode.Str1 = null;
             this.ob_prodcode.Str2 = null;
@@ -413,10 +436,11 @@
             this.ob_makecode.BackColor = System.Drawing.Color.White;
             this.ob_makecode.Enabled = false;
             this.ob_makecode.ID = null;
-            this.ob_makecode.Location = new System.Drawing.Point(95, 131);
+            this.ob_makecode.Location = new System.Drawing.Point(142, 196);
+            this.ob_makecode.Margin = new System.Windows.Forms.Padding(4);
             this.ob_makecode.Name = "ob_makecode";
             this.ob_makecode.Power = null;
-            this.ob_makecode.Size = new System.Drawing.Size(116, 21);
+            this.ob_makecode.Size = new System.Drawing.Size(172, 28);
             this.ob_makecode.Str = null;
             this.ob_makecode.Str1 = null;
             this.ob_makecode.Str2 = null;
@@ -434,13 +458,58 @@
             this.bg_code1,
             this.bc_code1,
             this.bc_name1});
-            this.ChoosedDGV.Location = new System.Drawing.Point(810, 204);
+            this.ChoosedDGV.Location = new System.Drawing.Point(1215, 306);
+            this.ChoosedDGV.Margin = new System.Windows.Forms.Padding(4);
             this.ChoosedDGV.Name = "ChoosedDGV";
             this.ChoosedDGV.RowHeadersWidth = 20;
             this.ChoosedDGV.RowTemplate.Height = 23;
-            this.ChoosedDGV.Size = new System.Drawing.Size(244, 257);
+            this.ChoosedDGV.Size = new System.Drawing.Size(366, 386);
             this.ChoosedDGV.TabIndex = 205;
             // 
+            // choose1
+            // 
+            this.choose1.HeaderText = "勾选";
+            this.choose1.MinimumWidth = 50;
+            this.choose1.Name = "choose1";
+            this.choose1.Width = 50;
+            // 
+            // or_id
+            // 
+            this.or_id.DataPropertyName = "or_id";
+            this.or_id.HeaderText = "or_id";
+            this.or_id.Name = "or_id";
+            this.or_id.Visible = false;
+            // 
+            // bg_name1
+            // 
+            this.bg_name1.DataPropertyName = "bg_name";
+            this.bg_name1.HeaderText = "不良组别名称";
+            this.bg_name1.Name = "bg_name1";
+            this.bg_name1.Visible = false;
+            // 
+            // bg_code1
+            // 
+            this.bg_code1.DataPropertyName = "bg_code";
+            this.bg_code1.HeaderText = "不良组别编号";
+            this.bg_code1.Name = "bg_code1";
+            this.bg_code1.Visible = false;
+            // 
+            // bc_code1
+            // 
+            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.bc_code1.DataPropertyName = "bc_code";
+            this.bc_code1.HeaderText = "不良代码";
+            this.bc_code1.Name = "bc_code1";
+            this.bc_code1.ReadOnly = true;
+            // 
+            // bc_name1
+            // 
+            this.bc_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.bc_name1.DataPropertyName = "bc_name";
+            this.bc_name1.HeaderText = "不良名称 ";
+            this.bc_name1.Name = "bc_name1";
+            this.bc_name1.ReadOnly = true;
+            // 
             // WaitChooseDGV
             // 
             this.WaitChooseDGV.AllowUserToAddRows = false;
@@ -451,11 +520,12 @@
             this.bg_code,
             this.bc_code,
             this.bc_name});
-            this.WaitChooseDGV.Location = new System.Drawing.Point(472, 204);
+            this.WaitChooseDGV.Location = new System.Drawing.Point(708, 306);
+            this.WaitChooseDGV.Margin = new System.Windows.Forms.Padding(4);
             this.WaitChooseDGV.Name = "WaitChooseDGV";
             this.WaitChooseDGV.RowHeadersWidth = 20;
             this.WaitChooseDGV.RowTemplate.Height = 23;
-            this.WaitChooseDGV.Size = new System.Drawing.Size(268, 256);
+            this.WaitChooseDGV.Size = new System.Drawing.Size(402, 384);
             this.WaitChooseDGV.TabIndex = 204;
             this.WaitChooseDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.WaitChooseDGV_DataError);
             // 
@@ -503,10 +573,11 @@
             this.ob_remark.AllPower = null;
             this.ob_remark.BackColor = System.Drawing.Color.White;
             this.ob_remark.ID = null;
-            this.ob_remark.Location = new System.Drawing.Point(92, 567);
+            this.ob_remark.Location = new System.Drawing.Point(138, 850);
+            this.ob_remark.Margin = new System.Windows.Forms.Padding(4);
             this.ob_remark.Name = "ob_remark";
             this.ob_remark.Power = null;
-            this.ob_remark.Size = new System.Drawing.Size(366, 21);
+            this.ob_remark.Size = new System.Drawing.Size(547, 28);
             this.ob_remark.Str = null;
             this.ob_remark.Str1 = null;
             this.ob_remark.Str2 = null;
@@ -518,10 +589,11 @@
             this.sncode.AllPower = null;
             this.sncode.BackColor = System.Drawing.Color.White;
             this.sncode.ID = null;
-            this.sncode.Location = new System.Drawing.Point(92, 534);
+            this.sncode.Location = new System.Drawing.Point(138, 801);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4);
             this.sncode.Name = "sncode";
             this.sncode.Power = null;
-            this.sncode.Size = new System.Drawing.Size(366, 21);
+            this.sncode.Size = new System.Drawing.Size(547, 28);
             this.sncode.Str = null;
             this.sncode.Str1 = null;
             this.sncode.Str2 = null;
@@ -543,11 +615,12 @@
             this.oi_leveldefect,
             this.ois_remark,
             this.ois_status});
-            this.CheckTypeDGV.Location = new System.Drawing.Point(16, 171);
+            this.CheckTypeDGV.Location = new System.Drawing.Point(24, 256);
+            this.CheckTypeDGV.Margin = new System.Windows.Forms.Padding(4);
             this.CheckTypeDGV.Name = "CheckTypeDGV";
             this.CheckTypeDGV.RowHeadersWidth = 20;
             this.CheckTypeDGV.RowTemplate.Height = 23;
-            this.CheckTypeDGV.Size = new System.Drawing.Size(442, 332);
+            this.CheckTypeDGV.Size = new System.Drawing.Size(663, 498);
             this.CheckTypeDGV.TabIndex = 198;
             this.CheckTypeDGV.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.CheckTypeDGV_CellValueChanged);
             this.CheckTypeDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.CheckTypeDGV_DataError);
@@ -594,7 +667,7 @@
             this.oi_checkqty.HeaderText = "已检数";
             this.oi_checkqty.Name = "oi_checkqty";
             this.oi_checkqty.ReadOnly = true;
-            this.oi_checkqty.Width = 66;
+            this.oi_checkqty.Width = 98;
             // 
             // oi_ng
             // 
@@ -631,9 +704,10 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(750, 295);
+            this.ChooseedReject.Location = new System.Drawing.Point(1125, 442);
+            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4);
             this.ChooseedReject.Name = "ChooseedReject";
-            this.ChooseedReject.Size = new System.Drawing.Size(50, 23);
+            this.ChooseedReject.Size = new System.Drawing.Size(75, 34);
             this.ChooseedReject.TabIndex = 195;
             this.ChooseedReject.UseVisualStyleBackColor = true;
             this.ChooseedReject.Click += new System.EventHandler(this.ChooseedReject_Click);
@@ -641,9 +715,10 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(750, 354);
+            this.WaitReject.Location = new System.Drawing.Point(1125, 531);
+            this.WaitReject.Margin = new System.Windows.Forms.Padding(4);
             this.WaitReject.Name = "WaitReject";
-            this.WaitReject.Size = new System.Drawing.Size(50, 23);
+            this.WaitReject.Size = new System.Drawing.Size(75, 34);
             this.WaitReject.TabIndex = 194;
             this.WaitReject.UseVisualStyleBackColor = true;
             this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
@@ -654,10 +729,11 @@
             this.oi_checkqty1.BackColor = System.Drawing.Color.White;
             this.oi_checkqty1.Enabled = false;
             this.oi_checkqty1.ID = null;
-            this.oi_checkqty1.Location = new System.Drawing.Point(908, 73);
+            this.oi_checkqty1.Location = new System.Drawing.Point(1362, 110);
+            this.oi_checkqty1.Margin = new System.Windows.Forms.Padding(4);
             this.oi_checkqty1.Name = "oi_checkqty1";
             this.oi_checkqty1.Power = null;
-            this.oi_checkqty1.Size = new System.Drawing.Size(147, 21);
+            this.oi_checkqty1.Size = new System.Drawing.Size(218, 28);
             this.oi_checkqty1.Str = null;
             this.oi_checkqty1.Str1 = null;
             this.oi_checkqty1.Str2 = null;
@@ -670,10 +746,11 @@
             this.ob_okqty.BackColor = System.Drawing.Color.White;
             this.ob_okqty.Enabled = false;
             this.ob_okqty.ID = null;
-            this.ob_okqty.Location = new System.Drawing.Point(908, 106);
+            this.ob_okqty.Location = new System.Drawing.Point(1362, 159);
+            this.ob_okqty.Margin = new System.Windows.Forms.Padding(4);
             this.ob_okqty.Name = "ob_okqty";
             this.ob_okqty.Power = null;
-            this.ob_okqty.Size = new System.Drawing.Size(147, 21);
+            this.ob_okqty.Size = new System.Drawing.Size(218, 28);
             this.ob_okqty.Str = null;
             this.ob_okqty.Str1 = null;
             this.ob_okqty.Str2 = null;
@@ -686,10 +763,11 @@
             this.ob_ngqty.BackColor = System.Drawing.Color.White;
             this.ob_ngqty.Enabled = false;
             this.ob_ngqty.ID = null;
-            this.ob_ngqty.Location = new System.Drawing.Point(908, 140);
+            this.ob_ngqty.Location = new System.Drawing.Point(1362, 210);
+            this.ob_ngqty.Margin = new System.Windows.Forms.Padding(4);
             this.ob_ngqty.Name = "ob_ngqty";
             this.ob_ngqty.Power = null;
-            this.ob_ngqty.Size = new System.Drawing.Size(147, 21);
+            this.ob_ngqty.Size = new System.Drawing.Size(218, 28);
             this.ob_ngqty.Str = null;
             this.ob_ngqty.Str1 = null;
             this.ob_ngqty.Str2 = null;
@@ -702,10 +780,11 @@
             this.ob_nowcheckqty.BackColor = System.Drawing.Color.White;
             this.ob_nowcheckqty.Enabled = false;
             this.ob_nowcheckqty.ID = null;
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(908, 42);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(1362, 63);
+            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Power = null;
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(147, 21);
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(218, 28);
             this.ob_nowcheckqty.Str = null;
             this.ob_nowcheckqty.Str1 = null;
             this.ob_nowcheckqty.Str2 = null;
@@ -717,10 +796,11 @@
             this.bccode.AllPower = null;
             this.bccode.BackColor = System.Drawing.Color.White;
             this.bccode.ID = null;
-            this.bccode.Location = new System.Drawing.Point(908, 175);
+            this.bccode.Location = new System.Drawing.Point(1362, 262);
+            this.bccode.Margin = new System.Windows.Forms.Padding(4);
             this.bccode.Name = "bccode";
             this.bccode.Power = null;
-            this.bccode.Size = new System.Drawing.Size(147, 21);
+            this.bccode.Size = new System.Drawing.Size(218, 28);
             this.bccode.Str = null;
             this.bccode.Str1 = null;
             this.bccode.Str2 = null;
@@ -736,12 +816,13 @@
             this.GetBatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GetBatch.Image = ((System.Drawing.Image)(resources.GetObject("GetBatch.Image")));
             this.GetBatch.IsShowBorder = true;
-            this.GetBatch.Location = new System.Drawing.Point(472, 94);
+            this.GetBatch.Location = new System.Drawing.Point(708, 141);
+            this.GetBatch.Margin = new System.Windows.Forms.Padding(4);
             this.GetBatch.MoveImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.MoveImage")));
             this.GetBatch.Name = "GetBatch";
             this.GetBatch.NormalImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.NormalImage")));
             this.GetBatch.Power = "ifRead";
-            this.GetBatch.Size = new System.Drawing.Size(45, 24);
+            this.GetBatch.Size = new System.Drawing.Size(68, 36);
             this.GetBatch.TabIndex = 175;
             this.GetBatch.Tag = "IFREAD";
             this.GetBatch.Text = "获取批";
@@ -756,12 +837,13 @@
             this.BatchPass.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.BatchPass.Image = ((System.Drawing.Image)(resources.GetObject("BatchPass.Image")));
             this.BatchPass.IsShowBorder = true;
-            this.BatchPass.Location = new System.Drawing.Point(539, 95);
+            this.BatchPass.Location = new System.Drawing.Point(808, 142);
+            this.BatchPass.Margin = new System.Windows.Forms.Padding(4);
             this.BatchPass.MoveImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.MoveImage")));
             this.BatchPass.Name = "BatchPass";
             this.BatchPass.NormalImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.NormalImage")));
             this.BatchPass.Power = "ifread";
-            this.BatchPass.Size = new System.Drawing.Size(45, 24);
+            this.BatchPass.Size = new System.Drawing.Size(68, 36);
             this.BatchPass.TabIndex = 174;
             this.BatchPass.Tag = "OQC!Inspection";
             this.BatchPass.Text = "批判过";
@@ -776,12 +858,13 @@
             this.Confirm.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(472, 567);
+            this.Confirm.Location = new System.Drawing.Point(708, 850);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(4);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.Power = "IFREAD";
-            this.Confirm.Size = new System.Drawing.Size(60, 24);
+            this.Confirm.Size = new System.Drawing.Size(90, 36);
             this.Confirm.TabIndex = 172;
             this.Confirm.Tag = "ifread";
             this.Confirm.Text = "确认";
@@ -793,10 +876,11 @@
             this.ob_checkno.AllPower = "ifall";
             this.ob_checkno.BackColor = System.Drawing.Color.White;
             this.ob_checkno.ID = null;
-            this.ob_checkno.Location = new System.Drawing.Point(95, 29);
+            this.ob_checkno.Location = new System.Drawing.Point(142, 44);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Power = "ifread";
-            this.ob_checkno.Size = new System.Drawing.Size(366, 21);
+            this.ob_checkno.Size = new System.Drawing.Size(547, 28);
             this.ob_checkno.Str = null;
             this.ob_checkno.Str1 = null;
             this.ob_checkno.Str2 = null;
@@ -809,10 +893,11 @@
             this.obd_outboxcode.AllPower = null;
             this.obd_outboxcode.BackColor = System.Drawing.Color.White;
             this.obd_outboxcode.ID = null;
-            this.obd_outboxcode.Location = new System.Drawing.Point(95, 61);
+            this.obd_outboxcode.Location = new System.Drawing.Point(142, 92);
+            this.obd_outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.obd_outboxcode.Name = "obd_outboxcode";
             this.obd_outboxcode.Power = null;
-            this.obd_outboxcode.Size = new System.Drawing.Size(366, 21);
+            this.obd_outboxcode.Size = new System.Drawing.Size(547, 28);
             this.obd_outboxcode.Str = null;
             this.obd_outboxcode.Str1 = null;
             this.obd_outboxcode.Str2 = null;
@@ -825,10 +910,11 @@
             this.ms_sncode.AllPower = "ifall";
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(95, 95);
+            this.ms_sncode.Location = new System.Drawing.Point(142, 142);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = "ifread";
-            this.ms_sncode.Size = new System.Drawing.Size(366, 21);
+            this.ms_sncode.Size = new System.Drawing.Size(547, 28);
             this.ms_sncode.Str = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str2 = null;
@@ -875,11 +961,10 @@
             // 
             this.Filter.BackColor = System.Drawing.Color.Transparent;
             this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
-            this.Filter.Location = new System.Drawing.Point(570, 142);
-            this.Filter.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Filter.Location = new System.Drawing.Point(855, 213);
             this.Filter.Name = "Filter";
             this.Filter.PlaceHolder = "不良名称搜索";
-            this.Filter.Size = new System.Drawing.Size(129, 24);
+            this.Filter.Size = new System.Drawing.Size(194, 36);
             this.Filter.TabIndex = 220;
             this.Filter.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.Filter_UserControlTextChanged);
             // 
@@ -889,61 +974,30 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             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(514, 139);
+            this.label2.Location = new System.Drawing.Point(771, 208);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(42, 21);
+            this.label2.Size = new System.Drawing.Size(62, 31);
             this.label2.TabIndex = 221;
             this.label2.Text = "搜索";
             // 
-            // choose1
-            // 
-            this.choose1.HeaderText = "勾选";
-            this.choose1.MinimumWidth = 50;
-            this.choose1.Name = "choose1";
-            this.choose1.Width = 50;
+            // checkBox1
             // 
-            // or_id
-            // 
-            this.or_id.DataPropertyName = "or_id";
-            this.or_id.HeaderText = "or_id";
-            this.or_id.Name = "or_id";
-            this.or_id.Visible = false;
-            // 
-            // bg_name1
-            // 
-            this.bg_name1.DataPropertyName = "bg_name";
-            this.bg_name1.HeaderText = "不良组别名称";
-            this.bg_name1.Name = "bg_name1";
-            this.bg_name1.Visible = false;
-            // 
-            // bg_code1
-            // 
-            this.bg_code1.DataPropertyName = "bg_code";
-            this.bg_code1.HeaderText = "不良组别编号";
-            this.bg_code1.Name = "bg_code1";
-            this.bg_code1.Visible = false;
-            // 
-            // bc_code1
-            // 
-            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.bc_code1.DataPropertyName = "bc_code";
-            this.bc_code1.HeaderText = "不良代码";
-            this.bc_code1.Name = "bc_code1";
-            this.bc_code1.ReadOnly = true;
-            // 
-            // bc_name1
-            // 
-            this.bc_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.bc_name1.DataPropertyName = "bc_name";
-            this.bc_name1.HeaderText = "不良名称 ";
-            this.bc_name1.Name = "bc_name1";
-            this.bc_name1.ReadOnly = true;
+            this.checkBox1.AutoSize = true;
+            this.checkBox1.Location = new System.Drawing.Point(708, 805);
+            this.checkBox1.Name = "checkBox1";
+            this.checkBox1.Size = new System.Drawing.Size(106, 22);
+            this.checkBox1.TabIndex = 222;
+            this.checkBox1.Text = "采集不良";
+            this.checkBox1.UseVisualStyleBackColor = true;
+            this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
             // 
             // OQC_SamplingDataCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1065, 610);
+            this.ClientSize = new System.Drawing.Size(1598, 915);
+            this.Controls.Add(this.checkBox1);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.Filter);
             this.Controls.Add(this.BadGroupCode);
@@ -990,6 +1044,7 @@
             this.Controls.Add(this.ms_sncode);
             this.Controls.Add(this.ms_sncode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "OQC_SamplingDataCollection";
             this.Tag = "OQC!SamplingDataCollection";
             this.Text = " ";
@@ -1078,5 +1133,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_code1;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_code1;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_name1;
+        private System.Windows.Forms.CheckBox checkBox1;
     }
 }

+ 23 - 3
UAS_MES_ZT/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -103,6 +103,12 @@ namespace UAS_MES_NEW.OQC
                     BaseUtil.FillDgvWithDataTable(ChoosedDGV, dt);
                     GetBatchTypeGridData();
                 }
+                if (!checkBox1.Checked)
+                {
+                    Confirm_Click(sender, e);
+                }
+
+
             }
         }
 
@@ -148,7 +154,8 @@ namespace UAS_MES_NEW.OQC
                     }
                     else
                     {
-                        OperateResult.AppendText(">>序列号" + sncode.Text + "不属于当前抽检批次\n", Color.Red);
+                        string nowcheck = dh.getFieldDataByCondition("makeserial", "ms_checkno", "ms_sncode = '"+ sncode.Text + "' order by ms_id desc").ToString();
+                        OperateResult.AppendText(">>序列号" + sncode.Text + "所属批次:"+ nowcheck + ",不属于当前抽检批次\n", Color.Red);
                         return false;
                     }
                 }
@@ -342,7 +349,13 @@ namespace UAS_MES_NEW.OQC
                         string ngqty = (dh.ExecuteSql(sql.GetString(), "select") as DataTable).Rows[0][0].ToString();
                         string checkqty = dh.getFieldDataByCondition("OQCItems", "max(oi_checkqty)", "oi_checkno ='" + ob_checkno.Text + "'").ToString();
                         dh.ExecuteSql("update OQCBATCH set ob_ngqty='" + ngqty + "',ob_actsampleqty='" + checkqty + "',ob_okqty=('" + checkqty + "'-'" + ngqty + "') where ob_checkno ='" + ob_checkno.Text + "'", "update");
-                        OperateResult.AppendText(">>序列号" + sncode.Text + "操作成功\n", Color.Green);
+                        if (!IfContainNG)
+                        {
+                            OperateResult.AppendText(">>序列号" + sncode.Text + "抽样良品\n", Color.Green);
+                        }
+                        else {
+                            OperateResult.AppendText(">>序列号" + sncode.Text + "抽样不良\n", Color.OrangeRed);
+                        }
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "抽样数据采集", "检验项目采集成功", sncode.Text, ob_checkno.Text);
                         dh.ExecuteSql("update oqcbatchdetail set obd_ifcheck = '-1' where obd_checkno='" + ob_checkno.Text + "' and obd_sncode='" + sncode.Text + "'", "update");
                         ChoosedDGV.DataSource = null;
@@ -370,7 +383,8 @@ namespace UAS_MES_NEW.OQC
                     {
                         GetBatch.PerformClick();
                         BatchPass.Enabled = false;
-                        OperateResult.AppendText(">>" + ob_checkno.Text + "通过批成功\n", Color.Green);
+                        OperateResult.AppendText(">>批次号" + ob_checkno.Text + "通过批成功\n", Color.Green);
+                        ob_checkno.Text = "";
                         //记录操作日志
                     }
                     else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
@@ -547,5 +561,11 @@ namespace UAS_MES_NEW.OQC
 
             }
         }
+
+        private void checkBox1_CheckedChanged(object sender, EventArgs e)
+        {
+            sncode.Focus();
+            sncode.SelectAll();
+        }
     }
 }

+ 42 - 29
UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.Designer.cs

@@ -30,9 +30,9 @@
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Packing_PackageCollectionWeigh));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
             this.pa_makecode = new System.Windows.Forms.Label();
             this.label13 = new System.Windows.Forms.Label();
             this.Cancel = new System.Windows.Forms.CheckBox();
@@ -111,6 +111,7 @@
             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.getwei = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
             this.SuspendLayout();
             // 
@@ -691,8 +692,6 @@
             // AutoPrint
             // 
             this.AutoPrint.AutoSize = true;
-            this.AutoPrint.Checked = true;
-            this.AutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.AutoPrint.Location = new System.Drawing.Point(759, 184);
             this.AutoPrint.Name = "AutoPrint";
             this.AutoPrint.Size = new System.Drawing.Size(106, 22);
@@ -1001,14 +1000,14 @@
             this.PackageDetail.AllowUserToAddRows = false;
             this.PackageDetail.AllowUserToDeleteRows = false;
             this.PackageDetail.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.PackageDetail.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.PackageDetail.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
             this.PackageDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.PackageDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.pd_barcode,
@@ -1017,27 +1016,27 @@
             this.pd_innerqty,
             this.pa_indate,
             this.pd_id});
-            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.PackageDetail.DefaultCellStyle = dataGridViewCellStyle5;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.PackageDetail.DefaultCellStyle = dataGridViewCellStyle2;
             this.PackageDetail.EnableContentClick = true;
             this.PackageDetail.Location = new System.Drawing.Point(17, 257);
             this.PackageDetail.Margin = new System.Windows.Forms.Padding(4);
             this.PackageDetail.Name = "PackageDetail";
             this.PackageDetail.ReadOnly = true;
-            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
-            dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.PackageDetail.RowHeadersDefaultCellStyle = dataGridViewCellStyle6;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.PackageDetail.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
             this.PackageDetail.RowTemplate.Height = 23;
             this.PackageDetail.Size = new System.Drawing.Size(932, 360);
             this.PackageDetail.TabIndex = 134;
@@ -1097,11 +1096,24 @@
             this.pd_id.ReadOnly = true;
             this.pd_id.Visible = false;
             // 
+            // getwei
+            // 
+            this.getwei.AutoSize = true;
+            this.getwei.Checked = true;
+            this.getwei.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.getwei.Location = new System.Drawing.Point(959, 271);
+            this.getwei.Name = "getwei";
+            this.getwei.Size = new System.Drawing.Size(106, 22);
+            this.getwei.TabIndex = 248;
+            this.getwei.Text = "采集重量";
+            this.getwei.UseVisualStyleBackColor = true;
+            // 
             // Packing_PackageCollectionWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1314, 873);
+            this.Controls.Add(this.getwei);
             this.Controls.Add(this.AutoPrint);
             this.Controls.Add(this.StepCount);
             this.Controls.Add(this.PrintNum);
@@ -1269,5 +1281,6 @@
         private System.Windows.Forms.Label PrintList_label;
         private System.Windows.Forms.Label PrintNum_label;
         private System.Windows.Forms.CheckBox AutoPrint;
+        private System.Windows.Forms.CheckBox getwei;
     }
 }

+ 6 - 0
UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -226,6 +226,12 @@ namespace UAS_MES_NEW.Packing
                 if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                    if (getwei.Checked)
+                    {
+                        ActWeigh = weight.Text == "" ? "0" : weight.Text.Replace("kg", "").Replace("g", "").Trim();
+                        float weigh = float.Parse(ActWeigh);
+                        dh.ExecuteSql("update package set pa_weight=" + weigh + " where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                    }
                     //doc = lbl.Documents.Open(PrintLabel.Text);
                     if (Print.SinglePrint(Tag.ToString(),  engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                     {

+ 194 - 0
UAS_MES_ZT/FunctionCode/Query/Query_Employee.Designer.cs

@@ -0,0 +1,194 @@
+using System;
+
+namespace UAS_MES_NEW.Query
+{
+    partial class Query_Employee
+    {
+        /// <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()
+        {
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.BOM = new System.Windows.Forms.DataGridView();
+            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.WC_NAME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.HOURTIME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.投入 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.产出 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.不良 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.直通率 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.BOM)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // BOM
+            // 
+            this.BOM.AllowUserToAddRows = false;
+            this.BOM.AllowUserToDeleteRows = false;
+            this.BOM.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.BOM.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.WC_NAME,
+            this.HOURTIME,
+            this.投入,
+            this.产出,
+            this.不良,
+            this.直通率});
+            this.BOM.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.BOM.Location = new System.Drawing.Point(0, 0);
+            this.BOM.Name = "BOM";
+            this.BOM.ReadOnly = true;
+            this.BOM.RowTemplate.Height = 27;
+            this.BOM.Size = new System.Drawing.Size(1120, 647);
+            this.BOM.TabIndex = 22;
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "WC_NAME";
+            this.dataGridViewTextBoxColumn1.HeaderText = "车间";
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.ReadOnly = true;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "HOURTIME";
+            this.dataGridViewTextBoxColumn2.HeaderText = "小时";
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.ReadOnly = true;
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "投入";
+            this.dataGridViewTextBoxColumn3.HeaderText = "投入";
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.ReadOnly = true;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "产出";
+            this.dataGridViewTextBoxColumn4.HeaderText = "产出";
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.ReadOnly = true;
+            this.dataGridViewTextBoxColumn4.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn5
+            // 
+            this.dataGridViewTextBoxColumn5.DataPropertyName = "不良";
+            this.dataGridViewTextBoxColumn5.HeaderText = "不良";
+            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.ReadOnly = true;
+            // 
+            // dataGridViewTextBoxColumn6
+            // 
+            this.dataGridViewTextBoxColumn6.DataPropertyName = "直通率";
+            this.dataGridViewTextBoxColumn6.HeaderText = "直通率";
+            this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.ReadOnly = true;
+            // 
+            // WC_NAME
+            // 
+            this.WC_NAME.DataPropertyName = "WC_NAME";
+            this.WC_NAME.HeaderText = "车间";
+            this.WC_NAME.Name = "WC_NAME";
+            this.WC_NAME.ReadOnly = true;
+            // 
+            // HOURTIME
+            // 
+            this.HOURTIME.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.HOURTIME.DataPropertyName = "HOURTIME";
+            this.HOURTIME.HeaderText = "小时";
+            this.HOURTIME.Name = "HOURTIME";
+            this.HOURTIME.ReadOnly = true;
+            // 
+            // 投入
+            // 
+            this.投入.DataPropertyName = "投入";
+            this.投入.HeaderText = "投入";
+            this.投入.Name = "投入";
+            this.投入.ReadOnly = true;
+            // 
+            // 产出
+            // 
+            this.产出.DataPropertyName = "产出";
+            this.产出.HeaderText = "产出";
+            this.产出.Name = "产出";
+            this.产出.ReadOnly = true;
+            this.产出.Width = 150;
+            // 
+            // 不良
+            // 
+            this.不良.DataPropertyName = "不良";
+            this.不良.HeaderText = "不良";
+            this.不良.Name = "不良";
+            this.不良.ReadOnly = true;
+            // 
+            // 直通率
+            // 
+            this.直通率.DataPropertyName = "直通率";
+            this.直通率.HeaderText = "直通率";
+            this.直通率.Name = "直通率";
+            this.直通率.ReadOnly = true;
+            // 
+            // Query_Employee
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1120, 647);
+            this.Controls.Add(this.BOM);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Query_Employee";
+            this.Tag = "Query!Employee";
+            this.Text = "Query_Employee";
+            this.Load += new System.EventHandler(this.Query_Employee_Load);
+            this.SizeChanged += new System.EventHandler(this.Query_Employee_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.BOM)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+  
+
+        #endregion
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private System.Windows.Forms.DataGridView BOM;
+        private System.Windows.Forms.DataGridViewTextBoxColumn WC_NAME;
+        private System.Windows.Forms.DataGridViewTextBoxColumn HOURTIME;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 投入;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 产出;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 不良;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 直通率;
+        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.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
+    }
+}

+ 41 - 0
UAS_MES_ZT/FunctionCode/Query/Query_Employee.cs

@@ -0,0 +1,41 @@
+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.Query
+{
+    public partial class Query_Employee : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        DataHelper dh;
+
+        public Query_Employee()
+        {
+            InitializeComponent();
+        }
+
+        private void Query_Employee_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            dh  = SystemInf.dh;
+            LogStringBuilder sql = new LogStringBuilder();
+            sql.Clear();
+            sql.Append("select WC_NAME,HOURTIME,投入,产出,不良,直通率 from MES_MAKEEMHOUR_VIEW where sp_ymd = trunc(sysdate) and sp_linecode = '"+User.UserLineCode+"' AND SP_STEPCODE = '"+User.CurrentStepCode+"' AND SP_INMAN = '"+User.UserCode+"' ");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BaseUtil.FillDgvWithDataTable(BOM, dt);
+        }
+
+        private void Query_Employee_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+        }
+    }
+}

+ 123 - 0
UAS_MES_ZT/FunctionCode/Query/Query_Employee.resx

@@ -0,0 +1,123 @@
+<?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="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>

+ 167 - 0
UAS_MES_ZT/FunctionCode/Special/Special_ReSNBD.Designer.cs

@@ -0,0 +1,167 @@
+namespace UAS_MES_NEW.Special
+{
+    partial class Special_ReSNBD
+    {
+        /// <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()
+        {
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.ChangeResult = new UAS_MES_NEW.CustomControl.CustomCheckBox.CustomCheckBox();
+            this.ClearSn_code = new System.Windows.Forms.PictureBox();
+            this.show_sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.sn_code_label = new System.Windows.Forms.Label();
+            this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.sncode_label = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // 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, 81);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(1014, 351);
+            this.OperateResult.TabIndex = 3;
+            this.OperateResult.Text = "";
+            // 
+            // ChangeResult
+            // 
+            this.ChangeResult.AllPower = "ifall";
+            this.ChangeResult.AutoSize = true;
+            this.ChangeResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ChangeResult.Location = new System.Drawing.Point(407, 537);
+            this.ChangeResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ChangeResult.Name = "ChangeResult";
+            this.ChangeResult.Power = "ifspecial";
+            this.ChangeResult.Size = new System.Drawing.Size(136, 35);
+            this.ChangeResult.TabIndex = 152;
+            this.ChangeResult.Text = "重新转换";
+            this.ChangeResult.UseVisualStyleBackColor = true;
+            this.ChangeResult.CheckedChanged += new System.EventHandler(this.ChangeResult_CheckedChanged);
+            // 
+            // ClearSn_code
+            // 
+            this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.ClearSn_code.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.ClearSn_code.Location = new System.Drawing.Point(407, 495);
+            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ClearSn_code.Name = "ClearSn_code";
+            this.ClearSn_code.Size = new System.Drawing.Size(24, 24);
+            this.ClearSn_code.TabIndex = 151;
+            this.ClearSn_code.TabStop = false;
+            this.ClearSn_code.Click += new System.EventHandler(this.ClearSn_code_Click);
+            // 
+            // show_sncode
+            // 
+            this.show_sncode.AllPower = null;
+            this.show_sncode.BackColor = System.Drawing.Color.White;
+            this.show_sncode.Enabled = false;
+            this.show_sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.show_sncode.ID = null;
+            this.show_sncode.Location = new System.Drawing.Point(133, 491);
+            this.show_sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.show_sncode.Name = "show_sncode";
+            this.show_sncode.Power = null;
+            this.show_sncode.Size = new System.Drawing.Size(238, 34);
+            this.show_sncode.Str = null;
+            this.show_sncode.Str1 = null;
+            this.show_sncode.Str2 = null;
+            this.show_sncode.TabIndex = 150;
+            // 
+            // sn_code_label
+            // 
+            this.sn_code_label.AutoSize = true;
+            this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sn_code_label.Location = new System.Drawing.Point(13, 491);
+            this.sn_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sn_code_label.Name = "sn_code_label";
+            this.sn_code_label.Size = new System.Drawing.Size(86, 31);
+            this.sn_code_label.TabIndex = 149;
+            this.sn_code_label.Text = "序列号";
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = "ifall";
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(133, 541);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = "ifread";
+            this.sncode.Size = new System.Drawing.Size(238, 34);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 148;
+            this.sncode.Tag = "IfRead";
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
+            // 
+            // sncode_label
+            // 
+            this.sncode_label.AutoSize = true;
+            this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sncode_label.Location = new System.Drawing.Point(13, 543);
+            this.sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sncode_label.Name = "sncode_label";
+            this.sncode_label.Size = new System.Drawing.Size(86, 31);
+            this.sncode_label.TabIndex = 147;
+            this.sncode_label.Text = "录入框";
+            // 
+            // Special_ReSNBD
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1038, 602);
+            this.Controls.Add(this.ChangeResult);
+            this.Controls.Add(this.ClearSn_code);
+            this.Controls.Add(this.show_sncode);
+            this.Controls.Add(this.sn_code_label);
+            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.sncode_label);
+            this.Controls.Add(this.OperateResult);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Special_ReSNBD";
+            this.Tag = "Special!ReSNBD";
+            this.Text = "返修SN采集";
+            this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            this.SizeChanged += new System.EventHandler(this.Special_ReSNBD_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private CustomControl.CustomCheckBox.CustomCheckBox ChangeResult;
+        private System.Windows.Forms.PictureBox ClearSn_code;
+        private CustomControl.TextBoxWithIcon.EnterTextBox show_sncode;
+        private System.Windows.Forms.Label sn_code_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
+        private System.Windows.Forms.Label sncode_label;
+    }
+}

+ 154 - 0
UAS_MES_ZT/FunctionCode/Special/Special_ReSNBD.cs

@@ -0,0 +1,154 @@
+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_ReSNBD : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        DataHelper dh;
+
+        string bsncode = "";//序列号录入框值
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        public Special_ReSNBD()
+        {
+            InitializeComponent();
+        }
+
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            dh = SystemInf.dh;
+            sncode.Focus();
+            OperateResult.AppendText(">>请输入返修SN号\n", Color.Black);
+        }
+
+      
+
+        private void ClearSn_code_Click(object sender, EventArgs e)
+        {
+            bsncode = "";
+            if (ChangeResult.Checked)
+            {
+                //勾选的时候提示输入TSN
+                OperateResult.AppendText(">>请输入待转换新SN号\n", Color.Black,show_sncode);
+            }
+            else
+            {
+                OperateResult.AppendText(">>请输入返修SN号\n", Color.Black, show_sncode);
+            }
+            ChangeResult.Enabled = true;
+        }
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (sncode.Text != "")
+                {
+                    if (bsncode == "")
+                    {
+                        if (!ChangeResult.Checked)
+                        {
+                            if (!dh.CheckExist("makeserial", "ms_sncode = '" + sncode.Text + "'"))
+                            {
+                                OperateResult.AppendText(">>SN"+sncode.Text+"未查询到生产记录,无法采集\n", Color.Red, sncode);
+                                return;
+                            }
+                            if (dh.CheckExist("returnsnbd", "rsb_oldsn = '" + sncode.Text + "'"))
+                            {
+                                string newsn = dh.getFieldDataByCondition("returnsnbd", "rsb_newsn", "rsb_oldsn = '" + sncode.Text + "'").ToString();
+                                OperateResult.AppendText(">>返修SN" + sncode.Text + "已关联SN"+newsn+",无法直接采集,需转换\n", Color.Red, sncode);
+                                return;
+                            }
+                            bsncode = sncode.Text;
+                            show_sncode.Text = bsncode;
+                            sncode.Text = "";
+                            ChangeResult.Enabled = false;
+                            OperateResult.AppendText(">>返修SN" + bsncode + "采集\n", Color.Green, sncode);
+                            return;
+                        }
+                        else
+                        {
+                            if (!dh.CheckExist("returnsnbd", "rsb_newsn = '" + sncode.Text + "'"))
+                            {
+                                OperateResult.AppendText(">>待转换新SN" + sncode.Text + "无采集记录,不可转换\n", Color.Red, sncode);
+                                return;
+                            }
+                            bsncode = sncode.Text;
+                            show_sncode.Text = bsncode;
+                            sncode.Text = "";
+                            ChangeResult.Enabled = false;
+                            OperateResult.AppendText(">>待转换新SN" + bsncode + "采集\n", Color.Green, sncode);
+                            return;
+                        }
+                    }
+                    else
+                    {
+                        if (!ChangeResult.Checked)
+                        {
+                            if (dh.CheckExist("returnsnbd", "rsb_newsn = '" + sncode.Text + "'"))
+                            {
+                                string oldsn = dh.getFieldDataByCondition("returnsnbd", "rsb_oldsn", "rsb_newsn = '" + sncode.Text + "'").ToString();
+                                OperateResult.AppendText(">>采集新SN:" + sncode.Text + "已关联返修SN:" + oldsn + ",无法采集\n", Color.Red, sncode);
+                                return;
+                            }
+                            dh.ExecuteSql("insert into returnsnbd (rsb_id,rsb_newsn,rsb_oldsn) values (returnsnbd_seq.nextval,'"+ sncode.Text + "','"+ show_sncode.Text + "') ", "insert");
+                            bsncode = "";
+                            ChangeResult.Enabled = true;
+                            OperateResult.AppendText(">>返修SN:" + show_sncode.Text + "与新SN:"+ sncode.Text + "关联成功\n", Color.Green, sncode, show_sncode);
+                            return;
+                        }
+                        else
+                        {
+                            if (dh.CheckExist("returnsnbd", "rsb_newsn = '" + sncode.Text + "'"))
+                            {
+                                string oldsn = dh.getFieldDataByCondition("returnsnbd", "rsb_oldsn", "rsb_newsn = '" + sncode.Text + "'").ToString();
+                                OperateResult.AppendText(">>采集新SN:" + sncode.Text + "已关联返修SN:" + oldsn + ",无法采集\n", Color.Red, sncode);
+                                return;
+                            }
+                            dh.ExecuteSql(" update returnsnbd set rsb_newsn = '"+ sncode.Text + "' where rsb_newsn = '"+show_sncode.Text+"'  ", "update");
+                            bsncode = "";
+                            ChangeResult.Enabled = true;
+                            OperateResult.AppendText(">>待转换新SN:" + show_sncode.Text + "更换至新SN:" + sncode.Text + "成功\n", Color.Green, sncode, show_sncode);
+                            return;
+                        }
+                    }
+                }
+                else
+                {
+                    OperateResult.AppendText("<<序列号不能为空\n", Color.Red);
+                }
+            }
+       }
+        
+
+        private void ChangeResult_CheckedChanged(object sender, EventArgs e)
+        {
+            if (ChangeResult.Checked)
+            {
+                //勾选的时候提示输入TSN
+                OperateResult.AppendText(">>请输入待转换新SN号\n", Color.Black);
+            }
+            else {
+                OperateResult.AppendText(">>请输入返修SN号\n", Color.Black);
+            }
+        }
+
+        private void Special_ReSNBD_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+    }
+}

+ 120 - 0
UAS_MES_ZT/FunctionCode/Special/Special_ReSNBD.resx

@@ -0,0 +1,120 @@
+<?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>
+</root>

+ 1 - 1
UAS_MES_ZT/FunctionCode/Special/Special_Reset.cs

@@ -259,7 +259,7 @@ namespace UAS_MES_NEW.Special
                 }
                 else if (oqcBtn.Checked)
                 {
-                    dt = (DataTable)dh.ExecuteSql("select ob_makecode ms_makecode,ob_prodcode ms_prodcode,ob_checkno,ma_craftcode cr_code from oqcbatch left join make on ob_makecode = ma_code where ob_checkno = '" + input.Text + "' and ob_status = 'NG'", "select");
+                    dt = (DataTable)dh.ExecuteSql("select ob_makecode ms_makecode,ob_prodcode ms_prodcode,ob_checkno,ma_craftcode cr_code from oqcbatch left join make on ob_makecode = ma_code where (ob_checkno = '" + input.Text + "' or ms_sncode = '" + input.Text + "') and ob_status IN( 'NG','FNG') ", "select");
                     if (dt.Rows.Count > 0)
                     {
                         if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)

+ 409 - 0
UAS_MES_ZT/FunctionCode/Special/Special_ResetCheck.Designer.cs

@@ -0,0 +1,409 @@
+namespace UAS_MES_NEW.Special
+{
+    partial class Special_ResetCheck
+    {
+        /// <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_ResetCheck));
+            this.Pallet_label = new System.Windows.Forms.Label();
+            this.bigboxBtn = new System.Windows.Forms.RadioButton();
+            this.serBtn = new System.Windows.Forms.RadioButton();
+            this.st_rstepcode_label = new System.Windows.Forms.Label();
+            this.ma_craftcode_label = new System.Windows.Forms.Label();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.ms_prodcode_label = new System.Windows.Forms.Label();
+            this.WeighRecord = new System.Windows.Forms.ListView();
+            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.cd_stepno = new System.Windows.Forms.Label();
+            this.checkBox1 = new System.Windows.Forms.CheckBox();
+            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+            this.oqcBtn = new System.Windows.Forms.RadioButton();
+            this.excelim = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.数据清空 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.cd_stepcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.cr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperatResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.input = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Split = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.SuspendLayout();
+            // 
+            // 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(10, 62);
+            this.Pallet_label.Name = "Pallet_label";
+            this.Pallet_label.Size = new System.Drawing.Size(86, 31);
+            this.Pallet_label.TabIndex = 1;
+            this.Pallet_label.Text = "录入框";
+            // 
+            // bigboxBtn
+            // 
+            this.bigboxBtn.AutoSize = true;
+            this.bigboxBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bigboxBtn.Location = new System.Drawing.Point(309, 6);
+            this.bigboxBtn.Name = "bigboxBtn";
+            this.bigboxBtn.Size = new System.Drawing.Size(87, 35);
+            this.bigboxBtn.TabIndex = 234;
+            this.bigboxBtn.Text = "箱号";
+            this.bigboxBtn.UseVisualStyleBackColor = true;
+            this.bigboxBtn.Visible = false;
+            this.bigboxBtn.Click += new System.EventHandler(this.bigboxBtn_Click);
+            // 
+            // serBtn
+            // 
+            this.serBtn.AutoSize = true;
+            this.serBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.serBtn.Location = new System.Drawing.Point(144, 6);
+            this.serBtn.Name = "serBtn";
+            this.serBtn.Size = new System.Drawing.Size(159, 35);
+            this.serBtn.TabIndex = 233;
+            this.serBtn.Text = "单台序列号";
+            this.serBtn.UseVisualStyleBackColor = true;
+            this.serBtn.Visible = false;
+            this.serBtn.Click += new System.EventHandler(this.bigboxBtn_Click);
+            // 
+            // st_rstepcode_label
+            // 
+            this.st_rstepcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.st_rstepcode_label.AutoSize = true;
+            this.st_rstepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.st_rstepcode_label.Location = new System.Drawing.Point(759, 14);
+            this.st_rstepcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.st_rstepcode_label.Name = "st_rstepcode_label";
+            this.st_rstepcode_label.Size = new System.Drawing.Size(110, 31);
+            this.st_rstepcode_label.TabIndex = 235;
+            this.st_rstepcode_label.Text = "回流工序";
+            // 
+            // ma_craftcode_label
+            // 
+            this.ma_craftcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ma_craftcode_label.AutoSize = true;
+            this.ma_craftcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_craftcode_label.Location = new System.Drawing.Point(489, 6);
+            this.ma_craftcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_craftcode_label.Name = "ma_craftcode_label";
+            this.ma_craftcode_label.Size = new System.Drawing.Size(110, 31);
+            this.ma_craftcode_label.TabIndex = 236;
+            this.ma_craftcode_label.Text = "回流途程";
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(10, 122);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(86, 31);
+            this.ms_makecode_label.TabIndex = 240;
+            this.ms_makecode_label.Text = "工单号";
+            // 
+            // ms_prodcode_label
+            // 
+            this.ms_prodcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_prodcode_label.AutoSize = true;
+            this.ms_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_prodcode_label.Location = new System.Drawing.Point(489, 122);
+            this.ms_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_prodcode_label.Name = "ms_prodcode_label";
+            this.ms_prodcode_label.Size = new System.Drawing.Size(110, 31);
+            this.ms_prodcode_label.TabIndex = 241;
+            this.ms_prodcode_label.Text = "产品编号";
+            // 
+            // WeighRecord
+            // 
+            this.WeighRecord.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader3});
+            this.WeighRecord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.WeighRecord.Location = new System.Drawing.Point(16, 162);
+            this.WeighRecord.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.WeighRecord.Name = "WeighRecord";
+            this.WeighRecord.Size = new System.Drawing.Size(630, 480);
+            this.WeighRecord.TabIndex = 243;
+            this.WeighRecord.UseCompatibleStateImageBehavior = false;
+            this.WeighRecord.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader3
+            // 
+            this.columnHeader3.Text = "录入项";
+            this.columnHeader3.Width = 300;
+            // 
+            // cd_stepno
+            // 
+            this.cd_stepno.AutoSize = true;
+            this.cd_stepno.Location = new System.Drawing.Point(1056, 62);
+            this.cd_stepno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.cd_stepno.Name = "cd_stepno";
+            this.cd_stepno.Size = new System.Drawing.Size(0, 18);
+            this.cd_stepno.TabIndex = 244;
+            // 
+            // checkBox1
+            // 
+            this.checkBox1.AutoSize = true;
+            this.checkBox1.Location = new System.Drawing.Point(710, 224);
+            this.checkBox1.Margin = new System.Windows.Forms.Padding(4);
+            this.checkBox1.Name = "checkBox1";
+            this.checkBox1.Size = new System.Drawing.Size(178, 22);
+            this.checkBox1.TabIndex = 246;
+            this.checkBox1.Text = "清空机器写入信息";
+            this.checkBox1.UseVisualStyleBackColor = true;
+            this.checkBox1.Visible = false;
+            // 
+            // openFileDialog1
+            // 
+            this.openFileDialog1.FileName = "openFileDialog1";
+            // 
+            // oqcBtn
+            // 
+            this.oqcBtn.AutoSize = true;
+            this.oqcBtn.Checked = true;
+            this.oqcBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.oqcBtn.Location = new System.Drawing.Point(16, 10);
+            this.oqcBtn.Name = "oqcBtn";
+            this.oqcBtn.Size = new System.Drawing.Size(111, 35);
+            this.oqcBtn.TabIndex = 248;
+            this.oqcBtn.TabStop = true;
+            this.oqcBtn.Text = "抽检批";
+            this.oqcBtn.UseVisualStyleBackColor = true;
+            this.oqcBtn.Click += new System.EventHandler(this.bigboxBtn_Click);
+            // 
+            // excelim
+            // 
+            this.excelim.AllPower = null;
+            this.excelim.BackColor = System.Drawing.Color.Transparent;
+            this.excelim.DownImage = ((System.Drawing.Image)(resources.GetObject("excelim.DownImage")));
+            this.excelim.Image = null;
+            this.excelim.IsShowBorder = true;
+            this.excelim.Location = new System.Drawing.Point(710, 526);
+            this.excelim.Margin = new System.Windows.Forms.Padding(4);
+            this.excelim.MoveImage = ((System.Drawing.Image)(resources.GetObject("excelim.MoveImage")));
+            this.excelim.Name = "excelim";
+            this.excelim.NormalImage = ((System.Drawing.Image)(resources.GetObject("excelim.NormalImage")));
+            this.excelim.Power = null;
+            this.excelim.Size = new System.Drawing.Size(112, 42);
+            this.excelim.TabIndex = 247;
+            this.excelim.Text = "表格导入";
+            this.excelim.UseVisualStyleBackColor = false;
+            this.excelim.Click += new System.EventHandler(this.excelim_Click);
+            // 
+            // 数据清空
+            // 
+            this.数据清空.AllPower = null;
+            this.数据清空.BackColor = System.Drawing.Color.Transparent;
+            this.数据清空.DownImage = ((System.Drawing.Image)(resources.GetObject("数据清空.DownImage")));
+            this.数据清空.Image = null;
+            this.数据清空.IsShowBorder = true;
+            this.数据清空.Location = new System.Drawing.Point(710, 600);
+            this.数据清空.Margin = new System.Windows.Forms.Padding(4);
+            this.数据清空.MoveImage = ((System.Drawing.Image)(resources.GetObject("数据清空.MoveImage")));
+            this.数据清空.Name = "数据清空";
+            this.数据清空.NormalImage = ((System.Drawing.Image)(resources.GetObject("数据清空.NormalImage")));
+            this.数据清空.Power = null;
+            this.数据清空.Size = new System.Drawing.Size(84, 42);
+            this.数据清空.TabIndex = 245;
+            this.数据清空.Text = "数据清空";
+            this.数据清空.UseVisualStyleBackColor = false;
+            this.数据清空.Click += new System.EventHandler(this.数据清空_Click);
+            // 
+            // ms_prodcode
+            // 
+            this.ms_prodcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            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(633, 122);
+            this.ms_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ms_prodcode.Name = "ms_prodcode";
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 31);
+            this.ms_prodcode.TabIndex = 239;
+            // 
+            // ms_makecode
+            // 
+            this.ms_makecode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            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(130, 122);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(375, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 31);
+            this.ms_makecode.TabIndex = 242;
+            // 
+            // cd_stepcode
+            // 
+            this.cd_stepcode.AllPower = "ifall";
+            this.cd_stepcode.Caller = null;
+            this.cd_stepcode.Condition = null;
+            this.cd_stepcode.DBTitle = "回流工序";
+            this.cd_stepcode.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cd_stepcode.FormName = null;
+            this.cd_stepcode.Location = new System.Drawing.Point(710, 62);
+            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(4);
+            this.cd_stepcode.Name = "cd_stepcode";
+            this.cd_stepcode.Power = "ifspecial";
+            this.cd_stepcode.ReturnData = null;
+            this.cd_stepcode.SelectField = null;
+            this.cd_stepcode.SetValueField = null;
+            this.cd_stepcode.Size = new System.Drawing.Size(225, 33);
+            this.cd_stepcode.TabIndex = 238;
+            this.cd_stepcode.TableName = null;
+            this.cd_stepcode.Tag = "";
+            this.cd_stepcode.TextBoxEnable = false;
+            // 
+            // cr_code
+            // 
+            this.cr_code.AllPower = "ifall";
+            this.cr_code.BackColor = System.Drawing.Color.White;
+            this.cr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cr_code.ID = null;
+            this.cr_code.Location = new System.Drawing.Point(423, 60);
+            this.cr_code.Margin = new System.Windows.Forms.Padding(4);
+            this.cr_code.Name = "cr_code";
+            this.cr_code.Power = "ifspecial";
+            this.cr_code.ReadOnly = true;
+            this.cr_code.Size = new System.Drawing.Size(223, 31);
+            this.cr_code.Str = null;
+            this.cr_code.Str1 = null;
+            this.cr_code.Str2 = null;
+            this.cr_code.TabIndex = 237;
+            this.cr_code.Tag = "ma_craftcode";
+            this.cr_code.TextChanged += new System.EventHandler(this.cr_code_TextChanged);
+            // 
+            // 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(16, 650);
+            this.OperatResult.Name = "OperatResult";
+            this.OperatResult.Size = new System.Drawing.Size(1164, 169);
+            this.OperatResult.TabIndex = 3;
+            this.OperatResult.Text = "";
+            // 
+            // input
+            // 
+            this.input.AllPower = null;
+            this.input.BackColor = System.Drawing.Color.White;
+            this.input.ID = null;
+            this.input.Location = new System.Drawing.Point(120, 64);
+            this.input.Name = "input";
+            this.input.Power = null;
+            this.input.Size = new System.Drawing.Size(220, 28);
+            this.input.Str = null;
+            this.input.Str1 = null;
+            this.input.Str2 = null;
+            this.input.TabIndex = 2;
+            this.input.KeyDown += new System.Windows.Forms.KeyEventHandler(this.input_KeyDown);
+            // 
+            // 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(710, 162);
+            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(84, 33);
+            this.Split.TabIndex = 0;
+            this.Split.Text = "站点重置";
+            this.Split.UseVisualStyleBackColor = false;
+            this.Split.Click += new System.EventHandler(this.Split_Click);
+            // 
+            // Special_ResetCheck
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1208, 870);
+            this.Controls.Add(this.oqcBtn);
+            this.Controls.Add(this.excelim);
+            this.Controls.Add(this.checkBox1);
+            this.Controls.Add(this.数据清空);
+            this.Controls.Add(this.cd_stepno);
+            this.Controls.Add(this.WeighRecord);
+            this.Controls.Add(this.ms_makecode_label);
+            this.Controls.Add(this.ms_prodcode_label);
+            this.Controls.Add(this.ms_prodcode);
+            this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.cd_stepcode);
+            this.Controls.Add(this.st_rstepcode_label);
+            this.Controls.Add(this.ma_craftcode_label);
+            this.Controls.Add(this.cr_code);
+            this.Controls.Add(this.bigboxBtn);
+            this.Controls.Add(this.serBtn);
+            this.Controls.Add(this.OperatResult);
+            this.Controls.Add(this.input);
+            this.Controls.Add(this.Pallet_label);
+            this.Controls.Add(this.Split);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Special_ResetCheck";
+            this.Tag = "Special!ResetCheck";
+            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 input;
+        private CustomControl.RichText.RichTextAutoBottom OperatResult;
+        private System.Windows.Forms.RadioButton bigboxBtn;
+        private System.Windows.Forms.RadioButton serBtn;
+        private CustomControl.TextBoxWithIcon.SearchTextBox cd_stepcode;
+        private System.Windows.Forms.Label st_rstepcode_label;
+        private System.Windows.Forms.Label ma_craftcode_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox cr_code;
+        private System.Windows.Forms.Label ms_makecode_label;
+        private System.Windows.Forms.Label ms_prodcode_label;
+        private CustomControl.ValueLabel.ValueLabel ms_prodcode;
+        private CustomControl.ValueLabel.ValueLabel ms_makecode;
+        private System.Windows.Forms.ListView WeighRecord;
+        private System.Windows.Forms.ColumnHeader columnHeader3;
+        private System.Windows.Forms.Label cd_stepno;
+        private CustomControl.ButtonUtil.NormalButton 数据清空;
+        private System.Windows.Forms.CheckBox checkBox1;
+        private CustomControl.ButtonUtil.NormalButton excelim;
+        private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.RadioButton oqcBtn;
+    }
+}

+ 315 - 0
UAS_MES_ZT/FunctionCode/Special/Special_ResetCheck.cs

@@ -0,0 +1,315 @@
+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_ResetCheck : Form
+    {
+        DataHelper dh;
+
+        LogStringBuilder sql = new LogStringBuilder();
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        DataTable Dbfind;
+        DataTable dt;
+        ExcelHandler eh;
+
+        List<String> sb = new List<string>();
+
+        public Special_ResetCheck()
+        {
+            InitializeComponent();
+        }
+
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+            eh = new ExcelHandler();
+            dh = SystemInf.dh;
+            asc.controllInitializeSize(this);
+            cd_stepcode.FormName = Name;
+            cd_stepcode.TableName = "craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id";
+            cd_stepcode.SetValueField = new string[] { "cd_stepcode", "cd_stepno" };
+            cd_stepcode.SelectField = "cd_stepname # 工序名称 ,cd_stepcode # 工序编号,cd_stepno # 执行顺序";
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+            cd_stepcode.DBTitle = "回流工序";
+            cd_stepcode.DbChange += Cd_stepcode_DbChange;
+        }
+
+        private void Cd_stepcode_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = cd_stepcode.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
+        private void ReSN(string sncode, string stepcode)
+        {   
+            string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + stepcode +  "'").ToString();
+            dh.ExecuteSql("update makeserial set MS_STEPCODE = '',MS_CHECKNO = '', ms_status=1,ms_outboxcode='',ms_nextstepcode= '"+ stepcode + "' where ms_sncode='" + sncode + "' and ms_nextmacode is null", "update");
+            //if (checkBox1.Checked)
+            //{
+            //    dh.ExecuteSql("update makeserial set ms_bs = '',ms_key='',ms_keyid='',MS_HARDWREID='',MS_KEYSTATEID='',MS_BIOS='',ms_ec='',ms_uuid='',MS_KEYPARTNUMBER='',ms_bt='',ms_mac='',ms_imei='' where ms_sncode = '" + sncode + "' and ms_makecode = '" + ms_makecode.Text + "'", "update");
+            //}
+            dh.ExecuteSql("delete makebad where mb_sncode = '" + sncode + "' and mb_status = 0", "delete");
+            dh.ExecuteSql("delete from LABELPRINTLOG where lpl_value = '" + sncode + "'", "delete");
+            //sql.Clear();
+            //sql.Append("update craftmaterial set cm_status=-1,cm_lastdeco=-1,cm_dropman='" + User.UserCode + "',");
+            //sql.Append("cm_dropdate =sysdate,CM_REMARK = '重置站点拆解',cm_dropstep='" + User.CurrentStepCode + "',");
+            //sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_sncode = '" + sncode + "' and cm_stepcode in (select cd_stepcode from craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id where ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_detno >=" + cd_stepno.Text + " )");
+            //dh.ExecuteSql(sql.GetString(), "update");
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname,  sncode, "");
+        }
+
+
+
+        private void Split_Click(object sender, EventArgs e)
+        {
+            if (sb.Count == 0|| cd_stepcode.Text == "")
+            {
+                OperatResult.AppendText(">>采集数与回流工位不能为空\n", Color.Red);
+                return;
+            }
+            string Delete = MessageBox.Show(this.ParentForm, "是否确认重置站点?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+            if (Delete == "Yes")
+            {
+                if (serBtn.Checked)
+                {
+                    for (int i = 0; i < sb.Count; i++)
+                    {
+                     ReSN(sb[i].ToString(), cd_stepcode.Text);
+                     OperatResult.AppendText("SN:" + sb[i].ToString()+ "回流至"+ cd_stepcode.Text + "完成\n", Color.Green);
+                    }
+                    WeighRecord.Items.Clear();
+                    sb.Clear();
+                }
+                else if(bigboxBtn.Checked)
+                {
+                    string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + cd_stepcode.Text + "'").ToString();
+                    for (int i = 0; i < sb.Count; i++)
+                    {
+                        DataTable dt2 = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_outboxcode = '" + sb[i].ToString() + "'", "select");
+                        for (int k = 0; k < dt2.Rows.Count; k++)
+                        {
+                            ReSN(dt2.Rows[k]["ms_sncode"].ToString(), cd_stepcode.Text);
+                        }
+                       dh.ExecuteSql("insert into PACKAGEBACKUP select * from package where pa_outboxcode='" + sb[i].ToString() + "'", "insert");
+                       dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "insert");
+                       dh.ExecuteSql("delete from package where pa_outboxcode = '" + sb[i].ToString() + "'", "delete");
+                       dh.ExecuteSql("delete from LABELPRINTLOG where lpl_value = '" + sb[i].ToString() + "'", "delete");
+                        //删除箱的明细
+                        dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "delete");
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname, sb[i].ToString(), "");
+                        OperatResult.AppendText("卡通箱:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
+                    }
+                    WeighRecord.Items.Clear();
+                    sb.Clear();
+                }
+                else if (oqcBtn.Checked)
+                { 
+                    string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + cd_stepcode.Text + "'").ToString();
+                    for (int i = 0; i < sb.Count; i++)
+                    {
+                        DataTable dt2 = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_checkno = '" + sb[i].ToString() + "' and ms_status  = 1", "select");
+                        for (int k = 0; k < dt2.Rows.Count; k++)
+                        {
+                            ReSN(dt2.Rows[k]["ms_sncode"].ToString(), cd_stepcode.Text);
+                        }
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname, sb[i].ToString(), "");
+                        OperatResult.AppendText("抽检批:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
+                    }
+                    WeighRecord.Items.Clear();
+                    sb.Clear();
+                }
+                sql.Clear();
+                sql.Append("MERGE INTO makecraftdetail USING (select mcd_macode,mcd_detno,mcd_stepcode,mcd_stepname,nvl(count(distinct A.ms_sncode),0) n,nvl(count(distinct B.ms_sncode),0) bn,(select nvl(count(distinct sp_sncode),0) from STEPPASSED where SP_MAKECODE = mcd_macode AND SP_STEPCODE = mcd_stepcode) inqty from MAKECRAFTdetail");
+                sql.Append(" left join makeserial A on mcd_macode = A.ms_makecode and mcd_stepcode = A.ms_nextstepcode AND A.MS_STATUS = 1 LEFT JOIN MAKESERIAL B ON mcd_macode = B.ms_makecode AND MCD_STEPCODE = B.MS_STEPCODE AND B.MS_STATUS = 3 where mcd_macode = '"+ ms_makecode.Text + "'  group by mcd_macode,mcd_detno, mcd_stepcode, mcd_stepname order by mcd_detno asc) A");
+                sql.Append(" ON (makecraftdetail.MCD_MACODE = A.MCD_MACODE and makecraftdetail.mcd_stepcode = A.mcd_stepcode)  ");
+                sql.Append(" WHEN MATCHED THEN UPDATE SET makecraftdetail.mcd_inqty = A.inqty,makecraftdetail.mcd_outqty = A.inqty,makecraftdetail.mcd_okqty = A.inqty ");
+                dh.ExecuteSql(sql.GetString(), "update");
+
+            }
+
+
+        }
+
+        private void bigboxBtn_Click(object sender, EventArgs e)
+        {
+            if (((RadioButton)sender).Checked == true)
+            {
+                if (WeighRecord.Items.Count > 0)
+                {
+                    //string logout_confirm = MessageBox.Show(this.ParentForm, "是否更换采集项(已录入信息会清空)?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                    //if (logout_confirm == "Yes")
+                    //{
+                        WeighRecord.Items.Clear();
+                        sb.Clear();
+                        ms_makecode.Text = "";
+                        ms_prodcode.Text = "";
+                        cr_code.Text = "";
+                        cd_stepcode.Text = "";
+                    //}
+                    //else
+                    //{
+                    //    serBtn.Checked = bigboxBtn.Checked;
+                    //    bigboxBtn.Checked = !serBtn.Checked;
+                    //}
+                }
+                if (((RadioButton)sender).Name == "serBtn")
+                {
+                    input.Focus();
+                    OperatResult.AppendText("请输入序列号进行采集\n", Color.Black, input);
+                }
+                else if (((RadioButton)sender).Name == "bigboxBtn")
+                {
+                    input.Focus();
+                    OperatResult.AppendText("请输入箱号进行采集\n", Color.Black, input);
+                }
+                else if (((RadioButton)sender).Name == "oqcBtn")
+                {
+                    input.Focus();
+                    OperatResult.AppendText("请输入返工抽检批号进行采集\n", Color.Black, input);
+                }
+            }
+        }
+
+        private void cr_code_TextChanged(object sender, EventArgs e)
+        {
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+        }
+
+        private void input_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (serBtn.Checked)
+                {
+                    dt = (DataTable)dh.ExecuteSql("select ms_makecode,ms_prodcode,ms_sncode,ms_craftcode cr_code,ms_status,ms_outboxcode from makeserial where ms_sncode = '" + input.Text + "' ORDER BY MS_ID DESC", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "所属工单" + dt.Rows[0]["ms_makecode"].ToString() + "与当前工单" + ms_makecode.Text + "不一致\n", Color.Red, input);
+                            return;
+                        }
+                        if (dt.Rows[0]["ms_status"].ToString() == "3")
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "为不良品,不允许采集\n", Color.Red, input);
+                            return;
+                        }
+                        if (dt.Rows[0]["ms_outboxcode"].ToString() != "")
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "已装箱" + dt.Rows[0]["ms_outboxcode"].ToString() + ",不允许采集\n", Color.Red, input);
+                            return;
+                        }
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        if (sb.Contains(dt.Rows[0]["ms_sncode"].ToString()))
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "已采集\n", Color.Red, input);
+                            return;
+                        }
+                        WeighRecord.Items.Add(dt.Rows[0]["ms_sncode"].ToString());
+                        sb.Add(dt.Rows[0]["ms_sncode"].ToString());
+                        OperatResult.AppendText("SN:" + input.Text + "采集\n", Color.Green, input);
+                        cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+                    }
+                    else
+                    {
+                        OperatResult.AppendText("SN:" + input.Text + "不存在\n", Color.Red, input);
+                        return;
+                    }
+                }
+                else if (bigboxBtn.Checked)
+                {
+                    dt = (DataTable)dh.ExecuteSql("select pa_makecode ms_makecode,pa_prodcode ms_prodcode,pa_outboxcode,pa_mothercode,ma_craftcode cr_code from package left join make on pa_makecode = ma_code where pa_outboxcode = '"+input.Text+"' and pa_type = '1'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "所属工单" + dt.Rows[0]["ms_makecode"].ToString() + "与当前工单" + ms_makecode.Text + "不一致\n", Color.Red, input);
+                            return;
+                        }
+                        if (dt.Rows[0]["pa_mothercode"].ToString() != "")
+                        {
+                            OperatResult.AppendText("卡通箱:" + input.Text + "已装栈板" + dt.Rows[0]["pa_mothercode"].ToString() + ",不允许采集\n", Color.Red, input);
+                            return;
+                        }
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        if (sb.Contains(dt.Rows[0]["pa_outboxcode"].ToString()))
+                        {
+                            OperatResult.AppendText("卡通箱:" + input.Text + "已采集\n", Color.Red, input);
+                            return;
+                        }
+                        WeighRecord.Items.Add(dt.Rows[0]["pa_outboxcode"].ToString());
+                        sb.Add(dt.Rows[0]["pa_outboxcode"].ToString());
+                        OperatResult.AppendText("卡通箱:" + input.Text + "采集\n", Color.Green, input);
+                        cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+                    }
+                    else
+                    {
+                        OperatResult.AppendText("卡通箱:" + input.Text + "不存在\n", Color.Red, input);
+                        return;
+                    }
+                }
+                else if (oqcBtn.Checked)
+                {
+                    dt = (DataTable)dh.ExecuteSql("select ob_makecode ms_makecode,ob_prodcode ms_prodcode,ob_checkno,ma_craftcode cr_code from oqcbatch left join make on ob_makecode = ma_code left join makeserial on ms_checkno = ob_checkno where (ob_checkno = '" + input.Text + "' or ms_sncode = '" + input.Text + "') and ob_status IN( 'NG','FNG') ", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
+                        {
+                            OperatResult.AppendText("抽检批:" + input.Text + "所属工单" + dt.Rows[0]["ms_makecode"].ToString() + "与当前工单" + ms_makecode.Text + "不一致\n", Color.Red, input);
+                            return;
+                        }
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        if (sb.Contains(dt.Rows[0]["ob_checkno"].ToString()))
+                        {
+                            OperatResult.AppendText("抽检批:" + input.Text + "已采集\n", Color.Red, input);
+                            return;
+                        }
+                        WeighRecord.Items.Add(dt.Rows[0]["ob_checkno"].ToString());
+                        sb.Add(dt.Rows[0]["ob_checkno"].ToString());
+                        OperatResult.AppendText("抽检批:" + input.Text + "采集\n", Color.Green, input);
+                        cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+                    }
+                    else
+                    {
+                        OperatResult.AppendText("录入信息:" + input.Text + "不存在抽检批或不是批退状态\n", Color.Red, input);
+                        return;
+                    }
+                }
+            }
+        }
+
+        private void 数据清空_Click(object sender, EventArgs e)
+        {
+            BaseUtil.CleanControls(this.Controls);
+            WeighRecord.Items.Clear();
+            sb.Clear();
+        }
+
+        private void excelim_Click(object sender, EventArgs e)
+        {
+            DialogResult result = openFileDialog1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                DataTable ddtt;
+                ddtt = eh.ImportExcel(openFileDialog1.FileName, "test");
+                if (ddtt.Rows.Count > 0)
+                {
+                    for (int i = 0; i < ddtt.Rows.Count; i++)
+                    {
+                        input.Text = ddtt.Rows[i][0].ToString();
+                        input_KeyDown(sender, new KeyEventArgs(Keys.Enter));
+                    }
+                }
+            }
+        }
+    }
+}

+ 238 - 0
UAS_MES_ZT/FunctionCode/Special/Special_ResetCheck.resx

@@ -0,0 +1,238 @@
+<?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="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="excelim.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="excelim.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="excelim.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="数据清空.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="数据清空.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="数据清空.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="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>

+ 30 - 26
UAS_MES_ZT/FunctionCode/SystemSetting/SystemSetting_PrinterTest.Designer.cs

@@ -37,7 +37,7 @@
             this.label4 = new System.Windows.Forms.Label();
             this.SN = new System.Windows.Forms.RadioButton();
             this.Material = new System.Windows.Forms.RadioButton();
-            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.Rn = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.Num = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -81,7 +81,6 @@
             this.label2.Size = new System.Drawing.Size(62, 31);
             this.label2.TabIndex = 29;
             this.label2.Text = "日期";
-            this.label2.Visible = false;
             // 
             // label1
             // 
@@ -98,29 +97,28 @@
             // 
             this.Date.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
             this.Date.Location = new System.Drawing.Point(267, 311);
-            this.Date.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Date.Margin = new System.Windows.Forms.Padding(2);
             this.Date.Name = "Date";
             this.Date.Size = new System.Drawing.Size(210, 28);
             this.Date.TabIndex = 26;
-            this.Date.Visible = false;
             // 
             // 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(154, 140);
+            this.label4.Location = new System.Drawing.Point(130, 140);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(86, 31);
+            this.label4.Size = new System.Drawing.Size(110, 31);
             this.label4.TabIndex = 33;
-            this.label4.Text = "工单号";
+            this.label4.Text = "标签前缀";
             // 
             // SN
             // 
             this.SN.AutoSize = true;
             this.SN.Checked = true;
             this.SN.Location = new System.Drawing.Point(267, 45);
-            this.SN.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.SN.Margin = new System.Windows.Forms.Padding(2);
             this.SN.Name = "SN";
             this.SN.Size = new System.Drawing.Size(123, 22);
             this.SN.TabIndex = 39;
@@ -134,7 +132,7 @@
             // 
             this.Material.AutoSize = true;
             this.Material.Location = new System.Drawing.Point(409, 45);
-            this.Material.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Material.Margin = new System.Windows.Forms.Padding(2);
             this.Material.Name = "Material";
             this.Material.Size = new System.Drawing.Size(105, 22);
             this.Material.TabIndex = 40;
@@ -144,18 +142,24 @@
             // 
             // ma_code
             // 
-            this.ma_code.AllPower = null;
-            this.ma_code.BackColor = System.Drawing.Color.White;
-            this.ma_code.ID = null;
-            this.ma_code.Location = new System.Drawing.Point(267, 147);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ma_code.AllPower = "ifall";
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = "回流工序";
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(267, 140);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
             this.ma_code.Name = "ma_code";
-            this.ma_code.Power = null;
-            this.ma_code.Size = new System.Drawing.Size(210, 28);
-            this.ma_code.Str = null;
-            this.ma_code.Str1 = null;
-            this.ma_code.Str2 = null;
-            this.ma_code.TabIndex = 34;
+            this.ma_code.Power = "ifspecial";
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(225, 33);
+            this.ma_code.TabIndex = 239;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "";
+            this.ma_code.TextBoxEnable = true;
             // 
             // Export
             // 
@@ -165,7 +169,7 @@
             this.Export.Image = null;
             this.Export.IsShowBorder = true;
             this.Export.Location = new System.Drawing.Point(267, 411);
-            this.Export.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Export.Margin = new System.Windows.Forms.Padding(4);
             this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
             this.Export.Name = "Export";
             this.Export.NormalImage = ((System.Drawing.Image)(resources.GetObject("Export.NormalImage")));
@@ -182,7 +186,7 @@
             this.Rn.BackColor = System.Drawing.Color.White;
             this.Rn.ID = null;
             this.Rn.Location = new System.Drawing.Point(267, 256);
-            this.Rn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Rn.Margin = new System.Windows.Forms.Padding(4);
             this.Rn.Name = "Rn";
             this.Rn.Power = null;
             this.Rn.Size = new System.Drawing.Size(210, 28);
@@ -198,7 +202,7 @@
             this.Num.BackColor = System.Drawing.Color.White;
             this.Num.ID = null;
             this.Num.Location = new System.Drawing.Point(267, 200);
-            this.Num.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Num.Margin = new System.Windows.Forms.Padding(4);
             this.Num.Name = "Num";
             this.Num.Power = null;
             this.Num.Size = new System.Drawing.Size(210, 28);
@@ -259,9 +263,9 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1526, 838);
+            this.Controls.Add(this.ma_code);
             this.Controls.Add(this.Material);
             this.Controls.Add(this.SN);
-            this.Controls.Add(this.ma_code);
             this.Controls.Add(this.label4);
             this.Controls.Add(this.Export);
             this.Controls.Add(this.label3);
@@ -275,7 +279,7 @@
             this.Controls.Add(this.PrintTest);
             this.Controls.Add(this.ma_salecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "SystemSetting_PrinterTest";
             this.Tag = "Setup!PrinterTest";
             this.Text = "打印机调试";
@@ -297,9 +301,9 @@
         private CustomControl.TextBoxWithIcon.EnterTextBox Num;
         private System.Windows.Forms.DateTimePicker Date;
         private CustomControl.ButtonUtil.NormalButton Export;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ma_code;
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.RadioButton SN;
         private System.Windows.Forms.RadioButton Material;
+        private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
     }
 }

+ 30 - 12
UAS_MES_ZT/FunctionCode/SystemSetting/SystemSetting_PrinterTest.cs

@@ -53,11 +53,11 @@ namespace UAS_MES_NEW.SystemSetting
         {
             if (SN.Checked)
             {
-                if (!dh.CheckExist("make", "ma_code='" + ma_code.Text + "'"))
-                {
-                    MessageBox.Show("工单号不存在");
-                    return;
-                }
+                //if (!dh.CheckExist("make", "ma_code='" + ma_code.Text + "'"))
+                //{
+                //    MessageBox.Show("工单号不存在");
+                //    return;
+                //}
                 for (int i = int.Parse(Rn.Text); i < (int.Parse(Num.Text) + int.Parse(Rn.Text)); i = i + 1)
                 {
                     int temp = i;
@@ -67,10 +67,10 @@ namespace UAS_MES_NEW.SystemSetting
                         {
                             case "SN":
                                 format.SubStrings[j].Value = (ma_code.Text +lpad(2, Date.Value.Year.ToString())+ lpad(2, Date.Value.Month.ToString()) + lpad(2, Date.Value.Day.ToString()) + lpad(4, (temp).ToString()));
-                                if (!dh.CheckExist("makesnlist", "msl_sncode='" + format.SubStrings[j].Value + "'"))
-                                {
-                                    dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before')", "insert");
-                                };
+                                //if (!dh.CheckExist("makesnlist", "msl_sncode='" + format.SubStrings[j].Value + "'"))
+                                //{
+                                //    dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before')", "insert");
+                                //};
                                 break;
                             case "MAKE":
                                 format.SubStrings[j].Value = ma_code.Text;
@@ -80,7 +80,14 @@ namespace UAS_MES_NEW.SystemSetting
                                 //};
                                 break;
                             case "LTNO":
-                                format.SubStrings[j].Value = lpad(2, Date.Value.Year.ToString()) + lpad(2, Date.Value.Month.ToString()) + lpad(2, Date.Value.Day.ToString()) + lpad(4, (temp).ToString());
+                                format.SubStrings[j].Value = lpad(2, Date.Value.Year.ToString()) + lpad(2, Date.Value.Month.ToString()) + lpad(2, Date.Value.Day.ToString()) ;
+                                //if (!dh.CheckExist("makesnlist", "msl_sncode='" + format.SubStrings[j].Value + "'"))
+                                //{
+                                //    dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before')", "insert");
+                                //};
+                                break;
+                            case "NUM":
+                                format.SubStrings[j].Value = lpad(4, (temp).ToString());
                                 //if (!dh.CheckExist("makesnlist", "msl_sncode='" + format.SubStrings[j].Value + "'"))
                                 //{
                                 //    dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before')", "insert");
@@ -90,7 +97,7 @@ namespace UAS_MES_NEW.SystemSetting
                                 break;
                         }
                     }
-                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "打印工单条码", "打印成功", "", "");
+                    //LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "打印工单条码", "打印成功", "", "");
                     format.PrintSetup.PrinterName = PrinterList.Text;
                     format.PrintSetup.IdenticalCopiesOfLabel = 1;
                     format.Print();
@@ -111,11 +118,22 @@ namespace UAS_MES_NEW.SystemSetting
 
         private void SystemSetting_PrinterTest_Load(object sender, EventArgs e)
         {
+            ma_code.TableName = "make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_orispeccode # 型号,pr_spec # 产品规格,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_orispeccode pr_spec", "ma_softversion", "ma_salecode", "nvl(pr_sendchecktype,'LineCode')pr_sendchecktype" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += Ma_code_DbChange;
             engine.Start();
-            format = engine.Documents.Open(Application.StartupPath + "/FOG.btw");
+            format = engine.Documents.Open(Application.StartupPath + "/20X10打印标签.btw");
             //format1 = engine.Documents.Open(Application.StartupPath + "/Material.btw");
         }
 
+        private void Ma_code_DbChange(object sender, EventArgs e)
+        {
+
+        }
+
         private void SN_CheckedChanged(object sender, EventArgs e)
         {
             if (SN.Checked)

+ 1 - 1
UAS_MES_ZT/Program.cs

@@ -91,7 +91,7 @@ namespace UAS_MES_NEW
 
         //处理线程的异常
         static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
-        {
+        { 
             string str = GetExceptionMsg(e.Exception, e.ToString());
             LogManager.DoLog(e.Exception.Message + "  " + e.Exception.TargetSite + "  " + e.Exception.StackTrace);
             MessageBox.Show(str, "提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);

+ 29 - 2
UAS_MES_ZT/PublicMethod/LogicHandler.cs

@@ -394,7 +394,19 @@ namespace UAS_MES_NEW.PublicMethod
                             Grid = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                         }
                         else
-                            oErrorMessage = "只有待检验的批次才允许维护抽样计划";
+                        {
+                            if (Form.Rows[0]["ob_status"].ToString().Contains("OK") || (Form.Rows[0]["ob_status"].ToString().Contains("NG")&& Form.Rows[0]["ob_status"].ToString().Length<4))
+                            {
+                                oErrorMessage = "抽检批次" + iCheckNo + "检验完毕,不允许采集";
+                            }else if (Form.Rows[0]["ob_status"].ToString() == "CHECKING")
+                            {
+                                oErrorMessage = "抽检批次" + iCheckNo + "处于检验中,无法维护抽样计划";
+                            }
+                            else if (Form.Rows[0]["ob_status"].ToString() == "ENTERING") 
+                            {
+                                oErrorMessage = "抽检批次" + iCheckNo + "处于未送检状态,请送检";
+                            }
+                        }
                     }
                     else
                         oErrorMessage = "抽检批次" + iCheckNo + "不存在";
@@ -409,7 +421,22 @@ namespace UAS_MES_NEW.PublicMethod
                     if (Form.Rows.Count > 0)
                     {
                         if (Form.Rows[0]["ob_projectcode"].ToString() == "" || !(Form.Rows[0]["ob_status"].ToString() != "UNCHECK" || Form.Rows[0]["ob_status"].ToString() != "CHECKING"))
-                            oErrorMessage = "状态为未检验或者送检中并且有抽样计划的才能操作";
+                        {
+                            if (Form.Rows[0]["ob_status"].ToString().Contains("OK") || (Form.Rows[0]["ob_status"].ToString().Contains("NG") && Form.Rows[0]["ob_status"].ToString().Length < 4))
+                            {
+                                oErrorMessage = "抽检批次" + iCheckNo + "检验完毕,不允许采集";
+                            }
+                            else if (Form.Rows[0]["ob_status"].ToString() == "ENTERING")
+                            {
+                                oErrorMessage = "抽检批次" + iCheckNo + "处于未送检状态,请送检";
+                            }
+                            else if (Form.Rows[0]["ob_projectcode"].ToString() == "")
+                            {
+                                oErrorMessage = "抽检批次" + iCheckNo + "未维护抽样计划,请维护";
+                            }
+
+                           //oErrorMessage = "状态为未检验或者送检中并且有抽样计划的才能操作";
+                        }
                     }
                     else
                     {

BIN
UAS_MES_ZT/Resources/Sound/4082.wav


BIN
UAS_MES_ZT/Resources/Sound/FAIL.wav


BIN
UAS_MES_ZT/Resources/Sound/PASS.wav


BIN
UAS_MES_ZT/Resources/Sound/失败.wav


+ 28 - 0
UAS_MES_ZT/UAS_MES_ZT.csproj

@@ -966,6 +966,12 @@
     <Compile Include="FunctionCode\Packing\Packing_ProdWeightSet.Designer.cs">
       <DependentUpon>Packing_ProdWeightSet.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\Query_Employee.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_Employee.Designer.cs">
+      <DependentUpon>Query_Employee.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Query\Query_ExeProgress.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1092,12 +1098,24 @@
     <Compile Include="FunctionCode\Special\Special_QCForce.Designer.cs">
       <DependentUpon>Special_QCForce.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Special\Special_ResetCheck.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_ResetCheck.Designer.cs">
+      <DependentUpon>Special_ResetCheck.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Special\Special_Reset.cs">
       <SubType>Form</SubType>
     </Compile>
     <Compile Include="FunctionCode\Special\Special_Reset.Designer.cs">
       <DependentUpon>Special_Reset.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Special\Special_ReSNBD.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_ReSNBD.Designer.cs">
+      <DependentUpon>Special_ReSNBD.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Special\Special_SeqTransform.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1609,6 +1627,9 @@
     <EmbeddedResource Include="FunctionCode\Packing\Packing_ProdWeightSet.resx">
       <DependentUpon>Packing_ProdWeightSet.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_Employee.resx">
+      <DependentUpon>Query_Employee.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_ExeProgress.resx">
       <DependentUpon>Query_ExeProgress.cs</DependentUpon>
     </EmbeddedResource>
@@ -1672,9 +1693,15 @@
     <EmbeddedResource Include="FunctionCode\Special\Special_QCForce.resx">
       <DependentUpon>Special_QCForce.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_ResetCheck.resx">
+      <DependentUpon>Special_ResetCheck.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_Reset.resx">
       <DependentUpon>Special_Reset.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_ReSNBD.resx">
+      <DependentUpon>Special_ReSNBD.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_SeqTransform.resx">
       <DependentUpon>Special_SeqTransform.cs</DependentUpon>
     </EmbeddedResource>
@@ -1811,6 +1838,7 @@
     <Content Include="Resources\change_password.png" />
     <None Include="Resources\Sound\4082.wav" />
     <Content Include="Resources\Sound\FAIL.wav" />
+    <Content Include="Resources\Sound\失败.wav" />
     <Content Include="Resources\Sound\PASS.wav" />
     <Content Include="Tool\DevComponents.DotNetBar2.dll" />
     <Content Include="Tool\DevExpress.BonusSkins.v15.2.dll" />