Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

Hcsy 7 years ago
parent
commit
b9298c31ac

+ 4 - 4
UAS-出货标签管理(吉利通)/PublicMethod/DataHelper.cs

@@ -957,12 +957,12 @@ namespace UAS_LabelMachine
                 if (names[0][i - 1].ToString().ToUpper().Contains("DATE"))
                 {
                     DateTime[] time = new DateTime[names[i].Length];
-                    for (int j = 0; j < names[i].Length; j++)
-                    {
-                        time[j] = Convert.ToDateTime(names[i][j]);
-                    }
                     try
                     {
+                        for (int j = 0; j < names[i].Length; j++)
+                        {
+                            time[j] = Convert.ToDateTime(names[i][j]);
+                        }
                         command.Parameters.Add(new OracleParameter(names[0][i - 1].ToString(), OracleDbType.Date, time, ParameterDirection.Input));
                     }
                     catch (Exception)

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

@@ -89,34 +89,36 @@
             this.front_sg_separator = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.FrontCollect = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.CollectionProcess = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.radioButton7 = new System.Windows.Forms.RadioButton();
+            this.radioButton6 = new System.Windows.Forms.RadioButton();
+            this.radioButton5 = new System.Windows.Forms.RadioButton();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.ManualCollection = new System.Windows.Forms.RadioButton();
+            this.AutoCollection = new System.Windows.Forms.RadioButton();
             this.DetailRange2 = new System.Windows.Forms.NumericUpDown();
             this.DetailRange1 = new System.Windows.Forms.NumericUpDown();
             this.outboxProcess = new System.Windows.Forms.Label();
             this.midboxProcess = new System.Windows.Forms.Label();
             this.label25 = new System.Windows.Forms.Label();
             this.label24 = new System.Windows.Forms.Label();
-            this.button8 = new System.Windows.Forms.Button();
-            this.button7 = new System.Windows.Forms.Button();
-            this.button6 = new System.Windows.Forms.Button();
-            this.button5 = new System.Windows.Forms.Button();
-            this.enterTextBox4 = new UAS_LabelMachine.CustomControl.EnterTextBox();
-            this.enterTextBox3 = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.AddOutBox = new System.Windows.Forms.Button();
+            this.CutOutBox = new System.Windows.Forms.Button();
+            this.CutMidBox = new System.Windows.Forms.Button();
+            this.AddMidBox = new System.Windows.Forms.Button();
+            this.SetOutBox = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.SetMidBox = new UAS_LabelMachine.CustomControl.EnterTextBox();
             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();
-            this.radioButton5 = new System.Windows.Forms.RadioButton();
-            this.radioButton6 = new System.Windows.Forms.RadioButton();
             this.label22 = new System.Windows.Forms.Label();
             this.RecheckBarcode = new System.Windows.Forms.RadioButton();
             this.RecheckCuprodcode = new System.Windows.Forms.RadioButton();
             this.DetailRange = new System.Windows.Forms.CheckBox();
             this.label21 = new System.Windows.Forms.Label();
-            this.ManualCollection = new System.Windows.Forms.RadioButton();
-            this.AutoCollection = new System.Windows.Forms.RadioButton();
             this.Process_midboxcode = new System.Windows.Forms.Label();
             this.Process_outboxcode = new System.Windows.Forms.Label();
             this.CollectedCount = new System.Windows.Forms.Label();
@@ -207,7 +209,7 @@
             this.label10 = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
             this.OutBoxPrinter = new UAS_LabelMachine.CustomControl.PrinterCombox();
-            this.OutboxCapacity = new System.Windows.Forms.NumericUpDown();
+            this.OutBoxCapacity = new System.Windows.Forms.NumericUpDown();
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
@@ -215,6 +217,8 @@
             this.FrontendCheck = new UAS_LabelMachine.CustomControl.SerialPortWithTag();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             this.CollectionProcess.SuspendLayout();
+            this.groupBox2.SuspendLayout();
+            this.groupBox1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.DetailRange2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.DetailRange1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).BeginInit();
@@ -228,7 +232,7 @@
             this.OutBoxLabel.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.cu_print_papercount)).BeginInit();
             this.groupBoxWithBorder3.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.OutboxCapacity)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.OutBoxCapacity)).BeginInit();
             this.SuspendLayout();
             // 
             // ExportData
