浏览代码

大箱号默认自动生成

callm 1 年之前
父节点
当前提交
d1a1f1e2c4

+ 210 - 160
UAS_MES_LGDZ/FunctionCode/Packing/Packing_BigBoxCollection.Designer.cs

@@ -38,7 +38,6 @@
             this.pa_custcode_label = new System.Windows.Forms.Label();
             this.outboxcode_label = new System.Windows.Forms.Label();
             this.pa_prodcode_label = new System.Windows.Forms.Label();
-            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.PrintLabel_label = new System.Windows.Forms.Label();
             this.PrinterList_label = new System.Windows.Forms.Label();
             this.pa_packageqty_label = new System.Windows.Forms.Label();
@@ -50,10 +49,16 @@
             this.pd_makecode = new System.Windows.Forms.Label();
             this.pd_prodcode = new System.Windows.Forms.Label();
             this.pd_salecode = new System.Windows.Forms.Label();
+            this.PalletPreFix_label = new System.Windows.Forms.Label();
+            this.OutBoxLength_label = new System.Windows.Forms.Label();
+            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
+            this.PalletPreFix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.OutBoxLength = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.pa_standardqty = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.Packing = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.pa_totalqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.pa_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
@@ -71,11 +76,6 @@
             this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.PalletPreFix_label = new System.Windows.Forms.Label();
-            this.PalletPreFix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
-            this.OutBoxLength_label = new System.Windows.Forms.Label();
-            this.OutBoxLength = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
-            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -83,9 +83,10 @@
             // 
             this.pa_outboxcode_label.AutoSize = true;
             this.pa_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_outboxcode_label.Location = new System.Drawing.Point(3, 45);
+            this.pa_outboxcode_label.Location = new System.Drawing.Point(6, 90);
+            this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_outboxcode_label.Name = "pa_outboxcode_label";
-            this.pa_outboxcode_label.Size = new System.Drawing.Size(58, 21);
+            this.pa_outboxcode_label.Size = new System.Drawing.Size(114, 41);
             this.pa_outboxcode_label.TabIndex = 102;
             this.pa_outboxcode_label.Text = "大箱号";
             // 
@@ -93,9 +94,10 @@
             // 
             this.pa_totalqty_label.AutoSize = true;
             this.pa_totalqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_totalqty_label.Location = new System.Drawing.Point(292, 77);
+            this.pa_totalqty_label.Location = new System.Drawing.Point(584, 154);
+            this.pa_totalqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_totalqty_label.Name = "pa_totalqty_label";
-            this.pa_totalqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_totalqty_label.Size = new System.Drawing.Size(146, 41);
             this.pa_totalqty_label.TabIndex = 104;
             this.pa_totalqty_label.Text = "已装数量";
             // 
@@ -103,9 +105,10 @@
             // 
             this.pa_makecode_label.AutoSize = true;
             this.pa_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode_label.Location = new System.Drawing.Point(292, 45);
+            this.pa_makecode_label.Location = new System.Drawing.Point(584, 90);
+            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_makecode_label.Name = "pa_makecode_label";
-            this.pa_makecode_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_makecode_label.Size = new System.Drawing.Size(146, 41);
             this.pa_makecode_label.TabIndex = 108;
             this.pa_makecode_label.Text = "制造单号";
             // 
@@ -115,9 +118,10 @@
             this.AutoPrint.Checked = true;
             this.AutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.AutoPrint.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoPrint.Location = new System.Drawing.Point(753, 159);
+            this.AutoPrint.Location = new System.Drawing.Point(1506, 318);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(125, 25);
+            this.AutoPrint.Size = new System.Drawing.Size(242, 45);
             this.AutoPrint.TabIndex = 153;
             this.AutoPrint.Text = "满箱自动打印";
             this.AutoPrint.UseVisualStyleBackColor = true;
@@ -126,9 +130,10 @@
             // 
             this.pa_restqty_label.AutoSize = true;
             this.pa_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_restqty_label.Location = new System.Drawing.Point(744, 115);
+            this.pa_restqty_label.Location = new System.Drawing.Point(1488, 230);
+            this.pa_restqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_restqty_label.Name = "pa_restqty_label";
-            this.pa_restqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_restqty_label.Size = new System.Drawing.Size(146, 41);
             this.pa_restqty_label.TabIndex = 154;
             this.pa_restqty_label.Text = "打印张数";
             // 
@@ -136,9 +141,10 @@
             // 
             this.pa_custcode_label.AutoSize = true;
             this.pa_custcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_custcode_label.Location = new System.Drawing.Point(750, 45);
