Browse Source

添加ECN和软件版本

章政 8 years ago
parent
commit
82b89ebbcb

+ 80 - 67
UAS-MES/FunctionCode/Make/Make_FeedingCollection.Designer.cs

@@ -42,8 +42,8 @@
             this.sn_code_label = new System.Windows.Forms.Label();
             this.code_label = new System.Windows.Forms.Label();
             this.iflastsn = new System.Windows.Forms.CheckBox();
-            this.softwareversion_label = new System.Windows.Forms.CheckBox();
-            this.ecn_label = new System.Windows.Forms.CheckBox();
+            this.ma_softversion_label = new System.Windows.Forms.CheckBox();
+            this.ma_ecncode_label = new System.Windows.Forms.CheckBox();
             this.ClearSn_code = new System.Windows.Forms.PictureBox();
             this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
@@ -52,8 +52,8 @@
             this.ma_qty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.Clean = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.softwareversion = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.ecn = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ma_softversion = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ma_ecncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.Confirm = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.sn_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -61,6 +61,7 @@
             this.ma_code = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.ma_craftcode = new System.Windows.Forms.Label();
             this.ma_bomversion = new System.Windows.Forms.Label();
+            this.ma_bomversion_label = new System.Windows.Forms.Label();
             this.panel2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             this.SuspendLayout();
@@ -217,29 +218,29 @@
             this.iflastsn.Text = "前一工单SN";
             this.iflastsn.UseVisualStyleBackColor = true;
             // 
-            // softwareversion_label
-            // 
-            this.softwareversion_label.AutoSize = true;
-            this.softwareversion_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.softwareversion_label.Location = new System.Drawing.Point(907, 186);
-            this.softwareversion_label.Margin = new System.Windows.Forms.Padding(4);
-            this.softwareversion_label.Name = "softwareversion_label";
-            this.softwareversion_label.Size = new System.Drawing.Size(114, 31);
-            this.softwareversion_label.TabIndex = 74;
-            this.softwareversion_label.Text = "软件版本";
-            this.softwareversion_label.UseVisualStyleBackColor = true;
-            // 
-            // ecn_label
-            // 
-            this.ecn_label.AutoSize = true;
-            this.ecn_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ecn_label.Location = new System.Drawing.Point(907, 278);
-            this.ecn_label.Margin = new System.Windows.Forms.Padding(4);
-            this.ecn_label.Name = "ecn_label";
-            this.ecn_label.Size = new System.Drawing.Size(94, 31);
-            this.ecn_label.TabIndex = 75;
-            this.ecn_label.Text = "ECN号";
-            this.ecn_label.UseVisualStyleBackColor = true;
+            // ma_softversion_label
+            // 
+            this.ma_softversion_label.AutoSize = true;
+            this.ma_softversion_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_softversion_label.Location = new System.Drawing.Point(907, 226);
+            this.ma_softversion_label.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_softversion_label.Name = "ma_softversion_label";
+            this.ma_softversion_label.Size = new System.Drawing.Size(114, 31);
+            this.ma_softversion_label.TabIndex = 74;
+            this.ma_softversion_label.Text = "软件版本";
+            this.ma_softversion_label.UseVisualStyleBackColor = true;
+            // 
+            // ma_ecncode_label
+            // 
+            this.ma_ecncode_label.AutoSize = true;
+            this.ma_ecncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_ecncode_label.Location = new System.Drawing.Point(907, 278);
+            this.ma_ecncode_label.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_ecncode_label.Name = "ma_ecncode_label";
+            this.ma_ecncode_label.Size = new System.Drawing.Size(94, 31);
+            this.ma_ecncode_label.TabIndex = 75;
+            this.ma_ecncode_label.Text = "ECN号";
+            this.ma_ecncode_label.UseVisualStyleBackColor = true;
             // 
             // ClearSn_code
             // 
@@ -343,39 +344,39 @@
             this.Clean.UseVisualStyleBackColor = true;
             this.Clean.Click += new System.EventHandler(this.Clean_Click);
             // 
-            // softwareversion
+            // ma_softversion
             // 
