Browse Source

正通项目修改

caosy 3 years ago
parent
commit
8cbf4a01de
31 changed files with 1970 additions and 1168 deletions
  1. 3 0
      UAS_MES_ZT/CustomControl/HeadBar/HeadBar.Designer.cs
  2. 36 63
      UAS_MES_ZT/CustomControl/HeadBar/HeadBar.resx
  3. 1 1
      UAS_MES_ZT/Entity/SystemInf.cs
  4. 136 126
      UAS_MES_ZT/FunctionCode/Make/Make_PositionStockNew.Designer.cs
  5. 6 6
      UAS_MES_ZT/FunctionCode/Make/Make_PositionStockNew.cs
  6. 2 2
      UAS_MES_ZT/FunctionCode/Make/Make_PositionStockNew.resx
  7. 1 1
      UAS_MES_ZT/FunctionCode/Make/Make_Repair.cs
  8. 1 1
      UAS_MES_ZT/FunctionCode/Make/Make_RepairOk.cs
  9. 25 15
      UAS_MES_ZT/FunctionCode/Make/Make_SeqTransform.cs
  10. 31 20
      UAS_MES_ZT/FunctionCode/Make/Make_StepReport.Designer.cs
  11. 27 7
      UAS_MES_ZT/FunctionCode/Make/Make_StepReport.cs
  12. 3 0
      UAS_MES_ZT/FunctionCode/Make/Make_StepReport.resx
  13. 292 0
      UAS_MES_ZT/FunctionCode/Make/Make_StepReportDetail.Designer.cs
  14. 145 0
      UAS_MES_ZT/FunctionCode/Make/Make_StepReportDetail.cs
  15. 156 0
      UAS_MES_ZT/FunctionCode/Make/Make_StepReportDetail.resx
  16. 232 163
      UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.Designer.cs
  17. 20 10
      UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.cs
  18. 9 9
      UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.resx
  19. 130 86
      UAS_MES_ZT/FunctionCode/OQC/OQC_BatchResultJudge.Designer.cs
  20. 449 506
      UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.Designer.cs
  21. 16 6
      UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs
  22. 33 33
      UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.resx
  23. 56 41
      UAS_MES_ZT/FunctionCode/Special/Special_Reset.Designer.cs
  24. 65 17
      UAS_MES_ZT/FunctionCode/Special/Special_Reset.cs
  25. 12 12
      UAS_MES_ZT/FunctionCode/Special/Special_Reset.resx
  26. 49 27
      UAS_MES_ZT/FunctionCode/SystemSetting/SystemSetting_ScaleTest.Designer.cs
  27. 9 1
      UAS_MES_ZT/FunctionCode/SystemSetting/SystemSetting_ScaleTest.cs
  28. 6 6
      UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_FinishedProductOut.cs
  29. 2 2
      UAS_MES_ZT/PublicMethod/LogicHandler.cs
  30. 6 6
      UAS_MES_ZT/PublicMethod/Print.cs
  31. 11 1
      UAS_MES_ZT/UAS_MES_ZT.csproj

+ 3 - 0
UAS_MES_ZT/CustomControl/HeadBar/HeadBar.Designer.cs

@@ -105,6 +105,9 @@
             // 
             resources.ApplyResources(this.UpperCollection, "UpperCollection");
             this.UpperCollection.Name = "UpperCollection";
+            // 
+            // 
+            // 
             this.UpperCollection.Properties.Appearance.Font = ((System.Drawing.Font)(resources.GetObject("UpperCollection.Properties.Appearance.Font")));
             this.UpperCollection.Properties.Appearance.Options.UseFont = true;
             this.UpperCollection.Properties.OffText = resources.GetString("UpperCollection.Properties.OffText");

+ 36 - 63
UAS_MES_ZT/CustomControl/HeadBar/HeadBar.resx

@@ -130,13 +130,10 @@
     <value>NoControl</value>
   </data>
   <data name="TitleLabel.Location" type="System.Drawing.Point, System.Drawing">
-    <value>8, 6</value>
-  </data>
-  <data name="TitleLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>2, 0, 2, 0</value>
+    <value>12, 9</value>
   </data>
   <data name="TitleLabel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>0, 22</value>
+    <value>0, 31</value>
   </data>
   <data name="TitleLabel.TabIndex" type="System.Int32, mscorlib">
     <value>7</value>
@@ -160,10 +157,13 @@
     <value>NoControl</value>
   </data>
   <data name="MinWindow2.Location" type="System.Drawing.Point, System.Drawing">
-    <value>491, 0</value>
+    <value>734, 0</value>
+  </data>
+  <data name="MinWindow2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>4, 4, 4, 4</value>
   </data>
   <data name="MinWindow2.Size" type="System.Drawing.Size, System.Drawing">
-    <value>15, 28</value>
+    <value>22, 39</value>
   </data>
   <data name="MinWindow2.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>StretchImage</value>
@@ -190,10 +190,13 @@
     <value>NoControl</value>
   </data>
   <data name="MinWindow.Location" type="System.Drawing.Point, System.Drawing">
-    <value>506, 0</value>
+    <value>756, 0</value>
+  </data>
+  <data name="MinWindow.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>4, 4, 4, 4</value>
   </data>
   <data name="MinWindow.Size" type="System.Drawing.Size, System.Drawing">
-    <value>30, 28</value>
+    <value>45, 39</value>
   </data>
   <data name="MinWindow.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>StretchImage</value>
@@ -220,10 +223,13 @@
     <value>NoControl</value>
   </data>
   <data name="MinWindow1.Location" type="System.Drawing.Point, System.Drawing">
-    <value>536, 0</value>
+    <value>801, 0</value>
+  </data>
+  <data name="MinWindow1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>4, 4, 4, 4</value>
   </data>
   <data name="MinWindow1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>15, 28</value>
+    <value>22, 39</value>
   </data>
   <data name="MinWindow1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>StretchImage</value>
@@ -250,10 +256,13 @@
     <value>NoControl</value>
   </data>
   <data name="CloseWindow.Location" type="System.Drawing.Point, System.Drawing">
-    <value>551, 0</value>
+    <value>823, 0</value>
+  </data>
+  <data name="CloseWindow.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>4, 4, 4, 4</value>
   </data>
   <data name="CloseWindow.Size" type="System.Drawing.Size, System.Drawing">
-    <value>30, 28</value>
+    <value>45, 39</value>
   </data>
   <data name="CloseWindow.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>StretchImage</value>
@@ -283,13 +292,10 @@
     <value>NoControl</value>
   </data>
   <data name="LoginOut.Location" type="System.Drawing.Point, System.Drawing">
-    <value>411, 0</value>
-  </data>
-  <data name="LoginOut.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>2, 2, 2, 2</value>
+    <value>614, 0</value>
   </data>
   <data name="LoginOut.Size" type="System.Drawing.Size, System.Drawing">
-    <value>80, 28</value>
+    <value>120, 39</value>
   </data>
   <data name="LoginOut.TabIndex" type="System.Int32, mscorlib">
     <value>9</value>
@@ -319,13 +325,10 @@
     <value>NoControl</value>
   </data>
   <data name="Change_psw.Location" type="System.Drawing.Point, System.Drawing">
-    <value>298, 0</value>
-  </data>
-  <data name="Change_psw.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>2, 2, 2, 2</value>
+    <value>444, 0</value>
   </data>
   <data name="Change_psw.Size" type="System.Drawing.Size, System.Drawing">
-    <value>113, 28</value>
+    <value>170, 39</value>
   </data>
   <data name="Change_psw.TabIndex" type="System.Int32, mscorlib">
     <value>11</value>
@@ -348,11 +351,11 @@
   <data name="UpperCollection.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Right</value>
   </data>
-  <data name="UpperCollection.EditValue" type="System.Boolean, mscorlib">
-    <value>True</value>
-  </data>
   <data name="UpperCollection.Location" type="System.Drawing.Point, System.Drawing">
-    <value>166, 0</value>
+    <value>246, 0</value>
+  </data>
+  <data name="UpperCollection.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>4, 4, 4, 4</value>
   </data>
   <data name="UpperCollection.Properties.Appearance.Font" type="System.Drawing.Font, System.Drawing">
     <value>微软雅黑, 9pt</value>
@@ -364,40 +367,7 @@
     <value>大写采集</value>
   </data>
   <data name="UpperCollection.Size" type="System.Drawing.Size, System.Drawing">
-    <value>132, 28</value>
-  </data>
-  <assembly alias="DevExpress.Utils.v15.2" name="DevExpress.Utils.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
-  <data name="UpperCollection.SuperTip" type="DevExpress.Utils.SuperToolTip, DevExpress.Utils.v15.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        AAEAAAD/////AQAAAAAAAAAMAgAAAFpEZXZFeHByZXNzLlV0aWxzLnYxNS4yLCBWZXJzaW9uPTE1LjIu
-        NC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEMAwAAAFlE
-        ZXZFeHByZXNzLkRhdGEudjE1LjIsIFZlcnNpb249MTUuMi40LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVi
-        bGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURldkV4cHJlc3MuVXRpbHMuU3VwZXJUb29s
-        VGlwBwAAAA1BbGxvd0h0bWxUZXh0EUZpeGVkVG9vbFRpcFdpZHRoCkl0ZW1zQ291bnQJaXRlbVR5cGUw
-        BWl0ZW0wCWl0ZW1UeXBlMQVpdGVtMQQAAAQEBAQfRGV2RXhwcmVzcy5VdGlscy5EZWZhdWx0Qm9vbGVh
-        bgMAAAABCCVEZXZFeHByZXNzLlV0aWxzLlN1cGVyVG9vbFRpcEl0ZW1UeXBlAgAAACFEZXZFeHByZXNz
-        LlV0aWxzLlRvb2xUaXBUaXRsZUl0ZW0CAAAAJURldkV4cHJlc3MuVXRpbHMuU3VwZXJUb29sVGlwSXRl
-        bVR5cGUCAAAAHERldkV4cHJlc3MuVXRpbHMuVG9vbFRpcEl0ZW0CAAAAAgAAAAX8////H0RldkV4cHJl
-        c3MuVXRpbHMuRGVmYXVsdEJvb2xlYW4BAAAAB3ZhbHVlX18ACAMAAAACAAAAAAIAAAAF+////yVEZXZF
-        eHByZXNzLlV0aWxzLlN1cGVyVG9vbFRpcEl0ZW1UeXBlAQAAAAd2YWx1ZV9fAAgCAAAAAQAAAAkGAAAA
-        Afn////7////AAAAAAkIAAAADAkAAABRU3lzdGVtLkRyYXdpbmcsIFZlcnNpb249NC4wLjAuMCwgQ3Vs
-        dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iMDNmNWY3ZjExZDUwYTNhBQYAAAAhRGV2RXhwcmVz
-        cy5VdGlscy5Ub29sVGlwVGl0bGVJdGVtCgAAAA1BbGxvd0h0bWxUZXh0BEljb24FSW1hZ2UKSW1hZ2VB
-        bGlnbgpJbWFnZUluZGV4E0ltYWdlVG9UZXh0RGlzdGFuY2UKTGVmdEluZGVudAhNYXhXaWR0aBJPd25l
-        ckFsbG93SHRtbFRleHQEVGV4dAQEBAQAAAAAAAEfRGV2RXhwcmVzcy5VdGlscy5EZWZhdWx0Qm9vbGVh
-        bgMAAAATU3lzdGVtLkRyYXdpbmcuSWNvbgkAAAAUU3lzdGVtLkRyYXdpbmcuSW1hZ2UJAAAAJkRldkV4
-        cHJlc3MuVXRpbHMuVG9vbFRpcEltYWdlQWxpZ25tZW50AgAAAAgICAgBAgAAAAH2/////P///wIAAAAK
-        CgX1////JkRldkV4cHJlc3MuVXRpbHMuVG9vbFRpcEltYWdlQWxpZ25tZW50AQAAAAd2YWx1ZV9fAAgC
-        AAAAAAAAAP////8OAAAAAAAAADwBAAAABgwAAAAb57O757uf5aSn5bCP5YaZ6YeH6ZuG6K6+572uBQgA
-        AAAcRGV2RXhwcmVzcy5VdGlscy5Ub29sVGlwSXRlbQoAAAANQWxsb3dIdG1sVGV4dARJY29uBUltYWdl
-        CkltYWdlQWxpZ24KSW1hZ2VJbmRleBNJbWFnZVRvVGV4dERpc3RhbmNlCkxlZnRJbmRlbnQITWF4V2lk
-        dGgST3duZXJBbGxvd0h0bWxUZXh0BFRleHQEBAQEAAAAAAABH0RldkV4cHJlc3MuVXRpbHMuRGVmYXVs
-        dEJvb2xlYW4DAAAAE1N5c3RlbS5EcmF3aW5nLkljb24JAAAAFFN5c3RlbS5EcmF3aW5nLkltYWdlCQAA
-        ACZEZXZFeHByZXNzLlV0aWxzLlRvb2xUaXBJbWFnZUFsaWdubWVudAIAAAAICAgIAQIAAAAB8/////z/
-        //8CAAAACgoB8v////X///8AAAAA/////w4AAAAGAAAAPAEAAAAGDwAAAFTlvIDlkK/ml7bvvIzmiavm
-        j4/mnqrml6Dorrrmiavmj4/liLDku4DkuYjlhoXlrrnov5vlhaXns7vnu5/ml7bpg73kvJrovazmjaLm
-        iJDlpKflhpkL
-</value>
+    <value>198, 39</value>
   </data>
   <data name="UpperCollection.TabIndex" type="System.Int32, mscorlib">
     <value>15</value>
@@ -418,10 +388,13 @@
     <value>True</value>
   </metadata>
   <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
-    <value>6, 12</value>
+    <value>9, 18</value>
+  </data>
+  <data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>4, 4, 4, 4</value>
   </data>
   <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
-    <value>581, 28</value>
+    <value>868, 39</value>
   </data>
   <data name="&gt;&gt;$this.Name" xml:space="preserve">
     <value>HeadBar</value>

+ 1 - 1
UAS_MES_ZT/Entity/SystemInf.cs

@@ -72,7 +72,7 @@ namespace UAS_MES_NEW.Entity
         /// </summary>
         public static string CacheFilePath = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\CacheFile\CacheInfo.xml";
 
-        public static bool UpperCollection = true;
+        public static bool UpperCollection = false;
 
         public static DataOperate.DataHelper dh;
 

+ 136 - 126
UAS_MES_ZT/FunctionCode/Make/Make_PositionStockNew.Designer.cs

@@ -46,20 +46,6 @@
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.pr_batchnum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.BatchProductDGV = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
-            this.sp_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mss_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mss_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mss_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mss_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mss_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.sp_oneuseqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mss_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mm_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mss_remain = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mss_useqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_detail1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.DeleteRow = new System.Windows.Forms.DataGridViewImageColumn();
             this.sc_stepcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ma_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
@@ -78,6 +64,20 @@
             this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
+            this.sp_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mss_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mss_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mss_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mss_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mss_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sp_oneuseqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mss_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mm_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mss_remain = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mss_useqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_orispeccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DeleteRow = new System.Windows.Forms.DataGridViewImageColumn();
             ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV)).BeginInit();
             this.SuspendLayout();
             // 
@@ -313,8 +313,8 @@
             this.mm_qty,
             this.mss_remain,
             this.mss_useqty,
+            this.pr_orispeccode,
             this.pr_detail1,
-            this.pr_spec,
             this.DeleteRow});
             this.BatchProductDGV.EnableContentClick = true;
             this.BatchProductDGV.Location = new System.Drawing.Point(0, 168);
@@ -328,103 +328,6 @@
             this.BatchProductDGV.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.BatchProductDGV_CellFormatting);
             this.BatchProductDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.BatchProductDGV_CellPainting);
             // 
-            // sp_soncode
-            // 
-            this.sp_soncode.DataPropertyName = "sp_fsoncode";
-            this.sp_soncode.HeaderText = "首选料号";
-            this.sp_soncode.Name = "sp_soncode";
-            this.sp_soncode.ReadOnly = true;
-            // 
-            // mss_linecode
-            // 
-            this.mss_linecode.DataPropertyName = "mss_linecode";
-            this.mss_linecode.HeaderText = "线别";
-            this.mss_linecode.Name = "mss_linecode";
-            // 
-            // mss_makecode
-            // 
-            this.mss_makecode.DataPropertyName = "mss_makecode";
-            this.mss_makecode.HeaderText = "工单号";
-            this.mss_makecode.Name = "mss_makecode";
-            // 
-            // mss_id
-            // 
-            this.mss_id.DataPropertyName = "mss_id";
-            this.mss_id.HeaderText = "ID";
-            this.mss_id.Name = "mss_id";
-            this.mss_id.Visible = false;
-            // 
-            // mss_prodcode
-            // 
-            this.mss_prodcode.DataPropertyName = "sp_soncode";
-            this.mss_prodcode.HeaderText = "备选料号";
-            this.mss_prodcode.Name = "mss_prodcode";
-            this.mss_prodcode.ReadOnly = true;
-            // 
-            // mss_barcode
-            // 
-            this.mss_barcode.DataPropertyName = "mss_barcode";
-            this.mss_barcode.HeaderText = "物料批号";
-            this.mss_barcode.Name = "mss_barcode";
-            this.mss_barcode.ReadOnly = true;
-            // 
-            // sp_oneuseqty
-            // 
-            this.sp_oneuseqty.DataPropertyName = "sp_oneuseqty";
-            this.sp_oneuseqty.HeaderText = "单位用量";
-            this.sp_oneuseqty.Name = "sp_oneuseqty";
-            this.sp_oneuseqty.ReadOnly = true;
-            // 
-            // mss_qty
-            // 
-            this.mss_qty.DataPropertyName = "mss_qty";
-            this.mss_qty.HeaderText = "备料数量";
-            this.mss_qty.Name = "mss_qty";
-            // 
-            // mm_qty
-            // 
-            this.mm_qty.DataPropertyName = "mm_qty";
-            this.mm_qty.HeaderText = "需求数";
-            this.mm_qty.Name = "mm_qty";
-            this.mm_qty.ReadOnly = true;
-            this.mm_qty.Visible = false;
-            // 
-            // mss_remain
-            // 
-            this.mss_remain.DataPropertyName = "mss_remain";
-            this.mss_remain.HeaderText = "剩余数";
-            this.mss_remain.Name = "mss_remain";
-            this.mss_remain.ReadOnly = true;
-            // 
-            // mss_useqty
-            // 
-            this.mss_useqty.DataPropertyName = "mss_useqty";
-            this.mss_useqty.HeaderText = "已用数量";
-            this.mss_useqty.Name = "mss_useqty";
-            this.mss_useqty.ReadOnly = true;
-            // 
-            // pr_detail1
-            // 
-            this.pr_detail1.DataPropertyName = "pr_detail";
-            this.pr_detail1.HeaderText = "物料名称";
-            this.pr_detail1.Name = "pr_detail1";
-            this.pr_detail1.ReadOnly = true;
-            // 
-            // pr_spec
-            // 
-            this.pr_spec.DataPropertyName = "pr_spec";
-            this.pr_spec.HeaderText = "物料规格";
-            this.pr_spec.Name = "pr_spec";
-            this.pr_spec.ReadOnly = true;
-            this.pr_spec.Visible = false;
-            // 
-            // DeleteRow
-            // 
-            this.DeleteRow.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.DeleteRow.HeaderText = "删除";
-            this.DeleteRow.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.DeleteRow.Name = "DeleteRow";
-            // 
             // sc_stepcode
             // 
             this.sc_stepcode.AutoSize = true;
