Browse Source

Merge branch 'master' of repos.ubtob.net:usoft/mes-client

caosy 2 years ago
parent
commit
4f8372ebd7
65 changed files with 5205 additions and 1054 deletions
  1. 3 3
      FileWatcher/DataHelper.cs
  2. 147 87
      FileWatcher/Form4.Designer.cs
  3. 0 12
      FileWatcher/Form4.resx
  4. 1 1
      FileWatcher/Program.cs
  5. 94 13
      FileWatcher/SOP.Designer.cs
  6. 77 52
      FileWatcher/SOP.cs
  7. 12 0
      FileWatcher/SOP.resx
  8. 38 9
      FileWatcher/TcpServer.cs
  9. 5 5
      UAS-出货标签管理(泽天)/UAS_出货标签管理.cs
  10. BIN
      UAS_BARCODEIO/Resources/Sound/1454.wav
  11. BIN
      UAS_BARCODEIO/Resources/Sound/3291.wav
  12. BIN
      UAS_BARCODEIO/Resources/Sound/3853.wav
  13. BIN
      UAS_BARCODEIO/Resources/Sound/4082.wav
  14. BIN
      UAS_BARCODEIO/Resources/Sound/5185.wav
  15. BIN
      UAS_BARCODEIO/Resources/Sound/8378.wav
  16. BIN
      UAS_BARCODEIO/Resources/Sound/9865.wav
  17. BIN
      UAS_BARCODEIO/Resources/Sound/Windows Background.wav
  18. 136 100
      UAS_BARCODEIO/入库条码规则解析.Designer.cs
  19. 64 6
      UAS_BARCODEIO/入库条码规则解析.cs
  20. 1 49
      UAS_BARCODEIO/入库条码规则解析.resx
  21. 42 6
      UAS_BARCODEIO/库存条码打印.Designer.cs
  22. 58 4
      UAS_BARCODEIO/库存条码打印.cs
  23. 3 0
      UAS_BARCODEIO/库存条码打印.resx
  24. 15 2
      UAS_MES_LGDZ/CustomControl/RichText/RichTextAutoBottom.cs
  25. 135 1
      UAS_MES_LGDZ/DataOperate/ExcelHandler.cs
  26. 60 60
      UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxLabelPrint.cs
  27. 60 60
      UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxLabelPrint_WN.cs
  28. 2 1
      UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxWeigh_ReadLine.cs
  29. 1 1
      UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrint.cs
  30. 1 1
      UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrintGetIMEI.cs
  31. 1 1
      UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrintGetIMEIWatch.cs
  32. 13 13
      UAS_MES_LGDZ/FunctionCode/Make/Make_ImeiCheck.cs
  33. 167 140
      UAS_MES_LGDZ/FunctionCode/Query/Query_SpecialReport.Designer.cs
  34. 380 69
      UAS_MES_LGDZ/FunctionCode/Query/Query_SpecialReport.cs
  35. 50 6
      UAS_MES_LGDZ/FunctionCode/Query/Query_SpecialReport.resx
  36. 1 1
      UAS_MES_LGDZ/FunctionCode/Special/Special_CancelCollectionWN.cs
  37. 53 1
      UAS_MES_LGDZ/FunctionCode/Special/Special_Reset.Designer.cs
  38. 163 2
      UAS_MES_LGDZ/FunctionCode/Special/Special_Reset.cs
  39. 82 0
      UAS_MES_LGDZ/FunctionCode/Special/Special_Reset.resx
  40. 1 1
      UAS_MES_ODLF/FunctionCode/Special/Special_CancelCollection.cs
  41. 29 0
      UAS_MES_YD/FunctionCode/Make/Make_ColorBoxLabelPrint.cs
  42. 32 22
      UAS_MES_YD/FunctionCode/Make/Make_ColorBoxWeigh.cs
  43. 13 0
      UAS_MES_YD/FunctionCode/Make/Make_ColorBoxWeigh_HUAGUAN.cs
  44. 34 4
      UAS_MES_YD/FunctionCode/Make/Make_FeedingCollection.cs
  45. 51 49
      UAS_MES_YD/FunctionCode/Make/Make_ImeiCheck.Designer.cs
  46. 5 0
      UAS_MES_YD/FunctionCode/Make/Make_ImeiCheck.cs
  47. 3 1
      UAS_MES_YD/FunctionCode/Make/Make_PreFeedingCollection.cs
  48. 2 0
      UAS_MES_YD/FunctionCode/Make/Make_TestCollection.Designer.cs
  49. 14 1
      UAS_MES_YD/FunctionCode/Make/Make_TestCollection.cs
  50. 2 2
      UAS_MES_YD/FunctionCode/Make/Make_TestCollection.resx
  51. 1169 0
      UAS_MES_YD/FunctionCode/Make/Make_TestCollectionOQC.Designer.cs
  52. 887 0
      UAS_MES_YD/FunctionCode/Make/Make_TestCollectionOQC.cs
  53. 541 0
      UAS_MES_YD/FunctionCode/Make/Make_TestCollectionOQC.resx
  54. 146 117
      UAS_MES_YD/FunctionCode/Packing/Packing_CartonBoxWeigh.Designer.cs
  55. 1 1
      UAS_MES_YD/FunctionCode/Packing/Packing_CartonBoxWeigh.cs
  56. 6 6
      UAS_MES_YD/FunctionCode/Packing/Packing_CartonBoxWeigh.resx
  57. 29 0
      UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollection.cs
  58. 29 0
      UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollection1.cs
  59. 29 0
      UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs
  60. 29 0
      UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollectionWeigh_HUAGUAN.cs
  61. 142 107
      UAS_MES_YD/FunctionCode/Warehouse/Warehouse_FinishedProductOutSum.Designer.cs
  62. 26 10
      UAS_MES_YD/FunctionCode/Warehouse/Warehouse_FinishedProductOutSum.cs
  63. 3 27
      UAS_MES_YD/FunctionCode/Warehouse/Warehouse_FinishedProductOutSum.resx
  64. 108 0
      UAS_MES_YD/PublicMethod/Print.cs
  65. 9 0
      UAS_MES_YD/UAS_MES_YD.csproj

+ 3 - 3
FileWatcher/DataHelper.cs

@@ -9,9 +9,9 @@ namespace FileWatcher
    public class DataHelper
     {
         //系统默认的的连接字符串
-        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=HUAG;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=113.98.196.181)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         //用户选择的数据库的连接字符串
-        public static string DBConnectionString= "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=HUAG;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        public static string DBConnectionString= "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=113.98.196.181)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         public static OracleConnection connection = null;
         OracleCommand command = null;
         int ReconnectTime = 0;
@@ -508,7 +508,7 @@ namespace FileWatcher
         public object ExecuteSql(string SQL, string Type, params object[] names)
         {
             object result = null;
-            //Console.WriteLine(SQL);
+            Console.WriteLine(SQL);
             command = new OracleCommand(SQL, connection);
             Reconnect(command);
             //用来拼接参数的

+ 147 - 87
FileWatcher/Form4.Designer.cs

@@ -28,136 +28,196 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.label2 = new System.Windows.Forms.Label();
-            this.label1 = new System.Windows.Forms.Label();
             this.StartWatch = new System.Windows.Forms.Button();
-            this.dataGridView1 = new System.Windows.Forms.DataGridView();
-            this.Column1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.料号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.物料名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.物料规格 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.textBox1 = new System.Windows.Forms.TextBox();
             this.label3 = new System.Windows.Forms.Label();
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+            this.label1 = new System.Windows.Forms.Label();
+            this.textBox2 = new System.Windows.Forms.TextBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.textBox3 = new System.Windows.Forms.TextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.textBox4 = new System.Windows.Forms.TextBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.textBox5 = new System.Windows.Forms.TextBox();
+            this.button1 = new System.Windows.Forms.Button();
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
+            this.label7 = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.SuspendLayout();
             // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(250, 59);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(0, 24);
-            this.label2.TabIndex = 2;
-            // 
-            // label1
-            // 
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(125, 109);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(106, 24);
-            this.label1.TabIndex = 1;
-            this.label1.Text = "单据编号";
-            // 
             // StartWatch
             // 
             this.StartWatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.StartWatch.Location = new System.Drawing.Point(290, 686);
+            this.StartWatch.Location = new System.Drawing.Point(344, 206);
             this.StartWatch.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.StartWatch.Name = "StartWatch";
-            this.StartWatch.Size = new System.Drawing.Size(128, 56);
+            this.StartWatch.Size = new System.Drawing.Size(128, 52);
             this.StartWatch.TabIndex = 17;
-            this.StartWatch.Text = "保存";
+            this.StartWatch.Text = "播放";
             this.StartWatch.UseVisualStyleBackColor = true;
             // 
-            // dataGridView1
-            // 
-            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.Column1,
-            this.料号,
-            this.物料名称,
-            this.物料规格});
-            this.dataGridView1.Location = new System.Drawing.Point(129, 176);
-            this.dataGridView1.Name = "dataGridView1";
-            this.dataGridView1.RowHeadersWidth = 82;
-            this.dataGridView1.RowTemplate.Height = 37;
-            this.dataGridView1.Size = new System.Drawing.Size(489, 150);
-            this.dataGridView1.TabIndex = 21;
-            // 
-            // Column1
-            // 
-            this.Column1.HeaderText = "勾选";
-            this.Column1.MinimumWidth = 10;
-            this.Column1.Name = "Column1";
-            this.Column1.Width = 200;
-            // 
-            // 料号
-            // 
-            this.料号.HeaderText = "料号";
-            this.料号.MinimumWidth = 10;
-            this.料号.Name = "料号";
-            this.料号.Width = 200;
-            // 
-            // 物料名称
-            // 
-            this.物料名称.HeaderText = "名称";
-            this.物料名称.MinimumWidth = 10;
-            this.物料名称.Name = "物料名称";
-            this.物料名称.Width = 200;
-            // 
-            // 物料规格
-            // 
-            this.物料规格.HeaderText = "规格";
-            this.物料规格.MinimumWidth = 10;
-            this.物料规格.Name = "物料规格";
-            this.物料规格.Width = 200;
-            // 
             // textBox1
             // 
-            this.textBox1.Location = new System.Drawing.Point(254, 498);
+            this.textBox1.Location = new System.Drawing.Point(1006, 340);
             this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(334, 35);
+            this.textBox1.Size = new System.Drawing.Size(125, 35);
             this.textBox1.TabIndex = 22;
             // 
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(130, 501);
+            this.label3.Location = new System.Drawing.Point(882, 343);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(82, 24);
+            this.label3.Size = new System.Drawing.Size(106, 24);
             this.label3.TabIndex = 23;
-            this.label3.Text = "机台号";
+            this.label3.Text = "自动监听";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(882, 209);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(58, 24);
+            this.label1.TabIndex = 25;
+            this.label1.Text = "岗位";
+            // 
+            // textBox2
+            // 
+            this.textBox2.Location = new System.Drawing.Point(1006, 206);
+            this.textBox2.Name = "textBox2";
+            this.textBox2.Size = new System.Drawing.Size(125, 35);
+            this.textBox2.TabIndex = 24;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(882, 400);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(82, 24);
+            this.label2.TabIndex = 26;
+            this.label2.Text = "中控IP";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(882, 143);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(58, 24);
+            this.label4.TabIndex = 28;
+            this.label4.Text = "线别";
+            // 
+            // textBox3
+            // 
+            this.textBox3.Location = new System.Drawing.Point(1006, 140);
+            this.textBox3.Name = "textBox3";
+            this.textBox3.Size = new System.Drawing.Size(125, 35);
+            this.textBox3.TabIndex = 27;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(882, 274);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(58, 24);
+            this.label5.TabIndex = 30;
+            this.label5.Text = "人员";
+            // 
+            // textBox4
+            // 
+            this.textBox4.Location = new System.Drawing.Point(1006, 271);
+            this.textBox4.Name = "textBox4";
+            this.textBox4.Size = new System.Drawing.Size(125, 35);
+            this.textBox4.TabIndex = 29;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(61, 154);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(94, 24);
+            this.label6.TabIndex = 32;
+            this.label6.Text = "选择SOP";
+            // 
+            // textBox5
+            // 
+            this.textBox5.Location = new System.Drawing.Point(185, 151);
+            this.textBox5.Name = "textBox5";
+            this.textBox5.Size = new System.Drawing.Size(378, 35);
+            this.textBox5.TabIndex = 31;
+            // 
+            // button1
+            // 
+            this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.button1.Location = new System.Drawing.Point(185, 202);
+            this.button1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(128, 52);
+            this.button1.TabIndex = 33;
+            this.button1.Text = "搜索";
+            this.button1.UseVisualStyleBackColor = true;
+            // 
+            // pictureBox1
+            // 
+            this.pictureBox1.Location = new System.Drawing.Point(185, 317);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(600, 379);
+            this.pictureBox1.TabIndex = 34;
+            this.pictureBox1.TabStop = false;
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(181, 279);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(106, 24);
+            this.label7.TabIndex = 35;
+            this.label7.Text = "图片表格";
             // 
             // Form4
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1419, 820);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.pictureBox1);
+            this.Controls.Add(this.button1);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.textBox5);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.textBox4);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.textBox3);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.textBox2);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.textBox1);
-            this.Controls.Add(this.dataGridView1);
             this.Controls.Add(this.StartWatch);
-            this.Controls.Add(this.label2);
-            this.Controls.Add(this.label1);
             this.Name = "Form4";
             this.Text = "Form4";
             this.Load += new System.EventHandler(this.Form4_Load);
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
         }
 
         #endregion
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Button StartWatch;
-        private System.Windows.Forms.DataGridView dataGridView1;
-        private System.Windows.Forms.DataGridViewCheckBoxColumn Column1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn 料号;
-        private System.Windows.Forms.DataGridViewTextBoxColumn 物料名称;
-        private System.Windows.Forms.DataGridViewTextBoxColumn 物料规格;
         private System.Windows.Forms.TextBox textBox1;
         private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox textBox2;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.TextBox textBox3;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.TextBox textBox4;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.TextBox textBox5;
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.PictureBox pictureBox1;
+        private System.Windows.Forms.Label label7;
     }
 }

+ 0 - 12
FileWatcher/Form4.resx

@@ -117,16 +117,4 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="料号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="物料名称.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="物料规格.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>

+ 1 - 1
FileWatcher/Program.cs

@@ -45,7 +45,7 @@ namespace FileWatcher
                 Application.EnableVisualStyles();
                 Application.SetCompatibleTextRenderingDefault(false);
                 if (principal.IsInRole(WindowsBuiltInRole.Administrator))
-                    Application.Run(new AutoAnalysisXml());
+                    Application.Run(new SOP("",""));
                 else
                 {
                     //创建启动对象

+ 94 - 13
FileWatcher/SOP.Designer.cs

@@ -45,6 +45,13 @@
             this.pr_spec = new System.Windows.Forms.RichTextBox();
             this.li_code = new System.Windows.Forms.TextBox();
             this.label5 = new System.Windows.Forms.Label();
+            this.SendDGV = new System.Windows.Forms.DataGridView();
+            this.CheckColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.fp_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.fp_path = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.issend = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ChooseALL = new System.Windows.Forms.Button();
+            ((System.ComponentModel.ISupportInitialize)(this.SendDGV)).BeginInit();
             this.SuspendLayout();
             // 
             // richTextBox1
@@ -99,7 +106,7 @@
             // 
             // pr_code
             // 
-            this.pr_code.Location = new System.Drawing.Point(218, 152);
+            this.pr_code.Location = new System.Drawing.Point(218, 361);
             this.pr_code.Name = "pr_code";
             this.pr_code.Size = new System.Drawing.Size(582, 35);
             this.pr_code.TabIndex = 11;
@@ -110,17 +117,19 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label2.Location = new System.Drawing.Point(19, 147);
+            this.label2.Location = new System.Drawing.Point(19, 356);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(146, 41);
+            this.label2.Size = new System.Drawing.Size(82, 41);
             this.label2.TabIndex = 10;
-            this.label2.Text = "产品编号";
+            this.label2.Text = "机型";
             // 
             // OperatResult
             // 
-            this.OperatResult.Location = new System.Drawing.Point(823, 32);
+            this.OperatResult.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.OperatResult.Location = new System.Drawing.Point(865, 841);
             this.OperatResult.Name = "OperatResult";
-            this.OperatResult.Size = new System.Drawing.Size(1110, 874);
+            this.OperatResult.Size = new System.Drawing.Size(1068, 381);
             this.OperatResult.TabIndex = 12;
             this.OperatResult.Text = "";
             this.OperatResult.TextChanged += new System.EventHandler(this.OperatResult_TextChanged);
@@ -139,30 +148,33 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label3.Location = new System.Drawing.Point(19, 240);
+            this.label3.Location = new System.Drawing.Point(19, 22);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(146, 41);
             this.label3.TabIndex = 14;
             this.label3.Text = "产品名称";
+            this.label3.Visible = false;
             // 
             // label4
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label4.Location = new System.Drawing.Point(19, 333);
+            this.label4.Location = new System.Drawing.Point(19, 115);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(146, 41);
             this.label4.TabIndex = 15;
             this.label4.Text = "产品规格";
+            this.label4.Visible = false;
             // 
             // pr_detail
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_detail.Location = new System.Drawing.Point(211, 240);
+            this.pr_detail.Location = new System.Drawing.Point(211, 22);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 41);
             this.pr_detail.TabIndex = 16;
+            this.pr_detail.Visible = false;
             // 
             // JPG
             // 
@@ -179,16 +191,16 @@
             // pr_spec
             // 
             this.pr_spec.Enabled = false;
-            this.pr_spec.Location = new System.Drawing.Point(218, 341);
+            this.pr_spec.Location = new System.Drawing.Point(218, 123);
             this.pr_spec.Name = "pr_spec";
             this.pr_spec.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.None;
             this.pr_spec.Size = new System.Drawing.Size(580, 94);
             this.pr_spec.TabIndex = 19;
             this.pr_spec.Text = "";
+            this.pr_spec.Visible = false;
             // 
             // li_code
             // 
-            this.li_code.Enabled = false;
             this.li_code.Location = new System.Drawing.Point(218, 585);
             this.li_code.Name = "li_code";
             this.li_code.Size = new System.Drawing.Size(582, 35);
@@ -204,11 +216,73 @@
             this.label5.TabIndex = 20;
             this.label5.Text = "线别";
             // 
+            // SendDGV
+            // 
+            this.SendDGV.AllowUserToAddRows = false;
+            this.SendDGV.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.SendDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.SendDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.CheckColumn,
+            this.fp_name,
+            this.fp_path,
+            this.issend});
+            this.SendDGV.Location = new System.Drawing.Point(865, 61);
+            this.SendDGV.Name = "SendDGV";
+            this.SendDGV.RowHeadersWidth = 82;
+            this.SendDGV.RowTemplate.Height = 37;
+            this.SendDGV.Size = new System.Drawing.Size(1068, 759);
+            this.SendDGV.TabIndex = 22;
+            // 
+            // CheckColumn
+            // 
+            this.CheckColumn.DataPropertyName = "CheckColumn";
+            this.CheckColumn.HeaderText = "勾选";
+            this.CheckColumn.MinimumWidth = 100;
+            this.CheckColumn.Name = "CheckColumn";
+            this.CheckColumn.Width = 200;
+            // 
+            // fp_name
+            // 
+            this.fp_name.DataPropertyName = "fp_name";
+            this.fp_name.HeaderText = "文件名";
+            this.fp_name.MinimumWidth = 10;
+            this.fp_name.Name = "fp_name";
+            this.fp_name.Width = 200;
+            // 
+            // fp_path
+            // 
+            this.fp_path.DataPropertyName = "fp_path";
+            this.fp_path.HeaderText = "路径";
+            this.fp_path.MinimumWidth = 10;
+            this.fp_path.Name = "fp_path";
+            this.fp_path.Width = 200;
+            // 
+            // issend
+            // 
+            this.issend.DataPropertyName = "issend";
+            this.issend.HeaderText = "是否成功发送";
+            this.issend.MinimumWidth = 10;
+            this.issend.Name = "issend";
+            this.issend.Width = 200;
+            // 
+            // ChooseALL
+            // 
+            this.ChooseALL.Location = new System.Drawing.Point(865, 61);
+            this.ChooseALL.Name = "ChooseALL";
+            this.ChooseALL.Size = new System.Drawing.Size(80, 42);
+            this.ChooseALL.TabIndex = 23;
+            this.ChooseALL.Text = "全选";
+            this.ChooseALL.UseVisualStyleBackColor = true;
+            this.ChooseALL.Click += new System.EventHandler(this.ChooseALL_Click);
+            // 
             // SOP
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1945, 934);
+            this.ClientSize = new System.Drawing.Size(1945, 1234);
+            this.Controls.Add(this.ChooseALL);
+            this.Controls.Add(this.SendDGV);
             this.Controls.Add(this.li_code);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.pr_spec);
@@ -225,11 +299,12 @@
             this.Controls.Add(this.FilePath);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.richTextBox1);
-            this.MaximizeBox = false;
             this.Name = "SOP";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "SOP管理";
+            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
             this.Load += new System.EventHandler(this.Form3_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.SendDGV)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -253,5 +328,11 @@
         private System.Windows.Forms.RichTextBox pr_spec;
         private System.Windows.Forms.TextBox li_code;
         private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.DataGridView SendDGV;
+        private System.Windows.Forms.Button ChooseALL;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn CheckColumn;
+        private System.Windows.Forms.DataGridViewTextBoxColumn fp_name;
+        private System.Windows.Forms.DataGridViewTextBoxColumn fp_path;
+        private System.Windows.Forms.DataGridViewTextBoxColumn issend;
     }
 }

+ 77 - 52
FileWatcher/SOP.cs

@@ -11,6 +11,8 @@ using System.Web.Script.Serialization;
 using Aspose.Cells.Rendering;
 using Aspose.Cells;
 using System.Drawing.Imaging;
+using System.Drawing;
+using System.Windows.Media;
 
 namespace FileWatcher
 {
@@ -31,6 +33,7 @@ namespace FileWatcher
         private void Form3_Load(object sender, EventArgs e)
         {
             CheckForIllegalCrossThreadCalls = false;
+         
         }
 
         void uploadfile()
@@ -40,23 +43,16 @@ namespace FileWatcher
             DataTable dt = (DataTable)dh.ExecuteSql("select * from productsop where ps_prodcode='" + pr_code.Text + "' ", "select");
             if (dt.Rows.Count == 0)
             {
-                DataTable dt1 = (DataTable)dh.ExecuteSql("select pr_code from product where pr_code='" + pr_code.Text + "'", "select");
-                if (dt1.Rows.Count > 0)
-                {
-                    string code = LogicHandler.GetPiInoutCode("ProductSOP", "1");
-                    pr_code.Text = dt1.Rows[0]["pr_code"].ToString();
-                    dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman)values(productsop_seq.nextval,'" + code + "','" + pr_code.Text + "',sysdate,'" + usercode + "')", "insert");
-                }
-                else
-                {
-                    MessageBox.Show("产品编号" + pr_code.Text + "不存在");
-                    return;
-                }
+                string code = LogicHandler.GetPiInoutCode("ProductSOP", "1");
+                dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman)values(productsop_seq.nextval,'" + code + "','" + pr_code.Text + "',sysdate,'" + usercode + "')", "insert");
             }
             else
             {
+                string ps_id = dt.Rows[0]["ps_id"].ToString();
+                dh.ExecuteSql("delete from ProductSOPdetail where psd_psid='" + ps_id + "'", "delete");
                 pr_code.Text = dt.Rows[0]["ps_prodcode"].ToString();
             }
+
             Workbook workbook = new Workbook(FilePath.Text);
             List<Worksheet> list = new List<Worksheet>();
             List<string> filename = new List<string>();
@@ -87,34 +83,51 @@ namespace FileWatcher
             try
             {
                 DataHelper dh = new DataHelper();
-                OperatResult.AppendText("解析图片【" + sheet.Name + ".jpg】添加水印" + "\n");
+                //OperatResult.AppendText("解析图片【" + sheet.Name + ".jpg】添加水印" + "\n");
                 if (!Directory.Exists(Application.StartupPath + @"\" + pr_code.Text))
                 {
                     Directory.CreateDirectory(Application.StartupPath + @"\" + pr_code.Text);
                 }
-                sheet.Pictures.Add(0, 18, @"图片\电子受控章.png");
-                sheet.Pictures.Add(0, 15, @"图片\签名.png");
-                sheet.PageSetup.LeftMargin = 0;
-                sheet.PageSetup.RightMargin = 0;
-                sheet.PageSetup.BottomMargin = 0;
-                sheet.PageSetup.TopMargin = 0;
+                int width = 0;
+                int height = 0;
+                //Console.WriteLine(sheet.Name);
+                //for (int i = 0; i < sheet.Cells.Columns.Count; i++)
+                //{
+                //    width +=(int) sheet.Cells.Columns[i].Width;
+                //}
+                //for (int i = 0; i < sheet.Cells.Rows.Count; i++)
+                //{
+                //    height += (int)sheet.Cells.Rows[i].Height;
+                //}
+                //Console.WriteLine("width:"+width);
+                //Console.WriteLine("height:"+height);
+                //sheet.Pictures.Add(0, 18, @"图片\电子受控章.png");
+                //sheet.Pictures.Add(0, 15, @"图片\签名.png");
+                //sheet.PageSetup.LeftMargin = 0;
+                //sheet.PageSetup.RightMargin = 0;
+                //sheet.PageSetup.BottomMargin = 0;
+                //sheet.PageSetup.TopMargin = 0;
                 ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
                 imgOptions.ImageFormat = ImageFormat.Png;
                 imgOptions.OnePagePerSheet = true;
                 imgOptions.PrintingPage = PrintingPageType.IgnoreBlank;
+                imgOptions.SetDesiredSize(1565, 1043);
                 SheetRender sr = new SheetRender((Aspose.Cells.Worksheet)sheet, imgOptions);
                 sr.ToImage(0, Application.StartupPath + @"\" + pr_code.Text + @"\" + sheet.Name + ".jpg");
+                //// 创建一个图片
                 OperatResult.AppendText("解析图片【" + sheet.Name + ".jpg】" + "\n");
                 Dictionary<string, object> dic = new Dictionary<string, object>();
                 dic.Add("em_name", "管理员");
                 dic.Add("em_code", "ADMIN");
                 dic.Add("caller", "ProductSOP");
                 OperatResult.AppendText("上传文件【" + sheet.Name + ".jpg" + "】\n");
-                string fp_id = UploadFilesToRemoteUrl("http://mes.ubtob.net:8099/mes/MEScommon/uploadFiles.action?_noc=1", Application.StartupPath + @"\" + pr_code.Text + @"\" + sheet.Name + ".jpg", dic);
-                if (fp_id != "")
-                {
-                    dh.ExecuteSql("update ProductSOP set ps_attachsop=ps_attachsop||" + fp_id + "||';' where ps_prodcode='" + pr_code.Text + "'", "update");
-                }
+                string fp_id = UploadFilesToRemoteUrl("http://113.98.196.181:8099/mes/MEScommon/uploadFiles.action?_noc=1", Application.StartupPath + @"\" + pr_code.Text + @"\" + sheet.Name + ".jpg", dic);
+                string ps_id = dh.getFieldDataByCondition("ProductSOP", "ps_id", "ps_prodcode='" + pr_code.Text + "'").ToString();
+                dh.ExecuteSql("insert into ProductSOPdetail(psd_id,psd_psid,psd_attach) select ProductSOPdetail_seq.nextval,ps_id,'" + sheet.Name + ".jpg" + ";" + fp_id + "' from ProductSOP where ps_prodcode='" + pr_code.Text + "'", "insert");
+                //if (fp_id != "")
+                //{
+                //    dh.ExecuteSql("update ProductSOP set ps_attachsop=ps_attachsop||" + fp_id + "||';' where ps_prodcode='" + pr_code.Text + "'", "update");
+                //}
             }
             catch (Exception ex)
             {
@@ -250,45 +263,45 @@ namespace FileWatcher
             OperatResult.ScrollToCaret();
         }
 
-        TcpServer tcpserver = new TcpServer();
+       
 
         private void SendSop_Click(object sender, EventArgs e)
         {
             try
             {
+                TcpServer tcpserver = new TcpServer();
+                tcpserver.Start();
                 IPHostEntry IpEntry = Dns.GetHostEntry(Dns.GetHostName());
                 string IPAddress = "";
                 for (int i = 0; i < IpEntry.AddressList.Length; i++)
                 {
-                    if (IpEntry.AddressList[i].AddressFamily == AddressFamily.InterNetwork && IpEntry.AddressList[i].ToString().Contains("10.1"))
+                    if (IpEntry.AddressList[i].AddressFamily == AddressFamily.InterNetwork && !IpEntry.AddressList[i].ToString().Contains("10.10"))
                     {
                         IPAddress = IpEntry.AddressList[i].ToString();
                     }
                 }
-                dh.ExecuteSql("update SOPSOURCE set SS_BRDIP='" + IPAddress + "'", "update");
-                DataTable dt = (DataTable)dh.ExecuteSql("select * from productsop where ps_prodcode='" + pr_code.Text + "'", "select");
-                if (dt.Rows.Count > 0)
+                //dh.ExecuteSql("update SOPSOURCE set SS_BRDIP='" + IPAddress + "'", "update");
+                if (SendDGV.Rows.Count > 0)
                 {
-                    tcpserver.Start();
                     Thread.Sleep(5000);
                     List<Dictionary<string, string>> listr = new List<Dictionary<string, string>>();
-                    string PS_ATTACHSOP = dt.Rows[0]["PS_ATTACHSOP"].ToString();
-                    PS_ATTACHSOP = PS_ATTACHSOP.Substring(0, PS_ATTACHSOP.Length - 1).Replace(";", ",");
-                    dt = (DataTable)dh.ExecuteSql("select fp_path, fp_name from filepath where fp_id in (" + PS_ATTACHSOP + ") and nvl(fp_path, ' ') <> ' '", "select");
                     JavaScriptSerializer jss = new JavaScriptSerializer();
                     Dictionary<string, object> map1 = new Dictionary<string, object>();
                     Dictionary<string, object> map = new Dictionary<string, object>();
                     string path;
                     string pathroot = dh.GetConfig("filePathUrl", "sys").ToString();
-                    for (int i = 0; i < dt.Rows.Count; i++)
+                    for (int i = 0; i < SendDGV.Rows.Count; i++)
                     {
-                        Dictionary<string, string> dic1 = new Dictionary<string, string>();
-                        path = dt.Rows[i]["fp_path"].ToString();
-                        path = encryptBASE64(path.Replace("/app/mes/webapps/postattach", pathroot)).Replace("\\s*|\r|\n|\t", "");
-                        dic1.Add("path", path);
-                        dic1.Add("filename", dt.Rows[i]["fp_name"].ToString().Replace(" ", "").Replace("(", "").Replace(")", ""));
-                        dic1.Add("ps_prodcode", pr_code.Text);
-                        listr.Add(dic1);
+                        if (SendDGV.Rows[i].Cells["CheckColumn"].FormattedValue.ToString().ToUpper() == "TRUE")
+                        {
+                            Dictionary<string, string> dic1 = new Dictionary<string, string>();
+                            path = SendDGV.Rows[i].Cells["fp_path"].Value.ToString();
+                            path = encryptBASE64(path.Replace("/app/uas/webapps/postattach", pathroot)).Replace("\\s*|\r|\n|\t", "");
+                            dic1.Add("path", path);
+                            dic1.Add("filename", SendDGV.Rows[i].Cells["fp_name"].Value.ToString().Replace(" ", "").Replace("(", "").Replace(")", ""));
+                            dic1.Add("ps_prodcode", pr_code.Text);
+                            listr.Add(dic1);
+                        }
                     }
                     map1.Add("ps_code", "");
                     map1.Add("li_code", li_code.Text);
@@ -296,6 +309,7 @@ namespace FileWatcher
                     map.Add("success", true);
                     map.Add("data", map1);
                     tcpserver.Send(jss.Serialize(map));
+                    //Thread.Sleep(2000);
                     tcpserver.Stop();
                     LogicHandler.DoCommandLog("SOP", usercode, "", "", sourcecode, "广播SOP", "广播成功", pr_code.Text, "");
                     MessageBox.Show("产品编号" + pr_code.Text + "广播成功");
@@ -345,17 +359,16 @@ namespace FileWatcher
 
         private void LoadPrCode()
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select pr_code,pr_spec,pr_detail from product where pr_code='" + pr_code.Text + "'", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select * from productsop where ps_prodcode='" + pr_code.Text + "'", "select");
             if (dt.Rows.Count > 0)
             {
-                pr_spec.Clear();
-                pr_spec.AppendText(dt.Rows[0]["pr_spec"].ToString());
-                pr_detail.Text = dt.Rows[0]["pr_detail"].ToString();
-                pr_code.Text = dt.Rows[0]["pr_code"].ToString();
-            }
-            else
-            {
-                MessageBox.Show("产品编号" + pr_code.Text + "不存在");
+                string ps_id = dt.Rows[0]["ps_id"].ToString();
+                dt = (DataTable)dh.ExecuteSql("select fp_name,fp_path,'' issend from ProductSOPdetail left join " +
+                    "filepath on FP_ID=substr(PSD_ATTACH,instr(PSD_ATTACH,';')+1)  where psd_psid=" + ps_id, "select");
+                if (dt.Rows.Count > 0)
+                {
+                    SendDGV.DataSource = dt;
+                }
             }
         }
 
@@ -364,9 +377,21 @@ namespace FileWatcher
             LoadPrCode();
         }
 
-        private void pr_spec_Click(object sender, EventArgs e)
+        bool AllChecked = false;
+        private void ChooseALL_Click(object sender, EventArgs e)
         {
-
+            if (AllChecked)
+            {
+                foreach (DataGridViewRow dr in SendDGV.Rows)
+                    dr.Cells[0].Value = false;
+                AllChecked = false;
+            }
+            else
+            {
+                foreach (DataGridViewRow dr in SendDGV.Rows)
+                    dr.Cells[0].Value = true;
+                AllChecked = true;
+            }
         }
     }
 }

+ 12 - 0
FileWatcher/SOP.resx

@@ -120,4 +120,16 @@
   <metadata name="ChoosePath.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
+  <metadata name="CheckColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="fp_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="fp_path.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="issend.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 38 - 9
FileWatcher/TcpServer.cs

@@ -6,6 +6,7 @@ using System.Net;
 using System.Net.Sockets;
 using System.Text;
 using System.Threading;
+using System.Windows.Forms;
 
 namespace FileWatcher
 {
@@ -23,6 +24,9 @@ namespace FileWatcher
 
         bool Watching;
 
+        RichTextBox OperatResult;
+        DataGridView dgv;
+
         public bool Start()
         {
             try
@@ -42,7 +46,15 @@ namespace FileWatcher
                 acceptConnectReqThd = new Thread(AcceptConnectReqHandler);
                 acceptConnectReqThd.IsBackground = true;
                 acceptConnectReqThd.Start(socketWatch);  //把socket对象当做参数传递给到线程里面的方法
-
+                foreach (Form openForm in Application.OpenForms)
+                {
+                    if (openForm is SOP)
+                    {
+                        form = openForm;
+                    }
+                }
+                OperatResult = (RichTextBox)form.Controls["OperatResult"];
+                dgv = (DataGridView)form.Controls["SendDGV"];
                 return true;
             }
             catch (Exception)
@@ -76,7 +88,7 @@ namespace FileWatcher
                 Console.WriteLine("服务端处理连接事件异常:" + e.ToString());
             }
         }
-
+        Form form = null;
         private void ReciveMsgReqHandler(object _socket)
         {
             Socket clientSocket = (Socket)_socket;
@@ -92,21 +104,31 @@ namespace FileWatcher
                     byte[] buffer = new byte[1024];  //数据缓冲区。
                     //实际接收到的有效字节数
                     //Receive也是个卡线程的方法
-                    Console.WriteLine("等待接受客户端的数据:");
+                    //Console.WriteLine("等待接受客户端的数据:");
+                    //OperatResult.AppendText("等待接受客户端的数据,"+ clientSocket+ "\n");
+                    Console.WriteLine("等待接受客户端的数:");
                     int dataLength = clientSocket.Receive(buffer);
                     Console.WriteLine("接受到客户端的数据,字节数:" + dataLength);
+                    //OperatResult.AppendText("接受到客户端的数据,字节数:" + dataLength);
                     //如果客户端关闭,发送的数据就为空,就跳出循环
                     if (dataLength == 0)
                     {
                         break;
                     }
-
                     //假设收到的是个字符串(先这么假定),转成字符串处理
-                    string strMsg = Encoding.UTF8.GetString(buffer, 1, dataLength - 1);
+                    string strMsg = Encoding.UTF8.GetString(buffer, 0, dataLength);
                     Console.WriteLine("接受到客户端的消息:" + strMsg);
+                    for (int i = 0; i < dgv.Rows.Count; i++)
+                    {
+                        if (dgv.Rows[i].Cells["fp_name"].Value.ToString().Replace(".jpg", "") == strMsg.Replace("成功", ""))
+                        {
+                            dgv.Rows[i].Cells["issend"].Value = "发送成功";
+                        }
+                    }
+                    OperatResult.AppendText("接受到客户端的消息:" + strMsg);
                 }
                 //中止当前线程
-                Thread.CurrentThread.Abort();
+                //Thread.CurrentThread.Abort();
             }
             catch (Exception e)
             {
@@ -126,10 +148,17 @@ namespace FileWatcher
 
         public void Send(string Command)
         {
-            Console.WriteLine(  Command);
-            foreach (Socket item in socket)
+            try
+            {
+                Console.WriteLine(Command);
+                foreach (Socket item in socket)
+                {
+                    item.Send(Encoding.Default.GetBytes(Command));
+                }
+            }
+            catch (Exception ex)
             {
-                item.Send(Encoding.Default.GetBytes(Command));
+                Console.WriteLine(ex.Message);
             }
         }
 

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

@@ -424,7 +424,7 @@ namespace UAS_LabelMachine
                 string Year1 = datecod1.Substring(0, 2);
                 System.DateTime dt2 = new DateTime(int.Parse("20" + Year1), 01, 01);
                 string Week1 = datecod1.Substring(2, 2);
-                System.DateTime dt3 = dt2.AddDays(int.Parse(Week1) * 7);
+                System.DateTime dt3 = dt2.AddDays(int.Parse(Week1) * 7 + 7);
                 //当前扫码的年周
                 if (dt1 > dt3)
                 {
@@ -1673,8 +1673,8 @@ namespace UAS_LabelMachine
                 BaseUtil.SetFormCenter(stw);
                 stw.ShowDialog();
                 Input.Focus();
-                if(AutoAfterPrint.Checked)
-                OutBoxNum.Text = "新增";
+                if (AutoAfterPrint.Checked)
+                    OutBoxNum.Text = "新增";
             }
             else
                 MessageBox.Show("未维护外箱标签", "提示");
@@ -2294,13 +2294,13 @@ namespace UAS_LabelMachine
                 string Year = DateCode.Substring(0, 2);
                 System.DateTime dt = new DateTime(int.Parse("20" + Year), 01, 01);
                 string Week = DateCode.Substring(2, 2);
-                System.DateTime dt1 = dt.AddDays(int.Parse(Week) * 7);
+                System.DateTime dt1 = dt.AddDays((int.Parse(Week) -1)* 7);
 
                 //减去DC校验后的日期
                 System.DateTime now = System.DateTime.Now;
                 System.DateTime now1 = now.AddDays(-int.Parse(DCCheck.Text));
                 //物料的DateCode大于限制日期即可
-                if (dt1 > now1&& dt1< now)
+                if (dt1 > now1 && dt1 < now)
                 {
                     return true;
                 }

BIN
UAS_BARCODEIO/Resources/Sound/1454.wav


BIN
UAS_BARCODEIO/Resources/Sound/3291.wav


BIN
UAS_BARCODEIO/Resources/Sound/3853.wav


BIN
UAS_BARCODEIO/Resources/Sound/4082.wav


BIN
UAS_BARCODEIO/Resources/Sound/5185.wav


BIN
UAS_BARCODEIO/Resources/Sound/8378.wav


BIN
UAS_BARCODEIO/Resources/Sound/9865.wav


BIN
UAS_BARCODEIO/Resources/Sound/Windows Background.wav


+ 136 - 100
UAS_BARCODEIO/入库条码规则解析.Designer.cs

@@ -53,16 +53,6 @@
             this.label8 = new System.Windows.Forms.Label();
             this.GenBarCode = new System.Windows.Forms.Button();
             this.BarcodeIO = new System.Windows.Forms.DataGridView();
-            this.CheckBox = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pr_orispeccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bi_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bi_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bi_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bi_inqty1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bi_vendbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bi_madedate = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_spec1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_detail1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.PrintBarCode = new System.Windows.Forms.Button();
             this.PrinterList = new System.Windows.Forms.ComboBox();
             this.label9 = new System.Windows.Forms.Label();
@@ -76,6 +66,19 @@
             this.es_custcode = new UAS_BARCODEIO.SearchTextBox();
             this.PrintStockBarCode = new System.Windows.Forms.Button();
             this.DeletaBarcode = new System.Windows.Forms.Button();
+            this.SCCODE = new System.Windows.Forms.TextBox();
+            this.label11 = new System.Windows.Forms.Label();
+            this.CheckBox = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pr_orispeccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bi_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bi_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bi_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bi_inqty1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bi_sccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bi_vendbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bi_madedate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_spec1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.Prodiodetail)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.BarcodeIO)).BeginInit();
             this.SuspendLayout();