@@ -764,34 +768,31 @@
             // 
             // CollectionProcess
             // 
+            this.CollectionProcess.Controls.Add(this.groupBox2);
+            this.CollectionProcess.Controls.Add(this.groupBox1);
             this.CollectionProcess.Controls.Add(this.DetailRange2);
             this.CollectionProcess.Controls.Add(this.DetailRange1);
             this.CollectionProcess.Controls.Add(this.outboxProcess);
             this.CollectionProcess.Controls.Add(this.midboxProcess);
             this.CollectionProcess.Controls.Add(this.label25);
             this.CollectionProcess.Controls.Add(this.label24);
-            this.CollectionProcess.Controls.Add(this.button8);
-            this.CollectionProcess.Controls.Add(this.button7);
-            this.CollectionProcess.Controls.Add(this.button6);
-            this.CollectionProcess.Controls.Add(this.button5);
-            this.CollectionProcess.Controls.Add(this.enterTextBox4);
-            this.CollectionProcess.Controls.Add(this.enterTextBox3);
+            this.CollectionProcess.Controls.Add(this.AddOutBox);
+            this.CollectionProcess.Controls.Add(this.CutOutBox);
+            this.CollectionProcess.Controls.Add(this.CutMidBox);
+            this.CollectionProcess.Controls.Add(this.AddMidBox);
+            this.CollectionProcess.Controls.Add(this.SetOutBox);
+            this.CollectionProcess.Controls.Add(this.SetMidBox);
             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);
-            this.CollectionProcess.Controls.Add(this.radioButton5);
-            this.CollectionProcess.Controls.Add(this.radioButton6);
             this.CollectionProcess.Controls.Add(this.label22);
             this.CollectionProcess.Controls.Add(this.RecheckBarcode);
             this.CollectionProcess.Controls.Add(this.RecheckCuprodcode);
             this.CollectionProcess.Controls.Add(this.DetailRange);
             this.CollectionProcess.Controls.Add(this.label21);
-            this.CollectionProcess.Controls.Add(this.ManualCollection);
-            this.CollectionProcess.Controls.Add(this.AutoCollection);
             this.CollectionProcess.Controls.Add(this.Process_midboxcode);
             this.CollectionProcess.Controls.Add(this.Process_outboxcode);
             this.CollectionProcess.Controls.Add(this.CollectedCount);
@@ -808,6 +809,90 @@
             this.CollectionProcess.TabStop = false;
             this.CollectionProcess.Text = " 操作状态";
             // 