@@ -581,6 +484,113 @@
             this.dataGridViewImageColumn1.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
             this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1";
             // 
+            // sp_soncode
+            // 
+            this.sp_soncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.sp_soncode.DataPropertyName = "sp_fsoncode";
+            this.sp_soncode.HeaderText = "首选料号";
+            this.sp_soncode.MinimumWidth = 80;
+            this.sp_soncode.Name = "sp_soncode";
+            this.sp_soncode.ReadOnly = true;
+            this.sp_soncode.Width = 80;
+            // 
+            // mss_linecode
+            // 
+            this.mss_linecode.DataPropertyName = "mss_linecode";
+            this.mss_linecode.HeaderText = "线别";
+            this.mss_linecode.Name = "mss_linecode";
+            // 
+            // mss_makecode
+            // 
+            this.mss_makecode.DataPropertyName = "mss_makecode";
+            this.mss_makecode.HeaderText = "工单号";
+            this.mss_makecode.Name = "mss_makecode";
+            // 
+            // mss_id
+            // 
+            this.mss_id.DataPropertyName = "mss_id";
+            this.mss_id.HeaderText = "ID";
+            this.mss_id.Name = "mss_id";
+            this.mss_id.Visible = false;
+            // 
+            // mss_prodcode
+            // 
+            this.mss_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.mss_prodcode.DataPropertyName = "sp_soncode";
+            this.mss_prodcode.HeaderText = "备选料号";
+            this.mss_prodcode.MinimumWidth = 80;
+            this.mss_prodcode.Name = "mss_prodcode";
+            this.mss_prodcode.ReadOnly = true;
+            this.mss_prodcode.Visible = false;
+            this.mss_prodcode.Width = 80;
+            // 
+            // mss_barcode
+            // 
+            this.mss_barcode.DataPropertyName = "mss_barcode";
+            this.mss_barcode.HeaderText = "物料批号";
+            this.mss_barcode.Name = "mss_barcode";
+            this.mss_barcode.ReadOnly = true;
+            // 
+            // sp_oneuseqty
+            // 
+            this.sp_oneuseqty.DataPropertyName = "sp_oneuseqty";
+            this.sp_oneuseqty.HeaderText = "单位用量";
+            this.sp_oneuseqty.Name = "sp_oneuseqty";
+            this.sp_oneuseqty.ReadOnly = true;
+            // 
+            // mss_qty
+            // 
+            this.mss_qty.DataPropertyName = "mss_qty";
+            this.mss_qty.HeaderText = "备料数量";
+            this.mss_qty.Name = "mss_qty";
+            this.mss_qty.Width = 80;
+            // 
+            // mm_qty
+            // 
+            this.mm_qty.DataPropertyName = "mm_qty";
+            this.mm_qty.HeaderText = "需求数";
+            this.mm_qty.Name = "mm_qty";
+            this.mm_qty.ReadOnly = true;
+            this.mm_qty.Visible = false;
+            // 
+            // mss_remain
+            // 
+            this.mss_remain.DataPropertyName = "mss_remain";
+            this.mss_remain.HeaderText = "剩余数";
+            this.mss_remain.Name = "mss_remain";
+            this.mss_remain.ReadOnly = true;
+            // 
+            // mss_useqty
+            // 
+            this.mss_useqty.DataPropertyName = "mss_useqty";
+            this.mss_useqty.HeaderText = "已用数量";
+            this.mss_useqty.Name = "mss_useqty";
+            this.mss_useqty.ReadOnly = true;
+            // 
+            // pr_orispeccode
+            // 
+            this.pr_orispeccode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pr_orispeccode.DataPropertyName = "pr_orispeccode";
+            this.pr_orispeccode.HeaderText = "型号";
+            this.pr_orispeccode.MinimumWidth = 200;
+            this.pr_orispeccode.Name = "pr_orispeccode";
+            this.pr_orispeccode.ReadOnly = true;
+            this.pr_orispeccode.Width = 200;
+            // 
+            // pr_detail1
+            // 
+            this.pr_detail1.DataPropertyName = "pr_detail";
+            this.pr_detail1.HeaderText = "物料名称";
+            this.pr_detail1.Name = "pr_detail1";
+            this.pr_detail1.ReadOnly = true;
+            // 
+            // DeleteRow
+            // 
+            this.DeleteRow.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.DeleteRow.HeaderText = "删除";
+            this.DeleteRow.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeleteRow.Name = "DeleteRow";
+            // 
             // Make_PositionStockNew
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
@@ -642,20 +652,6 @@
         private System.Windows.Forms.Label ma_bomversion;
         private CustomControl.CustomCheckBox.CustomCheckBox show_all_check;
         private CustomControl.ButtonUtil.NormalButton normalButton1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn sp_soncode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mss_linecode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mss_makecode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mss_id;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mss_prodcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mss_barcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn sp_oneuseqty;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mss_qty;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mm_qty;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mss_remain;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mss_useqty;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
-        private System.Windows.Forms.DataGridViewImageColumn DeleteRow;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
@@ -670,5 +666,19 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn12;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn13;
         private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn sp_soncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mss_linecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mss_makecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mss_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mss_prodcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mss_barcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn sp_oneuseqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mss_qty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mm_qty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mss_remain;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mss_useqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_orispeccode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail1;
+        private System.Windows.Forms.DataGridViewImageColumn DeleteRow;
     }
 }

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

@@ -37,10 +37,10 @@ namespace UAS_MES_NEW.Make
         {
             asc.controllInitializeSize(this);
             ma_code.TableName = "make left join product on ma_prodcode=pr_code ";
-            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_craftcode # 工艺路线,pr_detail # 产品名称";
+            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,pr_orispeccode # 型号,ma_craftcode # 工艺路线,pr_detail # 产品名称";
             ma_code.FormName = Name;
             ma_code.DBTitle = "工单查询";
-            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "pr_detail", "ma_craftcode" };
+            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "pr_detail||'-'||pr_orispeccode pr_detail", "ma_craftcode" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
             sc_stepcode.Text = User.CurrentStepCode;
@@ -77,7 +77,7 @@ namespace UAS_MES_NEW.Make
                     {
                         sql.Clear();
                         sql.Append("select cr_code from craft left join craftdetail on cd_crid=cr_id where cr_code in (" + craftcode_condition + ") ");
-                        sql.Append("and cr_prodcode='" + ma_prodcode.Text + "'  and  cr_statuscode='AUDITED'  and  (cd_stepcode='" + User.CurrentStepCode + "'or '" + User.CurrentStepCode + "' in ('CT_1','CT_2') )");
+                        sql.Append("and cr_prodcode='" + ma_prodcode.Text + "'  and  cr_statuscode='AUDITED'  and  (cd_stepcode='" + User.CurrentStepCode + "'or '" + User.CurrentStepCode + "' in ('CT1','CT2') )");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         if (dt.Rows.Count > 0)
                         {
@@ -173,7 +173,7 @@ namespace UAS_MES_NEW.Make
             {
                 sql.Clear();
                 sql.Append("select nvl(mss_makecode,' ') mss_makecode,mss_linecode,mm_prodcode sp_fsoncode,nvl(mss_id,0) mss_id,mm_repprodcode sp_soncode,mss_prodcode,mm_oneuseqty sp_oneuseqty,mss_barcode,nvl(mss_qty,0) mss_qty ,nvl(mss_remain,0)mss_remain,");
-                sql.Append("pr_detail,nvl(mss_useqty,0) mss_useqty from make left join makematerial on mm_maid=ma_id left join Product on mm_prodcode=pr_code ");
+                sql.Append("pr_detail,pr_orispeccode,nvl(mss_useqty,0) mss_useqty from make left join makematerial on mm_maid=ma_id left join Product on mm_prodcode=pr_code ");
                 sql.Append(" left join makesourcestock on  mss_craftcode=ma_craftcode and mss_makecode=ma_code  and mss_linecode = '" + User.UserLineCode + "' ");
                 sql.Append("and mss_stepcode=pr_mncode and nvl(mm_repprodcode,' ')=nvl(mss_prodcode,' ') and mm_prodcode=mss_fprodcode  where ma_prodcode='" + ma_prodcode.Text + "' and ma_craftcode='" + ma_craftcode.Text + "' ");
                 sql.Append("and pr_mncode='" + User.CurrentStepCode + "' and ma_code='" + ma_code.Text + "' order by mm_prodcode");
@@ -192,7 +192,7 @@ namespace UAS_MES_NEW.Make
                 //BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
                 sql.Clear();
                 sql.Append("select nvl(mss_makecode,' ') mss_makecode,mss_linecode,mm_prodcode sp_fsoncode,nvl(mss_id,0) mss_id,mm_repprodcode sp_soncode,mss_prodcode,mm_oneuseqty sp_oneuseqty,mss_barcode,nvl(mss_qty,0) mss_qty ,nvl(mss_remain,0)mss_remain,");
-                sql.Append("pr_detail,nvl(mss_useqty,0) mss_useqty from make left join makematerial on mm_maid=ma_id left join Product on mm_prodcode=pr_code ");
+                sql.Append("pr_detail,pr_orispeccode,nvl(mss_useqty,0) mss_useqty from make left join makematerial on mm_maid=ma_id left join Product on mm_prodcode=pr_code ");
                 sql.Append(" left join makesourcestock on  mss_craftcode=ma_craftcode and mss_makecode=ma_code  and mss_linecode = '" + User.UserLineCode + "' ");
                 sql.Append("and mss_stepcode=pr_mncode and nvl(mm_repprodcode,' ')=nvl(mss_prodcode,' ') and mm_prodcode=mss_fprodcode  where  nvl(ma_prodcode,' ')<>' ' and nvl(ma_craftcode,' ')<> ' ' and ");
                 sql.Append(" pr_mncode='" + User.CurrentStepCode + "'  order by mm_prodcode");
@@ -215,7 +215,7 @@ namespace UAS_MES_NEW.Make
         {
             if (ma_code.Text != "")
             {
-                dt = (DataTable)dh.ExecuteSql("select ma_id,ma_craftcode,ma_statuscode,ma_code,ma_prodcode,pr_spec,pr_detail,ma_bomversion from make left join product on ma_prodcode=pr_code where ma_code='" + ma_code.Text + "'", "select");
+                dt = (DataTable)dh.ExecuteSql("select ma_id,ma_craftcode,ma_statuscode,ma_code,ma_prodcode,pr_spec,pr_detail||'-'||pr_orispeccode pr_detail,ma_bomversion from make left join product on ma_prodcode=pr_code where ma_code='" + ma_code.Text + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
                     ma_id = dt.Rows[0]["ma_id"].ToString();

+ 2 - 2
UAS_MES_ZT/FunctionCode/Make/Make_PositionStockNew.resx

@@ -320,10 +320,10 @@
   <metadata name="mss_useqty.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">
+  <metadata name="pr_orispeccode.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">
+  <metadata name="pr_detail1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="DeleteRow.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

+ 1 - 1
UAS_MES_ZT/FunctionCode/Make/Make_Repair.cs

@@ -249,7 +249,7 @@ namespace UAS_MES_NEW.Make
                         sql.Append("select nvl(ms_badtimes,0)ms_badtimes,max(ms_id) ms_id,ms_makecode,ma_craftcode,ms_stepcode,ms_firstsn,ms_prodcode,ms_sncode,ma_bomversion,pr_detail,ms_craftcode,ms_checkno,ms_ifrework,ms_reworkcheckno ");
                         sql.Append("from makeserial left join make on ms_makecode=ma_code left join product on pr_code=ms_prodcode where ms_makecode ='" + macode + "' and ms_sncode in(");
                         sql.Append("select '" + GetSNCode.Text + "' from dual union select firstsn from makesnrelation where ");
-                        sql.Append("sn='" + GetSNCode.Text + "') group by ms_makecode,ms_stepcode,ms_prodcode,ma_craftcode,ms_sncode,ma_bomversion,pr_detail,ms_firstsn,ms_craftcode,ms_checkno,ms_ifrework,ms_reworkcheckno");
+                        sql.Append("sn='" + GetSNCode.Text + "') group by ms_makecode,ms_stepcode,ms_prodcode,ma_craftcode,ms_sncode,ma_bomversion,pr_detail,ms_firstsn,ms_craftcode,ms_checkno,ms_ifrework,ms_reworkcheckno,ms_badtimes");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         if (dt.Rows.Count > 0)
                         {

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

@@ -249,7 +249,7 @@ namespace UAS_MES_NEW.Make
                         sql.Append("select nvl(ms_badtimes,0)ms_badtimes,max(ms_id) ms_id,ms_makecode,ma_craftcode,ms_stepcode,ms_firstsn,ms_prodcode,ms_sncode,ma_bomversion,pr_detail,ms_craftcode,ms_checkno,ms_ifrework,ms_reworkcheckno ");
                         sql.Append("from makeserial left join make on ms_makecode=ma_code left join product on pr_code=ms_prodcode where ms_makecode ='" + macode + "' and ms_sncode in(");
                         sql.Append("select '" + GetSNCode.Text + "' from dual union select firstsn from makesnrelation where ");
-                        sql.Append("sn='" + GetSNCode.Text + "') group by ms_makecode,ms_stepcode,ms_prodcode,ma_craftcode,ms_sncode,ma_bomversion,pr_detail,ms_firstsn,ms_craftcode,ms_checkno,ms_ifrework,ms_reworkcheckno");
+                        sql.Append("sn='" + GetSNCode.Text + "') group by ms_makecode,ms_stepcode,ms_prodcode,ma_craftcode,ms_sncode,ma_bomversion,pr_detail,ms_firstsn,ms_craftcode,ms_checkno,ms_ifrework,ms_reworkcheckno,ms_badtimes");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         if (dt.Rows.Count > 0)
                         {

+ 25 - 15
UAS_MES_ZT/FunctionCode/Make/Make_SeqTransform.cs

@@ -52,6 +52,11 @@ namespace UAS_MES_NEW.Make
                 {
                     if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out errorMessage))
                     {
+                        if (sncode.Text.Length < 15)
+                        {
+                            OperateResult.AppendText(">>" + sncode.Text + "长度不足无法采集\n", Color.Red);
+                            return;
+                        }
                         OperateResult.AppendText(">>" + sncode.Text + "\n", Color.Black);
                         //如果用户没有输入工单号自行去后台查询
                         //通过工单序列号关系验证
@@ -87,18 +92,23 @@ namespace UAS_MES_NEW.Make
                                         OperateResult.AppendText("<<当前TSN号处于下地状态不允许操作\n", Color.Red, sncode);
                                         return;
                                     }
-                                    if (dt.Rows[0]["ms_stepcode"].ToString() == User.CurrentStepCode)
-                                    {
-                                        bsncode = sncode.Text;
-                                        //显示序列号
-                                        show_sncode.Text = bsncode;
-                                        ChangeResult.Enabled = false;
-                                    }
-                                    else
-                                    {
-                                        OperateResult.AppendText("<<当前工序不允许重新转号\n", Color.Red, sncode);
-                                        return;
-                                    }
+                                    bsncode = sncode.Text;
+                                    //显示序列号
+                                    show_sncode.Text = bsncode;
+                                    ChangeResult.Enabled = false;
+
+                                    //if (dt.Rows[0]["ms_stepcode"].ToString() == User.CurrentStepCode)
+                                    //{
+                                    //    bsncode = sncode.Text;
+                                    //    //显示序列号
+                                    //    show_sncode.Text = bsncode;
+                                    //    ChangeResult.Enabled = false;
+                                    //}
+                                    //else
+                                    //{
+                                    //    OperateResult.AppendText("<<当前工序不允许重新转号\n", Color.Red, sncode);
+                                    //    return;
+                                    //}
                                 }
                                 else
                                 {
@@ -111,7 +121,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 //按照out出的工单号查出工单相关信息,并赋值到相关控件
                                 sql.Clear();
-                                sql.Append("select ma_code,ma_softversion,ma_prodcode,pr_detail,ma_salecode,ma_qty,ma_qty-mcd_inqty as remain_qty ");
+                                sql.Append("select ma_code,ma_softversion,ma_prodcode,pr_detail||'-'||pr_orispeccode pr_detail,ma_salecode,ma_qty,ma_qty-mcd_inqty as remain_qty ");
                                 sql.Append("from makeserial left join make on ms_makecode=ma_code left join product on ");
                                 sql.Append("ms_prodcode=pr_code left join makecraftdetail_view on ms_makecode=mcd_macode where ms_id='" + oMsId + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -232,7 +242,7 @@ namespace UAS_MES_NEW.Make
                                     return;
                             }
                             //防呆验证完成
-                            if ((!ChangeResult.Checked && (!dh.CheckExist("makeserial", "ms_sncode='" + sncode.Text + "' and ms_id <>'" + oMsId + "' and nvl(ms_nextmacode,' ') =' '") && !onlyPass || onlyPass && bsncode == sncode.Text)) || (ChangeResult.Checked && !dh.CheckExist("makeserial", "ms_sncode='" + sncode.Text + "' and ms_id <>'" + oMsId + "' and nvl(ms_nextmacode,' ') =' '")))
+                            if ((!ChangeResult.Checked && (!dh.CheckExist("makeserial", "ms_sncode='" + sncode.Text + "'")&& (!dh.CheckExist("makeserial", "ms_code='" + sncode.Text + "' ")) && !onlyPass )) || (ChangeResult.Checked && !dh.CheckExist("makeserial", "ms_sncode='" + sncode.Text + "' ")))
                             {
                                 if (CollectRemark.Checked || SameReamrk.Checked)
                                 {
@@ -288,7 +298,7 @@ namespace UAS_MES_NEW.Make
                                         //查询ms_firstsn
                                         firstsn = dh.getFieldDataByCondition("makeserial", "ms_firstsn", "ms_id='" + oMsId + "' and  ms_beforesn='" + bsncode + "'").ToString();
                                         //记录本次修改,存入makesnrelation表中
-                                        updateSql = "update makeserial set ms_sncode='" + sncode.Text + "',ms_beforesn='' where ms_id='" + oMsId + "' and  ms_beforesn='" + bsncode + "'";
+                                        updateSql = "update makeserial set ms_sncode='" + sncode.Text + "' where ms_id='" + oMsId + "' and  ms_beforesn='" + bsncode + "'";
                                         //删除最近一条转换记录
                                         dh.ExecuteSql("delete from makesnrelation where BEFORESN='" + bsncode + "' and makecode='" + ma_code.Text + "'", "delete");
                                     }

+ 31 - 20
UAS_MES_ZT/FunctionCode/Make/Make_StepReport.Designer.cs

@@ -43,7 +43,7 @@
             this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.pr_batchnum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.BatchProductDGV = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.BatchProductDGV56 = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
             this.ms_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ms_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ms_stepcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -51,6 +51,7 @@
             this.ms_sourcecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ms_okqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ms_ngqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.AddBad = new System.Windows.Forms.DataGridViewImageColumn();
             this.ms_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.DeleteRow = new System.Windows.Forms.DataGridViewImageColumn();
             this.sc_stepcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
@@ -84,7 +85,7 @@
             this.ngqty = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.normalButton2 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.label8 = new System.Windows.Forms.Label();
-            ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV56)).BeginInit();
             this.SuspendLayout();
             // 
             // ma_code_label
@@ -272,11 +273,11 @@
             this.pr_batchnum.Visible = false;
             this.pr_batchnum.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pr_batchnum_KeyDown);
             // 
-            // BatchProductDGV
+            // BatchProductDGV56
             // 
-            this.BatchProductDGV.AllowUserToAddRows = false;
-            this.BatchProductDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.BatchProductDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.BatchProductDGV56.AllowUserToAddRows = false;
+            this.BatchProductDGV56.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.BatchProductDGV56.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.ms_id,
             this.ms_makecode,
             this.ms_stepcode,
@@ -284,19 +285,19 @@
             this.ms_sourcecode,
             this.ms_okqty,
             this.ms_ngqty,
+            this.AddBad,
             this.ms_indate,
             this.DeleteRow});
-            this.BatchProductDGV.EnableContentClick = true;
-            this.BatchProductDGV.Location = new System.Drawing.Point(0, 128);
-            this.BatchProductDGV.Margin = new System.Windows.Forms.Padding(4);
-            this.BatchProductDGV.Name = "BatchProductDGV";
-            this.BatchProductDGV.RowTemplate.Height = 23;
-            this.BatchProductDGV.Size = new System.Drawing.Size(1032, 421);
-            this.BatchProductDGV.TabIndex = 174;
-            this.BatchProductDGV.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.BatchProduct_CellContentClick);
-            this.BatchProductDGV.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.BatchProductDGV_CellEndEdit);
-            this.BatchProductDGV.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.BatchProductDGV_CellFormatting);
-            this.BatchProductDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.BatchProductDGV_CellPainting);
+            this.BatchProductDGV56.EnableContentClick = true;
+            this.BatchProductDGV56.Location = new System.Drawing.Point(0, 128);
+            this.BatchProductDGV56.Margin = new System.Windows.Forms.Padding(4);
+            this.BatchProductDGV56.Name = "BatchProductDGV56";
+            this.BatchProductDGV56.RowTemplate.Height = 23;
+            this.BatchProductDGV56.Size = new System.Drawing.Size(1032, 421);
+            this.BatchProductDGV56.TabIndex = 174;
+            this.BatchProductDGV56.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.BatchProduct_CellContentClick);
+            this.BatchProductDGV56.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.BatchProductDGV_CellFormatting);
+            this.BatchProductDGV56.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.BatchProductDGV_CellPainting);
             // 
             // ms_id
             // 
