Browse Source

栈板标签补打

callm 4 years ago
parent
commit
028acbb2f5

+ 22 - 7
UAS-MES/FunctionCode/Make/Make_RePrintLabel.Designer.cs

@@ -55,6 +55,7 @@
             this.Printer = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.Printer = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.groupBoxWithBorder1 = new UAS_MES.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.groupBoxWithBorder1 = new UAS_MES.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.BigBox = new System.Windows.Forms.RadioButton();
             this.BigBox = new System.Windows.Forms.RadioButton();
+            this.Pallte = new System.Windows.Forms.RadioButton();
             this.groupBoxWithBorder1.SuspendLayout();
             this.groupBoxWithBorder1.SuspendLayout();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
@@ -63,7 +64,7 @@
             this.giftBox.AutoSize = true;
             this.giftBox.AutoSize = true;
             this.giftBox.Checked = true;
             this.giftBox.Checked = true;
             this.giftBox.Font = new System.Drawing.Font("微软雅黑", 12F);
             this.giftBox.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.giftBox.Location = new System.Drawing.Point(111, 71);
+            this.giftBox.Location = new System.Drawing.Point(31, 73);
             this.giftBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.giftBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.giftBox.Name = "giftBox";
             this.giftBox.Name = "giftBox";
             this.giftBox.Size = new System.Drawing.Size(177, 45);
             this.giftBox.Size = new System.Drawing.Size(177, 45);
@@ -77,7 +78,7 @@
             // 
             // 
             this.CartonBox.AutoSize = true;
             this.CartonBox.AutoSize = true;
             this.CartonBox.Font = new System.Drawing.Font("微软雅黑", 12F);
             this.CartonBox.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.CartonBox.Location = new System.Drawing.Point(480, 71);
+            this.CartonBox.Location = new System.Drawing.Point(268, 73);
             this.CartonBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.CartonBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.CartonBox.Name = "CartonBox";
             this.CartonBox.Name = "CartonBox";
             this.CartonBox.Size = new System.Drawing.Size(216, 45);
             this.CartonBox.Size = new System.Drawing.Size(216, 45);
@@ -90,7 +91,7 @@
             // 
             // 
             this.fuselagel.AutoSize = true;
             this.fuselagel.AutoSize = true;
             this.fuselagel.Font = new System.Drawing.Font("微软雅黑", 12F);
             this.fuselagel.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.fuselagel.Location = new System.Drawing.Point(868, 71);
+            this.fuselagel.Location = new System.Drawing.Point(574, 73);
             this.fuselagel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.fuselagel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.fuselagel.Name = "fuselagel";
             this.fuselagel.Name = "fuselagel";
             this.fuselagel.Size = new System.Drawing.Size(209, 45);
             this.fuselagel.Size = new System.Drawing.Size(209, 45);
@@ -330,7 +331,7 @@
             // Printer
             // Printer
             // 
             // 
             this.Printer.Location = new System.Drawing.Point(251, 291);
             this.Printer.Location = new System.Drawing.Point(251, 291);
-            this.Printer.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8);
+            this.Printer.Margin = new System.Windows.Forms.Padding(8);
             this.Printer.Name = "Printer";
             this.Printer.Name = "Printer";
             this.Printer.Size = new System.Drawing.Size(296, 49);
             this.Printer.Size = new System.Drawing.Size(296, 49);
             this.Printer.TabIndex = 186;
             this.Printer.TabIndex = 186;
@@ -338,6 +339,7 @@
             // groupBoxWithBorder1
             // groupBoxWithBorder1
             // 
             // 
             this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
             this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder1.Controls.Add(this.Pallte);
             this.groupBoxWithBorder1.Controls.Add(this.BigBox);
             this.groupBoxWithBorder1.Controls.Add(this.BigBox);
             this.groupBoxWithBorder1.Controls.Add(this.CartonBox);
             this.groupBoxWithBorder1.Controls.Add(this.CartonBox);
             this.groupBoxWithBorder1.Controls.Add(this.fuselagel);
             this.groupBoxWithBorder1.Controls.Add(this.fuselagel);
@@ -357,7 +359,7 @@
             // 
             // 
             this.BigBox.AutoSize = true;
             this.BigBox.AutoSize = true;
             this.BigBox.Font = new System.Drawing.Font("微软雅黑", 12F);
             this.BigBox.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.BigBox.Location = new System.Drawing.Point(1172, 71);
+            this.BigBox.Location = new System.Drawing.Point(878, 73);
             this.BigBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.BigBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.BigBox.Name = "BigBox";
             this.BigBox.Name = "BigBox";
             this.BigBox.Size = new System.Drawing.Size(209, 45);
             this.BigBox.Size = new System.Drawing.Size(209, 45);