+            // groupBox2
+            // 
+            this.groupBox2.Controls.Add(this.radioButton7);
+            this.groupBox2.Controls.Add(this.radioButton6);
+            this.groupBox2.Controls.Add(this.radioButton5);
+            this.groupBox2.Location = new System.Drawing.Point(77, 177);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size(215, 22);
+            this.groupBox2.TabIndex = 97;
+            this.groupBox2.TabStop = false;
+            // 
+            // radioButton7
+            // 
+            this.radioButton7.AutoSize = true;
+            this.radioButton7.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton7.Location = new System.Drawing.Point(161, 3);
+            this.radioButton7.Name = "radioButton7";
+            this.radioButton7.Size = new System.Drawing.Size(50, 21);
+            this.radioButton7.TabIndex = 99;
+            this.radioButton7.TabStop = true;
+            this.radioButton7.Text = "自动";
+            this.radioButton7.UseVisualStyleBackColor = true;
+            // 
+            // radioButton6
+            // 
+            this.radioButton6.AutoSize = true;
+            this.radioButton6.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton6.Location = new System.Drawing.Point(4, 3);
+            this.radioButton6.Name = "radioButton6";
+            this.radioButton6.Size = new System.Drawing.Size(74, 21);
+            this.radioButton6.TabIndex = 96;
+            this.radioButton6.TabStop = true;
+            this.radioButton6.Text = "前端采集";
+            this.radioButton6.UseVisualStyleBackColor = true;
+            // 
+            // radioButton5
+            // 
+            this.radioButton5.AutoSize = true;
+            this.radioButton5.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton5.Location = new System.Drawing.Point(84, 3);
+            this.radioButton5.Name = "radioButton5";
+            this.radioButton5.Size = new System.Drawing.Size(74, 21);
+            this.radioButton5.TabIndex = 97;
+            this.radioButton5.TabStop = true;
+            this.radioButton5.Text = "后端扫描";
+            this.radioButton5.UseVisualStyleBackColor = true;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add(this.ManualCollection);
+            this.groupBox1.Controls.Add(this.AutoCollection);
+            this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.groupBox1.Location = new System.Drawing.Point(5, 115);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(110, 22);
+            this.groupBox1.TabIndex = 97;
+            this.groupBox1.TabStop = false;
+            // 
+            // ManualCollection
+            // 
+            this.ManualCollection.AutoSize = true;
+            this.ManualCollection.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.ManualCollection.Location = new System.Drawing.Point(59, 3);
+            this.ManualCollection.Name = "ManualCollection";
+            this.ManualCollection.Size = new System.Drawing.Size(50, 21);
+            this.ManualCollection.TabIndex = 77;
+            this.ManualCollection.TabStop = true;
+            this.ManualCollection.Text = "手动";
+            this.ManualCollection.UseVisualStyleBackColor = true;
+            this.ManualCollection.CheckedChanged += new System.EventHandler(this.Collection_CheckedChanged);
+            // 
+            // AutoCollection
+            // 
+            this.AutoCollection.AutoSize = true;
+            this.AutoCollection.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.AutoCollection.Location = new System.Drawing.Point(5, 3);
+            this.AutoCollection.Name = "AutoCollection";
+            this.AutoCollection.Size = new System.Drawing.Size(50, 21);
+            this.AutoCollection.TabIndex = 76;
+            this.AutoCollection.TabStop = true;
+            this.AutoCollection.Text = "自动";
+            this.AutoCollection.UseVisualStyleBackColor = true;
+            this.AutoCollection.CheckedChanged += new System.EventHandler(this.Collection_CheckedChanged);
+            // 
             // DetailRange2
             // 
             this.DetailRange2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -868,75 +953,79 @@
             this.label24.TabIndex = 111;
             this.label24.Text = "进度";
             // 
