Browse Source

打印BUG修改,中兴外箱装箱需要在范围内

callm 9 hours ago
parent
commit
d01db29491

+ 1 - 1
UAS_MES_HYSX/FunctionCode/Make/Make_ColorBoxLabelPrintZX.Designer.cs

@@ -504,7 +504,7 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_ColorBoxLabelPrint_FormClosing);
             this.Load += new System.EventHandler(this.Make_ColorBoxLabelPrint_Load);
             this.SizeChanged += new System.EventHandler(this.Make_ColorBoxLabelPrint_SizeChanged);
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 279 - 0
UAS_MES_HYSX/FunctionCode/Make/Make_OutBoxSnCheckYLF.Designer.cs

@@ -0,0 +1,279 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_OutBoxSnCheckYLF
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_OutBoxSnCheck));
+            this.label10 = new System.Windows.Forms.Label();
+            this.CheckSnDGV = new System.Windows.Forms.DataGridView();
+            this.label1 = new System.Windows.Forms.Label();
+            this.pa_makecode_label = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CheckNum = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pa_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pa_outboxcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.pd_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_checksn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cancel = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            ((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(53, 35);
+            this.label10.TabIndex = 12;
+            this.label10.Text = "SN";
+            // 
+            // CheckSnDGV
+            // 
+            this.CheckSnDGV.AllowUserToAddRows = false;
+            this.CheckSnDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.CheckSnDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.pd_barcode,
+            this.pd_checksn});
+            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;
+            // 
+            // 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(283, 64);
+            this.label1.TabIndex = 19;
+            this.label1.Text = "卡通箱号";
+            // 
+            // pa_makecode_label
+            // 
+            this.pa_makecode_label.AutoSize = true;
+            this.pa_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_makecode_label.Location = new System.Drawing.Point(1156, 68);
+            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_makecode_label.Name = "pa_makecode_label";
+            this.pa_makecode_label.Size = new System.Drawing.Size(146, 41);
+            this.pa_makecode_label.TabIndex = 110;
+            this.pa_makecode_label.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(691, 787);
+            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 = 112;
+            this.label2.Text = "核對數量";
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "pd_barcode";
+            this.dataGridViewTextBoxColumn1.HeaderText = "箱内序列号";
+            this.dataGridViewTextBoxColumn1.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.Width = 175;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "pd_checksn";
+            this.dataGridViewTextBoxColumn2.HeaderText = "扫描SN号";
+            this.dataGridViewTextBoxColumn2.MinimumWidth = 10;
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.Width = 151;
+            // 
+            // CheckNum
+            // 
+            this.CheckNum.AutoSize = true;
+            this.CheckNum.CutLength = null;
+            this.CheckNum.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CheckNum.Location = new System.Drawing.Point(886, 787);
+            this.CheckNum.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.CheckNum.MaximumSize = new System.Drawing.Size(300, 0);
+            this.CheckNum.Name = "CheckNum";
+            this.CheckNum.Size = new System.Drawing.Size(0, 41);
+            this.CheckNum.TabIndex = 113;
+            this.CheckNum.Tag = "1";
+            // 
+            // pa_makecode
+            // 
+            this.pa_makecode.AutoSize = true;
+            this.pa_makecode.CutLength = null;
+            this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_makecode.Location = new System.Drawing.Point(1324, 68);
+            this.pa_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_makecode.MaximumSize = new System.Drawing.Size(300, 0);
+            this.pa_makecode.Name = "pa_makecode";
+            this.pa_makecode.Size = new System.Drawing.Size(0, 41);
+            this.pa_makecode.TabIndex = 111;
+            this.pa_makecode.Tag = "1";
+            // 
+            // 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(358, 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);
+            // 
+            // pd_barcode
+            // 
+            this.pd_barcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.pd_barcode.DataPropertyName = "pd_barcode";
+            this.pd_barcode.HeaderText = "箱内序列号";
+            this.pd_barcode.MinimumWidth = 10;
+            this.pd_barcode.Name = "pd_barcode";
+            this.pd_barcode.Width = 175;
+            // 
+            // pd_checksn
+            // 
+            this.pd_checksn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.pd_checksn.DataPropertyName = "pd_checksn";
+            this.pd_checksn.HeaderText = "扫描SN号";
+            this.pd_checksn.MinimumWidth = 10;
+            this.pd_checksn.Name = "pd_checksn";
+            this.pd_checksn.Width = 151;
+            // 
+            // cancel
+            // 
+            this.cancel.AllPower = null;
+            this.cancel.BackColor = System.Drawing.Color.Transparent;
+            this.cancel.DownImage = ((System.Drawing.Image)(resources.GetObject("cancel.DownImage")));
+            this.cancel.Image = null;
+            this.cancel.IsShowBorder = true;
+            this.cancel.Location = new System.Drawing.Point(528, 787);
+            this.cancel.Margin = new System.Windows.Forms.Padding(4);
+            this.cancel.MoveImage = ((System.Drawing.Image)(resources.GetObject("cancel.MoveImage")));
+            this.cancel.Name = "cancel";
+            this.cancel.NormalImage = ((System.Drawing.Image)(resources.GetObject("cancel.NormalImage")));
+            this.cancel.Power = null;
+            this.cancel.Size = new System.Drawing.Size(118, 38);
+            this.cancel.TabIndex = 17;
+            this.cancel.Text = "重新核对";
+            this.cancel.UseVisualStyleBackColor = false;
+            this.cancel.Visible = false;
+            this.cancel.Click += new System.EventHandler(this.cancel_Click);
+            // 
+            // 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 = "";
+            // 
+            // Make_OutBoxSnCheck
+            // 
+            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.CheckNum);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.pa_makecode);
+            this.Controls.Add(this.pa_makecode_label);
+            this.Controls.Add(this.pa_outboxcode);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.CheckSnDGV);
+            this.Controls.Add(this.cancel);
+            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_OutBoxSnCheck";
+            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(true);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Label label10;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
+        private CustomControl.ButtonUtil.NormalButton cancel;
+        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 pd_barcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_checksn;
+        private CustomControl.ValueLabel.ValueLabel pa_makecode;
+        private System.Windows.Forms.Label pa_makecode_label;
+        private CustomControl.ValueLabel.ValueLabel CheckNum;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+    }
+}

