2 Commits 14b840d7bf ... b156dbb227

Author SHA1 Message Date
  caosy b156dbb227 Merge branch 'master' of repos.ubtob.net:usoft/mes-client 2 months ago
  caosy c6b5f87ebf 行之成MES提交 2 months ago

+ 7 - 2
UAS_MES_XZC/CustomControl/ComBoxWithFocus/ComBoxWithFocus.Designer.cs

@@ -28,8 +28,13 @@
         /// </summary>
         private void InitializeComponent()
         {
-            components = new System.ComponentModel.Container();
-           // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.SuspendLayout();
+            // 
+            // ComBoxWithFocus
+            // 
+            this.ItemHeight = 100;
+            this.ResumeLayout(false);
+
         }
 
         #endregion

+ 123 - 0
UAS_MES_XZC/CustomControl/ComBoxWithFocus/ComBoxWithFocus.resx

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

+ 19 - 224
UAS_MES_XZC/FunctionCode/Make/Make_CollectNetCode.Designer.cs

@@ -28,256 +28,51 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.components = new System.ComponentModel.Container();
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_CollectNetCode));
-            this.pr_detail_label = new System.Windows.Forms.Label();
-            this.sncode_label = new System.Windows.Forms.Label();
-            this.mcd_remainqty_label = new System.Windows.Forms.Label();
-            this.mcd_okqty_label = new System.Windows.Forms.Label();
-            this.pr_code_label = new System.Windows.Forms.Label();
-            this.ms_makecode_label = new System.Windows.Forms.Label();
-            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
-            this.Delete = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
-            this.mcd_okqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
-            this.ma_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.fileSystemWatcher1 = new System.IO.FileSystemWatcher();
+            ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).BeginInit();
             this.SuspendLayout();
             // 
-            // 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(603, 27);
-            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(92, 27);
-            this.pr_detail_label.TabIndex = 191;
-            this.pr_detail_label.Text = "产品名称";
-            // 
-            // sncode_label
-            // 
-            this.sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left)));
-            this.sncode_label.AutoSize = true;
-            this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sncode_label.Location = new System.Drawing.Point(19, 527);
-            this.sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.sncode_label.Name = "sncode_label";
-            this.sncode_label.Size = new System.Drawing.Size(72, 27);
-            this.sncode_label.TabIndex = 190;
-            this.sncode_label.Text = "录入框";
-            // 
-            // mcd_remainqty_label
-            // 
-            this.mcd_remainqty_label.AutoSize = true;
-            this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty_label.Location = new System.Drawing.Point(315, 88);
-            this.mcd_remainqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_remainqty_label.Name = "mcd_remainqty_label";
-            this.mcd_remainqty_label.Size = new System.Drawing.Size(72, 27);
-            this.mcd_remainqty_label.TabIndex = 187;
-            this.mcd_remainqty_label.Text = "剩余数";
-            // 
-            // mcd_okqty_label
-            // 
-            this.mcd_okqty_label.AutoSize = true;
-            this.mcd_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty_label.Location = new System.Drawing.Point(8, 88);
-            this.mcd_okqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_okqty_label.Name = "mcd_okqty_label";
-            this.mcd_okqty_label.Size = new System.Drawing.Size(92, 27);
-            this.mcd_okqty_label.TabIndex = 186;
-            this.mcd_okqty_label.Text = "采集计数";
-            // 
-            // pr_code_label
-            // 
-            this.pr_code_label.AutoSize = true;
-            this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(315, 27);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
-            this.pr_code_label.TabIndex = 185;
-            this.pr_code_label.Text = "产品编号";
-            // 
-            // ms_makecode_label
-            // 
-            this.ms_makecode_label.AutoSize = true;
-            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(8, 27);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
-            this.ms_makecode_label.TabIndex = 184;
-            this.ms_makecode_label.Text = "工单编号";
-            // 
-            // StepCount
-            // 
-            this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(608, 88);
-            this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(106, 28);
-            this.StepCount.Source = null;
-            this.StepCount.StepCode = null;
-            this.StepCount.TabIndex = 200;
-            // 
-            // Delete
-            // 
-            this.Delete.AllPower = null;
-            this.Delete.BackColor = System.Drawing.Color.Transparent;
-            this.Delete.DownImage = ((System.Drawing.Image)(resources.GetObject("Delete.DownImage")));
-            this.Delete.Image = null;
-            this.Delete.IsShowBorder = true;
-            this.Delete.Location = new System.Drawing.Point(510, 527);
-            this.Delete.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.Delete.MoveImage = ((System.Drawing.Image)(resources.GetObject("Delete.MoveImage")));
-            this.Delete.Name = "Delete";
-            this.Delete.NormalImage = ((System.Drawing.Image)(resources.GetObject("Delete.NormalImage")));
-            this.Delete.Power = null;
-            this.Delete.Size = new System.Drawing.Size(100, 35);
-            this.Delete.TabIndex = 199;
-            this.Delete.Text = "取消";
-            this.Delete.UseVisualStyleBackColor = false;
-            this.Delete.Click += new System.EventHandler(this.deleteButton1_Click);
-            // 
-            // ms_makecode
-            // 
-            this.ms_makecode.AutoSize = true;
-            this.ms_makecode.CutLength = null;
-            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(123, 27);
-            this.ms_makecode.MaximumSize = new System.Drawing.Size(267, 0);
-            this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
-            this.ms_makecode.TabIndex = 198;
-            // 
-            // mcd_remainqty
-            // 
-            this.mcd_remainqty.AutoSize = true;
-            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(424, 88);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(24, 27);
-            this.mcd_remainqty.TabIndex = 195;
-            this.mcd_remainqty.Text = "0";
-            // 
-            // mcd_okqty
-            // 
-            this.mcd_okqty.AutoSize = true;
-            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(123, 88);
-            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_okqty.Name = "mcd_okqty";
-            this.mcd_okqty.Size = new System.Drawing.Size(24, 27);
-            this.mcd_okqty.TabIndex = 194;
-            this.mcd_okqty.Text = "0";
-            // 
-            // ma_prodcode
-            // 
-            this.ma_prodcode.AutoSize = true;
-            this.ma_prodcode.CutLength = null;
-            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(424, 27);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_prodcode.MaximumSize = new System.Drawing.Size(267, 0);
-            this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
-            this.ma_prodcode.TabIndex = 193;
-            // 
-            // pr_detail
-            // 
-            this.pr_detail.AutoSize = true;
-            this.pr_detail.CutLength = null;
-            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(722, 27);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(267, 0);
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 27);
-            this.pr_detail.TabIndex = 192;
-            // 
-            // sncode
-            // 
-            this.sncode.AllPower = "ifall";
-            this.sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left)));
-            this.sncode.BackColor = System.Drawing.Color.White;
-            this.sncode.ID = null;
-            this.sncode.Location = new System.Drawing.Point(130, 530);
-            this.sncode.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.sncode.Name = "sncode";
-            this.sncode.Power = null;
-            this.sncode.Size = new System.Drawing.Size(260, 25);
-            this.sncode.Str = null;
-            this.sncode.Str1 = null;
-            this.sncode.Str2 = null;
-            this.sncode.TabIndex = 189;
-            this.sncode.Tag = "ifread";
-            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
-            // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(13, 132);
+            this.OperateResult.Location = new System.Drawing.Point(61, 156);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(736, 381);
-            this.OperateResult.TabIndex = 188;
+            this.OperateResult.Size = new System.Drawing.Size(978, 500);
+            this.OperateResult.TabIndex = 189;
             this.OperateResult.Text = "";
             // 
+            // fileSystemWatcher1
+            // 
+            this.fileSystemWatcher1.EnableRaisingEvents = true;
+            this.fileSystemWatcher1.Path = "\\\\192.168.10.1\\othersystem\\Type2Output";
+            this.fileSystemWatcher1.SynchronizingObject = this;
+            this.fileSystemWatcher1.Created += new System.IO.FileSystemEventHandler(this.OnCreated);
+            // 
             // Make_CollectNetCode
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(988, 567);
-            this.Controls.Add(this.StepCount);
-            this.Controls.Add(this.Delete);
-            this.Controls.Add(this.ms_makecode);
-            this.Controls.Add(this.mcd_remainqty);
-            this.Controls.Add(this.mcd_okqty);
-            this.Controls.Add(this.ma_prodcode);
-            this.Controls.Add(this.pr_detail);
-            this.Controls.Add(this.pr_detail_label);
-            this.Controls.Add(this.sncode_label);
-            this.Controls.Add(this.sncode);
+            this.ClientSize = new System.Drawing.Size(1112, 680);
             this.Controls.Add(this.OperateResult);
-            this.Controls.Add(this.mcd_remainqty_label);
-            this.Controls.Add(this.mcd_okqty_label);
-            this.Controls.Add(this.pr_code_label);
-            this.Controls.Add(this.ms_makecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Name = "Make_CollectNetCode";
             this.Tag = "Make!CollectNetCode";
             this.Text = "网标采集";
             this.Activated += new System.EventHandler(this.Make_CollectNetCode_Activated);
+            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Make_CollectNetCode_FormClosed);
             this.Load += new System.EventHandler(this.Make_CollectNetCode_Load);
             this.SizeChanged += new System.EventHandler(this.Make_CollectNetCode_SizeChanged);
-            this.ResumeLayout(true);
-            this.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).EndInit();
+            this.ResumeLayout(false);
 
         }
 
         #endregion
-        private CustomControl.ValueLabel.ValueNumLabel mcd_remainqty;
-        private CustomControl.ValueLabel.ValueNumLabel mcd_okqty;
-        private CustomControl.ValueLabel.ValueLabel ma_prodcode;
-        private CustomControl.ValueLabel.ValueLabel pr_detail;
-        private System.Windows.Forms.Label pr_detail_label;
-        private System.Windows.Forms.Label sncode_label;
-        private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
+
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
-        private System.Windows.Forms.Label mcd_remainqty_label;
-        private System.Windows.Forms.Label mcd_okqty_label;
-        private System.Windows.Forms.Label pr_code_label;
-        private System.Windows.Forms.Label ms_makecode_label;
-        private CustomControl.ValueLabel.ValueLabel ms_makecode;
-        private CustomControl.ButtonUtil.NormalButton Delete;
-        private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private System.IO.FileSystemWatcher fileSystemWatcher1;
     }
 }

+ 253 - 213
UAS_MES_XZC/FunctionCode/Make/Make_CollectNetCode.cs

@@ -1,11 +1,14 @@
-using System;
+using DevExpress.XtraRichEdit.API.Word;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Windows.Forms;
+using System.Xml;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
@@ -37,198 +40,274 @@ namespace UAS_MES_NEW.Make
             InitializeComponent();
         }
 
+
+        //FileSystemWatcher watcher;
+
+
         private void Make_CollectNetCode_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            sncode.Focus();
             dh = SystemInf.dh;
-            StepCount.StepCode = User.CurrentStepCode;
-            StepCount.Source = User.UserSourceCode;
-            StepCount.LineCode = User.UserLineCode;
-            StepCount.Dh = dh;
-            StepCount.Start();
+
+            //string sharedFolderPath = @"\\192.168.10.1\othersystem\Type2Output";
+
+            //// 确保路径以反斜杠结尾,以便正确监控目录
+            //if (!sharedFolderPath.EndsWith("\\"))
+            //{
+            //    sharedFolderPath += "\\";
+            //}
+
+            ////string sharedFolderPath = @"D:\mes";
+            ////// 确保路径以反斜杠结尾,以便正确监控目录
+            ////if (!sharedFolderPath.EndsWith("\\"))
+            ////{
+            ////    sharedFolderPath += "\\";
+            ////}
+
+
+            //// 创建FileSystemWatcher实例
+            //watcher = new FileSystemWatcher
+            //{
+            //    Path = sharedFolderPath,
+            //    NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastWrite | NotifyFilters.Size | NotifyFilters.DirectoryName,
+            //    Filter = "*.*", // 监控所有文件
+            //    IncludeSubdirectories = false, // 根据需要设置为true以监控子目录
+            //    EnableRaisingEvents = true
+            //};
+
+            // 绑定事件处理程序
+            //fileSystemWatcher1.Created += OnCreated;
+            //watcher.Changed += OnChanged;
+            //watcher.Deleted += OnDeleted;
+            //watcher.Renamed += OnRenamed;
+            OperateResult.AppendText(DateTime.Now+" 开始监控文件夹: " + fileSystemWatcher1.Path+ "\n");
         }
 
-        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        // 文件创建事件处理程序
+        private  void OnCreated(object sender, FileSystemEventArgs e)
         {
-            if (e.KeyCode == Keys.Enter)
+            try
             {
-                string ErrorMessage2;
-                string oMakeCode;
-                //采集序列号
-                if (!isnetcode)
-                {
-                    if (sncode.Text == "")
-                    {
-                        OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
-                        return;
-                    }
-                    if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage2))
-                    {
-                        //判断界面工单是否为空时的序列号是否自动归属工单
-                        string oStatus = "";
-                        dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + sncode.Text + "' order by ms_id desc", "select");
-                        if (dt.Rows.Count > 0)
-                        {
-                            sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
-                        }
-                        else
-                        {
-                            dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + sncode.Text + "' order by ms_id desc", "select");
-                            if (dt.Rows.Count > 0)
-                            {
-                                sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
-                            }
-                            else
-                            {
-                                dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei1='" + sncode.Text + "' order by mil_id desc", "select");
-                                if (dt.Rows.Count > 0)
-                                {
-                                    sncode.Text = dt.Rows[0]["mil_sncode"].ToString();
-                                }
-                                else
-                                {
-                                    dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei2='" + sncode.Text + "' order by mil_id desc", "select");
-                                    if (dt.Rows.Count > 0)
-                                    {
-                                        sncode.Text = dt.Rows[0]["mil_sncode"].ToString();
-                                    }
-                                }
-                            }
-                        }
-                        if (!LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out oStatus, out ErrorMessage2))
-                        {
-                            if (ms_makecode.Text == "")
-                            {
-                                OperateResult.AppendText(">>" + ErrorMessage2 + "\n", Color.Red, sncode);
-                                return;
-                            }
-                        }
+                OperateResult.AppendText(DateTime.Now+" 文件创建: " + e.FullPath + "\n");
+                //第一版
+                //if (e.FullPath.Contains("PSK"))
+                //{
+                //    XmlDocument xmlDoc = new XmlDocument();
+                //    XmlReaderSettings settings = new XmlReaderSettings { CheckCharacters = false };
+                //    //忽略文档里面的注释
+                //    settings.IgnoreComments = true;
+                //    XmlReader reader = XmlReader.Create(e.FullPath, settings);
+                //    xmlDoc.Load(reader);
+                //    XmlNode xMLNode = xmlDoc.SelectSingleNode("ProductDataSend");
+                //    XmlNodeList elements = xMLNode.SelectNodes("Element");
+                //    int i = 1;
+                //    string code = "";
+                //    string linecode = "";
+                //    string table = "";
+                //    string psid = "";
+                //    foreach (XmlNode element in elements)
+                //    {
+                //        // 提取并打印每个子节点的值
+                //        string date = element["Date"].InnerText;
+                //        string mcNo = element["MCNo"].InnerText;//机器号1-4
+                //        string stage = element["Stage"].InnerText;
+                //        string lane = element["Lane"].InnerText;//轨道 1 2 分别为1线2线
+                //        string mjsFileName = element["MjsFileName"].InnerText.Split('.')[0];//产品料号
+                //        string mjsGroupName = element["MjsGroupName"].InnerText;
+                //        string lotName = element["LotName"].InnerText;//程序具体名 有BOT的为B面 否则为A面
+                //        string lotNumber = element["LotNumber"].InnerText;
+                //        string fAdd = element["FAdd"].InnerText;//设备站位
+                //        string fSAdd = element["FSAdd"].InnerText;//设备左右 1左2右 如果是占多位置此为0 托盘也是1
+                //        string partsName = element["PartsName"].InnerText;//物料编号
+                //        string partsCount = element["PartsCount"].InnerText;//单位用量
+                //        string chipIni = element["ChipIni"].InnerText;
+                //        string fdrType = element["FdrType"].InnerText;
+                //        string fdrWidth = element["FdrWidth"].InnerText;
+                //        string fdrPitch = element["FdrPitch"].InnerText;
+                //        string skip = element["Skip"].InnerText;
 