-            // button8
-            // 
-            this.button8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button8.Location = new System.Drawing.Point(175, 85);
-            this.button8.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button8.Name = "button8";
-            this.button8.Size = new System.Drawing.Size(25, 25);
-            this.button8.TabIndex = 110;
-            this.button8.Text = "+";
-            this.button8.UseVisualStyleBackColor = true;
-            // 
-            // button7
-            // 
-            this.button7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button7.Location = new System.Drawing.Point(207, 85);
-            this.button7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button7.Name = "button7";
-            this.button7.Size = new System.Drawing.Size(25, 25);
-            this.button7.TabIndex = 109;
-            this.button7.Text = "-";
-            this.button7.UseVisualStyleBackColor = true;
-            // 
-            // button6
-            // 
-            this.button6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button6.Location = new System.Drawing.Point(207, 35);
-            this.button6.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button6.Name = "button6";
-            this.button6.Size = new System.Drawing.Size(25, 25);
-            this.button6.TabIndex = 108;
-            this.button6.Text = "-";
-            this.button6.UseVisualStyleBackColor = true;
-            // 
-            // button5
-            // 
-            this.button5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button5.Location = new System.Drawing.Point(175, 35);
-            this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button5.Name = "button5";
-            this.button5.Size = new System.Drawing.Size(25, 25);
-            this.button5.TabIndex = 107;
-            this.button5.Text = "+";
-            this.button5.UseVisualStyleBackColor = true;
-            // 
-            // enterTextBox4
-            // 
-            this.enterTextBox4.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.enterTextBox4.ID = null;
-            this.enterTextBox4.Location = new System.Drawing.Point(265, 146);
-            this.enterTextBox4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.enterTextBox4.Name = "enterTextBox4";
-            this.enterTextBox4.Size = new System.Drawing.Size(29, 23);
-            this.enterTextBox4.Str = null;
-            this.enterTextBox4.Str1 = null;
-            this.enterTextBox4.Str2 = null;
-            this.enterTextBox4.TabIndex = 106;
-            // 
-            // enterTextBox3
-            // 
-            this.enterTextBox3.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.enterTextBox3.ID = null;
-            this.enterTextBox3.Location = new System.Drawing.Point(265, 117);
-            this.enterTextBox3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.enterTextBox3.Name = "enterTextBox3";
-            this.enterTextBox3.Size = new System.Drawing.Size(29, 23);
-            this.enterTextBox3.Str = null;
-            this.enterTextBox3.Str1 = null;
-            this.enterTextBox3.Str2 = null;
-            this.enterTextBox3.TabIndex = 105;
+            // AddOutBox
+            // 
+            this.AddOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.AddOutBox.Location = new System.Drawing.Point(175, 85);
+            this.AddOutBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.AddOutBox.Name = "AddOutBox";
+            this.AddOutBox.Size = new System.Drawing.Size(25, 25);
+            this.AddOutBox.TabIndex = 110;
+            this.AddOutBox.Text = "+";
+            this.AddOutBox.UseVisualStyleBackColor = true;
+            this.AddOutBox.Click += new System.EventHandler(this.AddCutBox_Click);
+            // 
+            // CutOutBox
+            // 
+            this.CutOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CutOutBox.Location = new System.Drawing.Point(207, 85);
+            this.CutOutBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.CutOutBox.Name = "CutOutBox";
+            this.CutOutBox.Size = new System.Drawing.Size(25, 25);
+            this.CutOutBox.TabIndex = 109;
+            this.CutOutBox.Text = "-";
+            this.CutOutBox.UseVisualStyleBackColor = true;
+            this.CutOutBox.Click += new System.EventHandler(this.AddCutBox_Click);
+            // 
+            // CutMidBox
+            // 
+            this.CutMidBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CutMidBox.Location = new System.Drawing.Point(207, 35);
+            this.CutMidBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.CutMidBox.Name = "CutMidBox";
+            this.CutMidBox.Size = new System.Drawing.Size(25, 25);
+            this.CutMidBox.TabIndex = 108;
+            this.CutMidBox.Text = "-";
+            this.CutMidBox.UseVisualStyleBackColor = true;
+            this.CutMidBox.Click += new System.EventHandler(this.AddCutBox_Click);
+            // 
+            // AddMidBox
+            // 
+            this.AddMidBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.AddMidBox.Location = new System.Drawing.Point(175, 35);
+            this.AddMidBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.AddMidBox.Name = "AddMidBox";
+            this.AddMidBox.Size = new System.Drawing.Size(25, 25);
+            this.AddMidBox.TabIndex = 107;
+            this.AddMidBox.Text = "+";
+            this.AddMidBox.UseVisualStyleBackColor = true;
+            this.AddMidBox.Click += new System.EventHandler(this.AddCutBox_Click);
+            // 
+            // SetOutBox
+            // 
+            this.SetOutBox.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.SetOutBox.ID = null;
+            this.SetOutBox.Location = new System.Drawing.Point(265, 146);
+            this.SetOutBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.SetOutBox.Name = "SetOutBox";
+            this.SetOutBox.Size = new System.Drawing.Size(29, 23);
+            this.SetOutBox.Str = null;
+            this.SetOutBox.Str1 = null;
+            this.SetOutBox.Str2 = null;
+            this.SetOutBox.TabIndex = 106;
+            // 
+            // SetMidBox
+            // 
+            this.SetMidBox.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.SetMidBox.ID = null;
+            this.SetMidBox.Location = new System.Drawing.Point(265, 117);
+            this.SetMidBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.SetMidBox.Name = "SetMidBox";
+            this.SetMidBox.Size = new System.Drawing.Size(29, 23);
+            this.SetMidBox.Str = null;
+            this.SetMidBox.Str1 = null;
+            this.SetMidBox.Str2 = null;
+            this.SetMidBox.TabIndex = 105;
             // 
             // ButtonSetMidBox
             // 