@@ -366,6 +368,18 @@
             this.BigBox.UseVisualStyleBackColor = true;
             this.BigBox.UseVisualStyleBackColor = true;
             this.BigBox.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChange);
             this.BigBox.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChange);
             // 
             // 
+            // Pallte
+            // 
+            this.Pallte.AutoSize = true;
+            this.Pallte.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Pallte.Location = new System.Drawing.Point(1142, 73);
+            this.Pallte.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.Pallte.Name = "Pallte";
+            this.Pallte.Size = new System.Drawing.Size(209, 45);
+            this.Pallte.TabIndex = 5;
+            this.Pallte.Text = "栈板标打印";
+            this.Pallte.UseVisualStyleBackColor = true;
+            // 
             // Make_RePrintLabel
             // Make_RePrintLabel
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
@@ -400,9 +414,9 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_RePrintLabel_FormClosing);
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_RePrintLabel_FormClosing);
             this.Load += new System.EventHandler(this.Make_RePrintLabel_Load);
             this.Load += new System.EventHandler(this.Make_RePrintLabel_Load);
             this.SizeChanged += new System.EventHandler(this.Make_RePrintLabel_SizeChanged);
             this.SizeChanged += new System.EventHandler(this.Make_RePrintLabel_SizeChanged);
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             this.groupBoxWithBorder1.PerformLayout();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
             this.PerformLayout();
 
 
         }
         }
@@ -433,5 +447,6 @@
         private System.Windows.Forms.Label pr_detail;
         private System.Windows.Forms.Label pr_detail;
         private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder1;
         private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder1;
         private System.Windows.Forms.RadioButton BigBox;
         private System.Windows.Forms.RadioButton BigBox;
+        private System.Windows.Forms.RadioButton Pallte;
     }
     }
 }
 }

+ 10 - 9
UAS-MES/FunctionCode/Make/Make_RePrintLabel.cs

@@ -103,7 +103,7 @@ namespace UAS_MES.Make
                 OperateResult.AppendText(">>请输入SN\n", Color.Black);
                 OperateResult.AppendText(">>请输入SN\n", Color.Black);
                 clearAll();
                 clearAll();
             }
             }
-            else if ((btn.Name == "CartonBox"||btn.Name== "BigBox") && btn.Checked)
+            else if ((btn.Name == "CartonBox"||btn.Name== "BigBox"||btn.Name=="Pallte") && btn.Checked)
             {
             {
                 OperateResult.AppendText(">>请输入箱号\n", Color.Black);
                 OperateResult.AppendText(">>请输入箱号\n", Color.Black);
                 clearAll();
                 clearAll();
@@ -146,10 +146,10 @@ namespace UAS_MES.Make
                     inputText.Text = "";
                     inputText.Text = "";
                 }
                 }
                 //打印类型为卡通箱
                 //打印类型为卡通箱
-                else if (CartonBox.Checked||BigBox.Checked)
+                else if (CartonBox.Checked||BigBox.Checked|| Pallte.Checked)
                 {
                 {
                     //查询箱号是否存在
                     //查询箱号是否存在
-                    dt = (DataTable)dh.ExecuteSql("select pa_id,pa_prodcode pr_code,pa_makecode ms_makecode,pr_detail from package left join product on pr_code=pa_prodcode where pa_outboxcode='" + inputText.Text + "' and (pa_type=1 OR PA_TYPE = 2)", "select");
+                    dt = (DataTable)dh.ExecuteSql("select pa_id,pa_prodcode pr_code,pa_makecode ms_makecode,pr_detail from package left join product on pr_code=pa_prodcode where pa_outboxcode='" + inputText.Text + "' and (pa_type=1 OR PA_TYPE = 2 or PA_TYPE=3)", "select");
                     if (dt.Rows.Count == 0)
                     if (dt.Rows.Count == 0)
                     {
                     {
                         //无值,返回提示用户“箱号不存在”, “>>请输入卡通箱号”
                         //无值,返回提示用户“箱号不存在”, “>>请输入卡通箱号”
@@ -179,9 +179,10 @@ namespace UAS_MES.Make
                 type = "彩盒标";
                 type = "彩盒标";
             else if (CartonBox.Checked)
             else if (CartonBox.Checked)
                 type = "卡通箱标";
                 type = "卡通箱标";
-            else
+            else if (BigBox.Checked)
                 type = "大箱标";
                 type = "大箱标";
-
+            else
+                type = "栈板标";
             getlabel = "select la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='" + type + "' and la_statuscode='AUDITED' order by la_isdefault";
             getlabel = "select la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='" + type + "' and la_statuscode='AUDITED' order by la_isdefault";
 
 
             listA = (DataTable)dh.ExecuteSql(getlabel, "select");
             listA = (DataTable)dh.ExecuteSql(getlabel, "select");
@@ -245,7 +246,7 @@ namespace UAS_MES.Make
                 }
                 }
             }
             }
             //打印类型为卡通箱标签
             //打印类型为卡通箱标签
