Browse Source

未打印不允许补标,MAC地址登记

callm 2 years ago
parent
commit
54569570e2

+ 9 - 0
UAS_MES_LGDZ/CustomControl/AccordionMenu/NavagationBar.cs

@@ -129,6 +129,15 @@ namespace UAS_MES_NEW.CustomControl.AccordionMenu
         {
             NavBarItem nbi = (sender as NavBarItem);
             Form OpenForm = (Form)Assembly.GetExecutingAssembly().CreateInstance("UAS_MES_NEW." + nbi.Tag.ToString());
+            //if (nbi.Tag.ToString() != "Query.Query_MacAddress")
+            //{
+            //    DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("select * from DeviceMacAddress where dma_mac='" + SystemInf.MacAddress + "'", "select");
+            //    if (dt.Rows.Count == 0)
+            //    {
+            //        MessageBox.Show("该设备不在作业设备清单中,请先上传MAC以及设备信息");
+            //        return;
+            //    }
+            //}
             OpenForm.Dock = DockStyle.Fill;
             OpenForm.Text = nbi.Caption;
             //用Tag保存Caller

+ 1 - 0
UAS_MES_LGDZ/Entity/SystemInf.cs

@@ -57,6 +57,7 @@ namespace UAS_MES_NEW.Entity
         /// 是否允许打印程序
         /// </summary>
         public static bool EnablePrint;
+        public static string MacAddress;
 
         public static string IP;
         /// <summary>

+ 40 - 39
UAS_MES_LGDZ/FunctionCode/Make/Make_SMTStencil.cs

@@ -158,56 +158,57 @@ namespace UAS_MES_NEW.Make
                     return;
                 }
             }