@@ -349,6 +350,15 @@
             this.ms_ngqty.Name = "ms_ngqty";
             this.ms_ngqty.ReadOnly = true;
             // 
+            // AddBad
+            // 
+            this.AddBad.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.AddBad.HeaderText = "";
+            this.AddBad.Image = global::UAS_MES_NEW.Properties.Resources.plus;
+            this.AddBad.Name = "AddBad";
+            this.AddBad.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.AddBad.Width = 20;
+            // 
             // ms_indate
             // 
             this.ms_indate.DataPropertyName = "ms_indate";
@@ -713,7 +723,7 @@
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.pr_batchnum);
             this.Controls.Add(this.label3);
-            this.Controls.Add(this.BatchProductDGV);
+            this.Controls.Add(this.BatchProductDGV56);
             this.Controls.Add(this.sc_stepcode);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.ma_prodcode);
@@ -729,7 +739,7 @@
             this.Text = "工序报工";
             this.Load += new System.EventHandler(this.Make_PositionStock_Load);
             this.SizeChanged += new System.EventHandler(this.Make_PositionStock_SizeChanged);
-            ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV56)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -742,7 +752,7 @@
         private System.Windows.Forms.Label ma_prodcode_label;
         private CustomControl.ValueLabel.ValueLabel ma_prodcode;
         private CustomControl.ValueLabel.ValueLabel pr_detail;
-        private CustomControl.DataGrid_View.DataGridViewWithSerialNum BatchProductDGV;
+        private CustomControl.DataGrid_View.DataGridViewWithSerialNum BatchProductDGV56;
         private CustomControl.TextBoxWithIcon.EnterTextBox pr_batchnum;
         private System.Windows.Forms.Label label3;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
@@ -789,6 +799,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ms_sourcecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn ms_okqty;
         private System.Windows.Forms.DataGridViewTextBoxColumn ms_ngqty;
+        private System.Windows.Forms.DataGridViewImageColumn AddBad;
         private System.Windows.Forms.DataGridViewTextBoxColumn ms_indate;
         private System.Windows.Forms.DataGridViewImageColumn DeleteRow;
     }

+ 27 - 7
UAS_MES_ZT/FunctionCode/Make/Make_StepReport.cs

@@ -22,6 +22,7 @@ namespace UAS_MES_NEW.Make
 
         DataTable Dbfind;
 
+
         string ma_id;
         //上一次查询的工单号
         string last_macoe = "";
@@ -81,7 +82,7 @@ namespace UAS_MES_NEW.Make
             sql.Append("select ms_id,ms_makecode,ms_prodcode,ms_stepcode,ms_linecode,ms_sourcecode,ms_man,ms_indate,ms_okqty,ms_ngqty from MES_STEPREPORT ");
             sql.Append("where ms_makecode = '"+ma_code.Text+"' and ms_stepcode = '"+User.CurrentStepCode+"' and ms_status = 0");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-            BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
+            BaseUtil.FillDgvWithDataTable(BatchProductDGV56, dt);
             sql.Clear();
             sql.Append("select sum(ms_okqty)oksum,sum(ms_ngqty)ngsum from MES_STEPREPORT ");
             sql.Append("where ms_makecode = '" + ma_code.Text + "' and ms_stepcode = '" + User.CurrentStepCode + "' and ms_status = 0");
@@ -117,11 +118,11 @@ namespace UAS_MES_NEW.Make
 
         private void BatchProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
         {
-            if (BatchProductDGV.Columns[e.ColumnIndex].Name == "DeleteRow")
+            if (BatchProductDGV56.Columns[e.ColumnIndex].Name == "DeleteRow")
             {
                 if (e.RowIndex >= 0)
                 {
-                    string id = BatchProductDGV.Rows[e.RowIndex].Cells["ms_id"].Value.ToString();
+                    string id = BatchProductDGV56.Rows[e.RowIndex].Cells["ms_id"].Value.ToString();
                     if (id != "0")
                     {
                         dh.ExecuteSql("update MES_STEPREPORT set ms_status =-1 where ms_id='" + id + "'", "delete");
@@ -138,6 +139,25 @@ namespace UAS_MES_NEW.Make
                     }
                 }
             }
+            if (BatchProductDGV56.Columns[e.ColumnIndex].Name == "AddBad")
+            {
+                if (e.RowIndex >= 0)
+                {
+                    string id = BatchProductDGV56.Rows[e.RowIndex].Cells["ms_id"].Value.ToString();
+                    double ngqty = double.Parse(BatchProductDGV56.Rows[e.RowIndex].Cells["ms_ngqty"].Value.ToString());
+                    if (ma_code.Text == "" || ngqty == 0)
+                    {
+                        OperateResult.AppendText(">>工单号与不良不允许为空\n", Color.Red);
+                    }
+                    else
+                    {
+                        Make_StepReportDetail badcode = new Make_StepReportDetail(id, ngqty,ma_code.Text);
+                        BaseUtil.SetFormCenter(badcode);
+                        badcode.ShowDialog();
+                    }
+
+                }
+            }
         }
 
         private void ma_code_UserControlTextChanged(object sender, EventArgs e)
@@ -178,9 +198,9 @@ namespace UAS_MES_NEW.Make
 
         private void BatchProductDGV_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
         {
-            if (BatchProductDGV.Columns[e.ColumnIndex].Name == "DeleteRow")
+            if (BatchProductDGV56.Columns[e.ColumnIndex].Name == "DeleteRow")
             {
-                if (BatchProductDGV.Rows[e.RowIndex].Cells["ms_id"].Value.ToString() == "0")
+                if (BatchProductDGV56.Rows[e.RowIndex].Cells["ms_id"].Value.ToString() == "0")
                     e.Value = Properties.Resources.WhiteImage;
                 else
                     e.Value = Properties.Resources.bindingNavigatorDeleteItem_Image;
@@ -197,7 +217,7 @@ namespace UAS_MES_NEW.Make
             bool mouseOver = e.CellBounds.Contains(this.PointToClient(Cursor.Position));
             if (e.ColumnIndex > 0)
             {
-                if (BatchProductDGV.Columns[e.ColumnIndex].Name == "mss_remain")
+                if (BatchProductDGV56.Columns[e.ColumnIndex].Name == "mss_remain")
                 {
                     SolidBrush solidBrush = new SolidBrush(Color.FromArgb(51, 153, 255));
                     e.Graphics.FillRectangle(mouseOver ? solidBrush : Brushes.LightSeaGreen, e.CellBounds);
@@ -239,7 +259,7 @@ namespace UAS_MES_NEW.Make
                 DataTable dtb;
                 sql.Clear();
                 sql.Append(" select wm_concat(mm_prodcode)mm_prodcode,count(1)cn from (select MAX(mm_oneuseqty) baseqty,mm_prodcode from make left join makematerial on mm_maid=ma_id left join Product on mm_prodcode=pr_code ");
-                sql.Append(" where ma_prodcode='"+ma_prodcode.Text+"' and ma_code='"+ma_code.Text+"'  and pr_mncode='"+User.CurrentStepCode+"'  GROUP BY mm_prodcode) B left join  ");
+                sql.Append(" where ma_prodcode='"+ma_prodcode.Text+"' and ma_code='"+ma_code.Text+"'  and pr_mncode='"+User.CurrentStepCode+ "'and mm_oneuseqty>0  GROUP BY mm_prodcode) B left join  ");
                 sql.Append(" (select sum(nvl(mss_remain,0))remain,mss_fprodcode from makesourcestock  where  mss_linecode='"+User.UserLineCode+"' and mss_stepcode='" + User.CurrentStepCode + "' group by mss_fprodcode)A  ");
                 sql.Append(" on mm_prodcode=mss_fprodcode where (nvl(mss_fprodcode,' ')=' ' or  A.remain<b.baseqty*"+(ok+ng)+") AND rownum<20  ");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");

+ 3 - 0
UAS_MES_ZT/FunctionCode/Make/Make_StepReport.resx

@@ -270,6 +270,9 @@
   <metadata name="ms_ngqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="AddBad.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="ms_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 292 - 0
UAS_MES_ZT/FunctionCode/Make/Make_StepReportDetail.Designer.cs

@@ -0,0 +1,292 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_StepReportDetail
+    {
+        /// <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.headBar1 = new UAS_MES_NEW.CustomControl.HeadBar();
+            this.BatchProductDGV = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.msd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_msid = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_badname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DeleteRow = new System.Windows.Forms.DataGridViewImageColumn();
+            this.label7 = new System.Windows.Forms.Label();
+            this.ngqty = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.ngsum = new System.Windows.Forms.Label();
+            this.stepcode = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.comBoxWithFocus1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
+            this.ma_code = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.button1 = new System.Windows.Forms.Button();
+            ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // headBar1
+            // 
+            this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.headBar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.headBar1.Location = new System.Drawing.Point(0, 0);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(6);
+            this.headBar1.Name = "headBar1";
+            this.headBar1.Size = new System.Drawing.Size(929, 47);
+            this.headBar1.TabIndex = 0;
+            this.headBar1.Title = null;
+            this.headBar1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.headBar1_MouseDown);
+            // 
+            // BatchProductDGV
+            // 
+            this.BatchProductDGV.AllowUserToAddRows = false;
+            this.BatchProductDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.BatchProductDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.msd_id,
+            this.msd_msid,
+            this.msd_badname,
+            this.msd_qty,
+            this.msd_indate,
+            this.DeleteRow});
+            this.BatchProductDGV.EnableContentClick = true;
+            this.BatchProductDGV.Location = new System.Drawing.Point(13, 116);
+            this.BatchProductDGV.Margin = new System.Windows.Forms.Padding(4);
+            this.BatchProductDGV.Name = "BatchProductDGV";
+            this.BatchProductDGV.RowTemplate.Height = 23;
+            this.BatchProductDGV.Size = new System.Drawing.Size(894, 421);
+            this.BatchProductDGV.TabIndex = 175;
+            this.BatchProductDGV.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.BatchProductDGV_CellContentClick66);
+            this.BatchProductDGV.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.BatchProductDGV_CellFormatting12);
+            // 
+            // msd_id
+            // 
+            this.msd_id.DataPropertyName = "msd_id";
+            this.msd_id.HeaderText = "ID";
+            this.msd_id.Name = "msd_id";
+            this.msd_id.Visible = false;
+            // 
+            // msd_msid
+            // 
+            this.msd_msid.DataPropertyName = "msd_msid";
+            this.msd_msid.HeaderText = "";
+            this.msd_msid.Name = "msd_msid";
+            this.msd_msid.ReadOnly = true;
+            this.msd_msid.Visible = false;
+            // 
+            // msd_badname
+            // 
+            this.msd_badname.DataPropertyName = "msd_badname";
+            this.msd_badname.HeaderText = "不良现象";
+            this.msd_badname.Name = "msd_badname";
+            this.msd_badname.ReadOnly = true;
+            // 
+            // msd_qty
+            // 
+            this.msd_qty.DataPropertyName = "msd_qty";
+            this.msd_qty.HeaderText = "不良数";
+            this.msd_qty.Name = "msd_qty";
+            this.msd_qty.ReadOnly = true;
+            // 
+            // msd_indate
+            // 
+            this.msd_indate.DataPropertyName = "msd_indate";
+            this.msd_indate.HeaderText = "录入时间";
+            this.msd_indate.Name = "msd_indate";
+            this.msd_indate.ReadOnly = true;
+            // 
+            // DeleteRow
+            // 
+            this.DeleteRow.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.DeleteRow.HeaderText = "删除";
+            this.DeleteRow.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeleteRow.Name = "DeleteRow";
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(45, 588);
+            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(134, 31);
+            this.label7.TabIndex = 243;
+            this.label7.Text = "不良数录入";
+            // 
+            // ngqty
+            // 
+            this.ngqty.AllPower = null;
+            this.ngqty.BackColor = System.Drawing.Color.White;
+            this.ngqty.ID = null;
+            this.ngqty.Location = new System.Drawing.Point(178, 587);
+            this.ngqty.Name = "ngqty";
+            this.ngqty.Negative = false;
+            this.ngqty.Power = null;
+            this.ngqty.Size = new System.Drawing.Size(204, 28);
+            this.ngqty.Str = null;
+            this.ngqty.Str1 = null;
+            this.ngqty.Str2 = null;
+            this.ngqty.TabIndex = 242;
+            // 
+            // 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(45, 64);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(110, 31);
+            this.label1.TabIndex = 245;
+            this.label1.Text = "总不良数";
+            // 
+            // ngsum
+            // 
+            this.ngsum.AutoSize = true;
+            this.ngsum.Location = new System.Drawing.Point(162, 74);
+            this.ngsum.Name = "ngsum";
+            this.ngsum.Size = new System.Drawing.Size(0, 18);
+            this.ngsum.TabIndex = 246;
+            // 
+            // stepcode
+            // 
+            this.stepcode.AutoSize = true;
+            this.stepcode.Location = new System.Drawing.Point(703, 74);
+            this.stepcode.Name = "stepcode";
+            this.stepcode.Size = new System.Drawing.Size(0, 18);
+            this.stepcode.TabIndex = 248;
+            // 
+            // 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(634, 64);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(62, 31);
+            this.label3.TabIndex = 247;
+            this.label3.Text = "工序";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(61, 550);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(110, 31);
+            this.label2.TabIndex = 249;
+            this.label2.Text = "不良现象";
+            // 
+            // comBoxWithFocus1
+            // 
+            this.comBoxWithFocus1.FormattingEnabled = true;
+            this.comBoxWithFocus1.Location = new System.Drawing.Point(178, 555);
+            this.comBoxWithFocus1.Name = "comBoxWithFocus1";
+            this.comBoxWithFocus1.Size = new System.Drawing.Size(204, 26);
+            this.comBoxWithFocus1.TabIndex = 250;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AutoSize = true;
+            this.ma_code.Location = new System.Drawing.Point(412, 74);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Size = new System.Drawing.Size(0, 18);
+            this.ma_code.TabIndex = 252;
+            // 
+            // 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(343, 64);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(62, 31);
+            this.label5.TabIndex = 251;
+            this.label5.Text = "工单";
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(538, 587);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(75, 23);
+            this.button1.TabIndex = 253;
+            this.button1.Text = "button1";
+            this.button1.UseVisualStyleBackColor = true;
+            // 
+            // Make_StepReportDetail
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(929, 630);
+            this.Controls.Add(this.button1);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.comBoxWithFocus1);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.stepcode);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.ngsum);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.ngqty);
+            this.Controls.Add(this.BatchProductDGV);
+            this.Controls.Add(this.headBar1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(3);
+            this.Name = "Make_StepReportDetail";
+            this.Text = "Make_StepReportDetail";
+            this.Load += new System.EventHandler(this.Warehouse_ProdDetail_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.HeadBar headBar1;
+        private CustomControl.DataGrid_View.DataGridViewWithSerialNum BatchProductDGV;
+        private System.Windows.Forms.Label label7;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox ngqty;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label ngsum;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_msid;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_badname;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_qty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_indate;
+        private System.Windows.Forms.DataGridViewImageColumn DeleteRow;
+        private System.Windows.Forms.Label stepcode;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.ComBoxWithFocus.ComBoxWithFocus comBoxWithFocus1;
+        private System.Windows.Forms.Label ma_code;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Button button1;
+    }
+}

+ 145 - 0
UAS_MES_ZT/FunctionCode/Make/Make_StepReportDetail.cs

