Browse Source

后端手动复核数据更新

章政 6 years ago
parent
commit
66fd79b56a

+ 150 - 4
UAS-出货标签管理(吉利通)/CustomerRule.Designer.cs

@@ -56,8 +56,20 @@
             this.cu_print_middc = new System.Windows.Forms.CheckBox();
             this.cu_print_outdc = new System.Windows.Forms.CheckBox();
             this.cu_print_checkdatecode = new System.Windows.Forms.CheckBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.radioButton5 = new System.Windows.Forms.RadioButton();
+            this.radioButton4 = new System.Windows.Forms.RadioButton();
+            this.radioButton3 = new System.Windows.Forms.RadioButton();
+            this.radioButton2 = new System.Windows.Forms.RadioButton();
+            this.radioButton1 = new System.Windows.Forms.RadioButton();
+            this.FormatExample = new System.Windows.Forms.Label();
+            this.FormatExample1 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.cu_print_papercount)).BeginInit();
             this.groupBox1.SuspendLayout();
+            this.groupBox2.SuspendLayout();
+            this.groupBox3.SuspendLayout();
             this.SuspendLayout();
             // 
             // cu_print_midlotno
@@ -255,7 +267,7 @@
             // 
             this.Expression.AutoSize = true;
             this.Expression.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.Expression.Location = new System.Drawing.Point(301, 110);
+            this.Expression.Location = new System.Drawing.Point(24, 57);
             this.Expression.Name = "Expression";
             this.Expression.Size = new System.Drawing.Size(62, 21);
             this.Expression.TabIndex = 57;
@@ -268,7 +280,7 @@
             this.Equal.AutoSize = true;
             this.Equal.Checked = true;
             this.Equal.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.Equal.Location = new System.Drawing.Point(301, 73);
+            this.Equal.Location = new System.Drawing.Point(24, 20);
             this.Equal.Name = "Equal";
             this.Equal.Size = new System.Drawing.Size(50, 21);
             this.Equal.TabIndex = 58;
@@ -357,18 +369,138 @@
             this.cu_print_checkdatecode.Text = "校验DateCode";
             this.cu_print_checkdatecode.UseVisualStyleBackColor = true;
             // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(297, 514);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(106, 21);