+ 152 - 0
UAS_MES_HYSX/FunctionCode/Make/Make_OutBoxSnCheckYLF.cs

@@ -0,0 +1,152 @@
+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.PublicForm;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_OutBoxSnCheckYLF : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        DataHelper dh;
+
+        LogStringBuilder sql;
+
+        DataTable dt;
+
+        public Make_OutBoxSnCheckYLF()
+        {
+            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;
+        }
+        string pa_nextstep = "";
+        private void Make_LabelCheck_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+        string ErrorMessage = "";
+
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            //判断是enter事件
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (sncode.Text == "")
+                {
+                    OperateResult.AppendText("<<输入不能为空\n", Color.Red);
+                    return;
+                }
+
+                bool FindSN = false;
+                bool AllCheck = true;
+                dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial left join ztedata on ZD_SN=ms_sncode and ms_makecode=zd_makecode where ZD_D_SN='" + sncode.Text + "' and ZD_TYPE='彩盒机身标' order by ms_id desc", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                }
+                int CheckRow = 0;
+                for (int i = 0; i < CheckSnDGV.Rows.Count; i++)
+                {
+                    if (CheckSnDGV.Rows[i].Cells["pd_barcode"].Value.ToString() == sncode.Text)
+                    {
+                        if (CheckSnDGV.Rows[i].Cells["pd_checksn"].Value == null)
+                        {
+                            CheckSnDGV.Rows[i].Cells["pd_checksn"].Value = sncode.Text;
+                            FindSN = true;
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱装箱核对成功", "核对条码" + sncode.Text + "箱号" + pa_outboxcode.Text, "", "");
+                        }
+                        else
+                        {
+                            OperateResult.AppendText("<<SN" + sncode.Text + "已校验\n", Color.Red, sncode);
+                            return;
+                        }
+                    }
+                    if (CheckSnDGV.Rows[i].Cells["pd_checksn"].Value == null)
+                    {
+                        AllCheck = false;
+                    }
+                    else
+                    {
+                        CheckRow = CheckRow + 1;
+                    }
+                }
+                if (FindSN)
+                {
+                    OperateResult.AppendText("<<SN" + sncode.Text + "校验成功\n", Color.Green, sncode);
+                }
+                else
+                {
+                    OperateResult.AppendText("<<SN" + sncode.Text + "校验失败,不在箱中\n", Color.Red, sncode);
+                }
+                CheckNum.Text = CheckRow + "/" + CheckSnDGV.Rows.Count;
+                if (AllCheck)
+                {
+                    if (pa_nextstep != "" && pa_nextstep == User.CurrentStepCode)
+                    {
+                        if (LogicHandler.OutBoxStepPass(pa_outboxcode.Text, pa_makecode.Text, User.UserSourceCode, User.UserCode, "栈板采集成功,栈板号:" + pa_outboxcode.Text, "栈板采集", out ErrorMessage))
+                        {
+                            dh.UpdateByCondition("package", "pa_nextstep='" + dh.getFieldDataByCondition("packagedetail left join makeserial on ms_sncode=pd_barcode and ms_makecode=pd_makecode", "max(ms_nextstepcode)", "pd_outboxcode='" + pa_outboxcode.Text + "'").ToString() + "', PA_CURRENTSTEP = '' ", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                        }
+                    }
+                    OperateResult.AppendText("<<卡通箱核对成功\n", Color.DarkGreen, sncode);
+                    CheckRow = 0;
+                    SetCheck set = new SetCheck("OK", Color.Green);
+                    BaseUtil.SetFormCenter(set);
+                    set.ShowDialog();
+                    pa_outboxcode.Clear();
+                    pa_outboxcode.Focus();
+                }
+            }
+        }
+
+        private void pa_outboxcode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                dt = (DataTable)dh.ExecuteSql("select pd_barcode,pd_makecode pa_makecode,pa_nextstep from packagedetail left join package on pa_id=pd_paid where pd_outboxcode='" + pa_outboxcode.Text + "' or pa_zxcode='" + pa_outboxcode.Text + "'", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    //CheckNum.Text = CheckRow + "/" + CheckSnDGV.Rows.Count;
+                    pa_nextstep = dt.Rows[0]["pa_nextstep"].ToString();
+                    //if (pa_nextstep != User.CurrentStepCode && pa_nextstep != "")
+                    //{
+                    //    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "的下一工序" + pa_nextstep + "不是当前岗位资源对应工序\n", Color.Red);
+                    //    return;
+                    //}
+                    BaseUtil.FillDgvWithDataTable(CheckSnDGV, dt);
+                    BaseUtil.SetFormValue(this.Controls, dt);
+                    sncode.Focus();
+                }
+                else
+                {
+                    OperateResult.AppendText("<<箱号" + pa_outboxcode.Text + "不存在\n", Color.Red);
+                }
+            }
+        }
+
+        private void cancel_Click(object sender, EventArgs e)
+        {
+
+        }
+    }
+}