@@ -255,7 +258,7 @@
             // 
             // LOTNO
             // 
-            this.LOTNO.Location = new System.Drawing.Point(1445, 533);
+            this.LOTNO.Location = new System.Drawing.Point(1445, 527);
             this.LOTNO.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.LOTNO.Name = "LOTNO";
             this.LOTNO.Size = new System.Drawing.Size(436, 35);
@@ -265,7 +268,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(1276, 533);
+            this.label6.Location = new System.Drawing.Point(1276, 527);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(103, 38);
@@ -274,7 +277,7 @@
             // 
             // ZXBZ
             // 
-            this.ZXBZ.Location = new System.Drawing.Point(1445, 593);
+            this.ZXBZ.Location = new System.Drawing.Point(1445, 627);
             this.ZXBZ.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.ZXBZ.Name = "ZXBZ";
             this.ZXBZ.Size = new System.Drawing.Size(436, 35);
@@ -284,7 +287,7 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(1276, 593);
+            this.label7.Location = new System.Drawing.Point(1276, 627);
             this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(133, 38);
@@ -334,6 +337,7 @@
             this.bi_barcode,
             this.bi_outboxcode,
             this.bi_inqty1,
+            this.bi_sccode,
             this.bi_vendbarcode,
             this.bi_madedate,
             this.pr_spec1,
@@ -345,86 +349,6 @@
             this.BarcodeIO.Size = new System.Drawing.Size(2097, 595);
             this.BarcodeIO.TabIndex = 35;
             // 
-            // CheckBox
-            // 
-            this.CheckBox.DataPropertyName = "CheckBox";
-            this.CheckBox.HeaderText = "勾选";
-            this.CheckBox.MinimumWidth = 10;
-            this.CheckBox.Name = "CheckBox";
-            this.CheckBox.Width = 200;
-            // 
-            // pr_orispeccode
-            // 
-            this.pr_orispeccode.DataPropertyName = "pr_orispeccode";
-            this.pr_orispeccode.HeaderText = "型号";
-            this.pr_orispeccode.MinimumWidth = 10;
-            this.pr_orispeccode.Name = "pr_orispeccode";
-            this.pr_orispeccode.Width = 200;
-            // 
-            // bi_prodcode
-            // 
-            this.bi_prodcode.DataPropertyName = "bi_prodcode";
-            this.bi_prodcode.HeaderText = "料号";
-            this.bi_prodcode.MinimumWidth = 10;
-            this.bi_prodcode.Name = "bi_prodcode";
-            this.bi_prodcode.Width = 200;
-            // 
-            // bi_barcode
-            // 
-            this.bi_barcode.DataPropertyName = "bi_barcode";
-            this.bi_barcode.HeaderText = "条码号";
-            this.bi_barcode.MinimumWidth = 10;
-            this.bi_barcode.Name = "bi_barcode";
-            this.bi_barcode.Width = 200;
-            // 
-            // bi_outboxcode
-            // 
-            this.bi_outboxcode.DataPropertyName = "bi_outboxcode";
-            this.bi_outboxcode.HeaderText = "外箱条码";
-            this.bi_outboxcode.MinimumWidth = 10;
-            this.bi_outboxcode.Name = "bi_outboxcode";
-            this.bi_outboxcode.Width = 200;
-            // 
-            // bi_inqty1
-            // 
-            this.bi_inqty1.DataPropertyName = "bi_inqty";
-            this.bi_inqty1.HeaderText = "入库数量";
-            this.bi_inqty1.MinimumWidth = 10;
-            this.bi_inqty1.Name = "bi_inqty1";
-            this.bi_inqty1.Width = 200;
-            // 
-            // bi_vendbarcode
-            // 
-            this.bi_vendbarcode.DataPropertyName = "bi_vendbarcode";
-            this.bi_vendbarcode.HeaderText = "LOTNO";
-            this.bi_vendbarcode.MinimumWidth = 10;
-            this.bi_vendbarcode.Name = "bi_vendbarcode";
-            this.bi_vendbarcode.Width = 200;
-            // 
-            // bi_madedate
-            // 
-            this.bi_madedate.DataPropertyName = "bi_madedate";
-            this.bi_madedate.HeaderText = "DC";
-            this.bi_madedate.MinimumWidth = 10;
-            this.bi_madedate.Name = "bi_madedate";
-            this.bi_madedate.Width = 200;
-            // 
-            // pr_spec1
-            // 
-            this.pr_spec1.DataPropertyName = "pr_spec";
-            this.pr_spec1.HeaderText = "规格";
-            this.pr_spec1.MinimumWidth = 10;
-            this.pr_spec1.Name = "pr_spec1";
-            this.pr_spec1.Width = 200;
-            // 
-            // pr_detail1
-            // 
-            this.pr_detail1.DataPropertyName = "pr_detail";
-            this.pr_detail1.HeaderText = "物料名称";
-            this.pr_detail1.MinimumWidth = 10;
-            this.pr_detail1.Name = "pr_detail1";
-            this.pr_detail1.Width = 200;
-            // 
             // PrintBarCode
             // 
             this.PrintBarCode.Location = new System.Drawing.Point(1922, 273);
@@ -438,7 +362,7 @@
             // PrinterList
             // 
             this.PrinterList.FormattingEnabled = true;
-            this.PrinterList.Location = new System.Drawing.Point(1445, 654);
+            this.PrinterList.Location = new System.Drawing.Point(1445, 688);
             this.PrinterList.Name = "PrinterList";
             this.PrinterList.Size = new System.Drawing.Size(312, 32);
             this.PrinterList.TabIndex = 37;
@@ -447,7 +371,7 @@
             // 
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(1276, 648);
+            this.label9.Location = new System.Drawing.Point(1276, 682);
             this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(162, 38);
@@ -561,11 +485,120 @@
             this.DeletaBarcode.UseVisualStyleBackColor = true;
             this.DeletaBarcode.Click += new System.EventHandler(this.DeletaBarcode_Click);
             // 
+            // SCCODE
+            // 
+            this.SCCODE.Location = new System.Drawing.Point(1445, 579);
+            this.SCCODE.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.SCCODE.Name = "SCCODE";
+            this.SCCODE.Size = new System.Drawing.Size(436, 35);
+            this.SCCODE.TabIndex = 49;
+            // 
+            // label11
+            // 
+            this.label11.AutoSize = true;
+            this.label11.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label11.Location = new System.Drawing.Point(1276, 579);
+            this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(134, 38);
+            this.label11.TabIndex = 48;
+            this.label11.Text = "SCCODE";
+            // 
+            // CheckBox
+            // 
+            this.CheckBox.DataPropertyName = "CheckBox";
+            this.CheckBox.HeaderText = "勾选";
+            this.CheckBox.MinimumWidth = 10;
+            this.CheckBox.Name = "CheckBox";
+            this.CheckBox.Width = 200;
+            // 
+            // pr_orispeccode
+            // 
+            this.pr_orispeccode.DataPropertyName = "pr_orispeccode";
+            this.pr_orispeccode.HeaderText = "型号";
+            this.pr_orispeccode.MinimumWidth = 10;
+            this.pr_orispeccode.Name = "pr_orispeccode";
+            this.pr_orispeccode.Width = 200;
+            // 
+            // bi_prodcode
+            // 
+            this.bi_prodcode.DataPropertyName = "bi_prodcode";
+            this.bi_prodcode.HeaderText = "料号";
+            this.bi_prodcode.MinimumWidth = 10;
+            this.bi_prodcode.Name = "bi_prodcode";
+            this.bi_prodcode.Width = 200;
+            // 
+            // bi_barcode
+            // 
+            this.bi_barcode.DataPropertyName = "bi_barcode";
+            this.bi_barcode.HeaderText = "条码号";
+            this.bi_barcode.MinimumWidth = 10;
+            this.bi_barcode.Name = "bi_barcode";
+            this.bi_barcode.Width = 200;
+            // 
+            // bi_outboxcode
+            // 
+            this.bi_outboxcode.DataPropertyName = "bi_outboxcode";
+            this.bi_outboxcode.HeaderText = "外箱条码";
+            this.bi_outboxcode.MinimumWidth = 10;
+            this.bi_outboxcode.Name = "bi_outboxcode";
+            this.bi_outboxcode.Width = 200;
+            // 
+            // bi_inqty1
+            // 
+            this.bi_inqty1.DataPropertyName = "bi_inqty";
+            this.bi_inqty1.HeaderText = "入库数量";
+            this.bi_inqty1.MinimumWidth = 10;
+            this.bi_inqty1.Name = "bi_inqty1";
+            this.bi_inqty1.Width = 200;
+            // 
+            // bi_sccode
+            // 
+            this.bi_sccode.DataPropertyName = "bi_sccode";
+            this.bi_sccode.HeaderText = "SCCODE";
+            this.bi_sccode.MinimumWidth = 10;
+            this.bi_sccode.Name = "bi_sccode";
+            this.bi_sccode.Width = 200;
+            // 
+            // bi_vendbarcode
+            // 
+            this.bi_vendbarcode.DataPropertyName = "bi_vendbarcode";
+            this.bi_vendbarcode.HeaderText = "LOTNO";
+            this.bi_vendbarcode.MinimumWidth = 10;
+            this.bi_vendbarcode.Name = "bi_vendbarcode";
+            this.bi_vendbarcode.Width = 200;
+            // 
+            // bi_madedate
+            // 
+            this.bi_madedate.DataPropertyName = "bi_madedate";
+            this.bi_madedate.HeaderText = "DC";
+            this.bi_madedate.MinimumWidth = 10;
+            this.bi_madedate.Name = "bi_madedate";
+            this.bi_madedate.Width = 200;
+            // 
+            // pr_spec1
+            // 
+            this.pr_spec1.DataPropertyName = "pr_spec";
+            this.pr_spec1.HeaderText = "规格";
+            this.pr_spec1.MinimumWidth = 10;
+            this.pr_spec1.Name = "pr_spec1";
+            this.pr_spec1.Width = 200;
+            // 
+            // pr_detail1
+            // 
+            this.pr_detail1.DataPropertyName = "pr_detail";
+            this.pr_detail1.HeaderText = "物料名称";
+            this.pr_detail1.MinimumWidth = 10;
+            this.pr_detail1.Name = "pr_detail1";
+            this.pr_detail1.Width = 200;
+            // 
             // 入库条码规则解析
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(2136, 1338);
+            this.Controls.Add(this.SCCODE);
+            this.Controls.Add(this.label11);
             this.Controls.Add(this.DeletaBarcode);
             this.Controls.Add(this.PrintStockBarCode);
             this.Controls.Add(this.pr_orispeccode3);
@@ -646,20 +679,23 @@
         private System.Windows.Forms.Label 原厂型号;
         private System.Windows.Forms.CheckBox GenBoxCode;
         private System.Windows.Forms.Button PrintBox;
+        private System.Windows.Forms.TextBox pr_orispeccode3;
+        private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.Button PrintStockBarCode;
+        private System.Windows.Forms.Button DeletaBarcode;
+        private System.Windows.Forms.TextBox SCCODE;
+        private System.Windows.Forms.Label label11;
         private System.Windows.Forms.DataGridViewCheckBoxColumn CheckBox;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_orispeccode;
         private System.Windows.Forms.DataGridViewTextBoxColumn bi_prodcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn bi_barcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn bi_outboxcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn bi_inqty1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bi_sccode;
         private System.Windows.Forms.DataGridViewTextBoxColumn bi_vendbarcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn bi_madedate;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail1;
-        private System.Windows.Forms.TextBox pr_orispeccode3;
-        private System.Windows.Forms.Label label10;
-        private System.Windows.Forms.Button PrintStockBarCode;
-        private System.Windows.Forms.Button DeletaBarcode;
     }
 }
 

+ 64 - 6
UAS_BARCODEIO/入库条码规则解析.cs

@@ -6,6 +6,8 @@ using System.Data;
 using System.Drawing;
 using System.Drawing.Printing;
 using System.Linq;
+using System.Media;
+using System.Threading;
 using System.Windows.Forms;
 using static System.Runtime.CompilerServices.RuntimeHelpers;
 
@@ -110,6 +112,10 @@ namespace UAS_BARCODEIO
                 "where bi_inoutno='" + pi_inoutno.Text + "' group by pr_orispeccode,pr_brand) on pd_prodcode=bi_prodcode left join product on pr_code=pd_prodcode order by pr_code";
             DataTable dt = (DataTable)dh.ExecuteSql(sql, "select");
             BaseUtil.FillDgvWithDataTable(Prodiodetail, dt);
+            if (Prodiodetail.Rows.Count > SelectIndex)
+            {
+                Prodiodetail.Rows[SelectIndex].Selected = true;
+            }
         }
 
         private void Barcode_KeyDown(object sender, KeyEventArgs e)
@@ -120,6 +126,7 @@ namespace UAS_BARCODEIO
                     " on es_id=esd_esid where es_custcode='" + es_custcode.Text + "'", "select");
                 if (dt.Rows.Count == 0)
                 {
+                    Play("NG");
                     MessageBox.Show("无条码解析规则");
                     return;
                 }
@@ -128,6 +135,7 @@ namespace UAS_BARCODEIO
                 //分割后的字符串数组需要大于设置的参数解析
                 if (str.Length < dt.Rows.Count)
                 {
+                    Play("NG");
                     MessageBox.Show("解析参数与解析规则不匹配");
                     return;
                 }
@@ -149,6 +157,9 @@ namespace UAS_BARCODEIO
                         case "QTY":
                             INQTY.Text = str[int.Parse(index) - 1];
                             break;
+                        case "SCCODE":
+                            SCCODE.Text = str[int.Parse(index) - 1];
+                            break;
                         default:
                             break;
                     }
@@ -157,12 +168,14 @@ namespace UAS_BARCODEIO
                 string outqty;
                 string lotno;
                 string spec;
-                LogicHandler.GetWeekData(DC.Text, INQTY.Text, es_custcode.Text.ToUpper(), pr_orispeccode3.Text,LOTNO.Text, out madedate, out outqty, out lotno,out spec);
+                LogicHandler.GetWeekData(DC.Text, INQTY.Text, es_custcode.Text.ToUpper(), pr_orispeccode3.Text, LOTNO.Text, out madedate, out outqty, out lotno, out spec);
                 DC.Text = madedate;
                 INQTY.Text = outqty;
                 LOTNO.Text = lotno;
                 pr_orispeccode3.Text = spec;
                 Barcode.Clear();
+                GenBarCode.PerformClick();
+                Play("OK");
             }
         }
         bool AutoSized = false;
@@ -219,11 +232,13 @@ namespace UAS_BARCODEIO
             DataTable dt = (DataTable)dh.ExecuteSql(sql, "select");
             if (dt.Rows.Count == 0)
             {
+                Play("NG");
                 MessageBox.Show("物料不在对应入库单中" + pi_inoutno.Text);
                 return;
             }
             if (pr_orispeccode2.Text != pr_orispeccode3.Text)
             {
+                Play("NG");
                 MessageBox.Show("解析型号和单据型号不对应");
                 return;
             }
@@ -237,11 +252,13 @@ namespace UAS_BARCODEIO
             int NowInqty = int.Parse(INQTY.Text);
             if (!int.TryParse(ZXBZ.Text, out Minpackage))
             {
+                Play("NG");
                 MessageBox.Show("最小包装数错误,料号" + PR_CODE.Text);
                 return;
             }
             if (int.Parse(INQTY.Text) > pdinqty - barqty)
             {
+                Play("NG");
                 MessageBox.Show("物料采集后超出入库单数量" + PR_CODE.Text);
                 return;
             }
@@ -258,6 +275,7 @@ namespace UAS_BARCODEIO
             List<string> bi_barcode = new List<string>();
             List<string> bi_vendbarcode = new List<string>();
             List<string> bi_madedate = new List<string>();
+            List<string> bi_sccode = new List<string>();
             for (int i = 0; i < barcount; i++)
             {
                 string barcode = "";
@@ -286,19 +304,20 @@ namespace UAS_BARCODEIO
                 bi_barcode.Add(barcode);
                 bi_vendbarcode.Add(LOTNO.Text);
                 bi_madedate.Add(DC.Text);
+                bi_sccode.Add(SCCODE.Text);
             }
             sql = "insert into barcodeio(BI_ID, BI_BARCODE, BI_PIID, BI_PICLASS, BI_INOUTNO, BI_PDNO, BI_PDID, BI_PRODCODE, BI_INQTY,bi_vendbarcode, " +
-                 "BI_MADEDATE, BI_PRODID, BI_STATUS, BI_ORDERCODE, BI_INMAN, BI_INDATE,BI_OUTBOXCODE)select barcodeio_seq.nextval,:bi_barcode,'" + pi_id + "'," +
-                 "'" + pd_piclass + "','" + pi_inoutno.Text + "',0,0,'" + PR_CODE.Text + "',:bi_inqty,:bi_vendbarcode,to_date(:bi_madedate,'yyyy-mm-dd'),pr_id,0,'','管理员',sysdate,'" + outboxcode + "' " +
+                 "BI_MADEDATE, BI_PRODID, BI_STATUS, BI_ORDERCODE, BI_INMAN, BI_INDATE,BI_OUTBOXCODE,bi_sccode)select barcodeio_seq.nextval,:bi_barcode,'" + pi_id + "'," +
+                 "'" + pd_piclass + "','" + pi_inoutno.Text + "',0,0,'" + PR_CODE.Text + "',:bi_inqty,:bi_vendbarcode,to_date(:bi_madedate,'yyyy-mm-dd'),pr_id,0,'','管理员',sysdate,'" + outboxcode + "',:bi_sccode " +
                  " from product where pr_code='" + PR_CODE.Text + "'";
-            dh.BatchInsert(sql, new string[] { "bi_inqty", "bi_barcode", "bi_vendbarcode", "bi_madedate" }, bi_barcode.ToArray(), bi_inqty.ToArray(), bi_vendbarcode.ToArray(), bi_madedate.ToArray());
+            dh.BatchInsert(sql, new string[] { "bi_inqty", "bi_barcode", "bi_vendbarcode", "bi_madedate" , "bi_sccode" }, bi_barcode.ToArray(), bi_inqty.ToArray(), bi_vendbarcode.ToArray(), bi_madedate.ToArray(),bi_sccode.ToArray());
             LoadGridData();
             LoadBarcodeioData(PR_CODE.Text);
         }
 
         private void LoadBarcodeioData(string pr_code)
         {
-            string sql = "select 0 CheckBox,bi_barcode,bi_inqty,bi_datecode,bi_outboxcode,bi_vendbarcode,to_char(bi_madedate,'yyyy-mm-dd')bi_madedate,pr_detail,pr_spec,bi_prodcode,pr_orispeccode from barcodeio left join product on bi_prodcode=pr_code where bi_inoutno='" + pi_inoutno.Text + "' and bi_prodcode='" + pr_code + "'";
+            string sql = "select 0 CheckBox,bi_sccode,bi_barcode,bi_inqty,bi_datecode,bi_outboxcode,bi_vendbarcode,to_char(bi_madedate,'yyyy-mm-dd')bi_madedate,pr_detail,pr_spec,bi_prodcode,pr_orispeccode from barcodeio left join product on bi_prodcode=pr_code where bi_inoutno='" + pi_inoutno.Text + "' and bi_prodcode='" + pr_code + "'";
             DataTable dt = (DataTable)dh.ExecuteSql(sql, "select");
             BaseUtil.FillDgvWithDataTable(BarcodeIO, dt);
         }
@@ -365,7 +384,7 @@ namespace UAS_BARCODEIO
 
             }
         }
-
+        int SelectIndex = 0;
         private void Prodiodetail_CellClick(object sender, DataGridViewCellEventArgs e)
         {
             if (Prodiodetail.Rows[e.RowIndex].Cells["pd_prodcode"].Value.ToString() != "")
@@ -376,6 +395,7 @@ namespace UAS_BARCODEIO
                 PR_CODE.Text = Prodiodetail.Rows[e.RowIndex].Cells["pd_prodcode"].Value.ToString();
                 pr_orispeccode2.Text = Prodiodetail.Rows[e.RowIndex].Cells["pr_orispeccode1"].Value.ToString();
                 LoadBarcodeioData(Prodiodetail.Rows[e.RowIndex].Cells["pd_prodcode"].Value.ToString());
+                SelectIndex = e.RowIndex;
             }
         }
 
@@ -471,5 +491,43 @@ namespace UAS_BARCODEIO
             }
             LoadBarcodeioData(PR_CODE.Text);
         }
+        Thread thread;
+        string FileName = "";
+        public void Play(string Type)
+        {
+            if (Type == "OK")
+            {
+                FileName = System.Windows.Forms.Application.StartupPath + @"\Resources\Sound\8378.wav";
+                thread = new Thread(PlaySound);
+                thread.Start();
+            
+            }
+            else
+            {
+                FileName = System.Windows.Forms.Application.StartupPath + @"\Resources\Sound\5185.wav";
+                thread = new Thread(PlaySound);
+                thread.Start();
+            }
+        }
+
+        private void PlaySound()
+        {
+            //要加载COM组件:Microsoft speech object Library    
+            if (!System.IO.File.Exists(FileName))
+            {
+                return;
+            }
+            try
+            {
+                SoundPlayer player = new SoundPlayer();
+                player.SoundLocation = FileName;
+                player.Load();
+                player.Play();
+            }
+            catch (Exception e)
+            {
+                MessageBox.Show(e.Message);
+            }
+        }
     }
 }

+ 1 - 49
UAS_BARCODEIO/入库条码规则解析.resx

@@ -138,27 +138,6 @@
   <metadata name="bi_inqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="pd_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_orispeccode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_brand.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_inqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bi_inqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="CheckBox.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -177,34 +156,7 @@
   <metadata name="bi_inqty1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="bi_vendbarcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bi_madedate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_spec1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_detail1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="CheckBox.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_orispeccode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bi_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bi_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bi_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bi_inqty1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="bi_sccode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="bi_vendbarcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

+ 42 - 6
UAS_BARCODEIO/库存条码打印.Designer.cs

@@ -57,6 +57,8 @@
             this.label2 = new System.Windows.Forms.Label();
             this.pr_code = new UAS_BARCODEIO.SearchTextBox();
             this.QueryBarcode = new System.Windows.Forms.Button();
+            this.sc_code = new System.Windows.Forms.TextBox();
+            this.label11 = new System.Windows.Forms.Label();
             this.CheckBox = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.pr_orispeccode4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.bar_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -65,6 +67,7 @@
             this.bar_remain = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.bar_vendbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.bar_madedate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_spec1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_detail1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.BarcodeIO)).BeginInit();
@@ -142,7 +145,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(30, 524);
+            this.label6.Location = new System.Drawing.Point(30, 518);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(103, 38);
@@ -151,7 +154,7 @@
             // 
             // pr_zxbzs
             // 
-            this.pr_zxbzs.Location = new System.Drawing.Point(199, 584);
+            this.pr_zxbzs.Location = new System.Drawing.Point(199, 626);
             this.pr_zxbzs.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.pr_zxbzs.Name = "pr_zxbzs";
             this.pr_zxbzs.Size = new System.Drawing.Size(436, 35);
@@ -161,7 +164,7 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(30, 584);
+            this.label7.Location = new System.Drawing.Point(30, 626);
             this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(133, 38);
@@ -213,6 +216,7 @@
             this.bar_remain,
             this.bar_vendbarcode,
             this.bar_madedate,
+            this.sc_code1,
             this.pr_spec1,
             this.pr_detail1});
             this.BarcodeIO.Location = new System.Drawing.Point(27, 731);
@@ -235,7 +239,7 @@
             // PrinterList
             // 
             this.PrinterList.FormattingEnabled = true;
-            this.PrinterList.Location = new System.Drawing.Point(199, 658);
+            this.PrinterList.Location = new System.Drawing.Point(198, 691);
             this.PrinterList.Name = "PrinterList";
             this.PrinterList.Size = new System.Drawing.Size(312, 32);
             this.PrinterList.TabIndex = 37;
@@ -244,7 +248,7 @@
             // 
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(30, 652);
+            this.label9.Location = new System.Drawing.Point(29, 685);
             this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(162, 38);
@@ -366,7 +370,7 @@
             // 
             // QueryBarcode
             // 
-            this.QueryBarcode.Location = new System.Drawing.Point(549, 181);
+            this.QueryBarcode.Location = new System.Drawing.Point(534, 181);
             this.QueryBarcode.Name = "QueryBarcode";
             this.QueryBarcode.Size = new System.Drawing.Size(101, 45);
             this.QueryBarcode.TabIndex = 48;
@@ -374,6 +378,25 @@
             this.QueryBarcode.UseVisualStyleBackColor = true;
             this.QueryBarcode.Click += new System.EventHandler(this.QueryBarcode_Click);
             // 
+            // sc_code
+            // 
+            this.sc_code.Location = new System.Drawing.Point(199, 576);
+            this.sc_code.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.sc_code.Name = "sc_code";
+            this.sc_code.Size = new System.Drawing.Size(436, 35);
+            this.sc_code.TabIndex = 50;
+            // 
+            // label11
+            // 
+            this.label11.AutoSize = true;
+            this.label11.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label11.Location = new System.Drawing.Point(29, 570);
+            this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(134, 38);
+            this.label11.TabIndex = 49;
+            this.label11.Text = "SCCODE";
+            // 
             // CheckBox
             // 
             this.CheckBox.DataPropertyName = "CheckBox";
@@ -438,6 +461,14 @@
             this.bar_madedate.Name = "bar_madedate";
             this.bar_madedate.Width = 200;
             // 
+            // sc_code1
+            // 
+            this.sc_code1.DataPropertyName = "sc_code";
+            this.sc_code1.HeaderText = "SCCODE";
+            this.sc_code1.MinimumWidth = 10;
+            this.sc_code1.Name = "sc_code1";
+            this.sc_code1.Width = 200;
+            // 
             // pr_spec1
             // 
             this.pr_spec1.DataPropertyName = "pr_spec";
@@ -459,6 +490,8 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(2136, 1338);
+            this.Controls.Add(this.sc_code);
+            this.Controls.Add(this.label11);
             this.Controls.Add(this.QueryBarcode);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.bar_indate);
@@ -531,6 +564,8 @@
         private System.Windows.Forms.Label label2;
         private UAS_BARCODEIO.SearchTextBox pr_code;
         private System.Windows.Forms.Button QueryBarcode;
+        private System.Windows.Forms.TextBox sc_code;
+        private System.Windows.Forms.Label label11;
         private System.Windows.Forms.DataGridViewCheckBoxColumn CheckBox;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_orispeccode4;
         private System.Windows.Forms.DataGridViewTextBoxColumn bar_prodcode;
@@ -539,6 +574,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn bar_remain;
         private System.Windows.Forms.DataGridViewTextBoxColumn bar_vendbarcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn bar_madedate;
+        private System.Windows.Forms.DataGridViewTextBoxColumn sc_code1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail1;
     }

+ 58 - 4
UAS_BARCODEIO/库存条码打印.cs

@@ -6,6 +6,8 @@ using System.Data;
 using System.Drawing;
 using System.Drawing.Printing;
 using System.Linq;
+using System.Media;
+using System.Threading;
 using System.Windows.Forms;
 using static System.Runtime.CompilerServices.RuntimeHelpers;
 
@@ -112,6 +114,7 @@ namespace UAS_BARCODEIO
                 if (dt.Rows.Count == 0)
                 {
                     MessageBox.Show("无条码解析规则");
+                    Play("NG");
                     return;
                 }
                 string split = dt.Rows[0]["el_type"].ToString();
@@ -120,6 +123,7 @@ namespace UAS_BARCODEIO
                 if (str.Length < dt.Rows.Count)
                 {
                     MessageBox.Show("无条码解析规则");
+                    Play("NG");
                     return;
                 }
                 for (int i = 0; i < dt.Rows.Count; i++)
@@ -140,6 +144,9 @@ namespace UAS_BARCODEIO
                         case "QTY":
                             INQTY.Text = str[int.Parse(index) - 1];
                             break;
+                        case "SCCODE":
+                            sc_code.Text = str[int.Parse(index) - 1];
+                            break;
                         default:
                             break;
                     }
@@ -153,6 +160,8 @@ namespace UAS_BARCODEIO
                 INQTY.Text = outqty;
                 LOTNO.Text = lotno;
                 pr_orispeccode3.Text = spec;
+                GenBarCode.PerformClick();
+                Play("OK");
             }
         }
         bool AutoSized = false;
@@ -170,6 +179,7 @@ namespace UAS_BARCODEIO
             if (pr_orispeccode.Text != pr_orispeccode3.Text)
             {
                 MessageBox.Show("解析型号和单据型号不对应");
+                Play("NG");
                 return;
             }
             int Minpackage = 0;
@@ -178,6 +188,7 @@ namespace UAS_BARCODEIO
             if (!int.TryParse(pr_zxbzs.Text, out Minpackage))
             {
                 MessageBox.Show("最小包装数错误,料号" + pr_code.Text);
+                Play("NG");
                 return;
             }
             string outboxcode = "";
@@ -193,6 +204,7 @@ namespace UAS_BARCODEIO
             List<string> bar_code = new List<string>();
             List<string> bar_vendbarcode = new List<string>();
             List<string> bar_madedate = new List<string>();
+            List<string> bar_sccode = new List<string>();
             for (int i = 0; i < barcount; i++)
             {
                 string barcode = "";
@@ -221,18 +233,20 @@ namespace UAS_BARCODEIO
                 bar_code.Add(barcode);
                 bar_vendbarcode.Add(LOTNO.Text);
                 bar_madedate.Add(DC.Text);
+                bar_sccode.Add(sc_code.Text);
+
             }
             string sql = "insert into barcode(BAR_ID, bar_code, bar_prodcode, BAR_remain,bar_vendbarcode, " +
-                 "bar_madedate, BAR_PRODID, BAR_STATUS, BAR_CHECKMAN, BAR_INDATE,BAR_OUTBOXCODE1)select barcode_seq.nextval,:bar_code," +
-                 "'" + pr_code.Text + "',:bar_remain,:bar_vendbarcode,to_date(:bar_madedate,'yyyy-mm-dd'),pr_id,1,'管理员',sysdate,'" + outboxcode + "' " +
+                 "bar_madedate, BAR_PRODID, BAR_STATUS, BAR_CHECKMAN, BAR_INDATE,BAR_OUTBOXCODE1,bar_sccode)select barcode_seq.nextval,:bar_code," +
+                 "'" + pr_code.Text + "',:bar_remain,:bar_vendbarcode,to_date(:bar_madedate,'yyyy-mm-dd'),pr_id,1,'管理员',sysdate,'" + outboxcode + "',:bar_sccode " +
                  " from product where pr_code='" + pr_code.Text + "'";
-            dh.BatchInsert(sql, new string[] { "bar_code", "bar_remain", "bar_vendbarcode", "bar_madedate" }, bar_code.ToArray(), BAR_inqty.ToArray(), bar_vendbarcode.ToArray(), bar_madedate.ToArray());
+            dh.BatchInsert(sql, new string[] { "bar_code", "bar_remain", "bar_vendbarcode", "bar_madedate", "bar_sccode" }, bar_code.ToArray(), BAR_inqty.ToArray(), bar_vendbarcode.ToArray(), bar_madedate.ToArray(), bar_sccode.ToArray());
             LoadBarcodeioData(pr_code.Text);
         }
 
         private void LoadBarcodeioData(string pr_code)
         {
-            string sql = "select 0 CheckBox,bar_code,bar_remain,bar_indate,BAR_OUTBOXCODE1,bar_vendbarcode,to_char(bar_madedate,'yyyy-mm-dd')bar_madedate,pr_detail,pr_spec,bar_prodcode,pr_orispeccode from barcode left join product on bar_prodcode=pr_code where to_char(bar_indate,'yyyy-mm-dd')='" + bar_indate.Value.ToString("yyyy-MM-dd") + "' and bar_prodcode='" + pr_code + "'";
+            string sql = "select 0 CheckBox,bar_code,bar_remain,bar_indate,BAR_OUTBOXCODE1,bar_vendbarcode,to_char(bar_madedate,'yyyy-mm-dd')bar_madedate,pr_detail,pr_spec,bar_prodcode,pr_orispeccode,bar_sccode from barcode left join product on bar_prodcode=pr_code where to_char(bar_indate,'yyyy-mm-dd')='" + bar_indate.Value.ToString("yyyy-MM-dd") + "' and bar_prodcode='" + pr_code + "'";
             DataTable dt = (DataTable)dh.ExecuteSql(sql, "select");
             BaseUtil.FillDgvWithDataTable(BarcodeIO, dt);
         }
@@ -371,5 +385,45 @@ namespace UAS_BARCODEIO
         {
             LoadBarcodeioData(pr_code.Text);
         }
+
+        Thread thread;
+        string FileName = "";
+
+        public void Play(string Type)
+        {
+            if (Type == "OK")
+            {
+                FileName = System.Windows.Forms.Application.StartupPath + @"\Resources\Sound\8378.wav";
+                thread = new Thread(PlaySound);
+                thread.Start();
+
+            }
+            else
+            {
+                FileName = System.Windows.Forms.Application.StartupPath + @"\Resources\Sound\5185.wav";
+                thread = new Thread(PlaySound);
+                thread.Start();
+            }
+        }
+
+        private void PlaySound()
+        {
+            //要加载COM组件:Microsoft speech object Library    
+            if (!System.IO.File.Exists(FileName))
+            {
+                return;
+            }
+            try
+            {
+                SoundPlayer player = new SoundPlayer();
+                player.SoundLocation = FileName;
+                player.Load();
+                player.Play();
+            }
+            catch (Exception e)
+            {
+                MessageBox.Show(e.Message);
+            }
+        }
     }
 }

+ 3 - 0
UAS_BARCODEIO/库存条码打印.resx

@@ -141,6 +141,9 @@
   <metadata name="bar_madedate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="sc_code1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="pr_spec1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 15 - 2
UAS_MES_LGDZ/CustomControl/RichText/RichTextAutoBottom.cs

@@ -42,7 +42,7 @@ namespace UAS_MES_NEW.CustomControl.RichText
             }
             else if (color == Color.DarkRed && Entity.SystemInf.CheckAudioEnable)
             {
-                FileName = Application.StartupPath + @"\Resources\Sound\5185.wav";
+                FileName = Application.StartupPath + @"\Resources\Sound\1454.wav";
                 thread.Start();
                 thread = new Thread(PlaySound);
             }
@@ -88,6 +88,12 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 thread.Start();
                 thread = new Thread(PlaySound);
             }