-                        OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
-                        // 获取工单归属工单下一工序是否正确
-                        if (LogicHandler.CheckStepSNAndMacode(ms_makecode.Text == "" ? oMakeCode : ms_makecode.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage2))
-                        {
-                            string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
-                            if (nextstepcode != User.CurrentStepCode)
-                            {
-                                OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + nextstepcode + ",不是当前岗位的工序\n", Color.Red, sncode);
-                                return;
-                            }
-                            sql.Clear();
-                            sql.Append("select ma_code as ms_makecode,nvl(mcd_okqty,0),ma_prodcode,pr_detail,");
-                            sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,nvl(ma_unlimitin,0) ma_unlimitin from make left join makecraftdetail on ");
-                            sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + oMakeCode + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
-                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                            if (dt.Rows.Count > 0)
-                            {
-                                ma_unlimitin = int.Parse(dt.Rows[0]["ma_unlimitin"].ToString());
-                                BaseUtil.SetFormValue(this.Controls, dt);
-                                //dh.UpdateByCondition("makeserial", "ms_currentstepcode = '" + User.CurrentStepCode + "'", "ms_id = '" + oMsID + "'");
-                                OperateResult.AppendText(">>请输入网标\n", Color.Black);
-                                sn_code = sncode.Text;
-                                sncode.Text = "";
-                                isnetcode = true;
-                                return;
-                            }
-                            else OperateResult.AppendText(">>序列号" + sncode.Text + "没有对应工序\n", Color.Red, sncode);
-                        }
-                        else OperateResult.AppendText(">>" + ErrorMessage2 + "\n", Color.Red, sncode);
-                    }
-                    else OperateResult.AppendText(">>" + ErrorMessage2 + "\n", Color.Red, sncode);
-                }
-                //采集netcode
-                else
+                //        //// 打印提取的信息,或者你可以根据需要处理这些信息
+                //        //Console.WriteLine($"Date: {date}");
+                //        //Console.WriteLine($"MCNo: {mcNo}");
+                //        //Console.WriteLine($"Stage: {stage}");
+                //        //Console.WriteLine($"Lane: {lane}");
+                //        //Console.WriteLine($"MjsFileName: {mjsFileName}");
+                //        //Console.WriteLine($"MjsGroupName: {mjsGroupName}");
+                //        //Console.WriteLine($"LotName: {lotName}");
+                //        //Console.WriteLine($"LotNumber: {lotNumber}");
+                //        //Console.WriteLine($"FAdd: {fAdd}");
+                //        //Console.WriteLine($"FSAdd: {fSAdd}");
+                //        //Console.WriteLine($"PartsName: {partsName}");
+                //        //Console.WriteLine($"ChipIni: {chipIni}");
+                //        //Console.WriteLine($"FdrType: {fdrType}");
+                //        //Console.WriteLine($"FdrWidth: {fdrWidth}");
+                //        //Console.WriteLine($"FdrPitch: {fdrPitch}");
+                //        //Console.WriteLine($"Skip: {skip}");
+                //        //Console.WriteLine(); // 空行分隔不同的<Element>节点信息
+                //        if (i == 1)
+                //        {
+                //            linecode = lane == "1" ? "SMT01" : "SMT02";
+                //            table = lotName.EndsWith("-B") ? "B" : "A";
+                //            if (!dh.CheckExist("productsmt", "ps_prodcode = '" + mjsFileName + "' " +
+                //                "and ps_linecode = '" + linecode + "' and ps_table = '" + table + "'"))
+                //            {
+                //                LogicHandler.GetSerialNumByCaller("PRODUCTSMT", out code);
+                //                psid = dh.GetSEQ("productsmt_seq");
+                //                dh.ExecuteSql(" insert into productsmt(PS_ID, PS_CODE, PS_PRODCODE, PS_LINECODE, PS_TABLE, PS_STATUS, PS_INDATE," +
+                //                    " PS_INMAN, PS_AUDITDATE, PS_AUDITMAN, PS_STATUSCODE) values (" + psid + ",'" + code + "','" + mjsFileName + "','" + linecode + "'" +
+                //                    ",'" + table + "','已审核',sysdate,'管理员',sysdate,'管理员','AUDITED') ", "insert");
+                //                OperateResult.AppendText(DateTime.Now + $" 新增站位主表,料号:{mjsFileName},线体:{linecode},板面:{table}\n");
+                //            }
+                //            else
+                //            {
+                //                psid = dh.getFieldDataByCondition("productsmt", "ps_id", " ps_prodcode = '" + mjsFileName + "' and ps_linecode = '" + linecode + "' and ps_table = '" + table + "' ").ToString();
+                //                dh.ExecuteSql(" delete productsmtlocation where psl_psid = " + psid + " " +
+                //                    "and psl_location in (select sli_location from SMTLOCATIONINTO where SLI_MCNO = '" + mcNo + "' ) ", "delete");
+                //                OperateResult.AppendText(DateTime.Now + $" 已存在站位主表,料号:{mjsFileName},线体:{linecode},板面:{table},删除机器:{mcNo}站位\n");
+                //            }
+                //            // Console.WriteLine("第一个");
+                //        }
+
+                //        if (!partsCount.Equals("0"))
+                //        {
+                //            dh.ExecuteSql(" insert into productsmtlocation (PSL_PSID, PSL_ID, PSL_DETNO, PSL_PRODCODE, PSL_REPCODE, PSL_LOCATION, PSL_BASEQTY, PSL_TABLE)" +
+                //                " select " + psid + ",productsmtlocation_seq.nextval,sli_id,'" + partsName + "','" + partsName + "',sli_location,1,'" + table + "' from smtlocationinto where sli_mcno = '" + mcNo + "' and sli_fadd ='" + fAdd + "' and instr(sli_fsadd,'" + fSAdd + "')>0 ", "insert");
+                //            OperateResult.AppendText(DateTime.Now + $" 插入机器:{mcNo},轨道:{lane},料号:{partsName},机器站位:{fAdd},左右:{fSAdd}\n");
+                //        }
+
+
+                //        i++;
+                //    }
+                //    reader.Close();
+                //}
+
+                //第二版
+                if (e.FullPath.Contains("PSK"))
                 {
-                    if (sncode.Text == "")
-                    {
-                        OperateResult.AppendText(">>网标号不能为空\n", Color.Red);
-                        return;
-                    }
-                    sql.Clear();
-                    sql.Append("select psr_prefix,psr_length from productsnrelation where psr_prodcode = '" + ma_prodcode.Text + "' and psr_type = 'NETCODE'");
-                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                    if (dt.Rows.Count > 0)
-                    {
-                        int psr_length = int.Parse(dt.Rows[0][1].ToString());
-                        string psr_prefix = dt.Rows[0][0].ToString();
-                        if (!checkLengthOrPre(psr_length, psr_prefix, "网标"))
-                        {
-                            sncode.Text = "";
-                            sncode.Focus();
-                            return;
-                        }
-                    }
-                    else
-                    {
-                        OperateResult.AppendText("<<产品" + ma_prodcode.Text + "未维护网标关联信息\n", Color.Red, sncode);
-                        return;
-                    }
-                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
-                    string ErrorMessage = "";
-                    string result = "";
-                    ////根据序列号获取此时网标号
-                    //net_code = dh.getFieldDataByCondition("makeserial", "ms_netcode", "ms_id = '" + oMsID + "'").ToString();
-                    if (int.Parse(mcd_remainqty.Text) <= 0 && ma_unlimitin == 0)
+                    XmlDocument xmlDoc = new XmlDocument();
+                    XmlReaderSettings settings = new XmlReaderSettings { CheckCharacters = false };
+                    //忽略文档里面的注释
+                    settings.IgnoreComments = true;
+                    XmlReader reader = XmlReader.Create(e.FullPath, settings);
+                    xmlDoc.Load(reader);
+                    XmlNode xMLNode = xmlDoc.SelectSingleNode("ProductDataSend");
+                    XmlNodeList elements = xMLNode.SelectNodes("Element");
+                    int i = 1;
+                    string code = "";
+                    string linecode = "";
+                    string table = "";
+                    string psid = "";
+                    foreach (XmlNode element in elements)
                     {
-                        ErrorMessage = "工单" + ms_makecode.Text + "剩余采集数不足\n>>>请输入SN";
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
-                        return;
-                    }
+                        // 提取并打印每个子节点的值
+                        string date = element["Date"].InnerText;
+                        string mcNo = element["MCNo"].InnerText;//机器号1-4
+                        string stage = element["Stage"].InnerText;
+                        string lane = element["Lane"].InnerText;//轨道 1 2 分别为1线2线
+                        string mjsFileName = element["MjsFileName"].InnerText.Split('.')[0];//产品料号
+                        string mjsGroupName = element["MjsGroupName"].InnerText;
+                        string lotName = element["LotName"].InnerText;//程序具体名 有BOT的为B面 否则为A面
+                        string lotNumber = element["LotNumber"].InnerText;
+                        string fAdd = element["FAdd"].InnerText;//设备站位
+                        string fSAdd = element["FSAdd"].InnerText;//设备左右 1左2右 如果是占多位置此为0 托盘也是1
+                        string partsName = element["PartsName"].InnerText;//物料编号
+                        string partsCount = element["PartsCount"].InnerText;//单位用量
+                        string chipIni = element["ChipIni"].InnerText;
+                        string fdrType = element["FdrType"].InnerText;
+                        string fdrWidth = element["FdrWidth"].InnerText;
+                        string fdrPitch = element["FdrPitch"].InnerText;
+                        string skip = element["Skip"].InnerText;
 
-                    if (dh.CheckExist("sninfo", "si_netcode = '" + sncode.Text + "'"))
-                    {
-                        OperateResult.AppendText(">>录入错误,此网标:" + sncode.Text + "已被" + dh.getFieldDataByCondition("sninfo", "si_sn", "si_netcode = '" + sncode.Text + "'").ToString() + "使用\n", Color.Red, sncode);
-                        OperateResult.AppendText(">>请输入网标\n", Color.Black);
-                        return;
-                    }
-                    if (dh.CheckExist("makeserial", "ms_netcode = '" + sncode.Text + "'"))
-                    {
-                        OperateResult.AppendText(">>录入错误,此网标:" + sncode.Text + "已被" + dh.getFieldDataByCondition("makeserial", "ms_sncode", "ms_netcode = '" + sncode.Text + "'").ToString() + "使用\n", Color.Red, sncode);
-                        OperateResult.AppendText(">>请输入网标\n", Color.Black);
-                        return;
-                    }
-                    else
-                    {
-                        if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code, "网标采集", "网标采集完成", User.UserCode, out ErrorMessage))
+                        //// 打印提取的信息,或者你可以根据需要处理这些信息
+                        //Console.WriteLine($"Date: {date}");
+                        //Console.WriteLine($"MCNo: {mcNo}");
+                        //Console.WriteLine($"Stage: {stage}");
+                        //Console.WriteLine($"Lane: {lane}");
+                        //Console.WriteLine($"MjsFileName: {mjsFileName}");
+                        //Console.WriteLine($"MjsGroupName: {mjsGroupName}");
+                        //Console.WriteLine($"LotName: {lotName}");
+                        //Console.WriteLine($"LotNumber: {lotNumber}");
+                        //Console.WriteLine($"FAdd: {fAdd}");
+                        //Console.WriteLine($"FSAdd: {fSAdd}");
+                        //Console.WriteLine($"PartsName: {partsName}");
+                        //Console.WriteLine($"ChipIni: {chipIni}");
+                        //Console.WriteLine($"FdrType: {fdrType}");
+                        //Console.WriteLine($"FdrWidth: {fdrWidth}");
+                        //Console.WriteLine($"FdrPitch: {fdrPitch}");
+                        //Console.WriteLine($"Skip: {skip}");
+                        //Console.WriteLine(); // 空行分隔不同的<Element>节点信息
+                        if (i == 1)
                         {
-                            //提示正确返回时传递的信息
-                            if (ErrorMessage.Contains("AFTERSUCCESS"))
-                                OperateResult.AppendText(">>" + ErrorMessage + "\n");
-                            //dh.UpdateByCondition("makeserial", "ms_netcode = '" + sncode.Text + "'", "ms_id = '" + oMsID + "'");
-                            string si_id = dh.getFieldDataByCondition("sninfo", "max(si_id) si_id", " si_sn in (select '" + sn_code + "' from dual union select sn from makesnrelation where beforesn = '" + sn_code + "' and sn <> ' '  union select beforesn from makesnrelation where sn = '" + sn_code + "' and beforesn <> ' ') ").ToString();
-                            if (si_id != "")
+                            linecode = lane == "1" ? "SMT01" : "SMT02";
+                            table = lotName.EndsWith("-B") ? "B" : "A";
+                            if (!dh.CheckExist("productsmt", "ps_prodcode = '" + mjsFileName + "' " +
+                                "and ps_linecode = '" + linecode + "' and ps_table = '" + table + "'"))
                             {
-                                dh.BatchInsert("update  sninfo set si_netcode = :netcode,si_indate = sysdate where si_id = :osiId", new String[] { "netcode", "osiId" }, new string[] { sncode.Text }, new string[] { si_id });
+                                LogicHandler.GetSerialNumByCaller("PRODUCTSMT", out code);
+                                psid = dh.GetSEQ("productsmt_seq");
+                                dh.ExecuteSql(" insert into productsmt(PS_ID, PS_CODE, PS_PRODCODE, PS_LINECODE, PS_TABLE, PS_STATUS, PS_INDATE," +
+                                    " PS_INMAN, PS_AUDITDATE, PS_AUDITMAN, PS_STATUSCODE) values (" + psid + ",'" + code + "','" + mjsFileName + "','" + linecode + "'" +
+                                    ",'" + table + "','已审核',sysdate,'管理员',sysdate,'管理员','AUDITED') ", "insert");
+                                OperateResult.AppendText(DateTime.Now + $" 新增站位主表,料号:{mjsFileName},线体:{linecode},板面:{table}\n");
                             }
                             else
                             {
-                                dh.BatchInsert("insert into sninfo (si_id,si_sn,si_netcode,si_indate) values (SnInfo_seq.nextval,:si_sn,:netcode,sysdate)", new String[] { "si_sn", "netcode" }, new string[] { sn_code }, new string[] { sncode.Text });
+                                psid = dh.getFieldDataByCondition("productsmt", "ps_id", " ps_prodcode = '" + mjsFileName + "' and ps_linecode = '" + linecode + "' and ps_table = '" + table + "' ").ToString();
+                                dh.ExecuteSql(" delete productsmtlocation where psl_psid = " + psid + " " +
+                                    "and psl_location in (select sli_location from SMTLOCATIONINTO where SLI_MCNO = '" + mcNo + "' ) ", "delete");
+                                OperateResult.AppendText(DateTime.Now + $" 已存在站位主表,料号:{mjsFileName},线体:{linecode},板面:{table},删除机器:{mcNo}站位\n");
                             }
-                            dh.BatchInsert("update  makeserial set ms_netcode = :netcode where ms_id = :oMsId", new String[] { "netcode", "oMsId" }, new string[] { sncode.Text }, new string[] { oMsID.ToString() });
-                            OperateResult.AppendText(">>网标采集完成,执行更新\n", Color.Green);
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "网标采集", "采集成功", sn_code, "");
-                            sql.Clear();
-                            sql.Append("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
-                            sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + ms_makecode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
-                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                            BaseUtil.SetFormValue(Controls, dt);
-                            printcount++;
-                            mcd_okqty.Text = printcount + "";
-                            isnetcode = false;
-                            sncode.Text = "";
-                            sncode.Focus();
+                            // Console.WriteLine("第一个");
                         }
