Browse Source

微浦行之成修改提交

caosy 9 months ago
parent
commit
1be6ea45e9
37 changed files with 3643 additions and 1152 deletions
  1. 1 1
      UAS_MES_WEIP/App.config
  2. 1 1
      UAS_MES_WEIP/FunctionCode/Make/Make_PositionStock.cs
  3. 208 151
      UAS_MES_WEIP/FunctionCode/Make/Make_Repair.Designer.cs
  4. 12 0
      UAS_MES_WEIP/FunctionCode/Make/Make_Repair.resx
  5. 18 8
      UAS_MES_WEIP/FunctionCode/Make/Make_SMTBind.cs
  6. 267 256
      UAS_MES_WEIP/FunctionCode/Make/Make_SMTSStencil.Designer.cs
  7. 106 105
      UAS_MES_WEIP/FunctionCode/Make/Make_SMTSStencil.cs
  8. 39 39
      UAS_MES_WEIP/FunctionCode/Make/Make_SMTSStencil.resx
  9. 19 18
      UAS_MES_WEIP/FunctionCode/Make/Make_SMTStencil.cs
  10. 39 39
      UAS_MES_WEIP/FunctionCode/Make/Make_SMTStockSStencil.Designer.cs
  11. 21 21
      UAS_MES_WEIP/FunctionCode/Make/Make_SMTStockSStencil.cs
  12. 25 25
      UAS_MES_WEIP/FunctionCode/Make/Make_SMTStockStencil.Designer.cs
  13. 6 6
      UAS_MES_WEIP/FunctionCode/Make/Make_SMTStockStencil.cs
  14. 0 24
      UAS_MES_WEIP/FunctionCode/Make/Make_SMTStockStencil.resx
  15. 210 199
      UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.Designer.cs
  16. 50 30
      UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.cs
  17. 1 1
      UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.resx
  18. 648 0
      UAS_MES_WEIP/FunctionCode/Query/Query_BarcodeIn.Designer.cs
  19. 216 0
      UAS_MES_WEIP/FunctionCode/Query/Query_BarcodeIn.cs
  20. 301 0
      UAS_MES_WEIP/FunctionCode/Query/Query_BarcodeIn.resx
  21. 1 1
      UAS_MES_WEIP/PublicMethod/LogicHandler.cs
  22. 14 9
      UAS_MES_WEIP/UAS_MES_WEIP.csproj
  23. 6 0
      UAS_MES_XZC/CustomControl/RichText/RichTextAutoBottom.cs
  24. 105 0
      UAS_MES_XZC/FunctionCode/Make/Make_CollectHLH.Designer.cs
  25. 500 0
      UAS_MES_XZC/FunctionCode/Make/Make_CollectHLH.cs
  26. 126 0
      UAS_MES_XZC/FunctionCode/Make/Make_CollectHLH.resx
  27. 34 8
      UAS_MES_XZC/FunctionCode/Make/Make_CollectNetCode.Designer.cs
  28. 345 17
      UAS_MES_XZC/FunctionCode/Make/Make_CollectNetCode.cs
  29. 3 0
      UAS_MES_XZC/FunctionCode/Make/Make_CollectNetCode.resx
  30. 2 2
      UAS_MES_XZC/FunctionCode/Make/Make_FeedingCollection.cs
  31. 7 0
      UAS_MES_XZC/FunctionCode/Make/Make_FeedingCollectionCombineFix.cs
  32. 3 1
      UAS_MES_XZC/FunctionCode/Make/Make_PreFeedingCollection.cs
  33. 241 114
      UAS_MES_XZC/FunctionCode/Query/Query_ExeProgress.Designer.cs
  34. 48 59
      UAS_MES_XZC/FunctionCode/Query/Query_ExeProgress.cs
  35. 11 17
      UAS_MES_XZC/FunctionCode/Query/Query_ExeProgress.resx
  36. BIN
      UAS_MES_XZC/Resources/Sound/901028.wav
  37. 9 0
      UAS_MES_XZC/UAS_MES_XZC.csproj

+ 1 - 1
UAS_MES_WEIP/App.config

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

+ 1 - 1
UAS_MES_WEIP/FunctionCode/Make/Make_PositionStock.cs

@@ -90,7 +90,7 @@ namespace UAS_MES_NEW.Make
                                 sql.Clear();
                                 sql.Append("select sp_id,sp_oneuseqty,sp_fsoncode,sp_soncode,sp_prefix from stepbom left join stepproduct on sp_sbid=sb_id ");
                                 sql.Append("where sb_craftcode='" + ma_craftcode.Text + "' and  sb_prodcode='" + ma_prodcode.Text + "' and ");
-                                sql.Append("sb_bomversion='" + ma_bomversion.Text + "'  and sp_stepcode='" + User.CurrentStepCode + "' and (sp_soncode ='" + bar_prodcode + "' or sp_fsoncode='" + bar_prodcode + "' or (select count(1) from wp_replace_view@WP where bo_mothercode = '"+ ma_prodcode.Text + "' and bd_soncode = sp_fsoncode and pre_repcode= '"+ bar_prodcode + "') >0  )and sp_tracekind=2 ");
+                                sql.Append("sb_bomversion='" + ma_bomversion.Text + "'  and sp_stepcode='" + User.CurrentStepCode + "' and (sp_soncode ='" + bar_prodcode + "' or sp_fsoncode='" + bar_prodcode + "' or sp_repcode = '"+bar_prodcode+"' or (select count(1) from wp_replace_view@WP where bo_mothercode = '" + ma_prodcode.Text + "' and bd_soncode = sp_fsoncode and pre_repcode= '"+ bar_prodcode + "') >0  )and sp_tracekind=2 ");
                                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 if (dt.Rows.Count > 0)
                                 {

+ 208 - 151
UAS_MES_WEIP/FunctionCode/Make/Make_Repair.Designer.cs

@@ -121,20 +121,22 @@
             // 
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(654, 144);
+            this.label14.Location = new System.Drawing.Point(981, 216);
+            this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label14.Name = "label14";
-            this.label14.Size = new System.Drawing.Size(74, 21);
+            this.label14.Size = new System.Drawing.Size(110, 31);
             this.label14.TabIndex = 46;
-            this.label14.Text = "不良备注";
+            this.label14.Text = "不良位号";
             // 
             // bc_name_label
             // 
             this.bc_name_label.AutoSize = true;
             this.bc_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_name_label.ForeColor = System.Drawing.Color.Black;
-            this.bc_name_label.Location = new System.Drawing.Point(406, 142);
+            this.bc_name_label.Location = new System.Drawing.Point(609, 213);
+            this.bc_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_name_label.Name = "bc_name_label";
-            this.bc_name_label.Size = new System.Drawing.Size(74, 21);
+            this.bc_name_label.Size = new System.Drawing.Size(110, 31);
             this.bc_name_label.TabIndex = 44;
             this.bc_name_label.Text = "不良代码";
             // 
@@ -142,9 +144,10 @@
             // 
             this.bg_name_label.AutoSize = true;
             this.bg_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bg_name_label.Location = new System.Drawing.Point(163, 142);
+            this.bg_name_label.Location = new System.Drawing.Point(244, 213);
+            this.bg_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bg_name_label.Name = "bg_name_label";
-            this.bg_name_label.Size = new System.Drawing.Size(90, 21);
+            this.bg_name_label.Size = new System.Drawing.Size(134, 31);
             this.bg_name_label.TabIndex = 40;
             this.bg_name_label.Text = "不良代码组";
             // 
@@ -153,9 +156,10 @@
             this.mbr_brgcode_label.AutoSize = true;
             this.mbr_brgcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbr_brgcode_label.ForeColor = System.Drawing.Color.Black;
-            this.mbr_brgcode_label.Location = new System.Drawing.Point(163, 187);
+            this.mbr_brgcode_label.Location = new System.Drawing.Point(244, 280);
+            this.mbr_brgcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mbr_brgcode_label.Name = "mbr_brgcode_label";
-            this.mbr_brgcode_label.Size = new System.Drawing.Size(90, 21);
+            this.mbr_brgcode_label.Size = new System.Drawing.Size(134, 31);
             this.mbr_brgcode_label.TabIndex = 93;
             this.mbr_brgcode_label.Text = "不良原因组";
             // 
@@ -164,9 +168,10 @@
             this.nr_name_label.AutoSize = true;
             this.nr_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.nr_name_label.ForeColor = System.Drawing.Color.Black;
-            this.nr_name_label.Location = new System.Drawing.Point(406, 187);
+            this.nr_name_label.Location = new System.Drawing.Point(609, 280);
+            this.nr_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.nr_name_label.Name = "nr_name_label";
-            this.nr_name_label.Size = new System.Drawing.Size(74, 21);
+            this.nr_name_label.Size = new System.Drawing.Size(110, 31);
             this.nr_name_label.TabIndex = 95;
             this.nr_name_label.Text = "不良原因";
             // 
@@ -175,9 +180,10 @@
             this.mbr_dutycode_label.AutoSize = true;
             this.mbr_dutycode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbr_dutycode_label.ForeColor = System.Drawing.Color.Black;
-            this.mbr_dutycode_label.Location = new System.Drawing.Point(654, 187);
+            this.mbr_dutycode_label.Location = new System.Drawing.Point(981, 280);
+            this.mbr_dutycode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mbr_dutycode_label.Name = "mbr_dutycode_label";
-            this.mbr_dutycode_label.Size = new System.Drawing.Size(58, 21);
+            this.mbr_dutycode_label.Size = new System.Drawing.Size(86, 31);
             this.mbr_dutycode_label.TabIndex = 97;
             this.mbr_dutycode_label.Text = "责任别";
             // 
@@ -186,9 +192,10 @@
             this.mbc_component_label.AutoSize = true;
             this.mbc_component_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbc_component_label.ForeColor = System.Drawing.Color.Black;
-            this.mbc_component_label.Location = new System.Drawing.Point(163, 229);
+            this.mbc_component_label.Location = new System.Drawing.Point(244, 344);
+            this.mbc_component_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mbc_component_label.Name = "mbc_component_label";
-            this.mbc_component_label.Size = new System.Drawing.Size(74, 21);
+            this.mbc_component_label.Size = new System.Drawing.Size(110, 31);
             this.mbc_component_label.TabIndex = 99;
             this.mbc_component_label.Text = "不良组件";
             // 
@@ -197,9 +204,10 @@
             this.mbr_solution_label.AutoSize = true;
             this.mbr_solution_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbr_solution_label.ForeColor = System.Drawing.Color.Black;
-            this.mbr_solution_label.Location = new System.Drawing.Point(406, 228);
+            this.mbr_solution_label.Location = new System.Drawing.Point(609, 342);
+            this.mbr_solution_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mbr_solution_label.Name = "mbr_solution_label";
-            this.mbr_solution_label.Size = new System.Drawing.Size(74, 21);
+            this.mbr_solution_label.Size = new System.Drawing.Size(110, 31);
             this.mbr_solution_label.TabIndex = 101;
             this.mbr_solution_label.Text = "解决方案";
             // 
@@ -208,22 +216,26 @@
             this.mbl_loc_label.AutoSize = true;
             this.mbl_loc_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbl_loc_label.ForeColor = System.Drawing.Color.Black;
-            this.mbl_loc_label.Location = new System.Drawing.Point(250, 283);
+            this.mbl_loc_label.Location = new System.Drawing.Point(375, 424);
+            this.mbl_loc_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mbl_loc_label.Name = "mbl_loc_label";
-            this.mbl_loc_label.Size = new System.Drawing.Size(74, 21);
+            this.mbl_loc_label.Size = new System.Drawing.Size(110, 31);
             this.mbl_loc_label.TabIndex = 103;
             this.mbl_loc_label.Text = "不良位置";
+            this.mbl_loc_label.Visible = false;
             // 
             // mbp_part_label
             // 
             this.mbp_part_label.AutoSize = true;
             this.mbp_part_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbp_part_label.ForeColor = System.Drawing.Color.Black;
-            this.mbp_part_label.Location = new System.Drawing.Point(511, 282);
+            this.mbp_part_label.Location = new System.Drawing.Point(766, 423);
+            this.mbp_part_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mbp_part_label.Name = "mbp_part_label";
-            this.mbp_part_label.Size = new System.Drawing.Size(74, 21);
+            this.mbp_part_label.Size = new System.Drawing.Size(110, 31);
             this.mbp_part_label.TabIndex = 105;
             this.mbp_part_label.Text = "不良零件";
+            this.mbp_part_label.Visible = false;
             // 
             // GetSNCode_Label
             // 
@@ -231,9 +243,10 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.GetSNCode_Label.AutoSize = true;
             this.GetSNCode_Label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.GetSNCode_Label.Location = new System.Drawing.Point(320, 542);
+            this.GetSNCode_Label.Location = new System.Drawing.Point(480, 813);
+            this.GetSNCode_Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.GetSNCode_Label.Name = "GetSNCode_Label";
-            this.GetSNCode_Label.Size = new System.Drawing.Size(58, 21);
+            this.GetSNCode_Label.Size = new System.Drawing.Size(86, 31);
             this.GetSNCode_Label.TabIndex = 113;
             this.GetSNCode_Label.Text = "序列号";
             // 
@@ -242,19 +255,19 @@
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Black;
-            this.label2.Location = new System.Drawing.Point(8, 118);
+            this.label2.Location = new System.Drawing.Point(12, 177);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(74, 22);
+            this.label2.Size = new System.Drawing.Size(110, 31);
             this.label2.TabIndex = 117;
             this.label2.Text = "不良信息";
             // 
             // BadCodeTree
             // 
             this.BadCodeTree.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BadCodeTree.Location = new System.Drawing.Point(11, 144);
-            this.BadCodeTree.Margin = new System.Windows.Forms.Padding(2);
+            this.BadCodeTree.Location = new System.Drawing.Point(16, 216);
             this.BadCodeTree.Name = "BadCodeTree";
-            this.BadCodeTree.Size = new System.Drawing.Size(144, 102);
+            this.BadCodeTree.Size = new System.Drawing.Size(214, 151);
             this.BadCodeTree.TabIndex = 118;
             this.BadCodeTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.BadCodeTree_NodeMouseClick);
             // 
@@ -263,9 +276,10 @@
             this.bc_code.AutoSize = true;
             this.bc_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_code.ForeColor = System.Drawing.Color.Black;
-            this.bc_code.Location = new System.Drawing.Point(862, 225);
+            this.bc_code.Location = new System.Drawing.Point(1293, 338);
+            this.bc_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_code.Name = "bc_code";
-            this.bc_code.Size = new System.Drawing.Size(0, 21);
+            this.bc_code.Size = new System.Drawing.Size(0, 31);
             this.bc_code.TabIndex = 122;
             this.bc_code.Visible = false;
             // 
@@ -274,9 +288,10 @@
             this.bg_code.AutoSize = true;
             this.bg_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bg_code.ForeColor = System.Drawing.Color.Black;
-            this.bg_code.Location = new System.Drawing.Point(827, 225);
+            this.bg_code.Location = new System.Drawing.Point(1240, 338);
+            this.bg_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bg_code.Name = "bg_code";
-            this.bg_code.Size = new System.Drawing.Size(0, 21);
+            this.bg_code.Size = new System.Drawing.Size(0, 31);
             this.bg_code.TabIndex = 123;
             this.bg_code.Visible = false;
             // 
@@ -285,9 +300,10 @@
             this.nrg_code.AutoSize = true;
             this.nrg_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.nrg_code.ForeColor = System.Drawing.Color.Black;
-            this.nrg_code.Location = new System.Drawing.Point(799, 260);
+            this.nrg_code.Location = new System.Drawing.Point(1198, 390);
+            this.nrg_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.nrg_code.Name = "nrg_code";
-            this.nrg_code.Size = new System.Drawing.Size(0, 21);
+            this.nrg_code.Size = new System.Drawing.Size(0, 31);
             this.nrg_code.TabIndex = 136;
             this.nrg_code.Visible = false;
             // 
@@ -296,9 +312,10 @@
             this.so_code.AutoSize = true;
             this.so_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.so_code.ForeColor = System.Drawing.Color.Black;
-            this.so_code.Location = new System.Drawing.Point(820, 263);
+            this.so_code.Location = new System.Drawing.Point(1230, 394);
+            this.so_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.so_code.Name = "so_code";
-            this.so_code.Size = new System.Drawing.Size(0, 21);
+            this.so_code.Size = new System.Drawing.Size(0, 31);
             this.so_code.TabIndex = 137;
             this.so_code.Visible = false;
             // 
@@ -307,9 +324,10 @@
             this.mbr_dutycode.AutoSize = true;
             this.mbr_dutycode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbr_dutycode.ForeColor = System.Drawing.Color.Black;
-            this.mbr_dutycode.Location = new System.Drawing.Point(778, 263);
+            this.mbr_dutycode.Location = new System.Drawing.Point(1167, 394);
+            this.mbr_dutycode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mbr_dutycode.Name = "mbr_dutycode";
-            this.mbr_dutycode.Size = new System.Drawing.Size(0, 21);
+            this.mbr_dutycode.Size = new System.Drawing.Size(0, 31);
             this.mbr_dutycode.TabIndex = 138;
             this.mbr_dutycode.Visible = false;
             // 
@@ -317,9 +335,10 @@
             // 
             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(5, 291);
+            this.label1.Location = new System.Drawing.Point(8, 436);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(74, 21);
+            this.label1.Size = new System.Drawing.Size(110, 31);
             this.label1.TabIndex = 144;
             this.label1.Text = "待选不良";
             // 
@@ -327,9 +346,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(5, 259);
+            this.label3.Location = new System.Drawing.Point(8, 388);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(90, 21);
+            this.label3.Size = new System.Drawing.Size(134, 31);
             this.label3.TabIndex = 142;
             this.label3.Text = "不良代码组";
             // 
@@ -343,9 +363,11 @@
             this.bc_code1,
             this.bc_name1});
             this.WaitRejectList.FullRowSelect = true;
-            this.WaitRejectList.Location = new System.Drawing.Point(6, 325);
+            this.WaitRejectList.HideSelection = false;
+            this.WaitRejectList.Location = new System.Drawing.Point(9, 488);
+            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.WaitRejectList.Name = "WaitRejectList";
-            this.WaitRejectList.Size = new System.Drawing.Size(244, 244);
+            this.WaitRejectList.Size = new System.Drawing.Size(364, 364);
             this.WaitRejectList.TabIndex = 141;
             this.WaitRejectList.UseCompatibleStateImageBehavior = false;
             this.WaitRejectList.View = System.Windows.Forms.View.Details;
@@ -379,9 +401,10 @@
             // checkBox1
             // 
             this.checkBox1.AutoSize = true;
-            this.checkBox1.Location = new System.Drawing.Point(634, 544);
+            this.checkBox1.Location = new System.Drawing.Point(951, 816);
+            this.checkBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.checkBox1.Name = "checkBox1";
-            this.checkBox1.Size = new System.Drawing.Size(108, 16);
+            this.checkBox1.Size = new System.Drawing.Size(160, 22);
             this.checkBox1.TabIndex = 146;
             this.checkBox1.Text = "良品采集成不良";
             this.checkBox1.UseVisualStyleBackColor = true;
@@ -390,11 +413,10 @@
             // 
             this.Filter.BackColor = System.Drawing.Color.Transparent;
             this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
-            this.Filter.Location = new System.Drawing.Point(87, 291);
-            this.Filter.Margin = new System.Windows.Forms.Padding(2);
+            this.Filter.Location = new System.Drawing.Point(130, 436);
             this.Filter.Name = "Filter";
             this.Filter.PlaceHolder = "不良代码搜索";
-            this.Filter.Size = new System.Drawing.Size(158, 22);
+            this.Filter.Size = new System.Drawing.Size(237, 33);
             this.Filter.TabIndex = 145;
             this.Filter.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.Filter_UserControlTextChanged);
             this.Filter.UserControlOnKeyDown += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnKeyDown(this.Filter_UserControlOnKeyDown);
@@ -402,10 +424,9 @@
             // badgroup
             // 
             this.badgroup.FormattingEnabled = true;
-            this.badgroup.Location = new System.Drawing.Point(97, 260);
-            this.badgroup.Margin = new System.Windows.Forms.Padding(2);
+            this.badgroup.Location = new System.Drawing.Point(146, 390);
             this.badgroup.Name = "badgroup";
-            this.badgroup.Size = new System.Drawing.Size(148, 20);
+            this.badgroup.Size = new System.Drawing.Size(220, 26);
             this.badgroup.TabIndex = 143;
             this.badgroup.SelectedIndexChanged += new System.EventHandler(this.badgroup_SelectedIndexChanged);
             // 
@@ -416,12 +437,13 @@
             this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
             this.normalButton1.Image = null;
             this.normalButton1.IsShowBorder = true;
-            this.normalButton1.Location = new System.Drawing.Point(110, 114);
+            this.normalButton1.Location = new System.Drawing.Point(165, 171);
+            this.normalButton1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
             this.normalButton1.Name = "normalButton1";
             this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
             this.normalButton1.Power = null;
-            this.normalButton1.Size = new System.Drawing.Size(107, 24);
+            this.normalButton1.Size = new System.Drawing.Size(160, 36);
             this.normalButton1.TabIndex = 140;
             this.normalButton1.Tag = "IfRead";
             this.normalButton1.Text = "删除不良现象";
@@ -438,19 +460,19 @@
             "液晶屏",
             "电路板",
             "其他"});
-            this.mbc_component.Location = new System.Drawing.Point(262, 229);
+            this.mbc_component.Location = new System.Drawing.Point(393, 344);
+            this.mbc_component.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.mbc_component.Name = "mbc_component";
-            this.mbc_component.Size = new System.Drawing.Size(121, 20);
+            this.mbc_component.Size = new System.Drawing.Size(180, 26);
             this.mbc_component.TabIndex = 139;
             // 
             // mbr_dutyname
             // 
             this.mbr_dutyname.Condition = null;
             this.mbr_dutyname.Field = null;
-            this.mbr_dutyname.Location = new System.Drawing.Point(733, 189);
-            this.mbr_dutyname.Margin = new System.Windows.Forms.Padding(2);
+            this.mbr_dutyname.Location = new System.Drawing.Point(1100, 284);
             this.mbr_dutyname.Name = "mbr_dutyname";
-            this.mbr_dutyname.Size = new System.Drawing.Size(121, 21);
+            this.mbr_dutyname.Size = new System.Drawing.Size(182, 42);
             this.mbr_dutyname.TabIndex = 135;
             this.mbr_dutyname.TableName = null;
             this.mbr_dutyname.Value = null;
@@ -461,10 +483,9 @@
             // 
             this.so_name.Condition = null;
             this.so_name.Field = null;
-            this.so_name.Location = new System.Drawing.Point(502, 229);
-            this.so_name.Margin = new System.Windows.Forms.Padding(2);
+            this.so_name.Location = new System.Drawing.Point(753, 344);
             this.so_name.Name = "so_name";
-            this.so_name.Size = new System.Drawing.Size(121, 21);
+            this.so_name.Size = new System.Drawing.Size(182, 42);
             this.so_name.TabIndex = 133;
             this.so_name.TableName = null;
             this.so_name.Value = null;
@@ -475,10 +496,9 @@
             // 
             this.nr_name.Condition = null;
             this.nr_name.Field = null;
-            this.nr_name.Location = new System.Drawing.Point(502, 189);
-            this.nr_name.Margin = new System.Windows.Forms.Padding(2);
+            this.nr_name.Location = new System.Drawing.Point(753, 284);
             this.nr_name.Name = "nr_name";
-            this.nr_name.Size = new System.Drawing.Size(121, 21);
+            this.nr_name.Size = new System.Drawing.Size(182, 42);
             this.nr_name.TabIndex = 132;
             this.nr_name.TableName = null;
             this.nr_name.Value = null;
@@ -489,10 +509,9 @@
             // 
             this.nrg_name.Condition = null;
             this.nrg_name.Field = null;
-            this.nrg_name.Location = new System.Drawing.Point(262, 189);
-            this.nrg_name.Margin = new System.Windows.Forms.Padding(2);
+            this.nrg_name.Location = new System.Drawing.Point(393, 284);
             this.nrg_name.Name = "nrg_name";
-            this.nrg_name.Size = new System.Drawing.Size(121, 21);
+            this.nrg_name.Size = new System.Drawing.Size(182, 42);
             this.nrg_name.TabIndex = 131;
             this.nrg_name.TableName = null;
             this.nrg_name.Value = null;
@@ -520,11 +539,9 @@
             this.groupBoxWithBorder1.Controls.Add(this.ms_prodcode);
             this.groupBoxWithBorder1.Controls.Add(this.ms_makecode);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(9, 8);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(14, 12);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(880, 102);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1320, 153);
             this.groupBoxWithBorder1.TabIndex = 130;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "工单信息";
@@ -538,13 +555,14 @@
             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(356, 69);
+            this.cd_stepcode.Location = new System.Drawing.Point(534, 104);
+            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 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(150, 22);
+            this.cd_stepcode.Size = new System.Drawing.Size(225, 33);
             this.cd_stepcode.TabIndex = 68;
             this.cd_stepcode.TableName = null;
             this.cd_stepcode.Tag = "";
@@ -556,9 +574,10 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_reworkcheckno.AutoSize = true;
             this.ms_reworkcheckno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_reworkcheckno.Location = new System.Drawing.Point(790, 57);
+            this.ms_reworkcheckno.Location = new System.Drawing.Point(1185, 86);
+            this.ms_reworkcheckno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_reworkcheckno.Name = "ms_reworkcheckno";
-            this.ms_reworkcheckno.Size = new System.Drawing.Size(74, 21);
+            this.ms_reworkcheckno.Size = new System.Drawing.Size(110, 31);
             this.ms_reworkcheckno.TabIndex = 129;
             this.ms_reworkcheckno.Text = "返修批号";
             this.ms_reworkcheckno.Visible = false;
@@ -569,9 +588,10 @@
             | 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(201, 25);
+            this.ms_makecode_label.Location = new System.Drawing.Point(302, 38);
+            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(58, 21);
+            this.ms_makecode_label.Size = new System.Drawing.Size(86, 31);
             this.ms_makecode_label.TabIndex = 37;
             this.ms_makecode_label.Text = "工单号";
             // 
@@ -581,9 +601,10 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(13, 24);
+            this.ms_sncode_label.Location = new System.Drawing.Point(20, 36);
+            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 = 38;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -593,9 +614,10 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_checkno.AutoSize = true;
             this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_checkno.Location = new System.Drawing.Point(788, 25);
+            this.ms_checkno.Location = new System.Drawing.Point(1182, 38);
+            this.ms_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_checkno.Name = "ms_checkno";
-            this.ms_checkno.Size = new System.Drawing.Size(74, 21);
+            this.ms_checkno.Size = new System.Drawing.Size(110, 31);
             this.ms_checkno.TabIndex = 128;
             this.ms_checkno.Text = "送检批号";
             this.ms_checkno.Visible = false;
@@ -608,12 +630,13 @@
             this.RepairComplete.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.RepairComplete.Image = null;
             this.RepairComplete.IsShowBorder = true;
-            this.RepairComplete.Location = new System.Drawing.Point(536, 66);
+            this.RepairComplete.Location = new System.Drawing.Point(804, 99);
+            this.RepairComplete.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.RepairComplete.MoveImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.MoveImage")));
             this.RepairComplete.Name = "RepairComplete";
             this.RepairComplete.NormalImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.NormalImage")));
             this.RepairComplete.Power = null;
-            this.RepairComplete.Size = new System.Drawing.Size(68, 24);
+            this.RepairComplete.Size = new System.Drawing.Size(102, 36);
             this.RepairComplete.TabIndex = 55;
             this.RepairComplete.Tag = "IfRead";
             this.RepairComplete.Text = "完成维修";
@@ -627,10 +650,11 @@
             this.ms_sncode.AutoSize = true;
             this.ms_sncode.CutLength = null;
             this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode.Location = new System.Drawing.Point(88, 25);
-            this.ms_sncode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_sncode.Location = new System.Drawing.Point(132, 38);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_sncode.MaximumSize = new System.Drawing.Size(225, 0);
             this.ms_sncode.Name = "ms_sncode";
-            this.ms_sncode.Size = new System.Drawing.Size(0, 21);
+            this.ms_sncode.Size = new System.Drawing.Size(0, 31);
             this.ms_sncode.TabIndex = 126;
             // 
             // Scrap
@@ -641,12 +665,13 @@
             this.Scrap.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.Scrap.Image = null;
             this.Scrap.IsShowBorder = true;
-            this.Scrap.Location = new System.Drawing.Point(631, 66);
+            this.Scrap.Location = new System.Drawing.Point(946, 99);
+            this.Scrap.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Scrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("Scrap.MoveImage")));
             this.Scrap.Name = "Scrap";
             this.Scrap.NormalImage = ((System.Drawing.Image)(resources.GetObject("Scrap.NormalImage")));
             this.Scrap.Power = null;
-            this.Scrap.Size = new System.Drawing.Size(68, 24);
+            this.Scrap.Size = new System.Drawing.Size(102, 36);
             this.Scrap.TabIndex = 56;
             this.Scrap.Tag = "IfRead";
             this.Scrap.Text = "报废";
@@ -658,9 +683,10 @@
             this.nr_code.AutoSize = true;
             this.nr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.nr_code.ForeColor = System.Drawing.Color.Black;
-            this.nr_code.Location = new System.Drawing.Point(838, 220);
+            this.nr_code.Location = new System.Drawing.Point(1257, 330);
+            this.nr_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.nr_code.Name = "nr_code";
-            this.nr_code.Size = new System.Drawing.Size(0, 21);
+            this.nr_code.Size = new System.Drawing.Size(0, 31);
             this.nr_code.TabIndex = 125;
             // 
             // st_rstepcode_label
@@ -669,9 +695,10 @@
             | 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(263, 63);
+            this.st_rstepcode_label.Location = new System.Drawing.Point(394, 94);
+            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(74, 21);
+            this.st_rstepcode_label.Size = new System.Drawing.Size(110, 31);
             this.st_rstepcode_label.TabIndex = 65;
             this.st_rstepcode_label.Text = "回流工序";
             // 
@@ -681,9 +708,10 @@
             | 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(13, 63);
+            this.ma_craftcode_label.Location = new System.Drawing.Point(20, 94);
+            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(74, 21);
+            this.ma_craftcode_label.Size = new System.Drawing.Size(110, 31);
             this.ma_craftcode_label.TabIndex = 66;
             this.ma_craftcode_label.Text = "回流途程";
             // 
@@ -695,13 +723,14 @@
             this.cr_code.DBTitle = "回流途程";
             this.cr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.cr_code.FormName = null;
-            this.cr_code.Location = new System.Drawing.Point(91, 69);
+            this.cr_code.Location = new System.Drawing.Point(136, 104);
+            this.cr_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.cr_code.Name = "cr_code";
             this.cr_code.Power = "ifspecial";
             this.cr_code.ReturnData = null;
             this.cr_code.SelectField = null;
             this.cr_code.SetValueField = null;
-            this.cr_code.Size = new System.Drawing.Size(150, 23);
+            this.cr_code.Size = new System.Drawing.Size(225, 34);
             this.cr_code.TabIndex = 67;
             this.cr_code.TableName = null;
             this.cr_code.Tag = "ma_craftcode";
@@ -714,9 +743,10 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(635, 25);
+            this.pr_detail_label.Location = new System.Drawing.Point(952, 38);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_detail_label.Size = new System.Drawing.Size(110, 31);
             this.pr_detail_label.TabIndex = 61;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -726,9 +756,10 @@
             | 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(406, 25);
+            this.ms_prodcode_label.Location = new System.Drawing.Point(609, 38);
+            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(74, 21);
+            this.ms_prodcode_label.Size = new System.Drawing.Size(110, 31);
             this.ms_prodcode_label.TabIndex = 62;
             this.ms_prodcode_label.Text = "产品编号";
             // 
@@ -739,10 +770,11 @@
             this.pr_detail.AutoSize = true;
             this.pr_detail.CutLength = null;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(731, 25);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_detail.Location = new System.Drawing.Point(1096, 38);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(225, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 21);
+            this.pr_detail.Size = new System.Drawing.Size(0, 31);
             this.pr_detail.TabIndex = 82;
             // 
             // ms_prodcode
@@ -752,10 +784,11 @@
             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(502, 25);
-            this.ms_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_prodcode.Location = new System.Drawing.Point(753, 38);
+            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, 21);
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 31);
             this.ms_prodcode.TabIndex = 20;
             this.ms_prodcode.TextChanged += new System.EventHandler(this.ms_prodcode_TextChanged);
             // 
@@ -766,18 +799,19 @@
             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(281, 25);
-            this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_makecode.Location = new System.Drawing.Point(422, 38);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(225, 0);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 31);
             this.ms_makecode.TabIndex = 85;
             // 
             // mb_badremark
             // 
-            this.mb_badremark.Location = new System.Drawing.Point(733, 143);
-            this.mb_badremark.Margin = new System.Windows.Forms.Padding(4);
+            this.mb_badremark.Location = new System.Drawing.Point(1100, 214);
+            this.mb_badremark.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.mb_badremark.Name = "mb_badremark";
-            this.mb_badremark.Size = new System.Drawing.Size(140, 21);
+            this.mb_badremark.Size = new System.Drawing.Size(210, 32);
             this.mb_badremark.TabIndex = 127;
             this.mb_badremark.TextAreaEnable = true;
             this.mb_badremark.TextBoxEnable = true;