+            else if (color == Color.DarkRed && Entity.SystemInf.CheckAudioEnable)
+            {
+                FileName = Application.StartupPath + @"\Resources\Sound\1454.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
             else if (color == Color.Green && Entity.SystemInf.CheckAudioEnable)
             {
                 //颜色是绿色,进行正确提示音
@@ -98,7 +104,14 @@ namespace UAS_MES_NEW.CustomControl.RichText
             else if (color == Color.GreenYellow && Entity.SystemInf.CheckAudioEnable)
             {
                 //颜色是绿色,进行正确提示音
-                FileName = Application.StartupPath + @"\Resources\Sound\9865.wav";
+                FileName = Application.StartupPath + @"\Resources\Sound\3285.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.LightGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\3853.wav";
                 thread.Start();
                 thread = new Thread(PlaySound);
             }

+ 135 - 1
UAS_MES_LGDZ/DataOperate/ExcelHandler.cs

@@ -9,6 +9,9 @@ using System.Text;
 using NPOI.SS.Util;
 using System.Drawing;
 using System.Collections.Generic;
+using Seagull.BarTender.Print;
+using DevExpress.XtraPrinting.Native.LayoutAdjustment;
+using DevExpress.XtraExport.Implementation;
 
 namespace UAS_MES_NEW.DataOperate
 {
@@ -24,7 +27,7 @@ namespace UAS_MES_NEW.DataOperate
             MemoryStream ms;
             ms = DataTableToExcel(dt);
             //以系统当前时间命名文件,FileMode.Create表示创建文件,FileAccess.Write表示拥有写的权限
-            string filePath = @FolderPath + "\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls";
+            string filePath = FolderPath;
             FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write);
             byte[] data = ms.ToArray();
             fs.Write(data, 0, data.Length);
@@ -35,6 +38,137 @@ namespace UAS_MES_NEW.DataOperate
             return filePath;
         }
 
+        public string ExportExcel_LIANGAN(DataTable dt, string FolderPath)
+        {
+            //创建一个内存流,用来接收转换成Excel的内容
+            MemoryStream ms;
+            ms = DataTableToExcel_LIANGAN(dt, FolderPath);
+            //以系统当前时间命名文件,FileMode.Create表示创建文件,FileAccess.Write表示拥有写的权限
+            string filePath = FolderPath;
+            FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write);
+            byte[] data = ms.ToArray();
+            fs.Write(data, 0, data.Length);
+            fs.Flush();
+            //释放当前Excel文件,否则打开文件的时候会显示文件被占用
+            ms.Dispose();
+            fs.Dispose();
+            return filePath;
+        }
+
+        public MemoryStream DataTableToExcel_LIANGAN(DataTable DataTable, string FolderPath)
+        {
+            //创建内存流
+            MemoryStream ms = new MemoryStream();
+            //创建一个Book,相当于一个Excel文件
+            HSSFWorkbook book = new HSSFWorkbook();
+            //Excel中的Sheet
+            //获取行数量和列数量
+            int rowNum = DataTable.Rows.Count;
+            int columnNum = DataTable.Columns.Count;
+            //设置列的宽度,根据首行的列的内容的长度来设置
+            for (int i = 0; i < DataTable.Rows.Count; i++)
+            {
+                if (DataTable.Rows[i]["STF_MACHINE"].ToString() != "" && i != DataTable.Rows.Count - 1)
+                {
+                    Console.WriteLine(DataTable.Rows[i]["STF_MACHINE"].ToString());
+                    ISheet sheet1 = book.CreateSheet(DataTable.Rows[i]["STF_MACHINE"].ToString() + "-" + DataTable.Rows[i + 1]["STF_MACHINE"].ToString().Substring(0, 1));
+                    IRow row1 = sheet1.CreateRow(0);
+                    row1.CreateCell(0); row1.Cells[0].SetCellValue("       SMT程式料表     ");
+                   
+                    //客户抬头
+                    IRow row2 = sheet1.CreateRow(1);
+                    CellRangeAddress cellRangeAddress = new CellRangeAddress(1, 1, 0, 1);
+                    CellRangeAddress cellRangeAddress1 = new CellRangeAddress(1, 1, 2, 3);
+                    CellRangeAddress cellRangeAddress2 = new CellRangeAddress(1, 1, 4, 5);
+                    CellRangeAddress cellRangeAddress3 = new CellRangeAddress(1, 1, 6, 7);
+                    sheet1.AddMergedRegion(cellRangeAddress);
+                    sheet1.AddMergedRegion(cellRangeAddress1);
+                    sheet1.AddMergedRegion(cellRangeAddress2);
+                    sheet1.AddMergedRegion(cellRangeAddress3);
+                    row2.CreateCell(0); row2.CreateCell(1); row2.Cells[0].SetCellValue("客户名称:");
+                    row2.CreateCell(2); row2.CreateCell(3); row2.Cells[2].SetCellValue("CY");
+                    row2.CreateCell(4); row2.CreateCell(5); row2.Cells[4].SetCellValue("文件编号://");
+                    row2.CreateCell(6); row2.CreateCell(7); row2.Cells[6].SetCellValue("发行日期:2024-06-14");
+                   
+                    //产品型号
+                    IRow row3 = sheet1.CreateRow(2);
+                    CellRangeAddress cellRangeAddress4 = new CellRangeAddress(2, 2, 0, 1);
+                    CellRangeAddress cellRangeAddress5 = new CellRangeAddress(2, 2, 2, 3);
+                    CellRangeAddress cellRangeAddress6 = new CellRangeAddress(2, 2, 4, 5);
+                    CellRangeAddress cellRangeAddress7 = new CellRangeAddress(2, 2, 6, 7);
+                    sheet1.AddMergedRegion(cellRangeAddress4);
+                    sheet1.AddMergedRegion(cellRangeAddress5);
+                    sheet1.AddMergedRegion(cellRangeAddress6);
+                    sheet1.AddMergedRegion(cellRangeAddress7);
+                    row3.CreateCell(0); row3.CreateCell(1); row3.Cells[0].SetCellValue("产品型号:");
+                    row3.CreateCell(2); row3.CreateCell(3); row3.Cells[2].SetCellValue("it9220-LS2404-B1-V2.0-MB");
+                    row3.CreateCell(4); row3.CreateCell(5); row3.Cells[4].SetCellValue("BOM编号:EN-CY-BOM-143(A0)");
+                    row3.CreateCell(6); row3.CreateCell(7); row3.Cells[6].SetCellValue("生效日期:2024-06-14");
+                    
+                    //程序名称
+                    IRow row4 = sheet1.CreateRow(3);
+                    CellRangeAddress cellRangeAddress8 = new CellRangeAddress(3, 3, 0, 1);
+                    CellRangeAddress cellRangeAddress9 = new CellRangeAddress(3, 3, 2, 3);
+                    CellRangeAddress cellRangeAddress10 = new CellRangeAddress(3, 3, 4, 5);
+                    sheet1.AddMergedRegion(cellRangeAddress8);
+                    sheet1.AddMergedRegion(cellRangeAddress9);
+                    sheet1.AddMergedRegion(cellRangeAddress10);
+                    row4.CreateCell(0); row4.CreateCell(1); row4.Cells[0].SetCellValue("程序名称\t\r\n");
+                    row4.CreateCell(2); row4.CreateCell(3); row4.Cells[2].SetCellValue("CY-it9220-LS2404-B1-V2.0-MB\t\r\n");
+                    row4.CreateCell(4); row4.CreateCell(5); row4.Cells[4].SetCellValue("面别:    AB面\t\r\n");
+
+                    //机器名称
+                    IRow row5 = sheet1.CreateRow(4);
+                    CellRangeAddress cellRangeAddress14 = new CellRangeAddress(5, 5, 0, 1);
+                    CellRangeAddress cellRangeAddress15 = new CellRangeAddress(5, 5, 2, 3);
+                    CellRangeAddress cellRangeAddress16 = new CellRangeAddress(5, 5, 4, 5);
+                    CellRangeAddress cellRangeAddress20 = new CellRangeAddress(5, 6, 6, 7);
+                    sheet1.AddMergedRegion(cellRangeAddress20);
+                    sheet1.AddMergedRegion(cellRangeAddress14);
+                    sheet1.AddMergedRegion(cellRangeAddress15);
+                    sheet1.AddMergedRegion(cellRangeAddress16);
+                    sheet1.AddMergedRegion(cellRangeAddress20);
+                    row5.CreateCell(0); row5.CreateCell(1); row5.Cells[0].SetCellValue("机器名称\t\r\n");
+                    row5.CreateCell(2); row5.CreateCell(3); row5.Cells[2].SetCellValue("TX2I+TX2I+TX2I+TX2+SX1\t\r\n");
+                    row5.CreateCell(4); row5.CreateCell(5); row5.Cells[4].SetCellValue("QA确认:\t\r\n");
+                    row5.CreateCell(6); row5.CreateCell(7); row5.Cells[6].SetCellValue("文控签章:");
+
+                    //制作
+                    IRow row6 = sheet1.CreateRow(5);
+                    CellRangeAddress cellRangeAddress17 = new CellRangeAddress(6, 6, 0, 1);
+                    CellRangeAddress cellRangeAddress18 = new CellRangeAddress(6, 6, 2, 3);
+                    CellRangeAddress cellRangeAddress19 = new CellRangeAddress(6, 6, 4, 5);
+                    sheet1.AddMergedRegion(cellRangeAddress17);
+                    sheet1.AddMergedRegion(cellRangeAddress18);
+                    sheet1.AddMergedRegion(cellRangeAddress19);
+                    row6.CreateCell(0); row6.CreateCell(1); row6.Cells[0].SetCellValue("制作:"    );
+                    row6.CreateCell(2); row6.CreateCell(3); row6.Cells[2].SetCellValue("贺瑞华");
+                    row6.CreateCell(4); row6.CreateCell(5); row6.Cells[4].SetCellValue("QA审核:");
+
+                    //制作
+                    IRow row7 = sheet1.CreateRow(6);
+                    CellRangeAddress cellRangeAddress21 = new CellRangeAddress(6, 6, 0, 7);
+                    sheet1.AddMergedRegion(cellRangeAddress21);
+                    row7.CreateCell(0); row7.CreateCell(1); row7.Cells[0].SetCellValue(DataTable.Rows[i]["STF_MACHINE"].ToString() + "-" + DataTable.Rows[i + 1]["STF_MACHINE"].ToString().Substring(0, 1));
+                 
+
+                    IRow row8 = sheet1.CreateRow(7);
+                    row8.CreateCell(0); row8.Cells[0].SetCellValue("站位");
+                    row8.CreateCell(1); row8.Cells[1].SetCellValue("Feeder类型");
+                    row8.CreateCell(2); row8.Cells[2].SetCellValue("位置");
+                    row8.CreateCell(3); row8.Cells[3].SetCellValue("物料编码");
+                    row8.CreateCell(4); row8.Cells[4].SetCellValue("物料描述");
+                    row8.CreateCell(5); row8.Cells[5].SetCellValue("用量");
+                    row8.CreateCell(6); row8.Cells[6].SetCellValue("位号");
+                    row8.CreateCell(7); row8.Cells[7].SetCellValue("备注");
+                    i = i + 1;
+                }
+            }
+            //将book的内容写入内存流中返回
+            book.Write(ms);
+            return ms;
+        }
+
         /// <summary>
         /// 导出Excel,返回文件在客户端的路径
         /// </summary>

+ 60 - 60
UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -190,7 +190,7 @@ namespace UAS_MES_NEW.Make
                         }
                     }
                     LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out ErrorMessage);
-                    if (LogicHandler.CheckStepSNAndMacode(oMakeCode == "" ? ma_code.Text : oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
                     {
                         string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
                         if (nextstepcode != User.CurrentStepCode)
@@ -240,86 +240,86 @@ namespace UAS_MES_NEW.Make
                             sncode.Focus();
                             return;
                         }
-                        if (int.Parse(mcd_remainqty.Text) <= 0 && dt.Rows[0]["ma_unlimitin"].ToString() == "0")
+                        //if (int.Parse(mcd_remainqty.Text) <= 0 && dt.Rows[0]["ma_unlimitin"].ToString() == "0")
+                        //{
+                        //    macode = ma_code.Text;
+                        //    ErrorMessage = "工单" + macode + "打印结束\n>请输入SN";
+                        //    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                        //    sncode.Focus();
+                        //}
+                        //else
+                        //{
+                        //所选标签不为空
+                        if (PrintLabel.SelectedValue != null)
                         {
-                            macode = ma_code.Text;
-                            ErrorMessage = "工单" + macode + "打印结束\n>请输入SN";
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
-                            sncode.Focus();
-                        }
-                        else
-                        {
-                            //所选标签不为空
-                            if (PrintLabel.SelectedValue != null)
+                            //如果打印张数为空,返回
+                            if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
                             {
-                                //如果打印张数为空,返回
-                                if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
+                                OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red, sncode);
+                                //清空输入框的值,聚焦
+                                sncode.Focus();
+                                //提示用户“>>请输入SN”
+                                OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                return;
+                            }
+                            //更新至下一步工序
+                            if (LogicHandler.SetStepResult(oMakeCode, User.UserSourceCode, sncode.Text, "彩盒打印", "彩盒打印成功", User.UserCode, out ErrorMessage))
+                            {
+                                //提示正确返回时传递的信息
+                                if (ErrorMessage.Contains("AFTERSUCCESS"))
+                                    OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
                                 {
-                                    OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red, sncode);
-                                    //清空输入框的值,聚焦
-                                    sncode.Focus();
-                                    //提示用户“>>请输入SN”
-                                    OperateResult.AppendText(">>请输入SN\n", Color.Black);
-                                    return;
+                                    //提示用户打印成功
+                                    OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
                                 }
-                                //更新至下一步工序
-                                if (LogicHandler.SetStepResult(oMakeCode, User.UserSourceCode, sncode.Text, "彩盒打印", "彩盒打印成功", User.UserCode, out ErrorMessage))
+                                else
+                                {
+                                    OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                                }
+                                if (PrintSecond.Checked)
                                 {
-                                    //提示正确返回时传递的信息
-                                    if (ErrorMessage.Contains("AFTERSUCCESS"))
-                                        OperateResult.AppendText(">>" + ErrorMessage + "\n");
-                                    if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
+                                    if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, sncode.Text, int.Parse(PrintNum1.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
                                     {
-                                        //提示用户打印成功
                                         OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
                                     }
                                     else
                                     {
                                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                                     }
-                                    if (PrintSecond.Checked)
-                                    {
-                                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, sncode.Text, int.Parse(PrintNum1.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
-                                        {
-                                            OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
-                                        }
-                                        else
-                                        {
-                                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
-                                        }
-                                    }
-                                    if (CollectRemark.Checked && Remark.Text != "")
-                                    {
-                                        LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, pr_code.Text, Remark.Text);
-                                    }
-                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒打印", "彩盒打印成功", sncode.Text, "");
-                                    //刷新打印数量和剩余数量
-                                    dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,mcd_okqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
-                                    BaseUtil.SetFormValue(Controls, dt);
-                                    sncode.Text = "";
-                                    ms_id = null;
-                                    sncode.Focus();
                                 }
-                                else
+                                if (CollectRemark.Checked && Remark.Text != "")
                                 {
-                                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sncode);
-                                    ms_id = null;
-                                    sncode.Focus();
+                                    LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, pr_code.Text, Remark.Text);
                                 }
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒打印", "彩盒打印成功", sncode.Text, "");
+                                //刷新打印数量和剩余数量
+                                dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,mcd_okqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
+                                BaseUtil.SetFormValue(Controls, dt);
+                                sncode.Text = "";
+                                ms_id = null;
+                                sncode.Focus();
                             }
                             else
                             {
-                                OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护彩盒标签\n", Color.Red, sncode);
-                                return;
-                            }
-                            if (CheckTSN.Checked == true)
-                            {
-                                OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sncode);
                                 ms_id = null;
+                                sncode.Focus();
                             }
-                            else
-                                OperateResult.AppendText(">>请输入SN\n", Color.Black);
                         }
+                        else
+                        {
+                            OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护彩盒标签\n", Color.Red, sncode);
+                            return;
+                        }
+                        if (CheckTSN.Checked == true)
+                        {
+                            OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                            ms_id = null;
+                        }
+                        else
+                            OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                        //}
                     }
                     else
                     {

+ 60 - 60
UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxLabelPrint_WN.cs

@@ -190,7 +190,7 @@ namespace UAS_MES_NEW.Make
                         }
                     }
                     LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out ErrorMessage);
-                    if (LogicHandler.CheckStepSNAndMacode(oMakeCode == "" ? ma_code.Text : oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
                     {
                         string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
                         if (nextstepcode != User.CurrentStepCode)
@@ -240,86 +240,86 @@ namespace UAS_MES_NEW.Make
                             sncode.Focus();
                             return;
                         }
-                        if (int.Parse(mcd_remainqty.Text) <= 0 && dt.Rows[0]["ma_unlimitin"].ToString() == "0")
+                        //if (int.Parse(mcd_remainqty.Text) <= 0 && dt.Rows[0]["ma_unlimitin"].ToString() == "0")
+                        //{
+                        //    macode = ma_code.Text;
+                        //    ErrorMessage = "工单" + macode + "打印结束\n>请输入SN";
+                        //    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                        //    sncode.Focus();
+                        //}
+                        //else
+                        //{
+                        //所选标签不为空
+                        if (PrintLabel.SelectedValue != null)
                         {
-                            macode = ma_code.Text;
-                            ErrorMessage = "工单" + macode + "打印结束\n>请输入SN";
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
-                            sncode.Focus();
-                        }
-                        else
-                        {
-                            //所选标签不为空
-                            if (PrintLabel.SelectedValue != null)
+                            //如果打印张数为空,返回
+                            if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
                             {
-                                //如果打印张数为空,返回
-                                if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
+                                OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red, sncode);
+                                //清空输入框的值,聚焦
+                                sncode.Focus();
+                                //提示用户“>>请输入SN”
+                                OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                return;
+                            }
+                            //更新至下一步工序
+                            if (LogicHandler.SetStepResult(oMakeCode, User.UserSourceCode, sncode.Text, "彩盒打印", "彩盒打印成功", User.UserCode, out ErrorMessage))
+                            {
+                                //提示正确返回时传递的信息
+                                if (ErrorMessage.Contains("AFTERSUCCESS"))
+                                    OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
                                 {
-                                    OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red, sncode);
-                                    //清空输入框的值,聚焦
-                                    sncode.Focus();
-                                    //提示用户“>>请输入SN”
-                                    OperateResult.AppendText(">>请输入SN\n", Color.Black);
-                                    return;
+                                    //提示用户打印成功
+                                    OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
                                 }
-                                //更新至下一步工序
-                                if (LogicHandler.SetStepResult(oMakeCode, User.UserSourceCode, sncode.Text, "彩盒打印", "彩盒打印成功", User.UserCode, out ErrorMessage))
+                                else
+                                {
+                                    OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                                }
+                                if (PrintSecond.Checked)
                                 {
-                                    //提示正确返回时传递的信息
-                                    if (ErrorMessage.Contains("AFTERSUCCESS"))
-                                        OperateResult.AppendText(">>" + ErrorMessage + "\n");
-                                    if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
+                                    if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, sncode.Text, int.Parse(PrintNum1.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
                                     {
-                                        //提示用户打印成功
                                         OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
                                     }
                                     else
                                     {
                                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                                     }
-                                    if (PrintSecond.Checked)
-                                    {
-                                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, sncode.Text, int.Parse(PrintNum1.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
-                                        {
-                                            OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
-                                        }
-                                        else
-                                        {
-                                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
-                                        }
-                                    }
-                                    if (CollectRemark.Checked && Remark.Text != "")
-                                    {
-                                        LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, pr_code.Text, Remark.Text);
-                                    }
-                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒打印", "彩盒打印成功", sncode.Text, "");
-                                    //刷新打印数量和剩余数量
-                                    dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,mcd_okqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
-                                    BaseUtil.SetFormValue(Controls, dt);
-                                    sncode.Text = "";
-                                    ms_id = null;
-                                    sncode.Focus();
                                 }
-                                else
+                                if (CollectRemark.Checked && Remark.Text != "")
                                 {
-                                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sncode);
-                                    ms_id = null;
-                                    sncode.Focus();
+                                    LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, pr_code.Text, Remark.Text);
                                 }
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒打印", "彩盒打印成功", sncode.Text, "");
+                                //刷新打印数量和剩余数量
+                                dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,mcd_okqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
+                                BaseUtil.SetFormValue(Controls, dt);
+                                sncode.Text = "";
+                                ms_id = null;
+                                sncode.Focus();
                             }
                             else
                             {
-                                OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护彩盒标签\n", Color.Red, sncode);
-                                return;
-                            }
-                            if (CheckTSN.Checked == true)
-                            {
-                                OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sncode);
                                 ms_id = null;
+                                sncode.Focus();
                             }
-                            else
-                                OperateResult.AppendText(">>请输入SN\n", Color.Black);
                         }
+                        else
+                        {
+                            OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护彩盒标签\n", Color.Red, sncode);
+                            return;
+                        }
+                        if (CheckTSN.Checked == true)
+                        {
+                            OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                            ms_id = null;
+                        }
+                        else
+                            OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                        //}
                     }
                     else
                     {

+ 2 - 1
UAS_MES_LGDZ/FunctionCode/Make/Make_ColorBoxWeigh_ReadLine.cs

@@ -266,8 +266,9 @@ namespace UAS_MES_NEW.Make
                                 Remark.AppendText(weigh.Trim() + "\n");
                                 if (weigh != "")
                                 {
-                                    weight.Text = re.Match(weigh).Groups[0].Value;
+                                    weight.Text = weigh.Trim();
                                 }
+                                Remark.Clear();
                             }
                             catch (Exception)
                             {

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -154,7 +154,7 @@ namespace UAS_MES_NEW.Make
                     LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out oErrorMessage);
                     if (oMakeCode == "" || oMakeCode == null)
                         oMakeCode = ma_code.Text;
-                    if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out oErrorMessage))
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out oErrorMessage))
                     {
                         string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsId + "'").ToString();
                         if (nextstepcode != User.CurrentStepCode)

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrintGetIMEI.cs

@@ -154,7 +154,7 @@ namespace UAS_MES_NEW.Make
                     LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out oErrorMessage);
                     if (oMakeCode == "" || oMakeCode == null)
                         oMakeCode = ma_code.Text;
-                    if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out oErrorMessage))
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out oErrorMessage))
                     {
                         string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsId + "'").ToString();
                         if (nextstepcode != User.CurrentStepCode)

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Make/Make_FuselageLabelPrintGetIMEIWatch.cs

@@ -154,7 +154,7 @@ namespace UAS_MES_NEW.Make
                     LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out oErrorMessage);
                     if (oMakeCode == "" || oMakeCode == null)
                         oMakeCode = ma_code.Text;
-                    if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out oErrorMessage))
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out oErrorMessage))
                     {
                         string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsId + "'").ToString();
                         if (nextstepcode != User.CurrentStepCode)

+ 13 - 13
UAS_MES_LGDZ/FunctionCode/Make/Make_ImeiCheck.cs

@@ -83,7 +83,7 @@ namespace UAS_MES_NEW.Make
             {
                 if (sncode.Text == "")
                 {
-                    OperateResult.AppendText("<<输入不能为空\n", Color.Red);
+                    OperateResult.AppendText("<<输入不能为空\n", Color.DarkRed);
                     return;
                 }
                 dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_code='" + sncode.Text + "' or  ms_imei1='" + sncode.Text + "' order by ms_id desc", "select");
@@ -148,7 +148,7 @@ namespace UAS_MES_NEW.Make
                                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                     if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
                                     {
-                                        OperateResult.AppendText("<<SN错误,序列号" + sncode.Text + "不存在\n", Color.Red, sncode);
+                                        OperateResult.AppendText("<<SN错误,序列号" + sncode.Text + "不存在\n", Color.DarkRed, sncode);
                                         OperateResult.AppendText(">>请输入SN\n", Color.Black);
                                     }
                                 }
@@ -173,9 +173,9 @@ namespace UAS_MES_NEW.Make
                     }
                     else
                     {
-                        OperateResult.AppendText("<<SN:" + sncode.Text + "对应的SN不存在\n", Color.Red, sncode);
+                        OperateResult.AppendText("<<SN:" + sncode.Text + "对应的SN不存在\n", Color.DarkRed, sncode);
                         OperateResult.AppendText(">>请输入SN\n", Color.Black);
-                        SetCheck set = new SetCheck("NG", Color.Red);
+                        SetCheck set = new SetCheck("NG", Color.DarkRed);
                         BaseUtil.SetFormCenter(set);
                         set.ShowDialog();
                     }
@@ -209,7 +209,7 @@ namespace UAS_MES_NEW.Make
                                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                     if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
                                     {
-                                        OperateResult.AppendText("<<SN错误,序列号" + sncode.Text + "不存在\n", Color.Red, sncode);
+                                        OperateResult.AppendText("<<SN错误,序列号" + sncode.Text + "不存在\n", Color.DarkRed, sncode);
                                         OperateResult.AppendText(">>请输入SN\n", Color.Black);
                                     }
                                 }
@@ -237,7 +237,7 @@ namespace UAS_MES_NEW.Make
                                 if (nextstepcode != User.CurrentStepCode)
                                 {
                                     string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
-                                    OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sncode);
+                                    OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.DarkRed, sncode);
                                     imei1 = "";
                                     isImei1 = false;
                                     return;
@@ -262,15 +262,15 @@ namespace UAS_MES_NEW.Make
                                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "标签核对", "标签核对成功", SN, "");
                                     //SN核对成功
                                     //>> 请输入SN
-                                    OperateResult.AppendText("<<SN核对成功\n", Color.Green, sncode);
+                                    OperateResult.AppendText("<<SN核对成功\n", Color.LightGreen, sncode);
                                     OperateResult.AppendText(">>请输入SN\n", Color.Black);
                                 }
                                 else
                                 {
                                     //setstepresult不通过
-                                    OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                                    OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.DarkRed, sncode);
                                     recordResult(checksn, DateTime.Now.ToString(), "失败");
-                                    SetCheck set = new SetCheck("NG", Color.Red);
+                                    SetCheck set = new SetCheck("NG", Color.DarkRed);
                                     BaseUtil.SetFormCenter(set);
                                     set.ShowDialog();
                                 }
@@ -278,9 +278,9 @@ namespace UAS_MES_NEW.Make
                             else
                             {
                                 //判定序列号下一工序不通过
-                                OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                                OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.DarkRed, sncode);
                                 recordResult(checksn, DateTime.Now.ToString(), "失败");
-                                SetCheck set = new SetCheck("NG", Color.Red);
+                                SetCheck set = new SetCheck("NG", Color.DarkRed);
                                 BaseUtil.SetFormCenter(set);
                                 set.ShowDialog();
                             }
@@ -288,7 +288,7 @@ namespace UAS_MES_NEW.Make
                         else
                         {
                             //判定工序属性不通过
-                            OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                            OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.DarkRed, sncode);
                             recordResult(checksn, DateTime.Now.ToString(), "失败");
                         }
                     }
@@ -299,7 +299,7 @@ namespace UAS_MES_NEW.Make
                         imei1 = "";
                         //SN核对失败
                         //>> 请输入SN
-                        OperateResult.AppendText(">>SN核对失败,不一致\n", Color.Red, sncode);
+                        OperateResult.AppendText(">>SN核对失败,不一致\n", Color.DarkRed, sncode);
                         OperateResult.AppendText(">>请输入SN\n", Color.Black);
                     }
                     //imei1校对结束,下次输入的是SN

+ 167 - 140
UAS_MES_LGDZ/FunctionCode/Query/Query_SpecialReport.Designer.cs

@@ -29,196 +29,223 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Query_SpecialReport));
-            this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
-            this.Prefix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.label5 = new System.Windows.Forms.Label();
-            this.Date = new System.Windows.Forms.DateTimePicker();
-            this.Num = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ExportFileDialog = new System.Windows.Forms.FolderBrowserDialog();
+            this.ImportExcel1 = new System.Windows.Forms.OpenFileDialog();
             this.label1 = new System.Windows.Forms.Label();
+            this.Process = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
-            this.label3 = new System.Windows.Forms.Label();
-            this.Rn = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.label4 = new System.Windows.Forms.Label();
-            this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.TraceFilePath = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.TraceFile = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.XY = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.XYFilePath = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.dataGridView1 = new System.Windows.Forms.DataGridView();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
             this.SuspendLayout();
             // 
-            // Export
-            // 
-            this.Export.AllPower = null;
-            this.Export.BackColor = System.Drawing.Color.Transparent;
-            this.Export.DownImage = ((System.Drawing.Image)(resources.GetObject("Export.DownImage")));
-            this.Export.Image = null;
-            this.Export.IsShowBorder = true;
-            this.Export.Location = new System.Drawing.Point(362, 506);
-            this.Export.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
-            this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
-            this.Export.Name = "Export";
-            this.Export.NormalImage = ((System.Drawing.Image)(resources.GetObject("Export.NormalImage")));
-            this.Export.Power = null;
-            this.Export.Size = new System.Drawing.Size(150, 56);
-            this.Export.TabIndex = 0;
-            this.Export.Text = "打印";
-            this.Export.UseVisualStyleBackColor = false;
-            this.Export.Click += new System.EventHandler(this.Export_Click);
-            // 
-            // Prefix
-            // 
-            this.Prefix.AllPower = null;
-            this.Prefix.BackColor = System.Drawing.Color.White;
-            this.Prefix.ID = null;
-            this.Prefix.Location = new System.Drawing.Point(362, 85);
-            this.Prefix.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
-            this.Prefix.Name = "Prefix";
-            this.Prefix.Power = null;
-            this.Prefix.Size = new System.Drawing.Size(278, 35);
-            this.Prefix.Str = null;
-            this.Prefix.Str1 = null;
-            this.Prefix.Str2 = null;
-            this.Prefix.TabIndex = 12;
-            this.Prefix.TextChanged += new System.EventHandler(this.inoutno_TextChanged);
-            // 
             // label5
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(217, 79);
+            this.label5.Location = new System.Drawing.Point(212, 143);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(82, 41);
+            this.label5.Size = new System.Drawing.Size(210, 41);
             this.label5.TabIndex = 11;
-            this.label5.Text = "前缀";
-            // 
-            // Date
-            // 
-            this.Date.Location = new System.Drawing.Point(362, 190);
-            this.Date.Name = "Date";
-            this.Date.Size = new System.Drawing.Size(278, 35);
-            this.Date.TabIndex = 13;
-            // 
-            // Num
-            // 
-            this.Num.AllPower = null;
-            this.Num.BackColor = System.Drawing.Color.White;
-            this.Num.ID = null;
-            this.Num.Location = new System.Drawing.Point(362, 310);
-            this.Num.Margin = new System.Windows.Forms.Padding(6);
-            this.Num.Name = "Num";
-            this.Num.Power = null;
-            this.Num.Size = new System.Drawing.Size(278, 35);
-            this.Num.Str = null;
-            this.Num.Str1 = null;
-            this.Num.Str2 = null;
-            this.Num.TabIndex = 14;
+            this.label5.Text = "原始坐标文件";
+            // 
+            // ImportExcel1
+            // 
+            this.ImportExcel1.FileName = "ImportExcel";
             // 
             // label1
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(217, 304);
+            this.label1.Location = new System.Drawing.Point(212, 74);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(82, 41);
-            this.label1.TabIndex = 15;
-            this.label1.Text = "数量";
+            this.label1.Size = new System.Drawing.Size(146, 41);
+            this.label1.TabIndex = 240;
+            this.label1.Text = "产品编号";
+            // 
+            // Process
+            // 
+            this.Process.AutoSize = true;
+            this.Process.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Process.Location = new System.Drawing.Point(1028, 149);
+            this.Process.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.Process.Name = "Process";
+            this.Process.Size = new System.Drawing.Size(0, 41);
+            this.Process.TabIndex = 241;
             // 
             // 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(217, 190);
+            this.label2.Location = new System.Drawing.Point(891, 149);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(82, 41);
-            this.label2.TabIndex = 16;
-            this.label2.Text = "日期";
-            // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(217, 411);
-            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(82, 41);
-            this.label3.TabIndex = 18;
-            this.label3.Text = "流水";
-            // 
-            // Rn
-            // 
-            this.Rn.AllPower = null;
-            this.Rn.BackColor = System.Drawing.Color.White;
-            this.Rn.ID = null;
-            this.Rn.Location = new System.Drawing.Point(362, 417);
-            this.Rn.Margin = new System.Windows.Forms.Padding(6);
-            this.Rn.Name = "Rn";
-            this.Rn.Power = null;
-            this.Rn.Size = new System.Drawing.Size(278, 35);
-            this.Rn.Str = null;
-            this.Rn.Str1 = null;
-            this.Rn.Str2 = null;
-            this.Rn.TabIndex = 17;
-            this.Rn.Text = "1";
-            // 
-            // label4
-            // 
-            this.label4.AutoSize = true;
-            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(801, 85);
-            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(114, 41);
-            this.label4.TabIndex = 186;
-            this.label4.Text = "打印机";
-            // 
-            // Printer
-            // 
-            this.Printer.Location = new System.Drawing.Point(960, 85);
-            this.Printer.Margin = new System.Windows.Forms.Padding(8);
-            this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(291, 50);
-            this.Printer.TabIndex = 185;
+            this.label2.TabIndex = 242;
+            this.label2.Text = "进度";
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(180, 336);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(242, 41);
+            this.label6.TabIndex = 244;
+            this.label6.Text = "贴片机导出文件";
+            // 
+            // TraceFilePath
+            // 
+            this.TraceFilePath.AllPower = null;
+            this.TraceFilePath.BackColor = System.Drawing.Color.White;
+            this.TraceFilePath.ID = null;
+            this.TraceFilePath.Location = new System.Drawing.Point(434, 342);
+            this.TraceFilePath.Margin = new System.Windows.Forms.Padding(6);
+            this.TraceFilePath.Name = "TraceFilePath";
+            this.TraceFilePath.Power = null;
+            this.TraceFilePath.Size = new System.Drawing.Size(445, 35);
+            this.TraceFilePath.Str = null;
+            this.TraceFilePath.Str1 = null;
+            this.TraceFilePath.Str2 = null;
+            this.TraceFilePath.TabIndex = 245;
+            // 
+            // TraceFile
+            // 
+            this.TraceFile.AllPower = null;
+            this.TraceFile.BackColor = System.Drawing.Color.Transparent;
+            this.TraceFile.DownImage = ((System.Drawing.Image)(resources.GetObject("TraceFile.DownImage")));
+            this.TraceFile.Image = null;
+            this.TraceFile.IsShowBorder = true;
+            this.TraceFile.Location = new System.Drawing.Point(434, 403);
+            this.TraceFile.Margin = new System.Windows.Forms.Padding(6);
+            this.TraceFile.MoveImage = ((System.Drawing.Image)(resources.GetObject("TraceFile.MoveImage")));
+            this.TraceFile.Name = "TraceFile";
+            this.TraceFile.NormalImage = ((System.Drawing.Image)(resources.GetObject("TraceFile.NormalImage")));
+            this.TraceFile.Power = null;
+            this.TraceFile.Size = new System.Drawing.Size(198, 56);
+            this.TraceFile.TabIndex = 243;
+            this.TraceFile.Text = "导入贴片机资料";
+            this.TraceFile.UseVisualStyleBackColor = false;
+            this.TraceFile.Click += new System.EventHandler(this.TraceFile_Click);
+            // 
+            // pr_code
+            // 
+            this.pr_code.AllPower = "ifall";
+            this.pr_code.Caller = null;
+            this.pr_code.Condition = null;
+            this.pr_code.DBTitle = "回流工序";
+            this.pr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.pr_code.FormName = null;
+            this.pr_code.Location = new System.Drawing.Point(434, 74);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(5);
+            this.pr_code.Name = "pr_code";
+            this.pr_code.Power = "ifspecial";
+            this.pr_code.ReturnData = null;
+            this.pr_code.SelectField = null;
+            this.pr_code.SetValueField = null;
+            this.pr_code.Size = new System.Drawing.Size(445, 44);
+            this.pr_code.TabIndex = 239;
+            this.pr_code.TableName = null;
+            this.pr_code.Tag = "";
+            this.pr_code.TextBoxEnable = false;
+            // 
+            // XY
+            // 
+            this.XY.AllPower = null;
+            this.XY.BackColor = System.Drawing.Color.Transparent;
+            this.XY.DownImage = ((System.Drawing.Image)(resources.GetObject("XY.DownImage")));
+            this.XY.Image = null;
+            this.XY.IsShowBorder = true;
+            this.XY.Location = new System.Drawing.Point(434, 223);
+            this.XY.Margin = new System.Windows.Forms.Padding(6);
+            this.XY.MoveImage = ((System.Drawing.Image)(resources.GetObject("XY.MoveImage")));
+            this.XY.Name = "XY";
+            this.XY.NormalImage = ((System.Drawing.Image)(resources.GetObject("XY.NormalImage")));
+            this.XY.Power = null;
+            this.XY.Size = new System.Drawing.Size(177, 56);
+            this.XY.TabIndex = 187;
+            this.XY.Text = "导入原始坐标";
+            this.XY.UseVisualStyleBackColor = false;
+            this.XY.Click += new System.EventHandler(this.XY_Click);
+            // 
+            // XYFilePath
+            // 
+            this.XYFilePath.AllPower = null;
+            this.XYFilePath.BackColor = System.Drawing.Color.White;
+            this.XYFilePath.ID = null;
+            this.XYFilePath.Location = new System.Drawing.Point(434, 149);
+            this.XYFilePath.Margin = new System.Windows.Forms.Padding(6);
+            this.XYFilePath.Name = "XYFilePath";
+            this.XYFilePath.Power = null;
+            this.XYFilePath.Size = new System.Drawing.Size(445, 35);
+            this.XYFilePath.Str = null;
+            this.XYFilePath.Str1 = null;
+            this.XYFilePath.Str2 = null;
+            this.XYFilePath.TabIndex = 12;
+            this.XYFilePath.TextChanged += new System.EventHandler(this.inoutno_TextChanged);
+            // 
+            // dataGridView1
+            // 
+            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dataGridView1.Location = new System.Drawing.Point(41, 482);
+            this.dataGridView1.Name = "dataGridView1";
+            this.dataGridView1.RowHeadersWidth = 82;
+            this.dataGridView1.RowTemplate.Height = 37;
+            this.dataGridView1.Size = new System.Drawing.Size(1416, 535);
+            this.dataGridView1.TabIndex = 246;
             // 
             // Query_SpecialReport
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1494, 1075);
-            this.Controls.Add(this.label4);
-            this.Controls.Add(this.Printer);
-            this.Controls.Add(this.label3);
-            this.Controls.Add(this.Rn);
+            this.Controls.Add(this.dataGridView1);
+            this.Controls.Add(this.TraceFilePath);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.TraceFile);
             this.Controls.Add(this.label2);
+            this.Controls.Add(this.Process);
             this.Controls.Add(this.label1);
-            this.Controls.Add(this.Num);
-            this.Controls.Add(this.Date);
-            this.Controls.Add(this.Prefix);
+            this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.XY);
+            this.Controls.Add(this.XYFilePath);
             this.Controls.Add(this.label5);
-            this.Controls.Add(this.Export);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "Query_SpecialReport";
             this.Tag = "Query!SpecialReport";
             this.Text = "Query_SpecialReport";
             this.Load += new System.EventHandler(this.Query_SpecialReport_Load);
-            this.ResumeLayout(true);
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
 
         #endregion