-                        else
+
+                        if (!partsCount.Equals("0"))
                         {
-                            OperateResult.AppendText(">>更新错误" + ErrorMessage + "\n", Color.Red);
+                            dh.ExecuteSql(" insert into productsmtlocation (PSL_PSID, PSL_ID, PSL_DETNO, PSL_PRODCODE, PSL_REPCODE, PSL_LOCATION, PSL_BASEQTY, PSL_TABLE)" +
+                                " select " + psid + ",productsmtlocation_seq.nextval,sli_id,'" + partsName + "','" + partsName + "',sli_location,1,'" + table + "' from smtlocationinto where sli_mcno = '" + mcNo + "' and sli_fadd ='" + fAdd + "' and instr(sli_fsadd,'" + fSAdd + "')>0 ", "insert");
+                            OperateResult.AppendText(DateTime.Now + $" 插入机器:{mcNo},轨道:{lane},料号:{partsName},机器站位:{fAdd},左右:{fSAdd}\n");
+
+                            //dh.ExecuteSql(" insert into productsmtlocation (PSL_PSID, PSL_ID, PSL_DETNO, PSL_PRODCODE, PSL_REPCODE, PSL_LOCATION, PSL_BASEQTY, PSL_TABLE)" +
+                            //     " select " + psid + ",productsmtlocation_seq.nextval,sli_id,'" + partsName + "','" + partsName + "',sli_location,1,'" + table + "' from smtlocationinto where sli_mcno = '" + mcNo + "' and sli_lane ='" + lane + "' and sli_fadd ='" + fAdd + "' and instr(sli_fsadd,'" + fSAdd + "')>0 ", "insert");
+                            //OperateResult.AppendText(DateTime.Now + $" 插入机器:{mcNo},轨道:{lane},料号:{partsName},机器站位:{fAdd},左右:{fSAdd}\n");
                         }
-                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
+
+
+                        i++;
                     }
+                    reader.Close();
                 }
+
+
+            }
+            catch (Exception ex)
+            {
+                OperateResult.AppendText(DateTime.Now + " " + ex.Message + "\n");
             }
         }
 
+        // 文件更改事件处理程序
+        private  void OnChanged(object sender, FileSystemEventArgs e)
+        {
+           // OperateResult.AppendText("文件更改: " + e.FullPath+"\n");
+        }
+
+        // 文件删除事件处理程序
+        private  void OnDeleted(object sender, FileSystemEventArgs e)
+        {
+            //OperateResult.AppendText("文件删除: " + e.FullPath + "\n");
+        }
+
+        // 文件重命名事件处理程序
+        private  void OnRenamed(object sender, RenamedEventArgs e)
+        {
+            //OperateResult.AppendText("文件重命名: 从 "+ e.OldFullPath + " 到 "+ e.FullPath + "\n");
+        }
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+           
+        }
+
         private void Make_CollectNetCode_SizeChanged(object sender, EventArgs e)
         {
             asc.controlAutoSize(this);
@@ -236,59 +315,20 @@ namespace UAS_MES_NEW.Make
 
         private void Make_CollectNetCode_Activated(object sender, EventArgs e)
         {
-            sncode.Focus();
         }
 
 
-        /// <summary>
-        /// 检验长度或者前缀是否合法
-        /// </summary>
-        /// <param name="checkbox"></param>
-        /// <param name="c"></param>
-        /// <param name="info"></param>
-        private bool checkLengthOrPre(int psr_length, string psr_prefix, string TSNorSN)
+  
+
+        private void deleteButton1_Click(object sender, EventArgs e)
         {
-            //则判断输入转换前的序列号长度是否合法,不合法则提示
-            if (sncode.Text.Trim().Length != psr_length && psr_length != 0)
-            {
-                //序列号校验错误,长度错误
-                OperateResult.AppendText("<<" + TSNorSN + ":" + sncode.Text + "校验错误,长度错误\n", Color.Red, sncode);
-                OperateResult.AppendText(">>请重新输入" + TSNorSN + "\n", Color.Black);
-                return false;
-            }
-            string[] pres = psr_prefix.Split('|');
-            bool f = false;
-            for (int i = 0; i < pres.Length; i++)
-            {
-                if (pres[i] == "" ? true : sncode.Text.StartsWith(pres[i]))
-                {
-                    //满足其中一条即可
-                    f = true;
-                    break;
-                }
-            }
-            //则判断输入转换前的序列号前缀是否合法,不合法则提示
-            if (!f)
-            {
-                //序列号校验错误,前缀错误
-                OperateResult.AppendText("<<" + TSNorSN + ":" + sncode.Text + "校验错误,前缀错误\n", Color.Red, sncode);
-                OperateResult.AppendText(">>请重新输入" + TSNorSN + "\n", Color.Black);
-                return false;
-            }
-            return true;
+
         }
 
-        private void deleteButton1_Click(object sender, EventArgs e)
+        private void Make_CollectNetCode_FormClosed(object sender, FormClosedEventArgs e)
         {
-            if (isnetcode)
-            {
-                BaseUtil.CleanForm(this);
-                mcd_okqty.Text = printcount + "";
-                mcd_remainqty.Text = 0 + "";
-                OperateResult.AppendText(">>清除完成,清重新输入SN号\n", Color.Green);
-                isnetcode = false;
-                sncode.Focus();
-            }
+            // 释放资源
+            fileSystemWatcher1.Dispose();
         }
     }
 }

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

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

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

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

+ 116 - 102
UAS_MES_XZC/FunctionCode/Make/Make_PreFeedingCollection.Designer.cs

@@ -80,10 +80,10 @@
             // 
             this.mcd_restqty_label.AutoSize = true;
             this.mcd_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_restqty_label.Location = new System.Drawing.Point(1194, 122);
-            this.mcd_restqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_restqty_label.Location = new System.Drawing.Point(858, 95);
+            this.mcd_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_restqty_label.Name = "mcd_restqty_label";
-            this.mcd_restqty_label.Size = new System.Drawing.Size(146, 41);
+            this.mcd_restqty_label.Size = new System.Drawing.Size(110, 31);
             this.mcd_restqty_label.TabIndex = 59;
             this.mcd_restqty_label.Text = "待采集数";
             this.mcd_restqty_label.Visible = false;
@@ -92,10 +92,10 @@
             // 
             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(1413, 244);
-            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(1060, 183);
+            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(146, 41);
+            this.mcd_inqty_label.Size = new System.Drawing.Size(110, 31);
             this.mcd_inqty_label.TabIndex = 56;
             this.mcd_inqty_label.Text = "已采集数";
             this.mcd_inqty_label.Visible = false;
@@ -104,10 +104,10 @@
             // 
             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(18, 122);
-            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_qty_label.Location = new System.Drawing.Point(14, 92);
+            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(146, 41);
+            this.ma_qty_label.Size = new System.Drawing.Size(110, 31);
             this.ma_qty_label.TabIndex = 53;
             this.ma_qty_label.Text = "工单数量";
             // 
@@ -115,10 +115,10 @@
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(18, 24);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_makecode_label.Location = new System.Drawing.Point(14, 18);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(146, 41);
+            this.ms_makecode_label.Size = new System.Drawing.Size(110, 31);
             this.ms_makecode_label.TabIndex = 49;
             this.ms_makecode_label.Text = "归属工单";
             // 
@@ -126,10 +126,10 @@
             // 
             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(1170, 24);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(840, 21);
+            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(146, 41);
+            this.pr_detail_label.Size = new System.Drawing.Size(110, 31);
             this.pr_detail_label.TabIndex = 50;
             this.pr_detail_label.Text = "产品规格";
             // 
@@ -137,10 +137,10 @@
             // 
             this.ma_prodcode_label.AutoSize = true;
             this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode_label.Location = new System.Drawing.Point(622, 24);
-            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode_label.Location = new System.Drawing.Point(428, 21);
+            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode_label.Name = "ma_prodcode_label";
-            this.ma_prodcode_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_prodcode_label.Size = new System.Drawing.Size(110, 31);
             this.ma_prodcode_label.TabIndex = 51;
             this.ma_prodcode_label.Text = "产品代码";
             // 
@@ -150,10 +150,10 @@
             this.Loading.Checked = true;
             this.Loading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Loading.ForeColor = System.Drawing.Color.Blue;
-            this.Loading.Location = new System.Drawing.Point(36, 720);
-            this.Loading.Margin = new System.Windows.Forms.Padding(6);
+            this.Loading.Location = new System.Drawing.Point(27, 540);
+            this.Loading.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Loading.Name = "Loading";
-            this.Loading.Size = new System.Drawing.Size(113, 45);
+            this.Loading.Size = new System.Drawing.Size(87, 35);
             this.Loading.TabIndex = 62;
             this.Loading.TabStop = true;
             this.Loading.Text = "上料";
@@ -164,10 +164,10 @@
             this.UnLoading.AutoSize = true;
             this.UnLoading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.UnLoading.ForeColor = System.Drawing.Color.Blue;
-            this.UnLoading.Location = new System.Drawing.Point(196, 720);
-            this.UnLoading.Margin = new System.Windows.Forms.Padding(6);
+            this.UnLoading.Location = new System.Drawing.Point(147, 540);
+            this.UnLoading.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.UnLoading.Name = "UnLoading";
-            this.UnLoading.Size = new System.Drawing.Size(113, 45);
+            this.UnLoading.Size = new System.Drawing.Size(87, 35);
             this.UnLoading.TabIndex = 63;
             this.UnLoading.Text = "下料";
             this.UnLoading.UseVisualStyleBackColor = true;
@@ -176,10 +176,10 @@
             // 
             this.code_label.AutoSize = true;
             this.code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.code_label.Location = new System.Drawing.Point(28, 881);
-            this.code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.code_label.Location = new System.Drawing.Point(21, 661);
+            this.code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.code_label.Name = "code_label";
-            this.code_label.Size = new System.Drawing.Size(114, 41);
+            this.code_label.Size = new System.Drawing.Size(86, 31);
             this.code_label.TabIndex = 66;
             this.code_label.Text = "录入框";
             // 
@@ -187,10 +187,10 @@
             // 
             this.ms_craftcode.AutoSize = true;
             this.ms_craftcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_craftcode.Location = new System.Drawing.Point(1536, 30);
-            this.ms_craftcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_craftcode.Location = new System.Drawing.Point(1114, 25);
+            this.ms_craftcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_craftcode.Name = "ms_craftcode";
-            this.ms_craftcode.Size = new System.Drawing.Size(0, 41);
+            this.ms_craftcode.Size = new System.Drawing.Size(0, 31);
             this.ms_craftcode.TabIndex = 142;
             this.ms_craftcode.Visible = false;
             // 
@@ -198,10 +198,10 @@
             // 
             this.ma_craftcode.AutoSize = true;
             this.ma_craftcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_craftcode.Location = new System.Drawing.Point(1532, 122);
-            this.ma_craftcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_craftcode.Location = new System.Drawing.Point(1111, 95);
+            this.ma_craftcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_craftcode.Name = "ma_craftcode";
-            this.ma_craftcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_craftcode.Size = new System.Drawing.Size(0, 31);
             this.ma_craftcode.TabIndex = 145;
             this.ma_craftcode.Visible = false;
             // 
@@ -211,10 +211,9 @@
             this.NoteForChange.Checked = true;
             this.NoteForChange.CheckState = System.Windows.Forms.CheckState.Checked;
             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(22, 78);
-            this.NoteForChange.Margin = new System.Windows.Forms.Padding(4);
+            this.NoteForChange.Location = new System.Drawing.Point(16, 58);
             this.NoteForChange.Name = "NoteForChange";
-            this.NoteForChange.Size = new System.Drawing.Size(190, 35);
+            this.NoteForChange.Size = new System.Drawing.Size(144, 28);
             this.NoteForChange.TabIndex = 192;
             this.NoteForChange.Text = "切换工单提示";
             this.NoteForChange.UseVisualStyleBackColor = true;
@@ -224,6 +223,7 @@
             this.LabelDataGridView.AllowUserToAddRows = false;
             this.LabelDataGridView.AllowUserToResizeRows = false;
             this.LabelDataGridView.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
+            this.LabelDataGridView.ColumnHeadersHeight = 34;
             this.LabelDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.序号,
             this.cm_makecode,
@@ -231,12 +231,13 @@
             this.cm_soncode,
             this.cm_barcode,
             this.BarCode});
-            this.LabelDataGridView.Location = new System.Drawing.Point(36, 216);
-            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(6);
+            this.LabelDataGridView.Location = new System.Drawing.Point(27, 162);
+            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.LabelDataGridView.Name = "LabelDataGridView";
             this.LabelDataGridView.RowHeadersVisible = false;
+            this.LabelDataGridView.RowHeadersWidth = 62;
             this.LabelDataGridView.RowTemplate.Height = 23;
-            this.LabelDataGridView.Size = new System.Drawing.Size(1282, 454);
+            this.LabelDataGridView.Size = new System.Drawing.Size(962, 340);
             this.LabelDataGridView.TabIndex = 193;
             // 
             // 序号
@@ -244,6 +245,7 @@
             this.序号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.序号.DataPropertyName = "sp_detno";
             this.序号.HeaderText = "序号";
+            this.序号.MinimumWidth = 8;
             this.序号.Name = "序号";
             this.序号.ReadOnly = true;
             this.序号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
@@ -254,38 +256,42 @@
             this.cm_makecode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
             this.cm_makecode.DataPropertyName = "sp_fsoncode";
             this.cm_makecode.HeaderText = "上料料号";
+            this.cm_makecode.MinimumWidth = 8;
             this.cm_makecode.Name = "cm_makecode";
             this.cm_makecode.ReadOnly = true;
-            this.cm_makecode.Width = 151;
+            this.cm_makecode.Width = 116;
             // 
             // pr_detail_
             // 
             this.pr_detail_.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
             this.pr_detail_.DataPropertyName = "pr_detail";
             this.pr_detail_.HeaderText = "上料名称";
+            this.pr_detail_.MinimumWidth = 8;
             this.pr_detail_.Name = "pr_detail_";
             this.pr_detail_.ReadOnly = true;
-            this.pr_detail_.Width = 151;
+            this.pr_detail_.Width = 116;
             // 
             // cm_soncode
             // 
             this.cm_soncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
             this.cm_soncode.DataPropertyName = "sp_prefix";
             this.cm_soncode.HeaderText = "前缀";
+            this.cm_soncode.MinimumWidth = 8;
             this.cm_soncode.Name = "cm_soncode";
             this.cm_soncode.ReadOnly = true;
             this.cm_soncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.cm_soncode.Width = 64;
+            this.cm_soncode.Width = 50;
             // 
             // cm_barcode
             // 
             this.cm_barcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
             this.cm_barcode.DataPropertyName = "sp_length";
             this.cm_barcode.HeaderText = "长度";
+            this.cm_barcode.MinimumWidth = 8;
             this.cm_barcode.Name = "cm_barcode";
             this.cm_barcode.ReadOnly = true;
             this.cm_barcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.cm_barcode.Width = 64;
