Browse Source

添加标签打印类型

callm 4 years ago
parent
commit
0511f5a29c

+ 20 - 4
UAS_MES_ODLF/FunctionCode/Make/Make_RePrintLabel.Designer.cs

@@ -52,6 +52,7 @@
             this.inputText = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.pitao = new System.Windows.Forms.RadioButton();
             this.groupBoxWithBorder1.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -187,6 +188,7 @@
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder1.Controls.Add(this.pitao);
             this.groupBoxWithBorder1.Controls.Add(this.CartonBox);
             this.groupBoxWithBorder1.Controls.Add(this.fuselagel);
             this.groupBoxWithBorder1.Controls.Add(this.giftBox);
@@ -205,7 +207,7 @@
             // 
             this.CartonBox.AutoSize = true;
             this.CartonBox.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.CartonBox.Location = new System.Drawing.Point(574, 70);
+            this.CartonBox.Location = new System.Drawing.Point(449, 70);
             this.CartonBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.CartonBox.Name = "CartonBox";
             this.CartonBox.Size = new System.Drawing.Size(216, 45);
@@ -218,7 +220,7 @@
             // 
             this.fuselagel.AutoSize = true;
             this.fuselagel.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.fuselagel.Location = new System.Drawing.Point(1126, 70);
+            this.fuselagel.Location = new System.Drawing.Point(811, 70);
             this.fuselagel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.fuselagel.Name = "fuselagel";
             this.fuselagel.Size = new System.Drawing.Size(209, 45);
@@ -322,6 +324,19 @@
             this.Printer.Size = new System.Drawing.Size(296, 50);
             this.Printer.TabIndex = 186;
             // 
+            // pitao
+            // 
+            this.pitao.AutoSize = true;
+            this.pitao.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pitao.Location = new System.Drawing.Point(1129, 70);
+            this.pitao.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.pitao.Name = "pitao";
+            this.pitao.Size = new System.Drawing.Size(209, 45);
+            this.pitao.TabIndex = 4;
+            this.pitao.Text = "皮套标打印";
+            this.pitao.UseVisualStyleBackColor = true;
+            this.pitao.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChange);
+            // 
             // Make_RePrintLabel
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
@@ -354,9 +369,9 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_RePrintLabel_FormClosing);
             this.Load += new System.EventHandler(this.Make_RePrintLabel_Load);
             this.SizeChanged += new System.EventHandler(this.Make_RePrintLabel_SizeChanged);
-            this.groupBoxWithBorder1.ResumeLayout(false);
+            this.groupBoxWithBorder1.ResumeLayout(true);
             this.groupBoxWithBorder1.PerformLayout();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -384,5 +399,6 @@
         private System.Windows.Forms.Label ms_makecode;
         private System.Windows.Forms.Label pr_detail;
         private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder1;
+        private System.Windows.Forms.RadioButton pitao;
     }
 }

+ 16 - 5
UAS_MES_ODLF/FunctionCode/Make/Make_RePrintLabel.cs

@@ -89,7 +89,7 @@ namespace UAS_MES_NEW.Make
         private void radioButton_CheckedChange(object sender, EventArgs e)
         {
             RadioButton btn = sender as RadioButton;
-            if ((btn.Name == "giftBox" || btn.Name == "fuselagel") && btn.Checked)
+            if ((btn.Name == "giftBox" || btn.Name == "fuselagel" || btn.Name == "pitao") && btn.Checked)
             {
                 //如果是切换成彩盒或者机身标提示用户 输入SN
                 OperateResult.AppendText(">>请输入SN\n", Color.Black);
@@ -114,7 +114,7 @@ namespace UAS_MES_NEW.Make
                 }
                 OperateResult.AppendText(">>" + inputText.Text + "\n", Color.Black);
                 //打印类型为彩盒或者机身标
-                if (giftBox.Checked || fuselagel.Checked)
+                if (giftBox.Checked || fuselagel.Checked || pitao.Checked)
                 {
                     //select max(ms_id)ms_id from makeserial where ms_sncode=? 
                     ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id) ms_id", "ms_sncode='" + inputText.Text + "'").ToString();
@@ -170,6 +170,8 @@ namespace UAS_MES_NEW.Make
                 type = "机身标";
             else if (giftBox.Checked)
                 type = "彩盒标";
+            else if (pitao.Checked)
+                type = "皮套标";
             else
                 type = "卡通箱标";
 
@@ -198,8 +200,17 @@ namespace UAS_MES_NEW.Make
                 return;
             }
             //打印类型 彩盒或者标签,再次判断是否已装箱,未转号
-            if (giftBox.Checked || fuselagel.Checked)
+            if (giftBox.Checked || fuselagel.Checked || pitao.Checked)
             {
+                string type = "";
+                if (fuselagel.Checked)
+                    type = "机身标";
+                else if (giftBox.Checked)
+                    type = "彩盒标";
+                else if (pitao.Checked)
+                    type = "皮套标";
+                else
+                    type = "卡通箱标";
                 mapB = (DataTable)dh.ExecuteSql("select ms_outboxcode, nvl(ms_downstatus,0) ms_downstatus from makeserial where ms_id='" + ms_id + "' and ms_sncode='" + inputValue.Text + "'", "select");
                 if (mapB.Rows.Count == 0)
                 {
@@ -215,7 +226,7 @@ namespace UAS_MES_NEW.Make
                 }
                 //判定通过进行打印 
                 //doc = lbl.Documents.Open(PrintLabel.Text);
-                if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, giftBox.Checked ? "彩盒标" : "机身标", "-1", out errorMessage))
+                if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, type, "-1", out errorMessage))
                 {
                     //按照打印张数打印
                     OperateResult.AppendText("<<打印成功\n", Color.Green);
@@ -225,7 +236,7 @@ namespace UAS_MES_NEW.Make
                     OperateResult.AppendText(errorMessage + "\n", Color.Red);
                 }
                 //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
-                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, giftBox.Checked ? "彩盒标补打印" : "机身标补打印", "补打印成功", inputValue.Text, "");
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, type, "补打印成功", inputValue.Text, "");
                 //如果ms_downstatus<>0,则更新ms_downstatus=-1 where ms_id=?id,同时插入记录至表 MAKEDOWN
                 if (mapB.Rows[0]["ms_downstatus"].ToString() == "0")
                 {