Browse Source

添加DN号箱号核对界面

callm 3 days ago
parent
commit
59595b523a

+ 208 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_OutBoxSnCheckDN.Designer.cs

@@ -0,0 +1,208 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_OutBoxSnCheckDN
+    {
+        /// <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.label10 = new System.Windows.Forms.Label();
+            this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.CheckSnDGV = new System.Windows.Forms.DataGridView();
+            this.pa_outboxcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.WOD_OUTNO = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.WOD_PALLENTORBOX = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.WOD_TYPE = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_checksn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.QTY = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.CheckSnDGV)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(66, 790);
+            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(69, 35);
+            this.label10.TabIndex = 12;
+            this.label10.Text = "箱号";
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = null;
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(146, 790);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(334, 35);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 14;
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(1223, 137);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(518, 624);
+            this.OperateResult.TabIndex = 10;
+            this.OperateResult.Text = "";
+            // 
+            // CheckSnDGV
+            // 
+            this.CheckSnDGV.AllowUserToAddRows = false;
+            this.CheckSnDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.CheckSnDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.WOD_OUTNO,
+            this.WOD_PALLENTORBOX,
+            this.WOD_TYPE,
+            this.pd_checksn1});
+            this.CheckSnDGV.Location = new System.Drawing.Point(72, 137);
+            this.CheckSnDGV.Name = "CheckSnDGV";
+            this.CheckSnDGV.RowHeadersWidth = 82;
+            this.CheckSnDGV.RowTemplate.Height = 37;
+            this.CheckSnDGV.Size = new System.Drawing.Size(1117, 624);
+            this.CheckSnDGV.TabIndex = 18;
+            // 
+            // pa_outboxcode
+            // 
+            this.pa_outboxcode.AllPower = null;
+            this.pa_outboxcode.BackColor = System.Drawing.Color.White;
+            this.pa_outboxcode.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_outboxcode.ID = null;
+            this.pa_outboxcode.Location = new System.Drawing.Point(165, 43);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.pa_outboxcode.Name = "pa_outboxcode";
+            this.pa_outboxcode.Power = null;
+            this.pa_outboxcode.Size = new System.Drawing.Size(773, 80);
+            this.pa_outboxcode.Str = null;
+            this.pa_outboxcode.Str1 = null;
+            this.pa_outboxcode.Str2 = null;
+            this.pa_outboxcode.TabIndex = 20;
+            this.pa_outboxcode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pa_outboxcode_KeyDown);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(66, 46);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(91, 64);
+            this.label1.TabIndex = 19;
+            this.label1.Text = "DN";
+            // 
+            // WOD_OUTNO
+            // 
+            this.WOD_OUTNO.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.WOD_OUTNO.DataPropertyName = "WOD_OUTNO";
+            this.WOD_OUTNO.HeaderText = "出货单号";
+            this.WOD_OUTNO.MinimumWidth = 200;
+            this.WOD_OUTNO.Name = "WOD_OUTNO";
+            this.WOD_OUTNO.Width = 200;
+            // 
+            // WOD_PALLENTORBOX
+            // 
+            this.WOD_PALLENTORBOX.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.WOD_PALLENTORBOX.DataPropertyName = "WOD_PALLENTORBOX";
+            this.WOD_PALLENTORBOX.HeaderText = "箱号/栈板号";
+            this.WOD_PALLENTORBOX.MinimumWidth = 10;
+            this.WOD_PALLENTORBOX.Name = "WOD_PALLENTORBOX";
+            this.WOD_PALLENTORBOX.Width = 187;
+            // 
+            // WOD_TYPE
+            // 
+            this.WOD_TYPE.DataPropertyName = "WOD_TYPE";
+            this.WOD_TYPE.HeaderText = "类型";
+            this.WOD_TYPE.MinimumWidth = 10;
+            this.WOD_TYPE.Name = "WOD_TYPE";
+            this.WOD_TYPE.Width = 200;
+            // 
+            // pd_checksn1
+            // 
+            this.pd_checksn1.DataPropertyName = "pd_checksn1";
+            this.pd_checksn1.HeaderText = "核对SN";
+            this.pd_checksn1.MinimumWidth = 200;
+            this.pd_checksn1.Name = "pd_checksn1";
+            this.pd_checksn1.Width = 200;
+            // 
+            // QTY
+            // 
+            this.QTY.AutoSize = true;
+            this.QTY.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.QTY.Location = new System.Drawing.Point(1212, 46);
+            this.QTY.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.QTY.Name = "QTY";
+            this.QTY.Size = new System.Drawing.Size(0, 64);
+            this.QTY.TabIndex = 22;
+            // 
+            // Make_OutBoxSnCheckDN
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1772, 866);
+            this.Controls.Add(this.QTY);
+            this.Controls.Add(this.pa_outboxcode);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.CheckSnDGV);
+            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.label10);
+            this.Controls.Add(this.OperateResult);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Make_OutBoxSnCheckDN";
+            this.Tag = "Make!LabelCheck";
+            this.Text = "标签核对";
+            this.Load += new System.EventHandler(this.Make_LabelCheck_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_LabelCheck_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.CheckSnDGV)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Label label10;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.DataGridView CheckSnDGV;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox pa_outboxcode;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn WOD_OUTNO;
+        private System.Windows.Forms.DataGridViewTextBoxColumn WOD_PALLENTORBOX;
+        private System.Windows.Forms.DataGridViewTextBoxColumn WOD_TYPE;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_checksn1;
+        private System.Windows.Forms.Label QTY;
+    }
+}

