Browse Source

出货单明细范围锁定,中盒合并规则设定

章政 7 years ago
parent
commit
356c2c19c3

+ 124 - 127
UAS-出货标签管理(吉利通)/UAS_出货标签管理.Designer.cs

@@ -87,6 +87,8 @@
             this.cu_print_regexpression = new System.Windows.Forms.Label();
             this.FrontCollect = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.CollectionProcess = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.DetailRange2 = new System.Windows.Forms.NumericUpDown();
+            this.DetailRange1 = new System.Windows.Forms.NumericUpDown();
             this.label26 = new System.Windows.Forms.Label();
             this.label17 = new System.Windows.Forms.Label();
             this.label25 = new System.Windows.Forms.Label();
@@ -97,10 +99,10 @@
             this.button5 = new System.Windows.Forms.Button();
             this.enterTextBox4 = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.enterTextBox3 = new UAS_LabelMachine.CustomControl.EnterTextBox();
-            this.button4 = new System.Windows.Forms.Button();
-            this.button3 = new System.Windows.Forms.Button();
-            this.button2 = new System.Windows.Forms.Button();
-            this.button1 = new System.Windows.Forms.Button();
+            this.ButtonSetMidBox = new System.Windows.Forms.Button();
+            this.ButtonSetOutBox = new System.Windows.Forms.Button();
+            this.ButtonRecheckPass = new System.Windows.Forms.Button();
+            this.ButtonCollectPass = new System.Windows.Forms.Button();
             this.checkBox2 = new System.Windows.Forms.CheckBox();
             this.radioButton7 = new System.Windows.Forms.RadioButton();
             this.label23 = new System.Windows.Forms.Label();
@@ -109,10 +111,8 @@
             this.label22 = new System.Windows.Forms.Label();
             this.radioButton4 = new System.Windows.Forms.RadioButton();
             this.radioButton3 = new System.Windows.Forms.RadioButton();
-            this.checkBox1 = new System.Windows.Forms.CheckBox();
+            this.DetailRange = new System.Windows.Forms.CheckBox();
             this.label21 = new System.Windows.Forms.Label();
-            this.enterTextBox1 = new UAS_LabelMachine.CustomControl.EnterTextBox();
-            this.enterTextBox2 = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.radioButton1 = new System.Windows.Forms.RadioButton();
             this.radioButton2 = new System.Windows.Forms.RadioButton();
             this.Process_midboxcode = new System.Windows.Forms.Label();
@@ -172,7 +172,7 @@
             this.Equal = new System.Windows.Forms.RadioButton();
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
-            this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
+            this.LeastPrintNum = new System.Windows.Forms.NumericUpDown();
             this.OnlyPrint = new System.Windows.Forms.CheckBox();
             this.groupBoxWithBorder2 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.cu_print_midprod = new System.Windows.Forms.CheckBox();
@@ -213,12 +213,14 @@
             this.FrontendCheck = new UAS_LabelMachine.CustomControl.SerialPortWithTag();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             this.CollectionProcess.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.DetailRange2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.DetailRange1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).BeginInit();
             this.SingleLabel.SuspendLayout();
             this.groupBoxWithBorder4.SuspendLayout();
             this.MidLabel.SuspendLayout();
             this.groupBoxWithBorder5.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.LeastPrintNum)).BeginInit();
             this.groupBoxWithBorder2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.MidBoxCapacity)).BeginInit();
             this.OutBoxLabel.SuspendLayout();
@@ -733,6 +735,8 @@
             // 
             // CollectionProcess
             // 
+            this.CollectionProcess.Controls.Add(this.DetailRange2);
+            this.CollectionProcess.Controls.Add(this.DetailRange1);
             this.CollectionProcess.Controls.Add(this.label26);
             this.CollectionProcess.Controls.Add(this.label17);
             this.CollectionProcess.Controls.Add(this.label25);