+ 165 - 0
UAS_MES_HYSX/FunctionCode/Make/Make_OutBoxSnCheckYLF.resx

@@ -0,0 +1,165 @@
+<?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="pd_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_checksn.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="cancel.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="cancel.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="cancel.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>

+ 22 - 22
UAS_MES_HYSX/FunctionCode/Packing/Packing_PackageCollectionYLF.cs

@@ -426,28 +426,28 @@ namespace UAS_MES_NEW.Packing
                         //如果未勾选了取消录入
                         if (!Cancel.Checked)
                         {
-                            //if (inputweight.Text == "")
-                            //{
-                            //    OperateResult.AppendText("请输入重量\n", Color.Green);
-                            //    inputweight.Focus();
-                            //    return;
-                            //}
-                            //double ActualWeight = double.Parse(inputweight.Text == "" ? "0" : inputweight.Text.Replace("kg", "").Replace("g", "").Trim());
-                            //if ((ActualWeight >= MinWeight) && (ActualWeight <= MaxWeight))
-                            //{
-                            //    OperateResult.AppendText(">>彩盒" + sn_code.Text + "重量检测检测合格\n", Color.Green);
-                            //    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒称重:" + inputweight.Text, "称量合格", sn_code.Text, "");
-                            //    LogicHandler.RecordProdWeight(sn_code.Text, "SN", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
-                            //    dh.ExecuteSql("update makeserial set ms_grossw='" + ActualWeight + "' where ms_id='" + oMsID + "'", "update");
-                            //}
-                            //else
-                            //{
-                            //    OperateResult.AppendText(">>彩盒" + sn_code.Text + "重量检测未通过\n", Color.Red);
-                            //    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒称重:" + inputweight.Text, "称量不合格", sn_code.Text, "");
-                            //    LogicHandler.RecordProdWeight(sn_code.Text, "SN", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
-                            //    return;
-                            //}
-                            //inputweight.Text = "";
+                            if (inputweight.Text == "")
+                            {
+                                OperateResult.AppendText("请输入重量\n", Color.Green);
+                                inputweight.Focus();
+                                return;
+                            }
+                            double ActualWeight = double.Parse(inputweight.Text == "" ? "0" : inputweight.Text.Replace("kg", "").Replace("g", "").Trim());
+                            if ((ActualWeight >= MinWeight) && (ActualWeight <= MaxWeight))
+                            {
+                                OperateResult.AppendText(">>彩盒" + sn_code.Text + "重量检测检测合格\n", Color.Green);
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒称重:" + inputweight.Text, "称量合格", sn_code.Text, "");
+                                LogicHandler.RecordProdWeight(sn_code.Text, "SN", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
+                                dh.ExecuteSql("update makeserial set ms_grossw='" + ActualWeight + "' where ms_id='" + oMsID + "'", "update");
+                            }
+                            else
+                            {
+                                OperateResult.AppendText(">>彩盒" + sn_code.Text + "重量检测未通过\n", Color.Red);
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒称重:" + inputweight.Text, "称量不合格", sn_code.Text, "");
+                                LogicHandler.RecordProdWeight(sn_code.Text, "SN", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
+                                return;
+                            }
+                            inputweight.Text = "";
 
                             //判断序列号是否已经装箱
                             string ms_outboxcode = dh.getFieldDataByCondition("makeserial", "ms_outboxcode", "ms_id='" + oMsID + "'").ToString();

+ 52 - 50
UAS_MES_HYSX/FunctionCode/Packing/Packing_PackageCollectionZX.Designer.cs

@@ -111,6 +111,7 @@
             this.pa_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.groupBoxWithBorder3 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.inputweight = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.StopWeight = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.StartWeight = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.RefreshWeigh = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
@@ -122,7 +123,6 @@
             this.label5 = new System.Windows.Forms.Label();
             this.ComList = new System.Windows.Forms.Label();
             this.BaudRate = new System.Windows.Forms.Label();
-            this.inputweight = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.groupBoxWithBorder2.SuspendLayout();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
@@ -537,7 +537,7 @@
             // 
             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(533, 35);
+            this.label1.Location = new System.Drawing.Point(534, 36);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(146, 41);
@@ -560,7 +560,7 @@
             this.checkweightlabel.AutoSize = true;
             this.checkweightlabel.CutLength = null;
             this.checkweightlabel.ForeColor = System.Drawing.Color.Red;
-            this.checkweightlabel.Location = new System.Drawing.Point(59, 51);
+            this.checkweightlabel.Location = new System.Drawing.Point(60, 52);
             this.checkweightlabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.checkweightlabel.MaximumSize = new System.Drawing.Size(400, 0);
             this.checkweightlabel.Name = "checkweightlabel";
@@ -571,7 +571,7 @@
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(695, 179);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(696, 180);
             this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 41);
@@ -581,7 +581,7 @@
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.Location = new System.Drawing.Point(695, 103);
+            this.ob_batchqty.Location = new System.Drawing.Point(696, 104);
             this.ob_batchqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 41);
@@ -591,7 +591,7 @@
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(533, 179);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(534, 180);
             this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
             this.ob_nowcheckqty_label.Size = new System.Drawing.Size(146, 41);
@@ -602,7 +602,7 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.Location = new System.Drawing.Point(533, 107);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(534, 108);
             this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(146, 41);
@@ -613,7 +613,7 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno.Location = new System.Drawing.Point(695, 35);
+            this.ob_checkno.Location = new System.Drawing.Point(696, 36);
             this.ob_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 41);
