Browse Source

正通仁禾项目提交

caosy 2 years ago
parent
commit
b6ba49bd89

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

@@ -142,7 +142,7 @@ namespace UAS_MES_NEW.Make
                     }
                     else OperateResult.AppendText(">>工单号不能为空\n", Color.Red, pr_batchnum);
                 }
-                else OperateResult.AppendText(">>物料批号不允许为空\n", Color.Red);
+                else { };
             }
         }
 

+ 3 - 3
UAS_MES_ZT/FunctionCode/Make/Make_StepReport.cs

@@ -271,7 +271,7 @@ namespace UAS_MES_NEW.Make
                 sql.Clear();
                 sql.Append(" select wm_concat(mm_prodcode)mm_prodcode,count(1)cn from (select MAX(mm_oneuseqty) baseqty,mm_prodcode from make left join makematerial on mm_maid=ma_id left join Product on mm_prodcode=pr_code ");
                 sql.Append(" where ma_prodcode='"+ma_prodcode.Text+"' and ma_code='"+ma_code.Text+"'  and pr_mncode='"+User.CurrentStepCode+ "'and mm_oneuseqty>0  GROUP BY mm_prodcode) B left join  ");
-                sql.Append(" (select sum(nvl(mss_remain,0))remain,mss_fprodcode from makesourcestock  where  mss_linecode='"+User.UserLineCode+"' and mss_stepcode='" + User.CurrentStepCode + "' group by mss_fprodcode)A  ");
+                sql.Append(" (select sum(nvl(mss_remain,0))remain,mss_fprodcode from makesourcestock  where  mss_linecode='"+User.UserLineCode+"' and mss_stepcode='" + User.CurrentStepCode + "' and mss_makecode = '"+ma_code.Text+"' group by mss_fprodcode)A  ");
                 sql.Append(" on mm_prodcode=mss_fprodcode where (nvl(mss_fprodcode,' ')=' ' or  A.remain<b.baseqty*"+(ok+ng)+") AND rownum<20  ");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (int.Parse(dt.Rows[0]["cn"].ToString()) > 0)
@@ -282,14 +282,14 @@ namespace UAS_MES_NEW.Make
 
                 sql.Clear();
                 sql.Append(" SELECT mss_fprodcode,max(mss_baseqty)*"+(ok+ng)+ " baseqty,count(1)cn  FROM makesourcestock where mss_linecode='" + User.UserLineCode + "'  ");
-                sql.Append(" and mss_stepcode='" + User.CurrentStepCode + "' and exists (select 1 from make left join makematerial on mm_maid=ma_id left join Product on mm_prodcode=pr_code where ma_prodcode='" + ma_prodcode.Text + "' and ma_code='" + ma_code.Text + "' and pr_mncode='" + User.CurrentStepCode + "' and mss_fprodcode=mm_prodcode)  ");
+                sql.Append(" and mss_stepcode='" + User.CurrentStepCode + "' and mss_makecode = '" + ma_code.Text + "' and exists (select 1 from make left join makematerial on mm_maid=ma_id left join Product on mm_prodcode=pr_code where ma_prodcode='" + ma_prodcode.Text + "' and ma_code='" + ma_code.Text + "' and pr_mncode='" + User.CurrentStepCode + "' and mss_fprodcode=mm_prodcode)  ");
                 sql.Append(" and mss_remain>0  group by mss_fprodcode  ");
                 dta = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 for (int i = 0; i < dta.Rows.Count; i++)
                 {
                     double baseqty = double.Parse(dta.Rows[i]["baseqty"].ToString());
                     sql.Clear();
-                    sql.Append(" select mss_id,mss_remain,mss_barcode,mss_prodcode,mss_baseqty from makesourcestock where mss_linecode='" + User.UserLineCode + "' AND mss_stepcode='" + User.CurrentStepCode + "'  ");
+                    sql.Append(" select mss_id,mss_remain,mss_barcode,mss_prodcode,mss_baseqty from makesourcestock where mss_linecode='" + User.UserLineCode + "' AND mss_stepcode='" + User.CurrentStepCode + "'  and mss_makecode = '" + ma_code.Text + "' ");
                     sql.Append(" and mss_fprodcode='"+dta.Rows[i]["mss_fprodcode"].ToString() +"' AND mss_invalidtime is null order by mss_id asc  ");
                     dtb = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     for (int j = 0; j < dtb.Rows.Count; j++)

+ 1 - 0
UAS_MES_ZT/FunctionCode/Make/Make_TestCollection.cs

@@ -358,6 +358,7 @@ namespace UAS_MES_NEW.Make
                 ChoosedRejectList.Items.Add(lvi);
             }
             ChoosedRejectList.EndUpdate();
+            
         }
 
         /// <summary>

+ 150 - 0
UAS_MES_ZT/FunctionCode/Query/Query_BadSearch.Designer.cs

@@ -0,0 +1,150 @@
+namespace UAS_MES_NEW.Query
+{
+    partial class Query_BadSearch
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.headBar1 = new UAS_MES_NEW.CustomControl.HeadBar();
+            this.BatchProductDGV = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.msd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_msid = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_badname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.msd_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DeleteRow = new System.Windows.Forms.DataGridViewImageColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // headBar1
+            // 
+            this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.headBar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.headBar1.Location = new System.Drawing.Point(0, 0);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(6);
+            this.headBar1.Name = "headBar1";
+            this.headBar1.Size = new System.Drawing.Size(929, 47);
+            this.headBar1.TabIndex = 0;
+            this.headBar1.Title = null;
+            this.headBar1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.headBar1_MouseDown);
+            // 
+            // BatchProductDGV
+            // 
+            this.BatchProductDGV.AllowUserToAddRows = false;
+            this.BatchProductDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.BatchProductDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.msd_id,
+            this.msd_msid,
+            this.msd_badname,
+            this.msd_qty,
+            this.msd_indate,
+            this.DeleteRow});
+            this.BatchProductDGV.EnableContentClick = true;
+            this.BatchProductDGV.Location = new System.Drawing.Point(13, 57);
+            this.BatchProductDGV.Margin = new System.Windows.Forms.Padding(4);
+            this.BatchProductDGV.Name = "BatchProductDGV";
+            this.BatchProductDGV.RowTemplate.Height = 23;
+            this.BatchProductDGV.Size = new System.Drawing.Size(894, 560);
+            this.BatchProductDGV.TabIndex = 175;
+            this.BatchProductDGV.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.BatchProductDGV_CellContentClick66);
+            // 
+            // msd_id
+            // 
+            this.msd_id.DataPropertyName = "msd_id";
+            this.msd_id.HeaderText = "ID";
+            this.msd_id.Name = "msd_id";
+            this.msd_id.Visible = false;
+            // 
+            // msd_msid
+            // 
+            this.msd_msid.DataPropertyName = "msd_msid";
+            this.msd_msid.HeaderText = "";
+            this.msd_msid.Name = "msd_msid";
+            this.msd_msid.ReadOnly = true;
+            this.msd_msid.Visible = false;
+            // 
+            // msd_badname
+            // 
+            this.msd_badname.DataPropertyName = "msd_badname";
+            this.msd_badname.HeaderText = "不良现象";
+            this.msd_badname.Name = "msd_badname";
+            this.msd_badname.ReadOnly = true;
+            // 
+            // msd_qty
+            // 
+            this.msd_qty.DataPropertyName = "msd_qty";
+            this.msd_qty.HeaderText = "不良数";
+            this.msd_qty.Name = "msd_qty";
+            this.msd_qty.ReadOnly = true;
+            // 
+            // msd_indate
+            // 
+            this.msd_indate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.msd_indate.DataPropertyName = "msd_indate";
+            this.msd_indate.HeaderText = "录入时间";
+            this.msd_indate.MinimumWidth = 150;
+            this.msd_indate.Name = "msd_indate";
+            this.msd_indate.ReadOnly = true;
+            this.msd_indate.Width = 150;
+            // 
+            // DeleteRow
+            // 
+            this.DeleteRow.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.DeleteRow.HeaderText = "删除";
+            this.DeleteRow.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeleteRow.Name = "DeleteRow";
+            // 
+            // Query_BadSearch
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(929, 630);
+            this.Controls.Add(this.BatchProductDGV);
+            this.Controls.Add(this.headBar1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(3);
+            this.Name = "Query_BadSearch";
+            this.Tag = "ShowDialogWindow";
+            this.Text = "Query_BadSearch";
+            this.Load += new System.EventHandler(this.Warehouse_ProdDetail_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.BatchProductDGV)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private CustomControl.HeadBar headBar1;
+        private CustomControl.DataGrid_View.DataGridViewWithSerialNum BatchProductDGV;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_msid;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_badname;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_qty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn msd_indate;
+        private System.Windows.Forms.DataGridViewImageColumn DeleteRow;
+    }
+}

+ 93 - 0
UAS_MES_ZT/FunctionCode/Query/Query_BadSearch.cs

@@ -0,0 +1,93 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Query
+{
+    public partial class Query_BadSearch : CustomControl.BaseForm.BaseForm
+    {
+        //所有用到了headBar的部分都需要这段代码
+        [DllImport("user32.dll")]
+        public static extern bool ReleaseCapture();
+
+        [DllImport("user32.dll")]
+        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
+
+        [DllImport("user32.dll", EntryPoint = "GetWindowLong", CharSet = CharSet.Auto)]
+        public static extern int GetWindowLong(HandleRef hWnd, int nIndex);
+
+        [DllImport("user32.dll", EntryPoint = "SetWindowLong", CharSet = CharSet.Auto)]
+        public static extern IntPtr SetWindowLong(HandleRef hWnd, int nIndex, int dwNewLong);
+
+        public const int WM_SYSCOMMAND = 0x0112;
+        public const int SC_MOVE = 0xF010;
+        public const int HTCAPTION = 0x0002;
+
+
+        DataHelper dh;
+        LogStringBuilder sql = new LogStringBuilder();
+
+
+        string msid;
+        double badqty;
+        string macode;
+
+        public Query_BadSearch(string msid, double badqty, string macode)
+        {
+            dh = SystemInf.dh;
+            InitializeComponent();
+            this.msid = msid;
+            this.badqty = badqty;
+            this.macode = macode;
+        }
+
+        private void Warehouse_ProdDetail_Load(object sender, EventArgs e)
+        {
+            
+            FillDataGridView();
+        }
+
+        private void headBar1_MouseDown(object sender, MouseEventArgs e)
+        {
+            ReleaseCapture();
+            SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
+        }
+
+        private void BatchProductDGV_CellContentClick66(object sender, DataGridViewCellEventArgs e)
+        {
+            if (BatchProductDGV.Columns[e.ColumnIndex].Name == "DeleteRow")
+            {
+                if (e.RowIndex >= 0)
+                {
+                    string id = BatchProductDGV.Rows[e.RowIndex].Cells["msd_id"].Value.ToString();
+                 
+                }
+            }
+        }
+
+        private void FillDataGridView()
+        {
+            sql.Clear();
+            sql.Append("select msd_id,msd_msid,msd_badname,msd_qty,msd_indate,msd_status,msd_stepcode from MES_STEPREPORTdet ");
+            sql.Append("where msd_msid = '" + msid + "' and msd_stepcode = '" + User.CurrentStepCode + "' and msd_status = 0");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
+        }
+
+      
+
+       
+
+
+
+    }
+}