@@ -789,18 +823,18 @@
             this.bd_soncode.Condition = null;
             this.bd_soncode.DBTitle = null;
             this.bd_soncode.FormName = null;
-            this.bd_soncode.Location = new System.Drawing.Point(591, 282);
-            this.bd_soncode.Margin = new System.Windows.Forms.Padding(2);
+            this.bd_soncode.Location = new System.Drawing.Point(886, 423);
             this.bd_soncode.Name = "bd_soncode";
             this.bd_soncode.Power = null;
             this.bd_soncode.ReturnData = null;
             this.bd_soncode.SelectField = null;
             this.bd_soncode.SetValueField = null;
-            this.bd_soncode.Size = new System.Drawing.Size(137, 21);
+            this.bd_soncode.Size = new System.Drawing.Size(206, 32);
             this.bd_soncode.TabIndex = 124;
             this.bd_soncode.TableName = null;
             this.bd_soncode.Tag = "bd_soncode";
             this.bd_soncode.TextBoxEnable = true;
+            this.bd_soncode.Visible = false;
             // 
             // mbp_partdgv
             // 
@@ -810,12 +844,13 @@
             this.mbp_part1,
             this.DeleteCom,
             this.mbp_id});
-            this.mbp_partdgv.Location = new System.Drawing.Point(502, 325);
-            this.mbp_partdgv.Margin = new System.Windows.Forms.Padding(2);
+            this.mbp_partdgv.Location = new System.Drawing.Point(753, 488);
             this.mbp_partdgv.Name = "mbp_partdgv";
+            this.mbp_partdgv.RowHeadersWidth = 62;
             this.mbp_partdgv.RowTemplate.Height = 27;
-            this.mbp_partdgv.Size = new System.Drawing.Size(218, 152);
+            this.mbp_partdgv.Size = new System.Drawing.Size(327, 228);
             this.mbp_partdgv.TabIndex = 121;
+            this.mbp_partdgv.Visible = false;
             this.mbp_partdgv.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.mbp_partdgv_CellContentClick);
             // 
             // mbp_part1
@@ -823,6 +858,7 @@
             this.mbp_part1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.mbp_part1.DataPropertyName = "mbp_part";
             this.mbp_part1.HeaderText = "已选择不良零件";
+            this.mbp_part1.MinimumWidth = 8;
             this.mbp_part1.Name = "mbp_part1";
             this.mbp_part1.ReadOnly = true;
             // 
@@ -831,6 +867,7 @@
             this.DeleteCom.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.DeleteCom.HeaderText = "删除";
             this.DeleteCom.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeleteCom.MinimumWidth = 8;
             this.DeleteCom.Name = "DeleteCom";
             this.DeleteCom.Resizable = System.Windows.Forms.DataGridViewTriState.True;
             this.DeleteCom.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
@@ -840,8 +877,10 @@
             // 
             this.mbp_id.DataPropertyName = "mbp_id";
             this.mbp_id.HeaderText = "mbp_id";
+            this.mbp_id.MinimumWidth = 8;
             this.mbp_id.Name = "mbp_id";
             this.mbp_id.Visible = false;
+            this.mbp_id.Width = 150;
             // 
             // mbl_locdgv
             // 
@@ -851,12 +890,13 @@
             this.mbl_loc1,
             this.DeletePos,
             this.mbl_id});
-            this.mbl_locdgv.Location = new System.Drawing.Point(262, 325);
-            this.mbl_locdgv.Margin = new System.Windows.Forms.Padding(2);
+            this.mbl_locdgv.Location = new System.Drawing.Point(393, 488);
             this.mbl_locdgv.Name = "mbl_locdgv";
+            this.mbl_locdgv.RowHeadersWidth = 62;
             this.mbl_locdgv.RowTemplate.Height = 27;
-            this.mbl_locdgv.Size = new System.Drawing.Size(236, 152);
+            this.mbl_locdgv.Size = new System.Drawing.Size(354, 228);
             this.mbl_locdgv.TabIndex = 120;
+            this.mbl_locdgv.Visible = false;
             this.mbl_locdgv.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.mbl_locdgv_CellContentClick);
             // 
             // mbl_loc1
@@ -864,6 +904,7 @@
             this.mbl_loc1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.mbl_loc1.DataPropertyName = "mbl_loc";
             this.mbl_loc1.HeaderText = "已选择不良位置";
+            this.mbl_loc1.MinimumWidth = 8;
             this.mbl_loc1.Name = "mbl_loc1";
             this.mbl_loc1.ReadOnly = true;
             // 
@@ -872,6 +913,7 @@
             this.DeletePos.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.DeletePos.HeaderText = "删除";
             this.DeletePos.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeletePos.MinimumWidth = 8;
             this.DeletePos.Name = "DeletePos";
             this.DeletePos.Width = 80;
             // 
@@ -879,19 +921,20 @@
             // 
             this.mbl_id.DataPropertyName = "mbl_id";
             this.mbl_id.HeaderText = "mbl_id";
+            this.mbl_id.MinimumWidth = 8;
             this.mbl_id.Name = "mbl_id";
             this.mbl_id.Visible = false;
+            this.mbl_id.Width = 150;
             // 
             // RefreshTreeView
             // 
             this.RefreshTreeView.AllPower = null;
             this.RefreshTreeView.Cursor = System.Windows.Forms.Cursors.Hand;
             this.RefreshTreeView.Image = global::UAS_MES_NEW.Properties.Resources.refresh;
-            this.RefreshTreeView.Location = new System.Drawing.Point(85, 118);
-            this.RefreshTreeView.Margin = new System.Windows.Forms.Padding(2);
+            this.RefreshTreeView.Location = new System.Drawing.Point(128, 177);
             this.RefreshTreeView.Name = "RefreshTreeView";
             this.RefreshTreeView.Power = null;
-            this.RefreshTreeView.Size = new System.Drawing.Size(20, 20);
+            this.RefreshTreeView.Size = new System.Drawing.Size(30, 30);
             this.RefreshTreeView.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
             this.RefreshTreeView.TabIndex = 119;
             this.RefreshTreeView.TabStop = false;
@@ -904,10 +947,11 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.GetSNCode.BackColor = System.Drawing.Color.White;
             this.GetSNCode.ID = null;
-            this.GetSNCode.Location = new System.Drawing.Point(419, 542);
+            this.GetSNCode.Location = new System.Drawing.Point(628, 813);
+            this.GetSNCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.GetSNCode.Name = "GetSNCode";
             this.GetSNCode.Power = null;
-            this.GetSNCode.Size = new System.Drawing.Size(188, 21);
+            this.GetSNCode.Size = new System.Drawing.Size(280, 28);
             this.GetSNCode.Str = null;
             this.GetSNCode.Str1 = null;
             this.GetSNCode.Str2 = null;
@@ -922,12 +966,13 @@
             this.NewRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.DownImage")));
             this.NewRepairInf.Image = null;
             this.NewRepairInf.IsShowBorder = true;
-            this.NewRepairInf.Location = new System.Drawing.Point(376, 493);
+            this.NewRepairInf.Location = new System.Drawing.Point(564, 740);
+            this.NewRepairInf.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.NewRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.MoveImage")));
             this.NewRepairInf.Name = "NewRepairInf";
             this.NewRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.NormalImage")));
             this.NewRepairInf.Power = null;
-            this.NewRepairInf.Size = new System.Drawing.Size(86, 24);
+            this.NewRepairInf.Size = new System.Drawing.Size(129, 36);
             this.NewRepairInf.TabIndex = 112;
             this.NewRepairInf.Tag = "IfRead";
             this.NewRepairInf.Text = "新增维修信息";
@@ -941,12 +986,13 @@
             this.SaveRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.DownImage")));
             this.SaveRepairInf.Image = null;
             this.SaveRepairInf.IsShowBorder = true;
-            this.SaveRepairInf.Location = new System.Drawing.Point(656, 227);
+            this.SaveRepairInf.Location = new System.Drawing.Point(984, 340);
+            this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
             this.SaveRepairInf.Name = "SaveRepairInf";
             this.SaveRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.NormalImage")));
             this.SaveRepairInf.Power = null;
-            this.SaveRepairInf.Size = new System.Drawing.Size(86, 24);
+            this.SaveRepairInf.Size = new System.Drawing.Size(129, 36);
             this.SaveRepairInf.TabIndex = 111;
             this.SaveRepairInf.Tag = "IfRead";
             this.SaveRepairInf.Text = "保存维修信息";
@@ -960,12 +1006,13 @@
             this.DeleteRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.DownImage")));
             this.DeleteRepairInf.Image = null;
             this.DeleteRepairInf.IsShowBorder = true;
-            this.DeleteRepairInf.Location = new System.Drawing.Point(478, 493);
+            this.DeleteRepairInf.Location = new System.Drawing.Point(717, 740);
+            this.DeleteRepairInf.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.DeleteRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.MoveImage")));
             this.DeleteRepairInf.Name = "DeleteRepairInf";
             this.DeleteRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.NormalImage")));
             this.DeleteRepairInf.Power = null;
-            this.DeleteRepairInf.Size = new System.Drawing.Size(107, 24);
+            this.DeleteRepairInf.Size = new System.Drawing.Size(160, 36);
             this.DeleteRepairInf.TabIndex = 110;
             this.DeleteRepairInf.Tag = "IfRead";
             this.DeleteRepairInf.Text = "删除不良原因";
@@ -979,15 +1026,17 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.mbl_loc.BackColor = System.Drawing.Color.White;
             this.mbl_loc.ID = null;
-            this.mbl_loc.Location = new System.Drawing.Point(330, 280);
+            this.mbl_loc.Location = new System.Drawing.Point(495, 420);
+            this.mbl_loc.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.mbl_loc.Name = "mbl_loc";
             this.mbl_loc.Power = null;
-            this.mbl_loc.Size = new System.Drawing.Size(122, 21);
+            this.mbl_loc.Size = new System.Drawing.Size(181, 28);
             this.mbl_loc.Str = null;
             this.mbl_loc.Str1 = null;
             this.mbl_loc.Str2 = null;
             this.mbl_loc.TabIndex = 104;
             this.mbl_loc.Tag = "Read";
+            this.mbl_loc.Visible = false;
             this.mbl_loc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.mbl_loc_KeyDown);
             // 
             // bc_name
@@ -998,10 +1047,11 @@
             this.bc_name.BackColor = System.Drawing.Color.White;
             this.bc_name.Enabled = false;
             this.bc_name.ID = null;
-            this.bc_name.Location = new System.Drawing.Point(502, 143);
+            this.bc_name.Location = new System.Drawing.Point(753, 214);
+            this.bc_name.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.bc_name.Name = "bc_name";
             this.bc_name.Power = null;
-            this.bc_name.Size = new System.Drawing.Size(121, 21);
+            this.bc_name.Size = new System.Drawing.Size(180, 28);
             this.bc_name.Str = null;
             this.bc_name.Str1 = null;
             this.bc_name.Str2 = null;
@@ -1017,10 +1067,11 @@
             this.bg_name.Enabled = false;
             this.bg_name.ForeColor = System.Drawing.Color.Red;
             this.bg_name.ID = null;
-            this.bg_name.Location = new System.Drawing.Point(262, 144);
+            this.bg_name.Location = new System.Drawing.Point(393, 216);
+            this.bg_name.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.bg_name.Name = "bg_name";
             this.bg_name.Power = null;
-            this.bg_name.Size = new System.Drawing.Size(121, 21);
+            this.bg_name.Size = new System.Drawing.Size(180, 28);
             this.bg_name.Str = null;
             this.bg_name.Str1 = null;
             this.bg_name.Str2 = null;
@@ -1030,9 +1081,10 @@
             // 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(733, 287);
+            this.OperatResult.Location = new System.Drawing.Point(1100, 430);
+            this.OperatResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.OperatResult.Name = "OperatResult";
-            this.OperatResult.Size = new System.Drawing.Size(157, 250);
+            this.OperatResult.Size = new System.Drawing.Size(234, 373);
             this.OperatResult.TabIndex = 87;
             this.OperatResult.Text = "";
             // 
@@ -1043,12 +1095,13 @@
             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(782, 542);
+            this.Clean.Location = new System.Drawing.Point(1173, 813);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 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(60, 24);
+            this.Clean.Size = new System.Drawing.Size(90, 36);
             this.Clean.TabIndex = 81;
             this.Clean.Tag = "IfRead";
             this.Clean.Text = "清除";
@@ -1062,12 +1115,13 @@
             this.NewBadCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.DownImage")));
             this.NewBadCode.Image = null;
             this.NewBadCode.IsShowBorder = true;
-            this.NewBadCode.Location = new System.Drawing.Point(274, 493);
+            this.NewBadCode.Location = new System.Drawing.Point(411, 740);
+            this.NewBadCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.NewBadCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.MoveImage")));
             this.NewBadCode.Name = "NewBadCode";
             this.NewBadCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.NormalImage")));
             this.NewBadCode.Power = null;
-            this.NewBadCode.Size = new System.Drawing.Size(86, 24);
+            this.NewBadCode.Size = new System.Drawing.Size(129, 36);
             this.NewBadCode.TabIndex = 60;
             this.NewBadCode.Tag = "IfRead";
             this.NewBadCode.Text = "新增不良代码";
@@ -1082,23 +1136,25 @@
             this.SaveBadLocation.Enabled = false;
             this.SaveBadLocation.Image = null;
             this.SaveBadLocation.IsShowBorder = true;
-            this.SaveBadLocation.Location = new System.Drawing.Point(458, 280);
+            this.SaveBadLocation.Location = new System.Drawing.Point(687, 420);
+            this.SaveBadLocation.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.SaveBadLocation.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.MoveImage")));
             this.SaveBadLocation.Name = "SaveBadLocation";
             this.SaveBadLocation.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.NormalImage")));
             this.SaveBadLocation.Power = null;
-            this.SaveBadLocation.Size = new System.Drawing.Size(46, 24);
+            this.SaveBadLocation.Size = new System.Drawing.Size(69, 36);
             this.SaveBadLocation.TabIndex = 59;
             this.SaveBadLocation.Tag = "IfRead";
             this.SaveBadLocation.Text = "保存";
             this.SaveBadLocation.UseVisualStyleBackColor = true;
+            this.SaveBadLocation.Visible = false;
             this.SaveBadLocation.Click += new System.EventHandler(this.SaveBadLocation_Click);
             // 
             // Make_Repair
             // 
-            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(900, 579);
+            this.ClientSize = new System.Drawing.Size(1350, 868);
             this.Controls.Add(this.checkBox1);
             this.Controls.Add(this.Filter);
             this.Controls.Add(this.label1);
@@ -1147,6 +1203,7 @@
             this.Controls.Add(this.bc_name_label);
             this.Controls.Add(this.bg_name_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Make_Repair";
             this.Tag = "Make!Repair";
             this.Text = "维修作业";
@@ -1156,12 +1213,12 @@
             ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfo)).EndInit();
-            this.groupBoxWithBorder1.ResumeLayout(false);
+            this.groupBoxWithBorder1.ResumeLayout(true);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.mbp_partdgv)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.mbl_locdgv)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 12 - 0
UAS_MES_WEIP/FunctionCode/Make/Make_Repair.resx

@@ -247,6 +247,18 @@
   <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>

+ 18 - 8
UAS_MES_WEIP/FunctionCode/Make/Make_SMTBind.cs

@@ -11,6 +11,8 @@ using System.Text.RegularExpressions;
 using System.Collections.Generic;
 using System.Threading;
 using UAS_MES_NEW.PublicForm;
+using System.Net.Sockets;
+using System.Net;
 
 namespace UAS_MES_NEW.Make
 {
@@ -677,7 +679,9 @@ namespace UAS_MES_NEW.Make
             List<string> nowcodelist = new List<string>();
             for (int i = 0; i < dt.Rows.Count; i++)
             {
-                if (dt.Rows[i]["工单"].ToString().Trim()==ma_code.Text&&dt.Rows[i]["拼板号"].ToString().Trim().Length >2 && dt.Rows[i]["打码内容"].ToString().Trim().Length > 7 && dt.Rows[i]["拼板号"].ToString().Trim().Substring(0, 2)
+                if (dt.Rows[i]["工单"].ToString().Trim()==ma_code.Text&&dt.Rows[i]["拼板号"].ToString().Trim().Length >2
+                    && dt.Rows[i]["打码内容"].ToString().Trim()!=ma_code.Text 
+                    && dt.Rows[i]["打码内容"].ToString().Trim().Length > 7 && dt.Rows[i]["拼板号"].ToString().Trim().Substring(0, 2)
                     == dt.Rows[i]["打码内容"].ToString().Trim().Substring(0, 2))
                 {
                         maincodelist.Add(dt.Rows[i]["拼板号"].ToString().Trim());
@@ -687,30 +691,36 @@ namespace UAS_MES_NEW.Make
                 }
             }
 
-       
+            IPHostEntry IpEntry = Dns.GetHostEntry(Dns.GetHostName());
+            string IPAddress = "";
+            for (int i = 0; i < IpEntry.AddressList.Length; i++)
+            {
+                if (IpEntry.AddressList[i].AddressFamily == AddressFamily.InterNetwork)
+                    IPAddress = IpEntry.AddressList[i].ToString();
+            }
 
             sql.Clear();
-            sql.Append("insert into smtbind_temp(MAINCODE,BARCODE)");
-            sql.Append("values(:maincode,:nowcode)");
+            sql.Append("insert into smtbind_temp(MAINCODE,BARCODE,MAKECODE)");
+            sql.Append("values(:maincode,:nowcode,'"+ma_code.Text+"')");
 
             dh.BatchInsert(sql.GetString(), new string[] { "maincode", "nowcode" }, maincodelist.ToArray(), nowcodelist.ToArray());
-            number = int.Parse(dh.getFieldDataByCondition("smtbind_temp", "count(1) cn ", "BARCODE not in (select sb_barcode from smtbind )").ToString());
+            number = int.Parse(dh.getFieldDataByCondition("smtbind_temp", "count(1) cn ", "BARCODE not in (select sb_barcode from smtbind ) and MAKECODE = '"+ma_code.Text+"'").ToString());
 
             int maqty = int.Parse(dh.getFieldDataByCondition("make", "ma_qty", "ma_code = '" + ma_code.Text + "'").ToString());
             int nowqty = int.Parse(dh.getFieldDataByCondition("smtbind", "count(1) cn ", "sb_makecode = '" + ma_code.Text + "'").ToString());
             if (nowqty + number > maqty)
             {
                 OperateResult.AppendText(">>已绑定数" + nowqty + "+待绑定数" + number + "大于工单数" + maqty + "不允许操作\n", Color.Red);
-                dh.ExecuteSql("delete SMTBIND_TEMP", "delete");
+                dh.ExecuteSql("delete SMTBIND_TEMP where MAKECODE = '"+ma_code.Text+"'", "delete");
                 return;
             }
 
             sql.Clear();
-            sql.Append("merge  into smtbind using SMTBIND_TEMP  on (sb_barcode = barcode) when not MATCHED then insert  (sb_id,sb_maincode,sb_barcode,sb_makecode,sb_prodcode,sb_inman,sb_indate,sb_status)");
+            sql.Append("merge  into smtbind using (select * from SMTBIND_TEMP where MAKECODE = '"+ma_code.Text+"')  on (sb_barcode = barcode) when not MATCHED then insert  (sb_id,sb_maincode,sb_barcode,sb_makecode,sb_prodcode,sb_inman,sb_indate,sb_status)");
             sql.Append(" values (SMTBIND_seq.nextval ,maincode,barcode,'" + ma_code.Text + "','"+ma_prodcode.Text+"','"+User.UserCode+"',sysdate,0)");
             dh.ExecuteSql(sql.GetString(), "insert");
 
-            dh.ExecuteSql("delete SMTBIND_TEMP", "delete");
+            dh.ExecuteSql("delete SMTBIND_TEMP where MAKECODE = '" + ma_code.Text + "'", "delete");
 
             MessageBox.Show("导入成功"+ number + "条!");
             OperateResult.AppendText(">>导入成功" + number + "条!\n", Color.Green);

+ 267 - 256
UAS_MES_WEIP/FunctionCode/Make/Make_SMTSStencil.Designer.cs

@@ -28,7 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_SMTStencil));
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_SMTSStencil));
             this.ms_makecode_label = new System.Windows.Forms.Label();
             this.ma_prodcode_label = new System.Windows.Forms.Label();
             this.li_code_label = new System.Windows.Forms.Label();
@@ -43,6 +43,22 @@
             this.su_singlepringqty1_label = new System.Windows.Forms.Label();
             this.SU_RETURNIFCLEAN = new System.Windows.Forms.CheckBox();
             this.em_code_label = new System.Windows.Forms.Label();
+            this.em_code1_label = new System.Windows.Forms.Label();
+            this.ST_ENSIONA_label = new System.Windows.Forms.Label();
+            this.ST_ENSIONB_label = new System.Windows.Forms.Label();
+            this.ST_ENSIONC_label = new System.Windows.Forms.Label();
+            this.label9 = new System.Windows.Forms.Label();
+            this.ST_ENSIONE_label = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.st_usecount = new System.Windows.Forms.Label();
+            this.normalButton1 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Scrap = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ST_ENSIONA = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.ST_ENSIONB = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.ST_ENSIONC = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.ST_ENSIOND = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.ST_ENSIONE = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.em_code1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.em_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.su_singlepringqty1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.st_table = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
@@ -64,22 +80,6 @@
             this.li_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.ma_prodcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
-            this.em_code1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.em_code1_label = new System.Windows.Forms.Label();
-            this.ST_ENSIONA = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
-            this.ST_ENSIONA_label = new System.Windows.Forms.Label();
-            this.ST_ENSIONB = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
-            this.ST_ENSIONB_label = new System.Windows.Forms.Label();
-            this.ST_ENSIONC = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
-            this.ST_ENSIONC_label = new System.Windows.Forms.Label();
-            this.ST_ENSIOND = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
-            this.label9 = new System.Windows.Forms.Label();
-            this.ST_ENSIONE = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
-            this.ST_ENSIONE_label = new System.Windows.Forms.Label();
-            this.label7 = new System.Windows.Forms.Label();
-            this.Scrap = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.st_usecount = new System.Windows.Forms.Label();
-            this.normalButton1 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             ((System.ComponentModel.ISupportInitialize)(this.ToolsBom)).BeginInit();
             this.SuspendLayout();
             // 
@@ -153,7 +153,7 @@
             this.SU_DEVCODE_label.Name = "SU_DEVCODE_label";
             this.SU_DEVCODE_label.Size = new System.Drawing.Size(110, 31);
             this.SU_DEVCODE_label.TabIndex = 81;
-            this.SU_DEVCODE_label.Text = "钢网编号";
+            this.SU_DEVCODE_label.Text = "刮刀编号";
             // 
             // st_table_label
             // 
@@ -175,13 +175,13 @@
             this.SU_DEVCODE1_label.Name = "SU_DEVCODE1_label";
             this.SU_DEVCODE1_label.Size = new System.Drawing.Size(110, 31);
             this.SU_DEVCODE1_label.TabIndex = 87;
-            this.SU_DEVCODE1_label.Text = "钢网编号";
+            this.SU_DEVCODE1_label.Text = "刮刀编号";
             // 
             // st_combinenumber_label
             // 
             this.st_combinenumber_label.AutoSize = true;
             this.st_combinenumber_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.st_combinenumber_label.Location = new System.Drawing.Point(1158, 881);
+            this.st_combinenumber_label.Location = new System.Drawing.Point(1170, 921);
             this.st_combinenumber_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.st_combinenumber_label.Name = "st_combinenumber_label";
             this.st_combinenumber_label.Size = new System.Drawing.Size(134, 31);
@@ -217,9 +217,9 @@
             this.su_singlepringqty1_label.Location = new System.Drawing.Point(670, 742);
             this.su_singlepringqty1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.su_singlepringqty1_label.Name = "su_singlepringqty1_label";
-            this.su_singlepringqty1_label.Size = new System.Drawing.Size(158, 31);
+            this.su_singlepringqty1_label.Size = new System.Drawing.Size(110, 31);
             this.su_singlepringqty1_label.TabIndex = 108;
-            this.su_singlepringqty1_label.Text = "单片印刷次数";
+            this.su_singlepringqty1_label.Text = "单片次数";
             // 
             // SU_RETURNIFCLEAN
             // 
@@ -244,6 +244,237 @@
             this.em_code_label.TabIndex = 111;
             this.em_code_label.Text = "人员编号";
             // 
+            // em_code1_label
+            // 
+            this.em_code1_label.AutoSize = true;
+            this.em_code1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.em_code1_label.Location = new System.Drawing.Point(399, 828);
+            this.em_code1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.em_code1_label.Name = "em_code1_label";
+            this.em_code1_label.Size = new System.Drawing.Size(110, 31);
+            this.em_code1_label.TabIndex = 113;
+            this.em_code1_label.Text = "人员编号";
+            // 
+            // ST_ENSIONA_label
+            // 
+            this.ST_ENSIONA_label.AutoSize = true;
+            this.ST_ENSIONA_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ST_ENSIONA_label.Location = new System.Drawing.Point(207, 888);
+            this.ST_ENSIONA_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ST_ENSIONA_label.Name = "ST_ENSIONA_label";
+            this.ST_ENSIONA_label.Size = new System.Drawing.Size(31, 31);
+            this.ST_ENSIONA_label.TabIndex = 124;
+            this.ST_ENSIONA_label.Text = "A";
+            this.ST_ENSIONA_label.Visible = false;
+            // 
+            // ST_ENSIONB_label
+            // 
+            this.ST_ENSIONB_label.AutoSize = true;
+            this.ST_ENSIONB_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ST_ENSIONB_label.Location = new System.Drawing.Point(500, 888);
+            this.ST_ENSIONB_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ST_ENSIONB_label.Name = "ST_ENSIONB_label";
+            this.ST_ENSIONB_label.Size = new System.Drawing.Size(29, 31);
+            this.ST_ENSIONB_label.TabIndex = 122;
+            this.ST_ENSIONB_label.Text = "B";
+            this.ST_ENSIONB_label.Visible = false;
+            // 
+            // ST_ENSIONC_label
+            // 
+            this.ST_ENSIONC_label.AutoSize = true;
+            this.ST_ENSIONC_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ST_ENSIONC_label.Location = new System.Drawing.Point(798, 888);
+            this.ST_ENSIONC_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ST_ENSIONC_label.Name = "ST_ENSIONC_label";
+            this.ST_ENSIONC_label.Size = new System.Drawing.Size(30, 31);
+            this.ST_ENSIONC_label.TabIndex = 120;
+            this.ST_ENSIONC_label.Text = "C";
+            this.ST_ENSIONC_label.Visible = false;
+            // 
+            // label9
+            // 
+            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(207, 929);
+            this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(32, 31);
+            this.label9.TabIndex = 118;
+            this.label9.Text = "D";
+            this.label9.Visible = false;
+            // 
+            // ST_ENSIONE_label
+            // 
+            this.ST_ENSIONE_label.AutoSize = true;
+            this.ST_ENSIONE_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ST_ENSIONE_label.Location = new System.Drawing.Point(501, 929);
+            this.ST_ENSIONE_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ST_ENSIONE_label.Name = "ST_ENSIONE_label";
+            this.ST_ENSIONE_label.Size = new System.Drawing.Size(27, 31);
+            this.ST_ENSIONE_label.TabIndex = 116;
+            this.ST_ENSIONE_label.Text = "E";
+            this.ST_ENSIONE_label.Visible = false;
+            // 
+            // 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(10, 888);
+            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(194, 31);
+            this.label7.TabIndex = 115;
+            this.label7.Text = "张力测试结果(N)";
+            this.label7.Visible = false;
+            // 
+            // st_usecount
+            // 
+            this.st_usecount.AutoSize = true;
+            this.st_usecount.Location = new System.Drawing.Point(504, 792);
+            this.st_usecount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.st_usecount.Name = "st_usecount";
+            this.st_usecount.Size = new System.Drawing.Size(0, 18);
+            this.st_usecount.TabIndex = 127;
+            this.st_usecount.Visible = false;
+            // 
+            // normalButton1
+            // 
+            this.normalButton1.AllPower = null;
+            this.normalButton1.BackColor = System.Drawing.Color.Transparent;
+            this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
+            this.normalButton1.Image = null;
+            this.normalButton1.IsShowBorder = true;
+            this.normalButton1.Location = new System.Drawing.Point(838, 820);
+            this.normalButton1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
+            this.normalButton1.Name = "normalButton1";
+            this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
+            this.normalButton1.Power = null;
+            this.normalButton1.Size = new System.Drawing.Size(107, 42);
+            this.normalButton1.TabIndex = 128;
+            this.normalButton1.Text = "6小时清洗";
+            this.normalButton1.UseVisualStyleBackColor = false;
+            this.normalButton1.Click += new System.EventHandler(this.normalButton1_Click);
+            // 
+            // Scrap
+            // 
+            this.Scrap.AllPower = null;
+            this.Scrap.BackColor = System.Drawing.Color.Transparent;
+            this.Scrap.DownImage = ((System.Drawing.Image)(resources.GetObject("Scrap.DownImage")));
+            this.Scrap.Image = null;
+            this.Scrap.IsShowBorder = true;
+            this.Scrap.Location = new System.Drawing.Point(1166, 823);
+            this.Scrap.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.Scrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("Scrap.MoveImage")));
+            this.Scrap.Name = "Scrap";
+            this.Scrap.NormalImage = ((System.Drawing.Image)(resources.GetObject("Scrap.NormalImage")));
+            this.Scrap.Power = null;
+            this.Scrap.Size = new System.Drawing.Size(102, 42);
+            this.Scrap.TabIndex = 126;
+            this.Scrap.Text = "报废";
+            this.Scrap.UseVisualStyleBackColor = false;
+            this.Scrap.Click += new System.EventHandler(this.Scrap_Click_1);
+            // 
+            // ST_ENSIONA
+            // 
+            this.ST_ENSIONA.AllPower = null;
+            this.ST_ENSIONA.BackColor = System.Drawing.Color.White;
+            this.ST_ENSIONA.ID = null;
+            this.ST_ENSIONA.Location = new System.Drawing.Point(248, 888);
+            this.ST_ENSIONA.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ST_ENSIONA.Name = "ST_ENSIONA";
+            this.ST_ENSIONA.Negative = false;
+            this.ST_ENSIONA.Power = null;
+            this.ST_ENSIONA.Size = new System.Drawing.Size(178, 28);
+            this.ST_ENSIONA.Str = null;
+            this.ST_ENSIONA.Str1 = null;
+            this.ST_ENSIONA.Str2 = null;
+            this.ST_ENSIONA.TabIndex = 125;
+            this.ST_ENSIONA.Visible = false;
+            // 
+            // ST_ENSIONB
+            // 
+            this.ST_ENSIONB.AllPower = null;
+            this.ST_ENSIONB.BackColor = System.Drawing.Color.White;
+            this.ST_ENSIONB.ID = null;
+            this.ST_ENSIONB.Location = new System.Drawing.Point(540, 888);
+            this.ST_ENSIONB.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ST_ENSIONB.Name = "ST_ENSIONB";
+            this.ST_ENSIONB.Negative = false;
+            this.ST_ENSIONB.Power = null;
+            this.ST_ENSIONB.Size = new System.Drawing.Size(178, 28);
+            this.ST_ENSIONB.Str = null;
+            this.ST_ENSIONB.Str1 = null;
+            this.ST_ENSIONB.Str2 = null;
+            this.ST_ENSIONB.TabIndex = 123;
+            this.ST_ENSIONB.Visible = false;
+            // 
+            // ST_ENSIONC
+            // 
+            this.ST_ENSIONC.AllPower = null;
+            this.ST_ENSIONC.BackColor = System.Drawing.Color.White;
+            this.ST_ENSIONC.ID = null;
+            this.ST_ENSIONC.Location = new System.Drawing.Point(838, 888);
+            this.ST_ENSIONC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ST_ENSIONC.Name = "ST_ENSIONC";
+            this.ST_ENSIONC.Negative = false;
+            this.ST_ENSIONC.Power = null;
+            this.ST_ENSIONC.Size = new System.Drawing.Size(178, 28);
+            this.ST_ENSIONC.Str = null;
+            this.ST_ENSIONC.Str1 = null;
+            this.ST_ENSIONC.Str2 = null;
+            this.ST_ENSIONC.TabIndex = 121;
+            this.ST_ENSIONC.Visible = false;
+            // 
+            // ST_ENSIOND
+            // 
+            this.ST_ENSIOND.AllPower = null;
+            this.ST_ENSIOND.BackColor = System.Drawing.Color.White;
+            this.ST_ENSIOND.ID = null;
+            this.ST_ENSIOND.Location = new System.Drawing.Point(248, 929);
+            this.ST_ENSIOND.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ST_ENSIOND.Name = "ST_ENSIOND";
+            this.ST_ENSIOND.Negative = false;
+            this.ST_ENSIOND.Power = null;
+            this.ST_ENSIOND.Size = new System.Drawing.Size(178, 28);
+            this.ST_ENSIOND.Str = null;
+            this.ST_ENSIOND.Str1 = null;
+            this.ST_ENSIOND.Str2 = null;
+            this.ST_ENSIOND.TabIndex = 119;
+            this.ST_ENSIOND.Visible = false;
+            // 
+            // ST_ENSIONE
+            // 
+            this.ST_ENSIONE.AllPower = null;
+            this.ST_ENSIONE.BackColor = System.Drawing.Color.White;
+            this.ST_ENSIONE.ID = null;
+            this.ST_ENSIONE.Location = new System.Drawing.Point(540, 929);
+            this.ST_ENSIONE.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ST_ENSIONE.Name = "ST_ENSIONE";
+            this.ST_ENSIONE.Negative = false;
+            this.ST_ENSIONE.Power = null;
+            this.ST_ENSIONE.Size = new System.Drawing.Size(178, 28);
+            this.ST_ENSIONE.Str = null;
+            this.ST_ENSIONE.Str1 = null;
+            this.ST_ENSIONE.Str2 = null;
+            this.ST_ENSIONE.TabIndex = 117;
+            this.ST_ENSIONE.Visible = false;
+            // 
+            // em_code1
+            // 
+            this.em_code1.AllPower = null;
+            this.em_code1.BackColor = System.Drawing.Color.White;
+            this.em_code1.ID = null;
+            this.em_code1.Location = new System.Drawing.Point(519, 829);
+            this.em_code1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.em_code1.Name = "em_code1";
+            this.em_code1.Power = null;
+            this.em_code1.Size = new System.Drawing.Size(178, 28);
+            this.em_code1.Str = null;
+            this.em_code1.Str1 = null;
+            this.em_code1.Str2 = null;
+            this.em_code1.TabIndex = 114;
+            // 
             // em_code
             // 
             this.em_code.AllPower = null;