-            this.softwareversion.AllPower = null;
-            this.softwareversion.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.ma_softversion.AllPower = null;
+            this.ma_softversion.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.softwareversion.BackColor = System.Drawing.Color.White;
-            this.softwareversion.ID = null;
-            this.softwareversion.Location = new System.Drawing.Point(1029, 186);
-            this.softwareversion.Margin = new System.Windows.Forms.Padding(4);
-            this.softwareversion.Name = "softwareversion";
-            this.softwareversion.Power = null;
-            this.softwareversion.Size = new System.Drawing.Size(140, 25);
-            this.softwareversion.Str = null;
-            this.softwareversion.Str1 = null;
-            this.softwareversion.Str2 = null;
-            this.softwareversion.TabIndex = 78;
-            // 
-            // ecn
-            // 
-            this.ecn.AllPower = null;
-            this.ecn.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.ma_softversion.BackColor = System.Drawing.Color.White;
+            this.ma_softversion.ID = null;
+            this.ma_softversion.Location = new System.Drawing.Point(1029, 226);
+            this.ma_softversion.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_softversion.Name = "ma_softversion";
+            this.ma_softversion.Power = null;
+            this.ma_softversion.Size = new System.Drawing.Size(140, 25);
+            this.ma_softversion.Str = null;
+            this.ma_softversion.Str1 = null;
+            this.ma_softversion.Str2 = null;
+            this.ma_softversion.TabIndex = 78;
+            // 
+            // ma_ecncode
+            // 
+            this.ma_ecncode.AllPower = null;
+            this.ma_ecncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.ecn.BackColor = System.Drawing.Color.White;
-            this.ecn.ID = null;
-            this.ecn.Location = new System.Drawing.Point(1029, 282);
-            this.ecn.Margin = new System.Windows.Forms.Padding(4);
-            this.ecn.Name = "ecn";
-            this.ecn.Power = null;
-            this.ecn.Size = new System.Drawing.Size(140, 25);
-            this.ecn.Str = null;
-            this.ecn.Str1 = null;
-            this.ecn.Str2 = null;
-            this.ecn.TabIndex = 77;
+            this.ma_ecncode.BackColor = System.Drawing.Color.White;
+            this.ma_ecncode.ID = null;
+            this.ma_ecncode.Location = new System.Drawing.Point(1029, 282);
+            this.ma_ecncode.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_ecncode.Name = "ma_ecncode";
+            this.ma_ecncode.Power = null;
+            this.ma_ecncode.Size = new System.Drawing.Size(140, 25);
+            this.ma_ecncode.Str = null;
+            this.ma_ecncode.Str1 = null;
+            this.ma_ecncode.Str2 = null;
+            this.ma_ecncode.TabIndex = 77;
             // 
             // Confirm
             // 
@@ -479,18 +480,29 @@
             // 
             this.ma_bomversion.AutoSize = true;
             this.ma_bomversion.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_bomversion.Location = new System.Drawing.Point(1024, 114);
+            this.ma_bomversion.Location = new System.Drawing.Point(1024, 173);
             this.ma_bomversion.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_bomversion.Name = "ma_bomversion";
             this.ma_bomversion.Size = new System.Drawing.Size(0, 27);
             this.ma_bomversion.TabIndex = 143;
-            this.ma_bomversion.Visible = false;
+            // 
+            // ma_bomversion_label
+            // 
+            this.ma_bomversion_label.AutoSize = true;
+            this.ma_bomversion_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_bomversion_label.Location = new System.Drawing.Point(909, 173);
+            this.ma_bomversion_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_bomversion_label.Name = "ma_bomversion_label";
+            this.ma_bomversion_label.Size = new System.Drawing.Size(97, 27);
+            this.ma_bomversion_label.TabIndex = 144;
+            this.ma_bomversion_label.Text = "Bom版本";
             // 
             // Make_FeedingCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1197, 680);
+            this.Controls.Add(this.ma_bomversion_label);
             this.Controls.Add(this.ma_bomversion);
             this.Controls.Add(this.ma_craftcode);
             this.Controls.Add(this.ma_code);
@@ -503,10 +515,10 @@
             this.Controls.Add(this.ma_qty);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.Clean);
-            this.Controls.Add(this.softwareversion);
-            this.Controls.Add(this.ecn);
-            this.Controls.Add(this.ecn_label);
-            this.Controls.Add(this.softwareversion_label);
+            this.Controls.Add(this.ma_softversion);
+            this.Controls.Add(this.ma_ecncode);
+            this.Controls.Add(this.ma_ecncode_label);
+            this.Controls.Add(this.ma_softversion_label);
             this.Controls.Add(this.Confirm);
             this.Controls.Add(this.iflastsn);
             this.Controls.Add(this.code);
