Browse Source

钜弘MES客户端程序调整汇总提交

caosy 5 years ago
parent
commit
69f4083c6d
43 changed files with 2986 additions and 917 deletions
  1. 2 2
      UAS_MES_JH/CustomControl/TextBoxWithIcon/SourceStepCount.cs
  2. 2 1
      UAS_MES_JH/CustomControl/TextBoxWithIcon/TextBoxWithPlaceHolder.Designer.cs
  3. 7 0
      UAS_MES_JH/CustomControl/TextBoxWithIcon/TextBoxWithPlaceHolder.cs
  4. 171 0
      UAS_MES_JH/FunctionCode/Make/Make_CheckQrcode.Designer.cs
  5. 78 0
      UAS_MES_JH/FunctionCode/Make/Make_CheckQrcode.cs
  6. 159 0
      UAS_MES_JH/FunctionCode/Make/Make_CheckQrcode.resx
  7. 86 37
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs
  8. 26 0
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.cs
  9. 38 0
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.resx
  10. 112 107
      UAS_MES_JH/FunctionCode/Make/Make_Decompose.Designer.cs
  11. 3 3
      UAS_MES_JH/FunctionCode/Make/Make_Decompose.cs
  12. 64 58
      UAS_MES_JH/FunctionCode/Make/Make_Decompose_Ex.cs
  13. 3 2
      UAS_MES_JH/FunctionCode/Make/Make_FeedingCollection.cs
  14. 1 34
      UAS_MES_JH/FunctionCode/Make/Make_RePrintLabel.Designer.cs
  15. 2 114
      UAS_MES_JH/FunctionCode/Make/Make_RePrintLabel.cs
  16. 15 15
      UAS_MES_JH/FunctionCode/Make/Make_Repair.Designer.cs
  17. 47 47
      UAS_MES_JH/FunctionCode/Make/Make_Repair.cs
  18. 0 12
      UAS_MES_JH/FunctionCode/Make/Make_Repair.resx
  19. 6 0
      UAS_MES_JH/FunctionCode/Make/Make_TestCollection.cs
  20. 1 1
      UAS_MES_JH/FunctionCode/OQC/OQC_SamplingDataCollection.cs
  21. 2 2
      UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.cs
  22. 1 1
      UAS_MES_JH/FunctionCode/Packing/Packing_PalletCollection.cs
  23. 195 0
      UAS_MES_JH/FunctionCode/Query/Query_Commandlog.Designer.cs
  24. 84 0
      UAS_MES_JH/FunctionCode/Query/Query_Commandlog.cs
  25. 150 0
      UAS_MES_JH/FunctionCode/Query/Query_Commandlog.resx
  26. 213 66
      UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.Designer.cs
  27. 11 3
      UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.cs
  28. 24 0
      UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.resx
  29. 243 233
      UAS_MES_JH/FunctionCode/Query/Query_MakeInf.Designer.cs
  30. 3 1
      UAS_MES_JH/FunctionCode/Query/Query_MakeInf.cs
  31. 3 0
      UAS_MES_JH/FunctionCode/Query/Query_MakeInf.resx
  32. 137 121
      UAS_MES_JH/FunctionCode/Query/Query_OnlineTraceBack.Designer.cs
  33. 27 3
      UAS_MES_JH/FunctionCode/Query/Query_OnlineTraceBack.cs
  34. 47 6
      UAS_MES_JH/FunctionCode/Query/Query_OnlineTraceBack.resx
  35. 4 4
      UAS_MES_JH/FunctionCode/Special/Special_ChecknoSpitBox.cs
  36. 346 0
      UAS_MES_JH/FunctionCode/Special/Special_Reset.Designer.cs
  37. 316 0
      UAS_MES_JH/FunctionCode/Special/Special_Reset.cs
  38. 197 0
      UAS_MES_JH/FunctionCode/Special/Special_Reset.resx
  39. 86 25
      UAS_MES_JH/FunctionCode/Warehouse/Warehouse_ProductMakeIn.Designer.cs
  40. 33 8
      UAS_MES_JH/FunctionCode/Warehouse/Warehouse_ProductMakeIn.cs
  41. 7 4
      UAS_MES_JH/FunctionCode/Warehouse/Warehouse_ProductMakeIn.resx
  42. 7 6
      UAS_MES_JH/PublicMethod/LogicHandler.cs
  43. 27 1
      UAS_MES_JH/UAS_MES_JH.csproj

+ 2 - 2
UAS_MES_JH/CustomControl/TextBoxWithIcon/SourceStepCount.cs

@@ -80,8 +80,8 @@ namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
 
         private void SourceStepCount_Load(object sender, EventArgs e)
         {
-            //五分钟刷新一次
-            CountRefresh.Interval = 60000;
+            //20s刷新一次
+            CountRefresh.Interval = 20000;
         }
 
         public void Start()

+ 2 - 1
UAS_MES_JH/CustomControl/TextBoxWithIcon/TextBoxWithPlaceHolder.Designer.cs

@@ -40,13 +40,14 @@
             this.TextBox.Location = new System.Drawing.Point(0, 0);
             this.TextBox.Name = "TextBox";
             this.TextBox.Power = null;
-            this.TextBox.Size = new System.Drawing.Size(241, 25);
+            this.TextBox.Size = new System.Drawing.Size(241, 21);
             this.TextBox.Str = null;
             this.TextBox.Str1 = null;
             this.TextBox.Str2 = null;
             this.TextBox.TabIndex = 0;
             this.TextBox.TextChanged += new System.EventHandler(this.TextBox_TextChanged);
             this.TextBox.Enter += new System.EventHandler(this.TextBox_Enter);
+            this.TextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBox_KeyDown);
             this.TextBox.Leave += new System.EventHandler(this.TextBox_Leave);
             // 
             // TextBoxWithPlaceHolder

+ 7 - 0
UAS_MES_JH/CustomControl/TextBoxWithIcon/TextBoxWithPlaceHolder.cs

@@ -40,8 +40,10 @@ namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
         }
 
         public delegate void OnTextChange(object sender, EventArgs e);
+        public delegate void OnKeyDown(object sender, KeyEventArgs e);
 
         public event OnTextChange UserControlTextChanged;
+        public event OnKeyDown UserControlOnKeyDown;
 
         public TextBoxWithPlaceHolder()
         {
@@ -80,5 +82,10 @@ namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
         {
             UserControlTextChanged?.Invoke(sender, new EventArgs());
         }
+
+        private void TextBox_KeyDown(object sender, KeyEventArgs e)
+        {
+            UserControlOnKeyDown?.Invoke(sender, e);
+        }
     }
 }

+ 171 - 0
UAS_MES_JH/FunctionCode/Make/Make_CheckQrcode.Designer.cs

@@ -0,0 +1,171 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_CheckQrcode
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_CheckQrcode));
+            this.Split = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Pallet_label = new System.Windows.Forms.Label();
+            this.input = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperatResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.qrcode = new System.Windows.Forms.TextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.SN = new System.Windows.Forms.TextBox();
+            this.SuspendLayout();
+            // 
+            // Split
+            // 
+            this.Split.AllPower = null;
+            this.Split.BackColor = System.Drawing.Color.Transparent;
+            this.Split.DownImage = ((System.Drawing.Image)(resources.GetObject("Split.DownImage")));
+            this.Split.Image = null;
+            this.Split.IsShowBorder = true;
+            this.Split.Location = new System.Drawing.Point(91, 246);
+            this.Split.Margin = new System.Windows.Forms.Padding(2);
+            this.Split.MoveImage = ((System.Drawing.Image)(resources.GetObject("Split.MoveImage")));
+            this.Split.Name = "Split";
+            this.Split.NormalImage = ((System.Drawing.Image)(resources.GetObject("Split.NormalImage")));
+            this.Split.Power = null;
+            this.Split.Size = new System.Drawing.Size(56, 22);
+            this.Split.TabIndex = 0;
+            this.Split.Text = "清空数据";
+            this.Split.UseVisualStyleBackColor = false;
+            this.Split.Click += new System.EventHandler(this.Split_Click);
+            // 
+            // Pallet_label
+            // 
+            this.Pallet_label.AutoSize = true;
+            this.Pallet_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Pallet_label.Location = new System.Drawing.Point(18, 131);
+            this.Pallet_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.Pallet_label.Name = "Pallet_label";
+            this.Pallet_label.Size = new System.Drawing.Size(58, 21);
+            this.Pallet_label.TabIndex = 1;
+            this.Pallet_label.Text = "录入框";
+            // 
+            // input
+            // 
+            this.input.AllPower = null;
+            this.input.BackColor = System.Drawing.Color.White;
+            this.input.ID = null;
+            this.input.Location = new System.Drawing.Point(91, 133);
+            this.input.Margin = new System.Windows.Forms.Padding(2);
+            this.input.Name = "input";
+            this.input.Power = null;
+            this.input.Size = new System.Drawing.Size(200, 21);
+            this.input.Str = null;
+            this.input.Str1 = null;
+            this.input.Str2 = null;
+            this.input.TabIndex = 2;
+            this.input.KeyDown += new System.Windows.Forms.KeyEventHandler(this.checkno_KeyDown);
+            // 
+            // OperatResult
+            // 
+            this.OperatResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperatResult.Location = new System.Drawing.Point(422, 59);
+            this.OperatResult.Margin = new System.Windows.Forms.Padding(2);
+            this.OperatResult.Name = "OperatResult";
+            this.OperatResult.Size = new System.Drawing.Size(204, 310);
+            this.OperatResult.TabIndex = 3;
+            this.OperatResult.Text = "";
+            // 
+            // qrcode
+            // 
+            this.qrcode.Location = new System.Drawing.Point(91, 201);
+            this.qrcode.Name = "qrcode";
+            this.qrcode.ReadOnly = true;
+            this.qrcode.Size = new System.Drawing.Size(310, 21);
+            this.qrcode.TabIndex = 4;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(18, 201);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(58, 21);
+            this.label1.TabIndex = 5;
+            this.label1.Text = "二维码";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(18, 166);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(32, 21);
+            this.label2.TabIndex = 7;
+            this.label2.Text = "SN";
+            // 
+            // SN
+            // 
+            this.SN.Location = new System.Drawing.Point(91, 166);
+            this.SN.Name = "SN";
+            this.SN.ReadOnly = true;
+            this.SN.Size = new System.Drawing.Size(212, 21);
+            this.SN.TabIndex = 6;
+            // 
+            // Make_CheckQrcode
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(692, 400);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.SN);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.qrcode);
+            this.Controls.Add(this.OperatResult);
+            this.Controls.Add(this.input);
+            this.Controls.Add(this.Pallet_label);
+            this.Controls.Add(this.Split);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Name = "Make_CheckQrcode";
+            this.Tag = "Make!CheckQrcode";
+            this.Text = "二维码检查";
+            this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.ButtonUtil.NormalButton Split;
+        private System.Windows.Forms.Label Pallet_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox input;
+        private CustomControl.RichText.RichTextAutoBottom OperatResult;
+        private System.Windows.Forms.TextBox qrcode;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TextBox SN;
+    }
+}

+ 78 - 0
UAS_MES_JH/FunctionCode/Make/Make_CheckQrcode.cs

@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_CheckQrcode : Form
+    {
+        DataHelper dh;
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        public Make_CheckQrcode()
+        {
+            InitializeComponent();
+        }
+
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+            dh = SystemInf.dh;
+            OperatResult.AppendText(">>请录入SN\n", Color.Black);
+        }
+
+        private void Split_Click(object sender, EventArgs e)
+        {
+            BaseUtil.CleanControls(this.Controls);
+            OperatResult.AppendText(">>请录入SN\n", Color.Black);
+        }
+
+        private void checkno_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (input.Text == "")
+                {
+                    OperatResult.AppendText(">>录入不可为空\n", Color.Red);
+                    return;
+                }
+                if (qrcode.Text == "")
+                {
+                    string qr_code = dh.getFieldDataByCondition("craftmaterial join product on cm_soncode = pr_code", "cm_barcode", "cm_sncode = '"+ input.Text + "' and cm_status =0 and pr_detail like '%二维码%'").ToString();
+                    if (qr_code == "")
+                    {
+                        OperatResult.AppendText(">>SN:"+input.Text+"未找到对应二维码标签\n", Color.Red);
+                        input.Text = "";
+                        return;
+                    }
+                    qrcode.Text = qr_code;
+                    OperatResult.AppendText(">>获取SN:"+ input.Text + "二维码标签成功,请录入二维码核对\n", Color.Green);
+                    SN.Text = input.Text;
+                    input.Text = "";
+                }
+                else {
+                    if (qrcode.Text != input.Text)
+                    {
+                        OperatResult.AppendText(">>录入二维码标签:" + input.Text + "与先标签内容不对应,核对失败\n", Color.Red);
+                        input.Text = "";
+                        return;
+                    }
+                    else {
+                        OperatResult.AppendText(">>二维码标签核对成功\n", Color.Green);
+                        BaseUtil.CleanControls(this.Controls);
+                        OperatResult.AppendText(">>请录入SN\n", Color.Black);
+                        return;
+                    }
+                }
+            }
+        }
+    }
+}

+ 159 - 0
UAS_MES_JH/FunctionCode/Make/Make_CheckQrcode.resx

@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="Split.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Split.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Split.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 86 - 37
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs

@@ -55,7 +55,6 @@
             this.mcd_inqty_label = new System.Windows.Forms.Label();
             this.mcd_remainqty_label = new System.Windows.Forms.Label();
             this.CollectRemark = new System.Windows.Forms.CheckBox();
-            this.locksalecode = new System.Windows.Forms.CheckBox();
             this.label5 = new System.Windows.Forms.Label();
             this.DeleteAll = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.lockCheckBox1 = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
@@ -90,6 +89,10 @@
             this.normalButton1 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.setmin = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.setmax = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.normalButton2 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.panel4.SuspendLayout();
             this.groupBoxWithBorder2.SuspendLayout();
             this.SuspendLayout();
@@ -98,7 +101,7 @@
             // 
             this.pr_colorboxgw_label.AutoSize = true;
             this.pr_colorboxgw_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_colorboxgw_label.Location = new System.Drawing.Point(16, 217);
+            this.pr_colorboxgw_label.Location = new System.Drawing.Point(16, 241);
             this.pr_colorboxgw_label.Name = "pr_colorboxgw_label";
             this.pr_colorboxgw_label.Size = new System.Drawing.Size(92, 27);
             this.pr_colorboxgw_label.TabIndex = 42;
@@ -108,7 +111,7 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(16, 307);
+            this.pr_code_label.Location = new System.Drawing.Point(16, 319);
             this.pr_code_label.Name = "pr_code_label";
             this.pr_code_label.Size = new System.Drawing.Size(92, 27);
             this.pr_code_label.TabIndex = 40;
@@ -175,7 +178,7 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(16, 402);
+            this.pr_detail_label.Location = new System.Drawing.Point(16, 414);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(52, 27);
             this.pr_detail_label.TabIndex = 53;
@@ -185,7 +188,7 @@
             // 
             this.ma_qty_label.AutoSize = true;
             this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty_label.Location = new System.Drawing.Point(16, 447);
+            this.ma_qty_label.Location = new System.Drawing.Point(16, 459);
             this.ma_qty_label.Name = "ma_qty_label";
             this.ma_qty_label.Size = new System.Drawing.Size(92, 27);
             this.ma_qty_label.TabIndex = 55;
@@ -195,7 +198,7 @@
             // 
             this.ma_salecode_label.AutoSize = true;
             this.ma_salecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_salecode_label.Location = new System.Drawing.Point(16, 355);
+            this.ma_salecode_label.Location = new System.Drawing.Point(16, 367);
             this.ma_salecode_label.Name = "ma_salecode_label";
             this.ma_salecode_label.Size = new System.Drawing.Size(52, 27);
             this.ma_salecode_label.TabIndex = 54;
@@ -205,7 +208,7 @@
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(16, 261);
+            this.ms_makecode_label.Location = new System.Drawing.Point(16, 273);
             this.ms_makecode_label.Name = "ms_makecode_label";
             this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
             this.ms_makecode_label.TabIndex = 72;
@@ -271,7 +274,7 @@
             this.columnHeader3,
             this.columnHeader4});
             this.WeighRecord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.WeighRecord.Location = new System.Drawing.Point(377, 218);
+            this.WeighRecord.Location = new System.Drawing.Point(376, 241);
             this.WeighRecord.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.WeighRecord.Name = "WeighRecord";
             this.WeighRecord.Size = new System.Drawing.Size(381, 334);
@@ -312,7 +315,7 @@
             // 
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty_label.Location = new System.Drawing.Point(16, 493);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(16, 505);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
             this.mcd_inqty_label.Size = new System.Drawing.Size(92, 27);
             this.mcd_inqty_label.TabIndex = 190;
@@ -322,7 +325,7 @@
             // 
             this.mcd_remainqty_label.AutoSize = true;
             this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty_label.Location = new System.Drawing.Point(16, 536);
+            this.mcd_remainqty_label.Location = new System.Drawing.Point(16, 548);
             this.mcd_remainqty_label.Name = "mcd_remainqty_label";
             this.mcd_remainqty_label.Size = new System.Drawing.Size(92, 27);
             this.mcd_remainqty_label.TabIndex = 192;
@@ -342,21 +345,6 @@
             this.CollectRemark.UseVisualStyleBackColor = true;
             this.CollectRemark.Visible = false;
             // 
-            // locksalecode
-            // 
-            this.locksalecode.AutoSize = true;
-            this.locksalecode.Checked = true;
-            this.locksalecode.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.locksalecode.ForeColor = System.Drawing.Color.Red;
-            this.locksalecode.Location = new System.Drawing.Point(410, 561);
-            this.locksalecode.Name = "locksalecode";
-            this.locksalecode.Size = new System.Drawing.Size(96, 16);
-            this.locksalecode.TabIndex = 204;
-            this.locksalecode.Text = "当前订单锁定";
-            this.locksalecode.UseVisualStyleBackColor = true;
-            this.locksalecode.Visible = false;
-            // 
             // label5
             // 
             this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
@@ -423,7 +411,7 @@
             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(280, 268);
+            this.LockMakeCode.Location = new System.Drawing.Point(280, 280);
             this.LockMakeCode.Name = "LockMakeCode";
             this.LockMakeCode.Size = new System.Drawing.Size(51, 21);
             this.LockMakeCode.TabIndex = 206;
@@ -437,7 +425,7 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(114, 267);
+            this.ma_code.Location = new System.Drawing.Point(114, 279);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.ReturnData = null;
@@ -464,7 +452,7 @@
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.CutLength = null;
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(129, 536);
+            this.mcd_remainqty.Location = new System.Drawing.Point(129, 548);
             this.mcd_remainqty.MaximumSize = new System.Drawing.Size(150, 0);
             this.mcd_remainqty.Name = "mcd_remainqty";
             this.mcd_remainqty.Size = new System.Drawing.Size(0, 27);
@@ -475,7 +463,7 @@
             this.mcd_inqty.AutoSize = true;
             this.mcd_inqty.CutLength = null;
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(129, 493);
+            this.mcd_inqty.Location = new System.Drawing.Point(129, 505);
             this.mcd_inqty.MaximumSize = new System.Drawing.Size(150, 0);
             this.mcd_inqty.Name = "mcd_inqty";
             this.mcd_inqty.Size = new System.Drawing.Size(0, 27);
@@ -499,7 +487,7 @@
             this.RefreshWeigh.DownImage = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.DownImage")));
             this.RefreshWeigh.Image = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.Image")));
             this.RefreshWeigh.IsShowBorder = true;
-            this.RefreshWeigh.Location = new System.Drawing.Point(308, 221);
+            this.RefreshWeigh.Location = new System.Drawing.Point(308, 245);
             this.RefreshWeigh.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.RefreshWeigh.MoveImage = ((System.Drawing.Image)(resources.GetObject("RefreshWeigh.MoveImage")));
             this.RefreshWeigh.Name = "RefreshWeigh";
@@ -633,7 +621,7 @@
             this.pr_colorboxgw.AutoSize = true;
             this.pr_colorboxgw.CutLength = null;
             this.pr_colorboxgw.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_colorboxgw.Location = new System.Drawing.Point(129, 217);
+            this.pr_colorboxgw.Location = new System.Drawing.Point(129, 241);
             this.pr_colorboxgw.MaximumSize = new System.Drawing.Size(150, 0);
             this.pr_colorboxgw.Name = "pr_colorboxgw";
             this.pr_colorboxgw.Size = new System.Drawing.Size(0, 27);
@@ -645,7 +633,7 @@
             this.pr_code.AutoSize = true;
             this.pr_code.CutLength = null;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(128, 307);
+            this.pr_code.Location = new System.Drawing.Point(128, 319);
             this.pr_code.MaximumSize = new System.Drawing.Size(150, 0);
             this.pr_code.Name = "pr_code";
             this.pr_code.Size = new System.Drawing.Size(0, 27);
@@ -734,7 +722,7 @@
             this.ma_qty.AutoSize = true;
             this.ma_qty.CutLength = null;
             this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty.Location = new System.Drawing.Point(128, 447);
+            this.ma_qty.Location = new System.Drawing.Point(128, 459);
             this.ma_qty.MaximumSize = new System.Drawing.Size(150, 0);
             this.ma_qty.Name = "ma_qty";
             this.ma_qty.Size = new System.Drawing.Size(0, 27);
@@ -745,7 +733,7 @@
             this.ma_colorcode.AutoSize = true;
             this.ma_colorcode.CutLength = null;
             this.ma_colorcode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_colorcode.Location = new System.Drawing.Point(128, 402);
+            this.ma_colorcode.Location = new System.Drawing.Point(128, 414);
             this.ma_colorcode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ma_colorcode.Name = "ma_colorcode";
             this.ma_colorcode.Size = new System.Drawing.Size(0, 27);
@@ -756,7 +744,7 @@
             this.ms_sku.AutoSize = true;
             this.ms_sku.CutLength = null;
             this.ms_sku.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sku.Location = new System.Drawing.Point(128, 355);
+            this.ms_sku.Location = new System.Drawing.Point(128, 367);
             this.ms_sku.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_sku.Name = "ms_sku";
             this.ms_sku.Size = new System.Drawing.Size(0, 27);
@@ -826,18 +814,76 @@
             this.OperateResult.TabIndex = 58;
             this.OperateResult.Text = "";
             // 
+            // setmin
+            // 
+            this.setmin.AllPower = null;
+            this.setmin.BackColor = System.Drawing.Color.White;
+            this.setmin.ID = null;
+            this.setmin.Location = new System.Drawing.Point(377, 213);
+            this.setmin.Name = "setmin";
+            this.setmin.Power = null;
+            this.setmin.Size = new System.Drawing.Size(88, 21);
+            this.setmin.Str = null;
+            this.setmin.Str1 = null;
+            this.setmin.Str2 = null;
+            this.setmin.TabIndex = 211;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(471, 219);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(11, 12);
+            this.label2.TabIndex = 212;
+            this.label2.Text = "-";
+            // 
+            // setmax
+            // 
+            this.setmax.AllPower = null;
+            this.setmax.BackColor = System.Drawing.Color.White;
+            this.setmax.ID = null;
+            this.setmax.Location = new System.Drawing.Point(494, 213);
+            this.setmax.Name = "setmax";
+            this.setmax.Power = null;
+            this.setmax.Size = new System.Drawing.Size(78, 21);
+            this.setmax.Str = null;
+            this.setmax.Str1 = null;
+            this.setmax.Str2 = null;
+            this.setmax.TabIndex = 213;
+            // 
+            // normalButton2
+            // 
+            this.normalButton2.AllPower = null;
+            this.normalButton2.BackColor = System.Drawing.Color.Transparent;
+            this.normalButton2.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.DownImage")));
+            this.normalButton2.Image = null;
+            this.normalButton2.IsShowBorder = true;
+            this.normalButton2.Location = new System.Drawing.Point(581, 209);
+            this.normalButton2.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.MoveImage")));
+            this.normalButton2.Name = "normalButton2";
+            this.normalButton2.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.NormalImage")));
+            this.normalButton2.Power = null;
+            this.normalButton2.Size = new System.Drawing.Size(93, 28);
+            this.normalButton2.TabIndex = 214;
+            this.normalButton2.Text = "重量范围更新";
+            this.normalButton2.UseVisualStyleBackColor = false;
+            this.normalButton2.Click += new System.EventHandler(this.normalButton2_Click);
+            // 
             // Make_ColorBoxWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1013, 584);
