Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master'

shim 8 years ago
parent
commit
9ab4f2a4e8

+ 84 - 84
UAS-MES/FunctionCode/Make/Make_CollectBTMAC.Designer.cs

@@ -30,70 +30,22 @@
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_CollectBTMAC));
-            this.ms_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
-            this.mcd_okqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
-            this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.sncode_label = new System.Windows.Forms.Label();
-            this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.mcd_remainqty_label = new System.Windows.Forms.Label();
             this.mcd_okqty_label = new System.Windows.Forms.Label();
             this.pr_code_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
             this.DeleteButton = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.ms_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.mcd_okqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
+            this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.SuspendLayout();
             // 
-            // ms_makecode
-            // 
-            this.ms_makecode.AutoSize = true;
-            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(92, 7);
-            this.ms_makecode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
-            this.ms_makecode.TabIndex = 212;
-            // 
-            // mcd_remainqty
-            // 
-            this.mcd_remainqty.AutoSize = true;
-            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(302, 56);
-            this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(19, 21);
-            this.mcd_remainqty.TabIndex = 210;
-            this.mcd_remainqty.Text = "0";
-            // 
-            // mcd_okqty
-            // 
-            this.mcd_okqty.AutoSize = true;
-            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty.Location = new System.Drawing.Point(91, 56);
-            this.mcd_okqty.Name = "mcd_okqty";
-            this.mcd_okqty.Size = new System.Drawing.Size(19, 21);
-            this.mcd_okqty.TabIndex = 209;
-            this.mcd_okqty.Text = "0";
-            // 
-            // ma_prodcode
-            // 
-            this.ma_prodcode.AutoSize = true;
-            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(302, 10);
-            this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
-            this.ma_prodcode.TabIndex = 208;
-            // 
-            // pr_detail
-            // 
-            this.pr_detail.AutoSize = true;
-            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(533, 7);
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 21);
-            this.pr_detail.TabIndex = 207;
-            // 
             // pr_detail_label
             // 
             this.pr_detail_label.AutoSize = true;
@@ -116,34 +68,6 @@
             this.sncode_label.TabIndex = 205;
             this.sncode_label.Text = "录入框";
             // 
-            // sncode
-            // 
-            this.sncode.AllPower = "ifall";
-            this.sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left)));
-            this.sncode.BackColor = System.Drawing.Color.White;
-            this.sncode.ID = null;
-            this.sncode.Location = new System.Drawing.Point(107, 415);
-            this.sncode.Name = "sncode";
-            this.sncode.Power = null;
-            this.sncode.Size = new System.Drawing.Size(196, 21);
-            this.sncode.Str = null;
-            this.sncode.Str1 = null;
-            this.sncode.Str2 = null;
-            this.sncode.TabIndex = 204;
-            this.sncode.Tag = "ifwrite";
-            this.sncode.TextChanged += new System.EventHandler(this.sncode_TextChanged);
-            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
-            // 
-            // OperateResult
-            // 
-            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(10, 89);
-            this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(706, 305);
-            this.OperateResult.TabIndex = 203;
-            this.OperateResult.Text = "";
-            // 
             // mcd_remainqty_label
             // 
             this.mcd_remainqty_label.AutoSize = true;
@@ -162,7 +86,7 @@
             this.mcd_okqty_label.Name = "mcd_okqty_label";
             this.mcd_okqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_okqty_label.TabIndex = 201;
-            this.mcd_okqty_label.Text = "打印计数";
+            this.mcd_okqty_label.Text = "采集计数";
             // 
             // pr_code_label
             // 
@@ -202,6 +126,82 @@
             this.DeleteButton.UseVisualStyleBackColor = false;
             this.DeleteButton.Click += new System.EventHandler(this.deleteButton1_Click);
             // 
+            // ms_makecode
+            // 
+            this.ms_makecode.AutoSize = true;
+            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode.Location = new System.Drawing.Point(92, 7);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
+            this.ms_makecode.TabIndex = 212;
+            // 
+            // mcd_remainqty
+            // 
+            this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty.Location = new System.Drawing.Point(302, 56);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(19, 21);
+            this.mcd_remainqty.TabIndex = 210;
+            this.mcd_remainqty.Text = "0";
+            // 
+            // mcd_okqty
+            // 
+            this.mcd_okqty.AutoSize = true;
+            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_okqty.Location = new System.Drawing.Point(91, 56);
+            this.mcd_okqty.Name = "mcd_okqty";
+            this.mcd_okqty.Size = new System.Drawing.Size(19, 21);
+            this.mcd_okqty.TabIndex = 209;
+            this.mcd_okqty.Text = "0";
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode.Location = new System.Drawing.Point(302, 10);
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.ma_prodcode.TabIndex = 208;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail.Location = new System.Drawing.Point(533, 7);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
+            this.pr_detail.TabIndex = 207;
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = "ifall";
+            this.sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(107, 415);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(196, 21);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 204;
+            this.sncode.Tag = "ifwrite";
+            this.sncode.TextChanged += new System.EventHandler(this.sncode_TextChanged);
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(10, 89);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(706, 305);
+            this.OperateResult.TabIndex = 203;
+            this.OperateResult.Text = "";
+            // 
             // Make_CollectBTMAC
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_CollectNetCode.Designer.cs