@@ -332,7 +563,7 @@
             this.st_combinenumber.AllPower = null;
             this.st_combinenumber.BackColor = System.Drawing.Color.White;
             this.st_combinenumber.ID = null;
-            this.st_combinenumber.Location = new System.Drawing.Point(1154, 848);
+            this.st_combinenumber.Location = new System.Drawing.Point(1166, 888);
             this.st_combinenumber.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.st_combinenumber.Name = "st_combinenumber";
             this.st_combinenumber.Power = null;
@@ -400,7 +631,7 @@
             // su_stcode
             // 
             this.su_stcode.DataPropertyName = "su_stcode";
-            this.su_stcode.HeaderText = "钢网编号";
+            this.su_stcode.HeaderText = "刮刀编号";
             this.su_stcode.MinimumWidth = 6;
             this.su_stcode.Name = "su_stcode";
             this.su_stcode.Width = 125;
@@ -538,227 +769,7 @@
             this.ma_code.TextBoxEnable = true;
             this.ma_code.TextKeyDown += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextKeyDown(this.ma_code_TextKeyDown);
             // 
-            // em_code1
-            // 
-            this.em_code1.AllPower = null;
-            this.em_code1.BackColor = System.Drawing.Color.White;
-            this.em_code1.ID = null;
-            this.em_code1.Location = new System.Drawing.Point(519, 829);
-            this.em_code1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.em_code1.Name = "em_code1";
-            this.em_code1.Power = null;
-            this.em_code1.Size = new System.Drawing.Size(178, 28);
-            this.em_code1.Str = null;
-            this.em_code1.Str1 = null;
-            this.em_code1.Str2 = null;
-            this.em_code1.TabIndex = 114;
-            // 
-            // em_code1_label
-            // 
-            this.em_code1_label.AutoSize = true;
-            this.em_code1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.em_code1_label.Location = new System.Drawing.Point(399, 828);
-            this.em_code1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.em_code1_label.Name = "em_code1_label";
-            this.em_code1_label.Size = new System.Drawing.Size(110, 31);
-            this.em_code1_label.TabIndex = 113;
-            this.em_code1_label.Text = "人员编号";
-            // 
-            // ST_ENSIONA
-            // 
-            this.ST_ENSIONA.AllPower = null;
-            this.ST_ENSIONA.BackColor = System.Drawing.Color.White;
-            this.ST_ENSIONA.ID = null;
-            this.ST_ENSIONA.Location = new System.Drawing.Point(248, 888);
-            this.ST_ENSIONA.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.ST_ENSIONA.Name = "ST_ENSIONA";
-            this.ST_ENSIONA.Negative = false;
-            this.ST_ENSIONA.Power = null;
-            this.ST_ENSIONA.Size = new System.Drawing.Size(178, 28);
-            this.ST_ENSIONA.Str = null;
-            this.ST_ENSIONA.Str1 = null;
-            this.ST_ENSIONA.Str2 = null;
-            this.ST_ENSIONA.TabIndex = 125;
-            // 
-            // ST_ENSIONA_label
-            // 
-            this.ST_ENSIONA_label.AutoSize = true;
-            this.ST_ENSIONA_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ST_ENSIONA_label.Location = new System.Drawing.Point(207, 888);
-            this.ST_ENSIONA_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ST_ENSIONA_label.Name = "ST_ENSIONA_label";
-            this.ST_ENSIONA_label.Size = new System.Drawing.Size(31, 31);
-            this.ST_ENSIONA_label.TabIndex = 124;
-            this.ST_ENSIONA_label.Text = "A";
-            // 
-            // ST_ENSIONB
-            // 
-            this.ST_ENSIONB.AllPower = null;
-            this.ST_ENSIONB.BackColor = System.Drawing.Color.White;
-            this.ST_ENSIONB.ID = null;
-            this.ST_ENSIONB.Location = new System.Drawing.Point(540, 888);
-            this.ST_ENSIONB.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.ST_ENSIONB.Name = "ST_ENSIONB";
-            this.ST_ENSIONB.Negative = false;
-            this.ST_ENSIONB.Power = null;
-            this.ST_ENSIONB.Size = new System.Drawing.Size(178, 28);
-            this.ST_ENSIONB.Str = null;
-            this.ST_ENSIONB.Str1 = null;
-            this.ST_ENSIONB.Str2 = null;
-            this.ST_ENSIONB.TabIndex = 123;
-            // 
-            // ST_ENSIONB_label
-            // 
-            this.ST_ENSIONB_label.AutoSize = true;
-            this.ST_ENSIONB_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ST_ENSIONB_label.Location = new System.Drawing.Point(500, 888);
-            this.ST_ENSIONB_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ST_ENSIONB_label.Name = "ST_ENSIONB_label";
-            this.ST_ENSIONB_label.Size = new System.Drawing.Size(29, 31);
-            this.ST_ENSIONB_label.TabIndex = 122;
-            this.ST_ENSIONB_label.Text = "B";
-            // 
-            // ST_ENSIONC
-            // 
-            this.ST_ENSIONC.AllPower = null;
-            this.ST_ENSIONC.BackColor = System.Drawing.Color.White;
-            this.ST_ENSIONC.ID = null;
-            this.ST_ENSIONC.Location = new System.Drawing.Point(838, 888);
-            this.ST_ENSIONC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.ST_ENSIONC.Name = "ST_ENSIONC";
-            this.ST_ENSIONC.Negative = false;
-            this.ST_ENSIONC.Power = null;
-            this.ST_ENSIONC.Size = new System.Drawing.Size(178, 28);
-            this.ST_ENSIONC.Str = null;
-            this.ST_ENSIONC.Str1 = null;
-            this.ST_ENSIONC.Str2 = null;
-            this.ST_ENSIONC.TabIndex = 121;
-            // 
-            // ST_ENSIONC_label
-            // 
-            this.ST_ENSIONC_label.AutoSize = true;
-            this.ST_ENSIONC_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ST_ENSIONC_label.Location = new System.Drawing.Point(798, 888);
-            this.ST_ENSIONC_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ST_ENSIONC_label.Name = "ST_ENSIONC_label";
-            this.ST_ENSIONC_label.Size = new System.Drawing.Size(30, 31);
-            this.ST_ENSIONC_label.TabIndex = 120;
-            this.ST_ENSIONC_label.Text = "C";
-            // 
-            // ST_ENSIOND
-            // 
-            this.ST_ENSIOND.AllPower = null;
-            this.ST_ENSIOND.BackColor = System.Drawing.Color.White;
-            this.ST_ENSIOND.ID = null;
-            this.ST_ENSIOND.Location = new System.Drawing.Point(248, 929);
-            this.ST_ENSIOND.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.ST_ENSIOND.Name = "ST_ENSIOND";
-            this.ST_ENSIOND.Negative = false;
-            this.ST_ENSIOND.Power = null;
-            this.ST_ENSIOND.Size = new System.Drawing.Size(178, 28);
-            this.ST_ENSIOND.Str = null;
-            this.ST_ENSIOND.Str1 = null;
-            this.ST_ENSIOND.Str2 = null;
-            this.ST_ENSIOND.TabIndex = 119;
-            // 
-            // label9
-            // 
-            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(207, 929);
-            this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(32, 31);
-            this.label9.TabIndex = 118;
-            this.label9.Text = "D";
-            // 
-            // ST_ENSIONE
-            // 
-            this.ST_ENSIONE.AllPower = null;
-            this.ST_ENSIONE.BackColor = System.Drawing.Color.White;
-            this.ST_ENSIONE.ID = null;
-            this.ST_ENSIONE.Location = new System.Drawing.Point(540, 929);
-            this.ST_ENSIONE.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.ST_ENSIONE.Name = "ST_ENSIONE";
-            this.ST_ENSIONE.Negative = false;
-            this.ST_ENSIONE.Power = null;
-            this.ST_ENSIONE.Size = new System.Drawing.Size(178, 28);
-            this.ST_ENSIONE.Str = null;
-            this.ST_ENSIONE.Str1 = null;
-            this.ST_ENSIONE.Str2 = null;
-            this.ST_ENSIONE.TabIndex = 117;
-            // 
-            // ST_ENSIONE_label
-            // 
-            this.ST_ENSIONE_label.AutoSize = true;
-            this.ST_ENSIONE_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ST_ENSIONE_label.Location = new System.Drawing.Point(501, 929);
-            this.ST_ENSIONE_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ST_ENSIONE_label.Name = "ST_ENSIONE_label";
-            this.ST_ENSIONE_label.Size = new System.Drawing.Size(27, 31);
-            this.ST_ENSIONE_label.TabIndex = 116;
-            this.ST_ENSIONE_label.Text = "E";
-            // 
-            // 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(10, 888);
-            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(194, 31);
-            this.label7.TabIndex = 115;
-            this.label7.Text = "张力测试结果(N)";
-            // 
-            // Scrap
-            // 
-            this.Scrap.AllPower = null;
-            this.Scrap.BackColor = System.Drawing.Color.Transparent;
-            this.Scrap.DownImage = ((System.Drawing.Image)(resources.GetObject("Scrap.DownImage")));
-            this.Scrap.Image = null;
-            this.Scrap.IsShowBorder = true;
-            this.Scrap.Location = new System.Drawing.Point(1027, 920);
-            this.Scrap.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.Scrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("Scrap.MoveImage")));
-            this.Scrap.Name = "Scrap";
-            this.Scrap.NormalImage = ((System.Drawing.Image)(resources.GetObject("Scrap.NormalImage")));
-            this.Scrap.Power = null;
-            this.Scrap.Size = new System.Drawing.Size(102, 42);
-            this.Scrap.TabIndex = 126;
-            this.Scrap.Text = "报废";
-            this.Scrap.UseVisualStyleBackColor = false;
-            this.Scrap.Click += new System.EventHandler(this.Scrap_Click_1);
-            // 
-            // st_usecount
-            // 
-            this.st_usecount.AutoSize = true;
-            this.st_usecount.Location = new System.Drawing.Point(504, 792);
-            this.st_usecount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.st_usecount.Name = "st_usecount";
-            this.st_usecount.Size = new System.Drawing.Size(0, 18);
-            this.st_usecount.TabIndex = 127;
-            this.st_usecount.Visible = false;
-            // 
-            // normalButton1
-            // 
-            this.normalButton1.AllPower = null;
-            this.normalButton1.BackColor = System.Drawing.Color.Transparent;
-            this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
-            this.normalButton1.Image = null;
-            this.normalButton1.IsShowBorder = true;
-            this.normalButton1.Location = new System.Drawing.Point(838, 820);
-            this.normalButton1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
-            this.normalButton1.Name = "normalButton1";
-            this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
-            this.normalButton1.Power = null;
-            this.normalButton1.Size = new System.Drawing.Size(107, 42);
-            this.normalButton1.TabIndex = 128;
-            this.normalButton1.Text = "6小时清洗";
-            this.normalButton1.UseVisualStyleBackColor = false;
-            this.normalButton1.Click += new System.EventHandler(this.normalButton1_Click);
-            // 
-            // Make_SMTStencil
+            // Make_SMTSStencil
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -808,9 +819,9 @@
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.Name = "Make_SMTStencil";
-            this.Tag = "Make!SMTStencil";
-            this.Text = "Make_SMTStencil";
+            this.Name = "Make_SMTSStencil";
+            this.Tag = "Make!SMTSStencil";
+            this.Text = "Make_SMTSStencil";
             this.Load += new System.EventHandler(this.Make_SMTStencil_Load);
             this.SizeChanged += new System.EventHandler(this.Make_SMTStencil_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ToolsBom)).EndInit();
@@ -845,14 +856,6 @@
         private CustomControl.ComBoxWithFocus.ComBoxWithFocus st_table;
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox su_singlepringqty1;
         private System.Windows.Forms.Label su_singlepringqty1_label;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_stcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn st_pcbcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_status;
-        private System.Windows.Forms.DataGridViewTextBoxColumn SU_LINECODE;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_stverison;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_singlepringqty;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_table;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_usemacode;
         private System.Windows.Forms.CheckBox SU_RETURNIFCLEAN;
         private CustomControl.TextBoxWithIcon.EnterTextBox em_code;
         private System.Windows.Forms.Label em_code_label;
@@ -872,5 +875,13 @@
         private CustomControl.ButtonUtil.NormalButton Scrap;
         private System.Windows.Forms.Label st_usecount;
         private CustomControl.ButtonUtil.NormalButton normalButton1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_stcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_pcbcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_status;
+        private System.Windows.Forms.DataGridViewTextBoxColumn SU_LINECODE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_stverison;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_singlepringqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_table;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_usemacode;
     }
 }

+ 106 - 105
UAS_MES_WEIP/FunctionCode/Make/Make_SMTSStencil.cs

@@ -89,7 +89,7 @@ namespace UAS_MES_NEW.Make
         {
             sql.Clear();
             sql.Append("select St_PCBCODE,su_stcode,su_table,su_status,su_linecode,su_usemacode,su_singlepringqty,su_stverison ");
-            sql.Append("from StencilUse left join stencil on st_code=su_stcode where su_usemacode='" + ma_code.Text + "' and su_status='在线'");
+            sql.Append("from StencilUse left join stencil on st_code=su_stcode where su_usemacode='" + ma_code.Text + "' and su_status='在线' and st_kind = '刮刀'");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             BaseUtil.FillDgvWithDataTable(ToolsBom, dt);
         }
@@ -104,9 +104,10 @@ namespace UAS_MES_NEW.Make
             if (ma_code.Text == "")
             {
                 MessageBox.Show("工单号不能为空");
+                return;
             }
             int WaringCount =int.Parse(dh.GetConfig("WaringCount", "Stencil").ToString());
-            DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,st_version,nvl(st_maxusecount,0)st_maxusecount,nvl(st_usecount,0)st_usecount from Stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED'", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,st_version,nvl(st_maxusecount,0)st_maxusecount,nvl(st_usecount,0)st_usecount from Stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀'", "select");
             string status = "";
             string version = "";
             int st_maxusecount = 0;
@@ -119,19 +120,19 @@ namespace UAS_MES_NEW.Make
                 st_usecount = int.Parse(dt.Rows[0]["st_usecount"].ToString());
                 if (status == "在线" || status == "报废" || status == "在仓")
                 {
-                    MessageBox.Show("当前钢网" + SU_DEVCODE.Text + "处于" + status + "状态,无法领用");
+                    MessageBox.Show("当前刮刀" + SU_DEVCODE.Text + "处于" + status + "状态,无法领用");
                     return;
                 }
             }
             else
             {
-                MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "不存在或者未审核");
+                MessageBox.Show("刮刀编号" + SU_DEVCODE.Text + "不存在或者未审核");
                 return;
             }
             //使用次数预警
             if (st_maxusecount - st_usecount < WaringCount)
             {
-                string close = MessageBox.Show(this.ParentForm, "钢网已使用"+ st_usecount+",距离使用上限还有"+(st_maxusecount - st_usecount)+"次", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                string close = MessageBox.Show(this.ParentForm, "刮刀已使用"+ st_usecount+",距离使用上限还有"+(st_maxusecount - st_usecount)+"次", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (close != "Yes")
                 {
                     return;
@@ -140,11 +141,11 @@ namespace UAS_MES_NEW.Make
             //限制钢网使用的产品
             String pr_spec = dh.getFieldDataByCondition("product", "pr_spec", "pr_code = '" + ma_prodcode.Text + "'").ToString();
             String st_vendcode = dh.getFieldDataByCondition("STENCIL", "nvl(st_vendcode,'aabbcc')", "st_code = '" + SU_DEVCODE.Text + "'").ToString();
-            if (!pr_spec.Contains(st_vendcode))
-            {
-                MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "不能在产品" + ma_prodcode.Text + "中使用");
-                return;
-            }
+            //if (!pr_spec.Contains(st_vendcode))
+            //{
+            //    MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "不能在产品" + ma_prodcode.Text + "中使用");
+            //    return;
+            //}
             //dt = (DataTable)dh.ExecuteSql("select 1 from STENILCANUSEPRO where sp_stcode='" + SU_DEVCODE.Text + "' and sp_prodcode='" + ma_prodcode.Text + "'", "select");
             //if (dt.Rows.Count == 0)
             //{
@@ -152,14 +153,14 @@ namespace UAS_MES_NEW.Make
             //    return;
             //}
             //一条线只能在线一个钢网
-            dt = (DataTable)dh.ExecuteSql("select su_stcode from stenciluse where su_linecode='" + li_code.Text + "' and su_status='在线'", "select");
-            if (dt.Rows.Count > 0)
-            {
-                MessageBox.Show("线别" + li_code.Text + "已有领用的钢网" + dt.Rows[0]["su_stcode"].ToString() + ",请先退回");
-                return;
-            }
-            else
-            {
+            //dt = (DataTable)dh.ExecuteSql("select su_stcode from stenciluse where su_linecode='" + li_code.Text + "' and su_status='在线'", "select");
+            //if (dt.Rows.Count > 0)
+            //{
+            //    MessageBox.Show("线别" + li_code.Text + "已有领用的钢网" + dt.Rows[0]["su_stcode"].ToString() + ",请先退回");
+            //    return;
+            //}
+            //else
+            //{
                 dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + em_code.Text + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
@@ -182,56 +183,56 @@ namespace UAS_MES_NEW.Make
                     }
                     else
                     {
-                        MessageBox.Show("单片印刷次数必须大于0");
+                        MessageBox.Show("单片次数必须大于0");
                     }
                 }
                 else
                 {
                     MessageBox.Show("人员编号" + em_code.Text + "不存在");
                 }
-            }
+    //        }
         }
 
         private void Return_Click(object sender, EventArgs e)
         {
-            if (ST_ENSIONA.Text != "" && ST_ENSIONB.Text != "" && ST_ENSIONC.Text != "" && ST_ENSIOND.Text != "" && ST_ENSIONE.Text != "")
-            {
+            //if (ST_ENSIONA.Text != "" && ST_ENSIONB.Text != "" && ST_ENSIONC.Text != "" && ST_ENSIOND.Text != "" && ST_ENSIONE.Text != "")
+            //{
                 if (SU_RETURNIFCLEAN.Checked)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀' ", "select");
                 if (dt.Rows.Count > 0)
                 {
                     string status = dt.Rows[0]["ST_USESTATUS"].ToString();
                     if (status == "在仓" || status == "借出")
                     {
-                        MessageBox.Show("当前钢网" + SU_DEVCODE.Text + "未在线,无需归还");
+                        MessageBox.Show("当前刮刀" + SU_DEVCODE.Text + "未在线,无需归还");
                         return;
                     }
                     if (status == "报废")
                     {
-                        MessageBox.Show("当前钢网" + SU_DEVCODE.Text + "处于" + status + "状态,无法退回");
+                        MessageBox.Show("当前刮刀" + SU_DEVCODE.Text + "处于" + status + "状态,无法退回");
                         return;
                     }
                 }
                 else
                 {
-                    MessageBox.Show("钢网编号" + SU_DEVCODE1.Text + "不存在或者未审核");
+                    MessageBox.Show("刮刀编号" + SU_DEVCODE1.Text + "不存在或者未审核");
                 }
                 string St_USECOUNT = dt.Rows[0]["St_USECOUNT"].ToString();
                 dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + em_code1.Text + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
-                    if (int.Parse(st_combinenumber.Text) >= 0)
-                    {
+                    //if (int.Parse(st_combinenumber.Text) >= 0)
+                    //{
                         sql.Clear();
                         sql.Append("update StencilUse set SU_ENSIONA='" + ST_ENSIONA.Text + "',SU_ENSIONB='" + ST_ENSIONB.Text + "',SU_ENSIONC='" + ST_ENSIONC.Text + "',SU_ENSIOND='" + ST_ENSIOND.Text + "',SU_ENSIONE='" + ST_ENSIONE.Text + "', su_cleannums=nvl(su_cleannums,0)+1, SU_BACKDATE=sysdate,su_returnman='" + dt.Rows[0]["em_name"].ToString() + "',su_returnmancode='" + em_code1.Text + "',");
-                        sql.Append("SU_THISUSETIMES='" + (st_combinenumber.Text == "" ? "0" : st_combinenumber.Text) + "',SU_STATUS='借出',su_usecount=" + (St_USECOUNT == "" ? "0" : St_USECOUNT) + "+" + st_combinenumber.Text);
+                        sql.Append("SU_THISUSETIMES='" + (st_combinenumber.Text == "" ? "0" : st_combinenumber.Text) + "',SU_STATUS='借出'");
                         sql.Append(",SU_RETURNIFCLEAN='" + (SU_RETURNIFCLEAN.Checked ? "-1" : "0") + "' where su_id=(select max(su_id) from stenciluse where su_stcode='" + SU_DEVCODE1.Text + "' and su_status='在线')");
                         dh.ExecuteSql(sql.ToString(), "update");
                         sql.Clear();
                         sql.Append("update Stencil set st_cleannums=nvl(st_cleannums,0)+1,ST_ENSIONA='" + ST_ENSIONA.Text + "',ST_ENSIONB='" + ST_ENSIONB.Text + "',ST_ENSIONC='" + ST_ENSIONC.Text + "',ST_ENSIOND='" + ST_ENSIOND.Text + "',ST_ENSIONE='" + ST_ENSIONE.Text + "',St_USECOUNT=nvl(St_USECOUNT,0)+" + (st_combinenumber.Text == "" ? "0" : st_combinenumber.Text) + ",ST_USESTATUS='借出' where st_code='" + SU_DEVCODE1.Text + "'");
                         dh.ExecuteSql(sql.ToString(), "update");
-                        MessageBox.Show("钢网" + SU_DEVCODE1.Text + "退回成功!");
+                        MessageBox.Show("刮刀" + SU_DEVCODE1.Text + "退回成功!");
                         SU_DEVCODE1.Text = "";
                         st_combinenumber.Text = "";
                         em_code1.Text = "";
@@ -243,11 +244,11 @@ namespace UAS_MES_NEW.Make
                             SU_RETURNIFCLEAN.Checked = false;
                             Return.Enabled = false;
                             Confirm.PerformClick();
-                    }
-                    else
-                    {
-                        MessageBox.Show("加工小板数必须大于等于0");
-                    }
+                    //}
+                    //else
+                    //{
+                    //    MessageBox.Show("加工小板数必须大于等于0");
+                    //}
                 }
                 else
                 {
@@ -256,13 +257,13 @@ namespace UAS_MES_NEW.Make
             }
             else
             {
-                MessageBox.Show("请确认是否清洗钢网");
-            }
-        }
-            else
-            {
-                MessageBox.Show("请维护完成的测试参数");
+                MessageBox.Show("请确认是否清洗刮刀");
             }
+        //}
+        //    else
+        //    {
+        //        MessageBox.Show("请维护完成的测试参数");
+        //    }
 }
 
         private void Radio_CheckedChanged(object sender, EventArgs e)
@@ -305,8 +306,8 @@ namespace UAS_MES_NEW.Make
                         ST_ENSIOND.Enabled = true;
                         ST_ENSIONE.Enabled = true;
                         SU_DEVCODE.Enabled = false;
-                        Receive.Enabled = false;
-                        Receive.Enabled = false;
+                        Return.Enabled = true;
+                        Scrap.Enabled = true;
                     }
                     break;
                 default:
@@ -318,10 +319,10 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_table from stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_table from stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀' ", "select");
                 if (dt.Rows.Count == 0)
                 {
-                    MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "不存在或者未审核");
+                    MessageBox.Show("刮刀编号" + SU_DEVCODE.Text + "不存在或者未审核");
                 }
                 if (dt.Rows.Count > 0)
                 {
@@ -335,7 +336,7 @@ namespace UAS_MES_NEW.Make
                     Receive.Enabled = true;
                     if (dt.Rows[0]["st_usestatus"].ToString() == "报废")
                     {
-                        MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "已报废");
+                        MessageBox.Show("刮刀编号" + SU_DEVCODE.Text + "已报废");
                     }
                 }
             }
@@ -345,7 +346,7 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀'", "select");
                 //if (dt.Rows.Count > 0)
                 //{
                 //    try
@@ -363,10 +364,10 @@ namespace UAS_MES_NEW.Make
                 //}
 
 