+            this.label6.TabIndex = 66;
+            this.label6.Text = "日期格式示例";
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Controls.Add(this.Equal);
+            this.groupBox2.Controls.Add(this.Expression);
+            this.groupBox2.Location = new System.Drawing.Point(290, 69);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size(104, 100);
+            this.groupBox2.TabIndex = 67;
+            this.groupBox2.TabStop = false;
+            // 
+            // groupBox3
+            // 
+            this.groupBox3.Controls.Add(this.radioButton5);
+            this.groupBox3.Controls.Add(this.radioButton4);
+            this.groupBox3.Controls.Add(this.radioButton3);
+            this.groupBox3.Controls.Add(this.radioButton2);
+            this.groupBox3.Controls.Add(this.radioButton1);
+            this.groupBox3.Location = new System.Drawing.Point(290, 540);
+            this.groupBox3.Name = "groupBox3";
+            this.groupBox3.Size = new System.Drawing.Size(660, 45);
+            this.groupBox3.TabIndex = 68;
+            this.groupBox3.TabStop = false;
+            // 
+            // radioButton5
+            // 
+            this.radioButton5.AutoSize = true;
+            this.radioButton5.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton5.Location = new System.Drawing.Point(576, 15);
+            this.radioButton5.Name = "radioButton5";
+            this.radioButton5.Size = new System.Drawing.Size(62, 21);
+            this.radioButton5.TabIndex = 63;
+            this.radioButton5.TabStop = true;
+            this.radioButton5.Text = "表达式";
+            this.radioButton5.UseVisualStyleBackColor = true;
+            this.radioButton5.Visible = false;
+            // 
+            // radioButton4
+            // 
+            this.radioButton4.AutoSize = true;
+            this.radioButton4.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton4.Location = new System.Drawing.Point(147, 15);
+            this.radioButton4.Name = "radioButton4";
+            this.radioButton4.Size = new System.Drawing.Size(80, 21);
+            this.radioButton4.TabIndex = 62;
+            this.radioButton4.TabStop = true;
+            this.radioButton4.Text = "M/d/yyyy";
+            this.radioButton4.UseVisualStyleBackColor = true;
+            this.radioButton4.CheckedChanged += new System.EventHandler(this.DateFormat_CheckedChanged);
+            // 
+            // radioButton3
+            // 
+            this.radioButton3.AutoSize = true;
+            this.radioButton3.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton3.Location = new System.Drawing.Point(426, 15);
+            this.radioButton3.Name = "radioButton3";
+            this.radioButton3.Size = new System.Drawing.Size(62, 21);
+            this.radioButton3.TabIndex = 61;
+            this.radioButton3.TabStop = true;
+            this.radioButton3.Text = "表达式";
+            this.radioButton3.UseVisualStyleBackColor = true;
+            this.radioButton3.Visible = false;
+            // 
+            // radioButton2
+            // 
+            this.radioButton2.AutoSize = true;
+            this.radioButton2.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton2.Location = new System.Drawing.Point(290, 15);
+            this.radioButton2.Name = "radioButton2";
+            this.radioButton2.Size = new System.Drawing.Size(100, 21);
+            this.radioButton2.TabIndex = 60;
+            this.radioButton2.TabStop = true;
+            this.radioButton2.Text = "yyyy/MM/dd";
+            this.radioButton2.UseVisualStyleBackColor = true;
+            this.radioButton2.CheckedChanged += new System.EventHandler(this.DateFormat_CheckedChanged);
+            // 
+            // radioButton1
+            // 
+            this.radioButton1.AutoSize = true;
+            this.radioButton1.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton1.Location = new System.Drawing.Point(11, 15);
+            this.radioButton1.Name = "radioButton1";
+            this.radioButton1.Size = new System.Drawing.Size(68, 21);
+            this.radioButton1.TabIndex = 59;
+            this.radioButton1.TabStop = true;
+            this.radioButton1.Text = "M/d/yy";
+            this.radioButton1.UseVisualStyleBackColor = true;
+            this.radioButton1.CheckedChanged += new System.EventHandler(this.DateFormat_CheckedChanged);
+            // 
+            // FormatExample
+            // 
+            this.FormatExample.AutoSize = true;
+            this.FormatExample.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.FormatExample.Location = new System.Drawing.Point(406, 514);
+            this.FormatExample.Name = "FormatExample";
+            this.FormatExample.Size = new System.Drawing.Size(96, 21);
+            this.FormatExample.TabIndex = 69;
+            this.FormatExample.Text = "2019-01-30";
+            // 
+            // FormatExample1
+            // 
+            this.FormatExample1.AutoSize = true;
+            this.FormatExample1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.FormatExample1.Location = new System.Drawing.Point(527, 514);
+            this.FormatExample1.Name = "FormatExample1";
+            this.FormatExample1.Size = new System.Drawing.Size(0, 21);
+            this.FormatExample1.TabIndex = 70;
+            // 
             // CustomerRule
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1082, 634);
+            this.Controls.Add(this.FormatExample1);
+            this.Controls.Add(this.FormatExample);
+            this.Controls.Add(this.groupBox3);
+            this.Controls.Add(this.groupBox2);
+            this.Controls.Add(this.label6);
             this.Controls.Add(this.cu_print_checkdatecode);
             this.Controls.Add(this.cu_print_outdc);
             this.Controls.Add(this.cu_print_middc);
             this.Controls.Add(this.groupBox1);
             this.Controls.Add(this.label5);
-            this.Controls.Add(this.Equal);
-            this.Controls.Add(this.Expression);
             this.Controls.Add(this.cu_print_checkonly);
             this.Controls.Add(this.cu_print_papercount);
             this.Controls.Add(this.label4);