+ 138 - 0
UAS_MES_ZT/FunctionCode/Query/Query_BadSearch.resx

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

+ 129 - 109
UAS_MES_ZT/FunctionCode/Query/Query_DateRate.Designer.cs

@@ -30,7 +30,6 @@
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Query_DateRate));
             this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
-            this.BeginDate = new System.Windows.Forms.DateTimePicker();
             this.EndDate = new System.Windows.Forms.DateTimePicker();
             this.label3 = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
@@ -38,6 +37,15 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
             this.Data = new System.Windows.Forms.DataGridView();
+            this.st_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_ifcalc = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sp_stepcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.OKQTY = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.AGOKQTY = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.SNQTY = new System.Windows.Forms.DataGridViewLinkColumn();
+            this.合计 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.报废 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.OKRATE = 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();
@@ -50,44 +58,28 @@
             this.wc_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.detno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.st_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.sp_stepcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.OKQTY = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.SNQTY = new System.Windows.Forms.DataGridViewLinkColumn();
-            this.合计 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.报废 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.OKRATE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.BeginDate = new System.Windows.Forms.DateTimePicker();
             ((System.ComponentModel.ISupportInitialize)(this.Data)).BeginInit();
             this.SuspendLayout();
             // 
-            // BeginDate
-            // 
-            this.BeginDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
-            this.BeginDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
-            this.BeginDate.Location = new System.Drawing.Point(546, 87);
-            this.BeginDate.Name = "BeginDate";
-            this.BeginDate.Size = new System.Drawing.Size(353, 35);
-            this.BeginDate.TabIndex = 13;
-            this.BeginDate.Value = new System.DateTime(2021, 2, 27, 13, 47, 0, 0);
-            // 
             // EndDate
             // 
             this.EndDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
             this.EndDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
-            this.EndDate.Location = new System.Drawing.Point(905, 87);
+            this.EndDate.Location = new System.Drawing.Point(679, 65);
+            this.EndDate.Margin = new System.Windows.Forms.Padding(2);
             this.EndDate.Name = "EndDate";
-            this.EndDate.Size = new System.Drawing.Size(353, 35);
+            this.EndDate.Size = new System.Drawing.Size(266, 28);
             this.EndDate.TabIndex = 14;
             // 
             // label3
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(443, 86);
-            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Location = new System.Drawing.Point(332, 64);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(82, 41);
+            this.label3.Size = new System.Drawing.Size(62, 31);
             this.label3.TabIndex = 15;
             this.label3.Text = "日期";
             // 
@@ -95,10 +87,10 @@
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(443, 14);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_makecode_label.Location = new System.Drawing.Point(332, 10);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(146, 41);
+            this.ms_makecode_label.Size = new System.Drawing.Size(110, 31);
             this.ms_makecode_label.TabIndex = 212;
             this.ms_makecode_label.Text = "产品编号";
             // 
@@ -106,10 +98,10 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(15, 14);
-            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Location = new System.Drawing.Point(11, 10);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(82, 41);
+            this.label1.Size = new System.Drawing.Size(62, 31);
             this.label1.TabIndex = 214;
             this.label1.Text = "车间";
             // 
@@ -117,10 +109,10 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(936, 15);
-            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Location = new System.Drawing.Point(702, 11);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(114, 41);
+            this.label2.Size = new System.Drawing.Size(86, 31);
             this.label2.TabIndex = 216;
             this.label2.Text = "工单号";
             // 
@@ -128,10 +120,10 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(16, 80);
-            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Location = new System.Drawing.Point(12, 60);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(82, 41);
+            this.label4.Size = new System.Drawing.Size(62, 31);
             this.label4.TabIndex = 218;
             this.label4.Text = "线别";
             // 
@@ -140,21 +132,88 @@
             this.Data.AllowUserToAddRows = false;
             this.Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.Data.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.detno,
             this.st_name,
+            this.st_ifcalc,
             this.sp_stepcode,
             this.OKQTY,
+            this.AGOKQTY,
             this.SNQTY,
             this.合计,
             this.报废,
             this.OKRATE});
-            this.Data.Location = new System.Drawing.Point(22, 146);
+            this.Data.Location = new System.Drawing.Point(16, 110);
+            this.Data.Margin = new System.Windows.Forms.Padding(2);
             this.Data.Name = "Data";
             this.Data.RowTemplate.Height = 37;
-            this.Data.Size = new System.Drawing.Size(1744, 917);
+            this.Data.Size = new System.Drawing.Size(1308, 688);
             this.Data.TabIndex = 220;
             this.Data.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.Data_CellContentClick);
             // 
+            // st_name
+            // 
+            this.st_name.DataPropertyName = "st_name";
+            this.st_name.HeaderText = "工序";
+            this.st_name.Name = "st_name";
+            this.st_name.ReadOnly = true;
+            // 
+            // st_ifcalc
+            // 
+            this.st_ifcalc.DataPropertyName = "st_ifcalc";
+            this.st_ifcalc.HeaderText = "st_ifcalc";
+            this.st_ifcalc.Name = "st_ifcalc";
+            this.st_ifcalc.Visible = false;
+            // 
+            // sp_stepcode
+            // 
+            this.sp_stepcode.DataPropertyName = "sp_stepcode";
+            this.sp_stepcode.HeaderText = "工序编号";
+            this.sp_stepcode.Name = "sp_stepcode";
+            this.sp_stepcode.Visible = false;
+            this.sp_stepcode.Width = 5;
+            // 
+            // OKQTY
+            // 
+            this.OKQTY.DataPropertyName = "OKQTY";
+            this.OKQTY.HeaderText = "一次通过";
+            this.OKQTY.Name = "OKQTY";
+            this.OKQTY.ReadOnly = true;
+            // 
+            // AGOKQTY
+            // 
+            this.AGOKQTY.DataPropertyName = "AGOKQTY";
+            this.AGOKQTY.HeaderText = "再次通过";
+            this.AGOKQTY.Name = "AGOKQTY";
+            this.AGOKQTY.ReadOnly = true;
+            // 
+            // SNQTY
+            // 
+            this.SNQTY.DataPropertyName = "NGQTY";
+            this.SNQTY.HeaderText = "不良";
+            this.SNQTY.Name = "SNQTY";
+            this.SNQTY.ReadOnly = true;
+            this.SNQTY.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.SNQTY.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // 合计
+            // 
+            this.合计.DataPropertyName = "SUMQTY";
+            this.合计.HeaderText = "合计";
+            this.合计.Name = "合计";
+            this.合计.ReadOnly = true;
+            // 
+            // 报废
+            // 
+            this.报废.DataPropertyName = "报废";
+            this.报废.HeaderText = "报废";
+            this.报废.Name = "报废";
+            this.报废.ReadOnly = true;
+            // 
+            // OKRATE
+            // 
+            this.OKRATE.DataPropertyName = "OKRATE";
+            this.OKRATE.HeaderText = "良率";
+            this.OKRATE.Name = "OKRATE";
+            // 
             // dataGridViewTextBoxColumn1
             // 
             this.dataGridViewTextBoxColumn1.DataPropertyName = "detno";
@@ -205,14 +264,14 @@
             this.li_code.DBTitle = "";
             this.li_code.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.li_code.FormName = null;
-            this.li_code.Location = new System.Drawing.Point(142, 81);
-            this.li_code.Margin = new System.Windows.Forms.Padding(6);
+            this.li_code.Location = new System.Drawing.Point(106, 61);
+            this.li_code.Margin = new System.Windows.Forms.Padding(4);
             this.li_code.Name = "li_code";
             this.li_code.Power = "";
             this.li_code.ReturnData = null;
             this.li_code.SelectField = null;
             this.li_code.SetValueField = null;
-            this.li_code.Size = new System.Drawing.Size(282, 46);
+            this.li_code.Size = new System.Drawing.Size(212, 34);
             this.li_code.TabIndex = 219;
             this.li_code.TableName = null;
             this.li_code.Tag = "makecode";
@@ -226,14 +285,14 @@
             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(1062, 16);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ma_code.Location = new System.Drawing.Point(796, 12);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
             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(277, 46);
+            this.ma_code.Size = new System.Drawing.Size(208, 34);
             this.ma_code.TabIndex = 217;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "makecode";
@@ -247,14 +306,14 @@
             this.wc_code.DBTitle = "";
             this.wc_code.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.wc_code.FormName = null;
-            this.wc_code.Location = new System.Drawing.Point(142, 14);
-            this.wc_code.Margin = new System.Windows.Forms.Padding(6);
+            this.wc_code.Location = new System.Drawing.Point(106, 10);
+            this.wc_code.Margin = new System.Windows.Forms.Padding(4);
             this.wc_code.Name = "wc_code";
             this.wc_code.Power = "";
             this.wc_code.ReturnData = null;
             this.wc_code.SelectField = null;
             this.wc_code.SetValueField = null;
-            this.wc_code.Size = new System.Drawing.Size(282, 46);
+            this.wc_code.Size = new System.Drawing.Size(212, 34);
             this.wc_code.TabIndex = 215;
             this.wc_code.TableName = null;
             this.wc_code.Tag = "makecode";