@@ -86,7 +86,7 @@
             this.mcd_okqty_label.Name = "mcd_okqty_label";
             this.mcd_okqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_okqty_label.TabIndex = 186;
-            this.mcd_okqty_label.Text = "打印计数";
+            this.mcd_okqty_label.Text = "采集计数";
             // 
             // pr_code_label
             // 
@@ -221,7 +221,7 @@
             this.Controls.Add(this.pr_code_label);
             this.Controls.Add(this.ms_makecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Margin = new System.Windows.Forms.Padding(2);
             this.Name = "Make_CollectNetCode";
             this.Tag = "Make!CollectNetCode";
             this.Text = "网标采集";

+ 154 - 26
UAS-MES/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -74,7 +74,16 @@
             this.bc_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.bc_groupcode = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.ob_checkno = new System.Windows.Forms.Label();
+            this.ob_checkno_label = new System.Windows.Forms.Label();
+            this.SendCheck = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.ob_batchqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.ob_batchqty_label = new System.Windows.Forms.Label();
+            this.ob_nowcheckqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
             this.panel2.SuspendLayout();
+            this.panel1.SuspendLayout();
             this.SuspendLayout();
             // 
             // panel2
@@ -104,7 +113,7 @@
             // 
             this.bc_remark_label.AutoSize = true;
             this.bc_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_remark_label.Location = new System.Drawing.Point(386, 203);
+            this.bc_remark_label.Location = new System.Drawing.Point(386, 263);
             this.bc_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_remark_label.Name = "bc_remark_label";
             this.bc_remark_label.Size = new System.Drawing.Size(92, 27);
@@ -115,7 +124,7 @@
             // 
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(288, 652);
+            this.ms_sncode_label.Location = new System.Drawing.Point(288, 659);
             this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(72, 27);
@@ -126,7 +135,7 @@
             // 
             this.bc_groupcode_label.AutoSize = true;
             this.bc_groupcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_groupcode_label.Location = new System.Drawing.Point(7, 202);
+            this.bc_groupcode_label.Location = new System.Drawing.Point(7, 262);
             this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_groupcode_label.Name = "bc_groupcode_label";
             this.bc_groupcode_label.Size = new System.Drawing.Size(92, 27);
@@ -136,9 +145,9 @@
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Blue;
-            this.label2.Location = new System.Drawing.Point(7, 154);
+            this.label2.Location = new System.Drawing.Point(7, 232);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(92, 27);
@@ -149,7 +158,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(7, 252);
+            this.label3.Location = new System.Drawing.Point(7, 312);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(92, 27);
@@ -161,7 +170,7 @@
             this.GoodProduct.AutoSize = true;
             this.GoodProduct.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GoodProduct.ForeColor = System.Drawing.Color.Blue;
-            this.GoodProduct.Location = new System.Drawing.Point(11, 648);
+            this.GoodProduct.Location = new System.Drawing.Point(11, 655);
             this.GoodProduct.Margin = new System.Windows.Forms.Padding(4);
             this.GoodProduct.Name = "GoodProduct";
             this.GoodProduct.Size = new System.Drawing.Size(83, 35);
@@ -176,7 +185,7 @@
             this.Reject.AutoSize = true;
             this.Reject.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Reject.ForeColor = System.Drawing.Color.Red;
-            this.Reject.Location = new System.Drawing.Point(121, 648);
+            this.Reject.Location = new System.Drawing.Point(121, 655);
             this.Reject.Margin = new System.Windows.Forms.Padding(4);
             this.Reject.Name = "Reject";
             this.Reject.Size = new System.Drawing.Size(107, 35);
@@ -194,10 +203,10 @@
             this.columnHeader1,
             this.columnHeader2});
             this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.WaitRejectList.Location = new System.Drawing.Point(9, 329);
+            this.WaitRejectList.Location = new System.Drawing.Point(9, 389);
             this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4);
             this.WaitRejectList.Name = "WaitRejectList";
-            this.WaitRejectList.Size = new System.Drawing.Size(353, 304);
+            this.WaitRejectList.Size = new System.Drawing.Size(353, 256);
             this.WaitRejectList.TabIndex = 37;
             this.WaitRejectList.UseCompatibleStateImageBehavior = false;
             this.WaitRejectList.View = System.Windows.Forms.View.Details;
@@ -230,7 +239,7 @@
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label4.ForeColor = System.Drawing.Color.Black;
-            this.label4.Location = new System.Drawing.Point(7, 298);
+            this.label4.Location = new System.Drawing.Point(7, 358);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(92, 27);
@@ -242,7 +251,7 @@
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label5.ForeColor = System.Drawing.Color.Black;
-            this.label5.Location = new System.Drawing.Point(491, 298);
+            this.label5.Location = new System.Drawing.Point(491, 358);
             this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(92, 27);
@@ -253,7 +262,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(858, 172);
+            this.label6.Location = new System.Drawing.Point(858, 232);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(92, 27);
@@ -269,10 +278,10 @@
             this.columnHeader7,
             this.columnHeader8});
             this.ChoosedRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ChoosedRejectList.Location = new System.Drawing.Point(494, 329);
+            this.ChoosedRejectList.Location = new System.Drawing.Point(494, 389);
             this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4);
             this.ChoosedRejectList.Name = "ChoosedRejectList";