@@ -743,10 +747,10 @@
             this.CollectionProcess.Controls.Add(this.button5);
             this.CollectionProcess.Controls.Add(this.enterTextBox4);
             this.CollectionProcess.Controls.Add(this.enterTextBox3);
-            this.CollectionProcess.Controls.Add(this.button4);
-            this.CollectionProcess.Controls.Add(this.button3);
-            this.CollectionProcess.Controls.Add(this.button2);
-            this.CollectionProcess.Controls.Add(this.button1);
+            this.CollectionProcess.Controls.Add(this.ButtonSetMidBox);
+            this.CollectionProcess.Controls.Add(this.ButtonSetOutBox);
+            this.CollectionProcess.Controls.Add(this.ButtonRecheckPass);
+            this.CollectionProcess.Controls.Add(this.ButtonCollectPass);
             this.CollectionProcess.Controls.Add(this.checkBox2);
             this.CollectionProcess.Controls.Add(this.radioButton7);
             this.CollectionProcess.Controls.Add(this.label23);
@@ -755,10 +759,8 @@
             this.CollectionProcess.Controls.Add(this.label22);
             this.CollectionProcess.Controls.Add(this.radioButton4);
             this.CollectionProcess.Controls.Add(this.radioButton3);
-            this.CollectionProcess.Controls.Add(this.checkBox1);
+            this.CollectionProcess.Controls.Add(this.DetailRange);
             this.CollectionProcess.Controls.Add(this.label21);
-            this.CollectionProcess.Controls.Add(this.enterTextBox1);
-            this.CollectionProcess.Controls.Add(this.enterTextBox2);
             this.CollectionProcess.Controls.Add(this.radioButton1);
             this.CollectionProcess.Controls.Add(this.radioButton2);
             this.CollectionProcess.Controls.Add(this.Process_midboxcode);
@@ -777,6 +779,24 @@
             this.CollectionProcess.TabStop = false;
             this.CollectionProcess.Text = " 操作状态";
             // 
+            // DetailRange2
+            // 
+            this.DetailRange2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.DetailRange2.Location = new System.Drawing.Point(224, 213);
+            this.DetailRange2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.DetailRange2.Name = "DetailRange2";
+            this.DetailRange2.Size = new System.Drawing.Size(47, 23);
+            this.DetailRange2.TabIndex = 99;
+            // 
+            // DetailRange1
+            // 
+            this.DetailRange1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.DetailRange1.Location = new System.Drawing.Point(153, 212);
+            this.DetailRange1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.DetailRange1.Name = "DetailRange1";
+            this.DetailRange1.Size = new System.Drawing.Size(47, 23);
+            this.DetailRange1.TabIndex = 100;
+            // 
             // label26
             // 
             this.label26.AutoSize = true;
@@ -889,49 +909,49 @@
             this.enterTextBox3.Str2 = null;
             this.enterTextBox3.TabIndex = 105;
             // 