+            this.Controls.Add(this.normalButton2);
+            this.Controls.Add(this.setmax);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.setmin);
             this.Controls.Add(this.DeleteAll);
             this.Controls.Add(this.lockCheckBox1);
             this.Controls.Add(this.US_SKU);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.ma_code);
-            this.Controls.Add(this.locksalecode);
             this.Controls.Add(this.CollectRemark);
             this.Controls.Add(this.Remark);
             this.Controls.Add(this.mcd_remainqty);
@@ -947,7 +993,6 @@
         private System.Windows.Forms.Label mcd_remainqty_label;
         private CustomControl.RichText.RichTextAutoBottom Remark;
         private System.Windows.Forms.CheckBox CollectRemark;
-        private System.Windows.Forms.CheckBox locksalecode;
         public System.Windows.Forms.Label ob_checkno;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
@@ -955,5 +1000,9 @@
         private CustomControl.CustomCheckBox.LockCheckBox lockCheckBox1;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox US_SKU;
         private CustomControl.ButtonUtil.NormalButton DeleteAll;
+        private CustomControl.TextBoxWithIcon.EnterTextBox setmin;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.TextBoxWithIcon.EnterTextBox setmax;
+        private CustomControl.ButtonUtil.NormalButton normalButton2;
     }
 }

+ 26 - 0
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -496,5 +496,31 @@ namespace UAS_MES_NEW.Make
             dh.ExecuteSql("update makeserial set ms_sku = '" + US_SKU.Text + "' where ms_sncode = '" + sncode.Text + "'", "update");
             OperateResult.AppendText(">>成品SN号"+ sncode.Text + "更新SKU"+ US_SKU.Text + "成功\n", Color.Green);
         }
+
+        private void normalButton2_Click(object sender, EventArgs e)
+        {
+            if (pr_code.Text == ""||setmin.Text==""||setmax.Text=="")
+            {
+                OperateResult.AppendText(">>产品编号与重量范围不可为空,更新失败\n", Color.Red);
+                return;
+            }
+            try {
+                double minwei;
+                double maxwei;
+                double.TryParse(setmin.Text, out minwei);
+                double.TryParse(setmax.Text, out maxwei);
+                if (minwei > maxwei)
+                {
+                    OperateResult.AppendText(">>最小重量必须小于最大重量\n", Color.Red);
+                    return;
+                }
+                dh.UpdateByCondition("product", "pr_colorboxmaxw = '"+setmax.Text+ "' , pr_colorboxminw = '"+setmin.Text+"'", "pr_code = '"+pr_code.Text+"'");
+                OperateResult.AppendText(">>重量范围修改完成\n", Color.Green);
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show("检查新重量范围是否为数字");
+            }
+        }
     }
 }

+ 38 - 0
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxWeigh.resx

@@ -978,6 +978,44 @@
         2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
         zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="normalButton2.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="normalButton2.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="normalButton2.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
 </root>

+ 112 - 107
UAS_MES_JH/FunctionCode/Make/Make_Decompose.Designer.cs

@@ -67,14 +67,6 @@
             this.ms_wccode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ms_craftname = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ms_craftcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.deccount = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.ms_sncode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.Decompose = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
-            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
-            this.dataGridViewCheckBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.cm_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cm_spid = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -100,6 +92,14 @@
             this.cm_materialtype = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cm_maprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cm_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.deccount = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_sncode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.Decompose = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.dataGridViewCheckBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
             // 
@@ -224,6 +224,7 @@
             this.nochange.TabStop = true;
             this.nochange.Text = "拆解";
             this.nochange.UseVisualStyleBackColor = true;
+            this.nochange.Visible = false;
             // 
             // dataGridViewCheckBoxColumn1
             // 
@@ -427,6 +428,7 @@
             this.dataGridViewTextBoxColumn17.HeaderText = "";
             this.dataGridViewTextBoxColumn17.MinimumWidth = 300;
             this.dataGridViewTextBoxColumn17.Name = "dataGridViewTextBoxColumn17";
+            this.dataGridViewTextBoxColumn17.ReadOnly = true;
             this.dataGridViewTextBoxColumn17.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.dataGridViewTextBoxColumn17.Visible = false;
             this.dataGridViewTextBoxColumn17.Width = 300;
@@ -435,8 +437,11 @@
             // 
             this.dataGridViewTextBoxColumn18.DataPropertyName = "cm_makecode";
             this.dataGridViewTextBoxColumn18.HeaderText = "";
+            this.dataGridViewTextBoxColumn18.MinimumWidth = 300;
             this.dataGridViewTextBoxColumn18.Name = "dataGridViewTextBoxColumn18";
+            this.dataGridViewTextBoxColumn18.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.dataGridViewTextBoxColumn18.Visible = false;
+            this.dataGridViewTextBoxColumn18.Width = 300;
             // 
             // dataGridViewTextBoxColumn19
             // 
@@ -518,104 +523,6 @@
             this.ms_craftcode.TabIndex = 189;
             this.ms_craftcode.Visible = false;
             // 
-            // deccount
-            // 
-            this.deccount.AutoSize = true;
-            this.deccount.CutLength = null;
-            this.deccount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.deccount.Location = new System.Drawing.Point(825, 18);
-            this.deccount.MaximumSize = new System.Drawing.Size(150, 0);
-            this.deccount.Name = "deccount";
-            this.deccount.Size = new System.Drawing.Size(0, 21);
-            this.deccount.TabIndex = 187;
-            this.deccount.Tag = "1";
-            // 
-            // 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(413, 18);
-            this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
-            this.ms_makecode.TabIndex = 186;
-            this.ms_makecode.Tag = "1";
-            // 
-            // ms_prodcode
-            // 
-            this.ms_prodcode.AutoSize = true;
-            this.ms_prodcode.CutLength = null;
-            this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode.Location = new System.Drawing.Point(125, 66);
-            this.ms_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ms_prodcode.Name = "ms_prodcode";
-            this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
-            this.ms_prodcode.TabIndex = 184;
-            this.ms_prodcode.Tag = "1";
-            // 
-            // ms_sncode
-            // 
-            this.ms_sncode.AutoSize = true;
-            this.ms_sncode.CutLength = null;
-            this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode.Location = new System.Drawing.Point(125, 18);
-            this.ms_sncode.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ms_sncode.Name = "ms_sncode";
-            this.ms_sncode.Size = new System.Drawing.Size(0, 21);
-            this.ms_sncode.TabIndex = 183;
-            this.ms_sncode.Tag = "1";
-            // 
-            // Decompose
-            // 
-            this.Decompose.AllPower = null;
-            this.Decompose.BackColor = System.Drawing.Color.Transparent;
-            this.Decompose.DownImage = ((System.Drawing.Image)(resources.GetObject("Decompose.DownImage")));
-            this.Decompose.Image = ((System.Drawing.Image)(resources.GetObject("Decompose.Image")));
-            this.Decompose.IsShowBorder = true;
-            this.Decompose.Location = new System.Drawing.Point(533, 533);
-            this.Decompose.MoveImage = ((System.Drawing.Image)(resources.GetObject("Decompose.MoveImage")));
-            this.Decompose.Name = "Decompose";
-            this.Decompose.NormalImage = ((System.Drawing.Image)(resources.GetObject("Decompose.NormalImage")));
-            this.Decompose.Power = null;
-            this.Decompose.Size = new System.Drawing.Size(76, 27);
-            this.Decompose.TabIndex = 175;
-            this.Decompose.Text = "确定拆解";
-            this.Decompose.UseVisualStyleBackColor = true;
-            this.Decompose.Click += new System.EventHandler(this.Decompose_Click);
-            // 
-            // sn_code
-            // 
-            this.sn_code.AllPower = null;
-            this.sn_code.BackColor = System.Drawing.Color.White;
-            this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(147, 535);
-            this.sn_code.Name = "sn_code";
-            this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(196, 21);
-            this.sn_code.Str = null;
-            this.sn_code.Str1 = null;
-            this.sn_code.Str2 = null;
-            this.sn_code.TabIndex = 174;
-            this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_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(12, 355);
-            this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(889, 152);
-            this.OperateResult.TabIndex = 172;
-            this.OperateResult.Text = "";
-            // 
-            // dataGridViewCheckBoxColumn2
-            // 
-            this.dataGridViewCheckBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.dataGridViewCheckBoxColumn2.HeaderText = "拆解";
-            this.dataGridViewCheckBoxColumn2.Name = "dataGridViewCheckBoxColumn2";
-            this.dataGridViewCheckBoxColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.dataGridViewCheckBoxColumn2.Width = 40;
-            // 
             // Choose
             // 
             this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
@@ -801,6 +708,104 @@
             this.cm_sncode.Name = "cm_sncode";
             this.cm_sncode.Visible = false;
             // 
+            // deccount
+            // 
+            this.deccount.AutoSize = true;
+            this.deccount.CutLength = null;
+            this.deccount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.deccount.Location = new System.Drawing.Point(825, 18);
+            this.deccount.MaximumSize = new System.Drawing.Size(150, 0);
+            this.deccount.Name = "deccount";
+            this.deccount.Size = new System.Drawing.Size(0, 21);
+            this.deccount.TabIndex = 187;
+            this.deccount.Tag = "1";
+            // 
+            // 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(413, 18);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
+            this.ms_makecode.TabIndex = 186;
+            this.ms_makecode.Tag = "1";
+            // 
+            // ms_prodcode
+            // 
+            this.ms_prodcode.AutoSize = true;
+            this.ms_prodcode.CutLength = null;
+            this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_prodcode.Location = new System.Drawing.Point(125, 66);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_prodcode.Name = "ms_prodcode";
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.ms_prodcode.TabIndex = 184;
+            this.ms_prodcode.Tag = "1";
+            // 
+            // ms_sncode
+            // 
+            this.ms_sncode.AutoSize = true;
+            this.ms_sncode.CutLength = null;
+            this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_sncode.Location = new System.Drawing.Point(125, 18);
+            this.ms_sncode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_sncode.Name = "ms_sncode";
+            this.ms_sncode.Size = new System.Drawing.Size(0, 21);
+            this.ms_sncode.TabIndex = 183;
+            this.ms_sncode.Tag = "1";
+            // 
+            // Decompose
+            // 
+            this.Decompose.AllPower = null;
+            this.Decompose.BackColor = System.Drawing.Color.Transparent;
+            this.Decompose.DownImage = ((System.Drawing.Image)(resources.GetObject("Decompose.DownImage")));
+            this.Decompose.Image = ((System.Drawing.Image)(resources.GetObject("Decompose.Image")));
+            this.Decompose.IsShowBorder = true;
+            this.Decompose.Location = new System.Drawing.Point(533, 533);
+            this.Decompose.MoveImage = ((System.Drawing.Image)(resources.GetObject("Decompose.MoveImage")));
+            this.Decompose.Name = "Decompose";
+            this.Decompose.NormalImage = ((System.Drawing.Image)(resources.GetObject("Decompose.NormalImage")));
+            this.Decompose.Power = null;
+            this.Decompose.Size = new System.Drawing.Size(76, 27);
+            this.Decompose.TabIndex = 175;
+            this.Decompose.Text = "确定拆解";
+            this.Decompose.UseVisualStyleBackColor = true;
+            this.Decompose.Click += new System.EventHandler(this.Decompose_Click);
+            // 
+            // sn_code
+            // 
+            this.sn_code.AllPower = null;
+            this.sn_code.BackColor = System.Drawing.Color.White;
+            this.sn_code.ID = null;
+            this.sn_code.Location = new System.Drawing.Point(147, 535);
+            this.sn_code.Name = "sn_code";
+            this.sn_code.Power = null;
+            this.sn_code.Size = new System.Drawing.Size(196, 21);
+            this.sn_code.Str = null;
+            this.sn_code.Str1 = null;
+            this.sn_code.Str2 = null;
+            this.sn_code.TabIndex = 174;
+            this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_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(12, 355);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(889, 152);
+            this.OperateResult.TabIndex = 172;
+            this.OperateResult.Text = "";
+            // 
+            // dataGridViewCheckBoxColumn2
+            // 
+            this.dataGridViewCheckBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewCheckBoxColumn2.HeaderText = "拆解";
+            this.dataGridViewCheckBoxColumn2.Name = "dataGridViewCheckBoxColumn2";
+            this.dataGridViewCheckBoxColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.dataGridViewCheckBoxColumn2.Width = 40;
+            // 
             // Make_Decompose
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -833,7 +838,7 @@
             this.Load += new System.EventHandler(this.Make_Decompose_Load);
             this.SizeChanged += new System.EventHandler(this.Make_Decompose_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 3 - 3
UAS_MES_JH/FunctionCode/Make/Make_Decompose.cs

@@ -111,7 +111,7 @@ namespace UAS_MES_NEW.Make
             sql.Append("select cm_craftcode,cm_spid,cm_craftname,cm_firstsn,cm_makecode,cm_stepcode,cm_stepname,cm_maprodcode,cm_fsoncode,cm_wccode,cm_maid,cm_soncode,cm_materialtype,");
             sql.Append("max(cm_status) cm_status,max(cm_id) cm_id from craftmaterial where(cm_sncode  in (select '" + sncode_1 + "' from dual union select firstsn from makesnrelation where sn ");
             sql.Append(" ='" + sncode_1 + "'union  select sn from makesnrelation where firstsn = '" + sncode_1 + "')");
-            sql.Append(") group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_status DESC");
+            sql.Append(") group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_id asc");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count > 0)
             {
@@ -379,7 +379,7 @@ namespace UAS_MES_NEW.Make
                             //此物料上线状态更新为-1,代表被拆解
                             sql.Clear();
                             sql.Append("update craftmaterial set cm_status=-1,cm_lastdeco=-1,cm_dropman='" + User.UserCode + "',");
-                            sql.Append("cm_dropdate =sysdate,cm_dropstep='" + User.CurrentStepCode + "',");
+                            sql.Append("cm_dropdate =sysdate,CM_REMARK = '维修拆解界面',cm_dropstep='" + User.CurrentStepCode + "',");
                             sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_id='" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'");
                             dh.ExecuteSql(sql.GetString(), "update");
 
@@ -436,7 +436,7 @@ namespace UAS_MES_NEW.Make
                                 //craftmaterial解除相应物料绑定
                                 sql.Clear();
                                 sql.Append("update craftmaterial set cm_status=-1,cm_dropman='" + User.UserCode + "',");
-                                sql.Append("cm_dropdate =sysdate,cm_dropstep='" + User.CurrentStepCode + "',");
+                                sql.Append("cm_dropdate =sysdate,CM_REMARK = '维修拆解界面',cm_dropstep='" + User.CurrentStepCode + "',");
                                 sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_id='" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'");
                                 dh.ExecuteSql(sql.GetString(), "update");
                             }

+ 64 - 58
UAS_MES_JH/FunctionCode/Make/Make_Decompose_Ex.cs

@@ -111,7 +111,7 @@ namespace UAS_MES_NEW.Make
             sql.Append("select cm_craftcode,cm_spid,cm_craftname,cm_firstsn,cm_makecode,cm_stepcode,cm_stepname,cm_maprodcode,cm_fsoncode,cm_wccode,cm_maid,cm_soncode,cm_materialtype,");
             sql.Append("max(cm_status) cm_status,max(cm_id) cm_id from craftmaterial where(cm_sncode  in (select '" + sncode_1 + "' from dual union select firstsn from makesnrelation where sn ");
             sql.Append(" ='" + sncode_1 + "'union  select sn from makesnrelation where firstsn = '" + sncode_1 + "')");
-            sql.Append(") group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_status DESC");
+            sql.Append(") group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_id asc");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count > 0)
             {
@@ -221,11 +221,11 @@ namespace UAS_MES_NEW.Make
                         OperateResult.AppendText("第" + (i + 1) + "行没有采集新批号\n", Color.Red);
                         return;
                     }
-                    if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true && nochange.Checked && (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value == null) && LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
-                    {
-                        OperateResult.AppendText("第" + (i + 1) + "行没有采集不良代码\n", Color.Red);
-                        return;
-                    }
+                    //if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true && nochange.Checked && (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value == null) && LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
+                    //{
+                    //    OperateResult.AppendText("第" + (i + 1) + "行没有采集不良代码\n", Color.Red);
+                    //    return;
+                    //}
                 }
             }
 