@@ -394,6 +526,10 @@
             ((System.ComponentModel.ISupportInitialize)(this.cu_print_papercount)).EndInit();
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
+            this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
+            this.groupBox3.ResumeLayout(false);
+            this.groupBox3.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -427,5 +563,15 @@
         private System.Windows.Forms.CheckBox cu_print_middc;
         private System.Windows.Forms.CheckBox cu_print_outdc;
         private System.Windows.Forms.CheckBox cu_print_checkdatecode;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.GroupBox groupBox2;
+        private System.Windows.Forms.GroupBox groupBox3;
+        private System.Windows.Forms.RadioButton radioButton5;
+        private System.Windows.Forms.RadioButton radioButton4;
+        private System.Windows.Forms.RadioButton radioButton3;
+        private System.Windows.Forms.RadioButton radioButton2;
+        private System.Windows.Forms.RadioButton radioButton1;
+        private System.Windows.Forms.Label FormatExample;
+        private System.Windows.Forms.Label FormatExample1;
     }
 }

+ 6 - 0
UAS-出货标签管理(吉利通)/CustomerRule.cs

@@ -135,5 +135,11 @@ namespace UAS_LabelMachine
             else
                 cu_print_regexpression.Enabled = true;
         }
+
+        private void DateFormat_CheckedChanged(object sender, EventArgs e)
+        {
+            Control ctl = sender as Control;
+            FormatExample1.Text = Convert.ToDateTime(FormatExample.Text).ToString(ctl.Text);
+        }
     }
 }

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

@@ -243,6 +243,7 @@
             this.BackendCheck = new UAS_LabelMachine.CustomControl.SerialPortWithTag();
             this.FrontendCheck = new UAS_LabelMachine.CustomControl.SerialPortWithTag();
             this.PLC1 = new UAS_LabelMachine.CustomControl.SerialPortWithTag();
+            this.ManBackendCheck = new UAS_LabelMachine.CustomControl.SerialPortWithTag();
             this.LogMenu.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PageSizeNum)).BeginInit();
             this.CollectionProcess.SuspendLayout();
@@ -873,6 +874,7 @@
             this.cu_print_checkonly.AutoSize = true;
             this.cu_print_checkonly.Enabled = false;
             this.cu_print_checkonly.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_checkonly.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_checkonly.Location = new System.Drawing.Point(93, 218);
             this.cu_print_checkonly.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_checkonly.Name = "cu_print_checkonly";
@@ -886,6 +888,7 @@
             this.cu_print_checkdatecode.AutoSize = true;
             this.cu_print_checkdatecode.Enabled = false;
             this.cu_print_checkdatecode.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_checkdatecode.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_checkdatecode.Location = new System.Drawing.Point(93, 250);
             this.cu_print_checkdatecode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_checkdatecode.Name = "cu_print_checkdatecode";
@@ -985,6 +988,7 @@
             this.ManualAutoCheck.TabStop = true;
             this.ManualAutoCheck.Text = "自动";
             this.ManualAutoCheck.UseVisualStyleBackColor = true;
+            this.ManualAutoCheck.CheckedChanged += new System.EventHandler(this.ManualCheck_CheckedChanged);
             // 
             // ManualFrontCheck
             // 
@@ -997,6 +1001,7 @@
             this.ManualFrontCheck.TabStop = true;
             this.ManualFrontCheck.Text = "前端采集";
             this.ManualFrontCheck.UseVisualStyleBackColor = true;
+            this.ManualFrontCheck.CheckedChanged += new System.EventHandler(this.ManualCheck_CheckedChanged);
             // 
             // ManualBackCheck
             // 
@@ -1009,6 +1014,7 @@
             this.ManualBackCheck.TabStop = true;
             this.ManualBackCheck.Text = "后端扫描";
             this.ManualBackCheck.UseVisualStyleBackColor = true;