-            // button4
-            // 
-            this.button4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button4.Location = new System.Drawing.Point(186, 115);
-            this.button4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button4.Name = "button4";
-            this.button4.Size = new System.Drawing.Size(76, 26);
-            this.button4.TabIndex = 104;
-            this.button4.Text = "设置中盒号";
-            this.button4.UseVisualStyleBackColor = true;
-            // 
-            // button3
-            // 
-            this.button3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button3.Location = new System.Drawing.Point(186, 145);
-            this.button3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button3.Name = "button3";
-            this.button3.Size = new System.Drawing.Size(76, 26);
-            this.button3.TabIndex = 103;
-            this.button3.Text = "设置外箱号";
-            this.button3.UseVisualStyleBackColor = true;
-            // 
-            // button2
-            // 
-            this.button2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button2.Location = new System.Drawing.Point(118, 145);
-            this.button2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button2.Name = "button2";
-            this.button2.Size = new System.Drawing.Size(65, 26);
-            this.button2.TabIndex = 102;
-            this.button2.Text = "复核通过";
-            this.button2.UseVisualStyleBackColor = true;
-            // 
-            // button1
-            // 
-            this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button1.Location = new System.Drawing.Point(118, 114);
-            this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(65, 26);
-            this.button1.TabIndex = 101;
-            this.button1.Text = "采集通过";
-            this.button1.UseVisualStyleBackColor = true;
+            // ButtonSetMidBox
+            // 
+            this.ButtonSetMidBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ButtonSetMidBox.Location = new System.Drawing.Point(186, 115);
+            this.ButtonSetMidBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ButtonSetMidBox.Name = "ButtonSetMidBox";
+            this.ButtonSetMidBox.Size = new System.Drawing.Size(76, 26);
+            this.ButtonSetMidBox.TabIndex = 104;
+            this.ButtonSetMidBox.Text = "设置中盒号";
+            this.ButtonSetMidBox.UseVisualStyleBackColor = true;
+            // 
+            // ButtonSetOutBox
+            // 
+            this.ButtonSetOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ButtonSetOutBox.Location = new System.Drawing.Point(186, 145);
+            this.ButtonSetOutBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ButtonSetOutBox.Name = "ButtonSetOutBox";
+            this.ButtonSetOutBox.Size = new System.Drawing.Size(76, 26);
+            this.ButtonSetOutBox.TabIndex = 103;
+            this.ButtonSetOutBox.Text = "设置外箱号";
+            this.ButtonSetOutBox.UseVisualStyleBackColor = true;
+            // 
+            // ButtonRecheckPass
+            // 
+            this.ButtonRecheckPass.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ButtonRecheckPass.Location = new System.Drawing.Point(118, 145);
+            this.ButtonRecheckPass.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ButtonRecheckPass.Name = "ButtonRecheckPass";
+            this.ButtonRecheckPass.Size = new System.Drawing.Size(65, 26);
+            this.ButtonRecheckPass.TabIndex = 102;
+            this.ButtonRecheckPass.Text = "复核通过";
+            this.ButtonRecheckPass.UseVisualStyleBackColor = true;
+            // 
+            // ButtonCollectPass
+            // 
+            this.ButtonCollectPass.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ButtonCollectPass.Location = new System.Drawing.Point(118, 114);
+            this.ButtonCollectPass.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ButtonCollectPass.Name = "ButtonCollectPass";
+            this.ButtonCollectPass.Size = new System.Drawing.Size(65, 26);
+            this.ButtonCollectPass.TabIndex = 101;
+            this.ButtonCollectPass.Text = "采集通过";
+            this.ButtonCollectPass.UseVisualStyleBackColor = true;
             // 
             // checkBox2
             // 
@@ -1025,54 +1045,29 @@
             this.radioButton3.Text = "客户料号+型号";
             this.radioButton3.UseVisualStyleBackColor = true;
             // 
-            // checkBox1
+            // DetailRange
             // 
-            this.checkBox1.AutoSize = true;
-            this.checkBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.checkBox1.Location = new System.Drawing.Point(9, 214);
-            this.checkBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.checkBox1.Name = "checkBox1";
-            this.checkBox1.Size = new System.Drawing.Size(138, 21);
-            this.checkBox1.TabIndex = 92;
-            this.checkBox1.Text = "仅处理:出库明细范围";
-            this.checkBox1.UseVisualStyleBackColor = true;
+            this.DetailRange.AutoSize = true;
+            this.DetailRange.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.DetailRange.Location = new System.Drawing.Point(9, 214);
+            this.DetailRange.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.DetailRange.Name = "DetailRange";
+            this.DetailRange.Size = new System.Drawing.Size(138, 21);
+            this.DetailRange.TabIndex = 92;
+            this.DetailRange.Text = "仅处理:出库明细范围";
+            this.DetailRange.UseVisualStyleBackColor = true;
+            this.DetailRange.CheckedChanged += new System.EventHandler(this.DetailRange_CheckedChanged);
             // 
             // label21
             // 
             this.label21.AutoSize = true;
             this.label21.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label21.Location = new System.Drawing.Point(207, 216);