@@ -268,14 +327,14 @@
             this.pr_code.DBTitle = "";
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.pr_code.FormName = null;
-            this.pr_code.Location = new System.Drawing.Point(600, 15);
-            this.pr_code.Margin = new System.Windows.Forms.Padding(6);
+            this.pr_code.Location = new System.Drawing.Point(450, 11);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(4);
             this.pr_code.Name = "pr_code";
             this.pr_code.Power = "";
             this.pr_code.ReturnData = null;
             this.pr_code.SelectField = null;
             this.pr_code.SetValueField = null;
-            this.pr_code.Size = new System.Drawing.Size(282, 46);
+            this.pr_code.Size = new System.Drawing.Size(212, 34);
             this.pr_code.TabIndex = 213;
             this.pr_code.TableName = null;
             this.pr_code.Tag = "makecode";
@@ -288,74 +347,34 @@
             this.Export.DownImage = ((System.Drawing.Image)(resources.GetObject("Export.DownImage")));
             this.Export.Image = null;
             this.Export.IsShowBorder = true;
-            this.Export.Location = new System.Drawing.Point(1307, 76);
-            this.Export.Margin = new System.Windows.Forms.Padding(6);
+            this.Export.Location = new System.Drawing.Point(980, 57);
+            this.Export.Margin = new System.Windows.Forms.Padding(4);
             this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
             this.Export.Name = "Export";
             this.Export.NormalImage = ((System.Drawing.Image)(resources.GetObject("Export.NormalImage")));
             this.Export.Power = null;
-            this.Export.Size = new System.Drawing.Size(150, 56);
+            this.Export.Size = new System.Drawing.Size(112, 42);
             this.Export.TabIndex = 0;
             this.Export.Text = "查询";
             this.Export.UseVisualStyleBackColor = false;
             this.Export.Click += new System.EventHandler(this.Export_Click);
             // 
-            // detno
-            // 
-            this.detno.DataPropertyName = "detno";
-            this.detno.HeaderText = "detno";
-            this.detno.Name = "detno";
-            // 
-            // st_name
-            // 
-            this.st_name.DataPropertyName = "st_name";
-            this.st_name.HeaderText = "工序";
-            this.st_name.Name = "st_name";
-            // 
-            // sp_stepcode
-            // 
-            this.sp_stepcode.DataPropertyName = "sp_stepcode";
-            this.sp_stepcode.HeaderText = "工序编号";
-            this.sp_stepcode.Name = "sp_stepcode";
-            this.sp_stepcode.Width = 5;
-            // 
-            // OKQTY
-            // 
-            this.OKQTY.DataPropertyName = "OKQTY";
-            this.OKQTY.HeaderText = "通过";
-            this.OKQTY.Name = "OKQTY";
-            // 
-            // SNQTY
-            // 
-            this.SNQTY.DataPropertyName = "NGQTY";
-            this.SNQTY.HeaderText = "不良";
-            this.SNQTY.Name = "SNQTY";
-            this.SNQTY.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.SNQTY.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // 合计
-            // 
-            this.合计.DataPropertyName = "SUMQTY";
-            this.合计.HeaderText = "合计";
-            this.合计.Name = "合计";
-            // 
-            // 报废
-            // 
-            this.报废.DataPropertyName = "报废";
-            this.报废.HeaderText = "报废";
-            this.报废.Name = "报废";
-            // 
-            // OKRATE
+            // BeginDate
             // 
-            this.OKRATE.DataPropertyName = "OKRATE";
-            this.OKRATE.HeaderText = "直通率";
-            this.OKRATE.Name = "OKRATE";
+            this.BeginDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+            this.BeginDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+            this.BeginDate.Location = new System.Drawing.Point(409, 64);
+            this.BeginDate.Margin = new System.Windows.Forms.Padding(2);
+            this.BeginDate.Name = "BeginDate";
+            this.BeginDate.Size = new System.Drawing.Size(266, 28);
+            this.BeginDate.TabIndex = 221;
             // 
             // Query_DateRate
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1789, 1075);
+            this.ClientSize = new System.Drawing.Size(1342, 806);
+            this.Controls.Add(this.BeginDate);
             this.Controls.Add(this.Data);
             this.Controls.Add(this.li_code);
             this.Controls.Add(this.label4);
@@ -367,14 +386,14 @@
             this.Controls.Add(this.ms_makecode_label);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.EndDate);
-            this.Controls.Add(this.BeginDate);
             this.Controls.Add(this.Export);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Query_DateRate";
             this.Tag = "Query!DateRate";
             this.Text = "Query_DateRate";
             this.Load += new System.EventHandler(this.Query_SpecialReport_Load);
+            this.SizeChanged += new System.EventHandler(this.Query_DateRate_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.Data)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
@@ -385,7 +404,6 @@
 
         private CustomControl.ButtonUtil.NormalButton Export;
         private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
-        private System.Windows.Forms.DateTimePicker BeginDate;
         private System.Windows.Forms.DateTimePicker EndDate;
         private System.Windows.Forms.Label label3;
         private CustomControl.TextBoxWithIcon.SearchTextBox pr_code;
@@ -404,13 +422,15 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
-        private System.Windows.Forms.DataGridViewTextBoxColumn detno;
         private System.Windows.Forms.DataGridViewTextBoxColumn st_name;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_ifcalc;
         private System.Windows.Forms.DataGridViewTextBoxColumn sp_stepcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn OKQTY;
+        private System.Windows.Forms.DataGridViewTextBoxColumn AGOKQTY;
         private System.Windows.Forms.DataGridViewLinkColumn SNQTY;
         private System.Windows.Forms.DataGridViewTextBoxColumn 合计;
         private System.Windows.Forms.DataGridViewTextBoxColumn 报废;
         private System.Windows.Forms.DataGridViewTextBoxColumn OKRATE;
+        private System.Windows.Forms.DateTimePicker BeginDate;
     }
 }

+ 26 - 6
UAS_MES_ZT/FunctionCode/Query/Query_DateRate.cs

@@ -14,10 +14,13 @@ namespace UAS_MES_NEW.Query
 {
     public partial class Query_DateRate : Form
     {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
 
 
         string querysql = "";
 
+        string condition;
+
         DataHelper dh = SystemInf.dh;
 
         DataTable Dbfind;
@@ -29,9 +32,11 @@ namespace UAS_MES_NEW.Query
 
         private void Query_SpecialReport_Load(object sender, EventArgs e)
         {
+
+            asc.controllInitializeSize(this);
             //工单号放大镜配置
             pr_code.TableName = " product ";
-            pr_code.SelectField = "pr_code # 产品编号,pr_detail # 产品名称,pr_spec # 型号";
+            pr_code.SelectField = "pr_code # 产品编号,pr_detail # 产品名称,pr_orispeccode # 型号";
             pr_code.FormName = Name;
             pr_code.SetValueField = new string[] { "pr_code" };
             pr_code.Condition = "pr_statuscode='AUDITED'";
@@ -48,13 +53,13 @@ namespace UAS_MES_NEW.Query
             li_code.SelectField = "li_code # 车间编号,li_name # 车间名称";
             li_code.FormName = Name;
             li_code.SetValueField = new string[] { "li_code" };
-            li_code.Condition = "li_statuscode='STARTED'";
+            li_code.Condition = "li_statuscode='AUDITED'";
             li_code.DbChange += pr_code_DbChange;
 
-            ma_code.TableName = " make left join product on ma_prodcode=pr_code";
-            ma_code.SelectField = "ma_code # 工单编号,ma_prodcode # 产品编号,pr_spec # 型号";
+            ma_code.TableName = " make left join product on ma_prodcode=pr_code left join workcenter on ma_wccode = wc_code";
+            ma_code.SelectField = "ma_code # 工单编号,ma_prodcode # 产品编号,pr_spec # 型号,wc_code # 工作中心";
             ma_code.FormName = Name;
-            ma_code.SetValueField = new string[] { "ma_code" };
+            ma_code.SetValueField = new string[] { "ma_code", "wc_code" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += pr_code_DbChange;
         }
@@ -70,8 +75,14 @@ namespace UAS_MES_NEW.Query
             {
                 MessageBox.Show("结束日期不能小于起始日期");
             }
+            condition = "";
+            condition = " sp_date between to_date('" + BeginDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + EndDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss') ";
+
+            if (wc_code.Text != "")
+            {
+                condition += " and sp_wccode = '" + wc_code.Text + "'";
+            }
 
-            string condition = " sp_date between to_date('" + BeginDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + EndDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss') ";
             if (pr_code.Text != "")
             {
                 condition += " and sp_prodcode = '" + pr_code.Text + "'";
@@ -85,8 +96,12 @@ namespace UAS_MES_NEW.Query
                 condition += " and sp_linecode = '" + li_code.Text + "'";
             }
             string v_sql = "";
+            //string v_sql1 = "";
             LogicHandler.GetQuerySQL(condition, "直通率", out v_sql);
             DataTable dt = (DataTable)dh.ExecuteSql(v_sql, "select");
+            DataRow dr = dt.NewRow();
+            dr[3] = "ALL";
+            dt.Rows.InsertAt(dr, dt.Rows.Count);
             BaseUtil.FillDgvWithDataTable(Data, dt);
         }
 
@@ -112,5 +127,10 @@ namespace UAS_MES_NEW.Query
             }
 
         }
+
+        private void Query_DateRate_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
     }
 }

+ 5 - 2
UAS_MES_ZT/FunctionCode/Query/Query_DateRate.resx

@@ -120,10 +120,10 @@
   <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
-  <metadata name="detno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="st_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="st_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="st_ifcalc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="sp_stepcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -132,6 +132,9 @@
   <metadata name="OKQTY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="AGOKQTY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="SNQTY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 424 - 0
UAS_MES_ZT/FunctionCode/Query/Query_DateRate2.Designer.cs