-            //一条线只能在线一个钢网
-            dt = (DataTable)dh.ExecuteSql("select su_stcode from stenciluse where su_linecode='" + li_code.Text + "' and su_status='在线'", "select");
+            dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + em_code.Text + "'", "select");
             if (dt.Rows.Count > 0)
             {
-                MessageBox.Show("线别" + li_code.Text + "已有领用的钢网" + dt.Rows[0]["su_stcode"].ToString() + ",请先退回");
-                return;
-            }
-            else
-            {
-                dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + em_code.Text + "'", "select");
-                if (dt.Rows.Count > 0)
+                if (int.Parse(su_singlepringqty1.Text) > 0)
                 {
-                    if (int.Parse(su_singlepringqty1.Text) > 0)
+                    string em_name = dt.Rows[0]["em_name"].ToString();
+                    sql.Clear();
+                    sql.Append("insert into StencilUse(su_id,SU_USEPRODCODE,SU_CLEANNUMS,su_stid,su_linecode,su_stcode,su_usedate,su_useman,SU_USEMANCODE,SU_TABLE,su_usemacode,su_singlepringqty,su_stverison,SU_STATUS)");
+                    sql.Append("select StencilUse_seq.nextval,'" + ma_prodcode.Text + "',ST_CLEANNUMS,st_id,'" + li_code.Text + "','" + SU_DEVCODE.Text + "',sysdate,'" + em_name + "','" + em_code.Text + "','" + st_table.Text + "','" + ma_code.Text + "'");
+                    sql.Append(",'" + su_singlepringqty1.Text + "',st_version,'在线' from ");
+                    sql.Append("Stencil where st_code='" + SU_DEVCODE.Text + "'");
+                    dh.ExecuteSql(sql.ToString(), "insert");
+                    dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,St_USECOUNT from Stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED'", "select");
+                    string St_USECOUNT = dt.Rows[0]["St_USECOUNT"].ToString();
+                    dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + em_code.Text + "'", "select");
+                    if (dt.Rows.Count > 0)
                     {
-                        string em_name = dt.Rows[0]["em_name"].ToString();
                         sql.Clear();
-                        sql.Append("insert into StencilUse(su_id,SU_USEPRODCODE,SU_CLEANNUMS,su_stid,su_linecode,su_stcode,su_usedate,su_useman,SU_USEMANCODE,SU_TABLE,su_usemacode,su_singlepringqty,su_stverison,SU_STATUS)");
-                        sql.Append("select StencilUse_seq.nextval,'" + ma_prodcode.Text + "',ST_CLEANNUMS,st_id,'" + li_code.Text + "','" + SU_DEVCODE.Text + "',sysdate,'" + em_name + "','" + em_code.Text + "','" + st_table.Text + "','" + ma_code.Text + "'");
-                        sql.Append(",'" + su_singlepringqty1.Text + "',st_version,'在线' from ");
-                        sql.Append("Stencil where st_code='" + SU_DEVCODE.Text + "'");
-                        dh.ExecuteSql(sql.ToString(), "insert");
-                        dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS,St_USECOUNT from Stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED'", "select");
-                        string St_USECOUNT = dt.Rows[0]["St_USECOUNT"].ToString();
-                        dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + em_code.Text + "'", "select");
-                        if (dt.Rows.Count > 0)
-                        {
-                            sql.Clear();
-                            sql.Append("update StencilUse set SU_ENSIONA='" + ST_ENSIONA.Text + "',SU_ENSIONB='" + ST_ENSIONB.Text + "',SU_ENSIONC='" + ST_ENSIONC.Text + "',SU_ENSIOND='" + ST_ENSIOND.Text + "',SU_ENSIONE='" + ST_ENSIONE.Text + "' ");
-                            sql.Append("where su_id=(select max(su_id) from stenciluse where su_stcode='" + SU_DEVCODE.Text + "' and su_status='在线')");
-                            dh.ExecuteSql(sql.ToString(), "update");
-                        }
-                        dh.ExecuteSql("update Stencil set ST_USESTATUS='在线' where st_code='" + SU_DEVCODE.Text + "'", "update");
-                        MessageBox.Show("领用成功");
-                        st_table.SelectedItem = null;
-                        SU_DEVCODE.Text = "";
-                        em_code.Text = "";
-                        Receive.Enabled = false;
-                        LoadGridData();
-
-                    }
-                    else
-                    {
-                        MessageBox.Show("单片印刷次数必须大于0");
+                        sql.Append("update StencilUse set SU_ENSIONA='" + ST_ENSIONA.Text + "',SU_ENSIONB='" + ST_ENSIONB.Text + "',SU_ENSIONC='" + ST_ENSIONC.Text + "',SU_ENSIOND='" + ST_ENSIOND.Text + "',SU_ENSIONE='" + ST_ENSIONE.Text + "' ");
+                        sql.Append("where su_id=(select max(su_id) from stenciluse where su_stcode='" + SU_DEVCODE.Text + "' and su_status='在线')");
+                        dh.ExecuteSql(sql.ToString(), "update");
                     }
+                    dh.ExecuteSql("update Stencil set ST_USESTATUS='在线' where st_code='" + SU_DEVCODE.Text + "'", "update");
+                    MessageBox.Show("领用成功");
+                    st_table.SelectedItem = null;
+                    SU_DEVCODE.Text = "";
+                    em_code.Text = "";
+                    Receive.Enabled = false;
+                    LoadGridData();
+
                 }
                 else
                 {
-                    MessageBox.Show("人员编号" + em_code.Text + "不存在");
+                    MessageBox.Show("单片印刷次数必须大于0");
                 }
             }
+            else
+            {
+                MessageBox.Show("人员编号" + em_code.Text + "不存在");
+            }
+            //一条线只能在线一个钢网
+            //dt = (DataTable)dh.ExecuteSql("select su_stcode from stenciluse where su_linecode='" + li_code.Text + "' and su_status='在线'", "select");
+            //if (dt.Rows.Count > 0)
+            //{
+            //    MessageBox.Show("线别" + li_code.Text + "已有领用的钢网" + dt.Rows[0]["su_stcode"].ToString() + ",请先退回");
+            //    return;
+            //}
+            //else
+            //{
+
+            //}
         }
 
         private void Return_Click(object sender, EventArgs e)