@@ -948,6 +1037,7 @@
             this.ButtonSetMidBox.TabIndex = 104;
             this.ButtonSetMidBox.Text = "设置中盒号";
             this.ButtonSetMidBox.UseVisualStyleBackColor = true;
+            this.ButtonSetMidBox.Click += new System.EventHandler(this.ButtonSetMidBox_Click);
             // 
             // ButtonSetOutBox
             // 
@@ -959,6 +1049,7 @@
             this.ButtonSetOutBox.TabIndex = 103;
             this.ButtonSetOutBox.Text = "设置外箱号";
             this.ButtonSetOutBox.UseVisualStyleBackColor = true;
+            this.ButtonSetOutBox.Click += new System.EventHandler(this.ButtonSetOutBox_Click);
             // 
             // ButtonRecheckPass
             // 
@@ -970,6 +1061,7 @@
             this.ButtonRecheckPass.TabIndex = 102;
             this.ButtonRecheckPass.Text = "复核通过";
             this.ButtonRecheckPass.UseVisualStyleBackColor = true;
+            this.ButtonRecheckPass.Click += new System.EventHandler(this.ButtonRecheckPass_Click);
             // 
             // ButtonCollectPass
             // 
@@ -981,6 +1073,7 @@
             this.ButtonCollectPass.TabIndex = 101;
             this.ButtonCollectPass.Text = "采集通过";
             this.ButtonCollectPass.UseVisualStyleBackColor = true;
+            this.ButtonCollectPass.Click += new System.EventHandler(this.ButtonCollectPass_Click);
             // 
             // checkBox2
             // 
@@ -994,18 +1087,6 @@
             this.checkBox2.Text = "半自动模式";
             this.checkBox2.UseVisualStyleBackColor = true;
             // 
-            // radioButton7
-            // 
-            this.radioButton7.AutoSize = true;
-            this.radioButton7.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.radioButton7.Location = new System.Drawing.Point(235, 180);
-            this.radioButton7.Name = "radioButton7";
-            this.radioButton7.Size = new System.Drawing.Size(50, 21);
-            this.radioButton7.TabIndex = 99;
-            this.radioButton7.TabStop = true;
-            this.radioButton7.Text = "自动";
-            this.radioButton7.UseVisualStyleBackColor = true;
-            // 
             // label23
             // 
             this.label23.AutoSize = true;
@@ -1016,30 +1097,6 @@
             this.label23.TabIndex = 98;
             this.label23.Text = "手持扫描枪";
             // 
-            // radioButton5
-            // 
-            this.radioButton5.AutoSize = true;
-            this.radioButton5.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.radioButton5.Location = new System.Drawing.Point(158, 180);
-            this.radioButton5.Name = "radioButton5";
-            this.radioButton5.Size = new System.Drawing.Size(74, 21);
-            this.radioButton5.TabIndex = 97;
-            this.radioButton5.TabStop = true;
-            this.radioButton5.Text = "后端扫描";
-            this.radioButton5.UseVisualStyleBackColor = true;
-            // 
-            // radioButton6
-            // 
-            this.radioButton6.AutoSize = true;
-            this.radioButton6.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.radioButton6.Location = new System.Drawing.Point(78, 180);
-            this.radioButton6.Name = "radioButton6";
-            this.radioButton6.Size = new System.Drawing.Size(74, 21);
-            this.radioButton6.TabIndex = 96;
-            this.radioButton6.TabStop = true;
-            this.radioButton6.Text = "前端采集";
-            this.radioButton6.UseVisualStyleBackColor = true;
-            // 
             // label22
             // 
             this.label22.AutoSize = true;
@@ -1097,30 +1154,6 @@
             this.label21.TabIndex = 90;
             this.label21.Text = "-";
             // 