+            this.ManualBackCheck.CheckedChanged += new System.EventHandler(this.ManualCheck_CheckedChanged);
             // 
             // groupBox1
             // 
@@ -2026,7 +2032,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(168, 104);
+            this.label2.Location = new System.Drawing.Point(168, 100);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(32, 17);
             this.label2.TabIndex = 94;
@@ -2036,7 +2042,7 @@
             // 
             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, 104);
+            this.label1.Location = new System.Drawing.Point(250, 100);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(20, 17);
             this.label1.TabIndex = 93;
@@ -2045,7 +2051,7 @@
             // LeastPrintNum
             // 
             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, 100);
+            this.LeastPrintNum.Location = new System.Drawing.Point(201, 96);
             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);
@@ -2055,7 +2061,7 @@
             // 
             this.OnlyPrint.AutoSize = true;
             this.OnlyPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OnlyPrint.Location = new System.Drawing.Point(172, 76);
+            this.OnlyPrint.Location = new System.Drawing.Point(172, 72);
             this.OnlyPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OnlyPrint.Name = "OnlyPrint";
             this.OnlyPrint.Size = new System.Drawing.Size(63, 21);
@@ -2071,11 +2077,11 @@
             this.groupBoxWithBorder2.Controls.Add(this.cu_print_midspec);
             this.groupBoxWithBorder2.Controls.Add(this.cu_print_midlotno);
             this.groupBoxWithBorder2.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.groupBoxWithBorder2.Location = new System.Drawing.Point(172, 126);
+            this.groupBoxWithBorder2.Location = new System.Drawing.Point(172, 121);
             this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder2.Name = "groupBoxWithBorder2";
             this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBoxWithBorder2.Size = new System.Drawing.Size(101, 138);
+            this.groupBoxWithBorder2.Size = new System.Drawing.Size(101, 145);
             this.groupBoxWithBorder2.TabIndex = 81;
             this.groupBoxWithBorder2.TabStop = false;
             this.groupBoxWithBorder2.Text = "流水合并条件";
@@ -2084,6 +2090,7 @@
             // 
             this.cu_print_middc.AutoSize = true;
             this.cu_print_middc.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_middc.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_middc.Location = new System.Drawing.Point(14, 116);
             this.cu_print_middc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_middc.Name = "cu_print_middc";
@@ -2096,6 +2103,7 @@
             // 
             this.cu_print_midprod.AutoSize = true;
             this.cu_print_midprod.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_midprod.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_midprod.Location = new System.Drawing.Point(14, 94);
             this.cu_print_midprod.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_midprod.Name = "cu_print_midprod";
@@ -2108,6 +2116,7 @@
             // 
             this.cu_print_midpo.AutoSize = true;
             this.cu_print_midpo.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_midpo.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_midpo.Location = new System.Drawing.Point(14, 70);
             this.cu_print_midpo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_midpo.Name = "cu_print_midpo";
@@ -2120,6 +2129,7 @@
             // 
             this.cu_print_midspec.AutoSize = true;
             this.cu_print_midspec.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_midspec.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_midspec.Location = new System.Drawing.Point(14, 46);
             this.cu_print_midspec.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_midspec.Name = "cu_print_midspec";
@@ -2132,6 +2142,7 @@
             // 
             this.cu_print_midlotno.AutoSize = true;
             this.cu_print_midlotno.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_midlotno.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_midlotno.Location = new System.Drawing.Point(14, 22);
             this.cu_print_midlotno.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_midlotno.Name = "cu_print_midlotno";
@@ -2154,7 +2165,7 @@
             // 
             this.MidLabelNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MidLabelNum.ID = null;
-            this.MidLabelNum.Location = new System.Drawing.Point(201, 48);
+            this.MidLabelNum.Location = new System.Drawing.Point(201, 44);
             this.MidLabelNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabelNum.Name = "MidLabelNum";
             this.MidLabelNum.Size = new System.Drawing.Size(44, 23);