+            this.cm_barcode.Width = 50;
             // 
             // BarCode
             // 
@@ -302,10 +308,10 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(28, 800);
-            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Location = new System.Drawing.Point(21, 600);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(114, 41);
+            this.label1.Size = new System.Drawing.Size(86, 31);
             this.label1.TabIndex = 195;
             this.label1.Text = "主条码";
             // 
@@ -313,10 +319,10 @@
             // 
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.ClearSn_code.Location = new System.Drawing.Point(578, 809);
-            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ClearSn_code.Location = new System.Drawing.Point(434, 607);
+            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ClearSn_code.Name = "ClearSn_code";
-            this.ClearSn_code.Size = new System.Drawing.Size(32, 32);
+            this.ClearSn_code.Size = new System.Drawing.Size(24, 24);
             this.ClearSn_code.TabIndex = 196;
             this.ClearSn_code.TabStop = false;
             this.ClearSn_code.Click += new System.EventHandler(this.ClearSn_code_Click);
@@ -326,6 +332,7 @@
             this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.dataGridViewTextBoxColumn1.DataPropertyName = "cm_makecode";
             this.dataGridViewTextBoxColumn1.HeaderText = "上料料号";
+            this.dataGridViewTextBoxColumn1.MinimumWidth = 8;
             this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
             this.dataGridViewTextBoxColumn1.ReadOnly = true;
             this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
@@ -336,26 +343,32 @@
             this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
             this.dataGridViewTextBoxColumn2.DataPropertyName = "pr_detail";
             this.dataGridViewTextBoxColumn2.HeaderText = "上料名称";
+            this.dataGridViewTextBoxColumn2.MinimumWidth = 8;
             this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
             this.dataGridViewTextBoxColumn2.ReadOnly = true;
+            this.dataGridViewTextBoxColumn2.Width = 150;
             // 
             // dataGridViewTextBoxColumn3
             // 
             this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
             this.dataGridViewTextBoxColumn3.DataPropertyName = "cm_soncode";
             this.dataGridViewTextBoxColumn3.HeaderText = "前缀";
+            this.dataGridViewTextBoxColumn3.MinimumWidth = 8;
             this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
             this.dataGridViewTextBoxColumn3.ReadOnly = true;
             this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn3.Width = 150;
             // 
             // dataGridViewTextBoxColumn4
             // 
             this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
             this.dataGridViewTextBoxColumn4.DataPropertyName = "cm_barcode";
             this.dataGridViewTextBoxColumn4.HeaderText = "长度";
+            this.dataGridViewTextBoxColumn4.MinimumWidth = 8;
             this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
             this.dataGridViewTextBoxColumn4.ReadOnly = true;
             this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn4.Width = 150;
             // 
             // dataGridViewTextBoxColumn5
             // 
@@ -366,6 +379,7 @@
             this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
             this.dataGridViewTextBoxColumn5.ReadOnly = true;
             this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn5.Width = 150;
             // 
             // dataGridViewTextBoxColumn6
             // 
@@ -376,6 +390,7 @@
             this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
             this.dataGridViewTextBoxColumn6.ReadOnly = true;
             this.dataGridViewTextBoxColumn6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn6.Width = 150;
             // 
             // mainbarcode
             // 
@@ -383,11 +398,11 @@
             this.mainbarcode.BackColor = System.Drawing.Color.White;
             this.mainbarcode.Enabled = false;
             this.mainbarcode.ID = null;
-            this.mainbarcode.Location = new System.Drawing.Point(196, 806);
-            this.mainbarcode.Margin = new System.Windows.Forms.Padding(6);
+            this.mainbarcode.Location = new System.Drawing.Point(147, 604);
+            this.mainbarcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.mainbarcode.Name = "mainbarcode";
             this.mainbarcode.Power = null;
-            this.mainbarcode.Size = new System.Drawing.Size(316, 35);
+            this.mainbarcode.Size = new System.Drawing.Size(238, 28);
             this.mainbarcode.Str = null;
             this.mainbarcode.Str1 = null;
             this.mainbarcode.Str2 = null;
@@ -397,13 +412,13 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(622, 122);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.StepCount.Location = new System.Drawing.Point(428, 95);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(160, 44);
+            this.StepCount.Size = new System.Drawing.Size(120, 33);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 189;
+            this.StepCount.Tag1 = null;
             // 
             // ma_code
             // 
@@ -412,14 +427,13 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(192, 26);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_code.Location = new System.Drawing.Point(144, 20);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.ReturnData = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(296, 42);
+            this.ma_code.Size = new System.Drawing.Size(222, 32);
             this.ma_code.TabIndex = 141;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "ma_code";
@@ -431,10 +445,9 @@
             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(496, 30);
-            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
+            this.LockMakeCode.Location = new System.Drawing.Point(182, 58);
             this.LockMakeCode.Name = "LockMakeCode";
-            this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
+            this.LockMakeCode.Size = new System.Drawing.Size(72, 28);
             this.LockMakeCode.TabIndex = 140;
             this.LockMakeCode.Text = "锁定";
             this.LockMakeCode.UseVisualStyleBackColor = true;
@@ -444,11 +457,11 @@
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.CutLength = null;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(802, 24);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.ma_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ma_prodcode.Location = new System.Drawing.Point(564, 21);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(225, 0);
             this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 31);
             this.ma_prodcode.TabIndex = 99;
             // 
             // pr_detail
@@ -456,11 +469,11 @@
             this.pr_detail.AutoSize = true;
             this.pr_detail.CutLength = null;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(1350, 24);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(300, 0);
+            this.pr_detail.Location = new System.Drawing.Point(974, 21);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(225, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.Size = new System.Drawing.Size(0, 31);
             this.pr_detail.TabIndex = 98;
             // 
             // mcd_remainqty
@@ -468,11 +481,11 @@
             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(1372, 122);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_remainqty.Location = new System.Drawing.Point(991, 95);
+            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, 41);
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 31);
             this.mcd_remainqty.TabIndex = 97;
             this.mcd_remainqty.Tag = "mcd_remainqty";
             this.mcd_remainqty.Visible = false;
@@ -482,11 +495,11 @@
             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(1593, 244);
-            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_inqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_inqty.Location = new System.Drawing.Point(1195, 183);
+            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, 41);
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 31);
             this.mcd_inqty.TabIndex = 96;
             this.mcd_inqty.Visible = false;
             // 
@@ -495,20 +508,20 @@
             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(192, 122);
-            this.ma_qty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.ma_qty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ma_qty.Location = new System.Drawing.Point(144, 92);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty.MaximumSize = new System.Drawing.Size(225, 0);
             this.ma_qty.Name = "ma_qty";
-            this.ma_qty.Size = new System.Drawing.Size(0, 41);
+            this.ma_qty.Size = new System.Drawing.Size(0, 31);
             this.ma_qty.TabIndex = 95;
             // 
             // 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(1090, 688);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
+            this.OperateResult.Location = new System.Drawing.Point(818, 516);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(696, 238);
+            this.OperateResult.Size = new System.Drawing.Size(523, 180);
             this.OperateResult.TabIndex = 94;
             this.OperateResult.Text = "";
             // 
@@ -519,13 +532,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(920, 878);
-            this.Clean.Margin = new System.Windows.Forms.Padding(6);
+            this.Clean.Location = new System.Drawing.Point(690, 658);
+            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(120, 48);
+            this.Clean.Size = new System.Drawing.Size(90, 36);
             this.Clean.TabIndex = 80;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -538,13 +551,13 @@
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(578, 880);
-            this.Confirm.Margin = new System.Windows.Forms.Padding(6);
+            this.Confirm.Location = new System.Drawing.Point(434, 660);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.Power = null;
-            this.Confirm.Size = new System.Drawing.Size(120, 48);
+            this.Confirm.Size = new System.Drawing.Size(90, 36);
             this.Confirm.TabIndex = 73;
             this.Confirm.Tag = "IfRead";
             this.Confirm.Text = "确认";
@@ -556,11 +569,11 @@
             this.code.AllPower = "ifall";
             this.code.BackColor = System.Drawing.Color.White;
             this.code.ID = null;
-            this.code.Location = new System.Drawing.Point(196, 884);
-            this.code.Margin = new System.Windows.Forms.Padding(6);
+            this.code.Location = new System.Drawing.Point(147, 663);
+            this.code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.code.Name = "code";
             this.code.Power = null;
-            this.code.Size = new System.Drawing.Size(316, 35);
+            this.code.Size = new System.Drawing.Size(238, 28);
             this.code.Str = null;
             this.code.Str1 = null;
             this.code.Str2 = null;
@@ -570,9 +583,10 @@
             // 
             // ProdNum
             // 
-            this.ProdNum.Location = new System.Drawing.Point(662, 730);
+            this.ProdNum.Location = new System.Drawing.Point(496, 548);
+            this.ProdNum.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.ProdNum.Name = "ProdNum";
-            this.ProdNum.Size = new System.Drawing.Size(120, 35);
+            this.ProdNum.Size = new System.Drawing.Size(90, 28);
             this.ProdNum.TabIndex = 197;
             this.ProdNum.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
             // 
@@ -580,18 +594,18 @@
             // 
             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(433, 724);
-            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Location = new System.Drawing.Point(325, 543);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(210, 41);
+            this.label2.Size = new System.Drawing.Size(158, 31);
             this.label2.TabIndex = 198;
             this.label2.Text = "采集物料数量";
             // 
             // Make_PreFeedingCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1796, 974);
+            this.ClientSize = new System.Drawing.Size(1347, 730);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.ProdNum);
             this.Controls.Add(this.ClearSn_code);
@@ -623,7 +637,7 @@
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Make_PreFeedingCollection";
             this.Tag = "Make!PreFeedingCollection";
             this.Text = "上料采集";
@@ -632,7 +646,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.ProdNum)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 2 - 2
UAS_MES_XZC/FunctionCode/Make/Make_PreFeedingCollection.resx

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

+ 1 - 0
UAS_MES_XZC/FunctionCode/Make/Make_PreFeedingCollectionBP.cs

@@ -215,6 +215,7 @@ namespace UAS_MES_NEW.Make
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
                                 SetCheck set = new SetCheck("NG", Color.Red);
                                 BaseUtil.SetFormCenter(set);
+                                ClearSn_code_Click(sender, e);
                                 set.ShowDialog();
                             }
                         }

File diff suppressed because it is too large
+ 221 - 196
UAS_MES_XZC/FunctionCode/Make/Make_Repair.Designer.cs


+ 32 - 5
UAS_MES_XZC/FunctionCode/Make/Make_Repair.cs

@@ -560,11 +560,11 @@ namespace UAS_MES_NEW.Make
             //如果岗位资源对应工序的版面不为空的时候
             if (dh.getFieldDataByCondition("makeserial left join step on ms_stepcode=st_code", "st_table", "ms_id='" + msid + "'").ToString() != "")
             {
-                if (!dh.CheckExist("makebadrsloc", "mbl_mbrid='" + mbr_id + "' and mbl_makecode='" + ms_makecode.Text + "' and mbl_sncode='" + GetSNCode.Text + "' "))
-                {
-                    OperatResult.AppendText(">>工序存在版面必须维护不良位置\n", Color.Red);
-                    return;
-                }
+                //if (!dh.CheckExist("makebadrsloc", "mbl_mbrid='" + mbr_id + "' and mbl_makecode='" + ms_makecode.Text + "' and mbl_sncode='" + GetSNCode.Text + "' "))
+                //{
+                //    OperatResult.AppendText(">>工序存在版面必须维护不良位置\n", Color.Red);
+                //    return;
+                //}
             }
             //查询拆解的物料
             //sql.Clear();
@@ -1052,5 +1052,32 @@ namespace UAS_MES_NEW.Make
                 SaveRepairInf.Enabled = false;
             }
         }
+
+        private void normalButton1_Click(object sender, EventArgs e)
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode from makeserial where ms_id='" + msid + "' and ms_sncode='" + GetSNCode.Text + "' and ms_status=3", "select");
+            if (dt.Rows.Count > 0)
+            {
+                if (mb_id != "")
+                {
+
+                    string delete1 = "delete from makebadrsloc where mbl_mbrid in (select mbr_id from makebadreason where mbr_mbid = '" + mb_id + "' )";
+                    string delete2 = "delete from makebadrspart where mbp_mbrid in (select mbr_id from makebadreason where mbr_mbid = '" + mb_id + "' )";
+                    string delete3 = "delete from makebadrscom where mbc_mbrid in (select mbr_id from makebadreason where mbr_mbid = '" + mb_id + "' )";
+                    string delete4 = "delete from makebadreason where mbr_mbid='" + mb_id + "'";
+                    string delete = "delete from makebad where mb_id = '" + mb_id + "'";
+                    dh.ExecuteSQLTran(delete1, delete2, delete3, delete4, delete);
+                    OperatResult.AppendText(">>删除成功\n", Color.Green);
+                    BaseUtil.CleanControlsText(bc_name, bc_code, bg_name, bg_code, mb_badremark, nrg_name, nrg_code, nr_name, nr_code, so_name, so_code, mbr_dutyname, mbr_dutycode, mbc_component);
+                    mbp_partdgv.DataSource = null;
+                    mbl_locdgv.DataSource = null;
+                    mb_id = "";
+                    //删除后重新加载Tree的信息
+                    LoadBadInfTree(sender, e);
+                }
+                else OperatResult.AppendText(">>必须选择不良现象\n", Color.Red);
+            }
+            else OperatResult.AppendText(">>" + GetSNCode.Text + "序列号错误,不存在或者不处于维修状态\n", Color.Red);
+        }
     }
 }

+ 38 - 0
UAS_MES_XZC/FunctionCode/Make/Make_Repair.resx

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

+ 3 - 3
UAS_MES_XZC/FunctionCode/Make/Make_SeqTransform.cs

@@ -77,7 +77,7 @@ namespace UAS_MES_NEW.Make
                                 }
                                 //根据ms_id查询
                                 sql.Clear();
-                                sql.Append("select ms_stepcode,nvl(ms_downstatus,'0') ms_downstatus from makeserial where ms_id='" + oMsId + "' and ms_beforesn='" + sncode.Text + "' and ms_nextmacode is null and ms_outboxcode is null");
+                                sql.Append("select ms_stepcode,nvl(ms_downstatus,'0') ms_downstatus from makeserial where ms_id='" + oMsId + "' and ms_beforesn='" + sncode.Text + "'  and ms_outboxcode is null");
                                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 //如果行数大于0则允许转号
                                 if (dt.Rows.Count > 0)
