瀏覽代碼

二开功能提交

callm 1 年之前
父節點
當前提交
d4c88471f5

+ 47 - 57
UAS_MES_YD/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -199,77 +199,67 @@ namespace UAS_MES_NEW.Make
                             sncode.Focus();
                             return;
                         }
-                        if (int.Parse(mcd_remainqty.Text) <= 0 && dt.Rows[0]["ma_unlimitin"].ToString() == "0")
+                        //所选标签不为空
+                        if (PrintLabel.SelectedValue != null)
                         {
-                            macode = ma_code.Text;
-                            ErrorMessage = "工单" + macode + "打印结束\n>请输入SN";
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
-                            sncode.Focus();
-                        }
-                        else
-                        {
-                            //所选标签不为空
-                            if (PrintLabel.SelectedValue != null)
+                            //如果打印张数为空,返回
+                            if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
+                            {
+                                OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red, sncode);
+                                //清空输入框的值,聚焦
+                                sncode.Focus();
+                                //提示用户“>>请输入SN”
+                                OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                return;
+                            }
+                            //更新至下一步工序
+                            if (LogicHandler.SetStepResult(oMakeCode, User.UserSourceCode, sncode.Text, "彩盒打印", "彩盒打印成功", User.UserCode, out ErrorMessage))
                             {
-                                //如果打印张数为空,返回
-                                if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
+                                //提示正确返回时传递的信息
+                                if (ErrorMessage.Contains("AFTERSUCCESS"))
+                                    OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                                // doc = lbl.Documents.Open(PrintLabel.Text);
+
+                                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
                                 {
-                                    OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red, sncode);
-                                    //清空输入框的值,聚焦
-                                    sncode.Focus();
-                                    //提示用户“>>请输入SN”
-                                    OperateResult.AppendText(">>请输入SN\n", Color.Black);
-                                    return;
+                                    //提示用户打印成功
+                                    OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
                                 }
-                                //更新至下一步工序
-                                if (LogicHandler.SetStepResult(oMakeCode, User.UserSourceCode, sncode.Text, "彩盒打印", "彩盒打印成功", User.UserCode, out ErrorMessage))
+                                else
                                 {
-                                    //提示正确返回时传递的信息
-                                    if (ErrorMessage.Contains("AFTERSUCCESS"))
-                                        OperateResult.AppendText(">>" + ErrorMessage + "\n");
-                                    // doc = lbl.Documents.Open(PrintLabel.Text);
-
-                                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
-                                        {
-                                            //提示用户打印成功
-                                            OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);
-                                        }
-                                        else
-                                        {
-                                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
-                                        }
-                                    if (CollectRemark.Checked && Remark.Text != "")
-                                    {
-                                        LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, pr_code.Text, Remark.Text);
-                                    }
-                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒打印", "彩盒打印成功", sncode.Text, "");
-                                    //刷新打印数量和剩余数量
-                                    dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,mcd_okqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
-                                    BaseUtil.SetFormValue(Controls, dt);
-                                    sncode.Text = "";
-                                    ms_id = null;
-                                    sncode.Focus();
+                                    OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                                 }
-                                else
+                                if (CollectRemark.Checked && Remark.Text != "")
                                 {
-                                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sncode);
-                                    ms_id = null;
-                                    sncode.Focus();
+                                    LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, pr_code.Text, Remark.Text);
                                 }
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒打印", "彩盒打印成功", sncode.Text, "");
+                                //刷新打印数量和剩余数量
+                                dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,mcd_okqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
+                                BaseUtil.SetFormValue(Controls, dt);
+                                sncode.Text = "";
+                                ms_id = null;
+                                sncode.Focus();
                             }
                             else
                             {
-                                OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护彩盒标签\n", Color.Red, sncode);
-                                return;
-                            }
-                            if (CheckTSN.Checked == true)
-                            {
-                                OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sncode);
                                 ms_id = null;
+                                sncode.Focus();
                             }
-                            else
-                                OperateResult.AppendText(">>请输入SN\n", Color.Black);
                         }