@@ -0,0 +1,145 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_StepReportDetail : CustomControl.BaseForm.BaseForm
+    {
+        //所有用到了headBar的部分都需要这段代码
+        [DllImport("user32.dll")]
+        public static extern bool ReleaseCapture();
+
+        [DllImport("user32.dll")]
+        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
+
+        [DllImport("user32.dll", EntryPoint = "GetWindowLong", CharSet = CharSet.Auto)]
+        public static extern int GetWindowLong(HandleRef hWnd, int nIndex);
+
+        [DllImport("user32.dll", EntryPoint = "SetWindowLong", CharSet = CharSet.Auto)]
+        public static extern IntPtr SetWindowLong(HandleRef hWnd, int nIndex, int dwNewLong);
+
+        public const int WM_SYSCOMMAND = 0x0112;
+        public const int SC_MOVE = 0xF010;
+        public const int HTCAPTION = 0x0002;
+
+
+        DataHelper dh;
+        LogStringBuilder sql = new LogStringBuilder();
+
+
+        string msid;
+        double badqty;
+        string macode;
+
+        public Make_StepReportDetail(string msid, double badqty, string macode)
+        {
+            dh = SystemInf.dh;
+            InitializeComponent();
+            this.msid = msid;
+            this.badqty = badqty;
+            this.macode = macode;
+        }
+
+        private void Warehouse_ProdDetail_Load(object sender, EventArgs e)
+        {
+            ngsum.Text = badqty.ToString();
+            ma_code.Text = macode;
+            stepcode.Text = User.CurrentStepCode;
+            comBoxWithFocus1.Items.Add("1234");
+            FillDataGridView();
+        }
+
+        private void headBar1_MouseDown(object sender, MouseEventArgs e)
+        {
+            ReleaseCapture();
+            SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
+        }
+
+        private void BatchProductDGV_CellContentClick66(object sender, DataGridViewCellEventArgs e)
+        {
+            if (BatchProductDGV.Columns[e.ColumnIndex].Name == "DeleteRow")
+            {
+                if (e.RowIndex >= 0)
+                {
+                    string id = BatchProductDGV.Rows[e.RowIndex].Cells["msd_id"].Value.ToString();
+                    if (id != "0")
+                    {
+                        dh.ExecuteSql("update MES_STEPREPORTdet set msd_status =-1 where msd_id='" + id + "'", "delete");
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "工序不良报工", "删除记录" + id, "", "");
+                        FillDataGridView();
+                    }
+                }
+            }
+        }
+
+        private void FillDataGridView()
+        {
+            sql.Clear();
+            sql.Append("select msd_id,msd_msid,msd_badname,msd_qty,msd_indate,msd_status,msd_stepcode from MES_STEPREPORTdet ");
+            sql.Append("where msd_msid = '" + msid + "' and msd_stepcode = '" + User.CurrentStepCode + "' and msd_status = 0");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            
+        }
+
+        private void BatchProductDGV_CellFormatting12(object sender, DataGridViewCellFormattingEventArgs e)
+        {
+            if (BatchProductDGV.Columns[e.ColumnIndex].Name == "DeleteRow")
+            {
+                if (BatchProductDGV.Rows[e.RowIndex].Cells["msd_id"].Value.ToString() == "0")
+                    e.Value = Properties.Resources.WhiteImage;
+                else
+                    e.Value = Properties.Resources.bindingNavigatorDeleteItem_Image;
+            }
+        }
+
+
+        //try
+        //{
+        //    if (comBoxWithFocus1.Text == "" || ngqty.Text == "")
+        //    {
+        //        MessageBox.Show("必填项为空");
+        //        return;
+        //    }
+        //    double ng = double.Parse(ngqty.Text);
+        //    double nowng = double.Parse(dh.getFieldDataByCondition("MES_STEPREPORTdet", "nvl(sum(msd_qty),0)", " msd_msid = '" + msid + "' and msd_stepcode = '" + User.CurrentStepCode + "' and msd_status = 0 ").ToString());
+        //    if (nowng + double.Parse(ngqty.Text) > badqty)
+        //    {
+        //        MessageBox.Show("已录入不良" + nowng + "+待录入不良" + ng + "大于不良总数" + badqty + "");
+        //        return;
+        //    }
+        //    else
+        //    {
+        //        string msdid = dh.GetSEQ("MES_STEPREPORTDET_seq");
+        //        sql.Clear();
+        //        sql.Append("insert into MES_STEPREPORTdet (MSD_ID,MSD_MSID,MSD_BADNAME ,MSD_QTY,");
+        //        sql.Append("MSD_INDATE,MSD_STATUS,MSD_STEPCODE");
+        //        sql.Append(") values(" + msdid + "," + msd_id + ",'" + comBoxWithFocus1.Text + "',");
+        //        sql.Append("'" + ng + "',sysdate,'0','" + User.CurrentStepCode + "')");
+        //        dh.ExecuteSql(sql.GetString(), "insert");
+        //        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "工序不良报工", "现象:" + comBoxWithFocus1.Text + ",数量:" + ng + "", "", "");
+        //        FillDataGridView();
+        //        comBoxWithFocus1.Text = "";
+        //        ngqty.Text = "";
+        //    }
+        //}
+        //catch (Exception ex)
+        //{
+        //    Console.WriteLine(ex.Message);
+        //}
+    }
+}

+ 156 - 0
UAS_MES_ZT/FunctionCode/Make/Make_StepReportDetail.resx

@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="msd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="msd_msid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="msd_badname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="msd_qty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="msd_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="DeleteRow.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="msd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="msd_msid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="msd_badname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="msd_qty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="msd_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="DeleteRow.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>

+ 232 - 163
UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -59,17 +59,10 @@ namespace UAS_MES_NEW.Make
             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.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.ob_checkno = new System.Windows.Forms.Label();
-            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.ma_softversion_label = new System.Windows.Forms.Label();
             this.BadInfSource = new System.Windows.Forms.BindingSource(this.components);
@@ -87,13 +80,23 @@ namespace UAS_MES_NEW.Make
             this.label11 = new System.Windows.Forms.Label();
             this.XmlWatcher = new System.IO.FileSystemWatcher();
             this.bidui = new System.Windows.Forms.CheckBox();
+            this.label12 = new System.Windows.Forms.Label();
+            this.ob_batchqty_label = new System.Windows.Forms.Label();
+            this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
+            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_totalng = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.biduisn = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.mcd_okqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_ngqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.PrintList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.normalButton1 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.Filter = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
-            this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ma_softversion = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.Save = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.AutoBadCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
@@ -110,6 +113,8 @@ namespace UAS_MES_NEW.Make
             this.bc_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.bc_groupcode = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.ms_sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.lastsn = new System.Windows.Forms.Label();
+            this.lastresult = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.XmlWatcher)).BeginInit();
             this.SuspendLayout();
@@ -331,7 +336,7 @@ namespace UAS_MES_NEW.Make
             // 
             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(430, 21);
+            this.ma_qty_label.Location = new System.Drawing.Point(411, 21);
             this.ma_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_qty_label.Name = "ma_qty_label";
             this.ma_qty_label.Size = new System.Drawing.Size(110, 31);
@@ -364,7 +369,7 @@ namespace UAS_MES_NEW.Make
             // 
             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(1051, 32);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(900, 32);
             this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
             this.mcd_inqty_label.Size = new System.Drawing.Size(110, 31);
@@ -375,79 +380,40 @@ namespace UAS_MES_NEW.Make
             // 
             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(839, 32);
+            this.mc_restqty_label.Location = new System.Drawing.Point(688, 32);
             this.mc_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mc_restqty_label.Name = "mc_restqty_label";
             this.mc_restqty_label.Size = new System.Drawing.Size(110, 31);
             this.mc_restqty_label.TabIndex = 17;
             this.mc_restqty_label.Text = "待采集数";
             // 
-            // 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(986, 150);
-            this.mcd_totalng.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_totalng.MaximumSize = new System.Drawing.Size(225, 0);
-            this.mcd_totalng.Name = "mcd_totalng";
-            this.mcd_totalng.Size = new System.Drawing.Size(0, 31);
-            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(839, 150);
+            this.label9.Location = new System.Drawing.Point(688, 150);
             this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(134, 31);
             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(1190, 89);
-            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_okqty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.mcd_okqty.Name = "mcd_okqty";
-            this.mcd_okqty.Size = new System.Drawing.Size(0, 31);
-            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(1053, 89);
+            this.label8.Location = new System.Drawing.Point(902, 89);
             this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(86, 31);
             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(986, 89);
-            this.mcd_ngqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_ngqty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.mcd_ngqty.Name = "mcd_ngqty";
-            this.mcd_ngqty.Size = new System.Drawing.Size(0, 31);
-            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(839, 89);
+            this.label1.Location = new System.Drawing.Point(688, 89);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(134, 31);
@@ -459,7 +425,7 @@ namespace UAS_MES_NEW.Make
             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(1587, 510);
+            this.ob_checkno.Location = new System.Drawing.Point(1448, 538);
             this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 31);
@@ -468,75 +434,16 @@ namespace UAS_MES_NEW.Make
             this.ob_checkno.Visible = false;
             this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
             // 
-            // SendCheck
-            // 
-            this.SendCheck.AllPower = null;
-            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
-            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
-            this.SendCheck.Enabled = false;
-            this.SendCheck.Image = null;
-            this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(1159, 149);
-            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
-            this.SendCheck.Name = "SendCheck";
-            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
-            this.SendCheck.Power = null;
-            this.SendCheck.Size = new System.Drawing.Size(98, 39);
-            this.SendCheck.TabIndex = 72;
-            this.SendCheck.Text = "送检";
-            this.SendCheck.UseVisualStyleBackColor = false;
-            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
-            // 
-            // ob_batchqty
-            // 
-            this.ob_batchqty.AutoSize = true;
-            this.ob_batchqty.CutLength = null;
-            this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_batchqty.Location = new System.Drawing.Point(1097, 149);
-            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_batchqty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.ob_batchqty.Name = "ob_batchqty";
-            this.ob_batchqty.Size = new System.Drawing.Size(0, 31);
-            this.ob_batchqty.TabIndex = 75;
-            this.ob_batchqty.Tag = "ob_batchqty";
-            // 
-            // 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(986, 32);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 31);
-            this.mcd_remainqty.TabIndex = 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(1187, 32);
-            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_inqty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 31);
-            this.mcd_inqty.TabIndex = 54;
-            this.mcd_inqty.Tag = "mcd_inqty";
-            // 
             // 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(430, 96);
+            this.pr_detail_label.Location = new System.Drawing.Point(324, 96);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(110, 31);
+            this.pr_detail_label.Size = new System.Drawing.Size(62, 31);
             this.pr_detail_label.TabIndex = 6;
-            this.pr_detail_label.Text = "产品规格";
+            this.pr_detail_label.Text = "型号";
             // 
             // ma_softversion_label
             // 
@@ -553,7 +460,7 @@ namespace UAS_MES_NEW.Make
             // 
             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(435, 168);
+            this.NoteForChange.Location = new System.Drawing.Point(329, 168);
             this.NoteForChange.Name = "NoteForChange";
             this.NoteForChange.Size = new System.Drawing.Size(144, 28);
             this.NoteForChange.TabIndex = 75;
@@ -597,7 +504,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.StopWatch.Enabled = false;
             this.StopWatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.StopWatch.Location = new System.Drawing.Point(784, 370);
+            this.StopWatch.Location = new System.Drawing.Point(1454, 615);
             this.StopWatch.Name = "StopWatch";
             this.StopWatch.Size = new System.Drawing.Size(96, 42);
             this.StopWatch.TabIndex = 214;
@@ -609,7 +516,7 @@ namespace UAS_MES_NEW.Make
             // 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(620, 370);
+            this.StartWatch.Location = new System.Drawing.Point(1457, 474);
             this.StartWatch.Name = "StartWatch";
             this.StartWatch.Size = new System.Drawing.Size(96, 42);
             this.StartWatch.TabIndex = 213;
@@ -621,7 +528,7 @@ namespace UAS_MES_NEW.Make
             // ChooseFolder
             // 
             this.ChooseFolder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ChooseFolder.Location = new System.Drawing.Point(825, 328);
+            this.ChooseFolder.Location = new System.Drawing.Point(1423, 352);
             this.ChooseFolder.Name = "ChooseFolder";
             this.ChooseFolder.Size = new System.Drawing.Size(117, 36);
             this.ChooseFolder.TabIndex = 212;
@@ -633,7 +540,7 @@ namespace UAS_MES_NEW.Make
             // FolderPath
             // 
             this.FolderPath.Enabled = false;
-            this.FolderPath.Location = new System.Drawing.Point(566, 332);
+            this.FolderPath.Location = new System.Drawing.Point(1317, 572);
             this.FolderPath.Name = "FolderPath";
             this.FolderPath.Size = new System.Drawing.Size(236, 28);
             this.FolderPath.TabIndex = 211;
@@ -643,7 +550,7 @@ namespace UAS_MES_NEW.Make
             // 
             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(658, 279);
+            this.label7.Location = new System.Drawing.Point(1418, 235);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(123, 30);
             this.label7.TabIndex = 210;
@@ -689,6 +596,97 @@ namespace UAS_MES_NEW.Make
             this.bidui.Text = "人员采集";
             this.bidui.UseVisualStyleBackColor = true;
             // 
+            // label12
+            // 
+            this.label12.AutoSize = true;
+            this.label12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label12.ForeColor = System.Drawing.Color.Black;
+            this.label12.Location = new System.Drawing.Point(1076, 150);
+            this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(110, 31);
+            this.label12.TabIndex = 223;
+            this.label12.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(1076, 32);
+            this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_batchqty_label.Name = "ob_batchqty_label";
+            this.ob_batchqty_label.Size = new System.Drawing.Size(110, 31);
+            this.ob_batchqty_label.TabIndex = 221;
+            this.ob_batchqty_label.Text = "抽检批数";
+            // 
+            // 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(1076, 89);
+            this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
+            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(110, 31);
+            this.ob_nowcheckqty_label.TabIndex = 219;
+            this.ob_nowcheckqty_label.Text = "当前批数";
+            // 
+            // ob_sendqty
+            // 
+            this.ob_sendqty.AutoSize = true;
+            this.ob_sendqty.CutLength = null;
+            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_sendqty.Location = new System.Drawing.Point(1216, 150);
+            this.ob_sendqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_sendqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ob_sendqty.Name = "ob_sendqty";
+            this.ob_sendqty.Size = new System.Drawing.Size(0, 31);
+            this.ob_sendqty.TabIndex = 224;
+            this.ob_sendqty.Tag = "ob_batchqty";
+            // 
+            // 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(1216, 32);
+            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_batchqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ob_batchqty.Name = "ob_batchqty";
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 31);
+            this.ob_batchqty.TabIndex = 222;
+            this.ob_batchqty.Tag = "ob_batchqty";
+            // 
+            // ob_nowcheckqty
+            // 
+            this.ob_nowcheckqty.AutoSize = true;
+            this.ob_nowcheckqty.CutLength = null;
+            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(1212, 89);
+            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 31);
+            this.ob_nowcheckqty.TabIndex = 220;
+            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
+            // 
+            // 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(835, 150);
+            this.mcd_totalng.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_totalng.MaximumSize = new System.Drawing.Size(225, 0);
+            this.mcd_totalng.Name = "mcd_totalng";
+            this.mcd_totalng.Size = new System.Drawing.Size(0, 31);
+            this.mcd_totalng.TabIndex = 84;
+            this.mcd_totalng.Tag = "mcd_inqty";
+            // 
             // biduisn
             // 
             this.biduisn.AllPower = "ifall";
@@ -708,14 +706,73 @@ namespace UAS_MES_NEW.Make
             this.biduisn.Tag = "IfRead";
             this.biduisn.KeyDown += new System.Windows.Forms.KeyEventHandler(this.biduisn_KeyDown);
             // 
+            // 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(1039, 89);
+            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_okqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.mcd_okqty.Name = "mcd_okqty";
+            this.mcd_okqty.Size = new System.Drawing.Size(0, 31);
+            this.mcd_okqty.TabIndex = 82;
+            this.mcd_okqty.Tag = "mcd_inqty";
+            // 
+            // 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(835, 89);
+            this.mcd_ngqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_ngqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.mcd_ngqty.Name = "mcd_ngqty";
+            this.mcd_ngqty.Size = new System.Drawing.Size(0, 31);
+            this.mcd_ngqty.TabIndex = 80;
+            this.mcd_ngqty.Tag = "mcd_inqty";
+            // 
+            // 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(912, 150);
+            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
+            this.SendCheck.Name = "SendCheck";
+            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
+            this.SendCheck.Power = null;
+            this.SendCheck.Size = new System.Drawing.Size(98, 39);
+            this.SendCheck.TabIndex = 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(835, 32);
+            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 31);
+            this.mcd_remainqty.TabIndex = 57;
+            this.mcd_remainqty.Tag = "mcd_remainqty";
+            // 
             // PrintList
             // 
             this.PrintList.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.PrintList.Location = new System.Drawing.Point(747, 226);
+            this.PrintList.Location = new System.Drawing.Point(1376, 117);
             this.PrintList.Margin = new System.Windows.Forms.Padding(9, 10, 9, 10);
             this.PrintList.Name = "PrintList";
             this.PrintList.Size = new System.Drawing.Size(204, 42);
             this.PrintList.TabIndex = 198;
+            this.PrintList.Visible = false;
             // 
             // normalButton1
             // 
@@ -724,7 +781,7 @@ namespace UAS_MES_NEW.Make
             this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
             this.normalButton1.Image = null;
             this.normalButton1.IsShowBorder = true;
-            this.normalButton1.Location = new System.Drawing.Point(747, 406);
+            this.normalButton1.Location = new System.Drawing.Point(1397, 395);
             this.normalButton1.Margin = new System.Windows.Forms.Padding(4);
             this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
             this.normalButton1.Name = "normalButton1";
@@ -737,20 +794,18 @@ namespace UAS_MES_NEW.Make
             this.normalButton1.Visible = false;
             this.normalButton1.Click += new System.EventHandler(this.normalButton1_Click);
             // 
-            // ob_sendqty
+            // mcd_inqty
             // 
-            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(645, 180);
-            this.ob_sendqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_sendqty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.ob_sendqty.Name = "ob_sendqty";
-            this.ob_sendqty.Size = new System.Drawing.Size(0, 31);
-            this.ob_sendqty.TabIndex = 78;
-            this.ob_sendqty.Tag = "ob_batchqty";
-            this.ob_sendqty.Visible = false;
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.CutLength = null;
+            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty.Location = new System.Drawing.Point(1036, 32);
+            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_inqty.MaximumSize = new System.Drawing.Size(225, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 31);
+            this.mcd_inqty.TabIndex = 54;
+            this.mcd_inqty.Tag = "mcd_inqty";
             // 
             // StepCount
             // 
@@ -774,21 +829,6 @@ namespace UAS_MES_NEW.Make
             this.Filter.TabIndex = 76;
             this.Filter.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.Filter_UserControlTextChanged);
             // 
-            // 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(726, 180);
-            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(225, 0);
-            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 31);
-            this.ob_nowcheckqty.TabIndex = 73;
-            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
-            this.ob_nowcheckqty.Visible = false;
-            // 
             // ma_softversion
             // 
             this.ma_softversion.AutoSize = true;
@@ -874,7 +914,7 @@ namespace UAS_MES_NEW.Make
             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(336, 22);
+            this.LockMakeCode.Location = new System.Drawing.Point(319, 25);
             this.LockMakeCode.Name = "LockMakeCode";
             this.LockMakeCode.Size = new System.Drawing.Size(72, 28);
             this.LockMakeCode.TabIndex = 66;
