Browse Source

彩盒打印支持三个打印机,箱号流水异常提示

callm 5 days ago
parent
commit
4a400b67a1

+ 118 - 14
UAS_MES_HYSX/FunctionCode/Make/Make_ColorBoxLabelPrintZX.Designer.cs

@@ -61,13 +61,20 @@
             this.label8 = new System.Windows.Forms.Label();
             this.PrintNum1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.label3 = new System.Windows.Forms.Label();
+            this.PrintNum2 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.PrintThird = new System.Windows.Forms.CheckBox();
+            this.PrintLabel2 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.label6 = new System.Windows.Forms.Label();
+            this.PrintList2 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.label9 = new System.Windows.Forms.Label();
             this.SuspendLayout();
             // 
             // label2
             // 
             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(1450, 288);
+            this.label2.Location = new System.Drawing.Point(1450, 229);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(114, 41);
@@ -78,7 +85,7 @@
             // 
             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(1450, 347);
+            this.label1.Location = new System.Drawing.Point(1450, 288);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(82, 41);
@@ -183,7 +190,7 @@
             this.CollectRemark.Checked = true;
             this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.CollectRemark.Location = new System.Drawing.Point(1458, 670);
+            this.CollectRemark.Location = new System.Drawing.Point(1458, 731);
             this.CollectRemark.Margin = new System.Windows.Forms.Padding(6);
             this.CollectRemark.Name = "CollectRemark";
             this.CollectRemark.Size = new System.Drawing.Size(155, 39);
@@ -194,7 +201,7 @@
             // Remark
             // 
             this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Remark.Location = new System.Drawing.Point(1450, 724);
+            this.Remark.Location = new System.Drawing.Point(1450, 785);
             this.Remark.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3);
             this.Remark.Name = "Remark";
             this.Remark.Size = new System.Drawing.Size(404, 156);
@@ -249,7 +256,7 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1578, 347);
+            this.PrintLabel.Location = new System.Drawing.Point(1578, 288);
             this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(264, 32);
@@ -258,7 +265,7 @@
             // 
             // Printer
             // 
-            this.Printer.Location = new System.Drawing.Point(1578, 288);
+            this.Printer.Location = new System.Drawing.Point(1578, 229);
             this.Printer.Margin = new System.Windows.Forms.Padding(8);
             this.Printer.Name = "Printer";
             this.Printer.Size = new System.Drawing.Size(268, 50);
@@ -380,7 +387,7 @@
             this.PrintSecond.CheckState = System.Windows.Forms.CheckState.Checked;
             this.PrintSecond.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.PrintSecond.ForeColor = System.Drawing.Color.Red;
-            this.PrintSecond.Location = new System.Drawing.Point(1458, 411);
+            this.PrintSecond.Location = new System.Drawing.Point(1458, 352);
             this.PrintSecond.Margin = new System.Windows.Forms.Padding(6);
             this.PrintSecond.Name = "PrintSecond";
             this.PrintSecond.Size = new System.Drawing.Size(162, 28);
@@ -393,7 +400,7 @@
             this.PrintLabel1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel1.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.PrintLabel1.FormattingEnabled = true;
-            this.PrintLabel1.Location = new System.Drawing.Point(1578, 542);
+            this.PrintLabel1.Location = new System.Drawing.Point(1578, 483);
             this.PrintLabel1.Margin = new System.Windows.Forms.Padding(4);
             this.PrintLabel1.Name = "PrintLabel1";
             this.PrintLabel1.Size = new System.Drawing.Size(264, 39);
@@ -403,7 +410,7 @@
             // 
             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(1450, 537);
+            this.label7.Location = new System.Drawing.Point(1450, 478);
             this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(101, 41);
@@ -413,7 +420,7 @@
             // PrintList1
             // 
             this.PrintList1.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.PrintList1.Location = new System.Drawing.Point(1578, 472);
+            this.PrintList1.Location = new System.Drawing.Point(1578, 413);
             this.PrintList1.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
             this.PrintList1.Name = "PrintList1";
             this.PrintList1.Size = new System.Drawing.Size(264, 56);
