Browse Source

修改外箱标签打印

callm 3 weeks ago
parent
commit
145d21c1dd

+ 154 - 45
UAS_MES_HYSX/FunctionCode/Packing/Packing_PackageCollection.Designer.cs

@@ -77,6 +77,7 @@
             this.PrintList_label = new System.Windows.Forms.Label();
             this.PrintNum_label = new System.Windows.Forms.Label();
             this.groupBoxWithBorder1 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.locksalecode = new System.Windows.Forms.CheckBox();
             this.PreFix_label = new System.Windows.Forms.Label();
@@ -108,7 +109,13 @@
             this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            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.components);
+            this.label7 = new System.Windows.Forms.Label();
+            this.PrintList1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.label8 = new System.Windows.Forms.Label();
             this.groupBoxWithBorder2.SuspendLayout();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
@@ -305,23 +312,25 @@
             // 
             this.Port_label.AutoSize = true;
             this.Port_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Port_label.Location = new System.Drawing.Point(1384, 928);
+            this.Port_label.Location = new System.Drawing.Point(1374, 1068);
             this.Port_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.Port_label.Name = "Port_label";
             this.Port_label.Size = new System.Drawing.Size(82, 41);
             this.Port_label.TabIndex = 204;
             this.Port_label.Text = "端口";
+            this.Port_label.Visible = false;
             // 
             // IP_label
             // 
             this.IP_label.AutoSize = true;
             this.IP_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.IP_label.Location = new System.Drawing.Point(1384, 862);
+            this.IP_label.Location = new System.Drawing.Point(1374, 1002);
             this.IP_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.IP_label.Name = "IP_label";
             this.IP_label.Size = new System.Drawing.Size(47, 41);
             this.IP_label.TabIndex = 202;
             this.IP_label.Text = "IP";
+            this.IP_label.Visible = false;
             // 
             // AllowRepeat
             // 
@@ -379,6 +388,7 @@
             this.CloseServer.TabIndex = 207;
             this.CloseServer.Text = "关闭服务";
             this.CloseServer.UseVisualStyleBackColor = true;
+            this.CloseServer.Visible = false;
             this.CloseServer.Click += new System.EventHandler(this.CloseServer_Click);
             // 
             // BuildServer
@@ -398,6 +408,7 @@
             this.BuildServer.TabIndex = 206;
             this.BuildServer.Text = "开启服务";
             this.BuildServer.UseVisualStyleBackColor = true;
+            this.BuildServer.Visible = false;
             this.BuildServer.Click += new System.EventHandler(this.BuildServer_Click);
             // 
             // Port
@@ -406,7 +417,7 @@
             this.Port.BackColor = System.Drawing.Color.White;
             this.Port.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Port.ID = null;
-            this.Port.Location = new System.Drawing.Point(1504, 932);
+            this.Port.Location = new System.Drawing.Point(1494, 1072);
             this.Port.Margin = new System.Windows.Forms.Padding(6);
             this.Port.Name = "Port";
             this.Port.Power = null;
@@ -415,6 +426,7 @@
             this.Port.Str1 = null;
             this.Port.Str2 = null;
             this.Port.TabIndex = 205;
+            this.Port.Visible = false;
             // 
             // IP
             // 
@@ -422,7 +434,7 @@
             this.IP.BackColor = System.Drawing.Color.White;
             this.IP.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.IP.ID = null;
-            this.IP.Location = new System.Drawing.Point(1504, 862);
+            this.IP.Location = new System.Drawing.Point(1494, 1002);
             this.IP.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
             this.IP.Name = "IP";
             this.IP.Power = null;
@@ -431,6 +443,7 @@
             this.IP.Str1 = null;
             this.IP.Str2 = null;
             this.IP.TabIndex = 203;
+            this.IP.Visible = false;
             // 
             // pa_remark
             // 
@@ -501,7 +514,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(530, 32);
+            this.label1.Location = new System.Drawing.Point(531, 33);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(146, 41);
@@ -524,7 +537,7 @@
             this.checkweightlabel.AutoSize = true;
             this.checkweightlabel.CutLength = null;
             this.checkweightlabel.ForeColor = System.Drawing.Color.Red;