+ 132 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_OutBoxSnCheckDN.cs

@@ -0,0 +1,132 @@
+using System;
+using System.Data;
+using System.Drawing;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicForm;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_OutBoxSnCheckDN : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        DataHelper dh;
+
+        LogStringBuilder sql;
+
+        DataTable dt;
+
+        public Make_OutBoxSnCheckDN()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_LabelCheck_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            //聚焦SN号
+            pa_outboxcode.Focus();
+            //打开界面提示用户:请输入SN 
+            OperateResult.AppendText(">>请采集箱号\n", Color.Black);
+            sql = new LogStringBuilder();
+            dh = SystemInf.dh;
+        }
+
+        private void Make_LabelCheck_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        bool FindFugeSN = false;
+        int RowIndex = 0;
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            //判断是enter事件
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (sncode.Text == "")
+                {
+                    OperateResult.AppendText("<<输入不能为空\n", Color.Red);
+                    return;
+                }
+                bool AllCheck = true;
+                for (int i = 0; i < CheckSnDGV.Rows.Count; i++)
+                {
+                    if (CheckSnDGV.Rows[i].Cells["WOD_PALLENTORBOX"].Value.ToString() == sncode.Text)
+                    {
+                        CheckSnDGV.Rows[i].Cells["pd_checksn1"].Value = sncode.Text;
+                        FindFugeSN = true;
+                    }
+                }
+                if (FindFugeSN)
+                {
+                    FindFugeSN = false;
+                    OperateResult.AppendText("<<" + sncode.Text + "箱号校验成功\n", Color.Green, sncode);
+                }
+                else
+                {
+                    OperateResult.AppendText("<<" + sncode.Text + "箱号不存在\n", Color.Red, sncode);
+                    return;
+                }
+                if (AllCheck)
+                {
+                    SetCheck set = new SetCheck("OK", Color.Green);
+                    BaseUtil.SetFormCenter(set);
+                    set.ShowDialog();
+                }
+                RefreshQTY();
+            }
+        }
+
+        private void pa_outboxcode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                dt = (DataTable)dh.ExecuteSql("select * from wmsoutdetail where WOD_DN='" + pa_outboxcode.Text + "'", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    BaseUtil.FillDgvWithDataTable(CheckSnDGV, dt);
+                    RefreshQTY();
+                    sncode.Focus();
+                }
+                else
+                {
+                    OperateResult.AppendText("<<DN号" + pa_outboxcode.Text + "不存在\n", Color.Red);
+                }
+            }
+        }
+
+        private void RefreshQTY()
+        {
+            int boxnum = 0;
+            int palletnum = 0;
+            int checkboxnum = 0;
+            int checkpallernum = 0;
+            for (int i = 0; i < CheckSnDGV.Rows.Count; i++)
+            {
+                if (CheckSnDGV.Rows[i].Cells["WOD_TYPE"].Value.ToString() == "卡通箱")
+                {
+                    boxnum = boxnum + 1;
+                    if (CheckSnDGV.Rows[i].Cells["pd_checksn1"].Value != null)
+                    {
+                        checkboxnum = checkboxnum + 1;
+                    }
+                }
+                if (CheckSnDGV.Rows[i].Cells["WOD_TYPE"].Value.ToString() == "栈板")
+                {
+                    palletnum = palletnum + 1;
+                    if (CheckSnDGV.Rows[i].Cells["pd_checksn1"].Value != null)
+                    {
+                        checkpallernum = checkpallernum + 1;
+                    }
+                }
+            }
+
+            QTY.Text = "卡通箱:" + checkboxnum + "/" + boxnum + " 栈板号:" + checkpallernum + "/" + palletnum;
+        }
+    }
+}

+ 132 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_OutBoxSnCheckDN.resx

@@ -0,0 +1,132 @@
+<?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="WOD_OUTNO.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="WOD_PALLENTORBOX.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="WOD_TYPE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_checksn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>

+ 9 - 0
UAS_MES_YDCY/UAS_MES_YDCY.csproj

@@ -568,6 +568,12 @@
     <Compile Include="FunctionCode\Make\Make_ColorBoxLoadPrintSH.Designer.cs">
       <DependentUpon>Make_ColorBoxLoadPrintSH.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_OutBoxSnCheckDN.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_OutBoxSnCheckDN.Designer.cs">
+      <DependentUpon>Make_OutBoxSnCheckDN.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_PalletWeigh.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1653,6 +1659,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_ColorBoxLoadPrintSH.resx">
       <DependentUpon>Make_ColorBoxLoadPrintSH.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_OutBoxSnCheckDN.resx">
+      <DependentUpon>Make_OutBoxSnCheckDN.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_PalletWeigh.resx">
       <DependentUpon>Make_PalletWeigh.cs</DependentUpon>
     </EmbeddedResource>