-            // ManualCollection
-            // 
-            this.ManualCollection.AutoSize = true;
-            this.ManualCollection.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.ManualCollection.Location = new System.Drawing.Point(64, 116);
-            this.ManualCollection.Name = "ManualCollection";
-            this.ManualCollection.Size = new System.Drawing.Size(50, 21);
-            this.ManualCollection.TabIndex = 77;
-            this.ManualCollection.TabStop = true;
-            this.ManualCollection.Text = "手动";
-            this.ManualCollection.UseVisualStyleBackColor = true;
-            // 
-            // AutoCollection
-            // 
-            this.AutoCollection.AutoSize = true;
-            this.AutoCollection.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.AutoCollection.Location = new System.Drawing.Point(8, 116);
-            this.AutoCollection.Name = "AutoCollection";
-            this.AutoCollection.Size = new System.Drawing.Size(50, 21);
-            this.AutoCollection.TabIndex = 76;
-            this.AutoCollection.TabStop = true;
-            this.AutoCollection.Text = "自动";
-            this.AutoCollection.UseVisualStyleBackColor = true;
-            // 
             // Process_midboxcode
             // 
             this.Process_midboxcode.AutoSize = true;
@@ -1975,7 +2008,7 @@
             this.OutBoxLabel.Controls.Add(this.label10);
             this.OutBoxLabel.Controls.Add(this.label6);
             this.OutBoxLabel.Controls.Add(this.OutBoxPrinter);
-            this.OutBoxLabel.Controls.Add(this.OutboxCapacity);
+            this.OutBoxLabel.Controls.Add(this.OutBoxCapacity);
             this.OutBoxLabel.Controls.Add(this.OutBoxLabelPrint);
             this.OutBoxLabel.Controls.Add(this.OutBoxLabelAutoPrint);
             this.OutBoxLabel.Controls.Add(this.OutBoxCombox);
@@ -2125,20 +2158,20 @@
             this.OutBoxPrinter.Size = new System.Drawing.Size(158, 25);
             this.OutBoxPrinter.TabIndex = 82;
             // 
-            // OutboxCapacity
+            // OutBoxCapacity
             // 
-            this.OutboxCapacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutboxCapacity.Location = new System.Drawing.Point(211, 68);
-            this.OutboxCapacity.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.OutboxCapacity.Name = "OutboxCapacity";
-            this.OutboxCapacity.Size = new System.Drawing.Size(38, 23);
-            this.OutboxCapacity.TabIndex = 84;
-            this.OutboxCapacity.Value = new decimal(new int[] {
+            this.OutBoxCapacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OutBoxCapacity.Location = new System.Drawing.Point(211, 68);
+            this.OutBoxCapacity.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.OutBoxCapacity.Name = "OutBoxCapacity";
+            this.OutBoxCapacity.Size = new System.Drawing.Size(38, 23);
+            this.OutBoxCapacity.TabIndex = 84;
+            this.OutBoxCapacity.Value = new decimal(new int[] {
             1,
             0,
             0,
             0});
-            this.OutboxCapacity.Leave += new System.EventHandler(this.MidBoxCapacity_Leave);
+            this.OutBoxCapacity.Leave += new System.EventHandler(this.MidBoxCapacity_Leave);
             // 
             // OutBoxLabelPrint
             // 
@@ -2232,6 +2265,10 @@
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).EndInit();
             this.CollectionProcess.ResumeLayout(false);
             this.CollectionProcess.PerformLayout();
+            this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.DetailRange2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.DetailRange1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).EndInit();
@@ -2252,7 +2289,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.cu_print_papercount)).EndInit();
             this.groupBoxWithBorder3.ResumeLayout(false);
             this.groupBoxWithBorder3.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.OutboxCapacity)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.OutBoxCapacity)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -2265,7 +2302,7 @@
         private System.Windows.Forms.ComboBox OutBoxCombox;
         private System.Windows.Forms.CheckBox OutBoxLabelAutoPrint;
         private System.Windows.Forms.Button OutBoxLabelPrint;
-        private System.Windows.Forms.NumericUpDown OutboxCapacity;
+        private System.Windows.Forms.NumericUpDown OutBoxCapacity;
         private CustomControl.PrinterCombox OutBoxPrinter;
         private System.Windows.Forms.Label label6;
         private System.Windows.Forms.Label label10;