+            this.pa_custcode_label.Location = new System.Drawing.Point(1500, 90);
+            this.pa_custcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_custcode_label.Name = "pa_custcode_label";
-            this.pa_custcode_label.Size = new System.Drawing.Size(42, 21);
+            this.pa_custcode_label.Size = new System.Drawing.Size(82, 41);
             this.pa_custcode_label.TabIndex = 157;
             this.pa_custcode_label.Text = "合同";
             // 
@@ -146,9 +152,10 @@
             // 
             this.outboxcode_label.AutoSize = true;
             this.outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.outboxcode_label.Location = new System.Drawing.Point(714, 264);
+            this.outboxcode_label.Location = new System.Drawing.Point(1428, 528);
+            this.outboxcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.outboxcode_label.Name = "outboxcode_label";
-            this.outboxcode_label.Size = new System.Drawing.Size(42, 21);
+            this.outboxcode_label.Size = new System.Drawing.Size(82, 41);
             this.outboxcode_label.TabIndex = 166;
             this.outboxcode_label.Text = "箱号";
             // 
@@ -156,30 +163,21 @@
             // 
             this.pa_prodcode_label.AutoSize = true;
             this.pa_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode_label.Location = new System.Drawing.Point(482, 45);
+            this.pa_prodcode_label.Location = new System.Drawing.Point(964, 90);
+            this.pa_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_prodcode_label.Name = "pa_prodcode_label";
-            this.pa_prodcode_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_prodcode_label.Size = new System.Drawing.Size(146, 41);
             this.pa_prodcode_label.TabIndex = 169;
             this.pa_prodcode_label.Text = "产品编号";
             // 
-            // PrintLabel
-            // 
-            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(840, 77);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
-            this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(138, 20);
-            this.PrintLabel.TabIndex = 172;
-            this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
-            // 
             // PrintLabel_label
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(750, 77);
+            this.PrintLabel_label.Location = new System.Drawing.Point(1500, 154);
+            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintLabel_label.Name = "PrintLabel_label";
-            this.PrintLabel_label.Size = new System.Drawing.Size(74, 21);
+            this.PrintLabel_label.Size = new System.Drawing.Size(146, 41);
             this.PrintLabel_label.TabIndex = 174;
             this.PrintLabel_label.Text = "标签文件";
             // 
@@ -187,9 +185,10 @@
             // 
             this.PrinterList_label.AutoSize = true;
             this.PrinterList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrinterList_label.Location = new System.Drawing.Point(482, 77);
+            this.PrinterList_label.Location = new System.Drawing.Point(964, 154);
+            this.PrinterList_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrinterList_label.Name = "PrinterList_label";
-            this.PrinterList_label.Size = new System.Drawing.Size(90, 21);
+            this.PrinterList_label.Size = new System.Drawing.Size(178, 41);
             this.PrinterList_label.TabIndex = 173;
             this.PrinterList_label.Text = "打印机列表";
             // 
@@ -197,30 +196,37 @@
             // 
             this.pa_packageqty_label.AutoSize = true;
             this.pa_packageqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_packageqty_label.Location = new System.Drawing.Point(3, 77);
+            this.pa_packageqty_label.Location = new System.Drawing.Point(6, 154);
+            this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_packageqty_label.Name = "pa_packageqty_label";
-            this.pa_packageqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_packageqty_label.Size = new System.Drawing.Size(146, 41);
             this.pa_packageqty_label.TabIndex = 176;
             this.pa_packageqty_label.Text = "大箱容量";
             // 
             // AutoOutBoxCode
             // 
             this.AutoOutBoxCode.AutoSize = true;
+            this.AutoOutBoxCode.Checked = true;
+            this.AutoOutBoxCode.CheckState = System.Windows.Forms.CheckState.Checked;
             this.AutoOutBoxCode.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.AutoOutBoxCode.Location = new System.Drawing.Point(3, 14);
+            this.AutoOutBoxCode.Location = new System.Drawing.Point(6, 28);
+            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.AutoOutBoxCode.Name = "AutoOutBoxCode";
-            this.AutoOutBoxCode.Size = new System.Drawing.Size(84, 24);
+            this.AutoOutBoxCode.Size = new System.Drawing.Size(155, 39);
             this.AutoOutBoxCode.TabIndex = 179;
             this.AutoOutBoxCode.Text = "自动生成";
             this.AutoOutBoxCode.UseVisualStyleBackColor = true;