@@ -346,40 +346,43 @@ namespace UAS_MES_NEW.Make
                             }
                             if (LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
                             {
-                                //判断生产信息
-                                sql.Clear();
-                                sql.Append("select ms_id,ms_sncode,cm_barcode from craftmaterial left join makeserial on cm_barcode = ms_sncode and cm_soncode = ms_prodcode where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "' and cm_materialtype ='1' and ms_id>'0' and ms_nextmacode = '" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() + "'");
-                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                                //制造件
-                                if (dt.Rows.Count > 0)
+                                if (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value != null)
                                 {
-                                    string makecode = (String)dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode = '" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "' and ms_prodcode = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
-                                    string mss_id = dt.Rows[0]["ms_id"].ToString();
-                                    ////MakeBad表插入物料批号不良信息
+                                    //判断生产信息
                                     sql.Clear();
-                                    sql.Append(" insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode, mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
-                                    sql.Append("values (MakeBad_seq.nextval,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bg_code ,'" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',");
-                                    sql.Append(":bc_code,'" + makecode + "')");
-                                    dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code" }, bgcode, bccode);
-                                    //更新子件序列号为待维修                               
-                                    sql.Clear();
-                                    sql.Append("update makeserial set ms_status=3 ,ms_badtimes = ms_badtimes+1,ms_nextmacode = '' where ms_id='" + mss_id + "' ");
-                                    dh.ExecuteSql(sql.GetString(), "update");
-                                }
-                                //没有生产信息,判定为采购件,则将不良信息插入不良零件表中MAKEBADRSPART
-                                else
-                                {
-                                    sql.Clear();
-                                    sql.Append("insert into  MAKEBADRSPART(mbp_id,mbp_indate,mbp_inman,mbp_sncode, mbp_badcode, mbp_part, mbp_makecode, mbp_sccode,mbp_barcode)values");
-                                    sql.Append("(MAKEBADRSPART_seq.nextval, sysdate, '" + User.UserCode + "','" + ms_sncode.Text + "',:bc_code,'" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "','" + ms_makecode.Text + "','" + User.UserSourceCode + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "')");
-                                    dh.BatchInsert(sql.GetString(), new string[] { "bc_code" }, bccode);
+                                    sql.Append("select ms_id,ms_sncode,cm_barcode from craftmaterial left join makeserial on cm_barcode = ms_sncode and cm_soncode = ms_prodcode where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "' and cm_materialtype ='1' and ms_id>'0' and ms_nextmacode = '" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() + "'");
+                                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                    //制造件
+                                    if (dt.Rows.Count > 0)
+                                    {
+                                        string makecode = (String)dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode = '" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "' and ms_prodcode = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
+                                        string mss_id = dt.Rows[0]["ms_id"].ToString();
+                                        ////MakeBad表插入物料批号不良信息
+                                        sql.Clear();
+                                        sql.Append(" insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode, mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
+                                        sql.Append("values (MakeBad_seq.nextval,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bg_code ,'" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',");
+                                        sql.Append(":bc_code,'" + makecode + "')");
+                                        dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code" }, bgcode, bccode);
+                                        //更新子件序列号为待维修                               
+                                        sql.Clear();
+                                        sql.Append("update makeserial set ms_status=3 ,ms_badtimes = ms_badtimes+1,ms_nextmacode = '' where ms_id='" + mss_id + "' ");
+                                        dh.ExecuteSql(sql.GetString(), "update");
+                                    }
+                                    //没有生产信息,判定为采购件,则将不良信息插入不良零件表中MAKEBADRSPART
+                                    else
+                                    {
+                                        sql.Clear();
+                                        sql.Append("insert into  MAKEBADRSPART(mbp_id,mbp_indate,mbp_inman,mbp_sncode, mbp_badcode, mbp_part, mbp_makecode, mbp_sccode,mbp_barcode)values");
+                                        sql.Append("(MAKEBADRSPART_seq.nextval, sysdate, '" + User.UserCode + "','" + ms_sncode.Text + "',:bc_code,'" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "','" + ms_makecode.Text + "','" + User.UserSourceCode + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "')");
+                                        dh.BatchInsert(sql.GetString(), new string[] { "bc_code" }, bccode);
+                                    }
                                 }
                             }
 
                             //此物料上线状态更新为-1,代表被拆解
                             sql.Clear();
                             sql.Append("update craftmaterial set cm_status=-1,cm_lastdeco=-1,cm_dropman='" + User.UserCode + "',");
-                            sql.Append("cm_dropdate =sysdate,cm_dropstep='" + User.CurrentStepCode + "',");
+                            sql.Append("cm_dropdate =sysdate,CM_REMARK = '特殊拆解界面',cm_dropstep='" + User.CurrentStepCode + "',");
                             sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_id='" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'");
                             dh.ExecuteSql(sql.GetString(), "update");
 
@@ -405,38 +408,41 @@ namespace UAS_MES_NEW.Make
                         {
                             if (LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
                             {
-                                //判断生产信息
-                                sql.Clear();
-                                sql.Append("select ms_id,ms_sncode,cm_barcode from craftmaterial left join makeserial on cm_barcode = ms_sncode and cm_soncode = ms_prodcode where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "' and cm_materialtype ='1' and ms_id>'0' and ms_nextmacode = '" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() + "'");
-                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                                //制造件
-                                if (dt.Rows.Count > 0)
-                                {
-                                    string makecode = (String)dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode = '" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "' and ms_prodcode = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
-                                    string mss_id = dt.Rows[0]["ms_id"].ToString();
-                                    ////MakeBad表插入物料批号不良信息
-                                    sql.Clear();
-                                    sql.Append(" insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode, mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
-                                    sql.Append("values (MakeBad_seq.nextval,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bg_code ,'" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',");
-                                    sql.Append(":bc_code,'" + makecode + "')");
-                                    dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code" }, bgcode, bccode);
-                                    //更新子件序列号为待维修                               
-                                    sql.Clear();
-                                    sql.Append("update makeserial set ms_status=3 ,ms_badtimes = ms_badtimes+1,ms_nextmacode = '' where ms_id='" + mss_id + "' ");
-                                    dh.ExecuteSql(sql.GetString(), "update");
-                                }
-                                //没有生产信息,判定为采购件,则将不良信息插入不良零件表中MAKEBADRSPART
-                                else
+                                if (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value != null)
                                 {
+                                    //判断生产信息
                                     sql.Clear();
-                                    sql.Append("insert into  MAKEBADRSPART(mbp_id,mbp_indate,mbp_inman,mbp_sncode, mbp_badcode, mbp_part, mbp_makecode, mbp_sccode,mbp_barcode)values");
-                                    sql.Append("(MAKEBADRSPART_seq.nextval, sysdate, '" + User.UserCode + "','" + ms_sncode.Text + "',:bc_code,'" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "','" + ms_makecode.Text + "','" + User.UserSourceCode + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "')");
-                                    dh.BatchInsert(sql.GetString(), new string[] { "bc_code" }, bccode);
+                                    sql.Append("select ms_id,ms_sncode,cm_barcode from craftmaterial left join makeserial on cm_barcode = ms_sncode and cm_soncode = ms_prodcode where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "' and cm_materialtype ='1' and ms_id>'0' and ms_nextmacode = '" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() + "'");
+                                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                    //制造件
+                                    if (dt.Rows.Count > 0)
+                                    {
+                                        string makecode = (String)dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode = '" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "' and ms_prodcode = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
+                                        string mss_id = dt.Rows[0]["ms_id"].ToString();
+                                        ////MakeBad表插入物料批号不良信息
+                                        sql.Clear();
+                                        sql.Append(" insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode, mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
+                                        sql.Append("values (MakeBad_seq.nextval,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bg_code ,'" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',");
+                                        sql.Append(":bc_code,'" + makecode + "')");
+                                        dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code" }, bgcode, bccode);
+                                        //更新子件序列号为待维修                               
+                                        sql.Clear();
+                                        sql.Append("update makeserial set ms_status=3 ,ms_badtimes = ms_badtimes+1,ms_nextmacode = '' where ms_id='" + mss_id + "' ");
+                                        dh.ExecuteSql(sql.GetString(), "update");
+                                    }
+                                    //没有生产信息,判定为采购件,则将不良信息插入不良零件表中MAKEBADRSPART
+                                    else
+                                    {
+                                        sql.Clear();
+                                        sql.Append("insert into  MAKEBADRSPART(mbp_id,mbp_indate,mbp_inman,mbp_sncode, mbp_badcode, mbp_part, mbp_makecode, mbp_sccode,mbp_barcode)values");
+                                        sql.Append("(MAKEBADRSPART_seq.nextval, sysdate, '" + User.UserCode + "','" + ms_sncode.Text + "',:bc_code,'" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "','" + ms_makecode.Text + "','" + User.UserSourceCode + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "')");
+                                        dh.BatchInsert(sql.GetString(), new string[] { "bc_code" }, bccode);
+                                    }
                                 }
                                 //craftmaterial解除相应物料绑定
                                 sql.Clear();
                                 sql.Append("update craftmaterial set cm_status=-1,cm_dropman='" + User.UserCode + "',");
-                                sql.Append("cm_dropdate =sysdate,cm_dropstep='" + User.CurrentStepCode + "',");
+                                sql.Append("cm_dropdate =sysdate,CM_REMARK = '特殊拆解界面',cm_dropstep='" + User.CurrentStepCode + "',");
                                 sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_id='" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'");
                                 dh.ExecuteSql(sql.GetString(), "update");
                             }

+ 3 - 2
UAS_MES_JH/FunctionCode/Make/Make_FeedingCollection.cs

@@ -267,7 +267,7 @@ namespace UAS_MES_NEW.Make
                 sn_code.Text = code.Text;
                 sql.Clear();
                 sql.Append("select ma_prodcode,ma_ecncode,ma_softversion,ms_firstsn,ma_bomversion,ma_qty,ma_code,pr_spec,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
-                sql.Append(",ms_prodcode,ms_makecode,ms_code,ms_stepname  from makeserial left join make on ma_code=ms_makecode ");
+                sql.Append(",ms_prodcode,ms_makecode,ms_code,ms_stepname,ma_colorcode  from makeserial left join make on ma_code=ms_makecode ");
                 sql.Append("left join product on ms_prodcode=pr_code where ms_sncode='" + code.Text + "' order by ms_id desc");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
@@ -401,7 +401,8 @@ namespace UAS_MES_NEW.Make
             }
             else
             {
-                OperateResult.AppendText(">>序列号" + sn_code.Text + "不在本道工序,请采集其它序列号\n", Color.Black);
+                string nextstepcode = dh.getFieldDataByCondition("makeserial left join step on ms_nextstepcode = st_code", "st_name", "ms_sncode = '" + sn_code.Text + "'").ToString();
+                OperateResult.AppendText(">>序列号" + sn_code.Text + "已经上料完成,处于"+ nextstepcode + "工序,请采集其它序列号\n", Color.Red);
                 if (!LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sn_code.Text, "上料采集", "上料成功", User.UserCode, out ErrorMessage))
                     OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                 else

+ 1 - 34
UAS_MES_JH/FunctionCode/Make/Make_RePrintLabel.Designer.cs

@@ -42,12 +42,10 @@
             this.label7 = new System.Windows.Forms.Label();
             this.label8 = new System.Windows.Forms.Label();
             this.label9 = new System.Windows.Forms.Label();
-            this.label10 = new System.Windows.Forms.Label();
             this.inputValue = new System.Windows.Forms.Label();
             this.pr_code = new System.Windows.Forms.Label();
             this.ms_makecode = new System.Windows.Forms.Label();
             this.pr_detail = new System.Windows.Forms.Label();
-            this.rePrintCheck = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.printBtn = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.printNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
@@ -195,17 +193,6 @@
             this.label9.TabIndex = 192;
             this.label9.Text = "份数";
             // 
-            // label10
-            // 
-            this.label10.AutoSize = true;
-            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label10.Location = new System.Drawing.Point(33, 384);
-            this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(74, 21);
-            this.label10.TabIndex = 196;
-            this.label10.Text = "补打核对";
-            // 
             // inputValue
             // 
             this.inputValue.AutoSize = true;
@@ -247,22 +234,6 @@
             this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 202;
             // 
-            // rePrintCheck
-            // 
-            this.rePrintCheck.AllPower = null;
-            this.rePrintCheck.BackColor = System.Drawing.Color.White;
-            this.rePrintCheck.ID = null;
-            this.rePrintCheck.Location = new System.Drawing.Point(149, 384);
-            this.rePrintCheck.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
-            this.rePrintCheck.Name = "rePrintCheck";
-            this.rePrintCheck.Power = null;
-            this.rePrintCheck.Size = new System.Drawing.Size(163, 21);
-            this.rePrintCheck.Str = null;
-            this.rePrintCheck.Str1 = null;
-            this.rePrintCheck.Str2 = null;
-            this.rePrintCheck.TabIndex = 197;
-            this.rePrintCheck.KeyDown += new System.Windows.Forms.KeyEventHandler(this.rePrintCheck_KeyDown);
-            // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -327,7 +298,7 @@
             // Printer
             // 
             this.Printer.Location = new System.Drawing.Point(125, 145);
-            this.Printer.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Printer.Margin = new System.Windows.Forms.Padding(4);
             this.Printer.Name = "Printer";
             this.Printer.Size = new System.Drawing.Size(148, 25);
             this.Printer.TabIndex = 186;
@@ -359,8 +330,6 @@
             this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.pr_code);
             this.Controls.Add(this.inputValue);
-            this.Controls.Add(this.rePrintCheck);
-            this.Controls.Add(this.label10);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.printBtn);
             this.Controls.Add(this.printNum);
@@ -408,8 +377,6 @@
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox printNum;
         private CustomControl.ButtonUtil.NormalButton printBtn;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
-        private System.Windows.Forms.Label label10;
-        private CustomControl.TextBoxWithIcon.SnCollectionBox rePrintCheck;
         private System.Windows.Forms.Label inputValue;
         private System.Windows.Forms.Label pr_code;
         private System.Windows.Forms.Label ms_makecode;

+ 2 - 114
UAS_MES_JH/FunctionCode/Make/Make_RePrintLabel.cs

@@ -164,6 +164,7 @@ namespace UAS_MES_NEW.Make
                     inputValue.Text = inputText.Text;
                     inputText.Text = "";
                 }
+                print_Click(sender, new EventArgs());
             }
         }
 
@@ -226,7 +227,6 @@ namespace UAS_MES_NEW.Make
                 {
                     //按照打印张数打印
                     OperateResult.AppendText("<<打印成功\n", Color.Green);
-                    printBtn.Enabled = false;
                 }
                 else
                 {
@@ -258,7 +258,6 @@ namespace UAS_MES_NEW.Make
                 {
                     //判断通过,打印
                     OperateResult.AppendText("<<打印成功\n", Color.Green);
-                    printBtn.Enabled = false;
                 }
                 else
                 {
@@ -315,118 +314,7 @@ namespace UAS_MES_NEW.Make
 
         private void rePrintCheck_KeyDown(object sender, KeyEventArgs e)
         {
-            //输入ENTER
-            if (e.KeyCode == Keys.Enter)
-            {
-                if (rePrintCheck.Text == "")
-                {
-                    OperateResult.AppendText("<<输入不能为空\n", Color.Red);
-                    return;
-                }
-                OperateResult.AppendText(">>" + rePrintCheck.Text + "\n", Color.Black);
-                if (giftBox.Checked || fuselagel.Checked)
-                {
-                    //TSN为空,说明是第一次
-                    if (TSN == "")
-                    {
-                        re_ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id) ms_id", "ms_sncode='" + rePrintCheck.Text + "'").ToString();
-                        //如果ms_id 无值或者为空,提示用户SN不存在,请输入SN
-                        if (re_ms_id == "")
-                        {
-                            OperateResult.AppendText("<<SN:" + rePrintCheck.Text + "不存在\n", Color.Red, rePrintCheck);
-                            OperateResult.AppendText(">>请输入SN\n", Color.Black);
-                            return;
-                        }
-                        //存在则记录下这一次输入的SN
-                        TSN = rePrintCheck.Text;
-                        //查询其他的数据
-                        infoc = (DataTable)dh.ExecuteSql("select ms_downstatus,ms_prodcode,ms_makecode from makeserial where ms_id='" + re_ms_id + "'", "select");
-                        //提示用户输入核对SN
-                        OperateResult.AppendText(">>请输入核对SN\n", Color.Green, rePrintCheck);
-                    }
-                    //说明输入的是核对的SN
-                    else
-                    {
-                        //两次输入的序列号一致
-                        if (rePrintCheck.Text == TSN)
-                        {
-                            OperateResult.AppendText("<<核对成功\n", Color.Green);
-                            ////如果序列号是下地状态 ms_downstatus<>0 ,更新ms_downstatus=0;
-                            //if (infoc.Rows[0]["ms_downstatus"].ToString() != "0")
-                            //{
-                            //    ////判断下地原因是否是补打标签,是才能取消下地
-                            //    if (dh.CheckExist("makedown", "Md_SNCODE='" + TSN + "' AND Md_MACODE='" + infoc.Rows[0]["ms_makecode"].ToString() + "' AND Md_STATUS=-1 AND MD_DOWNREASON='补打标签'"))
-                            //    {
-                            //        //同时更新 update makedown set ms_status=0,MS_UPREASON=’标签补打核对’,MS_UPMAN=’人员编号’,MS_UPDATE=SYSDATE WHERE MS_SNCODE=? AND MS_MACODE=? AND MS_STATUS=-1
-                            //        sql.Clear();
-                            //        sql.Append("update makedown set md_status=0,Md_UPREASON='标签补打核对',Md_UPMAN='" + User.UserCode + "',Md_UPDATE=SYSDATE WHERE Md_SNCODE='" + TSN + "' AND Md_MACODE='" + infoc.Rows[0]["ms_makecode"].ToString() + "' AND Md_STATUS=-1 AND MD_DOWNREASON='补打标签'");
-                            //        dh.ExecuteSQLTran("update makeserial set ms_downstatus='0' where ms_id='" + re_ms_id + "'", sql.GetString());
-                            //    }
-                            //}
-                            printBtn.Enabled = true;
-                            //记录操作日志commandlog , 补打核对,核对成功
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, infoc.Rows[0]["ms_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "标签补打核对", "核对成功", TSN, "");
-                        }
-                        else
-                        {
-                            OperateResult.AppendText("<<核对失败\n", Color.Red);
-                        }
-                        //清空TSN的值
-                        TSN = "";
-                        rePrintCheck.Text = "";
-                    }
-                }
-                //勾选的是卡通箱
-                else if (CartonBox.Checked)
-                {
-                    //第一次输入
-                    if (TSN == "")
-                    {
-                        infoc = (DataTable)dh.ExecuteSql("select pa_prodcode,pa_makecode,pa_downstatus from package where pa_outboxcode='" + rePrintCheck.Text + "' and pa_type=1", "select");
-                        //如果查询无值,提示用户卡通箱号不存在,请输入卡通箱号
-                        if (infoc.Rows.Count == 0)
-                        {
-                            OperateResult.AppendText("<<卡通箱号:" + rePrintCheck.Text + "不存在\n", Color.Red, rePrintCheck);
-                            OperateResult.AppendText(">>请输入卡通箱号\n", Color.Black);
-                            return;
-                        }
-                        //存在则保存,用于和第二次的比对
-                        TSN = rePrintCheck.Text;
-                        //提示用户输入卡通箱号
-                        OperateResult.AppendText(">>请输入核对卡通箱号\n", Color.Green, rePrintCheck);
-                    }
-                    else
-                    {
-                        //比对两次输入的是否一致
-                        if (TSN == rePrintCheck.Text)
-                        {
-                            //提示用户核对成功
-                            OperateResult.AppendText("<<核对成功\n", Color.Green);
-                            ////如果卡通箱号是下地状态 pa_downstatus<>0 ,更新pa_downstatus=0;
-                            //if (infoc.Rows[0]["pa_downstatus"].ToString() != "0")
-                            //{
-                            //    //判断下地原因是否是补打标签,是才能取消下地
-                            //    if (dh.CheckExist("makedown", "Md_OUTBOXCODE='" + TSN + "' AND Md_PRODCODE='" + infoc.Rows[0]["pa_prodcode"].ToString() + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'"))
-                            //    {
-                            //        sql.Clear();
-                            //        sql.Append("update makedown set md_status=0,Md_UPREASON='标签补打核对',Md_UPMAN='" + User.UserCode + "',Md_UPDATE=SYSDATE WHERE Md_OUTBOXCODE='" + TSN + "' AND Md_PRODCODE='" + infoc.Rows[0]["pa_prodcode"].ToString() + "' AND Md_STATUS=-1  AND MD_DOWNREASON='补打标签'");
-                            //        dh.ExecuteSQLTran("update package set pa_downstatus='0' where pa_outboxcode='" + TSN + "'", sql.GetString());
-                            //    }
-                            //}
-                            printBtn.Enabled = true;
-                            //记录操作日志commandlog , 补打核对,核对成功
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, infoc.Rows[0]["pa_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "标签补打核对,卡通箱号:" + TSN, "核对成功", TSN, "");
-                        }
-                        else
-                        {
-                            OperateResult.AppendText("<<核对失败\n", Color.Red);
-                        }
-                        //清空TSN的值
-                        TSN = "";
-                        rePrintCheck.Text = "";
-                    }
-                }
-            }
+          
         }
         /// <summary>
         /// 清除信息

+ 15 - 15
UAS_MES_JH/FunctionCode/Make/Make_Repair.Designer.cs

@@ -427,7 +427,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_reworkcheckno.AutoSize = true;
             this.ms_reworkcheckno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_reworkcheckno.Location = new System.Drawing.Point(791, 58);
+            this.ms_reworkcheckno.Location = new System.Drawing.Point(790, 57);
             this.ms_reworkcheckno.Name = "ms_reworkcheckno";
             this.ms_reworkcheckno.Size = new System.Drawing.Size(74, 21);
             this.ms_reworkcheckno.TabIndex = 129;
@@ -440,7 +440,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(202, 26);
+            this.ms_makecode_label.Location = new System.Drawing.Point(201, 25);
             this.ms_makecode_label.Name = "ms_makecode_label";
             this.ms_makecode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_makecode_label.TabIndex = 37;
@@ -452,7 +452,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(14, 25);
+            this.ms_sncode_label.Location = new System.Drawing.Point(13, 24);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_sncode_label.TabIndex = 38;
@@ -464,7 +464,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_checkno.AutoSize = true;
             this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_checkno.Location = new System.Drawing.Point(789, 26);
+            this.ms_checkno.Location = new System.Drawing.Point(788, 25);
             this.ms_checkno.Name = "ms_checkno";
             this.ms_checkno.Size = new System.Drawing.Size(74, 21);
             this.ms_checkno.TabIndex = 128;
@@ -498,7 +498,7 @@
             this.ms_sncode.AutoSize = true;
             this.ms_sncode.CutLength = null;
             this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode.Location = new System.Drawing.Point(89, 26);
+            this.ms_sncode.Location = new System.Drawing.Point(88, 25);
             this.ms_sncode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Size = new System.Drawing.Size(0, 21);
@@ -529,7 +529,7 @@
             this.nr_code.AutoSize = true;
             this.nr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.nr_code.ForeColor = System.Drawing.Color.Black;
-            this.nr_code.Location = new System.Drawing.Point(839, 221);
+            this.nr_code.Location = new System.Drawing.Point(838, 220);
             this.nr_code.Name = "nr_code";
             this.nr_code.Size = new System.Drawing.Size(0, 21);
             this.nr_code.TabIndex = 125;
@@ -540,7 +540,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.st_rstepcode_label.AutoSize = true;
             this.st_rstepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.st_rstepcode_label.Location = new System.Drawing.Point(264, 64);
+            this.st_rstepcode_label.Location = new System.Drawing.Point(263, 63);
             this.st_rstepcode_label.Name = "st_rstepcode_label";
             this.st_rstepcode_label.Size = new System.Drawing.Size(74, 21);
             this.st_rstepcode_label.TabIndex = 65;
@@ -552,7 +552,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ma_craftcode_label.AutoSize = true;
             this.ma_craftcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_craftcode_label.Location = new System.Drawing.Point(14, 64);
+            this.ma_craftcode_label.Location = new System.Drawing.Point(13, 63);
             this.ma_craftcode_label.Name = "ma_craftcode_label";
             this.ma_craftcode_label.Size = new System.Drawing.Size(74, 21);
             this.ma_craftcode_label.TabIndex = 66;
@@ -585,7 +585,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(636, 26);
+            this.pr_detail_label.Location = new System.Drawing.Point(635, 25);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 61;
@@ -597,7 +597,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_prodcode_label.AutoSize = true;
             this.ms_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode_label.Location = new System.Drawing.Point(407, 26);
+            this.ms_prodcode_label.Location = new System.Drawing.Point(406, 25);
             this.ms_prodcode_label.Name = "ms_prodcode_label";
             this.ms_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_prodcode_label.TabIndex = 62;
@@ -610,7 +610,7 @@
             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(732, 26);
+            this.pr_detail.Location = new System.Drawing.Point(731, 25);
             this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 21);
@@ -623,7 +623,7 @@
             this.ms_prodcode.AutoSize = true;
             this.ms_prodcode.CutLength = null;
             this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode.Location = new System.Drawing.Point(503, 26);
+            this.ms_prodcode.Location = new System.Drawing.Point(502, 25);
             this.ms_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_prodcode.Name = "ms_prodcode";
             this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
@@ -637,7 +637,7 @@
             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(282, 26);
+            this.ms_makecode.Location = new System.Drawing.Point(281, 25);
             this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_makecode.Name = "ms_makecode";
             this.ms_makecode.Size = new System.Drawing.Size(0, 21);
@@ -1019,12 +1019,12 @@
             this.SizeChanged += new System.EventHandler(this.Make_Repair_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).EndInit();
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.mbp_partdgv)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.mbl_locdgv)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 47 - 47
UAS_MES_JH/FunctionCode/Make/Make_Repair.cs

@@ -308,7 +308,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 cdstepcode = ms_stepcode;
                             }
-                            cd_stepcode.Text = cdstepcode;
+                            //cd_stepcode.Text = cdstepcode;
                             if (dh.getFieldDataByCondition("craftdetail left JOIN craft on cr_id = cd_crid", "nvl(cd_ifinput,0)cd_ifinput", "cr_code=  '" + cr_code.Text + "' and cr_prodcode = '" + ms_prodcode.Text + "' and cd_stepcode = '" + cd_stepcode.Text + "'").ToString() == "-1")
                                 cd_stepcode.Enabled = false;
                             else
@@ -509,38 +509,38 @@ namespace UAS_MES_NEW.Make
                     return;
                 }
             }
-            //查询拆解的物料
-            sql.Clear();
-            sql.Append("select distinct cm_soncode from craftmaterial where cm_sncode in (select '" + firstsn + "' from dual union ");
-            sql.Append("select sn from makesnrelation where firstsn='" + firstsn + "') and cm_craftcode<>'" + cr_code.Text + "' and cm_makecode<>'" + ms_makecode.Text + "' and cm_status=-1 ");
-            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-            //如果含有序列号物料有被拆解过
-            if (dt.Rows.Count > 0)
-            {
-                string soncode = "";
-                for (int i = 0; i < dt.Rows.Count; i++)
-                {
-                    soncode += "'" + dt.Rows[i][0].ToString() + "',";
-                }
-                //查询对应的上料记录
-                sql.Clear();
-                sql.Append("select cm_soncode from craftmaterial where cm_sncode in (select '" + firstsn + "' from dual union  select sn from ");
-                sql.Append(" makesnrelation where firstsn='" + firstsn + "') and cm_status=0 and cm_soncode in (" + soncode.Substring(0, soncode.Length - 1) + ")");
-                DataTable LoadSoncode = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                //查询的结果不相等表示未完成上料
-                if (dt.Rows.Count != LoadSoncode.Rows.Count)
-                {
-                    for (int i = 0; i < LoadSoncode.Rows.Count; i++)
-                    {
-                        if (soncode.Contains(LoadSoncode.Rows[i][0].ToString()))
-                        {
-                            soncode = soncode.Replace(LoadSoncode.Rows[i][0].ToString(), "");
-                        }
-                    }
-                    OperatResult.AppendText(">>" + soncode.Replace("'", "") + "物料尚未备料,不允许回流\n", Color.Red);
-                    return;
-                }
-            }
+            ////查询拆解的物料
+            //sql.Clear();
+            //sql.Append("select distinct cm_soncode from craftmaterial where cm_sncode in (select '" + firstsn + "' from dual union ");
+            //sql.Append("select sn from makesnrelation where firstsn='" + firstsn + "') and cm_craftcode<>'" + cr_code.Text + "' and cm_makecode<>'" + ms_makecode.Text + "' and cm_status=-1 ");
+            //dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            ////如果含有序列号物料有被拆解过
+            //if (dt.Rows.Count > 0)
+            //{
+            //    string soncode = "";
+            //    for (int i = 0; i < dt.Rows.Count; i++)
+            //    {
+            //        soncode += "'" + dt.Rows[i][0].ToString() + "',";
+            //    }
+            //    //查询对应的上料记录
+            //    sql.Clear();
+            //    sql.Append("select cm_soncode from craftmaterial where cm_sncode in (select '" + firstsn + "' from dual union  select sn from ");
+            //    sql.Append(" makesnrelation where firstsn='" + firstsn + "') and cm_status=0 and cm_soncode in (" + soncode.Substring(0, soncode.Length - 1) + ")");
+            //    DataTable LoadSoncode = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            //    //查询的结果不相等表示未完成上料
+            //    if (dt.Rows.Count != LoadSoncode.Rows.Count)
+            //    {
+            //        for (int i = 0; i < LoadSoncode.Rows.Count; i++)
+            //        {
+            //            if (soncode.Contains(LoadSoncode.Rows[i][0].ToString()))
+            //            {
+            //                soncode = soncode.Replace(LoadSoncode.Rows[i][0].ToString(), "");
+            //            }
+            //        }
+            //        OperatResult.AppendText(">>" + soncode.Replace("'", "") + "物料尚未备料,不允许回流\n", Color.Red);
+            //        return;
+            //    }
+            //}
             dt = (DataTable)dh.ExecuteSql("select cr_id from craft where cr_statuscode='AUDITED' and cr_code='" + cr_code.Text + "'", "select");
             if (dt.Rows.Count == 0)
                 OperatResult.AppendText(">>回流工序不存在\n", Color.Red);
@@ -672,8 +672,8 @@ namespace UAS_MES_NEW.Make
                 ErrorMessage += " 不良原因组 ";
             if (nr_name.Text == "")
                 ErrorMessage += " 不良原因 ";
-            if (mbr_dutyname.Text == "")
-                ErrorMessage += " 责任别 ";
+            //if (mbr_dutyname.Text == "")
+            //    ErrorMessage += " 责任别 ";
             if (ErrorMessage != "")
             {
                 ErrorMessage += "不能为空";
@@ -697,16 +697,16 @@ namespace UAS_MES_NEW.Make
                 OperatResult.AppendText(">>不良原因不存在\n", Color.Red);
                 return;
             }
-            if (!dh.CheckExist("ngduty", "nd_name='" + mbr_dutyname.Text + "'"))
-            {
-                OperatResult.AppendText(">>责任别不存在\n", Color.Red);
-                return;
-            }
-            if (!dh.CheckExist("solution", "so_name='" + so_name.Text + "'"))
-            {
-                OperatResult.AppendText(">>解决方案不存在\n", Color.Red);
-                return;
-            }
+            //if (!dh.CheckExist("ngduty", "nd_name='" + mbr_dutyname.Text + "'"))
+            //{
+            //    OperatResult.AppendText(">>责任别不存在\n", Color.Red);
+            //    return;
+            //}
+            //if (!dh.CheckExist("solution", "so_name='" + so_name.Text + "'"))
+            //{
+            //    OperatResult.AppendText(">>解决方案不存在\n", Color.Red);
+            //    return;
+            //}
             //保存不良原因
             sql.Clear();
             sql.Append("insert into makebadreason (mbr_mbid,mbr_id,mbr_brcode,mbr_solutioncode,");
@@ -841,7 +841,7 @@ namespace UAS_MES_NEW.Make
 
         private void cr_code_UserControlTextChanged(object sender, EventArgs e)
         {
-            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and  (cd_stepno in(2,4) or cd_ifburnout <>0) order by cd_stepno";
         }
 
         private void Clean_Click(object sender, EventArgs e)
@@ -888,7 +888,7 @@ namespace UAS_MES_NEW.Make
                 cr_code.Condition = "";
             bd_soncode.Condition = "bd_mothercode='" + ms_prodcode.Text + "' and NVL(bd_usestatus,' ')<>'DISABLE'";
             //设置工序的条件
-            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and  (cd_stepno in(2,4) or cd_ifburnout <>0) order by cd_stepno";
         }
 
         public void RefreshData()

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

@@ -206,18 +206,6 @@
   <metadata name="DeleteCom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mbp_part1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="DeleteCom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="DeletePos.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 6 - 0
UAS_MES_JH/FunctionCode/Make/Make_TestCollection.cs

@@ -551,6 +551,12 @@ namespace UAS_MES_NEW.Make
                         else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
                     }
                     else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                    //自动拆解组装上料物料
+                    sql.Clear();
+                    sql.Append("update craftmaterial set cm_status=-1,cm_lastdeco=-1,cm_dropman='" + User.UserCode + "',");
+                    sql.Append("cm_dropdate =sysdate,CM_REMARK = '不良自动拆解',cm_dropstep='" + User.CurrentStepCode + "',");
+                    sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_sncode='" + ms_sncode.Text + "' and cm_stepcode= 'BZ-M10' and cm_makecode = '"+ ma_code.Text + "'");
+                    dh.ExecuteSql(sql.GetString(), "update");
                     LastSncode = ms_sncode.Text;
                     //采集完不良,聚焦序列号
                     ms_sncode.Focus();

+ 1 - 1
UAS_MES_JH/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -308,7 +308,7 @@ namespace UAS_MES_NEW.OQC
                             sql.Clear();
                             sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,mb_indate,mb_stepcode");
                             sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_soncode,mb_badname,mb_status,mb_bgname)");
-                            sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + User.UserCode + "',sysdate,'" + User.CurrentStepCode + "',ms_sourcecode,:bc_code,:bg_code,'',");
+                            sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + User.UserCode + "',sysdate,'" + User.CurrentStepCode + "','"+User.UserSourceCode+"',:bc_code,:bg_code,'',");
                             sql.Append("sp_soncode,:bc_name,'0',:bg_name from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
                             sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + sncode.Text + "' and ms_makecode='" + ob_makecode.Text + "'");
                             dh.BatchInsert(sql.GetString(), new string[] { "bc_code", "bg_code", "bc_name", "bg_name" }, bc_code.ToArray(), bg_code.ToArray(), bc_name.ToArray(), bg_name.ToArray());

+ 2 - 2
UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -823,8 +823,8 @@ namespace UAS_MES_NEW.Packing
                                 {
                                     string ma_code = dt.Rows[i]["pd_makecode"].ToString();
                                     string num = dt.Rows[i]["num"].ToString();
-                                    SQLS1.Add("delete from makeprocess where mp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + pa_outboxcode.Text + "' and ms_makecode='" + ma_code + "') and mp_makecode='" + ma_code + "' and mp_stepcode='" + User.CurrentStepCode + "'");
-                                    SQLS1.Add("delete from steppassed where sp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + pa_outboxcode.Text + "' and ms_makecode='" + ma_code + "') and sp_makecode='" + ma_code + "' and sp_stepcode='" + User.CurrentStepCode + "'");
+                                  //  SQLS1.Add("delete from makeprocess where mp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + pa_outboxcode.Text + "' and ms_makecode='" + ma_code + "') and mp_makecode='" + ma_code + "' and mp_stepcode='" + User.CurrentStepCode + "'");
+                                 //   SQLS1.Add("delete from steppassed where sp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + pa_outboxcode.Text + "' and ms_makecode='" + ma_code + "') and sp_makecode='" + ma_code + "' and sp_stepcode='" + User.CurrentStepCode + "'");
                                     SQLS1.Add("update makecraftdetail set mcd_inqty=mcd_inqty-" + num + ",mcd_outqty=mcd_outqty-" + num + ",mcd_okqty=mcd_okqty-" + num + " where mcd_macode='" + ma_code + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                                     //扣减已完工数
                                     SQLS1.Add("update make set ma_madeqty=ma_madeqty-(select count(1) from makeserial where  ms_outboxcode='" + pa_outboxcode.Text + "' and ms_makecode='" + ma_code + "' and ms_status=2) where ma_code='" + ma_code + "'");

+ 1 - 1
UAS_MES_JH/FunctionCode/Packing/Packing_PalletCollection.cs

@@ -152,7 +152,7 @@ namespace UAS_MES_NEW.Packing
                         pa_nextstep = dt.Rows[0]["pa_nextstep"].ToString();
                         if (pa_nextstep != User.CurrentStepCode && pa_nextstep != "" && (unfinpack == "0" || unfinpack == ""))
                         {
-                            OperateResult.AppendText(">>箱号" + outboxcode.Text + "的下一工序不是当前岗位资源对应工序\n", Color.Red, outboxcode);
+                            OperateResult.AppendText(">>箱号" + outboxcode.Text + "的下一工序为"+ pa_nextstep + ",不是当前岗位资源对应工序\n", Color.Red, outboxcode);
                             return;
                         }
                         sql.Clear();

+ 195 - 0
UAS_MES_JH/FunctionCode/Query/Query_Commandlog.Designer.cs

@@ -0,0 +1,195 @@
+namespace UAS_MES_NEW.Query
+{
+    partial class Query_Commandlog
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
+            this.Search = new System.Windows.Forms.Button();
+            this.pallecode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
+            this.InOutDetailDGV = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.cl_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cl_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cl_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sc_stepname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cl_operate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cl_result = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cl_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cl_man = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Sp = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.InOutDetailDGV)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // Search
+            // 
+            this.Search.Location = new System.Drawing.Point(197, 28);
+            this.Search.Name = "Search";
+            this.Search.Size = new System.Drawing.Size(68, 21);
+            this.Search.TabIndex = 237;
+            this.Search.Text = "查询";
+            this.Search.UseVisualStyleBackColor = true;
+            this.Search.Click += new System.EventHandler(this.Search_Click);
+            // 
+            // pallecode
+            // 
+            this.pallecode.BackColor = System.Drawing.Color.Transparent;
+            this.pallecode.Location = new System.Drawing.Point(12, 28);
+            this.pallecode.Name = "pallecode";
+            this.pallecode.PlaceHolder = "sn/箱搜索";
+            this.pallecode.Size = new System.Drawing.Size(159, 28);
+            this.pallecode.TabIndex = 236;
+            this.pallecode.UserControlOnKeyDown += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnKeyDown(this.pallecode_UserControlOnKeyDown);
+            // 
+            // InOutDetailDGV
+            // 
+            this.InOutDetailDGV.AllowUserToAddRows = false;
+            this.InOutDetailDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.InOutDetailDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.cl_sncode,
+            this.cl_linecode,
+            this.cl_makecode,
+            this.sc_stepname,
+            this.cl_operate,
+            this.cl_result,
+            this.cl_date,
+            this.cl_man,
+            this.Sp});
+            this.InOutDetailDGV.EnableContentClick = true;
+            this.InOutDetailDGV.Location = new System.Drawing.Point(11, 78);
+            this.InOutDetailDGV.Margin = new System.Windows.Forms.Padding(2);
+            this.InOutDetailDGV.Name = "InOutDetailDGV";
+            this.InOutDetailDGV.RowTemplate.Height = 27;
+            this.InOutDetailDGV.Size = new System.Drawing.Size(665, 385);
+            this.InOutDetailDGV.TabIndex = 219;
+            // 
+            // cl_sncode
+            // 
+            this.cl_sncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.cl_sncode.DataPropertyName = "cl_sncode";
+            this.cl_sncode.HeaderText = "SN/箱号";
+            this.cl_sncode.Name = "cl_sncode";
+            this.cl_sncode.ReadOnly = true;
+            // 
+            // cl_linecode
+            // 
+            this.cl_linecode.DataPropertyName = "cl_linecode";
+            this.cl_linecode.HeaderText = "线体";
+            this.cl_linecode.Name = "cl_linecode";
+            this.cl_linecode.Width = 70;
+            // 
+            // cl_makecode
+            // 
+            this.cl_makecode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.cl_makecode.DataPropertyName = "cl_makecode";
+            this.cl_makecode.HeaderText = "工单";
+            this.cl_makecode.Name = "cl_makecode";
+            this.cl_makecode.ReadOnly = true;
+            // 
+            // sc_stepname
+            // 
+            this.sc_stepname.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.sc_stepname.DataPropertyName = "sc_stepname";
+            this.sc_stepname.HeaderText = "工序";
+            this.sc_stepname.Name = "sc_stepname";
+            this.sc_stepname.ReadOnly = true;
+            // 
+            // cl_operate
+            // 
+            this.cl_operate.DataPropertyName = "cl_operate";
+            this.cl_operate.HeaderText = "操作";
+            this.cl_operate.Name = "cl_operate";
+            this.cl_operate.Width = 70;
+            // 
+            // cl_result
+            // 
+            this.cl_result.DataPropertyName = "cl_result";
+            this.cl_result.HeaderText = "操作结果";
+            this.cl_result.Name = "cl_result";
+            this.cl_result.ReadOnly = true;
+            this.cl_result.Width = 150;
+            // 
+            // cl_date
+            // 
+            this.cl_date.DataPropertyName = "cl_date";
+            this.cl_date.HeaderText = "日期";
+            this.cl_date.Name = "cl_date";
+            this.cl_date.ReadOnly = true;
+            // 
+            // cl_man
+            // 
+            this.cl_man.DataPropertyName = "cl_man";
+            this.cl_man.HeaderText = "操作人";
+            this.cl_man.Name = "cl_man";
+            this.cl_man.Width = 70;
+            // 
+            // Sp
+            // 
+            this.Sp.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Sp.HeaderText = " ";
+            this.Sp.MinimumWidth = 2;
+            this.Sp.Name = "Sp";
+            this.Sp.Width = 2;
+            // 
+            // Query_Commandlog
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(700, 499);
+            this.Controls.Add(this.Search);
+            this.Controls.Add(this.pallecode);
+            this.Controls.Add(this.InOutDetailDGV);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Query_Commandlog";
+            this.Tag = "Query!Commandlog";
+            this.Text = "操作日志查询";
+            this.Load += new System.EventHandler(this.Warehouse_ProductMakeIn_Load);
+            this.SizeChanged += new System.EventHandler(this.Warehouse_ProductMakeIn_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.InOutDetailDGV)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private CustomControl.DataGrid_View.DataGridViewWithSerialNum InOutDetailDGV;
+        private System.Windows.Forms.BindingSource bindingSource1;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder pallecode;
+        private System.Windows.Forms.Button Search;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cl_sncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cl_linecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cl_makecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn sc_stepname;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cl_operate;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cl_result;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cl_date;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cl_man;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Sp;
+    }
+}

+ 84 - 0
UAS_MES_JH/FunctionCode/Query/Query_Commandlog.cs

@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Query
+{
+    public partial class Query_Commandlog : Form
+    {
+
+        DataTable dbfind;
+
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        DataTable dt;
+
+        DataHelper dh;
+
+        DataTable dta;
+
+        DataTable dtpi;
+
+        DataTable dtform;
+
+        DataTable dtms;
+
+        int getcount;
+
+        public Query_Commandlog()
+        {
+            InitializeComponent();
+        }
+
+        private void Warehouse_ProductMakeIn_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            getcount = 0;
+            dh = SystemInf.dh;
+            pallecode.Focus();
+        }
+
+        private void Warehouse_ProductMakeIn_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void Search_Click(object sender, EventArgs e)
+        {
+            if (pallecode.Text!="")
+            {
+                sql.Clear();
+                sql.Append("  select cl_linecode,cl_sncode,cl_makecode,cl_operate,cl_result,cl_date,sc_stepname,cl_man from commandlog ");
+                sql.Append("  left join source on cl_sourcecode = sc_code where cl_sncode = '"+pallecode.Text+"' or cl_result like '%"+pallecode.Text+"%' order by cl_id asc  ");
+                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                BaseUtil.FillDgvWithDataTable(InOutDetailDGV, dt);
+            }
+            else {
+                MessageBox.Show("不可录入为空");
+            }
+
+        }
+        private void pallecode_KeyDown(object sender, KeyEventArgs e)
+        {
+        
+        }
+
+        private void pallecode_UserControlOnKeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                Search_Click(this, new EventArgs());
+            }
+        }
+    }
+}