@@ -0,0 +1,424 @@
+namespace UAS_MES_NEW.Query
+{
+    partial class Query_DateRate2
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Query_DateRate));
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.BeginDate = new System.Windows.Forms.DateTimePicker();
+            this.EndDate = new System.Windows.Forms.DateTimePicker();
+            this.label3 = new System.Windows.Forms.Label();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.Data = new System.Windows.Forms.DataGridView();
+            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.li_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.wc_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.sp_stepname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.st_ifcalc = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.OKQTY = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.AGOKQTY = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.SNQTY = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.合计 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.报废 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.OKRATE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.Data)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // BeginDate
+            // 
+            this.BeginDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+            this.BeginDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+            this.BeginDate.Location = new System.Drawing.Point(410, 65);
+            this.BeginDate.Margin = new System.Windows.Forms.Padding(2);
+            this.BeginDate.Name = "BeginDate";
+            this.BeginDate.Size = new System.Drawing.Size(266, 28);
+            this.BeginDate.TabIndex = 13;
+            this.BeginDate.Value = new System.DateTime(2021, 2, 27, 13, 47, 0, 0);
+            // 
+            // EndDate
+            // 
+            this.EndDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
+            this.EndDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
+            this.EndDate.Location = new System.Drawing.Point(679, 65);
+            this.EndDate.Margin = new System.Windows.Forms.Padding(2);
+            this.EndDate.Name = "EndDate";
+            this.EndDate.Size = new System.Drawing.Size(266, 28);
+            this.EndDate.TabIndex = 14;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(332, 64);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(62, 31);
+            this.label3.TabIndex = 15;
+            this.label3.Text = "日期";
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(332, 10);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(110, 31);
+            this.ms_makecode_label.TabIndex = 212;
+            this.ms_makecode_label.Text = "产品编号";
+            // 
+            // 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(11, 10);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(62, 31);
+            this.label1.TabIndex = 214;
+            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(702, 11);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(86, 31);
+            this.label2.TabIndex = 216;
+            this.label2.Text = "工单号";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(12, 60);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(62, 31);
+            this.label4.TabIndex = 218;
+            this.label4.Text = "线别";
+            // 
+            // Data
+            // 
+            this.Data.AllowUserToAddRows = false;
+            this.Data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.Data.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.sp_stepname,
+            this.st_ifcalc,
+            this.OKQTY,
+            this.AGOKQTY,
+            this.SNQTY,
+            this.合计,
+            this.报废,
+            this.OKRATE});
+            this.Data.Location = new System.Drawing.Point(16, 110);
+            this.Data.Margin = new System.Windows.Forms.Padding(2);
+            this.Data.Name = "Data";
+            this.Data.RowTemplate.Height = 37;
+            this.Data.Size = new System.Drawing.Size(1308, 688);
+            this.Data.TabIndex = 220;
+            this.Data.CellContentDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.Data_CellContentDoubleClick);
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "detno";
+            this.dataGridViewTextBoxColumn1.HeaderText = "detno";
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "sp_stepname";
+            this.dataGridViewTextBoxColumn2.HeaderText = "工序";
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "OKQTY";
+            this.dataGridViewTextBoxColumn3.HeaderText = "通过";
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "NGQTY";
+            this.dataGridViewTextBoxColumn4.HeaderText = "不良";
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            // 
+            // dataGridViewTextBoxColumn5
+            // 
+            this.dataGridViewTextBoxColumn5.DataPropertyName = "SUMQTY";
+            this.dataGridViewTextBoxColumn5.HeaderText = "合计";
+            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            // 
+            // dataGridViewTextBoxColumn6
+            // 
+            this.dataGridViewTextBoxColumn6.DataPropertyName = "报废";
+            this.dataGridViewTextBoxColumn6.HeaderText = "报废";
+            this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            // 
+            // dataGridViewTextBoxColumn7
+            // 
+            this.dataGridViewTextBoxColumn7.DataPropertyName = "OKRATE";
+            this.dataGridViewTextBoxColumn7.HeaderText = "直通率";
+            this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
+            // 
+            // li_code
+            // 
+            this.li_code.AllPower = "IFALL";
+            this.li_code.Caller = null;
+            this.li_code.Condition = null;
+            this.li_code.DBTitle = "";
+            this.li_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.li_code.FormName = null;
+            this.li_code.Location = new System.Drawing.Point(106, 61);
+            this.li_code.Margin = new System.Windows.Forms.Padding(4);
+            this.li_code.Name = "li_code";
+            this.li_code.Power = "";
+            this.li_code.ReturnData = null;
+            this.li_code.SelectField = null;
+            this.li_code.SetValueField = null;
+            this.li_code.Size = new System.Drawing.Size(212, 34);
+            this.li_code.TabIndex = 219;
+            this.li_code.TableName = null;
+            this.li_code.Tag = "makecode";
+            this.li_code.TextBoxEnable = true;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = "IFALL";
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            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(796, 12);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            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(208, 34);
+            this.ma_code.TabIndex = 217;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "makecode";
+            this.ma_code.TextBoxEnable = true;
+            // 
+            // wc_code
+            // 
+            this.wc_code.AllPower = "IFALL";
+            this.wc_code.Caller = null;
+            this.wc_code.Condition = null;
+            this.wc_code.DBTitle = "";
+            this.wc_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.wc_code.FormName = null;
+            this.wc_code.Location = new System.Drawing.Point(106, 10);
+            this.wc_code.Margin = new System.Windows.Forms.Padding(4);
+            this.wc_code.Name = "wc_code";
+            this.wc_code.Power = "";
+            this.wc_code.ReturnData = null;
+            this.wc_code.SelectField = null;
+            this.wc_code.SetValueField = null;
+            this.wc_code.Size = new System.Drawing.Size(212, 34);
+            this.wc_code.TabIndex = 215;
+            this.wc_code.TableName = null;
+            this.wc_code.Tag = "makecode";
+            this.wc_code.TextBoxEnable = true;
+            // 
+            // pr_code
+            // 
+            this.pr_code.AllPower = "IFALL";
+            this.pr_code.Caller = null;
+            this.pr_code.Condition = null;
+            this.pr_code.DBTitle = "";
+            this.pr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.pr_code.FormName = null;
+            this.pr_code.Location = new System.Drawing.Point(450, 11);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(4);
+            this.pr_code.Name = "pr_code";
+            this.pr_code.Power = "";
+            this.pr_code.ReturnData = null;
+            this.pr_code.SelectField = null;
+            this.pr_code.SetValueField = null;
+            this.pr_code.Size = new System.Drawing.Size(212, 34);
+            this.pr_code.TabIndex = 213;
+            this.pr_code.TableName = null;
+            this.pr_code.Tag = "makecode";
+            this.pr_code.TextBoxEnable = true;
+            // 
+            // Export
+            // 
+            this.Export.AllPower = null;
+            this.Export.BackColor = System.Drawing.Color.Transparent;
+            this.Export.DownImage = ((System.Drawing.Image)(resources.GetObject("Export.DownImage")));
+            this.Export.Image = null;
+            this.Export.IsShowBorder = true;
+            this.Export.Location = new System.Drawing.Point(980, 57);
+            this.Export.Margin = new System.Windows.Forms.Padding(4);
+            this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
+            this.Export.Name = "Export";
+            this.Export.NormalImage = ((System.Drawing.Image)(resources.GetObject("Export.NormalImage")));
+            this.Export.Power = null;
+            this.Export.Size = new System.Drawing.Size(112, 42);
+            this.Export.TabIndex = 0;
+            this.Export.Text = "查询";
+            this.Export.UseVisualStyleBackColor = false;
+            this.Export.Click += new System.EventHandler(this.Export_Click);
+            // 
+            // sp_stepname
+            // 
+            this.sp_stepname.DataPropertyName = "st_name";
+            this.sp_stepname.HeaderText = "工序";
+            this.sp_stepname.Name = "sp_stepname";
+            // 
+            // st_ifcalc
+            // 
+            this.st_ifcalc.DataPropertyName = "st_ifcalc";
+            this.st_ifcalc.HeaderText = "";
+            this.st_ifcalc.Name = "st_ifcalc";
+            this.st_ifcalc.Visible = false;
+            // 
+            // OKQTY
+            // 
+            this.OKQTY.DataPropertyName = "OKQTY";
+            this.OKQTY.HeaderText = "一次通过";
+            this.OKQTY.Name = "OKQTY";
+            this.OKQTY.ReadOnly = true;
+            // 
+            // AGOKQTY
+            // 
+            this.AGOKQTY.DataPropertyName = "AGOKQTY";
+            this.AGOKQTY.HeaderText = "再次通过";
+            this.AGOKQTY.Name = "AGOKQTY";
+            this.AGOKQTY.ReadOnly = true;
+            // 
+            // SNQTY
+            // 
+            this.SNQTY.DataPropertyName = "NGQTY";
+            this.SNQTY.HeaderText = "不良";
+            this.SNQTY.Name = "SNQTY";
+            this.SNQTY.ReadOnly = true;
+            // 
+            // 合计
+            // 
+            this.合计.DataPropertyName = "SUMQTY";
+            this.合计.HeaderText = "合计";
+            this.合计.Name = "合计";
+            this.合计.ReadOnly = true;
+            // 
+            // 报废
+            // 
+            this.报废.DataPropertyName = "FIQTY";
+            this.报废.HeaderText = "报废";
+            this.报废.Name = "报废";
+            this.报废.ReadOnly = true;
+            // 
+            // OKRATE
+            // 
+            this.OKRATE.DataPropertyName = "OKRATE";
+            this.OKRATE.HeaderText = "良率";
+            this.OKRATE.Name = "OKRATE";
+            this.OKRATE.ReadOnly = true;
+            // 
+            // Query_DateRate
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1342, 806);
+            this.Controls.Add(this.Data);
+            this.Controls.Add(this.li_code);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.wc_code);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.ms_makecode_label);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.EndDate);
+            this.Controls.Add(this.BeginDate);
+            this.Controls.Add(this.Export);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Query_DateRate";
+            this.Tag = "Query!DateRate";
+            this.Text = "Query_DateRate";
+            this.Load += new System.EventHandler(this.Query_SpecialReport_Load);
+            this.SizeChanged += new System.EventHandler(this.Query_DateRate_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.Data)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.ButtonUtil.NormalButton Export;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private System.Windows.Forms.DateTimePicker BeginDate;
+        private System.Windows.Forms.DateTimePicker EndDate;
+        private System.Windows.Forms.Label label3;
+        private CustomControl.TextBoxWithIcon.SearchTextBox pr_code;
+        private System.Windows.Forms.Label ms_makecode_label;
+        private CustomControl.TextBoxWithIcon.SearchTextBox wc_code;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.TextBoxWithIcon.SearchTextBox li_code;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.DataGridView Data;
+        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 sp_stepname;
+        private System.Windows.Forms.DataGridViewTextBoxColumn st_ifcalc;
+        private System.Windows.Forms.DataGridViewTextBoxColumn OKQTY;
+        private System.Windows.Forms.DataGridViewTextBoxColumn AGOKQTY;
+        private System.Windows.Forms.DataGridViewTextBoxColumn SNQTY;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 合计;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 报废;
+        private System.Windows.Forms.DataGridViewTextBoxColumn OKRATE;
+    }
+}