+            this.AutoOutBoxCode.CheckedChanged += new System.EventHandler(this.AutoOutBoxCode_CheckedChanged);
+            this.AutoOutBoxCode.CheckStateChanged += new System.EventHandler(this.AutoOutBoxCode_CheckStateChanged);
             // 
             // pa_status
             // 
             this.pa_status.AutoSize = true;
             this.pa_status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_status.Location = new System.Drawing.Point(923, 162);
+            this.pa_status.Location = new System.Drawing.Point(1846, 324);
+            this.pa_status.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_status.Name = "pa_status";
-            this.pa_status.Size = new System.Drawing.Size(0, 21);
+            this.pa_status.Size = new System.Drawing.Size(0, 41);
             this.pa_status.TabIndex = 180;
             this.pa_status.Visible = false;
             // 
@@ -228,9 +234,10 @@
             // 
             this.Cancel.AutoSize = true;
             this.Cancel.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.Cancel.Location = new System.Drawing.Point(902, 263);
+            this.Cancel.Location = new System.Drawing.Point(1804, 526);
+            this.Cancel.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Cancel.Name = "Cancel";
-            this.Cancel.Size = new System.Drawing.Size(84, 24);
+            this.Cancel.Size = new System.Drawing.Size(155, 39);
             this.Cancel.TabIndex = 182;
             this.Cancel.Text = "取消采集";
             this.Cancel.UseVisualStyleBackColor = true;
@@ -238,58 +245,128 @@
             // pr_packrule
             // 
             this.pr_packrule.AutoSize = true;
-            this.pr_packrule.Location = new System.Drawing.Point(748, 498);
+            this.pr_packrule.Location = new System.Drawing.Point(1496, 996);
+            this.pr_packrule.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_packrule.Name = "pr_packrule";
-            this.pr_packrule.Size = new System.Drawing.Size(0, 12);
+            this.pr_packrule.Size = new System.Drawing.Size(0, 24);
             this.pr_packrule.TabIndex = 183;
             this.pr_packrule.Visible = false;
             // 
             // pa_custcode
             // 
             this.pa_custcode.AutoSize = true;
-            this.pa_custcode.Location = new System.Drawing.Point(927, 498);
+            this.pa_custcode.Location = new System.Drawing.Point(1854, 996);
+            this.pa_custcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_custcode.Name = "pa_custcode";
-            this.pa_custcode.Size = new System.Drawing.Size(0, 12);
+            this.pa_custcode.Size = new System.Drawing.Size(0, 24);
             this.pa_custcode.TabIndex = 184;
             this.pa_custcode.Visible = false;
             // 
             // pd_makecode
             // 
             this.pd_makecode.AutoSize = true;
-            this.pd_makecode.Location = new System.Drawing.Point(730, 306);
+            this.pd_makecode.Location = new System.Drawing.Point(1460, 612);
+            this.pd_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pd_makecode.Name = "pd_makecode";
-            this.pd_makecode.Size = new System.Drawing.Size(0, 12);
+            this.pd_makecode.Size = new System.Drawing.Size(0, 24);
             this.pd_makecode.TabIndex = 185;
             this.pd_makecode.Visible = false;
             // 
             // pd_prodcode
             // 
             this.pd_prodcode.AutoSize = true;
-            this.pd_prodcode.Location = new System.Drawing.Point(829, 305);
+            this.pd_prodcode.Location = new System.Drawing.Point(1658, 610);
+            this.pd_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pd_prodcode.Name = "pd_prodcode";
-            this.pd_prodcode.Size = new System.Drawing.Size(0, 12);
+            this.pd_prodcode.Size = new System.Drawing.Size(0, 24);
             this.pd_prodcode.TabIndex = 186;
             this.pd_prodcode.Visible = false;
             // 
             // pd_salecode
             // 
             this.pd_salecode.AutoSize = true;
-            this.pd_salecode.Location = new System.Drawing.Point(927, 304);
+            this.pd_salecode.Location = new System.Drawing.Point(1854, 608);
+            this.pd_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pd_salecode.Name = "pd_salecode";
-            this.pd_salecode.Size = new System.Drawing.Size(0, 12);
+            this.pd_salecode.Size = new System.Drawing.Size(0, 24);
             this.pd_salecode.TabIndex = 187;
             this.pd_salecode.Visible = false;
             // 