@@ -2190,7 +2201,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(168, 52);
+            this.label5.Location = new System.Drawing.Point(168, 48);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(32, 17);
             this.label5.TabIndex = 50;
@@ -2213,7 +2224,7 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(170, 24);
+            this.label4.Location = new System.Drawing.Point(170, 21);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(32, 17);
             this.label4.TabIndex = 49;
@@ -2232,7 +2243,7 @@
             // 
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label15.Location = new System.Drawing.Point(250, 22);
+            this.label15.Location = new System.Drawing.Point(250, 19);
             this.label15.Name = "label15";
             this.label15.Size = new System.Drawing.Size(20, 17);
             this.label15.TabIndex = 40;
@@ -2241,7 +2252,7 @@
             // MidBoxCapacity
             // 
             this.MidBoxCapacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidBoxCapacity.Location = new System.Drawing.Point(201, 20);
+            this.MidBoxCapacity.Location = new System.Drawing.Point(201, 18);
             this.MidBoxCapacity.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidBoxCapacity.Name = "MidBoxCapacity";
             this.MidBoxCapacity.Size = new System.Drawing.Size(44, 23);
@@ -2360,11 +2371,11 @@
             this.groupBoxWithBorder3.Controls.Add(this.cu_print_outspec);
             this.groupBoxWithBorder3.Controls.Add(this.cu_print_outlotno);
             this.groupBoxWithBorder3.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.groupBoxWithBorder3.Location = new System.Drawing.Point(172, 126);
+            this.groupBoxWithBorder3.Location = new System.Drawing.Point(172, 121);
             this.groupBoxWithBorder3.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder3.Name = "groupBoxWithBorder3";
             this.groupBoxWithBorder3.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBoxWithBorder3.Size = new System.Drawing.Size(101, 138);
+            this.groupBoxWithBorder3.Size = new System.Drawing.Size(101, 145);
             this.groupBoxWithBorder3.TabIndex = 96;
             this.groupBoxWithBorder3.TabStop = false;
             this.groupBoxWithBorder3.Text = "流水合并条件";
@@ -2373,6 +2384,7 @@
             // 
             this.cu_print_outdc.AutoSize = true;
             this.cu_print_outdc.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_outdc.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_outdc.Location = new System.Drawing.Point(14, 116);
             this.cu_print_outdc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_outdc.Name = "cu_print_outdc";
@@ -2385,6 +2397,7 @@
             // 
             this.cu_print_outprod.AutoSize = true;
             this.cu_print_outprod.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_outprod.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_outprod.Location = new System.Drawing.Point(14, 94);
             this.cu_print_outprod.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_outprod.Name = "cu_print_outprod";
@@ -2397,6 +2410,7 @@
             // 
             this.cu_print_outpo.AutoSize = true;
             this.cu_print_outpo.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_outpo.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_outpo.Location = new System.Drawing.Point(14, 70);
             this.cu_print_outpo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_outpo.Name = "cu_print_outpo";
@@ -2409,6 +2423,7 @@
             // 
             this.cu_print_outspec.AutoSize = true;
             this.cu_print_outspec.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_outspec.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_outspec.Location = new System.Drawing.Point(14, 46);
             this.cu_print_outspec.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_outspec.Name = "cu_print_outspec";
@@ -2421,6 +2436,7 @@
             // 
             this.cu_print_outlotno.AutoSize = true;
             this.cu_print_outlotno.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_outlotno.ForeColor = System.Drawing.Color.Blue;
             this.cu_print_outlotno.Location = new System.Drawing.Point(14, 22);
             this.cu_print_outlotno.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_print_outlotno.Name = "cu_print_outlotno";
@@ -2444,7 +2460,7 @@
             // 
             this.OutBoxNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxNum.ID = null;
-            this.OutBoxNum.Location = new System.Drawing.Point(211, 99);
+            this.OutBoxNum.Location = new System.Drawing.Point(211, 98);
             this.OutBoxNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutBoxNum.Name = "OutBoxNum";
             this.OutBoxNum.Size = new System.Drawing.Size(38, 23);