@@ -886,7 +926,7 @@ namespace UAS_MES_NEW.Make
             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(561, 96);
+            this.pr_spec.Location = new System.Drawing.Point(455, 96);
             this.pr_spec.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_spec.MaximumSize = new System.Drawing.Size(270, 0);
             this.pr_spec.Name = "pr_spec";
@@ -898,7 +938,7 @@ namespace UAS_MES_NEW.Make
             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(560, 21);
+            this.ma_qty.Location = new System.Drawing.Point(541, 21);
             this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_qty.MaximumSize = new System.Drawing.Size(225, 0);
             this.ma_qty.Name = "ma_qty";
@@ -1016,12 +1056,39 @@ namespace UAS_MES_NEW.Make
             this.ms_sncode.Tag = "IfRead";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown);
             // 
+            // lastsn
+            // 
+            this.lastsn.AutoSize = true;
+            this.lastsn.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
+            this.lastsn.Location = new System.Drawing.Point(566, 291);
+            this.lastsn.Name = "lastsn";
+            this.lastsn.Size = new System.Drawing.Size(0, 30);
+            this.lastsn.TabIndex = 225;
+            // 
+            // lastresult
+            // 
+            this.lastresult.AutoSize = true;
+            this.lastresult.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
+            this.lastresult.ForeColor = System.Drawing.Color.Red;
+            this.lastresult.Location = new System.Drawing.Point(681, 363);
+            this.lastresult.Name = "lastresult";
+            this.lastresult.Size = new System.Drawing.Size(0, 30);
+            this.lastresult.TabIndex = 226;
+            // 
             // Make_TestCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.Control;
-            this.ClientSize = new System.Drawing.Size(1287, 802);
+            this.ClientSize = new System.Drawing.Size(1303, 802);
+            this.Controls.Add(this.lastresult);
+            this.Controls.Add(this.lastsn);
+            this.Controls.Add(this.ob_sendqty);
+            this.Controls.Add(this.label12);
+            this.Controls.Add(this.ob_batchqty);
+            this.Controls.Add(this.ob_batchqty_label);
+            this.Controls.Add(this.ob_nowcheckqty);
+            this.Controls.Add(this.ob_nowcheckqty_label);
             this.Controls.Add(this.mcd_totalng);
             this.Controls.Add(this.bidui);
             this.Controls.Add(this.label9);
@@ -1038,21 +1105,18 @@ namespace UAS_MES_NEW.Make
             this.Controls.Add(this.label7);
             this.Controls.Add(this.SendCheck);
             this.Controls.Add(this.label10);
-            this.Controls.Add(this.ob_batchqty);
             this.Controls.Add(this.label11);
             this.Controls.Add(this.mcd_remainqty);
             this.Controls.Add(this.PrintList);
             this.Controls.Add(this.mc_restqty_label);
             this.Controls.Add(this.normalButton1);
             this.Controls.Add(this.mcd_inqty);
-            this.Controls.Add(this.ob_sendqty);
             this.Controls.Add(this.mcd_inqty_label);
             this.Controls.Add(this.StepCount);
             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_nowcheckqty);
             this.Controls.Add(this.NoteForChange);
             this.Controls.Add(this.ma_softversion);
             this.Controls.Add(this.ma_softversion_label);
@@ -1145,14 +1209,11 @@ namespace UAS_MES_NEW.Make
         private ReSetCheckBox AutoBadCode;
         private System.Windows.Forms.ColumnHeader columnHeader4;
         private CustomControl.ButtonUtil.NormalButton Save;
-        private CustomControl.ValueLabel.ValueLabel ob_batchqty;
-        private CustomControl.ValueLabel.ValueLabel ob_nowcheckqty;
         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 CustomControl.ValueLabel.ValueLabel ma_softversion;
         private System.Windows.Forms.Label ma_softversion_label;
         private System.Windows.Forms.ColumnHeader columnHeader9;
@@ -1183,5 +1244,13 @@ namespace UAS_MES_NEW.Make
         private System.IO.FileSystemWatcher XmlWatcher;
         private System.Windows.Forms.CheckBox bidui;
         private CustomControl.TextBoxWithIcon.SnCollectionBox biduisn;
+        private CustomControl.ValueLabel.ValueLabel ob_sendqty;
+        private System.Windows.Forms.Label label12;
+        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 System.Windows.Forms.Label lastresult;
+        private System.Windows.Forms.Label lastsn;
     }
 }

+ 20 - 10
UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.cs

@@ -83,9 +83,9 @@ namespace UAS_MES_NEW.Make
 
             //工单号放大镜配置
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
-            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_spec # 产品规格,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式";
+            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_orispeccode # 型号,pr_spec # 产品规格,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式";
             ma_code.FormName = Name;
-            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_spec", "ma_softversion", "ma_salecode", "nvl(pr_sendchecktype,'LineCode')pr_sendchecktype" };
+            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_orispeccode pr_spec", "ma_softversion", "ma_salecode", "nvl(pr_sendchecktype,'LineCode')pr_sendchecktype" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
             dh = SystemInf.dh;
@@ -229,7 +229,7 @@ namespace UAS_MES_NEW.Make
                         }
                         if (ma_code.Text != oMakeCode && oMakeCode != null)
                         {
-                            dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,ma_softversion,ma_salecode,pr_spec,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
+                            dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,ma_softversion,ma_salecode,pr_orispeccode pr_spec,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
                             if (dt.Rows.Count > 0)
                             {
                                 BaseUtil.SetFormValue(this.Controls, dt);
@@ -418,7 +418,9 @@ namespace UAS_MES_NEW.Make
                             //    BaseUtil.GetDataFromDevice("RESET");
                             LastSncode = ms_sncode.Text;
                             LogicHandler.DoCommandLog(Tag.ToString(), biduisn.Text == "" ? User.UserCode : biduisn.Text, ma_code.Text, User.UserLineCode, User.UserSourceCode, "采集良品", "采集良品成功", LastSncode, ob_checkno.Text);
-
+                            lastsn.Text = ms_sncode.Text;
+                            lastresult.Text = "OK";
+                            lastresult.ForeColor = Color.Green;
                             OperateResult.AppendText(">>" + ms_sncode.Text + "良品采集成功\n", Color.Green, ms_sncode, biduisn);
                             //if (bidui.Checked)
                             //    biduisn.Focus();
@@ -491,7 +493,7 @@ namespace UAS_MES_NEW.Make
                     }
                     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,ma_softversion,pr_spec,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
+                        dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,ma_softversion,pr_orispeccode pr_spec,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
                         if (dt.Rows.Count > 0)
                         {
                             BaseUtil.SetFormValue(this.Controls, dt);
@@ -557,8 +559,8 @@ namespace UAS_MES_NEW.Make
                         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);
+                        LogicHandler.InsertMakeProcess(ms_sncode.Text, ma_code.Text, User.UserSourceCode, "良品采集成不良", "测试不良", biduisn.Text == "" ? User.UserCode : biduisn.Text);
+                        LogicHandler.DoCommandLog(Tag.ToString(), biduisn.Text == "" ? User.UserCode : biduisn.Text, ma_code.Text, User.UserLineCode, User.UserSourceCode, "测试不良", "良品采集成不良", ms_sncode.Text, ob_checkno.Text);
                     }
                     string checkno = dt.Rows[0]["ms_checkno"].ToString();
                     //存在抽检批次更新为空
@@ -567,13 +569,13 @@ namespace UAS_MES_NEW.Make
                 }
                 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);
+                    LogicHandler.InsertMakeProcess(ms_sncode.Text, ma_code.Text, User.UserSourceCode, "采集成不良", "测试不良", biduisn.Text == "" ? User.UserCode : biduisn.Text);
+                    LogicHandler.DoCommandLog(Tag.ToString(), biduisn.Text == "" ? User.UserCode : biduisn.Text, 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");
                 //normalButton1_Click(this, e);
-                if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserCode, User.UserSourceCode, "检查未通过", bgcode, bccode, bgname, bcname, bcremark, out ErrorMessage))
+                if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, biduisn.Text == "" ? User.UserCode : biduisn.Text, User.UserSourceCode, "检查未通过", bgcode, bccode, bgname, bcname, bcremark, out ErrorMessage))
                 {
                     //存在的不良代码和
                     dt = (DataTable)dh.ExecuteSql("select sr_badcode from STEPRETURN where sr_stepcode='" + User.CurrentStepCode + "'", "select");
@@ -603,6 +605,9 @@ namespace UAS_MES_NEW.Make
                         else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
                     }
                     else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                    lastsn.Text = ms_sncode.Text;
+                    lastresult.Text = "FAILED";
+                    lastresult.ForeColor = Color.Red;
                     LastSncode = ms_sncode.Text;
                     //采集完不良,聚焦序列号
                     ms_sncode.Focus();
@@ -610,6 +615,11 @@ namespace UAS_MES_NEW.Make
                     ms_sncode.Text = "";
                     //清除不良信息
                     bc_code.Text = "";
+                    biduisn.Text = "";
+                    if (bidui.Checked)
+                    {
+                        biduisn.Focus();
+                    }
                     ChoosedRejectList.Items.Clear();
                     LoadCollectedNum();
                     WaitList.Clear();

+ 9 - 9
UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.resx

@@ -117,6 +117,15 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="BadInfSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="ControlLockTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>172, 17</value>
+  </metadata>
+  <metadata name="XmlWatcher.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>453, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="SendCheck.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
@@ -156,15 +165,6 @@
         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>
-  <metadata name="XmlWatcher.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>453, 17</value>
-  </metadata>
   <data name="normalButton1.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 130 - 86
UAS_MES_ZT/FunctionCode/OQC/OQC_BatchResultJudge.Designer.cs

@@ -77,9 +77,10 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.Location = new System.Drawing.Point(510, 233);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(765, 350);
+            this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
-            this.ob_batchqty_label.Size = new System.Drawing.Size(58, 21);
+            this.ob_batchqty_label.Size = new System.Drawing.Size(86, 31);
             this.ob_batchqty_label.TabIndex = 158;
             this.ob_batchqty_label.Text = "实批数";
             // 
@@ -87,9 +88,10 @@
             // 
             this.ob_result_label.AutoSize = true;
             this.ob_result_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_result_label.Location = new System.Drawing.Point(510, 201);
+            this.ob_result_label.Location = new System.Drawing.Point(765, 302);
+            this.ob_result_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_result_label.Name = "ob_result_label";
-            this.ob_result_label.Size = new System.Drawing.Size(74, 21);
+            this.ob_result_label.Size = new System.Drawing.Size(110, 31);
             this.ob_result_label.TabIndex = 166;
             this.ob_result_label.Text = "判定结果";
             // 
@@ -97,9 +99,10 @@
             // 
             this.ob_okqty_label.AutoSize = true;
             this.ob_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_okqty_label.Location = new System.Drawing.Point(510, 302);
+            this.ob_okqty_label.Location = new System.Drawing.Point(765, 453);
+            this.ob_okqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_okqty_label.Name = "ob_okqty_label";
-            this.ob_okqty_label.Size = new System.Drawing.Size(58, 21);
+            this.ob_okqty_label.Size = new System.Drawing.Size(86, 31);
             this.ob_okqty_label.TabIndex = 160;
             this.ob_okqty_label.Text = "合格数";
             // 
@@ -107,9 +110,10 @@
             // 
             this.ob_ngqty_label.AutoSize = true;
             this.ob_ngqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_ngqty_label.Location = new System.Drawing.Point(510, 336);
+            this.ob_ngqty_label.Location = new System.Drawing.Point(765, 504);
+            this.ob_ngqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_ngqty_label.Name = "ob_ngqty_label";
-            this.ob_ngqty_label.Size = new System.Drawing.Size(74, 21);
+            this.ob_ngqty_label.Size = new System.Drawing.Size(110, 31);
             this.ob_ngqty_label.TabIndex = 162;
             this.ob_ngqty_label.Text = "不合格数";
             // 
@@ -117,9 +121,10 @@
             // 
             this.oi_checkqty_label.AutoSize = true;
             this.oi_checkqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.oi_checkqty_label.Location = new System.Drawing.Point(510, 267);
+            this.oi_checkqty_label.Location = new System.Drawing.Point(765, 400);
+            this.oi_checkqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.oi_checkqty_label.Name = "oi_checkqty_label";
-            this.oi_checkqty_label.Size = new System.Drawing.Size(58, 21);
+            this.oi_checkqty_label.Size = new System.Drawing.Size(86, 31);
             this.oi_checkqty_label.TabIndex = 164;
             this.oi_checkqty_label.Text = "抽检数";
             // 
@@ -127,9 +132,10 @@
             // 
             this.ReworkRequire.AutoSize = true;
             this.ReworkRequire.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ReworkRequire.Location = new System.Drawing.Point(122, 496);
+            this.ReworkRequire.Location = new System.Drawing.Point(183, 744);
+            this.ReworkRequire.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ReworkRequire.Name = "ReworkRequire";
-            this.ReworkRequire.Size = new System.Drawing.Size(125, 25);
+            this.ReworkRequire.Size = new System.Drawing.Size(184, 35);
             this.ReworkRequire.TabIndex = 168;
             this.ReworkRequire.Text = "发起返工需求";
             this.ReworkRequire.UseVisualStyleBackColor = true;
@@ -139,9 +145,10 @@
             // 
             this.ob_aqlcode_label.AutoSize = true;
             this.ob_aqlcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_aqlcode_label.Location = new System.Drawing.Point(510, 369);
+            this.ob_aqlcode_label.Location = new System.Drawing.Point(765, 554);
+            this.ob_aqlcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_aqlcode_label.Name = "ob_aqlcode_label";
-            this.ob_aqlcode_label.Size = new System.Drawing.Size(42, 21);
+            this.ob_aqlcode_label.Size = new System.Drawing.Size(63, 31);
             this.ob_aqlcode_label.TabIndex = 169;
             this.ob_aqlcode_label.Text = "AQL";
             // 
@@ -149,9 +156,10 @@
             // 
             this.ob_prodcode_label.AutoSize = true;
             this.ob_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_prodcode_label.Location = new System.Drawing.Point(264, 116);
+            this.ob_prodcode_label.Location = new System.Drawing.Point(396, 174);
+            this.ob_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_prodcode_label.Name = "ob_prodcode_label";
-            this.ob_prodcode_label.Size = new System.Drawing.Size(74, 21);
+            this.ob_prodcode_label.Size = new System.Drawing.Size(110, 31);
             this.ob_prodcode_label.TabIndex = 218;
             this.ob_prodcode_label.Text = "产品编号";
             // 
@@ -159,9 +167,10 @@
             // 
             this.ob_makecode_label.AutoSize = true;
             this.ob_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_makecode_label.Location = new System.Drawing.Point(8, 116);
+            this.ob_makecode_label.Location = new System.Drawing.Point(12, 174);
+            this.ob_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_makecode_label.Name = "ob_makecode_label";
-            this.ob_makecode_label.Size = new System.Drawing.Size(58, 21);
+            this.ob_makecode_label.Size = new System.Drawing.Size(86, 31);
             this.ob_makecode_label.TabIndex = 216;
             this.ob_makecode_label.Text = "工单号";
             // 
@@ -169,9 +178,10 @@
             // 
             this.ob_checkno_label.AutoSize = true;
             this.ob_checkno_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno_label.Location = new System.Drawing.Point(8, 12);
+            this.ob_checkno_label.Location = new System.Drawing.Point(12, 18);
+            this.ob_checkno_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_checkno_label.Name = "ob_checkno_label";
-            this.ob_checkno_label.Size = new System.Drawing.Size(58, 21);
+            this.ob_checkno_label.Size = new System.Drawing.Size(86, 31);
             this.ob_checkno_label.TabIndex = 214;
             this.ob_checkno_label.Text = "抽检批";
             // 
@@ -179,9 +189,10 @@
             // 
             this.obd_outboxcode_label.AutoSize = true;
             this.obd_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.obd_outboxcode_label.Location = new System.Drawing.Point(8, 44);
+            this.obd_outboxcode_label.Location = new System.Drawing.Point(12, 66);
+            this.obd_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.obd_outboxcode_label.Name = "obd_outboxcode_label";
-            this.obd_outboxcode_label.Size = new System.Drawing.Size(42, 21);
+            this.obd_outboxcode_label.Size = new System.Drawing.Size(62, 31);
             this.obd_outboxcode_label.TabIndex = 212;
             this.obd_outboxcode_label.Text = "箱号";
             // 
@@ -189,9 +200,10 @@
             // 
             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(8, 78);
+            this.ms_sncode_label.Location = new System.Drawing.Point(12, 117);
+            this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_sncode_label.Name = "ms_sncode_label";
-            this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
+            this.ms_sncode_label.Size = new System.Drawing.Size(86, 31);
             this.ms_sncode_label.TabIndex = 210;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -199,9 +211,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(36, 425);
+            this.label3.Location = new System.Drawing.Point(54, 638);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(444, 20);
+            this.label3.Size = new System.Drawing.Size(666, 28);
             this.label3.TabIndex = 222;
             this.label3.Text = "--说明:如何物料没有维护AQL标准,需手动填写最大不合格允许通过数";
             // 
@@ -209,17 +222,19 @@
             // 
             this.ob_maxngacceptqty_label.AutoSize = true;
             this.ob_maxngacceptqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_maxngacceptqty_label.Location = new System.Drawing.Point(36, 397);
+            this.ob_maxngacceptqty_label.Location = new System.Drawing.Point(54, 596);
+            this.ob_maxngacceptqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_maxngacceptqty_label.Name = "ob_maxngacceptqty_label";
-            this.ob_maxngacceptqty_label.Size = new System.Drawing.Size(170, 21);
+            this.ob_maxngacceptqty_label.Size = new System.Drawing.Size(254, 31);
             this.ob_maxngacceptqty_label.TabIndex = 223;
             this.ob_maxngacceptqty_label.Text = "最大不合格允许通过数";
             // 
             // Remark
             // 
-            this.Remark.Location = new System.Drawing.Point(88, 162);
+            this.Remark.Location = new System.Drawing.Point(132, 243);
+            this.Remark.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Remark.Name = "Remark";
-            this.Remark.Size = new System.Drawing.Size(411, 225);
+            this.Remark.Size = new System.Drawing.Size(614, 336);
             this.Remark.TabIndex = 225;
             this.Remark.Tag = "Remark";
             this.Remark.Text = "";
@@ -228,9 +243,10 @@
             // 
             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(8, 162);
+            this.label5.Location = new System.Drawing.Point(12, 243);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(42, 21);
+            this.label5.Size = new System.Drawing.Size(62, 31);
             this.label5.TabIndex = 226;
             this.label5.Text = "备注";
             // 
@@ -238,9 +254,10 @@
             // 
             this.ob_status_label.AutoSize = true;
             this.ob_status_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_status_label.Location = new System.Drawing.Point(510, 168);