-
-        private CustomControl.ButtonUtil.NormalButton Export;
         private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
-        private CustomControl.TextBoxWithIcon.EnterTextBox Prefix;
+        private CustomControl.TextBoxWithIcon.EnterTextBox XYFilePath;
         private System.Windows.Forms.Label label5;
-        private System.Windows.Forms.DateTimePicker Date;
-        private CustomControl.TextBoxWithIcon.EnterTextBox Num;
+        private System.Windows.Forms.FolderBrowserDialog ExportFileDialog;
+        private CustomControl.ButtonUtil.NormalButton XY;
+        private System.Windows.Forms.OpenFileDialog ImportExcel1;
+        private CustomControl.TextBoxWithIcon.SearchTextBox pr_code;
         private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label Process;
         private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.Label label3;
-        private CustomControl.TextBoxWithIcon.EnterTextBox Rn;
-        private System.Windows.Forms.Label label4;
-        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
+        private CustomControl.ButtonUtil.NormalButton TraceFile;
+        private CustomControl.TextBoxWithIcon.EnterTextBox TraceFilePath;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.DataGridView dataGridView1;
     }
 }

+ 380 - 69
UAS_MES_LGDZ/FunctionCode/Query/Query_SpecialReport.cs

@@ -1,5 +1,14 @@
-using LabelManager2;
+using DevExpress.Printing.Core.PdfExport.Metafile;
+using DevExpress.XtraCharts.Native;
+using ExcelHelper;
+using LabelManager2;
+using NPOI.HSSF.UserModel;
+using NPOI.SS.Formula.Functions;
+using NPOI.SS.UserModel;
 using System;
+using System.Collections.Generic;
+using System.Data;
+using System.IO;
 using System.Linq;
 using System.Threading;
 using System.Windows.Forms;
@@ -15,10 +24,6 @@ namespace UAS_MES_NEW.Query
 
         DataHelper dh = SystemInf.dh;
 
-        ApplicationClass lbl;
-
-        Document doc;
-
         Thread InitPrint;
 
         public Query_SpecialReport()
@@ -26,97 +31,403 @@ namespace UAS_MES_NEW.Query
             InitializeComponent();
         }
 
-        private void Export_Click(object sender, EventArgs e)
+        private void Query_SpecialReport_Load(object sender, EventArgs e)
+        {
+            pr_code.TableName = "product";
+            pr_code.SelectField = "pr_code # 产品编号,pr_detail # 产品名称,pr_spec # 产品规格";
+            pr_code.FormName = Name;
+            pr_code.DBTitle = "物料查询";
+            pr_code.SetValueField = new string[] { "pr_code" };
+        }
+
+        private static string lpad(int length, string number)
         {
-            ExcelExport("");
+            while (number.Length < length)
+            {
+                number = "0" + number;
+            }
+            number = number.Substring(number.Length - length, length);
+            return number;
         }
 
-        //选择导出Excel时是选择导出数据的还是模板
-        private void ExcelExport(string DataOrTemplet)
+        private void inoutno_TextChanged(object sender, EventArgs e)
+        {
+
+        }
+        DataTable importdata;
+        private void XY_Click(object sender, EventArgs e)
+        {
+            ImportExcel1.Filter = "(*.xls)|*.xls";
+            DialogResult result;
+            result = ImportExcel1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                XYFilePath.Text = ImportExcel1.FileName;
+                importdata = ExcelToDataTable(ImportExcel1.FileName, true);
+                ExportFileDialog.Description = "选择导出的路径";
+                DialogResult result1 = ExportFileDialog.ShowDialog();
+                if (result1 == DialogResult.OK)
+                {
+                    InitPrint = new Thread(ExportData);
+                    SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "导出贴片机数据");
+                    BaseUtil.SetFormCenter(stw);
+                    stw.ShowDialog();
+                }
+            }
+        }
+        ExcelHandler excel = new ExcelHandler();
+        private void ExportData()
         {
-            for (int i = int.Parse(Rn.Text); i < int.Parse(Num.Text); i = i + 8)
+            try
             {
-                int temp = i;
-                for (int j = 0; j < doc.Variables.FormVariables.Count; j++)
+                string time = System.DateTime.Now.ToString("yyyyMMddhhmmss");
+                Stream fs = new FileStream(ExportFileDialog.SelectedPath + @"\" + time + pr_code.Text + ".txt", FileMode.CreateNew, FileAccess.ReadWrite);
+                fs.Dispose();
+                List<string> list = new List<string>();
+                for (int i = 0; i < importdata.Rows.Count; i++)
                 {
-                    switch (doc.Variables.FormVariables.Item(j + 1).Name)
+                    string Refer = importdata.Rows[i]["Refer"].ToString();
+                    DataTable bom = (DataTable)dh.ExecuteSql("select bd_soncode,replace(wm_concat(bd_location||';'||nvl(bd_soncode,PRE_SONCODE)||' '||PRE_REPCODE),',',' ') from BOMDetail " +
+                        "LEFT JOIN bom on bd_bomid=bo_id left join Product ON bd_soncode=pr_code left join ProdReplace on pre_bdid =bd_id where " +
+                        "bo_mothercode='" + pr_code.Text + "' and instr(','||bd_location||',','," + Refer + ",')>0 group by bd_soncode", "select");
+                    if (bom.Rows.Count > 0)
                     {
-                        case "RN1":
-                            doc.Variables.FormVariables.Item(j + 1).Value = (Prefix.Text + Date.Value.ToString("yyMMdd") + lpad(4, (temp).ToString()));
-                            Console.WriteLine(doc.Variables.FormVariables.Item(j + 1).Value);
-                            break;
-                        case "RN2":
-                            doc.Variables.FormVariables.Item(j + 1).Value = (Prefix.Text + Date.Value.ToString("yyMMdd") + lpad(4, (temp + 1).ToString()));
-                            Console.WriteLine(doc.Variables.FormVariables.Item(j + 1).Value);
-                            break;
-                        case "RN3":
-                            doc.Variables.FormVariables.Item(j + 1).Value = (Prefix.Text + Date.Value.ToString("yyMMdd") + lpad(4, (temp + 2).ToString()));
-                            Console.WriteLine(doc.Variables.FormVariables.Item(j + 1).Value);
-                            break;
-                        case "RN4":
-                            doc.Variables.FormVariables.Item(j + 1).Value = (Prefix.Text + Date.Value.ToString("yyMMdd") + lpad(4, (temp + 3).ToString()));
-                            Console.WriteLine(doc.Variables.FormVariables.Item(j + 1).Value);
-                            break;
-                        case "RN5":
-                            doc.Variables.FormVariables.Item(j + 1).Value = (Prefix.Text + Date.Value.ToString("yyMMdd") + lpad(4, (temp + 4).ToString()));
-                            Console.WriteLine(doc.Variables.FormVariables.Item(j + 1).Value);
-                            break;
-                        case "RN6":
-                            doc.Variables.FormVariables.Item(j + 1).Value = (Prefix.Text + Date.Value.ToString("yyMMdd") + lpad(4, (temp + 5).ToString()));
-                            Console.WriteLine(doc.Variables.FormVariables.Item(j + 1).Value);
-                            break;
-                        case "RN7":
-                            doc.Variables.FormVariables.Item(j + 1).Value = (Prefix.Text + Date.Value.ToString("yyMMdd") + lpad(4, (temp + 6).ToString()));
-                            Console.WriteLine(doc.Variables.FormVariables.Item(j + 1).Value);
-                            break;
-                        case "RN8":
-                            doc.Variables.FormVariables.Item(j + 1).Value = (Prefix.Text + Date.Value.ToString("yyMMdd") + lpad(4, (temp + 7).ToString()));
-                            Console.WriteLine(doc.Variables.FormVariables.Item(j + 1).Value);
-                            break;
-                        default:
-                            break;
+                        if (bom.Rows[0][1].ToString() != "")
+                        {
+                            if (!list.Contains(bom.Rows[0][1].ToString()))
+                            {
+                                list.Add(bom.Rows[0][1].ToString());
+                            }
+                        }
+                        importdata.Rows[i][1] = bom.Rows[0][0].ToString();
                     }
+                    Process.Text = (i + 1) + "/" + importdata.Rows.Count;
+                }
+                excel.ExportExcel(importdata, ExportFileDialog.SelectedPath + @"\" + time + pr_code.Text + ".xls");
+                StreamWriter sw = File.AppendText(ExportFileDialog.SelectedPath + @"\" + time + pr_code.Text + ".txt");
+                for (int i = 0; i < list.Count; i++)
+                {
+                    Console.WriteLine(list[i]);
+                    sw.WriteLine(list[i]);
                 }
-                doc.Printer.SwitchTo(Printer.Text);
-                doc.PrintDocument(1);
+                sw.Close();
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
             }
         }
 
-        private void Query_SpecialReport_Load(object sender, EventArgs e)
-        {
-            InitPrint = new Thread(InPrint);
-            SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
-            BaseUtil.SetFormCenter(stw);
-            stw.ShowDialog();
-            doc = lbl.Documents.Open(System.Windows.Forms.Application.StartupPath + @"\SN.lab");
-        }
 
-        private void InPrint()
+
+        public static bool OpenCSVFile(ref DataTable mycsvdt, string filepath)
         {
-            try
+            string strpath = filepath; //csv文件的路径
+            try
             {
-                lbl = new ApplicationClass();
-                BaseUtil.WriteLbl();
+                int intColCount = 0;
+                bool blnFlag = true;
+
+                DataColumn mydc;
+                DataRow mydr;
+
+                string strline;
+                string[] aryline;
+                StreamReader mysr = new StreamReader(strpath, System.Text.Encoding.UTF8);
+
+                while ((strline = mysr.ReadLine()) != null)
+                {
+                    aryline = strline.Split(new char[] { ',' });
+
+                    //给datatable加上列名
+                    if (blnFlag)
+                    {
+                        blnFlag = false;
+                        intColCount = aryline.Length;
+                        int col = 0;
+                        for (int i = 0; i < aryline.Length; i++)
+                        {
+                            col = i + 1;
+                            mydc = new DataColumn(col.ToString());
+                            mycsvdt.Columns.Add(mydc);
+                        }
+                    }
+
+                    //填充数据并加入到datatable中
+                    mydr = mycsvdt.NewRow();
+                    for (int i = 0; i < aryline.Length; i++)
+                    {
+                        mydr[i] = aryline[i];
+                    }
+                    mycsvdt.Rows.Add(mydr);
+                }
+                mysr.Close();
+                return true;
             }
-            catch (Exception)
+            catch (Exception ex)
             {
-                MessageBox.Show("未正确安装BarTender软件");
+                Console.WriteLine(ex.Message + ex.StackTrace);
+                return false;
             }
         }
 
-        private static string lpad(int length, string number)
+        private void TraceFile_Click(object sender, EventArgs e)
         {
-            while (number.Length < length)
+            ImportExcel1.Filter = "(*.xls)|*.xls";
+            DialogResult result;
+            result = ImportExcel1.ShowDialog();
+            if (result == DialogResult.OK)
             {
-                number = "0" + number;
+                TraceFilePath.Text = ImportExcel1.FileName;
+                DataTable dt = ExcelToDataTable1(ImportExcel1.FileName, false);
+                List<string> STF_MODEL = new List<string>();
+                List<string> STF_FEEDER = new List<string>();
+                List<string> STF_FEEDERNO = new List<string>();
+                List<string> STF_LOCATION = new List<string>();
+                List<string> STF_MACHINE = new List<string>();
+                string stf_code = dt.Rows[0][9].ToString();
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    STF_MODEL.Add(dt.Rows[i][0].ToString());
+                    STF_FEEDER.Add(dt.Rows[i][3].ToString());
+                    STF_FEEDERNO.Add(dt.Rows[i][11].ToString());
+                    STF_LOCATION.Add(dt.Rows[i][12].ToString());
+                    STF_MACHINE.Add(dt.Rows[i][1].ToString());
+                }
+                dh.ExecuteSql("delete from SMTTRACEFILE where stf_code='" + stf_code + "'", "delete");
+                dh.BatchInsert("insert into SMTTRACEFILE(STF_ID, STF_MODEL, STF_FEEDER, STF_FEEDERNO, STF_LOCATION,STF_MACHINE, STF_CODE, STF_INDATE, STF_INMAN)" +
+                    "values(SMTTRACEFILE_SEQ.nextval,:STF_MODEL,:STF_FEEDER,:STF_FEEDERNO,:STF_LOCATION,:STF_MACHINE,'" + stf_code + "',sysdate,'" + User.UserName + "')",
+                    new string[] { "STF_MODEL", "STF_FEEDER", "STF_FEEDERNO", "STF_LOCATION", "STF_MACHINE" }, STF_MODEL.ToArray(), STF_FEEDER.ToArray(), STF_FEEDERNO.ToArray(), STF_LOCATION.ToArray(), STF_MACHINE.ToArray());
+                dh.ExecuteSql("delete from SMTTRACEFILE where ( STF_MODEL is null and  STF_FEEDER is null and STF_FEEDERNO is null and STF_MACHINE is null ) or stf_model in ('料槽','数量','印刷板') or STF_MACHINE in('贴片生产线:','设置:') ", "delete");
+                dataGridView1.DataSource = dt;
+                DataTable dt1 = (DataTable)dh.ExecuteSql("select STF_ID, STF_MODEL,STF_MACHINE, STF_FEEDER, STF_FEEDERNO, STF_LOCATION, STF_CODE, STF_INDATE, STF_INMAN  from SMTTRACEFILE where stf_code='" + stf_code + "' order by stf_id", "select");
+                excel.ExportExcel_LIANGAN(dt1, "C:\\Users\\callm\\Desktop\\客户资料\\"+System.DateTime.Now.ToString("yyyyMMddhhmmss")+".xls");
             }
-            number = number.Substring(number.Length - length, length);
-            return number;
         }
 
-        private void inoutno_TextChanged(object sender, EventArgs e)
+        public static DataTable ExcelToDataTable(string filePath, bool isColumnName)
         {
+            DataTable dataTable = null;
+            FileStream fs = null;
+            DataColumn column = null;
+            DataRow dataRow = null;
+            IWorkbook workbook = null;
+            ISheet sheet = null;
+            IRow row = null;
+            ICell cell = null;
+            int startRow = 0;
+            try
+            {
+                using (fs = File.OpenRead(filePath))
+                {
+                    // 2007版本
+                    workbook = new HSSFWorkbook(fs);
+                    if (workbook != null)
+                    {
+                        sheet = workbook.GetSheetAt(0);//读取第一个sheet,当然也可以循环读取每个sheet
+                        dataTable = new DataTable();
+                        if (sheet != null)
+                        {
+                            int rowCount = sheet.LastRowNum;//总行数
+                            if (rowCount > 0)
+                            {
+                                IRow firstRow = sheet.GetRow(0);//第一行
+                                int cellCount = firstRow.LastCellNum;//列数
+
+                                //构建datatable的列
+                                if (isColumnName)
+                                {
+                                    startRow = 1;//如果第一行是列名,则从第二行开始读取
+                                    for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
+                                    {
+                                        cell = firstRow.GetCell(i);
+                                        if (cell != null)
+                                        {
+                                            if (cell.StringCellValue != null)
+                                            {
+                                                column = new DataColumn(cell.StringCellValue);
+                                                dataTable.Columns.Add(column);
+                                            }
+                                        }
+                                    }
+                                }
+                                else
+                                {
+                                    for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
+                                    {
+                                        column = new DataColumn("column" + (i + 1));
+                                        dataTable.Columns.Add(column);
+                                    }
+                                }
+                                //填充行
+                                for (int i = startRow; i <= rowCount; ++i)
+                                {
+                                    row = sheet.GetRow(i);
+                                    if (row == null) continue;
 
+                                    dataRow = dataTable.NewRow();
+                                    for (int j = row.FirstCellNum; j < cellCount; ++j)
+                                    {
+                                        cell = row.GetCell(j);
+                                        if (cell == null)
+                                        {
+                                            dataRow[j] = "";
+                                        }
+                                        else
+                                        {
+                                            //CellType(Unknown = -1,Numeric = 0,String = 1,Formula = 2,Blank = 3,Boolean = 4,Error = 5,)
+                                            switch (cell.CellType)
+                                            {
+                                                case CellType.BLANK:
+                                                    dataRow[j] = "";
+                                                    break;
+                                                case CellType.NUMERIC:
+                                                    short format = cell.CellStyle.DataFormat;
+                                                    //对时间格式(2015.12.5、2015/12/5、2015-12-5等)的处理
+                                                    if (format == 14 || format == 31 || format == 57 || format == 58)
+                                                        dataRow[j] = cell.DateCellValue;
+                                                    else
+                                                        dataRow[j] = cell.NumericCellValue;
+                                                    break;
+                                                case CellType.STRING:
+                                                    dataRow[j] = cell.StringCellValue;
+                                                    break;
+                                                case CellType.FORMULA:
+                                                    dataRow[j] = cell.StringCellValue;
+                                                    break;
+                                            }
+                                        }
+                                    }
+                                    dataTable.Rows.Add(dataRow);
+                                }
+                            }
+                        }
+                    }
+                }
+                return dataTable;
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.Message);
+                if (fs != null)
+                {
+                    fs.Close();
+                }
+                return null;
+            }
+        }
+
+        public static DataTable ExcelToDataTable1(string filePath, bool isColumnName)
+        {
+            DataTable dataTable = null;
+            FileStream fs = null;
+            DataColumn column = null;
+            DataRow dataRow = null;
+            IWorkbook workbook = null;
+            ISheet sheet = null;
+            IRow row = null;
+            ICell cell = null;
+            int startRow = 0;
+            try
+            {
+                using (fs = File.OpenRead(filePath))
+                {
+                    // 2007版本
+                    workbook = new HSSFWorkbook(fs);
+                    if (workbook != null)
+                    {
+                        sheet = workbook.GetSheetAt(0);//读取第一个sheet,当然也可以循环读取每个sheet
+                        dataTable = new DataTable();
+                        if (sheet != null)
+                        {
+                            int rowCount = sheet.LastRowNum;//总行数
+                            if (rowCount > 0)
+                            {
+                                IRow firstRow = sheet.GetRow(1);//第一行
+                                int cellCount = firstRow.LastCellNum;//列数
+
+                                //构建datatable的列
+                                if (isColumnName)
+                                {
+                                    startRow = 1;//如果第一行是列名,则从第二行开始读取
+                                    for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
+                                    {
+                                        cell = firstRow.GetCell(i);
+                                        if (cell != null)
+                                        {
+                                            if (cell.StringCellValue != null)
+                                            {
+                                                column = new DataColumn(cell.StringCellValue);
+                                                dataTable.Columns.Add(column);
+                                            }
+                                        }
+                                    }
+                                }
+                                else
+                                {
+                                    startRow = 1;
+                                    for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
+                                    {
+                                        column = new DataColumn("column" + (i + 1));
+                                        dataTable.Columns.Add(column);
+                                    }
+                                }
+                                //填充行
+                                for (int i = startRow; i <= rowCount; ++i)
+                                {
+                                    row = sheet.GetRow(i);
+                                    Console.WriteLine(i);
+                                    if (row == null) continue;
+                                    dataRow = dataTable.NewRow();
+                                    for (int j = 0; j < 40; ++j)
+                                    {
+                                        cell = row.GetCell(j);
+                                        if (cell == null)
+                                        {
+                                            dataRow[j] = "";
+                                        }
+                                        else
+                                        {
+                                            //CellType(Unknown = -1,Numeric = 0,String = 1,Formula = 2,Blank = 3,Boolean = 4,Error = 5,)
+                                            switch (cell.CellType)
+                                            {
+                                                case CellType.BLANK:
+                                                    dataRow[j] = "";
+                                                    break;
+                                                case CellType.NUMERIC:
+                                                    short format = cell.CellStyle.DataFormat;
+                                                    //对时间格式(2015.12.5、2015/12/5、2015-12-5等)的处理
+                                                    if (format == 14 || format == 31 || format == 57 || format == 58)
+                                                        dataRow[j] = cell.DateCellValue;
+                                                    else
+                                                        dataRow[j] = cell.NumericCellValue;
+                                                    break;
+                                                case CellType.STRING:
+                                                    dataRow[j] = cell.StringCellValue;
+                                                    break;
+                                                case CellType.FORMULA:
+                                                    dataRow[j] = cell.StringCellValue;
+                                                    break;
+                                            }
+                                        }
+                                    }
+                                    dataTable.Rows.Add(dataRow);
+                                }
+                            }
+                        }
+                    }
+                }
+                return dataTable;
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.Message);
+                if (fs != null)
+                {
+                    fs.Close();
+                }
+                return null;
+            }
         }
     }
 }

+ 50 - 6
UAS_MES_LGDZ/FunctionCode/Query/Query_SpecialReport.resx

@@ -117,8 +117,17 @@
   <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="ExportFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>282, 17</value>
+  </metadata>
+  <metadata name="ImportExcel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>1018, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="Export.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="TraceFile.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -130,7 +139,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Export.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="TraceFile.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -143,7 +152,45 @@
         gg==
 </value>
   </data>
-  <data name="Export.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="TraceFile.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="XY.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="XY.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="XY.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -156,7 +203,4 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
 </root>

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Special/Special_CancelCollectionWN.cs

@@ -117,7 +117,7 @@ namespace UAS_MES_NEW.Special
                     sql.Clear();
                     sql.Append("update makeserial set ms_nextmacode='' where ms_sncode=:barcode and ms_nextmacode='" + ms_makecode + "'");
                     dh.BatchInsert(sql.GetString(), new string[] { "barcode" }, barcode.ToArray());
-                    sqls.Add("delete from craftmaterial where cm_sncode='" + sn_code.Text + "' and cm_makecode='" + ms_makecode + "'");
+                    sqls.Add("update craftmaterial set cm_status=-1 where cm_sncode='" + sn_code.Text + "' and cm_makecode='" + ms_makecode + "'");
                 }
                 sqls.Add("delete from sninfo where si_sn='" + sn_code.Text + "'");
                 //sqls.Add("update makeaddresslist set mal_sncode='',mal_status=0 where mal_sncode='" + sn_code.Text + "'");

+ 53 - 1
UAS_MES_LGDZ/FunctionCode/Special/Special_Reset.Designer.cs

@@ -39,6 +39,9 @@
             this.WeighRecord = new System.Windows.Forms.ListView();
             this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.cd_stepno = new System.Windows.Forms.Label();
+            this.ExportFileDialog = new System.Windows.Forms.FolderBrowserDialog();
+            this.ImportExcel = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.数据清空 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
@@ -47,6 +50,7 @@
             this.OperatResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.input = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.Split = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ImportExcel1 = new System.Windows.Forms.OpenFileDialog();
             this.SuspendLayout();
             // 
             // Pallet_label
@@ -168,6 +172,44 @@
             this.cd_stepno.Size = new System.Drawing.Size(0, 24);
             this.cd_stepno.TabIndex = 244;
             // 
+            // ImportExcel
+            // 
+            this.ImportExcel.AllPower = null;
+            this.ImportExcel.BackColor = System.Drawing.Color.Transparent;
+            this.ImportExcel.DownImage = ((System.Drawing.Image)(resources.GetObject("ImportExcel.DownImage")));
+            this.ImportExcel.Image = null;
+            this.ImportExcel.IsShowBorder = true;
+            this.ImportExcel.Location = new System.Drawing.Point(1278, 216);
+            this.ImportExcel.Margin = new System.Windows.Forms.Padding(4);
+            this.ImportExcel.MoveImage = ((System.Drawing.Image)(resources.GetObject("ImportExcel.MoveImage")));
+            this.ImportExcel.Name = "ImportExcel";
+            this.ImportExcel.NormalImage = ((System.Drawing.Image)(resources.GetObject("ImportExcel.NormalImage")));
+            this.ImportExcel.Power = null;
+            this.ImportExcel.Size = new System.Drawing.Size(112, 44);
+            this.ImportExcel.TabIndex = 247;
+            this.ImportExcel.Text = "导入数据";
+            this.ImportExcel.UseVisualStyleBackColor = false;
+            this.ImportExcel.Click += new System.EventHandler(this.ImportExcel_Click);
+            // 
+            // Export
+            // 
+            this.Export.AllPower = null;
+            this.Export.BackColor = System.Drawing.Color.Transparent;
+            this.Export.DownImage = ((System.Drawing.Image)(resources.GetObject("Export.DownImage")));
+            this.Export.Image = null;
+            this.Export.IsShowBorder = true;
+            this.Export.Location = new System.Drawing.Point(1107, 216);
+            this.Export.Margin = new System.Windows.Forms.Padding(4);
+            this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
+            this.Export.Name = "Export";
+            this.Export.NormalImage = ((System.Drawing.Image)(resources.GetObject("Export.NormalImage")));
+            this.Export.Power = null;
+            this.Export.Size = new System.Drawing.Size(112, 44);
+            this.Export.TabIndex = 246;
+            this.Export.Text = "导出模板";
+            this.Export.UseVisualStyleBackColor = false;
+            this.Export.Click += new System.EventHandler(this.Export_Click);
+            // 
             // 数据清空
             // 
             this.数据清空.AllPower = null;
@@ -300,11 +342,17 @@
             this.Split.UseVisualStyleBackColor = false;
             this.Split.Click += new System.EventHandler(this.Split_Click);
             // 
+            // ImportExcel1
+            // 
+            this.ImportExcel1.FileName = "ImportExcel";
+            // 
             // Special_Reset
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1611, 1131);
+            this.Controls.Add(this.ImportExcel);
+            this.Controls.Add(this.Export);
             this.Controls.Add(this.数据清空);
             this.Controls.Add(this.cd_stepno);
             this.Controls.Add(this.WeighRecord);
@@ -329,7 +377,7 @@
             this.Text = "重置站点";
             this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
             this.SizeChanged += new System.EventHandler(this.Special_Reset_SizeChanged);
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -354,5 +402,9 @@
         private System.Windows.Forms.ColumnHeader columnHeader3;
         private System.Windows.Forms.Label cd_stepno;
         private CustomControl.ButtonUtil.NormalButton 数据清空;
+        private CustomControl.ButtonUtil.NormalButton Export;
+        private CustomControl.ButtonUtil.NormalButton ImportExcel;
+        private System.Windows.Forms.FolderBrowserDialog ExportFileDialog;
+        private System.Windows.Forms.OpenFileDialog ImportExcel1;
     }
 }

+ 163 - 2
UAS_MES_LGDZ/FunctionCode/Special/Special_Reset.cs

@@ -1,9 +1,14 @@
-using HslCommunication.Profinet.Knx;
+using DevExpress.XtraPrinting.Export.Pdf;
+using HslCommunication.Profinet.Knx;
+using NPOI.HSSF.UserModel;
+using NPOI.SS.UserModel;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
+using System.Diagnostics;
 using System.Drawing;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Windows.Forms;
@@ -11,6 +16,10 @@ using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
 
+using NPOI.HSSF.UserModel;
+using NPOI.SS.UserModel;
+using NPOI.SS.Formula.Functions;
+
 namespace UAS_MES_NEW.Special
 {
     public partial class Special_Reset : Form
@@ -104,7 +113,8 @@ namespace UAS_MES_NEW.Special
                             ReSN(dt2.Rows[k]["ms_sncode"].ToString(), cd_stepcode.Text);
                         }
                         dh.ExecuteSql("delete from labelprintlog where lpl_value='" + sb[i].ToString() + "'", "delete");
-                        dh.ExecuteSql("insert into PACKAGEBACKUP select * from package where pa_outboxcode='" + sb[i].ToString() + "'", "insert");
+                        dh.ExecuteSql("insert into PACKAGEBACKUP(PA_ID, PA_PRODCODE, PA_OUTBOXCODE, PA_PACKDATE, PA_LEVEL, PA_PACKAGEQTY, PA_TOTALQTY, PA_MAKECODE, PA_STATUS, PA_INDATE, PA_SALECODE, PA_PRINTCOUNT, PA_CUSTCODE, PA_TYPE, PA_WEIGHT, PA_CURRENTQTY, PA_PACKTYPE, PA_CHECKNO, PA_DOWNSTATUS, PA_STANDARDQTY, PA_SCCODE, PA_YMD, PA_MOTHERCODE, PA_CURRENTSTEP, PA_NEXTSTEP, PA_OUTNO, PA_IOSTATUS, PA_REMARK, PA_WHCODE, PA_B2BID, PA_INNO)" +
+                            " select PA_ID, PA_PRODCODE, PA_OUTBOXCODE, PA_PACKDATE, PA_LEVEL, PA_PACKAGEQTY, PA_TOTALQTY, PA_MAKECODE, PA_STATUS, PA_INDATE, PA_SALECODE, PA_PRINTCOUNT, PA_CUSTCODE, PA_TYPE, PA_WEIGHT, PA_CURRENTQTY, PA_PACKTYPE, PA_CHECKNO, PA_DOWNSTATUS, PA_STANDARDQTY, PA_SCCODE, PA_YMD, PA_MOTHERCODE, PA_CURRENTSTEP, PA_NEXTSTEP, PA_OUTNO, PA_IOSTATUS, PA_REMARK, PA_WHCODE, PA_B2BID, PA_INNO from package where pa_outboxcode='" + sb[i].ToString() + "'", "insert");
                         dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "insert");
                         dh.ExecuteSql("delete from package where pa_outboxcode = '" + sb[i].ToString() + "'", "delete");
                         //删除箱的明细
@@ -286,5 +296,156 @@ namespace UAS_MES_NEW.Special
         {
             asc.controlAutoSize(this);
         }
+
+        private void Export_Click(object sender, EventArgs e)
+        {
+            ExportFileDialog.Description = "选择导出的路径";
+            DialogResult result = ExportFileDialog.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                ExcelHandler eh = new ExcelHandler();
+                sql.Clear();
+                sql.Append("select ''箱号,'' SN from dual ");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                eh.ExportExcel(dt, ExportFileDialog.SelectedPath);
+                //string close = MessageBox.Show(this.ParentForm, "导出成功,是否打开文件", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+            }
+        }
+
+        private void ImportExcel_Click(object sender, EventArgs e)
+        {
+            ImportExcel1.Filter = "(*.xls)|*.xls";
+            DialogResult result;
+            result = ImportExcel1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                DataTable dt = ExcelToDataTable(ImportExcel1.FileName, true);
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    if (bigboxBtn.Checked)
+                    {
+                        input.Text= dt.Rows[i]["箱号"].ToString();
+                        input_KeyDown(sender, new KeyEventArgs(Keys.Enter));
+                    }
+                    if (serBtn.Checked)
+                    {
+                        input.Text = dt.Rows[i]["SN"].ToString();
+                        input_KeyDown(sender, new KeyEventArgs(Keys.Enter));
+                    }
+                }
+            }
+        }
+
+        public static DataTable ExcelToDataTable(string filePath, bool isColumnName)
+        {
+            DataTable dataTable = null;
+            FileStream fs = null;
+            DataColumn column = null;
+            DataRow dataRow = null;
+            IWorkbook workbook = null;
+            ISheet sheet = null;
+            IRow row = null;
+            ICell cell = null;
+            int startRow = 0;
+            try
+            {
+                using (fs = File.OpenRead(filePath))
+                {
+                    // 2007版本
+                    workbook = new HSSFWorkbook(fs);
+                    if (workbook != null)
+                    {
+                        sheet = workbook.GetSheetAt(0);//读取第一个sheet,当然也可以循环读取每个sheet
+                        dataTable = new DataTable();
+                        if (sheet != null)
+                        {
+                            int rowCount = sheet.LastRowNum;//总行数
+                            if (rowCount > 0)
+                            {
+                                IRow firstRow = sheet.GetRow(0);//第一行
+                                int cellCount = firstRow.LastCellNum;//列数
+
+                                //构建datatable的列
+                                if (isColumnName)
+                                {
+                                    startRow = 1;//如果第一行是列名,则从第二行开始读取
+                                    for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
+                                    {
+                                        cell = firstRow.GetCell(i);
+                                        if (cell != null)
+                                        {
+                                            if (cell.StringCellValue != null)
+                                            {
+                                                column = new DataColumn(cell.StringCellValue);
+                                                dataTable.Columns.Add(column);
+                                            }
+                                        }
+                                    }
+                                }
+                                else
+                                {
+                                    for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
+                                    {
+                                        column = new DataColumn("column" + (i + 1));
+                                        dataTable.Columns.Add(column);
+                                    }
+                                }
+                                //填充行
+                                for (int i = startRow; i <= rowCount; ++i)
+                                {
+                                    row = sheet.GetRow(i);
+                                    if (row == null) continue;
+
+                                    dataRow = dataTable.NewRow();
+                                    for (int j = row.FirstCellNum; j < cellCount; ++j)
+                                    {
+                                        cell = row.GetCell(j);
+                                        if (cell == null)
+                                        {
+                                            dataRow[j] = "";
+                                        }
+                                        else
+                                        {
+                                            //CellType(Unknown = -1,Numeric = 0,String = 1,Formula = 2,Blank = 3,Boolean = 4,Error = 5,)
+                                            switch (cell.CellType)
+                                            {
+                                                case CellType.BLANK:
+                                                    dataRow[j] = "";
+                                                    break;
+                                                case CellType.NUMERIC:
+                                                    short format = cell.CellStyle.DataFormat;
+                                                    //对时间格式(2015.12.5、2015/12/5、2015-12-5等)的处理
+                                                    if (format == 14 || format == 31 || format == 57 || format == 58)
+                                                        dataRow[j] = cell.DateCellValue;
+                                                    else
+                                                        dataRow[j] = cell.NumericCellValue;
+                                                    break;
+                                                case CellType.STRING:
+                                                    dataRow[j] = cell.StringCellValue;
+                                                    break;
+                                                case CellType.FORMULA:
+                                                    dataRow[j] = cell.StringCellValue;
+                                                    break;
+                                            }
+                                        }
+                                    }
+                                    dataTable.Rows.Add(dataRow);
+                                }
+                            }
+                        }
+                    }
+                }
+                return dataTable;
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.Message);
+                if (fs != null)
+                {
+                    fs.Close();
+                }
+                return null;
+            }
+        }
     }
 }

+ 82 - 0
UAS_MES_LGDZ/FunctionCode/Special/Special_Reset.resx

@@ -117,7 +117,86 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="ExportFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="ImportExcel.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="ImportExcel.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="ImportExcel.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="Export.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="Export.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="Export.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
   <data name="数据清空.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
@@ -194,4 +273,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
+  <metadata name="ImportExcel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>792, 17</value>
+  </metadata>
 </root>

+ 1 - 1
UAS_MES_ODLF/FunctionCode/Special/Special_CancelCollection.cs

@@ -105,7 +105,7 @@ namespace UAS_MES_NEW.Special
                 sqls.Add("update  makeaddresslist set mal_status=0,mal_sncode='' where mal_sncode='" + sn_code.Text + "' and mal_makecode='" + ms_makecode + "'");
                 sqls.Add("delete from makesnrelation where (sn='"+sn_code.Text+"' or beforesn='"+sn_code.Text+"') and makecode='"+ms_makecode+"'");
 
-                sqls.Add("update makesnlist set msl_status=0 where msl_sncode='" + sn_code.Text + "' and msl_makecode='" + ms_makecode + "' and msl_type='before'");
+                sqls.Add("update makesnlist set msl_status=0,msl_sncode='' where msl_sncode='" + sn_code.Text + "' and msl_makecode='" + ms_makecode + "' and msl_type='before'");
                 ////初始化号段状态
                 sqls.Add("update MAKESNRULEDETAIL set msd_status=0 where msd_sncode='" + sn_code.Text + "' and msd_makecode='" + ms_makecode + "'  and msd_type='before'");
                 //清除操作日志

+ 29 - 0
UAS_MES_YD/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -160,6 +160,35 @@ namespace UAS_MES_NEW.Make
                     //判断界面工单是否为空时的序列号是否自动归属工单
                     // 获取工单归属工单下一工序是否正确
                     string status = "";
+                    dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_code='" + sncode.Text + "' or  ms_imei1='" + sncode.Text + "' order by ms_id desc", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + sncode.Text + "' order by ms_id desc", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                        }
+                        else
+                        {
+                            dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei1='" + sncode.Text + "' order by mil_id desc", "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                sncode.Text = dt.Rows[0]["mil_sncode"].ToString();
+                            }
+                            else
+                            {
+                                dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei2='" + sncode.Text + "' order by mil_id desc", "select");
+                                if (dt.Rows.Count > 0)
+                                {
+                                    sncode.Text = dt.Rows[0]["mil_sncode"].ToString();
+                                }
+                            }
+                        }
+                    }
                     LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out ErrorMessage);
                     if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
                     {

+ 32 - 22
UAS_MES_YD/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -15,6 +15,7 @@ using System.Net.Sockets;
 using System.Collections.Generic;
 using System.Net;
 using System.Text;
+using Seagull.BarTender.Print;
 
 namespace UAS_MES_NEW.Make
 {
@@ -40,7 +41,7 @@ namespace UAS_MES_NEW.Make
 
         DataTable Dbfind;
 
-        Regex re = new Regex("\\d+");
+        Regex re = new Regex("\\d+.\\W+");
 
         string ErrorMessage;
 
@@ -53,6 +54,18 @@ namespace UAS_MES_NEW.Make
             InitializeComponent();
             CheckForIllegalCrossThreadCalls = false;
         }
+        Engine engine;
+        private void InPrint()
+        {
+            try
+            {
+                engine = new Engine(true);
+            }
+            catch (Exception ex)
+            {
+                OperateResult.AppendText(ex.Message + ex.StackTrace, Color.Red);
+            }
+        }
 
         private void Make_ColorBoxWeigh_Load(object sender, EventArgs e)
         {
@@ -99,19 +112,6 @@ namespace UAS_MES_NEW.Make
             }
         }
 
-        private void InPrint()
-        {
-            try
-            {
-                lbl = new ApplicationClass();
-                BaseUtil.WriteLbl();
-            }
-            catch (Exception)
-            {
-                OperateResult.AppendText("未正确安装BarTender软件\n", Color.Red);
-            }
-        }
-
         private void sncode_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