+ 141 - 0
UAS_MES_LGDZ/FunctionCode/Query/Query_MacAddress.Designer.cs

@@ -0,0 +1,141 @@
+namespace UAS_MES_NEW.Query
+{
+    partial class Query_MacAddress
+    {
+        /// <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_MacAddress));
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.label4 = new System.Windows.Forms.Label();
+            this.Mac = new System.Windows.Forms.ComboBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.PrintBarcode = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.de_name = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SNCodeEnterTextBox();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.SuspendLayout();
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(318, 318);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(142, 37);
+            this.label4.TabIndex = 171;
+            this.label4.Text = "MAC地址";
+            // 
+            // Mac
+            // 
+            this.Mac.FormattingEnabled = true;
+            this.Mac.Location = new System.Drawing.Point(477, 324);
+            this.Mac.Name = "Mac";
+            this.Mac.Size = new System.Drawing.Size(283, 32);
+            this.Mac.TabIndex = 170;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(331, 393);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(129, 37);
+            this.label2.TabIndex = 167;
+            this.label2.Text = "设备名称";
+            // 
+            // PrintBarcode
+            // 
+            this.PrintBarcode.AllPower = null;
+            this.PrintBarcode.BackColor = System.Drawing.Color.Transparent;
+            this.PrintBarcode.DownImage = ((System.Drawing.Image)(resources.GetObject("PrintBarcode.DownImage")));
+            this.PrintBarcode.Image = null;
+            this.PrintBarcode.IsShowBorder = true;
+            this.PrintBarcode.Location = new System.Drawing.Point(531, 613);
+            this.PrintBarcode.MoveImage = ((System.Drawing.Image)(resources.GetObject("PrintBarcode.MoveImage")));
+            this.PrintBarcode.Name = "PrintBarcode";
+            this.PrintBarcode.NormalImage = ((System.Drawing.Image)(resources.GetObject("PrintBarcode.NormalImage")));
+            this.PrintBarcode.Power = null;
+            this.PrintBarcode.Size = new System.Drawing.Size(150, 50);
+            this.PrintBarcode.TabIndex = 169;
+            this.PrintBarcode.Text = "上传";
+            this.PrintBarcode.UseVisualStyleBackColor = false;
+            this.PrintBarcode.Click += new System.EventHandler(this.PrintBarcode_Click);
+            // 
+            // de_name
+            // 
+            this.de_name.AllPower = null;
+            this.de_name.ID = null;
+            this.de_name.Location = new System.Drawing.Point(477, 395);
+            this.de_name.Name = "de_name";
+            this.de_name.Power = null;
+            this.de_name.Size = new System.Drawing.Size(283, 35);
+            this.de_name.Str = null;
+            this.de_name.Str1 = null;
+            this.de_name.Str2 = null;
+            this.de_name.TabIndex = 168;
+            // 
+            // 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(890, 254);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(504, 570);
+            this.OperateResult.TabIndex = 164;
+            this.OperateResult.Text = "";
+            // 
+            // Query_MacAddress
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1494, 1075);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.Mac);
+            this.Controls.Add(this.PrintBarcode);
+            this.Controls.Add(this.de_name);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.OperateResult);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Name = "Query_MacAddress";
+            this.Tag = "Query!SOP";
+            this.Text = "Query_SpecialReport";
+            this.Load += new System.EventHandler(this.Query_SpecialReport_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.ComboBox Mac;
+        private CustomControl.ButtonUtil.NormalButton PrintBarcode;
+        private CustomControl.TextBoxWithIcon.SNCodeEnterTextBox de_name;
+        private System.Windows.Forms.Label label2;
+    }
+}

+ 92 - 0
UAS_MES_LGDZ/FunctionCode/Query/Query_MacAddress.cs