+            this.ob_status_label.Location = new System.Drawing.Point(765, 252);
+            this.ob_status_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_status_label.Name = "ob_status_label";
-            this.ob_status_label.Size = new System.Drawing.Size(74, 21);
+            this.ob_status_label.Size = new System.Drawing.Size(110, 31);
             this.ob_status_label.TabIndex = 232;
             this.ob_status_label.Text = "批次状态";
             // 
@@ -251,12 +268,13 @@
             this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
             this.normalButton1.Image = null;
             this.normalButton1.IsShowBorder = true;
-            this.normalButton1.Location = new System.Drawing.Point(428, 396);
+            this.normalButton1.Location = new System.Drawing.Point(642, 594);
+            this.normalButton1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
             this.normalButton1.Name = "normalButton1";
             this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
             this.normalButton1.Power = null;
-            this.normalButton1.Size = new System.Drawing.Size(75, 28);
+            this.normalButton1.Size = new System.Drawing.Size(112, 42);
             this.normalButton1.TabIndex = 234;
             this.normalButton1.Text = "保存备注";
             this.normalButton1.UseVisualStyleBackColor = false;
@@ -267,10 +285,11 @@
             this.ob_maxngacceptqty.AllPower = "";
             this.ob_maxngacceptqty.BackColor = System.Drawing.Color.White;
             this.ob_maxngacceptqty.ID = null;
-            this.ob_maxngacceptqty.Location = new System.Drawing.Point(201, 398);
+            this.ob_maxngacceptqty.Location = new System.Drawing.Point(302, 597);
+            this.ob_maxngacceptqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
             this.ob_maxngacceptqty.Power = "";
-            this.ob_maxngacceptqty.Size = new System.Drawing.Size(194, 21);
+            this.ob_maxngacceptqty.Size = new System.Drawing.Size(289, 28);
             this.ob_maxngacceptqty.Str = null;
             this.ob_maxngacceptqty.Str1 = null;
             this.ob_maxngacceptqty.Str2 = null;
@@ -283,10 +302,11 @@
             this.ob_status.BackColor = System.Drawing.Color.White;
             this.ob_status.Enabled = false;
             this.ob_status.ID = null;
-            this.ob_status.Location = new System.Drawing.Point(600, 168);
+            this.ob_status.Location = new System.Drawing.Point(900, 252);
+            this.ob_status.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_status.Name = "ob_status";
             this.ob_status.Power = null;
-            this.ob_status.Size = new System.Drawing.Size(147, 21);
+            this.ob_status.Size = new System.Drawing.Size(218, 28);
             this.ob_status.Str = null;
             this.ob_status.Str1 = null;
             this.ob_status.Str2 = null;
@@ -299,10 +319,11 @@
             this.ob_source.BackColor = System.Drawing.Color.White;
             this.ob_source.Enabled = false;
             this.ob_source.ID = null;
-            this.ob_source.Location = new System.Drawing.Point(759, 46);
+            this.ob_source.Location = new System.Drawing.Point(1138, 69);
+            this.ob_source.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_source.Name = "ob_source";
             this.ob_source.Power = null;
-            this.ob_source.Size = new System.Drawing.Size(147, 21);
+            this.ob_source.Size = new System.Drawing.Size(218, 28);
             this.ob_source.Str = null;
             this.ob_source.Str1 = null;
             this.ob_source.Str2 = null;
@@ -316,10 +337,11 @@
             this.ob_id.BackColor = System.Drawing.Color.White;
             this.ob_id.Enabled = false;
             this.ob_id.ID = null;
-            this.ob_id.Location = new System.Drawing.Point(759, 26);
+            this.ob_id.Location = new System.Drawing.Point(1138, 39);
+            this.ob_id.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_id.Name = "ob_id";
             this.ob_id.Power = null;
-            this.ob_id.Size = new System.Drawing.Size(147, 21);
+            this.ob_id.Size = new System.Drawing.Size(218, 28);
             this.ob_id.Str = null;
             this.ob_id.Str1 = null;
             this.ob_id.Str2 = null;
@@ -330,9 +352,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(760, 142);
+            this.OperateResult.Location = new System.Drawing.Point(1140, 213);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(210, 319);
+            this.OperateResult.Size = new System.Drawing.Size(313, 476);
             this.OperateResult.TabIndex = 227;
             this.OperateResult.Text = "";
             // 
@@ -343,12 +366,13 @@
             this.GetBatch.DownImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.DownImage")));
             this.GetBatch.Image = ((System.Drawing.Image)(resources.GetObject("GetBatch.Image")));
             this.GetBatch.IsShowBorder = true;
-            this.GetBatch.Location = new System.Drawing.Point(511, 117);
+            this.GetBatch.Location = new System.Drawing.Point(766, 176);
+            this.GetBatch.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.GetBatch.MoveImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.MoveImage")));
             this.GetBatch.Name = "GetBatch";
             this.GetBatch.NormalImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.NormalImage")));
             this.GetBatch.Power = "ifread";
-            this.GetBatch.Size = new System.Drawing.Size(60, 24);
+            this.GetBatch.Size = new System.Drawing.Size(90, 36);
             this.GetBatch.TabIndex = 221;
             this.GetBatch.Text = "获取批";
             this.GetBatch.UseVisualStyleBackColor = true;
@@ -360,10 +384,11 @@
             this.ob_prodcode.BackColor = System.Drawing.Color.White;
             this.ob_prodcode.Enabled = false;
             this.ob_prodcode.ID = null;
-            this.ob_prodcode.Location = new System.Drawing.Point(355, 120);
+            this.ob_prodcode.Location = new System.Drawing.Point(532, 180);
+            this.ob_prodcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_prodcode.Name = "ob_prodcode";
             this.ob_prodcode.Power = null;
-            this.ob_prodcode.Size = new System.Drawing.Size(144, 21);
+            this.ob_prodcode.Size = new System.Drawing.Size(214, 28);
             this.ob_prodcode.Str = null;
             this.ob_prodcode.Str1 = null;
             this.ob_prodcode.Str2 = null;
@@ -376,10 +401,11 @@
             this.ob_makecode.BackColor = System.Drawing.Color.White;
             this.ob_makecode.Enabled = false;
             this.ob_makecode.ID = null;
-            this.ob_makecode.Location = new System.Drawing.Point(88, 117);
+            this.ob_makecode.Location = new System.Drawing.Point(132, 176);
+            this.ob_makecode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_makecode.Name = "ob_makecode";
             this.ob_makecode.Power = null;
-            this.ob_makecode.Size = new System.Drawing.Size(160, 21);
+            this.ob_makecode.Size = new System.Drawing.Size(238, 28);
             this.ob_makecode.Str = null;
             this.ob_makecode.Str1 = null;
             this.ob_makecode.Str2 = null;
@@ -391,10 +417,11 @@
             this.ob_checkno.AllPower = "";
             this.ob_checkno.BackColor = System.Drawing.Color.White;
             this.ob_checkno.ID = null;
-            this.ob_checkno.Location = new System.Drawing.Point(88, 14);
+            this.ob_checkno.Location = new System.Drawing.Point(132, 21);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Power = "";
-            this.ob_checkno.Size = new System.Drawing.Size(411, 21);
+            this.ob_checkno.Size = new System.Drawing.Size(614, 28);
             this.ob_checkno.Str = null;
             this.ob_checkno.Str1 = null;
             this.ob_checkno.Str2 = null;
@@ -407,10 +434,11 @@
             this.obd_outboxcode.AllPower = null;
             this.obd_outboxcode.BackColor = System.Drawing.Color.White;
             this.obd_outboxcode.ID = null;
-            this.obd_outboxcode.Location = new System.Drawing.Point(88, 46);
+            this.obd_outboxcode.Location = new System.Drawing.Point(132, 69);
+            this.obd_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.obd_outboxcode.Name = "obd_outboxcode";
             this.obd_outboxcode.Power = null;
-            this.obd_outboxcode.Size = new System.Drawing.Size(411, 21);
+            this.obd_outboxcode.Size = new System.Drawing.Size(614, 28);
             this.obd_outboxcode.Str = null;
             this.obd_outboxcode.Str1 = null;
             this.obd_outboxcode.Str2 = null;
@@ -423,10 +451,11 @@
             this.ms_sncode.AllPower = "";
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(88, 80);
+            this.ms_sncode.Location = new System.Drawing.Point(132, 120);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = "";
-            this.ms_sncode.Size = new System.Drawing.Size(411, 21);
+            this.ms_sncode.Size = new System.Drawing.Size(614, 28);
             this.ms_sncode.Str = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str2 = null;
@@ -440,10 +469,11 @@
             this.ob_nowcheckqty.BackColor = System.Drawing.Color.White;
             this.ob_nowcheckqty.Enabled = false;
             this.ob_nowcheckqty.ID = null;
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(600, 233);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(900, 350);
+            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Power = null;
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(147, 21);
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(218, 28);
             this.ob_nowcheckqty.Str = null;
             this.ob_nowcheckqty.Str1 = null;
             this.ob_nowcheckqty.Str2 = null;
@@ -456,10 +486,11 @@
             this.ob_okqty.BackColor = System.Drawing.Color.White;
             this.ob_okqty.Enabled = false;
             this.ob_okqty.ID = null;
-            this.ob_okqty.Location = new System.Drawing.Point(600, 302);
+            this.ob_okqty.Location = new System.Drawing.Point(900, 453);
+            this.ob_okqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_okqty.Name = "ob_okqty";
             this.ob_okqty.Power = null;
-            this.ob_okqty.Size = new System.Drawing.Size(147, 21);
+            this.ob_okqty.Size = new System.Drawing.Size(218, 28);
             this.ob_okqty.Str = null;
             this.ob_okqty.Str1 = null;
             this.ob_okqty.Str2 = null;
@@ -472,10 +503,11 @@
             this.oi_checkqty.BackColor = System.Drawing.Color.White;
             this.oi_checkqty.Enabled = false;
             this.oi_checkqty.ID = null;
-            this.oi_checkqty.Location = new System.Drawing.Point(600, 267);
+            this.oi_checkqty.Location = new System.Drawing.Point(900, 400);
+            this.oi_checkqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.oi_checkqty.Name = "oi_checkqty";
             this.oi_checkqty.Power = null;
-            this.oi_checkqty.Size = new System.Drawing.Size(147, 21);
+            this.oi_checkqty.Size = new System.Drawing.Size(218, 28);
             this.oi_checkqty.Str = null;
             this.oi_checkqty.Str1 = null;
             this.oi_checkqty.Str2 = null;
@@ -488,10 +520,11 @@
             this.ob_ngqty.BackColor = System.Drawing.Color.White;
             this.ob_ngqty.Enabled = false;
             this.ob_ngqty.ID = null;
-            this.ob_ngqty.Location = new System.Drawing.Point(600, 336);
+            this.ob_ngqty.Location = new System.Drawing.Point(900, 504);
+            this.ob_ngqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_ngqty.Name = "ob_ngqty";
             this.ob_ngqty.Power = null;
-            this.ob_ngqty.Size = new System.Drawing.Size(147, 21);
+            this.ob_ngqty.Size = new System.Drawing.Size(218, 28);
             this.ob_ngqty.Str = null;
             this.ob_ngqty.Str1 = null;
             this.ob_ngqty.Str2 = null;
@@ -504,10 +537,11 @@
             this.ob_result.BackColor = System.Drawing.Color.White;
             this.ob_result.Enabled = false;
             this.ob_result.ID = null;
-            this.ob_result.Location = new System.Drawing.Point(600, 201);
+            this.ob_result.Location = new System.Drawing.Point(900, 302);
+            this.ob_result.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_result.Name = "ob_result";
             this.ob_result.Power = null;
-            this.ob_result.Size = new System.Drawing.Size(147, 21);
+            this.ob_result.Size = new System.Drawing.Size(218, 28);
             this.ob_result.Str = null;
             this.ob_result.Str1 = null;
             this.ob_result.Str2 = null;
@@ -520,10 +554,11 @@
             this.ob_aqlcode.BackColor = System.Drawing.Color.White;
             this.ob_aqlcode.Enabled = false;
             this.ob_aqlcode.ID = null;
-            this.ob_aqlcode.Location = new System.Drawing.Point(600, 369);
+            this.ob_aqlcode.Location = new System.Drawing.Point(900, 554);
+            this.ob_aqlcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_aqlcode.Name = "ob_aqlcode";
             this.ob_aqlcode.Power = null;
-            this.ob_aqlcode.Size = new System.Drawing.Size(147, 21);
+            this.ob_aqlcode.Size = new System.Drawing.Size(218, 28);
             this.ob_aqlcode.Str = null;
             this.ob_aqlcode.Str1 = null;
             this.ob_aqlcode.Str2 = null;
@@ -538,12 +573,13 @@
             this.WithdrawPass.Enabled = false;
             this.WithdrawPass.Image = ((System.Drawing.Image)(resources.GetObject("WithdrawPass.Image")));
             this.WithdrawPass.IsShowBorder = true;
-            this.WithdrawPass.Location = new System.Drawing.Point(435, 456);
+            this.WithdrawPass.Location = new System.Drawing.Point(652, 684);
+            this.WithdrawPass.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.WithdrawPass.MoveImage = ((System.Drawing.Image)(resources.GetObject("WithdrawPass.MoveImage")));
             this.WithdrawPass.Name = "WithdrawPass";
             this.WithdrawPass.NormalImage = ((System.Drawing.Image)(resources.GetObject("WithdrawPass.NormalImage")));
             this.WithdrawPass.Power = "IFREAD";
-            this.WithdrawPass.Size = new System.Drawing.Size(68, 30);
+            this.WithdrawPass.Size = new System.Drawing.Size(102, 45);
             this.WithdrawPass.TabIndex = 167;
             this.WithdrawPass.Text = "撤销通过";
             this.WithdrawPass.UseVisualStyleBackColor = true;
@@ -557,12 +593,13 @@
             this.BatchRejection.Enabled = false;
             this.BatchRejection.Image = ((System.Drawing.Image)(resources.GetObject("BatchRejection.Image")));
             this.BatchRejection.IsShowBorder = true;
-            this.BatchRejection.Location = new System.Drawing.Point(31, 497);
+            this.BatchRejection.Location = new System.Drawing.Point(46, 746);
+            this.BatchRejection.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.BatchRejection.MoveImage = ((System.Drawing.Image)(resources.GetObject("BatchRejection.MoveImage")));
             this.BatchRejection.Name = "BatchRejection";
             this.BatchRejection.NormalImage = ((System.Drawing.Image)(resources.GetObject("BatchRejection.NormalImage")));
             this.BatchRejection.Power = "IFREAD";
-            this.BatchRejection.Size = new System.Drawing.Size(68, 30);
+            this.BatchRejection.Size = new System.Drawing.Size(102, 45);
             this.BatchRejection.TabIndex = 166;
             this.BatchRejection.Text = "批判退";
             this.BatchRejection.UseVisualStyleBackColor = true;
@@ -576,12 +613,13 @@
             this.ForcePass.Enabled = false;
             this.ForcePass.Image = ((System.Drawing.Image)(resources.GetObject("ForcePass.Image")));
             this.ForcePass.IsShowBorder = true;
-            this.ForcePass.Location = new System.Drawing.Point(295, 456);
+            this.ForcePass.Location = new System.Drawing.Point(442, 684);
+            this.ForcePass.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ForcePass.MoveImage = ((System.Drawing.Image)(resources.GetObject("ForcePass.MoveImage")));
             this.ForcePass.Name = "ForcePass";
             this.ForcePass.NormalImage = ((System.Drawing.Image)(resources.GetObject("ForcePass.NormalImage")));
             this.ForcePass.Power = "ifspecial";
-            this.ForcePass.Size = new System.Drawing.Size(68, 30);
+            this.ForcePass.Size = new System.Drawing.Size(102, 45);
             this.ForcePass.TabIndex = 165;
             this.ForcePass.Text = "强制通过";
             this.ForcePass.UseVisualStyleBackColor = true;
@@ -595,12 +633,13 @@
             this.ForceRejection.Enabled = false;
             this.ForceRejection.Image = ((System.Drawing.Image)(resources.GetObject("ForceRejection.Image")));
             this.ForceRejection.IsShowBorder = true;
-            this.ForceRejection.Location = new System.Drawing.Point(295, 497);
+            this.ForceRejection.Location = new System.Drawing.Point(442, 746);
+            this.ForceRejection.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ForceRejection.MoveImage = ((System.Drawing.Image)(resources.GetObject("ForceRejection.MoveImage")));
             this.ForceRejection.Name = "ForceRejection";
             this.ForceRejection.NormalImage = ((System.Drawing.Image)(resources.GetObject("ForceRejection.NormalImage")));
             this.ForceRejection.Power = "ifspecial";
-            this.ForceRejection.Size = new System.Drawing.Size(68, 30);
+            this.ForceRejection.Size = new System.Drawing.Size(102, 45);
             this.ForceRejection.TabIndex = 164;
             this.ForceRejection.Text = "强制批退";
             this.ForceRejection.UseVisualStyleBackColor = true;
@@ -614,15 +653,17 @@
             this.WithdrawRejection.Enabled = false;
             this.WithdrawRejection.Image = ((System.Drawing.Image)(resources.GetObject("WithdrawRejection.Image")));
             this.WithdrawRejection.IsShowBorder = true;
-            this.WithdrawRejection.Location = new System.Drawing.Point(435, 497);
+            this.WithdrawRejection.Location = new System.Drawing.Point(652, 746);
+            this.WithdrawRejection.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.WithdrawRejection.MoveImage = ((System.Drawing.Image)(resources.GetObject("WithdrawRejection.MoveImage")));
             this.WithdrawRejection.Name = "WithdrawRejection";
             this.WithdrawRejection.NormalImage = ((System.Drawing.Image)(resources.GetObject("WithdrawRejection.NormalImage")));
             this.WithdrawRejection.Power = "IFREAD";
-            this.WithdrawRejection.Size = new System.Drawing.Size(68, 30);
+            this.WithdrawRejection.Size = new System.Drawing.Size(102, 45);
             this.WithdrawRejection.TabIndex = 163;
             this.WithdrawRejection.Text = "撤销判退";
             this.WithdrawRejection.UseVisualStyleBackColor = true;
+            this.WithdrawRejection.Visible = false;
             this.WithdrawRejection.Click += new System.EventHandler(this.WithdrawRejection_Click);
             // 
             // BatchPass
@@ -633,12 +674,13 @@
             this.BatchPass.Enabled = false;
             this.BatchPass.Image = ((System.Drawing.Image)(resources.GetObject("BatchPass.Image")));
             this.BatchPass.IsShowBorder = true;
-            this.BatchPass.Location = new System.Drawing.Point(31, 455);
+            this.BatchPass.Location = new System.Drawing.Point(46, 682);
+            this.BatchPass.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.BatchPass.MoveImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.MoveImage")));
             this.BatchPass.Name = "BatchPass";
             this.BatchPass.NormalImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.NormalImage")));
             this.BatchPass.Power = "IFREAD";