@@ -2399,12 +2436,12 @@
         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;
-        private System.Windows.Forms.Button button6;
-        private System.Windows.Forms.Button button7;
-        private System.Windows.Forms.Button button8;
+        private CustomControl.EnterTextBox SetMidBox;
+        private CustomControl.EnterTextBox SetOutBox;
+        private System.Windows.Forms.Button AddMidBox;
+        private System.Windows.Forms.Button CutMidBox;
+        private System.Windows.Forms.Button CutOutBox;
+        private System.Windows.Forms.Button AddOutBox;
         private System.Windows.Forms.Label label24;
         private System.Windows.Forms.Label label25;
         private System.Windows.Forms.Label midboxProcess;
@@ -2443,5 +2480,7 @@
         private System.Windows.Forms.NumericUpDown DetailRange1;
         private CustomControl.EnterTextBox front_sg_separator;
         private System.Windows.Forms.Label label13;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.GroupBox groupBox2;
     }
 }

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

@@ -160,6 +160,7 @@ namespace UAS_LabelMachine
             {
                 dgv.SortMode = DataGridViewColumnSortMode.NotSortable;
             }
+            AutoCollection.Checked = true;
             int ScreenWidth = Screen.GetWorkingArea(pt).Width;
             //设置获取当前屏幕大小自动全屏但是保留任务栏
             Rectangle ScreenArea = Screen.GetWorkingArea(this);
@@ -168,7 +169,7 @@ namespace UAS_LabelMachine
             Width = ScreenArea.Width;
             Height = ScreenArea.Height;
             MidBoxCapacity.Value = Properties.Settings.Default.MidBoxCapacity;
-            OutboxCapacity.Value = Properties.Settings.Default.OutboxCapacity;
+            OutBoxCapacity.Value = Properties.Settings.Default.OutboxCapacity;
             asc.controllInitializeSize(this);
             asc.controlAutoSize(this);
             //实例化打印进程
@@ -204,6 +205,12 @@ namespace UAS_LabelMachine
             }
         }
 