@@ -120,6 +120,19 @@ namespace UAS_MES_NEW.Make
                 {
                     string oMakeCode = "";
                     string oMsID = "";
+                    dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + sncode.Text + "' order by ms_id desc", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + sncode.Text + "' order by ms_id desc", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                        }
+                    }
                     if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
                     {
                         //string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
@@ -244,17 +257,14 @@ namespace UAS_MES_NEW.Make
                         {
                             try
                             {
-                                Byte[] readBuffer = new Byte[1024];
-                                serialPort1.Read(readBuffer, 0, 1024); //将数据读入缓存
+                                int len = serialPort1.BytesToRead;
+                                Byte[] readBuffer = new Byte[len];
+                                serialPort1.Read(readBuffer, 0, len); //将数据读入缓存
                                 string weigh = Encoding.Default.GetString(readBuffer);
                                 Remark.AppendText(weigh + "\n");
                                 if (weigh != "")
                                 {
-                                    weight.Text = re.Match(weigh).Value;
-                                    double w = 0;
-                                    if (double.TryParse(weight.Text, out w)) {
-                                        weight.Text = w.ToString();
-                                    }
+                                    weight.Text = weigh;
                                 }
                             }
                             catch (Exception)
@@ -310,7 +320,7 @@ namespace UAS_MES_NEW.Make
             if (PrintLabel.Items.Count != 0)
             {
                 string oErrorMessage;
-                if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
+                if (!Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
                 {
                     OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
                 }

+ 13 - 0
UAS_MES_YD/FunctionCode/Make/Make_ColorBoxWeigh_HUAGUAN.cs

@@ -120,6 +120,19 @@ namespace UAS_MES_NEW.Make
                 {
                     string oMakeCode = "";
                     string oMsID = "";
+                    dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + sncode.Text + "' order by ms_id desc", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + sncode.Text + "' order by ms_id desc", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                        }
+                    }
                     if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
                     {
                         //string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();

+ 34 - 4
UAS_MES_YD/FunctionCode/Make/Make_FeedingCollection.cs

@@ -190,6 +190,7 @@ namespace UAS_MES_NEW.Make
                                 {
                                     sp_soncode = ErrorMessage;
                                 }
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "上物料", sn_code.Text + "上物料" + code.Text + "料号" + sp_fsoncode, sn_code.Text, "");
                                 Save_OtherCode(sp_fsoncode, sp_soncode, make_code, sn_code.Text, sp_id);
                             }
                             else
@@ -210,7 +211,7 @@ namespace UAS_MES_NEW.Make
                             sql.Append("select ms_firstsn,cm_makecode,cm_craftcode,nvl(cm_status,0)cm_status,cm_id,cm_stepcode,");
                             sql.Append("ms_makecode,cm_mccode,cm_materialtype from craftmaterial left join makeserial on cm_makecode");
                             sql.Append("=ms_makecode and cm_sncode=ms_sncode where cm_sncode='" + code.Text + "' and cm_makecode='" + oMakeCode + "'");
-                            sql.Append("and cm_materialtype=1");
+                            sql.Append("and cm_materialtype=1 and cm_stepcode='"+User.CurrentStepCode+"' ");
                             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                             if (dt.Rows.Count > 0)
                             {
@@ -263,9 +264,38 @@ namespace UAS_MES_NEW.Make
                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
                 return;
             }
+            dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + code.Text + "' order by ms_id desc", "select");
+            if (dt.Rows.Count > 0)
+            {
+                code.Text = dt.Rows[0]["ms_sncode"].ToString();
+            }
+            else
+            {
+                dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + code.Text + "' order by ms_id desc", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    code.Text = dt.Rows[0]["ms_sncode"].ToString();
+                }
+                else
+                {
+                    dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei1='" + code.Text + "' order by mil_id desc", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        code.Text = dt.Rows[0]["mil_sncode"].ToString();
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei2='" + code.Text + "' order by mil_id desc", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            code.Text = dt.Rows[0]["mil_sncode"].ToString();
+                        }
+                    }
+                }
+            }
             if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, code.Text, User.UserCode, out oMakeCode, out oMsid, out ErrorMessage))
             {
-                 nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsid + "'").ToString();
+                nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsid + "'").ToString();
                 if (nextstepcode != User.CurrentStepCode)
                 {
                     string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
@@ -380,14 +410,14 @@ namespace UAS_MES_NEW.Make
             //单独用一个DataTable存储一个
             dt1 = new DataTable();
             sql.Clear();
-            sql.Append("select max(pr_lightbox)pr_lightbox,max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,max(sp_checkbarcode)sp_checkbarcode,min(sp_checksalecode)sp_checksalecode,");
+            sql.Append("select max(pr_lightbox)pr_lightbox,sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,max(sp_checkbarcode)sp_checkbarcode,min(sp_checksalecode)sp_checksalecode,");
             sql.Append("sp_fsoncode,max(sp_barcoderule)sp_barcoderule,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
             sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
             sql.Append("sp_regex,max(pr_detail)pr_detail,max(substr(pr_spec,0,20))pr_spec from stepproduct left join product on pr_code=sp_fsoncode where ");
             sql.Append("sp_bomversion='" + ma_bomversion.Text + "' and sp_craftcode='" + ms_craftcode.Text + "' and sp_stepcode='" + User.CurrentStepCode + "' ");
             sql.Append("And sp_mothercode ='" + ma_prodcode.Text + "' and sp_tracekind=1 and not exists(select 1 from craftmaterial where ");
             sql.Append("cm_sncode in (select '" + ms_firstsn + "' from dual union select sn from makesnrelation where firstsn='" + ms_firstsn + "') and cm_makecode='" + ma_code.Text + "' and cm_fsoncode=");
-            sql.Append("sp_fsoncode and cm_status=0) group by sp_fsoncode order by SP_DETNO asc");
+            sql.Append("sp_fsoncode and cm_status=0) group by sp_fsoncode,sp_id order by SP_DETNO asc");
             dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             code.Clear();
             //用于记录提醒的数据长度

+ 51 - 49
UAS_MES_YD/FunctionCode/Make/Make_ImeiCheck.Designer.cs

@@ -75,10 +75,10 @@
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_detail.Location = new System.Drawing.Point(629, 19);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.pr_detail.Location = new System.Drawing.Point(1258, 38);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 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, 41);
             this.pr_detail.TabIndex = 31;
             // 
             // showResult
@@ -89,10 +89,11 @@
             this.columnHeader3,
             this.columnHeader4});
             this.showResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.showResult.Location = new System.Drawing.Point(471, 117);
-            this.showResult.Margin = new System.Windows.Forms.Padding(2);
+            this.showResult.HideSelection = false;
+            this.showResult.Location = new System.Drawing.Point(942, 234);
+            this.showResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.showResult.Name = "showResult";
-            this.showResult.Size = new System.Drawing.Size(391, 257);
+            this.showResult.Size = new System.Drawing.Size(778, 510);
             this.showResult.TabIndex = 30;
             this.showResult.UseCompatibleStateImageBehavior = false;
             this.showResult.View = System.Windows.Forms.View.Details;
@@ -101,10 +102,10 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(32, 394);
-            this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label10.Location = new System.Drawing.Point(64, 788);
+            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(28, 20);
+            this.label10.Size = new System.Drawing.Size(53, 35);
             this.label10.TabIndex = 28;
             this.label10.Text = "SN";
             // 
@@ -112,50 +113,50 @@
             // 
             this.remain_qty.AutoSize = true;
             this.remain_qty.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.remain_qty.Location = new System.Drawing.Point(102, 65);
-            this.remain_qty.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.remain_qty.Location = new System.Drawing.Point(204, 130);
+            this.remain_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.remain_qty.Name = "remain_qty";
-            this.remain_qty.Size = new System.Drawing.Size(0, 21);
+            this.remain_qty.Size = new System.Drawing.Size(0, 41);
             this.remain_qty.TabIndex = 26;
             // 
             // mcd_okqty
             // 
             this.mcd_okqty.AutoSize = true;
             this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.mcd_okqty.Location = new System.Drawing.Point(362, 65);
-            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.mcd_okqty.Location = new System.Drawing.Point(724, 130);
+            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_okqty.Name = "mcd_okqty";
-            this.mcd_okqty.Size = new System.Drawing.Size(0, 21);
+            this.mcd_okqty.Size = new System.Drawing.Size(0, 41);
             this.mcd_okqty.TabIndex = 25;
             // 
             // ma_prodcode
             // 
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ma_prodcode.Location = new System.Drawing.Point(362, 19);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ma_prodcode.Location = new System.Drawing.Point(724, 38);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
             this.ma_prodcode.TabIndex = 24;
             // 
             // 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(102, 19);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ma_code.Location = new System.Drawing.Point(204, 38);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_code.Name = "ma_code";
-            this.ma_code.Size = new System.Drawing.Size(0, 21);
+            this.ma_code.Size = new System.Drawing.Size(0, 41);
             this.ma_code.TabIndex = 23;
             // 
             // label5
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label5.Location = new System.Drawing.Point(287, 65);
-            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label5.Location = new System.Drawing.Point(574, 130);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(106, 21);
+            this.label5.Size = new System.Drawing.Size(210, 41);
             this.label5.TabIndex = 22;
             this.label5.Text = "当前工单计数";
             // 
@@ -163,10 +164,10 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label4.Location = new System.Drawing.Point(27, 65);
-            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label4.Location = new System.Drawing.Point(54, 130);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(58, 21);
+            this.label4.Size = new System.Drawing.Size(114, 41);
             this.label4.TabIndex = 21;
             this.label4.Text = "剩余数";
             // 
@@ -174,10 +175,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label3.Location = new System.Drawing.Point(551, 19);
-            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label3.Location = new System.Drawing.Point(1102, 38);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(74, 21);
+            this.label3.Size = new System.Drawing.Size(146, 41);
             this.label3.TabIndex = 20;
             this.label3.Text = "产品名称";
             // 
@@ -185,10 +186,10 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label2.Location = new System.Drawing.Point(285, 19);
-            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label2.Location = new System.Drawing.Point(570, 38);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(74, 21);
+            this.label2.Size = new System.Drawing.Size(146, 41);
             this.label2.TabIndex = 19;
             this.label2.Text = "产品编号";
             // 
@@ -196,34 +197,35 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label1.Location = new System.Drawing.Point(25, 19);
-            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label1.Location = new System.Drawing.Point(50, 38);
+            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(146, 41);
             this.label1.TabIndex = 18;
             this.label1.Text = "工单编号";
             // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(551, 65);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Location = new System.Drawing.Point(1102, 130);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(88, 22);
+            this.StepCount.Size = new System.Drawing.Size(176, 44);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 32;
+            this.StepCount.Load += new System.EventHandler(this.StepCount_Load);
             // 
             // sncode
             // 
             this.sncode.AllPower = null;
             this.sncode.BackColor = System.Drawing.Color.White;
             this.sncode.ID = null;
-            this.sncode.Location = new System.Drawing.Point(72, 394);
-            this.sncode.Margin = new System.Windows.Forms.Padding(2);
+            this.sncode.Location = new System.Drawing.Point(144, 788);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.sncode.Name = "sncode";
             this.sncode.Power = null;
-            this.sncode.Size = new System.Drawing.Size(169, 21);
+            this.sncode.Size = new System.Drawing.Size(334, 35);
             this.sncode.Str = null;
             this.sncode.Str1 = null;
             this.sncode.Str2 = null;
@@ -233,18 +235,18 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(29, 117);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(2);
+            this.OperateResult.Location = new System.Drawing.Point(58, 234);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(403, 257);
+            this.OperateResult.Size = new System.Drawing.Size(802, 510);
             this.OperateResult.TabIndex = 27;
             this.OperateResult.Text = "";
             // 
             // Make_ImeiCheck
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(886, 433);
+            this.ClientSize = new System.Drawing.Size(1772, 866);
             this.Controls.Add(this.StepCount);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.showResult);
@@ -261,12 +263,12 @@
             this.Controls.Add(this.label2);
             this.Controls.Add(this.label1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Make_ImeiCheck";
             this.Tag = "Make!ImeiCheck";
             this.Load += new System.EventHandler(this.Make_LabelCheck_Load);
             this.SizeChanged += new System.EventHandler(this.Make_LabelCheck_SizeChanged);
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 5 - 0
UAS_MES_YD/FunctionCode/Make/Make_ImeiCheck.cs

@@ -233,5 +233,10 @@ namespace UAS_MES_NEW.Make
             SN = "";
             imei1 = "";
         }
+
+        private void StepCount_Load(object sender, EventArgs e)
+        {
+
+        }
     }
 }

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

@@ -222,6 +222,8 @@ namespace UAS_MES_NEW.Make
                     }
                     else if (UnLoading.Checked)
                     {
+                        mainbarcode.Text = code.Text;
+                        GetItem();
                         bool finddata = false;
                         for (int i = 0; i < LabelDataGridView.Rows.Count; i++)
                         {
@@ -313,7 +315,7 @@ namespace UAS_MES_NEW.Make
                     mcd_inqty1.Text = Count;
                     mcd_remainqty.Text = "";
                     sql.Clear();
-                    sql.Append("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty ");
+                    sql.Append("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty "); 
                     sql.Append("from make left join makecraftdetail on mcd_macode=ma_code where ");
                     sql.Append("ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                     DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");

+ 2 - 0
UAS_MES_YD/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -208,6 +208,7 @@ namespace UAS_MES_NEW.Make
             this.columnHeader9});
             this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.WaitRejectList.FullRowSelect = true;
+            this.WaitRejectList.HideSelection = false;
             this.WaitRejectList.Location = new System.Drawing.Point(8, 564);
             this.WaitRejectList.Margin = new System.Windows.Forms.Padding(6);
             this.WaitRejectList.Name = "WaitRejectList";
@@ -289,6 +290,7 @@ namespace UAS_MES_NEW.Make
             this.columnHeader8,
             this.columnHeader10});
             this.ChoosedRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ChoosedRejectList.HideSelection = false;
             this.ChoosedRejectList.Location = new System.Drawing.Point(736, 564);
             this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(6);
             this.ChoosedRejectList.Name = "ChoosedRejectList";

+ 14 - 1
UAS_MES_YD/FunctionCode/Make/Make_TestCollection.cs

@@ -211,6 +211,19 @@ namespace UAS_MES_NEW.Make
                 ChoosedList.Clear();
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
+                    dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where   ms_imei1='" + ms_sncode.Text + "' order by ms_id desc", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        ms_sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + ms_sncode.Text + "' order by ms_id desc", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            ms_sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                        }
+                    }
                     bool NoteAlready = LogicHandler.CheckDiffMakeCodeBeforeStepCheck(ms_sncode.Text, ma_code.Text, NoteForChange.Checked, out oMakeCode, out ErrorMessage);
                     if (!NoteAlready)
                     {
@@ -877,7 +890,7 @@ namespace UAS_MES_NEW.Make
                 string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
                 dh.ExecuteSql("delete from sninfo where si_sn='" + ms_sncode + "'", "delete");
                 dh.ExecuteSql("delete from makesnrelation where sn='" + ms_sncode + "' and makecode='" + ms_makecode + "'", "delete");
-                dh.ExecuteSql("update makeserial set ms_sncode=ms_firstsn,ms_imei1='',ms_mac='',ms_bt='',ms_netcode='',ms_imei2='',ms_beforesn='' where ms_sncode='" + ms_sncode + "' and ms_makecode='" + ma_code.Text + "'", "update");
+                dh.ExecuteSql("update makeserial set ms_sncode=ms_firstsn,ms_imei1='',ms_imei3='',ms_imei4='',ms_mac='',ms_bt='',ms_netcode='',ms_imei2='',ms_beforesn='' where ms_sncode='" + ms_sncode + "' and ms_makecode='" + ma_code.Text + "'", "update");
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "解绑", "解绑成功", ms_sncode, ob_checkno.Text);
                 OperateResult.AppendText(">>" + ms_sncode + "解绑成功\n", Color.Green);
             }

+ 2 - 2
UAS_MES_YD/FunctionCode/Make/Make_TestCollection.resx

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

+ 1169 - 0
UAS_MES_YD/FunctionCode/Make/Make_TestCollectionOQC.Designer.cs

@@ -0,0 +1,1169 @@
+using UAS_MES_NEW.CustomControl.CustomCheckBox;
+
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_TestCollectionOQC
+    {
+        /// <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();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_TestCollectionOQC));
+            this.bc_remark_label = new System.Windows.Forms.Label();
+            this.ms_sncode_label = new System.Windows.Forms.Label();
+            this.bc_groupcode_label = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.GoodProduct = new System.Windows.Forms.RadioButton();
+            this.Reject = new System.Windows.Forms.RadioButton();
+            this.WaitRejectList = new System.Windows.Forms.ListView();
+            this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader9 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.label4 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.ChoosedRejectList = new System.Windows.Forms.ListView();
+            this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader10 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.ma_qty_label = new System.Windows.Forms.Label();
+            this.ma_prodcode_label = new System.Windows.Forms.Label();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.mcd_inqty_label = new System.Windows.Forms.Label();
+            this.mc_restqty_label = new System.Windows.Forms.Label();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.mcd_totalng = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label9 = new System.Windows.Forms.Label();
+            this.mcd_okqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label8 = new System.Windows.Forms.Label();
+            this.mcd_ngqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label1 = new System.Windows.Forms.Label();
+            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ob_checkno = new System.Windows.Forms.Label();
+            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label7 = new System.Windows.Forms.Label();
+            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.pr_detail_label = new System.Windows.Forms.Label();
+            this.ma_softversion_label = new System.Windows.Forms.Label();
+            this.BadInfSource = new System.Windows.Forms.BindingSource(this.components);
+            this.NoteForChange = new System.Windows.Forms.CheckBox();
+            this.ControlLockTimer = new System.Windows.Forms.Timer(this.components);
+            this.Lock_label = new System.Windows.Forms.Label();
+            this.ma_salecode = new System.Windows.Forms.Label();
+            this.pr_sendchecktype = new System.Windows.Forms.Label();
+            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
+            this.Filter = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
+            this.ma_softversion = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.Save = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.bc_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.pr_spec = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ma_qty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ma_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.CleanInfo = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ChooseedReject = new UAS_MES_NEW.CustomControl.ButtonUtil.ArrowRightButton();
+            this.WaitReject = new UAS_MES_NEW.CustomControl.ButtonUtil.ArrowLeftButton();
+            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.WriteSoftWare = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
+            this.label10 = new System.Windows.Forms.Label();
+            this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.AutoPrintBad = new System.Windows.Forms.CheckBox();
+            this.RePrint = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.IfTest = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
+            this.ReleaseSN = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // bc_remark_label
+            // 
+            this.bc_remark_label.AutoSize = true;
+            this.bc_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_remark_label.Location = new System.Drawing.Point(574, 362);
+            this.bc_remark_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bc_remark_label.Name = "bc_remark_label";
+            this.bc_remark_label.Size = new System.Drawing.Size(146, 41);
+            this.bc_remark_label.TabIndex = 25;
+            this.bc_remark_label.Text = "不良备注";
+            // 
+            // ms_sncode_label
+            // 
+            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(428, 996);
+            this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_sncode_label.Name = "ms_sncode_label";
+            this.ms_sncode_label.Size = new System.Drawing.Size(114, 41);
+            this.ms_sncode_label.TabIndex = 18;
+            this.ms_sncode_label.Text = "序列号";
+            // 
+            // bc_groupcode_label
+            // 
+            this.bc_groupcode_label.AutoSize = true;
+            this.bc_groupcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_groupcode_label.Location = new System.Drawing.Point(6, 362);
+            this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bc_groupcode_label.Name = "bc_groupcode_label";
+            this.bc_groupcode_label.Size = new System.Drawing.Size(146, 41);
+            this.bc_groupcode_label.TabIndex = 24;
+            this.bc_groupcode_label.Text = "不良组别";
+            // 
+            // label2
+            // 
+            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.Blue;
+            this.label2.Location = new System.Drawing.Point(6, 302);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(146, 42);
+            this.label2.TabIndex = 0;
+            this.label2.Text = "采集信息";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(6, 442);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(146, 41);
+            this.label3.TabIndex = 34;
+            this.label3.Text = "不良代码";
+            // 
+            // GoodProduct
+            // 
+            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(12, 990);
+            this.GoodProduct.Margin = new System.Windows.Forms.Padding(6);
+            this.GoodProduct.Name = "GoodProduct";
+            this.GoodProduct.Size = new System.Drawing.Size(129, 54);
+            this.GoodProduct.TabIndex = 35;
+            this.GoodProduct.TabStop = true;
+            this.GoodProduct.Text = "良品";
+            this.GoodProduct.UseVisualStyleBackColor = true;
+            this.GoodProduct.CheckedChanged += new System.EventHandler(this.GoodProduct_CheckedChanged);
+            // 
+            // Reject
+            // 
+            this.Reject.AutoSize = true;
+            this.Reject.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Reject.ForeColor = System.Drawing.Color.Red;
+            this.Reject.Location = new System.Drawing.Point(176, 990);
+            this.Reject.Margin = new System.Windows.Forms.Padding(6);
+            this.Reject.Name = "Reject";
+            this.Reject.Size = new System.Drawing.Size(167, 54);
+            this.Reject.TabIndex = 36;
+            this.Reject.TabStop = true;
+            this.Reject.Text = "不良品";
+            this.Reject.UseVisualStyleBackColor = true;
+            // 
+            // WaitRejectList
+            // 
+            this.WaitRejectList.CheckBoxes = true;
+            this.WaitRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader5,
+            this.columnHeader4,
+            this.columnHeader1,
+            this.columnHeader2,
+            this.columnHeader9});
+            this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.WaitRejectList.FullRowSelect = true;
+            this.WaitRejectList.HideSelection = false;
+            this.WaitRejectList.Location = new System.Drawing.Point(8, 564);
+            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(6);
+            this.WaitRejectList.Name = "WaitRejectList";
+            this.WaitRejectList.Size = new System.Drawing.Size(528, 408);
+            this.WaitRejectList.TabIndex = 37;
+            this.WaitRejectList.UseCompatibleStateImageBehavior = false;
+            this.WaitRejectList.View = System.Windows.Forms.View.Details;
+            this.WaitRejectList.DoubleClick += new System.EventHandler(this.WaitRejectList_DoubleClick);
+            // 
+            // columnHeader5
+            // 
+            this.columnHeader5.Text = " ";
+            this.columnHeader5.Width = 0;
+            // 
+            // columnHeader4
+            // 
+            this.columnHeader4.Text = "不良代码组";
+            this.columnHeader4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader4.Width = 0;
+            // 
+            // columnHeader1
+            // 
+            this.columnHeader1.Text = "不良代码";
+            this.columnHeader1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader1.Width = 134;
+            // 
+            // columnHeader2
+            // 
+            this.columnHeader2.Text = "不良名称";
+            this.columnHeader2.Width = 392;
+            // 
+            // columnHeader9
+            // 
+            this.columnHeader9.Text = "备注";
+            this.columnHeader9.Width = 0;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.ForeColor = System.Drawing.Color.Black;
+            this.label4.Location = new System.Drawing.Point(6, 514);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(146, 42);
+            this.label4.TabIndex = 39;
+            this.label4.Text = "待选不良";
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.ForeColor = System.Drawing.Color.Black;
+            this.label5.Location = new System.Drawing.Point(732, 514);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(146, 42);
+            this.label5.TabIndex = 40;
+            this.label5.Text = "已选不良";
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(1282, 302);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(146, 42);
+            this.label6.TabIndex = 46;
+            this.label6.Text = "操作结果";
+            // 
+            // ChoosedRejectList
+            // 
+            this.ChoosedRejectList.CheckBoxes = true;
+            this.ChoosedRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader6,
+            this.columnHeader3,
+            this.columnHeader7,
+            this.columnHeader8,
+            this.columnHeader10});
+            this.ChoosedRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ChoosedRejectList.HideSelection = false;
+            this.ChoosedRejectList.Location = new System.Drawing.Point(736, 564);
+            this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(6);
+            this.ChoosedRejectList.Name = "ChoosedRejectList";
+            this.ChoosedRejectList.Size = new System.Drawing.Size(528, 408);
+            this.ChoosedRejectList.TabIndex = 50;
+            this.ChoosedRejectList.UseCompatibleStateImageBehavior = false;
+            this.ChoosedRejectList.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader6
+            // 
+            this.columnHeader6.Text = " ";
+            this.columnHeader6.Width = 20;
+            // 
+            // columnHeader3
+            // 
+            this.columnHeader3.Text = "不良代码组";
+            this.columnHeader3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader3.Width = 150;
+            // 
+            // columnHeader7
+            // 
+            this.columnHeader7.Text = "不良代码";
+            this.columnHeader7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader7.Width = 168;
+            // 
+            // columnHeader8
+            // 
+            this.columnHeader8.Text = "不良名称";
+            this.columnHeader8.Width = 99;
+            // 
+            // columnHeader10
+            // 
+            this.columnHeader10.Text = "备注";
+            this.columnHeader10.Width = 3;
+            // 
+            // ma_qty_label
+            // 
+            this.ma_qty_label.AutoSize = true;
+            this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty_label.Location = new System.Drawing.Point(574, 28);
+            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_qty_label.Name = "ma_qty_label";
+            this.ma_qty_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_qty_label.TabIndex = 11;
+            this.ma_qty_label.Text = "工单数量";
+            // 
+            // ma_prodcode_label
+            // 
+            this.ma_prodcode_label.AutoSize = true;
+            this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode_label.Location = new System.Drawing.Point(6, 128);
+            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode_label.Name = "ma_prodcode_label";
+            this.ma_prodcode_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_prodcode_label.TabIndex = 7;
+            this.ma_prodcode_label.Text = "产品编号";
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(6, 26);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(146, 41);
+            this.ms_makecode_label.TabIndex = 2;
+            this.ms_makecode_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(314, 12);
+            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_inqty_label.Name = "mcd_inqty_label";
+            this.mcd_inqty_label.Size = new System.Drawing.Size(146, 41);
+            this.mcd_inqty_label.TabIndex = 14;
+            this.mcd_inqty_label.Text = "已采集数";
+            // 
+            // 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(32, 12);
+            this.mc_restqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mc_restqty_label.Name = "mc_restqty_label";
+            this.mc_restqty_label.Size = new System.Drawing.Size(146, 41);
+            this.mc_restqty_label.TabIndex = 17;
+            this.mc_restqty_label.Text = "待采集数";
+            // 
+            // panel1
+            // 
+            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel1.Controls.Add(this.mcd_totalng);
+            this.panel1.Controls.Add(this.label9);
+            this.panel1.Controls.Add(this.mcd_okqty);
+            this.panel1.Controls.Add(this.label8);
+            this.panel1.Controls.Add(this.mcd_ngqty);
+            this.panel1.Controls.Add(this.label1);
+            this.panel1.Controls.Add(this.SendCheck);
+            this.panel1.Controls.Add(this.mcd_remainqty);
+            this.panel1.Controls.Add(this.mc_restqty_label);
+            this.panel1.Controls.Add(this.mcd_inqty);
+            this.panel1.Controls.Add(this.mcd_inqty_label);
+            this.panel1.Location = new System.Drawing.Point(1074, 8);
+            this.panel1.Margin = new System.Windows.Forms.Padding(4);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(628, 230);
+            this.panel1.TabIndex = 71;
+            // 
+            // mcd_totalng
+            // 
+            this.mcd_totalng.AutoSize = true;
+            this.mcd_totalng.CutLength = null;
+            this.mcd_totalng.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_totalng.Location = new System.Drawing.Point(228, 170);
+            this.mcd_totalng.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_totalng.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_totalng.Name = "mcd_totalng";
+            this.mcd_totalng.Size = new System.Drawing.Size(0, 41);
+            this.mcd_totalng.TabIndex = 84;
+            this.mcd_totalng.Tag = "mcd_inqty";
+            // 
+            // 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(32, 170);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(178, 41);
+            this.label9.TabIndex = 83;
+            this.label9.Text = "累计不良数";
+            // 
+            // mcd_okqty
+            // 
+            this.mcd_okqty.AutoSize = true;
+            this.mcd_okqty.CutLength = null;
+            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_okqty.Location = new System.Drawing.Point(499, 87);
+            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_okqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_okqty.Name = "mcd_okqty";
+            this.mcd_okqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_okqty.TabIndex = 82;
+            this.mcd_okqty.Tag = "mcd_inqty";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(318, 87);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(114, 41);
+            this.label8.TabIndex = 81;
+            this.label8.Text = "良品数";
+            // 
+            // mcd_ngqty
+            // 
+            this.mcd_ngqty.AutoSize = true;
+            this.mcd_ngqty.CutLength = null;
+            this.mcd_ngqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_ngqty.Location = new System.Drawing.Point(228, 87);
+            this.mcd_ngqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_ngqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_ngqty.Name = "mcd_ngqty";
+            this.mcd_ngqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_ngqty.TabIndex = 80;
+            this.mcd_ngqty.Tag = "mcd_inqty";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(32, 87);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(178, 41);
+            this.label1.TabIndex = 79;
+            this.label1.Text = "当前不良数";
+            // 
+            // 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(458, 168);
+            this.SendCheck.Margin = new System.Windows.Forms.Padding(4);
+            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(130, 52);
+            this.SendCheck.TabIndex = 72;
+            this.SendCheck.Text = "送检";
+            this.SendCheck.UseVisualStyleBackColor = false;
+            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
+            // 
+            // 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(229, 12);
+            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_remainqty.TabIndex = 57;
+            this.mcd_remainqty.Tag = "mcd_remainqty";
+            // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.CutLength = null;
+            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty.Location = new System.Drawing.Point(496, 12);
+            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_inqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_inqty.TabIndex = 54;
+            this.mcd_inqty.Tag = "mcd_inqty";
+            // 
+            // 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(1452, 366);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ob_checkno.Name = "ob_checkno";
+            this.ob_checkno.Size = new System.Drawing.Size(0, 41);
+            this.ob_checkno.TabIndex = 76;
+            this.ob_checkno.Tag = "ob_checkno";
+            this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
+            // 
+            // 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(1451, 428);
+            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ob_batchqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ob_batchqty.Name = "ob_batchqty";
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 41);
+            this.ob_batchqty.TabIndex = 75;
+            this.ob_batchqty.Tag = "ob_batchqty";
+            // 
+            // 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(1451, 366);
+            this.ob_sendqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ob_sendqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ob_sendqty.Name = "ob_sendqty";
+            this.ob_sendqty.Size = new System.Drawing.Size(0, 41);
+            this.ob_sendqty.TabIndex = 78;
+            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(1294, 366);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(146, 41);
+            this.label7.TabIndex = 77;
+            this.label7.Text = "当前批号";
+            // 
+            // 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(1294, 428);
+            this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ob_batchqty_label.Name = "ob_batchqty_label";
+            this.ob_batchqty_label.Size = new System.Drawing.Size(146, 41);
+            this.ob_batchqty_label.TabIndex = 74;
+            this.ob_batchqty_label.Text = "抽检批数";
+            // 
+            // ob_nowcheckqty
+            // 
+            this.ob_nowcheckqty.AutoSize = true;
+            this.ob_nowcheckqty.CutLength = null;
+            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(1451, 490);
+            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 41);
+            this.ob_nowcheckqty.TabIndex = 73;
+            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(1294, 490);
+            this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
+            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(146, 41);
+            this.ob_nowcheckqty_label.TabIndex = 72;
+            this.ob_nowcheckqty_label.Text = "当前批数";
+            // 
+            // pr_detail_label
+            // 
+            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(574, 128);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail_label.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
+            this.pr_detail_label.TabIndex = 6;
+            this.pr_detail_label.Text = "产品规格";
+            // 
+            // ma_softversion_label
+            // 
+            this.ma_softversion_label.AutoSize = true;
+            this.ma_softversion_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_softversion_label.Location = new System.Drawing.Point(6, 204);
+            this.ma_softversion_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_softversion_label.Name = "ma_softversion_label";
+            this.ma_softversion_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_softversion_label.TabIndex = 72;
+            this.ma_softversion_label.Text = "软件版本";
+            // 
+            // NoteForChange
+            // 
+            this.NoteForChange.AutoSize = true;
+            this.NoteForChange.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.NoteForChange.Location = new System.Drawing.Point(580, 224);
+            this.NoteForChange.Margin = new System.Windows.Forms.Padding(4);
+            this.NoteForChange.Name = "NoteForChange";
+            this.NoteForChange.Size = new System.Drawing.Size(190, 35);
+            this.NoteForChange.TabIndex = 75;
+            this.NoteForChange.Text = "切换工单提示";
+            this.NoteForChange.UseVisualStyleBackColor = true;
+            // 
+            // Lock_label
+            // 
+            this.Lock_label.AutoSize = true;
+            this.Lock_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Lock_label.ForeColor = System.Drawing.Color.Red;
+            this.Lock_label.Location = new System.Drawing.Point(575, 298);
+            this.Lock_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.Lock_label.Name = "Lock_label";
+            this.Lock_label.Size = new System.Drawing.Size(250, 41);
+            this.Lock_label.TabIndex = 77;
+            this.Lock_label.Text = "Ctrl+Q解除锁定";
+            this.Lock_label.Visible = false;
+            // 
+            // ma_salecode
+            // 
+            this.ma_salecode.AutoSize = true;
+            this.ma_salecode.Location = new System.Drawing.Point(954, 302);
+            this.ma_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_salecode.Name = "ma_salecode";
+            this.ma_salecode.Size = new System.Drawing.Size(0, 24);
+            this.ma_salecode.TabIndex = 78;
+            this.ma_salecode.Visible = false;
+            // 
+            // pr_sendchecktype
+            // 
+            this.pr_sendchecktype.AutoSize = true;
+            this.pr_sendchecktype.Location = new System.Drawing.Point(954, 310);
+            this.pr_sendchecktype.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_sendchecktype.Name = "pr_sendchecktype";
+            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 24);
+            this.pr_sendchecktype.TabIndex = 79;
+            this.pr_sendchecktype.Visible = false;
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(582, 292);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(8, 14, 8, 14);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(128, 44);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 194;
+            // 
+            // Filter
+            // 
+            this.Filter.BackColor = System.Drawing.Color.Transparent;
+            this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
+            this.Filter.Location = new System.Drawing.Point(186, 514);
+            this.Filter.Margin = new System.Windows.Forms.Padding(4);
+            this.Filter.Name = "Filter";
+            this.Filter.PlaceHolder = "不良名称搜索";
+            this.Filter.Size = new System.Drawing.Size(352, 44);
+            this.Filter.TabIndex = 76;
+            this.Filter.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.Filter_UserControlTextChanged);
+            // 
+            // ma_softversion
+            // 
+            this.ma_softversion.AutoSize = true;
+            this.ma_softversion.CutLength = null;
+            this.ma_softversion.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_softversion.Location = new System.Drawing.Point(188, 204);
+            this.ma_softversion.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_softversion.MaximumSize = new System.Drawing.Size(400, 0);
+            this.ma_softversion.Name = "ma_softversion";
+            this.ma_softversion.Size = new System.Drawing.Size(0, 41);
+            this.ma_softversion.TabIndex = 73;
+            // 
+            // Save
+            // 
+            this.Save.AllPower = null;
+            this.Save.BackColor = System.Drawing.Color.Transparent;
+            this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
+            this.Save.Image = null;
+            this.Save.IsShowBorder = true;
+            this.Save.Location = new System.Drawing.Point(954, 994);
+            this.Save.Margin = new System.Windows.Forms.Padding(4);
+            this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
+            this.Save.Name = "Save";
+            this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
+            this.Save.Power = null;
+            this.Save.Size = new System.Drawing.Size(130, 52);
+            this.Save.TabIndex = 70;
+            this.Save.Text = "保存";
+            this.Save.UseVisualStyleBackColor = false;
+            this.Save.Click += new System.EventHandler(this.Save_Click);
+            // 
+            // bc_code
+            // 
+            this.bc_code.AllPower = null;
+            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(188, 442);
+            this.bc_code.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_code.Name = "bc_code";
+            this.bc_code.Power = null;
+            this.bc_code.Size = new System.Drawing.Size(348, 40);
+            this.bc_code.Str = null;
+            this.bc_code.Str1 = null;
+            this.bc_code.Str2 = null;
+            this.bc_code.TabIndex = 70;
+            this.bc_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bc_code_KeyDown);
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = null;
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = null;
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(186, 26);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = null;
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(230, 42);
+            this.ma_code.TabIndex = 67;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "ma_code";
+            this.ma_code.TextBoxEnable = true;
+            this.ma_code.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox.OnTextChange(this.ma_code_UserControlTextChanged);
+            // 
+            // LockMakeCode
+            // 
+            this.LockMakeCode.AutoSize = true;
+            this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LockMakeCode.LeaveEvent = false;
+            this.LockMakeCode.Location = new System.Drawing.Point(448, 30);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
+            this.LockMakeCode.TabIndex = 66;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
+            // pr_spec
+            // 
+            this.pr_spec.AutoSize = true;
+            this.pr_spec.CutLength = "qweqwe";
+            this.pr_spec.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_spec.Location = new System.Drawing.Point(748, 128);
+            this.pr_spec.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_spec.MaximumSize = new System.Drawing.Size(360, 0);
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.Size = new System.Drawing.Size(0, 41);
+            this.pr_spec.TabIndex = 56;
+            // 
+            // ma_qty
+            // 
+            this.ma_qty.AutoSize = true;
+            this.ma_qty.CutLength = null;
+            this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty.Location = new System.Drawing.Point(746, 28);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_qty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ma_qty.Name = "ma_qty";
+            this.ma_qty.Size = new System.Drawing.Size(0, 41);
+            this.ma_qty.TabIndex = 55;
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.CutLength = null;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode.Location = new System.Drawing.Point(188, 128);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_prodcode.TabIndex = 53;
+            this.ma_prodcode.TextChanged += new System.EventHandler(this.ma_prodcode_TextChanged);
+            // 
+            // 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(1288, 564);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(410, 408);
+            this.OperateResult.TabIndex = 52;
+            this.OperateResult.Text = "";
+            // 
+            // CleanInfo
+            // 
+            this.CleanInfo.AllPower = null;
+            this.CleanInfo.BackColor = System.Drawing.Color.Transparent;
+            this.CleanInfo.DownImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.DownImage")));
+            this.CleanInfo.Image = ((System.Drawing.Image)(resources.GetObject("CleanInfo.Image")));
+            this.CleanInfo.IsShowBorder = true;
+            this.CleanInfo.Location = new System.Drawing.Point(865, 234);
+            this.CleanInfo.Margin = new System.Windows.Forms.Padding(6);
+            this.CleanInfo.MoveImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.MoveImage")));
+            this.CleanInfo.Name = "CleanInfo";
+            this.CleanInfo.NormalImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.NormalImage")));
+            this.CleanInfo.Power = null;
+            this.CleanInfo.Size = new System.Drawing.Size(122, 48);
+            this.CleanInfo.TabIndex = 47;
+            this.CleanInfo.Text = "清除内容";
+            this.CleanInfo.UseVisualStyleBackColor = true;
+            this.CleanInfo.Visible = false;
+            this.CleanInfo.Click += new System.EventHandler(this.CleanInfo_Click);
+            // 
+            // ChooseedReject
+            // 
+            this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
+            this.ChooseedReject.Location = new System.Drawing.Point(584, 694);
+            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(6);
+            this.ChooseedReject.Name = "ChooseedReject";
+            this.ChooseedReject.Size = new System.Drawing.Size(100, 46);
+            this.ChooseedReject.TabIndex = 45;
+            this.ChooseedReject.UseVisualStyleBackColor = true;
+            this.ChooseedReject.Click += new System.EventHandler(this.ChooseedReject_Click);
+            // 
+            // WaitReject
+            // 
+            this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
+            this.WaitReject.Location = new System.Drawing.Point(584, 820);
+            this.WaitReject.Margin = new System.Windows.Forms.Padding(6);
+            this.WaitReject.Name = "WaitReject";
+            this.WaitReject.Size = new System.Drawing.Size(100, 46);
+            this.WaitReject.TabIndex = 44;
+            this.WaitReject.UseVisualStyleBackColor = true;
+            this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
+            // 
+            // bc_remark
+            // 
+            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(740, 364);
+            this.bc_remark.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_remark.Multiline = true;
+            this.bc_remark.Name = "bc_remark";
+            this.bc_remark.Power = null;
+            this.bc_remark.Size = new System.Drawing.Size(524, 120);
+            this.bc_remark.Str = null;
+            this.bc_remark.Str1 = null;
+            this.bc_remark.Str2 = null;
+            this.bc_remark.TabIndex = 41;
+            // 
+            // bc_groupcode
+            // 
+            this.bc_groupcode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_groupcode.FormattingEnabled = true;
+            this.bc_groupcode.Location = new System.Drawing.Point(188, 364);
+            this.bc_groupcode.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_groupcode.Name = "bc_groupcode";
+            this.bc_groupcode.Size = new System.Drawing.Size(348, 37);
+            this.bc_groupcode.TabIndex = 21;
+            this.bc_groupcode.SelectedIndexChanged += new System.EventHandler(this.bc_groupcode_SelectedIndexChanged);
+            // 
+            // ms_sncode
+            // 
+            this.ms_sncode.AllPower = "ifall";
+            this.ms_sncode.BackColor = System.Drawing.Color.White;
+            this.ms_sncode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_sncode.ID = null;
+            this.ms_sncode.Location = new System.Drawing.Point(560, 996);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(6);
+            this.ms_sncode.Name = "ms_sncode";
+            this.ms_sncode.Power = null;
+            this.ms_sncode.Size = new System.Drawing.Size(358, 40);
+            this.ms_sncode.Str = null;
+            this.ms_sncode.Str1 = null;
+            this.ms_sncode.Str2 = null;
+            this.ms_sncode.TabIndex = 68;
+            this.ms_sncode.Tag = "IfRead";
+            this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown);
+            // 
+            // WriteSoftWare
+            // 
+            this.WriteSoftWare.AutoSize = true;
+            this.WriteSoftWare.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.WriteSoftWare.Location = new System.Drawing.Point(1157, 1002);
+            this.WriteSoftWare.Margin = new System.Windows.Forms.Padding(4);
+            this.WriteSoftWare.Name = "WriteSoftWare";
+            this.WriteSoftWare.Size = new System.Drawing.Size(128, 35);
+            this.WriteSoftWare.TabIndex = 195;
+            this.WriteSoftWare.Text = "解绑SN";
+            this.WriteSoftWare.UseVisualStyleBackColor = true;
+            this.WriteSoftWare.Visible = false;
+            this.WriteSoftWare.CheckedChanged += new System.EventHandler(this.WriteSoftWare_CheckedChanged);
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(1285, 250);
+            this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(114, 41);
+            this.label10.TabIndex = 198;
+            this.label10.Text = "打印机";
+            // 
+            // Printer
+            // 
+            this.Printer.Location = new System.Drawing.Point(1413, 250);
+            this.Printer.Margin = new System.Windows.Forms.Padding(8);
+            this.Printer.Name = "Printer";
+            this.Printer.Size = new System.Drawing.Size(268, 50);
+            this.Printer.TabIndex = 197;
+            // 
+            // AutoPrintBad
+            // 
+            this.AutoPrintBad.AutoSize = true;
+            this.AutoPrintBad.Checked = true;
+            this.AutoPrintBad.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.AutoPrintBad.Location = new System.Drawing.Point(1459, 312);
+            this.AutoPrintBad.Name = "AutoPrintBad";
+            this.AutoPrintBad.Size = new System.Drawing.Size(186, 28);
+            this.AutoPrintBad.TabIndex = 199;
+            this.AutoPrintBad.Text = "自动打印不良";
+            this.AutoPrintBad.UseVisualStyleBackColor = true;
+            // 
+            // RePrint
+            // 
+            this.RePrint.AllPower = null;
+            this.RePrint.BackColor = System.Drawing.Color.Transparent;
+            this.RePrint.DownImage = ((System.Drawing.Image)(resources.GetObject("RePrint.DownImage")));
+            this.RePrint.Image = ((System.Drawing.Image)(resources.GetObject("RePrint.Image")));
+            this.RePrint.IsShowBorder = true;
+            this.RePrint.Location = new System.Drawing.Point(1142, 292);
+            this.RePrint.Margin = new System.Windows.Forms.Padding(6);
+            this.RePrint.MoveImage = ((System.Drawing.Image)(resources.GetObject("RePrint.MoveImage")));
+            this.RePrint.Name = "RePrint";
+            this.RePrint.NormalImage = ((System.Drawing.Image)(resources.GetObject("RePrint.NormalImage")));
+            this.RePrint.Power = null;
+            this.RePrint.Size = new System.Drawing.Size(122, 48);
+            this.RePrint.TabIndex = 200;
+            this.RePrint.Text = "重打不良";
+            this.RePrint.UseVisualStyleBackColor = true;
+            this.RePrint.Click += new System.EventHandler(this.RePrint_Click);
+            // 
+            // IfTest
+            // 
+            this.IfTest.AutoSize = true;
+            this.IfTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.IfTest.Location = new System.Drawing.Point(1556, 1003);
+            this.IfTest.Margin = new System.Windows.Forms.Padding(4);
+            this.IfTest.Name = "IfTest";
+            this.IfTest.Size = new System.Drawing.Size(142, 35);
+            this.IfTest.TabIndex = 201;
+            this.IfTest.Text = "是否抽检";
+            this.IfTest.UseVisualStyleBackColor = true;
+            // 
+            // ReleaseSN
+            // 
+            this.ReleaseSN.AllPower = null;
+            this.ReleaseSN.BackColor = System.Drawing.Color.Transparent;
+            this.ReleaseSN.DownImage = ((System.Drawing.Image)(resources.GetObject("ReleaseSN.DownImage")));
+            this.ReleaseSN.Image = null;
+            this.ReleaseSN.IsShowBorder = true;
+            this.ReleaseSN.Location = new System.Drawing.Point(1298, 990);
+            this.ReleaseSN.Margin = new System.Windows.Forms.Padding(4);
+            this.ReleaseSN.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleaseSN.MoveImage")));
+            this.ReleaseSN.Name = "ReleaseSN";
+            this.ReleaseSN.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleaseSN.NormalImage")));
+            this.ReleaseSN.Power = null;
+            this.ReleaseSN.Size = new System.Drawing.Size(130, 52);
+            this.ReleaseSN.TabIndex = 202;
+            this.ReleaseSN.Text = "解绑SN";
+            this.ReleaseSN.UseVisualStyleBackColor = false;
+            this.ReleaseSN.Click += new System.EventHandler(this.ReleaseSN_Click);
+            // 
+            // Make_TestCollectionOQC
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.SystemColors.Control;
+            this.ClientSize = new System.Drawing.Size(1724, 1070);
+            this.Controls.Add(this.ReleaseSN);
+            this.Controls.Add(this.IfTest);
+            this.Controls.Add(this.RePrint);
+            this.Controls.Add(this.AutoPrintBad);
+            this.Controls.Add(this.label10);
+            this.Controls.Add(this.Printer);
+            this.Controls.Add(this.ob_checkno);
+            this.Controls.Add(this.WriteSoftWare);
+            this.Controls.Add(this.ob_sendqty);
+            this.Controls.Add(this.ob_batchqty);
+            this.Controls.Add(this.StepCount);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.pr_sendchecktype);
+            this.Controls.Add(this.ma_salecode);
+            this.Controls.Add(this.Lock_label);
+            this.Controls.Add(this.Filter);
+            this.Controls.Add(this.ob_batchqty_label);
+            this.Controls.Add(this.ob_nowcheckqty);
+            this.Controls.Add(this.NoteForChange);
+            this.Controls.Add(this.ob_nowcheckqty_label);
+            this.Controls.Add(this.ma_softversion);
+            this.Controls.Add(this.ma_softversion_label);
+            this.Controls.Add(this.panel1);
+            this.Controls.Add(this.Save);
+            this.Controls.Add(this.bc_code);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.LockMakeCode);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.pr_spec);
+            this.Controls.Add(this.ma_qty);
+            this.Controls.Add(this.ma_prodcode);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.ChoosedRejectList);
+            this.Controls.Add(this.CleanInfo);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.ChooseedReject);
+            this.Controls.Add(this.WaitReject);
+            this.Controls.Add(this.bc_remark);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.WaitRejectList);
+            this.Controls.Add(this.Reject);
+            this.Controls.Add(this.GoodProduct);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.bc_groupcode);
+            this.Controls.Add(this.bc_remark_label);
+            this.Controls.Add(this.ms_sncode_label);
+            this.Controls.Add(this.bc_groupcode_label);
+            this.Controls.Add(this.ms_sncode);
+            this.Controls.Add(this.ma_qty_label);
+            this.Controls.Add(this.ms_makecode_label);
+            this.Controls.Add(this.pr_detail_label);
+            this.Controls.Add(this.ma_prodcode_label);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.KeyPreview = true;
+            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Name = "Make_TestCollectionOQC";
+            this.Tag = "Make!TestCollection";
+            this.Text = " ";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_TestCollection_FormClosing);
+            this.Load += new System.EventHandler(this.TestCollection_Load);
+            this.SizeChanged += new System.EventHandler(this.测试采集_SizeChanged);
+            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Make_TestCollection_KeyDown);
+            this.panel1.ResumeLayout(true);
+            this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).EndInit();
+            this.ResumeLayout(true);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Label ma_prodcode_label;
+        private System.Windows.Forms.Label ms_makecode_label;
+        private System.Windows.Forms.Label mcd_inqty_label;
+        private System.Windows.Forms.Label ma_qty_label;
+        private System.Windows.Forms.Label mc_restqty_label;
+        private System.Windows.Forms.Label ms_sncode_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox ms_sncode;
+        private System.Windows.Forms.Label bc_groupcode_label;
+        private System.Windows.Forms.Label bc_remark_label;
+        private CustomControl.ComBoxWithFocus.ComBoxWithFocus bc_groupcode;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.RadioButton GoodProduct;
+        private System.Windows.Forms.RadioButton Reject;
+        private System.Windows.Forms.ListView WaitRejectList;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label5;
+        private CustomControl.TextBoxWithIcon.EnterTextBox bc_remark;
+        private CustomControl.ButtonUtil.ArrowLeftButton WaitReject;
+        private CustomControl.ButtonUtil.ArrowRightButton ChooseedReject;
+        private System.Windows.Forms.ColumnHeader columnHeader1;
+        private System.Windows.Forms.Label label6;
+        private CustomControl.ButtonUtil.NormalButton CleanInfo;
+        private System.Windows.Forms.ColumnHeader columnHeader5;
+        private System.Windows.Forms.ListView ChoosedRejectList;
+        private System.Windows.Forms.ColumnHeader columnHeader6;
+        private System.Windows.Forms.ColumnHeader columnHeader7;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private CustomControl.ValueLabel.ValueLabel ma_prodcode;
+        private CustomControl.ValueLabel.ValueLabel mcd_inqty;
+        private CustomControl.ValueLabel.ValueLabel ma_qty;
+        private CustomControl.ValueLabel.ValueLabel pr_spec;
+        private CustomControl.ValueLabel.ValueLabel mcd_remainqty;
+        private System.Windows.Forms.ColumnHeader columnHeader3;
+        private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private CustomControl.TextBoxWithIcon.EnterTextBox bc_code;
+        private System.Windows.Forms.ColumnHeader columnHeader4;
+        private CustomControl.ButtonUtil.NormalButton Save;
+        private System.Windows.Forms.Panel panel1;
+        private CustomControl.ValueLabel.ValueLabel ob_batchqty;
+        private System.Windows.Forms.Label ob_batchqty_label;
+        private CustomControl.ValueLabel.ValueLabel ob_nowcheckqty;
+        private System.Windows.Forms.Label ob_nowcheckqty_label;
+        private CustomControl.ButtonUtil.NormalButton SendCheck;
+        private System.Windows.Forms.Label ob_checkno;
+        private System.Windows.Forms.Label pr_detail_label;
+        private System.Windows.Forms.ColumnHeader columnHeader2;
+        private System.Windows.Forms.ColumnHeader columnHeader8;
+        private CustomControl.ValueLabel.ValueLabel ob_sendqty;
+        private System.Windows.Forms.Label label7;
+        private CustomControl.ValueLabel.ValueLabel ma_softversion;
+        private System.Windows.Forms.Label ma_softversion_label;
+        private System.Windows.Forms.ColumnHeader columnHeader9;
+        private System.Windows.Forms.ColumnHeader columnHeader10;
+        private System.Windows.Forms.BindingSource BadInfSource;
+        private System.Windows.Forms.CheckBox NoteForChange;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder Filter;
+        private System.Windows.Forms.Timer ControlLockTimer;
+        private System.Windows.Forms.Label Lock_label;
+        private System.Windows.Forms.Label ma_salecode;
+        private System.Windows.Forms.Label pr_sendchecktype;
+        private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private ReSetCheckBox WriteSoftWare;
+        private CustomControl.ValueLabel.ValueLabel mcd_ngqty;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.ValueLabel.ValueLabel mcd_totalng;
+        private System.Windows.Forms.Label label9;
+        private CustomControl.ValueLabel.ValueLabel mcd_okqty;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label label10;
+        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
+        private System.Windows.Forms.CheckBox AutoPrintBad;
+        private CustomControl.ButtonUtil.NormalButton RePrint;
+        private ReSetCheckBox IfTest;
+        private CustomControl.ButtonUtil.NormalButton ReleaseSN;
+    }
+}