+            this.label21.Location = new System.Drawing.Point(205, 216);
             this.label21.Name = "label21";
             this.label21.Size = new System.Drawing.Size(13, 17);
             this.label21.TabIndex = 90;
             this.label21.Text = "-";
             // 
-            // enterTextBox1
-            // 
-            this.enterTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.enterTextBox1.ID = null;
-            this.enterTextBox1.Location = new System.Drawing.Point(226, 213);
-            this.enterTextBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.enterTextBox1.Name = "enterTextBox1";
-            this.enterTextBox1.Size = new System.Drawing.Size(50, 23);
-            this.enterTextBox1.Str = null;
-            this.enterTextBox1.Str1 = null;
-            this.enterTextBox1.Str2 = null;
-            this.enterTextBox1.TabIndex = 89;
-            // 
-            // enterTextBox2
-            // 
-            this.enterTextBox2.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.enterTextBox2.ID = null;
-            this.enterTextBox2.Location = new System.Drawing.Point(151, 213);
-            this.enterTextBox2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.enterTextBox2.Name = "enterTextBox2";
-            this.enterTextBox2.Size = new System.Drawing.Size(50, 23);
-            this.enterTextBox2.Str = null;
-            this.enterTextBox2.Str1 = null;
-            this.enterTextBox2.Str2 = null;
-            this.enterTextBox2.TabIndex = 88;
-            // 
             // radioButton1
             // 
             this.radioButton1.AutoSize = true;
@@ -1486,7 +1481,7 @@
             this.groupBoxWithBorder4.Controls.Add(this.label19);
             this.groupBoxWithBorder4.Controls.Add(this.FrontCombo);
             this.groupBoxWithBorder4.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.groupBoxWithBorder4.Location = new System.Drawing.Point(10, 186);
+            this.groupBoxWithBorder4.Location = new System.Drawing.Point(7, 186);
             this.groupBoxWithBorder4.Name = "groupBoxWithBorder4";
             this.groupBoxWithBorder4.Size = new System.Drawing.Size(165, 78);
             this.groupBoxWithBorder4.TabIndex = 41;
@@ -1537,7 +1532,7 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(8, 114);
+            this.label7.Location = new System.Drawing.Point(8, 117);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(56, 17);
             this.label7.TabIndex = 76;
@@ -1547,7 +1542,7 @@
             // 
             this.label16.AutoSize = true;
             this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label16.Location = new System.Drawing.Point(68, 140);
+            this.label16.Location = new System.Drawing.Point(68, 143);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(13, 17);
             this.label16.TabIndex = 87;
@@ -1566,7 +1561,7 @@
             // 
             this.SingleBoxEnd.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.SingleBoxEnd.ID = null;
-            this.SingleBoxEnd.Location = new System.Drawing.Point(87, 137);
+            this.SingleBoxEnd.Location = new System.Drawing.Point(87, 140);
             this.SingleBoxEnd.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleBoxEnd.Name = "SingleBoxEnd";
             this.SingleBoxEnd.Size = new System.Drawing.Size(50, 23);
@@ -1579,7 +1574,7 @@
             // 
             this.SingleBoxBegin.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.SingleBoxBegin.ID = null;
-            this.SingleBoxBegin.Location = new System.Drawing.Point(12, 137);
+            this.SingleBoxBegin.Location = new System.Drawing.Point(12, 140);
             this.SingleBoxBegin.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleBoxBegin.Name = "SingleBoxBegin";
             this.SingleBoxBegin.Size = new System.Drawing.Size(50, 23);
@@ -1592,7 +1587,7 @@
             // 
             this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrint.Location = new System.Drawing.Point(85, 88);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(107, 86);
             this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
             this.SingleLabelPrint.Size = new System.Drawing.Size(68, 26);