+            // PalletPreFix_label
+            // 
+            this.PalletPreFix_label.AutoSize = true;
+            this.PalletPreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PalletPreFix_label.Location = new System.Drawing.Point(374, 30);
+            this.PalletPreFix_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.PalletPreFix_label.Name = "PalletPreFix_label";
+            this.PalletPreFix_label.Size = new System.Drawing.Size(71, 36);
+            this.PalletPreFix_label.TabIndex = 200;
+            this.PalletPreFix_label.Text = "前缀";
+            // 
+            // OutBoxLength_label
+            // 
+            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(194, 30);
+            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);
+            this.OutBoxLength_label.TabIndex = 198;
+            this.OutBoxLength_label.Text = "长度";
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(962, 26);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(176, 44);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 201;
+            // 
+            // PalletPreFix
+            // 
+            this.PalletPreFix.AllPower = null;
+            this.PalletPreFix.BackColor = System.Drawing.Color.White;
+            this.PalletPreFix.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PalletPreFix.ID = null;
+            this.PalletPreFix.Location = new System.Drawing.Point(450, 28);
+            this.PalletPreFix.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.PalletPreFix.Name = "PalletPreFix";
+            this.PalletPreFix.Power = null;
+            this.PalletPreFix.Size = new System.Drawing.Size(72, 39);
+            this.PalletPreFix.Str = null;
+            this.PalletPreFix.Str1 = null;
+            this.PalletPreFix.Str2 = null;
+            this.PalletPreFix.TabIndex = 199;
+            // 
+            // OutBoxLength
+            // 
+            this.OutBoxLength.AllPower = null;
+            this.OutBoxLength.BackColor = System.Drawing.Color.White;
+            this.OutBoxLength.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.OutBoxLength.ID = null;
+            this.OutBoxLength.Location = new System.Drawing.Point(278, 28);
+            this.OutBoxLength.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
+            this.OutBoxLength.Name = "OutBoxLength";
+            this.OutBoxLength.Power = null;
+            this.OutBoxLength.Size = new System.Drawing.Size(72, 39);
+            this.OutBoxLength.Str = null;
+            this.OutBoxLength.Str1 = null;
+            this.OutBoxLength.Str2 = null;
+            this.OutBoxLength.TabIndex = 197;
+            // 
             // pa_standardqty
             // 
             this.pa_standardqty.AllPower = null;
             this.pa_standardqty.BackColor = System.Drawing.Color.White;
             this.pa_standardqty.ID = null;
-            this.pa_standardqty.Location = new System.Drawing.Point(80, 77);
-            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(2);
+            this.pa_standardqty.Location = new System.Drawing.Point(160, 154);
+            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(4);
             this.pa_standardqty.Name = "pa_standardqty";
             this.pa_standardqty.Power = null;
-            this.pa_standardqty.Size = new System.Drawing.Size(107, 21);
+            this.pa_standardqty.Size = new System.Drawing.Size(210, 35);
             this.pa_standardqty.Str = null;
             this.pa_standardqty.Str1 = null;
             this.pa_standardqty.Str2 = null;
@@ -302,10 +379,11 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(838, 119);
+            this.PrintNum.Location = new System.Drawing.Point(1676, 238);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(6);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(142, 21);
+            this.PrintNum.Size = new System.Drawing.Size(280, 35);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -318,12 +396,13 @@
             this.Packing.DownImage = ((System.Drawing.Image)(resources.GetObject("Packing.DownImage")));
             this.Packing.Image = null;
             this.Packing.IsShowBorder = true;
-            this.Packing.Location = new System.Drawing.Point(910, 210);
+            this.Packing.Location = new System.Drawing.Point(1820, 420);
+            this.Packing.Margin = new System.Windows.Forms.Padding(6);
             this.Packing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Packing.MoveImage")));
             this.Packing.Name = "Packing";
             this.Packing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Packing.NormalImage")));
             this.Packing.Power = null;
-            this.Packing.Size = new System.Drawing.Size(56, 24);
+            this.Packing.Size = new System.Drawing.Size(112, 48);
             this.Packing.TabIndex = 178;
             this.Packing.Text = "封大箱";
             this.Packing.UseVisualStyleBackColor = true;
@@ -334,19 +413,31 @@
             this.pa_totalqty.AutoSize = true;
             this.pa_totalqty.CutLength = null;
             this.pa_totalqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_totalqty.Location = new System.Drawing.Point(374, 77);
-            this.pa_totalqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_totalqty.Location = new System.Drawing.Point(748, 154);
+            this.pa_totalqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_totalqty.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_totalqty.Name = "pa_totalqty";
-            this.pa_totalqty.Size = new System.Drawing.Size(0, 21);
+            this.pa_totalqty.Size = new System.Drawing.Size(0, 41);
             this.pa_totalqty.TabIndex = 177;
             this.pa_totalqty.Tag = "1";
             // 
