Browse Source

添加副标签打印

callm 1 week ago
parent
commit
d3356bda39

+ 104 - 2
UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.Designer.cs

@@ -28,7 +28,6 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Packing_PackageCollectionWeigh));
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
@@ -88,7 +87,7 @@
             this.getwei = new System.Windows.Forms.CheckBox();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip();
             this.PrintList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.PreFix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
@@ -114,6 +113,13 @@
             this.AutoPrint = new UAS_MES_NEW.CustomControl.CustomCheckBox.AutoPrintCheckBox();
             this.label7 = new System.Windows.Forms.Label();
             this.ms_endremark = new System.Windows.Forms.Label();
+            this.PrintNum1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.PrintSecond = new System.Windows.Forms.CheckBox();
+            this.label9 = new System.Windows.Forms.Label();
+            this.PrintLabel1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip();
+            this.label8 = new System.Windows.Forms.Label();
+            this.PrintList1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.label10 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
             this.SuspendLayout();
             // 
@@ -1138,11 +1144,100 @@
             this.ms_endremark.Size = new System.Drawing.Size(0, 41);
             this.ms_endremark.TabIndex = 251;
             // 
+            // PrintNum1
+            // 
+            this.PrintNum1.AllPower = null;
+            this.PrintNum1.BackColor = System.Drawing.Color.White;
+            this.PrintNum1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintNum1.ID = null;
+            this.PrintNum1.Location = new System.Drawing.Point(1476, 839);
+            this.PrintNum1.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum1.Name = "PrintNum1";
+            this.PrintNum1.Power = null;
+            this.PrintNum1.Size = new System.Drawing.Size(60, 39);
+            this.PrintNum1.Str = null;
+            this.PrintNum1.Str1 = null;
+            this.PrintNum1.Str2 = null;
+            this.PrintNum1.TabIndex = 254;
+            // 
+            // PrintSecond
+            // 
+            this.PrintSecond.AutoSize = true;
+            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(1173, 849);
+            this.PrintSecond.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintSecond.Name = "PrintSecond";
+            this.PrintSecond.Size = new System.Drawing.Size(162, 28);
+            this.PrintSecond.TabIndex = 258;
+            this.PrintSecond.Text = "打印副标签";
+            this.PrintSecond.UseVisualStyleBackColor = true;
+            // 
+            // 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(1377, 840);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(82, 41);
+            this.label9.TabIndex = 252;
+            this.label9.Text = "份数";
+            // 
+            // PrintLabel1
+            // 
+            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(1375, 948);
+            this.PrintLabel1.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintLabel1.Name = "PrintLabel1";
+            this.PrintLabel1.Size = new System.Drawing.Size(296, 39);
+            this.PrintLabel1.TabIndex = 256;
+            // 
+            // label8
+            // 
+            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(1167, 946);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(165, 41);
+            this.label8.TabIndex = 257;
+            this.label8.Text = "打印标签1";
+            // 
+            // PrintList1
+            // 
+            this.PrintList1.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintList1.Location = new System.Drawing.Point(1375, 895);
+            this.PrintList1.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.PrintList1.Name = "PrintList1";
+            this.PrintList1.Size = new System.Drawing.Size(298, 56);
+            this.PrintList1.TabIndex = 255;
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(1167, 891);
+            this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(197, 41);
+            this.label10.TabIndex = 253;
+            this.label10.Text = "打印机列表1";
+            // 
             // Packing_PackageCollectionWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1752, 1164);
+            this.Controls.Add(this.PrintNum1);
+            this.Controls.Add(this.PrintSecond);
+            this.Controls.Add(this.label9);
+            this.Controls.Add(this.PrintLabel1);
+            this.Controls.Add(this.label8);
+            this.Controls.Add(this.PrintList1);
+            this.Controls.Add(this.label10);
             this.Controls.Add(this.label7);
             this.Controls.Add(this.ms_endremark);
             this.Controls.Add(this.AutoPrint);
@@ -1315,5 +1410,12 @@
         private CustomControl.CustomCheckBox.AutoPrintCheckBox AutoPrint;
         private System.Windows.Forms.Label label7;
         private System.Windows.Forms.Label ms_endremark;
+        private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum1;
+        private System.Windows.Forms.CheckBox PrintSecond;
+        private System.Windows.Forms.Label label9;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel1;
+        private System.Windows.Forms.Label label8;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrintList1;
+        private System.Windows.Forms.Label label10;
     }
 }

+ 15 - 0
UAS_MES_ZT/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -248,6 +248,17 @@ namespace UAS_MES_NEW.Packing
                     {
                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                     }
+                    if (PrintSecond.Checked)
+                    {
+                        if (Print.SinglePrint(Tag.ToString(),engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, pa_outboxcode.Text, int.Parse(PrintNum1.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                        {
+                            OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                        }
+                    }
                     if (!AutoGenBoxCode.Checked)
                     {
                         pa_outboxcode.Focus();
@@ -606,6 +617,10 @@ namespace UAS_MES_NEW.Packing
             PrintLabel.DataSource = dt;
             PrintLabel.DisplayMember = "la_url";
             PrintLabel.ValueMember = "la_id";
+
+            PrintLabel1.DataSource = dt.Copy();
+            PrintLabel1.DisplayMember = "la_url";
+            PrintLabel1.ValueMember = "la_id";
         }
 
         private void Make_PackageCollectionWeigh_FormClosing(object sender, FormClosingEventArgs e)