@@ -678,7 +678,7 @@
             // 
             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(19, 181);
+            this.label3.Location = new System.Drawing.Point(20, 182);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(146, 41);
@@ -728,7 +728,7 @@
             // 
             this.PrintList_label.AutoSize = true;
             this.PrintList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintList_label.Location = new System.Drawing.Point(19, 101);
+            this.PrintList_label.Location = new System.Drawing.Point(20, 102);
             this.PrintList_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintList_label.Name = "PrintList_label";
             this.PrintList_label.Size = new System.Drawing.Size(178, 41);
@@ -739,7 +739,7 @@
             // 
             this.PrintNum_label.AutoSize = true;
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintNum_label.Location = new System.Drawing.Point(485, 262);
+            this.PrintNum_label.Location = new System.Drawing.Point(486, 263);
             this.PrintNum_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintNum_label.Name = "PrintNum_label";
             this.PrintNum_label.Size = new System.Drawing.Size(82, 41);
@@ -787,7 +787,7 @@
             this.LockMakeCode.AutoSize = true;
             this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.LockMakeCode.LeaveEvent = false;
-            this.LockMakeCode.Location = new System.Drawing.Point(357, 284);
+            this.LockMakeCode.Location = new System.Drawing.Point(358, 285);
             this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
             this.LockMakeCode.Name = "LockMakeCode";
             this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