+ 129 - 0
UAS_MES_ZT/FunctionCode/Query/Query_DateRate2.cs

@@ -0,0 +1,129 @@
+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_DateRate2 : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        string querysql = "";
+
+        DataHelper dh = SystemInf.dh;
+
+        DataTable Dbfind;
+
+        string condition;
+
+        public Query_DateRate2()
+        {
+            InitializeComponent();
+        }
+
+        private void Query_SpecialReport_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+
+            //工单号放大镜配置
+            pr_code.TableName = " product ";
+            pr_code.SelectField = "pr_code # 产品编号,pr_detail # 产品名称,pr_orispeccode # 型号";
+            pr_code.FormName = Name;
+            pr_code.SetValueField = new string[] { "pr_code" };
+            pr_code.Condition = "pr_statuscode='AUDITED'";
+            pr_code.DbChange += pr_code_DbChange;
+
+            wc_code.TableName = " workcenter ";
+            wc_code.SelectField = "wc_code # 车间编号,wc_name # 车间名称";
+            wc_code.FormName = Name;
+            wc_code.SetValueField = new string[] { "wc_code" };
+            wc_code.Condition = "wc_statuscode='AUDITED'";
+            wc_code.DbChange += pr_code_DbChange;
+
+            li_code.TableName = " line ";
+            li_code.SelectField = "li_code # 车间编号,li_name # 车间名称";
+            li_code.FormName = Name;
+            li_code.SetValueField = new string[] { "li_code" };
+            li_code.Condition = "li_statuscode='AUDITED'";
+            li_code.DbChange += pr_code_DbChange;
+
+            ma_code.TableName = " make left join product on ma_prodcode=pr_code left join workcenter on ma_wccode = wc_code";
+            ma_code.SelectField = "ma_code # 工单编号,ma_prodcode # 产品编号,pr_spec # 型号,wc_code # 工作中心";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code", "wc_code" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += pr_code_DbChange;
+            //EndDate.Value = DateTime.Now;
+           // BeginDate.Value = DateTime.Now - 1;
+        }
+
+        private void Export_Click(object sender, EventArgs e)
+        {
+            if (wc_code.Text == "")
+            {
+                MessageBox.Show("请输入车间");
+                return;
+            }
+            if (EndDate.Value < BeginDate.Value)
+            {
+                MessageBox.Show("结束日期不能小于起始日期");
+            }
+            condition = "";
+             condition = " sp_date between to_date('" + BeginDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + EndDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-mm-dd hh24:mi:ss') ";
+
+            if (wc_code.Text != "")
+            {
+                condition += " and sp_wccode = '" + wc_code.Text + "'";
+            }
+
+            if (pr_code.Text != "")
+            {
+                condition += " and sp_prodcode = '" + pr_code.Text + "'";
+            }
+            if (ma_code.Text != "")
+            {
+                condition += " and sp_makecode = '" + ma_code.Text + "'";
+            }
+            if (li_code.Text != "")
+            {
+                condition += " and sp_linecode = '" + li_code.Text + "'";
+            }
+            string v_sql = "";
+            //string v_sql1 = "";
+            LogicHandler.GetQuerySQL(condition, "直通率", out v_sql);
+            DataTable dt = (DataTable)dh.ExecuteSql(v_sql, "select");
+            DataRow dr = dt.NewRow();
+            dr[3] = "ALL";
+            dt.Rows.InsertAt(dr, dt.Rows.Count);
+            BaseUtil.FillDgvWithDataTable(Data, dt);
+        }
+
+        private void pr_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = pr_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
+        private void Query_DateRate_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void Data_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (e.RowIndex >= 0)
+            {
+                Console.WriteLine(Data.Rows[e.RowIndex].Cells["sp_stepname"].Value.ToString());
+                Console.WriteLine(condition);
+            }
+        }
+    }
+}

+ 186 - 0
UAS_MES_ZT/FunctionCode/Query/Query_DateRate2.resx

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

+ 542 - 0
UAS_MES_ZT/FunctionCode/Special/Special_AfSale.Designer.cs