+ 887 - 0
UAS_MES_YD/FunctionCode/Make/Make_TestCollectionOQC.cs

@@ -0,0 +1,887 @@
+using System;
+using System.Data;
+using System.Drawing;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+using System.Collections.Generic;
+using Seagull.BarTender.Print;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_TestCollectionOQC : Form
+    {
+        DataHelper dh = null;
+        DataTable dt = null;
+        //当前工序的名称
+
+        string ErrorMessage = "";
+        //用于保存是否之前输入的ms_sncode
+        string LastSncode;
+
+        string oMakeCode = "";
+
+        string oMSID = "";
+
+        string ifrework = "";
+
+        string reworkstatus = "";
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        /// <summary>
+        /// 已选的不良
+        /// </summary>
+        List<string> ChoosedList = new List<string>();
+        /// <summary>
+        /// 待选的不良
+        /// </summary>
+        List<string> WaitList = new List<string>();
+
+        bool AutoCut = false;
+
+        bool LockSn = false;
+
+        DataTable Dbfind;
+
+        LabelFormatDocument format;
+
+        Engine engine;
+
+        bool EnablePrint;
+
+        public Make_TestCollectionOQC()
+        {
+            InitializeComponent();
+        }
+
+        private void TestCollection_Load(object sender, EventArgs e)
+        {
+            GoodProduct.Checked = true;
+            asc.controllInitializeSize(this);
+            ms_sncode.Focus();
+            //设置锁定工单
+            LockMakeCode.GetMakeCodeCtl(ma_code);
+            ma_code.SetLockCheckBox(LockMakeCode);
+            ControlLockTimer.Tick += ControlLockTimer_Tick;
+            ControlLockTimer.Interval = 100;
+
+            //工单号放大镜配置
+            ma_code.TableName = "make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单号,ma_pocode # 内部订单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_spec # 产品规格,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code", "ma_pocode", "ma_prodcode", "ma_qty", "substr(pr_spec,0,50)pr_spec", "ma_softversion", "ma_salecode", "nvl(pr_sendchecktype,'LineCode')pr_sendchecktype" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += Ma_code_DbChange;
+            dh = SystemInf.dh;
+            StepCount.StepCode = User.CurrentStepCode;
+            StepCount.Source = User.UserSourceCode;
+            StepCount.LineCode = User.UserLineCode;
+            StepCount.Dh = dh;
+            StepCount.Start();
+            if (BaseUtil.CheckBarTenderEnable())
+            {
+                OperateResult.AppendText("已安装BarTender\n");
+                try
+                {
+                    engine = new Engine();
+                    engine.Start();
+                    format = engine.Documents.Open(Application.StartupPath + "/BadCode.btw");
+                    EnablePrint = true;
+                }
+                catch (Exception)
+                {
+                    EnablePrint = false;
+                    OperateResult.AppendText("未正确安装BarTender");
+                }
+            }
+            else
+            {
+                EnablePrint = false;
+                OperateResult.AppendText("未正确安装BarTender");
+            }
+        }
+
+        private void ControlLockTimer_Tick(object sender, EventArgs e)
+        {
+            this.Activate();
+            ms_sncode.Focus();
+        }
+
+        private void Ma_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+            LoadBadGroupData();
+            LoadCollectedNum();
+            LoadCheckQTY();
+        }
+
+        /// <summary>
+        /// 将已选不良移动到待选不良
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void WaitReject_Click(object sender, EventArgs e)
+        {
+            int CheckedNum = 0;
+            //已存在在ListView中的Item是不能添加到其他ListView中的,需要调用其克隆的方法
+            for (int i = ChoosedRejectList.Items.Count - 1; i >= 0; i--)
+            {
+                if (ChoosedRejectList.Items[i].Checked)
+                {
+                    ChoosedRejectList.Items[i].Checked = false;
+                    WaitRejectList.Items.Add((ListViewItem)ChoosedRejectList.Items[i].Clone());
+                    ChoosedRejectList.Items[i].Remove();
+                    CheckedNum++;
+                }
+            }
+            if (CheckedNum == 0)
+            {
+                for (int i = ChoosedRejectList.Items.Count - 1; i >= 0; i--)
+                {
+                    WaitRejectList.Items.Add((ListViewItem)ChoosedRejectList.Items[i].Clone());
+                    ChoosedRejectList.Items[i].Remove();
+                }
+            }
+        }
+
+        /// <summary>
+        /// 将不良信息移动到已选不良
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <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;
+            }
+            int CheckedNum = 0;
+            //是否已经添加到不良
+            bool AddToReject = false;
+            for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
+            {
+                if (WaitRejectList.Items[i].Checked)
+                {
+                    AddToReject = false;
+                    for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
+                    {
+                        if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
+                        {
+                            AddToReject = true;
+                            OperateResult.AppendText(">>已存在" + ChoosedRejectList.Items[j].SubItems[2].Text + "不良\n", Color.Red);
+                            break;
+                        }
+                    }
+                    //未添加则进行添加
+                    if (!AddToReject)
+                    {
+                        WaitRejectList.Items[i].Checked = false;
+                        ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
+                        WaitRejectList.Items[i].Remove();
+                        CheckedNum++;
+                    }
+                }
+            }
+            if (CheckedNum == 0)
+            {
+                OperateResult.AppendText(">>请勾选不良代码\n", Color.Red);
+            }
+        }
+
+        private void CleanInfo_Click(object sender, EventArgs e)
+        {
+            OperateResult.Clear();
+        }
+
+        private void ms_code_KeyDown(object sender, KeyEventArgs e)
+        {
+            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);
+                    if (!NoteAlready)
+                    {
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                        return;
+                    }
+                    if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
+                    {
+                        //是否提示过工单切换框,检测前后执行
+                        if (!LogicHandler.CheckDiffMakeCodeAfterStepCheck(ms_sncode.Text, oMakeCode, NoteForChange.Checked, NoteAlready, ma_code, out ErrorMessage))
+                        {
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                            return;
+                        }
+                        if (ma_code.Text != oMakeCode && oMakeCode != null)
+                        {
+                            dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,nvl(ma_softversion,ms_softversion)ma_softversion,ma_salecode,substr(pr_spec,0,50)pr_spec,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,ma_qty from makeserial left join  make on ma_code=ms_makecode left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "' and ms_sncode='" + ms_sncode.Text + "'", "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                BaseUtil.SetFormValue(this.Controls, dt);
+                                LockMakeCode.Checked = true;
+                            }
+                        }
+                        dt = (DataTable)dh.ExecuteSql("select ms_nextstepcode,ms_prodcode,ms_craftcode,ms_sncode,ms_reworkstatus,nvl(ms_ifrework,0)ms_ifrework,ms_stepcode,ms_status,nvl(st_ifrepair,0) st_ifrepair from makeserial left join step on ms_stepcode=st_code where ms_id='" + oMSID + "'", "select");
+                        string status = dt.Rows[0]["ms_status"].ToString();
+                        reworkstatus = dt.Rows[0]["ms_reworkstatus"].ToString();
+                        string stepcode = dt.Rows[0]["ms_stepcode"].ToString();
+                        string ifrepair = dt.Rows[0]["st_ifrepair"].ToString();
+                        string sncode = dt.Rows[0]["ms_sncode"].ToString();
+                        string ms_prodcode = dt.Rows[0]["ms_prodcode"].ToString();
+                        string ms_craftcode = dt.Rows[0]["ms_craftcode"].ToString();
+                        if (sncode != ms_sncode.Text)
+                        {
+                            OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.Red, ms_sncode);
+                            return;
+                        }
+                        ifrework = dt.Rows[0]["ms_ifrework"].ToString();
+                        if (GoodProduct.Checked)
+                        {
+                            if (ifrework != "0")
+                            {
+                                if (stepcode == User.CurrentStepCode && (reworkstatus == "1" || reworkstatus == "2") && ifrepair == "0")
+                                {
+                                    OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过" + User.CurrentStepName + "工序,采集结果为良品\n", Color.Red, ms_sncode);
+                                    return;
+                                }
+                            }
+                            else
+                            {
+                                if (stepcode == User.CurrentStepCode && (status == "1" || status == "2") && ifrepair == "0")
+                                {
+                                    OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过" + User.CurrentStepName + "工序,采集结果为良品\n", Color.Red, ms_sncode);
+                                    return;
+                                }
+                            }
+                        }
+                        SetCollectResult();
+                    }
+                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                }
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+            }
+        }
+
+        private void bc_groupcode_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            LoadBadCodeListView();
+        }
+
+        /// <summary>
+        /// 填充不良组别信息
+        /// </summary>
+        private void LoadBadGroupData()
+        {
+            //如果ms_makecode的值修改过再去查询
+            sql.Clear();
+            sql.Append("select bg_code||':'||bg_name bg_name,bg_code from badgroup left join (select pb_badgroup,pr_kind ");
+            sql.Append("from product left join productkind on pk_name=pr_kind ");
+            sql.Append("left join productbadgroup on pk_code=PB_KINDCODE where pr_code='" + ma_prodcode.Text + "')");
+            sql.Append("on pb_badgroup=bg_code where bg_statuscode='AUDITED' order by case when bg_code='" + User.DefaultBadGroup + "' then 0 else 1 end");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            bc_groupcode.DisplayMember = "bg_name";
+            bc_groupcode.ValueMember = "bg_code";
+            bc_groupcode.DataSource = dt;
+        }
+
+
+        /// <summary>
+        /// 加载不良代码的ListView的信息
+        /// </summary>
+        private void LoadBadCodeListView()
+        {
+            object bg_code = bc_groupcode.SelectedValue;
+            sql.Clear();
+            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,bc_name,'' bc_remark from badgroupdetail ");
+            sql.Append("left join badgroup on  bg_id=bgd_bgid left join badcode on bgd_badcode=bc_code where ");
+            sql.Append("bg_code='" + (bg_code != null ? bg_code.ToString() : "") + "' and bg_code is not null order by bgd_detno");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BadInfSource.DataSource = dt;
+            //往listview中添加数据
+            WaitRejectList.Items.Clear();
+            WaitRejectList.BeginUpdate();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (!ChoosedList.Contains(dt.Rows[i]["bc_code"].ToString()))
+                {
+                    ListViewItem lvi = new ListViewItem();
+                    //第一列是勾选列,设置列头文本为空
+                    lvi.Text = "";
+                    WaitList.Add(dt.Rows[i]["bc_code"].ToString());
+                    for (int j = 0; j < dt.Columns.Count; j++)
+                        lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                    WaitRejectList.Items.Add(lvi);
+                }
+            }
+            WaitRejectList.EndUpdate();
+        }
+
+        /// <summary>
+        /// 加载已选不良的ListView
+        /// </summary>
+        private void LoadChoosedBadListView()
+        {
+            sql.Clear();
+            sql.Append("select nvl(bg_code,mb_bgcode)||':'||nvl(bg_name,mb_badcode) bg_code,nvl(mb_badcode,bc_code) bc_code,bc_name,mb_badremark from makebad  ");
+            sql.Append("left join badgroup on mb_bgcode=bg_code left join badcode on mb_badcode=bc_code ");
+            sql.Append(" where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and mb_status=0");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            ChoosedRejectList.Items.Clear();
+            ChoosedRejectList.BeginUpdate();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                ListViewItem lvi = new ListViewItem();
+                //第一列是勾选列,设置列头文本为空
+                lvi.Text = "";
+                ChoosedList.Add(dt.Rows[i]["bc_code"].ToString());
+                for (int j = 0; j < dt.Columns.Count; j++)
+                    lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                ChoosedRejectList.Items.Add(lvi);
+            }
+            ChoosedRejectList.EndUpdate();
+        }
+
+        /// <summary>
+        /// 设置良品或者不良品的采集结果
+        /// </summary>
+        private void SetCollectResult()
+        {
+            string ErrorMessage = "";
+            //如果勾选的是不良品
+            if (Reject.Checked)
+            {
+                LoadBadCodeListView();
+                LoadChoosedBadListView();
+                OperateResult.AppendText(">>请采集不良代码\n", Color.Green);
+                bc_code.Focus();
+            }
+            else if (GoodProduct.Checked)
+            {
+                //如果不是返修的
+                if (ifrework == "0")
+                {
+                    dt = (DataTable)dh.ExecuteSql("select mb_id,bc_name,mbr_mbid from makebad left join makebadreason on mbr_mbid=mb_id left join badcode on mb_badcode=bc_code where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and mb_status=0", "select");
+                    for (int i = 0; i < dt.Rows.Count; i++)
+                    {
+                        if (dt.Rows[i]["mb_id"].ToString() != dt.Rows[i]["mbr_mbid"].ToString())
+                            ErrorMessage += "【" + dt.Rows[i]["bc_name"].ToString() + "】";
+                    }
+                    //存在不良记录
+                    if (ErrorMessage != "")
+                    {
+                        OperateResult.AppendText(">>序列号:" + ms_sncode.Text + " 已经判为不良品,不允许修改!\n", Color.Red);
+                        return;
+                    }
+                    else
+                    {
+                        //良品信息采集
+                        if (LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, ms_sncode.Text, "良品采集", "检测合格", User.UserCode, out ErrorMessage))
+                        {
+                            if (IfTest.Checked)
+                            {
+                                dh.ExecuteSql("update makeserial set ms_iftest=-1 where ms_id='" + oMSID + "'", "update");
+                            }
+                            //提示正确返回时传递的信息
+                            if (ErrorMessage.Contains("AFTERSUCCESS"))
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                            LastSncode = ms_sncode.Text;
+                            OperateResult.AppendText(">>" + ms_sncode.Text + "良品采集成功\n", Color.Green, ms_sncode);
+                            //恢复出厂设置
+                            //记录操作日志
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "采集良品", "采集良品成功", LastSncode, ob_checkno.Text);
+                        }
+                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                    }
+                }
+                else
+                {
+                    if (reworkstatus != "3")
+                    {
+                        if (LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, ms_sncode.Text, "良品采集", "检测合格", User.UserCode, out ErrorMessage))
+                        {
+                            //提示正确返回时传递的信息
+                            if (ErrorMessage.Contains("AFTERSUCCESS"))
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                            LastSncode = ms_sncode.Text;
+                            OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为良品\n", Color.Green, ms_sncode);
+                            //记录操作日志
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "采集良品", "采集良品成功", LastSncode, ob_checkno.Text);
+                        }
+                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>返修的不良序列号必须先进行维修\n", Color.Red);
+                    }
+                }
+            }
+            //加载页面信息
+            LoadCollectedNum();
+            LoadCheckQTY();
+        }
+
+        private void 测试采集_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void LoadCollectedNum()
+        {
+            dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty,mcd_ngqty,mcd_okqty,mcd_totalng from make left join makecraftdetail_view on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
+            BaseUtil.SetFormValue(Controls, dt);
+        }
+
+        //重新打印的不良代码
+        List<String> RePrintCode = new List<string>();
+
+        private void Save_Click(object sender, EventArgs e)
+        {
+            if (ms_sncode.Text == "")
+            {
+                OperateResult.AppendText(">>序列号不允许为空\n", Color.Red);
+                return;
+            }
+            if (GoodProduct.Checked)
+                ms_code_KeyDown(sender, new KeyEventArgs(Keys.Enter));
+            else if (Reject.Checked)
+            {
+                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
+                {
+                    //判断界面工单是否为空时的序列号是否自动归属工单
+                    string oStatus = "";
+                    if (!LogicHandler.GetMakeInfo(ms_sncode.Text, out oMakeCode, out oStatus, out ErrorMessage))
+                    {
+                        if (ma_code.Text == "")
+                        {
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                            return;
+                        }
+                    }
+                    if (LogicHandler.CheckStepSNAndMacode(ma_code.Text == "" ? oMakeCode : ma_code.Text, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,nvl(ma_softversion,ms_softversion)ma_softversion,substr(pr_spec,0,50)pr_spec,ma_qty from makeserial left join make on ms_makecode=ma_code left join product on ma_prodcode=pr_code where ms_id='" + oMSID + "'", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            BaseUtil.SetFormValue(this.Controls, dt);
+                            LockMakeCode.Checked = true;
+                        }
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                        return;
+                    }
+                }
+                else
+                {
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                    return;
+                }
+                int RejectCount = ChoosedRejectList.Items.Count;
+                string[] bccode = new string[RejectCount];
+                string[] bcremark = new string[RejectCount];
+                string[] bgcode = new string[RejectCount];
+                string[] bgname = new string[RejectCount];
+                string[] bcname = new string[RejectCount];
+
+                if (ChoosedRejectList.Items.Count == 0)
+                {
+                    OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
+                    return;
+                }
+                else
+                {
+                    for (int i = 0; i < RejectCount; i++)
+                    {
+                        //获取不良代码组
+                        bgcode[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[0];
+                        //获取不良代码组名称
+                        bgname[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[1];
+                        //获取所有的不良代码
+                        bccode[i] = ChoosedRejectList.Items[i].SubItems[2].Text;
+                        //获取不良名称
+                        bcname[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
+                        //获取所有的不良备注
+                        bcremark[i] = bc_remark.Text;
+                    }
+                }
+                string ms_outboxcode = dh.getFieldDataByCondition("makeserial", "ms_outboxcode", "ms_id='" + oMSID + "'").ToString();
+                if (ms_outboxcode != "")
+                {
+                    OperateResult.AppendText(">>" + ms_sncode.Text + "已装箱" + ms_outboxcode + ",请先取消装箱\n", Color.Green);
+                    return;
+                }
+                //如果之前是良品的
+                dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno", "ms_outboxcode" }, "ms_id='" + oMSID + "' and ms_stepcode='" + User.CurrentStepCode + "'");
+                if (dt.Rows.Count > 0)
+                {
+                    string status = dt.Rows[0]["ms_status"].ToString();
+                    ms_outboxcode = dt.Rows[0]["ms_outboxcode"].ToString();
+                    if (ms_outboxcode != "")
+                    {
+                        OperateResult.AppendText(">>" + ms_sncode.Text + "已装箱" + ms_outboxcode + ",请先取消装箱\n", Color.Green);
+                        return;
+                    }
+                    if (status == "1" || status == "2")
+                    {
+                        dh.UpdateByCondition("steppassed", "sp_result='不良品',sp_ifng=-1,sp_ymd=to_char(sysdate,'yyyymmdd'),sp_hm=to_char(sysdate,'hh24miss')", "sp_id=(select max(sp_id) from steppassed where sp_sncode='" + ms_sncode.Text + "')");
+                        dh.UpdateByCondition("makecraftdetail", "mcd_okqty=mcd_okqty-1", "mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                        dh.UpdateByCondition("makeserial", "ms_nextstepcode='',ms_badtimes=nvl(ms_badtimes,0)+1", "ms_id='" + oMSID + "'");
+                        LogicHandler.InsertMakeProcess(ms_sncode.Text, ma_code.Text, User.UserSourceCode, "良品采集成不良", "测试不良", User.UserCode);
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "测试不良", "良品采集成不良", ms_sncode.Text, ob_checkno.Text);
+                    }
+                    string checkno = dt.Rows[0]["ms_checkno"].ToString();
+                    //存在抽检批次更新为空
+                    if (checkno != "")
+                        dh.UpdateByCondition("makeserial", "ms_checkno=''", "ms_id='" + oMSID + "'");
+                }
+                else
+                {
+                    LogicHandler.InsertMakeProcess(ms_sncode.Text, ma_code.Text, User.UserSourceCode, "采集成不良", "测试不良", User.UserCode);
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "采集成不良", "测试不良", ms_sncode.Text, ob_checkno.Text);
+                }
+                //不良信息采集,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, "检查未通过", bgcode, bccode, bgname, bcname, bcremark, out ErrorMessage))
+                {
+                    //存在的不良代码和
+                    dt = (DataTable)dh.ExecuteSql("select sr_badcode from STEPRETURN where sr_stepcode='" + User.CurrentStepCode + "'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        int BadCodeInStep = 0;
+                        string badname = "";
+                        for (int i = 0; i < dt.Rows.Count; i++)
+                        {
+                            for (int j = 0; j < bccode.Length; j++)
+                            {
+                                if (dt.Rows[i]["sr_badcode"].ToString() == bccode[j])
+                                {
+                                    badname += "[" + bcname[j] + "]";
+                                    BadCodeInStep += 1;
+                                }
+                            }
+                        }
+                        //选中的不良代码必须全在工序默认的不良代码中才通过判断
+                        if (BadCodeInStep == bccode.Length)
+                        {
+                            dh.UpdateByCondition("makebad", "mb_status=-1", "mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and mb_stepcode='" + User.CurrentStepCode + "'");
+                            dh.UpdateByCondition("makeserial", "ms_stepcode='',ms_status=1,ms_nextstepcode='" + User.CurrentStepCode + "'", "ms_id='" + oMSID + "'");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "快速维修成功", "快速维修", "", ob_checkno.Text);
+                            OperateResult.AppendText(">>本次采集不良代码" + badname + "存在于本工序" + User.CurrentStepCode + "中,请解除故障后重新测试本站\n", Color.Black);
+                        }
+                        else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                    }
+                    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                    if (IfTest.Checked)
+                    {
+                        dh.ExecuteSql("update makeserial set ms_iftest=-1 where ms_id='" + oMSID + "'", "update");
+                    }
+                    //打印不良代码贴纸
+                    if (EnablePrint && AutoPrintBad.Checked)
+                    {
+                        RePrintCode.Clear();
+                        for (int i = 0; i < bcname.Length; i++)
+                        {
+                            RePrintCode.Add(bcname[i]);
+                            format.SubStrings["SN1"].Value = bcname[i];
+                            format.PrintSetup.PrinterName = Printer.Text;
+                            format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                            format.Print();
+                        }
+                    }
+                    LastSncode = ms_sncode.Text;
+                    //采集完不良,聚焦序列号
+                    ms_sncode.Focus();
+                    //记录操作日志
+                    ms_sncode.Text = "";
+                    //清除不良信息
+                    bc_code.Text = "";
+                    ChoosedRejectList.Items.Clear();
+                    LoadCollectedNum();
+                    WaitList.Clear();
+                    ChoosedList.Clear();
+                }
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+            }
+        }
+
+        private void bc_code_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                sql.Clear();
+                sql.Append("select  bg_code||':'||bg_name bg_code,bc_code,bc_name,'' bc_remark from  badgroupdetail left join ");
+                sql.Append("badgroup on  bg_id=bgd_bgid left join badcode on bgd_badcode = bc_code where bc_code='" + bc_code.Text + "'  and rownum=1 ");
+                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                if (dt.Rows.Count > 0)
+                {
+                    for (int i = 0; i < ChoosedRejectList.Items.Count; i++)
+                    {
+                        if (ChoosedRejectList.Items[i].ListView.Items[i].SubItems[2].Text == bc_code.Text)
+                        {
+                            OperateResult.AppendText(">>已添加过不良代码" + bc_code.Text + "\n", Color.Red, bc_code);
+                            return;
+                        }
+                    }
+                    ListViewItem lvi = new ListViewItem();
+                    lvi.Text = "";
+                    for (int j = 0; j < dt.Columns.Count; j++)
+                        lvi.SubItems.Add(dt.Rows[0][j].ToString());
+                    ChoosedRejectList.Items.Add(lvi);
+                    bc_code.Clear();
+                }
+                else OperateResult.AppendText(">>" + bc_code.Text + "不良代码不存在\n", Color.Red, bc_code);
+            }
+        }
+
+        private void LoadCheckQTY()
+        {
+            sql.Clear();
+            string condition = "";
+            int nowcheckqty = int.Parse(ob_nowcheckqty.Text == "" ? "0" : ob_nowcheckqty.Text);
+            int batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
+            if (nowcheckqty + 1 == batchqty && AutoCut)
+            {
+                condition = "and ob_status='UNCHECK' and ob_checkno='" + ob_checkno.Text + "'";
+            }
+            else
+            {
+                condition = "and ob_status='ENTERING' ";
+            }
+            if (pr_sendchecktype.Text == "SaleCode")
+            {
+                condition += " and ob_salecode='" + ma_salecode.Text + "'";
+            }
+            sql.Append("select ob_batchqty,ob_nowcheckqty,ob_checkno from oqcbatch where ");
+            sql.Append("ob_linecode='" + User.UserLineCode + "' and ob_prodcode='" + ma_prodcode.Text + "' and ");
+            sql.Append("ob_stepcode='" + User.CurrentStepCode + "' " + condition);
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            if (dt.Rows.Count > 0)
+            {
+                ob_sendqty.Text = dh.getFieldDataByCondition("oqcbatch", "sum(ob_nowcheckqty)", "ob_makecode='" + ma_code.Text + "' and  ob_status<>'ENTERING'").ToString();
+                ob_batchqty.Text = dt.Rows[0]["ob_batchqty"].ToString();
+                ob_nowcheckqty.Text = dt.Rows[0]["ob_nowcheckqty"].ToString();
+                ob_checkno.Text = dt.Rows[0]["ob_checkno"].ToString();
+                nowcheckqty = int.Parse(ob_nowcheckqty.Text == "" ? "0" : ob_nowcheckqty.Text);
+                batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
+                if (nowcheckqty == batchqty)
+                {
+                    ob_nowcheckqty.ForeColor = Color.Red;
+                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.Red);
+                    if (AutoCut)
+                    {
+                        OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.Blue);
+                    }
+                }
+            }
+            else
+            {
+                BaseUtil.CleanControlsText(ob_batchqty, ob_nowcheckqty, ob_checkno);
+                SendCheck.Enabled = false;
+            }
+            if (ob_batchqty.Text != "")
+            {
+                SendCheck.Enabled = true;
+            }
+            else
+            {
+                SendCheck.Enabled = false;
+            }
+        }
+
+        private void GoodProduct_CheckedChanged(object sender, EventArgs e)
+        {
+            if (GoodProduct.Checked)
+            {
+                bc_code.Enabled = false;
+                WaitReject.Enabled = false;
+                ChooseedReject.Enabled = false;
+                Save.Visible = false;
+                ReleaseSN.Enabled = false;
+            }
+            else
+            {
+                ReleaseSN.Enabled = true;
+                bc_code.Enabled = true;
+                WaitReject.Enabled = true;
+                ChooseedReject.Enabled = true;
+                Save.Visible = true;
+            }
+            if (ms_sncode.Text == "")
+            {
+                ms_sncode.Focus();
+            }
+        }
+
+        private void SendCheck_Click(object sender, EventArgs e)
+        {
+            sql.Clear();
+            sql.Append("update oqcbatch set ob_status='UNCHECK' where ob_checkno ='" + ob_checkno.Text + "'");
+            dh.ExecuteSql(sql.GetString(), "select");
+            ob_sendqty.Text = dh.getFieldDataByCondition("oqcbatch", "sum(ob_nowcheckqty)", "ob_makecode='" + ma_code.Text + "' and  ob_status<>'ENTERING'").ToString();
+            ob_nowcheckqty.Text = "";
+            ob_batchqty.Text = "";
+            ob_nowcheckqty.ForeColor = Color.Black;
+            SendCheck.Enabled = false;
+            OperateResult.AppendText(">>批次" + ob_checkno.Text + "送检成功\n", Color.Blue);
+            ms_sncode.Focus();
+            LogicHandler.InsertMakeProcess(LastSncode, ma_code.Text, User.UserSourceCode, "手动送检", "手动送检成功", User.UserCode);
+            //记录操作日志
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "手动送检", "手动送检成功", "", ob_checkno.Text);
+            ob_checkno.Text = "";
+        }
+
+        private void ob_checkno_TextChanged(object sender, EventArgs e)
+        {
+            if (ob_checkno.Text != "")
+            {
+                string Cut = dh.getFieldDataByCondition("product left join oqcbatch on ob_prodcode=pr_code", "pr_ifautocutcheckno", "ob_checkno='" + ob_checkno.Text + "'").ToString();
+                if (Cut == "" || Cut == "0")
+                    AutoCut = false;
+                else
+                    AutoCut = true;
+                SendCheck.Enabled = true;
+            }
+        }
+
+        /// <summary>
+        /// 工单变化修改数量
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ma_code_UserControlTextChanged(object sender, EventArgs e)
+        {
+            if (ma_code.Text.Length > 4)
+            {
+                BaseUtil.CleanControlsText(mcd_inqty, mcd_remainqty, ob_batchqty, ob_nowcheckqty, ob_sendqty);
+                LoadCollectedNum();
+                LoadCheckQTY();
+            }
+        }
+
+        private void Make_TestCollection_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            dh.Dispose();
+        }
+
+        private void ma_prodcode_TextChanged(object sender, EventArgs e)
+        {
+            LoadBadGroupData();
+        }
+
+        private void Filter_UserControlTextChanged(object sender, EventArgs e)
+        {
+            try
+            {
+                DataRow[] dr = (BadInfSource.DataSource as DataTable).Select("bc_code like '%" + Filter.Text + "%' or bc_name like '%" + Filter.Text + "%'");
+                DataTable dt = (BadInfSource.DataSource as DataTable).Clone();
+                for (int i = 0; i < dr.Length; i++)
+                {
+                    dt.Rows.Add(dr[i].ItemArray);
+                }
+                WaitRejectList.Items.Clear();
+                WaitRejectList.BeginUpdate();
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    if (!ChoosedList.Contains(dt.Rows[i]["bc_code"].ToString()))
+                    {
+                        ListViewItem lvi = new ListViewItem();
+                        //第一列是勾选列,设置列头文本为空
+                        lvi.Text = "";
+                        WaitList.Add(dt.Rows[i]["bc_code"].ToString());
+                        for (int j = 0; j < dt.Columns.Count; j++)
+                            lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                        WaitRejectList.Items.Add(lvi);
+                    }
+                }
+                WaitRejectList.EndUpdate();
+            }
+            catch (Exception)
+            {
+
+            }
+        }
+
+        private void WaitRejectList_DoubleClick(object sender, EventArgs e)
+        {
+            for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
+            {
+                if (WaitRejectList.Items[i].Checked)
+                {
+                    //双击右移
+                    ChooseedReject.PerformClick();
+                }
+            }
+        }
+
+        private void Make_TestCollection_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Q)
+            {
+                if (!LockSn)
+                {
+                    ControlLockTimer.Start();
+                    LockSn = true;
+                    Lock_label.Visible = true;
+                }
+                else
+                {
+                    ControlLockTimer.Stop();
+                    LockSn = false;
+                    Lock_label.Visible = false;
+                }
+            }
+        }
+
+        private void RePrint_Click(object sender, EventArgs e)
+        {
+            if (EnablePrint && AutoPrintBad.Checked)
+            {
+                string[] bcname = RePrintCode.ToArray();
+                for (int i = 0; i < bcname.Length; i++)
+                {
+                    RePrintCode.Add(bcname[i]);
+                    format.SubStrings["SN1"].Value = bcname[i];
+                    format.PrintSetup.PrinterName = Printer.Text;
+                    format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                    format.Print();
+                }
+            }
+        }
+
+        private void WriteSoftWare_CheckedChanged(object sender, EventArgs e)
+        {
+
+        }
+
+        private void ReleaseSN_Click(object sender, EventArgs e)
+        {
+            Save_Click(sender, e);
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_makecode  from makeserial where ms_id='" + oMSID + "'", "select");
+            if (dt.Rows.Count > 0)
+            {
+                string ms_sncode = dt.Rows[0]["ms_sncode"].ToString();
+                string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
+                dh.ExecuteSql("delete from sninfo where si_sn='" + ms_sncode + "'", "delete");
+                dh.ExecuteSql("delete from makesnrelation where sn='" + ms_sncode + "' and makecode='" + ms_makecode + "'", "delete");
+                dh.ExecuteSql("update makeserial set ms_sncode=ms_firstsn,ms_imei1='',ms_mac='',ms_bt='',ms_netcode='',ms_imei2='',ms_beforesn='' where ms_sncode='" + ms_sncode + "' and ms_makecode='" + ma_code.Text + "'", "update");
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "解绑", "解绑成功", ms_sncode, ob_checkno.Text);
+                OperateResult.AppendText(">>" + ms_sncode + "解绑成功\n", Color.Green);
+            }
+            else
+            {
+                OperateResult.AppendText(">>" + ms_sncode.Text + "没有需要解绑的内容\n", Color.Red);
+            }
+        }
+    }
+}