@@ -2457,7 +2473,7 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(170, 102);
+            this.label10.Location = new System.Drawing.Point(170, 101);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(32, 17);
             this.label10.TabIndex = 90;
@@ -2549,6 +2565,11 @@
             this.PLC1.SleepTime = 0;
             this.PLC1.Tag = "PLC1";
             // 
+            // ManBackendCheck
+            // 
+            this.ManBackendCheck.SleepTime = 0;
+            this.ManBackendCheck.Tag = "ManBackendCheck";
+            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -2853,5 +2874,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
         private System.Windows.Forms.CheckBox cu_print_checkonly;
         private System.Windows.Forms.CheckBox cu_print_checkdatecode;
+        private CustomControl.SerialPortWithTag ManBackendCheck;
     }
 }

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

@@ -223,6 +223,25 @@ namespace UAS_LabelMachine
                 LogicHandler.SendDataToPLC(PLC1, PLCInstruct.DeviceStart, adh);
                 MessageLog.AppendText("PLC启动成功\n", Color.Blue);
             }
+            dr = dt.Select("comtype='ManBackendCheck'");
+            if (dr.Length > 0)
+            {
+                if (!ManBackendCheck.IsOpen)
+                {
+                    ManBackendCheck.PortName = dr[0]["COM"].ToString();
+                    ManBackendCheck.Tag = "ManBackendCheck";
+                    int sleeptime = 0;
+                    if (int.TryParse(dr[0]["DATAWAIT"].ToString(), out sleeptime))
+                    {
+                        ManBackendCheck.SleepTime = sleeptime;
+                    }
+                    ManBackendCheck.BaudRate = int.Parse(dr[0]["BaudRate"].ToString());
+                    ManBackendCheck.DataReceived += Serial_DataReceived;
+                    ManBackendCheck.Open();
+                }
+                LogicHandler.SendDataToPLC(PLC1, PLCInstruct.DeviceStart, adh);
+                MessageLog.AppendText("PLC启动成功\n", Color.Blue);
+            }
             RefreshPLCInstruct();
         }
 
@@ -232,6 +251,7 @@ namespace UAS_LabelMachine
         string QTY = "";
         string PN = "";
         string OutBox = "";
+        List<int> ManualCheckCount = new List<int>();
         //获取串口数据
         private void Serial_DataReceived(object sender, SerialDataReceivedEventArgs e)
         {
@@ -314,7 +334,7 @@ namespace UAS_LabelMachine
                         break;
                     case "BackendCheck":
                         BackCheck.Text = msg;
-                        if (BackendCheckFunction(msg, out ErrorMsg))
+                        if (BackendCheckFunction(msg, "Auto", out ErrorMsg))
                         {
                             LogicHandler.SendDataToPLC(PLC1, PLCInstruct.BackDataPass, adh);
                             BaseUtil.PlaySound("Confirm.Finish.wav");
@@ -326,6 +346,25 @@ namespace UAS_LabelMachine
                             MessageLog.AppendText(">>" + ErrorMsg + "\n", Color.Red);
                         }
                         break;
+                    case "ManBackendCheck":
+                        BackCheck.Text = msg;
+                        if (BackendCheckFunction(msg, "Manual", out ErrorMsg))
+                        {
+                            ManualCheckCount.Add(1);
+                        }
+                        else
+                        {
+                            LogicHandler.SendDataToPLC(PLC1, PLCInstruct.BackDataDelete, adh);
+                            BaseUtil.PlaySound("Confirm.Error.wav");
+                            MessageLog.AppendText(">>" + ErrorMsg + "\n", Color.Red);
+                        }
+                        if (ManualCheckCount.Count == 2)
+                        {
+                            LogicHandler.SendDataToPLC(PLC1, PLCInstruct.BackDataPass, adh);
+                            BaseUtil.PlaySound("Confirm.Finish.wav");
+                            ManualCheckCount.Clear();
+                        }
+                        break;
                     default:
                         break;
                 }