@@ -1630,7 +1625,7 @@
             this.MidLabel.Controls.Add(this.groupBoxWithBorder5);
             this.MidLabel.Controls.Add(this.label2);
             this.MidLabel.Controls.Add(this.label1);
-            this.MidLabel.Controls.Add(this.numericUpDown1);
+            this.MidLabel.Controls.Add(this.LeastPrintNum);
             this.MidLabel.Controls.Add(this.OnlyPrint);
             this.MidLabel.Controls.Add(this.groupBoxWithBorder2);
             this.MidLabel.Controls.Add(this.label18);
@@ -1696,7 +1691,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(162, 121);
+            this.label2.Location = new System.Drawing.Point(162, 122);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(32, 17);
             this.label2.TabIndex = 94;
@@ -1706,20 +1701,20 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(250, 121);
+            this.label1.Location = new System.Drawing.Point(250, 122);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(20, 17);
             this.label1.TabIndex = 93;
             this.label1.Text = "盘";
             // 
-            // numericUpDown1
+            // LeastPrintNum
             // 
-            this.numericUpDown1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.numericUpDown1.Location = new System.Drawing.Point(201, 119);
-            this.numericUpDown1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.numericUpDown1.Name = "numericUpDown1";
-            this.numericUpDown1.Size = new System.Drawing.Size(44, 23);
-            this.numericUpDown1.TabIndex = 92;
+            this.LeastPrintNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LeastPrintNum.Location = new System.Drawing.Point(201, 119);
+            this.LeastPrintNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.LeastPrintNum.Name = "LeastPrintNum";
+            this.LeastPrintNum.Size = new System.Drawing.Size(44, 23);
+            this.LeastPrintNum.TabIndex = 92;
             // 
             // OnlyPrint
             // 
@@ -1789,7 +1784,7 @@
             // 
             this.cu_print_midlotno.AutoSize = true;
             this.cu_print_midlotno.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.cu_print_midlotno.Location = new System.Drawing.Point(13, 20);
+            this.cu_print_midlotno.Location = new System.Drawing.Point(13, 21);
             this.cu_print_midlotno.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_midlotno.Name = "cu_print_midlotno";
             this.cu_print_midlotno.Size = new System.Drawing.Size(63, 21);
@@ -1801,7 +1796,7 @@
             // 
             this.label18.AutoSize = true;
             this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label18.Location = new System.Drawing.Point(66, 138);
+            this.label18.Location = new System.Drawing.Point(66, 143);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(13, 17);
             this.label18.TabIndex = 90;
@@ -1824,7 +1819,7 @@
             // 
             this.MidBoxEnd.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.MidBoxEnd.ID = null;
-            this.MidBoxEnd.Location = new System.Drawing.Point(85, 135);
+            this.MidBoxEnd.Location = new System.Drawing.Point(85, 140);
             this.MidBoxEnd.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidBoxEnd.Name = "MidBoxEnd";
             this.MidBoxEnd.Size = new System.Drawing.Size(50, 23);
@@ -1837,7 +1832,7 @@
             // 
             this.label12.AutoSize = true;
             this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label12.Location = new System.Drawing.Point(6, 113);
+            this.label12.Location = new System.Drawing.Point(8, 118);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(56, 17);
             this.label12.TabIndex = 77;
@@ -1857,7 +1852,7 @@
             // 
             this.MidBoxBegin.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.MidBoxBegin.ID = null;
-            this.MidBoxBegin.Location = new System.Drawing.Point(10, 135);
+            this.MidBoxBegin.Location = new System.Drawing.Point(10, 140);
             this.MidBoxBegin.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidBoxBegin.Name = "MidBoxBegin";
             this.MidBoxBegin.Size = new System.Drawing.Size(50, 23);
@@ -2040,7 +2035,7 @@
             // 
             this.cu_print_outlotno.AutoSize = true;
             this.cu_print_outlotno.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.cu_print_outlotno.Location = new System.Drawing.Point(13, 20);