@@ -0,0 +1,542 @@
+namespace UAS_MES_NEW.Special
+{
+    partial class Special_AfSale
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Special_AfSale));
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.ms_sncode_label = new System.Windows.Forms.Label();
+            this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.Filter = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
+            this.bc_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ChoosedRejectList = new System.Windows.Forms.ListView();
+            this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader10 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.ChooseedReject = new UAS_MES_NEW.CustomControl.ButtonUtil.ArrowRightButton();
+            this.WaitReject = new UAS_MES_NEW.CustomControl.ButtonUtil.ArrowLeftButton();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.WaitRejectList = new System.Windows.Forms.ListView();
+            this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader9 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.label3 = new System.Windows.Forms.Label();
+            this.bc_groupcode = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
+            this.bc_groupcode_label = new System.Windows.Forms.Label();
+            this.Save = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.ms_sncode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            this.ms_prodcode_label = new System.Windows.Forms.Label();
+            this.pr_orispeccode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.BadInfSource = new System.Windows.Forms.BindingSource(this.components);
+            this.label2 = new System.Windows.Forms.Label();
+            this.ms_indate = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // 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(978, 187);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(297, 524);
+            this.OperateResult.TabIndex = 3;
+            this.OperateResult.Text = "";
+            // 
+            // ms_sncode_label
+            // 
+            this.ms_sncode_label.AutoSize = true;
+            this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_sncode_label.Location = new System.Drawing.Point(38, 680);
+            this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_sncode_label.Name = "ms_sncode_label";
+            this.ms_sncode_label.Size = new System.Drawing.Size(86, 31);
+            this.ms_sncode_label.TabIndex = 69;
+            this.ms_sncode_label.Text = "序列号";
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = "ifall";
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(243, 683);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(339, 32);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 70;
+            this.sncode.Tag = "IfRead";
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
+            // 
+            // Filter
+            // 
+            this.Filter.BackColor = System.Drawing.Color.Transparent;
+            this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
+            this.Filter.Location = new System.Drawing.Point(147, 345);
+            this.Filter.Name = "Filter";
+            this.Filter.PlaceHolder = "不良名称搜索";
+            this.Filter.Size = new System.Drawing.Size(264, 33);
+            this.Filter.TabIndex = 87;
+            this.Filter.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.Filter_UserControlTextChanged);
+            // 
+            // bc_code
+            // 
+            this.bc_code.AllPower = null;
+            this.bc_code.BackColor = System.Drawing.Color.White;
+            this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_code.ID = null;
+            this.bc_code.Location = new System.Drawing.Point(148, 265);
+            this.bc_code.Margin = new System.Windows.Forms.Padding(4);
+            this.bc_code.Name = "bc_code";
+            this.bc_code.Power = null;
+            this.bc_code.Size = new System.Drawing.Size(262, 32);
+            this.bc_code.Str = null;
+            this.bc_code.Str1 = null;
+            this.bc_code.Str2 = null;
+            this.bc_code.TabIndex = 86;
+            this.bc_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bc_code_KeyDown);
+            // 
+            // ChoosedRejectList
+            // 
+            this.ChoosedRejectList.CheckBoxes = true;
+            this.ChoosedRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader6,
+            this.columnHeader3,
+            this.columnHeader7,
+            this.columnHeader8,
+            this.columnHeader10});
+            this.ChoosedRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ChoosedRejectList.Location = new System.Drawing.Point(559, 386);
+            this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4);
+            this.ChoosedRejectList.Name = "ChoosedRejectList";
+            this.ChoosedRejectList.Size = new System.Drawing.Size(397, 277);
+            this.ChoosedRejectList.TabIndex = 85;
+            this.ChoosedRejectList.UseCompatibleStateImageBehavior = false;
+            this.ChoosedRejectList.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader6
+            // 
+            this.columnHeader6.Text = " ";
+            this.columnHeader6.Width = 20;
+            // 
+            // columnHeader3
+            // 
+            this.columnHeader3.Text = "不良代码组";
+            this.columnHeader3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader3.Width = 117;
+            // 
+            // columnHeader7
+            // 
+            this.columnHeader7.Text = "不良代码";
+            this.columnHeader7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader7.Width = 95;
+            // 
+            // columnHeader8
+            // 
+            this.columnHeader8.Text = "不良名称";
+            this.columnHeader8.Width = 99;
+            // 
+            // columnHeader10
+            // 
+            this.columnHeader10.Text = "备注";
+            this.columnHeader10.Width = 0;
+            // 
+            // ChooseedReject
+            // 
+            this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
+            this.ChooseedReject.Location = new System.Drawing.Point(445, 453);
+            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4);
+            this.ChooseedReject.Name = "ChooseedReject";
+            this.ChooseedReject.Size = new System.Drawing.Size(75, 34);
+            this.ChooseedReject.TabIndex = 84;
+            this.ChooseedReject.UseVisualStyleBackColor = true;
+            this.ChooseedReject.Click += new System.EventHandler(this.ChooseedReject_Click);
+            // 
+            // WaitReject
+            // 
+            this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
+            this.WaitReject.Location = new System.Drawing.Point(445, 548);
+            this.WaitReject.Margin = new System.Windows.Forms.Padding(4);
+            this.WaitReject.Name = "WaitReject";
+            this.WaitReject.Size = new System.Drawing.Size(75, 34);
+            this.WaitReject.TabIndex = 83;
+            this.WaitReject.UseVisualStyleBackColor = true;
+            this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.ForeColor = System.Drawing.Color.Black;
+            this.label5.Location = new System.Drawing.Point(553, 349);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(110, 31);
+            this.label5.TabIndex = 82;
+            this.label5.Text = "已选不良";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.ForeColor = System.Drawing.Color.Black;
+            this.label4.Location = new System.Drawing.Point(7, 339);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(110, 31);
+            this.label4.TabIndex = 81;
+            this.label4.Text = "待选不良";
+            // 
+            // WaitRejectList
+            // 
+            this.WaitRejectList.CheckBoxes = true;
+            this.WaitRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader5,
+            this.columnHeader4,
+            this.columnHeader1,
+            this.columnHeader2,
+            this.columnHeader9});
+            this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.WaitRejectList.FullRowSelect = true;
+            this.WaitRejectList.Location = new System.Drawing.Point(13, 386);
+            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4);
+            this.WaitRejectList.Name = "WaitRejectList";
+            this.WaitRejectList.Size = new System.Drawing.Size(397, 277);
+            this.WaitRejectList.TabIndex = 80;
+            this.WaitRejectList.UseCompatibleStateImageBehavior = false;
+            this.WaitRejectList.View = System.Windows.Forms.View.Details;
+            this.WaitRejectList.DoubleClick += new System.EventHandler(this.WaitRejectList_DoubleClick);
+            // 
+            // columnHeader5
+            // 
+            this.columnHeader5.Text = " ";
+            this.columnHeader5.Width = 20;
+            // 
+            // columnHeader4
+            // 
+            this.columnHeader4.Text = "不良代码组";
+            this.columnHeader4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader4.Width = 0;
+            // 
+            // columnHeader1
+            // 
+            this.columnHeader1.Text = "不良代码";
+            this.columnHeader1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader1.Width = 143;
+            // 
+            // columnHeader2
+            // 
+            this.columnHeader2.Text = "不良名称";
+            this.columnHeader2.Width = 122;
+            // 
+            // columnHeader9
+            // 
+            this.columnHeader9.Text = "备注";
+            this.columnHeader9.Width = 0;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(11, 265);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(110, 31);
+            this.label3.TabIndex = 79;
+            this.label3.Text = "不良代码";
+            // 
+            // bc_groupcode
+            // 
+            this.bc_groupcode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_groupcode.FormattingEnabled = true;
+            this.bc_groupcode.Location = new System.Drawing.Point(148, 206);
+            this.bc_groupcode.Margin = new System.Windows.Forms.Padding(4);
+            this.bc_groupcode.Name = "bc_groupcode";
+            this.bc_groupcode.Size = new System.Drawing.Size(262, 30);
+            this.bc_groupcode.TabIndex = 77;
+            this.bc_groupcode.SelectedIndexChanged += new System.EventHandler(this.bc_groupcode_SelectedIndexChanged);
+            // 
+            // bc_groupcode_label
+            // 
+            this.bc_groupcode_label.AutoSize = true;
+            this.bc_groupcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_groupcode_label.Location = new System.Drawing.Point(11, 205);
+            this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.bc_groupcode_label.Name = "bc_groupcode_label";
+            this.bc_groupcode_label.Size = new System.Drawing.Size(110, 31);
+            this.bc_groupcode_label.TabIndex = 78;
+            this.bc_groupcode_label.Text = "不良组别";
+            // 
+            // Save
+            // 
+            this.Save.AllPower = null;
+            this.Save.BackColor = System.Drawing.Color.Transparent;
+            this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
+            this.Save.Image = null;
+            this.Save.IsShowBorder = true;
+            this.Save.Location = new System.Drawing.Point(720, 683);
+            this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
+            this.Save.Name = "Save";
+            this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
+            this.Save.Power = null;
+            this.Save.Size = new System.Drawing.Size(98, 39);
+            this.Save.TabIndex = 88;
+            this.Save.Text = "保存";
+            this.Save.UseVisualStyleBackColor = false;
+            this.Save.Click += new System.EventHandler(this.Save_Click);
+            // 
+            // 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(430, 33);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(86, 31);
+            this.ms_makecode_label.TabIndex = 158;
+            this.ms_makecode_label.Text = "工单号";
+            // 
+            // label1
+            // 
+            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            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(21, 33);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(86, 31);
+            this.label1.TabIndex = 159;
+            this.label1.Text = "序列号";
+            // 
+            // ms_sncode
+            // 
+            this.ms_sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            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(135, 33);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_sncode.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ms_sncode.Name = "ms_sncode";
+            this.ms_sncode.Size = new System.Drawing.Size(0, 31);
+            this.ms_sncode.TabIndex = 164;
+            // 
+            // pr_detail_label
+            // 
+            this.pr_detail_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | 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(430, 126);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(62, 31);
+            this.pr_detail_label.TabIndex = 160;
+            this.pr_detail_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(25, 126);
+            this.ms_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_prodcode_label.Name = "ms_prodcode_label";
+            this.ms_prodcode_label.Size = new System.Drawing.Size(110, 31);
+            this.ms_prodcode_label.TabIndex = 161;
+            this.ms_prodcode_label.Text = "产品编号";
+            // 
+            // pr_orispeccode
+            // 
+            this.pr_orispeccode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.pr_orispeccode.AutoSize = true;
+            this.pr_orispeccode.CutLength = null;
+            this.pr_orispeccode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_orispeccode.Location = new System.Drawing.Point(550, 126);
+            this.pr_orispeccode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_orispeccode.MaximumSize = new System.Drawing.Size(225, 0);
+            this.pr_orispeccode.Name = "pr_orispeccode";
+            this.pr_orispeccode.Size = new System.Drawing.Size(0, 31);
+            this.pr_orispeccode.TabIndex = 162;
+            // 
+            // 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(169, 126);
+            this.ms_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ms_prodcode.Name = "ms_prodcode";
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 31);
+            this.ms_prodcode.TabIndex = 157;
+            // 
+            // 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(550, 33);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 31);
+            this.ms_makecode.TabIndex = 163;
+            // 
+            // label2
+            // 
+            this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            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(828, 33);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(110, 31);
+            this.label2.TabIndex = 165;
+            this.label2.Text = "生产日期";
+            // 
+            // ms_indate
+            // 
+            this.ms_indate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_indate.AutoSize = true;
+            this.ms_indate.CutLength = null;
+            this.ms_indate.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_indate.Location = new System.Drawing.Point(948, 33);
+            this.ms_indate.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_indate.MaximumSize = new System.Drawing.Size(225, 0);
+            this.ms_indate.Name = "ms_indate";
+            this.ms_indate.Size = new System.Drawing.Size(0, 31);
+            this.ms_indate.TabIndex = 166;
+            // 
+            // Special_AfSale
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1287, 736);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.ms_indate);
+            this.Controls.Add(this.ms_makecode_label);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.ms_sncode);
+            this.Controls.Add(this.pr_detail_label);
+            this.Controls.Add(this.ms_prodcode_label);
+            this.Controls.Add(this.pr_orispeccode);
+            this.Controls.Add(this.ms_prodcode);
+            this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.Save);
+            this.Controls.Add(this.Filter);
+            this.Controls.Add(this.bc_code);
+            this.Controls.Add(this.ChoosedRejectList);
+            this.Controls.Add(this.ChooseedReject);
+            this.Controls.Add(this.WaitReject);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.WaitRejectList);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.bc_groupcode);
+            this.Controls.Add(this.bc_groupcode_label);
+            this.Controls.Add(this.ms_sncode_label);
+            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.OperateResult);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Special_AfSale";
+            this.Tag = "Special!AfSale";
+            this.Text = "售后不良采集";
+            this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            this.SizeChanged += new System.EventHandler(this.Special_ReSNBD_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.Label ms_sncode_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder Filter;
+        private CustomControl.TextBoxWithIcon.EnterTextBox bc_code;
+        private System.Windows.Forms.ListView ChoosedRejectList;
+        private System.Windows.Forms.ColumnHeader columnHeader6;
+        private System.Windows.Forms.ColumnHeader columnHeader3;
+        private System.Windows.Forms.ColumnHeader columnHeader7;
+        private System.Windows.Forms.ColumnHeader columnHeader8;
+        private System.Windows.Forms.ColumnHeader columnHeader10;
+        private CustomControl.ButtonUtil.ArrowRightButton ChooseedReject;
+        private CustomControl.ButtonUtil.ArrowLeftButton WaitReject;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.ListView WaitRejectList;
+        private System.Windows.Forms.ColumnHeader columnHeader5;
+        private System.Windows.Forms.ColumnHeader columnHeader4;
+        private System.Windows.Forms.ColumnHeader columnHeader1;
+        private System.Windows.Forms.ColumnHeader columnHeader2;
+        private System.Windows.Forms.ColumnHeader columnHeader9;
+        private System.Windows.Forms.Label label3;
+        private CustomControl.ComBoxWithFocus.ComBoxWithFocus bc_groupcode;
+        private System.Windows.Forms.Label bc_groupcode_label;
+        private CustomControl.ButtonUtil.NormalButton Save;
+        private System.Windows.Forms.Label ms_makecode_label;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.ValueLabel.ValueLabel ms_sncode;
+        private System.Windows.Forms.Label pr_detail_label;
+        private System.Windows.Forms.Label ms_prodcode_label;
+        private CustomControl.ValueLabel.ValueLabel pr_orispeccode;
+        private CustomControl.ValueLabel.ValueLabel ms_prodcode;
+        private CustomControl.ValueLabel.ValueLabel ms_makecode;
+        private System.Windows.Forms.BindingSource BadInfSource;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.ValueLabel.ValueLabel ms_indate;
+    }
+}

+ 359 - 0
UAS_MES_ZT/FunctionCode/Special/Special_AfSale.cs