@@ -818,21 +818,23 @@
             // locksalecode
             // 
             this.locksalecode.AutoSize = true;
+            this.locksalecode.Checked = true;
+            this.locksalecode.CheckState = System.Windows.Forms.CheckState.Checked;
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.ForeColor = System.Drawing.Color.Red;
-            this.locksalecode.Location = new System.Drawing.Point(587, 37);
+            this.locksalecode.Location = new System.Drawing.Point(588, 38);
             this.locksalecode.Margin = new System.Windows.Forms.Padding(6);
             this.locksalecode.Name = "locksalecode";
-            this.locksalecode.Size = new System.Drawing.Size(186, 28);
+            this.locksalecode.Size = new System.Drawing.Size(138, 28);
             this.locksalecode.TabIndex = 196;
-            this.locksalecode.Text = "当前订单锁定";
+            this.locksalecode.Text = "连号检查";
             this.locksalecode.UseVisualStyleBackColor = true;
             // 
             // PreFix_label
             // 
             this.PreFix_label.AutoSize = true;
             this.PreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PreFix_label.Location = new System.Drawing.Point(361, 33);
+            this.PreFix_label.Location = new System.Drawing.Point(362, 34);
             this.PreFix_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PreFix_label.Name = "PreFix_label";
             this.PreFix_label.Size = new System.Drawing.Size(71, 36);
@@ -860,7 +862,7 @@
             // 
             this.pa_salecode_label.AutoSize = true;
             this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode_label.Location = new System.Drawing.Point(446, 284);
+            this.pa_salecode_label.Location = new System.Drawing.Point(447, 285);
             this.pa_salecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_salecode_label.Name = "pa_salecode_label";
             this.pa_salecode_label.Size = new System.Drawing.Size(146, 41);
@@ -871,7 +873,7 @@
             // 
             this.ma_code_label.AutoSize = true;
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(15, 277);
+            this.ma_code_label.Location = new System.Drawing.Point(16, 278);
             this.ma_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ma_code_label.Name = "ma_code_label";
             this.ma_code_label.Size = new System.Drawing.Size(114, 41);
@@ -882,7 +884,7 @@
             // 
             this.ms_salecode.AutoSize = true;
             this.ms_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_salecode.Location = new System.Drawing.Point(608, 284);
+            this.ms_salecode.Location = new System.Drawing.Point(609, 285);
             this.ms_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_salecode.Name = "ms_salecode";
             this.ms_salecode.Size = new System.Drawing.Size(0, 41);
@@ -892,7 +894,7 @@
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(165, 33);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(166, 34);
             this.OutBoxLength_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
             this.OutBoxLength_label.Size = new System.Drawing.Size(71, 36);