-            this.ChoosedRejectList.Size = new System.Drawing.Size(353, 304);
+            this.ChoosedRejectList.Size = new System.Drawing.Size(353, 256);
             this.ChoosedRejectList.TabIndex = 50;
             this.ChoosedRejectList.UseCompatibleStateImageBehavior = false;
             this.ChoosedRejectList.View = System.Windows.Forms.View.Details;
@@ -304,7 +313,7 @@
             // 
             this.AutoBadCode.AutoSize = true;
             this.AutoBadCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoBadCode.Location = new System.Drawing.Point(105, 301);
+            this.AutoBadCode.Location = new System.Drawing.Point(105, 361);
             this.AutoBadCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AutoBadCode.Name = "AutoBadCode";
             this.AutoBadCode.Size = new System.Drawing.Size(151, 24);
@@ -385,7 +394,7 @@
             this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
             this.Save.Image = null;
             this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(685, 650);
+            this.Save.Location = new System.Drawing.Point(685, 657);
             this.Save.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
@@ -403,7 +412,7 @@
             this.bc_code.BackColor = System.Drawing.Color.White;
             this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_code.ID = null;
-            this.bc_code.Location = new System.Drawing.Point(128, 252);
+            this.bc_code.Location = new System.Drawing.Point(128, 312);
             this.bc_code.Margin = new System.Windows.Forms.Padding(4);
             this.bc_code.Name = "bc_code";
             this.bc_code.Power = null;
@@ -502,10 +511,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(862, 202);
+            this.OperateResult.Location = new System.Drawing.Point(862, 262);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(275, 430);
+            this.OperateResult.Size = new System.Drawing.Size(275, 383);
             this.OperateResult.TabIndex = 52;
             this.OperateResult.Text = "";
             // 
@@ -516,7 +525,7 @@
             this.CleanInfo.DownImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.DownImage")));
             this.CleanInfo.Image = ((System.Drawing.Image)(resources.GetObject("CleanInfo.Image")));
             this.CleanInfo.IsShowBorder = true;
-            this.CleanInfo.Location = new System.Drawing.Point(959, 650);
+            this.CleanInfo.Location = new System.Drawing.Point(960, 657);
             this.CleanInfo.Margin = new System.Windows.Forms.Padding(4);
             this.CleanInfo.MoveImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.MoveImage")));
             this.CleanInfo.Name = "CleanInfo";
@@ -531,7 +540,7 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(393, 439);
+            this.ChooseedReject.Location = new System.Drawing.Point(393, 470);
             this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4);
             this.ChooseedReject.Name = "ChooseedReject";
             this.ChooseedReject.Size = new System.Drawing.Size(67, 29);
@@ -542,7 +551,7 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(393, 518);
+            this.WaitReject.Location = new System.Drawing.Point(393, 549);
             this.WaitReject.Margin = new System.Windows.Forms.Padding(4);
             this.WaitReject.Name = "WaitReject";
             this.WaitReject.Size = new System.Drawing.Size(67, 29);
@@ -555,7 +564,7 @@
             this.bc_remark.AllPower = null;
             this.bc_remark.BackColor = System.Drawing.Color.White;
             this.bc_remark.ID = null;
-            this.bc_remark.Location = new System.Drawing.Point(497, 204);
+            this.bc_remark.Location = new System.Drawing.Point(497, 264);
             this.bc_remark.Margin = new System.Windows.Forms.Padding(4);
             this.bc_remark.Multiline = true;
             this.bc_remark.Name = "bc_remark";
@@ -570,7 +579,7 @@
             // 
             this.bc_groupcode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_groupcode.FormattingEnabled = true;
-            this.bc_groupcode.Location = new System.Drawing.Point(128, 204);
+            this.bc_groupcode.Location = new System.Drawing.Point(128, 264);
             this.bc_groupcode.Margin = new System.Windows.Forms.Padding(4);
             this.bc_groupcode.Name = "bc_groupcode";
             this.bc_groupcode.Size = new System.Drawing.Size(234, 26);
@@ -583,7 +592,7 @@
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(403, 652);
+            this.ms_sncode.Location = new System.Drawing.Point(403, 659);
             this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
@@ -595,12 +604,121 @@
             this.ms_sncode.Tag = "IfWrite";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown);
             // 