@@ -0,0 +1,359 @@
+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_AfSale : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        DataHelper dh;
+
+        string bsncode = "";//序列号录入框值
+
+        LogStringBuilder sql = new LogStringBuilder();
+        /// <summary>
+        /// 已选的不良
+        /// </summary>
+        List<string> ChoosedList = new List<string>();
+        /// <summary>
+        /// 待选的不良
+        /// </summary>
+        List<string> WaitList = new List<string>();
+
+        public Special_AfSale()
+        {
+            InitializeComponent();
+        }
+
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+
+            asc.controllInitializeSize(this);
+            dh = SystemInf.dh;
+            LoadBadGroupData();
+            LoadBadCodeListView();
+
+        }
+
+        /// <summary>
+        /// 加载不良代码的ListView的信息
+        /// </summary>
+        private void LoadBadCodeListView()
+        {
+            object bg_code = bc_groupcode.SelectedValue;
+            sql.Clear();
+            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,bc_name,'' bc_remark from badgroupdetail ");
+            sql.Append("left join badgroup on  bg_id=bgd_bgid left join badcode on bgd_badcode=bc_code where ");
+            sql.Append("bg_code='" + (bg_code != null ? bg_code.ToString() : "") + "' and bg_code is not null order by bgd_detno");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BadInfSource.DataSource = dt;
+            //往listview中添加数据
+            WaitRejectList.Items.Clear();
+            WaitRejectList.BeginUpdate();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (!ChoosedList.Contains(dt.Rows[i]["bc_code"].ToString()))
+                {
+                    ListViewItem lvi = new ListViewItem();
+                    //第一列是勾选列,设置列头文本为空
+                    lvi.Text = "";
+                    WaitList.Add(dt.Rows[i]["bc_code"].ToString());
+                    for (int j = 0; j < dt.Columns.Count; j++)
+                        lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                    WaitRejectList.Items.Add(lvi);
+                }
+            }
+            WaitRejectList.EndUpdate();
+        }
+
+
+        DataTable dt;
+
+        /// <summary>
+        /// 加载已选不良的ListView
+        /// </summary>
+        private void LoadChoosedBadListView()
+        {
+            sql.Clear();
+            sql.Append("select AS_BGCODE||':'||AS_BGNAME bg_code,AS_BADCODE bc_code,AS_BADNAME bc_name,' ' mb_badremark from afsales  ");
+            sql.Append(" ");
+            sql.Append(" where as_sn='" + sncode.Text + "'");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            ChoosedRejectList.Items.Clear();
+            ChoosedRejectList.BeginUpdate();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                ListViewItem lvi = new ListViewItem();
+                //第一列是勾选列,设置列头文本为空
+                lvi.Text = "";
+                ChoosedList.Add(dt.Rows[i]["bc_code"].ToString());
+                for (int j = 0; j < dt.Columns.Count; j++)
+                    lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                ChoosedRejectList.Items.Add(lvi);
+            }
+            ChoosedRejectList.EndUpdate();
+
+        }
+
+
+        /// <summary>
+        /// 填充不良组别信息
+        /// </summary>
+        private void LoadBadGroupData()
+        {
+            //如果ms_makecode的值修改过再去查询
+            sql.Clear();
+            sql.Append("select bg_code||':'||bg_name bg_name,bg_code from badgroup left join (select pb_badgroup,pr_kind ");
+            sql.Append("from product left join productkind on pk_name=pr_kind ");
+            sql.Append("left join productbadgroup on pk_code=PB_KINDCODE )");
+            sql.Append("on pb_badgroup=bg_code where bg_statuscode='AUDITED' order by case when bg_code='" + User.DefaultBadGroup + "' then 0 else 1 end");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            bc_groupcode.DisplayMember = "bg_name";
+            bc_groupcode.ValueMember = "bg_code";
+            bc_groupcode.DataSource = dt;
+        }
+
+
+
+
+
+        private void Special_ReSNBD_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                LoadBadCodeListView();
+                LoadChoosedBadListView();
+                DataTable dt = (DataTable)dh.ExecuteSql("select to_char(ms_indate,'yyyy-mm-dd') ms_indate,ms_sncode,ms_makecode,ms_prodcode,pr_orispeccode from makeserial left join PRODUCT  ON ms_prodcode = pr_code where ms_sncode = '" + sncode.Text+"'", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    BaseUtil.SetFormValue(this.Controls, dt);
+                    OperateResult.AppendText(">>SN:" + sncode.Text + "采集成功\n", Color.Green);
+                }
+                else
+                {
+                    OperateResult.AppendText(">>SN:"+sncode.Text+ "采集成功,无生产记录\n", Color.Black);
+                    ms_sncode.Text = sncode.Text;
+                }
+                bc_code.Focus();
+                bc_code.SelectAll();
+
+            }
+        }
+
+        private void Save_Click(object sender, EventArgs e)
+        {
+            if (ms_sncode.Text == "")
+            {
+                OperateResult.AppendText(">>序列号不允许为空\n", Color.Red);
+                return;
+            }
+            int RejectCount = ChoosedRejectList.Items.Count;
+            string[] bccode = new string[RejectCount];
+            string[] bgcode = new string[RejectCount];
+            string[] bgname = new string[RejectCount];
+            string[] bcname = new string[RejectCount];
+
+            if (ChoosedRejectList.Items.Count == 0)
+            {
+                OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
+                return;
+            }
+            else
+            {
+                for (int i = 0; i < RejectCount; i++)
+                {
+                    //获取不良代码组
+                    bgcode[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[0];
+                    //获取不良代码组名称
+                    bgname[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[1];
+                    //获取所有的不良代码
+                    bccode[i] = ChoosedRejectList.Items[i].SubItems[2].Text;
+                    //获取不良名称
+                    bcname[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
+                }
+            }
+            dh.ExecuteSql("delete from AFSALES where as_sn='" + ms_sncode.Text + "' ", "delete");
+            //string seq = dh.GetSEQ("AFSALES_seq");
+
+            sql.Clear();
+            sql.Append("insert into AFSALES(as_id,as_sn,as_badcode,as_badname,as_indate,as_inman,as_makecode");
+            sql.Append(",as_prodcode,as_orispeccode,as_madedate,as_bgcode,as_bgname,as_datedif)");
+            sql.Append("select AFSALES_seq.nextval,'" + ms_sncode.Text+ "',:bc_code,:bc_name,sysdate,'"+User.UserCode+ "',ms_makecode,");
+            sql.Append("ms_prodcode,pr_orispeccode,ms_indate,:bg_code,:bg_name, datedif from ((select max(ms_indate) ms_indate ,max(ms_prodcode) ms_prodcode,max(pr_orispeccode) pr_orispeccode,max(ms_makecode) ms_makecode,round(sysdate- nvl(max(ms_indate),sysdate),2) datedif from makeserial left join product on ms_prodcode = pr_code where ms_sncode = '" + ms_sncode.Text+"' and ms_nextmacode is null)) ");
+            if (bgcode.Length > 0)
+            {
+                dh.BatchInsert(sql.GetString(), new string[] { "bc_code", "bc_name", "bg_code", "bg_name" }, bccode, bcname, bgcode, bgname);
+            }
+
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "售后判定", "售后判定成功", ms_sncode.Text,"" );
+            OperateResult.AppendText(">>SN:" + sncode.Text + "售后判定成功\n", Color.Green, sncode);
+            BaseUtil.CleanControls(this.Controls);
+            ChoosedRejectList.Items.Clear();
+            WaitList.Clear();
+            ChoosedList.Clear();
+            LoadBadGroupData();
+            LoadBadCodeListView();
+            sncode.Focus();
+            sncode.SelectAll();
+
+        }
+
+        private void bc_groupcode_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            LoadBadCodeListView();
+        }
+
+        private void bc_code_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                sql.Clear();
+                sql.Append("select  bg_code||':'||bg_name bg_code,bc_code,bc_name,'' bc_remark from  badgroupdetail left join ");
+                sql.Append("badgroup on  bg_id=bgd_bgid left join badcode on bgd_badcode = bc_code where bc_code='" + bc_code.Text + "'  and rownum=1 ");
+                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                if (dt.Rows.Count > 0)
+                {
+                    for (int i = 0; i < ChoosedRejectList.Items.Count; i++)
+                    {
+                        if (ChoosedRejectList.Items[i].ListView.Items[i].SubItems[2].Text == bc_code.Text)
+                        {
+                            OperateResult.AppendText(">>已添加过不良代码" + bc_code.Text + "\n", Color.Red, bc_code);
+                            return;
+                        }
+                    }
+                    ListViewItem lvi = new ListViewItem();
+                    lvi.Text = "";
+                    for (int j = 0; j < dt.Columns.Count; j++)
+                        lvi.SubItems.Add(dt.Rows[0][j].ToString());
+                    ChoosedRejectList.Items.Add(lvi);
+                    bc_code.Clear();
+                }
+                else OperateResult.AppendText(">>" + bc_code.Text + "不良代码不存在\n", Color.Red, bc_code);
+            }
+        }
+
+        private void Filter_UserControlTextChanged(object sender, EventArgs e)
+        {
+            try
+            {
+                DataRow[] dr = (BadInfSource.DataSource as DataTable).Select("bc_code like '%" + Filter.Text + "%' or bc_name like '%" + Filter.Text + "%'");
+                DataTable dt = (BadInfSource.DataSource as DataTable).Clone();
+                for (int i = 0; i < dr.Length; i++)
+                {
+                    dt.Rows.Add(dr[i].ItemArray);
+                }
+                WaitRejectList.Items.Clear();
+                WaitRejectList.BeginUpdate();
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    if (!ChoosedList.Contains(dt.Rows[i]["bc_code"].ToString()))
+                    {
+                        ListViewItem lvi = new ListViewItem();
+                        //第一列是勾选列,设置列头文本为空
+                        lvi.Text = "";
+                        WaitList.Add(dt.Rows[i]["bc_code"].ToString());
+                        for (int j = 0; j < dt.Columns.Count; j++)
+                            lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                        WaitRejectList.Items.Add(lvi);
+                    }
+                }
+                WaitRejectList.EndUpdate();
+            }
+            catch (Exception)
+            {
+
+            }
+        }
+
+        private void ChooseedReject_Click(object sender, EventArgs e)
+        {
+            if (sncode.Text == "")
+            {
+                OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
+                sncode.Focus();
+                return;
+            }
+            int CheckedNum = 0;
+            //是否已经添加到不良
+            bool AddToReject = false;
+            for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
+            {
+                if (WaitRejectList.Items[i].Checked)
+                {
+                    AddToReject = false;
+                    for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
+                    {
+                        if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
+                        {
+                            AddToReject = true;
+                            OperateResult.AppendText(">>已存在" + ChoosedRejectList.Items[j].SubItems[2].Text + "不良\n", Color.Red);
+                            break;
+                        }
+                    }
+                    //未添加则进行添加
+                    if (!AddToReject)
+                    {
+                        WaitRejectList.Items[i].Checked = false;
+                        ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
+                        WaitRejectList.Items[i].Remove();
+                        CheckedNum++;
+                    }
+                }
+            }
+            if (CheckedNum == 0)
+            {
+                OperateResult.AppendText(">>请勾选不良代码\n", Color.Red);
+            }
+        }
+
+        private void WaitReject_Click(object sender, EventArgs e)
+        {
+            int CheckedNum = 0;
+            //已存在在ListView中的Item是不能添加到其他ListView中的,需要调用其克隆的方法
+            for (int i = ChoosedRejectList.Items.Count - 1; i >= 0; i--)
+            {
+                if (ChoosedRejectList.Items[i].Checked)
+                {
+                    ChoosedRejectList.Items[i].Checked = false;
+                    WaitRejectList.Items.Add((ListViewItem)ChoosedRejectList.Items[i].Clone());
+                    ChoosedRejectList.Items[i].Remove();
+                    CheckedNum++;
+                }
+            }
+            if (CheckedNum == 0)
+            {
+                for (int i = ChoosedRejectList.Items.Count - 1; i >= 0; i--)
+                {
+                    WaitRejectList.Items.Add((ListViewItem)ChoosedRejectList.Items[i].Clone());
+                    ChoosedRejectList.Items[i].Remove();
+                }
+            }
+        }
+
+        private void WaitRejectList_DoubleClick(object sender, EventArgs e)
+        {
+            for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
+            {
+                if (WaitRejectList.Items[i].Checked)
+                {
+                    //双击右移
+                    ChooseedReject.PerformClick();
+                }
+            }
+        }
+    }
+}