+ 150 - 0
UAS_MES_JH/FunctionCode/Query/Query_Commandlog.resx

@@ -0,0 +1,150 @@
+<?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="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="cl_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cl_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cl_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="sc_stepname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cl_operate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cl_result.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cl_date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cl_man.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Sp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>

+ 213 - 66
UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.Designer.cs

@@ -30,6 +30,23 @@
         {
             this.sn_code_label = new System.Windows.Forms.Label();
             this.SerialPanel = new System.Windows.Forms.Panel();
+            this.ma_code_label = new System.Windows.Forms.Label();
+            this.ma_code = new System.Windows.Forms.TextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.pallet = new System.Windows.Forms.TextBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.ms_outboxcode = new System.Windows.Forms.TextBox();
+            this.ms_checkno = new System.Windows.Forms.TextBox();
+            this.label7 = new System.Windows.Forms.Label();
+            this.CraftmaterialData = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.CraftInfDgv = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
             this.mp_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mp_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -51,12 +68,9 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
-            this.ma_code_label = new System.Windows.Forms.Label();
-            this.ma_code = new System.Windows.Forms.TextBox();
-            this.label5 = new System.Windows.Forms.Label();
-            this.ms_checkno = new System.Windows.Forms.TextBox();
-            this.label6 = new System.Windows.Forms.Label();
-            this.ms_outboxcode = new System.Windows.Forms.TextBox();
+            this.label8 = new System.Windows.Forms.Label();
+            this.ma_colorcode = new System.Windows.Forms.TextBox();
+            ((System.ComponentModel.ISupportInitialize)(this.CraftmaterialData)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
@@ -69,7 +83,7 @@
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(10, 13);
+            this.sn_code_label.Location = new System.Drawing.Point(12, 8);
             this.sn_code_label.Name = "sn_code_label";
             this.sn_code_label.Size = new System.Drawing.Size(58, 21);
             this.sn_code_label.TabIndex = 183;
@@ -84,11 +98,161 @@
             this.SerialPanel.Location = new System.Drawing.Point(14, 106);
             this.SerialPanel.Margin = new System.Windows.Forms.Padding(2);
             this.SerialPanel.Name = "SerialPanel";
-            this.SerialPanel.Size = new System.Drawing.Size(950, 254);
+            this.SerialPanel.Size = new System.Drawing.Size(947, 179);
             this.SerialPanel.TabIndex = 194;
             this.SerialPanel.Scroll += new System.Windows.Forms.ScrollEventHandler(this.SerialPanel_Scroll);
             this.SerialPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.SerialPanel_Paint);
             // 
+            // ma_code_label
+            // 
+            this.ma_code_label.AutoSize = true;
+            this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_code_label.Location = new System.Drawing.Point(242, 8);
+            this.ma_code_label.Name = "ma_code_label";
+            this.ma_code_label.Size = new System.Drawing.Size(58, 21);
+            this.ma_code_label.TabIndex = 195;
+            this.ma_code_label.Text = "工单号";
+            // 
+            // ma_code
+            // 
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_code.Location = new System.Drawing.Point(306, 5);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Size = new System.Drawing.Size(133, 29);
+            this.ma_code.TabIndex = 196;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label5.Location = new System.Drawing.Point(658, 8);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(58, 21);
+            this.label5.TabIndex = 197;
+            this.label5.Text = "栈板号";
+            // 
+            // pallet
+            // 
+            this.pallet.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pallet.Location = new System.Drawing.Point(712, 5);
+            this.pallet.Name = "pallet";
+            this.pallet.Size = new System.Drawing.Size(127, 29);
+            this.pallet.TabIndex = 198;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label6.Location = new System.Drawing.Point(440, 8);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(74, 21);
+            this.label6.TabIndex = 199;
+            this.label6.Text = "卡通箱号";
+            // 
+            // ms_outboxcode
+            // 
+            this.ms_outboxcode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ms_outboxcode.Location = new System.Drawing.Point(511, 5);
+            this.ms_outboxcode.Name = "ms_outboxcode";
+            this.ms_outboxcode.Size = new System.Drawing.Size(138, 29);
+            this.ms_outboxcode.TabIndex = 200;
+            // 
+            // ms_checkno
+            // 
+            this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ms_checkno.Location = new System.Drawing.Point(92, 36);
+            this.ms_checkno.Name = "ms_checkno";
+            this.ms_checkno.Size = new System.Drawing.Size(145, 29);
+            this.ms_checkno.TabIndex = 203;
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label7.Location = new System.Drawing.Point(12, 39);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(74, 21);
+            this.label7.TabIndex = 202;
+            this.label7.Text = "抽检批号";
+            // 
+            // CraftmaterialData
+            // 
+            this.CraftmaterialData.AllowUserToAddRows = false;
+            this.CraftmaterialData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+            this.CraftmaterialData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.CraftmaterialData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.dataGridViewTextBoxColumn1,
+            this.dataGridViewTextBoxColumn2,
+            this.dataGridViewTextBoxColumn3,
+            this.dataGridViewTextBoxColumn4,
+            this.dataGridViewTextBoxColumn5,
+            this.dataGridViewTextBoxColumn6,
+            this.dataGridViewTextBoxColumn7,
+            this.dataGridViewTextBoxColumn8});
+            this.CraftmaterialData.EnableContentClick = true;
+            this.CraftmaterialData.Location = new System.Drawing.Point(14, 289);
+            this.CraftmaterialData.Margin = new System.Windows.Forms.Padding(2);
+            this.CraftmaterialData.Name = "CraftmaterialData";
+            this.CraftmaterialData.RowTemplate.Height = 27;
+            this.CraftmaterialData.Size = new System.Drawing.Size(948, 160);
+            this.CraftmaterialData.TabIndex = 201;
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn1.HeaderText = "工单号";
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "cm_soncode";
+            this.dataGridViewTextBoxColumn2.HeaderText = "子件编号";
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "pr_detail";
+            this.dataGridViewTextBoxColumn3.HeaderText = "子件名称";
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "cm_barcode";
+            this.dataGridViewTextBoxColumn4.HeaderText = "料号";
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn5
+            // 
+            this.dataGridViewTextBoxColumn5.DataPropertyName = "cm_stepcode";
+            this.dataGridViewTextBoxColumn5.HeaderText = "工序编号";
+            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.Width = 130;
+            // 
+            // dataGridViewTextBoxColumn6
+            // 
+            this.dataGridViewTextBoxColumn6.DataPropertyName = "cm_stepname";
+            this.dataGridViewTextBoxColumn6.HeaderText = "工序名称";
+            this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn7
+            // 
+            this.dataGridViewTextBoxColumn7.DataPropertyName = "cm_status";
+            this.dataGridViewTextBoxColumn7.HeaderText = "上料状态";
+            this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
+            this.dataGridViewTextBoxColumn7.Width = 120;
+            // 
+            // dataGridViewTextBoxColumn8
+            // 
+            this.dataGridViewTextBoxColumn8.DataPropertyName = "cm_indate";
+            this.dataGridViewTextBoxColumn8.HeaderText = "上料时间";
+            this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
+            this.dataGridViewTextBoxColumn8.Width = 120;
+            // 
             // CraftInfDgv
             // 
             this.CraftInfDgv.AllowUserToAddRows = false;
@@ -106,11 +270,11 @@
             this.mp_inman,
             this.em_name});
             this.CraftInfDgv.EnableContentClick = true;
-            this.CraftInfDgv.Location = new System.Drawing.Point(0, 388);
+            this.CraftInfDgv.Location = new System.Drawing.Point(11, 454);
             this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(2);
             this.CraftInfDgv.Name = "CraftInfDgv";
             this.CraftInfDgv.RowTemplate.Height = 27;
-            this.CraftInfDgv.Size = new System.Drawing.Size(975, 190);
+            this.CraftInfDgv.Size = new System.Drawing.Size(957, 162);
             this.CraftInfDgv.TabIndex = 193;
             // 
             // mp_sncode
@@ -195,11 +359,11 @@
             this.groupBoxWithBorder1.Controls.Add(this.label2);
             this.groupBoxWithBorder1.Controls.Add(this.label3);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(12, 40);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(12, 63);
             this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
             this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(953, 40);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(950, 40);
             this.groupBoxWithBorder1.TabIndex = 192;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "颜色说明";
@@ -290,7 +454,7 @@
             this.sn_code.AllPower = null;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(92, 14);
+            this.sn_code.Location = new System.Drawing.Point(90, 10);
             this.sn_code.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
@@ -302,68 +466,37 @@
             this.sn_code.Tag = "NoAuto";
             this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
-            // ma_code_label
-            // 
-            this.ma_code_label.AutoSize = true;
-            this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(257, 12);
-            this.ma_code_label.Name = "ma_code_label";
-            this.ma_code_label.Size = new System.Drawing.Size(58, 21);
-            this.ma_code_label.TabIndex = 195;
-            this.ma_code_label.Text = "工单号";
-            // 
-            // ma_code
+            // label8
             // 
-            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code.Location = new System.Drawing.Point(321, 13);
-            this.ma_code.Name = "ma_code";
-            this.ma_code.Size = new System.Drawing.Size(133, 29);
-            this.ma_code.TabIndex = 196;
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(243, 40);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(58, 21);
+            this.label8.TabIndex = 204;
+            this.label8.Text = "颜色号";
             // 
-            // label5
+            // ma_colorcode
             // 
-            this.label5.AutoSize = true;
-            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label5.Location = new System.Drawing.Point(472, 13);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(74, 21);
-            this.label5.TabIndex = 197;
-            this.label5.Text = "抽检批号";
-            // 
-            // ms_checkno
-            // 
-            this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ms_checkno.Location = new System.Drawing.Point(544, 13);
-            this.ms_checkno.Name = "ms_checkno";
-            this.ms_checkno.Size = new System.Drawing.Size(117, 29);
-            this.ms_checkno.TabIndex = 198;
-            // 
-            // label6
-            // 
-            this.label6.AutoSize = true;
-            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label6.Location = new System.Drawing.Point(667, 14);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(74, 21);
-            this.label6.TabIndex = 199;
-            this.label6.Text = "卡通箱号";
-            // 
-            // ms_outboxcode
-            // 
-            this.ms_outboxcode.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ms_outboxcode.Location = new System.Drawing.Point(757, 15);
-            this.ms_outboxcode.Name = "ms_outboxcode";
-            this.ms_outboxcode.Size = new System.Drawing.Size(138, 29);
-            this.ms_outboxcode.TabIndex = 200;
+            this.ma_colorcode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ma_colorcode.Location = new System.Drawing.Point(306, 39);
+            this.ma_colorcode.Name = "ma_colorcode";
+            this.ma_colorcode.Size = new System.Drawing.Size(138, 29);
+            this.ma_colorcode.TabIndex = 205;
             // 
             // Query_ExeProgress
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(975, 578);
+            this.ClientSize = new System.Drawing.Size(972, 621);
+            this.Controls.Add(this.ma_colorcode);
+            this.Controls.Add(this.label8);
+            this.Controls.Add(this.ms_checkno);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.CraftmaterialData);
             this.Controls.Add(this.ms_outboxcode);
             this.Controls.Add(this.label6);