+            // panel1
+            // 
+            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel1.Controls.Add(this.ob_checkno);
+            this.panel1.Controls.Add(this.ob_checkno_label);
+            this.panel1.Controls.Add(this.SendCheck);
+            this.panel1.Controls.Add(this.ob_batchqty);
+            this.panel1.Controls.Add(this.ob_batchqty_label);
+            this.panel1.Controls.Add(this.ob_nowcheckqty);
+            this.panel1.Controls.Add(this.ob_nowcheckqty_label);
+            this.panel1.Location = new System.Drawing.Point(12, 157);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(1125, 60);
+            this.panel1.TabIndex = 71;
+            // 
+            // ob_checkno
+            // 
+            this.ob_checkno.AutoSize = true;
+            this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_checkno.ForeColor = System.Drawing.Color.Black;
+            this.ob_checkno.Location = new System.Drawing.Point(137, 17);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_checkno.Name = "ob_checkno";
+            this.ob_checkno.Size = new System.Drawing.Size(0, 27);
+            this.ob_checkno.TabIndex = 76;
+            this.ob_checkno.Tag = "ob_checkno";
+            this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
+            // 
+            // ob_checkno_label
+            // 
+            this.ob_checkno_label.AutoSize = true;
+            this.ob_checkno_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_checkno_label.ForeColor = System.Drawing.Color.Black;
+            this.ob_checkno_label.Location = new System.Drawing.Point(24, 17);
+            this.ob_checkno_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_checkno_label.Name = "ob_checkno_label";
+            this.ob_checkno_label.Size = new System.Drawing.Size(92, 27);
+            this.ob_checkno_label.TabIndex = 72;
+            this.ob_checkno_label.Text = "抽检批号";
+            // 
+            // SendCheck
+            // 
+            this.SendCheck.AllPower = null;
+            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
+            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
+            this.SendCheck.Enabled = false;
+            this.SendCheck.Image = null;
+            this.SendCheck.IsShowBorder = true;
+            this.SendCheck.Location = new System.Drawing.Point(975, 16);
+            this.SendCheck.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
+            this.SendCheck.Name = "SendCheck";
+            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
+            this.SendCheck.Power = null;
+            this.SendCheck.Size = new System.Drawing.Size(87, 32);
+            this.SendCheck.TabIndex = 72;
+            this.SendCheck.Text = "送检";
+            this.SendCheck.UseVisualStyleBackColor = false;
+            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
+            // 
+            // ob_batchqty
+            // 
+            this.ob_batchqty.AutoSize = true;
+            this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_batchqty.Location = new System.Drawing.Point(779, 17);
+            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_batchqty.Name = "ob_batchqty";
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 27);
+            this.ob_batchqty.TabIndex = 75;
+            this.ob_batchqty.Tag = "ob_batchqty";
+            // 
+            // ob_batchqty_label
+            // 
+            this.ob_batchqty_label.AutoSize = true;
+            this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_batchqty_label.ForeColor = System.Drawing.Color.Black;
+            this.ob_batchqty_label.Location = new System.Drawing.Point(646, 17);
+            this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_batchqty_label.Name = "ob_batchqty_label";
+            this.ob_batchqty_label.Size = new System.Drawing.Size(112, 27);
+            this.ob_batchqty_label.TabIndex = 74;
+            this.ob_batchqty_label.Text = "抽检批数量";
+            // 
+            // ob_nowcheckqty
+            // 
+            this.ob_nowcheckqty.AutoSize = true;
+            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(430, 17);
+            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 27);
+            this.ob_nowcheckqty.TabIndex = 73;
+            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
+            // 
+            // ob_nowcheckqty_label
+            // 
+            this.ob_nowcheckqty_label.AutoSize = true;
+            this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_nowcheckqty_label.ForeColor = System.Drawing.Color.Black;
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(286, 17);
+            this.ob_nowcheckqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
+            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(112, 27);
+            this.ob_nowcheckqty_label.TabIndex = 72;
+            this.ob_nowcheckqty_label.Text = "已采集数量";
+            // 
             // Make_TestCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.Control;
             this.ClientSize = new System.Drawing.Size(1150, 700);
+            this.Controls.Add(this.panel1);
             this.Controls.Add(this.Save);
             this.Controls.Add(this.AutoBadCode);
             this.Controls.Add(this.bc_code);
@@ -647,6 +765,8 @@
             this.SizeChanged += new System.EventHandler(this.测试采集_SizeChanged);
             this.panel2.ResumeLayout(true);
             this.panel2.PerformLayout();
+            this.panel1.ResumeLayout(true);
+            this.panel1.PerformLayout();
             this.ResumeLayout(true);
             this.PerformLayout();
 
@@ -698,5 +818,13 @@
         private System.Windows.Forms.CheckBox AutoBadCode;
         private System.Windows.Forms.ColumnHeader columnHeader4;
         private CustomControl.ButtonUtil.NormalButton Save;
+        private System.Windows.Forms.Panel panel1;
+        private CustomControl.ValueLabel.ValueLabel ob_batchqty;
+        private System.Windows.Forms.Label ob_batchqty_label;
+        private CustomControl.ValueLabel.ValueLabel ob_nowcheckqty;
+        private System.Windows.Forms.Label ob_nowcheckqty_label;
+        private CustomControl.ButtonUtil.NormalButton SendCheck;
+        private System.Windows.Forms.Label ob_checkno_label;
+        private System.Windows.Forms.Label ob_checkno;
     }
 }

+ 54 - 3
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -30,7 +30,7 @@ namespace UAS_MES.Make
 
         string ErrorMessage = "";
         //用于保存是否之前输入的ms_sncode
-        string ms_sncode1;
+        string LastSncode;
 
         string oMakeCode = "";
         string oMSID = "";
@@ -56,9 +56,8 @@ namespace UAS_MES.Make
         {
             dh = new DataHelper();
             GoodProduct.Checked = true;
-            ms_sncode.Focus();
             asc.controllInitializeSize(this);
-
+            ms_sncode.Focus();
             //设置锁定工单
             LockMakeCode.GetMakeCodeCtl(ma_code);
             ma_code.SetLockCheckBox(LockMakeCode);
@@ -306,6 +305,7 @@ namespace UAS_MES.Make
             }
             //加载页面信息
             LoadCollectedNum();
+            LoadCheckQTY();
         }
 
         private void 测试采集_SizeChanged(object sender, EventArgs e)