-                 dt = (DataTable)dh.ExecuteSql("select nvl(st_usecount,0)st_usecount,case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                 dt = (DataTable)dh.ExecuteSql("select nvl(st_usecount,0)st_usecount,case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀'", "select");
                 if (dt.Rows.Count == 0)
                 {
-                    MessageBox.Show("钢网编号" + SU_DEVCODE1.Text + "不存在或者未审核");
+                    MessageBox.Show("刮刀编号" + SU_DEVCODE1.Text + "不存在或者未审核");
                 }
                 else
                 {
@@ -388,53 +389,53 @@ namespace UAS_MES_NEW.Make
         //默认范围39-55,如不在范围内则可以报废
         private void ST_ENSION_TextChanged(object sender, EventArgs e)
         {
-            double Range = 0;
-            List<string> Num = new List<string>();
-            Num.Add(ST_ENSIONA.Text);
-            Num.Add(ST_ENSIONB.Text);
-            Num.Add(ST_ENSIONC.Text);
-            Num.Add(ST_ENSIOND.Text);
-            Num.Add(ST_ENSIONE.Text);
-            int CheckCount = 0;
-            int FillCount = 0;
-            foreach (string item in Num)
-            {
-                if (item != "")
-                {
-                    FillCount = FillCount + 1;
-                    if (double.TryParse(item, out Range))
-                    {
-                        //如果使用过张力范围39-55,使用过30-55
-                        if (ifUsed)
-                        {
-                            if (Range > 30 && Range <= 50)
-                            {
-                                CheckCount = CheckCount + 1;
-                            }
-                        }
-                        else
-                        {
-                            if (Range > 30 && Range <= 50)
-                            {
-                                CheckCount = CheckCount + 1;
-                            }
-                        }
-                    }
-                }
-            }
-            if (FillCount == 5)
-            {
-                if (CheckCount == 5)
-                {
-                    Return.Enabled = true;
-                    Scrap.Enabled = false;
-                }
-                else
-                {
-                    Return.Enabled = false;
-                    Scrap.Enabled = true;
-                }
-            }
+            //double Range = 0;
+            //List<string> Num = new List<string>();
+            //Num.Add(ST_ENSIONA.Text);
+            //Num.Add(ST_ENSIONB.Text);
+            //Num.Add(ST_ENSIONC.Text);
+            //Num.Add(ST_ENSIOND.Text);
+            //Num.Add(ST_ENSIONE.Text);
+            //int CheckCount = 0;
+            //int FillCount = 0;
+            //foreach (string item in Num)
+            //{
+            //    if (item != "")
+            //    {
+            //        FillCount = FillCount + 1;
+            //        if (double.TryParse(item, out Range))
+            //        {
+            //            //如果使用过张力范围39-55,使用过30-55
+            //            if (ifUsed)
+            //            {
+            //                if (Range > 30 && Range <= 50)
+            //                {
+            //                    CheckCount = CheckCount + 1;
+            //                }
+            //            }
+            //            else
+            //            {
+            //                if (Range > 30 && Range <= 50)
+            //                {
+            //                    CheckCount = CheckCount + 1;
+            //                }
+            //            }
+            //        }
+            //    }
+            //}
+            //if (FillCount == 5)
+            //{
+            //    if (CheckCount == 5)
+            //    {
+            //        Return.Enabled = true;
+            //        Scrap.Enabled = false;
+            //    }
+            //    else
+            //    {
+            //        Return.Enabled = false;
+            //        Scrap.Enabled = true;
+            //    }
+            //}
         }
 
 
@@ -442,17 +443,17 @@ namespace UAS_MES_NEW.Make
         Make_StencilScrapReason form;
         private void Scrap_Click(object sender, EventArgs e)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_status from stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_status from stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀'", "select");
             if (dt.Rows.Count > 0)
             {
                 if (dt.Rows[0]["st_usestatus"].ToString() == "报废")
                 {
-                    MessageBox.Show("钢网" + SU_DEVCODE1.Text + "已处于报废状态");
+                    MessageBox.Show("刮刀" + SU_DEVCODE1.Text + "已处于报废状态");
                     return;
                 }
                 if (dt.Rows[0]["st_usestatus"].ToString() != "在仓")
                 {
-                    MessageBox.Show("报废钢网必须" + SU_DEVCODE1.Text + "处于在仓状态");
+                    MessageBox.Show("报废刮刀必须" + SU_DEVCODE1.Text + "处于在仓状态");
                     return;
                 }
                 string closetab_confirm = MessageBox.Show(this.ParentForm, "报废后不可撤销,是否确认报废", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
@@ -467,7 +468,7 @@ namespace UAS_MES_NEW.Make
             }
             else
             {
-                MessageBox.Show("钢网编号" + SU_DEVCODE1.Text + "不存在或者未审核");
+                MessageBox.Show("刮刀编号" + SU_DEVCODE1.Text + "不存在或者未审核");
             }
         }
 
@@ -524,24 +525,24 @@ namespace UAS_MES_NEW.Make
         private void normalButton1_Click(object sender, EventArgs e)
         {
 
-                    DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                    DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀'", "select");
                     if (dt.Rows.Count > 0)
                     {
                         string status = dt.Rows[0]["ST_USESTATUS"].ToString();
                         if (status == "在仓" || status == "借出")
                         {
-                            MessageBox.Show("当前钢网" + SU_DEVCODE.Text + "未在线,无法操作");
+                            MessageBox.Show("当前刮刀" + SU_DEVCODE.Text + "未在线,无法操作");
                             return;
                         }
                         if (status == "报废")
                         {
-                            MessageBox.Show("当前钢网" + SU_DEVCODE.Text + "处于" + status + "状态,无法操作");
+                            MessageBox.Show("当前刮刀" + SU_DEVCODE.Text + "处于" + status + "状态,无法操作");
                             return;
                         }
                     }
                     else
                     {
-                        MessageBox.Show("钢网编号" + SU_DEVCODE1.Text + "不存在或者未审核");
+                        MessageBox.Show("刮刀编号" + SU_DEVCODE1.Text + "不存在或者未审核");
                 return;
                     }
 
@@ -549,7 +550,7 @@ namespace UAS_MES_NEW.Make
                             sql.Append("update StencilUse set  su_cleannums=nvl(su_cleannums,0)+1, su_auditdate=sysdate");
                             sql.Append("  where su_id=(select max(su_id) from stenciluse where su_stcode='" + SU_DEVCODE1.Text + "' and su_status='在线')");
                             dh.ExecuteSql(sql.ToString(), "update");
-                            MessageBox.Show("钢网" + SU_DEVCODE1.Text + "6小时清洗成功!");
+                            MessageBox.Show("刮刀" + SU_DEVCODE1.Text + "6小时清洗成功!");
                             SU_DEVCODE1.Text = "";
                             st_combinenumber.Text = "";
                             em_code1.Text = "";

+ 39 - 39
UAS_MES_WEIP/FunctionCode/Make/Make_SMTSStencil.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="Receive.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="normalButton1.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="Receive.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="normalButton1.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -143,7 +143,7 @@
         gg==
 </value>
   </data>
-  <data name="Receive.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="normalButton1.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -156,7 +156,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Return.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Scrap.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -168,7 +168,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Return.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Scrap.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -181,7 +181,7 @@
         gg==
 </value>
   </data>
-  <data name="Return.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Scrap.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -194,31 +194,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="su_stcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="st_pcbcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="su_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SU_LINECODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="su_stverison.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="su_singlepringqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="su_table.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="su_usemacode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <data name="Confirm.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Receive.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -230,7 +206,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Confirm.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Receive.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -243,7 +219,7 @@
         gg==
 </value>
   </data>
-  <data name="Confirm.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Receive.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -256,7 +232,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Scrap.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Return.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -268,7 +244,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Scrap.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Return.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -281,7 +257,7 @@
         gg==
 </value>
   </data>
-  <data name="Scrap.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Return.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -294,7 +270,31 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="normalButton1.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <metadata name="su_stcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_pcbcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="su_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="SU_LINECODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="su_stverison.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="su_singlepringqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="su_table.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="su_usemacode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <data name="Confirm.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -306,7 +306,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="normalButton1.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Confirm.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -319,7 +319,7 @@
         gg==
 </value>
   </data>
-  <data name="normalButton1.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Confirm.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE

+ 19 - 18
UAS_MES_WEIP/FunctionCode/Make/Make_SMTStencil.cs

@@ -89,7 +89,7 @@ namespace UAS_MES_NEW.Make
         {
             sql.Clear();
             sql.Append("select St_PCBCODE,su_stcode,su_table,su_status,su_linecode,su_usemacode,su_singlepringqty,su_stverison ");
-            sql.Append("from StencilUse left join stencil on st_code=su_stcode where su_usemacode='" + ma_code.Text + "' and su_status='在线'");
+            sql.Append("from StencilUse left join stencil on st_code=su_stcode where su_usemacode='" + ma_code.Text + "' and su_status='在线' and st_kind = '钢网'");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             BaseUtil.FillDgvWithDataTable(ToolsBom, dt);
         }
@@ -104,6 +104,7 @@ namespace UAS_MES_NEW.Make
             if (ma_code.Text == "")
             {
                 MessageBox.Show("工单号不能为空");
+                return;
             }
             int WaringCount =int.Parse(dh.GetConfig("WaringCount", "Stencil").ToString());
             DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,st_version,nvl(st_maxusecount,0)st_maxusecount,nvl(st_usecount,0)st_usecount from Stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED'", "select");
@@ -152,14 +153,14 @@ namespace UAS_MES_NEW.Make
             //    return;
             //}
             //一条线只能在线一个钢网
-            dt = (DataTable)dh.ExecuteSql("select su_stcode from stenciluse where su_linecode='" + li_code.Text + "' and su_status='在线'", "select");
-            if (dt.Rows.Count > 0)
-            {
-                MessageBox.Show("线别" + li_code.Text + "已有领用的钢网" + dt.Rows[0]["su_stcode"].ToString() + ",请先退回");
-                return;
-            }
-            else
-            {
+            //dt = (DataTable)dh.ExecuteSql("select su_stcode from stenciluse where su_linecode='" + li_code.Text + "' and su_status='在线'", "select");
+            //if (dt.Rows.Count > 0)
+            //{
+            //    MessageBox.Show("线别" + li_code.Text + "已有领用的钢网" + dt.Rows[0]["su_stcode"].ToString() + ",请先退回");
+            //    return;
+            //}
+            //else
+            //{
                 dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + em_code.Text + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
@@ -189,7 +190,7 @@ namespace UAS_MES_NEW.Make
                 {
                     MessageBox.Show("人员编号" + em_code.Text + "不存在");
                 }
-            }
+          //  }
         }
 
         private void Return_Click(object sender, EventArgs e)
@@ -198,7 +199,7 @@ namespace UAS_MES_NEW.Make
             {
                 if (SU_RETURNIFCLEAN.Checked)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '钢网'", "select");
                 if (dt.Rows.Count > 0)
                 {
                     string status = dt.Rows[0]["ST_USESTATUS"].ToString();
@@ -305,8 +306,8 @@ namespace UAS_MES_NEW.Make
                         ST_ENSIOND.Enabled = true;
                         ST_ENSIONE.Enabled = true;
                         SU_DEVCODE.Enabled = false;
-                        Receive.Enabled = false;
-                        Receive.Enabled = false;
+                        Return.Enabled = true;
+                        Scrap.Enabled = true;
                     }
                     break;
                 default:
@@ -318,7 +319,7 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_table from stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_table from stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED' and st_kind = '钢网'", "select");
                 if (dt.Rows.Count == 0)
                 {
                     MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "不存在或者未审核");
@@ -345,7 +346,7 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '钢网'", "select");
                 //if (dt.Rows.Count > 0)
                 //{
                 //    try
@@ -363,7 +364,7 @@ namespace UAS_MES_NEW.Make
                 //}
 
 
-                 dt = (DataTable)dh.ExecuteSql("select nvl(st_usecount,0)st_usecount,case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                 dt = (DataTable)dh.ExecuteSql("select nvl(st_usecount,0)st_usecount,case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED ' and st_kind = '钢网'", "select");
                 if (dt.Rows.Count == 0)
                 {
                     MessageBox.Show("钢网编号" + SU_DEVCODE1.Text + "不存在或者未审核");
@@ -442,7 +443,7 @@ namespace UAS_MES_NEW.Make
         Make_StencilScrapReason form;
         private void Scrap_Click(object sender, EventArgs e)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_status from stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_status from stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '钢网'", "select");
             if (dt.Rows.Count > 0)
             {
                 if (dt.Rows[0]["st_usestatus"].ToString() == "报废")
@@ -524,7 +525,7 @@ namespace UAS_MES_NEW.Make
         private void normalButton1_Click(object sender, EventArgs e)
         {
 
-                    DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                    DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '钢网'", "select");
                     if (dt.Rows.Count > 0)
                     {
                         string status = dt.Rows[0]["ST_USESTATUS"].ToString();

+ 39 - 39
UAS_MES_WEIP/FunctionCode/Make/Make_SMTStockSStencil.Designer.cs

@@ -28,7 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_SMTStockStencil));
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_SMTStockSStencil));
             this.RadioReceive = new System.Windows.Forms.RadioButton();
             this.RadioReturn = new System.Windows.Forms.RadioButton();
             this.SU_DEVCODE_label = new System.Windows.Forms.Label();
@@ -44,6 +44,8 @@
             this.ma_qty = new System.Windows.Forms.Label();
             this.ma_qty_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.st_usecount = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
             this.Receive = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.Return = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.Scrap = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
@@ -66,8 +68,6 @@
             this.Confirm = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ma_prodcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
-            this.st_usecount = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.ToolsBom)).BeginInit();
             this.SuspendLayout();
             // 
@@ -108,7 +108,7 @@
             this.SU_DEVCODE_label.Name = "SU_DEVCODE_label";
             this.SU_DEVCODE_label.Size = new System.Drawing.Size(110, 31);
             this.SU_DEVCODE_label.TabIndex = 81;
-            this.SU_DEVCODE_label.Text = "钢网编号";
+            this.SU_DEVCODE_label.Text = "刮刀编号";
             // 
             // SU_DEVCODE1_label
             // 
@@ -119,7 +119,7 @@
             this.SU_DEVCODE1_label.Name = "SU_DEVCODE1_label";
             this.SU_DEVCODE1_label.Size = new System.Drawing.Size(110, 31);
             this.SU_DEVCODE1_label.TabIndex = 87;
-            this.SU_DEVCODE1_label.Text = "钢网编号";
+            this.SU_DEVCODE1_label.Text = "刮刀编号";
             // 
             // label7
             // 
@@ -250,6 +250,27 @@
             this.ms_makecode_label.TabIndex = 68;
             this.ms_makecode_label.Text = "归属工单";
             // 
+            // st_usecount
+            // 
+            this.st_usecount.AutoSize = true;
+            this.st_usecount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.st_usecount.Location = new System.Drawing.Point(714, 692);
+            this.st_usecount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.st_usecount.Name = "st_usecount";
+            this.st_usecount.Size = new System.Drawing.Size(0, 31);
+            this.st_usecount.TabIndex = 112;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(536, 690);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(158, 31);
+            this.label2.TabIndex = 111;
+            this.label2.Text = "累计使用次数";
+            // 
             // Receive
             // 
             this.Receive.AllPower = null;
@@ -455,7 +476,7 @@
             // su_stcode
             // 
             this.su_stcode.DataPropertyName = "su_stcode";
-            this.su_stcode.HeaderText = "钢网编号";
+            this.su_stcode.HeaderText = "刮刀编号";
             this.su_stcode.MinimumWidth = 8;
             this.su_stcode.Name = "su_stcode";
             this.su_stcode.Width = 150;
@@ -572,28 +593,7 @@
             this.ma_code.TextBoxEnable = true;
             this.ma_code.TextKeyDown += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextKeyDown(this.ma_code_TextKeyDown);
             // 
-            // st_usecount
-            // 
-            this.st_usecount.AutoSize = true;
-            this.st_usecount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.st_usecount.Location = new System.Drawing.Point(714, 692);
-            this.st_usecount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.st_usecount.Name = "st_usecount";
-            this.st_usecount.Size = new System.Drawing.Size(0, 31);
-            this.st_usecount.TabIndex = 112;
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(536, 690);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(158, 31);
-            this.label2.TabIndex = 111;
-            this.label2.Text = "累计使用次数";
-            // 
-            // Make_SMTStockStencil
+            // Make_SMTStockSStencil
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -631,9 +631,9 @@
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(4);
-            this.Name = "Make_SMTStockStencil";
-            this.Tag = "Make!SMTStencil";
-            this.Text = "Make_SMTStencil";
+            this.Name = "Make_SMTStockSStencil";
+            this.Tag = "Make!SMTSStockStencil";
+            this.Text = "Make_SMTSStockStencil";
             this.Load += new System.EventHandler(this.Make_SMTStencil_Load);
             this.SizeChanged += new System.EventHandler(this.Make_SMTStencil_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ToolsBom)).EndInit();
@@ -665,14 +665,6 @@
         private CustomControl.ButtonUtil.NormalButton Scrap;
         private CustomControl.ButtonUtil.NormalButton Return;
         private CustomControl.ButtonUtil.NormalButton Receive;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_stcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn st_pcbcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_status;
-        private System.Windows.Forms.DataGridViewTextBoxColumn SU_LINECODE;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_stverison;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_singlepringqty;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_table;
-        private System.Windows.Forms.DataGridViewTextBoxColumn su_usemacode;
         private System.Windows.Forms.CheckBox SU_RETURNIFCLEAN;
         private System.Windows.Forms.Label ma_prodcode_label;
         private System.Windows.Forms.Label ma_qty;
@@ -682,5 +674,13 @@
         private System.Windows.Forms.Label ms_makecode_label;
         private System.Windows.Forms.Label st_usecount;
         private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_stcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_pcbcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_status;
+        private System.Windows.Forms.DataGridViewTextBoxColumn SU_LINECODE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_stverison;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_singlepringqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_table;
+        private System.Windows.Forms.DataGridViewTextBoxColumn su_usemacode;
     }
 }

+ 21 - 21
UAS_MES_WEIP/FunctionCode/Make/Make_SMTStockSStencil.cs

@@ -73,7 +73,7 @@ namespace UAS_MES_NEW.Make
         {
             sql.Clear();
             sql.Append("select St_PCBCODE,su_stcode,su_table,su_status,su_linecode,su_usemacode,su_singlepringqty,su_stverison ");
-            sql.Append("from StencilUse left join stencil on st_code=su_stcode where su_usemacode='" + ma_code.Text + "' and su_status='在线'");
+            sql.Append("from StencilUse left join stencil on st_code=su_stcode where su_usemacode='" + ma_code.Text + "' and su_status='在线' and st_kind = '刮刀'");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             BaseUtil.FillDgvWithDataTable(ToolsBom, dt);
         }
@@ -85,7 +85,7 @@ namespace UAS_MES_NEW.Make
 
         private void Receive_Click(object sender, EventArgs e)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,nvl(st_maxusecount,0)st_maxusecount,nvl(st_usecount,0)st_usecount from Stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED'", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,nvl(st_maxusecount,0)st_maxusecount,nvl(st_usecount,0)st_usecount from Stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀'", "select");
             int WaringCount = int.Parse(dh.GetConfig("WaringCount", "Stencil").ToString());
             int st_maxusecount = 0;
             int st_usecount = 0;
@@ -96,19 +96,19 @@ namespace UAS_MES_NEW.Make
                 st_usecount = int.Parse(dt.Rows[0]["st_usecount"].ToString());
                 if (status == "借出" || status == "报废" || status == "在线")
                 {
-                    MessageBox.Show("当前钢网" + SU_DEVCODE.Text + "处于" + status + "状态,无法领用");
+                    MessageBox.Show("当前刮刀" + SU_DEVCODE.Text + "处于" + status + "状态,无法领用");
                     return;
                 }
             }
             else
             {
-                MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "不存在或者未审核");
+                MessageBox.Show("刮刀编号" + SU_DEVCODE.Text + "不存在或者未审核");
                 return;
             }
             //使用次数预警
             if (st_maxusecount - st_usecount < WaringCount)
             {
-                string close = MessageBox.Show(this.ParentForm, "钢网已使用" + st_usecount + ",距离使用上限还有" + (st_maxusecount - st_usecount) + "次", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                string close = MessageBox.Show(this.ParentForm, "刮刀已使用" + st_usecount + ",距离使用上限还有" + (st_maxusecount - st_usecount) + "次", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (close != "Yes")
                 {
                     return;
@@ -131,29 +131,29 @@ namespace UAS_MES_NEW.Make
         {
 
 
-                    DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,nvl(St_USECOUNT,0)St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                    DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,nvl(St_USECOUNT,0)St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀'", "select");
                     if (dt.Rows.Count > 0)
                     {
                         string status = dt.Rows[0]["ST_USESTATUS"].ToString();
                         if (status == "在线")
                         {
-                            MessageBox.Show("当前钢网" + SU_DEVCODE1.Text + "处于在线状态,无法退回");
+                            MessageBox.Show("当前刮刀" + SU_DEVCODE1.Text + "处于在线状态,无法退回");
                             return;
                         }
                         if (status == "在仓")
                         {
-                            MessageBox.Show("当前钢网" + SU_DEVCODE1.Text + "未借出,无需归还");
+                            MessageBox.Show("当前刮刀" + SU_DEVCODE1.Text + "未借出,无需归还");
                             return;
                         }
                         if (status == "报废")
                         {
-                            MessageBox.Show("当前钢网" + SU_DEVCODE1.Text + "处于" + status + "状态,无法退回");
+                            MessageBox.Show("当前刮刀" + SU_DEVCODE1.Text + "处于" + status + "状态,无法退回");
                             return;
                         }
                     }
                     else
                     {
-                        MessageBox.Show("钢网编号" + SU_DEVCODE1.Text + "不存在或者未审核");
+                        MessageBox.Show("刮刀编号" + SU_DEVCODE1.Text + "不存在或者未审核");
                         return;
                     }
                     sql.Clear();
@@ -166,7 +166,7 @@ namespace UAS_MES_NEW.Make
                     sql.Append("  ");
                     sql.Append("where st_code='" + SU_DEVCODE1.Text + "'");
                     dh.ExecuteSql(sql.ToString(), "update");
-                    MessageBox.Show("钢网" + SU_DEVCODE1.Text + "退回成功!");
+                    MessageBox.Show("刮刀" + SU_DEVCODE1.Text + "退回成功!");
                     SU_DEVCODE1.Text = "";
                     ST_ENSIONA.Text = "";
                     ST_ENSIONB.Text = "";
@@ -180,17 +180,17 @@ namespace UAS_MES_NEW.Make
         Make_StencilScrapReason form;
         private void Scrap_Click(object sender, EventArgs e)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_status from stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_status from stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀'", "select");
             if (dt.Rows.Count > 0)
             {
                 if (dt.Rows[0]["st_usestatus"].ToString() == "报废")
                 {
-                    MessageBox.Show("钢网" + SU_DEVCODE1.Text + "已处于报废状态");
+                    MessageBox.Show("刮刀" + SU_DEVCODE1.Text + "已处于报废状态");
                     return;
                 }
                 if (dt.Rows[0]["st_usestatus"].ToString() != "借出")
                 {
-                    MessageBox.Show("报废钢网必须" + SU_DEVCODE1.Text + "处于借出状态");
+                    MessageBox.Show("报废刮刀必须" + SU_DEVCODE1.Text + "处于借出状态");
                     return;
                 }
                 string closetab_confirm = MessageBox.Show(this.ParentForm, "报废后不可撤销,是否确认报废", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
@@ -205,7 +205,7 @@ namespace UAS_MES_NEW.Make
             }
             else
             {
-                MessageBox.Show("钢网编号" + SU_DEVCODE1.Text + "不存在或者未审核");
+                MessageBox.Show("刮刀编号" + SU_DEVCODE1.Text + "不存在或者未审核");
             }
         }
 
@@ -232,7 +232,7 @@ namespace UAS_MES_NEW.Make
             //for (int i = 0; i < emid.Length; i++)
             //{
             //    string em_name = dh.getFieldDataByCondition("employee", "em_name", "em_id='" + emid[i] + "'").ToString();
-            //   // LogicHandler.SendMessage(emid[i], em_name, "钢网" + SU_DEVCODE1.Text + "已报废" + ",原因" + scrapreason + ",人员" + User.UserName);
+            //   // LogicHandler.SendMessage(emid[i], em_name, "刮刀" + SU_DEVCODE1.Text + "已报废" + ",原因" + scrapreason + ",人员" + User.UserName);
             //}
             form.Close();
             SU_DEVCODE1.Text = "";
@@ -341,17 +341,17 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_table from stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_table from stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀'", "select");
                 if (dt.Rows.Count == 0)
                 {
-                    MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "不存在或者未审核");
+                    MessageBox.Show("刮刀编号" + SU_DEVCODE.Text + "不存在或者未审核");
                 }
                 if (dt.Rows.Count > 0)
                 {
                     Receive.Enabled = true;
                     if (dt.Rows[0]["st_usestatus"].ToString() == "报废")
                     {
-                        MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "已报废");
+                        MessageBox.Show("刮刀编号" + SU_DEVCODE.Text + "已报废");
                     }
                 }
             }
@@ -361,10 +361,10 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(st_usecount,0)st_usecount,case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(st_usecount,0)st_usecount,case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '刮刀'", "select");
                 if (dt.Rows.Count == 0)
                 {
-                    MessageBox.Show("钢网编号" + SU_DEVCODE1.Text + "不存在或者未审核");
+                    MessageBox.Show("刮刀编号" + SU_DEVCODE1.Text + "不存在或者未审核");
                 }
                 else
                 {

+ 25 - 25
UAS_MES_WEIP/FunctionCode/Make/Make_SMTStockStencil.Designer.cs

@@ -44,6 +44,8 @@
             this.ma_qty = new System.Windows.Forms.Label();
             this.ma_qty_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.st_usecount = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
             this.Receive = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.Return = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.Scrap = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
@@ -66,8 +68,6 @@
             this.Confirm = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ma_prodcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
-            this.st_usecount = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.ToolsBom)).BeginInit();
             this.SuspendLayout();
             // 
@@ -250,6 +250,27 @@
             this.ms_makecode_label.TabIndex = 68;
             this.ms_makecode_label.Text = "归属工单";
             // 
+            // st_usecount
+            // 
+            this.st_usecount.AutoSize = true;
+            this.st_usecount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.st_usecount.Location = new System.Drawing.Point(714, 692);
+            this.st_usecount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.st_usecount.Name = "st_usecount";
+            this.st_usecount.Size = new System.Drawing.Size(0, 31);
+            this.st_usecount.TabIndex = 112;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(536, 690);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(158, 31);
+            this.label2.TabIndex = 111;
+            this.label2.Text = "累计使用次数";
+            // 
             // Receive
             // 
             this.Receive.AllPower = null;
@@ -572,27 +593,6 @@
             this.ma_code.TextBoxEnable = true;
             this.ma_code.TextKeyDown += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextKeyDown(this.ma_code_TextKeyDown);
             // 
-            // st_usecount
-            // 
-            this.st_usecount.AutoSize = true;
-            this.st_usecount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.st_usecount.Location = new System.Drawing.Point(714, 692);
-            this.st_usecount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.st_usecount.Name = "st_usecount";
-            this.st_usecount.Size = new System.Drawing.Size(0, 31);
-            this.st_usecount.TabIndex = 112;
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(536, 690);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(158, 31);
-            this.label2.TabIndex = 111;
-            this.label2.Text = "累计使用次数";
-            // 
             // Make_SMTStockStencil
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
@@ -632,8 +632,8 @@
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_SMTStockStencil";
-            this.Tag = "Make!SMTStencil";
-            this.Text = "Make_SMTStencil";
+            this.Tag = "Make!SMTStockStencil";
+            this.Text = "Make_SMTStockStencil";
             this.Load += new System.EventHandler(this.Make_SMTStencil_Load);
             this.SizeChanged += new System.EventHandler(this.Make_SMTStencil_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ToolsBom)).EndInit();

+ 6 - 6
UAS_MES_WEIP/FunctionCode/Make/Make_SMTStockStencil.cs

@@ -73,7 +73,7 @@ namespace UAS_MES_NEW.Make
         {
             sql.Clear();
             sql.Append("select St_PCBCODE,su_stcode,su_table,su_status,su_linecode,su_usemacode,su_singlepringqty,su_stverison ");
-            sql.Append("from StencilUse left join stencil on st_code=su_stcode where su_usemacode='" + ma_code.Text + "' and su_status='在线'");
+            sql.Append("from StencilUse left join stencil on st_code=su_stcode where su_usemacode='" + ma_code.Text + "' and su_status='在线' and st_kind = '钢网'");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             BaseUtil.FillDgvWithDataTable(ToolsBom, dt);
         }
@@ -85,7 +85,7 @@ namespace UAS_MES_NEW.Make
 
         private void Receive_Click(object sender, EventArgs e)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,nvl(st_maxusecount,0)st_maxusecount,nvl(st_usecount,0)st_usecount from Stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED'", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,nvl(st_maxusecount,0)st_maxusecount,nvl(st_usecount,0)st_usecount from Stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED' and st_kind = '钢网'", "select");
             int WaringCount = int.Parse(dh.GetConfig("WaringCount", "Stencil").ToString());
             int st_maxusecount = 0;
             int st_usecount = 0;
@@ -131,7 +131,7 @@ namespace UAS_MES_NEW.Make
         {
 
 
-                    DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,nvl(St_USECOUNT,0)St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                    DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,nvl(St_USECOUNT,0)St_USECOUNT from Stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '钢网'", "select");
                     if (dt.Rows.Count > 0)
                     {
                         string status = dt.Rows[0]["ST_USESTATUS"].ToString();
@@ -180,7 +180,7 @@ namespace UAS_MES_NEW.Make
         Make_StencilScrapReason form;
         private void Scrap_Click(object sender, EventArgs e)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_status from stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_status from stencil where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '钢网'", "select");
             if (dt.Rows.Count > 0)
             {
                 if (dt.Rows[0]["st_usestatus"].ToString() == "报废")
@@ -341,7 +341,7 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_table from stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select st_usestatus,st_table from stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED' and st_kind = '钢网'", "select");
                 if (dt.Rows.Count == 0)
                 {
                     MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "不存在或者未审核");
@@ -361,7 +361,7 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(st_usecount,0)st_usecount,case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(st_usecount,0)st_usecount,case when nvl(ST_COMBINENUMBER,1)=0 then 1 else nvl(ST_COMBINENUMBER,1) end from STENCIL where st_code='" + SU_DEVCODE1.Text + "' and st_statuscode='AUDITED' and st_kind = '钢网'", "select");
                 if (dt.Rows.Count == 0)
                 {
                     MessageBox.Show("钢网编号" + SU_DEVCODE1.Text + "不存在或者未审核");

+ 0 - 24
UAS_MES_WEIP/FunctionCode/Make/Make_SMTStockStencil.resx

@@ -256,30 +256,6 @@
   <metadata name="su_usemacode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="su_stcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="st_pcbcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="su_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SU_LINECODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="su_stverison.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="su_singlepringqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="su_table.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="su_usemacode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <data name="Confirm.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 210 - 199
UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -72,6 +72,19 @@
             this.FolderPath = new System.Windows.Forms.TextBox();
             this.label8 = new System.Windows.Forms.Label();
             this.XmlWatcher = new System.IO.FileSystemWatcher();
+            this.label7 = new System.Windows.Forms.Label();
+            this.ob_checkno = new System.Windows.Forms.Label();
+            this.ob_batchqty_label = new System.Windows.Forms.Label();
+            this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
+            this.mc_restqty_label = new System.Windows.Forms.Label();
+            this.mcd_inqty_label = new System.Windows.Forms.Label();
+            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.normalButton2 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.oneget = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.Filter = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
@@ -90,19 +103,6 @@
             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.normalButton2 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.label7 = new System.Windows.Forms.Label();
-            this.ob_checkno = new System.Windows.Forms.Label();
-            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.ob_batchqty_label = new System.Windows.Forms.Label();
-            this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
-            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mc_restqty_label = new System.Windows.Forms.Label();
-            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_inqty_label = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).BeginInit();
             this.SuspendLayout();
@@ -111,13 +111,12 @@
             // 
             this.bc_remark_label.AutoSize = true;
             this.bc_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_remark_label.Location = new System.Drawing.Point(684, 386);
+            this.bc_remark_label.Location = new System.Drawing.Point(4, 350);
             this.bc_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_remark_label.Name = "bc_remark_label";
             this.bc_remark_label.Size = new System.Drawing.Size(110, 31);
             this.bc_remark_label.TabIndex = 25;
-            this.bc_remark_label.Text = "不良备注";
-            this.bc_remark_label.Visible = false;
+            this.bc_remark_label.Text = "不良位号";
             // 
             // ms_sncode_label
             // 
@@ -157,7 +156,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(4, 332);
+            this.label3.Location = new System.Drawing.Point(4, 309);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(110, 31);
@@ -169,7 +168,7 @@
             this.GoodProduct.AutoSize = true;
             this.GoodProduct.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GoodProduct.ForeColor = System.Drawing.Color.Blue;
-            this.GoodProduct.Location = new System.Drawing.Point(9, 742);
+            this.GoodProduct.Location = new System.Drawing.Point(10, 738);
             this.GoodProduct.Margin = new System.Windows.Forms.Padding(4);
             this.GoodProduct.Name = "GoodProduct";
             this.GoodProduct.Size = new System.Drawing.Size(100, 42);
@@ -183,7 +182,7 @@
             // 
             this.Reject.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Reject.ForeColor = System.Drawing.Color.Red;
-            this.Reject.Location = new System.Drawing.Point(132, 742);
+            this.Reject.Location = new System.Drawing.Point(132, 738);
             this.Reject.Margin = new System.Windows.Forms.Padding(4);
             this.Reject.Name = "Reject";
             this.Reject.Size = new System.Drawing.Size(130, 44);
@@ -401,6 +400,11 @@
             this.NoteForChange.Text = "切换工单提示";
             this.NoteForChange.UseVisualStyleBackColor = true;
             // 
+            // ControlLockTimer
+            // 
+            this.ControlLockTimer.Interval = 20000;
+            this.ControlLockTimer.Tick += new System.EventHandler(this.ControlLockTimer_Tick_1);
+            // 
             // Lock_label
             // 
             this.Lock_label.AutoSize = true;
@@ -519,6 +523,189 @@
             this.XmlWatcher.SynchronizingObject = this;
             this.XmlWatcher.Changed += new System.IO.FileSystemEventHandler(this.XmlWatcher_Changed);
             // 
+            // 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.ForeColor = System.Drawing.Color.Black;
+            this.label7.Location = new System.Drawing.Point(848, 140);
+            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(110, 31);
+            this.label7.TabIndex = 240;
+            this.label7.Text = "已送检数";
+            this.label7.Visible = false;
+            // 
+            // ob_checkno
+            // 
+            this.ob_checkno.AutoSize = true;
+            this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_checkno.ForeColor = System.Drawing.Color.Black;
+            this.ob_checkno.Location = new System.Drawing.Point(1252, 139);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_checkno.Name = "ob_checkno";
+            this.ob_checkno.Size = new System.Drawing.Size(0, 31);
+            this.ob_checkno.TabIndex = 239;
+            this.ob_checkno.Tag = "ob_checkno";
+            this.ob_checkno.Visible = false;
+            // 
+            // ob_batchqty_label
+            // 
+            this.ob_batchqty_label.AutoSize = true;
+            this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_batchqty_label.ForeColor = System.Drawing.Color.Black;
+            this.ob_batchqty_label.Location = new System.Drawing.Point(848, 80);
+            this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_batchqty_label.Name = "ob_batchqty_label";
+            this.ob_batchqty_label.Size = new System.Drawing.Size(110, 31);
+            this.ob_batchqty_label.TabIndex = 237;
+            this.ob_batchqty_label.Text = "抽检批数";
+            this.ob_batchqty_label.Visible = false;
+            // 
+            // ob_nowcheckqty_label
+            // 
+            this.ob_nowcheckqty_label.AutoSize = true;
+            this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_nowcheckqty_label.ForeColor = System.Drawing.Color.Black;
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(1060, 80);
+            this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
+            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(110, 31);
+            this.ob_nowcheckqty_label.TabIndex = 235;
+            this.ob_nowcheckqty_label.Text = "当前批数";
+            this.ob_nowcheckqty_label.Visible = false;
+            // 
+            // mc_restqty_label
+            // 
+            this.mc_restqty_label.AutoSize = true;
+            this.mc_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mc_restqty_label.Location = new System.Drawing.Point(848, 22);
+            this.mc_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mc_restqty_label.Name = "mc_restqty_label";
+            this.mc_restqty_label.Size = new System.Drawing.Size(110, 31);
+            this.mc_restqty_label.TabIndex = 231;
+            this.mc_restqty_label.Text = "良品采集";
+            // 
+            // mcd_inqty_label
+            // 
+            this.mcd_inqty_label.AutoSize = true;
+            this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty_label.Location = new System.Drawing.Point(1060, 22);
+            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_inqty_label.Name = "mcd_inqty_label";
+            this.mcd_inqty_label.Size = new System.Drawing.Size(110, 31);
+            this.mcd_inqty_label.TabIndex = 230;
+            this.mcd_inqty_label.Text = "总采集数";
+            // 
+            // ob_sendqty
+            // 
+            this.ob_sendqty.AutoSize = true;
+            this.ob_sendqty.CutLength = null;
+            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_sendqty.Location = new System.Drawing.Point(988, 140);
+            this.ob_sendqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_sendqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ob_sendqty.Name = "ob_sendqty";
+            this.ob_sendqty.Size = new System.Drawing.Size(0, 31);
+            this.ob_sendqty.TabIndex = 241;
+            this.ob_sendqty.Tag = "ob_batchqty";
+            this.ob_sendqty.Visible = false;
+            // 
+            // SendCheck
+            // 
+            this.SendCheck.AllPower = null;
+            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
+            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
+            this.SendCheck.Enabled = false;
+            this.SendCheck.Image = null;
+            this.SendCheck.IsShowBorder = true;
+            this.SendCheck.Location = new System.Drawing.Point(1168, 139);
+            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
+            this.SendCheck.Name = "SendCheck";
+            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
+            this.SendCheck.Power = null;
+            this.SendCheck.Size = new System.Drawing.Size(98, 39);
+            this.SendCheck.TabIndex = 234;
+            this.SendCheck.Text = "送检";
+            this.SendCheck.UseVisualStyleBackColor = false;
+            this.SendCheck.Visible = false;
+            // 
+            // ob_batchqty
+            // 
+            this.ob_batchqty.AutoSize = true;
+            this.ob_batchqty.CutLength = null;
+            this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_batchqty.Location = new System.Drawing.Point(988, 80);
+            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_batchqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ob_batchqty.Name = "ob_batchqty";
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 31);
+            this.ob_batchqty.TabIndex = 238;
+            this.ob_batchqty.Tag = "ob_batchqty";
+            this.ob_batchqty.Visible = false;
+            // 
+            // ob_nowcheckqty
+            // 
+            this.ob_nowcheckqty.AutoSize = true;
+            this.ob_nowcheckqty.CutLength = null;
+            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(1196, 80);
+            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 31);
+            this.ob_nowcheckqty.TabIndex = 236;
+            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
+            this.ob_nowcheckqty.Visible = false;
+            // 
+            // mcd_remainqty
+            // 
+            this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.CutLength = null;
+            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty.Location = new System.Drawing.Point(988, 22);
+            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 31);
+            this.mcd_remainqty.TabIndex = 233;
+            this.mcd_remainqty.Tag = "mcd_remainqty";
+            // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.CutLength = null;
+            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty.Location = new System.Drawing.Point(1196, 22);
+            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";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 31);
+            this.mcd_inqty.TabIndex = 232;
+            this.mcd_inqty.Tag = "mcd_inqty";
+            // 
+            // 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 = null;
+            this.normalButton2.IsShowBorder = true;
+            this.normalButton2.Location = new System.Drawing.Point(140, 219);
+            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(160, 42);
+            this.normalButton2.TabIndex = 229;
+            this.normalButton2.Text = "站位条码剩余";
+            this.normalButton2.UseVisualStyleBackColor = false;
+            this.normalButton2.Click += new System.EventHandler(this.normalButton2_Click);
+            // 
             // oneget
             // 
             this.oneget.AutoSize = true;
@@ -589,7 +776,7 @@
             this.bc_code.BackColor = System.Drawing.Color.White;
             this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_code.ID = null;
-            this.bc_code.Location = new System.Drawing.Point(141, 332);
+            this.bc_code.Location = new System.Drawing.Point(141, 309);
             this.bc_code.Margin = new System.Windows.Forms.Padding(4);
             this.bc_code.Name = "bc_code";
             this.bc_code.Power = null;
@@ -726,17 +913,17 @@
             this.bc_remark.AllPower = null;
             this.bc_remark.BackColor = System.Drawing.Color.White;
             this.bc_remark.ID = null;
-            this.bc_remark.Location = new System.Drawing.Point(842, 392);
+            this.bc_remark.Location = new System.Drawing.Point(140, 351);
             this.bc_remark.Margin = new System.Windows.Forms.Padding(4);
             this.bc_remark.Multiline = true;
             this.bc_remark.Name = "bc_remark";
             this.bc_remark.Power = null;