@@ -232,7 +232,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 + "' and ms_id <>'" + oMsId + "' ") && !onlyPass || onlyPass && bsncode == sncode.Text)) || (ChangeResult.Checked && !dh.CheckExist("makeserial", "ms_sncode='" + sncode.Text + "' and ms_id <>'" + oMsId + "' ")))
                             {
                                 if (CollectRemark.Checked || SameReamrk.Checked)
                                 {
@@ -288,7 +288,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 + "',ms_beforesn='"+ bsncode + "' where ms_id='" + oMsId + "' and  ms_beforesn='" + bsncode + "'";
                                         //删除最近一条转换记录
                                         dh.ExecuteSql("delete from makesnrelation where BEFORESN='" + bsncode + "' and makecode='" + ma_code.Text + "'", "delete");
                                     }

+ 159 - 149
UAS_MES_XZC/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -45,6 +45,7 @@ namespace UAS_MES_NEW.Make
             this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader9 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.imageList1 = new System.Windows.Forms.ImageList(this.components);
             this.label4 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
@@ -71,10 +72,8 @@ namespace UAS_MES_NEW.Make
             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.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.label7 = new System.Windows.Forms.Label();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
-            this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.ma_softversion_label = new System.Windows.Forms.Label();
@@ -84,8 +83,17 @@ namespace UAS_MES_NEW.Make
             this.Lock_label = new System.Windows.Forms.Label();
             this.ma_salecode = new System.Windows.Forms.Label();
             this.pr_sendchecktype = new System.Windows.Forms.Label();
+            this.label10 = new System.Windows.Forms.Label();
+            this.AutoPrintBad = new System.Windows.Forms.CheckBox();
+            this.ReleaseSN = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.IfTest = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
+            this.RePrint = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.WriteSoftWare = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
+            this.ob_sendqty = 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.bc_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -101,13 +109,6 @@ namespace UAS_MES_NEW.Make
             this.bc_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.bc_groupcode = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.ms_sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
-            this.WriteSoftWare = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
-            this.label10 = new System.Windows.Forms.Label();
-            this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
-            this.AutoPrintBad = new System.Windows.Forms.CheckBox();
-            this.RePrint = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.IfTest = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
-            this.ReleaseSN = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
             this.SuspendLayout();
@@ -174,7 +175,7 @@ namespace UAS_MES_NEW.Make
             this.GoodProduct.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GoodProduct.ForeColor = System.Drawing.Color.Blue;
             this.GoodProduct.Location = new System.Drawing.Point(9, 742);
-            this.GoodProduct.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.GoodProduct.Margin = new System.Windows.Forms.Padding(4);
             this.GoodProduct.Name = "GoodProduct";
             this.GoodProduct.Size = new System.Drawing.Size(100, 42);
             this.GoodProduct.TabIndex = 35;
@@ -189,7 +190,7 @@ namespace UAS_MES_NEW.Make
             this.Reject.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Reject.ForeColor = System.Drawing.Color.Red;
             this.Reject.Location = new System.Drawing.Point(132, 742);
-            this.Reject.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Reject.Margin = new System.Windows.Forms.Padding(4);
             this.Reject.Name = "Reject";
             this.Reject.Size = new System.Drawing.Size(129, 42);
             this.Reject.TabIndex = 36;
@@ -206,13 +207,14 @@ namespace UAS_MES_NEW.Make
             this.columnHeader1,
             this.columnHeader2,
             this.columnHeader9});
-            this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 13F);
             this.WaitRejectList.FullRowSelect = true;
             this.WaitRejectList.HideSelection = false;
             this.WaitRejectList.Location = new System.Drawing.Point(6, 423);
-            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4);
             this.WaitRejectList.Name = "WaitRejectList";
             this.WaitRejectList.Size = new System.Drawing.Size(397, 307);
+            this.WaitRejectList.SmallImageList = this.imageList1;
             this.WaitRejectList.TabIndex = 37;
             this.WaitRejectList.UseCompatibleStateImageBehavior = false;
             this.WaitRejectList.View = System.Windows.Forms.View.Details;
@@ -245,6 +247,12 @@ namespace UAS_MES_NEW.Make
             this.columnHeader9.Text = "备注";
             this.columnHeader9.Width = 0;
             // 
+            // imageList1
+            // 
+            this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+            this.imageList1.ImageSize = new System.Drawing.Size(35, 35);
+            this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
+            // 
             // label4
             // 
             this.label4.AutoSize = true;
@@ -292,7 +300,7 @@ namespace UAS_MES_NEW.Make
             this.ChoosedRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ChoosedRejectList.HideSelection = false;
             this.ChoosedRejectList.Location = new System.Drawing.Point(552, 423);
-            this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4);
             this.ChoosedRejectList.Name = "ChoosedRejectList";
             this.ChoosedRejectList.Size = new System.Drawing.Size(397, 307);
             this.ChoosedRejectList.TabIndex = 50;
@@ -547,21 +555,6 @@ namespace UAS_MES_NEW.Make
             this.mcd_inqty.TabIndex = 54;
             this.mcd_inqty.Tag = "mcd_inqty";
             // 
-            // 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(645, 181);
-            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;
-            // 
             // label7
             // 
             this.label7.AutoSize = true;
@@ -588,21 +581,6 @@ namespace UAS_MES_NEW.Make
             this.ob_batchqty_label.Text = "抽检批数";
             this.ob_batchqty_label.Visible = false;
             // 
-            // ob_nowcheckqty
-            // 
-            this.ob_nowcheckqty.AutoSize = true;
-            this.ob_nowcheckqty.CutLength = null;
-            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(726, 181);
-            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;
-            // 
             // ob_nowcheckqty_label
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
@@ -682,6 +660,114 @@ namespace UAS_MES_NEW.Make
             this.pr_sendchecktype.TabIndex = 79;
             this.pr_sendchecktype.Visible = false;
             // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(964, 188);
+            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(86, 31);
+            this.label10.TabIndex = 198;
+            this.label10.Text = "打印机";
+            // 
+            // AutoPrintBad
+            // 
+            this.AutoPrintBad.AutoSize = true;
+            this.AutoPrintBad.Location = new System.Drawing.Point(1094, 234);
+            this.AutoPrintBad.Margin = new System.Windows.Forms.Padding(2);
+            this.AutoPrintBad.Name = "AutoPrintBad";
+            this.AutoPrintBad.Size = new System.Drawing.Size(142, 22);
+            this.AutoPrintBad.TabIndex = 199;
+            this.AutoPrintBad.Text = "自动打印不良";
+            this.AutoPrintBad.UseVisualStyleBackColor = true;
+            this.AutoPrintBad.Visible = false;
+            // 
+            // ReleaseSN
+            // 
+            this.ReleaseSN.AllPower = null;
+            this.ReleaseSN.BackColor = System.Drawing.Color.Transparent;
+            this.ReleaseSN.DownImage = ((System.Drawing.Image)(resources.GetObject("ReleaseSN.DownImage")));
+            this.ReleaseSN.Image = null;
+            this.ReleaseSN.IsShowBorder = true;
+            this.ReleaseSN.Location = new System.Drawing.Point(974, 742);
+            this.ReleaseSN.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleaseSN.MoveImage")));
+            this.ReleaseSN.Name = "ReleaseSN";
+            this.ReleaseSN.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleaseSN.NormalImage")));
+            this.ReleaseSN.Power = null;
+            this.ReleaseSN.Size = new System.Drawing.Size(98, 39);
+            this.ReleaseSN.TabIndex = 202;
+            this.ReleaseSN.Text = "解绑SN";
+            this.ReleaseSN.UseVisualStyleBackColor = false;
+            this.ReleaseSN.Visible = false;
+            this.ReleaseSN.Click += new System.EventHandler(this.ReleaseSN_Click);
+            // 
+            // IfTest
+            // 
+            this.IfTest.AutoSize = true;
+            this.IfTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.IfTest.Location = new System.Drawing.Point(1167, 752);
+            this.IfTest.Name = "IfTest";
+            this.IfTest.Size = new System.Drawing.Size(108, 28);
+            this.IfTest.TabIndex = 201;
+            this.IfTest.Text = "是否抽检";
+            this.IfTest.UseVisualStyleBackColor = true;
+            // 
+            // RePrint
+            // 
+            this.RePrint.AllPower = null;
+            this.RePrint.BackColor = System.Drawing.Color.Transparent;
+            this.RePrint.DownImage = ((System.Drawing.Image)(resources.GetObject("RePrint.DownImage")));
+            this.RePrint.Image = ((System.Drawing.Image)(resources.GetObject("RePrint.Image")));
+            this.RePrint.IsShowBorder = true;
+            this.RePrint.Location = new System.Drawing.Point(856, 219);
+            this.RePrint.Margin = new System.Windows.Forms.Padding(4);
+            this.RePrint.MoveImage = ((System.Drawing.Image)(resources.GetObject("RePrint.MoveImage")));
+            this.RePrint.Name = "RePrint";
+            this.RePrint.NormalImage = ((System.Drawing.Image)(resources.GetObject("RePrint.NormalImage")));
+            this.RePrint.Power = null;
+            this.RePrint.Size = new System.Drawing.Size(92, 36);
+            this.RePrint.TabIndex = 200;
+            this.RePrint.Text = "重打不良";
+            this.RePrint.UseVisualStyleBackColor = true;
+            this.RePrint.Click += new System.EventHandler(this.RePrint_Click);
+            // 
+            // Printer
+            // 
+            this.Printer.Location = new System.Drawing.Point(1060, 188);
+            this.Printer.Margin = new System.Windows.Forms.Padding(6);
+            this.Printer.Name = "Printer";
+            this.Printer.Size = new System.Drawing.Size(201, 38);
+            this.Printer.TabIndex = 197;
+            // 
+            // WriteSoftWare
+            // 
+            this.WriteSoftWare.AutoSize = true;
+            this.WriteSoftWare.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.WriteSoftWare.Location = new System.Drawing.Point(868, 752);
+            this.WriteSoftWare.Name = "WriteSoftWare";
+            this.WriteSoftWare.Size = new System.Drawing.Size(97, 28);
+            this.WriteSoftWare.TabIndex = 195;
+            this.WriteSoftWare.Text = "解绑SN";
+            this.WriteSoftWare.UseVisualStyleBackColor = true;
+            this.WriteSoftWare.Visible = false;
+            this.WriteSoftWare.CheckedChanged += new System.EventHandler(this.WriteSoftWare_CheckedChanged);
+            // 
+            // 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(645, 181);
+            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;
+            // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
@@ -704,6 +790,21 @@ 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, 181);
+            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;
@@ -741,7 +842,7 @@ namespace UAS_MES_NEW.Make
             this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_code.ID = null;
             this.bc_code.Location = new System.Drawing.Point(141, 332);
-            this.bc_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.bc_code.Margin = new System.Windows.Forms.Padding(4);
             this.bc_code.Name = "bc_code";
             this.bc_code.Power = null;
             this.bc_code.Size = new System.Drawing.Size(262, 32);
@@ -759,7 +860,7 @@ namespace UAS_MES_NEW.Make
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
             this.ma_code.Location = new System.Drawing.Point(140, 20);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.ReturnData = null;
@@ -825,7 +926,7 @@ namespace UAS_MES_NEW.Make
             // 
             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(966, 272);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(308, 458);
             this.OperateResult.TabIndex = 52;
@@ -839,7 +940,7 @@ namespace UAS_MES_NEW.Make
             this.CleanInfo.Image = ((System.Drawing.Image)(resources.GetObject("CleanInfo.Image")));
             this.CleanInfo.IsShowBorder = true;
             this.CleanInfo.Location = new System.Drawing.Point(655, 219);
-            this.CleanInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.CleanInfo.Margin = new System.Windows.Forms.Padding(4);
             this.CleanInfo.MoveImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.MoveImage")));
             this.CleanInfo.Name = "CleanInfo";
             this.CleanInfo.NormalImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.NormalImage")));
@@ -855,7 +956,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
             this.ChooseedReject.Location = new System.Drawing.Point(438, 520);
-            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4);
             this.ChooseedReject.Name = "ChooseedReject";
             this.ChooseedReject.Size = new System.Drawing.Size(75, 34);
             this.ChooseedReject.TabIndex = 45;
@@ -866,7 +967,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
             this.WaitReject.Location = new System.Drawing.Point(438, 615);
-            this.WaitReject.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.WaitReject.Margin = new System.Windows.Forms.Padding(4);
             this.WaitReject.Name = "WaitReject";
             this.WaitReject.Size = new System.Drawing.Size(75, 34);
             this.WaitReject.TabIndex = 44;
@@ -879,7 +980,7 @@ namespace UAS_MES_NEW.Make
             this.bc_remark.BackColor = System.Drawing.Color.White;
             this.bc_remark.ID = null;
             this.bc_remark.Location = new System.Drawing.Point(555, 273);
-            this.bc_remark.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.bc_remark.Margin = new System.Windows.Forms.Padding(4);
             this.bc_remark.Multiline = true;
             this.bc_remark.Name = "bc_remark";
             this.bc_remark.Power = null;
@@ -891,12 +992,13 @@ namespace UAS_MES_NEW.Make
             // 
             // bc_groupcode
             // 
-            this.bc_groupcode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_groupcode.Font = new System.Drawing.Font("宋体", 20F);
             this.bc_groupcode.FormattingEnabled = true;
+            this.bc_groupcode.ItemHeight = 40;
             this.bc_groupcode.Location = new System.Drawing.Point(141, 273);
-            this.bc_groupcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.bc_groupcode.Margin = new System.Windows.Forms.Padding(4);
             this.bc_groupcode.Name = "bc_groupcode";
-            this.bc_groupcode.Size = new System.Drawing.Size(262, 30);
+            this.bc_groupcode.Size = new System.Drawing.Size(262, 48);
             this.bc_groupcode.TabIndex = 21;
             this.bc_groupcode.SelectedIndexChanged += new System.EventHandler(this.bc_groupcode_SelectedIndexChanged);
             // 
@@ -907,7 +1009,7 @@ namespace UAS_MES_NEW.Make
             this.ms_sncode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_sncode.ID = null;
             this.ms_sncode.Location = new System.Drawing.Point(420, 747);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
             this.ms_sncode.Size = new System.Drawing.Size(270, 32);
@@ -918,99 +1020,6 @@ namespace UAS_MES_NEW.Make
             this.ms_sncode.Tag = "IfRead";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown);
             // 
-            // WriteSoftWare
-            // 
-            this.WriteSoftWare.AutoSize = true;
-            this.WriteSoftWare.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.WriteSoftWare.Location = new System.Drawing.Point(868, 752);
-            this.WriteSoftWare.Name = "WriteSoftWare";
-            this.WriteSoftWare.Size = new System.Drawing.Size(97, 28);
-            this.WriteSoftWare.TabIndex = 195;
-            this.WriteSoftWare.Text = "解绑SN";
-            this.WriteSoftWare.UseVisualStyleBackColor = true;
-            this.WriteSoftWare.Visible = false;
-            this.WriteSoftWare.CheckedChanged += new System.EventHandler(this.WriteSoftWare_CheckedChanged);
-            // 
-            // label10
-            // 
-            this.label10.AutoSize = true;
-            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(964, 188);
-            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(86, 31);
-            this.label10.TabIndex = 198;
-            this.label10.Text = "打印机";
-            // 
-            // Printer
-            // 
-            this.Printer.Location = new System.Drawing.Point(1060, 188);
-            this.Printer.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
-            this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(201, 38);
-            this.Printer.TabIndex = 197;
-            // 
-            // AutoPrintBad
-            // 
-            this.AutoPrintBad.AutoSize = true;
-            this.AutoPrintBad.Location = new System.Drawing.Point(1094, 234);
-            this.AutoPrintBad.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.AutoPrintBad.Name = "AutoPrintBad";
-            this.AutoPrintBad.Size = new System.Drawing.Size(142, 22);
-            this.AutoPrintBad.TabIndex = 199;
-            this.AutoPrintBad.Text = "自动打印不良";
-            this.AutoPrintBad.UseVisualStyleBackColor = true;
-            this.AutoPrintBad.Visible = false;
-            // 
-            // RePrint
-            // 
-            this.RePrint.AllPower = null;
-            this.RePrint.BackColor = System.Drawing.Color.Transparent;
-            this.RePrint.DownImage = ((System.Drawing.Image)(resources.GetObject("RePrint.DownImage")));
-            this.RePrint.Image = ((System.Drawing.Image)(resources.GetObject("RePrint.Image")));
-            this.RePrint.IsShowBorder = true;
-            this.RePrint.Location = new System.Drawing.Point(856, 219);
-            this.RePrint.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.RePrint.MoveImage = ((System.Drawing.Image)(resources.GetObject("RePrint.MoveImage")));
-            this.RePrint.Name = "RePrint";
-            this.RePrint.NormalImage = ((System.Drawing.Image)(resources.GetObject("RePrint.NormalImage")));
-            this.RePrint.Power = null;
-            this.RePrint.Size = new System.Drawing.Size(92, 36);
-            this.RePrint.TabIndex = 200;
-            this.RePrint.Text = "重打不良";
-            this.RePrint.UseVisualStyleBackColor = true;
-            this.RePrint.Click += new System.EventHandler(this.RePrint_Click);
-            // 
-            // IfTest
-            // 
-            this.IfTest.AutoSize = true;
-            this.IfTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.IfTest.Location = new System.Drawing.Point(1167, 752);
-            this.IfTest.Name = "IfTest";
-            this.IfTest.Size = new System.Drawing.Size(108, 28);
-            this.IfTest.TabIndex = 201;
-            this.IfTest.Text = "是否抽检";
-            this.IfTest.UseVisualStyleBackColor = true;
-            // 
-            // ReleaseSN
-            // 
-            this.ReleaseSN.AllPower = null;
-            this.ReleaseSN.BackColor = System.Drawing.Color.Transparent;
-            this.ReleaseSN.DownImage = ((System.Drawing.Image)(resources.GetObject("ReleaseSN.DownImage")));
-            this.ReleaseSN.Image = null;
-            this.ReleaseSN.IsShowBorder = true;
-            this.ReleaseSN.Location = new System.Drawing.Point(974, 742);
-            this.ReleaseSN.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleaseSN.MoveImage")));
-            this.ReleaseSN.Name = "ReleaseSN";
-            this.ReleaseSN.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleaseSN.NormalImage")));
-            this.ReleaseSN.Power = null;
-            this.ReleaseSN.Size = new System.Drawing.Size(98, 39);
-            this.ReleaseSN.TabIndex = 202;
-            this.ReleaseSN.Text = "解绑SN";
-            this.ReleaseSN.UseVisualStyleBackColor = false;
-            this.ReleaseSN.Visible = false;
-            this.ReleaseSN.Click += new System.EventHandler(this.ReleaseSN_Click);
-            // 
             // Make_TestCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