-            this.BatchPass.Size = new System.Drawing.Size(68, 30);
+            this.BatchPass.Size = new System.Drawing.Size(102, 45);
             this.BatchPass.TabIndex = 162;
             this.BatchPass.Text = "批判过";
             this.BatchPass.UseVisualStyleBackColor = true;
@@ -651,12 +693,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(835, 485);
+            this.Clean.Location = new System.Drawing.Point(1252, 728);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(64, 29);
+            this.Clean.Size = new System.Drawing.Size(96, 44);
             this.Clean.TabIndex = 159;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -664,9 +707,9 @@
             // 
             // OQC_BatchResultJudge
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(975, 537);
+            this.ClientSize = new System.Drawing.Size(1462, 806);
             this.Controls.Add(this.normalButton1);
             this.Controls.Add(this.ob_maxngacceptqty);
             this.Controls.Add(this.ob_status_label);
@@ -710,6 +753,7 @@
             this.Controls.Add(this.ob_ngqty_label);
             this.Controls.Add(this.oi_checkqty_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "OQC_BatchResultJudge";
             this.Tag = "OQC!BatchResultJudge";
             this.Text = "抽检批维护";

File diff suppressed because it is too large
+ 449 - 506
UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.Designer.cs


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

@@ -133,7 +133,15 @@ namespace UAS_MES_NEW.Packing
                         {
                             try
                             {
-                                weight.Text = re.Match(serialPort1.ReadLine().Trim()).Groups[0].Value;
+                                int len = serialPort1.BytesToRead;
+                                Byte[] readBuffer = new Byte[len];
+                                serialPort1.Read(readBuffer, 0, len); //将数据读入缓存
+                                string weigh = Encoding.Default.GetString(readBuffer);
+                                //pa_remark.AppendText(weigh + "\n");
+                                if (weigh != "")
+                                {
+                                    weight.Text = re.Match(weigh).Value; ;
+                                }
                             }
                             catch (Exception)
                             {
@@ -165,7 +173,7 @@ namespace UAS_MES_NEW.Packing
             string Err = "";
             sql.Clear();
             sql.Append("select pa_prodcode,pr_cartonmaxw,pa_salecode,pa_remark,pa_makecode,pr_cartonunit,pr_code,pr_cartonminw,pr_cartongw,pa_outboxcode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,");
-            sql.Append("pa_status,pr_packrule,pr_detail,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,pa_packageqty,nvl(pa_standardqty,0)pa_standardqty,nvl(pr_outboxinnerqty,0)pr_outboxinnerqty,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,pa_currentqty from package left join ");
+            sql.Append("pa_status,pr_packrule,pr_detail||'-'||pr_orispeccode pr_detail,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,pa_packageqty,nvl(pa_standardqty,0)pa_standardqty,nvl(pr_outboxinnerqty,0)pr_outboxinnerqty,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,pa_currentqty from package left join ");
             sql.Append("product on pa_prodcode=pr_code where pa_outboxcode='" + pa_outboxcode.Text + "'");
             Err = "箱号";
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -180,10 +188,10 @@ namespace UAS_MES_NEW.Packing
                 {
                     ms_salecode.Text = dt.Rows[0]["pa_salecode"].ToString();
                 }
-                if (PR_CHECKCARTONW != "0")
-                    checkweightlabel.Text = "需要检测重量";
-                else
-                    checkweightlabel.Text = "不需检测重量";
+                //if (PR_CHECKCARTONW != "0")
+                //    checkweightlabel.Text = "需要检测重量";
+                //else
+                //    checkweightlabel.Text = "不需检测重量";
                 //赋值重量单位
                 Weight = double.Parse(_weight == "" ? "0" : _weight);
                 MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
@@ -638,6 +646,8 @@ namespace UAS_MES_NEW.Packing
                     {
                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                     }
+                    if (AutoPrint.Checked)
+                        Print_Click(new object(), new EventArgs());
                     LoadCheckQTY();
                     if (!CollecRemark.Checked)
                     {

+ 33 - 33
UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.resx

@@ -118,7 +118,7 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="Printing.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="SendCheck.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -130,7 +130,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Printing.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="SendCheck.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -143,7 +143,7 @@
         gg==
 </value>
   </data>
-  <data name="Printing.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="SendCheck.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -156,7 +156,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Packing.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -168,7 +168,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Clean.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Packing.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -181,7 +181,7 @@
         gg==
 </value>
   </data>
-  <data name="Clean.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Packing.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -194,24 +194,6 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="pd_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_outboxcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_prodcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <data name="DeleteAll.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
@@ -250,7 +232,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="SendCheck.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Printing.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -262,7 +244,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="SendCheck.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Printing.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -275,7 +257,7 @@
         gg==
 </value>
   </data>
-  <data name="SendCheck.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Printing.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -288,7 +270,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Packing.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="RefreshWeigh.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -300,7 +282,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Packing.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="RefreshWeigh.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -313,7 +295,7 @@
         gg==
 </value>
   </data>
-  <data name="Packing.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="RefreshWeigh.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -326,7 +308,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="RefreshWeigh.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -338,7 +320,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="RefreshWeigh.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Clean.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -351,7 +333,7 @@
         gg==
 </value>
   </data>
-  <data name="RefreshWeigh.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Clean.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -364,4 +346,22 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
+  <metadata name="pd_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pa_outboxcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pa_prodcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pa_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 56 - 41
UAS_MES_ZT/FunctionCode/Special/Special_Reset.Designer.cs

@@ -39,6 +39,10 @@
             this.WeighRecord = new System.Windows.Forms.ListView();
             this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.cd_stepno = new System.Windows.Forms.Label();
+            this.checkBox1 = new System.Windows.Forms.CheckBox();
+            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+            this.oqcBtn = new System.Windows.Forms.RadioButton();
+            this.excelim = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.数据清空 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
@@ -47,9 +51,6 @@
             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.checkBox1 = new System.Windows.Forms.CheckBox();
-            this.excelim = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
             this.SuspendLayout();
             // 
             // Pallet_label
@@ -167,6 +168,53 @@
             this.cd_stepno.Size = new System.Drawing.Size(0, 18);
             this.cd_stepno.TabIndex = 244;
             // 
+            // checkBox1
+            // 
+            this.checkBox1.AutoSize = true;
+            this.checkBox1.Location = new System.Drawing.Point(710, 224);
+            this.checkBox1.Margin = new System.Windows.Forms.Padding(4);
+            this.checkBox1.Name = "checkBox1";
+            this.checkBox1.Size = new System.Drawing.Size(178, 22);
+            this.checkBox1.TabIndex = 246;
+            this.checkBox1.Text = "清空机器写入信息";
+            this.checkBox1.UseVisualStyleBackColor = true;
+            this.checkBox1.Visible = false;
+            // 
+            // openFileDialog1
+            // 
+            this.openFileDialog1.FileName = "openFileDialog1";
+            // 
+            // oqcBtn
+            // 
+            this.oqcBtn.AutoSize = true;
+            this.oqcBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.oqcBtn.Location = new System.Drawing.Point(285, 4);
+            this.oqcBtn.Name = "oqcBtn";
+            this.oqcBtn.Size = new System.Drawing.Size(111, 35);
+            this.oqcBtn.TabIndex = 248;
+            this.oqcBtn.Text = "抽检批";
+            this.oqcBtn.UseVisualStyleBackColor = true;
+            this.oqcBtn.Click += new System.EventHandler(this.bigboxBtn_Click);
+            // 
+            // excelim
+            // 
+            this.excelim.AllPower = null;
+            this.excelim.BackColor = System.Drawing.Color.Transparent;
+            this.excelim.DownImage = ((System.Drawing.Image)(resources.GetObject("excelim.DownImage")));
+            this.excelim.Image = null;
+            this.excelim.IsShowBorder = true;
+            this.excelim.Location = new System.Drawing.Point(710, 526);
+            this.excelim.Margin = new System.Windows.Forms.Padding(4);
+            this.excelim.MoveImage = ((System.Drawing.Image)(resources.GetObject("excelim.MoveImage")));
+            this.excelim.Name = "excelim";
+            this.excelim.NormalImage = ((System.Drawing.Image)(resources.GetObject("excelim.NormalImage")));
+            this.excelim.Power = null;
+            this.excelim.Size = new System.Drawing.Size(112, 42);
+            this.excelim.TabIndex = 247;
+            this.excelim.Text = "表格导入";
+            this.excelim.UseVisualStyleBackColor = false;
+            this.excelim.Click += new System.EventHandler(this.excelim_Click);
+            // 
             // 数据清空
             // 
             this.数据清空.AllPower = null;
@@ -175,7 +223,7 @@
             this.数据清空.Image = null;
             this.数据清空.IsShowBorder = true;
             this.数据清空.Location = new System.Drawing.Point(710, 600);
-            this.数据清空.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.数据清空.Margin = new System.Windows.Forms.Padding(4);
             this.数据清空.MoveImage = ((System.Drawing.Image)(resources.GetObject("数据清空.MoveImage")));
             this.数据清空.Name = "数据清空";
             this.数据清空.NormalImage = ((System.Drawing.Image)(resources.GetObject("数据清空.NormalImage")));
@@ -223,7 +271,7 @@
             this.cd_stepcode.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.cd_stepcode.FormName = null;
             this.cd_stepcode.Location = new System.Drawing.Point(710, 62);
-            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(4);
             this.cd_stepcode.Name = "cd_stepcode";
             this.cd_stepcode.Power = "ifspecial";
             this.cd_stepcode.ReturnData = null;
@@ -242,7 +290,7 @@
             this.cr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.cr_code.ID = null;
             this.cr_code.Location = new System.Drawing.Point(423, 60);
-            this.cr_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.cr_code.Margin = new System.Windows.Forms.Padding(4);
             this.cr_code.Name = "cr_code";
             this.cr_code.Power = "ifspecial";
             this.cr_code.ReadOnly = true;
@@ -296,46 +344,12 @@
             this.Split.UseVisualStyleBackColor = false;
             this.Split.Click += new System.EventHandler(this.Split_Click);
             // 
-            // checkBox1
-            // 
-            this.checkBox1.AutoSize = true;
-            this.checkBox1.Location = new System.Drawing.Point(710, 224);
-            this.checkBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.checkBox1.Name = "checkBox1";
-            this.checkBox1.Size = new System.Drawing.Size(178, 22);
-            this.checkBox1.TabIndex = 246;
-            this.checkBox1.Text = "清空机器写入信息";
-            this.checkBox1.UseVisualStyleBackColor = true;
-            this.checkBox1.Visible = false;
-            // 
-            // excelim
-            // 
-            this.excelim.AllPower = null;
-            this.excelim.BackColor = System.Drawing.Color.Transparent;
-            this.excelim.DownImage = ((System.Drawing.Image)(resources.GetObject("excelim.DownImage")));
-            this.excelim.Image = null;
-            this.excelim.IsShowBorder = true;
-            this.excelim.Location = new System.Drawing.Point(710, 526);
-            this.excelim.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.excelim.MoveImage = ((System.Drawing.Image)(resources.GetObject("excelim.MoveImage")));
-            this.excelim.Name = "excelim";
-            this.excelim.NormalImage = ((System.Drawing.Image)(resources.GetObject("excelim.NormalImage")));
-            this.excelim.Power = null;
-            this.excelim.Size = new System.Drawing.Size(112, 42);
-            this.excelim.TabIndex = 247;
-            this.excelim.Text = "表格导入";
-            this.excelim.UseVisualStyleBackColor = false;
-            this.excelim.Click += new System.EventHandler(this.excelim_Click);
-            // 
-            // openFileDialog1
-            // 
-            this.openFileDialog1.FileName = "openFileDialog1";
-            // 
             // Special_Reset
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1208, 870);
+            this.Controls.Add(this.oqcBtn);
             this.Controls.Add(this.excelim);
             this.Controls.Add(this.checkBox1);
             this.Controls.Add(this.数据清空);
@@ -388,5 +402,6 @@
         private System.Windows.Forms.CheckBox checkBox1;
         private CustomControl.ButtonUtil.NormalButton excelim;
         private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.RadioButton oqcBtn;
     }
 }

+ 65 - 17
UAS_MES_ZT/FunctionCode/Special/Special_Reset.cs

@@ -50,20 +50,20 @@ namespace UAS_MES_NEW.Special
         }
 
         private void ReSN(string sncode, string stepcode)
-        {
+        {   
             string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + stepcode +  "'").ToString();
-            dh.ExecuteSql("update makeserial set ms_status=1,ms_outboxcode='',ms_nextstepcode= '"+ stepcode + "' where ms_sncode='" + sncode + "'", "update");
+            dh.ExecuteSql("update makeserial set MS_STEPCODE = '',MS_CHECKNO = '', ms_status=1,ms_outboxcode='',ms_nextstepcode= '"+ stepcode + "' where ms_sncode='" + sncode + "' and ms_nextmacode is null", "update");
             //if (checkBox1.Checked)
             //{
             //    dh.ExecuteSql("update makeserial set ms_bs = '',ms_key='',ms_keyid='',MS_HARDWREID='',MS_KEYSTATEID='',MS_BIOS='',ms_ec='',ms_uuid='',MS_KEYPARTNUMBER='',ms_bt='',ms_mac='',ms_imei='' where ms_sncode = '" + sncode + "' and ms_makecode = '" + ms_makecode.Text + "'", "update");
             //}
             dh.ExecuteSql("delete makebad where mb_sncode = '" + sncode + "' and mb_status = 0", "delete");
             dh.ExecuteSql("delete from LABELPRINTLOG where lpl_value = '" + sncode + "'", "delete");
-            sql.Clear();
-            sql.Append("update craftmaterial set cm_status=-1,cm_lastdeco=-1,cm_dropman='" + User.UserCode + "',");
-            sql.Append("cm_dropdate =sysdate,CM_REMARK = '重置站点拆解',cm_dropstep='" + User.CurrentStepCode + "',");
-            sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_sncode = '" + sncode + "' and cm_stepcode in (select cd_stepcode from craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id where ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_detno >=" + cd_stepno.Text + " )");
-            dh.ExecuteSql(sql.GetString(), "update");
+            //sql.Clear();
+            //sql.Append("update craftmaterial set cm_status=-1,cm_lastdeco=-1,cm_dropman='" + User.UserCode + "',");
+            //sql.Append("cm_dropdate =sysdate,CM_REMARK = '重置站点拆解',cm_dropstep='" + User.CurrentStepCode + "',");
+            //sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_sncode = '" + sncode + "' and cm_stepcode in (select cd_stepcode from craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id where ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_detno >=" + cd_stepno.Text + " )");
+            //dh.ExecuteSql(sql.GetString(), "update");
             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname,  sncode, "");
         }
 
@@ -111,6 +111,22 @@ namespace UAS_MES_NEW.Special
                     WeighRecord.Items.Clear();
                     sb.Clear();
                 }
+                else if (oqcBtn.Checked)
+                { 
+                    string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + cd_stepcode.Text + "'").ToString();
+                    for (int i = 0; i < sb.Count; i++)
+                    {
+                        DataTable dt2 = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_checkno = '" + sb[i].ToString() + "' and ms_status  = 1", "select");
+                        for (int k = 0; k < dt2.Rows.Count; k++)
+                        {
+                            ReSN(dt2.Rows[k]["ms_sncode"].ToString(), cd_stepcode.Text);
+                        }
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname, sb[i].ToString(), "");
+                        OperatResult.AppendText("抽检批:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
+                    }
+                    WeighRecord.Items.Clear();
+                    sb.Clear();
+                }
                 sql.Clear();
                 sql.Append("MERGE INTO makecraftdetail USING (select mcd_macode,mcd_detno,mcd_stepcode,mcd_stepname,nvl(count(distinct A.ms_sncode),0) n,nvl(count(distinct B.ms_sncode),0) bn,(select nvl(count(distinct sp_sncode),0) from STEPPASSED where SP_MAKECODE = mcd_macode AND SP_STEPCODE = mcd_stepcode) inqty from MAKECRAFTdetail");
                 sql.Append(" left join makeserial A on mcd_macode = A.ms_makecode and mcd_stepcode = A.ms_nextstepcode AND A.MS_STATUS = 1 LEFT JOIN MAKESERIAL B ON mcd_macode = B.ms_makecode AND MCD_STEPCODE = B.MS_STEPCODE AND B.MS_STATUS = 3 where mcd_macode = '"+ ms_makecode.Text + "'  group by mcd_macode,mcd_detno, mcd_stepcode, mcd_stepname order by mcd_detno asc) A");
@@ -129,21 +145,21 @@ namespace UAS_MES_NEW.Special
             {
                 if (WeighRecord.Items.Count > 0)
                 {
-                    string logout_confirm = MessageBox.Show(this.ParentForm, "是否更换采集项(已录入信息会清空)?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
-                    if (logout_confirm == "Yes")
-                    {
+                    //string logout_confirm = MessageBox.Show(this.ParentForm, "是否更换采集项(已录入信息会清空)?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                    //if (logout_confirm == "Yes")
+                    //{
                         WeighRecord.Items.Clear();
                         sb.Clear();
                         ms_makecode.Text = "";
                         ms_prodcode.Text = "";
                         cr_code.Text = "";
                         cd_stepcode.Text = "";
-                    }
-                    else
-                    {
-                        serBtn.Checked = bigboxBtn.Checked;
-                        bigboxBtn.Checked = !serBtn.Checked;
-                    }
+                    //}
+                    //else
+                    //{
+                    //    serBtn.Checked = bigboxBtn.Checked;
+                    //    bigboxBtn.Checked = !serBtn.Checked;
+                    //}
                 }
                 if (((RadioButton)sender).Name == "serBtn")
                 {
@@ -155,6 +171,11 @@ namespace UAS_MES_NEW.Special
                     input.Focus();
                     OperatResult.AppendText("请输入箱号进行采集\n", Color.Black, input);
                 }
+                else if (((RadioButton)sender).Name == "oqcBtn")
+                {
+                    input.Focus();
+                    OperatResult.AppendText("请输入返工抽检批号进行采集\n", Color.Black, input);
+                }
             }
         }
 