@@ -335,7 +335,10 @@ namespace UAS_MES.Make
             {
                 //良品信息采集
                 if (LogicHandler.UpdateMakeMessage(ms_sncode.Text, ma_code.Text, "良品采集", User.UserSourceCode, User.UserCode, "检测合格", out ErrorMessage))
+                {
+                    LastSncode = ms_sncode.Text;
                     OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为良品\n", Color.Green, ms_sncode);
+                }
                 else
                     OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
             }
@@ -427,6 +430,7 @@ namespace UAS_MES.Make
                 dh.ExecuteSql("delete from makebad where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and nvl(mb_status,0)=0", "delete");
                 if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserCode, User.UserSourceCode, "检查未通过", bgcode, bccode, bcremark, out ErrorMessage))
                 {
+                    LastSncode = ms_sncode.Text;
                     OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为不良\n", Color.Green, ms_sncode);
                     //清除不良信息
                     bc_code.Text = "";
@@ -470,6 +474,33 @@ namespace UAS_MES.Make
             //加载不良信息
             LoadBadGroupData();
             LoadCollectedNum();
+            LoadCheckQTY();
+        }
+
+        private void LoadCheckQTY()
+        {
+            sql.Clear();
+            string condition = "";
+            if (int.Parse(ob_nowcheckqty.Text == "" ? "0" : ob_nowcheckqty.Text) + 1 == int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text))
+            {
+                condition = "and ob_status='UNCHECK' and ob_checkno='" + ob_checkno.Text+ "'";
+            }
+            else {
+                condition = "and ob_status='ENTERING' ";
+            }
+            sql.Append("select ob_batchqty,ob_nowcheckqty,ob_checkno from oqcbatch where ");
+            sql.Append("ob_linecode='" + User.UserLineCode + "' and ob_prodcode='" + ma_prodcode.Text + "' and ");
+            sql.Append("ob_stepcode='" + User.CurrentStepCode + "' "+condition);
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BaseUtil.SetFormValue(this.Controls, dt);
+            if (ob_batchqty.Text != "")
+            {
+                SendCheck.Enabled = true;
+            }
+            else
+            {
+                SendCheck.Enabled = false;
+            }
         }
 
         private void GoodProduct_CheckedChanged(object sender, EventArgs e)
@@ -489,5 +520,25 @@ namespace UAS_MES.Make
                 Save.Visible = true;
             }
         }
+
+        private void SendCheck_Click(object sender, EventArgs e)
+        {
+            sql.Clear();
+            sql.Append("update oqcbatch set ob_status='UNCHECK' where ob_checkno ='" + ob_checkno.Text + "'");
+            dh.ExecuteSql(sql.GetString(), "select");
+            ob_checkno.Text = "";
+            ob_nowcheckqty.Text = "";
+            ob_batchqty.Text = "";
+            SendCheck.Enabled = false;
+            ms_sncode.Focus();
+        }
+
+        private void ob_checkno_TextChanged(object sender, EventArgs e)
+        {
+            if (ob_checkno.Text != "")
+            {
+                SendCheck.Enabled = true;
+            }
+        }
     }
 }

+ 38 - 0
UAS-MES/FunctionCode/Make/Make_TestCollection.resx

@@ -323,6 +323,44 @@
         ZrIE7d4UdV3k12BxFb3huIgob74jq7eOllIz0Q9sQrs7Ui9wepGrci6vk/HQgzzKm+7IZUgTOpQ2kj7o
         zB15DHqhq3IurxPdaY8R5U37C1K8XmyU9PGfh25xfV0R/UeTz52y3EtWQ9dqNEP4HY3LfwGra+NvPdw7
         fgAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="SendCheck.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="SendCheck.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="SendCheck.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
 </root>

+ 1 - 1
UAS-MES/FunctionCode/OQC/OQC_Inspection.cs

@@ -151,7 +151,7 @@ namespace UAS_MES.OQC
                 if (ErrorMessage == "")
                 {
                     BaseUtil.SetFormValue(Controls, dt[0]);
-                    BaseUtil.FillExpandDgvWithDataTable(CheckBatchDGV, dt[1], true);
+                    BaseUtil.FillExpandDgvWithDataTable(CheckBatchDGV, dt[1], true,true);
                 }
                 else
                 {

+ 64 - 63
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OQC_SamplingDataCollection));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
             this.ob_checkno_label = new System.Windows.Forms.Label();
             this.obd_outboxcode_label = new System.Windows.Forms.Label();
             this.ms_sncode_label = new System.Windows.Forms.Label();
@@ -65,13 +65,6 @@
             this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.CheckTypeDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
-            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.oi_itemcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_ng = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_leveldefect = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ois_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ois_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ois_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ChooseedReject = new UAS_MES.CustomControl.ButtonUtil.ArrowRightButton();
             this.WaitReject = new UAS_MES.CustomControl.ButtonUtil.ArrowLeftButton();
             this.oi_checkqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -90,6 +83,13 @@
             this.obd_outboxcode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ob_makecode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.obd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.oi_itemcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_ng = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_leveldefect = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ois_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ois_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ois_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -564,61 +564,6 @@
             this.CheckTypeDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.CheckTypeDGV_DataError);
             this.CheckTypeDGV.RowHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.CheckTypeDGV_RowHeaderMouseClick);
             // 