@@ -1070,7 +1079,7 @@ namespace UAS_MES_NEW.Make
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.KeyPreview = true;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_TestCollection";
             this.Tag = "Make!TestCollection";
             this.Text = " ";
@@ -1163,5 +1172,6 @@ namespace UAS_MES_NEW.Make
         private CustomControl.ButtonUtil.NormalButton RePrint;
         private ReSetCheckBox IfTest;
         private CustomControl.ButtonUtil.NormalButton ReleaseSN;
+        private System.Windows.Forms.ImageList imageList1;
     }
 }

+ 11 - 11
UAS_MES_XZC/FunctionCode/Make/Make_TestCollection.cs

@@ -288,7 +288,7 @@ namespace UAS_MES_NEW.Make
             sql.Append("select bg_code||':'||bg_name bg_name,bg_code from badgroup left join (select pb_badgroup,pr_kind ");
             sql.Append("from product left join productkind on pk_name=pr_kind ");
             sql.Append("left join productbadgroup on pk_code=PB_KINDCODE where pr_code='" + ma_prodcode.Text + "')");
-            sql.Append("on pb_badgroup=bg_code where bg_statuscode='AUDITED' order by case when bg_code='" + User.DefaultBadGroup + "' then 0 else 1 end");
+            sql.Append("on pb_badgroup=bg_code where bg_statuscode='AUDITED' order by to_number(bg_code) asc");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             bc_groupcode.DisplayMember = "bg_name";
             bc_groupcode.ValueMember = "bg_code";
@@ -593,11 +593,11 @@ namespace UAS_MES_NEW.Make
                         RePrintCode.Clear();
                         for (int i = 0; i < bcname.Length; i++)
                         {
-                            RePrintCode.Add(bcname[i]);
-                            format.SubStrings["SN1"].Value = bcname[i];
-                            format.PrintSetup.PrinterName = Printer.Text;
-                            format.PrintSetup.IdenticalCopiesOfLabel = 1;
-                            format.Print();
+                            //RePrintCode.Add(bcname[i]);
+                            //format.SubStrings["SN1"].Value = bcname[i];
+                            //format.PrintSetup.PrinterName = Printer.Text;
+                            //format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                            //format.Print();
                         }
                     }
                     LastSncode = ms_sncode.Text;
@@ -851,11 +851,11 @@ namespace UAS_MES_NEW.Make
                 string[] bcname = RePrintCode.ToArray();
                 for (int i = 0; i < bcname.Length; i++)
                 {
-                    RePrintCode.Add(bcname[i]);
-                    format.SubStrings["SN1"].Value = bcname[i];
-                    format.PrintSetup.PrinterName = Printer.Text;
-                    format.PrintSetup.IdenticalCopiesOfLabel = 1;
-                    format.Print();
+                    //RePrintCode.Add(bcname[i]);
+                    //format.SubStrings["SN1"].Value = bcname[i];
+                    //format.PrintSetup.PrinterName = Printer.Text;
+                    //format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                    //format.Print();
                 }
             }
         }

+ 80 - 77
UAS_MES_XZC/FunctionCode/Make/Make_TestCollection.resx

@@ -117,6 +117,9 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>389, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="SendCheck.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
@@ -162,7 +165,7 @@
   <metadata name="ControlLockTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>172, 17</value>
   </metadata>
-  <data name="Save.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="ReleaseSN.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -174,7 +177,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Save.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="ReleaseSN.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -187,7 +190,7 @@
         gg==
 </value>
   </data>
-  <data name="Save.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="ReleaseSN.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -200,7 +203,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="CleanInfo.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="RePrint.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -212,7 +215,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="CleanInfo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="RePrint.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -259,7 +262,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -305,7 +308,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="CleanInfo.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="RePrint.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -318,7 +321,7 @@
         gg==
 </value>
   </data>
-  <data name="CleanInfo.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="RePrint.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -331,45 +334,45 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="ChooseedReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Save.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
-        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
-        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAslJREFU
-        SEuN1kuojVEYxvHtco77JUUpURQliQxcE+0BMlIkBpJQJmJwBqRMKAZKykSMkJEwUaIwcElIKQzccz2i
-        3HP3f77Wu8679n6d7a3f4Fuf5znZ+9trfbV6vb4bD7vxBPvQF/r3tcZJ65NwFY8R9TzCTcyCZVJDw3Bj
-        LM7jTze+YiPCsrTWEx34iajDXMRoNPXkSTcn4w6iEvMWS2CZ1JA7RJ/mAUR57xiGoOjJYzewEK8RlZgH
-        mI6cs3FrI9Hqk/+NXWhD0VONLSbr8BlRkdFzo68854KeabiPKG/0SGxAzhXjbvTGTvxCVGSOYxiKMrtO
-        luE9orzpxGLkXDHuxiAcRlTi7UUfFGV2jR7YhlYP/j1MRc7m8YsYhQuISsw3bEbO2bi1gTiCKO/pF6m/
-        WfRUY4vJFNxFVGLeYSlyzsatjcEVRHnvKPQtpQY3WnQWodUvUpviTORc0DMbTxHljZ5jPc9tVUHjcMNb
-        j4+Iisw1jEeVsbHrZBU+IMqbT+hI8ebhphmAs4hKvO2oMn5sDf1xBlHW60zRcrjhrUGr/+ENTECVsbHr
-        ZAVabRFfsCXFu4ZFbz5eICowzzEPORf0aDPVaRDlvT1orwpsWPD0jOhUj8JGz8Bq5JyNWxuBc4jy3ilU
-        G3IxWkh08ySisNGvZQd6ocrZ2DXaodeeKO/dQtPX74t0SOpjjMKeTvrBKIrsOtFZqjMuypuX0ORcVKRD
-        slXRZWhT7Cph7DqZg2eI8kYP9lrkXFS0AP+zWc5Aztm4NR0ZlxDljV5f9Narl4CixxdNxG1EBUY/6eXI
-        ORu31g+HEOU9vWkMRdFTTVocjtOIwuYHtkKnf1Fk18kmfEfUYa5jHHKuGBa0Y+9HFPYOQrtyU4mtQW+v
-        bxDljc7Auci5pmFxJbSx6VegjbLRK+j1Nr/si5+0pm3kBPTiFvWIHvx/v21WU6v9BRMV4fPlTpe/AAAA
-        AElFTkSuQmCC
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="WaitReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Save.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
-        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
-        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAs1JREFU
-        SEuN10uoTVEcx3HvV3nkEUPlFVKUDBDliGImiZQkiYkBGSgZGEiiyIASRgp5JVIGhlLkmTJC5K2833l8
-        f9v6rbP2PX+d+6/PYP3X/f3v7Zy91963S1SNRqM0EVfwCA8CD3EbM1FlynIP3bEN/5sj2jucovViwwbj
-        DP60sQu9UOVcXidL8Q5R3u5gSoo3i6b1xG5E4dIFDEGVc3mdTIc+hShvzzEXaUIqNQpr8RXRALuPSagy
-        ZbmHkbiKKG9fsAb1OW4k8/AS0QDTV7EIOecqegNxHFHefmMn9M0053iRTMBdRAPsF7aiK5qDKK/RA9uh
-        XxrNsFMYhNqcctBQ6BqJwqUTGIDaIK+TVfiMKG/XMQo513FQb+xDFC7dwhjUBpVrzMEzRHl7glnIuVxF
-        cz2+IxpgrzEfLYOK3jjcRJS3T1iBljlVpeZCvEE0wH5gA1oGFT0dDecQ5U3Xow5RHaa1ObloTsM9RANK
-        h9AXLYNST3t7EWVLR9Ef8R+kYuMkonBJx8Nk+A9I6X+VerPxAVHeXmEqwjm52NApqudONMT0ke9By6NE
-        lXq6G48gypuOh/0IP/FcaXMx3iIaZN+wDs6kCXmGjMAlRHn7ic3ohtqcXGlDh+BG6GKOBtkLVM8nK2aY
-        3ir0YI3y9h7LkXO1KjY6e07pdh+L2sByDZ1TTxHlTeeUrsOcy1U2oVv6LKIhpdNoeTR4negc+ogobzeg
-        cy3ncpVNjMY1RENMF+wO6PlWG+Y1dM1sga6haIbpsTYMOZurbGIG2r3/6Lm2EjnnKnr9cBBRvnQA8R3p
-        ZrIE7d4UdV3k12BxFb3huIgob74jq7eOllIz0Q9sQrs7Ui9wepGrci6vk/HQgzzKm+7IZUgTOpQ2kj7o
-        zB15DHqhq3IurxPdaY8R5U37C1K8XmyU9PGfh25xfV0R/UeTz52y3EtWQ9dqNEP4HY3LfwGra+NvPdw7
-        fgAAAABJRU5ErkJggg==
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
 </value>
   </data>
-  <data name="RePrint.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Save.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="CleanInfo.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -381,7 +384,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="RePrint.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="CleanInfo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -428,7 +431,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -474,7 +477,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="RePrint.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="CleanInfo.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -487,7 +490,7 @@
         gg==
 </value>
   </data>
-  <data name="RePrint.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="CleanInfo.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -500,42 +503,42 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="ReleaseSN.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
-        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
-        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
-        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
-        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
-        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
-        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
-        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
-</value>
-  </data>
-  <data name="ReleaseSN.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="ChooseedReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
-        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
-        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
-        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
-        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
-        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
-        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
-        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
-        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
-        gg==
+        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAslJREFU
+        SEuN1kuojVEYxvHtco77JUUpURQliQxcE+0BMlIkBpJQJmJwBqRMKAZKykSMkJEwUaIwcElIKQzccz2i
+        3HP3f77Wu8679n6d7a3f4Fuf5znZ+9trfbV6vb4bD7vxBPvQF/r3tcZJ65NwFY8R9TzCTcyCZVJDw3Bj
+        LM7jTze+YiPCsrTWEx34iajDXMRoNPXkSTcn4w6iEvMWS2CZ1JA7RJ/mAUR57xiGoOjJYzewEK8RlZgH
+        mI6cs3FrI9Hqk/+NXWhD0VONLSbr8BlRkdFzo68854KeabiPKG/0SGxAzhXjbvTGTvxCVGSOYxiKMrtO
+        luE9orzpxGLkXDHuxiAcRlTi7UUfFGV2jR7YhlYP/j1MRc7m8YsYhQuISsw3bEbO2bi1gTiCKO/pF6m/
+        WfRUY4vJFNxFVGLeYSlyzsatjcEVRHnvKPQtpQY3WnQWodUvUpviTORc0DMbTxHljZ5jPc9tVUHjcMNb
+        j4+Iisw1jEeVsbHrZBU+IMqbT+hI8ebhphmAs4hKvO2oMn5sDf1xBlHW60zRcrjhrUGr/+ENTECVsbHr
+        ZAVabRFfsCXFu4ZFbz5eICowzzEPORf0aDPVaRDlvT1orwpsWPD0jOhUj8JGz8Bq5JyNWxuBc4jy3ilU
+        G3IxWkh08ySisNGvZQd6ocrZ2DXaodeeKO/dQtPX74t0SOpjjMKeTvrBKIrsOtFZqjMuypuX0ORcVKRD
+        slXRZWhT7Cph7DqZg2eI8kYP9lrkXFS0AP+zWc5Aztm4NR0ZlxDljV5f9Narl4CixxdNxG1EBUY/6eXI
+        ORu31g+HEOU9vWkMRdFTTVocjtOIwuYHtkKnf1Fk18kmfEfUYa5jHHKuGBa0Y+9HFPYOQrtyU4mtQW+v
+        bxDljc7Auci5pmFxJbSx6VegjbLRK+j1Nr/si5+0pm3kBPTiFvWIHvx/v21WU6v9BRMV4fPlTpe/AAAA
+        AElFTkSuQmCC
 </value>
   </data>
-  <data name="ReleaseSN.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="WaitReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
-        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
-        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
-        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
-        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
-        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
-        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
-        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
-        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
-        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAs1JREFU
+        SEuN10uoTVEcx3HvV3nkEUPlFVKUDBDliGImiZQkiYkBGSgZGEiiyIASRgp5JVIGhlLkmTJC5K2833l8
+        f9v6rbP2PX+d+6/PYP3X/f3v7Zy91963S1SNRqM0EVfwCA8CD3EbM1FlynIP3bEN/5sj2jucovViwwbj
+        DP60sQu9UOVcXidL8Q5R3u5gSoo3i6b1xG5E4dIFDEGVc3mdTIc+hShvzzEXaUIqNQpr8RXRALuPSagy
+        ZbmHkbiKKG9fsAb1OW4k8/AS0QDTV7EIOecqegNxHFHefmMn9M0053iRTMBdRAPsF7aiK5qDKK/RA9uh
+        XxrNsFMYhNqcctBQ6BqJwqUTGIDaIK+TVfiMKG/XMQo513FQb+xDFC7dwhjUBpVrzMEzRHl7glnIuVxF
+        cz2+IxpgrzEfLYOK3jjcRJS3T1iBljlVpeZCvEE0wH5gA1oGFT0dDecQ5U3Xow5RHaa1ObloTsM9RANK
+        h9AXLYNST3t7EWVLR9Ef8R+kYuMkonBJx8Nk+A9I6X+VerPxAVHeXmEqwjm52NApqudONMT0ke9By6NE
+        lXq6G48gypuOh/0IP/FcaXMx3iIaZN+wDs6kCXmGjMAlRHn7ic3ohtqcXGlDh+BG6GKOBtkLVM8nK2aY
+        3ir0YI3y9h7LkXO1KjY6e07pdh+L2sByDZ1TTxHlTeeUrsOcy1U2oVv6LKIhpdNoeTR4negc+ogobzeg
+        cy3ncpVNjMY1RENMF+wO6PlWG+Y1dM1sga6haIbpsTYMOZurbGIG2r3/6Lm2EjnnKnr9cBBRvnQA8R3p
+        ZrIE7d4UdV3k12BxFb3huIgob74jq7eOllIz0Q9sQrs7Ui9wepGrci6vk/HQgzzKm+7IZUgTOpQ2kj7o
+        zB15DHqhq3IurxPdaY8R5U37C1K8XmyU9PGfh25xfV0R/UeTz52y3EtWQ9dqNEP4HY3LfwGra+NvPdw7
+        fgAAAABJRU5ErkJggg==
 </value>
   </data>
 </root>