-            this.checkweightlabel.Location = new System.Drawing.Point(56, 48);
+            this.checkweightlabel.Location = new System.Drawing.Point(57, 49);
             this.checkweightlabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.checkweightlabel.MaximumSize = new System.Drawing.Size(400, 0);
             this.checkweightlabel.Name = "checkweightlabel";
@@ -535,7 +548,7 @@
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(692, 176);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(693, 177);
             this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 41);
@@ -545,7 +558,7 @@
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.Location = new System.Drawing.Point(692, 100);
+            this.ob_batchqty.Location = new System.Drawing.Point(693, 101);
             this.ob_batchqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 41);
@@ -555,7 +568,7 @@
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(530, 176);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(531, 177);
             this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
             this.ob_nowcheckqty_label.Size = new System.Drawing.Size(146, 41);
@@ -566,7 +579,7 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.Location = new System.Drawing.Point(530, 104);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(531, 105);
             this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(146, 41);
@@ -577,7 +590,7 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno.Location = new System.Drawing.Point(692, 32);
+            this.ob_checkno.Location = new System.Drawing.Point(693, 33);
             this.ob_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 41);
@@ -642,7 +655,7 @@
             // 
             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(16, 178);
+            this.label3.Location = new System.Drawing.Point(17, 179);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(146, 41);
@@ -692,7 +705,7 @@
             // 
             this.PrintList_label.AutoSize = true;
             this.PrintList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintList_label.Location = new System.Drawing.Point(16, 98);
+            this.PrintList_label.Location = new System.Drawing.Point(17, 99);
             this.PrintList_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintList_label.Name = "PrintList_label";
             this.PrintList_label.Size = new System.Drawing.Size(178, 41);
@@ -703,7 +716,7 @@
             // 
             this.PrintNum_label.AutoSize = true;
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintNum_label.Location = new System.Drawing.Point(416, 260);
+            this.PrintNum_label.Location = new System.Drawing.Point(417, 261);
             this.PrintNum_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintNum_label.Name = "PrintNum_label";
             this.PrintNum_label.Size = new System.Drawing.Size(82, 41);
@@ -746,6 +759,19 @@
             this.groupBoxWithBorder1.Text = "装箱信息";
             this.groupBoxWithBorder1.TextColor = System.Drawing.Color.Black;
             // 
+            // LockMakeCode
+            // 
+            this.LockMakeCode.AutoSize = true;
+            this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LockMakeCode.LeaveEvent = false;
+            this.LockMakeCode.Location = new System.Drawing.Point(355, 282);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
+            this.LockMakeCode.TabIndex = 198;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
             // ma_code
             // 
             this.ma_code.AllPower = null;
@@ -771,7 +797,7 @@
             this.locksalecode.AutoSize = true;
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.ForeColor = System.Drawing.Color.Red;
-            this.locksalecode.Location = new System.Drawing.Point(584, 34);
+            this.locksalecode.Location = new System.Drawing.Point(585, 35);
             this.locksalecode.Margin = new System.Windows.Forms.Padding(6);
             this.locksalecode.Name = "locksalecode";
             this.locksalecode.Size = new System.Drawing.Size(186, 28);
@@ -783,7 +809,7 @@
             // 
             this.PreFix_label.AutoSize = true;
             this.PreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PreFix_label.Location = new System.Drawing.Point(358, 30);
+            this.PreFix_label.Location = new System.Drawing.Point(359, 31);
             this.PreFix_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PreFix_label.Name = "PreFix_label";
             this.PreFix_label.Size = new System.Drawing.Size(71, 36);
@@ -811,7 +837,7 @@
             // 
             this.pa_salecode_label.AutoSize = true;
             this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode_label.Location = new System.Drawing.Point(443, 281);
+            this.pa_salecode_label.Location = new System.Drawing.Point(444, 282);
             this.pa_salecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_salecode_label.Name = "pa_salecode_label";
             this.pa_salecode_label.Size = new System.Drawing.Size(146, 41);