-            this.Controls.Add(this.ms_checkno);
+            this.Controls.Add(this.pallet);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.ma_code_label);
@@ -379,6 +512,7 @@
             this.Text = "工单执行进度";
             this.Load += new System.EventHandler(this.Query_ExeProgress_Load);
             this.SizeChanged += new System.EventHandler(this.Query_ExeProgress_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.CraftmaterialData)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).EndInit();
             this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
@@ -408,7 +542,7 @@
         private System.Windows.Forms.Label ma_code_label;
         private System.Windows.Forms.TextBox ma_code;
         private System.Windows.Forms.Label label5;
-        private System.Windows.Forms.TextBox ms_checkno;
+        private System.Windows.Forms.TextBox pallet;
         private System.Windows.Forms.Label label6;
         private System.Windows.Forms.TextBox ms_outboxcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_sncode;
@@ -421,5 +555,18 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn sc_linecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_inman;
         private System.Windows.Forms.DataGridViewTextBoxColumn em_name;
+        private CustomControl.DataGrid_View.DataGridViewWithSerialNum CraftmaterialData;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
+        private System.Windows.Forms.TextBox ms_checkno;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.TextBox ma_colorcode;
     }
 }

+ 11 - 3
UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.cs

@@ -56,7 +56,7 @@ namespace UAS_MES_NEW.Query
 
         private void Query_ExeProgress_SizeChanged(object sender, EventArgs e)
         {
-            asc.controlAutoSize(this);
+           // asc.controlAutoSize(this);
         }
 
         private void sn_code_KeyDown(object sender, KeyEventArgs e)
@@ -67,12 +67,12 @@ namespace UAS_MES_NEW.Query
                 if (ms_id.Rows.Count > 0)
                 {
                     //说明有过转号
-                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_checkno,ms_outboxcode from makeserial where ms_sncode='" + ms_id.Rows[0]["beforesn"].ToString() + "' or ms_sncode='" + ms_id.Rows[0]["sn"].ToString() + "' order by ms_id", "select");
+                    ms_id = (DataTable)dh.ExecuteSql("select ms_colorcode,ms_id,ms_makecode,ms_checkno,ms_outboxcode from makeserial where ms_sncode='" + ms_id.Rows[0]["beforesn"].ToString() + "' or ms_sncode='" + ms_id.Rows[0]["sn"].ToString() + "' order by ms_id", "select");
                 }
                 else
                 {
                     //没有过转号
-                    ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_checkno,ms_outboxcode from makeserial where ms_sncode='" + sn_code.Text + "' order by ms_id", "select");
+                    ms_id = (DataTable)dh.ExecuteSql("select ms_colorcode,ms_id,ms_makecode,ms_checkno,ms_outboxcode from makeserial where ms_sncode='" + sn_code.Text + "' order by ms_id", "select");
                 }
                 if (ms_id.Rows.Count == 0)
                 {
@@ -83,7 +83,9 @@ namespace UAS_MES_NEW.Query
                 StringBuilder ms_ids = new StringBuilder();//存所有的ms_id
                 //设置界面工单号
                 ma_code.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_makecode"].ToString();
+                ma_colorcode.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_colorcode"].ToString();
                 ms_checkno.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_checkno"].ToString();
+                pallet.Text = dh.getFieldDataByCondition("mes_package_view", "v_outboxcode", "v_barcode = '"+sn_code.Text+"' and v_type = 3").ToString();
                 ms_outboxcode.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_outboxcode"].ToString();
                 int idCount = ms_id.Rows.Count;
                 for (int i = 0; i < idCount; i++)
@@ -308,6 +310,12 @@ namespace UAS_MES_NEW.Query
                     sql.Append("mp_sourcecode=sc_code where mp_sncode in (" + mp_sncodes.ToString().Substring(0, mp_sncodes.ToString().Length - 1) + ") and ma_code in (" + makecodes.ToString().Substring(0, makecodes.ToString().Length - 1) + ") order by mp_indate");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     BaseUtil.FillDgvWithDataTable(CraftInfDgv, dt);
+                    sql.Clear();
+                    sql.Append("select cm_makecode,cm_soncode,pr_detail,cm_barcode,cm_stepcode,cm_stepname,cm_status,cm_indate ");
+                    sql.Append("from craftmaterial left join product on pr_code=cm_soncode  ");
+                    sql.Append("left join employee on cm_inman = em_code where cm_sncode IN (" + mp_sncodes.ToString().Substring(0, mp_sncodes.ToString().Length - 1) + " ) order by cm_id asc");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    BaseUtil.FillDgvWithDataTable(CraftmaterialData, dt);
                 }
                 else MessageBox.Show("序列号" + sn_code.Text + "不存在");
             }

+ 24 - 0
UAS_MES_JH/FunctionCode/Query/Query_ExeProgress.resx

@@ -117,6 +117,30 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="dataGridViewTextBoxColumn5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="dataGridViewTextBoxColumn6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="dataGridViewTextBoxColumn7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="dataGridViewTextBoxColumn8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="mp_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 243 - 233
UAS_MES_JH/FunctionCode/Query/Query_MakeInf.Designer.cs

@@ -34,6 +34,30 @@
             this.label17_ll_ = new System.Windows.Forms.Label();
             this.label16_lll_ = new System.Windows.Forms.Label();
             this.Carft = new System.Windows.Forms.DataGridView();
+            this.CD_STEPNO = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CD_STEPNAME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CD_STEPCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CD_NEXTSTEPNAME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CD_NEXTSTEPCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CD_IFINPUT = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFOUTPUT = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFTEST = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFBURNIN = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFWEIGH = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFSNCHANGE = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFOQC = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFPACK = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFREPAIR = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFOUTLINE = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFSMTINOUT = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFSPC = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFREDUCE = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFMIDFINISH = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFMIDINPUT = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_FIRSTSTEP = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_IFOFFLINE = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.CD_DETNO = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CD_TABLE = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -62,30 +86,6 @@
             this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.CD_STEPNO = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.CD_STEPNAME = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.CD_STEPCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.CD_NEXTSTEPNAME = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.CD_NEXTSTEPCODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.CD_IFINPUT = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFOUTPUT = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFTEST = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFBURNIN = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFWEIGH = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFSNCHANGE = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFOQC = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFPACK = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFREPAIR = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFOUTLINE = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFSMTINOUT = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFSPC = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFREDUCE = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFMIDFINISH = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFMIDINPUT = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_FIRSTSTEP = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_IFOFFLINE = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.CD_DETNO = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.CD_TABLE = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Product = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.sn_relation = new System.Windows.Forms.Label();
             this.sn_relation_label = new System.Windows.Forms.Label();
@@ -145,6 +145,7 @@
             this.mcd_stepcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mcd_stepname = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.n = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bn = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mcd_outqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.BOM)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Carft)).BeginInit();
@@ -172,6 +173,7 @@
             this.mcd_stepcode,
             this.mcd_stepname,
             this.n,
+            this.bn,
             this.mcd_outqty});
             this.BOM.Location = new System.Drawing.Point(31, 467);
             this.BOM.Margin = new System.Windows.Forms.Padding(2);
@@ -242,6 +244,215 @@
             this.Carft.Size = new System.Drawing.Size(886, 222);
             this.Carft.TabIndex = 20;
             // 
+            // CD_STEPNO
+            // 
+            this.CD_STEPNO.DataPropertyName = "CD_STEPNO";
+            this.CD_STEPNO.HeaderText = "执行顺序";
+            this.CD_STEPNO.Name = "CD_STEPNO";
+            this.CD_STEPNO.ReadOnly = true;
+            // 
+            // CD_STEPNAME
+            // 
+            this.CD_STEPNAME.DataPropertyName = "CD_STEPNAME";
+            this.CD_STEPNAME.HeaderText = "工序名称";
+            this.CD_STEPNAME.Name = "CD_STEPNAME";
+            this.CD_STEPNAME.ReadOnly = true;
+            // 
+            // CD_STEPCODE
+            // 
+            this.CD_STEPCODE.DataPropertyName = "CD_STEPCODE";
+            this.CD_STEPCODE.HeaderText = "工序编号";
+            this.CD_STEPCODE.Name = "CD_STEPCODE";
+            this.CD_STEPCODE.ReadOnly = true;
+            // 
+            // CD_NEXTSTEPNAME
+            // 
+            this.CD_NEXTSTEPNAME.DataPropertyName = "CD_NEXTSTEPNAME";
+            this.CD_NEXTSTEPNAME.HeaderText = "下一工序名称";
+            this.CD_NEXTSTEPNAME.Name = "CD_NEXTSTEPNAME";
+            this.CD_NEXTSTEPNAME.ReadOnly = true;
+            this.CD_NEXTSTEPNAME.Width = 150;
+            // 
+            // CD_NEXTSTEPCODE
+            // 
+            this.CD_NEXTSTEPCODE.DataPropertyName = "CD_NEXTSTEPCODE";
+            this.CD_NEXTSTEPCODE.HeaderText = "下一工序编号";
+            this.CD_NEXTSTEPCODE.Name = "CD_NEXTSTEPCODE";
+            this.CD_NEXTSTEPCODE.ReadOnly = true;
+            this.CD_NEXTSTEPCODE.Width = 150;
+            // 
+            // CD_IFINPUT
+            // 
+            this.CD_IFINPUT.DataPropertyName = "CD_IFINPUT";
+            this.CD_IFINPUT.HeaderText = "上料工序";
+            this.CD_IFINPUT.Name = "CD_IFINPUT";
+            this.CD_IFINPUT.ReadOnly = true;
+            this.CD_IFINPUT.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFINPUT.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_IFOUTPUT
+            // 
+            this.CD_IFOUTPUT.DataPropertyName = "CD_IFOUTPUT";
+            this.CD_IFOUTPUT.HeaderText = "下料工序";
+            this.CD_IFOUTPUT.Name = "CD_IFOUTPUT";
+            this.CD_IFOUTPUT.ReadOnly = true;
+            this.CD_IFOUTPUT.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFOUTPUT.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_IFTEST
+            // 
+            this.CD_IFTEST.DataPropertyName = "CD_IFTEST";
+            this.CD_IFTEST.HeaderText = "测试工序";
+            this.CD_IFTEST.Name = "CD_IFTEST";
+            this.CD_IFTEST.ReadOnly = true;
+            this.CD_IFTEST.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFTEST.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_IFBURNIN
+            // 
+            this.CD_IFBURNIN.DataPropertyName = "CD_IFBURNIN";
+            this.CD_IFBURNIN.HeaderText = "老化工序";
+            this.CD_IFBURNIN.Name = "CD_IFBURNIN";
+            this.CD_IFBURNIN.ReadOnly = true;
+            this.CD_IFBURNIN.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFBURNIN.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_IFWEIGH
+            // 
+            this.CD_IFWEIGH.DataPropertyName = "CD_IFWEIGH";
+            this.CD_IFWEIGH.HeaderText = "是否称重";
+            this.CD_IFWEIGH.Name = "CD_IFWEIGH";
+            this.CD_IFWEIGH.ReadOnly = true;
+            this.CD_IFWEIGH.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFWEIGH.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_IFSNCHANGE
+            // 
+            this.CD_IFSNCHANGE.DataPropertyName = "CD_IFSNCHANGE";
+            this.CD_IFSNCHANGE.HeaderText = "序号转换工序";
+            this.CD_IFSNCHANGE.Name = "CD_IFSNCHANGE";
+            this.CD_IFSNCHANGE.ReadOnly = true;
+            this.CD_IFSNCHANGE.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFSNCHANGE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.CD_IFSNCHANGE.Width = 150;
+            // 
+            // CD_IFOQC
+            // 
+            this.CD_IFOQC.DataPropertyName = "CD_IFOQC";
+            this.CD_IFOQC.HeaderText = "OQC工序";
+            this.CD_IFOQC.Name = "CD_IFOQC";
+            this.CD_IFOQC.ReadOnly = true;
+            this.CD_IFOQC.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFOQC.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_IFPACK
+            // 
+            this.CD_IFPACK.DataPropertyName = "CD_IFPACK";
+            this.CD_IFPACK.HeaderText = "包装工序";
+            this.CD_IFPACK.Name = "CD_IFPACK";
+            this.CD_IFPACK.ReadOnly = true;
+            this.CD_IFPACK.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFPACK.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_IFREPAIR
+            // 
+            this.CD_IFREPAIR.DataPropertyName = "CD_IFREPAIR";
+            this.CD_IFREPAIR.HeaderText = "维修工序";
+            this.CD_IFREPAIR.Name = "CD_IFREPAIR";
+            this.CD_IFREPAIR.ReadOnly = true;
+            this.CD_IFREPAIR.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFREPAIR.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_IFOUTLINE
+            // 
+            this.CD_IFOUTLINE.DataPropertyName = "CD_IFOUTLINE";
+            this.CD_IFOUTLINE.HeaderText = "线外工序";
+            this.CD_IFOUTLINE.Name = "CD_IFOUTLINE";
+            this.CD_IFOUTLINE.ReadOnly = true;
+            this.CD_IFOUTLINE.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFOUTLINE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_IFSMTINOUT
+            // 
+            this.CD_IFSMTINOUT.DataPropertyName = "CD_IFSMTINOUT";
+            this.CD_IFSMTINOUT.HeaderText = "SMT防呆工序";
+            this.CD_IFSMTINOUT.Name = "CD_IFSMTINOUT";
+            this.CD_IFSMTINOUT.ReadOnly = true;
+            this.CD_IFSMTINOUT.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFSMTINOUT.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.CD_IFSMTINOUT.Width = 150;
+            // 
+            // CD_IFSPC
+            // 
+            this.CD_IFSPC.DataPropertyName = "CD_IFSPC";
+            this.CD_IFSPC.HeaderText = "SPC工序";
+            this.CD_IFSPC.Name = "CD_IFSPC";
+            this.CD_IFSPC.ReadOnly = true;
+            this.CD_IFSPC.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFSPC.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_IFREDUCE
+            // 
+            this.CD_IFREDUCE.DataPropertyName = "CD_IFREDUCE";
+            this.CD_IFREDUCE.HeaderText = "扣料工序";
+            this.CD_IFREDUCE.Name = "CD_IFREDUCE";
+            this.CD_IFREDUCE.ReadOnly = true;
+            this.CD_IFREDUCE.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFREDUCE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_IFMIDFINISH
+            // 
+            this.CD_IFMIDFINISH.DataPropertyName = "CD_IFMIDFINISH";
+            this.CD_IFMIDFINISH.HeaderText = "中间产量工序";
+            this.CD_IFMIDFINISH.Name = "CD_IFMIDFINISH";
+            this.CD_IFMIDFINISH.ReadOnly = true;
+            this.CD_IFMIDFINISH.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFMIDFINISH.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.CD_IFMIDFINISH.Width = 150;
+            // 
+            // CD_IFMIDINPUT
+            // 
+            this.CD_IFMIDINPUT.DataPropertyName = "CD_IFMIDINPUT";
+            this.CD_IFMIDINPUT.HeaderText = "中间投入工序";
+            this.CD_IFMIDINPUT.Name = "CD_IFMIDINPUT";
+            this.CD_IFMIDINPUT.ReadOnly = true;
+            this.CD_IFMIDINPUT.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFMIDINPUT.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.CD_IFMIDINPUT.Width = 150;
+            // 
+            // CD_FIRSTSTEP
+            // 
+            this.CD_FIRSTSTEP.DataPropertyName = "CD_FIRSTSTEP";
+            this.CD_FIRSTSTEP.HeaderText = "是否第一道工序";
+            this.CD_FIRSTSTEP.Name = "CD_FIRSTSTEP";
+            this.CD_FIRSTSTEP.ReadOnly = true;
+            this.CD_FIRSTSTEP.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_FIRSTSTEP.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.CD_FIRSTSTEP.Width = 150;
+            // 
+            // CD_IFOFFLINE
+            // 
+            this.CD_IFOFFLINE.DataPropertyName = "CD_IFOFFLINE";
+            this.CD_IFOFFLINE.HeaderText = "下线工序";
+            this.CD_IFOFFLINE.Name = "CD_IFOFFLINE";
+            this.CD_IFOFFLINE.ReadOnly = true;
+            this.CD_IFOFFLINE.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.CD_IFOFFLINE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // CD_DETNO
+            // 
+            this.CD_DETNO.DataPropertyName = "CD_DETNO";
+            this.CD_DETNO.HeaderText = "序号";
+            this.CD_DETNO.Name = "CD_DETNO";
+            this.CD_DETNO.ReadOnly = true;
+            // 
+            // CD_TABLE
+            // 
+            this.CD_TABLE.DataPropertyName = "CD_TABLE";
+            this.CD_TABLE.HeaderText = "板面";
+            this.CD_TABLE.Name = "CD_TABLE";
+            this.CD_TABLE.ReadOnly = true;
+            // 
             // dataGridViewTextBoxColumn1
             // 
             this.dataGridViewTextBoxColumn1.DataPropertyName = "CD_STEPNO";
@@ -486,215 +697,6 @@
             this.dataGridViewTextBoxColumn11.ReadOnly = true;
             this.dataGridViewTextBoxColumn11.Width = 150;
             // 
-            // CD_STEPNO
-            // 
-            this.CD_STEPNO.DataPropertyName = "CD_STEPNO";
-            this.CD_STEPNO.HeaderText = "执行顺序";
-            this.CD_STEPNO.Name = "CD_STEPNO";
-            this.CD_STEPNO.ReadOnly = true;
-            // 
-            // CD_STEPNAME
-            // 
-            this.CD_STEPNAME.DataPropertyName = "CD_STEPNAME";
-            this.CD_STEPNAME.HeaderText = "工序名称";
-            this.CD_STEPNAME.Name = "CD_STEPNAME";
-            this.CD_STEPNAME.ReadOnly = true;
-            // 
-            // CD_STEPCODE
-            // 
-            this.CD_STEPCODE.DataPropertyName = "CD_STEPCODE";
-            this.CD_STEPCODE.HeaderText = "工序编号";
-            this.CD_STEPCODE.Name = "CD_STEPCODE";
-            this.CD_STEPCODE.ReadOnly = true;
-            // 
-            // CD_NEXTSTEPNAME
-            // 
-            this.CD_NEXTSTEPNAME.DataPropertyName = "CD_NEXTSTEPNAME";
-            this.CD_NEXTSTEPNAME.HeaderText = "下一工序名称";
-            this.CD_NEXTSTEPNAME.Name = "CD_NEXTSTEPNAME";
-            this.CD_NEXTSTEPNAME.ReadOnly = true;
-            this.CD_NEXTSTEPNAME.Width = 150;
-            // 
-            // CD_NEXTSTEPCODE
-            // 
-            this.CD_NEXTSTEPCODE.DataPropertyName = "CD_NEXTSTEPCODE";
-            this.CD_NEXTSTEPCODE.HeaderText = "下一工序编号";
-            this.CD_NEXTSTEPCODE.Name = "CD_NEXTSTEPCODE";
-            this.CD_NEXTSTEPCODE.ReadOnly = true;
-            this.CD_NEXTSTEPCODE.Width = 150;
-            // 
-            // CD_IFINPUT
-            // 
-            this.CD_IFINPUT.DataPropertyName = "CD_IFINPUT";
-            this.CD_IFINPUT.HeaderText = "上料工序";
-            this.CD_IFINPUT.Name = "CD_IFINPUT";
-            this.CD_IFINPUT.ReadOnly = true;
-            this.CD_IFINPUT.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFINPUT.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_IFOUTPUT
-            // 
-            this.CD_IFOUTPUT.DataPropertyName = "CD_IFOUTPUT";
-            this.CD_IFOUTPUT.HeaderText = "下料工序";
-            this.CD_IFOUTPUT.Name = "CD_IFOUTPUT";
-            this.CD_IFOUTPUT.ReadOnly = true;
-            this.CD_IFOUTPUT.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFOUTPUT.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_IFTEST
-            // 
-            this.CD_IFTEST.DataPropertyName = "CD_IFTEST";
-            this.CD_IFTEST.HeaderText = "测试工序";
-            this.CD_IFTEST.Name = "CD_IFTEST";
-            this.CD_IFTEST.ReadOnly = true;
-            this.CD_IFTEST.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFTEST.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_IFBURNIN
-            // 
-            this.CD_IFBURNIN.DataPropertyName = "CD_IFBURNIN";
-            this.CD_IFBURNIN.HeaderText = "老化工序";
-            this.CD_IFBURNIN.Name = "CD_IFBURNIN";
-            this.CD_IFBURNIN.ReadOnly = true;
-            this.CD_IFBURNIN.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFBURNIN.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_IFWEIGH
-            // 
-            this.CD_IFWEIGH.DataPropertyName = "CD_IFWEIGH";
-            this.CD_IFWEIGH.HeaderText = "是否称重";
-            this.CD_IFWEIGH.Name = "CD_IFWEIGH";
-            this.CD_IFWEIGH.ReadOnly = true;
-            this.CD_IFWEIGH.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFWEIGH.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_IFSNCHANGE
-            // 
-            this.CD_IFSNCHANGE.DataPropertyName = "CD_IFSNCHANGE";
-            this.CD_IFSNCHANGE.HeaderText = "序号转换工序";
-            this.CD_IFSNCHANGE.Name = "CD_IFSNCHANGE";
-            this.CD_IFSNCHANGE.ReadOnly = true;
-            this.CD_IFSNCHANGE.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFSNCHANGE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.CD_IFSNCHANGE.Width = 150;
-            // 
-            // CD_IFOQC
-            // 
-            this.CD_IFOQC.DataPropertyName = "CD_IFOQC";
-            this.CD_IFOQC.HeaderText = "OQC工序";
-            this.CD_IFOQC.Name = "CD_IFOQC";
-            this.CD_IFOQC.ReadOnly = true;
-            this.CD_IFOQC.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFOQC.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_IFPACK
-            // 
-            this.CD_IFPACK.DataPropertyName = "CD_IFPACK";
-            this.CD_IFPACK.HeaderText = "包装工序";
-            this.CD_IFPACK.Name = "CD_IFPACK";
-            this.CD_IFPACK.ReadOnly = true;
-            this.CD_IFPACK.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFPACK.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_IFREPAIR
-            // 
-            this.CD_IFREPAIR.DataPropertyName = "CD_IFREPAIR";
-            this.CD_IFREPAIR.HeaderText = "维修工序";
-            this.CD_IFREPAIR.Name = "CD_IFREPAIR";
-            this.CD_IFREPAIR.ReadOnly = true;
-            this.CD_IFREPAIR.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFREPAIR.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_IFOUTLINE
-            // 
-            this.CD_IFOUTLINE.DataPropertyName = "CD_IFOUTLINE";
-            this.CD_IFOUTLINE.HeaderText = "线外工序";
-            this.CD_IFOUTLINE.Name = "CD_IFOUTLINE";
-            this.CD_IFOUTLINE.ReadOnly = true;
-            this.CD_IFOUTLINE.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFOUTLINE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_IFSMTINOUT
-            // 
-            this.CD_IFSMTINOUT.DataPropertyName = "CD_IFSMTINOUT";
-            this.CD_IFSMTINOUT.HeaderText = "SMT防呆工序";
-            this.CD_IFSMTINOUT.Name = "CD_IFSMTINOUT";
-            this.CD_IFSMTINOUT.ReadOnly = true;
-            this.CD_IFSMTINOUT.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFSMTINOUT.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.CD_IFSMTINOUT.Width = 150;
-            // 
-            // CD_IFSPC
-            // 
-            this.CD_IFSPC.DataPropertyName = "CD_IFSPC";
-            this.CD_IFSPC.HeaderText = "SPC工序";
-            this.CD_IFSPC.Name = "CD_IFSPC";
-            this.CD_IFSPC.ReadOnly = true;
-            this.CD_IFSPC.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFSPC.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_IFREDUCE
-            // 
-            this.CD_IFREDUCE.DataPropertyName = "CD_IFREDUCE";
-            this.CD_IFREDUCE.HeaderText = "扣料工序";
-            this.CD_IFREDUCE.Name = "CD_IFREDUCE";
-            this.CD_IFREDUCE.ReadOnly = true;
-            this.CD_IFREDUCE.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFREDUCE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_IFMIDFINISH
-            // 
-            this.CD_IFMIDFINISH.DataPropertyName = "CD_IFMIDFINISH";
-            this.CD_IFMIDFINISH.HeaderText = "中间产量工序";
-            this.CD_IFMIDFINISH.Name = "CD_IFMIDFINISH";
-            this.CD_IFMIDFINISH.ReadOnly = true;
-            this.CD_IFMIDFINISH.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFMIDFINISH.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.CD_IFMIDFINISH.Width = 150;
-            // 
-            // CD_IFMIDINPUT
-            // 
-            this.CD_IFMIDINPUT.DataPropertyName = "CD_IFMIDINPUT";
-            this.CD_IFMIDINPUT.HeaderText = "中间投入工序";
-            this.CD_IFMIDINPUT.Name = "CD_IFMIDINPUT";
-            this.CD_IFMIDINPUT.ReadOnly = true;
-            this.CD_IFMIDINPUT.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFMIDINPUT.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.CD_IFMIDINPUT.Width = 150;
-            // 
-            // CD_FIRSTSTEP
-            // 
-            this.CD_FIRSTSTEP.DataPropertyName = "CD_FIRSTSTEP";
-            this.CD_FIRSTSTEP.HeaderText = "是否第一道工序";
-            this.CD_FIRSTSTEP.Name = "CD_FIRSTSTEP";
-            this.CD_FIRSTSTEP.ReadOnly = true;
-            this.CD_FIRSTSTEP.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_FIRSTSTEP.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.CD_FIRSTSTEP.Width = 150;
-            // 
-            // CD_IFOFFLINE
-            // 
-            this.CD_IFOFFLINE.DataPropertyName = "CD_IFOFFLINE";
-            this.CD_IFOFFLINE.HeaderText = "下线工序";
-            this.CD_IFOFFLINE.Name = "CD_IFOFFLINE";
-            this.CD_IFOFFLINE.ReadOnly = true;
-            this.CD_IFOFFLINE.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.CD_IFOFFLINE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // CD_DETNO
-            // 
-            this.CD_DETNO.DataPropertyName = "CD_DETNO";
-            this.CD_DETNO.HeaderText = "序号";
-            this.CD_DETNO.Name = "CD_DETNO";
-            this.CD_DETNO.ReadOnly = true;
-            // 
-            // CD_TABLE
-            // 
-            this.CD_TABLE.DataPropertyName = "CD_TABLE";
-            this.CD_TABLE.HeaderText = "板面";
-            this.CD_TABLE.Name = "CD_TABLE";
-            this.CD_TABLE.ReadOnly = true;
-            // 
             // Product
             // 
             this.Product.BorderColor = System.Drawing.Color.Black;