@@ -0,0 +1,92 @@
+using Seagull.BarTender.Print;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Net.NetworkInformation;
+using System.Net.Sockets;
+using System.Net;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+using System.Net.Mail;
+
+namespace UAS_MES_NEW.Query
+{
+    public partial class Query_MacAddress : Form
+    {
+
+        DataHelper dh = SystemInf.dh;
+
+        Engine engine;
+
+        public Query_MacAddress()
+        {
+            InitializeComponent();
+        }
+
+        private void Export_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        //选择导出Excel时是选择导出数据的还是模板
+        private void ExcelExport(string DataOrTemplet)
+        {
+
+        }
+
+        DataTable _dt;
+        private void Query_SpecialReport_Load(object sender, EventArgs e)
+        {
+            NetworkInterface[] allNetworkInterface = NetworkInterface.GetAllNetworkInterfaces();
+            foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
+            {
+                if (nic.OperationalStatus == OperationalStatus.Up)
+                {
+                    Mac.Items.Add(nic.GetPhysicalAddress());
+                }
+            }
+        }
+
+        private void Sn_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyData == Keys.Enter)
+            {
+
+            }
+        }
+
+        private void Print_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void PrintBarcode_Click(object sender, EventArgs e)
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select * from DeviceMacAddress where DMA_MAC='" + Mac.Text + "'", "select");
+            if (dt.Rows.Count > 0)
+            {
+                string logout_confirm = MessageBox.Show(this.ParentForm, "已存在MAC" + Mac.Text + "对应设备名称" + dt.Rows[0]["DMA_MACHINENAME"].ToString() + "是否继续覆盖", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                string dma_id = dt.Rows[0]["dma_id"].ToString();
+                if (logout_confirm == "Yes")
+                {
+                    dh.ExecuteSql("delete from DeviceMacAddress where dma_id=" + dma_id, "delete");
+                    dh.ExecuteSql("insert into DeviceMacAddress(dma_id, DMA_MAC, DMA_INMAN, DMA_INDATE, DMA_MACHINENAME)" +
+                 "values(DeviceMacAddress_seq.nextval,'" + Mac.Text + "','" + User.UserName + "',sysdate,'" + de_name.Text + "')", "insert");
+                    OperateResult.AppendText("MAC" + Mac.Text + "上传成功", Color.Green);
+                }
+            }
+            else
+            {
+                dh.ExecuteSql("insert into DeviceMacAddress(dma_id, DMA_MAC, DMA_INMAN, DMA_INDATE, DMA_MACHINENAME)" +
+                  "values(DeviceMacAddress_seq.nextval,'" + Mac.Text + "','" + User.UserName + "',sysdate,'" + de_name.Text + "')", "insert");
+                OperateResult.AppendText("MAC" + Mac.Text + "上传成功", Color.Green);
+            }
+        }
+    }
+}

+ 162 - 0
UAS_MES_LGDZ/FunctionCode/Query/Query_MacAddress.resx

@@ -0,0 +1,162 @@
+<?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>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="PrintBarcode.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="PrintBarcode.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="PrintBarcode.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>

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Query/Query_SN.cs

@@ -99,7 +99,7 @@ namespace UAS_MES_NEW.Query
                 else
                 {
                     dh.ExecuteSql("update makeimeilist set mil_printstatus=-1 where mil_sncode='" + mil_sncode + "'", "update");
-                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                 }
             }
             dt = (DataTable)dh.ExecuteSql("select ma_qty,ma_prodcode,pr_detail,ma_printnum from make left join product on ma_prodcode=pr_code left join (select count(1)ma_printnum,mil_makecode from makeimeilist where mil_printstatus=-1 group by mil_makecode) on mil_makecode=ma_code where ma_code='" + ma_code.Text + "'", "select");

+ 28 - 4
UAS_MES_LGDZ/FunctionCode/Query/Query_SOP.Designer.cs

@@ -41,6 +41,8 @@
             this.PrintBarcode = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.pa_outboxcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SNCodeEnterTextBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SNCodeEnterTextBox();
+            this.comboBox1 = new System.Windows.Forms.ComboBox();
+            this.label4 = new System.Windows.Forms.Label();
             this.SuspendLayout();
             // 
             // label1