@@ -822,7 +848,7 @@
             // 
             this.ma_code_label.AutoSize = true;
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(12, 274);
+            this.ma_code_label.Location = new System.Drawing.Point(13, 275);
             this.ma_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ma_code_label.Name = "ma_code_label";
             this.ma_code_label.Size = new System.Drawing.Size(114, 41);
@@ -833,7 +859,7 @@
             // 
             this.ms_salecode.AutoSize = true;
             this.ms_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_salecode.Location = new System.Drawing.Point(605, 281);
+            this.ms_salecode.Location = new System.Drawing.Point(606, 282);
             this.ms_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_salecode.Name = "ms_salecode";
             this.ms_salecode.Size = new System.Drawing.Size(0, 41);
@@ -843,7 +869,7 @@
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(162, 30);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(163, 31);
             this.OutBoxLength_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
             this.OutBoxLength_label.Size = new System.Drawing.Size(71, 36);
@@ -909,7 +935,7 @@
             this.AutoGenBoxCode.AutoSize = true;
             this.AutoGenBoxCode.Checked = true;
             this.AutoGenBoxCode.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(496, 90);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(497, 91);
             this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(4);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
             this.AutoGenBoxCode.Size = new System.Drawing.Size(178, 45);
@@ -922,7 +948,7 @@
             // 
             this.pa_currentqty_label.AutoSize = true;
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty_label.Location = new System.Drawing.Point(424, 154);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(425, 155);
             this.pa_currentqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
             this.pa_currentqty_label.Size = new System.Drawing.Size(146, 41);
@@ -933,7 +959,7 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(420, 210);
+            this.pr_detail_label.Location = new System.Drawing.Point(421, 211);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
@@ -963,7 +989,7 @@
             // 
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty.Location = new System.Drawing.Point(580, 150);
+            this.pa_currentqty.Location = new System.Drawing.Point(581, 151);
             this.pa_currentqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_currentqty.Name = "pa_currentqty";
             this.pa_currentqty.Size = new System.Drawing.Size(0, 41);
@@ -973,7 +999,7 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(12, 210);
+            this.pr_code_label.Location = new System.Drawing.Point(13, 211);
             this.pr_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code_label.Name = "pr_code_label";
             this.pr_code_label.Size = new System.Drawing.Size(146, 41);
@@ -984,7 +1010,7 @@
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(582, 210);
+            this.pr_detail.Location = new System.Drawing.Point(583, 211);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 41);
@@ -994,7 +1020,7 @@
             // 
             this.pr_outboxinnerqty_label.AutoSize = true;
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(12, 148);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(13, 149);
             this.pr_outboxinnerqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
             this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(146, 41);
@@ -1005,7 +1031,7 @@
             // 
             this.pr_code.AutoSize = true;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(184, 210);
+            this.pr_code.Location = new System.Drawing.Point(185, 211);
             this.pr_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_code.Name = "pr_code";
@@ -1017,7 +1043,7 @@
             // 
             this.pa_code_label.AutoSize = true;
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_code_label.Location = new System.Drawing.Point(12, 88);
+            this.pa_code_label.Location = new System.Drawing.Point(13, 89);
             this.pa_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_code_label.Name = "pa_code_label";
             this.pa_code_label.Size = new System.Drawing.Size(82, 41);
@@ -1153,18 +1179,87 @@
             this.pd_id.Visible = false;
             this.pd_id.Width = 200;
             // 
-            // LockMakeCode
-            // 
-            this.LockMakeCode.AutoSize = true;
-            this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.LockMakeCode.LeaveEvent = false;
-            this.LockMakeCode.Location = new System.Drawing.Point(354, 281);
-            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
-            this.LockMakeCode.Name = "LockMakeCode";
-            this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
-            this.LockMakeCode.TabIndex = 198;
-            this.LockMakeCode.Text = "锁定";
-            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 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(1512, 841);
+            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 = 213;
+            // 
+            // 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(1209, 851);
+            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 = 217;
+            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(1413, 842);
+            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 = 211;
+            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(1411, 950);
+            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 = 215;
+            // 
+            // label7
+            // 
+            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(1203, 948);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(165, 41);
+            this.label7.TabIndex = 216;
+            this.label7.Text = "打印标签1";
+            // 
+            // PrintList1
+            // 
+            this.PrintList1.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PrintList1.Location = new System.Drawing.Point(1411, 897);
+            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 = 214;
+            // 
+            // 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(1203, 893);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(197, 41);
+            this.label8.TabIndex = 212;
+            this.label8.Text = "打印机列表1";
             // 
             // Packing_PackageCollection
             // 