+ 91 - 89
UAS_MES_XZC/FunctionCode/Special/Special_CancelOQC.Designer.cs

@@ -76,10 +76,9 @@
             // 
             this.SN_label.AutoSize = true;
             this.SN_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SN_label.Location = new System.Drawing.Point(60, 116);
-            this.SN_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.SN_label.Location = new System.Drawing.Point(45, 87);
             this.SN_label.Name = "SN_label";
-            this.SN_label.Size = new System.Drawing.Size(62, 41);
+            this.SN_label.Size = new System.Drawing.Size(48, 31);
             this.SN_label.TabIndex = 1;
             this.SN_label.Text = "SN";
             // 
@@ -87,9 +86,10 @@
             // 
             this.OK.AutoSize = true;
             this.OK.Checked = true;
-            this.OK.Location = new System.Drawing.Point(67, 212);
+            this.OK.Location = new System.Drawing.Point(50, 159);
+            this.OK.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.OK.Name = "OK";
-            this.OK.Size = new System.Drawing.Size(89, 28);
+            this.OK.Size = new System.Drawing.Size(69, 22);
             this.OK.TabIndex = 151;
             this.OK.TabStop = true;
             this.OK.Text = "良品";
@@ -98,9 +98,10 @@
             // NG
             // 
             this.NG.AutoSize = true;
-            this.NG.Location = new System.Drawing.Point(224, 212);
+            this.NG.Location = new System.Drawing.Point(168, 159);
+            this.NG.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.NG.Name = "NG";
-            this.NG.Size = new System.Drawing.Size(113, 28);
+            this.NG.Size = new System.Drawing.Size(87, 22);
             this.NG.TabIndex = 152;
             this.NG.Text = "不良品";
             this.NG.UseVisualStyleBackColor = true;
@@ -108,20 +109,20 @@
             // pr_sendchecktype
             // 
             this.pr_sendchecktype.AutoSize = true;
-            this.pr_sendchecktype.Location = new System.Drawing.Point(992, 278);
-            this.pr_sendchecktype.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_sendchecktype.Location = new System.Drawing.Point(744, 208);
+            this.pr_sendchecktype.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_sendchecktype.Name = "pr_sendchecktype";
-            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 24);
+            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 18);
             this.pr_sendchecktype.TabIndex = 218;
             this.pr_sendchecktype.Visible = false;
             // 
             // ma_salecode
             // 
             this.ma_salecode.AutoSize = true;
-            this.ma_salecode.Location = new System.Drawing.Point(992, 270);
-            this.ma_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_salecode.Location = new System.Drawing.Point(744, 202);
+            this.ma_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_salecode.Name = "ma_salecode";
-            this.ma_salecode.Size = new System.Drawing.Size(0, 24);
+            this.ma_salecode.Size = new System.Drawing.Size(0, 18);
             this.ma_salecode.TabIndex = 217;
             this.ma_salecode.Visible = false;
             // 
@@ -130,10 +131,10 @@
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Blue;
-            this.label2.Location = new System.Drawing.Point(44, 270);
-            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Location = new System.Drawing.Point(33, 202);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(146, 42);
+            this.label2.Size = new System.Drawing.Size(110, 31);
             this.label2.TabIndex = 201;
             this.label2.Text = "采集信息";
             // 
@@ -148,10 +149,10 @@
             this.columnHeader10});
             this.ChoosedRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ChoosedRejectList.HideSelection = false;
-            this.ChoosedRejectList.Location = new System.Drawing.Point(774, 532);
-            this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(6);
+            this.ChoosedRejectList.Location = new System.Drawing.Point(580, 399);
+            this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ChoosedRejectList.Name = "ChoosedRejectList";
-            this.ChoosedRejectList.Size = new System.Drawing.Size(528, 408);
+            this.ChoosedRejectList.Size = new System.Drawing.Size(397, 307);
             this.ChoosedRejectList.TabIndex = 213;
             this.ChoosedRejectList.UseCompatibleStateImageBehavior = false;
             this.ChoosedRejectList.View = System.Windows.Forms.View.Details;
@@ -188,10 +189,10 @@
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label5.ForeColor = System.Drawing.Color.Black;
-            this.label5.Location = new System.Drawing.Point(770, 482);
-            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Location = new System.Drawing.Point(578, 362);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(146, 42);
+            this.label5.Size = new System.Drawing.Size(110, 31);
             this.label5.TabIndex = 208;
             this.label5.Text = "已选不良";
             // 
@@ -200,10 +201,10 @@
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label4.ForeColor = System.Drawing.Color.Black;
-            this.label4.Location = new System.Drawing.Point(44, 482);
-            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Location = new System.Drawing.Point(33, 362);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(146, 42);
+            this.label4.Size = new System.Drawing.Size(110, 31);
             this.label4.TabIndex = 207;
             this.label4.Text = "待选不良";
             // 
@@ -219,13 +220,14 @@
             this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.WaitRejectList.FullRowSelect = true;
             this.WaitRejectList.HideSelection = false;
-            this.WaitRejectList.Location = new System.Drawing.Point(46, 532);
-            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(6);
+            this.WaitRejectList.Location = new System.Drawing.Point(34, 399);
+            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.WaitRejectList.Name = "WaitRejectList";
-            this.WaitRejectList.Size = new System.Drawing.Size(528, 408);
+            this.WaitRejectList.Size = new System.Drawing.Size(397, 307);
             this.WaitRejectList.TabIndex = 206;
             this.WaitRejectList.UseCompatibleStateImageBehavior = false;
             this.WaitRejectList.View = System.Windows.Forms.View.Details;
+            this.WaitRejectList.DoubleClick += new System.EventHandler(this.WaitRejectList_DoubleClick);
             // 
             // columnHeader5
             // 
@@ -258,10 +260,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(44, 410);
-            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Location = new System.Drawing.Point(33, 308);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(146, 41);
+            this.label3.Size = new System.Drawing.Size(110, 31);
             this.label3.TabIndex = 205;
             this.label3.Text = "不良代码";
             // 
@@ -269,10 +271,10 @@
             // 
             this.bc_remark_label.AutoSize = true;
             this.bc_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_remark_label.Location = new System.Drawing.Point(612, 330);
-            this.bc_remark_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bc_remark_label.Location = new System.Drawing.Point(459, 248);
+            this.bc_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_remark_label.Name = "bc_remark_label";
-            this.bc_remark_label.Size = new System.Drawing.Size(146, 41);
+            this.bc_remark_label.Size = new System.Drawing.Size(110, 31);
             this.bc_remark_label.TabIndex = 204;
             this.bc_remark_label.Text = "不良备注";
             // 
@@ -280,10 +282,10 @@
             // 
             this.bc_groupcode_label.AutoSize = true;
             this.bc_groupcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_groupcode_label.Location = new System.Drawing.Point(44, 330);
-            this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bc_groupcode_label.Location = new System.Drawing.Point(33, 248);
+            this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_groupcode_label.Name = "bc_groupcode_label";
-            this.bc_groupcode_label.Size = new System.Drawing.Size(146, 41);
+            this.bc_groupcode_label.Size = new System.Drawing.Size(110, 31);
             this.bc_groupcode_label.TabIndex = 203;
             this.bc_groupcode_label.Text = "不良组别";
             // 
@@ -291,10 +293,10 @@
             // 
             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(1169, 39);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(877, 29);
+            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(146, 41);
+            this.pr_detail_label.Size = new System.Drawing.Size(110, 31);
             this.pr_detail_label.TabIndex = 219;
             this.pr_detail_label.Text = "产品规格";
             // 
@@ -302,10 +304,10 @@
             // 
             this.ma_prodcode_label.AutoSize = true;
             this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode_label.Location = new System.Drawing.Point(601, 39);
-            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode_label.Location = new System.Drawing.Point(451, 29);
+            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode_label.Name = "ma_prodcode_label";
-            this.ma_prodcode_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_prodcode_label.Size = new System.Drawing.Size(110, 31);
             this.ma_prodcode_label.TabIndex = 220;
             this.ma_prodcode_label.Text = "产品编号";
             // 
@@ -313,10 +315,10 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(60, 39);
-            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Location = new System.Drawing.Point(45, 29);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(114, 41);
+            this.label1.Size = new System.Drawing.Size(86, 31);
             this.label1.TabIndex = 223;
             this.label1.Text = "工单号";
             // 
@@ -325,11 +327,11 @@
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.CutLength = null;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(242, 39);
-            this.ms_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.ms_makecode.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ms_makecode.Location = new System.Drawing.Point(182, 29);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(225, 0);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 41);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 31);
             this.ms_makecode.TabIndex = 224;
             // 
             // pr_spec
@@ -337,11 +339,11 @@
             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(1343, 39);
-            this.pr_spec.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.pr_spec.MaximumSize = new System.Drawing.Size(360, 0);
+            this.pr_spec.Location = new System.Drawing.Point(1007, 29);
+            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";
-            this.pr_spec.Size = new System.Drawing.Size(0, 41);
+            this.pr_spec.Size = new System.Drawing.Size(0, 31);
             this.pr_spec.TabIndex = 222;
             // 
             // ma_prodcode
@@ -349,11 +351,11 @@
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.CutLength = null;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(783, 39);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.ma_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ma_prodcode.Location = new System.Drawing.Point(587, 29);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(225, 0);
             this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 31);
             this.ma_prodcode.TabIndex = 221;
             this.ma_prodcode.TextChanged += new System.EventHandler(this.ma_prodcode_TextChanged);
             // 
@@ -361,12 +363,12 @@
             // 
             this.Filter.BackColor = System.Drawing.Color.Transparent;
             this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
-            this.Filter.Location = new System.Drawing.Point(224, 482);
-            this.Filter.Margin = new System.Windows.Forms.Padding(4);
+            this.Filter.Location = new System.Drawing.Point(168, 362);
             this.Filter.Name = "Filter";
             this.Filter.PlaceHolder = "不良名称搜索";
-            this.Filter.Size = new System.Drawing.Size(352, 44);
+            this.Filter.Size = new System.Drawing.Size(264, 33);
             this.Filter.TabIndex = 215;
+            this.Filter.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.Filter_UserControlTextChanged);
             // 
             // bc_code
             // 
@@ -374,23 +376,24 @@
             this.bc_code.BackColor = System.Drawing.Color.White;
             this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_code.ID = null;
-            this.bc_code.Location = new System.Drawing.Point(226, 410);
-            this.bc_code.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_code.Location = new System.Drawing.Point(170, 308);
+            this.bc_code.Margin = new System.Windows.Forms.Padding(4);
             this.bc_code.Name = "bc_code";
             this.bc_code.Power = null;
-            this.bc_code.Size = new System.Drawing.Size(348, 40);
+            this.bc_code.Size = new System.Drawing.Size(262, 32);
             this.bc_code.Str = null;
             this.bc_code.Str1 = null;
             this.bc_code.Str2 = null;
             this.bc_code.TabIndex = 214;
+            this.bc_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bc_code_KeyDown);
             // 
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(622, 662);
-            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(6);
+            this.ChooseedReject.Location = new System.Drawing.Point(466, 496);
+            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4);
             this.ChooseedReject.Name = "ChooseedReject";
-            this.ChooseedReject.Size = new System.Drawing.Size(100, 46);
+            this.ChooseedReject.Size = new System.Drawing.Size(75, 34);
             this.ChooseedReject.TabIndex = 211;
             this.ChooseedReject.UseVisualStyleBackColor = true;
             this.ChooseedReject.Click += new System.EventHandler(this.ChooseedReject_Click);
@@ -398,10 +401,10 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(622, 788);
-            this.WaitReject.Margin = new System.Windows.Forms.Padding(6);
+            this.WaitReject.Location = new System.Drawing.Point(466, 591);
+            this.WaitReject.Margin = new System.Windows.Forms.Padding(4);
             this.WaitReject.Name = "WaitReject";
-            this.WaitReject.Size = new System.Drawing.Size(100, 46);
+            this.WaitReject.Size = new System.Drawing.Size(75, 34);
             this.WaitReject.TabIndex = 210;
             this.WaitReject.UseVisualStyleBackColor = true;
             this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
@@ -411,12 +414,12 @@
             this.bc_remark.AllPower = null;
             this.bc_remark.BackColor = System.Drawing.Color.White;
             this.bc_remark.ID = null;
-            this.bc_remark.Location = new System.Drawing.Point(778, 332);
-            this.bc_remark.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_remark.Location = new System.Drawing.Point(584, 249);
+            this.bc_remark.Margin = new System.Windows.Forms.Padding(4);
             this.bc_remark.Multiline = true;
             this.bc_remark.Name = "bc_remark";
             this.bc_remark.Power = null;
-            this.bc_remark.Size = new System.Drawing.Size(524, 120);
+            this.bc_remark.Size = new System.Drawing.Size(394, 91);
             this.bc_remark.Str = null;
             this.bc_remark.Str1 = null;
             this.bc_remark.Str2 = null;
@@ -426,20 +429,20 @@
             // 
             this.bc_groupcode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_groupcode.FormattingEnabled = true;
-            this.bc_groupcode.Location = new System.Drawing.Point(226, 332);
-            this.bc_groupcode.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_groupcode.Location = new System.Drawing.Point(170, 249);
+            this.bc_groupcode.Margin = new System.Windows.Forms.Padding(4);
             this.bc_groupcode.Name = "bc_groupcode";
-            this.bc_groupcode.Size = new System.Drawing.Size(348, 37);
+            this.bc_groupcode.Size = new System.Drawing.Size(262, 30);
             this.bc_groupcode.TabIndex = 202;
             this.bc_groupcode.SelectedIndexChanged += new System.EventHandler(this.bc_groupcode_SelectedIndexChanged);
             // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(1343, 328);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(8);
+            this.OperateResult.Location = new System.Drawing.Point(1007, 246);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(460, 614);
+            this.OperateResult.Size = new System.Drawing.Size(346, 462);
             this.OperateResult.TabIndex = 150;
             this.OperateResult.Text = "";
             // 
@@ -450,13 +453,13 @@
             this.SaveRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.DownImage")));
             this.SaveRepairInf.Image = null;
             this.SaveRepairInf.IsShowBorder = true;
-            this.SaveRepairInf.Location = new System.Drawing.Point(774, 957);
-            this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(6);
+            this.SaveRepairInf.Location = new System.Drawing.Point(580, 718);
+            this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
             this.SaveRepairInf.Name = "SaveRepairInf";
             this.SaveRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.NormalImage")));
             this.SaveRepairInf.Power = null;
-            this.SaveRepairInf.Size = new System.Drawing.Size(172, 48);
+            this.SaveRepairInf.Size = new System.Drawing.Size(129, 36);
             this.SaveRepairInf.TabIndex = 145;
             this.SaveRepairInf.Tag = "IfRead";
             this.SaveRepairInf.Text = "确认";