-            // choose
-            // 
-            this.choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.choose.DataPropertyName = "choose";
-            this.choose.HeaderText = "勾选";
-            this.choose.Name = "choose";
-            this.choose.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.choose.Width = 60;
-            // 
-            // oi_itemcode
-            // 
-            this.oi_itemcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.oi_itemcode.DataPropertyName = "oi_checkkind";
-            this.oi_itemcode.HeaderText = "检验类型";
-            this.oi_itemcode.Name = "oi_itemcode";
-            this.oi_itemcode.Width = 78;
-            // 
-            // oi_ng
-            // 
-            this.oi_ng.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.oi_ng.DataPropertyName = "oi_count";
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.oi_ng.DefaultCellStyle = dataGridViewCellStyle3;
-            this.oi_ng.HeaderText = "样本数量";
-            this.oi_ng.Name = "oi_ng";
-            this.oi_ng.Width = 96;
-            // 
-            // oi_leveldefect
-            // 
-            this.oi_leveldefect.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.oi_leveldefect.DataPropertyName = "oi_checkedcount";
-            this.oi_leveldefect.HeaderText = "已检数量";
-            this.oi_leveldefect.Name = "oi_leveldefect";
-            this.oi_leveldefect.Width = 75;
-            // 
-            // ois_remark
-            // 
-            this.ois_remark.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.ois_remark.HeaderText = "";
-            this.ois_remark.Name = "ois_remark";
-            // 
-            // ois_status
-            // 
-            this.ois_status.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.ois_status.HeaderText = "";
-            this.ois_status.Name = "ois_status";
-            // 
-            // ois_id
-            // 
-            this.ois_id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.ois_id.DataPropertyName = "ois_id";
-            this.ois_id.HeaderText = "";
-            this.ois_id.Name = "ois_id";
-            this.ois_id.Visible = false;
-            // 
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
@@ -874,6 +819,62 @@
             this.obd_id.Name = "obd_id";
             this.obd_id.Visible = false;
             // 
+            // choose
+            // 
+            this.choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.choose.DataPropertyName = "choose";
+            this.choose.HeaderText = "勾选";
+            this.choose.Name = "choose";
+            this.choose.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.choose.Width = 60;
+            // 
+            // oi_itemcode
+            // 
+            this.oi_itemcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.oi_itemcode.DataPropertyName = "oi_checkkind";
+            this.oi_itemcode.HeaderText = "检验类型";
+            this.oi_itemcode.Name = "oi_itemcode";
+            // 
+            // oi_ng
+            // 
+            this.oi_ng.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.oi_ng.DataPropertyName = "oi_count";
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.oi_ng.DefaultCellStyle = dataGridViewCellStyle1;
+            this.oi_ng.HeaderText = "样本数量";
+            this.oi_ng.Name = "oi_ng";
+            this.oi_ng.Width = 96;
+            // 
+            // oi_leveldefect
+            // 
+            this.oi_leveldefect.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.oi_leveldefect.DataPropertyName = "oi_checkedcount";
+            this.oi_leveldefect.HeaderText = "已检数量";
+            this.oi_leveldefect.Name = "oi_leveldefect";
+            this.oi_leveldefect.Width = 96;
+            // 
+            // ois_remark
+            // 
+            this.ois_remark.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.ois_remark.HeaderText = "";
+            this.ois_remark.Name = "ois_remark";
+            this.ois_remark.Width = 23;
+            // 
+            // ois_status
+            // 
+            this.ois_status.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.ois_status.HeaderText = "";
+            this.ois_status.Name = "ois_status";
+            // 
+            // ois_id
+            // 
+            this.ois_id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.ois_id.DataPropertyName = "ois_id";
+            this.ois_id.HeaderText = "";
+            this.ois_id.Name = "ois_id";
+            this.ois_id.Visible = false;
+            this.ois_id.Width = 80;
+            // 
             // OQC_SamplingDataCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);