@@ -1172,6 +1267,13 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
             this.ClientSize = new System.Drawing.Size(1758, 1168);
+            this.Controls.Add(this.PrintNum1);
+            this.Controls.Add(this.PrintSecond);
+            this.Controls.Add(this.label9);
+            this.Controls.Add(this.PrintLabel1);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.PrintList1);
+            this.Controls.Add(this.label8);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.Remark_PreFix);
             this.Controls.Add(this.AllowRepeat);
@@ -1214,12 +1316,12 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PackCollection_FormClosing);
             this.Load += new System.EventHandler(this.PackCollection_Load);
             this.SizeChanged += new System.EventHandler(this.PackCollection_SizeChanged);
-            this.groupBoxWithBorder2.ResumeLayout(true);
+            this.groupBoxWithBorder2.ResumeLayout(false);
             this.groupBoxWithBorder2.PerformLayout();
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -1305,5 +1407,12 @@
         private CustomControl.TextBoxWithIcon.SnCollectionBox Remark_PreFix;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
+        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 label7;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrintList1;
+        private System.Windows.Forms.Label label8;
     }
 }

+ 23 - 6
UAS_MES_HYSX/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -20,7 +20,6 @@ namespace UAS_MES_NEW.Packing
         LogStringBuilder sql = new LogStringBuilder();
         AutoSizeFormClass asc = new AutoSizeFormClass();
         Thread thread;
-        Engine engine;
 
         DataTable Dbfind;
         string ErrorMessage = "";
@@ -32,6 +31,8 @@ namespace UAS_MES_NEW.Packing
         string LastSncode;
         string PR_CHECKCARTONW = "0";
 
+        public BarTender.Application engine;
+
         ModeBusTCPServer md;
 
         public Packing_PackageCollection()