@@ -958,7 +960,7 @@
             this.AutoGenBoxCode.AutoSize = true;
             this.AutoGenBoxCode.Checked = true;
             this.AutoGenBoxCode.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(499, 93);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(500, 94);
             this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(4);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
             this.AutoGenBoxCode.Size = new System.Drawing.Size(178, 45);
@@ -971,7 +973,7 @@
             // 
             this.pa_currentqty_label.AutoSize = true;
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty_label.Location = new System.Drawing.Point(427, 157);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(428, 158);
             this.pa_currentqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
             this.pa_currentqty_label.Size = new System.Drawing.Size(146, 41);
@@ -982,7 +984,7 @@
             // 
             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(423, 213);
+            this.pr_detail_label.Location = new System.Drawing.Point(424, 214);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
@@ -1012,7 +1014,7 @@
             // 
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty.Location = new System.Drawing.Point(583, 153);
+            this.pa_currentqty.Location = new System.Drawing.Point(584, 154);
             this.pa_currentqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_currentqty.Name = "pa_currentqty";
             this.pa_currentqty.Size = new System.Drawing.Size(0, 41);
@@ -1022,7 +1024,7 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(15, 213);
+            this.pr_code_label.Location = new System.Drawing.Point(16, 214);
             this.pr_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code_label.Name = "pr_code_label";
             this.pr_code_label.Size = new System.Drawing.Size(146, 41);
@@ -1033,7 +1035,7 @@
             // 
             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(585, 213);
+            this.pr_detail.Location = new System.Drawing.Point(586, 214);
             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);
@@ -1043,7 +1045,7 @@
             // 
             this.pr_outboxinnerqty_label.AutoSize = true;
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(15, 151);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(16, 152);
             this.pr_outboxinnerqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
             this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(146, 41);
@@ -1054,7 +1056,7 @@
             // 
             this.pr_code.AutoSize = true;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(187, 213);
+            this.pr_code.Location = new System.Drawing.Point(188, 214);
             this.pr_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_code.Name = "pr_code";
@@ -1066,7 +1068,7 @@
             // 
             this.pa_code_label.AutoSize = true;
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_code_label.Location = new System.Drawing.Point(15, 91);
+            this.pa_code_label.Location = new System.Drawing.Point(16, 92);
             this.pa_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_code_label.Name = "pa_code_label";
             this.pa_code_label.Size = new System.Drawing.Size(82, 41);
@@ -1226,6 +1228,21 @@
             this.groupBoxWithBorder3.Text = "称量信息";
             this.groupBoxWithBorder3.TextColor = System.Drawing.Color.Black;
             // 
+            // inputweight
+            // 
+            this.inputweight.AllPower = null;
+            this.inputweight.BackColor = System.Drawing.Color.White;
+            this.inputweight.ID = null;
+            this.inputweight.Location = new System.Drawing.Point(82, 154);
+            this.inputweight.Name = "inputweight";
+            this.inputweight.Power = null;
+            this.inputweight.Size = new System.Drawing.Size(298, 50);
+            this.inputweight.Str = null;
+            this.inputweight.Str1 = null;
+            this.inputweight.Str2 = null;
+            this.inputweight.TabIndex = 188;
+            this.inputweight.KeyDown += new System.Windows.Forms.KeyEventHandler(this.inputweight_KeyDown);
+            // 
             // StopWeight
             // 
             this.StopWeight.AllPower = null;
@@ -1288,7 +1305,7 @@
             // 
             this.pr_cartonunit1.AutoSize = true;
             this.pr_cartonunit1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_cartonunit1.Location = new System.Drawing.Point(164, 254);
+            this.pr_cartonunit1.Location = new System.Drawing.Point(165, 255);
             this.pr_cartonunit1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_cartonunit1.Name = "pr_cartonunit1";
             this.pr_cartonunit1.Size = new System.Drawing.Size(38, 41);
@@ -1301,7 +1318,7 @@
             // 
             this.pr_cartonunit.AutoSize = true;
             this.pr_cartonunit.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_cartonunit.Location = new System.Drawing.Point(102, 48);
+            this.pr_cartonunit.Location = new System.Drawing.Point(103, 49);
             this.pr_cartonunit.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_cartonunit.Name = "pr_cartonunit";
             this.pr_cartonunit.Size = new System.Drawing.Size(38, 41);