@@ -1280,6 +1282,13 @@
             this.n.ReadOnly = true;
             this.n.Width = 150;
             // 
+            // bn
+            // 
+            this.bn.DataPropertyName = "bn";
+            this.bn.HeaderText = "此工位不良数";
+            this.bn.Name = "bn";
+            this.bn.ReadOnly = true;
+            // 
             // mcd_outqty
             // 
             this.mcd_outqty.DataPropertyName = "mcd_outqty";
@@ -1437,6 +1446,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn mcd_stepcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn mcd_stepname;
         private System.Windows.Forms.DataGridViewTextBoxColumn n;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bn;
         private System.Windows.Forms.DataGridViewTextBoxColumn mcd_outqty;
     }
 }

+ 3 - 1
UAS_MES_JH/FunctionCode/Query/Query_MakeInf.cs

@@ -102,7 +102,9 @@ namespace UAS_MES_NEW.Query
                     BaseUtil.SetFormValue(this.Controls, dt);
                 }
                 sql.Clear();
-                sql.Append("select mcd_detno,mcd_stepcode,mcd_stepname,nvl(count(distinct ms_sncode),0) n,mcd_outqty from MAKECRAFTdetail left join makeserial on mcd_macode= ms_makecode and mcd_stepcode = ms_nextstepcode where mcd_macode = '" + MakeCode.Text + "' group by mcd_detno, mcd_stepcode, mcd_stepname,mcd_outqty order by mcd_detno asc");
+                sql.Append("select mcd_detno,mcd_stepcode,mcd_stepname,nvl(count(distinct A.ms_sncode),0) n,nvl(count(distinct B.ms_sncode),0) bn,mcd_outqty from MAKECRAFTdetail ");
+                sql.Append("left join makeserial A on mcd_macode = A.ms_makecode and mcd_stepcode = ");
+                sql.Append("A.ms_nextstepcode AND A.MS_STATUS = 1 LEFT JOIN MAKESERIAL B ON mcd_macode = B.ms_makecode AND MCD_STEPCODE = B.MS_STEPCODE AND B.MS_STATUS = 3 where mcd_macode = '"+ MakeCode.Text + "'  group by mcd_detno, mcd_stepcode, mcd_stepname, mcd_outqty order by mcd_detno asc");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
                 {

+ 3 - 0
UAS_MES_JH/FunctionCode/Query/Query_MakeInf.resx

@@ -129,6 +129,9 @@
   <metadata name="n.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="bn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="mcd_outqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 137 - 121
UAS_MES_JH/FunctionCode/Query/Query_OnlineTraceBack.Designer.cs

@@ -33,22 +33,24 @@
             this.ms_status_label = new System.Windows.Forms.Label();
             this.ms_stepcode_label = new System.Windows.Forms.Label();
             this.ms_nextstepcode_label = new System.Windows.Forms.Label();
+            this.Count_label = new System.Windows.Forms.Label();
+            this.Count = new System.Windows.Forms.Label();
+            this.ma_qty_label = new System.Windows.Forms.Label();
+            this.ma_qty = new System.Windows.Forms.Label();
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.normalButton1 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.ms_nextstepcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ms_stepcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.Query = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ms_status = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.SnInf = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
-            this.ms_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.status = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_stepcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_nextstepcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Count_label = new System.Windows.Forms.Label();
-            this.Count = new System.Windows.Forms.Label();
-            this.ma_qty_label = new System.Windows.Forms.Label();
-            this.ma_qty = new System.Windows.Forms.Label();
+            this.SN = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.状态 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.线别 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.当前工序 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.下一工序 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.当前途程 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.SnInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -56,10 +58,9 @@
             // 
             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(4, 24);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Location = new System.Drawing.Point(-3, 19);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(72, 27);
+            this.ms_makecode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_makecode_label.TabIndex = 198;
             this.ms_makecode_label.Text = "工单号";
             // 
@@ -67,10 +68,9 @@
             // 
             this.ms_status_label.AutoSize = true;
             this.ms_status_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_status_label.Location = new System.Drawing.Point(275, 24);
-            this.ms_status_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_status_label.Location = new System.Drawing.Point(178, 20);
             this.ms_status_label.Name = "ms_status_label";
-            this.ms_status_label.Size = new System.Drawing.Size(80, 27);
+            this.ms_status_label.Size = new System.Drawing.Size(64, 21);
             this.ms_status_label.TabIndex = 197;
             this.ms_status_label.Text = "SN状态";
             // 
@@ -78,10 +78,9 @@
             // 
             this.ms_stepcode_label.AutoSize = true;
             this.ms_stepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_stepcode_label.Location = new System.Drawing.Point(559, 24);
-            this.ms_stepcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_stepcode_label.Location = new System.Drawing.Point(375, 21);
             this.ms_stepcode_label.Name = "ms_stepcode_label";
-            this.ms_stepcode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_stepcode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_stepcode_label.TabIndex = 207;
             this.ms_stepcode_label.Text = "当前工序";
             // 
@@ -89,13 +88,68 @@
             // 
             this.ms_nextstepcode_label.AutoSize = true;
             this.ms_nextstepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_nextstepcode_label.Location = new System.Drawing.Point(854, 24);
-            this.ms_nextstepcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_nextstepcode_label.Location = new System.Drawing.Point(596, 21);
             this.ms_nextstepcode_label.Name = "ms_nextstepcode_label";
-            this.ms_nextstepcode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_nextstepcode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_nextstepcode_label.TabIndex = 209;
             this.ms_nextstepcode_label.Text = "下一工序";
             // 
+            // Count_label
+            // 
+            this.Count_label.AutoSize = true;
+            this.Count_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Count_label.Location = new System.Drawing.Point(206, 531);
+            this.Count_label.Name = "Count_label";
+            this.Count_label.Size = new System.Drawing.Size(106, 21);
+            this.Count_label.TabIndex = 212;
+            this.Count_label.Text = "当前状态总计";
+            // 
+            // Count
+            // 
+            this.Count.AutoSize = true;
+            this.Count.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Count.Location = new System.Drawing.Point(311, 531);
+            this.Count.Name = "Count";
+            this.Count.Size = new System.Drawing.Size(0, 21);
+            this.Count.TabIndex = 213;
+            // 
+            // ma_qty_label
+            // 
+            this.ma_qty_label.AutoSize = true;
+            this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty_label.Location = new System.Drawing.Point(3, 531);
+            this.ma_qty_label.Name = "ma_qty_label";
+            this.ma_qty_label.Size = new System.Drawing.Size(74, 21);
+            this.ma_qty_label.TabIndex = 214;
+            this.ma_qty_label.Text = "工单数量";
+            // 
+            // ma_qty
+            // 
+            this.ma_qty.AutoSize = true;
+            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(78, 531);
+            this.ma_qty.Name = "ma_qty";
+            this.ma_qty.Size = new System.Drawing.Size(0, 21);
+            this.ma_qty.TabIndex = 215;
+            // 
+            // normalButton1
+            // 
+            this.normalButton1.AllPower = null;
+            this.normalButton1.BackColor = System.Drawing.Color.Transparent;
+            this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
+            this.normalButton1.Image = null;
+            this.normalButton1.IsShowBorder = true;
+            this.normalButton1.Location = new System.Drawing.Point(873, 20);
+            this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
+            this.normalButton1.Name = "normalButton1";
+            this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
+            this.normalButton1.Power = null;
+            this.normalButton1.Size = new System.Drawing.Size(61, 24);
+            this.normalButton1.TabIndex = 216;
+            this.normalButton1.Text = "导出";
+            this.normalButton1.UseVisualStyleBackColor = false;
+            this.normalButton1.Click += new System.EventHandler(this.normalButton1_Click);
+            // 
             // ma_code
             // 
             this.ma_code.AllPower = "IFALL";
@@ -104,14 +158,13 @@
             this.ma_code.DBTitle = "";
             this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(79, 24);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_code.Location = new System.Drawing.Point(53, 19);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = "";
             this.ma_code.ReturnData = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(188, 29);
+            this.ma_code.Size = new System.Drawing.Size(119, 23);
             this.ma_code.TabIndex = 211;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "makecode";
@@ -122,10 +175,11 @@
             this.ms_nextstepcode.AllPower = null;
             this.ms_nextstepcode.BackColor = System.Drawing.Color.White;
             this.ms_nextstepcode.ID = null;
-            this.ms_nextstepcode.Location = new System.Drawing.Point(953, 24);
+            this.ms_nextstepcode.Location = new System.Drawing.Point(671, 21);
+            this.ms_nextstepcode.Margin = new System.Windows.Forms.Padding(2);
             this.ms_nextstepcode.Name = "ms_nextstepcode";
             this.ms_nextstepcode.Power = null;
-            this.ms_nextstepcode.Size = new System.Drawing.Size(167, 25);
+            this.ms_nextstepcode.Size = new System.Drawing.Size(126, 21);
             this.ms_nextstepcode.Str = null;
             this.ms_nextstepcode.Str1 = null;
             this.ms_nextstepcode.Str2 = null;
@@ -137,10 +191,11 @@
             this.ms_stepcode.AllPower = null;
             this.ms_stepcode.BackColor = System.Drawing.Color.White;
             this.ms_stepcode.ID = null;
-            this.ms_stepcode.Location = new System.Drawing.Point(658, 24);
+            this.ms_stepcode.Location = new System.Drawing.Point(450, 21);
+            this.ms_stepcode.Margin = new System.Windows.Forms.Padding(2);
             this.ms_stepcode.Name = "ms_stepcode";
             this.ms_stepcode.Power = null;
-            this.ms_stepcode.Size = new System.Drawing.Size(167, 25);
+            this.ms_stepcode.Size = new System.Drawing.Size(126, 21);
             this.ms_stepcode.Str = null;
             this.ms_stepcode.Str1 = null;
             this.ms_stepcode.Str2 = null;
@@ -154,12 +209,13 @@
             this.Query.DownImage = ((System.Drawing.Image)(resources.GetObject("Query.DownImage")));
             this.Query.Image = null;
             this.Query.IsShowBorder = true;
-            this.Query.Location = new System.Drawing.Point(1156, 24);
+            this.Query.Location = new System.Drawing.Point(801, 22);
+            this.Query.Margin = new System.Windows.Forms.Padding(2);
             this.Query.MoveImage = ((System.Drawing.Image)(resources.GetObject("Query.MoveImage")));
             this.Query.Name = "Query";
             this.Query.NormalImage = ((System.Drawing.Image)(resources.GetObject("Query.NormalImage")));
             this.Query.Power = null;
-            this.Query.Size = new System.Drawing.Size(75, 28);
+            this.Query.Size = new System.Drawing.Size(56, 22);
             this.Query.TabIndex = 206;
             this.Query.Text = "查询";
             this.Query.UseVisualStyleBackColor = false;
@@ -169,9 +225,10 @@
             // 
             this.ms_status.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.ms_status.FormattingEnabled = true;
-            this.ms_status.Location = new System.Drawing.Point(362, 25);
+            this.ms_status.Location = new System.Drawing.Point(244, 21);
+            this.ms_status.Margin = new System.Windows.Forms.Padding(2);
             this.ms_status.Name = "ms_status";
-            this.ms_status.Size = new System.Drawing.Size(167, 23);
+            this.ms_status.Size = new System.Drawing.Size(126, 20);
             this.ms_status.TabIndex = 205;
             this.ms_status.Tag = "ms_status";
             this.ms_status.SelectedIndexChanged += new System.EventHandler(this.ms_status_SelectedIndexChanged);
@@ -183,107 +240,65 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.SnInf.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.SnInf.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.ms_sncode,
-            this.status,
-            this.ms_linecode,
-            this.ms_stepcode1,
-            this.ms_nextstepcode1,
-            this.Column5});
+            this.SN,
+            this.状态,
+            this.线别,
+            this.当前工序,
+            this.下一工序,
+            this.当前途程});
             this.SnInf.EnableContentClick = true;
-            this.SnInf.Location = new System.Drawing.Point(0, 70);
-            this.SnInf.Margin = new System.Windows.Forms.Padding(4);
+            this.SnInf.Location = new System.Drawing.Point(0, 56);
             this.SnInf.Name = "SnInf";
             this.SnInf.RowTemplate.Height = 23;
-            this.SnInf.Size = new System.Drawing.Size(1261, 590);
+            this.SnInf.Size = new System.Drawing.Size(946, 472);
             this.SnInf.TabIndex = 203;
             // 
-            // ms_sncode
-            // 
-            this.ms_sncode.DataPropertyName = "ms_sncode";
-            this.ms_sncode.HeaderText = "SN";
-            this.ms_sncode.Name = "ms_sncode";
-            // 
-            // status
-            // 
-            this.status.DataPropertyName = "ms_status";
-            this.status.HeaderText = "状态";
-            this.status.Name = "status";
-            this.status.ReadOnly = true;
-            // 
-            // ms_linecode
-            // 
-            this.ms_linecode.DataPropertyName = "ms_linecode";
-            this.ms_linecode.HeaderText = "线别";
-            this.ms_linecode.Name = "ms_linecode";
+            // SN
             // 
-            // ms_stepcode1
+            this.SN.DataPropertyName = "SN";
+            this.SN.HeaderText = "SN";
+            this.SN.Name = "SN";
             // 
-            this.ms_stepcode1.DataPropertyName = "ms_stepcode";
-            this.ms_stepcode1.HeaderText = "当前工序";
-            this.ms_stepcode1.Name = "ms_stepcode1";
-            this.ms_stepcode1.ReadOnly = true;
+            // 状态
             // 
-            // ms_nextstepcode1
+            this.状态.DataPropertyName = "状态";
+            this.状态.HeaderText = "状态";
+            this.状态.Name = "状态";
+            this.状态.ReadOnly = true;
             // 
-            this.ms_nextstepcode1.DataPropertyName = "ms_nextstepcode";
-            this.ms_nextstepcode1.HeaderText = "下一工序";
-            this.ms_nextstepcode1.Name = "ms_nextstepcode1";
-            this.ms_nextstepcode1.ReadOnly = true;
+            // 线别
             // 
-            // Column5
-            // 
-            this.Column5.DataPropertyName = "ms_craftcode";
-            this.Column5.HeaderText = "当前途程";
-            this.Column5.Name = "Column5";
-            this.Column5.ReadOnly = true;
-            // 
-            // Count_label
-            // 
-            this.Count_label.AutoSize = true;
-            this.Count_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Count_label.Location = new System.Drawing.Point(275, 664);
-            this.Count_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.Count_label.Name = "Count_label";
-            this.Count_label.Size = new System.Drawing.Size(132, 27);
-            this.Count_label.TabIndex = 212;
-            this.Count_label.Text = "当前状态总计";
+            this.线别.DataPropertyName = "线别";
+            this.线别.HeaderText = "线别";
+            this.线别.Name = "线别";
             // 
-            // Count
+            // 当前工序
             // 
-            this.Count.AutoSize = true;
-            this.Count.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Count.Location = new System.Drawing.Point(415, 664);
-            this.Count.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.Count.Name = "Count";
-            this.Count.Size = new System.Drawing.Size(0, 27);
-            this.Count.TabIndex = 213;
+            this.当前工序.DataPropertyName = "当前工序";
+            this.当前工序.HeaderText = "当前工序";
+            this.当前工序.Name = "当前工序";
+            this.当前工序.ReadOnly = true;
             // 
-            // ma_qty_label
+            // 下一工序
             // 
-            this.ma_qty_label.AutoSize = true;
-            this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty_label.Location = new System.Drawing.Point(4, 664);
-            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(92, 27);
-            this.ma_qty_label.TabIndex = 214;
-            this.ma_qty_label.Text = "工单数量";
+            this.下一工序.DataPropertyName = "下一工序";
+            this.下一工序.HeaderText = "下一工序";
+            this.下一工序.Name = "下一工序";
+            this.下一工序.ReadOnly = true;
             // 
-            // ma_qty
+            // 当前途程
             // 
-            this.ma_qty.AutoSize = true;
-            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(104, 664);
-            this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_qty.Name = "ma_qty";
-            this.ma_qty.Size = new System.Drawing.Size(0, 27);
-            this.ma_qty.TabIndex = 215;
+            this.当前途程.DataPropertyName = "当前途程";
+            this.当前途程.HeaderText = "当前途程";
+            this.当前途程.Name = "当前途程";
+            this.当前途程.ReadOnly = true;
             // 
             // Query_OnlineTraceBack
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1261, 694);
+            this.ClientSize = new System.Drawing.Size(946, 555);
+            this.Controls.Add(this.normalButton1);
             this.Controls.Add(this.ma_qty);
             this.Controls.Add(this.ma_qty_label);
             this.Controls.Add(this.Count);
@@ -299,7 +314,6 @@
             this.Controls.Add(this.ms_makecode_label);
             this.Controls.Add(this.ms_status_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Query_OnlineTraceBack";
             this.Tag = "Query!OnlineTraceBack";
             this.Text = " ";
@@ -321,16 +335,18 @@
         private System.Windows.Forms.Label ms_stepcode_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox ms_nextstepcode;
         private System.Windows.Forms.Label ms_nextstepcode_label;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ms_sncode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn status;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ms_linecode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ms_stepcode1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ms_nextstepcode1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
         private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
         private System.Windows.Forms.Label Count_label;
         private System.Windows.Forms.Label Count;
         private System.Windows.Forms.Label ma_qty_label;
         private System.Windows.Forms.Label ma_qty;
+        private CustomControl.ButtonUtil.NormalButton normalButton1;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn SN;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 状态;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 线别;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 当前工序;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 下一工序;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 当前途程;
     }
 }

+ 27 - 3
UAS_MES_JH/FunctionCode/Query/Query_OnlineTraceBack.cs

@@ -82,10 +82,10 @@ namespace UAS_MES_NEW.Query
                 string condition = BaseUtil.GetScreenSqlCondition(ma_code, ms_stepcode, ms_nextstepcode);
                 string statuscode = ms_status.SelectedValue.ToString();
                 sql.Clear();
-                sql.Append("select distinct sncode ms_sncode,ms_linecode,ms_stepcode,ms_nextstepcode,ms_craftcode,makecode ms_makecode, ");
+                sql.Append("select distinct sncode SN,ms_linecode 线别,ms_stepcode 当前工序,ms_nextstepcode 下一工序,ms_craftcode 当前途程,makecode ms_makecode,  ");
                 sql.Append("case when ms_status is null then '未生产' when ms_status=0 then '已归属' when ms_status=1 then '在线' when ms_status=2 ");
                 sql.Append(" then '已完工' when ms_status=3 then '不良待维修' when ms_status=4 then '已报废' ");
-                sql.Append("else 'null' end ms_status  from((select msd_sncode sncode,msd_makecode makecode,msd_type type ");
+                sql.Append("else 'null' end 状态  from((select msd_sncode sncode,msd_makecode makecode,msd_type type ");
                 sql.Append("from makesnruledetail where msd_makecode='" + ma_code.Text + "') union (select msl_sncode sncode,msl_makecode ");
                 sql.Append("makecode,msl_type type from makesnlist where msl_makecode='" + ma_code.Text + "') union (");
                 sql.Append("select ms_sncode,ms_makecode,'' type from  makeserial where ms_makecode='" + ma_code.Text + "'))");
@@ -103,7 +103,7 @@ namespace UAS_MES_NEW.Query
                 {
                     sql.Append("and ms_status ='" + statuscode + "'");
                 }
-                sql.Append(" order by ms_sncode ");
+                sql.Append(" order by SN ");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.FillDgvWithDataTable(SnInf, dt);
                 Count.Text = SnInf.Rows.Count.ToString();
@@ -123,5 +123,29 @@ namespace UAS_MES_NEW.Query
             if (ma_code.Text != "")
                 Query.PerformClick();
         }
+
+        private void normalButton1_Click(object sender, EventArgs e)
+        {
+            //Data表示导出数据
+            //Templet表示导出模板
+            folderBrowserDialog1.Description = "选择导出的路径";
+            DialogResult result = folderBrowserDialog1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                string FolderPath = folderBrowserDialog1.SelectedPath;
+                ExcelHandler eh = new ExcelHandler();
+                DataTable dt = (DataTable)SnInf.DataSource;
+                //导出Excel的时候返回一个文件名,用户选择是否打开
+                string filePath = eh.ExportExcel(dt, FolderPath);
+                //用户选择导出之后是否立即打开
+                MessageBoxButtons messButton = MessageBoxButtons.YesNo;
+                string openFile = MessageBox.Show(this.ParentForm, "是否打开文件"+ filePath, "提示", messButton).ToString();
+                if (openFile == "Yes")
+                {
+                    System.Diagnostics.Process.Start(filePath);
+                }
+            }
+        
+    }
     }
 }

+ 47 - 6
UAS_MES_JH/FunctionCode/Query/Query_OnlineTraceBack.resx

@@ -117,7 +117,48 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <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>
   <data name="Query.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