+            // PrintLabel
+            // 
+            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel.FormattingEnabled = true;
+            this.PrintLabel.Location = new System.Drawing.Point(1680, 154);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.PrintLabel.Name = "PrintLabel";
+            this.PrintLabel.Size = new System.Drawing.Size(272, 32);
+            this.PrintLabel.TabIndex = 172;
+            this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
+            // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(592, 77);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(4);
+            this.PrinterList.Location = new System.Drawing.Point(1184, 154);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(8);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(128, 20);
+            this.PrinterList.Size = new System.Drawing.Size(256, 40);
             this.PrinterList.TabIndex = 171;
             // 
             // pa_prodcode
@@ -354,10 +445,11 @@
             this.pa_prodcode.AutoSize = true;
             this.pa_prodcode.CutLength = null;
             this.pa_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode.Location = new System.Drawing.Point(587, 45);
-            this.pa_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_prodcode.Location = new System.Drawing.Point(1174, 90);
+            this.pa_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_prodcode.Name = "pa_prodcode";
-            this.pa_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.pa_prodcode.Size = new System.Drawing.Size(0, 41);
             this.pa_prodcode.TabIndex = 170;
             this.pa_prodcode.Tag = "1";
             this.pa_prodcode.TextChanged += new System.EventHandler(this.pa_prodcode_TextChanged);
@@ -369,12 +461,13 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = null;
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(829, 498);
+            this.Clean.Location = new System.Drawing.Point(1658, 996);
+            this.Clean.Margin = new System.Windows.Forms.Padding(6);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(60, 24);
+            this.Clean.Size = new System.Drawing.Size(120, 48);
             this.Clean.TabIndex = 168;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -383,9 +476,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(715, 304);
+            this.OperateResult.Location = new System.Drawing.Point(1430, 608);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(277, 188);
+            this.OperateResult.Size = new System.Drawing.Size(550, 372);
             this.OperateResult.TabIndex = 167;
             this.OperateResult.Text = "";
             // 
@@ -394,10 +488,11 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(770, 264);
+            this.outboxcode.Location = new System.Drawing.Point(1540, 528);
+            this.outboxcode.Margin = new System.Windows.Forms.Padding(6);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifread";
-            this.outboxcode.Size = new System.Drawing.Size(110, 21);
+            this.outboxcode.Size = new System.Drawing.Size(216, 35);
             this.outboxcode.Str = null;
             this.outboxcode.Str1 = null;
             this.outboxcode.Str2 = null;
@@ -410,10 +505,11 @@
             this.pa_outboxcode.AllPower = "ifall";
             this.pa_outboxcode.BackColor = System.Drawing.Color.White;
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(80, 47);
+            this.pa_outboxcode.Location = new System.Drawing.Point(160, 94);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(6);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifread";
-            this.pa_outboxcode.Size = new System.Drawing.Size(106, 21);
+            this.pa_outboxcode.Size = new System.Drawing.Size(208, 35);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -428,12 +524,13 @@
             this.Printlab.DownImage = ((System.Drawing.Image)(resources.GetObject("Printlab.DownImage")));
             this.Printlab.Image = null;
             this.Printlab.IsShowBorder = true;
-            this.Printlab.Location = new System.Drawing.Point(836, 210);
+            this.Printlab.Location = new System.Drawing.Point(1672, 420);
+            this.Printlab.Margin = new System.Windows.Forms.Padding(6);
             this.Printlab.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printlab.MoveImage")));
             this.Printlab.Name = "Printlab";
             this.Printlab.NormalImage = ((System.Drawing.Image)(resources.GetObject("Printlab.NormalImage")));
             this.Printlab.Power = null;
-            this.Printlab.Size = new System.Drawing.Size(45, 24);
+            this.Printlab.Size = new System.Drawing.Size(90, 48);
             this.Printlab.TabIndex = 161;
             this.Printlab.Text = "打印";
             this.Printlab.UseVisualStyleBackColor = true;
@@ -446,12 +543,13 @@
             this.ReleasePallet.DownImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.DownImage")));
             this.ReleasePallet.Image = null;
             this.ReleasePallet.IsShowBorder = true;
-            this.ReleasePallet.Location = new System.Drawing.Point(753, 210);
+            this.ReleasePallet.Location = new System.Drawing.Point(1506, 420);
+            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(6);
             this.ReleasePallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.MoveImage")));
             this.ReleasePallet.Name = "ReleasePallet";
             this.ReleasePallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.NormalImage")));
             this.ReleasePallet.Power = null;
-            this.ReleasePallet.Size = new System.Drawing.Size(56, 24);
+            this.ReleasePallet.Size = new System.Drawing.Size(112, 48);
             this.ReleasePallet.TabIndex = 160;
             this.ReleasePallet.Text = "解除大箱";
             this.ReleasePallet.UseVisualStyleBackColor = true;