+            this.cu_print_outlotno.Location = new System.Drawing.Point(13, 21);
             this.cu_print_outlotno.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_outlotno.Name = "cu_print_outlotno";
             this.cu_print_outlotno.Size = new System.Drawing.Size(63, 21);
@@ -2206,6 +2201,8 @@
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).EndInit();
             this.CollectionProcess.ResumeLayout(false);
             this.CollectionProcess.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.DetailRange2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.DetailRange1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).EndInit();
             this.SingleLabel.ResumeLayout(false);
             this.SingleLabel.PerformLayout();
@@ -2215,7 +2212,7 @@
             this.MidLabel.PerformLayout();
             this.groupBoxWithBorder5.ResumeLayout(false);
             this.groupBoxWithBorder5.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.LeastPrintNum)).EndInit();
             this.groupBoxWithBorder2.ResumeLayout(false);
             this.groupBoxWithBorder2.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.MidBoxCapacity)).EndInit();
@@ -2270,7 +2267,7 @@
         private System.Windows.Forms.CheckBox cu_print_midspec;
         private System.Windows.Forms.CheckBox cu_print_midlotno;
         private System.Windows.Forms.CheckBox OnlyPrint;
-        private System.Windows.Forms.NumericUpDown numericUpDown1;
+        private System.Windows.Forms.NumericUpDown LeastPrintNum;
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Label label2;
         private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder5;
@@ -2357,10 +2354,8 @@
         private System.Windows.Forms.Label Process_midboxcode;
         private System.Windows.Forms.RadioButton radioButton2;
         private System.Windows.Forms.RadioButton radioButton1;
-        private CustomControl.EnterTextBox enterTextBox2;
-        private CustomControl.EnterTextBox enterTextBox1;
         private System.Windows.Forms.Label label21;
-        private System.Windows.Forms.CheckBox checkBox1;
+        private System.Windows.Forms.CheckBox DetailRange;
         private System.Windows.Forms.RadioButton radioButton3;
         private System.Windows.Forms.RadioButton radioButton4;
         private System.Windows.Forms.Label label22;
@@ -2369,10 +2364,10 @@
         private System.Windows.Forms.Label label23;
         private System.Windows.Forms.RadioButton radioButton7;
         private System.Windows.Forms.CheckBox checkBox2;
-        private System.Windows.Forms.Button button1;
-        private System.Windows.Forms.Button button2;
-        private System.Windows.Forms.Button button3;
-        private System.Windows.Forms.Button button4;
+        private System.Windows.Forms.Button ButtonCollectPass;
+        private System.Windows.Forms.Button ButtonRecheckPass;
+        private System.Windows.Forms.Button ButtonSetOutBox;
+        private System.Windows.Forms.Button ButtonSetMidBox;
         private CustomControl.EnterTextBox enterTextBox3;
         private CustomControl.EnterTextBox enterTextBox4;
         private System.Windows.Forms.Button button5;
@@ -2413,5 +2408,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
         private System.Windows.Forms.Label cu_print_regexpression;
+        private System.Windows.Forms.NumericUpDown DetailRange2;
+        private System.Windows.Forms.NumericUpDown DetailRange1;
     }
 }

+ 71 - 5
UAS-出货标签管理(吉利通)/UAS_出货标签管理.cs

@@ -62,10 +62,6 @@ namespace UAS_LabelMachine
         /// </summary>
         int CurrentRowIndex = 0;
         /// <summary>
-        /// 最大的出入口单号
-        /// </summary>
-        int MaxOutBoxCode = 1;
-        /// <summary>
         /// 正则表达式用于项目匹配
         /// </summary>
         Regex reg;