@@ -423,7 +430,7 @@
             // 
             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(1443, 472);
+            this.label8.Location = new System.Drawing.Point(1443, 413);
             this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(133, 41);
@@ -435,7 +442,7 @@
             this.PrintNum1.AllPower = null;
             this.PrintNum1.BackColor = System.Drawing.Color.White;
             this.PrintNum1.ID = null;
-            this.PrintNum1.Location = new System.Drawing.Point(1726, 404);
+            this.PrintNum1.Location = new System.Drawing.Point(1726, 345);
             this.PrintNum1.Margin = new System.Windows.Forms.Padding(6);
             this.PrintNum1.Name = "PrintNum1";
             this.PrintNum1.Negative = false;
@@ -451,18 +458,108 @@
             // 
             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(1632, 400);
+            this.label3.Location = new System.Drawing.Point(1632, 341);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(82, 41);
             this.label3.TabIndex = 212;
             this.label3.Text = "份数";
             // 
+            // PrintNum2
+            // 
+            this.PrintNum2.AllPower = null;
+            this.PrintNum2.BackColor = System.Drawing.Color.White;
+            this.PrintNum2.ID = null;
+            this.PrintNum2.Location = new System.Drawing.Point(1726, 543);
+            this.PrintNum2.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum2.Name = "PrintNum2";
+            this.PrintNum2.Negative = false;
+            this.PrintNum2.Power = null;
+            this.PrintNum2.Size = new System.Drawing.Size(85, 35);
+            this.PrintNum2.Str = null;
+            this.PrintNum2.Str1 = null;
+            this.PrintNum2.Str2 = null;
+            this.PrintNum2.TabIndex = 220;
+            this.PrintNum2.Text = "1";
+            // 
+            // 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(1632, 539);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(82, 41);
+            this.label5.TabIndex = 219;
+            this.label5.Text = "份数";
+            // 
+            // PrintThird
+            // 
+            this.PrintThird.AutoSize = true;
+            this.PrintThird.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintThird.ForeColor = System.Drawing.Color.Red;
+            this.PrintThird.Location = new System.Drawing.Point(1458, 550);
+            this.PrintThird.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintThird.Name = "PrintThird";
+            this.PrintThird.Size = new System.Drawing.Size(162, 28);
+            this.PrintThird.TabIndex = 218;
+            this.PrintThird.Text = "打印副标签";
+            this.PrintThird.UseVisualStyleBackColor = true;
+            // 
+            // PrintLabel2
+            // 
+            this.PrintLabel2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel2.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintLabel2.FormattingEnabled = true;
+            this.PrintLabel2.Location = new System.Drawing.Point(1578, 681);
+            this.PrintLabel2.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintLabel2.Name = "PrintLabel2";
+            this.PrintLabel2.Size = new System.Drawing.Size(264, 39);
+            this.PrintLabel2.TabIndex = 216;
+            // 
+            // 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(1450, 676);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(101, 41);
+            this.label6.TabIndex = 217;
+            this.label6.Text = "标签2";
+            // 
+            // PrintList2
+            // 
+            this.PrintList2.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintList2.Location = new System.Drawing.Point(1578, 611);
+            this.PrintList2.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.PrintList2.Name = "PrintList2";
+            this.PrintList2.Size = new System.Drawing.Size(264, 56);
+            this.PrintList2.TabIndex = 215;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(1443, 611);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(133, 41);
+            this.label9.TabIndex = 214;
+            this.label9.Text = "打印机2";
+            // 
             // Make_ColorBoxLabelPrintZX
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1876, 960);
+            this.Controls.Add(this.PrintNum2);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.PrintThird);
+            this.Controls.Add(this.PrintLabel2);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.PrintList2);
+            this.Controls.Add(this.label9);
             this.Controls.Add(this.PrintNum1);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.PrintSecond);
@@ -504,7 +601,7 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_ColorBoxLabelPrint_FormClosing);
             this.Load += new System.EventHandler(this.Make_ColorBoxLabelPrint_Load);
             this.SizeChanged += new System.EventHandler(this.Make_ColorBoxLabelPrint_SizeChanged);
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -543,5 +640,12 @@
         private System.Windows.Forms.Label label8;
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum1;
         private System.Windows.Forms.Label label3;