+ 22 - 14
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -139,18 +139,30 @@ namespace UAS_MES.OQC
         private void GetBatchTypeGridData()
         {
             dt = (DataTable)dh.ExecuteSql("select oi_checkkind,max(oi_sampleqty) oi_count,nvl(max(oi_checkqty),0) oi_checkedcount from OQCBatch  left join OQCItems on ob_checkno=oi_checkno  where oi_checkno='" + ob_checkno.Text + "' group by oi_checkkind ", "select");
-            BaseUtil.FillExpandDgvWithDataTable(CheckTypeDGV, dt, true);
+            BaseUtil.FillExpandDgvWithDataTable(CheckTypeDGV, dt, true,true);
             if (CheckTypeDGV.Rows.Count == 0)
             {
                 OperateResult.AppendText(">>请先维护抽样计划\n", Color.Red);
                 return;
             }
+            string checkkind = "";
+            for (int i = 0; i < CheckTypeDGV.Rows.Count; i++)
+            {
+                checkkind +=("'"+ CheckTypeDGV.Rows[i].Cells["oi_itemcode"].Value.ToString() + "',") ;
+            }
+            sql.Clear();
+            sql.Append("select 1 choose,oi_checkkind,ois_sncode,nvl(ois_id,0) ois_id ,oi_itemcode ,nvl(ois_ifng,0) oi_ng,nvl(ois_defectlevel,'-1')");
+            sql.Append("oi_leveldefect,ois_remark,case nvl(ois_id,0) when 0 then '未检验' else '已检验' end ois_status from OQCItems ");
+            sql.Append("left join OQCItemSamples on  ois_sncode='" + sncode.Text + "' and ois_checkno=oi_checkno and ");
+            sql.Append("ois_itemcode=oi_itemcode and ois_projectcode = oi_projectcode where oi_checkno ='" + ob_checkno.Text + "' ");
+            sql.Append("and oi_checkkind in (" + checkkind.Substring(0,checkkind.Length-1) + ")");
+            TempForCheckType = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             sql.Clear();
             sql.Append("select bg_code,bg_name from product left join productkind ");
-            sql.Append("on pr_kind=pk_code left join PRODUCTBADGROUP on pk_code= pb_kindcode ");
+            sql.Append("on pr_kind=pk_name left join PRODUCTBADGROUP on pk_code= pb_kindcode ");
             sql.Append("left join badgroup on  bg_code=pb_badgroup where pr_code='" + ob_prodcode.Text + "'");
             BadCode = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-            BaseUtil.FillExpandDgvWithDataTable(WaitChooseDGV, BadCode, true);
+            BaseUtil.FillExpandDgvWithDataTable(WaitChooseDGV, BadCode, true,false);
         }
 
         private void Confirm_Click(object sender, EventArgs e)