@@ -156,22 +197,22 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="ms_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="SN.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="状态.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ms_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="线别.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ms_stepcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="当前工序.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ms_nextstepcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="下一工序.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="当前途程.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
 </root>

+ 4 - 4
UAS_MES_JH/FunctionCode/Special/Special_ChecknoSpitBox.cs

@@ -77,12 +77,12 @@ namespace UAS_MES_NEW.Special
                                 sql.Append("on ms_sncode=pd_barcode and ms_makecode=pd_makecode where pd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' group by pd_makecode");
                                 DataTable dtB = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 List<string> SQLS1 = new List<string>();
-                                for (int i = 0; i < dt.Rows.Count; i++)
+                                for (int i = 0; i < dtB.Rows.Count; i++)
                                 {
                                     string ma_code = dtB.Rows[i]["pd_makecode"].ToString();
                                     string num = dtB.Rows[i]["num"].ToString();
-                                    SQLS1.Add("delete from makeprocess where mp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' and ms_makecode='" + ma_code + "') and mp_makecode='" + ma_code + "' and mp_stepcode='" + User.CurrentStepCode + "'");
-                                    SQLS1.Add("delete from steppassed where sp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' and ms_makecode='" + ma_code + "') and sp_makecode='" + ma_code + "' and sp_stepcode='" + User.CurrentStepCode + "'");
+                                   // SQLS1.Add("delete from makeprocess where mp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' and ms_makecode='" + ma_code + "') and mp_makecode='" + ma_code + "' and mp_stepcode='" + User.CurrentStepCode + "'");
+                                   // SQLS1.Add("delete from steppassed where sp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' and ms_makecode='" + ma_code + "') and sp_makecode='" + ma_code + "' and sp_stepcode='" + User.CurrentStepCode + "'");
                                     SQLS1.Add("update makecraftdetail set mcd_inqty=mcd_inqty-" + num + ",mcd_outqty=mcd_outqty-" + num + ",mcd_okqty=mcd_okqty-" + num + " where mcd_macode='" + ma_code + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                                     //扣减已完工数
                                     SQLS1.Add("update make set ma_madeqty=ma_madeqty-(select count(1) from makeserial where  ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' and ms_makecode='" + ma_code + "' and ms_status=2) where ma_code='" + ma_code + "'");
@@ -112,7 +112,7 @@ namespace UAS_MES_NEW.Special
                                 dh.ExecuteSql("delete from package where pa_outboxcode = '" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "delete");
                                 //删除箱的明细
                                 dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "delete");
-                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, dt.Rows[jk]["pa_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", dt.Rows[jk]["pa_outboxcode"].ToString(), dt.Rows[jk]["pa_outboxcode"].ToString());
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, dt.Rows[jk]["pa_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", dt.Rows[jk]["pa_outboxcode"].ToString(), checkno.Text);
                                 OperatResult.AppendText(">>箱号" + dt.Rows[jk]["pa_outboxcode"].ToString() + "成功拆解!\n", Color.Green);
                                 //}
                                 //else OperatResult.AppendText(">>箱号" + dt.Rows[jk]["pa_outboxcode"].ToString() + "已送检,不允许解除\n", Color.Red);

+ 346 - 0
UAS_MES_JH/FunctionCode/Special/Special_Reset.Designer.cs

@@ -0,0 +1,346 @@
+namespace UAS_MES_NEW.Special
+{
+    partial class Special_Reset
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Special_Reset));
+            this.Pallet_label = new System.Windows.Forms.Label();
+            this.bigboxBtn = new System.Windows.Forms.RadioButton();
+            this.serBtn = new System.Windows.Forms.RadioButton();
+            this.st_rstepcode_label = new System.Windows.Forms.Label();
+            this.ma_craftcode_label = new System.Windows.Forms.Label();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.ms_prodcode_label = new System.Windows.Forms.Label();
+            this.WeighRecord = new System.Windows.Forms.ListView();
+            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.cd_stepno = new System.Windows.Forms.Label();
+            this.数据清空 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.cd_stepcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.cr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperatResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.input = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Split = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.SuspendLayout();
+            // 
+            // Pallet_label
+            // 
+            this.Pallet_label.AutoSize = true;
+            this.Pallet_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Pallet_label.Location = new System.Drawing.Point(7, 41);
+            this.Pallet_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.Pallet_label.Name = "Pallet_label";
+            this.Pallet_label.Size = new System.Drawing.Size(58, 21);
+            this.Pallet_label.TabIndex = 1;
+            this.Pallet_label.Text = "录入框";
+            // 
+            // bigboxBtn
+            // 
+            this.bigboxBtn.AutoSize = true;
+            this.bigboxBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bigboxBtn.Location = new System.Drawing.Point(11, 2);
+            this.bigboxBtn.Margin = new System.Windows.Forms.Padding(2);
+            this.bigboxBtn.Name = "bigboxBtn";
+            this.bigboxBtn.Size = new System.Drawing.Size(60, 25);
+            this.bigboxBtn.TabIndex = 234;
+            this.bigboxBtn.Text = "箱号";
+            this.bigboxBtn.UseVisualStyleBackColor = true;
+            this.bigboxBtn.Click += new System.EventHandler(this.bigboxBtn_Click);
+            // 
+            // serBtn
+            // 
+            this.serBtn.AutoSize = true;
+            this.serBtn.Checked = true;
+            this.serBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.serBtn.Location = new System.Drawing.Point(80, 2);
+            this.serBtn.Margin = new System.Windows.Forms.Padding(2);
+            this.serBtn.Name = "serBtn";
+            this.serBtn.Size = new System.Drawing.Size(108, 25);
+            this.serBtn.TabIndex = 233;
+            this.serBtn.TabStop = true;
+            this.serBtn.Text = "单台序列号";
+            this.serBtn.UseVisualStyleBackColor = true;
+            this.serBtn.Click += new System.EventHandler(this.bigboxBtn_Click);
+            // 
+            // st_rstepcode_label
+            // 
+            this.st_rstepcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.st_rstepcode_label.AutoSize = true;
+            this.st_rstepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.st_rstepcode_label.Location = new System.Drawing.Point(506, 9);
+            this.st_rstepcode_label.Name = "st_rstepcode_label";
+            this.st_rstepcode_label.Size = new System.Drawing.Size(74, 21);
+            this.st_rstepcode_label.TabIndex = 235;
+            this.st_rstepcode_label.Text = "回流工序";
+            // 
+            // ma_craftcode_label
+            // 
+            this.ma_craftcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ma_craftcode_label.AutoSize = true;
+            this.ma_craftcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_craftcode_label.Location = new System.Drawing.Point(326, 4);
+            this.ma_craftcode_label.Name = "ma_craftcode_label";
+            this.ma_craftcode_label.Size = new System.Drawing.Size(74, 21);
+            this.ma_craftcode_label.TabIndex = 236;
+            this.ma_craftcode_label.Text = "回流途程";
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(7, 81);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(58, 21);
+            this.ms_makecode_label.TabIndex = 240;
+            this.ms_makecode_label.Text = "工单号";
+            // 
+            // ms_prodcode_label
+            // 
+            this.ms_prodcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_prodcode_label.AutoSize = true;
+            this.ms_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_prodcode_label.Location = new System.Drawing.Point(326, 81);
+            this.ms_prodcode_label.Name = "ms_prodcode_label";
+            this.ms_prodcode_label.Size = new System.Drawing.Size(74, 21);
+            this.ms_prodcode_label.TabIndex = 241;
+            this.ms_prodcode_label.Text = "产品编号";
+            // 
+            // WeighRecord
+            // 
+            this.WeighRecord.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader3});
+            this.WeighRecord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.WeighRecord.Location = new System.Drawing.Point(11, 108);
+            this.WeighRecord.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.WeighRecord.Name = "WeighRecord";
+            this.WeighRecord.Size = new System.Drawing.Size(421, 321);
+            this.WeighRecord.TabIndex = 243;
+            this.WeighRecord.UseCompatibleStateImageBehavior = false;
+            this.WeighRecord.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader3
+            // 
+            this.columnHeader3.Text = "录入项";
+            this.columnHeader3.Width = 300;
+            // 
+            // cd_stepno
+            // 
+            this.cd_stepno.AutoSize = true;
+            this.cd_stepno.Location = new System.Drawing.Point(704, 41);
+            this.cd_stepno.Name = "cd_stepno";
+            this.cd_stepno.Size = new System.Drawing.Size(0, 12);
+            this.cd_stepno.TabIndex = 244;
+            // 
+            // 数据清空
+            // 
+            this.数据清空.AllPower = null;
+            this.数据清空.BackColor = System.Drawing.Color.Transparent;
+            this.数据清空.DownImage = ((System.Drawing.Image)(resources.GetObject("数据清空.DownImage")));
+            this.数据清空.Image = null;
+            this.数据清空.IsShowBorder = true;
+            this.数据清空.Location = new System.Drawing.Point(473, 400);
+            this.数据清空.MoveImage = ((System.Drawing.Image)(resources.GetObject("数据清空.MoveImage")));
+            this.数据清空.Name = "数据清空";
+            this.数据清空.NormalImage = ((System.Drawing.Image)(resources.GetObject("数据清空.NormalImage")));
+            this.数据清空.Power = null;
+            this.数据清空.Size = new System.Drawing.Size(56, 28);
+            this.数据清空.TabIndex = 245;
+            this.数据清空.Text = "数据清空";
+            this.数据清空.UseVisualStyleBackColor = false;
+            this.数据清空.Click += new System.EventHandler(this.数据清空_Click);
+            // 
+            // ms_prodcode
+            // 
+            this.ms_prodcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_prodcode.AutoSize = true;
+            this.ms_prodcode.CutLength = null;
+            this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_prodcode.Location = new System.Drawing.Point(422, 81);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_prodcode.Name = "ms_prodcode";
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.ms_prodcode.TabIndex = 239;
+            // 
+            // ms_makecode
+            // 
+            this.ms_makecode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_makecode.AutoSize = true;
+            this.ms_makecode.CutLength = null;
+            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode.Location = new System.Drawing.Point(87, 81);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(250, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
+            this.ms_makecode.TabIndex = 242;
+            // 
+            // cd_stepcode
+            // 
+            this.cd_stepcode.AllPower = "ifall";
+            this.cd_stepcode.Caller = null;
+            this.cd_stepcode.Condition = null;
+            this.cd_stepcode.DBTitle = "回流工序";
+            this.cd_stepcode.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cd_stepcode.FormName = null;
+            this.cd_stepcode.Location = new System.Drawing.Point(473, 41);
+            this.cd_stepcode.Name = "cd_stepcode";
+            this.cd_stepcode.Power = "ifspecial";
+            this.cd_stepcode.ReturnData = null;
+            this.cd_stepcode.SelectField = null;
+            this.cd_stepcode.SetValueField = null;
+            this.cd_stepcode.Size = new System.Drawing.Size(150, 22);
+            this.cd_stepcode.TabIndex = 238;
+            this.cd_stepcode.TableName = null;
+            this.cd_stepcode.Tag = "";
+            this.cd_stepcode.TextBoxEnable = false;
+            // 
+            // cr_code
+            // 
+            this.cr_code.AllPower = "ifall";
+            this.cr_code.BackColor = System.Drawing.Color.White;
+            this.cr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cr_code.ID = null;
+            this.cr_code.Location = new System.Drawing.Point(282, 40);
+            this.cr_code.Name = "cr_code";
+            this.cr_code.Power = "ifspecial";
+            this.cr_code.ReadOnly = true;
+            this.cr_code.Size = new System.Drawing.Size(150, 23);
+            this.cr_code.Str = null;
+            this.cr_code.Str1 = null;
+            this.cr_code.Str2 = null;
+            this.cr_code.TabIndex = 237;
+            this.cr_code.Tag = "ma_craftcode";
+            this.cr_code.TextChanged += new System.EventHandler(this.cr_code_TextChanged);
+            // 
+            // OperatResult
+            // 
+            this.OperatResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperatResult.Location = new System.Drawing.Point(11, 433);
+            this.OperatResult.Margin = new System.Windows.Forms.Padding(2);
+            this.OperatResult.Name = "OperatResult";
+            this.OperatResult.Size = new System.Drawing.Size(777, 123);
+            this.OperatResult.TabIndex = 3;
+            this.OperatResult.Text = "";
+            // 
+            // input
+            // 
+            this.input.AllPower = null;
+            this.input.BackColor = System.Drawing.Color.White;
+            this.input.ID = null;
+            this.input.Location = new System.Drawing.Point(80, 43);
+            this.input.Margin = new System.Windows.Forms.Padding(2);
+            this.input.Name = "input";
+            this.input.Power = null;
+            this.input.Size = new System.Drawing.Size(148, 21);
+            this.input.Str = null;
+            this.input.Str1 = null;
+            this.input.Str2 = null;
+            this.input.TabIndex = 2;
+            this.input.KeyDown += new System.Windows.Forms.KeyEventHandler(this.input_KeyDown);
+            // 
+            // Split
+            // 
+            this.Split.AllPower = null;
+            this.Split.BackColor = System.Drawing.Color.Transparent;
+            this.Split.DownImage = ((System.Drawing.Image)(resources.GetObject("Split.DownImage")));
+            this.Split.Image = null;
+            this.Split.IsShowBorder = true;
+            this.Split.Location = new System.Drawing.Point(473, 108);
+            this.Split.Margin = new System.Windows.Forms.Padding(2);
+            this.Split.MoveImage = ((System.Drawing.Image)(resources.GetObject("Split.MoveImage")));
+            this.Split.Name = "Split";
+            this.Split.NormalImage = ((System.Drawing.Image)(resources.GetObject("Split.NormalImage")));
+            this.Split.Power = null;
+            this.Split.Size = new System.Drawing.Size(56, 22);
+            this.Split.TabIndex = 0;
+            this.Split.Text = "站点重置";
+            this.Split.UseVisualStyleBackColor = false;
+            this.Split.Click += new System.EventHandler(this.Split_Click);
+            // 
+            // Special_Reset
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(805, 565);
+            this.Controls.Add(this.数据清空);
+            this.Controls.Add(this.cd_stepno);
+            this.Controls.Add(this.WeighRecord);
+            this.Controls.Add(this.ms_makecode_label);
+            this.Controls.Add(this.ms_prodcode_label);
+            this.Controls.Add(this.ms_prodcode);
+            this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.cd_stepcode);
+            this.Controls.Add(this.st_rstepcode_label);
+            this.Controls.Add(this.ma_craftcode_label);
+            this.Controls.Add(this.cr_code);
+            this.Controls.Add(this.bigboxBtn);
+            this.Controls.Add(this.serBtn);
+            this.Controls.Add(this.OperatResult);
+            this.Controls.Add(this.input);
+            this.Controls.Add(this.Pallet_label);
+            this.Controls.Add(this.Split);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Name = "Special_Reset";
+            this.Tag = "Special!Reset";
+            this.Text = "重置站点";
+            this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.ButtonUtil.NormalButton Split;
+        private System.Windows.Forms.Label Pallet_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox input;
+        private CustomControl.RichText.RichTextAutoBottom OperatResult;
+        private System.Windows.Forms.RadioButton bigboxBtn;
+        private System.Windows.Forms.RadioButton serBtn;
+        private CustomControl.TextBoxWithIcon.SearchTextBox cd_stepcode;
+        private System.Windows.Forms.Label st_rstepcode_label;
+        private System.Windows.Forms.Label ma_craftcode_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox cr_code;
+        private System.Windows.Forms.Label ms_makecode_label;
+        private System.Windows.Forms.Label ms_prodcode_label;
+        private CustomControl.ValueLabel.ValueLabel ms_prodcode;
+        private CustomControl.ValueLabel.ValueLabel ms_makecode;
+        private System.Windows.Forms.ListView WeighRecord;
+        private System.Windows.Forms.ColumnHeader columnHeader3;
+        private System.Windows.Forms.Label cd_stepno;
+        private CustomControl.ButtonUtil.NormalButton 数据清空;
+    }
+}

+ 316 - 0
UAS_MES_JH/FunctionCode/Special/Special_Reset.cs

@@ -0,0 +1,316 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Special
+{
+    public partial class Special_Reset : Form
+    {
+        DataHelper dh;
+
+        LogStringBuilder sql = new LogStringBuilder();
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        DataTable Dbfind;
+        DataTable dt;
+
+        List<String> sb = new List<string>();
+
+        public Special_Reset()
+        {
+            InitializeComponent();
+        }
+
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+       
+            dh = SystemInf.dh;
+            asc.controllInitializeSize(this);
+            cd_stepcode.FormName = Name;
+            cd_stepcode.TableName = "craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id";
+            cd_stepcode.SetValueField = new string[] { "cd_stepcode", "cd_stepno" };
+            cd_stepcode.SelectField = "cd_stepname # 工序名称 ,cd_stepcode # 工序编号,cd_stepno # 执行顺序";
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+            cd_stepcode.DBTitle = "回流工序";
+            cd_stepcode.DbChange += Cd_stepcode_DbChange;
+        }
+
+        private void Cd_stepcode_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = cd_stepcode.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
+        private void ReSN(string sncode, string stepcode)
+        {
+            string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + stepcode +  "'").ToString();
+            dh.ExecuteSql("update makeserial set ms_status=1,ms_outboxcode='',ms_nextstepcode= '"+ stepcode + "' where ms_sncode='" + sncode + "'", "update");
+            dh.ExecuteSql("delete makebad where mb_sncode = '" + sncode + "' and mb_status = 0", "delete");
+            sql.Clear();
+            sql.Append("update craftmaterial set cm_status=-1,cm_lastdeco=-1,cm_dropman='" + User.UserCode + "',");
+            sql.Append("cm_dropdate =sysdate,CM_REMARK = '重置站点拆解',cm_dropstep='" + User.CurrentStepCode + "',");
+            sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_sncode = '" + sncode + "' and cm_stepcode in (select cd_stepcode from craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id where ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_detno >=" + cd_stepno.Text + " )");
+            dh.ExecuteSql(sql.GetString(), "update");
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname,  sncode, "");
+        }
+
+
+
+        private void Split_Click(object sender, EventArgs e)
+        {
+            if (sb.Count == 0|| cd_stepcode.Text == "")
+            {
+                OperatResult.AppendText(">>采集数与回流工位不能为空\n", Color.Red);
+                return;
+            }
+            string Delete = MessageBox.Show(this.ParentForm, "是否确认重置站点?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+            if (Delete == "Yes")
+            {
+                if (serBtn.Checked)
+                {
+                    for (int i = 0; i < sb.Count; i++)
+                    {
+                     ReSN(sb[i].ToString(), cd_stepcode.Text);
+                     OperatResult.AppendText("SN:" + sb[i].ToString()+ "回流至"+ cd_stepcode.Text + "完成\n", Color.Green);
+                    }
+                    数据清空_Click(sender,new EventArgs());
+                }
+                else if(bigboxBtn.Checked)
+                {
+                    string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + cd_stepcode.Text + "'").ToString();
+                    for (int i = 0; i < sb.Count; i++)
+                    {
+                        DataTable dt2 = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_outboxcode = '" + sb[i].ToString() + "'", "select");
+                        for (int k = 0; k < dt2.Rows.Count; k++)
+                        {
+                            ReSN(dt2.Rows[k]["ms_sncode"].ToString(), cd_stepcode.Text);
+                        }
+                       dh.ExecuteSql("insert into PACKAGEBACKUP select * from package where pa_outboxcode='" + sb[i].ToString() + "'", "insert");
+                       dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "insert");
+                       dh.ExecuteSql("delete from package where pa_outboxcode = '" + sb[i].ToString() + "'", "delete");
+                        //删除箱的明细
+                        dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "delete");
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "站点重置至" + stname, sb[i].ToString(), "");
+                        OperatResult.AppendText("卡通箱:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
+                    }
+                    数据清空_Click(sender, new EventArgs());
+                }
+                   
+            }
+
+
+            //DataTable dt = (DataTable)dh.ExecuteSql("select pa_makecode,pa_outboxcode,nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_status,pa_checkno,ob_status,pa_mothercode,nvl(pa_downstatus,0)pa_downstatus from package  join oqcbatch on pa_checkno=ob_checkno where ob_checkno='" + input.Text + "'", "select");
+            //if (dt.Rows.Count > 0)
+            //{
+            //    for (int jk = 0; jk < dt.Rows.Count; jk++)
+            //    {
+            //        if (dt.Rows[jk]["pa_outno"].ToString() != "")
+            //        {
+            //            OperatResult.AppendText(">>卡通箱" + dt.Rows[jk]["pa_outboxcode"].ToString() + "已被出货单" + dt.Rows[jk]["pa_outno"].ToString() + "采集,不允许操作\n", Color.Red);
+            //            return;
+            //        }
+            //        if (dt.Rows[0]["pa_iostatus"].ToString() != "0")
+            //        {
+            //            OperatResult.AppendText(">>卡通箱" + dt.Rows[jk]["pa_outboxcode"].ToString() + "处于入库状态,不允许操作\n", Color.Red);
+            //            return;
+            //        }
+            //        if (dt.Rows[0]["pa_status"].ToString() != "1")
+            //        {
+            //            OperatResult.AppendText(">>卡通箱" + dt.Rows[jk]["pa_outboxcode"].ToString() + "未封箱,不允许操作\n", Color.Red);
+            //            return;
+            //        }
+            //        if (dt.Rows[0]["pa_mothercode"].ToString() == "")
+            //        {
+            //            if (dt.Rows[0]["pa_downstatus"].ToString() == "0")
+            //            {
+            //                string ob_status = dt.Rows[0]["ob_status"].ToString();
+            //                string pa_checkno = dt.Rows[0]["pa_checkno"].ToString();
+            //                ////不存在抽检批次或者还未检验可以拆解
+            //                //if (ob_status == "" || ob_status == "ENTERING" || ob_status == "UNCHECK")
+            //                //{
+            //                sql.Clear();
+            //                sql.Append("select pd_makecode,count(1) num from packagedetail left join makeserial  ");
+            //                sql.Append("on ms_sncode=pd_barcode and ms_makecode=pd_makecode where pd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' group by pd_makecode");
+            //                DataTable dtB = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            //                List<string> SQLS1 = new List<string>();
+            //                for (int i = 0; i < dtB.Rows.Count; i++)
+            //                {
+            //                    string ma_code = dtB.Rows[i]["pd_makecode"].ToString();
+            //                    string num = dtB.Rows[i]["num"].ToString();
+            //                    // SQLS1.Add("delete from makeprocess where mp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' and ms_makecode='" + ma_code + "') and mp_makecode='" + ma_code + "' and mp_stepcode='" + User.CurrentStepCode + "'");
+            //                    // SQLS1.Add("delete from steppassed where sp_sncode in (select ms_sncode from makeserial where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' and ms_makecode='" + ma_code + "') and sp_makecode='" + ma_code + "' and sp_stepcode='" + User.CurrentStepCode + "'");
+            //                    SQLS1.Add("update makecraftdetail set mcd_inqty=mcd_inqty-" + num + ",mcd_outqty=mcd_outqty-" + num + ",mcd_okqty=mcd_okqty-" + num + " where mcd_macode='" + ma_code + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+            //                    //扣减已完工数
+            //                    SQLS1.Add("update make set ma_madeqty=ma_madeqty-(select count(1) from makeserial where  ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "' and ms_makecode='" + ma_code + "' and ms_status=2) where ma_code='" + ma_code + "'");
+            //                }
+            //                if (pa_checkno != "")
+            //                {
+            //                    SQLS1.Add("update makeserial set ms_checkno='' where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'");
+            //                    SQLS1.Add("update oqcbatch set ob_nowcheckqty=ob_nowcheckqty-(select count(1) from oqcbatchdetail where obd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "') where ob_checkno='" + pa_checkno + "'");
+            //                    SQLS1.Add("delete from oqcbatchdetail where obd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'");
+            //                }
+            //                //更新序列号状态
+            //                SQLS1.Add("update makeserial set ms_status=1,ms_outboxcode='',ms_nextstepcode= (case when ms_nextstepcode='" + User.CurrentStepCode + "' then ms_nextstepcode else '" + User.CurrentStepCode + "' end ),ms_paststep=replace(ms_paststep,'," + User.CurrentStepCode + "','') where ms_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'");
+            //                //抽检批次不为空的时候进行移除
+            //                dh.ExecuteSQLTran(SQLS1.ToArray());
+            //                string prcode = dh.getFieldDataByCondition("packagedetail", "pd_prodcode", "pd_outboxcode = '" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'").ToString();
+            //                string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + prcode + "'").ToString();
+            //                //if (standqty != "")
+            //                //{
+            //                //    //置空原箱
+            //                //    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where checkno='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "update");
+            //                //}
+            //                //else
+            //                //    //置空原箱
+            //                //    dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where checkno='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "update");
+            //                dh.ExecuteSql("insert into PACKAGEBACKUP select * from package where pa_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "insert");
+            //                dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "insert");
+            //                dh.ExecuteSql("delete from package where pa_outboxcode = '" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "delete");
+            //                //删除箱的明细
+            //                dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + dt.Rows[jk]["pa_outboxcode"].ToString() + "'", "delete");
+            //                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, dt.Rows[jk]["pa_makecode"].ToString(), User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", dt.Rows[jk]["pa_outboxcode"].ToString(), input.Text);
+            //                OperatResult.AppendText(">>箱号" + dt.Rows[jk]["pa_outboxcode"].ToString() + "成功拆解!\n", Color.Green);
+            //                //}
+            //                //else OperatResult.AppendText(">>箱号" + dt.Rows[jk]["pa_outboxcode"].ToString() + "已送检,不允许解除\n", Color.Red);
+            //            }
+            //            else OperatResult.AppendText(">>箱号" + dt.Rows[jk]["pa_outboxcode"].ToString() + "已下地,不允许解除\n", Color.Red);
+            //        }
+            //        else OperatResult.AppendText(">>箱号" + dt.Rows[jk]["pa_outboxcode"].ToString() + "已装箱" + dt.Rows[0]["pa_mothercode"].ToString() + ",不允许解除\n", Color.Red);
+            //    }
+
+            //}
+            //else OperatResult.AppendText(">>抽检批" + input.Text + "不存在\n", Color.Red);
+
+        }
+
+        private void bigboxBtn_Click(object sender, EventArgs e)
+        {
+            if (((RadioButton)sender).Checked == true)
+            {
+                if (WeighRecord.Items.Count > 0)
+                {
+                    string logout_confirm = MessageBox.Show(this.ParentForm, "是否更换采集项(已录入信息会清空)?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                    if (logout_confirm == "Yes")
+                    {
+                        WeighRecord.Items.Clear();
+                        sb.Clear();
+                        ms_makecode.Text = "";
+                        ms_prodcode.Text = "";
+                        cr_code.Text = "";
+                        cd_stepcode.Text = "";
+                    }
+                    else
+                    {
+                        serBtn.Checked = bigboxBtn.Checked;
+                        bigboxBtn.Checked = !serBtn.Checked;
+                    }
+                }
+                if (((RadioButton)sender).Name == "serBtn")
+                {
+                    input.Focus();
+                    OperatResult.AppendText("请输入序列号进行采集\n", Color.Black, input);
+                }
+                else if (((RadioButton)sender).Name == "bigboxBtn")
+                {
+                    input.Focus();
+                    OperatResult.AppendText("请输入箱号进行采集\n", Color.Black, input);
+                }
+            }
+        }
+
+        private void cr_code_TextChanged(object sender, EventArgs e)
+        {
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+        }
+
+        private void input_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (serBtn.Checked)
+                {
+                    dt = (DataTable)dh.ExecuteSql("select ms_makecode,ms_prodcode,ms_sncode,ms_craftcode cr_code,ms_status,ms_outboxcode from makeserial where ms_sncode = '" + input.Text + "'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "所属工单" + dt.Rows[0]["ms_makecode"].ToString() + "与当前工单" + ms_makecode.Text + "不一致\n", Color.Red, input);
+                            return;
+                        }
+                        if (dt.Rows[0]["ms_status"].ToString() == "3")
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "为不良品,不允许采集\n", Color.Red, input);
+                            return;
+                        }
+                        if (dt.Rows[0]["ms_outboxcode"].ToString() != "")
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "已装箱" + dt.Rows[0]["ms_outboxcode"].ToString() + ",不允许采集\n", Color.Red, input);
+                            return;
+                        }
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        if (sb.Contains(dt.Rows[0]["ms_sncode"].ToString()))
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "已采集\n", Color.Red, input);
+                            return;
+                        }
+                        WeighRecord.Items.Add(dt.Rows[0]["ms_sncode"].ToString());
+                        sb.Add(dt.Rows[0]["ms_sncode"].ToString());
+                        OperatResult.AppendText("SN:" + input.Text + "采集\n", Color.Green, input);
+                        cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+                    }
+                    else
+                    {
+                        OperatResult.AppendText("SN:" + input.Text + "不存在\n", Color.Red, input);
+                        return;
+                    }
+                }
+                else if (bigboxBtn.Checked)
+                {
+                    dt = (DataTable)dh.ExecuteSql("select pa_makecode ms_makecode,pa_prodcode ms_prodcode,pa_outboxcode,pa_mothercode,ma_craftcode cr_code from package left join make on pa_makecode = ma_code where pa_outboxcode = '"+input.Text+"' and pa_type = '1'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
+                        {
+                            OperatResult.AppendText("SN:" + input.Text + "所属工单" + dt.Rows[0]["ms_makecode"].ToString() + "与当前工单" + ms_makecode.Text + "不一致\n", Color.Red, input);
+                            return;
+                        }
+                        if (dt.Rows[0]["pa_mothercode"].ToString() != "")
+                        {
+                            OperatResult.AppendText("卡通箱:" + input.Text + "已装栈板" + dt.Rows[0]["pa_mothercode"].ToString() + ",不允许采集\n", Color.Red, input);
+                            return;
+                        }
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        if (sb.Contains(dt.Rows[0]["pa_outboxcode"].ToString()))
+                        {
+                            OperatResult.AppendText("卡通箱:" + input.Text + "已采集\n", Color.Red, input);
+                            return;
+                        }
+                        WeighRecord.Items.Add(dt.Rows[0]["pa_outboxcode"].ToString());
+                        sb.Add(dt.Rows[0]["pa_outboxcode"].ToString());
+                        OperatResult.AppendText("卡通箱:" + input.Text + "采集\n", Color.Green, input);
+                        cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+                    }
+                    else
+                    {
+                        OperatResult.AppendText("卡通箱:" + input.Text + "不存在\n", Color.Red, input);
+                        return;
+                    }
+                }
+            }
+        }
+
+        private void 数据清空_Click(object sender, EventArgs e)
+        {
+            BaseUtil.CleanControls(this.Controls);
+            WeighRecord.Clear();
+            sb.Clear();
+        }
+    }
+}