-            else if (CartonBox.Checked||BigBox.Checked)
+            else if (CartonBox.Checked||BigBox.Checked|| Pallte.Checked)
             {
             {
                 //select pa_downstatus from package where pa_outboxcode=? 输入值code
                 //select pa_downstatus from package where pa_outboxcode=? 输入值code
                 mapB = (DataTable)dh.ExecuteSql("select pa_downstatus from package where pa_outboxcode='" + inputValue.Text + "'", "select");
                 mapB = (DataTable)dh.ExecuteSql("select pa_downstatus from package where pa_outboxcode='" + inputValue.Text + "'", "select");
@@ -309,7 +310,7 @@ namespace UAS_MES.Make
             LogicHandler.GetSerialNumByCaller("MakeDown", out md_code);
             LogicHandler.GetSerialNumByCaller("MakeDown", out md_code);
             sql.Clear();
             sql.Clear();
             sql.Append("INSERT INTO MAKEDOWN (MD_ID,MD_LINECODE,MD_SCCODE,MD_STEPCODE,");
             sql.Append("INSERT INTO MAKEDOWN (MD_ID,MD_LINECODE,MD_SCCODE,MD_STEPCODE,");
-            sql.Append(((CartonBox.Checked||BigBox.Checked) ? "MD_OUTBOXCODE" : "MD_SNCODE") + ",MD_PRODCODE,MD_MACODE, MD_DOWNREASON, MD_CODE,");
+            sql.Append(((CartonBox.Checked||BigBox.Checked||Pallte.Checked) ? "MD_OUTBOXCODE" : "MD_SNCODE") + ",MD_PRODCODE,MD_MACODE, MD_DOWNREASON, MD_CODE,");
             sql.Append("MD_DOWNDATE,MD_DOWNMAN,MD_STATUS) values (MAKEDOWN_seq.nextval,'" + User.UserLineCode + "','" + User.UserSourceCode + "',");
             sql.Append("MD_DOWNDATE,MD_DOWNMAN,MD_STATUS) values (MAKEDOWN_seq.nextval,'" + User.UserLineCode + "','" + User.UserSourceCode + "',");
             sql.Append("'" + User.CurrentStepCode + "','" + inputValue.Text + "','" + pr_code.Text + "','" + ms_makecode.Text + "','补打标签','" + md_code + "',sysdate,'" + User.UserCode + "','-1')");
             sql.Append("'" + User.CurrentStepCode + "','" + inputValue.Text + "','" + pr_code.Text + "','" + ms_makecode.Text + "','补打标签','" + md_code + "',sysdate,'" + User.UserCode + "','-1')");
             dh.ExecuteSql(sql.GetString(), "insert");
             dh.ExecuteSql(sql.GetString(), "insert");
@@ -379,12 +380,12 @@ namespace UAS_MES.Make
                     }
                     }
                 }
                 }
                 //勾选的是卡通箱
                 //勾选的是卡通箱
-                else if (CartonBox.Checked||BigBox.Checked)
+                else if (CartonBox.Checked||BigBox.Checked|| Pallte.Checked)
                 {
                 {
                     //第一次输入
                     //第一次输入
                     if (TSN == "")
                     if (TSN == "")
                     {
                     {
-                        infoc = (DataTable)dh.ExecuteSql("select pa_prodcode,pa_makecode,pa_downstatus from package where pa_outboxcode='" + rePrintCheck.Text + "' and (pa_type=1 or pa_type =2)", "select");
+                        infoc = (DataTable)dh.ExecuteSql("select pa_prodcode,pa_makecode,pa_downstatus from package where pa_outboxcode='" + rePrintCheck.Text + "' and (pa_type=1 or pa_type =2 or pa_type=3)", "select");
                         //如果查询无值,提示用户卡通箱号不存在,请输入卡通箱号
                         //如果查询无值,提示用户卡通箱号不存在,请输入卡通箱号
                         if (infoc.Rows.Count == 0)
                         if (infoc.Rows.Count == 0)
                         {
                         {