@@ -658,8 +697,8 @@ namespace UAS_LabelMachine
         string OutBoxBarCode = "";
         //中盒条码号
         string MidBoxBarCode = "";
-
-        private bool BackendCheckFunction(string msg, out string ErrorMsg)
+        string pibid1 = "";
+        private bool BackendCheckFunction(string msg, string type, out string ErrorMsg)
         {
             ErrorMsg = "";
             DataTable dtt = LabelInf.DataSource as DataTable;
@@ -668,7 +707,7 @@ namespace UAS_LabelMachine
             //需要校验2项数据,完成校验后此项的值需要为2则表示校验成功
             List<string> CheckItem = new List<string>();
             string pibid = "";
-            string pibid1 = "";
+         
             for (int i = 0; i < msgArr.Length; i++)
             {
                 if (RecheckCuprodcode.Checked)
@@ -713,56 +752,73 @@ namespace UAS_LabelMachine
                     {
                         CheckItem.Remove("原厂型号");
                     }
-                    pibid = back_adh.getFieldDataByCondition("prodiobarcode", "min(pib_id)", "pib_inoutno='" + pi_inoutno.Text + "' and pib_custbarcode='" + msgArr[i] + "' and pib_ifrecheck=0").ToString();
-                    if (pibid != "")
+                    else
                     {
-                        pibid1 = pibid;
-                        CheckItem.Remove("唯一条码");
+                        pibid = back_adh.getFieldDataByCondition("prodiobarcode", "min(pib_id)", "pib_inoutno='" + pi_inoutno.Text + "' and pib_custbarcode='" + msgArr[i] + "' and pib_ifrecheck=0").ToString();
+                        if (pibid != "")
+                        {
+                            pibid1 = pibid;
+                            CheckItem.Remove("唯一条码");
+                        }
                     }
                 }
             }
-            if (CheckItem.Count != 0)
+            //如果是自动复核或者手动复核扫描了两次数据的话
+            if (CheckItem.Count == 0 || (type == "Manual" && CheckItem.Count == 1))
             {
-                string Item = "";
-                for (int i = 0; i < CheckItem.Count; i++)
+                if (CheckItem.Count == 0 || (ManualCheckCount.Count == 1 && CheckItem.Count == 1))
                 {
-                    Item += CheckItem[i].ToString() + " ";
+                    DataRow[] dr = LabelInfDataTable.Select("pib_id=" + pibid1 + " and pr_orispeccode='" + PN + "'");
+                    if (dr.Length > 0)
+                    {
+                        dr[0]["pib_ifrecheck"] = -1;
+                        dr[0]["pib_lotno"] = LotNo;
+                        dr[0]["pib_datecode"] = DateCode;
+                    }
+                    else
+                    {
+                        ErrorMsg = "未匹配到合适的原厂型号";
+                        return false;
+                    }
+                    back_adh.ExecuteSql("update prodiobarcode set pib_ifrecheck=-1,pib_datecode='" + DateCode + "',pib_lotno='" + LotNo + "' where pib_id=" + pibid1 + " and pr_orispeccode='" + PN + "'", "update");
                 }
-                ErrorMsg = Item + "复核不通过";
-                return false;
             }
             else
             {
-                DataRow[] dr = LabelInfDataTable.Select("pib_id=" + pibid1 + " and pr_orispeccode='" + PN + "'");
-                if (dr.Length > 0)
-                {
-                    dr[0]["pib_ifrecheck"] = -1;
-                    dr[0]["pib_lotno"] = LotNo;
-                    dr[0]["pib_datecode"] = DateCode;
-                }
-                else
+                string Item = "";
+                for (int i = 0; i < CheckItem.Count; i++)
                 {
-                    ErrorMsg = "未匹配到合适的原厂型号";
-                    return false;
+                    Item += CheckItem[i].ToString() + " ";
                 }
-                back_adh.ExecuteSql("update prodiobarcode set pib_ifrecheck=-1,pib_datecode='" + DateCode + "',pib_lotno='" + LotNo + "' where pib_id=" + pibid1 + " and pr_orispeccode='" + PN + "'", "update");
+                ErrorMsg = Item + "复核不通过";
+                return false;
             }