@@ -228,6 +224,10 @@ namespace UAS_LabelMachine
                 switch (port.Tag)
                 {
                     case "FrontendCheck":
+                        //获取当前最大的箱号
+                        string boxcode = adh.getFieldDataByCondition("prodiobarcode", "max(pib_outboxcode1)", "pib_inoutno='" + pi_inoutno.Text + "'").ToString();
+                        int outboxcode1 = int.Parse(boxcode == "" ? "1" : boxcode);
+                        //比对当前箱数量和容量
                         FrontCollect.Text = msg;
                         for (int i = 0; i < ScanGroup.Rows.Count; i++)
                         {
@@ -285,8 +285,36 @@ namespace UAS_LabelMachine
                                     }
                                     index = index + 1;
                                 }
+                                if (adh.getRowCount("prodiobarcode", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1=" + outboxcode1) >= MidBoxCapacity.Value)
+                                {
+                                    outboxcode1 = outboxcode1 + 1;
+                                }
+                                else if (CurrentRowIndex - 1 >= 0)
+                                {
+                                    if (cu_print_midlotno.Checked)
+                                    {
+                                        if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pib_lotno"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pib_lotno"].Value.ToString())
+                                            outboxcode1 = outboxcode1 + 1;
+                                    }
+                                    else if (cu_print_midpo.Checked)
+                                    {
+                                        if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pd_pocode"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pd_pocode"].Value.ToString())
+                                            outboxcode1 = outboxcode1 + 1;
+                                    }
+                                    else if (cu_print_midprod.Checked)
+                                    {
+                                        if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pd_custprodcode"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pd_custprodcode"].Value.ToString())
+                                            outboxcode1 = outboxcode1 + 1;
+                                    }
+                                    else if (cu_print_midspec.Checked)
+                                    {
+                                        if (LabelInf.Rows[CurrentRowIndex - 1].Cells["pd_custprodspec"].Value.ToString() != LabelInf.Rows[CurrentRowIndex].Cells["pd_custprodspec"].Value.ToString())
+                                            outboxcode1 = outboxcode1 + 1;
+                                    }
+                                }
+                                LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode1"].Value = outboxcode1;
                                 LabelInf.Rows[CurrentRowIndex].Cells["pib_ifpick"].Value = true;
-                                adh.ExecuteSql("update prodiobarcode set pib_lotno='" + LotNo + "',pib_datecode='" + DateCode + "',pib_ifpick=-1 where pib_id=" + pib_id, "update");
+                                adh.ExecuteSql("update prodiobarcode set pib_outboxcode1=" + outboxcode1 + ",pib_lotno='" + LotNo + "',pib_datecode='" + DateCode + "',pib_ifpick=-1 where pib_id=" + pib_id, "update");
                                 LabelInf.Refresh();
                             }
                         }
@@ -1464,5 +1492,43 @@ namespace UAS_LabelMachine
                     break;
             }
         }
+
+        private void DetailRange_CheckedChanged(object sender, EventArgs e)
+        {
+            if (DetailRange.Checked)
+            {
+                if (DetailRange1.Value > DetailRange2.Value)
+                {
+                    MessageBox.Show("请输入正确的范围");
+                    DetailRange.Checked = false;
+                    return;
+                }
+                if (DetailRange1.Value == DetailRange2.Value)
+                {
+                    if (dh.getRowCount("prodiodetail", "pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno in(" + DetailRange1.Value + ")") != 1)
+                    {
+                        MessageBox.Show("出货单" + pi_inoutno.Text + "不存在明细序号" + DetailRange1.Value);
+                        DetailRange.Checked = false;
+                        return;
+                    }
+                }
+                else
+                {
+                    if (dh.getRowCount("prodiodetail", "pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno in(" + DetailRange1.Value + "," + DetailRange2.Value + ")") != 2)
+                    {
+                        MessageBox.Show("出货单" + pi_inoutno.Text + "不存在明细序号" + DetailRange1.Value + "或" + DetailRange2.Value);
+                        DetailRange.Checked = false;
+                        return;
+                    }
+                }
+                DetailRange1.Enabled = false;
+                DetailRange2.Enabled = false;
+            }
+            else
+            {
+                DetailRange1.Enabled = true;
+                DetailRange2.Enabled = true;
+            }
+        }
     }
 }