@@ -57,11 +59,11 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(313, 346);
+            this.label2.Location = new System.Drawing.Point(313, 313);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(73, 37);
+            this.label2.Size = new System.Drawing.Size(129, 37);
             this.label2.TabIndex = 2;
-            this.label2.Text = "箱号";
+            this.label2.Text = "设备名称";
             // 
             // label3
             // 
@@ -134,7 +136,7 @@
             // 
             this.pa_outboxcode.AllPower = null;
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(416, 348);
+            this.pa_outboxcode.Location = new System.Drawing.Point(416, 315);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = null;
             this.pa_outboxcode.Size = new System.Drawing.Size(283, 35);
@@ -157,11 +159,31 @@
             this.ma_code.TabIndex = 0;
             this.ma_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Sn_KeyDown);
             // 
+            // comboBox1
+            // 
+            this.comboBox1.FormattingEnabled = true;
+            this.comboBox1.Location = new System.Drawing.Point(416, 244);
+            this.comboBox1.Name = "comboBox1";
+            this.comboBox1.Size = new System.Drawing.Size(283, 32);
+            this.comboBox1.TabIndex = 165;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(257, 238);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(142, 37);
+            this.label4.TabIndex = 166;
+            this.label4.Text = "MAC地址";
+            // 
             // Query_SOP
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1494, 1075);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.comboBox1);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.PrintLabel);
@@ -195,5 +217,7 @@
         private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
         private System.Windows.Forms.Label label5;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.ComboBox comboBox1;
+        private System.Windows.Forms.Label label4;
     }
 }

+ 142 - 77
UAS_MES_LGDZ/FunctionCode/Special/Special_CancelCollection.Designer.cs

@@ -30,39 +30,136 @@
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Special_CancelCollection));
             this.sn_code_label = new System.Windows.Forms.Label();
-            this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.Confirm = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.pr_detail = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ms_makecode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.label1 = new System.Windows.Forms.Label();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.Confirm = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.SuspendLayout();
             // 
             // sn_code_label
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(68, 259);
+            this.sn_code_label.Location = new System.Drawing.Point(68, 401);
             this.sn_code_label.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
             this.sn_code_label.Name = "sn_code_label";
             this.sn_code_label.Size = new System.Drawing.Size(114, 41);
             this.sn_code_label.TabIndex = 104;
             this.sn_code_label.Text = "序列号";
             // 
-            // sn_code
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail.Location = new System.Drawing.Point(219, 343);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.TabIndex = 237;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(41, 343);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(146, 41);
+            this.label6.TabIndex = 236;
+            this.label6.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(41, 220);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(146, 41);
+            this.label2.TabIndex = 233;
+            this.label2.Text = "工单编号";
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(41, 278);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(146, 41);
+            this.label5.TabIndex = 232;
+            this.label5.Text = "产品代码";
+            // 
+            // pr_code
+            // 
+            this.pr_code.AllPower = null;
+            this.pr_code.BackColor = System.Drawing.Color.White;
+            this.pr_code.Enabled = false;
+            this.pr_code.ID = null;
+            this.pr_code.Location = new System.Drawing.Point(226, 287);
+            this.pr_code.Name = "pr_code";
+            this.pr_code.Power = null;
+            this.pr_code.Size = new System.Drawing.Size(388, 35);
+            this.pr_code.Str = null;
+            this.pr_code.Str1 = null;
+            this.pr_code.Str2 = null;
+            this.pr_code.TabIndex = 235;
+            // 
+            // 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(226, 220);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            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(409, 46);
+            this.ma_code.TabIndex = 234;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "makecode";
+            this.ma_code.TextBoxEnable = true;
             // 