@@ -555,10 +567,10 @@
         private CustomControl.TextBoxWithIcon.EnterTextBox code;
         private System.Windows.Forms.CheckBox iflastsn;
         private CustomControl.ButtonUtil.NormalButton Confirm;
-        private System.Windows.Forms.CheckBox softwareversion_label;
-        private System.Windows.Forms.CheckBox ecn_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ecn;
-        private CustomControl.TextBoxWithIcon.EnterTextBox softwareversion;
+        private System.Windows.Forms.CheckBox ma_softversion_label;
+        private System.Windows.Forms.CheckBox ma_ecncode_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ma_ecncode;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ma_softversion;
         private CustomControl.ButtonUtil.NormalButton Clean;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private CustomControl.ValueLabel.ValueLabel ma_qty;
@@ -571,5 +583,6 @@
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
         private System.Windows.Forms.Label ma_craftcode;
         private System.Windows.Forms.Label ma_bomversion;
+        private System.Windows.Forms.Label ma_bomversion_label;
     }
 }

+ 5 - 5
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -204,7 +204,7 @@ namespace UAS_MES.Make
                 //将录入框的值给序列号
                 sn_code.Text = code.Text;
                 sql.Clear();
-                sql.Append("select ma_prodcode,ms_firstsn,ma_craftcode,ma_bomversion,ma_qty,ma_code,pr_detail,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
+                sql.Append("select ma_prodcode,ma_ecncode,ma_softversion,ms_firstsn,ma_craftcode,ma_bomversion,ma_qty,ma_code,pr_detail,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
                 sql.Append(",ms_prodcode,ms_makecode,ms_code,ms_stepname  from makeserial left join make on ma_code=ms_makecode ");
                 sql.Append("left join product on ms_prodcode=pr_code where ms_sncode='" + code.Text + "' order by ms_id desc");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -283,7 +283,7 @@ namespace UAS_MES.Make
                         ms_status = dt.Rows[0]["ms_status"].ToString();
                         sn_code.Text = code.Text;
                         sql.Clear();
-                        sql.Append("select ma_code,ma_prodcode,pr_detail,ma_qty from makeserial left join product ");
+                        sql.Append("select ma_code,ma_softversion,ma_ecncode,ma_prodcode,pr_detail,ma_qty from makeserial left join product ");
                         sql.Append(" on ms_prodcode=pr_code left join make on ms_makecode=ma_code left join ");
                         sql.Append("makecraftdetail on mcd_macode=ms_makecode where ms_id='" + oMsid + "'");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -374,10 +374,10 @@ namespace UAS_MES.Make
                 dh.BatchInsert(sql.GetString(), new string[] { "soncode", "barcode", "sp_id", "sp_id1" }, CollectDataSonCode.ToArray(), CollectData.ToArray(), SPID.ToArray(), SPID.ToArray());
                 //更新序列号半成品已被使用
                 dh.ExecuteSql("update makeserial set ms_nextmacode='" + ma_code + "' where ms_id=(select max(ms_id) from makeserial where ms_sncode='" + sn_code.Text + "' and ms_makecode<>'" + ma_code + "')", "update");
-                if (ecn_label.Checked || softwareversion_label.Checked)
+                if (ma_ecncode_label.Checked || ma_softversion_label.Checked)
                 {
-                    string ecnText = ecn_label.Checked ? ecn.Text : "";
-                    string softversionText = softwareversion_label.Checked ? softwareversion.Text : "";
+                    string ecnText = ma_ecncode_label.Checked ? ma_ecncode.Text : "";
+                    string softversionText = ma_softversion_label.Checked ? ma_softversion.Text : "";
                     sql.Clear();
                     sql.Append("insert into SNRELATIONINFORECORD(SIR_ID,SIR_SNCODE,SIR_MSCODE,SIR_ECNCODE,SIR_SOFTVER,");
                     sql.Append("SIR_LINECODE,SIR_SOURCECODE,SIR_STEPCODE,SIR_MACODE,SIR_PRODCODE,SIR_INMAN,SIR_INDATE) select ");