@@ -464,12 +562,13 @@
             this.NewPallet.DownImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.DownImage")));
             this.NewPallet.Image = null;
             this.NewPallet.IsShowBorder = true;
-            this.NewPallet.Location = new System.Drawing.Point(918, 15);
+            this.NewPallet.Location = new System.Drawing.Point(1836, 30);
+            this.NewPallet.Margin = new System.Windows.Forms.Padding(6);
             this.NewPallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.MoveImage")));
             this.NewPallet.Name = "NewPallet";
             this.NewPallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.NormalImage")));
             this.NewPallet.Power = "ifread";
-            this.NewPallet.Size = new System.Drawing.Size(60, 24);
+            this.NewPallet.Size = new System.Drawing.Size(120, 48);
             this.NewPallet.TabIndex = 159;
             this.NewPallet.Text = "新增大箱";
             this.NewPallet.UseVisualStyleBackColor = true;
@@ -481,10 +580,11 @@
             this.pa_salecode.AutoSize = true;
             this.pa_salecode.CutLength = null;
             this.pa_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode.Location = new System.Drawing.Point(842, 45);
-            this.pa_salecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_salecode.Location = new System.Drawing.Point(1684, 90);
+            this.pa_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_salecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_salecode.Name = "pa_salecode";
-            this.pa_salecode.Size = new System.Drawing.Size(0, 21);
+            this.pa_salecode.Size = new System.Drawing.Size(0, 41);
             this.pa_salecode.TabIndex = 158;
             this.pa_salecode.Tag = "1";
             // 
@@ -499,39 +599,49 @@
             this.Column4,
             this.Column5});
             this.PackageInf.EnableContentClick = true;
-            this.PackageInf.Location = new System.Drawing.Point(3, 115);
+            this.PackageInf.Location = new System.Drawing.Point(6, 230);
+            this.PackageInf.Margin = new System.Windows.Forms.Padding(6);
             this.PackageInf.Name = "PackageInf";
+            this.PackageInf.RowHeadersWidth = 82;
             this.PackageInf.RowTemplate.Height = 23;
-            this.PackageInf.Size = new System.Drawing.Size(706, 415);
+            this.PackageInf.Size = new System.Drawing.Size(1412, 830);
             this.PackageInf.TabIndex = 156;
             // 
             // pd_outboxcode
             // 
             this.pd_outboxcode.DataPropertyName = "code";
             this.pd_outboxcode.HeaderText = "卡通箱号";
+            this.pd_outboxcode.MinimumWidth = 10;
             this.pd_outboxcode.Name = "pd_outboxcode";
             this.pd_outboxcode.ReadOnly = true;
+            this.pd_outboxcode.Width = 200;
             // 
             // pd_innerqty
             // 
             this.pd_innerqty.DataPropertyName = "pd_innerqty";
             this.pd_innerqty.HeaderText = "数量";
+            this.pd_innerqty.MinimumWidth = 10;
             this.pd_innerqty.Name = "pd_innerqty";
             this.pd_innerqty.ReadOnly = true;
+            this.pd_innerqty.Width = 200;
             // 
             // Column3
             // 
             this.Column3.DataPropertyName = "pd_prodcode";
             this.Column3.HeaderText = "产品编号";
+            this.Column3.MinimumWidth = 10;
             this.Column3.Name = "Column3";
             this.Column3.ReadOnly = true;
+            this.Column3.Width = 200;
             // 
             // Column4
             // 
             this.Column4.DataPropertyName = "pd_makecode";
             this.Column4.HeaderText = "工单号";
+            this.Column4.MinimumWidth = 10;
             this.Column4.Name = "Column4";
             this.Column4.ReadOnly = true;
+            this.Column4.Width = 200;
             // 
             // Column5
             // 
@@ -540,87 +650,26 @@
             this.Column5.MinimumWidth = 100;
             this.Column5.Name = "Column5";
             this.Column5.ReadOnly = true;
+            this.Column5.Width = 200;
             // 
             // pa_makecode
             // 
             this.pa_makecode.AutoSize = true;
             this.pa_makecode.CutLength = null;
             this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode.Location = new System.Drawing.Point(374, 45);
-            this.pa_makecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_makecode.Location = new System.Drawing.Point(748, 90);
+            this.pa_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_makecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_makecode.Name = "pa_makecode";
-            this.pa_makecode.Size = new System.Drawing.Size(0, 21);
+            this.pa_makecode.Size = new System.Drawing.Size(0, 41);
             this.pa_makecode.TabIndex = 109;
             this.pa_makecode.Tag = "1";
             // 