-            this.sn_code.AllPower = null;
-            this.sn_code.BackColor = System.Drawing.Color.White;
-            this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(226, 262);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(8);
-            this.sn_code.Name = "sn_code";
-            this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(348, 35);
-            this.sn_code.Str = null;
-            this.sn_code.Str1 = null;
-            this.sn_code.Str2 = null;
-            this.sn_code.TabIndex = 140;
+            // Clean
+            // 
+            this.Clean.AllPower = null;
+            this.Clean.BackColor = System.Drawing.Color.Transparent;
+            this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
+            this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
+            this.Clean.IsShowBorder = true;
+            this.Clean.Location = new System.Drawing.Point(1002, 659);
+            this.Clean.Margin = new System.Windows.Forms.Padding(8);
+            this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
+            this.Clean.Name = "Clean";
+            this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
+            this.Clean.Power = null;
+            this.Clean.Size = new System.Drawing.Size(120, 50);
+            this.Clean.TabIndex = 143;
+            this.Clean.Text = "清除";
+            this.Clean.UseVisualStyleBackColor = true;
+            this.Clean.Click += new System.EventHandler(this.Clean_Click);
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(832, 26);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(8);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(460, 614);
+            this.OperateResult.TabIndex = 142;
+            this.OperateResult.Text = "";
             // 
             // Confirm
             // 
@@ -71,7 +168,7 @@
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(660, 258);
+            this.Confirm.Location = new System.Drawing.Point(319, 518);
             this.Confirm.Margin = new System.Windows.Forms.Padding(8);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
@@ -83,68 +180,32 @@
             this.Confirm.UseVisualStyleBackColor = true;
             this.Confirm.Click += new System.EventHandler(this.Confirm_Click);
             // 
-            // OperateResult
-            // 
-            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(832, 26);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(8);
-            this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(460, 614);
-            this.OperateResult.TabIndex = 142;
-            this.OperateResult.Text = "";
-            // 
-            // Clean
-            // 
-            this.Clean.AllPower = null;
-            this.Clean.BackColor = System.Drawing.Color.Transparent;
-            this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
-            this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
-            this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1002, 659);
-            this.Clean.Margin = new System.Windows.Forms.Padding(8);
-            this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
-            this.Clean.Name = "Clean";
-            this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
-            this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(120, 50);
-            this.Clean.TabIndex = 143;
-            this.Clean.Text = "清除";
-            this.Clean.UseVisualStyleBackColor = true;
-            this.Clean.Click += new System.EventHandler(this.Clean_Click);
+            // sn_code
             // 
-            // ms_makecode
-            // 
-            this.ms_makecode.AllPower = null;
-            this.ms_makecode.BackColor = System.Drawing.Color.White;
-            this.ms_makecode.ID = null;
-            this.ms_makecode.Location = new System.Drawing.Point(226, 185);
-            this.ms_makecode.Margin = new System.Windows.Forms.Padding(8);
-            this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Power = null;
-            this.ms_makecode.Size = new System.Drawing.Size(348, 35);
-            this.ms_makecode.Str = null;
-            this.ms_makecode.Str1 = null;
-            this.ms_makecode.Str2 = null;
-            this.ms_makecode.TabIndex = 145;
-            // 
-            // 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(68, 182);
-            this.label1.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(114, 41);
-            this.label1.TabIndex = 144;
-            this.label1.Text = "工单号";
+            this.sn_code.AllPower = null;
+            this.sn_code.BackColor = System.Drawing.Color.White;
+            this.sn_code.ID = null;
+            this.sn_code.Location = new System.Drawing.Point(226, 404);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(8);
+            this.sn_code.Name = "sn_code";
+            this.sn_code.Power = null;
+            this.sn_code.Size = new System.Drawing.Size(388, 35);
+            this.sn_code.Str = null;
+            this.sn_code.Str1 = null;
+            this.sn_code.Str2 = null;
+            this.sn_code.TabIndex = 140;
             // 
             // Special_CancelCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1566, 802);
-            this.Controls.Add(this.ms_makecode);
-            this.Controls.Add(this.label1);
+            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label5);
             this.Controls.Add(this.Clean);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.Confirm);
@@ -167,7 +228,11 @@
         private CustomControl.ButtonUtil.NormalButton Confirm;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private CustomControl.ButtonUtil.NormalButton Clean;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ms_makecode;