-            this.bc_remark.Size = new System.Drawing.Size(98, 13);
+            this.bc_remark.Size = new System.Drawing.Size(264, 30);
             this.bc_remark.Str = null;
             this.bc_remark.Str1 = null;
             this.bc_remark.Str2 = null;
             this.bc_remark.TabIndex = 41;
-            this.bc_remark.Visible = false;
+            this.bc_remark.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bc_remark_KeyDown);
             // 
             // bc_groupcode
             // 
@@ -767,182 +954,6 @@
             this.ms_sncode.Tag = "IfRead";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown_one);
             // 
-            // 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 = null;
-            this.normalButton2.IsShowBorder = true;
-            this.normalButton2.Location = new System.Drawing.Point(140, 219);
-            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(160, 42);
-            this.normalButton2.TabIndex = 229;
-            this.normalButton2.Text = "站位条码剩余";
-            this.normalButton2.UseVisualStyleBackColor = false;
-            this.normalButton2.Click += new System.EventHandler(this.normalButton2_Click);
-            // 
-            // ob_sendqty
-            // 
-            this.ob_sendqty.AutoSize = true;
-            this.ob_sendqty.CutLength = null;
-            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_sendqty.Location = new System.Drawing.Point(988, 140);
-            this.ob_sendqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_sendqty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.ob_sendqty.Name = "ob_sendqty";
-            this.ob_sendqty.Size = new System.Drawing.Size(0, 31);
-            this.ob_sendqty.TabIndex = 241;
-            this.ob_sendqty.Tag = "ob_batchqty";
-            // 
-            // 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.ForeColor = System.Drawing.Color.Black;
-            this.label7.Location = new System.Drawing.Point(848, 140);
-            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(110, 31);
-            this.label7.TabIndex = 240;
-            this.label7.Text = "已送检数";
-            // 
-            // ob_checkno
-            // 
-            this.ob_checkno.AutoSize = true;
-            this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno.ForeColor = System.Drawing.Color.Black;
-            this.ob_checkno.Location = new System.Drawing.Point(1252, 139);
-            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_checkno.Name = "ob_checkno";
-            this.ob_checkno.Size = new System.Drawing.Size(0, 31);
-            this.ob_checkno.TabIndex = 239;
-            this.ob_checkno.Tag = "ob_checkno";
-            this.ob_checkno.Visible = false;
-            // 
-            // SendCheck
-            // 
-            this.SendCheck.AllPower = null;
-            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
-            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
-            this.SendCheck.Enabled = false;
-            this.SendCheck.Image = null;
-            this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(1168, 139);
-            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
-            this.SendCheck.Name = "SendCheck";
-            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
-            this.SendCheck.Power = null;
-            this.SendCheck.Size = new System.Drawing.Size(98, 39);
-            this.SendCheck.TabIndex = 234;
-            this.SendCheck.Text = "送检";
-            this.SendCheck.UseVisualStyleBackColor = false;
-            // 
-            // ob_batchqty
-            // 
-            this.ob_batchqty.AutoSize = true;
-            this.ob_batchqty.CutLength = null;
-            this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_batchqty.Location = new System.Drawing.Point(988, 80);
-            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_batchqty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.ob_batchqty.Name = "ob_batchqty";
-            this.ob_batchqty.Size = new System.Drawing.Size(0, 31);
-            this.ob_batchqty.TabIndex = 238;
-            this.ob_batchqty.Tag = "ob_batchqty";
-            // 
-            // ob_batchqty_label
-            // 
-            this.ob_batchqty_label.AutoSize = true;
-            this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.ForeColor = System.Drawing.Color.Black;
-            this.ob_batchqty_label.Location = new System.Drawing.Point(848, 80);
-            this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_batchqty_label.Name = "ob_batchqty_label";
-            this.ob_batchqty_label.Size = new System.Drawing.Size(110, 31);
-            this.ob_batchqty_label.TabIndex = 237;
-            this.ob_batchqty_label.Text = "抽检批数";
-            // 
-            // ob_nowcheckqty
-            // 
-            this.ob_nowcheckqty.AutoSize = true;
-            this.ob_nowcheckqty.CutLength = null;
-            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(1196, 80);
-            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 31);
-            this.ob_nowcheckqty.TabIndex = 236;
-            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
-            // 
-            // ob_nowcheckqty_label
-            // 
-            this.ob_nowcheckqty_label.AutoSize = true;
-            this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty_label.ForeColor = System.Drawing.Color.Black;
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(1060, 80);
-            this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
-            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(110, 31);
-            this.ob_nowcheckqty_label.TabIndex = 235;
-            this.ob_nowcheckqty_label.Text = "当前批数";
-            // 
-            // mcd_remainqty
-            // 
-            this.mcd_remainqty.AutoSize = true;
-            this.mcd_remainqty.CutLength = null;
-            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(988, 22);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 31);
-            this.mcd_remainqty.TabIndex = 233;
-            this.mcd_remainqty.Tag = "mcd_remainqty";
-            // 
-            // mc_restqty_label
-            // 
-            this.mc_restqty_label.AutoSize = true;
-            this.mc_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mc_restqty_label.Location = new System.Drawing.Point(848, 22);
-            this.mc_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mc_restqty_label.Name = "mc_restqty_label";
-            this.mc_restqty_label.Size = new System.Drawing.Size(110, 31);
-            this.mc_restqty_label.TabIndex = 231;
-            this.mc_restqty_label.Text = "良品采集";
-            // 
-            // mcd_inqty
-            // 
-            this.mcd_inqty.AutoSize = true;
-            this.mcd_inqty.CutLength = null;
-            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(1196, 22);
-            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";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 31);
-            this.mcd_inqty.TabIndex = 232;
-            this.mcd_inqty.Tag = "mcd_inqty";
-            // 
-            // mcd_inqty_label
-            // 
-            this.mcd_inqty_label.AutoSize = true;
-            this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty_label.Location = new System.Drawing.Point(1060, 22);
-            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_inqty_label.Name = "mcd_inqty_label";
-            this.mcd_inqty_label.Size = new System.Drawing.Size(110, 31);
-            this.mcd_inqty_label.TabIndex = 230;
-            this.mcd_inqty_label.Text = "总采集数";
-            // 
             // Make_TestCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);

+ 50 - 30
UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.cs

@@ -69,8 +69,9 @@ namespace UAS_MES_NEW.Make
             //设置锁定工单
             LockMakeCode.GetMakeCodeCtl(ma_code);
             ma_code.SetLockCheckBox(LockMakeCode);
-            ControlLockTimer.Tick += ControlLockTimer_Tick;
-            ControlLockTimer.Interval = 100;
+            //ControlLockTimer.Tick += ControlLockTimer_Tick;
+            ControlLockTimer.Interval = 20000;
+            ControlLockTimer.Enabled = true;
             SMTBind.Checked = Settings.Default.SMTBIND;
             Control.CheckForIllegalCrossThreadCalls = false;
             FolderPath.Text = BaseUtil.GetCacheData("FolderPath").ToString();
@@ -98,8 +99,8 @@ namespace UAS_MES_NEW.Make
 
         private void ControlLockTimer_Tick(object sender, EventArgs e)
         {
-            this.Activate();
-            ms_sncode.Focus();
+            //this.Activate();
+            //ms_sncode.Focus();
         }
 
         private void Ma_code_DbChange(object sender, EventArgs e)
@@ -147,12 +148,12 @@ namespace UAS_MES_NEW.Make
         /// <param name="e"></param>
         private void ChooseedReject_Click(object sender, EventArgs e)
         {
-            if (ms_sncode.Text == "")
-            {
-                OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
-                ms_sncode.Focus();
-                return;
-            }
+            //if (ms_sncode.Text == "")
+            //{
+            //    OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
+            //    ms_sncode.Focus();
+            //    return;
+            //}
             int CheckedNum = 0;
             //是否已经添加到不良
             bool AddToReject = false;
@@ -195,9 +196,6 @@ namespace UAS_MES_NEW.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                ChoosedRejectList.Items.Clear();
-                WaitList.Clear();
-                ChoosedList.Clear();
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
                     bool NoteAlready = LogicHandler.CheckDiffMakeCodeBeforeStepCheck(ms_sncode.Text, ma_code.Text, NoteForChange.Checked, out oMakeCode, out ErrorMessage);
@@ -350,10 +348,10 @@ namespace UAS_MES_NEW.Make
             //如果勾选的是不良品
             if (Reject.Checked)
             {
-                LoadBadCodeListView();
-                LoadChoosedBadListView();
-                OperateResult.AppendText(">>请采集不良代码\n", Color.Green);
-                bc_code.Focus();
+                //LoadBadCodeListView();
+                //LoadChoosedBadListView();
+                //OperateResult.AppendText(">>请采集不良代码\n", Color.Green);
+                //bc_code.Focus();
                 ////勾选了自动产生代码
                 //if (AutoBadCode.Checked)
                 //    Save_Click(new object(), new EventArgs());
@@ -462,7 +460,7 @@ namespace UAS_MES_NEW.Make
                     }
                     //不良信息采集,mb_status<>0的是之前维修保存的,不能删除
                     dh.ExecuteSql("delete from makebad where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and nvl(mb_status,0)=0", "delete");
-                    if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserCode, User.UserSourceCode, "检查未通过", out ErrorMessage))
+                    if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserCode, User.UserSourceCode, "检查未通过", bgcode, bccode, bgname, bcname, bcremark, out ErrorMessage))
                     {
                         ////存在的不良代码和
                         //dt = (DataTable)dh.ExecuteSql("select sr_badcode from STEPRETURN where sr_stepcode='" + User.CurrentStepCode + "'", "select");
@@ -492,18 +490,19 @@ namespace UAS_MES_NEW.Make
                         //    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.Red);
                         LastSncode = ms_sncode.Text;
                         //采集完不良,聚焦序列号
-                        ms_sncode.Focus();
-                        //记录操作日志
                         ms_sncode.Text = "";
                         //清除不良信息
                         bc_code.Text = "";
+                        bc_remark.Text = "";
                         ChoosedRejectList.Items.Clear();
                         LoadCollectedNum();
                         WaitList.Clear();
                         ChoosedList.Clear();
+                        bc_code.Focus();
+
                     }
                     else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                 }
@@ -604,8 +603,10 @@ namespace UAS_MES_NEW.Make
         {
             dt = (DataTable)dh.ExecuteSql("select 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) mcd_inqty,(select nvl(count(distinct sp_sncode),0) from STEPPASSED where SP_MAKECODE = mcd_macode AND SP_STEPCODE = mcd_stepcode)-nvl(count(distinct B.ms_sncode),0) mcd_remainqty from MAKECRAFTdetail 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 = '"+ ma_code.Text + "' and mcd_stepcode  =  '"+ User.CurrentStepCode + "' group by mcd_macode,mcd_detno, mcd_stepcode, mcd_stepname order by mcd_detno asc", "select");
 
-
-            BaseUtil.SetFormValue(Controls, dt);
+            if (dt != null)
+            {
+                BaseUtil.SetFormValue(Controls, dt);
+            }
         }
 
         private void Save_Click(object sender, EventArgs e)
@@ -742,20 +743,22 @@ namespace UAS_MES_NEW.Make
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "快速维修成功", "快速维修", "", ob_checkno.Text);
                             OperateResult.AppendText(">>本次采集不良代码" + badname + "存在于本工序" + User.CurrentStepCode + "中,请解除故障后重新测试本站\n", Color.Black);
                         }
-                        else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                        else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Red);
                     }
-                    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Red);
                     LastSncode = ms_sncode.Text;
                     //采集完不良,聚焦序列号
-                    ms_sncode.Focus();
+                    //ms_sncode.Focus();
                     //记录操作日志
                     ms_sncode.Text = "";
                     //清除不良信息
                     bc_code.Text = "";
+                    bc_remark.Text = "";
                     ChoosedRejectList.Items.Clear();
                     LoadCollectedNum();
                     WaitList.Clear();
                     ChoosedList.Clear();
+                    bc_code.Focus();
                 }
                 else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
             }
@@ -785,6 +788,7 @@ namespace UAS_MES_NEW.Make
                         lvi.SubItems.Add(dt.Rows[0][j].ToString());
                     ChoosedRejectList.Items.Add(lvi);
                     bc_code.Clear();
+                    bc_remark.Focus();
                 }
                 else OperateResult.AppendText(">>" + bc_code.Text + "不良代码不存在\n", Color.Red, bc_code);
             }
@@ -853,6 +857,10 @@ namespace UAS_MES_NEW.Make
                 WaitReject.Enabled = false;
                 ChooseedReject.Enabled = false;
                 Save.Visible = false;
+                if (ms_sncode.Text == "")
+                {
+                    ms_sncode.Focus();
+                }
             }
             else
             {
@@ -860,11 +868,9 @@ namespace UAS_MES_NEW.Make
                 WaitReject.Enabled = true;
                 ChooseedReject.Enabled = true;
                 Save.Visible = true;
+                bc_code.Focus();
             }
-            if (ms_sncode.Text == "")
-            {
-                ms_sncode.Focus();
-            }
+
         }
 
         private void SendCheck_Click(object sender, EventArgs e)
@@ -1190,5 +1196,19 @@ namespace UAS_MES_NEW.Make
             BaseUtil.SetFormCenter(badcode);
             badcode.ShowDialog();
         }
+
+        private void bc_remark_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                ms_sncode.Focus();
+                ms_sncode.SelectAll();
+            }
+        }
+
+        private void ControlLockTimer_Tick_1(object sender, EventArgs e)
+        {
+            LoadCollectedNum();
+        }
     }
 }

+ 1 - 1
UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.resx

@@ -300,7 +300,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B

+ 648 - 0
UAS_MES_WEIP/FunctionCode/Query/Query_BarcodeIn.Designer.cs

@@ -0,0 +1,648 @@
+namespace UAS_MES_NEW.Query
+{
+    partial class Query_BarcodeIn
+    {
+        /// <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(Query_BarcodeIn));
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.DGV = new System.Windows.Forms.DataGridView();
+            this.label1_lll_ = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn15 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn16 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn17 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn19 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn20 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.PrintBarCode = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.DeleteBarcode = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.barcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.GenProdiodetail = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.st_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.gl_location = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_location = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_thickness = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_usecount = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_maxusecount = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_vendcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_usestatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_pcbcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_combinenumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_table = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_ensiona = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_ensionb = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_ensionc = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_ensiond = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_ensione = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.DGV)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // DGV
+            // 
+            this.DGV.AllowUserToAddRows = false;
+            this.DGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.DGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.st_id,
+            this.choose,
+            this.gl_location,
+            this.st_code,
+            this.st_location,
+            this.st_name,
+            this.st_thickness,
+            this.st_usecount,
+            this.st_maxusecount,
+            this.st_vendcode,
+            this.st_usestatus,
+            this.st_pcbcode,
+            this.st_status,
+            this.st_combinenumber,
+            this.st_table,
+            this.st_ensiona,
+            this.st_ensionb,
+            this.st_ensionc,
+            this.st_ensiond,
+            this.st_ensione,
+            this.st_remark});
+            this.DGV.Location = new System.Drawing.Point(20, 94);
+            this.DGV.Margin = new System.Windows.Forms.Padding(2);
+            this.DGV.Name = "DGV";
+            this.DGV.RowHeadersWidth = 82;
+            this.DGV.RowTemplate.Height = 37;
+            this.DGV.Size = new System.Drawing.Size(1442, 694);
+            this.DGV.TabIndex = 218;
+            // 
+            // label1_lll_
+            // 
+            this.label1_lll_.AutoSize = true;
+            this.label1_lll_.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1_lll_.Location = new System.Drawing.Point(14, 9);
+            this.label1_lll_.Name = "label1_lll_";
+            this.label1_lll_.Size = new System.Drawing.Size(86, 31);
+            this.label1_lll_.TabIndex = 219;
+            this.label1_lll_.Text = "输入框";
+            this.label1_lll_.Visible = false;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(14, 56);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(86, 31);
+            this.label2.TabIndex = 230;
+            this.label2.Text = "打印机";
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "lm_id";
+            this.dataGridViewTextBoxColumn1.HeaderText = "ID";
+            this.dataGridViewTextBoxColumn1.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.Visible = false;
+            this.dataGridViewTextBoxColumn1.Width = 10;
+            // 
+            // dataGridViewCheckBoxColumn1
+            // 
+            this.dataGridViewCheckBoxColumn1.HeaderText = "勾选";
+            this.dataGridViewCheckBoxColumn1.MinimumWidth = 10;
+            this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1";
+            this.dataGridViewCheckBoxColumn1.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "lm_makecode";
+            this.dataGridViewTextBoxColumn2.HeaderText = "工单号";
+            this.dataGridViewTextBoxColumn2.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.ReadOnly = true;
+            this.dataGridViewTextBoxColumn2.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "lm_linecode";
+            this.dataGridViewTextBoxColumn3.HeaderText = "线别";
+            this.dataGridViewTextBoxColumn3.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.ReadOnly = true;
+            this.dataGridViewTextBoxColumn3.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "lm_uptime";
+            this.dataGridViewTextBoxColumn4.HeaderText = "上线时间";
+            this.dataGridViewTextBoxColumn4.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.ReadOnly = true;
+            this.dataGridViewTextBoxColumn4.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn5
+            // 
+            this.dataGridViewTextBoxColumn5.DataPropertyName = "lm_downtime";
+            this.dataGridViewTextBoxColumn5.HeaderText = "下线时间";
+            this.dataGridViewTextBoxColumn5.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.ReadOnly = true;
+            this.dataGridViewTextBoxColumn5.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn6
+            // 
+            this.dataGridViewTextBoxColumn6.DataPropertyName = "lm_inman";
+            this.dataGridViewTextBoxColumn6.HeaderText = "录入人";
+            this.dataGridViewTextBoxColumn6.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.ReadOnly = true;
+            this.dataGridViewTextBoxColumn6.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn7
+            // 
+            this.dataGridViewTextBoxColumn7.DataPropertyName = "lm_mannum";
+            this.dataGridViewTextBoxColumn7.HeaderText = "拉线人数";
+            this.dataGridViewTextBoxColumn7.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
+            this.dataGridViewTextBoxColumn7.ReadOnly = true;
+            this.dataGridViewTextBoxColumn7.Width = 200;
+            // 
+            // dataGridViewTextBoxColumn8
+            // 
+            this.dataGridViewTextBoxColumn8.DataPropertyName = "pr_detail";
+            this.dataGridViewTextBoxColumn8.HeaderText = "名称";
+            this.dataGridViewTextBoxColumn8.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
+            this.dataGridViewTextBoxColumn8.ReadOnly = true;
+            this.dataGridViewTextBoxColumn8.Width = 80;
+            // 
+            // dataGridViewTextBoxColumn9
+            // 
+            this.dataGridViewTextBoxColumn9.HeaderText = "客户编号";
+            this.dataGridViewTextBoxColumn9.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9";
+            this.dataGridViewTextBoxColumn9.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn10
+            // 
+            this.dataGridViewTextBoxColumn10.HeaderText = "领用状态";
+            this.dataGridViewTextBoxColumn10.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
+            this.dataGridViewTextBoxColumn10.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn11
+            // 
+            this.dataGridViewTextBoxColumn11.HeaderText = "厂商编号";
+            this.dataGridViewTextBoxColumn11.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11";
+            this.dataGridViewTextBoxColumn11.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn12
+            // 
+            this.dataGridViewTextBoxColumn12.HeaderText = "状态";
+            this.dataGridViewTextBoxColumn12.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn12.Name = "dataGridViewTextBoxColumn12";
+            this.dataGridViewTextBoxColumn12.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn13
+            // 
+            this.dataGridViewTextBoxColumn13.HeaderText = "拼版数";
+            this.dataGridViewTextBoxColumn13.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn13.Name = "dataGridViewTextBoxColumn13";
+            this.dataGridViewTextBoxColumn13.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn14
+            // 
+            this.dataGridViewTextBoxColumn14.HeaderText = "板面";
+            this.dataGridViewTextBoxColumn14.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn14.Name = "dataGridViewTextBoxColumn14";
+            this.dataGridViewTextBoxColumn14.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn15
+            // 
+            this.dataGridViewTextBoxColumn15.HeaderText = "张力A";
+            this.dataGridViewTextBoxColumn15.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn15.Name = "dataGridViewTextBoxColumn15";
+            this.dataGridViewTextBoxColumn15.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn16
+            // 
+            this.dataGridViewTextBoxColumn16.HeaderText = "张力B";
+            this.dataGridViewTextBoxColumn16.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn16.Name = "dataGridViewTextBoxColumn16";
+            this.dataGridViewTextBoxColumn16.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn17
+            // 
+            this.dataGridViewTextBoxColumn17.HeaderText = "张力C";
+            this.dataGridViewTextBoxColumn17.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn17.Name = "dataGridViewTextBoxColumn17";
+            this.dataGridViewTextBoxColumn17.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn18
+            // 
+            this.dataGridViewTextBoxColumn18.HeaderText = "张力D";
+            this.dataGridViewTextBoxColumn18.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn18.Name = "dataGridViewTextBoxColumn18";
+            this.dataGridViewTextBoxColumn18.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn19
+            // 
+            this.dataGridViewTextBoxColumn19.HeaderText = "张力E";
+            this.dataGridViewTextBoxColumn19.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn19.Name = "dataGridViewTextBoxColumn19";
+            this.dataGridViewTextBoxColumn19.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn20
+            // 
+            this.dataGridViewTextBoxColumn20.HeaderText = "备注";
+            this.dataGridViewTextBoxColumn20.MinimumWidth = 8;
+            this.dataGridViewTextBoxColumn20.Name = "dataGridViewTextBoxColumn20";
+            this.dataGridViewTextBoxColumn20.Width = 150;
+            // 
+            // PrinterList
+            // 
+            this.PrinterList.Location = new System.Drawing.Point(140, 56);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(6);
+            this.PrinterList.Name = "PrinterList";
+            this.PrinterList.Size = new System.Drawing.Size(230, 38);
+            this.PrinterList.TabIndex = 229;
+            // 
+            // PrintBarCode
+            // 
+            this.PrintBarCode.AllPower = null;
+            this.PrintBarCode.BackColor = System.Drawing.Color.Transparent;
+            this.PrintBarCode.DownImage = ((System.Drawing.Image)(resources.GetObject("PrintBarCode.DownImage")));
+            this.PrintBarCode.Image = null;
+            this.PrintBarCode.IsShowBorder = true;
+            this.PrintBarCode.Location = new System.Drawing.Point(476, 58);
+            this.PrintBarCode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.PrintBarCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("PrintBarCode.MoveImage")));
+            this.PrintBarCode.Name = "PrintBarCode";
+            this.PrintBarCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("PrintBarCode.NormalImage")));
+            this.PrintBarCode.Power = null;
+            this.PrintBarCode.Size = new System.Drawing.Size(84, 34);
+            this.PrintBarCode.TabIndex = 226;
+            this.PrintBarCode.Text = "打印";
+            this.PrintBarCode.UseVisualStyleBackColor = false;
+            this.PrintBarCode.Click += new System.EventHandler(this.Print_Click_1);
+            // 
+            // DeleteBarcode
+            // 
+            this.DeleteBarcode.AllPower = null;
+            this.DeleteBarcode.BackColor = System.Drawing.Color.Transparent;
+            this.DeleteBarcode.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteBarcode.DownImage")));
+            this.DeleteBarcode.Image = null;
+            this.DeleteBarcode.IsShowBorder = true;
+            this.DeleteBarcode.Location = new System.Drawing.Point(476, 11);
+            this.DeleteBarcode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.DeleteBarcode.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteBarcode.MoveImage")));
+            this.DeleteBarcode.Name = "DeleteBarcode";
+            this.DeleteBarcode.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteBarcode.NormalImage")));
+            this.DeleteBarcode.Power = null;
+            this.DeleteBarcode.Size = new System.Drawing.Size(84, 34);
+            this.DeleteBarcode.TabIndex = 221;
+            this.DeleteBarcode.Text = "删除";
+            this.DeleteBarcode.UseVisualStyleBackColor = false;
+            this.DeleteBarcode.Visible = false;
+            this.DeleteBarcode.Click += new System.EventHandler(this.DeleteBarcode_Click);
+            // 
+            // barcode
+            // 
+            this.barcode.AllPower = null;
+            this.barcode.BackColor = System.Drawing.Color.White;
+            this.barcode.ID = null;
+            this.barcode.Location = new System.Drawing.Point(110, 12);
+            this.barcode.Name = "barcode";
+            this.barcode.Power = null;
+            this.barcode.Size = new System.Drawing.Size(220, 28);
+            this.barcode.Str = null;
+            this.barcode.Str1 = null;
+            this.barcode.Str2 = null;
+            this.barcode.TabIndex = 220;
+            this.barcode.Visible = false;
+            this.barcode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MakeCode_KeyDown);
+            // 
+            // GenProdiodetail
+            // 
+            this.GenProdiodetail.AllPower = null;
+            this.GenProdiodetail.BackColor = System.Drawing.Color.Transparent;
+            this.GenProdiodetail.DownImage = ((System.Drawing.Image)(resources.GetObject("GenProdiodetail.DownImage")));
+            this.GenProdiodetail.Image = null;
+            this.GenProdiodetail.IsShowBorder = true;
+            this.GenProdiodetail.Location = new System.Drawing.Point(360, 11);
+            this.GenProdiodetail.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.GenProdiodetail.MoveImage = ((System.Drawing.Image)(resources.GetObject("GenProdiodetail.MoveImage")));
+            this.GenProdiodetail.Name = "GenProdiodetail";
+            this.GenProdiodetail.NormalImage = ((System.Drawing.Image)(resources.GetObject("GenProdiodetail.NormalImage")));
+            this.GenProdiodetail.Power = null;
+            this.GenProdiodetail.Size = new System.Drawing.Size(92, 34);
+            this.GenProdiodetail.TabIndex = 216;
+            this.GenProdiodetail.Text = "生成明细";
+            this.GenProdiodetail.UseVisualStyleBackColor = false;
+            this.GenProdiodetail.Visible = false;
+            this.GenProdiodetail.Click += new System.EventHandler(this.Print_Click);
+            // 
+            // st_id
+            // 
+            this.st_id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.st_id.DataPropertyName = "st_id";
+            this.st_id.HeaderText = "ID";
+            this.st_id.MinimumWidth = 10;
+            this.st_id.Name = "st_id";
+            this.st_id.Visible = false;
+            this.st_id.Width = 10;
+            // 
+            // choose
+            // 
+            this.choose.HeaderText = "勾选";
+            this.choose.MinimumWidth = 10;
+            this.choose.Name = "choose";
+            this.choose.Width = 80;
+            // 
+            // gl_location
+            // 
+            this.gl_location.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.gl_location.DataPropertyName = "gl_location";
+            this.gl_location.HeaderText = "系统储位";
+            this.gl_location.MinimumWidth = 10;
+            this.gl_location.Name = "gl_location";
+            this.gl_location.ReadOnly = true;
+            this.gl_location.Width = 116;
+            // 
+            // st_code
+            // 
+            this.st_code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.st_code.DataPropertyName = "st_code";
+            this.st_code.HeaderText = "钢网编号";
+            this.st_code.MinimumWidth = 10;
+            this.st_code.Name = "st_code";
+            this.st_code.ReadOnly = true;
+            this.st_code.Width = 116;
+            // 
+            // st_location
+            // 
+            this.st_location.DataPropertyName = "st_location";
+            this.st_location.HeaderText = "储位";
+            this.st_location.MinimumWidth = 10;
+            this.st_location.Name = "st_location";
+            this.st_location.Width = 200;
+            // 
+            // st_name
+            // 
+            this.st_name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.st_name.DataPropertyName = "st_name";
+            this.st_name.HeaderText = "钢网名称";
+            this.st_name.MinimumWidth = 10;
+            this.st_name.Name = "st_name";
+            this.st_name.Width = 116;
+            // 
+            // st_thickness
+            // 
+            this.st_thickness.DataPropertyName = "st_thickness";
+            this.st_thickness.HeaderText = "厚度";
+            this.st_thickness.MinimumWidth = 10;
+            this.st_thickness.Name = "st_thickness";
+            this.st_thickness.ReadOnly = true;
+            this.st_thickness.Width = 200;
+            // 
+            // st_usecount
+            // 
+            this.st_usecount.DataPropertyName = "st_usecount";
+            this.st_usecount.HeaderText = "使用次数";
+            this.st_usecount.MinimumWidth = 10;
+            this.st_usecount.Name = "st_usecount";
+            this.st_usecount.ReadOnly = true;
+            this.st_usecount.Width = 200;
+            // 
+            // st_maxusecount
+            // 
+            this.st_maxusecount.DataPropertyName = "st_maxusecount";
+            this.st_maxusecount.HeaderText = "使用次数上限";
+            this.st_maxusecount.MinimumWidth = 10;
+            this.st_maxusecount.Name = "st_maxusecount";
+            this.st_maxusecount.ReadOnly = true;
+            this.st_maxusecount.Width = 80;
+            // 
+            // st_vendcode
+            // 
+            this.st_vendcode.DataPropertyName = "st_vendcode";
+            this.st_vendcode.HeaderText = "客户编号";
+            this.st_vendcode.MinimumWidth = 8;
+            this.st_vendcode.Name = "st_vendcode";
+            this.st_vendcode.Width = 150;
+            // 
+            // st_usestatus
+            // 
+            this.st_usestatus.DataPropertyName = "st_usestatus";
+            this.st_usestatus.HeaderText = "领用状态";
+            this.st_usestatus.MinimumWidth = 8;
+            this.st_usestatus.Name = "st_usestatus";
+            this.st_usestatus.Width = 150;
+            // 
+            // st_pcbcode
+            // 
+            this.st_pcbcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.st_pcbcode.DataPropertyName = "st_pcbcode";
+            this.st_pcbcode.HeaderText = "厂商编号";
+            this.st_pcbcode.MinimumWidth = 8;
+            this.st_pcbcode.Name = "st_pcbcode";
+            this.st_pcbcode.Width = 91;
+            // 
+            // st_status
+            // 
+            this.st_status.DataPropertyName = "st_status";
+            this.st_status.HeaderText = "状态";
+            this.st_status.MinimumWidth = 8;
+            this.st_status.Name = "st_status";
+            this.st_status.Width = 150;
+            // 
+            // st_combinenumber
+            // 
+            this.st_combinenumber.DataPropertyName = "st_combinenumber";
+            this.st_combinenumber.HeaderText = "拼版数";
+            this.st_combinenumber.MinimumWidth = 8;
+            this.st_combinenumber.Name = "st_combinenumber";
+            this.st_combinenumber.Width = 150;
+            // 
+            // st_table
+            // 
+            this.st_table.DataPropertyName = "st_table";
+            this.st_table.HeaderText = "板面";
+            this.st_table.MinimumWidth = 8;
+            this.st_table.Name = "st_table";
+            this.st_table.Width = 150;
+            // 
+            // st_ensiona
+            // 
+            this.st_ensiona.DataPropertyName = "st_ensiona";
+            this.st_ensiona.HeaderText = "张力A";
+            this.st_ensiona.MinimumWidth = 8;
+            this.st_ensiona.Name = "st_ensiona";
+            this.st_ensiona.Width = 150;
+            // 
+            // st_ensionb
+            // 
+            this.st_ensionb.DataPropertyName = "st_ensionb";
+            this.st_ensionb.HeaderText = "张力B";
+            this.st_ensionb.MinimumWidth = 8;
+            this.st_ensionb.Name = "st_ensionb";
+            this.st_ensionb.Width = 150;
+            // 
+            // st_ensionc
+            // 
+            this.st_ensionc.DataPropertyName = "st_ensionc";
+            this.st_ensionc.HeaderText = "张力C";
+            this.st_ensionc.MinimumWidth = 8;
+            this.st_ensionc.Name = "st_ensionc";
+            this.st_ensionc.Width = 150;
+            // 
+            // st_ensiond
+            // 
+            this.st_ensiond.DataPropertyName = "st_ensiond";
+            this.st_ensiond.HeaderText = "张力D";
+            this.st_ensiond.MinimumWidth = 8;
+            this.st_ensiond.Name = "st_ensiond";
+            this.st_ensiond.Width = 150;
+            // 
+            // st_ensione
+            // 
+            this.st_ensione.DataPropertyName = "st_ensione";
+            this.st_ensione.HeaderText = "张力E";
+            this.st_ensione.MinimumWidth = 8;
+            this.st_ensione.Name = "st_ensione";
+            this.st_ensione.Width = 150;
+            // 
+            // st_remark
+            // 
+            this.st_remark.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.st_remark.DataPropertyName = "st_remark";
+            this.st_remark.HeaderText = "备注";
+            this.st_remark.MinimumWidth = 8;
+            this.st_remark.Name = "st_remark";
+            this.st_remark.Width = 75;
+            // 
+            // Query_BarcodeIn
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1470, 806);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.PrinterList);
+            this.Controls.Add(this.PrintBarCode);
+            this.Controls.Add(this.DeleteBarcode);
+            this.Controls.Add(this.barcode);
+            this.Controls.Add(this.label1_lll_);
+            this.Controls.Add(this.DGV);
+            this.Controls.Add(this.GenProdiodetail);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Query_BarcodeIn";
+            this.Tag = "Query!BarcodeIn";
+            this.Text = "Query_BarcodeIn";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Query_BarcodeIn_FormClosing);
+            this.Load += new System.EventHandler(this.Query_LoadMake_Load);
+            this.SizeChanged += new System.EventHandler(this.Query_BarcodeIn_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.DGV)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private CustomControl.ButtonUtil.NormalButton GenProdiodetail;
+        private System.Windows.Forms.DataGridView DGV;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
+        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;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox barcode;
+        private System.Windows.Forms.Label label1_lll_;
+        private CustomControl.ButtonUtil.NormalButton DeleteBarcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
+        private CustomControl.ButtonUtil.NormalButton PrintBarCode;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrinterList;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn12;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn13;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn14;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn15;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn16;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn17;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn18;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn19;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn20;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_id;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn choose;
+        private System.Windows.Forms.DataGridViewTextBoxColumn gl_location;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_code;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_location;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_name;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_thickness;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_usecount;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_maxusecount;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_vendcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_usestatus;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_pcbcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_status;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_combinenumber;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_table;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_ensiona;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_ensionb;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_ensionc;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_ensiond;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_ensione;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_remark;
+    }
+}

