callm 3 сар өмнө
parent
commit
bf8461cec8

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_FeedingCollection.Designer.cs

@@ -804,7 +804,7 @@
             this.SizeChanged += new System.EventHandler(this.Make_FeedingCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 3 - 3
UAS_MES_YDCY/FunctionCode/Make/Make_FeedingCollection.resx

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

+ 297 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_ImeiCheck_DarkCode.Designer.cs

@@ -0,0 +1,297 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_ImeiCheck_DarkCode
+    {
+        /// <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;
+    }
+}

+ 240 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_ImeiCheck_DarkCode.cs

@@ -0,0 +1,240 @@
+using System;
+using System.Data;
+using System.Drawing;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicForm;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_ImeiCheck_DarkCode : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        DataHelper dh;
+
+        LogStringBuilder sql;
+
+        DataTable dt;
+
+        DataTable info;
+
+        string imei1 = "";
+
+        bool isImei1 = false;
+
+        string oErrorMessage = "";
+
+        string SN = "";
+
+        string omakeCode = "";
+
+        string oMsid = "";
+
+        string pr_fugelcode = "";
+
+        string pr_colorcode = "";
+        public Make_ImeiCheck_DarkCode()
+        {
+            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();
+        }
+
+        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;
+                }
+                //输入的是SN
+                if (!isImei1)
+                {
+                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
+                    //查询是否存在该ms_id
+                    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() == "")
+                    {
+                        //SN错误,不存在
+                        //请输入SN
+                        OperateResult.AppendText("<<SN错误,序列号" + sncode.Text + "不存在\n", Color.Red, sncode);
+                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                    }
+                    //存在该SN号
+                    else
+                    {
+                        //根据该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
+                            imei1 = info.Rows[0]["ms_sncode"].ToString();
+                            SN = sncode.Text;
+                            //>>SN对应的SN号为:xxxxxxxxx
+                            //>> 请输入彩盒上的SN
+                            OperateResult.AppendText("<<序列号" + sncode.Text + "对应的SN号为:" + imei1 + "\n", Color.Green);
+                            OperateResult.AppendText(">>请输入彩盒上的SN\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();
+                        }
+                    }
+                }
+                //输入的是imei1
+                else
+                {
+                    OperateResult.AppendText("<<" + sncode.Text + "\n", Color.Black);
+                    sql.Clear();
+                    sql.Append("select pr_fugelcode,pr_colorcode,ms_sncode from  makeserial left join product on pr_code=ms_prodcode  where ms_id='" + dt.Rows[0]["ms_id"].ToString() + "'");
+                    info = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (info.Rows.Count > 0)
+                    {
+                        pr_fugelcode = info.Rows[0]["pr_fugelcode"].ToString();
+                        pr_colorcode = info.Rows[0]["pr_colorcode"].ToString();
+                    }
+                    Console.WriteLine((sncode.Text));
+                    Console.WriteLine(imei1 + pr_fugelcode);
+                    Console.WriteLine(imei1 + pr_colorcode);
+                    if (sncode.Text == (pr_fugelcode + imei1) || sncode.Text == (pr_colorcode + imei1))
+                    {
+                        //说明输入的imei1对比一致
+                        //判断工序属性attribute
+                        if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out oErrorMessage))
+                        {
+                            //判断序列号下一工序(CHECKSTEPSNANDMACODE)
+                            if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, SN, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
+                            {
+                                //调用  SETSTEPRESULT ,获取返回的工单号,
+                                if (LogicHandler.SetStepResult(omakeCode, User.UserSourceCode, SN, "标签核对", "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(SN, DateTime.Now.ToString(), "成功");
+                                    //记录日志
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "标签核对", "标签核对成功", SN, "");
+                                    //SN核对成功
+                                    //>> 请输入SN
+                                    OperateResult.AppendText("<<SN核对成功\n", Color.Green, sncode);
+                                    OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                                    SetCheck set = new SetCheck("OK", Color.Green);
+                                    BaseUtil.SetFormCenter(set);
+                                    set.ShowDialog();
+                                }
+                                else
+                                {
+                                    //setstepresult不通过
+                                    OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                                    recordResult(SN, DateTime.Now.ToString(), "失败");
+                                    SetCheck set = new SetCheck("NG", Color.Red);
+                                    BaseUtil.SetFormCenter(set);
+                                    set.ShowDialog();
+                                }
+                            }
+                            else
+                            {
+                                //判定序列号下一工序不通过
+                                OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                                recordResult(SN, DateTime.Now.ToString(), "失败");
+                                SetCheck set = new SetCheck("NG", Color.Red);
+                                BaseUtil.SetFormCenter(set);
+                                set.ShowDialog();
+                            }
+                        }
+                        else
+                        {
+                            //判定工序属性不通过
+                            OperateResult.AppendText(">>" + oErrorMessage + "\n", Color.Red, sncode);
+                            recordResult(SN, DateTime.Now.ToString(), "失败");
+                        }
+                    }
+                    //说明比对不一致
+                    else
+                    {
+                        //清空imei1变量的值
+                        imei1 = "";
+                        //SN核对失败
+                        //>> 请输入SN
+                        OperateResult.AppendText(">>SN核对失败,不一致\n", Color.Red, sncode);
+                        OperateResult.AppendText(">>请输入SN\n", Color.Black);
+                    }
+                    //imei1校对结束,下次输入的是SN
+                    isImei1 = false;
+                }
+            }
+        }
+        private void recordResult(string SN, string time, string result)
+        {
+            //if (showResult.Items.Count >= 10)
+            //{
+            //    //如果有10行的话,则删除最前一行
+            //    showResult.Items.RemoveAt(0);
+            //}
+            //创建一个item
+            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 = "";
+        }
+
+        private void StepCount_Load(object sender, EventArgs e)
+        {
+
+        }
+    }
+}

+ 120 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_ImeiCheck_DarkCode.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>

+ 1 - 2
UAS_MES_YDCY/FunctionCode/Make/Make_ImeiCheck_ThreeLabel_DarkCode.cs

@@ -278,9 +278,8 @@ namespace UAS_MES_NEW.Make
                         }
                     }
                     sql.Clear();
-                    sql.Append("select pr_fugelcode,ms_sncode from  makeserial  where ms_id='" + dt.Rows[0]["ms_id"].ToString() + "'");
+                    sql.Append("select pr_fugelcode,ms_sncode from  makeserial left join product on pr_code=ms_prodcode  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();

+ 9 - 0
UAS_MES_YDCY/UAS_MES_YDCY.csproj

@@ -604,6 +604,12 @@
     <Compile Include="FunctionCode\Make\Make_GetTestFileData.Designer.cs">
       <DependentUpon>Make_GetTestFileData.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_ImeiCheck_DarkCode.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_ImeiCheck_DarkCode.Designer.cs">
+      <DependentUpon>Make_ImeiCheck_DarkCode.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_ImeiCheck_ThreeLabel_DarkCode.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1575,6 +1581,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_GetTestFileData.resx">
       <DependentUpon>Make_GetTestFileData.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_ImeiCheck_DarkCode.resx">
+      <DependentUpon>Make_ImeiCheck_DarkCode.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_ImeiCheck_ThreeLabel_DarkCode.resx">
       <DependentUpon>Make_ImeiCheck_ThreeLabel_DarkCode.cs</DependentUpon>
     </EmbeddedResource>