@@ -1313,7 +1330,7 @@
             // 
             this.pr_cartonboxgw.AutoSize = true;
             this.pr_cartonboxgw.Font = new System.Drawing.Font("微软雅黑", 25F);
-            this.pr_cartonboxgw.Location = new System.Drawing.Point(34, 328);
+            this.pr_cartonboxgw.Location = new System.Drawing.Point(35, 329);
             this.pr_cartonboxgw.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_cartonboxgw.Name = "pr_cartonboxgw";
             this.pr_cartonboxgw.Size = new System.Drawing.Size(0, 88);
@@ -1323,7 +1340,7 @@
             // 
             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(18, 254);
+            this.label4.Location = new System.Drawing.Point(19, 255);
             this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(146, 41);
@@ -1335,7 +1352,7 @@
             this.weight.AutoSize = true;
             this.weight.Font = new System.Drawing.Font("微软雅黑", 35F);
             this.weight.ForeColor = System.Drawing.Color.DarkGreen;
-            this.weight.Location = new System.Drawing.Point(30, 116);
+            this.weight.Location = new System.Drawing.Point(31, 117);
             this.weight.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.weight.Name = "weight";
             this.weight.Size = new System.Drawing.Size(0, 121);
@@ -1345,7 +1362,7 @@
             // 
             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(18, 48);
+            this.label5.Location = new System.Drawing.Point(19, 49);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(82, 41);
@@ -1376,21 +1393,6 @@
             this.BaudRate.Text = "BaudRate";
             this.BaudRate.Visible = false;
             // 
-            // inputweight
-            // 
-            this.inputweight.AllPower = null;
-            this.inputweight.BackColor = System.Drawing.Color.White;
-            this.inputweight.ID = null;
-            this.inputweight.Location = new System.Drawing.Point(82, 154);
-            this.inputweight.Name = "inputweight";
-            this.inputweight.Power = null;
-            this.inputweight.Size = new System.Drawing.Size(298, 50);
-            this.inputweight.Str = null;
-            this.inputweight.Str1 = null;
-            this.inputweight.Str2 = null;
-            this.inputweight.TabIndex = 188;
-            this.inputweight.KeyDown += new System.Windows.Forms.KeyEventHandler(this.inputweight_KeyDown);
-            // 
             // Packing_PackageCollectionZX
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);

+ 26 - 10
UAS_MES_HYSX/FunctionCode/Packing/Packing_PackageCollectionZX.cs

@@ -289,7 +289,11 @@ namespace UAS_MES_NEW.Packing
                                 return;
                             }
                         }
-
+                        if (locksalecode.Checked&&!CheckBoxNum(oMakeCode, sn_code.Text))
+                        {
+                            OperateResult.AppendText("序列号" + sn_code.Text + "不在箱号装箱范围内,不允许采集\n", Color.Red);
+                            return;
+                        }
                         //string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
                         //if (nextstepcode != "" && nextstepcode != User.CurrentStepCode)
                         //{
@@ -316,15 +320,6 @@ namespace UAS_MES_NEW.Packing
                             StandardQTY = decimal.Parse(dt.Rows[0]["pr_outboxinnerqty"].ToString());
                             ms_makecode = dt.Rows[0]["ms_makecode"].ToString();
                             ms_salecode_text = dt.Rows[0]["ms_makecode"].ToString();
-                            if (locksalecode.Checked && ms_salecode.Text != "" && ms_salecode.Text != ms_salecode_text)
-                            {
-                                OperateResult.AppendText(">>序列号" + sn_code.Text + "所属订单号" + ms_salecode_text + "与界面订单号" + ms_salecode.Text + "不同,无法采集\n", Color.Red, sn_code);
-                                if (md.IsOpen)
-                                {
-                                    md.SendOrder("M502_ON");
-                                }
-                                return;
-                            }
                             BaseUtil.SetFormValue(this.Controls, dt);
                         }
 
@@ -807,6 +802,27 @@ namespace UAS_MES_NEW.Packing
             }
         }
 