-            // PalletPreFix_label
-            // 
-            this.PalletPreFix_label.AutoSize = true;
-            this.PalletPreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PalletPreFix_label.Location = new System.Drawing.Point(187, 15);
-            this.PalletPreFix_label.Name = "PalletPreFix_label";
-            this.PalletPreFix_label.Size = new System.Drawing.Size(37, 20);
-            this.PalletPreFix_label.TabIndex = 200;
-            this.PalletPreFix_label.Text = "前缀";
-            // 
-            // PalletPreFix
-            // 
-            this.PalletPreFix.AllPower = null;
-            this.PalletPreFix.BackColor = System.Drawing.Color.White;
-            this.PalletPreFix.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.PalletPreFix.ID = null;
-            this.PalletPreFix.Location = new System.Drawing.Point(225, 14);
-            this.PalletPreFix.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
-            this.PalletPreFix.Name = "PalletPreFix";
-            this.PalletPreFix.Power = null;
-            this.PalletPreFix.Size = new System.Drawing.Size(38, 23);
-            this.PalletPreFix.Str = null;
-            this.PalletPreFix.Str1 = null;
-            this.PalletPreFix.Str2 = null;
-            this.PalletPreFix.TabIndex = 199;
-            // 
-            // OutBoxLength_label
-            // 
-            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(97, 15);
-            this.OutBoxLength_label.Name = "OutBoxLength_label";
-            this.OutBoxLength_label.Size = new System.Drawing.Size(37, 20);
-            this.OutBoxLength_label.TabIndex = 198;
-            this.OutBoxLength_label.Text = "长度";
-            // 
-            // OutBoxLength
-            // 
-            this.OutBoxLength.AllPower = null;
-            this.OutBoxLength.BackColor = System.Drawing.Color.White;
-            this.OutBoxLength.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.OutBoxLength.ID = null;
-            this.OutBoxLength.Location = new System.Drawing.Point(139, 14);
-            this.OutBoxLength.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
-            this.OutBoxLength.Name = "OutBoxLength";
-            this.OutBoxLength.Power = null;
-            this.OutBoxLength.Size = new System.Drawing.Size(38, 23);
-            this.OutBoxLength.Str = null;
-            this.OutBoxLength.Str1 = null;
-            this.OutBoxLength.Str2 = null;
-            this.OutBoxLength.TabIndex = 197;
-            // 
-            // StepCount
-            // 
-            this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(481, 13);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(88, 22);
-            this.StepCount.Source = null;
-            this.StepCount.StepCode = null;
-            this.StepCount.TabIndex = 201;
-            // 
-            // Packing__BigBoxCollection
+            // Packing_BigBoxCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(997, 543);
+            this.ClientSize = new System.Drawing.Size(1994, 1086);
             this.Controls.Add(this.StepCount);
             this.Controls.Add(this.PalletPreFix_label);
             this.Controls.Add(this.PalletPreFix);
@@ -663,7 +712,8 @@
             this.Controls.Add(this.pa_totalqty_label);
             this.Controls.Add(this.pa_outboxcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Name = "Packing__BigBoxCollection";
+            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Name = "Packing_BigBoxCollection";
             this.Tag = "Packing!BigBoxCollection";
             this.Text = "栈板采集";
             this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Make_BigBoxCollection_FormClosed);

+ 27 - 1
UAS_MES_LGDZ/FunctionCode/Packing/Packing_BigBoxCollection.cs

@@ -1,4 +1,5 @@
-using LabelManager2;
+using DevExpress.XtraSpellChecker;
+using LabelManager2;
 using Seagull.BarTender.Print;
 using System;
 using System.Collections.Generic;
@@ -62,6 +63,10 @@ namespace UAS_MES_NEW.Packing
         private void 栈板称重_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
+            AutoOutBoxCode.Checked = true;
+            OutBoxLength.Enabled = false;
+            OutBoxLength.Enabled = false;
+            pa_outboxcode.Enabled = false;
             thread = new Thread(NewPrint);
             SetLoadingWindow stw = new SetLoadingWindow(thread, "初始化打印程序");
             BaseUtil.SetFormCenter(stw);
@@ -640,5 +645,26 @@ namespace UAS_MES_NEW.Packing
             }
             return true;
         }
+
+        private void AutoOutBoxCode_CheckedChanged(object sender, EventArgs e)
+        {
+            if (AutoOutBoxCode.Checked)
+            {
+                OutBoxLength.Enabled = false;
+                OutBoxLength.Enabled = false;
+                pa_outboxcode.Enabled = false;
+            }
+            else
+            {
+                OutBoxLength.Enabled = true;
+                OutBoxLength.Enabled = true;
+                pa_outboxcode.Enabled = true;
+            }
+        }
+
+        private void AutoOutBoxCode_CheckStateChanged(object sender, EventArgs e)
+        {
+
+        }
     }
 }