@@ -169,7 +190,7 @@ namespace UAS_MES_NEW.Special
             {
                 if (serBtn.Checked)
                 {
-                    dt = (DataTable)dh.ExecuteSql("select ms_makecode,ms_prodcode,ms_sncode,ms_craftcode cr_code,ms_status,ms_outboxcode from makeserial where ms_sncode = '" + input.Text + "'", "select");
+                    dt = (DataTable)dh.ExecuteSql("select ms_makecode,ms_prodcode,ms_sncode,ms_craftcode cr_code,ms_status,ms_outboxcode from makeserial where ms_sncode = '" + input.Text + "' ORDER BY MS_ID DESC", "select");
                     if (dt.Rows.Count > 0)
                     {
                         if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
@@ -236,6 +257,33 @@ namespace UAS_MES_NEW.Special
                         return;
                     }
                 }
+                else if (oqcBtn.Checked)
+                {
+                    dt = (DataTable)dh.ExecuteSql("select ob_makecode ms_makecode,ob_prodcode ms_prodcode,ob_checkno,ma_craftcode cr_code from oqcbatch left join make on ob_makecode = ma_code where ob_checkno = '" + input.Text + "' and ob_status = 'NG'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
+                        {
+                            OperatResult.AppendText("抽检批:" + input.Text + "所属工单" + dt.Rows[0]["ms_makecode"].ToString() + "与当前工单" + ms_makecode.Text + "不一致\n", Color.Red, input);
+                            return;
+                        }
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        if (sb.Contains(dt.Rows[0]["ob_checkno"].ToString()))
+                        {
+                            OperatResult.AppendText("抽检批:" + input.Text + "已采集\n", Color.Red, input);
+                            return;
+                        }
+                        WeighRecord.Items.Add(dt.Rows[0]["ob_checkno"].ToString());
+                        sb.Add(dt.Rows[0]["ob_checkno"].ToString());
+                        OperatResult.AppendText("抽检批:" + input.Text + "采集\n", Color.Green, input);
+                        cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+                    }
+                    else
+                    {
+                        OperatResult.AppendText("抽检批:" + input.Text + "不存在或不是批退状态\n", Color.Red, input);
+                        return;
+                    }
+                }
             }
         }
 

+ 12 - 12
UAS_MES_ZT/FunctionCode/Special/Special_Reset.resx

@@ -117,8 +117,11 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="数据清空.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="excelim.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -130,7 +133,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="数据清空.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="excelim.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -143,7 +146,7 @@
         gg==
 </value>
   </data>
-  <data name="数据清空.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="excelim.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -156,7 +159,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Split.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="数据清空.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -168,7 +171,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Split.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="数据清空.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -181,7 +184,7 @@
         gg==
 </value>
   </data>
-  <data name="Split.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="数据清空.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -194,7 +197,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="excelim.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Split.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -206,7 +209,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="excelim.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Split.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -219,7 +222,7 @@
         gg==
 </value>
   </data>
-  <data name="excelim.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Split.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -232,7 +235,4 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
 </root>

+ 49 - 27
UAS_MES_ZT/FunctionCode/SystemSetting/SystemSetting_ScaleTest.Designer.cs

@@ -41,6 +41,7 @@
             this.StartTest = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ComList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.SerialPortCombox();
             this.normalButton1 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.panel4.SuspendLayout();
             this.panel5.SuspendLayout();
             this.SuspendLayout();
@@ -50,9 +51,10 @@
             this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.panel4.Controls.Add(this.Weight);
             this.panel4.Controls.Add(this.panel5);
-            this.panel4.Location = new System.Drawing.Point(342, 86);
+            this.panel4.Location = new System.Drawing.Point(684, 172);
+            this.panel4.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.panel4.Name = "panel4";
-            this.panel4.Size = new System.Drawing.Size(333, 129);
+            this.panel4.Size = new System.Drawing.Size(664, 256);
             this.panel4.TabIndex = 39;
             // 
             // Weight
@@ -63,9 +65,10 @@
             this.Weight.AutoSize = true;
             this.Weight.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Weight.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
-            this.Weight.Location = new System.Drawing.Point(134, 50);
+            this.Weight.Location = new System.Drawing.Point(268, 100);
+            this.Weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.Weight.Name = "Weight";
-            this.Weight.Size = new System.Drawing.Size(0, 31);
+            this.Weight.Size = new System.Drawing.Size(0, 62);
             this.Weight.TabIndex = 41;
             // 
             // panel5
@@ -75,8 +78,9 @@
             this.panel5.Controls.Add(this.label22);
             this.panel5.Dock = System.Windows.Forms.DockStyle.Left;
             this.panel5.Location = new System.Drawing.Point(0, 0);
+            this.panel5.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.panel5.Name = "panel5";
-            this.panel5.Size = new System.Drawing.Size(78, 127);
+            this.panel5.Size = new System.Drawing.Size(156, 254);
             this.panel5.TabIndex = 40;
             // 
             // pr_colorboxunit
@@ -84,9 +88,10 @@
             this.pr_colorboxunit.AutoSize = true;
             this.pr_colorboxunit.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_colorboxunit.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.pr_colorboxunit.Location = new System.Drawing.Point(22, 66);
+            this.pr_colorboxunit.Location = new System.Drawing.Point(44, 132);
+            this.pr_colorboxunit.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_colorboxunit.Name = "pr_colorboxunit";
-            this.pr_colorboxunit.Size = new System.Drawing.Size(31, 25);
+            this.pr_colorboxunit.Size = new System.Drawing.Size(60, 50);
             this.pr_colorboxunit.TabIndex = 42;
             this.pr_colorboxunit.Text = "克";
             // 
@@ -95,9 +100,10 @@
             this.label22.AutoSize = true;
             this.label22.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label22.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.label22.Location = new System.Drawing.Point(15, 32);
+            this.label22.Location = new System.Drawing.Point(30, 64);
+            this.label22.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label22.Name = "label22";
-            this.label22.Size = new System.Drawing.Size(50, 25);
+            this.label22.Size = new System.Drawing.Size(98, 50);
             this.label22.TabIndex = 20;
             this.label22.Text = "重量";
             // 
@@ -108,9 +114,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.SerialPortComBox_label.AutoSize = true;
             this.SerialPortComBox_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SerialPortComBox_label.Location = new System.Drawing.Point(43, 85);
+            this.SerialPortComBox_label.Location = new System.Drawing.Point(86, 170);
+            this.SerialPortComBox_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.SerialPortComBox_label.Name = "SerialPortComBox_label";
-            this.SerialPortComBox_label.Size = new System.Drawing.Size(78, 21);
+            this.SerialPortComBox_label.Size = new System.Drawing.Size(153, 41);
             this.SerialPortComBox_label.TabIndex = 42;
             this.SerialPortComBox_label.Text = "Com端口";
             // 
@@ -121,9 +128,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.BaudRate_label.AutoSize = true;
             this.BaudRate_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BaudRate_label.Location = new System.Drawing.Point(62, 124);
+            this.BaudRate_label.Location = new System.Drawing.Point(124, 248);
+            this.BaudRate_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.BaudRate_label.Name = "BaudRate_label";
-            this.BaudRate_label.Size = new System.Drawing.Size(58, 21);
+            this.BaudRate_label.Size = new System.Drawing.Size(114, 41);
             this.BaudRate_label.TabIndex = 44;
             this.BaudRate_label.Text = "波特率";
             // 
@@ -135,13 +143,13 @@
             this.StopTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.StopTest.Image = ((System.Drawing.Image)(resources.GetObject("StopTest.Image")));
             this.StopTest.IsShowBorder = true;
-            this.StopTest.Location = new System.Drawing.Point(203, 190);
-            this.StopTest.Margin = new System.Windows.Forms.Padding(2);
+            this.StopTest.Location = new System.Drawing.Point(406, 380);
+            this.StopTest.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.StopTest.MoveImage = ((System.Drawing.Image)(resources.GetObject("StopTest.MoveImage")));
             this.StopTest.Name = "StopTest";
             this.StopTest.NormalImage = ((System.Drawing.Image)(resources.GetObject("StopTest.NormalImage")));
             this.StopTest.Power = null;
-            this.StopTest.Size = new System.Drawing.Size(67, 23);
+            this.StopTest.Size = new System.Drawing.Size(134, 46);
             this.StopTest.TabIndex = 45;
             this.StopTest.Text = "停止调试";
             this.StopTest.UseVisualStyleBackColor = true;
@@ -152,12 +160,12 @@
             this.BaudRate.AllPower = null;
             this.BaudRate.BackColor = System.Drawing.Color.White;
             this.BaudRate.ID = null;
-            this.BaudRate.Location = new System.Drawing.Point(130, 126);
-            this.BaudRate.Margin = new System.Windows.Forms.Padding(2);
+            this.BaudRate.Location = new System.Drawing.Point(260, 252);
+            this.BaudRate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.BaudRate.Name = "BaudRate";
             this.BaudRate.Negative = false;
             this.BaudRate.Power = null;
-            this.BaudRate.Size = new System.Drawing.Size(140, 21);
+            this.BaudRate.Size = new System.Drawing.Size(276, 35);
             this.BaudRate.Str = null;
             this.BaudRate.Str1 = null;
             this.BaudRate.Str2 = null;
@@ -171,13 +179,13 @@
             this.StartTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.StartTest.Image = ((System.Drawing.Image)(resources.GetObject("StartTest.Image")));
             this.StartTest.IsShowBorder = true;
-            this.StartTest.Location = new System.Drawing.Point(120, 190);
-            this.StartTest.Margin = new System.Windows.Forms.Padding(2);
+            this.StartTest.Location = new System.Drawing.Point(240, 380);
+            this.StartTest.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.StartTest.MoveImage = ((System.Drawing.Image)(resources.GetObject("StartTest.MoveImage")));
             this.StartTest.Name = "StartTest";
             this.StartTest.NormalImage = ((System.Drawing.Image)(resources.GetObject("StartTest.NormalImage")));
             this.StartTest.Power = null;
-            this.StartTest.Size = new System.Drawing.Size(67, 23);
+            this.StartTest.Size = new System.Drawing.Size(134, 46);
             this.StartTest.TabIndex = 41;
             this.StartTest.Text = "开始调试";
             this.StartTest.UseVisualStyleBackColor = true;
@@ -185,10 +193,10 @@
             // 
             // ComList
             // 
-            this.ComList.Location = new System.Drawing.Point(130, 86);
-            this.ComList.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ComList.Location = new System.Drawing.Point(260, 172);
+            this.ComList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ComList.Name = "ComList";
-            this.ComList.Size = new System.Drawing.Size(140, 20);
+            this.ComList.Size = new System.Drawing.Size(280, 40);
             this.ComList.TabIndex = 40;
             // 
             // normalButton1
@@ -199,6 +207,7 @@
             this.normalButton1.Image = ((System.Drawing.Image)(resources.GetObject("normalButton1.Image")));
             this.normalButton1.IsShowBorder = true;
             this.normalButton1.Location = new System.Drawing.Point(0, 0);
+            this.normalButton1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
             this.normalButton1.Name = "normalButton1";
             this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
@@ -208,11 +217,22 @@
             this.normalButton1.Text = "normalButton1";
             this.normalButton1.UseVisualStyleBackColor = true;
             // 
+            // Remark
+            // 
+            this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Remark.Location = new System.Drawing.Point(170, 558);
+            this.Remark.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.Remark.Name = "Remark";
+            this.Remark.Size = new System.Drawing.Size(476, 156);
+            this.Remark.TabIndex = 195;
+            this.Remark.Text = "";
+            // 
             // SystemSetting_ScaleTest
             // 
-            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(916, 474);
+            this.ClientSize = new System.Drawing.Size(1832, 948);
+            this.Controls.Add(this.Remark);
             this.Controls.Add(this.StopTest);
             this.Controls.Add(this.BaudRate_label);
             this.Controls.Add(this.BaudRate);
@@ -222,6 +242,7 @@
             this.Controls.Add(this.panel4);
             this.Controls.Add(this.normalButton1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Name = "SystemSetting_ScaleTest";
             this.Tag = "Setup!ScaleTest";
             this.Text = " ";
@@ -249,5 +270,6 @@
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox BaudRate;
         private System.Windows.Forms.Label BaudRate_label;
         private CustomControl.ButtonUtil.NormalButton StopTest;
+        private CustomControl.RichText.RichTextAutoBottom Remark;
     }
 }

+ 9 - 1
UAS_MES_ZT/FunctionCode/SystemSetting/SystemSetting_ScaleTest.cs

@@ -77,7 +77,15 @@ namespace UAS_MES_NEW.SystemSetting
                         {
                             try
                             {
-                                Weight.Text = re.Match(serialPort1.ReadLine().Trim()).Groups[0].Value;
+                                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 = weigh;
+                                }
                             }
                             catch (Exception)
                             {

+ 6 - 6
UAS_MES_ZT/FunctionCode/Warehouse/Warehouse_FinishedProductOut.cs

@@ -49,7 +49,7 @@ namespace UAS_MES_NEW.Warehouse
             pi_inoutno.SelectField = "pi_id # ID,pi_title  # 客户名称,pi_inoutno # 出货单号,pi_type # 出货类型";
             pi_inoutno.SetValueField = new string[] { "pi_title", "pi_inoutno", "pi_id", "pi_type" };
             pi_inoutno.FormName = Name;
-            pi_inoutno.Condition = "pi_pdastatus<>'已出库' and pi_class='出货单'";
+            pi_inoutno.Condition = "nvl(pi_pdastatus,' ')<>'已出库' and pi_type in( '销售出货','委外领料')";
             pi_inoutno.DbChange += Pi_inoutno_DbChange;
             asc.controllInitializeSize(this);
             dh = SystemInf.dh;
@@ -82,7 +82,7 @@ namespace UAS_MES_NEW.Warehouse
                 BaseUtil.SetFormValue(this.Controls, dtpi);
             }
 
-            if (pi_type.Text == "按订单出货")
+            if (pi_type.Text == "销售出货"|| pi_type.Text == "委外领料")
             {
                 sql.Clear();
                 sql.Append("select nvl((select sum(pd_outqty) from prodiodetail where pd_piid=" + pi_id.Text + "),0)outqty,nvl((select count(1)cn from prodiomac where pim_inoutno=pd_inoutno),0) getqty  ");
@@ -192,7 +192,7 @@ namespace UAS_MES_NEW.Warehouse
                             OperateResult.AppendText("出货单" + pi_inoutno.Text + "尚未备货,无法确认出货\n", Color.Red);
                             return;
                         }
-                        else if (dt.Rows[0]["pi_type"].ToString() == "按订单出货" && dt.Rows[0]["pi_pdastatus"].ToString() == "备货中")
+                        else if (dt.Rows[0]["pi_type"].ToString() != "自由出货" && dt.Rows[0]["pi_pdastatus"].ToString() == "备货中")
                         {
                             OperateResult.AppendText("出货单" + pi_inoutno.Text + "未完成备货,无法确认出货\n", Color.Red);
                             return;
@@ -473,7 +473,7 @@ namespace UAS_MES_NEW.Warehouse
                                     OperateResult.AppendText("序列号" + input.Text + "已经被出货单:" + ms_outno + "采集\n", Color.Red, input);
                                     return;
                                 }
-                                if (dta.Rows[0]["pi_type"].ToString() == "按订单出货")
+                                if (dta.Rows[0]["pi_type"].ToString() != "自由出货")
                                 {
                                     string pr_packrule = dh.getFieldDataByCondition("product", "pr_packrule", "pr_code = '" + dtms.Rows[0]["ms_prodcode"].ToString() + "'").ToString();
                                     if (pr_packrule == "SALE")
@@ -527,7 +527,7 @@ namespace UAS_MES_NEW.Warehouse
                         }
                         LoadFormData();
                         LoadGridData();
-                        if (dta.Rows[0]["pi_type"].ToString() == "按订单出货")
+                        if (dta.Rows[0]["pi_type"].ToString() != "自由出货")
                         {
                             if (int.Parse(dtform.Rows[0]["outqty"].ToString()) > int.Parse(dtform.Rows[0]["getqty"].ToString()))
                             {
@@ -772,7 +772,7 @@ namespace UAS_MES_NEW.Warehouse
                 OperateResult.AppendText(type + input.Text + "内序列号未完工,序列号:" + dt.Rows[0]["data"].ToString() + "\n", Color.Red, input);
                 return false;
             }
-            if (dta.Rows[0]["pi_type"].ToString() == "按订单出货")
+            if (dta.Rows[0]["pi_type"].ToString() != "自由出货")
             {
                 //获取进行出库的产品的包装规则
                 string pr_packrule = dh.getFieldDataByCondition("product left join package on pr_code = pa_prodcode", "pr_packrule", "pa_outboxcode = '" + input.Text + "'").ToString();

+ 2 - 2
UAS_MES_ZT/PublicMethod/LogicHandler.cs

@@ -185,7 +185,7 @@ namespace UAS_MES_NEW.PublicMethod
             }
             else
             {
-                if (!(User.CurrentStepCode == "BZ_PACK"|| User.CurrentStepCode == "AGEING")) {
+                if (!(User.CurrentStepCode == "Aging" || User.CurrentStepCode == "PKG")) {
                     SetCheck set = new SetCheck("NG", Color.Red);
                     BaseUtil.SetFormCenter(set);
                     set.ShowDialog();
@@ -226,7 +226,7 @@ namespace UAS_MES_NEW.PublicMethod
             oMakeCode = "";
             oErrorMessage = "";
             oStatus = "";
-            DataTable dt = dh.getFieldsDataByCondition("MakeSerial", new string[] { "ms_makecode", "ms_status" }, "ms_id=(select max(ms_id) from makeserial where ms_sncode='" + iSnCode + "')");
+            DataTable dt = dh.getFieldsDataByCondition("MakeSerial", new string[] { "ms_makecode", "ms_status" }, "ms_id=(select max(ms_id) from makeserial where ms_sncode='" + iSnCode + "' and ms_status <> 2)");
             if (dt.Rows.Count > 0)
             {
                 oMakeCode = dt.Rows[0]["ms_makecode"].ToString();

+ 6 - 6
UAS_MES_ZT/PublicMethod/Print.cs

@@ -37,12 +37,12 @@ namespace UAS_MES_NEW.PublicMethod
                 {
                     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;
-                }
+                //////如果已经打印过了,则不允许再打印
+                //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);

+ 11 - 1
UAS_MES_ZT/UAS_MES_ZT.csproj

@@ -690,6 +690,12 @@
     <Compile Include="FunctionCode\Make\Make_TestCollectionBad.Designer.cs">
       <DependentUpon>Make_TestCollectionBad.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_StepReportDetail.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_StepReportDetail.Designer.cs">
+      <DependentUpon>Make_StepReportDetail.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Packing\Packing_BigBoxCollection.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1143,7 +1149,7 @@
     <Compile Include="FunctionCode\SystemSetting\SystemSetting_ScaleTest.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="FunctionCode\SystemSetting\SystemSetting_ScaleTest.designer.cs">
+    <Compile Include="FunctionCode\SystemSetting\SystemSetting_ScaleTest.Designer.cs">
       <DependentUpon>SystemSetting_ScaleTest.cs</DependentUpon>
     </Compile>
     <Compile Include="FunctionCode\SystemSetting\SystemSetting_SysNav.cs">
@@ -1310,6 +1316,7 @@
     </EmbeddedResource>
     <EmbeddedResource Include="CustomControl\HeadBar\HeadBar.resx">
       <DependentUpon>HeadBar.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="CustomControl\HeadBar\HeadBar.zu.resx">
       <DependentUpon>HeadBar.cs</DependentUpon>
@@ -1464,6 +1471,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_TestCollectionBad.resx">
       <DependentUpon>Make_TestCollectionBad.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_StepReportDetail.resx">
+      <DependentUpon>Make_StepReportDetail.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Packing\Packing_BigBoxCollection.resx">
       <DependentUpon>Packing_BigBoxCollection.cs</DependentUpon>
     </EmbeddedResource>

Some files were not shown because too many files changed in this diff