+        private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum2;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.CheckBox PrintThird;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel2;
+        private System.Windows.Forms.Label label6;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrintList2;
+        private System.Windows.Forms.Label label9;
     }
 }

+ 15 - 1
UAS_MES_HYSX/FunctionCode/Make/Make_ColorBoxLabelPrintZX.cs

@@ -212,7 +212,7 @@ namespace UAS_MES_NEW.Make
                         if (dt.Rows.Count > 0)
                         {
                             PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code and cr_prodcode = ms_prodcode", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sncode.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
-                            if (PR_CHECKCARTONW != "0"&& PR_CHECKCARTONW!="")
+                            if (PR_CHECKCARTONW != "0" && PR_CHECKCARTONW != "")
                             {
                                 OperateResult.AppendText(">>彩盒" + sncode.Text + "当前处于称重工序,无法在此界面采集,需去彩盒称重界面进行采集\n", Color.Black, sncode);
                                 return;
@@ -289,6 +289,17 @@ namespace UAS_MES_NEW.Make
                                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                                     }
                                 }
+                                if (PrintThird.Checked)
+                                {
+                                    if (Print.BarTender(Tag.ToString(), engine, PrintLabel2.Text, PrintLabel2.SelectedValue.ToString(), PrintList1.Text, sncode.Text, int.Parse(PrintNum2.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);
@@ -372,6 +383,9 @@ namespace UAS_MES_NEW.Make
                 PrintLabel1.DisplayMember = "la_url";
                 PrintLabel1.ValueMember = "la_id";
 
+                PrintLabel2.DataSource = _dt.Copy();
+                PrintLabel2.DisplayMember = "la_url";
+                PrintLabel2.ValueMember = "la_id";
                 pr_change = true;
             }
         }

+ 1 - 0
UAS_MES_HYSX/FunctionCode/Packing/Packing_PackageCollectionZX.cs

@@ -828,6 +828,7 @@ namespace UAS_MES_NEW.Packing
             {
                 return true;
             }
+            OperateResult.AppendText("箱号流水" + maxnum + "装箱序列号范围" + (maxnum * pr_outboxinnerqty + 1) + " " + (maxnum + 1) * pr_outboxinnerqty);
             return false;
         }
 

+ 13 - 11
UAS_MES_HYSX/FunctionCode/Packing/Packing_PalletCollectionZX.cs

@@ -415,17 +415,19 @@ namespace UAS_MES_NEW.Packing
             {
                 _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode is null and la_templatetype='栈板标' and la_statuscode='AUDITED' order by la_isdefault", "select");
             }
-            if (_dt.Rows.Count > 0)
-            {
-                string la_id = _dt.Rows[0]["la_id"].ToString();
-                _dt = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id from FILEPATH where fp_id in (select *  from table(select parsestring(LA_SOFTTYPE,';') from label where la_id='" + la_id + "') where COLUMN_VALUE is not null)", "select");
-                PrintLabel.DataSource = _dt;
-                PrintLabel.DisplayMember = "la_url";
-                PrintLabel.ValueMember = "la_id";
-
-                PrintLabel1.DataSource = _dt.Copy();
-                PrintLabel1.DisplayMember = "la_url";
-                PrintLabel1.ValueMember = "la_id";
+            if (PrintLabel.DataSource == null) {
+                if (_dt.Rows.Count > 0)
+                {
+                    string la_id = _dt.Rows[0]["la_id"].ToString();
+                    _dt = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id from FILEPATH where fp_id in (select *  from table(select parsestring(LA_SOFTTYPE,';') from label where la_id='" + la_id + "') where COLUMN_VALUE is not null)", "select");
+                    PrintLabel.DataSource = _dt;
+                    PrintLabel.DisplayMember = "la_url";
+                    PrintLabel.ValueMember = "la_id";
+
+                    PrintLabel1.DataSource = _dt.Copy();
+                    PrintLabel1.DisplayMember = "la_url";
+                    PrintLabel1.ValueMember = "la_id";
+                }
             }
         }