-            LabelInf.Invalidate();
-            RefreshProcessData();
-            if (CurrentRowIndex - 10 > 0)
-                LabelInf.FirstDisplayedScrollingRowIndex = CurrentRowIndex - 5;
-            //如果成功上传了数据
-            if (LogicHandler.CheckUploadData(pi_inoutno.Text, UploadNum))
+            if (CheckItem.Count == 0 || (ManualCheckCount.Count == 1 && CheckItem.Count == 1))
             {
-                for (int i = 0; i < dtt.Rows.Count; i++)
+                LabelInf.Invalidate();
+                RefreshProcessData();
+                if (CurrentRowIndex - 10 > 0)
+                    LabelInf.FirstDisplayedScrollingRowIndex = CurrentRowIndex - 5;
+                //如果成功上传了数据
+                if (LogicHandler.CheckUploadData(pi_inoutno.Text, UploadNum))
                 {
-                    if (dtt.Rows[i]["pib_ifrecheck"].ToString() != "0" && dtt.Rows[i]["pib_ifupload"].ToString() == "0")
+                    for (int i = 0; i < dtt.Rows.Count; i++)
                     {
-                        dtt.Rows[i]["pib_ifupload"] = -1;
+                        if (dtt.Rows[i]["pib_ifrecheck"].ToString() != "0" && dtt.Rows[i]["pib_ifupload"].ToString() == "0")
+                        {
+                            dtt.Rows[i]["pib_ifupload"] = -1;
+                        }
                     }
                 }
+                return true;
+            }
+            else
+            {
+                if (type == "Manual" && CheckItem.Count == 1)
+                    return true;
+                else
+                    return false;
             }
-            return true;
         }
 
         //只执行一次窗体自适应
@@ -2063,7 +2119,7 @@ namespace UAS_LabelMachine
         {
             string ErrorMsg = "";
             int pib_pdno = int.Parse(LabelInf.Rows[CurrentRowIndex].Cells["pib_pdno"].Value.ToString());
-            BackendCheckFunction("", out ErrorMsg);
+            BackendCheckFunction("", "Auto", out ErrorMsg);
         }
 
         private void ButtonSetMidBox_Click(object sender, EventArgs e)
@@ -2082,6 +2138,9 @@ namespace UAS_LabelMachine
             ButtonRecheckPass.Enabled = ManualCollection.Checked;
             ButtonSetMidBox.Enabled = ManualCollection.Checked;
             ButtonSetOutBox.Enabled = ManualCollection.Checked;
+            ManualFrontCheck.Enabled = ManualCollection.Checked;
+            ManualBackCheck.Enabled = ManualCollection.Checked;
+            ManualAutoCheck.Enabled = ManualCollection.Checked;
         }
 
         private void AddCutBox_Click(object sender, EventArgs e)
@@ -2257,5 +2316,18 @@ namespace UAS_LabelMachine
                 }
             }
         }
+
+        private void ManualCheck_CheckedChanged(object sender, EventArgs e)
+        {
+            Control ctl = sender as Control;
+            switch (ctl.Name)
+            {
+                case "ManualBackCheck":
+                    MessageLog.AppendText(">>切换为手动复核模式,需扫描两段数据\n", Color.Blue);
+                    break;
+                default:
+                    break;
+            }
+        }
     }
 }

+ 3 - 0
UAS-出货标签管理(吉利通)/UAS_出货标签管理.resx

@@ -192,6 +192,9 @@
   <metadata name="PLC1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>781, 18</value>
   </metadata>
+  <metadata name="ManBackendCheck.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>862, 18</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>