+ 216 - 0
UAS_MES_WEIP/FunctionCode/Query/Query_BarcodeIn.cs

@@ -0,0 +1,216 @@
+using DevExpress.Printing.Core.PdfExport.Metafile;
+using LabelManager2;
+using Seagull.BarTender.Print;
+using System;
+using System.Data;
+using System.Drawing;
+using System.Threading;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicForm;
+using UAS_MES_NEW.PublicMethod;
+using static System.Runtime.CompilerServices.RuntimeHelpers;
+
+namespace UAS_MES_NEW.Query
+{
+    public partial class Query_BarcodeIn : Form
+    {
+
+        DataHelper dh = SystemInf.dh;
+
+        DataTable Dbfind;
+
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        Thread InitPrint;
+
+        BarTender.Application engine;
+
+        public Query_BarcodeIn()
+        {
+            InitializeComponent();
+        }
+
+        private void InPrint()
+        {
+            try
+            {
+                engine = new BarTender.Application();
+            }
+            catch (Exception)
+            {
+                MessageBox.Show("未正确安装BarTender软件");
+            }
+        }
+
+        private void Query_LoadMake_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            InitPrint = new Thread(InPrint);
+            SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
+            BaseUtil.SetFormCenter(stw);
+            stw.ShowDialog();
+
+            LoadGridData();
+
+
+        }
+
+
+
+        private void UpLoadMake_Click(object sender, EventArgs e)
+        {
+            LoadGridData();
+        }
+
+        private void LoadGridData()
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql(" select * from gwlocation  full outer join ( select * from Stencil where  st_kind = '钢网' )  on gl_LOCATION = st_location left join stenilcanusepro on SP_STID = st_id left join product on pr_code = SP_PRODCODE" +
+                " where (st_kind = '钢网' or st_kind is null) and (st_usestatus<>'报废' or st_usestatus is null)  order by gl_id asc ", "select");
+            BaseUtil.FillDgvWithDataTable(DGV, dt);
+        }
+
+        private bool ifcheckrow()
+        {
+            for (int i = 0; i < DGV.Rows.Count; i++)
+            {
+                if (DGV.Rows[i].Cells["Choose"].Value != null && DGV.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
+                {
+                    if(DGV.Rows[i].Cells["st_id"].Value.ToString() != "")
+                    return true;
+                    else
+                        return false;
+                }
+            }
+            return false;
+        }
+
+        private void Print_Click(object sender, EventArgs e)
+        {
+            string ErrMsg = "";
+            MessageBox.Show("生成明细成功");
+        }
+
+
+        private void pi_inoutno_UserControlTextChanged(object sender, EventArgs e)
+        {
+            LoadGridData();
+        }
+
+        private void MakeCode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                //if (pi_inoutno.Text == "")
+                //{
+                //    MessageBox.Show("出入库单号不能为空");
+                //    return;
+                //}
+                //DataTable dt = (DataTable)dh.ExecuteSql("select bi_inqty,bi_barcode from barcodeio left join product on pr_code=bi_prodcode" +
+                //    " where bi_inoutno='" + pi_inoutno.Text + "' and bi_barcode='" + barcode.Text + "'", "select");
+                //if (dt.Rows.Count > 0)
+                //{
+                //    MessageBox.Show("出入库单已采集条码" + barcode.Text);
+                //    return;
+                //}
+                //dt = (DataTable)dh.ExecuteSql("select bar_vendbarcode,to_char(nvl(bar_madedate,sysdate),'yyyy-mm-dd')bar_madedate,bar_code,bar_remain,bar_prodcode from barcode left " +
+                //    "join product on pr_code=bar_prodcode where bar_code='" + barcode.Text + "'", "select");
+                //if (dt.Rows.Count == 0)
+                //{
+                //    MessageBox.Show("条码" + barcode.Text + "不存在");
+                //    return;
+                //}
+                //BarCodePrint bar = new BarCodePrint(barcode.Text);
+                //bar.StartPosition = FormStartPosition.CenterScreen;
+                //bar.ShowDialog();
+                //string newbarcode = bar.Controls["newbarcode"].Text;
+                //string bar_remain = bar.Controls["bar_remain"].Text;
+                //bar.Controls["PrintBarCode"].Click += Query_BarcodeIn_Click;
+
+                //string pi_id = dh.getFieldDataByCondition("prodinout", "pi_id", "pi_inoutno='" + pi_inoutno.Text + "'").ToString();
+                //string bar_code = dt.Rows[0]["bar_code"].ToString();
+                //string bar_prodcode = dt.Rows[0]["bar_prodcode"].ToString();
+                //string bar_madedate = dt.Rows[0]["bar_madedate"].ToString();
+                //string bar_vendbarcode = dt.Rows[0]["bar_vendbarcode"].ToString();
+                //dh.ExecuteSql("insert into barcodeio(bi_id,bi_piid,bi_barcode,bi_inoutno,bi_prodcode,bi_indate,bi_inqty,bi_vendbarcode,bi_madedate,bi_sourcecode,bi_printstatus)" +
+                //    "values(barcodeio_seq.nextval,'" + pi_id + "','" + newbarcode + "','" + pi_inoutno.Text + "','" + bar_prodcode + "',sysdate,'" + bar_remain + "','" + bar_vendbarcode + "',to_date('" + bar_madedate + "','yyyy-mm-dd'),'" + bar_code + "',1)", "insert");
+                //LoadGridData();
+                //string ErrorMessage = "";
+                //if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, newbarcode, int.Parse("1"), pi_inoutno.Text, bar_prodcode, "自定义", "0", out ErrorMessage))
+                //{
+
+                //}
+            }
+        }
+
+        private void Query_BarcodeIn_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void DeleteBarcode_Click(object sender, EventArgs e)
+        {
+           
+            //LoadGridData();
+        }
+
+        private void ChooseAll_Click(object sender, EventArgs e)
+        {
+            for (int i = 0; i < DGV.Rows.Count; i++)
+            {
+                DGV.Rows[i].Cells["choose"].Value = true;
+            }
+        }
+
+        private void Print_Click_1(object sender, EventArgs e)
+        {
+            if (!ifcheckrow())
+            {
+                MessageBox.Show("请勾选需要操作的行");
+                return;
+            }
+            for (int i = 0; i < DGV.Rows.Count; i++)
+            {
+                if (DGV.Rows[i].Cells["Choose"].Value != null && DGV.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
+                {
+                    if (DGV.Rows[i].Cells["st_id"].Value.ToString() != "")
+                    {
+                        BarTender.Format doc2 = engine.Formats.Open(System.Windows.Forms.Application.StartupPath + @"\钢网条码.btw");
+
+                        DataTable ddt = (DataTable)dh.ExecuteSql(" select * from Stencil where st_id = '" + DGV.Rows[i].Cells["st_id"].Value.ToString() + "' ", "select");
+                        doc2.SetNamedSubStringValue("储位", ddt.Rows[0]["st_location"].ToString());
+                        doc2.SetNamedSubStringValue("机型", ddt.Rows[0]["st_name"].ToString());
+                        doc2.SetNamedSubStringValue("编号", ddt.Rows[0]["st_code"].ToString());
+                        doc2.SetNamedSubStringValue("客户", ddt.Rows[0]["st_vendcode"].ToString());
+                        doc2.SetNamedSubStringValue("面别", ddt.Rows[0]["st_table"].ToString());
+                        doc2.SetNamedSubStringValue("厚度", ddt.Rows[0]["st_thickness"].ToString());
+
+                        // 同样标签的份数 
+                        doc2.PrintSetup.IdenticalCopiesOfLabel = 1;
+                        // 序列标签数 
+                        doc2.PrintSetup.NumberSerializedLabels = 1;
+                        doc2.PrintSetup.Printer = PrinterList.Text;
+                        doc2.PrintOut(false, false);
+                        doc2.Close(BarTender.BtSaveOptions.btDoNotSaveChanges);
+
+
+                    }
+
+                }
+            }
+        }
+
+        private void Query_BarcodeIn_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            if (engine != null)
+                engine.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);
+            dh.Dispose();
+        }
+
+        private void Query_BarcodeIn_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+    }
+}

+ 301 - 0
UAS_MES_WEIP/FunctionCode/Query/Query_BarcodeIn.resx

@@ -0,0 +1,301 @@
+<?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>
+  <metadata name="st_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="gl_location.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_location.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_thickness.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_usecount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_maxusecount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_vendcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_usestatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_pcbcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_combinenumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_table.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_ensiona.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_ensionb.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_ensionc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_ensiond.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_ensione.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="st_remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="PrintBarCode.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="PrintBarCode.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="PrintBarCode.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="DeleteBarcode.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="DeleteBarcode.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="DeleteBarcode.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="GenProdiodetail.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="GenProdiodetail.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="GenProdiodetail.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>

+ 1 - 1
UAS_MES_WEIP/PublicMethod/LogicHandler.cs

@@ -258,7 +258,7 @@ namespace UAS_MES_NEW.PublicMethod
             else if (iSnCode != "")
             {
                 //如果返工批次为空则获取当前的批次
-                SQL = "select nvl(MS_REWORKCHECKNO,ms_checkno)ms_checkno from makeserial where ms_id=(select max(ms_id) from makeserial where  ms_sncode='" + iSnCode + "' or ms_psn='" + iSnCode + "')";
+                SQL = "select nvl(MS_REWORKCHECKNO,ms_checkno)ms_checkno from makeserial where ms_id=(select max(ms_id) from makeserial where  ms_sncode='" + iSnCode + "' or ms_firstsn='" + iSnCode + "')";
                 dt = (DataTable)dh.ExecuteSql(SQL, "select");
                 if (dt.Rows.Count == 0)
                 {

+ 14 - 9
UAS_MES_WEIP/UAS_MES_WEIP.csproj

@@ -128,6 +128,11 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>Tool\ExcelHelper.dll</HintPath>
     </Reference>
+    <Reference Include="Interop.BarTender, Version=11.0.8.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
+      <HintPath>..\UAS_MES_XZC\Tool\Interop.BarTender.dll</HintPath>
+    </Reference>
     <Reference Include="Interop.LabelManager2, Version=6.0.0.0, Culture=neutral, processorArchitecture=x86">
       <SpecificVersion>False</SpecificVersion>
       <EmbedInteropTypes>False</EmbedInteropTypes>
@@ -886,6 +891,12 @@
     <Compile Include="FunctionCode\Packing\Packing_ProdWeightSet.Designer.cs">
       <DependentUpon>Packing_ProdWeightSet.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\Query_BarcodeIn.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_BarcodeIn.Designer.cs">
+      <DependentUpon>Query_BarcodeIn.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Query\Query_Commandlog.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1493,6 +1504,9 @@
     <EmbeddedResource Include="FunctionCode\Packing\Packing_ProdWeightSet.resx">
       <DependentUpon>Packing_ProdWeightSet.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_BarcodeIn.resx">
+      <DependentUpon>Query_BarcodeIn.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_Commandlog.resx">
       <DependentUpon>Query_Commandlog.cs</DependentUpon>
     </EmbeddedResource>
@@ -1769,15 +1783,6 @@
     <Content Include="Resources\zxing_android_code_48px_1107946_easyicon.net.png" />
   </ItemGroup>
   <ItemGroup>
-    <COMReference Include="BarTender">
-      <Guid>{D58562C1-E51B-11CF-8941-00A024A9083F}</Guid>
-      <VersionMajor>9</VersionMajor>
-      <VersionMinor>40</VersionMinor>
-      <Lcid>0</Lcid>
-      <WrapperTool>tlbimp</WrapperTool>
-      <Isolated>False</Isolated>
-      <EmbedInteropTypes>True</EmbedInteropTypes>
-    </COMReference>
     <COMReference Include="stdole">
       <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
       <VersionMajor>2</VersionMajor>

+ 6 - 0
UAS_MES_XZC/CustomControl/RichText/RichTextAutoBottom.cs

@@ -46,6 +46,12 @@ 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\901028.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
             else if (color == Color.Green && Entity.SystemInf.CheckAudioEnable)
             {
                 //颜色是绿色,进行正确提示音

+ 105 - 0
UAS_MES_XZC/FunctionCode/Make/Make_CollectHLH.Designer.cs

@@ -0,0 +1,105 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_CollectHLH
+    {
+        /// <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.components = new System.ComponentModel.Container();
+            this.fileSystemWatcher1 = new System.IO.FileSystemWatcher();
+            this.button1 = new System.Windows.Forms.Button();
+            this.timer1 = new System.Windows.Forms.Timer(this.components);
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // fileSystemWatcher1
+            // 
+            this.fileSystemWatcher1.EnableRaisingEvents = true;
+            this.fileSystemWatcher1.Filter = "*.csv*";
+            this.fileSystemWatcher1.NotifyFilter = ((System.IO.NotifyFilters)(((((System.IO.NotifyFilters.FileName | System.IO.NotifyFilters.DirectoryName) 
+            | System.IO.NotifyFilters.LastWrite) 
+            | System.IO.NotifyFilters.LastAccess) 
+            | System.IO.NotifyFilters.CreationTime)));
+            this.fileSystemWatcher1.Path = "D:\\MES";
+            this.fileSystemWatcher1.SynchronizingObject = this;
+            this.fileSystemWatcher1.Created += new System.IO.FileSystemEventHandler(this.OnCreated);
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(364, 64);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(141, 49);
+            this.button1.TabIndex = 190;
+            this.button1.Text = "button1";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Visible = false;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // timer1
+            // 
+            this.timer1.Interval = 300000;
+            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+            // 
+            // 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(61, 156);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(978, 500);
+            this.OperateResult.TabIndex = 189;
+            this.OperateResult.Text = "";
+            // 
+            // Make_CollectHLH
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1112, 680);
+            this.Controls.Add(this.button1);
+            this.Controls.Add(this.OperateResult);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Name = "Make_CollectHLH";
+            this.Tag = "Make!CollectHLH";
+            this.Text = "网标采集";
+            this.Activated += new System.EventHandler(this.Make_CollectNetCode_Activated);
+            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Make_CollectNetCode_FormClosed);
+            this.Load += new System.EventHandler(this.Make_CollectNetCode_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_CollectNetCode_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.IO.FileSystemWatcher fileSystemWatcher1;
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Timer timer1;
+    }
+}

+ 500 - 0
UAS_MES_XZC/FunctionCode/Make/Make_CollectHLH.cs

@@ -0,0 +1,500 @@
+using DevExpress.XtraRichEdit.API.Word;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Net.Sockets;
+using System.Net;
+using System.Text;
+using System.Windows.Forms;
+using System.Xml;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+using System.Threading;
+using DevExpress.Entity.ProjectModel;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_CollectHLH : Form
+    {
+        DataHelper dh = SystemInf.dh;
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        LogStringBuilder sql = new LogStringBuilder();
+        DataTable dt;
+        //当前序列号记录
+        string sn_code;
+        //制造单号
+        string macode;
+        //采集网标号
+        string net_code;
+        //网标查询条件ms_id
+        string oMsID;
+        //判断是否输入网标
+        Boolean isnetcode = false;
+        //打印计数
+        int printcount = 0;
+        int ma_unlimitin;
+
+        public Make_CollectHLH()
+        {
+            InitializeComponent();
+        }
+
+
+        //FileSystemWatcher watcher;
+
+
+        private void Make_CollectNetCode_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+
+            string sharedFolderPath = @"\\192.168.10.1\othersystem\Type2Output";
+            sharedFolderPath = @"D:\mes";
+
+            sharedFolderPath = @"\\192.168.10.1\othersystem\PickupInformation";
+            sharedFolderPath = @"D:\标签";
+            ////// 确保路径以反斜杠结尾,以便正确监控目录
+            ////if (!sharedFolderPath.EndsWith("\"))
+            ////{
+            ////    sharedFolderPath += "\";
+            ////}
+            //// 创建FileSystemWatcher实例
+            //watcher = new FileSystemWatcher
+            //{
+            //    Path = sharedFolderPath,
+            //    NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastWrite | NotifyFilters.Size | NotifyFilters.DirectoryName,
+            //    Filter = "*.*", // 监控所有文件
+            //    IncludeSubdirectories = false, // 根据需要设置为true以监控子目录
+            //    EnableRaisingEvents = true
+            //};
+
+            // 绑定事件处理程序
+            //fileSystemWatcher1.Created += OnCreated;
+            //watcher.Changed += OnChanged;
+            //watcher.Deleted += OnDeleted;
+            //watcher.Renamed += OnRenamed;
+            //OperateResult.AppendText(DateTime.Now+" 开始监控文件夹: " + fileSystemWatcher1.Path+ "\n");
+            //OperateResult.AppendText(DateTime.Now + " 开始监控文件夹: " + fileSystemWatcher2.Path + "\n");
+        }
+
+        // 文件创建事件处理程序
+        private  void OnCreated(object sender, FileSystemEventArgs e)
+        {
+
+             OperateResult.AppendText("文件新增: " + e.FullPath+"\n");
+
+            //string filePath = "D:\\csy\\FileRecv\\FileRecv\\行之成\\回流焊\\70830L-TFT-A_JT12_250314_10-01-13_202-SPC-70830-15TFT2025031202406.csv";
+            Dictionary<string, string> data = ParseCsvToKeyValuePairs(e.FullPath);
+
+            // 示例:遍历输出结果
+
+            if (!data.ContainsKey("Board_Barcode="))
+            {
+                OperateResult.AppendText("未查询到条码信息" + "\n");
+                return;
+            }
+            else
+            {
+                DataTable dt = (DataTable)dh.ExecuteSql("SELECT B.MSL_SNCODE SNCODE FROM MAKESNLIST A LEFT JOIN MAKESNLIST B ON A.msl_mainbarcode" +
+                    " = b.msl_mainbarcode WHERE replace(A.MSL_SNCODE,' ') = '" + data["Board_Barcode="] + "'", "select");
+
+                string[] keys = data.Keys.ToArray();
+                string[] Values = data.Values.ToArray();
+
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    string htdid = dh.GetSEQ("HLHTESTDETAIL_SEQ");
+                    OperateResult.AppendText("插入条码" + dt.Rows[i]["SNCODE"].ToString() + "\n");
+                    dh.BatchInsert("insert into HLHTESTDETAIL(htd_id,htd_sn,htd_class,htd_value) values (" + htdid + ",'" + dt.Rows[i]["SNCODE"].ToString() + "',:keyss,:valuess)", new string[] { "keyss", "valuess" }, keys, Values);
+                }
+            }
+        }
+
+        // 文件更改事件处理程序
+        private  void OnChanged(object sender, FileSystemEventArgs e)
+        {
+           // OperateResult.AppendText("文件更改: " + e.FullPath+"\n");
+        }
+
+        // 文件删除事件处理程序
+        private  void OnDeleted(object sender, FileSystemEventArgs e)
+        {
+            //OperateResult.AppendText("文件删除: " + e.FullPath + "\n");
+        }
+
+        // 文件重命名事件处理程序
+        private  void OnRenamed(object sender, RenamedEventArgs e)
+        {
+            //OperateResult.AppendText("文件重命名: 从 "+ e.OldFullPath + " 到 "+ e.FullPath + "\n");
+        }
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+           
+        }
+
+        private void Make_CollectNetCode_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void Make_CollectNetCode_Activated(object sender, EventArgs e)
+        {
+        }
+
+
+  
+
+        private void deleteButton1_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void Make_CollectNetCode_FormClosed(object sender, FormClosedEventArgs e)
+        {
+            // 释放资源
+            fileSystemWatcher1.Dispose();
+            timer1.Dispose();
+        }
+
+        private void fileSystemWatcher2_Created(object sender, FileSystemEventArgs e)
+        {
+            int i = 0;
+            try
+            {
+                OperateResult.AppendText(DateTime.Now + " 文件创建: " + e.FullPath + "\n");
+                if (e.FullPath.Contains("dat"))
+                {
+                //    i = PLGET(e, i);
+                }
+
+            }
+            catch (Exception ex)
+            {
+                OperateResult.AppendText(i+" "+DateTime.Now + " " + ex.Message + "\n");
+            }
+        }
+
+        private void PLGET(String path)
+        {
+            int i = 0;
+            bool ql = false;
+            try
+            {
+                string[] lines = File.ReadAllLines(path);
+                // 解析文件内容
+                foreach (string line in lines)
+                {
+                    if (!line.StartsWith("[PlotInfo]") && !line.StartsWith("MCNo") && line.Trim() != "") // 跳过标题行
+                    {
+                        string[] fields = line.Split(' ');
+                        // 提取字段
+                        String mcNo = fields[0];
+                        String lane = fields[1];
+                        String fAdd = fields[2];
+                        String fsAdd = fields[3];
+                        string partsName = fields[4].Trim('"');
+                        string feederSerial = fields[5].Trim('"');
+                        Double pickup = Double.Parse(fields[6]);
+                        Double needpickup = Double.Parse(fields[6]);
+                        String location = "";
+                        // ... 其他字段
+                        // 处理数据
+                        if (pickup > 0)
+                        {
+                            location = dh.getFieldDataByCondition("smtlocationinto", "sli_location", "sli_mcno = '" + mcNo + "' " +
+                                "and sli_fadd ='" + fAdd + "' and instr(sli_fsadd,'" + fsAdd + "')>0").ToString();
+                            //OperateResult.AppendText(DateTime.Now + $"料号: {mcNo}, 轨道: {lane},fAdd: {fAdd} ," +
+                            //      $"fsAdd: {fsAdd},站位:{location} PartsName: {partsName}, FeederSerial: {feederSerial},pickup: {pickup}" + "\n");
+                            double reaminqtysum = Double.Parse(dh.getFieldDataByCondition("DEVSMTLOCATION", "nvl(sum(DSL_REMAINQTY),0)", " dsl_location = '" + location + "' ").ToString());
+                            if (reaminqtysum < pickup)
+                            {
+                                OperateResult.AppendText(DateTime.Now + $"站位:{location}缺料 {pickup}" + "\n", Color.OrangeRed);
+                                ql = true;
+                            }
+                            else
+                            {
+                                DataTable dt = (DataTable)dh.ExecuteSql(" select dsl_id,dsl_remainqty,dsl_barcode from DEVSMTLOCATION " +
+                                    "where dsl_location = '" + location + "' and nvl(DSL_USABLE,0)<>2 and dsl_remainqty >0 order by dsl_id asc ", "select");
+                                for (int j = 0; j < dt.Rows.Count; j++)
+                                {
+                                    if (needpickup > 0)
+                                    {
+                                        double v_v_useqty = 0;
+                                        if (double.Parse(dt.Rows[j]["dsl_remainqty"].ToString()) >= needpickup || j == dt.Rows.Count - 1)
+                                        {
+                                            v_v_useqty = needpickup;
+                                            needpickup = 0;
+                                            dh.UpdateByCondition("DEVSMTLOCATION", "dsl_remainqty= dsl_remainqty - " + v_v_useqty + ",dsl_validtime=(case when dsl_validtime is null then sysdate else dsl_validtime end) ", "dsl_id=" + dt.Rows[j]["dsl_id"].ToString() + "");
+                                        }
+                                        else
+                                        {
+                                            v_v_useqty = double.Parse(dt.Rows[j]["dsl_remainqty"].ToString());
+                                            needpickup = needpickup - v_v_useqty;
+                                            dh.UpdateByCondition("DEVSMTLOCATION", "dsl_remainqty= dsl_remainqty - " + v_v_useqty + ",dsl_validtime=(case when dsl_validtime is null then sysdate else dsl_validtime end) ", "dsl_id=" + dt.Rows[j]["dsl_id"].ToString() + "");
+                                        }
+
+                                    }
+                                }
+                                dh.UpdateByCondition("DEVSMTLOCATION", "DSL_USABLE= 2,dsl_invalidtime=(case when dsl_invalidtime is null then sysdate else dsl_invalidtime end)   ", "dsl_location='" + location + "' and nvl(dsl_remainqty,0)<=0");
+                                OperateResult.AppendText(DateTime.Now + $"站位:{location}扣料{pickup}成功" + "\n", Color.Black);
+                            }
+
+                        }
+                        i++;
+                        // ... 其他处理
+                    }
+                }
+                if (ql)
+                {
+                    OperateResult.AppendText(DateTime.Now + $"SMT缺料提醒" + "\n", Color.Blue);
+                }
+            }
+            catch (Exception ex)
+            {
+                OperateResult.AppendText(i + " " + DateTime.Now + " " + ex.Message + "\n");
+            }
+
+
+        }
+
+        private void fileSystemWatcher2_Changed(object sender, FileSystemEventArgs e)
+        {
+            OperateResult.AppendText(DateTime.Now + " 文件修改: " + e.FullPath + "\n");
+        }
+
+        private void fileSystemWatcher2_Deleted(object sender, FileSystemEventArgs e)
+        {
+            OperateResult.AppendText(DateTime.Now + " 文件删除: " + e.FullPath + "\n");
+        }
+
+        private void fileSystemWatcher2_Renamed(object sender, RenamedEventArgs e)
+        {
+            OperateResult.AppendText(DateTime.Now + " 文件重命名: " + e.FullPath + "\n");
+        }
+
+        const int ReceiveTimeout = 5000; // 接收超时时间(毫秒)
+        static ManualResetEvent receiveDone = new ManualResetEvent(false);
+
+        private  void button1_Click(object sender, EventArgs e)
+        {
+            string filePath = "D:\\csy\\FileRecv\\FileRecv\\行之成\\回流焊\\70830L-TFT-A_JT12_250314_10-01-13_202-SPC-70830-15TFT2025031202406.csv";
+            Dictionary<string, string> data = ParseCsvToKeyValuePairs(filePath);
+
+            // 示例:遍历输出结果
+
+            if (!data.ContainsKey("Board_Barcode="))
+            {
+                OperateResult.AppendText("未查询到条码信息" + "\n");
+                return;
+            }
+            else
+            {
+                DataTable dt = (DataTable)dh.ExecuteSql("SELECT B.MSL_SNCODE SNCODE FROM MAKESNLIST A LEFT JOIN MAKESNLIST B ON A.msl_mainbarcode" +
+                    " = b.msl_mainbarcode WHERE replace(A.MSL_SNCODE,' ') = '"+ data["Board_Barcode="] + "'", "select");
+
+                string[] keys = data.Keys.ToArray();
+                string[] Values = data.Values.ToArray();
+
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    string htdid = dh.GetSEQ("HLHTESTDETAIL_SEQ");
+                    OperateResult.AppendText("插入条码"+ dt.Rows[i]["SNCODE"].ToString() + "\n");
+                    dh.BatchInsert("insert into HLHTESTDETAIL(htd_id,htd_sn,htd_class,htd_value) values ("+ htdid + ",'" + dt.Rows[i]["SNCODE"].ToString() +"',:keyss,:valuess)", new string[] { "keyss", "valuess" }, keys,Values);
+                }
+            }
+        }
+
+        static Dictionary<string, string> ParseCsvToKeyValuePairs(string filePath)
+        {
+            var keyValueDict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
+
+            foreach (var line in File.ReadAllLines(filePath)
+                                    .Where(l => !string.IsNullOrWhiteSpace(l)))
+            {
+                var columns = line.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
+
+                if (columns.Length >= 2)
+                {
+                    string key = columns[0].Trim();
+                    string value = columns[1].Trim();
+
+                    if (keyValueDict.ContainsKey(key))
+                    {
+                        keyValueDict[key] = value; // 重复键则覆盖
+                    }
+                    else
+                    {
+                        keyValueDict.Add(key, value);
+                    }
+                }
+            }
+
+            return keyValueDict;
+        }
+
+
+        private Dictionary<string, string> ParseInputString(string input)
+        {
+            var result = new Dictionary<string, string>();
+            var items = input.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
+
+            foreach (var item in items)
+            {
+                var parts = item.Trim().Split(',');
+                if (parts.Length != 2)
+                    throw new FormatException($"无效的数据格式: {item}");
+
+                var key = parts[0].Trim().ToUpper();
+                if (string.IsNullOrWhiteSpace(key))
+                    throw new ArgumentException($"参数名不能为空: {item}");
+
+                var value = parts[1].Trim();
+                if (string.IsNullOrWhiteSpace(value))
+                    throw new ArgumentException($"值不能为空: {item}");
+
+                result[key] = value;
+            }
+
+            return result;
+        }
+
+        private static void ReceiveCallback(IAsyncResult ar)
+        {
+            try
+            {
+                object[] state = (object[])ar.AsyncState;
+                NetworkStream stream = (NetworkStream)state[0];
+                byte[] buffer = (byte[])state[1];
+
+                int bytesRead = stream.EndRead(ar);
+                if (bytesRead > 0)
+                {
+                    string response = Encoding.UTF8.GetString(buffer, 0, bytesRead);
+                    Console.WriteLine($"收到响应: {response}");
+                }
+                else
+                {
+                    Console.WriteLine("服务器已关闭连接");
+                }
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine($"接收异常: {ex.Message}");
+            }
+            finally
+            {
+                receiveDone.Set();
+            }
+        }
+
+
+
+
+        private void timer1_Tick(object sender, EventArgs e)
+        {
+            string serverIP = "192.168.110.42";
+            int port = 8008;
+
+            try
+            {
+                using (TcpClient client = new TcpClient())
+                {
+                    // 尝试连接服务器(同步方式,超时约20-30秒)
+                    // 同步连接(带超时)
+                    IAsyncResult connectResult = client.BeginConnect(serverIP, port, null, null);
+                    if (!connectResult.AsyncWaitHandle.WaitOne(5000, true))
+                    {
+                        OperateResult.AppendText("连接超时 (5秒)" + "\n");
+                        return;
+                    }
+
+                    client.EndConnect(connectResult);
+                    OperateResult.AppendText("连接服务器成功!" + "\n");
+
+                    if (client.Connected)
+                    {
+                        //Console.WriteLine("连接服务器成功!");
+
+                        using (NetworkStream stream = client.GetStream())
+                        {
+                            // 发送消息到服务器
+                            string message = "jtauto;27508459";
+                            byte[] sendData = Encoding.UTF8.GetBytes(message);
+                            stream.Write(sendData, 0, sendData.Length);
+                            OperateResult.AppendText($"已发送消息: {message}" + "\n");
+                            string response;
+
+                            ////接收服务器响应
+                            //byte[] receiveBuffer = new byte[102400000];
+                            //stream.BeginRead(receiveBuffer, 0, receiveBuffer.Length, ReceiveCallback, new object[] { stream, receiveBuffer });
+
+                            //// 等待接收完成或超时
+                            //if (!receiveDone.WaitOne(ReceiveTimeout))
+                            //{
+                            //    Console.WriteLine("接收响应超时");
+                            //}
+                            //else
+                            //{
+                            //    response = Encoding.UTF8.GetString(receiveBuffer);
+                            //    Console.WriteLine($"收到响应: {response}");
+                            //}
+
+                            Thread.Sleep(ReceiveTimeout);
+
+
+                            // 发送消息到服务器
+                            message = "GetStatevValues";
+                            sendData = Encoding.UTF8.GetBytes(message);
+                            stream.Write(sendData, 0, sendData.Length);
+                            OperateResult.AppendText($"已发送消息: {message}" + "\n");
+
+                            // 接收服务器响应
+                            //接收服务器响应
+                            byte[] receiveBuffer = new byte[1024000];
+                            stream.BeginRead(receiveBuffer, 0, receiveBuffer.Length, ReceiveCallback, new object[] { stream, receiveBuffer });
+
+                            // 等待接收完成或超时
+                            if (!receiveDone.WaitOne(ReceiveTimeout))
+                            {
+                                OperateResult.AppendText("接收响应超时" + "\n");
+                            }
+                            else
+                            {
+                                response = Encoding.UTF8.GetString(receiveBuffer).TrimEnd('\0');
+                                OperateResult.AppendText($"收到响应: {response}" + "\n");
+                                Dictionary<string, string> hlh = ParseInputString(response);
+                                //                              string a = hlh["1212"];
+                                //                             string b = hlh["1212"];
+
+                                dh.ExecuteSql(" insert into hlh(HLH_ID,HLH_INDATE,SPEEDPV1,SPEEDPV2,ZONE1PV_UP,ZONE1PV_DOWN,ZONE2PV_UP,ZONE2PV_DOWN,ZONE3PV_UP,ZONE3PV_DOWN,ZONE4PV_UP,ZONE4PV_DOWN,ZONE5PV_UP,ZONE5PV_DOWN,ZONE6PV_UP,ZONE6PV_DOWN,ZONE7PV_UP,ZONE7PV_DOWN,ZONE8PV_UP,ZONE8PV_DOWN,ZONE9PV_UP,ZONE9PV_DOWN,ZONE10PV_UP,ZONE10PV_DOWN,ZONE11PV_UP,ZONE11PV_DOWN,ZONE12PV_UP,ZONE12PV_DOWN,FAN1_PV,FAN2_PV,FAN3_PV)" +
+                                    " values (hlh_seq.nextval,sysdate,'" + hlh["SPEEDPV1"] + "','" + hlh["SPEEDPV2"] + "' ,'" + hlh["ZONE1PV_UP"] + "','" + hlh["ZONE1PV_DOWN"] + "','" + hlh["ZONE2PV_UP"] + "','" + hlh["ZONE2PV_DOWN"] + "','" + hlh["ZONE3PV_UP"] + "','" + hlh["ZONE3PV_DOWN"] + "','" + hlh["ZONE4PV_UP"] + "'" +
+                                    ",'" + hlh["ZONE4PV_DOWN"] + "','" + hlh["ZONE5PV_UP"] + "','" + hlh["ZONE5PV_DOWN"] + "','" + hlh["ZONE6PV_UP"] + "','" + hlh["ZONE6PV_DOWN"] + "','" + hlh["ZONE7PV_UP"] + "','" + hlh["ZONE7PV_DOWN"] + "','" + hlh["ZONE8PV_UP"] + "','" + hlh["ZONE8PV_DOWN"] + "','" + hlh["ZONE9PV_UP"] + "'" +
+                                    ",'" + hlh["ZONE9PV_DOWN"] + "','" + hlh["ZONE10PV_UP"] + "','" + hlh["ZONE10PV_DOWN"] + "','" + hlh["ZONE11PV_UP"] + "','" + hlh["ZONE11PV_DOWN"] + "','" + hlh["ZONE12PV_UP"] + "','" + hlh["ZONE12PV_DOWN"] + "','" + hlh["FAN1_PV"] + "','" + hlh["FAN2_PV"] + "','" + hlh["FAN3_PV"] + "'  ) ", "insert");
+
+
+                            }
+
+
+
+                        }
+
+
+                    }
+                }
+            }
+            catch (SocketException ex)
+            {
+                OperateResult.AppendText($"连接失败!错误代码 {ex.ErrorCode}: {ex.Message}" + "\n");
+            }
+            catch (Exception ex)
+            {
+                OperateResult.AppendText($"发生错误: {ex.Message}" + "\n");
+            }
+        }
+    }
+}