+ 541 - 0
UAS_MES_YD/FunctionCode/Make/Make_TestCollectionOQC.resx

@@ -0,0 +1,541 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="SendCheck.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="SendCheck.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="SendCheck.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>
+  <metadata name="BadInfSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="ControlLockTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>172, 17</value>
+  </metadata>
+  <data name="Save.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Save.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="Save.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="CleanInfo.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="CleanInfo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
+        DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
+        bGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUis
+        iGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQ
+        sf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJO
+        yhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaI
+        b4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArou
+        S49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0i
+        vQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424
+        HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxR
+        RKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKb
+        F6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQ
+        DtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJE
+        geQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhM
+        gqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgs
+        wkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYr
+        oQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHms
+        AdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8
+        Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQ
+        tJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzy
+        pOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4
+        UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrC
+        WbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o
+        3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0Svo
+        PfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05b
+        RztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAU
+        vdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZv
+        xjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa
+        2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHI
+        dmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Sn
+        t+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z
+        /z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4Rz
+        wzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8Yqpj
+        ZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbj
+        kqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09m
+        SWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvN
+        e70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quF
+        nbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/
+        VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1F
+        DR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TL
+        d1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/E
+        XRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPq
+        RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
+        lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
+        f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDwAACw8BkvkDpQAACfBJREFUeF7t3dtuFFcC
+        heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
+        X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
+        HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
+        ZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSw
+        I4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOA
+        DHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2
+        BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEf5/vsnj6pvqpnqr6oAePDU
+        qppVu49c2+PsWC/8urpZXV0rR8fH5f2HD+XDGH0N4GH47zbVrNpVw2rZNX7voy/qi7+sHvd6C2U0Oi03
+        7z+Um5v35RpAZ6hZtauG1bKaVtvjrd/76Iv6om/7/UG9+PZGV9c3d67L5RWAh06t3nfbHAa1ZTVd2/5m
+        vPV7f/+hvuCr6q8r3UQ3u7wqF9X5xSWAjlG7avi+ZbVd/Ws8fhk/AL5dXl75O/qz84tyenZ+56yMTgE8
+        dGr1vls1fH8YLNW2a+P/eAoYPwAWD4ZH5fT8sozqxSf1Zsejs3J0cgqgY9SuGlbLavrgcKgDYDAev4wf
+        AH+OTmv4o/NyrJscjcqwOhyeAOgYtauG1fJ907Xxs/H4ZfwAqC+sf+Mfn9aLT+qJcVwdlf0DAF2jdtWw
+        WlbTaluN3/d+76MDQC88PDxpbrC7N6wOy7tdAF2jdtWwWlbTarv1ANCJsbc/bG6ws7Nftrb3AHSUGlbL
+        avqwtt16AOzV02Jn96Bs1Qs3t3fLxua7sg6gc9SuGlbLalpttx4AOi10wcbmblnb2Cmr69tlZQ1A16hd
+        NayW1bTabj0AtncObuNf3ykrq1tleWWzLC0D6Bq1q4bVsppW260HwObWbfy6eHFpo7xdXC9v3q4B6Bi1
+        q4bVsppW260HwPr6u3rBVr14owzerJWFwWrpL6wA6Bi1q4bVsppW260HwMrqdnNq6MJef6W87i2X+ddL
+        ADpG7aphtaym1XbrAbBUHxcG9fGht7Bc5l4vllfzb8vs3BsAHaN21bBaVtNqu/UA0PcNenzQhTOv3pSX
+        s4MyPbMAoGPUrhpWy2pabbceAHpceN1bKrOKv95karpfJqd6ADpG7aphtaym1XbrAdAf1L/95xfrhYMy
+        Od0rLyZfl+cT8wA6Ru2qYbWsptV26wHQ6y833z9MvezXG8yXP17Mld+fvwLQMWpXDatlNa22Ww8AvXuo
+        E2Nislf+eD5Xnv3+qjx9NgugY9SuGlbLalpttx4Ac3OLZXp6oTx/MV9vMFt+ezpTfv3tJYCOUbtqWC2r
+        abXdegDMzr2t3zf06yPEXPnt2Uz5pd7o51+nAXSM2lXDallNq+3WA2BmdtC8eaCTQzf46Zep8uPPkwA6
+        Ru2qYbWsptV26wGg7xX0DuLT32eaU0Q3evLTBICOUbtqWC2rabXdegDoBwiev7h9/NcJohv98OMLAB2j
+        dtWwWlbTarv1AJh6udC8c/jr05l6gkzVG02U75+8ANAxalcNq2U1rbbbD4C7NwD1vcOTnyabGz3+4TmA
+        jlG7algtq2m1zQEAhOAAAIJ92gHAewDAZ+GT3gPgXwGAz8Mn/SsAPwcAfB4+6ecA+ElA4POgdtXw//WT
+        gPxfAODzoHbVsFr+n/8vgD44YPrlQn1kqE8Bf7yqN5ht3kQA0C1qVw2rZTWttlsPgPneUvNZYhNTveYD
+        BXSDp/URAkC3qF01rJbVtNpuPQB6CyvlVX1U0DuGE1O3HwemmwDoFrWrhtWymlbbrQfAYLDafHLIzOyb
+        +thw+4GgE5OvAXSM2lXDallNq+3WA+DN4vrtU0D9fqE5BGYGzQ8QAOgWtauG1bKaVtutB8Di8mZZ0EeD
+        95ebC/XOoT5bHEC3qF01rJbVtNpuPQD020TfLq3XC1abC/XGgX6xAIBuUbu38a82Tavt1gNgbf1dWVrZ
+        qo8LG82p0a/fN+jxAUC3qF01rJbVtNpuPQD49eDA5+GTfj349s5B2di8PQT020R18VL93gFAt6hdNayW
+        1bTabj0AdncP6wv3y2a9YH1jp168XVbXAHSN2lXDallN7+4dth8A+wfHd4fAQdna3quPDXvN6QGgW9Su
+        GlbLalpttx4Aw+FJfeFRPS2G5d3uQdl5d9CcHgC6Re2qYbWsptV22wHw59HxqAyPTsrB4XFz0d7+sHl0
+        ANAtalcNq2U1LbXxy/H4ZfwAWNk/GJaT0Vk5Oj6tF4zKYT01dAMA3aJ21bBaVtN7+817AIPx+GX8APhu
+        aXmlnJ1flNHZeXPR8clpOboz1NMBgAftvle1q4bVsppeXGr+M9C34/HL+AHwVfXXxcVVOa/Ozi/L6dlF
+        dV5GpwC6Qs2qXTWsltW02lbj4/HLR1/UF3zX7w/K1fVNuby6LheXt4fBLd3sjm4M4GEYb/OuV7WrhtWy
+        mq5t/+Nvf/noi/qiL6vHvV6/PkKMynW9WDe4uq43qjfTDQE8TGq0abU2q3bVsFpW02p7vPV7/xikvvjr
+        6mZlZbUcHR2Xm/cfxrwH8OD8p1E1q3bVsFp2jd+zo9QLH1XfVHOVbgagG9Ss2n3k2h5nRwAZ7Agggx0B
+        ZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSw
+        I4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOA
+        DHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2
+        BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQ
+        wY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGO
+        ADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy
+        2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="CleanInfo.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="CleanInfo.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="ChooseedReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAslJREFU
+        SEuN1kuojVEYxvHtco77JUUpURQliQxcE+0BMlIkBpJQJmJwBqRMKAZKykSMkJEwUaIwcElIKQzccz2i
+        3HP3f77Wu8679n6d7a3f4Fuf5znZ+9trfbV6vb4bD7vxBPvQF/r3tcZJ65NwFY8R9TzCTcyCZVJDw3Bj
+        LM7jTze+YiPCsrTWEx34iajDXMRoNPXkSTcn4w6iEvMWS2CZ1JA7RJ/mAUR57xiGoOjJYzewEK8RlZgH
+        mI6cs3FrI9Hqk/+NXWhD0VONLSbr8BlRkdFzo68854KeabiPKG/0SGxAzhXjbvTGTvxCVGSOYxiKMrtO
+        luE9orzpxGLkXDHuxiAcRlTi7UUfFGV2jR7YhlYP/j1MRc7m8YsYhQuISsw3bEbO2bi1gTiCKO/pF6m/
+        WfRUY4vJFNxFVGLeYSlyzsatjcEVRHnvKPQtpQY3WnQWodUvUpviTORc0DMbTxHljZ5jPc9tVUHjcMNb
+        j4+Iisw1jEeVsbHrZBU+IMqbT+hI8ebhphmAs4hKvO2oMn5sDf1xBlHW60zRcrjhrUGr/+ENTECVsbHr
+        ZAVabRFfsCXFu4ZFbz5eICowzzEPORf0aDPVaRDlvT1orwpsWPD0jOhUj8JGz8Bq5JyNWxuBc4jy3ilU
+        G3IxWkh08ySisNGvZQd6ocrZ2DXaodeeKO/dQtPX74t0SOpjjMKeTvrBKIrsOtFZqjMuypuX0ORcVKRD
+        slXRZWhT7Cph7DqZg2eI8kYP9lrkXFS0AP+zWc5Aztm4NR0ZlxDljV5f9Narl4CixxdNxG1EBUY/6eXI
+        ORu31g+HEOU9vWkMRdFTTVocjtOIwuYHtkKnf1Fk18kmfEfUYa5jHHKuGBa0Y+9HFPYOQrtyU4mtQW+v
+        bxDljc7Auci5pmFxJbSx6VegjbLRK+j1Nr/si5+0pm3kBPTiFvWIHvx/v21WU6v9BRMV4fPlTpe/AAAA
+        AElFTkSuQmCC
+</value>
+  </data>
+  <data name="WaitReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAs1JREFU
+        SEuN10uoTVEcx3HvV3nkEUPlFVKUDBDliGImiZQkiYkBGSgZGEiiyIASRgp5JVIGhlLkmTJC5K2833l8
+        f9v6rbP2PX+d+6/PYP3X/f3v7Zy91963S1SNRqM0EVfwCA8CD3EbM1FlynIP3bEN/5sj2jucovViwwbj
+        DP60sQu9UOVcXidL8Q5R3u5gSoo3i6b1xG5E4dIFDEGVc3mdTIc+hShvzzEXaUIqNQpr8RXRALuPSagy
+        ZbmHkbiKKG9fsAb1OW4k8/AS0QDTV7EIOecqegNxHFHefmMn9M0053iRTMBdRAPsF7aiK5qDKK/RA9uh
+        XxrNsFMYhNqcctBQ6BqJwqUTGIDaIK+TVfiMKG/XMQo513FQb+xDFC7dwhjUBpVrzMEzRHl7glnIuVxF
+        cz2+IxpgrzEfLYOK3jjcRJS3T1iBljlVpeZCvEE0wH5gA1oGFT0dDecQ5U3Xow5RHaa1ObloTsM9RANK
+        h9AXLYNST3t7EWVLR9Ef8R+kYuMkonBJx8Nk+A9I6X+VerPxAVHeXmEqwjm52NApqudONMT0ke9By6NE
+        lXq6G48gypuOh/0IP/FcaXMx3iIaZN+wDs6kCXmGjMAlRHn7ic3ohtqcXGlDh+BG6GKOBtkLVM8nK2aY
+        3ir0YI3y9h7LkXO1KjY6e07pdh+L2sByDZ1TTxHlTeeUrsOcy1U2oVv6LKIhpdNoeTR4negc+ogobzeg
+        cy3ncpVNjMY1RENMF+wO6PlWG+Y1dM1sga6haIbpsTYMOZurbGIG2r3/6Lm2EjnnKnr9cBBRvnQA8R3p
+        ZrIE7d4UdV3k12BxFb3huIgob74jq7eOllIz0Q9sQrs7Ui9wepGrci6vk/HQgzzKm+7IZUgTOpQ2kj7o
+        zB15DHqhq3IurxPdaY8R5U37C1K8XmyU9PGfh25xfV0R/UeTz52y3EtWQ9dqNEP4HY3LfwGra+NvPdw7
+        fgAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="RePrint.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="RePrint.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
+        DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
+        bGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUis
+        iGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQ
+        sf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJO
+        yhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaI
+        b4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArou
+        S49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0i
+        vQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424
+        HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxR
+        RKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKb
+        F6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQ
+        DtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJE
+        geQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhM
+        gqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgs
+        wkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYr
+        oQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHms
+        AdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8
+        Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQ
+        tJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzy
+        pOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4
+        UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrC
+        WbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o
+        3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0Svo
+        PfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05b
+        RztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAU
+        vdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZv
+        xjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa
+        2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHI
+        dmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Sn
+        t+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z
+        /z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4Rz
+        wzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8Yqpj
+        ZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbj
+        kqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09m
+        SWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvN
+        e70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quF
+        nbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/
+        VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1F
+        DR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TL
+        d1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/E
+        XRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPq
+        RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
+        lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
+        f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDwAACw8BkvkDpQAACfBJREFUeF7t3dtuFFcC
+        heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
+        X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
+        HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
+        ZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSw
+        I4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOA
+        DHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2
+        BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEf5/vsnj6pvqpnqr6oAePDU
+        qppVu49c2+PsWC/8urpZXV0rR8fH5f2HD+XDGH0N4GH47zbVrNpVw2rZNX7voy/qi7+sHvd6C2U0Oi03
+        7z+Um5v35RpAZ6hZtauG1bKaVtvjrd/76Iv6om/7/UG9+PZGV9c3d67L5RWAh06t3nfbHAa1ZTVd2/5m
+        vPV7f/+hvuCr6q8r3UQ3u7wqF9X5xSWAjlG7avi+ZbVd/Ws8fhk/AL5dXl75O/qz84tyenZ+56yMTgE8
+        dGr1vls1fH8YLNW2a+P/eAoYPwAWD4ZH5fT8sozqxSf1Zsejs3J0cgqgY9SuGlbLavrgcKgDYDAev4wf
+        AH+OTmv4o/NyrJscjcqwOhyeAOgYtauG1fJ907Xxs/H4ZfwAqC+sf+Mfn9aLT+qJcVwdlf0DAF2jdtWw
+        WlbTaluN3/d+76MDQC88PDxpbrC7N6wOy7tdAF2jdtWwWlbTarv1ANCJsbc/bG6ws7Nftrb3AHSUGlbL
+        avqwtt16AOzV02Jn96Bs1Qs3t3fLxua7sg6gc9SuGlbLalpttx4AOi10wcbmblnb2Cmr69tlZQ1A16hd
+        NayW1bTabj0AtncObuNf3ykrq1tleWWzLC0D6Bq1q4bVsppW260HwObWbfy6eHFpo7xdXC9v3q4B6Bi1
+        q4bVsppW260HwPr6u3rBVr14owzerJWFwWrpL6wA6Bi1q4bVsppW260HwMrqdnNq6MJef6W87i2X+ddL
+        ADpG7aphtaym1XbrAbBUHxcG9fGht7Bc5l4vllfzb8vs3BsAHaN21bBaVtNqu/UA0PcNenzQhTOv3pSX
+        s4MyPbMAoGPUrhpWy2pabbceAHpceN1bKrOKv95karpfJqd6ADpG7aphtaym1XbrAdAf1L/95xfrhYMy
+        Od0rLyZfl+cT8wA6Ru2qYbWsptV26wHQ6y833z9MvezXG8yXP17Mld+fvwLQMWpXDatlNa22Ww8AvXuo
+        E2Nislf+eD5Xnv3+qjx9NgugY9SuGlbLalpttx4Ac3OLZXp6oTx/MV9vMFt+ezpTfv3tJYCOUbtqWC2r
+        abXdegDMzr2t3zf06yPEXPnt2Uz5pd7o51+nAXSM2lXDallNq+3WA2BmdtC8eaCTQzf46Zep8uPPkwA6
+        Ru2qYbWsptV26wGg7xX0DuLT32eaU0Q3evLTBICOUbtqWC2rabXdegDoBwiev7h9/NcJohv98OMLAB2j
+        dtWwWlbTarv1AJh6udC8c/jr05l6gkzVG02U75+8ANAxalcNq2U1rbbbD4C7NwD1vcOTnyabGz3+4TmA
+        jlG7algtq2m1zQEAhOAAAIJ92gHAewDAZ+GT3gPgXwGAz8Mn/SsAPwcAfB4+6ecA+ElA4POgdtXw//WT
+        gPxfAODzoHbVsFr+n/8vgD44YPrlQn1kqE8Bf7yqN5ht3kQA0C1qVw2rZTWttlsPgPneUvNZYhNTveYD
+        BXSDp/URAkC3qF01rJbVtNpuPQB6CyvlVX1U0DuGE1O3HwemmwDoFrWrhtWymlbbrQfAYLDafHLIzOyb
+        +thw+4GgE5OvAXSM2lXDallNq+3WA+DN4vrtU0D9fqE5BGYGzQ8QAOgWtauG1bKaVtutB8Di8mZZ0EeD
+        95ebC/XOoT5bHEC3qF01rJbVtNpuPQD020TfLq3XC1abC/XGgX6xAIBuUbu38a82Tavt1gNgbf1dWVrZ
+        qo8LG82p0a/fN+jxAUC3qF01rJbVtNpuPQD49eDA5+GTfj349s5B2di8PQT020R18VL93gFAt6hdNayW
+        1bTabj0AdncP6wv3y2a9YH1jp168XVbXAHSN2lXDallN7+4dth8A+wfHd4fAQdna3quPDXvN6QGgW9Su
+        GlbLalpttx4Aw+FJfeFRPS2G5d3uQdl5d9CcHgC6Re2qYbWsptV22wHw59HxqAyPTsrB4XFz0d7+sHl0
+        ANAtalcNq2U1LbXxy/H4ZfwAWNk/GJaT0Vk5Oj6tF4zKYT01dAMA3aJ21bBaVtN7+817AIPx+GX8APhu
+        aXmlnJ1flNHZeXPR8clpOboz1NMBgAftvle1q4bVsppeXGr+M9C34/HL+AHwVfXXxcVVOa/Ozi/L6dlF
+        dV5GpwC6Qs2qXTWsltW02lbj4/HLR1/UF3zX7w/K1fVNuby6LheXt4fBLd3sjm4M4GEYb/OuV7WrhtWy
+        mq5t/+Nvf/noi/qiL6vHvV6/PkKMynW9WDe4uq43qjfTDQE8TGq0abU2q3bVsFpW02p7vPV7/xikvvjr
+        6mZlZbUcHR2Xm/cfxrwH8OD8p1E1q3bVsFp2jd+zo9QLH1XfVHOVbgagG9Ss2n3k2h5nRwAZ7Agggx0B
+        ZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSw
+        I4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOA
+        DHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2
+        BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQ
+        wY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGO
+        ADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy
+        2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="RePrint.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="RePrint.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="ReleaseSN.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="ReleaseSN.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="ReleaseSN.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>

+ 146 - 117
UAS_MES_YD/FunctionCode/Packing/Packing_CartonBoxWeigh.Designer.cs

@@ -89,9 +89,10 @@
             // 
             this.ma_code_label.AutoSize = true;
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(31, 334);
+            this.ma_code_label.Location = new System.Drawing.Point(62, 668);
+            this.ma_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ma_code_label.Name = "ma_code_label";
-            this.ma_code_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_code_label.Size = new System.Drawing.Size(182, 52);
             this.ma_code_label.TabIndex = 97;
             this.ma_code_label.Text = "制造单号";
             // 
@@ -105,19 +106,20 @@
             this.panel6.Controls.Add(this.ob_batchqty);
             this.panel6.Controls.Add(this.ob_nowcheckqty_label);
             this.panel6.Controls.Add(this.ob_batchqty_label);
-            this.panel6.Location = new System.Drawing.Point(422, 76);
-            this.panel6.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.panel6.Location = new System.Drawing.Point(844, 152);
+            this.panel6.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.panel6.Name = "panel6";
-            this.panel6.Size = new System.Drawing.Size(403, 124);
+            this.panel6.Size = new System.Drawing.Size(804, 246);
             this.panel6.TabIndex = 90;
             // 
             // label3
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.label3.Location = new System.Drawing.Point(28, 68);
+            this.label3.Location = new System.Drawing.Point(56, 136);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(82, 24);
+            this.label3.Size = new System.Drawing.Size(160, 46);
             this.label3.TabIndex = 184;
             this.label3.Text = "当前批号";
             // 
@@ -125,9 +127,10 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_checkno.Location = new System.Drawing.Point(126, 68);
+            this.ob_checkno.Location = new System.Drawing.Point(252, 136);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_checkno.Name = "ob_checkno";
-            this.ob_checkno.Size = new System.Drawing.Size(0, 24);
+            this.ob_checkno.Size = new System.Drawing.Size(0, 46);
             this.ob_checkno.TabIndex = 184;
             this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
             // 
@@ -140,13 +143,13 @@
             this.SendCheck.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.SendCheck.Image = null;
             this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(310, 88);
-            this.SendCheck.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.SendCheck.Location = new System.Drawing.Point(620, 176);
+            this.SendCheck.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             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(56, 24);
+            this.SendCheck.Size = new System.Drawing.Size(112, 48);
             this.SendCheck.TabIndex = 183;
             this.SendCheck.Tag = "ifread";
             this.SendCheck.Text = "送检";
@@ -157,27 +160,30 @@
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(312, 22);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(624, 44);
+            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 24);
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 46);
             this.ob_nowcheckqty.TabIndex = 182;
             // 
             // ob_batchqty
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_batchqty.Location = new System.Drawing.Point(125, 22);
+            this.ob_batchqty.Location = new System.Drawing.Point(250, 44);
+            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty.Name = "ob_batchqty";
-            this.ob_batchqty.Size = new System.Drawing.Size(0, 24);
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 46);
             this.ob_batchqty.TabIndex = 181;
             // 
             // ob_nowcheckqty_label
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(220, 22);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(440, 44);
+            this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
-            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(82, 24);
+            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(160, 46);
             this.ob_nowcheckqty_label.TabIndex = 180;
             this.ob_nowcheckqty_label.Text = "当前批数";
             // 
@@ -185,9 +191,10 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 13F);
-            this.ob_batchqty_label.Location = new System.Drawing.Point(28, 22);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(56, 44);
+            this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
-            this.ob_batchqty_label.Size = new System.Drawing.Size(82, 24);
+            this.ob_batchqty_label.Size = new System.Drawing.Size(160, 46);
             this.ob_batchqty_label.TabIndex = 179;
             this.ob_batchqty_label.Text = "标准批数";
             // 
@@ -195,9 +202,10 @@
             // 
             this.pr_cartongw_label.AutoSize = true;
             this.pr_cartongw_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_cartongw_label.Location = new System.Drawing.Point(31, 226);
+            this.pr_cartongw_label.Location = new System.Drawing.Point(62, 452);
+            this.pr_cartongw_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_cartongw_label.Name = "pr_cartongw_label";
-            this.pr_cartongw_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_cartongw_label.Size = new System.Drawing.Size(182, 52);
             this.pr_cartongw_label.TabIndex = 42;
             this.pr_cartongw_label.Text = "标准重量";
             // 
@@ -205,9 +213,10 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(31, 278);
+            this.pr_code_label.Location = new System.Drawing.Point(62, 556);
+            this.pr_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_code_label.Size = new System.Drawing.Size(182, 52);
             this.pr_code_label.TabIndex = 40;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -217,10 +226,10 @@
             this.panel4.Controls.Add(this.pr_cartonunit);
             this.panel4.Controls.Add(this.weight_label);
             this.panel4.Controls.Add(this.weight);
-            this.panel4.Location = new System.Drawing.Point(26, 76);
-            this.panel4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.panel4.Location = new System.Drawing.Point(52, 152);
+            this.panel4.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.panel4.Name = "panel4";
-            this.panel4.Size = new System.Drawing.Size(372, 124);
+            this.panel4.Size = new System.Drawing.Size(742, 246);
             this.panel4.TabIndex = 91;
             // 
             // pr_cartonunit
@@ -229,9 +238,10 @@
             this.pr_cartonunit.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.pr_cartonunit.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_cartonunit.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.pr_cartonunit.Location = new System.Drawing.Point(15, 86);
+            this.pr_cartonunit.Location = new System.Drawing.Point(30, 172);
+            this.pr_cartonunit.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_cartonunit.Name = "pr_cartonunit";
-            this.pr_cartonunit.Size = new System.Drawing.Size(31, 25);
+            this.pr_cartonunit.Size = new System.Drawing.Size(60, 50);
             this.pr_cartonunit.TabIndex = 42;
             this.pr_cartonunit.Text = "克";
             this.pr_cartonunit.Visible = false;
@@ -242,9 +252,10 @@
             this.weight_label.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.weight_label.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.weight_label.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.weight_label.Location = new System.Drawing.Point(15, 50);
+            this.weight_label.Location = new System.Drawing.Point(30, 100);
+            this.weight_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.weight_label.Name = "weight_label";
-            this.weight_label.Size = new System.Drawing.Size(50, 25);
+            this.weight_label.Size = new System.Drawing.Size(98, 50);
             this.weight_label.TabIndex = 20;
             this.weight_label.Text = "重量";
             // 
@@ -256,18 +267,20 @@
             this.weight.AutoSize = true;
             this.weight.Font = new System.Drawing.Font("微软雅黑", 35F);
             this.weight.ForeColor = System.Drawing.Color.Green;
-            this.weight.Location = new System.Drawing.Point(76, 30);
+            this.weight.Location = new System.Drawing.Point(152, 60);
+            this.weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.weight.Name = "weight";
-            this.weight.Size = new System.Drawing.Size(0, 60);
+            this.weight.Size = new System.Drawing.Size(0, 121);
             this.weight.TabIndex = 41;
             // 
             // label15
             // 
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label15.Location = new System.Drawing.Point(26, 24);
+            this.label15.Location = new System.Drawing.Point(52, 48);
+            this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label15.Name = "label15";
-            this.label15.Size = new System.Drawing.Size(62, 31);
+            this.label15.Size = new System.Drawing.Size(123, 62);
             this.label15.TabIndex = 85;
             this.label15.Text = "箱号";
             // 
@@ -275,9 +288,10 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(31, 384);
+            this.pr_detail_label.Location = new System.Drawing.Point(62, 768);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(182, 52);
             this.pr_detail_label.TabIndex = 82;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -285,9 +299,10 @@
             // 
             this.ma_qty_label.AutoSize = true;
             this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty_label.Location = new System.Drawing.Point(31, 486);
+            this.ma_qty_label.Location = new System.Drawing.Point(62, 972);
+            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ma_qty_label.Name = "ma_qty_label";
-            this.ma_qty_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_qty_label.Size = new System.Drawing.Size(182, 52);
             this.ma_qty_label.TabIndex = 84;
             this.ma_qty_label.Text = "工单数量";
             // 
@@ -295,9 +310,10 @@
             // 
             this.ma_salecode_label.AutoSize = true;
             this.ma_salecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_salecode_label.Location = new System.Drawing.Point(31, 438);
+            this.ma_salecode_label.Location = new System.Drawing.Point(62, 876);
+            this.ma_salecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ma_salecode_label.Name = "ma_salecode_label";
-            this.ma_salecode_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_salecode_label.Size = new System.Drawing.Size(182, 52);
             this.ma_salecode_label.TabIndex = 83;
             this.ma_salecode_label.Text = "订单编号";
             // 
@@ -305,10 +321,10 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(936, 146);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.PrintLabel.Location = new System.Drawing.Point(1872, 292);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(121, 20);
+            this.PrintLabel.Size = new System.Drawing.Size(238, 32);
             this.PrintLabel.TabIndex = 157;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -316,9 +332,10 @@
             // 
             this.Printer_label.AutoSize = true;
             this.Printer_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Printer_label.Location = new System.Drawing.Point(835, 110);
+            this.Printer_label.Location = new System.Drawing.Point(1670, 220);
+            this.Printer_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.Printer_label.Name = "Printer_label";
-            this.Printer_label.Size = new System.Drawing.Size(84, 20);
+            this.Printer_label.Size = new System.Drawing.Size(162, 38);
             this.Printer_label.TabIndex = 159;
             this.Printer_label.Text = "打印机列表";
             // 
@@ -326,9 +343,10 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(835, 146);
+            this.label1.Location = new System.Drawing.Point(1670, 292);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(69, 20);
+            this.label1.Size = new System.Drawing.Size(133, 38);
             this.label1.TabIndex = 161;
             this.label1.Text = "打印标签";
             // 
@@ -336,9 +354,10 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(835, 78);
+            this.label2.Location = new System.Drawing.Point(1670, 156);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(69, 20);
+            this.label2.Size = new System.Drawing.Size(133, 38);
             this.label2.TabIndex = 171;
             this.label2.Text = "打印张数";
             // 
@@ -350,10 +369,11 @@
             this.columnHeader3,
             this.columnHeader4});
             this.WeighRecord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.WeighRecord.Location = new System.Drawing.Point(422, 214);
-            this.WeighRecord.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.WeighRecord.HideSelection = false;
+            this.WeighRecord.Location = new System.Drawing.Point(844, 428);
+            this.WeighRecord.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.WeighRecord.Name = "WeighRecord";
-            this.WeighRecord.Size = new System.Drawing.Size(404, 302);
+            this.WeighRecord.Size = new System.Drawing.Size(804, 600);
             this.WeighRecord.TabIndex = 174;
             this.WeighRecord.UseCompatibleStateImageBehavior = false;
             this.WeighRecord.View = System.Windows.Forms.View.Details;
@@ -381,9 +401,10 @@
             // pr_sendchecktype
             // 
             this.pr_sendchecktype.AutoSize = true;
-            this.pr_sendchecktype.Location = new System.Drawing.Point(620, 540);
+            this.pr_sendchecktype.Location = new System.Drawing.Point(1240, 1080);
+            this.pr_sendchecktype.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_sendchecktype.Name = "pr_sendchecktype";
-            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 12);
+            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 24);
             this.pr_sendchecktype.TabIndex = 187;
             this.pr_sendchecktype.Visible = false;
             // 
@@ -394,13 +415,13 @@
             this.RefreshWeigh.DownImage = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.DownImage")));
             this.RefreshWeigh.Image = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.Image")));
             this.RefreshWeigh.IsShowBorder = true;