+        string LotNo = "";
+        string DateCode = "";
+        string Order = "";
+        string QTY = "";
+        string PN = "";
+        string OutBox = "";
         //获取串口数据
         private void Serial_DataReceived(object sender, SerialDataReceivedEventArgs e)
         {
@@ -214,12 +221,6 @@ namespace UAS_LabelMachine
                 byte[] readBuffer = new byte[len];
                 port.Read(readBuffer, 0, len); //将数据读入缓存
                 string msg = Encoding.ASCII.GetString(readBuffer, 0, len); //获取出入库产品编号
-                string LotNo = "";
-                string DateCode = "";
-                string Order = "";
-                string QTY = "";
-                string PN = "";
-                string OutBox = "";
                 string pib_id = LabelInf.Rows[CurrentRowIndex].Cells["pib_id1"].Value.ToString();
                 switch (port.Tag)
                 {
@@ -336,10 +337,16 @@ namespace UAS_LabelMachine
                         //获取当前最大的箱号
                         string boxcode = adh.getFieldDataByCondition("prodiobarcode", "max(pib_outboxcode1)", "pib_inoutno='" + pi_inoutno.Text + "'").ToString();
                         int outboxcode1 = int.Parse(boxcode == "" ? "1" : boxcode);
+                        boxcode = adh.getFieldDataByCondition("prodiobarcode", "max(pib_outboxcode2)", "pib_inoutno='" + pi_inoutno.Text + "'").ToString();
+                        int outboxcode2 = int.Parse(boxcode == "" ? "1" : boxcode);
                         if (adh.getRowCount("prodiobarcode", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1=" + outboxcode1) >= MidBoxCapacity.Value)
                         {
                             outboxcode1 = outboxcode1 + 1;
                         }
+                        if (adh.getRowCount("prodiobarcode", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode2=" + outboxcode2) >= OutBoxCapacity.Value)
+                        {
+                            outboxcode2 = outboxcode2 + 1;
+                        }
                         else if (CurrentRowIndex - 1 >= 0)
                         {
                             if (cu_print_midlotno.Checked)
@@ -364,19 +371,21 @@ namespace UAS_LabelMachine
                             }
                         }
                         LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode1"].Value = outboxcode1;
-                        adh.ExecuteSql("update prodiobarcode set pib_outboxcode1=" + outboxcode1 + ",pib_lotno='" + LotNo + "',pib_datecode='" + DateCode + "',pib_ifpick=-1 where pib_id=" + pib_id, "update");
+                        LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode2"].Value = outboxcode2;
+                        adh.ExecuteSql("update prodiobarcode set pib_outboxcode2=" + outboxcode2 + ",pib_outboxcode1=" + outboxcode1 + ",pib_lotno='" + LotNo + "',pib_datecode='" + DateCode + "',pib_ifpick=-1 where pib_id=" + pib_id, "update");
                         LabelInf.Refresh();
                         if (CurrentRowIndex + 1 < LabelInf.Rows.Count)
                             CurrentRowIndex = CurrentRowIndex + 1;
                         RefreshProcessData();
+                        LogicHandler.CheckUploadData(pi_inoutno.Text, UploadNum);
                         break;
                     default:
                         break;
                 }
-                LogicHandler.CheckUploadData(pi_inoutno.Text, UploadNum);
             }
             catch (Exception ex)
             {
+                LogManager.DoLog(ex.StackTrace);
                 MessageBox.Show("接收返回消息异常!具体原因:" + ex.Message, "提示信息");
             }
         }
@@ -1148,7 +1157,9 @@ namespace UAS_LabelMachine
                         Count++;
                 }
                 int midboxcount = adh.getRowCount("prodiobarcode", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1=" + (midboxcode == "" ? "0" : midboxcode));
+                int outboxcount = adh.getRowCount("prodiobarcode", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode2=" + (outboxcode == "" ? "0" : outboxcode));
                 midboxProcess.Text = midboxcount + "/" + MidBoxCapacity.Value;
+                outboxProcess.Text = outboxcount + "/" + OutBoxCapacity.Value;
                 //设置当前的箱号和盒号
                 Process_midboxcode.Text = midboxcode;
                 Process_outboxcode.Text = outboxcode;
@@ -1602,5 +1613,57 @@ namespace UAS_LabelMachine
         {
 
         }
+
+        private void ButtonCollectPass_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void ButtonRecheckPass_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void ButtonSetMidBox_Click(object sender, EventArgs e)
+        {
+            Process_midboxcode.Text = SetMidBox.Text;
+        }
+
+        private void ButtonSetOutBox_Click(object sender, EventArgs e)
+        {
+            Process_outboxcode.Text = SetOutBox.Text;
+        }
+
+        private void Collection_CheckedChanged(object sender, EventArgs e)
+        {
+            ButtonCollectPass.Enabled = ManualCollection.Checked;
+            ButtonRecheckPass.Enabled = ManualCollection.Checked;
+            ButtonSetMidBox.Enabled = ManualCollection.Checked;
+            ButtonSetOutBox.Enabled = ManualCollection.Checked;
+        }
+
+        private void AddCutBox_Click(object sender, EventArgs e)
+        {
+            Button button = sender as Button;
+            switch (button.Name)
+            {
+                case "AddMidBox":
+                    Process_midboxcode.Text = (int.Parse(Process_midboxcode.Text) + 1).ToString();
+                    break;
+                case "CutMidBox":
+                    if (int.Parse(Process_midboxcode.Text) > 1)
+                        Process_midboxcode.Text = (int.Parse(Process_midboxcode.Text) - 1).ToString();
+                    break;
+                case "AddOutBox":
+                    Process_outboxcode.Text = (int.Parse(Process_outboxcode.Text) + 1).ToString();
+                    break;
+                case "CutOutBox":
+                    if (int.Parse(Process_outboxcode.Text) > 1)
+                        Process_outboxcode.Text = (int.Parse(Process_outboxcode.Text) - 1).ToString();
+                    break;
+                default:
+                    break;
+            }
+        }
     }
 }