+ 197 - 0
UAS_MES_JH/FunctionCode/Special/Special_Reset.resx

@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="数据清空.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="数据清空.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="数据清空.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Split.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Split.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Split.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 86 - 25
UAS_MES_JH/FunctionCode/Warehouse/Warehouse_ProductMakeIn.Designer.cs

@@ -36,6 +36,11 @@
             this.label1 = new System.Windows.Forms.Label();
             this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
             this.Search = new System.Windows.Forms.Button();
+            this.label2 = new System.Windows.Forms.Label();
+            this.button1 = new System.Windows.Forms.Button();
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.enddate = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.startdate = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pallecode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.cancel = new UAS_MES_NEW.CustomControl.CustomCheckBox.CustomCheckBox();
@@ -43,12 +48,12 @@
             this.getqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.InOutDetailDGV = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
             this.pim_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pim_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pim_mac = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pim_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pim_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Sp = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pim_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.InOutDetailDGV)).BeginInit();
             this.SuspendLayout();
@@ -120,10 +125,57 @@
             this.Search.Name = "Search";
             this.Search.Size = new System.Drawing.Size(68, 21);
             this.Search.TabIndex = 237;
-            this.Search.Text = "查询";
+            this.Search.Text = "栈板查询";
             this.Search.UseVisualStyleBackColor = true;
             this.Search.Click += new System.EventHandler(this.Search_Click);
             // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(271, 51);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(53, 12);
+            this.label2.TabIndex = 240;
+            this.label2.Text = "日期范围";
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(554, 12);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(75, 23);
+            this.button1.TabIndex = 241;
+            this.button1.Text = "导出";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // enddate
+            // 
+            this.enddate.AllPower = null;
+            this.enddate.BackColor = System.Drawing.Color.White;
+            this.enddate.ID = null;
+            this.enddate.Location = new System.Drawing.Point(494, 46);
+            this.enddate.Name = "enddate";
+            this.enddate.Power = null;
+            this.enddate.Size = new System.Drawing.Size(135, 21);
+            this.enddate.Str = null;
+            this.enddate.Str1 = null;
+            this.enddate.Str2 = null;
+            this.enddate.TabIndex = 239;
+            // 
+            // startdate
+            // 
+            this.startdate.AllPower = null;
+            this.startdate.BackColor = System.Drawing.Color.White;
+            this.startdate.ID = null;
+            this.startdate.Location = new System.Drawing.Point(333, 46);
+            this.startdate.Name = "startdate";
+            this.startdate.Power = null;
+            this.startdate.Size = new System.Drawing.Size(112, 21);
+            this.startdate.Str = null;
+            this.startdate.Str1 = null;
+            this.startdate.Str2 = null;
+            this.startdate.TabIndex = 238;
+            // 
             // pallecode
             // 
             this.pallecode.BackColor = System.Drawing.Color.Transparent;
@@ -190,12 +242,12 @@
             this.InOutDetailDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.InOutDetailDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.pim_outboxcode,
-            this.pim_id,
             this.pim_mac,
             this.pim_prodcode,
             this.pr_detail,
-            this.pr_spec,
-            this.Sp});
+            this.pim_indate,
+            this.Sp,
+            this.pim_id});
             this.InOutDetailDGV.EnableContentClick = true;
             this.InOutDetailDGV.Location = new System.Drawing.Point(11, 78);
             this.InOutDetailDGV.Margin = new System.Windows.Forms.Padding(2);
@@ -207,34 +259,27 @@
             // 
             // pim_outboxcode
             // 
-            this.pim_outboxcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.pim_outboxcode.DataPropertyName = "pim_outboxcode";
             this.pim_outboxcode.HeaderText = "栈板/箱号";
             this.pim_outboxcode.Name = "pim_outboxcode";
             this.pim_outboxcode.ReadOnly = true;
-            // 
-            // pim_id
-            // 
-            this.pim_id.DataPropertyName = "pim_id";
-            this.pim_id.HeaderText = "pim_id";
-            this.pim_id.Name = "pim_id";
-            this.pim_id.Visible = false;
+            this.pim_outboxcode.Width = 90;
             // 
             // pim_mac
             // 
-            this.pim_mac.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.pim_mac.DataPropertyName = "pim_mac";
             this.pim_mac.HeaderText = "SN号";
             this.pim_mac.Name = "pim_mac";
             this.pim_mac.ReadOnly = true;
+            this.pim_mac.Width = 90;
             // 
             // pim_prodcode
             // 
-            this.pim_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.pim_prodcode.DataPropertyName = "pim_prodcode";
             this.pim_prodcode.HeaderText = "产品代码";
             this.pim_prodcode.Name = "pim_prodcode";
             this.pim_prodcode.ReadOnly = true;
+            this.pim_prodcode.Width = 90;
             // 
             // pr_detail
             // 
@@ -244,14 +289,14 @@
             this.pr_detail.ReadOnly = true;
             this.pr_detail.Width = 150;
             // 
-            // pr_spec
+            // pim_indate
             // 
-            this.pr_spec.DataPropertyName = "pr_spec";
-            this.pr_spec.HeaderText = "规格";
-            this.pr_spec.MinimumWidth = 200;
-            this.pr_spec.Name = "pr_spec";
-            this.pr_spec.ReadOnly = true;
-            this.pr_spec.Width = 200;
+            this.pim_indate.DataPropertyName = "pim_indate";
+            this.pim_indate.HeaderText = "日期";
+            this.pim_indate.MinimumWidth = 100;
+            this.pim_indate.Name = "pim_indate";
+            this.pim_indate.ReadOnly = true;
+            this.pim_indate.Width = 200;
             // 
             // Sp
             // 
@@ -261,11 +306,22 @@
             this.Sp.Name = "Sp";
             this.Sp.Width = 2;
             // 
+            // pim_id
+            // 
+            this.pim_id.DataPropertyName = "pim_id";
+            this.pim_id.HeaderText = "pim_id";
+            this.pim_id.Name = "pim_id";
+            this.pim_id.Visible = false;
+            // 
             // Warehouse_ProductMakeIn
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(700, 499);
+            this.Controls.Add(this.button1);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.enddate);
+            this.Controls.Add(this.startdate);
             this.Controls.Add(this.Search);
             this.Controls.Add(this.pallecode);
             this.Controls.Add(this.OperateResult);
@@ -306,12 +362,17 @@
         private System.Windows.Forms.BindingSource bindingSource1;
         private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder pallecode;
         private System.Windows.Forms.Button Search;
+        private CustomControl.TextBoxWithIcon.EnterTextBox startdate;
+        private CustomControl.TextBoxWithIcon.EnterTextBox enddate;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pim_outboxcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pim_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn pim_mac;
         private System.Windows.Forms.DataGridViewTextBoxColumn pim_prodcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pim_indate;
         private System.Windows.Forms.DataGridViewTextBoxColumn Sp;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pim_id;
     }
 }

+ 33 - 8
UAS_MES_JH/FunctionCode/Warehouse/Warehouse_ProductMakeIn.cs

@@ -396,7 +396,7 @@ namespace UAS_MES_NEW.Warehouse
             if (palletBtn.Checked || bigboxBtn.Checked)
             {
                 sql.Clear();
-                sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec from prodiomac ");
+                sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec, pim_indate from prodiomac ");
                 sql.Append("left join product on pr_code=pim_prodcode where pim_outboxcode='" + input.Text + "'and pim_inorout='IN' AND pim_class='完工入库'");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 (bindingSource1.DataSource as DataTable).Merge(dt.Copy());
@@ -405,7 +405,7 @@ namespace UAS_MES_NEW.Warehouse
             else
             {
                 sql.Clear();
-                sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec from prodiomac ");
+                sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec, pim_indate from prodiomac ");
                 sql.Append("left join product on pr_code=pim_prodcode where pim_mac='" + input.Text + "' and pim_inorout='IN' AND pim_class='完工入库'");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 (bindingSource1.DataSource as DataTable).Merge(dt.Copy());
@@ -422,7 +422,7 @@ namespace UAS_MES_NEW.Warehouse
             if (palletBtn.Checked || bigboxBtn.Checked)
             {
                 sql.Clear();
-                sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec from prodiomac ");
+                sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec, pim_indate from prodiomac ");
                 sql.Append("left join product on pr_code=pim_prodcode where pim_outboxcode='" + input.Text + "' and pim_inorout='IN' AND pim_class='完工入库'");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.FillDgvWithDataTable(InOutDetailDGV, BaseUtil.DataTableMerge((DataTable)bindingSource1.DataSource, dt, "pim_id"));
@@ -430,7 +430,7 @@ namespace UAS_MES_NEW.Warehouse
             else
             {
                 sql.Clear();
-                sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec from prodiomac ");
+                sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec, pim_indate from prodiomac ");
                 sql.Append("left join product on pr_code=pim_prodcode where pim_mac='" + input.Text + "' and pim_inorout='IN' AND pim_class='完工入库'");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.FillDgvWithDataTable(InOutDetailDGV, BaseUtil.DataTableMerge((DataTable)bindingSource1.DataSource, dt, "pim_id"));
@@ -466,7 +466,7 @@ namespace UAS_MES_NEW.Warehouse
             getqty.Text = getcount.ToString();
             dh = SystemInf.dh;
             sql.Clear();
-            sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec from prodiomac ");
+            sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec, pim_indate from prodiomac ");
             sql.Append("left join product on pr_code=pim_prodcode where pim_id is null");
             bindingSource1.DataSource = dh.ExecuteSql(sql.GetString(), "select");
             input.Focus();
@@ -514,11 +514,13 @@ namespace UAS_MES_NEW.Warehouse
 
         private void Search_Click(object sender, EventArgs e)
         {
-            if (pallecode.Text.Length >= 1)
+            if (pallecode.Text.Length >= 1||startdate.Text.Length>=1||enddate.Text.Length>=1)
             {
+                string start = startdate.Text.Length >= 1 ? startdate.Text : "0";
+                string end = enddate.Text.Length >= 1 ? enddate.Text : "9999999999";
                 sql.Clear();
-                sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec from prodiomac ");
-                sql.Append("left join product on pr_code=pim_prodcode where pim_outboxcode like  '%" + pallecode.Text + "%' and pim_inorout='IN' AND pim_class='完工入库'");
+                sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec, pim_indate from prodiomac ");
+                sql.Append("left join product on pr_code=pim_prodcode where pim_outboxcode like  '%" + pallecode.Text + "%' and pim_inorout='IN' AND pim_class='完工入库' and to_char(pim_indate,'yyyymmdd') between '"+start+"' and '"+end+ "' order by pim_id asc");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.FillDgvWithDataTable(InOutDetailDGV, dt);
                 input.Enabled = false;
@@ -531,5 +533,28 @@ namespace UAS_MES_NEW.Warehouse
         {
             getqty.Text = InOutDetailDGV.Rows.Count.ToString();
         }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            //Data表示导出数据
+            //Templet表示导出模板
+            folderBrowserDialog1.Description = "选择导出的路径";
+            DialogResult result = folderBrowserDialog1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                string FolderPath = folderBrowserDialog1.SelectedPath;
+                ExcelHandler eh = new ExcelHandler();
+                DataTable dt = (DataTable)InOutDetailDGV.DataSource;
+                //导出Excel的时候返回一个文件名,用户选择是否打开
+                string filePath = eh.ExportExcel(dt, FolderPath);
+                //用户选择导出之后是否立即打开
+                MessageBoxButtons messButton = MessageBoxButtons.YesNo;
+                string openFile = MessageBox.Show(this.ParentForm, "是否打开文件" + filePath, "提示", messButton).ToString();
+                if (openFile == "Yes")
+                {
+                    System.Diagnostics.Process.Start(filePath);
+                }
+            }
+        }
     }
 }

+ 7 - 4
UAS_MES_JH/FunctionCode/Warehouse/Warehouse_ProductMakeIn.resx

@@ -120,10 +120,10 @@
   <metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
-  <metadata name="pim_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
+  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>162, 17</value>
   </metadata>
-  <metadata name="pim_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="pim_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="pim_mac.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -135,10 +135,13 @@
   <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="pim_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="Sp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pim_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 7 - 6
UAS_MES_JH/PublicMethod/LogicHandler.cs

@@ -498,23 +498,24 @@ namespace UAS_MES_NEW.PublicMethod
             {
                 sql.Clear();
                 sql.Append("merge into makeserial using mes_package_view on (v_outboxcode='" + iOutBoxCode + "' and ms_sncode=");
-                sql.Append("v_barcode and ms_makecode=v_makecode and ms_status=2) when matched then update set ms_nextstepcode=ms_stepcode");
+                sql.Append("v_barcode and ms_makecode=v_makecode ) when matched then update set ms_nextstepcode=ms_stepcode");
                 sql.Append(",ms_status=1,ms_sccode='" + iSourceCode + "' ");
             }
             ExeSQL.Add(sql.ToString());
             //更新完工数量
             ExeSQL.Add("update make set ma_madeqty=(select count(1) from makeserial where ms_makecode='" + iMakeCode + "' and ms_status=2) where ma_code='" + iMakeCode + "'");
             //删除StepPassed数据
-            sql.Clear();
-            sql.Append("delete from steppassed where sp_sncode in (select v_barcode from mes_package_view where v_outboxcode='" + iOutBoxCode + "') ");
-            sql.Append("and sp_makecode='" + iMakeCode + "' and sp_stepcode='" + CurrentStep + "'");
-            ExeSQL.Add(sql.ToString());
+            //sql.Clear();
+            //sql.Append("delete from steppassed where sp_sncode in (select v_barcode from mes_package_view where v_outboxcode='" + iOutBoxCode + "') ");
+            //sql.Append("and sp_makecode='" + iMakeCode + "' and sp_stepcode='" + CurrentStep + "'");
+            //ExeSQL.Add(sql.ToString());
             //更新大箱或栈板的母箱编号为空
             ExeSQL.Add("update package set pa_mothercode='' where pa_outboxcode in(select PD_INNERBOXCODE from package left join packagedetail on pa_id=pd_paid where pa_outboxcode='" + iOutBoxCode + "')");
             //删除从表明细
             ExeSQL.Add("delete from packagedetail where pd_paid=(select pa_id from package where pa_outboxcode='" + iOutBoxCode + "')");
             //设置大箱或栈板的已装数量为0
-            ExeSQL.Add("update package set pa_totalqty=0,pa_status=0,pa_currentqty=0,pa_packageqty=0 where pa_outboxcode='" + iOutBoxCode + "'");
+            //ExeSQL.Add("update package set pa_totalqty=0,pa_status=0,pa_currentqty=0,pa_packageqty=0 where pa_outboxcode='" + iOutBoxCode + "'");
+            ExeSQL.Add("delete package  where pa_outboxcode='" + iOutBoxCode + "'");
             dh.ExecuteSQLTran(ExeSQL.ToArray());
         }
 

+ 27 - 1
UAS_MES_JH/UAS_MES_JH.csproj

@@ -538,6 +538,12 @@
     <Compile Include="FunctionCode\Make\Make_SmtTestCollection.Designer.cs">
       <DependentUpon>Make_SmtTestCollection.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_CheckQrcode.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_CheckQrcode.Designer.cs">
+      <DependentUpon>Make_CheckQrcode.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Packing\Packing_BigBoxCollection.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -850,6 +856,12 @@
     <Compile Include="FunctionCode\Query\Query_SpecialReport.Designer.cs">
       <DependentUpon>Query_SpecialReport.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\Query_Commandlog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_Commandlog.Designer.cs">
+      <DependentUpon>Query_Commandlog.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\SMT\SMT_ChangeLine.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -886,6 +898,12 @@
     <Compile Include="FunctionCode\SMT\SMT_WaringSetting.Designer.cs">
       <DependentUpon>SMT_WaringSetting.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Special\Special_Reset.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_Reset.Designer.cs">
+      <DependentUpon>Special_Reset.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Special\Special_ChecknoSpitBox.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1238,6 +1256,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_SmtTestCollection.resx">
       <DependentUpon>Make_SmtTestCollection.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_CheckQrcode.resx">
+      <DependentUpon>Make_CheckQrcode.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Packing\Packing_BigBoxCollection.resx">
       <DependentUpon>Packing_BigBoxCollection.cs</DependentUpon>
     </EmbeddedResource>
@@ -1394,6 +1415,9 @@
     <EmbeddedResource Include="FunctionCode\Query\Query_SpecialReport.resx">
       <DependentUpon>Query_SpecialReport.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_Commandlog.resx">
+      <DependentUpon>Query_Commandlog.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\SMT\SMT_ChangeLine.resx">
       <DependentUpon>SMT_ChangeLine.cs</DependentUpon>
     </EmbeddedResource>
@@ -1412,6 +1436,9 @@
     <EmbeddedResource Include="FunctionCode\SMT\SMT_WaringSetting.resx">
       <DependentUpon>SMT_WaringSetting.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_Reset.resx">
+      <DependentUpon>Special_Reset.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_ChecknoSpitBox.resx">
       <DependentUpon>Special_ChecknoSpitBox.cs</DependentUpon>
     </EmbeddedResource>
@@ -1501,7 +1528,6 @@
     <None Include="App.config">
       <SubType>Designer</SubType>
     </None>
-    <None Include="ClassDiagram1.cd" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>