+                        else
+                        {
+                            OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护彩盒标签\n", Color.Red, sncode);
+                            return;
+                        }
+                        if (CheckTSN.Checked == true)
+                        {
+                            OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                            ms_id = null;
+                        }
+                        else
+                            OperateResult.AppendText(">>请输入SN\n", Color.Black);
                     }
                     else
                     {

+ 297 - 0
UAS_MES_YD/FunctionCode/Make/Make_ImeiCheck_ThreeLabel.Designer.cs

@@ -0,0 +1,297 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_ImeiCheck_ThreeLabel
+    {
+        /// <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.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.pr_detail = new System.Windows.Forms.Label();
+            this.showResult = new System.Windows.Forms.ListView();
+            this.label10 = new System.Windows.Forms.Label();
+            this.remain_qty = new System.Windows.Forms.Label();
+            this.mcd_okqty = new System.Windows.Forms.Label();
+            this.ma_prodcode = new System.Windows.Forms.Label();
+            this.ma_code = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
+            this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.SuspendLayout();
+            // 
+            // columnHeader4
+            // 
+            this.columnHeader4.Text = "结果";
+            this.columnHeader4.Width = 96;
+            // 
+            // columnHeader3
+            // 
+            this.columnHeader3.Text = "时间";
+            this.columnHeader3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader3.Width = 170;
+            // 
+            // columnHeader2
+            // 
+            this.columnHeader2.Text = "SN";
+            this.columnHeader2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader2.Width = 136;
+            // 
+            // columnHeader1
+            // 
+            this.columnHeader1.Text = "";
+            this.columnHeader1.Width = 50;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pr_detail.Location = new System.Drawing.Point(1258, 38);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.TabIndex = 31;
+            // 
+            // showResult
+            // 
+            this.showResult.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader1,
+            this.columnHeader2,
+            this.columnHeader3,
+            this.columnHeader4});
+            this.showResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.showResult.HideSelection = false;
+            this.showResult.Location = new System.Drawing.Point(942, 234);
+            this.showResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.showResult.Name = "showResult";
+            this.showResult.Size = new System.Drawing.Size(778, 510);
+            this.showResult.TabIndex = 30;
+            this.showResult.UseCompatibleStateImageBehavior = false;
+            this.showResult.View = System.Windows.Forms.View.Details;
+            // 
+            // 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(64, 788);
+            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 = 28;
+            this.label10.Text = "SN";
+            // 
+            // remain_qty
+            // 
+            this.remain_qty.AutoSize = true;
+            this.remain_qty.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.remain_qty.Location = new System.Drawing.Point(204, 130);
+            this.remain_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.remain_qty.Name = "remain_qty";
+            this.remain_qty.Size = new System.Drawing.Size(0, 41);
+            this.remain_qty.TabIndex = 26;
+            // 
+            // mcd_okqty
+            // 
+            this.mcd_okqty.AutoSize = true;
+            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.mcd_okqty.Location = new System.Drawing.Point(724, 130);
+            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_okqty.Name = "mcd_okqty";
+            this.mcd_okqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_okqty.TabIndex = 25;
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ma_prodcode.Location = new System.Drawing.Point(724, 38);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_prodcode.TabIndex = 24;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AutoSize = true;
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_code.Location = new System.Drawing.Point(204, 38);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Size = new System.Drawing.Size(0, 41);
+            this.ma_code.TabIndex = 23;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label5.Location = new System.Drawing.Point(574, 130);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(210, 41);
+            this.label5.TabIndex = 22;
+            this.label5.Text = "当前工单计数";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label4.Location = new System.Drawing.Point(54, 130);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(114, 41);
+            this.label4.TabIndex = 21;
+            this.label4.Text = "剩余数";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label3.Location = new System.Drawing.Point(1102, 38);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(146, 41);
+            this.label3.TabIndex = 20;
+            this.label3.Text = "产品名称";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label2.Location = new System.Drawing.Point(570, 38);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(146, 41);
+            this.label2.TabIndex = 19;
+            this.label2.Text = "产品编号";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label1.Location = new System.Drawing.Point(50, 38);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(146, 41);
+            this.label1.TabIndex = 18;
+            this.label1.Text = "工单编号";
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(1102, 130);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(176, 44);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 32;
+            this.StepCount.Load += new System.EventHandler(this.StepCount_Load);
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = null;
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(144, 788);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 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 = 29;
+            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(58, 234);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(802, 510);
+            this.OperateResult.TabIndex = 27;
+            this.OperateResult.Text = "";
+            // 
+            // Make_ImeiCheck
+            // 
+            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.StepCount);
+            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.showResult);
+            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.label10);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.remain_qty);
+            this.Controls.Add(this.mcd_okqty);
+            this.Controls.Add(this.ma_prodcode);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Name = "Make_ImeiCheck";
+            this.Tag = "Make!ImeiCheck";
+            this.Load += new System.EventHandler(this.Make_LabelCheck_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_LabelCheck_SizeChanged);
+            this.ResumeLayout(true);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.ColumnHeader columnHeader4;
+        private System.Windows.Forms.ColumnHeader columnHeader3;
+        private System.Windows.Forms.ColumnHeader columnHeader2;
+        private System.Windows.Forms.ColumnHeader columnHeader1;
+        private System.Windows.Forms.Label pr_detail;
+        private System.Windows.Forms.ListView showResult;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
+        private System.Windows.Forms.Label label10;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.Label remain_qty;
+        private System.Windows.Forms.Label mcd_okqty;
+        private System.Windows.Forms.Label ma_prodcode;
+        private System.Windows.Forms.Label ma_code;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+    }
+}

+ 409 - 0
UAS_MES_YD/FunctionCode/Make/Make_ImeiCheck_ThreeLabel.cs