@@ -185,7 +197,7 @@ namespace UAS_MES.OQC
                         //将布尔值转换为0,-1
                         if (TempForCheckType.Rows[i]["ois_id"].ToString() != "" && TempForCheckType.Rows[i]["ois_id"].ToString() != "0")
                         {
-                            ois_ifng_update.Add(TempForCheckType.Rows[i]["oi_ng"].ToString() == "True" ? "-1" : "0");
+                            ois_ifng_update.Add(TempForCheckType.Rows[i]["oi_ng"].ToString());
                             ois_defectlevel_update.Add(TempForCheckType.Rows[i]["oi_leveldefect"].ToString());
                             ois_remark_update.Add(TempForCheckType.Rows[i]["ois_remark"].ToString());
                             ois_id_update.Add(TempForCheckType.Rows[i]["ois_id"].ToString());
@@ -193,7 +205,7 @@ namespace UAS_MES.OQC
                         else
                         {
                             oi_itemcode_insert.Add(TempForCheckType.Rows[i]["oi_itemcode"].ToString());
-                            ois_ifng_insert.Add(TempForCheckType.Rows[i]["oi_ng"].ToString() == "True" ? "-1" : "0");
+                            ois_ifng_insert.Add(TempForCheckType.Rows[i]["oi_ng"].ToString());
                             ois_defectlevel_insert.Add(TempForCheckType.Rows[i]["oi_leveldefect"].ToString());
                             ois_remark_insert.Add(TempForCheckType.Rows[i]["ois_remark"].ToString());
                         }
@@ -202,12 +214,12 @@ namespace UAS_MES.OQC
                     bool AllPass = true;
                     for (int i = 0; i < ois_ifng_insert.Count; i++)
                     {
-                        if (ois_ifng_insert[i] == "-1")
+                        if (ois_ifng_insert[i] != "0")
                             AllPass = false;
                     }
                     for (int i = 0; i < ois_ifng_update.Count; i++)
                     {
-                        if (ois_ifng_update[i] == "-1")
+                        if (ois_ifng_update[i] != "0")
                             AllPass = false;
                     }
                     if (ChoosedDGV.RowCount > 0 || AllPass)
@@ -366,13 +378,8 @@ namespace UAS_MES.OQC
             if (!dgvr.Contains(CheckTypeDGV.Rows[e.RowIndex]))
             {
                 string checkkind = CheckTypeDGV.Rows[e.RowIndex].Cells["oi_itemcode"].Value.ToString();
-                sql.Clear();
-                sql.Append("select oi_checkkind,ois_sncode,nvl(ois_id,0) ois_id ,oi_itemcode ,nvl(ois_ifng,0) oi_ng,nvl(ois_defectlevel,'-1')");
-                sql.Append("oi_leveldefect,ois_remark,case nvl(ois_id,0) when 0 then '未检验' else '已检验' end ois_status from OQCItems ");
-                sql.Append("left join OQCItemSamples on  ois_sncode='" + sncode.Text + "' and ois_checkno=oi_checkno and ");
-                sql.Append("ois_itemcode=oi_itemcode and ois_projectcode = oi_projectcode where oi_checkno ='" + ob_checkno.Text + "' ");
-                sql.Append("and oi_checkkind='" + checkkind + "'");
-                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+
+                DataTable dt = BaseUtil.filterDataTable(TempForCheckType,"oi_checkkind='"+checkkind+"'");
                 DataGridViewRow headerRow = new DataGridViewRow();
 
                 DataGridViewTextBoxCell textcell = new DataGridViewTextBoxCell();
@@ -417,6 +424,7 @@ namespace UAS_MES.OQC
                     dataRow.Tag = "SonRow";
                     DataGridViewCheckBoxCell checkcell = new DataGridViewCheckBoxCell();
                     checkcell.Tag = "SonRow";
+                    checkcell.Value=true;
                     dataRow.Cells.Add(checkcell);
 
                     textcell = new DataGridViewTextBoxCell();

+ 0 - 39
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.resx

@@ -258,24 +258,6 @@
   <metadata name="bc_name1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="or_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bc_code1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bc_name1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bg_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bg_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -306,27 +288,6 @@
   <metadata name="ois_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="oi_itemcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="oi_ng.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="oi_leveldefect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ois_remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ois_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ois_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <data name="ChooseedReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6

+ 2 - 1
UAS-MES/PublicMethod/BaseUtil.cs

@@ -622,7 +622,7 @@ namespace UAS_MES.PublicMethod
         /// <param name="dgv"></param>
         /// <param name="dt"></param>
         /// <param name="CheckBox"></param>
-        public static void FillExpandDgvWithDataTable(DataGridViewExpand dgv, DataTable dt, bool CheckBox)
+        public static void FillExpandDgvWithDataTable(DataGridViewExpand dgv, DataTable dt, bool CheckBox,bool CheckBoxTrue)
         {
             CleanDGVData(dgv);
             if (CheckBox)
@@ -633,6 +633,7 @@ namespace UAS_MES.PublicMethod
                     collapseRow.IsCollapse = true;
                     DataGridViewCheckBoxCell checkcell = new DataGridViewCheckBoxCell();
                     collapseRow.Cells.Add(checkcell);
+                    checkcell.Value = CheckBoxTrue;
                     //因为DGV中可能有空置的列多出,所以需要用DataTable的列进行循环
                     for (int j = 0; j < dt.Columns.Count; j++)
                     {

+ 11 - 4
UAS-MES/PublicMethod/LogicHandler.cs

@@ -835,10 +835,10 @@ namespace UAS_MES.PublicMethod
             sql.Clear();
             sql.Append("insert into MakeProcess(mp_id,mp_makecode,mp_maid, mp_mscode,mp_sncode,mp_stepcode,mp_stepname,");
             sql.Append("mp_craftcode,mp_craftname,mp_kind,mp_result,mp_indate,mp_inman,mp_wccode,mp_linecode,mp_sourcecode,mp_snstatus,mp_sncheckno,mp_snoutboxcode)");
-            sql.Append("select MakeProcess_seq.nextval, ma_code,ma_id,ms_code,ms_sncode,mcd_stepcode,mcd_stepname,");
+            sql.Append("select MakeProcess_seq.nextval, ma_code,ma_id,ms_code,ms_sncode,'"+ CurrentStep + "','"+ CurrentStepName + "',");
             sql.Append("ma_craftcode,ma_craftname,'" + iMPKind + "','" + result + "',sysdate,'" + iUserCode + "',ma_wccode,'" + LineCode + "','" + iSourceCode + "',");
-            sql.Append("ms_status,ms_checkno,ms_outboxcode from make left join makecraftdetail on mcd_macode=ma_code left join makeserial on ms_makecode=ma_code ");
-            sql.Append("where ms_sncode='" + iSnCode + "' and ma_code='" + iMakeCode + "' and mcd_stepcode='" + CurrentStep + "'");
+            sql.Append("ms_status,ms_checkno,ms_outboxcode from make left join makeserial on ms_makecode=ma_code left join step on st_code=ms_stepcode ");
+            sql.Append("where ms_sncode='" + iSnCode + "' and ma_code='" + iMakeCode + "' and st_code='" + CurrentStep + "'");
             dh.ExecuteSql(sql.ToString(), "insert");
         }
 
@@ -918,6 +918,7 @@ namespace UAS_MES.PublicMethod
             oErrorMessage = "";
             string[] param = new string[] { iMakeCode, iSourceCode, iSN, iUserCode, oErrorMessage };
             dh.CallProcedure("CS_SETSTEPFINISH", ref param);
+            oErrorMessage = param[4];
             if (oErrorMessage == "" || oErrorMessage == null || oErrorMessage == "null")
                 return true;
             else
@@ -1013,7 +1014,13 @@ namespace UAS_MES.PublicMethod
             dh.BatchInsert(sql.ToString(), new string[] { "bc_code", "bg_code", "bc_remark" }, iBadCode, iBadGroupCode, iBadRemark);
             //更新序列号已经采集的工序 ms_paststep 已采集数据,更新下一工序
             dh.UpdateByCondition("makeserial", "ms_paststep = ms_paststep ||'," + StepCode + "',ms_status=3", "ms_sncode='" + iSnCode + "'");
-            //判断当前采集点是否为扣料工序cd_ifreduce =-1 则为扣料工序
+            //如果存在送检批号则进行删除
+            if (dh.CheckExist("oqcbatchdetail", "obd_sncode='"+iSnCode+"'"))
+            {
+                string checkno = dh.getFieldDataByCondition("oqcbatchdetail", "obd_checkno", "obd_sncode='"+iSnCode+"'").ToString();
+                dh.ExecuteSql("delete from oqcbatchdetail where obd_sncode='" + iSnCode + "'", "delete");
+                dh.ExecuteSql("update oqcbatch set ob_nowcheckqty=ob_nowcheckqty-1 where ob_checkno='"+ checkno + "'", "update");
+            }
             //之前保存的不良就不再调用
             if (ms_status != "3")
                 SetStepFinish(iMakeCode, iSourceCode, iSnCode, "不良采集", iResult, iUserCode, out oErrorMessage);