-        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label pr_detail;
+        private System.Windows.Forms.Label label6;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pr_code;
+        private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label5;
     }
 }

+ 26 - 2
UAS_MES_LGDZ/FunctionCode/Special/Special_CancelCollection.cs

@@ -24,10 +24,11 @@ namespace UAS_MES_NEW.Special
         private void Confirm_Click(object sender, EventArgs e)
         {
             //获取序列号的途程
-            DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_firstsn,ms_id,ms_nextstepcode,ms_currentstepcode,ms_makecode,ms_status,ms_checkno,ms_craftcode,ms_prodcode,ms_stepcode from makeserial where (ms_sncode='" + sn_code.Text + "'  or ms_imei1='" + sn_code.Text + "' and ms_imei2='" + sn_code.Text + "')and ms_makecode='" + ms_makecode.Text + "' order by ms_id desc", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_outboxcode,ms_sncode,ms_firstsn,ms_id,ms_nextstepcode,ms_currentstepcode,ms_makecode,ms_status,ms_checkno,ms_craftcode,ms_prodcode,ms_stepcode from makeserial where (ms_sncode='" + sn_code.Text + "'  or ms_imei1='" + sn_code.Text + "' and ms_imei2='" + sn_code.Text + "')and ms_makecode='" + ma_code.Text + "' order by ms_id desc", "select");
             if (dt.Rows.Count > 0)
             {
                 string pr_code = dt.Rows[0]["ms_prodcode"].ToString();
+                string ms_outboxcode = dt.Rows[0]["ms_outboxcode"].ToString();
                 string cr_code = dt.Rows[0]["ms_craftcode"].ToString();
                 string ms_nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
                 string ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
@@ -45,6 +46,10 @@ namespace UAS_MES_NEW.Special
                 //if (ms_stepcode == dt.Rows[0]["cd_stepcode"].ToString() || (ms_stepcode == "" && ms_nextstepcode == User.CurrentStepCode))
                 //{
                 List<string> sqls = new List<string>();
+                if (ms_outboxcode != "")
+                {
+                    OperateResult.AppendText(">>序列号" + sn_code.Text + "已装箱" + ms_outboxcode + ",不允许取消采集\n", Color.Red, sn_code);
+                }
                 //存在不良删除不良记录
                 if (ms_status == "3")
                 {
@@ -116,7 +121,7 @@ namespace UAS_MES_NEW.Special
                 //}
                 //else OperateResult.AppendText(">>序列号" + sn_code.Text + "不处于第一道工序,不允许取消采集\n", Color.Red, sn_code);
             }
-            else OperateResult.AppendText(">>序列号" + sn_code.Text + "不存在于工单" + ms_makecode.Text + "\n", Color.Red, sn_code);
+            else OperateResult.AppendText(">>序列号" + sn_code.Text + "不存在于工单" + ma_code.Text + "\n", Color.Red, sn_code);
         }
 
         private void Clean_Click(object sender, EventArgs e)
@@ -126,7 +131,26 @@ namespace UAS_MES_NEW.Special
 
         private void Special_CancelCollection_Load(object sender, EventArgs e)
         {
+            ma_code.TableName = " make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单编号,pr_code # 产品编号,pr_spec # 型号";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += pr_code_DbChange;
+        }
 
+        DataTable Dbfind;
+        private void pr_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+            DataTable dt = (DataTable)dh.ExecuteSql("select ma_qty,ma_prodcode,pr_detail,ma_printnum from make left join product on ma_prodcode=pr_code left join (select count(1)ma_printnum,mil_makecode from makeimeilist where mil_printstatus=-1 group by mil_makecode) on mil_makecode=ma_code where ma_code='" + ma_code.Text + "'", "select");
+            if (dt.Rows.Count > 0)
+            {
+                pr_code.Text = dt.Rows[0]["ma_prodcode"].ToString();
+                pr_detail.Text = dt.Rows[0]["pr_detail"].ToString();
+            }
         }
+
     }
 }

+ 10 - 10
UAS_MES_LGDZ/FunctionCode/Special/Special_CancelCollection.resx