+ 15 - 0
UAS_MES_LGDZ/FunctionCode/Packing/Packing_BigBoxCollection.resx

@@ -323,4 +323,19 @@
   <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pd_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 45 - 1
UAS_MES_LGDZ/FunctionCode/Special/Special_CancelOQC.cs

@@ -1,6 +1,7 @@
 using DevExpress.Entity.ProjectModel;
 using DevExpress.Utils;
 using LabelManager2;
+using NPOI.SS.Formula.Functions;
 using System;
 using System.Collections.Generic;
 using System.Data;
@@ -102,6 +103,38 @@ namespace UAS_MES_NEW.Special
                 }
                 else
                 {
+                    int CheckedNum = 0;
+                    //是否已经添加到不良
+                    bool AddToReject = false;
+                    for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
+                    {
+                        if (WaitRejectList.Items[i].Checked)
+                        {
+                            AddToReject = false;
+                            for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
+                            {
+                                if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
+                                {
+                                    AddToReject = true;
+                                    OperateResult.AppendText(">>已存在" + ChoosedRejectList.Items[j].SubItems[2].Text + "不良\n", Color.Red);
+                                    break;
+                                }
+                            }
+                            //未添加则进行添加
+                            if (!AddToReject)
+                            {
+                                WaitRejectList.Items[i].Checked = false;
+                                ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
+                                WaitRejectList.Items[i].Remove();
+                                CheckedNum++;
+                            }
+                        }
+                    }
+                    if (CheckedNum == 0)
+                    {
+                        OperateResult.AppendText(">>请勾选不良代码\n", Color.Red);
+                        return;
+                    }
                     dh.ExecuteSql("update makeserial set ms_status=3,ms_nextstepcode='' ,ms_iftest=-1 where ms_id=" + ms_id, "update");
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "QC抽检", "QC抽检成功,结果为不良", SN.Text, "");
                 }
@@ -188,6 +221,14 @@ namespace UAS_MES_NEW.Special
         {
             if (NG.Checked)
             {
+                DataTable dt = (DataTable)dh.ExecuteSql("select ms_sncode,ms_makecode,ms_id,ma_prodcode,pr_detail from makeserial left join make on ms_makecode=ma_code left join product on pr_code=ma_prodcode where ms_sncode='" + SN.Text + "' or  ms_imei1='" + SN.Text + "' or ms_imei2='" + SN.Text + "' order by ms_id desc", "select");
+                if (dt.Rows.Count == 0)
+                {
+                    OperateResult.AppendText("序列号" + SN.Text + "不存在", System.Drawing.Color.Red);
+                    return;
+                }
+                BaseUtil.SetFormValue(this.Controls, dt);
+                string ms_id = dt.Rows[0]["ms_id"].ToString();
                 int RejectCount = ChoosedRejectList.Items.Count;
                 string[] bccode = new string[RejectCount];
                 string[] bcremark = new string[RejectCount];
@@ -222,11 +263,14 @@ namespace UAS_MES_NEW.Special
                 sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_status,mb_badremark,mb_bgname,mb_badname,mb_type)");
                 sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + User.UserCode + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bc_code,:bg_code,'',");
                 sql.Append("'0',:bc_remark,:bg_name,:bc_name,'Client' from make left join makeSerial on ms_makecode=ma_code  ");
-                sql.Append(" where ms_sncode='" + SN.Text + "' and ms_makecode='" + ms_makecode.Text + "'");
+                sql.Append(" where ms_sncode='" + SN.Text + "' or ms_imei1='" + SN.Text + "' or ms_imei2='" + SN.Text + "' and ms_makecode='" + ms_makecode.Text + "'");
                 if (bgcode.Length > 0)
                 {
                     dh.BatchInsert(sql.GetString(), new string[] { "bc_code", "bg_code", "bc_remark", "bg_name", "bc_name" }, bccode, bgcode, bcremark, bgname, bcname);
                 }
+                dh.ExecuteSql("update makeserial set ms_status=3,ms_nextstepcode='' ,ms_iftest=-1 where ms_id=" + ms_id, "update");
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "QC抽检", "QC抽检成功,结果为不良", SN.Text, "");
+                OperateResult.AppendText("序列号" + SN.Text + "抽检记录成功", System.Drawing.Color.Green);
             }
         }
     }