+ 126 - 0
UAS_MES_XZC/FunctionCode/Make/Make_CollectHLH.resx

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

+ 34 - 8
UAS_MES_XZC/FunctionCode/Make/Make_CollectNetCode.Designer.cs

@@ -28,11 +28,41 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.components = new System.ComponentModel.Container();
             this.fileSystemWatcher1 = new System.IO.FileSystemWatcher();
+            this.button1 = new System.Windows.Forms.Button();
+            this.timer1 = new System.Windows.Forms.Timer(this.components);
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).BeginInit();
             this.SuspendLayout();
             // 
+            // fileSystemWatcher1
+            // 
+            this.fileSystemWatcher1.EnableRaisingEvents = true;
+            this.fileSystemWatcher1.NotifyFilter = ((System.IO.NotifyFilters)(((((System.IO.NotifyFilters.FileName | System.IO.NotifyFilters.DirectoryName) 
+            | System.IO.NotifyFilters.LastWrite) 
+            | System.IO.NotifyFilters.LastAccess) 
+            | System.IO.NotifyFilters.CreationTime)));
+            this.fileSystemWatcher1.Path = "\\\\192.168.10.1\\othersystem\\Type2Output";
+            this.fileSystemWatcher1.SynchronizingObject = this;
+            this.fileSystemWatcher1.Created += new System.IO.FileSystemEventHandler(this.OnCreated);
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(364, 64);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(141, 49);
+            this.button1.TabIndex = 190;
+            this.button1.Text = "button1";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // timer1
+            // 
+            this.timer1.Enabled = true;
+            this.timer1.Interval = 300000;
+            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+            // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -43,18 +73,12 @@
             this.OperateResult.TabIndex = 189;
             this.OperateResult.Text = "";
             // 
-            // fileSystemWatcher1
-            // 
-            this.fileSystemWatcher1.EnableRaisingEvents = true;
-            this.fileSystemWatcher1.Path = "\\\\192.168.10.1\\othersystem\\Type2Output";
-            this.fileSystemWatcher1.SynchronizingObject = this;
-            this.fileSystemWatcher1.Created += new System.IO.FileSystemEventHandler(this.OnCreated);
-            // 
             // Make_CollectNetCode
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1112, 680);
+            this.Controls.Add(this.button1);
             this.Controls.Add(this.OperateResult);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
@@ -74,5 +98,7 @@
 
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private System.IO.FileSystemWatcher fileSystemWatcher1;
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Timer timer1;
     }
 }

+ 345 - 17
UAS_MES_XZC/FunctionCode/Make/Make_CollectNetCode.cs

@@ -6,6 +6,8 @@ using System.Data;
 using System.Drawing;
 using System.IO;
 using System.Linq;
+using System.Net.Sockets;
+using System.Net;
 using System.Text;
 using System.Windows.Forms;
 using System.Xml;
@@ -49,22 +51,16 @@ namespace UAS_MES_NEW.Make
             asc.controllInitializeSize(this);
             dh = SystemInf.dh;
 
-            //string sharedFolderPath = @"\\192.168.10.1\othersystem\Type2Output";
+            string sharedFolderPath = @"\\192.168.10.1\othersystem\Type2Output";
+            sharedFolderPath = @"D:\mes";
 
-            //// 确保路径以反斜杠结尾,以便正确监控目录
-            //if (!sharedFolderPath.EndsWith("\\"))
-            //{
-            //    sharedFolderPath += "\\";
-            //}
-
-            ////string sharedFolderPath = @"D:\mes";
+            sharedFolderPath = @"\\192.168.10.1\othersystem\PickupInformation";
+            sharedFolderPath = @"D:\标签";
             ////// 确保路径以反斜杠结尾,以便正确监控目录
             ////if (!sharedFolderPath.EndsWith("\\"))
             ////{
             ////    sharedFolderPath += "\\";
             ////}
-
-
             //// 创建FileSystemWatcher实例
             //watcher = new FileSystemWatcher
             //{
@@ -81,6 +77,7 @@ namespace UAS_MES_NEW.Make
             //watcher.Deleted += OnDeleted;
             //watcher.Renamed += OnRenamed;
             OperateResult.AppendText(DateTime.Now+" 开始监控文件夹: " + fileSystemWatcher1.Path+ "\n");
+            //OperateResult.AppendText(DateTime.Now + " 开始监控文件夹: " + fileSystemWatcher2.Path + "\n");
         }
 
         // 文件创建事件处理程序
@@ -197,6 +194,8 @@ namespace UAS_MES_NEW.Make
                     string linecode = "";
                     string table = "";
                     string psid = "";
+                    string code2 = "";
+                    string psid2 = "";
                     foreach (XmlNode element in elements)
                     {
                         // 提取并打印每个子节点的值
@@ -205,6 +204,7 @@ namespace UAS_MES_NEW.Make
                         string stage = element["Stage"].InnerText;
                         string lane = element["Lane"].InnerText;//轨道 1 2 分别为1线2线
                         string mjsFileName = element["MjsFileName"].InnerText.Split('.')[0];//产品料号
+                        string mjsFileNameZS = element["MjsFileName"].InnerText.Split('.')[0]+"-ZS";//产品料号追溯用
                         string mjsGroupName = element["MjsGroupName"].InnerText;
                         string lotName = element["LotName"].InnerText;//程序具体名 有BOT的为B面 否则为A面
                         string lotNumber = element["LotNumber"].InnerText;
@@ -236,9 +236,11 @@ namespace UAS_MES_NEW.Make
                         //Console.WriteLine($"FdrPitch: {fdrPitch}");
                         //Console.WriteLine($"Skip: {skip}");
                         //Console.WriteLine(); // 空行分隔不同的<Element>节点信息
+                        //站位上料用站位表
                         if (i == 1)
                         {
-                            linecode = lane == "1" ? "SMT01" : "SMT02";
+                            //linecode = lane == "1" ? "SMT01" : "SMT02";
+                            linecode = "SMT0" + lane;
                             table = lotName.EndsWith("-B") ? "B" : "A";
                             if (!dh.CheckExist("productsmt", "ps_prodcode = '" + mjsFileName + "' " +
                                 "and ps_linecode = '" + linecode + "' and ps_table = '" + table + "'"))
@@ -260,17 +262,56 @@ namespace UAS_MES_NEW.Make
                             // Console.WriteLine("第一个");
                         }
 
-                        if (!partsCount.Equals("0"))
-                        {
+                        //if (!partsCount.Equals("0"))
+                        //{
+                            //dh.ExecuteSql(" insert into productsmtlocation (PSL_PSID, PSL_ID, PSL_DETNO, PSL_PRODCODE, PSL_REPCODE, PSL_LOCATION, PSL_BASEQTY, PSL_TABLE)" +
+                            //    " select " + psid + ",productsmtlocation_seq.nextval,sli_id,'" + partsName + "','" + partsName + "',sli_location,1,'" + table + "' from smtlocationinto where sli_mcno = '" + mcNo + "' and sli_fadd ='" + fAdd + "' and instr(sli_fsadd,'" + fSAdd + "')>0 ", "insert");
+                            //OperateResult.AppendText(DateTime.Now + $" 插入机器:{mcNo},轨道:{lane},料号:{partsName},机器站位:{fAdd},左右:{fSAdd}\n");
+
                             dh.ExecuteSql(" insert into productsmtlocation (PSL_PSID, PSL_ID, PSL_DETNO, PSL_PRODCODE, PSL_REPCODE, PSL_LOCATION, PSL_BASEQTY, PSL_TABLE)" +
-                                " select " + psid + ",productsmtlocation_seq.nextval,sli_id,'" + partsName + "','" + partsName + "',sli_location,1,'" + table + "' from smtlocationinto where sli_mcno = '" + mcNo + "' and sli_fadd ='" + fAdd + "' and instr(sli_fsadd,'" + fSAdd + "')>0 ", "insert");
+                                 " select " + psid + ",productsmtlocation_seq.nextval,sli_id,'" + partsName + "','" + partsName + "',sli_location,1,'" + table + "' from smtlocationinto where sli_mcno = '" + mcNo + "' and sli_lane ='" + lane + "' and sli_fadd ='" + fAdd + "' and instr(sli_fsadd,'" + fSAdd + "')>0 ", "insert");
                             OperateResult.AppendText(DateTime.Now + $" 插入机器:{mcNo},轨道:{lane},料号:{partsName},机器站位:{fAdd},左右:{fSAdd}\n");
+                        //}
 
-                            //dh.ExecuteSql(" insert into productsmtlocation (PSL_PSID, PSL_ID, PSL_DETNO, PSL_PRODCODE, PSL_REPCODE, PSL_LOCATION, PSL_BASEQTY, PSL_TABLE)" +
-                            //     " select " + psid + ",productsmtlocation_seq.nextval,sli_id,'" + partsName + "','" + partsName + "',sli_location,1,'" + table + "' from smtlocationinto where sli_mcno = '" + mcNo + "' and sli_lane ='" + lane + "' and sli_fadd ='" + fAdd + "' and instr(sli_fsadd,'" + fSAdd + "')>0 ", "insert");
-                            //OperateResult.AppendText(DateTime.Now + $" 插入机器:{mcNo},轨道:{lane},料号:{partsName},机器站位:{fAdd},左右:{fSAdd}\n");
+                        //扣料追溯用站位表
+                        if (i == 1)
+                        {
+                            //linecode = lane == "1" ? "SMT01" : "SMT02";
+                            linecode = "SMT0" + lane;
+                            table = lotName.EndsWith("-B") ? "B" : "A";
+                            if (!dh.CheckExist("productsmt", "ps_prodcode = '" + mjsFileNameZS + "' " +
+                                "and ps_linecode = '" + linecode + "' and ps_table = '" + table + "'"))
+                            {
+                                LogicHandler.GetSerialNumByCaller("PRODUCTSMT", out code2);
+                                psid2 = dh.GetSEQ("productsmt_seq");
+                                dh.ExecuteSql(" insert into productsmt(PS_ID, PS_CODE, PS_PRODCODE, PS_LINECODE, PS_TABLE, PS_STATUS, PS_INDATE," +
+                                    " PS_INMAN, PS_AUDITDATE, PS_AUDITMAN, PS_STATUSCODE) values (" + psid2 + ",'" + code2 + "','" + mjsFileNameZS + "','" + linecode + "'" +
+                                    ",'" + table + "','已审核',sysdate,'管理员',sysdate,'管理员','AUDITED') ", "insert");
+                                OperateResult.AppendText(DateTime.Now + $" 新增站位主表,料号:{mjsFileNameZS},线体:{linecode},板面:{table}\n");
+                            }
+                            else
+                            {
+                                psid2 = dh.getFieldDataByCondition("productsmt", "ps_id", " ps_prodcode = '" + mjsFileNameZS + "' and ps_linecode = '" + linecode + "' and ps_table = '" + table + "' ").ToString();
+                                dh.ExecuteSql(" delete productsmtlocation where psl_psid = " + psid2 + " " +
+                                    "and psl_location in (select sli_location from SMTLOCATIONINTO where SLI_MCNO = '" + mcNo + "' ) ", "delete");
+                                OperateResult.AppendText(DateTime.Now + $" 已存在站位主表,料号:{mjsFileNameZS},线体:{linecode},板面:{table},删除机器:{mcNo}站位\n");
+                            }
+                            // Console.WriteLine("第一个");
                         }
 
+                        if (!partsCount.Equals("0"))
+                        {
+                            dh.ExecuteSql(" insert into productsmtlocation (PSL_PSID, PSL_ID, PSL_DETNO, PSL_PRODCODE, PSL_REPCODE, PSL_LOCATION, PSL_BASEQTY, PSL_TABLE)" +
+                                " select " + psid2 + ",productsmtlocation_seq.nextval,sli_id,'" + partsName + "','" + partsName + "',sli_location,1,'" + table + "' from smtlocationinto where sli_mcno = '" + mcNo + "' and sli_fadd ='" + fAdd + "' and instr(sli_fsadd,'" + fSAdd + "')>0 ", "insert");
+                            OperateResult.AppendText(DateTime.Now + $" 插入机器:{mcNo},轨道:{lane},料号:{partsName},机器站位:{fAdd},左右:{fSAdd}\n");
+                        }
+                        else if(dh.CheckExist("smtlocationinto","sli_mcno = '"+mcNo+"' and sli_fadd = '"+fAdd+"' and sli_type = '托盘'")&& dh.CheckExist("productsmtlocation", "PSL_PSID = '" + psid2 + "' and psl_prodcode = '" + partsName + "'"))
+                        {
+                                dh.ExecuteSql(" insert into productsmtlocation (PSL_PSID, PSL_ID, PSL_DETNO, PSL_PRODCODE, PSL_REPCODE, PSL_LOCATION, PSL_BASEQTY, PSL_TABLE)" +
+                               " select " + psid2 + ",productsmtlocation_seq.nextval,sli_id,'" + partsName + "','" + partsName + "',sli_location,1,'" + table + "' from smtlocationinto where sli_mcno = '" + mcNo + "' and sli_fadd ='" + fAdd + "' and instr(sli_fsadd,'" + fSAdd + "')>0 ", "insert");
+                                OperateResult.AppendText(DateTime.Now + $" 插入机器:{mcNo},轨道:{lane},料号:{partsName},机器站位:{fAdd},左右:{fSAdd}\n");
+                            
+                        }
 
                         i++;
                     }
@@ -329,6 +370,293 @@ namespace UAS_MES_NEW.Make
         {
             // 释放资源
             fileSystemWatcher1.Dispose();
+            timer1.Dispose();
+        }
+
+        private void fileSystemWatcher2_Created(object sender, FileSystemEventArgs e)
+        {
+            int i = 0;
+            try
+            {
+                OperateResult.AppendText(DateTime.Now + " 文件创建: " + e.FullPath + "\n");
+                if (e.FullPath.Contains("dat"))
+                {
+                //    i = PLGET(e, i);
+                }
+
+            }
+            catch (Exception ex)
+            {
+                OperateResult.AppendText(i+" "+DateTime.Now + " " + ex.Message + "\n");
+            }
+        }
+
+        private void PLGET(String path)
+        {
+            int i = 0;
+            bool ql = false;
+            try
+            {
+                string[] lines = File.ReadAllLines(path);
+                // 解析文件内容
+                List<string> locations = new List<string>();
+                List<string> pickups = new List<string>();
+                List<string> PMisss = new List<string>();
+                List<string> RMisss = new List<string>();
+                List<string> DMisss = new List<string>();
+                List<string> MMisss = new List<string>();
+                List<string> HMisss = new List<string>();
+                List<string> TRSMisss = new List<string>();
+                List<string> ChangeCounts = new List<string>();
+
+                foreach (string line in lines)
+                {
+                    if (!line.StartsWith("[PlotInfo]") && !line.StartsWith("MCNo") && line.Trim() != "") // 跳过标题行
+                    {
+                        string[] fields = line.Split(' ');
+                        // 提取字段
+                        String mcNo = fields[0];
+                        String lane = fields[1];
+                        String fAdd = fields[2];
+                        String fsAdd = fields[3];
+                        string partsName = fields[4].Trim('"');
+                        string feederSerial = fields[5].Trim('"');
+                        Double pickup = Double.Parse(fields[6]);
+                        Double needpickup = Double.Parse(fields[6]);
+                        Double PMiss = Double.Parse(fields[7]);
+                        Double RMiss = Double.Parse(fields[8]);
+                        Double DMiss = Double.Parse(fields[9]);
+                        Double MMiss = Double.Parse(fields[10]);
+                        Double HMiss = Double.Parse(fields[11]);
+                        Double TRSMiss = Double.Parse(fields[12]);
+                        Double ChangeCount = Double.Parse(fields[14]);
+                        String location = "";
+                        // ... 其他字段
+                        // 处理数据
+                        if (pickup > 0)
+                        {
+                            location = dh.getFieldDataByCondition("smtlocationinto", "sli_location", "sli_mcno = '" + mcNo + "' " +
+                                "and sli_fadd ='" + fAdd + "' and instr(sli_fsadd,'" + fsAdd + "')>0").ToString();
+                            locations.Add(location);
+                            pickups.Add(pickup.ToString());
+                            PMisss.Add(PMiss.ToString());
+                            RMisss.Add(RMiss.ToString());
+                            DMisss.Add(DMiss.ToString());
+                            MMisss.Add(MMiss.ToString());
+                            HMisss.Add(HMiss.ToString());
+                            TRSMisss.Add(TRSMiss.ToString());
+                            ChangeCounts.Add(ChangeCount.ToString());
+                            //OperateResult.AppendText(DateTime.Now + $"料号: {mcNo}, 轨道: {lane},fAdd: {fAdd} ," +
+                            //      $"fsAdd: {fsAdd},站位:{location} PartsName: {partsName}, FeederSerial: {feederSerial},pickup: {pickup}" + "\n");
+                            double reaminqtysum = Double.Parse(dh.getFieldDataByCondition("DEVSMTLOCATION", "nvl(sum(DSL_REMAINQTY),0)", " dsl_location = '" + location + "' ").ToString());
+                            if (reaminqtysum < pickup)
+                            {
+                                OperateResult.AppendText(DateTime.Now + $"站位:{location}缺料 {pickup}" + "\n", Color.OrangeRed);
+                                ql = true;
+                            }
+                            else
+                            {
+                                DataTable dt = (DataTable)dh.ExecuteSql(" select dsl_id,dsl_remainqty,dsl_barcode from DEVSMTLOCATION " +
+                                    "where dsl_location = '" + location + "' and nvl(DSL_USABLE,0)<>2 and dsl_remainqty >0 order by dsl_id asc ", "select");
+                                for (int j = 0; j < dt.Rows.Count; j++)
+                                {
+                                    if (needpickup > 0)
+                                    {
+                                        double v_v_useqty = 0;
+                                        if (double.Parse(dt.Rows[j]["dsl_remainqty"].ToString()) >= needpickup || j == dt.Rows.Count - 1)
+                                        {
+                                            v_v_useqty = needpickup;
+                                            needpickup = 0;
+                                            dh.UpdateByCondition("DEVSMTLOCATION", "dsl_remainqty= dsl_remainqty - " + v_v_useqty + ",dsl_validtime=(case when dsl_validtime is null then sysdate else dsl_validtime end) ", "dsl_id=" + dt.Rows[j]["dsl_id"].ToString() + "");
+                                        }
+                                        else
+                                        {
+                                            v_v_useqty = double.Parse(dt.Rows[j]["dsl_remainqty"].ToString());
+                                            needpickup = needpickup - v_v_useqty;
+                                            dh.UpdateByCondition("DEVSMTLOCATION", "dsl_remainqty= dsl_remainqty - " + v_v_useqty + ",dsl_validtime=(case when dsl_validtime is null then sysdate else dsl_validtime end) ", "dsl_id=" + dt.Rows[j]["dsl_id"].ToString() + "");
+                                        }
+
+                                    }
+                                }
+                                dh.UpdateByCondition("DEVSMTLOCATION", "DSL_USABLE= 2,dsl_invalidtime=(case when dsl_invalidtime is null then sysdate else dsl_invalidtime end)   ", "dsl_location='" + location + "' and nvl(dsl_remainqty,0)<=0");
+                                OperateResult.AppendText(DateTime.Now + $"站位:{location}扣料{pickup}成功" + "\n", Color.Black);
+                            }
+
+                        }
+                        i++;
+                        // ... 其他处理
+                    }
+                }
+                if (locations.Count > 0)
+                {
+                    dh.BatchInsert("insert into PLOTDATA(PD_ID,PD_LOCATION,PD_PICKUP,PD_PMISS,PD_RMISS,PD_DMISS,PD_MMISS,PD_HMISS,PD_TRSMISS,PD_CHANGECOUNT,PD_DATE) " +
+                        "values (PLOTDATA_seq.nextval,:locations,:pickups,:PMisss,:RMisss,:DMisss,:MMisss,:HMisss,:TRSMisss,:ChangeCounts,sysdate)", 
+                        new string[] { "locations", "pickups", "PMisss", "RMisss", "DMisss", "MMisss", "HMisss", "TRSMisss", "ChangeCounts" },
+                        locations.ToArray(), pickups.ToArray(), PMisss.ToArray(), RMisss.ToArray(), DMisss.ToArray(), MMisss.ToArray(), HMisss.ToArray(), TRSMisss.ToArray(), ChangeCounts.ToArray());
+                }
+                if (ql)
+                {
+                    OperateResult.AppendText(DateTime.Now + $"SMT缺料提醒" + "\n", Color.Blue);
+                }
+            }
+            catch (Exception ex)
+            {
+                OperateResult.AppendText(i + " " + DateTime.Now + " " + ex.Message + "\n");
+            }
+
+
+        }
+
+        private void fileSystemWatcher2_Changed(object sender, FileSystemEventArgs e)
+        {
+            OperateResult.AppendText(DateTime.Now + " 文件修改: " + e.FullPath + "\n");
+        }
+
+        private void fileSystemWatcher2_Deleted(object sender, FileSystemEventArgs e)
+        {
+            OperateResult.AppendText(DateTime.Now + " 文件删除: " + e.FullPath + "\n");
+        }
+
+        private void fileSystemWatcher2_Renamed(object sender, RenamedEventArgs e)
+        {
+            OperateResult.AppendText(DateTime.Now + " 文件重命名: " + e.FullPath + "\n");
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+
+            //OperateResult.AppendText(DateTime.Now + $"SMT缺料提醒" + "\n", Color.Blue);
+            //string folderPath = @"\\192.168.10.1\othersystem\PickupInformation"; // 替换为你的文件夹路径
+            //var datFilesSortedByModificationTime = GetDatFilesSortedByModificationTime(folderPath);
+            //int c = 0;
+            //String address = "";
+            //String path = "";
+            //foreach (var file in datFilesSortedByModificationTime)
+            //{
+            //    if (c == 0)
+            //    {
+            //        address = Path.GetFileName(file.Item1);
+            //        if (!dh.CheckExist("plot", "pl_ip = '" + GetLocalIPAddress() + "'"))
+            //        {
+            //            PLGET(file.Item1);
+            //            OperateResult.AppendText(DateTime.Now + $"文件: {file.Item1},文件名:{Path.GetFileName(file.Item1)} 修改时间: {file.Item2}" + "\n");
+            //            break;
+            //        }
+            //        else
+            //        {
+            //            path = dh.getFieldDataByCondition("plot", "pl_address", "pl_ip = '" + GetLocalIPAddress() + "'").ToString();
+            //            if (Path.GetFileName(file.Item1).CompareTo(path) > 0)
+            //            {
+            //                PLGET(file.Item1);
+            //                OperateResult.AppendText(DateTime.Now + $"文件: {file.Item1},文件名:{Path.GetFileName(file.Item1)} 修改时间: {file.Item2}" + "\n");
+            //            }
+            //        }
+            //    }
+            //    else
+            //    {
+            //        path = dh.getFieldDataByCondition("plot", "pl_address", "pl_ip = '" + GetLocalIPAddress() + "'").ToString();
+            //        if (Path.GetFileName(file.Item1).CompareTo(path) > 0)
+            //        {
+            //            PLGET(file.Item1);
+            //            OperateResult.AppendText(DateTime.Now + $"文件: {file.Item1},文件名:{Path.GetFileName(file.Item1)} 修改时间: {file.Item2}" + "\n");
+            //        }
+            //    }
+            //    c++;
+            //}
+            //if (!dh.CheckExist("plot", "pl_ip = '" + GetLocalIPAddress() + "'"))
+            //{
+            //    dh.ExecuteSql("insert into plot(pl_ip,pl_address,pl_date) values ('" + GetLocalIPAddress() + "','" + address + "',sysdate)  ", "select");
+            //}
+            //else
+            //{
+            //    dh.UpdateByCondition("plot", "pl_address = '" + address + "',pl_date = sysdate", "pl_ip = '" + GetLocalIPAddress() + "'");
+            //}
+
+            timer1_Tick(sender, e);
+
+        }
+
+        static string GetLocalIPAddress()
+        {
+            IPHostEntry IpEntry = Dns.GetHostEntry(Dns.GetHostName());
+            string IPAddress = "";
+            for (int i = 0; i < IpEntry.AddressList.Length; i++)
+            {
+                if (IpEntry.AddressList[i].AddressFamily == AddressFamily.InterNetwork)
+                    IPAddress = IpEntry.AddressList[i].ToString();
+            }
+            return IPAddress;
+            //throw new InvalidOperationException("没有找到IPv4地址。");
+        }
+
+
+        static List<Tuple<string, DateTime>> GetDatFilesSortedByModificationTime(string folderPath)
+        {
+            var datFiles = new List<Tuple<string, DateTime>>();
+
+            // 遍历指定文件夹及其所有子文件夹
+            foreach (var file in Directory.GetFiles(folderPath, "*.dat", SearchOption.AllDirectories))
+            {
+                // 获取文件的最后修改时间
+                var lastWriteTime = File.GetLastWriteTime(file);
+                // 将文件路径和修改时间添加到列表中
+                datFiles.Add(new Tuple<string, DateTime>(file, lastWriteTime));
+            }
+
+            // 根据修改时间对文件进行排序(升序)
+            var sortedDatFiles = datFiles.OrderByDescending(file => file.Item2).ToList();
+
+            return sortedDatFiles;
+        }
+
+        private void timer1_Tick(object sender, EventArgs e)
+        {
+            dh.ExecuteSql("delete plot where pl_date<sysdate - 2/24", "delete");
+            string folderPath = @"\\192.168.10.1\othersystem\PickupInformation"; // 替换为你的文件夹路径
+            var datFilesSortedByModificationTime = GetDatFilesSortedByModificationTime(folderPath);
+            int c = 0;
+            String address = "";
+            String path = "";
+            foreach (var file in datFilesSortedByModificationTime)
+            {
+                if (c == 0)
+                {
+                    address = Path.GetFileName(file.Item1);
+                    if (!dh.CheckExist("plot", "pl_ip = '" + GetLocalIPAddress() + "'"))
+                    {
+                        PLGET(file.Item1);
+                        OperateResult.AppendText(DateTime.Now + $"抛料文件: {file.Item1},文件名:{Path.GetFileName(file.Item1)} 修改时间: {file.Item2}" + "\n");
+                        break;
+                    }
+                    else
+                    {
+                        path = dh.getFieldDataByCondition("plot", "pl_address", "pl_ip = '" + GetLocalIPAddress() + "'").ToString();
+                        if (Path.GetFileName(file.Item1).CompareTo(path) > 0)
+                        {
+                            PLGET(file.Item1);
+                            OperateResult.AppendText(DateTime.Now + $"抛料文件: {file.Item1},文件名:{Path.GetFileName(file.Item1)} 修改时间: {file.Item2}" + "\n");
+                        }
+                    }
+                }
+                else
+                {
+                    path = dh.getFieldDataByCondition("plot", "pl_address", "pl_ip = '" + GetLocalIPAddress() + "'").ToString();
+                    if (Path.GetFileName(file.Item1).CompareTo(path) > 0)
+                    {
+                        PLGET(file.Item1);
+                        OperateResult.AppendText(DateTime.Now + $"抛料文件: {file.Item1},文件名:{Path.GetFileName(file.Item1)} 修改时间: {file.Item2}" + "\n");
+                    }
+                }
+                c++;
+            }
+            if (!dh.CheckExist("plot", "pl_ip = '" + GetLocalIPAddress() + "'"))
+            {
+                dh.ExecuteSql("insert into plot(pl_ip,pl_address,pl_date) values ('" + GetLocalIPAddress() + "','" + address + "',sysdate)  ", "select");
+            }
+            else
+            {
+                dh.UpdateByCondition("plot", "pl_address = '" + address + "',pl_date = sysdate", "pl_ip = '" + GetLocalIPAddress() + "'");
+            }
         }
     }
 }

+ 3 - 0
UAS_MES_XZC/FunctionCode/Make/Make_CollectNetCode.resx

@@ -120,4 +120,7 @@
   <metadata name="fileSystemWatcher1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
+  <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>489, 17</value>
+  </metadata>
 </root>

+ 2 - 2
UAS_MES_XZC/FunctionCode/Make/Make_FeedingCollection.cs

@@ -165,7 +165,7 @@ namespace UAS_MES_NEW.Make
                                 if (CollectData.Contains(code.Text) && sp_ifrepeat != "-1")
                                 {
                                     OperateResult.AppendText(">>条码" + code.Text + "已经上料\n", Color.Red, code);
-                                    //ClearSn_code_Click(sender, e);
+                                    ClearSn_code_Click(sender, e);
                                     return;
                                 }
                                 if (sp_checkbarcode != "")
@@ -197,7 +197,7 @@ namespace UAS_MES_NEW.Make
                                 SetCheck set = new SetCheck("NG", Color.Red);
                                 BaseUtil.SetFormCenter(set);
                                 set.ShowDialog();
-                                //ClearSn_code_Click(sender, e);
+                                ClearSn_code_Click(sender, e);
                             }
                         }
                     }

+ 7 - 0
UAS_MES_XZC/FunctionCode/Make/Make_FeedingCollectionCombineFix.cs