@@ -45,7 +46,7 @@ namespace UAS_MES_NEW.Packing
         {
             try
             {
-                engine = new Engine(true);
+                engine = new BarTender.Application();
             }
             catch (Exception ex)
             {
@@ -166,7 +167,7 @@ namespace UAS_MES_NEW.Packing
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1,pa_remark='" + PrintLabel.Text + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
 
-                    if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                    if (Print.BarTender(Tag.ToString(), engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                     {
                         OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
                     }
@@ -174,6 +175,17 @@ namespace UAS_MES_NEW.Packing
                     {
                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                     }
+                    if (PrintSecond.Checked)
+                    {
+                        if (Print.BarTender(Tag.ToString(), engine, PrintLabel1.Text, PrintLabel1.SelectedValue.ToString(), PrintList1.Text, pa_outboxcode.Text, int.Parse(PrintNum1.Text == "" ? "0" : 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.SelectAll();
@@ -346,8 +358,9 @@ namespace UAS_MES_NEW.Packing
                                 if (AutoGenBoxCode.Checked && (pa_status.Text == "1" || pa_status.Text == "" || pa_status.Text == "0"))
                                 {
                                     pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PACKAGE", ms_makecode, pr_code.Text, User.UserCode);
-                                    if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "'")) {
-                                        OperateResult.AppendText(">>箱号"+ pa_outboxcode.Text + "已生成,不允许重复使用\n", Color.Red, sn_code);
+                                    if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "'"))
+                                    {
+                                        OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已生成,不允许重复使用\n", Color.Red, sn_code);
                                         pa_outboxcode.Text = "";
                                         return;
                                     }
@@ -615,6 +628,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";
             }
         }
 
@@ -898,7 +915,7 @@ namespace UAS_MES_NEW.Packing
                                     dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                                 pa_status.Text = "0";
                                 //删除箱的明细
-                                dh.ExecuteSql("delete from labelprintlog where lpl_value='"+pa_outboxcode.Text+"'","delete");
+                                dh.ExecuteSql("delete from labelprintlog where lpl_value='" + pa_outboxcode.Text + "'", "delete");
                                 dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", pa_outboxcode.Text, ob_checkno.Text);
                                 OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "成功拆解!\n", Color.Green);

+ 10 - 6
UAS_MES_HYSX/PublicMethod/HttpServer.cs

@@ -288,17 +288,19 @@ namespace UAS_MES_NEW.PublicMethod
         //获取SN的EN号,彩盒标机身标一个工站一起打印,需要SN单个获取
         public static void GetEN(string iSN)
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode,pr_prefix,pr_prebigxbox,pr_regcode from makeserial left join product on ms_prodcode=pr_code where ms_sncode ='" + iSN + "' order by ms_id desc", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select ma_custpo,ms_makecode,pr_prefix,PREFIX_EN_NO,PREFIX_BIG_BOX,pr_prebigxbox,pr_regcode from makeserial left join product on ms_prodcode=pr_code left join make on ma_code=ms_makecode left join ZTE_ORDER on ma_custpo=po_sn where ms_sncode ='" + iSN + "' order by ms_id desc", "select");
             string prefix = "";
             string regcode = "";
             string makecode = "";
             string prebigxbox = "";
+            string po = "";
             if (dt.Rows.Count > 0)
             {
-                prefix = dt.Rows[0]["pr_prefix"].ToString();
+                prefix = dt.Rows[0]["PREFIX_EN_NO"].ToString();
                 regcode = dt.Rows[0]["pr_regcode"].ToString();
                 makecode = dt.Rows[0]["ms_makecode"].ToString();
-                prebigxbox = dt.Rows[0]["pr_prebigxbox"].ToString();
+                prebigxbox = dt.Rows[0]["PREFIX_BIG_BOX"].ToString();
+                po = dt.Rows[0]["ma_custpo"].ToString();
             }
             dynamic obj = new ExpandoObject();
 
@@ -306,7 +308,7 @@ namespace UAS_MES_NEW.PublicMethod
             obj.request = "Storage2";
             obj.User = "mes";
             obj.password = "258456";
-            obj.po_sn = "250916001001";
+            obj.po_sn = po;
             obj.wholeDeviceCode = iSN;
             obj.reg_code = regcode;
             obj.prefix_en_no = prefix;
@@ -456,19 +458,21 @@ namespace UAS_MES_NEW.PublicMethod
         {
             dynamic obj = new ExpandoObject();
             var expandoDict = obj as IDictionary<string, object>;
-            DataTable dt = (DataTable)dh.ExecuteSql("select pd_barcode,pd_makecode,ZD_DEV_EN_NO from packagedetail left join ZTEDATA on zd_makecode=pd_makecode and pd_barcode=zd_sn  where pd_outboxcode='" + iBox + "'", "select");
+            DataTable dt = (DataTable)dh.ExecuteSql("select pd_barcode,pd_makecode,ZD_DEV_EN_NO from packagedetail left join ZTEDATA on zd_makecode=pd_makecode and pd_barcode=zd_sn left join make on ma_code=pd_makecode  where pd_outboxcode='" + iBox + "'", "select");
             string makecode = "";
+            string po = "";
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 string enNoKey = $"en_no{i}";
                 string enNoValue = dt.Rows[i]["ZD_DEV_EN_NO"].ToString();
                 expandoDict[enNoKey] = enNoValue;
                 makecode = dt.Rows[i]["pd_makecode"].ToString();
+                po = dt.Rows[i]["ma_custpo"].ToString();
             }
             obj.request = "Q_wai_xiang";
             obj.packing_num = dt.Rows.Count;
             obj.User = "mes";
-            obj.po_sn = "250916001001";
+            obj.po_sn = po;
             obj.password = "258456";
             obj.tool_name = "zte";
             obj.noType = 0;