+ 200 - 0
UAS_MES_ZT/FunctionCode/Special/Special_AfSale.resx

@@ -0,0 +1,200 @@
+<?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="ChooseedReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAslJREFU
+        SEuN1kuojVEYxvHtco77JUUpURQliQxcE+0BMlIkBpJQJmJwBqRMKAZKykSMkJEwUaIwcElIKQzccz2i
+        3HP3f77Wu8679n6d7a3f4Fuf5znZ+9trfbV6vb4bD7vxBPvQF/r3tcZJ65NwFY8R9TzCTcyCZVJDw3Bj
+        LM7jTze+YiPCsrTWEx34iajDXMRoNPXkSTcn4w6iEvMWS2CZ1JA7RJ/mAUR57xiGoOjJYzewEK8RlZgH
+        mI6cs3FrI9Hqk/+NXWhD0VONLSbr8BlRkdFzo68854KeabiPKG/0SGxAzhXjbvTGTvxCVGSOYxiKMrtO
+        luE9orzpxGLkXDHuxiAcRlTi7UUfFGV2jR7YhlYP/j1MRc7m8YsYhQuISsw3bEbO2bi1gTiCKO/pF6m/
+        WfRUY4vJFNxFVGLeYSlyzsatjcEVRHnvKPQtpQY3WnQWodUvUpviTORc0DMbTxHljZ5jPc9tVUHjcMNb
+        j4+Iisw1jEeVsbHrZBU+IMqbT+hI8ebhphmAs4hKvO2oMn5sDf1xBlHW60zRcrjhrUGr/+ENTECVsbHr
+        ZAVabRFfsCXFu4ZFbz5eICowzzEPORf0aDPVaRDlvT1orwpsWPD0jOhUj8JGz8Bq5JyNWxuBc4jy3ilU
+        G3IxWkh08ySisNGvZQd6ocrZ2DXaodeeKO/dQtPX74t0SOpjjMKeTvrBKIrsOtFZqjMuypuX0ORcVKRD
+        slXRZWhT7Cph7DqZg2eI8kYP9lrkXFS0AP+zWc5Aztm4NR0ZlxDljV5f9Narl4CixxdNxG1EBUY/6eXI
+        ORu31g+HEOU9vWkMRdFTTVocjtOIwuYHtkKnf1Fk18kmfEfUYa5jHHKuGBa0Y+9HFPYOQrtyU4mtQW+v
+        bxDljc7Auci5pmFxJbSx6VegjbLRK+j1Nr/si5+0pm3kBPTiFvWIHvx/v21WU6v9BRMV4fPlTpe/AAAA
+        AElFTkSuQmCC
+</value>
+  </data>
+  <data name="WaitReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAs1JREFU
+        SEuN10uoTVEcx3HvV3nkEUPlFVKUDBDliGImiZQkiYkBGSgZGEiiyIASRgp5JVIGhlLkmTJC5K2833l8
+        f9v6rbP2PX+d+6/PYP3X/f3v7Zy91963S1SNRqM0EVfwCA8CD3EbM1FlynIP3bEN/5sj2jucovViwwbj
+        DP60sQu9UOVcXidL8Q5R3u5gSoo3i6b1xG5E4dIFDEGVc3mdTIc+hShvzzEXaUIqNQpr8RXRALuPSagy
+        ZbmHkbiKKG9fsAb1OW4k8/AS0QDTV7EIOecqegNxHFHefmMn9M0053iRTMBdRAPsF7aiK5qDKK/RA9uh
+        XxrNsFMYhNqcctBQ6BqJwqUTGIDaIK+TVfiMKG/XMQo513FQb+xDFC7dwhjUBpVrzMEzRHl7glnIuVxF
+        cz2+IxpgrzEfLYOK3jjcRJS3T1iBljlVpeZCvEE0wH5gA1oGFT0dDecQ5U3Xow5RHaa1ObloTsM9RANK
+        h9AXLYNST3t7EWVLR9Ef8R+kYuMkonBJx8Nk+A9I6X+VerPxAVHeXmEqwjm52NApqudONMT0ke9By6NE
+        lXq6G48gypuOh/0IP/FcaXMx3iIaZN+wDs6kCXmGjMAlRHn7ic3ohtqcXGlDh+BG6GKOBtkLVM8nK2aY
+        3ir0YI3y9h7LkXO1KjY6e07pdh+L2sByDZ1TTxHlTeeUrsOcy1U2oVv6LKIhpdNoeTR4negc+ogobzeg
+        cy3ncpVNjMY1RENMF+wO6PlWG+Y1dM1sga6haIbpsTYMOZurbGIG2r3/6Lm2EjnnKnr9cBBRvnQA8R3p
+        ZrIE7d4UdV3k12BxFb3huIgob74jq7eOllIz0Q9sQrs7Ui9wepGrci6vk/HQgzzKm+7IZUgTOpQ2kj7o
+        zB15DHqhq3IurxPdaY8R5U37C1K8XmyU9PGfh25xfV0R/UeTz52y3EtWQ9dqNEP4HY3LfwGra+NvPdw7
+        fgAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="Save.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Save.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Save.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <metadata name="BadInfSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>

+ 55 - 1
UAS_MES_ZT/UAS_MES_ZT.csproj

@@ -4,7 +4,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{5F0B6A9F-3B27-442D-94BA-90F8D156E285}</ProjectGuid>
+    <ProjectGuid>{4F7963D5-1759-4789-A36A-CFE93E56D2B3}</ProjectGuid>
     <OutputType>WinExe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>UAS_MES_NEW</RootNamespace>
@@ -972,6 +972,24 @@
     <Compile Include="FunctionCode\Query\BadItem.Designer.cs">
       <DependentUpon>BadItem.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\Query_BadSearch.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_BadSearch.Designer.cs">
+      <DependentUpon>Query_BadSearch.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_DateRate2.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_DateRate2.Designer.cs">
+      <DependentUpon>Query_DateRate2.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_Employee.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_Employee.Designer.cs">
+      <DependentUpon>Query_Employee.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Query\Query_ExeProgress.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1056,6 +1074,12 @@
     <Compile Include="FunctionCode\SMT\SMT_WaringSetting.Designer.cs">
       <DependentUpon>SMT_WaringSetting.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Special\Special_AfSale.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_AfSale.Designer.cs">
+      <DependentUpon>Special_AfSale.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Special\Special_BoxSplit.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1104,6 +1128,18 @@
     <Compile Include="FunctionCode\Special\Special_Reset.Designer.cs">
       <DependentUpon>Special_Reset.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Special\Special_ResetCheck.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_ResetCheck.Designer.cs">
+      <DependentUpon>Special_ResetCheck.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_ReSNBD.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_ReSNBD.Designer.cs">
+      <DependentUpon>Special_ReSNBD.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Special\Special_SeqTransform.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1618,6 +1654,15 @@
     <EmbeddedResource Include="FunctionCode\Query\BadItem.resx">
       <DependentUpon>BadItem.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_BadSearch.resx">
+      <DependentUpon>Query_BadSearch.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_DateRate2.resx">
+      <DependentUpon>Query_DateRate2.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_Employee.resx">
+      <DependentUpon>Query_Employee.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_ExeProgress.resx">
       <DependentUpon>Query_ExeProgress.cs</DependentUpon>
     </EmbeddedResource>
@@ -1660,6 +1705,9 @@
     <EmbeddedResource Include="FunctionCode\SMT\SMT_WaringSetting.resx">
       <DependentUpon>SMT_WaringSetting.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_AfSale.resx">
+      <DependentUpon>Special_AfSale.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_BoxSplit.resx">
       <DependentUpon>Special_BoxSplit.cs</DependentUpon>
     </EmbeddedResource>
@@ -1684,6 +1732,12 @@
     <EmbeddedResource Include="FunctionCode\Special\Special_Reset.resx">
       <DependentUpon>Special_Reset.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_ResetCheck.resx">
+      <DependentUpon>Special_ResetCheck.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_ReSNBD.resx">
+      <DependentUpon>Special_ReSNBD.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_SeqTransform.resx">
       <DependentUpon>Special_SeqTransform.cs</DependentUpon>
     </EmbeddedResource>