-            this.RefreshWeigh.Location = new System.Drawing.Point(334, 226);
-            this.RefreshWeigh.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.RefreshWeigh.Location = new System.Drawing.Point(668, 452);
+            this.RefreshWeigh.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.RefreshWeigh.MoveImage = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.MoveImage")));
             this.RefreshWeigh.Name = "RefreshWeigh";
             this.RefreshWeigh.NormalImage = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.NormalImage")));
             this.RefreshWeigh.Power = null;
-            this.RefreshWeigh.Size = new System.Drawing.Size(60, 24);
+            this.RefreshWeigh.Size = new System.Drawing.Size(120, 48);
             this.RefreshWeigh.TabIndex = 186;
             this.RefreshWeigh.Text = "刷新重量";
             this.RefreshWeigh.UseVisualStyleBackColor = true;
@@ -412,11 +433,11 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(936, 78);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.PrintNum.Location = new System.Drawing.Point(1872, 156);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(93, 21);
+            this.PrintNum.Size = new System.Drawing.Size(182, 35);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -425,20 +446,21 @@
             // AutoPrint
             // 
             this.AutoPrint.Checked = false;
-            this.AutoPrint.Location = new System.Drawing.Point(838, 38);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.AutoPrint.Location = new System.Drawing.Point(1676, 76);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(88, 28);
+            this.AutoPrint.Size = new System.Drawing.Size(176, 56);
             this.AutoPrint.TabIndex = 175;
             // 
             // ComList
             // 
             this.ComList.AutoSize = true;
             this.ComList.CutLength = null;
-            this.ComList.Location = new System.Drawing.Point(938, 54);
-            this.ComList.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ComList.Location = new System.Drawing.Point(1876, 108);
+            this.ComList.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ComList.MaximumSize = new System.Drawing.Size(300, 0);
             this.ComList.Name = "ComList";
-            this.ComList.Size = new System.Drawing.Size(47, 12);
+            this.ComList.Size = new System.Drawing.Size(94, 24);
             this.ComList.TabIndex = 173;
             this.ComList.Text = "ComList";
             this.ComList.Visible = false;
@@ -447,10 +469,11 @@
             // 
             this.BaudRate.AutoSize = true;
             this.BaudRate.CutLength = null;
-            this.BaudRate.Location = new System.Drawing.Point(938, 38);
-            this.BaudRate.MaximumSize = new System.Drawing.Size(150, 0);
+            this.BaudRate.Location = new System.Drawing.Point(1876, 76);
+            this.BaudRate.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.BaudRate.MaximumSize = new System.Drawing.Size(300, 0);
             this.BaudRate.Name = "BaudRate";
-            this.BaudRate.Size = new System.Drawing.Size(53, 12);
+            this.BaudRate.Size = new System.Drawing.Size(106, 24);
             this.BaudRate.TabIndex = 172;
             this.BaudRate.Text = "BaudRate";
             this.BaudRate.Visible = false;
@@ -460,10 +483,11 @@
             this.pr_cartongw.AutoSize = true;
             this.pr_cartongw.CutLength = null;
             this.pr_cartongw.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_cartongw.Location = new System.Drawing.Point(141, 226);
-            this.pr_cartongw.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_cartongw.Location = new System.Drawing.Point(282, 452);
+            this.pr_cartongw.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_cartongw.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_cartongw.Name = "pr_cartongw";
-            this.pr_cartongw.Size = new System.Drawing.Size(0, 27);
+            this.pr_cartongw.Size = new System.Drawing.Size(0, 52);
             this.pr_cartongw.TabIndex = 80;
             this.pr_cartongw.Tag = "1";
             // 
@@ -472,20 +496,21 @@
             this.pr_code.AutoSize = true;
             this.pr_code.CutLength = null;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(141, 278);
-            this.pr_code.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_code.Location = new System.Drawing.Point(282, 556);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_code.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_code.Name = "pr_code";
-            this.pr_code.Size = new System.Drawing.Size(0, 27);
+            this.pr_code.Size = new System.Drawing.Size(0, 52);
             this.pr_code.TabIndex = 79;
             this.pr_code.Tag = "1";
             this.pr_code.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(936, 110);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrinterList.Location = new System.Drawing.Point(1872, 220);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(120, 22);
+            this.PrinterList.Size = new System.Drawing.Size(240, 44);
             this.PrinterList.TabIndex = 158;
             // 
             // StartWeight
@@ -495,13 +520,13 @@
             this.StartWeight.DownImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.DownImage")));
             this.StartWeight.Image = ((System.Drawing.Image)(resources.GetObject("StartWeight.Image")));
             this.StartWeight.IsShowBorder = true;
-            this.StartWeight.Location = new System.Drawing.Point(620, 24);
-            this.StartWeight.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.StartWeight.Location = new System.Drawing.Point(1240, 48);
+            this.StartWeight.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.StartWeight.MoveImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.MoveImage")));
             this.StartWeight.Name = "StartWeight";
             this.StartWeight.NormalImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.NormalImage")));
             this.StartWeight.Power = null;
-            this.StartWeight.Size = new System.Drawing.Size(60, 24);
+            this.StartWeight.Size = new System.Drawing.Size(120, 48);
             this.StartWeight.TabIndex = 156;
             this.StartWeight.Text = "开始称量";
             this.StartWeight.UseVisualStyleBackColor = true;
@@ -514,13 +539,13 @@
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(936, 178);
-            this.Confirm.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Confirm.Location = new System.Drawing.Point(1872, 356);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.Power = null;
-            this.Confirm.Size = new System.Drawing.Size(44, 22);
+            this.Confirm.Size = new System.Drawing.Size(88, 44);
             this.Confirm.TabIndex = 152;
             this.Confirm.Text = "打印";
             this.Confirm.UseVisualStyleBackColor = true;
@@ -533,13 +558,13 @@
             this.StopWeight.DownImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.DownImage")));
             this.StopWeight.Image = ((System.Drawing.Image)(resources.GetObject("StopWeight.Image")));
             this.StopWeight.IsShowBorder = true;
-            this.StopWeight.Location = new System.Drawing.Point(716, 24);
-            this.StopWeight.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.StopWeight.Location = new System.Drawing.Point(1432, 48);
+            this.StopWeight.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.StopWeight.MoveImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.MoveImage")));
             this.StopWeight.Name = "StopWeight";
             this.StopWeight.NormalImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.NormalImage")));
             this.StopWeight.Power = null;
-            this.StopWeight.Size = new System.Drawing.Size(60, 24);
+            this.StopWeight.Size = new System.Drawing.Size(120, 48);
             this.StopWeight.TabIndex = 102;
             this.StopWeight.Text = "停止称量";
             this.StopWeight.UseVisualStyleBackColor = true;
@@ -550,10 +575,11 @@
             this.ma_code.AutoSize = true;
             this.ma_code.CutLength = null;
             this.ma_code.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code.Location = new System.Drawing.Point(141, 334);
-            this.ma_code.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ma_code.Location = new System.Drawing.Point(282, 668);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_code.MaximumSize = new System.Drawing.Size(300, 0);
             this.ma_code.Name = "ma_code";
-            this.ma_code.Size = new System.Drawing.Size(0, 27);
+            this.ma_code.Size = new System.Drawing.Size(0, 52);
             this.ma_code.TabIndex = 101;
             this.ma_code.Tag = "1";
             // 
@@ -562,10 +588,11 @@
             this.ma_qty.AutoSize = true;
             this.ma_qty.CutLength = null;
             this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty.Location = new System.Drawing.Point(141, 486);
-            this.ma_qty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ma_qty.Location = new System.Drawing.Point(282, 972);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_qty.MaximumSize = new System.Drawing.Size(300, 0);
             this.ma_qty.Name = "ma_qty";
-            this.ma_qty.Size = new System.Drawing.Size(0, 27);
+            this.ma_qty.Size = new System.Drawing.Size(0, 52);
             this.ma_qty.TabIndex = 100;
             // 
             // pr_detail
@@ -573,10 +600,11 @@
             this.pr_detail.AutoSize = true;
             this.pr_detail.CutLength = null;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(141, 384);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_detail.Location = new System.Drawing.Point(282, 768);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 27);
+            this.pr_detail.Size = new System.Drawing.Size(0, 52);
             this.pr_detail.TabIndex = 99;
             // 
             // ma_salecode
@@ -584,10 +612,11 @@
             this.ma_salecode.AutoSize = true;
             this.ma_salecode.CutLength = null;
             this.ma_salecode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_salecode.Location = new System.Drawing.Point(141, 438);
-            this.ma_salecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ma_salecode.Location = new System.Drawing.Point(282, 876);
+            this.ma_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_salecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ma_salecode.Name = "ma_salecode";
-            this.ma_salecode.Size = new System.Drawing.Size(0, 27);
+            this.ma_salecode.Size = new System.Drawing.Size(0, 52);
             this.ma_salecode.TabIndex = 98;
             // 
             // Clean
@@ -597,13 +626,13 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(927, 530);
-            this.Clean.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Clean.Location = new System.Drawing.Point(1854, 1060);
+            this.Clean.Margin = new System.Windows.Forms.Padding(6, 4, 6, 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(75, 24);
+            this.Clean.Size = new System.Drawing.Size(150, 48);
             this.Clean.TabIndex = 89;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -615,8 +644,8 @@
             this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
             this.normalButton1.Image = ((System.Drawing.Image)(resources.GetObject("normalButton1.Image")));
             this.normalButton1.IsShowBorder = true;
-            this.normalButton1.Location = new System.Drawing.Point(26, 54);
-            this.normalButton1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.normalButton1.Location = new System.Drawing.Point(52, 108);
+            this.normalButton1.Margin = new System.Windows.Forms.Padding(6, 4, 6, 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")));
@@ -632,11 +661,11 @@
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(94, 22);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.outboxcode.Location = new System.Drawing.Point(188, 44);
+            this.outboxcode.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = null;
-            this.outboxcode.Size = new System.Drawing.Size(494, 39);
+            this.outboxcode.Size = new System.Drawing.Size(984, 71);
             this.outboxcode.Str = null;
             this.outboxcode.Str1 = null;
             this.outboxcode.Str2 = null;
@@ -646,10 +675,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(835, 214);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.OperateResult.Location = new System.Drawing.Point(1670, 428);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(224, 302);
+            this.OperateResult.Size = new System.Drawing.Size(444, 600);
             this.OperateResult.TabIndex = 87;
             this.OperateResult.Text = "";
             // 
@@ -661,19 +690,19 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(838, 178);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Location = new System.Drawing.Point(1676, 356);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(80, 22);
+            this.StepCount.Size = new System.Drawing.Size(160, 44);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 188;
             // 
             // Packing_CartonBoxWeigh
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(969, 560);
+            this.ClientSize = new System.Drawing.Size(1938, 1120);
             this.Controls.Add(this.StepCount);
             this.Controls.Add(this.pr_sendchecktype);
             this.Controls.Add(this.RefreshWeigh);
@@ -710,7 +739,7 @@
             this.Controls.Add(this.ma_salecode_label);
             this.Controls.Add(this.OperateResult);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
             this.Name = "Packing_CartonBoxWeigh";
             this.Tag = "Packing!CartonBoxWeigh";
             this.Text = "卡通箱称重";

+ 1 - 1
UAS_MES_YD/FunctionCode/Packing/Packing_CartonBoxWeigh.cs

@@ -160,6 +160,7 @@ namespace UAS_MES_NEW.Packing
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "卡通箱" + outboxcode.Text + "称重", "称量完成:" + weight.Text.Trim(), outboxcode.Text, "");
                         LogicHandler.RecordProdWeight(outboxcode.Text, "CARTON", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
                     }
+                    dh.UpdateByCondition("package", "pa_printcount= nvl(pa_printcount,0)+1,pa_weight='" + ActualWeight + "',pa_status=1,pa_packageqty=pa_currentqty,pa_totalqty=pa_currentqty", "pa_outboxcode='" + outboxcode.Text + "'");
                     if (AutoPrint.Checked)
                     {
                         if (PrintLabel.Items.Count > 0)
@@ -191,7 +192,6 @@ namespace UAS_MES_NEW.Packing
                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, outboxcode);
                         return;
                     }
-                    dh.UpdateByCondition("package", "pa_printcount= nvl(pa_printcount,0)+1,pa_weight='" + ActualWeight + "',pa_status=1,pa_packageqty=pa_currentqty,pa_totalqty=pa_currentqty", "pa_outboxcode='" + outboxcode.Text + "'");
                     dh.UpdateByCondition("package", "pa_nextstep='" + dh.getFieldDataByCondition("packagedetail left join makeserial on ms_sncode=pd_barcode and ms_makecode=pd_makecode", "max(ms_nextstepcode)", "pd_outboxcode='" + outboxcode.Text + "'").ToString() + "' ,PA_CURRENTSTEP = '' ", "pa_outboxcode='" + outboxcode.Text + "'");
                     LoadCheckQTY();
                     outboxcode.Clear();

+ 6 - 6
UAS_MES_YD/FunctionCode/Packing/Packing_CartonBoxWeigh.resx

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

+ 29 - 0
UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -208,6 +208,35 @@ namespace UAS_MES_NEW.Packing
             {
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
+                    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();
+                                }
+                            }
+                        }
+                    }
                     dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_nextstepcode,ms_craftcode,ms_prodcode from makeserial where ms_sncode ='" + sn_code.Text + "' order by ms_id desc", "select");
                     if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || (dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))
                     {

+ 29 - 0
UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollection1.cs

@@ -208,6 +208,35 @@ namespace UAS_MES_NEW.Packing
             {
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
+                    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();
+                                }
+                            }
+                        }
+                    }
                     dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_nextstepcode,ms_craftcode,ms_prodcode from makeserial where ms_sncode ='" + sn_code.Text + "' order by ms_id desc", "select");
                     if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || (dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))
                     {

+ 29 - 0
UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -271,6 +271,35 @@ namespace UAS_MES_NEW.Packing
             {
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
+                    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();
+                                }
+                            }
+                        }
+                    }
                     dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_craftcode,ms_prodcode from makeserial where ms_sncode ='" + sn_code.Text + "'  order by ms_id desc", "select");
                     if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || (dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))
                     {

+ 29 - 0
UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollectionWeigh_HUAGUAN.cs

@@ -263,6 +263,35 @@ namespace UAS_MES_NEW.Packing
             {
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
+                    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();
+                                }
+                            }
+                        }
+                    }
                     dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_craftcode,ms_prodcode from makeserial where ms_sncode ='" + sn_code.Text + "'  order by ms_id desc", "select");
                     if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || (dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))
                     {

+ 142 - 107
UAS_MES_YD/FunctionCode/Warehouse/Warehouse_FinishedProductOutSum.Designer.cs

@@ -34,7 +34,12 @@
             this.pi_titile_label = new System.Windows.Forms.Label();
             this.pi_title = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.datacount = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.Label = new System.Windows.Forms.Label();
+            this.boxqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.getqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ungetqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.outqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.label10 = new System.Windows.Forms.Label();
             this.label8 = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
@@ -54,10 +59,6 @@
             this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.Printlab = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.Prodiodetail = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
-            this.pd_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_detail1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_spec1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pallecode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.pi_type_check = new UAS_MES_NEW.CustomControl.CustomCheckBox.CustomCheckBox();
@@ -71,17 +72,19 @@
             this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.blank = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.datacount = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.boxqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.getqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.ungetqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.outqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ConfirmOut = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.NewProdInOut = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ProdDetail = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.pi_inoutno = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.PrinterList_label = new System.Windows.Forms.Label();
             this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.Combine = new System.Windows.Forms.CheckBox();
+            this.pd_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_spec1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Prodiodetail)).BeginInit();
@@ -139,6 +142,18 @@
             this.panel1.Size = new System.Drawing.Size(280, 388);
             this.panel1.TabIndex = 217;
             // 
+            // datacount
+            // 
+            this.datacount.AutoSize = true;
+            this.datacount.CutLength = null;
+            this.datacount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.datacount.Location = new System.Drawing.Point(190, 310);
+            this.datacount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.datacount.MaximumSize = new System.Drawing.Size(400, 0);
+            this.datacount.Name = "datacount";
+            this.datacount.Size = new System.Drawing.Size(0, 41);
+            this.datacount.TabIndex = 230;
+            // 
             // Label
             // 
             this.Label.AutoSize = true;
@@ -150,6 +165,54 @@
             this.Label.TabIndex = 229;
             this.Label.Text = "当前明细";
             // 
+            // boxqty
+            // 
+            this.boxqty.AutoSize = true;
+            this.boxqty.CutLength = null;
+            this.boxqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.boxqty.Location = new System.Drawing.Point(190, 240);
+            this.boxqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.boxqty.MaximumSize = new System.Drawing.Size(400, 0);
+            this.boxqty.Name = "boxqty";
+            this.boxqty.Size = new System.Drawing.Size(0, 41);
+            this.boxqty.TabIndex = 227;
+            // 
+            // getqty
+            // 
+            this.getqty.AutoSize = true;
+            this.getqty.CutLength = null;
+            this.getqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.getqty.Location = new System.Drawing.Point(190, 168);
+            this.getqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.getqty.MaximumSize = new System.Drawing.Size(400, 0);
+            this.getqty.Name = "getqty";
+            this.getqty.Size = new System.Drawing.Size(0, 41);
+            this.getqty.TabIndex = 226;
+            // 
+            // ungetqty
+            // 
+            this.ungetqty.AutoSize = true;
+            this.ungetqty.CutLength = null;
+            this.ungetqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ungetqty.Location = new System.Drawing.Point(190, 88);
+            this.ungetqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ungetqty.MaximumSize = new System.Drawing.Size(400, 0);
+            this.ungetqty.Name = "ungetqty";
+            this.ungetqty.Size = new System.Drawing.Size(0, 41);
+            this.ungetqty.TabIndex = 225;
+            // 
+            // outqty
+            // 
+            this.outqty.AutoSize = true;
+            this.outqty.CutLength = null;
+            this.outqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.outqty.Location = new System.Drawing.Point(190, 22);
+            this.outqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.outqty.MaximumSize = new System.Drawing.Size(400, 0);
+            this.outqty.Name = "outqty";
+            this.outqty.Size = new System.Drawing.Size(0, 41);
+            this.outqty.TabIndex = 224;
+            // 
             // label10
             // 
             this.label10.AutoSize = true;
@@ -357,6 +420,8 @@
             this.Prodiodetail.AllowUserToAddRows = false;
             this.Prodiodetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.Prodiodetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.pd_pdno,
+            this.pd_id,
             this.pd_prodcode,
             this.dataGridViewTextBoxColumn2,
             this.pr_detail1,
@@ -371,42 +436,6 @@
             this.Prodiodetail.TabIndex = 242;
             this.Prodiodetail.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.Prodiodetail_CellClick);
             // 
-            // pd_prodcode
-            // 
-            this.pd_prodcode.DataPropertyName = "pd_prodcode";
-            this.pd_prodcode.HeaderText = "物料编号";
-            this.pd_prodcode.MinimumWidth = 2;
-            this.pd_prodcode.Name = "pd_prodcode";
-            this.pd_prodcode.ReadOnly = true;
-            this.pd_prodcode.Width = 150;
-            // 
-            // dataGridViewTextBoxColumn2
-            // 
-            this.dataGridViewTextBoxColumn2.DataPropertyName = "pd_outqty";
-            this.dataGridViewTextBoxColumn2.HeaderText = "出货数量";
-            this.dataGridViewTextBoxColumn2.MinimumWidth = 10;
-            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
-            this.dataGridViewTextBoxColumn2.ReadOnly = true;
-            this.dataGridViewTextBoxColumn2.Width = 200;
-            // 
-            // pr_detail1
-            // 
-            this.pr_detail1.DataPropertyName = "pr_detail";
-            this.pr_detail1.HeaderText = "名称";
-            this.pr_detail1.MinimumWidth = 10;
-            this.pr_detail1.Name = "pr_detail1";
-            this.pr_detail1.ReadOnly = true;
-            this.pr_detail1.Width = 200;
-            // 
-            // pr_spec1
-            // 
-            this.pr_spec1.DataPropertyName = "pr_spec";
-            this.pr_spec1.HeaderText = "规格";
-            this.pr_spec1.MinimumWidth = 200;
-            this.pr_spec1.Name = "pr_spec1";
-            this.pr_spec1.ReadOnly = true;
-            this.pr_spec1.Width = 200;
-            // 
             // pallecode
             // 
             this.pallecode.BackColor = System.Drawing.Color.Transparent;
@@ -567,66 +596,6 @@
             this.blank.Name = "blank";
             this.blank.Width = 2;
             // 
-            // datacount
-            // 
-            this.datacount.AutoSize = true;
-            this.datacount.CutLength = null;
-            this.datacount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.datacount.Location = new System.Drawing.Point(190, 310);
-            this.datacount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.datacount.MaximumSize = new System.Drawing.Size(400, 0);
-            this.datacount.Name = "datacount";
-            this.datacount.Size = new System.Drawing.Size(0, 41);
-            this.datacount.TabIndex = 230;
-            // 
-            // boxqty
-            // 
-            this.boxqty.AutoSize = true;
-            this.boxqty.CutLength = null;
-            this.boxqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.boxqty.Location = new System.Drawing.Point(190, 240);
-            this.boxqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.boxqty.MaximumSize = new System.Drawing.Size(400, 0);
-            this.boxqty.Name = "boxqty";
-            this.boxqty.Size = new System.Drawing.Size(0, 41);
-            this.boxqty.TabIndex = 227;
-            // 
-            // getqty
-            // 
-            this.getqty.AutoSize = true;
-            this.getqty.CutLength = null;
-            this.getqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.getqty.Location = new System.Drawing.Point(190, 168);
-            this.getqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.getqty.MaximumSize = new System.Drawing.Size(400, 0);
-            this.getqty.Name = "getqty";
-            this.getqty.Size = new System.Drawing.Size(0, 41);
-            this.getqty.TabIndex = 226;
-            // 
-            // ungetqty
-            // 
-            this.ungetqty.AutoSize = true;
-            this.ungetqty.CutLength = null;
-            this.ungetqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ungetqty.Location = new System.Drawing.Point(190, 88);
-            this.ungetqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.ungetqty.MaximumSize = new System.Drawing.Size(400, 0);
-            this.ungetqty.Name = "ungetqty";
-            this.ungetqty.Size = new System.Drawing.Size(0, 41);
-            this.ungetqty.TabIndex = 225;
-            // 
-            // outqty
-            // 
-            this.outqty.AutoSize = true;
-            this.outqty.CutLength = null;
-            this.outqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.outqty.Location = new System.Drawing.Point(190, 22);
-            this.outqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.outqty.MaximumSize = new System.Drawing.Size(400, 0);
-            this.outqty.Name = "outqty";
-            this.outqty.Size = new System.Drawing.Size(0, 41);
-            this.outqty.TabIndex = 224;
-            // 
             // ConfirmOut
             // 
             this.ConfirmOut.AllPower = null;
@@ -726,11 +695,74 @@
             this.PrinterList.Size = new System.Drawing.Size(234, 40);
             this.PrinterList.TabIndex = 248;
             // 
+            // Combine
+            // 
+            this.Combine.AutoSize = true;
+            this.Combine.Location = new System.Drawing.Point(583, 75);
+            this.Combine.Name = "Combine";
+            this.Combine.Size = new System.Drawing.Size(138, 28);
+            this.Combine.TabIndex = 250;
+            this.Combine.Text = "合并明细";
+            this.Combine.UseVisualStyleBackColor = true;
+            // 
+            // pd_pdno
+            // 
+            this.pd_pdno.DataPropertyName = "pd_pdno";
+            this.pd_pdno.HeaderText = "序号";
+            this.pd_pdno.MinimumWidth = 10;
+            this.pd_pdno.Name = "pd_pdno";
+            this.pd_pdno.Width = 200;
+            // 
+            // pd_id
+            // 
+            this.pd_id.DataPropertyName = "pd_id";
+            this.pd_id.HeaderText = "ID";
+            this.pd_id.MinimumWidth = 10;
+            this.pd_id.Name = "pd_id";
+            this.pd_id.Width = 10;
+            // 
+            // pd_prodcode
+            // 
+            this.pd_prodcode.DataPropertyName = "pd_prodcode";
+            this.pd_prodcode.HeaderText = "物料编号";
+            this.pd_prodcode.MinimumWidth = 2;
+            this.pd_prodcode.Name = "pd_prodcode";
+            this.pd_prodcode.ReadOnly = true;
+            this.pd_prodcode.Width = 150;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "pd_outqty";
+            this.dataGridViewTextBoxColumn2.HeaderText = "出货数量";
+            this.dataGridViewTextBoxColumn2.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.ReadOnly = true;
+            this.dataGridViewTextBoxColumn2.Width = 200;
+            // 
+            // pr_detail1
+            // 
+            this.pr_detail1.DataPropertyName = "pr_detail";
+            this.pr_detail1.HeaderText = "名称";
+            this.pr_detail1.MinimumWidth = 10;
+            this.pr_detail1.Name = "pr_detail1";
+            this.pr_detail1.ReadOnly = true;
+            this.pr_detail1.Width = 200;
+            // 
+            // pr_spec1
+            // 
+            this.pr_spec1.DataPropertyName = "pr_spec";
+            this.pr_spec1.HeaderText = "规格";
+            this.pr_spec1.MinimumWidth = 200;
+            this.pr_spec1.Name = "pr_spec1";
+            this.pr_spec1.ReadOnly = true;
+            this.pr_spec1.Width = 200;
+            // 
             // Warehouse_FinishedProductOutSum
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1480, 1036);
+            this.Controls.Add(this.Combine);
             this.Controls.Add(this.PrinterList_label);
             this.Controls.Add(this.PrinterList);
             this.Controls.Add(this.PrintNum);
@@ -827,11 +859,14 @@
         private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
         private CustomControl.ButtonUtil.NormalButton Printlab;
         private System.Windows.Forms.Label pa_restqty_label;
+        private System.Windows.Forms.Label PrinterList_label;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrinterList;
+        private System.Windows.Forms.CheckBox Combine;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_pdno;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_prodcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec1;
-        private System.Windows.Forms.Label PrinterList_label;
-        private CustomControl.ComBoxWithFocus.PrinterCombox PrinterList;
     }
 }

+ 26 - 10
UAS_MES_YD/FunctionCode/Warehouse/Warehouse_FinishedProductOutSum.cs

@@ -155,12 +155,22 @@ namespace UAS_MES_NEW.Warehouse
             sql.Append("left join product on pr_code=pim_prodcode where pim_inoutno='" + pi_inoutno.Text + "' order by pim_id asc");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             BaseUtil.FillDgvWithDataTable(InOutDetailDGV, dt);
-
-            sql.Clear();
-            sql.Append("select pd_prodcode,sum(pd_outqty)pd_outqty,max(pr_detail)pr_detail,max(pr_spec)pr_spec from prodiodetail left join prodinout ");
-            sql.Append("on pd_piid=pi_id left join product on pd_prodcode=pr_code where pi_inoutno='" + pi_inoutno.Text + "' group by pd_prodcode");
-            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-            BaseUtil.FillDgvWithDataTable(Prodiodetail, dt);
+            if (Combine.Checked)
+            {
+                sql.Clear();
+                sql.Append("select max(pd_pdno)pd_pdno,max(pd_id)pd_id,pd_prodcode,sum(pd_outqty)pd_outqty,max(pr_detail)pr_detail,max(pr_spec)pr_spec from prodiodetail left join prodinout ");
+                sql.Append("on pd_piid=pi_id left join product on pd_prodcode=pr_code where pi_inoutno='" + pi_inoutno.Text + "' group by pd_prodcode");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                BaseUtil.FillDgvWithDataTable(Prodiodetail, dt);
+            }
+            else
+            {
+                sql.Clear();
+                sql.Append("select pd_pdno,pd_prodcode,pd_id,pd_outqty,pr_detail,pr_spec from prodiodetail left join prodinout ");
+                sql.Append("on pd_piid=pi_id left join product on pd_prodcode=pr_code where pi_inoutno='" + pi_inoutno.Text + "'");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                BaseUtil.FillDgvWithDataTable(Prodiodetail, dt);
+            }
         }
 
         private void Warehouse_FinishedProductOut_SizeChanged(object sender, EventArgs e)
@@ -306,7 +316,7 @@ namespace UAS_MES_NEW.Warehouse
                                 OperateResult.AppendText("栈板号" + input.Text + "不存在,请重新输入\n", Color.Red, input);
                                 return;
                             }
-                            dtms = (DataTable)dh.ExecuteSql("select ma_prodcode from mes_package_view left join make on ma_code=v_makecode where v_outboxcode='"+input.Text+"'","select");
+                            dtms = (DataTable)dh.ExecuteSql("select ma_prodcode from mes_package_view left join make on ma_code=v_makecode where v_outboxcode='" + input.Text + "'", "select");
                             sql.Clear();
                             sql.Append("select cn,outqty,outqty-nvl((select count(1) from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_prodcode='" + dtms.Rows[0]["ma_prodcode"].ToString() + "'),0)ungetqty from");
                             sql.Append("(select nvl(sum(pd_outqty),0) outqty  ,count(1)cn from prodiodetail where pd_piid=" + pi_id.Text + " and pd_prodcode='" + dtms.Rows[0]["ma_prodcode"].ToString() + "')");
@@ -812,8 +822,8 @@ namespace UAS_MES_NEW.Warehouse
                 pib_type = "BOX";
             }
             sql.Clear();
-            sql.Append("insert into prodiomac(pim_id,pim_inoutno,pim_piid,pim_prodcode,pim_mac,pim_indate,pim_inman,pim_type,pim_outboxcode,pim_inorout,pim_class)");
-            sql.Append("select prodiomac_seq.nextval,'" + pi_inoutno.Text + "','" + pi_id.Text + "',v_prodcode,ms_sncode,sysdate,'" + User.UserCode + "','" + pib_type + "','" + input.Text + "','OUT','出货' from mes_package_view left join makeserial on ms_sncode=v_barcode and ms_makecode=v_makecode where v_outboxcode='" + input.Text + "' and ms_outno is null");
+            sql.Append("insert into prodiomac(pim_id,pim_inoutno,pim_piid,pim_prodcode,pim_mac,pim_indate,pim_inman,pim_type,pim_outboxcode,pim_inorout,pim_class,pim_container)");
+            sql.Append("select prodiomac_seq.nextval,'" + pi_inoutno.Text + "','" + pi_id.Text + "',v_prodcode,ms_sncode,sysdate,'" + User.UserCode + "','" + pib_type + "','" + input.Text + "','OUT','出货','" + Container.Text + "' from mes_package_view left join makeserial on ms_sncode=v_barcode and ms_makecode=v_makecode where v_outboxcode='" + input.Text + "' and ms_outno is null");
             dh.ExecuteSql(sql.GetString(), "insert");
         }
 
@@ -994,12 +1004,18 @@ namespace UAS_MES_NEW.Warehouse
             datacount.Text = InOutDetailDGV.Rows.Count.ToString();
         }
         string PrintPrcode = "";
+        string PdPDNO = "";
+        string PDID = "";
         private void Prodiodetail_CellClick(object sender, DataGridViewCellEventArgs e)
         {
             if (e.RowIndex >= 0)
             {
                 string pd_prodcode = Prodiodetail.Rows[e.RowIndex].Cells["pd_prodcode"].Value.ToString();
+                string pd_pdno = Prodiodetail.Rows[e.RowIndex].Cells["pd_pdno"].Value.ToString();
+                string pd_id = Prodiodetail.Rows[e.RowIndex].Cells["pd_id"].Value.ToString();
                 PrintPrcode = pd_prodcode;
+                PdPDNO = pd_pdno;
+                PDID = pd_id;
                 FillPrintLabel(pd_prodcode);
             }
         }
@@ -1014,7 +1030,7 @@ namespace UAS_MES_NEW.Warehouse
         Engine engine;
         private void Printlab_Click(object sender, EventArgs e)
         {
-            if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, PrintPrcode, int.Parse(PrintNum.Text), "", PrintPrcode, "出货标", "0", out ErrorMessage))
+            if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text,PDID, PrintPrcode, int.Parse(PrintNum.Text), PdPDNO, PrintPrcode, "出货标", "0", out ErrorMessage))
             {
                 OperateResult.AppendText(">>打印料号" + PrintPrcode + "\n", Color.Black);
             }

+ 3 - 27
UAS_MES_YD/FunctionCode/Warehouse/Warehouse_FinishedProductOutSum.resx

@@ -180,7 +180,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -252,16 +252,10 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="pd_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="pd_pdno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_detail1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_spec1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="pd_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -332,24 +326,6 @@
   <metadata name="blank.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="pim_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pim_mac.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pim_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="blank.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <data name="ConfirmOut.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 108 - 0
UAS_MES_YD/PublicMethod/Print.cs

@@ -7,6 +7,7 @@ using UAS_MES_NEW.Entity;
 using System.Text.RegularExpressions;
 using System.Windows.Forms;
 using Seagull.BarTender.Print;
+using System;
 
 namespace UAS_MES_NEW.PublicMethod
 {
@@ -316,5 +317,112 @@ namespace UAS_MES_NEW.PublicMethod
             LogicHandler.doLabelPrintLog(SnCode, LabelType, MakeCode, ProdCode, User.UserSourceCode, User.CurrentStepCode, IfRePrint, User.UserCode);
             return true;
         }
+
+        public static bool BarTender(string iCaller, ref Engine lbl, string LabelName, string LaID, string PrinterName,string pd_pdno, string SnCode, int PrintNum, string MakeCode, string ProdCode, string LabelType, string IfRePrint, out string ErrorMessage)
+        {
+            ErrorMessage = "";
+            DataTable dt = new DataTable();
+            if (IfRePrint != "-1" && (SystemInf.CurrentDB == "HAOQ" || SystemInf.CurrentDB == "OPD") && LabelType != "栈板标")
+            {
+                if (LabelType == "")
+                {
+
+                }
+                if (LabelType == "卡通箱标" || LabelType == "大箱标" || LabelType == "栈板标" || LabelType == "彩盒标")
+                {
+                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_makecode='" + MakeCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
+                }
+                else
+                {
+                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_makecode='" + MakeCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
+                }
+                ////如果已经打印过了,则不允许再打印
+                if (dt.Rows.Count > 0)
+                {
+                    ErrorMessage = SnCode + LabelType + "已打印";
+                    return false;
+                }
+            }
+            string filelastwritetime = dh.getFieldDataByCondition("label", "la_lastwritetime", "la_id = '" + LaID + "'").ToString();
+            FileInfo PrintFile = new FileInfo(LabelName);
+            //打开模板路径
+            //查询模板对应的取值SQL和参数名称
+            dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql from label left join LABELPARAMETER on la_id=lp_laid where la_id='" + LaID + "'", "select");
+            StringBuilder sb = new StringBuilder();
+            if (!PrintFile.Exists)
+            {
+                MessageBox.Show("打印文件不存在");
+                return false;
+            }
+            string filechangetime = PrintFile.LastWriteTime.ToString();
+            if (filechangetime != filelastwritetime)
+            {
+                lbl.Stop();
+                lbl = new Engine(true);
+                BaseUtil.WriteLbl();
+                filechangetime = PrintFile.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
+                string update = "la_lastwritetime = to_date((regexp_substr('" + filechangetime + "','\\d+.+\\d+')),'yyyy-mm-dd hh24:mi:ss')";
+                dh.UpdateByCondition("label", update, "la_id = '" + LaID + "'");
+            }
+            format = lbl.Documents.Open(LabelName);
+            if (format == null)
+            {
+                MessageBox.Show("标签文件打开失败");
+                return false;
+            }
+            //执行全部的SQL
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                string sql = dt.Rows[i]["lp_sql"].ToString();
+                try
+                {
+                    Regex ConnoteA = new Regex("{\\w+}");
+                    foreach (Match mch in ConnoteA.Matches(sql))
+                    {
+                        string x = mch.Value.Trim();
+                        sql = sql.Replace(x, "'" + pd_pdno + "'");
+                    }
+                    DataTable Param = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+                    if (Param.Rows.Count == 0)
+                        continue;
+                    //查询的结果的参数个数大于1需要给标签的多个参数赋值
+                    if (Param.Rows.Count > 0)
+                    {
+                        int LoopTime = Param.Rows.Count > 1000 ? 1000 : Param.Rows.Count;
+                        for (int j = 0; j < LoopTime; j++)
+                        {
+                            for (int k = 0; k < format.SubStrings.Count; k++)
+                            {
+                                if (j == 0 & format.SubStrings[k].Name.ToUpper() == dt.Rows[i]["lp_name"].ToString().ToUpper())
+                                {
+                                    format.SubStrings[k].Value = Param.Rows[0][0].ToString();
+                                }
+                                //使用SN开头的参数赋值SN1,SN2,SN3等参数
+                                if (format.SubStrings[k].Name.ToUpper() == dt.Rows[i]["lp_name"].ToString().ToUpper() + (j + 1))
+                                {
+                                    format.SubStrings[k].Value = Param.Rows[j][0].ToString();
+                                }
+                            }
+                        }
+                    }
+                }
+                catch (System.Exception)
+                {
+                    MessageBox.Show("SQL维护不正确");
+                }
+            }
+            LogManager.DoLog(sb.ToString());
+            //保存本次赋值进行打印
+            format.PrintSetup.PrinterName = PrinterName;
+            format.PrintSetup.IdenticalCopiesOfLabel = PrintNum;
+            format.Print();
+            LogicHandler.DoCommandLog(iCaller, User.UserCode, "", User.UserLineCode, User.UserSourceCode, "打印", "成功打印", SnCode, "");
+            for (int k = 0; k < format.SubStrings.Count; k++)
+            {
+                format.SubStrings[k].Value = null;
+            }
+            LogicHandler.doLabelPrintLog(SnCode, LabelType, MakeCode, ProdCode, User.UserSourceCode, User.CurrentStepCode, IfRePrint, User.UserCode);
+            return true;
+        }
     }
 }

+ 9 - 0
UAS_MES_YD/UAS_MES_YD.csproj

@@ -652,6 +652,12 @@
     <Compile Include="FunctionCode\Make\Make_SmtTestCollection.Designer.cs">
       <DependentUpon>Make_SmtTestCollection.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_TestCollectionOQC.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_TestCollectionOQC.Designer.cs">
+      <DependentUpon>Make_TestCollectionOQC.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_TestCollectionOnlyBad.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1515,6 +1521,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_SmtTestCollection.resx">
       <DependentUpon>Make_SmtTestCollection.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_TestCollectionOQC.resx">
+      <DependentUpon>Make_TestCollectionOQC.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_TestCollectionOnlyBad.resx">
       <DependentUpon>Make_TestCollectionOnlyBad.cs</DependentUpon>
     </EmbeddedResource>