@@ -199,6 +199,7 @@ namespace UAS_MES_NEW.Make
                                     if (!LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sn_code.Text, "上料采集", "上料成功", User.UserCode, out ErrorMessage))
                                     {
                                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                                        ClearSn_code_Click(sender, e);
                                     }
                                     else
                                     {
@@ -244,6 +245,7 @@ namespace UAS_MES_NEW.Make
                                                 if (sp_ifbeforhandle == "是")
                                                 {
                                                     OperateResult.AppendText(">>预加工条码" + code.Text + "未绑定所有指定物料,请在预加工界面核对\n", Color.Red, code);
+                                                    ClearSn_code_Click(sender, e);
                                                     SetCheck set1 = new SetCheck("NG", Color.Red);
                                                     BaseUtil.SetFormCenter(set1);
                                                     set1.ShowDialog();
@@ -252,6 +254,7 @@ namespace UAS_MES_NEW.Make
                                                 if (dh.CheckExist("BEFOREHANDPROCESS", "bhp_barcode='" + code.Text + "'"))
                                                 {
                                                     OperateResult.AppendText(">>条码" + code.Text + "已在预加工绑定主板,不允许上料\n", Color.Red, code);
+                                                    ClearSn_code_Click(sender, e);
                                                     SetCheck set1 = new SetCheck("NG", Color.Red);
                                                     BaseUtil.SetFormCenter(set1);
                                                     set1.ShowDialog();
@@ -260,6 +263,7 @@ namespace UAS_MES_NEW.Make
                                                 if (CollectData.Contains(code.Text))
                                                 {
                                                     OperateResult.AppendText(">>条码" + code.Text + "已经上料\n", Color.Red, code);
+                                                    ClearSn_code_Click(sender, e);
                                                     return;
                                                 }
                                                 CollectDataSonCode.Add(sp_soncode);
@@ -275,6 +279,7 @@ namespace UAS_MES_NEW.Make
                                             else
                                             {
                                                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
+                                                ClearSn_code_Click(sender, e);
                                                 SetCheck set = new SetCheck("NG", Color.Red);
                                                 BaseUtil.SetFormCenter(set);
                                                 set.ShowDialog();
@@ -308,6 +313,7 @@ namespace UAS_MES_NEW.Make
                                         SPID.Clear();
                                         if (!LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sn_code.Text, "上料采集", "上料成功", User.UserCode, out ErrorMessage))
                                         {
+                                            ClearSn_code_Click(sender, e);
                                             OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                                         }
                                         else
@@ -340,6 +346,7 @@ namespace UAS_MES_NEW.Make
                             else
                             {
                                 OperateResult.AppendText(">>条码" + code.Text + "已经上料\n", Color.Red, code);
+                                ClearSn_code_Click(sender, e);
                                 SetCheck set = new SetCheck("NG", Color.Red);
                                 BaseUtil.SetFormCenter(set);
                                 set.ShowDialog();

+ 3 - 1
UAS_MES_XZC/FunctionCode/Make/Make_PreFeedingCollection.cs

@@ -174,9 +174,10 @@ namespace UAS_MES_NEW.Make
                             if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
                             {
                                 //查询条码是否存在预加工列表
-                                if (dh.CheckExist("BEFOREHANDPROCESS", "bhp_barcode='" + code.Text + "'"))
+                                if (dh.CheckExist("BEFOREHANDPROCESS", "bhp_barcode='" + code.Text + "'") && sp_ifrepeat != "-1")
                                 {
                                     OperateResult.AppendText(">> 条码" + code.Text + "已经上料\n", Color.Red, code);
+                                    ClearSn_code_Click(sender, e);
                                     return;
                                 }
                                 //获取的主条码和绑定条码必须一致
@@ -213,6 +214,7 @@ namespace UAS_MES_NEW.Make
                             else
                             {
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
+                                ClearSn_code_Click(sender, e);
                                 SetCheck set = new SetCheck("NG", Color.Red);
                                 BaseUtil.SetFormCenter(set);
                                 set.ShowDialog();

+ 241 - 114
UAS_MES_XZC/FunctionCode/Query/Query_ExeProgress.Designer.cs

@@ -31,11 +31,22 @@
             this.sn_code_label = new System.Windows.Forms.Label();
             this.SerialPanel = new System.Windows.Forms.Panel();
             this.ma_code_label = new System.Windows.Forms.Label();
-            this.ma_code = new System.Windows.Forms.Label();
+            this.ma_code = new System.Windows.Forms.TextBox();
             this.label5 = new System.Windows.Forms.Label();
-            this.ms_checkno = new System.Windows.Forms.Label();
+            this.pallet = new System.Windows.Forms.TextBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.ms_outboxcode = new System.Windows.Forms.TextBox();
+            this.ms_checkno = new System.Windows.Forms.TextBox();
             this.label7 = new System.Windows.Forms.Label();
-            this.ms_firstsn = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.CraftmaterialData = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.CraftInfDgv = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
             this.groupBoxWithBorder1 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.label1 = new System.Windows.Forms.Label();
@@ -47,16 +58,19 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.barcode = new System.Windows.Forms.TextBox();
+            this.label9 = new System.Windows.Forms.Label();
             this.mp_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.MP_SNOUTBOXCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mp_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ma_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mp_sourcecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_stepname = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mp_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ma_craftcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.sc_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mp_inman = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.em_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.CraftmaterialData)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
@@ -69,10 +83,10 @@
             // 
             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(20, 26);
-            this.sn_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.sn_code_label.Location = new System.Drawing.Point(18, 12);
+            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(114, 41);
+            this.sn_code_label.Size = new System.Drawing.Size(86, 31);
             this.sn_code_label.TabIndex = 183;
             this.sn_code_label.Text = "序列号";
             // 
@@ -82,10 +96,9 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.SerialPanel.AutoScroll = true;
             this.SerialPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.SerialPanel.Location = new System.Drawing.Point(28, 212);
-            this.SerialPanel.Margin = new System.Windows.Forms.Padding(4);
+            this.SerialPanel.Location = new System.Drawing.Point(21, 159);
             this.SerialPanel.Name = "SerialPanel";
-            this.SerialPanel.Size = new System.Drawing.Size(1896, 504);
+            this.SerialPanel.Size = new System.Drawing.Size(1418, 266);
             this.SerialPanel.TabIndex = 194;
             this.SerialPanel.Scroll += new System.Windows.Forms.ScrollEventHandler(this.SerialPanel_Scroll);
             this.SerialPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.SerialPanel_Paint);
@@ -94,70 +107,158 @@
             // 
             this.ma_code_label.AutoSize = true;
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(514, 24);
-            this.ma_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_code_label.Location = new System.Drawing.Point(363, 12);
+            this.ma_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_code_label.Name = "ma_code_label";
-            this.ma_code_label.Size = new System.Drawing.Size(114, 41);
+            this.ma_code_label.Size = new System.Drawing.Size(86, 31);
             this.ma_code_label.TabIndex = 195;
             this.ma_code_label.Text = "工单号";
             // 
             // ma_code
             // 
-            this.ma_code.AutoSize = true;
             this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code.Location = new System.Drawing.Point(664, 26);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_code.Location = new System.Drawing.Point(459, 8);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ma_code.Name = "ma_code";
-            this.ma_code.Size = new System.Drawing.Size(0, 41);
+            this.ma_code.Size = new System.Drawing.Size(198, 39);
             this.ma_code.TabIndex = 196;
             // 
             // label5
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label5.Location = new System.Drawing.Point(944, 26);
-            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Location = new System.Drawing.Point(987, 12);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(146, 41);
+            this.label5.Size = new System.Drawing.Size(86, 31);
             this.label5.TabIndex = 197;
-            this.label5.Text = "抽检批号";
+            this.label5.Text = "栈板号";
+            // 
+            // pallet
+            // 
+            this.pallet.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pallet.Location = new System.Drawing.Point(1068, 8);
+            this.pallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pallet.Name = "pallet";
+            this.pallet.Size = new System.Drawing.Size(188, 39);
+            this.pallet.TabIndex = 198;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label6.Location = new System.Drawing.Point(660, 12);
+            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(110, 31);
+            this.label6.TabIndex = 199;
+            this.label6.Text = "卡通箱号";
+            // 
+            // ms_outboxcode
+            // 
+            this.ms_outboxcode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ms_outboxcode.Location = new System.Drawing.Point(766, 8);
+            this.ms_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ms_outboxcode.Name = "ms_outboxcode";
+            this.ms_outboxcode.Size = new System.Drawing.Size(205, 39);
+            this.ms_outboxcode.TabIndex = 200;
             // 
             // ms_checkno
             // 
-            this.ms_checkno.AutoSize = true;
             this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ms_checkno.Location = new System.Drawing.Point(1124, 26);
-            this.ms_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_checkno.Location = new System.Drawing.Point(138, 54);
+            this.ms_checkno.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ms_checkno.Name = "ms_checkno";
-            this.ms_checkno.Size = new System.Drawing.Size(0, 41);
-            this.ms_checkno.TabIndex = 198;
+            this.ms_checkno.Size = new System.Drawing.Size(216, 39);
+            this.ms_checkno.TabIndex = 203;
             // 
             // 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(1386, 24);
-            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label7.Location = new System.Drawing.Point(18, 58);
+            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(178, 41);
-            this.label7.TabIndex = 199;
-            this.label7.Text = "内部序列号";
-            // 
-            // ms_firstsn
-            // 
-            this.ms_firstsn.AllPower = null;
-            this.ms_firstsn.BackColor = System.Drawing.Color.White;
-            this.ms_firstsn.ID = null;
-            this.ms_firstsn.Location = new System.Drawing.Point(1576, 30);
-            this.ms_firstsn.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
-            this.ms_firstsn.Name = "ms_firstsn";
-            this.ms_firstsn.Power = null;
-            this.ms_firstsn.Size = new System.Drawing.Size(286, 35);
-            this.ms_firstsn.Str = null;
-            this.ms_firstsn.Str1 = null;
-            this.ms_firstsn.Str2 = null;
-            this.ms_firstsn.TabIndex = 201;
-            this.ms_firstsn.Tag = "NoAuto";
+            this.label7.Size = new System.Drawing.Size(110, 31);
+            this.label7.TabIndex = 202;
+            this.label7.Text = "抽检批号";
+            // 
+            // CraftmaterialData
+            // 
+            this.CraftmaterialData.AllowUserToAddRows = false;
+            this.CraftmaterialData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+            this.CraftmaterialData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.CraftmaterialData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.dataGridViewTextBoxColumn1,
+            this.dataGridViewTextBoxColumn2,
+            this.dataGridViewTextBoxColumn3,
+            this.dataGridViewTextBoxColumn4,
+            this.dataGridViewTextBoxColumn5,
+            this.dataGridViewTextBoxColumn6,
+            this.dataGridViewTextBoxColumn7,
+            this.dataGridViewTextBoxColumn8});
+            this.CraftmaterialData.EnableContentClick = true;
+            this.CraftmaterialData.Location = new System.Drawing.Point(21, 434);
+            this.CraftmaterialData.Name = "CraftmaterialData";
+            this.CraftmaterialData.RowTemplate.Height = 27;
+            this.CraftmaterialData.Size = new System.Drawing.Size(1422, 161);
+            this.CraftmaterialData.TabIndex = 201;
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn1.HeaderText = "工单号";
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "cm_soncode";
+            this.dataGridViewTextBoxColumn2.HeaderText = "子件编号";
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "pr_detail";
+            this.dataGridViewTextBoxColumn3.HeaderText = "子件名称";
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "cm_barcode";
+            this.dataGridViewTextBoxColumn4.HeaderText = "子件批次号";
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn5
+            // 
+            this.dataGridViewTextBoxColumn5.DataPropertyName = "cm_stepcode";
+            this.dataGridViewTextBoxColumn5.HeaderText = "工序编号";
+            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.Width = 130;
+            // 
+            // dataGridViewTextBoxColumn6
+            // 
+            this.dataGridViewTextBoxColumn6.DataPropertyName = "cm_stepname";
+            this.dataGridViewTextBoxColumn6.HeaderText = "工序名称";
+            this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn7
+            // 
+            this.dataGridViewTextBoxColumn7.DataPropertyName = "cm_status";
+            this.dataGridViewTextBoxColumn7.HeaderText = "上料状态";
+            this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
+            this.dataGridViewTextBoxColumn7.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn8
+            // 
+            this.dataGridViewTextBoxColumn8.DataPropertyName = "cm_indate";
+            this.dataGridViewTextBoxColumn8.HeaderText = "上料时间";
+            this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
+            this.dataGridViewTextBoxColumn8.Width = 120;
             // 
             // CraftInfDgv
             // 
@@ -166,22 +267,20 @@
             this.CraftInfDgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.CraftInfDgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.mp_sncode,
-            this.MP_SNOUTBOXCODE,
             this.mp_makecode,
             this.ma_prodcode,
             this.mp_sourcecode,
+            this.mp_stepname,
             this.mp_indate,
             this.ma_craftcode,
             this.sc_linecode,
             this.mp_inman,
             this.em_name});
             this.CraftInfDgv.EnableContentClick = true;
-            this.CraftInfDgv.Location = new System.Drawing.Point(0, 776);
-            this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(4);
+            this.CraftInfDgv.Location = new System.Drawing.Point(16, 601);
             this.CraftInfDgv.Name = "CraftInfDgv";
-            this.CraftInfDgv.RowHeadersWidth = 82;
             this.CraftInfDgv.RowTemplate.Height = 27;
-            this.CraftInfDgv.Size = new System.Drawing.Size(1950, 380);
+            this.CraftInfDgv.Size = new System.Drawing.Size(1436, 323);
             this.CraftInfDgv.TabIndex = 193;
             // 
             // groupBoxWithBorder1
@@ -198,11 +297,11 @@
             this.groupBoxWithBorder1.Controls.Add(this.label2);
             this.groupBoxWithBorder1.Controls.Add(this.label3);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(24, 80);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(18, 94);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(6, 4, 6, 4);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1906, 80);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1425, 60);
             this.groupBoxWithBorder1.TabIndex = 192;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "颜色说明";
@@ -212,30 +311,30 @@
             // 
             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(1703, 29);
-            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Location = new System.Drawing.Point(1275, 21);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(146, 41);
+            this.label1.Size = new System.Drawing.Size(110, 31);
             this.label1.TabIndex = 193;
             this.label1.Text = "尚未执行";
             // 
             // pictureBox4
             // 
             this.pictureBox4.BackColor = System.Drawing.Color.White;
-            this.pictureBox4.Location = new System.Drawing.Point(1552, 24);
-            this.pictureBox4.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.pictureBox4.Location = new System.Drawing.Point(1164, 18);
+            this.pictureBox4.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.pictureBox4.Name = "pictureBox4";
-            this.pictureBox4.Size = new System.Drawing.Size(120, 40);
+            this.pictureBox4.Size = new System.Drawing.Size(90, 30);
             this.pictureBox4.TabIndex = 192;
             this.pictureBox4.TabStop = false;
             // 
             // pictureBox2
             // 
             this.pictureBox2.BackColor = System.Drawing.Color.Green;
-            this.pictureBox2.Location = new System.Drawing.Point(198, 24);
-            this.pictureBox2.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.pictureBox2.Location = new System.Drawing.Point(148, 18);
+            this.pictureBox2.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.pictureBox2.Name = "pictureBox2";
-            this.pictureBox2.Size = new System.Drawing.Size(120, 40);
+            this.pictureBox2.Size = new System.Drawing.Size(90, 30);
             this.pictureBox2.TabIndex = 187;
             this.pictureBox2.TabStop = false;
             // 
@@ -243,30 +342,30 @@
             // 
             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(1313, 29);
-            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Location = new System.Drawing.Point(982, 21);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(114, 41);
+            this.label4.Size = new System.Drawing.Size(86, 31);
             this.label4.TabIndex = 191;
             this.label4.Text = "已报废";
             // 
             // pictureBox1
             // 
             this.pictureBox1.BackColor = System.Drawing.Color.Red;
-            this.pictureBox1.Location = new System.Drawing.Point(676, 24);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.pictureBox1.Location = new System.Drawing.Point(507, 18);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(120, 40);
+            this.pictureBox1.Size = new System.Drawing.Size(90, 30);
             this.pictureBox1.TabIndex = 186;
             this.pictureBox1.TabStop = false;
             // 
             // pictureBox3
             // 
             this.pictureBox3.BackColor = System.Drawing.Color.Black;
-            this.pictureBox3.Location = new System.Drawing.Point(1162, 24);
-            this.pictureBox3.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.pictureBox3.Location = new System.Drawing.Point(872, 18);
+            this.pictureBox3.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.pictureBox3.Name = "pictureBox3";
-            this.pictureBox3.Size = new System.Drawing.Size(120, 40);
+            this.pictureBox3.Size = new System.Drawing.Size(90, 30);
             this.pictureBox3.TabIndex = 190;
             this.pictureBox3.TabStop = false;
             // 
@@ -274,10 +373,10 @@
             // 
             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(347, 29);
-            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Location = new System.Drawing.Point(258, 21);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(242, 41);
+            this.label2.Size = new System.Drawing.Size(182, 31);
             this.label2.TabIndex = 188;
             this.label2.Text = "已执行且为良品";
             // 
@@ -285,10 +384,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(827, 29);
-            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Location = new System.Drawing.Point(618, 21);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(274, 41);
+            this.label3.Size = new System.Drawing.Size(206, 31);
             this.label3.TabIndex = 189;
             this.label3.Text = "已执行且为不良品";
             // 
@@ -297,11 +396,11 @@
             this.sn_code.AllPower = null;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(184, 28);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.sn_code.Location = new System.Drawing.Point(135, 15);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(286, 35);
+            this.sn_code.Size = new System.Drawing.Size(216, 28);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -309,27 +408,38 @@
             this.sn_code.Tag = "NoAuto";
             this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
+            // barcode
+            // 
+            this.barcode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.barcode.Location = new System.Drawing.Point(1068, 56);
+            this.barcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.barcode.Name = "barcode";
+            this.barcode.Size = new System.Drawing.Size(188, 39);
+            this.barcode.TabIndex = 207;
+            this.barcode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.barcode_KeyDown);
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label9.Location = new System.Drawing.Point(987, 60);
+            this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(86, 31);
+            this.label9.TabIndex = 206;
+            this.label9.Text = "部件号";
+            // 
             // mp_sncode
             // 
             this.mp_sncode.DataPropertyName = "mp_sncode";
             this.mp_sncode.HeaderText = "序列号";
-            this.mp_sncode.MinimumWidth = 10;
             this.mp_sncode.Name = "mp_sncode";
             this.mp_sncode.Width = 120;
             // 
-            // MP_SNOUTBOXCODE
-            // 
-            this.MP_SNOUTBOXCODE.DataPropertyName = "MP_SNOUTBOXCODE";
-            this.MP_SNOUTBOXCODE.HeaderText = "卡通箱号";
-            this.MP_SNOUTBOXCODE.MinimumWidth = 10;
-            this.MP_SNOUTBOXCODE.Name = "MP_SNOUTBOXCODE";
-            this.MP_SNOUTBOXCODE.Width = 200;
-            // 
             // mp_makecode
             // 
             this.mp_makecode.DataPropertyName = "mp_makecode";
             this.mp_makecode.HeaderText = "工单代码";
-            this.mp_makecode.MinimumWidth = 10;
             this.mp_makecode.Name = "mp_makecode";
             this.mp_makecode.Width = 120;
             // 
@@ -337,23 +447,27 @@
             // 
             this.ma_prodcode.DataPropertyName = "ma_prodcode";
             this.ma_prodcode.HeaderText = "产品代码";
-            this.ma_prodcode.MinimumWidth = 10;
             this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Width = 120;
+            this.ma_prodcode.Width = 80;
             // 
             // mp_sourcecode
             // 
             this.mp_sourcecode.DataPropertyName = "mp_sourcecode";
             this.mp_sourcecode.HeaderText = "资源编号";
-            this.mp_sourcecode.MinimumWidth = 10;
             this.mp_sourcecode.Name = "mp_sourcecode";
             this.mp_sourcecode.Width = 120;
             // 
+            // mp_stepname
+            // 
+            this.mp_stepname.DataPropertyName = "mp_stepname";
+            this.mp_stepname.HeaderText = "工序名称";
+            this.mp_stepname.Name = "mp_stepname";
+            this.mp_stepname.Width = 130;
+            // 
             // mp_indate
             // 
             this.mp_indate.DataPropertyName = "mp_indate";
             this.mp_indate.HeaderText = "过站时间";
-            this.mp_indate.MinimumWidth = 10;
             this.mp_indate.Name = "mp_indate";
             this.mp_indate.Width = 120;
             // 
@@ -361,7 +475,6 @@
             // 
             this.ma_craftcode.DataPropertyName = "ma_craftcode";
             this.ma_craftcode.HeaderText = "途程代码";
-            this.ma_craftcode.MinimumWidth = 10;
             this.ma_craftcode.Name = "ma_craftcode";
             this.ma_craftcode.Width = 120;
             // 
@@ -369,34 +482,34 @@
             // 
             this.sc_linecode.DataPropertyName = "sc_linecode";
             this.sc_linecode.HeaderText = "产线";
-            this.sc_linecode.MinimumWidth = 10;
             this.sc_linecode.Name = "sc_linecode";
-            this.sc_linecode.Width = 120;
+            this.sc_linecode.Width = 80;
             // 
             // mp_inman
             // 
             this.mp_inman.DataPropertyName = "mp_inman";
             this.mp_inman.HeaderText = "人员工号";
-            this.mp_inman.MinimumWidth = 10;
             this.mp_inman.Name = "mp_inman";
-            this.mp_inman.Width = 200;
             // 
             // em_name
             // 
             this.em_name.DataPropertyName = "em_name";
             this.em_name.HeaderText = "人员姓名";
-            this.em_name.MinimumWidth = 10;
             this.em_name.Name = "em_name";
-            this.em_name.Width = 200;
             // 
             // Query_ExeProgress
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1950, 1156);
-            this.Controls.Add(this.ms_firstsn);
-            this.Controls.Add(this.label7);
+            this.ClientSize = new System.Drawing.Size(1458, 932);
+            this.Controls.Add(this.barcode);
+            this.Controls.Add(this.label9);
             this.Controls.Add(this.ms_checkno);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.CraftmaterialData);
+            this.Controls.Add(this.ms_outboxcode);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.pallet);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.ma_code_label);
@@ -406,12 +519,13 @@
             this.Controls.Add(this.sn_code);
             this.Controls.Add(this.sn_code_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Name = "Query_ExeProgress";
             this.Tag = "Query!ExeProgress";
             this.Text = "工单执行进度";
             this.Load += new System.EventHandler(this.Query_ExeProgress_Load);
             this.SizeChanged += new System.EventHandler(this.Query_ExeProgress_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.CraftmaterialData)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).EndInit();
             this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
@@ -439,16 +553,29 @@
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.PictureBox pictureBox4;
         private System.Windows.Forms.Label ma_code_label;
-        private System.Windows.Forms.Label ma_code;
+        private System.Windows.Forms.TextBox ma_code;
         private System.Windows.Forms.Label label5;
-        private System.Windows.Forms.Label ms_checkno;
+        private System.Windows.Forms.TextBox pallet;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.TextBox ms_outboxcode;
+        private CustomControl.DataGrid_View.DataGridViewWithSerialNum CraftmaterialData;
+        private System.Windows.Forms.TextBox ms_checkno;
         private System.Windows.Forms.Label label7;
-        private CustomControl.TextBoxWithIcon.SnCollectionBox ms_firstsn;
+        private System.Windows.Forms.TextBox barcode;
+        private System.Windows.Forms.Label label9;
+        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;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_sncode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn MP_SNOUTBOXCODE;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_makecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn ma_prodcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_sourcecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mp_stepname;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_indate;
         private System.Windows.Forms.DataGridViewTextBoxColumn ma_craftcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn sc_linecode;

+ 48 - 59
UAS_MES_XZC/FunctionCode/Query/Query_ExeProgress.cs

@@ -26,7 +26,6 @@ namespace UAS_MES_NEW.Query
         string checkno = "";
         //拆分后的经过的步骤
         Dictionary<int, string> Step;
-        Dictionary<int, string> StepName;
         List<Brush> PaintColor = new List<Brush>();
         //屏幕高度
         int ScreenWidth;
@@ -57,52 +56,23 @@ namespace UAS_MES_NEW.Query
 
         private void Query_ExeProgress_SizeChanged(object sender, EventArgs e)
         {
-            //asc.controlAutoSize(this);
+           // asc.controlAutoSize(this);
         }
 
         private void sn_code_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
             {
-                dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + sn_code.Text + "' order by ms_id desc", "select");
-                if (dt.Rows.Count > 0)
-                {
-                    sn_code.Text = dt.Rows[0]["ms_sncode"].ToString();
-                }
-                else
-                {
-                    dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + sn_code.Text + "' order by ms_id desc", "select");
-                    if (dt.Rows.Count > 0)
-                    {
-                        sn_code.Text = dt.Rows[0]["ms_sncode"].ToString();
-                    }
-                    else
-                    {
-                        dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei1='" + sn_code.Text + "' order by mil_id desc", "select");
-                        if (dt.Rows.Count > 0)
-                        {
-                            sn_code.Text = dt.Rows[0]["mil_sncode"].ToString();
-                        }
-                        else
-                        {
-                            dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei2='" + sn_code.Text + "' order by mil_id desc", "select");
-                            if (dt.Rows.Count > 0)
-                            {
-                                sn_code.Text = dt.Rows[0]["mil_sncode"].ToString();
-                            }
-                        }
-                    }
-                }
                 ms_id = (DataTable)dh.ExecuteSql("select beforesn,sn from makesnrelation where beforesn='" + sn_code.Text + "' or sn='" + sn_code.Text + "'", "select");
                 if (ms_id.Rows.Count > 0)
                 {
                     //说明有过转号
-                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_firstsn,ms_checkno from makeserial where ms_sncode='" + ms_id.Rows[0]["beforesn"].ToString() + "' or ms_sncode='" + ms_id.Rows[0]["sn"].ToString() + "' order by ms_id", "select");
+                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_checkno,ms_outboxcode from makeserial where ms_sncode='" + ms_id.Rows[0]["beforesn"].ToString() + "' or ms_sncode='" + ms_id.Rows[0]["sn"].ToString() + "' order by ms_id", "select");
                 }
                 else
                 {
                     //没有过转号
-                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_firstsn,ms_checkno from makeserial where ms_sncode='" + sn_code.Text + "' or ms_imei1='"+sn_code.Text+"' or ms_imei2='"+sn_code.Text+"' order by ms_id", "select");
+                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_checkno,ms_outboxcode from makeserial where ms_sncode='" + sn_code.Text + "' order by ms_id", "select");
                 }
                 if (ms_id.Rows.Count == 0)
                 {
@@ -114,14 +84,15 @@ namespace UAS_MES_NEW.Query
                 //设置界面工单号
                 ma_code.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_makecode"].ToString();
                 ms_checkno.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_checkno"].ToString();
-                ms_firstsn.Text= ms_id.Rows[ms_id.Rows.Count - 1]["ms_firstsn"].ToString();
+                pallet.Text = dh.getFieldDataByCondition("mes_package_view", "v_outboxcode", "v_barcode = '"+sn_code.Text+"' and v_type = 3").ToString();
+                ms_outboxcode.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_outboxcode"].ToString();
                 int idCount = ms_id.Rows.Count;
                 for (int i = 0; i < idCount; i++)
                 {
                     ms_ids.Append("'" + ms_id.Rows[i]["ms_id"].ToString() + "',");
                 }
                 ListA = (DataTable)dh.ExecuteSql("select ms_beforesn,ms_sncode,ms_firstsn,ms_makecode from makeserial where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ")", "select");
-                dt = (DataTable)dh.ExecuteSql("select ms_status,ms_nextstepcode,ms_paststep,ms_stepcode,ms_checkno,NVL(ms_ifrework, 0) ms_ifrework,NVL(ms_reworkstatus, 0) ms_reworkstatus from makeserial where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ") order by ms_id", "select");
+                dt = (DataTable)dh.ExecuteSql("select ms_status,ms_nextstepcode,ms_paststep,ms_stepcode,ms_checkno,ms_outboxcode,NVL(ms_ifrework, 0) ms_ifrework,NVL(ms_reworkstatus, 0) ms_reworkstatus from makeserial where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ") order by ms_id", "select");
                 if (dt.Rows.Count > 0)
                 {
                     if (Step != null && Step.Count > 0)
@@ -192,28 +163,18 @@ namespace UAS_MES_NEW.Query
                     }
                     //查询执行过的步骤
                     sql.Clear();
-                    sql.Append("select CD_DETNO,CD_STEPCODE,cd_ifoqc,ms_makecode,ms_id,cd_stepname from craft left join craftdetail on cd_crid = cr_id  left join makeserial ");
+                    sql.Append("select CD_DETNO,CD_STEPCODE,CD_STEPNAME,cd_ifoqc,ms_makecode,ms_id from craft left join craftdetail on cd_crid = cr_id  left join makeserial ");
                     sql.Append("on ms_craftcode=cr_code and ms_prodcode=cr_prodcode where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ") order by ms_id,cd_detno");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     Step = new Dictionary<int, string>();
-                    StepName = new Dictionary<int, string>();
                     for (int i = 0; i < dt.Rows.Count + 2; i++)
                     {
                         if (i == 0)
-                        {
                             Step.Add(i, "开始");
-                            StepName.Add(i, "开始");
-                        }
                         else if (i == dt.Rows.Count + 1)
-                        {
                             Step.Add(i, "结束");
-                            StepName.Add(i, "开始");
-                        }
                         else
-                        {
-                            Step.Add(i, dt.Rows[i - 1]["CD_STEPCODE"].ToString());
-                            StepName.Add(i, dt.Rows[i - 1]["cd_stepname"].ToString());
-                        }
+                            Step.Add(i, dt.Rows[i - 1]["CD_STEPNAME"].ToString());
                     }
                     //添加中间节点
                     bool passed = true;
@@ -258,16 +219,16 @@ namespace UAS_MES_NEW.Query
                                 }
                                 else
                                 {
-                                    //通过加绿色
-                                    if (PastStep.Contains(dt.Rows[i]["CD_STEPCODE"].ToString()))
-                                    {
-                                        PaintColor.Add(Brushes.Green);
-                                    }
-                                    //不通过加白色
-                                    else
-                                    {
-                                        PaintColor.Add(Brushes.White);
-                                    }
+                                        //通过加绿色
+                                        if (PastStep.Contains(dt.Rows[i]["CD_STEPCODE"].ToString())&&passed)
+                                        {
+                                            PaintColor.Add(Brushes.Green);
+                                        }
+                                        //不通过加白色
+                                        else
+                                        {
+                                            PaintColor.Add(Brushes.White);
+                                        }                                   
                                 }
                             }
                             ////序列号下一步不为空
@@ -343,11 +304,17 @@ namespace UAS_MES_NEW.Query
                         makecodes.Append("'" + ListA.Rows[i]["ms_makecode"].ToString() + "',");
                     }
                     sql.Clear();
-                    sql.Append("select MP_SNOUTBOXCODE,mp_makecode,ma_prodcode,sc_linecode,ma_craftcode,mp_sourcecode,mp_sncode,");
+                    sql.Append("select mp_makecode,ma_prodcode,sc_linecode,ma_craftcode,mp_sourcecode,mp_sncode,mp_stepname,");
                     sql.Append("mp_indate,mp_inman,em_name from makeprocess left join make on mp_makecode=ma_code left join employee on mp_inman = em_code left join source on ");
                     sql.Append("mp_sourcecode=sc_code where mp_sncode in (" + mp_sncodes.ToString().Substring(0, mp_sncodes.ToString().Length - 1) + ") and ma_code in (" + makecodes.ToString().Substring(0, makecodes.ToString().Length - 1) + ") order by mp_indate");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     BaseUtil.FillDgvWithDataTable(CraftInfDgv, dt);
+                    sql.Clear();
+                    sql.Append("select cm_makecode,cm_soncode,pr_detail,cm_barcode,cm_stepcode,cm_stepname,cm_status,cm_indate ");
+                    sql.Append("from craftmaterial left join product on pr_code=cm_soncode  ");
+                    sql.Append("left join employee on cm_inman = em_code where cm_sncode IN (" + mp_sncodes.ToString().Substring(0, mp_sncodes.ToString().Length - 1) + " ) order by cm_id asc");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    BaseUtil.FillDgvWithDataTable(CraftmaterialData, dt);
                 }
                 else MessageBox.Show("序列号" + sn_code.Text + "不存在");
             }
@@ -387,7 +354,7 @@ namespace UAS_MES_NEW.Query
                         p.EndCap = LineCap.ArrowAnchor;
                         //方块内的信息
                         Label Param = new Label();
-                        Param.Text = j + " " + StepName[j];
+                        Param.Text = j + " " + Step[j];
                         Param.Name = j + Step[j] + "_label";
                         Param.AutoSize = true;
                         Param.Margin = new Padding(0, 0, 0, 0);
@@ -467,5 +434,27 @@ namespace UAS_MES_NEW.Query
             g.Clear(this.BackColor);
             SerialPanel.Refresh();
         }
+
+        private void barcode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                dt = (DataTable)dh.ExecuteSql("select cm_sncode from craftmaterial where cm_barcode = '"+barcode.Text+ "' and cm_status =0 order by cm_id desc", "select");
+                if (dt.Rows.Count == 0)
+                {
+                    MessageBox.Show("未找到此零部件对应成品SN号");
+                }
+                else if (dt.Rows.Count > 1)
+                {
+                    MessageBox.Show("此零部件为可重复件");
+                }
+                else
+                {
+                    sn_code.Text = dt.Rows[0]["cm_sncode"].ToString();
+                    sn_code_KeyDown(this, new KeyEventArgs(Keys.Enter));
+                }
+                
+            }
+        }
     }
 }

+ 11 - 17
UAS_MES_XZC/FunctionCode/Query/Query_ExeProgress.resx

@@ -117,42 +117,33 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="mp_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="MP_SNOUTBOXCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mp_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ma_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mp_sourcecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dataGridViewTextBoxColumn5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mp_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dataGridViewTextBoxColumn6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ma_craftcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dataGridViewTextBoxColumn7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="sc_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mp_inman.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="em_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="dataGridViewTextBoxColumn8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="mp_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="MP_SNOUTBOXCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="mp_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -162,6 +153,9 @@
   <metadata name="mp_sourcecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="mp_stepname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="mp_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

BIN
UAS_MES_XZC/Resources/Sound/901028.wav


+ 9 - 0
UAS_MES_XZC/UAS_MES_XZC.csproj

@@ -571,6 +571,12 @@
     <Compile Include="FunctionCode\Make\Make_CollectElec.Designer.cs">
       <DependentUpon>Make_CollectElec.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_CollectHLH.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_CollectHLH.Designer.cs">
+      <DependentUpon>Make_CollectHLH.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_ColorBoxLabelPrint_WN.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1580,6 +1586,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_CollectElec.resx">
       <DependentUpon>Make_CollectElec.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_CollectHLH.resx">
+      <DependentUpon>Make_CollectHLH.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_ColorBoxLabelPrint_WN.resx">
       <DependentUpon>Make_ColorBoxLabelPrint_WN.cs</DependentUpon>
     </EmbeddedResource>