@@ -468,11 +471,10 @@
             this.SN.AllPower = null;
             this.SN.BackColor = System.Drawing.Color.White;
             this.SN.ID = null;
-            this.SN.Location = new System.Drawing.Point(224, 122);
-            this.SN.Margin = new System.Windows.Forms.Padding(4);
+            this.SN.Location = new System.Drawing.Point(168, 92);
             this.SN.Name = "SN";
             this.SN.Power = null;
-            this.SN.Size = new System.Drawing.Size(318, 35);
+            this.SN.Size = new System.Drawing.Size(240, 28);
             this.SN.Str = null;
             this.SN.Str1 = null;
             this.SN.Str2 = null;
@@ -481,9 +483,9 @@
             // 
             // Special_CancelOQC
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1833, 1020);
+            this.ClientSize = new System.Drawing.Size(1375, 765);
             this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.pr_spec);
@@ -513,13 +515,13 @@
             this.Controls.Add(this.SN);
             this.Controls.Add(this.SN_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Special_CancelOQC";
             this.Tag = "Special!CancelOQC";
             this.Text = "拆箱处理";
             this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            this.SizeChanged += new System.EventHandler(this.Special_CancelOQC_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 105 - 4
UAS_MES_XZC/FunctionCode/Special/Special_CancelOQC.cs

@@ -19,6 +19,7 @@ namespace UAS_MES_NEW.Special
         DataHelper dh;
 
         LogStringBuilder sql = new LogStringBuilder();
+        AutoSizeFormClass asc = new AutoSizeFormClass();
 
         DataTable Dbfind;
 
@@ -40,6 +41,7 @@ namespace UAS_MES_NEW.Special
         private void Special_BoxSplit_Load(object sender, EventArgs e)
         {
             dh = SystemInf.dh;
+            asc.controllInitializeSize(this);
 
         }
         private void LoadBadGroupData()
@@ -91,7 +93,7 @@ namespace UAS_MES_NEW.Special
                 DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_makecode,ms_id,ma_prodcode,pr_detail from makeserial left join make on ms_makecode=ma_code left join product on pr_code=ma_prodcode where ms_sncode='" + SN.Text + "' or  ms_imei1='" + SN.Text + "' or ms_imei2='" + SN.Text + "' order by ms_id desc", "select");
                 if (dt.Rows.Count == 0)
                 {
-                    OperateResult.AppendText("序列号" + SN.Text + "不存在", System.Drawing.Color.Red);
+                    OperateResult.AppendText("序列号" + SN.Text + "不存在\n", System.Drawing.Color.Red,SN);
                     return;
                 }
                 BaseUtil.SetFormValue(this.Controls, dt);
@@ -136,10 +138,20 @@ namespace UAS_MES_NEW.Special
                         OperateResult.AppendText(">>请勾选不良代码\n", Color.Red);
                         return;
                     }
-                    dh.ExecuteSql("update makeserial set ms_status=3,ms_nextstepcode='' ,ms_iftest=-1 where ms_id=" + ms_id, "update");
+                    dh.ExecuteSql("update makeserial set ms_outboxcode = '',ms_status=3,ms_nextstepcode='' ,ms_iftest=-1 where ms_id=" + ms_id, "update");
+                    dh.ExecuteSql(" delete packagedetail where pd_barcode = '" + SN.Text + "' ", "delete");
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "QC抽检", "QC抽检成功,结果为不良", SN.Text, "");
                 }
-                OperateResult.AppendText("序列号" + SN.Text + "抽检记录成功", System.Drawing.Color.Green);
+                OperateResult.AppendText("序列号" + SN.Text + "抽检记录成功\n", System.Drawing.Color.Green,SN);
+                //采集完不良,聚焦序列号
+                SN.Focus();
+                //记录操作日志
+                SN.Text = "";
+                //清除不良信息
+                bc_code.Text = "";
+                ChoosedRejectList.Items.Clear();
+                WaitList.Clear();
+                ChoosedList.Clear();
             }
         }
 
@@ -269,9 +281,98 @@ namespace UAS_MES_NEW.Special
                 {
                     dh.BatchInsert(sql.GetString(), new string[] { "bc_code", "bg_code", "bc_remark", "bg_name", "bc_name" }, bccode, bgcode, bcremark, bgname, bcname);
                 }
-                dh.ExecuteSql("update makeserial set ms_status=3,ms_nextstepcode='' ,ms_iftest=-1 where ms_id=" + ms_id, "update");
+                dh.ExecuteSql("update makeserial set ms_outboxcode = '',ms_status=3,ms_nextstepcode='' ,ms_iftest=-1 where ms_id=" + ms_id, "update");
+                dh.ExecuteSql(" delete packagedetail where pd_barcode = '"+SN.Text+"' ", "delete");
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "QC抽检", "QC抽检成功,结果为不良", SN.Text, "");
                 OperateResult.AppendText("序列号" + SN.Text + "抽检记录成功", System.Drawing.Color.Green);
+                //采集完不良,聚焦序列号
+                SN.Focus();
+                //记录操作日志
+                SN.Text = "";
+                //清除不良信息
+                bc_code.Text = "";
+                ChoosedRejectList.Items.Clear();
+                WaitList.Clear();
+                ChoosedList.Clear();
+            }
+        }
+
+        private void Special_CancelOQC_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void bc_code_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                sql.Clear();
+                sql.Append("select  bg_code||':'||bg_name bg_code,bc_code,bc_name,'' bc_remark from  badgroupdetail left join ");
+                sql.Append("badgroup on  bg_id=bgd_bgid left join badcode on bgd_badcode = bc_code where bc_code='" + bc_code.Text + "'  and rownum=1 ");
+                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                if (dt.Rows.Count > 0)
+                {
+                    for (int i = 0; i < ChoosedRejectList.Items.Count; i++)
+                    {
+                        if (ChoosedRejectList.Items[i].ListView.Items[i].SubItems[2].Text == bc_code.Text)
+                        {
+                            OperateResult.AppendText(">>已添加过不良代码" + bc_code.Text + "\n", Color.Red, bc_code);
+                            return;
+                        }
+                    }
+                    ListViewItem lvi = new ListViewItem();
+                    lvi.Text = "";
+                    for (int j = 0; j < dt.Columns.Count; j++)
+                        lvi.SubItems.Add(dt.Rows[0][j].ToString());
+                    ChoosedRejectList.Items.Add(lvi);
+                    bc_code.Clear();
+                }
+                else OperateResult.AppendText(">>" + bc_code.Text + "不良代码不存在\n", Color.Red, bc_code);
+            }
+        }
+
+        private void Filter_UserControlTextChanged(object sender, EventArgs e)
+        {
+            try
+            {
+                DataRow[] dr = (BadInfSource.DataSource as DataTable).Select("bc_code like '%" + Filter.Text + "%' or bc_name like '%" + Filter.Text + "%'");
+                DataTable dt = (BadInfSource.DataSource as DataTable).Clone();
+                for (int i = 0; i < dr.Length; i++)
+                {
+                    dt.Rows.Add(dr[i].ItemArray);
+                }
+                WaitRejectList.Items.Clear();
+                WaitRejectList.BeginUpdate();
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    if (!ChoosedList.Contains(dt.Rows[i]["bc_code"].ToString()))
+                    {
+                        ListViewItem lvi = new ListViewItem();
+                        //第一列是勾选列,设置列头文本为空
+                        lvi.Text = "";
+                        WaitList.Add(dt.Rows[i]["bc_code"].ToString());
+                        for (int j = 0; j < dt.Columns.Count; j++)
+                            lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                        WaitRejectList.Items.Add(lvi);
+                    }
+                }
+                WaitRejectList.EndUpdate();
+            }
+            catch (Exception)
+            {
+
+            }
+        }
+
+        private void WaitRejectList_DoubleClick(object sender, EventArgs e)
+        {
+            for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
+            {
+                if (WaitRejectList.Items[i].Checked)
+                {
+                    //双击右移
+                    ChooseedReject.PerformClick();
+                }
             }
         }
     }

+ 7 - 7
UAS_MES_XZC/FunctionCode/Special/Special_Reset.cs

@@ -61,11 +61,11 @@ namespace UAS_MES_NEW.Special
         private bool ReSN(string sncode, string stepcode)
         {
             DataTable dt = (DataTable)dh.ExecuteSql("select ms_paststep,ms_makecode from makeserial where ms_sncode ='" + sncode + "' order by ms_id desc", "select");
-            if (!dt.Rows[0]["ms_paststep"].ToString().Contains(cd_stepcode.Text))
-            {
-                OperatResult.AppendText(">>序列号" + sncode + "不允许回流到未执行工序\n", Color.Red);
-                return false;
-            }
+            //if (!dt.Rows[0]["ms_paststep"].ToString().Contains(cd_stepcode.Text))
+            //{
+            //    OperatResult.AppendText(">>序列号" + sncode + "不允许回流到未执行工序\n", Color.Red);
+            //    return false;
+            //}
             string makecode = dt.Rows[0]["ms_makecode"].ToString();
             string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + stepcode + "'").ToString();
             dh.ExecuteSql("update makeserial set ms_status=1,ms_outboxcode='',ms_printcount = 0, ms_nextstepcode= '" + stepcode + "' where ms_sncode='" + sncode + "' and ms_makecode='" + makecode + "'", "update");
@@ -99,7 +99,7 @@ namespace UAS_MES_NEW.Special
                         if (ReSN(sb[i].ToString(), cd_stepcode.Text))
                             OperatResult.AppendText("SN:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
                     }
-                    WeighRecord.Clear();
+                    WeighRecord.Items.Clear();
                     sb.Clear();
                 }
                 else if (bigboxBtn.Checked)
@@ -122,7 +122,7 @@ namespace UAS_MES_NEW.Special
                         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.Clear();
+                    WeighRecord.Items.Clear();
                     sb.Clear();
                 }
                 sql.Clear();

+ 23 - 23
UAS_MES_XZC/PublicMethod/LogicHandler.cs

@@ -1251,7 +1251,7 @@ namespace UAS_MES_NEW.PublicMethod
             switch (iRule)
             {
                 case "TSN":
-                    dt = (DataTable)dh.ExecuteSql("select ms_id,ms_prodcode,ms_nextmacode,ms_salecode,ms_downstatus from makeserial where ms_sncode='" + iSN + "' and ms_makecode<>'" + iMakeCode + "' and ms_status=2 order by ms_id desc", "select");
+                    dt = (DataTable)dh.ExecuteSql("select ms_id,ms_prodcode,ms_nextmacode,ms_salecode,ms_downstatus from makeserial where ms_sncode='" + iSN + "' and ms_makecode<>'" + iMakeCode + "'  order by ms_id desc", "select");
                     if (dt.Rows.Count > 0)
                     {
                         if (dt.Rows[0]["ms_downstatus"].ToString() != "0")
@@ -1259,16 +1259,16 @@ namespace UAS_MES_NEW.PublicMethod
                             ErrMessage = "序列号:" + iSN + "已下地,请先取消下地";
                             return false;
                         }
-                        if (dt.Rows[0]["ms_nextmacode"].ToString() != "")
-                        {
-                            ErrMessage = "序列号:" + iSN + "已被工单" + dt.Rows[0]["ms_nextmacode"].ToString() + "使用";
-                            return false;
-                        }
-                        if ((dt.Rows[0]["ms_salecode"].ToString() != dh.getFieldDataByCondition("make", "ma_salecode", "ma_code='" + iMakeCode + "'").ToString()) && iChecksalecode != "0")
-                        {
-                            ErrMessage = "序列号对应销售订单与工单不符";
-                            return false;
-                        }
+                        //if (dt.Rows[0]["ms_nextmacode"].ToString() != "")
+                        //{
+                        //    ErrMessage = "序列号:" + iSN + "已被工单" + dt.Rows[0]["ms_nextmacode"].ToString() + "使用";
+                        //    return false;
+                        //}
+                        //if ((dt.Rows[0]["ms_salecode"].ToString() != dh.getFieldDataByCondition("make", "ma_salecode", "ma_code='" + iMakeCode + "'").ToString()) && iChecksalecode != "0")
+                        //{
+                        //    ErrMessage = "序列号对应销售订单与工单不符";
+                        //    return false;
+                        //}
                         //ms_salecode是否等于工单的SaleCode
                         if (iSonCode != dt.Rows[0]["ms_prodcode"].ToString())
                         {
@@ -1286,10 +1286,10 @@ namespace UAS_MES_NEW.PublicMethod
                     if (iIfRepeat != "-1")
                     {
                         //判定条码是否已经上料了
-                        dt = (DataTable)dh.ExecuteSql("select cm_barcode from craftmaterial where cm_barcode='" + iSN + "' and cm_status=0", "select");
+                        dt = (DataTable)dh.ExecuteSql("select cm_barcode,cm_sncode from craftmaterial where cm_barcode='" + iSN + "' and cm_status=0", "select");
                         if (dt.Rows.Count > 0)
                         {
-                            ErrMessage = "条码" + iSN + "已经上料";
+                            ErrMessage = "条码" + iSN + "已经上料"+dt.Rows[0]["cm_sncode"].ToString();
                             return false;
                         }
                     }
@@ -1320,10 +1320,10 @@ namespace UAS_MES_NEW.PublicMethod
                 case "RULE":
                     if (iIfRepeat != "-1")
                     {
-                        dt = (DataTable)dh.ExecuteSql("select cm_barcode from craftmaterial where cm_barcode='" + iSN + "' and cm_status=0", "select");
+                        dt = (DataTable)dh.ExecuteSql("select cm_barcode,cm_sncode from craftmaterial where cm_barcode='" + iSN + "' and cm_status=0", "select");
                         if (dt.Rows.Count > 0)
                         {
-                            ErrMessage = "条码" + iSN + "已经上料";
+                            ErrMessage = "条码" + iSN + "已经上料" + dt.Rows[0]["cm_sncode"].ToString();
                             return false;
                         }
                     }
@@ -1333,7 +1333,7 @@ namespace UAS_MES_NEW.PublicMethod
                     bool f = false;
                     for (int i = 0; i < pres.Length; i++)
                     {
-                        if (pres[i] == "" ? true : iSN.StartsWith(pres[i]))
+                        if (pres[i] == "" ? true : iSN.Contains(pres[i]))
                         {
                             //满足其中一条即可
                             f = true;
@@ -1350,13 +1350,13 @@ namespace UAS_MES_NEW.PublicMethod
                         else ErrMessage = iSN + "长度不匹配";
                     }
                     else ErrMessage = iSN + "前缀不匹配";
-                    if (iChecksalecode != "0")
-                    {
-                        if (!dh.CheckExist("simlist left join make on ma_sim=si_code", "si_sim='" + iSN + "'"))
-                        {
-                            ErrMessage = "条码" + iSN + "不在SIM卡清单中";
-                        }
-                    }
+                    //if (iChecksalecode != "0")
+                    //{
+                    //    if (!dh.CheckExist("simlist left join make on ma_sim=si_code", "si_sim='" + iSN + "'"))
+                    //    {
+                    //        ErrMessage = "条码" + iSN + "不在SIM卡清单中";
+                    //    }
+                    //}
                     break;
                 default:
                     break;

+ 3 - 0
UAS_MES_XZC/UAS_MES_XZC.csproj

@@ -1444,6 +1444,9 @@
     <EmbeddedResource Include="CustomControl\ClickPicBox\ClickPicBox.resx">
       <DependentUpon>ClickPicBox.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="CustomControl\ComBoxWithFocus\ComBoxWithFocus.resx">
+      <DependentUpon>ComBoxWithFocus.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="CustomControl\ComBoxWithFocus\ComboxWithTip.resx">
       <DependentUpon>ComboxWithTip.cs</DependentUpon>
     </EmbeddedResource>

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