@@ -0,0 +1,409 @@
+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_ImeiCheck_ThreeLabel : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        DataHelper dh;
+
+        LogStringBuilder sql;
+
+        DataTable dt;
+
+        DataTable info;
+
+        string imei1 = "";
+
+        string imei2 = "";
+
+        bool isImei1 = false;
+
+        bool isImei2 = false;
+
+        string oErrorMessage = "";
+
+        string SN = "";
+
+        string omakeCode = "";
+
+        string oMsid = "";
+        public Make_ImeiCheck_ThreeLabel()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_LabelCheck_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            //聚焦SN号
+            sncode.Focus();
+            //打开界面提示用户:请输入SN 
+            OperateResult.AppendText(">>请输入SN\n", Color.Black);
+            sql = new LogStringBuilder();
+            dh = SystemInf.dh;
+            StepCount.StepCode = User.CurrentStepCode;
+            StepCount.Source = User.UserSourceCode;
+            StepCount.LineCode = User.UserLineCode;
+            StepCount.Dh = dh;
+            StepCount.Start();
+        }
+        string checksn = "";
+        private void Make_LabelCheck_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            //判断是enter事件
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (sncode.Text == "")
+                {
+                    OperateResult.AppendText("<<输入不能为空\n", Color.Red);
+                    return;
+                }
+                dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + sncode.Text + "' order by ms_id desc", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                }
+                else
+                {
+                    dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + sncode.Text + "' order by ms_id desc", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        sncode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei1='" + sncode.Text + "' order by mil_id desc", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            sncode.Text = dt.Rows[0]["mil_sncode"].ToString();
+                        }
+                        else
+                        {
+                            dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei2='" + sncode.Text + "' order by mil_id desc", "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                sncode.Text = dt.Rows[0]["mil_sncode"].ToString();
+                            }
+                        }
+                    }
+                }
+                if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
+                {
+
+                }
+                //输入的是SN
+                if (!isImei1 && !isImei2)
+                {
+                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
+                    sql.Clear();
+                    sql.Append("select max(ms_id) ms_id from makeserial where ms_sncode ='" + sncode.Text + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                    {
+                        sql.Clear();
+                        sql.Append("select max(ms_id) ms_id from makeserial where ms_imei1 ='" + sncode.Text + "'");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                        {
+                            sql.Clear();
+                            sql.Append("select max(ms_id) ms_id from makeserial where ms_imei2 ='" + sncode.Text + "'");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                            {
+                                sql.Clear();
+                                sql.Append("select max(ms_id) ms_id from makeimeilist left join makeserial on mil_makecode=ms_makecode and mil_sncode=ms_sncode where mil_imei1 ='" + sncode.Text + "'");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                                {
+                                    sql.Clear();
+                                    sql.Append("select max(ms_id) ms_id from makeimeilist left join makeserial on mil_makecode=ms_makecode and mil_sncode=ms_sncode where mil_imei2 ='" + sncode.Text + "'");
+                                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                    if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                                    {
+                                        OperateResult.AppendText("<<SN错误,序列号" + sncode.Text + "不存在\n", Color.Red, sncode);
+                                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    //存在该SN号
+                    //根据该ms_id查询ms_imei1,ms_makecode信息
+                    sql.Clear();
+                    sql.Append("select ms_sncode from  makeserial  where ms_id='" + dt.Rows[0]["ms_id"].ToString() + "'");
+                    info = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (info.Rows.Count > 0)
+                    {
+                        //用变量记录imei1和makecode
+                        checksn = info.Rows[0]["ms_sncode"].ToString();
+                        SN = sncode.Text;
+                        //>> 请输入彩盒上的SN
+                        OperateResult.AppendText("<<条码" + sncode.Text + "对应的SN号为:" + checksn + "\n", Color.Green);
+                        OperateResult.AppendText(">>请输入需要核对的条码1\n", Color.Black, sncode);
+                        //设定要输入imei1
+                        isImei1 = true;
+                    }
+                    else
+                    {
+                        OperateResult.AppendText("<<SN:" + sncode.Text + "对应的SN不存在\n", Color.Red, sncode);
+                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                        SetCheck set = new SetCheck("NG", Color.Red);
+                        BaseUtil.SetFormCenter(set);
+                        set.ShowDialog();
+                    }
+                }
+                else if (isImei1)
+                {
+                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
+                    sql.Clear();
+                    sql.Append("select max(ms_id) ms_id from makeserial where ms_sncode ='" + sncode.Text + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                    {
+                        sql.Clear();
+                        sql.Append("select max(ms_id) ms_id from makeserial where ms_imei1 ='" + sncode.Text + "'");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                        {
+                            sql.Clear();
+                            sql.Append("select max(ms_id) ms_id from makeserial where ms_imei2 ='" + sncode.Text + "'");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                            {
+                                sql.Clear();
+                                sql.Append("select max(ms_id) ms_id from makeimeilist left join makeserial on mil_makecode=ms_makecode and mil_sncode=ms_sncode where mil_imei1 ='" + sncode.Text + "'");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                                {
+                                    sql.Clear();
+                                    sql.Append("select max(ms_id) ms_id from makeimeilist left join makeserial on mil_makecode=ms_makecode and mil_sncode=ms_sncode where mil_imei2 ='" + sncode.Text + "'");
+                                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                    if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                                    {
+                                        OperateResult.AppendText("<<SN错误,序列号" + sncode.Text + "不存在\n", Color.Red, sncode);
+                                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                        SetCheck set = new SetCheck("NG", Color.Red);
+                                        BaseUtil.SetFormCenter(set);
+                                        set.ShowDialog();
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    sql.Clear();
+                    sql.Append("select ms_sncode from  makeserial  where ms_id='" + dt.Rows[0]["ms_id"].ToString() + "'");
+                    info = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (info.Rows.Count > 0)
+                    {
+                        imei1 = info.Rows[0]["ms_sncode"].ToString();
+                    }
+                    if (imei1 == checksn)
+                    {
+                        OperateResult.AppendText("<<条码1核对成功\n", Color.Green, sncode);
+                        OperateResult.AppendText(">>请输入需要核对的条码2\n", Color.Black);
+                        isImei2 = true;
+                        isImei1 = false;
+                    }
+                    else
+                    {
+                        //清空imei1变量的值
+                        imei1 = "";
+                        imei2 = "";
+                        checksn = "";
+                        //SN核对失败
+                        //>> 请输入SN
+                        OperateResult.AppendText(">>SN核对失败,不一致\n", Color.Red, sncode);
+                        SetCheck set = new SetCheck("NG", Color.Red);
+                        BaseUtil.SetFormCenter(set);
+                        set.ShowDialog();
+                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                        isImei1 = false;
+                        isImei2 = false;
+                    }
+                }
+                //输入的是imei1
+                else
+                {
+                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
+                    sql.Clear();
+                    sql.Append("select max(ms_id) ms_id from makeserial where ms_sncode ='" + sncode.Text + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                    {
+                        sql.Clear();
+                        sql.Append("select max(ms_id) ms_id from makeserial where ms_imei1 ='" + sncode.Text + "'");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                        {
+                            sql.Clear();
+                            sql.Append("select max(ms_id) ms_id from makeserial where ms_imei2 ='" + sncode.Text + "'");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                            {
+                                sql.Clear();
+                                sql.Append("select max(ms_id) ms_id from makeimeilist left join makeserial on mil_makecode=ms_makecode and mil_sncode=ms_sncode where mil_imei1 ='" + sncode.Text + "'");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                                {
+                                    sql.Clear();
+                                    sql.Append("select max(ms_id) ms_id from makeimeilist left join makeserial on mil_makecode=ms_makecode and mil_sncode=ms_sncode where mil_imei2 ='" + sncode.Text + "'");
+                                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                    if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
+                                    {
+                                        OperateResult.AppendText("<<SN错误,序列号" + sncode.Text + "不存在\n", Color.Red, sncode);
+                                        SetCheck set = new SetCheck("NG", Color.Red);
+                                        BaseUtil.SetFormCenter(set);
+                                        set.ShowDialog();
+                                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    sql.Clear();
+                    sql.Append("select ms_sncode from  makeserial  where ms_id='" + dt.Rows[0]["ms_id"].ToString() + "'");
+                    info = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (info.Rows.Count > 0)
+                    {
+                        imei2 = info.Rows[0]["ms_sncode"].ToString();
+                    }
+                    if (imei1 == checksn && imei2 == checksn)
+                    {
+                        //说明输入的imei1对比一致
+                        //判断工序属性attribute
+                        if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out oErrorMessage))
+                        {
+                            //判断序列号下一工序(CHECKSTEPSNANDMACODE)   
+                            if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, checksn, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
+                            {
+                                string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsid + "'").ToString();
+                                if (nextstepcode != User.CurrentStepCode)
+                                {
+                                    string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
+                                    OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sncode);
+                                    imei1 = "";
+                                    imei2 = "";
+                                    checksn = "";
+                                    isImei1 = false;
+                                    isImei2 = false;
+                                    return;
+                                }
+                                //调用  SETSTEPRESULT ,获取返回的工单号,
+                                if (LogicHandler.SetStepResult(omakeCode, User.UserSourceCode, checksn, "标签核对", "OK", User.UserCode, out oErrorMessage))
+                                {
+
+                                    //提示正确返回时传递的信息
+                                    if (oErrorMessage.Contains("AFTERSUCCESS"))
+                                        OperateResult.AppendText(">>" + oErrorMessage + "\n");
+                                    //根据工单号查询makecraftdetail 表中的 mcd_okqty 计数,剩余数为ma_qty - nvl(mcd_inqty,0),刷新页面中工单信息的显示
+                                    sql.Clear();
+                                    sql.Append("select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode,pr_detail,");
+                                    sql.Append("ma_qty - nvl(mcd_okqty, 0) remain_qty from make left join makecraftdetail on ");
+                                    sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + omakeCode + "'  and mcd_stepcode='" + User.CurrentStepCode + "'");
+                                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                    BaseUtil.SetFormValue(Controls, dt);
+                                    //将SN,时间,结果记录在页面
+                                    recordResult(checksn, DateTime.Now.ToString(), "成功");
+                                    //记录日志
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "标签核对", "标签核对成功", SN, "");
+                                    //SN核对成功
+                                    //>> 请输入SN
+                                    OperateResult.AppendText("<<条码2核对成功\n", Color.Green, sncode);
+                                    OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                }
+                                else
+                                {
+                                    //setstepresult不通过
+                                    OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                                    recordResult(checksn, DateTime.Now.ToString(), "失败");
+                                    SetCheck set = new SetCheck("NG", Color.Red);
+                                    BaseUtil.SetFormCenter(set);
+                                    set.ShowDialog();
+                                }
+                            }
+                            else
+                            {
+                                //判定序列号下一工序不通过
+                                OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                                recordResult(checksn, DateTime.Now.ToString(), "失败");
+                                SetCheck set = new SetCheck("NG", Color.Red);
+                                BaseUtil.SetFormCenter(set);
+                                set.ShowDialog();
+                            }
+                        }
+                        else
+                        {
+                            //判定工序属性不通过
+                            OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                            SetCheck set = new SetCheck("NG", Color.Red);
+                            BaseUtil.SetFormCenter(set);
+                            set.ShowDialog();
+                            recordResult(checksn, DateTime.Now.ToString(), "失败");
+                        }
+                    }
+                    //说明比对不一致
+                    else
+                    {
+                        //清空imei1变量的值
+                        imei1 = "";
+                        imei2 = "";
+                        checksn = "";
+                        //SN核对失败
+                        //>> 请输入SN
+                        OperateResult.AppendText(">>SN核对失败,不一致\n", Color.Red, sncode);
+                        SetCheck set = new SetCheck("NG", Color.Red);
+                        BaseUtil.SetFormCenter(set);
+                        set.ShowDialog();
+                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                    }
+                    //imei1校对结束,下次输入的是SN
+                    isImei1 = false;
+                    isImei2 = false;
+                }
+            }
+        }
+        private void recordResult(string SN, string time, string result)
+        {
+            ListViewItem lvi = new ListViewItem();
+            //分条赋值
+            lvi.SubItems.Add(SN);
+            lvi.SubItems.Add(time);
+            lvi.SubItems.Add(result);
+            //添加结果的信息进去
+            showResult.Items.Add(lvi);
+        }
+        private void clear()
+        {
+            //清空变量的值
+            omakeCode = "";
+            oMsid = "";
+            SN = "";
+            imei1 = "";
+            imei2 = "";
+            checksn = "";
+        }
+
+        private void StepCount_Load(object sender, EventArgs e)
+        {
+
+        }
+    }
+}

+ 120 - 0
UAS_MES_YD/FunctionCode/Make/Make_ImeiCheck_ThreeLabel.resx

@@ -0,0 +1,120 @@
+<?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>
+</root>

+ 169 - 18
UAS_MES_YD/FunctionCode/Packing/Packing_PalletWeightRecord.Designer.cs

@@ -37,15 +37,25 @@
             this.weight = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pa_outboxcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.length = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.width = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label7 = new System.Windows.Forms.Label();
+            this.label8 = new System.Windows.Forms.Label();
+            this.height = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.SuspendLayout();
             // 
             // outboxcode_label
             // 
             this.outboxcode_label.AutoSize = true;
             this.outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.outboxcode_label.Location = new System.Drawing.Point(89, 97);
+            this.outboxcode_label.Location = new System.Drawing.Point(178, 194);
+            this.outboxcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.outboxcode_label.Name = "outboxcode_label";
-            this.outboxcode_label.Size = new System.Drawing.Size(58, 21);
+            this.outboxcode_label.Size = new System.Drawing.Size(114, 41);
             this.outboxcode_label.TabIndex = 168;
             this.outboxcode_label.Text = "栈板号";
             // 
@@ -53,9 +63,10 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(89, 153);
+            this.label1.Location = new System.Drawing.Point(178, 277);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(74, 21);
+            this.label1.Size = new System.Drawing.Size(146, 41);
             this.label1.TabIndex = 170;
             this.label1.Text = "栈板重量";
             // 
@@ -66,12 +77,13 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = null;
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(476, 320);
+            this.Clean.Location = new System.Drawing.Point(952, 640);
+            this.Clean.Margin = new System.Windows.Forms.Padding(6);
             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(75, 28);
+            this.Clean.Size = new System.Drawing.Size(150, 56);
             this.Clean.TabIndex = 173;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = false;
@@ -80,9 +92,10 @@
             // 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(383, 13);
+            this.OperateResult.Location = new System.Drawing.Point(766, 26);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(260, 302);
+            this.OperateResult.Size = new System.Drawing.Size(516, 600);
             this.OperateResult.TabIndex = 172;
             this.OperateResult.Text = "";
             // 
@@ -93,12 +106,13 @@
             this.SaveWeight.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveWeight.DownImage")));
             this.SaveWeight.Image = null;
             this.SaveWeight.IsShowBorder = true;
-            this.SaveWeight.Location = new System.Drawing.Point(183, 216);
+            this.SaveWeight.Location = new System.Drawing.Point(378, 583);
+            this.SaveWeight.Margin = new System.Windows.Forms.Padding(6);
             this.SaveWeight.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveWeight.MoveImage")));
             this.SaveWeight.Name = "SaveWeight";
             this.SaveWeight.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveWeight.NormalImage")));
             this.SaveWeight.Power = null;
-            this.SaveWeight.Size = new System.Drawing.Size(75, 28);
+            this.SaveWeight.Size = new System.Drawing.Size(150, 56);
             this.SaveWeight.TabIndex = 171;
             this.SaveWeight.Text = "保存";
             this.SaveWeight.UseVisualStyleBackColor = false;
@@ -109,10 +123,11 @@
             this.weight.AllPower = "ifall";
             this.weight.BackColor = System.Drawing.Color.White;
             this.weight.ID = null;
-            this.weight.Location = new System.Drawing.Point(183, 153);
+            this.weight.Location = new System.Drawing.Point(366, 277);
+            this.weight.Margin = new System.Windows.Forms.Padding(6);
             this.weight.Name = "weight";
             this.weight.Power = "ifread";
-            this.weight.Size = new System.Drawing.Size(147, 21);
+            this.weight.Size = new System.Drawing.Size(290, 35);
             this.weight.Str = null;
             this.weight.Str1 = null;
             this.weight.Str2 = null;
@@ -124,10 +139,11 @@
             this.pa_outboxcode.AllPower = "ifall";
             this.pa_outboxcode.BackColor = System.Drawing.Color.White;
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(183, 97);
+            this.pa_outboxcode.Location = new System.Drawing.Point(366, 194);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(6);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifread";
-            this.pa_outboxcode.Size = new System.Drawing.Size(147, 21);
+            this.pa_outboxcode.Size = new System.Drawing.Size(290, 35);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -138,17 +154,141 @@
             // 
             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(332, 151);
+            this.label2.Location = new System.Drawing.Point(664, 273);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(29, 21);
+            this.label2.Size = new System.Drawing.Size(55, 41);
             this.label2.TabIndex = 174;
             this.label2.Text = "kg";
             // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(664, 346);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(64, 41);
+            this.label3.TabIndex = 177;
+            this.label3.Text = "cm";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(178, 350);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(50, 41);
+            this.label4.TabIndex = 176;
+            this.label4.Text = "长";
+            // 
+            // length
+            // 
+            this.length.AllPower = "ifall";
+            this.length.BackColor = System.Drawing.Color.White;
+            this.length.ID = null;
+            this.length.Location = new System.Drawing.Point(366, 350);
+            this.length.Margin = new System.Windows.Forms.Padding(6);
+            this.length.Name = "length";
+            this.length.Power = "ifread";
+            this.length.Size = new System.Drawing.Size(290, 35);
+            this.length.Str = null;
+            this.length.Str1 = null;
+            this.length.Str2 = null;
+            this.length.TabIndex = 175;
+            this.length.Tag = "NoAuto";
+            // 
+            // 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(664, 422);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(64, 41);
+            this.label5.TabIndex = 180;
+            this.label5.Text = "cm";
+            // 
+            // 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(178, 426);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(50, 41);
+            this.label6.TabIndex = 179;
+            this.label6.Text = "宽";
+            // 
+            // width
+            // 
+            this.width.AllPower = "ifall";
+            this.width.BackColor = System.Drawing.Color.White;
+            this.width.ID = null;
+            this.width.Location = new System.Drawing.Point(366, 426);
+            this.width.Margin = new System.Windows.Forms.Padding(6);
+            this.width.Name = "width";
+            this.width.Power = "ifread";
+            this.width.Size = new System.Drawing.Size(290, 35);
+            this.width.Str = null;
+            this.width.Str1 = null;
+            this.width.Str2 = null;
+            this.width.TabIndex = 178;
+            this.width.Tag = "NoAuto";
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(664, 503);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(64, 41);
+            this.label7.TabIndex = 183;
+            this.label7.Text = "cm";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(178, 507);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(50, 41);
+            this.label8.TabIndex = 182;
+            this.label8.Text = "高";
+            // 
+            // height
+            // 
+            this.height.AllPower = "ifall";
+            this.height.BackColor = System.Drawing.Color.White;
+            this.height.ID = null;
+            this.height.Location = new System.Drawing.Point(366, 507);
+            this.height.Margin = new System.Windows.Forms.Padding(6);
+            this.height.Name = "height";
+            this.height.Power = "ifread";
+            this.height.Size = new System.Drawing.Size(290, 35);
+            this.height.Str = null;
+            this.height.Str1 = null;
+            this.height.Str2 = null;
+            this.height.TabIndex = 181;
+            this.height.Tag = "NoAuto";
+            // 
             // Packing_PalletWeightRecord
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(662, 376);
+            this.ClientSize = new System.Drawing.Size(1324, 752);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.label8);
+            this.Controls.Add(this.height);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.width);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.length);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.Clean);
             this.Controls.Add(this.OperateResult);
@@ -158,9 +298,11 @@
             this.Controls.Add(this.outboxcode_label);
             this.Controls.Add(this.pa_outboxcode);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "Packing_PalletWeightRecord";
             this.Tag = "Packing!PalletWeightRecord";
             this.Text = "Make_PalletWeightRecord";
+            this.Load += new System.EventHandler(this.Packing_PalletWeightRecord_Load);
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -176,5 +318,14 @@
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private CustomControl.ButtonUtil.NormalButton Clean;
         private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label4;
+        private CustomControl.TextBoxWithIcon.EnterTextBox length;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label6;
+        private CustomControl.TextBoxWithIcon.EnterTextBox width;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.Label label8;
+        private CustomControl.TextBoxWithIcon.EnterTextBox height;
     }
 }

+ 7 - 2
UAS_MES_YD/FunctionCode/Packing/Packing_PalletWeightRecord.cs

@@ -13,7 +13,7 @@ namespace UAS_MES_NEW.Packing
 {
     public partial class Packing_PalletWeightRecord : Form
     {
-        DataHelper dh =  SystemInf.dh;
+        DataHelper dh = SystemInf.dh;
 
         public Packing_PalletWeightRecord()
         {
@@ -35,7 +35,7 @@ namespace UAS_MES_NEW.Packing
                     OperateResult.AppendText(">>请输入正确的重量\n");
                     return;
                 }
-                dh.UpdateByCondition("package", "PA_WEIGHT='" + PalletWeight + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                dh.UpdateByCondition("package", "PA_WEIGHT='" + PalletWeight + "',pa_length='" + length.Text + "',pa_width='" + width.Text + "',pa_heigth='" + height.Text + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                 OperateResult.AppendText(">>栈板号" + pa_outboxcode.Text + "记录重量" + weight.Text + "kg成功\n", Color.Green, pa_outboxcode);
                 weight.Clear();
             }
@@ -46,5 +46,10 @@ namespace UAS_MES_NEW.Packing
         {
             OperateResult.Clear();
         }
+
+        private void Packing_PalletWeightRecord_Load(object sender, EventArgs e)
+        {
+
+        }
     }
 }

+ 3 - 1
UAS_MES_YD/FunctionCode/Special/Special_CancelCollection.cs

@@ -82,7 +82,9 @@ namespace UAS_MES_NEW.Special
                     dh.BatchInsert(sql.GetString(), new string[] { "barcode" }, barcode.ToArray());
                     sqls.Add("delete from craftmaterial where cm_sncode='" + sn_code.Text + "' and cm_makecode='" + ms_makecode + "'");
                 }
-                sqls.Add("delete from sninfo where si_sn='" + sn_code.Text + "'");
+                sqls.Add("update makeaddresslist set mal_sncode='',mal_status=0 where mal_sncode='" + sn_code.Text + "' and mal_makecode='" + ms_makecode + "'");
+                sqls.Add("update makeimeilist set mil_sncode='',mil_status=0 where mil_sncode='" + sn_code.Text + "' and mil_makecode='" + ms_makecode + "'");
+                sqls.Add("delete from sninfo where si_sn='" + sn_code.Text + "' or si_sn='" + ms_firstsn + "'");
                 //sqls.Add("update makeaddresslist set mal_sncode='',mal_status=0 where mal_sncode='" + sn_code.Text + "'");
                 //删除打印日志
                 sqls.Add("delete from labelprintlog where lpl_value='" + sn_code.Text + "' and lpl_makecode='" + ms_makecode + "'");

+ 29 - 14
UAS_MES_YD/FunctionCode/Warehouse/Warehouse_FinishedProductOutSum.cs

@@ -306,6 +306,21 @@ namespace UAS_MES_NEW.Warehouse
                                 OperateResult.AppendText("栈板号" + input.Text + "不存在,请重新输入\n", Color.Red, input);
                                 return;
                             }
+                            dtms = (DataTable)dh.ExecuteSql("select ma_prodcode from mes_package_view left join make on ma_code=v_makecode where v_outboxcode='"+input.Text+"'","select");
+                            sql.Clear();
+                            sql.Append("select cn,outqty,outqty-nvl((select count(1) from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_prodcode='" + dtms.Rows[0]["ma_prodcode"].ToString() + "'),0)ungetqty from");
+                            sql.Append("(select nvl(sum(pd_outqty),0) outqty  ,count(1)cn from prodiodetail where pd_piid=" + pi_id.Text + " and pd_prodcode='" + dtms.Rows[0]["ma_prodcode"].ToString() + "')");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            if (dt.Rows[0]["cn"].ToString() == "0")
+                            {
+                                OperateResult.AppendText("序列号" + input.Text + "所属产品:" + dtms.Rows[0]["ma_prodcode"].ToString() + ",不在出货单" + pi_inoutno.Text + "中\n", Color.Red, input);
+                                return;
+                            }
+                            else if (int.Parse(dt.Rows[0]["cn"].ToString()) > 0 && int.Parse(dt.Rows[0]["ungetqty"].ToString()) <= 0)
+                            {
+                                OperateResult.AppendText("出货单产品" + dtms.Rows[0]["ma_prodcode"].ToString() + "已经完成出货采集\n", Color.Red, input);
+                                return;
+                            }
                             if (!checkinsertprodiomac("栈板号"))
                                 return;
                             //更新箱号对应的出货单号
@@ -525,20 +540,20 @@ namespace UAS_MES_NEW.Warehouse
                                     }
                                     else
                                     {
-                                        //sql.Clear();
-                                        //sql.Append("select cn,outqty,outqty-nvl((select count(1) from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_prodcode='" + dtms.Rows[0]["ms_prodcode"].ToString() + "'),0)ungetqty from");
-                                        //sql.Append("(select nvl(sum(pd_outqty),0) outqty  ,count(1)cn from prodiodetail where pd_piid=" + pi_id.Text + " and pd_prodcode='" + dtms.Rows[0]["ms_prodcode"].ToString() + "')");
-                                        //dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                                        //if (dt.Rows[0]["cn"].ToString() == "0")
-                                        //{
-                                        //    OperateResult.AppendText("序列号" + input.Text + "所属产品:" + dtms.Rows[0]["ms_prodcode"].ToString() + ",不在出货单" + pi_inoutno.Text + "中\n", Color.Red, input);
-                                        //    return;
-                                        //}
-                                        //else if (int.Parse(dt.Rows[0]["cn"].ToString()) > 0 && int.Parse(dt.Rows[0]["ungetqty"].ToString()) <= 0)
-                                        //{
-                                        //    OperateResult.AppendText("出货单产品" + dtms.Rows[0]["ms_prodcode"].ToString() + "已经完成出货采集\n", Color.Red, input);
-                                        //    return;
-                                        //}
+                                        sql.Clear();
+                                        sql.Append("select cn,outqty,outqty-nvl((select count(1) from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_prodcode='" + dtms.Rows[0]["ms_prodcode"].ToString() + "'),0)ungetqty from");
+                                        sql.Append("(select nvl(sum(pd_outqty),0) outqty  ,count(1)cn from prodiodetail where pd_piid=" + pi_id.Text + " and pd_prodcode='" + dtms.Rows[0]["ms_prodcode"].ToString() + "')");
+                                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                        if (dt.Rows[0]["cn"].ToString() == "0")
+                                        {
+                                            OperateResult.AppendText("序列号" + input.Text + "所属产品:" + dtms.Rows[0]["ms_prodcode"].ToString() + ",不在出货单" + pi_inoutno.Text + "中\n", Color.Red, input);
+                                            return;
+                                        }
+                                        else if (int.Parse(dt.Rows[0]["cn"].ToString()) > 0 && int.Parse(dt.Rows[0]["ungetqty"].ToString()) <= 0)
+                                        {
+                                            OperateResult.AppendText("出货单产品" + dtms.Rows[0]["ms_prodcode"].ToString() + "已经完成出货采集\n", Color.Red, input);
+                                            return;
+                                        }
                                         updatesn(ms_id);
                                     }
                                 }

+ 1 - 1
UAS_MES_YD/PublicMethod/Print.cs

@@ -222,7 +222,7 @@ namespace UAS_MES_NEW.PublicMethod
                 }
                 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 + "'", "select");
+                    dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_makecode='"+MakeCode+"' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
                 }
                 else
                 {

+ 9 - 0
UAS_MES_YD/UAS_MES_YD.csproj

@@ -592,6 +592,12 @@
     <Compile Include="FunctionCode\Make\Make_GetTestFileData.Designer.cs">
       <DependentUpon>Make_GetTestFileData.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_ImeiCheck_ThreeLabel.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_ImeiCheck_ThreeLabel.Designer.cs">
+      <DependentUpon>Make_ImeiCheck_ThreeLabel.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_OutBoxSnCheck.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1473,6 +1479,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_GetTestFileData.resx">
       <DependentUpon>Make_GetTestFileData.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_ImeiCheck_ThreeLabel.resx">
+      <DependentUpon>Make_ImeiCheck_ThreeLabel.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_OutBoxSnCheck.resx">
       <DependentUpon>Make_OutBoxSnCheck.cs</DependentUpon>
     </EmbeddedResource>