+        private bool CheckBoxNum(string ma_code, string sncode)
+        {
+            string maxbox = dh.getFieldDataByCondition("package", "max(pa_zxcode)", "pa_makecode='" + ma_code + "' and pa_type=1").ToString();
+            int pr_outboxinnerqty = int.Parse(dh.getFieldDataByCondition("makeserial left join product on ms_prodcode=pr_code", "nvl(pr_outboxinnerqty,0)", "ms_makecode='" + ma_code + "' and ms_sncode='" + sncode + "'").ToString());
+            int maxnum = 0;
+            int currentnum = 0;
+            //最大的箱号
+            if (maxbox != "")
+            {
+                maxnum = int.Parse(maxbox.Substring(maxbox.Length - 4));
+            }
+            //当前序列号的流水
+            currentnum = int.Parse(sncode.Substring(sncode.Length - 5));
+            //当前序列号在下箱流水范围内的话,允许采集
+            if (maxnum * pr_outboxinnerqty < currentnum && currentnum <= (maxnum + 1) * pr_outboxinnerqty)
+            {
+                return true;
+            }
+            return false;
+        }
+
         private void ob_checkno_TextChanged(object sender, EventArgs e)
         {
             if (ob_checkno.Text != "")

+ 2 - 2
UAS_MES_HYSX/FunctionCode/Packing/Packing_PackageCollectionZX.resx

@@ -481,7 +481,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAACdNJREFUeF7t3dtOW4cW
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAACdNJREFUeF7t3dtOW4cW
         heFe9VUibakv1/eoVGk/TFedps2hnCGAjTnYnAlgbGNzJpUqza2xgL2zmSlL4oqV8V98Fx2q190/YxwC
         30XEdwA8pQGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMNAHykAYCPNADwkQYAPtIAwEcaAPhIAwAfaQDg
         Iw0AfKQBgI80APCRBgA+0gDARxoA+EgDAB9pAOAjDQB8pAGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMN
@@ -612,7 +612,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAACdNJREFUeF7t3dtOW4cW
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAACdNJREFUeF7t3dtOW4cW
         heFe9VUibakv1/eoVGk/TFedps2hnCGAjTnYnAlgbGNzJpUqza2xgL2zmSlL4oqV8V98Fx2q190/YxwC
         30XEdwA8pQGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMNAHykAYCPNADwkQYAPtIAwEcaAPhIAwAfaQDg
         Iw0AfKQBgI80APCRBgA+0gDARxoA+EgDAB9pAOAjDQB8pAGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMN

+ 4 - 4
UAS_MES_HYSX/PublicMethod/Print.cs

@@ -261,8 +261,8 @@ namespace UAS_MES_NEW.PublicMethod
                     dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "'", "select");
                     if (dt.Rows.Count == 0)
                     {
-                        //ErrorMessage = SnCode + LabelType + "未打印,不允许补打";
-                        //return false;
+                        ErrorMessage = SnCode + LabelType + "未打印,不允许补打";
+                        return false;
                     }
                 }
             }
@@ -496,8 +496,8 @@ namespace UAS_MES_NEW.PublicMethod
                     dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_type='" + LabelType + "'", "select");
                     if (dt.Rows.Count == 0)
                     {
-                        //ErrorMessage = SnCode + LabelType + "未打印,不允许补打";
-                        //return false;
+                        ErrorMessage = SnCode + LabelType + "未打印,不允许补打";
+                        return false;
                     }
                 }
             }

+ 10 - 0
UAS_MES_HYSX/UAS_MES_HYSX.csproj

@@ -653,6 +653,12 @@
     <Compile Include="FunctionCode\Make\Make_ListenSocket.Designer.cs">
       <DependentUpon>Make_ListenSocket.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_OutBoxSnCheckYLF.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_OutBoxSnCheckYLF.Designer.cs">
+      <DependentUpon>Make_OutBoxSnCheckYLF.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_OutBoxSnCheck.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1714,6 +1720,10 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_ListenSocket.resx">
       <DependentUpon>Make_ListenSocket.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_OutBoxSnCheckYLF.resx">
+      <DependentUpon>Make_OutBoxSnCheckYLF.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_OutBoxSnCheck.resx">
       <DependentUpon>Make_OutBoxSnCheck.cs</DependentUpon>
       <SubType>Designer</SubType>