@@ -118,7 +118,7 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="Confirm.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -130,7 +130,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Confirm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Clean.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -177,7 +177,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEwAACxMBAJqcGAAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEQAACxEBf2RfkQAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -223,7 +223,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="Confirm.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Clean.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -236,7 +236,7 @@
         gg==
 </value>
   </data>
-  <data name="Confirm.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Clean.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -249,7 +249,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Confirm.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -261,7 +261,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Clean.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Confirm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -308,7 +308,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEwAACxMBAJqcGAAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEQAACxEBf2RfkQAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -354,7 +354,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="Clean.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Confirm.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -367,7 +367,7 @@
         gg==
 </value>
   </data>
-  <data name="Clean.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Confirm.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE

+ 11 - 0
UAS_MES_LGDZ/Login.cs

@@ -11,6 +11,7 @@ using System.Threading;
 using System.Drawing;
 using UAS_MES_NEW.Properties;
 using System.IO;
+using System.Net.NetworkInformation;
 
 namespace UAS_MES_NEW
 {
@@ -113,6 +114,16 @@ namespace UAS_MES_NEW
                     //记录登陆信息
                     try
                     {
+                        string macAddress = "";
+                        foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
+                        {
+                            if (nic.OperationalStatus == OperationalStatus.Up)
+                            {
+                                macAddress = nic.GetPhysicalAddress().ToString();
+                                break;
+                            }
+                        }
+                        SystemInf.MacAddress = macAddress;
                         IPHostEntry IpEntry = Dns.GetHostEntry(Dns.GetHostName());
                         string IPAddress = "";
                         for (int i = 0; i < IpEntry.AddressList.Length; i++)

+ 16 - 2
UAS_MES_LGDZ/PublicMethod/Print.cs

@@ -233,6 +233,18 @@ namespace UAS_MES_NEW.PublicMethod
                     return false;
                 }
             }
+            else
+            {
+                if (LabelType == "卡通箱标" || LabelType == "大箱标" || LabelType == "栈板标" || LabelType == "彩盒标")
+                {
+                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode +    "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "' and lpl_file='" + LabelName + "'", "select");
+                }
+                if (dt.Rows.Count == 0)
+                {
+                    ErrorMessage = SnCode + LabelType + "未打印,不允许补打";
+                    return false;
+                }
+            }
             string filelastwritetime = dh.getFieldDataByCondition("label", "la_lastwritetime", "la_id = '" + LaID + "'").ToString();
             string LA_SOFTTYPE = dh.getFieldDataByCondition("label", "LA_SOFTTYPE", "la_id = '" + LaID + "'").ToString();
             //如果有附件上传的话
@@ -265,8 +277,10 @@ namespace UAS_MES_NEW.PublicMethod
             }
             else
             {
-                string filechangetime = PrintFile.CreationTime.ToString();
-                if (filechangetime != filelastwritetime)
+                string filechangetime = PrintFile.LastWriteTime.ToString();
+                System.DateTime dateTime1 = System.DateTime.Parse(filechangetime);
+                System.DateTime dateTime2 = System.DateTime.Parse(filelastwritetime);
+                if (dateTime1 < dateTime2)
                 {
                     if (LA_SOFTTYPE != "")
                     {

+ 9 - 0
UAS_MES_LGDZ/UAS_MES_LGDZ.csproj

@@ -995,6 +995,12 @@
     <Compile Include="FunctionCode\Query\Query_SN.Designer.cs">
       <DependentUpon>Query_SN.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\Query_MacAddress.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_MacAddress.Designer.cs">
+      <DependentUpon>Query_MacAddress.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Query\Query_SOP.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1663,6 +1669,9 @@
     <EmbeddedResource Include="FunctionCode\Query\Query_SN.resx">
       <DependentUpon>Query_SN.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_MacAddress.resx">
+      <DependentUpon>Query_MacAddress.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_SOP.resx">
       <DependentUpon>Query_SOP.cs</DependentUpon>
     </EmbeddedResource>