Forráskód Böngészése

抽样数据采集添加批判过功能,修改弹出提示为提示框提示

章政 8 éve
szülő
commit
04f853b027

+ 111 - 86
UAS-MES/FunctionCode/Make/Make_NewBadCode.Designer.cs

@@ -31,14 +31,18 @@
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_NewBadCode));
             this.ChoosedRejectList = new System.Windows.Forms.ListView();
             this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-            this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-            this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-            this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bg_code = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bg_name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_code = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_note = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.WaitRejectList = new System.Windows.Forms.ListView();
             this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-            this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bg_code1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bg_name1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_code1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_name1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_note1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.bg_name_label = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
@@ -62,13 +66,14 @@
             this.ChoosedRejectList.CheckBoxes = true;
             this.ChoosedRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
             this.columnHeader6,
-            this.columnHeader4,
-            this.columnHeader7,
-            this.columnHeader8});
-            this.ChoosedRejectList.Location = new System.Drawing.Point(417, 246);
-            this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4);
+            this.bg_code,
+            this.bg_name,
+            this.bc_code,
+            this.bc_name,
+            this.bc_note});
+            this.ChoosedRejectList.Location = new System.Drawing.Point(313, 197);
             this.ChoosedRejectList.Name = "ChoosedRejectList";
-            this.ChoosedRejectList.Size = new System.Drawing.Size(300, 302);
+            this.ChoosedRejectList.Size = new System.Drawing.Size(226, 242);
             this.ChoosedRejectList.TabIndex = 54;
             this.ChoosedRejectList.UseCompatibleStateImageBehavior = false;
             this.ChoosedRejectList.View = System.Windows.Forms.View.Details;
@@ -78,34 +83,44 @@
             this.columnHeader6.Text = " ";
             this.columnHeader6.Width = 20;
             // 
-            // columnHeader4
+            // bg_code
             // 
-            this.columnHeader4.Text = "不良代码组";
-            this.columnHeader4.Width = 97;
+            this.bg_code.Text = "不良代码编号";
+            this.bg_code.Width = 0;
             // 
-            // columnHeader7
+            // bg_name
             // 
-            this.columnHeader7.Text = "不良代码";
-            this.columnHeader7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            this.columnHeader7.Width = 79;
+            this.bg_name.Text = "不良代码组";
+            this.bg_name.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.bg_name.Width = 79;
             // 
-            // columnHeader8
+            // bc_code
             // 
-            this.columnHeader8.Text = "不良名称";
-            this.columnHeader8.Width = 91;
+            this.bc_code.Text = "不良代码编号";
+            this.bc_code.Width = 0;
+            // 
+            // bc_name
+            // 
+            this.bc_name.Text = "不良名称";
+            this.bc_name.Width = 61;
+            // 
+            // bc_note
+            // 
+            this.bc_note.Text = "备注";
             // 
             // WaitRejectList
             // 
             this.WaitRejectList.CheckBoxes = true;
             this.WaitRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
             this.columnHeader5,
-            this.columnHeader3,
-            this.columnHeader1,
-            this.columnHeader2});
-            this.WaitRejectList.Location = new System.Drawing.Point(13, 246);
-            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4);
+            this.bg_code1,
+            this.bg_name1,
+            this.bc_code1,
+            this.bc_name1,
+            this.bc_note1});
+            this.WaitRejectList.Location = new System.Drawing.Point(14, 194);
             this.WaitRejectList.Name = "WaitRejectList";
-            this.WaitRejectList.Size = new System.Drawing.Size(300, 304);
+            this.WaitRejectList.Size = new System.Drawing.Size(226, 244);
             this.WaitRejectList.TabIndex = 51;
             this.WaitRejectList.UseCompatibleStateImageBehavior = false;
             this.WaitRejectList.View = System.Windows.Forms.View.Details;
@@ -115,30 +130,39 @@
             this.columnHeader5.Text = " ";
             this.columnHeader5.Width = 20;
             // 
-            // columnHeader3
+            // bg_code1
+            // 
+            this.bg_code1.Text = "不良代码组编号";
+            this.bg_code1.Width = 0;
+            // 
+            // bg_name1
+            // 
+            this.bg_name1.Text = "不良代码组";
+            this.bg_name1.Width = 88;
+            // 
+            // bc_code1
             // 
-            this.columnHeader3.Text = "不良代码组";
-            this.columnHeader3.Width = 87;
+            this.bc_code1.Text = "不良代码编号";
+            this.bc_code1.Width = 0;
             // 
-            // columnHeader1
+            // bc_name1
             // 
-            this.columnHeader1.Text = "不良代码";
-            this.columnHeader1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            this.columnHeader1.Width = 87;
+            this.bc_name1.Text = "不良名称";
+            this.bc_name1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.bc_name1.Width = 63;
             // 
-            // columnHeader2
+            // bc_note1
             // 
-            this.columnHeader2.Text = "不良名称";
-            this.columnHeader2.Width = 82;
+            this.bc_note1.Text = "备注";
+            this.bc_note1.Width = 56;
             // 
             // bg_name_label
             // 
             this.bg_name_label.AutoSize = true;
             this.bg_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bg_name_label.Location = new System.Drawing.Point(13, 166);
-            this.bg_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.bg_name_label.Location = new System.Drawing.Point(10, 133);
             this.bg_name_label.Name = "bg_name_label";
-            this.bg_name_label.Size = new System.Drawing.Size(112, 27);
+            this.bg_name_label.Size = new System.Drawing.Size(90, 21);
             this.bg_name_label.TabIndex = 92;
             this.bg_name_label.Text = "不良代码组";
             // 
@@ -146,10 +170,9 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(13, 213);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(10, 170);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 96;
             this.label1.Text = "待选不良";
             // 
@@ -157,10 +180,9 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(412, 213);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(309, 170);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(92, 27);
+            this.label2.Size = new System.Drawing.Size(74, 21);
             this.label2.TabIndex = 97;
             this.label2.Text = "已选不良";
             // 
@@ -170,10 +192,9 @@
             this.label3.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label3.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.label3.Location = new System.Drawing.Point(8, 6);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(6, 5);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(132, 27);
+            this.label3.Size = new System.Drawing.Size(106, 21);
             this.label3.TabIndex = 99;
             this.label3.Text = "新增不良代码";
             // 
@@ -182,17 +203,18 @@
             this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
             this.headBar1.Location = new System.Drawing.Point(0, 0);
-            this.headBar1.Margin = new System.Windows.Forms.Padding(4);
             this.headBar1.Name = "headBar1";
-            this.headBar1.Size = new System.Drawing.Size(730, 40);
+            this.headBar1.Size = new System.Drawing.Size(548, 32);
             this.headBar1.TabIndex = 98;
+            this.headBar1.Title = null;
             // 
             // badgroup
             // 
             this.badgroup.FormattingEnabled = true;
-            this.badgroup.Location = new System.Drawing.Point(164, 167);
+            this.badgroup.Location = new System.Drawing.Point(123, 134);
+            this.badgroup.Margin = new System.Windows.Forms.Padding(2);
             this.badgroup.Name = "badgroup";
-            this.badgroup.Size = new System.Drawing.Size(203, 23);
+            this.badgroup.Size = new System.Drawing.Size(153, 20);
             this.badgroup.TabIndex = 95;
             this.badgroup.SelectedIndexChanged += new System.EventHandler(this.badgroup_SelectedIndexChanged);
             // 
@@ -205,9 +227,11 @@
             this.groupBoxWithBorder1.Controls.Add(this.ms_sncode);
             this.groupBoxWithBorder1.Controls.Add(this.ms_sncode_label);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(0, 44);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(0, 35);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(730, 100);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(548, 80);
             this.groupBoxWithBorder1.TabIndex = 94;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "产品信息";
@@ -223,11 +247,10 @@
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_makecode.ForeColor = System.Drawing.Color.Black;
             this.ms_makecode.ID = null;
-            this.ms_makecode.Location = new System.Drawing.Point(417, 45);
-            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4);
+            this.ms_makecode.Location = new System.Drawing.Point(313, 36);
             this.ms_makecode.Name = "ms_makecode";
             this.ms_makecode.Power = null;
-            this.ms_makecode.Size = new System.Drawing.Size(187, 27);
+            this.ms_makecode.Size = new System.Drawing.Size(141, 23);
             this.ms_makecode.Str = null;
             this.ms_makecode.Str1 = null;
             this.ms_makecode.Str2 = null;
@@ -238,10 +261,9 @@
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(320, 45);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Location = new System.Drawing.Point(240, 36);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(72, 27);
+            this.ms_makecode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_makecode_label.TabIndex = 97;
             this.ms_makecode_label.Text = "工单号";
             // 
@@ -255,11 +277,10 @@
             this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_sncode.ForeColor = System.Drawing.Color.Black;
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(109, 45);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.ms_sncode.Location = new System.Drawing.Point(82, 36);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
-            this.ms_sncode.Size = new System.Drawing.Size(187, 27);
+            this.ms_sncode.Size = new System.Drawing.Size(141, 23);
             this.ms_sncode.Str = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str2 = null;
@@ -270,10 +291,9 @@
             // 
             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(13, 45);
-            this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_sncode_label.Location = new System.Drawing.Point(10, 36);
             this.ms_sncode_label.Name = "ms_sncode_label";
-            this.ms_sncode_label.Size = new System.Drawing.Size(72, 27);
+            this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_sncode_label.TabIndex = 95;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -284,12 +304,13 @@
             this.Cancel.DownImage = ((System.Drawing.Image)(resources.GetObject("Cancel.DownImage")));
             this.Cancel.Image = null;
             this.Cancel.IsShowBorder = true;
-            this.Cancel.Location = new System.Drawing.Point(385, 561);
+            this.Cancel.Location = new System.Drawing.Point(289, 449);
+            this.Cancel.Margin = new System.Windows.Forms.Padding(2);
             this.Cancel.MoveImage = ((System.Drawing.Image)(resources.GetObject("Cancel.MoveImage")));
             this.Cancel.Name = "Cancel";
             this.Cancel.NormalImage = ((System.Drawing.Image)(resources.GetObject("Cancel.NormalImage")));
             this.Cancel.Power = null;
-            this.Cancel.Size = new System.Drawing.Size(80, 35);
+            this.Cancel.Size = new System.Drawing.Size(60, 28);
             this.Cancel.TabIndex = 56;
             this.Cancel.Text = "取消";
             this.Cancel.UseVisualStyleBackColor = false;
@@ -302,12 +323,13 @@
             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(267, 561);
+            this.Save.Location = new System.Drawing.Point(200, 449);
+            this.Save.Margin = new System.Windows.Forms.Padding(2);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
             this.Save.Power = null;
-            this.Save.Size = new System.Drawing.Size(80, 35);
+            this.Save.Size = new System.Drawing.Size(60, 28);
             this.Save.TabIndex = 55;
             this.Save.Text = "保存";
             this.Save.UseVisualStyleBackColor = false;
@@ -316,10 +338,9 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(329, 429);
-            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4);
+            this.ChooseedReject.Location = new System.Drawing.Point(247, 343);
             this.ChooseedReject.Name = "ChooseedReject";
-            this.ChooseedReject.Size = new System.Drawing.Size(67, 29);
+            this.ChooseedReject.Size = new System.Drawing.Size(50, 23);
             this.ChooseedReject.TabIndex = 53;
             this.ChooseedReject.UseVisualStyleBackColor = true;
             this.ChooseedReject.Click += new System.EventHandler(this.ChooseedReject_Click);
@@ -327,19 +348,18 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(329, 349);
-            this.WaitReject.Margin = new System.Windows.Forms.Padding(4);
+            this.WaitReject.Location = new System.Drawing.Point(247, 279);
             this.WaitReject.Name = "WaitReject";
-            this.WaitReject.Size = new System.Drawing.Size(67, 29);
+            this.WaitReject.Size = new System.Drawing.Size(50, 23);
             this.WaitReject.TabIndex = 52;
             this.WaitReject.UseVisualStyleBackColor = true;
             this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
             // 
             // Make_NewBadCode
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(730, 608);
+            this.ClientSize = new System.Drawing.Size(548, 486);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.headBar1);
             this.Controls.Add(this.label2);
@@ -354,6 +374,7 @@
             this.Controls.Add(this.WaitReject);
             this.Controls.Add(this.WaitRejectList);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(2);
             this.Name = "Make_NewBadCode";
             this.Tag = "ShowDialogWindow";
             this.Text = "Make_NewBadCode";
@@ -369,12 +390,12 @@
 
         private System.Windows.Forms.ListView ChoosedRejectList;
         private System.Windows.Forms.ColumnHeader columnHeader6;
-        private System.Windows.Forms.ColumnHeader columnHeader7;
+        private System.Windows.Forms.ColumnHeader bg_name;
         private CustomControl.ButtonUtil.ArrowRightButton ChooseedReject;
         private CustomControl.ButtonUtil.ArrowLeftButton WaitReject;
         private System.Windows.Forms.ListView WaitRejectList;
         private System.Windows.Forms.ColumnHeader columnHeader5;
-        private System.Windows.Forms.ColumnHeader columnHeader1;
+        private System.Windows.Forms.ColumnHeader bc_name1;
         private CustomControl.ButtonUtil.NormalButton Save;
         private CustomControl.ButtonUtil.NormalButton Cancel;
         private System.Windows.Forms.Label bg_name_label;
@@ -387,10 +408,14 @@
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Label label2;
         private CustomControl.HeadBar headBar1;
-        private System.Windows.Forms.ColumnHeader columnHeader2;
+        private System.Windows.Forms.ColumnHeader bc_note1;
         private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.ColumnHeader columnHeader3;
-        private System.Windows.Forms.ColumnHeader columnHeader4;
-        private System.Windows.Forms.ColumnHeader columnHeader8;
+        private System.Windows.Forms.ColumnHeader bg_code1;
+        private System.Windows.Forms.ColumnHeader bg_code;
+        private System.Windows.Forms.ColumnHeader bc_code;
+        private System.Windows.Forms.ColumnHeader bg_name1;
+        private System.Windows.Forms.ColumnHeader bc_code1;
+        private System.Windows.Forms.ColumnHeader bc_name;
+        private System.Windows.Forms.ColumnHeader bc_note;
     }
 }

+ 6 - 6
UAS-MES/FunctionCode/Make/Make_NewBadCode.cs

@@ -87,7 +87,7 @@ namespace UAS_MES.Make
                     AddToReject = false;
                     for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
                     {
-                        if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
+                        if ((ChoosedRejectList.Items[j].SubItems[3].Text == WaitRejectList.Items[i].SubItems[3].Text))
                         {
                             AddToReject = true;
                             break;
@@ -108,7 +108,7 @@ namespace UAS_MES.Make
                     AddToReject = false;
                     for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
                     {
-                        if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
+                        if ((ChoosedRejectList.Items[j].SubItems[3].Text == WaitRejectList.Items[i].SubItems[3].Text))
                         {
                             AddToReject = true;
                             break;
@@ -174,9 +174,9 @@ namespace UAS_MES.Make
                 {
                     bgcode[i] = ChoosedRejectList.Items[i].SubItems[1].Text;
                     //获取所有的不良代码
-                    bccode[i] = ChoosedRejectList.Items[i].SubItems[2].Text;
+                    bccode[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
                     //获取所有的不良备注
-                    bcremark[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
+                    bcremark[i] = ChoosedRejectList.Items[i].SubItems[5].Text;
                     id[i] = dh.GetSEQ("MakeBad_seq");
                 }
             }
@@ -187,7 +187,7 @@ namespace UAS_MES.Make
             sql.Append("select :id,ma_code,ms_code,ms_sncode,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "',ms_sourcecode,:bc_code,:bg_code,'',");
             sql.Append("sp_soncode,'0',:bc_remark from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
             sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + sncode + "'");
-            dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "id", "bg_code", "bc_code", "bc_remark" }, bgcode, id, bgcode, bccode, bcremark);
+            dh.BatchInsert(sql.GetString(), new string[] { "bc_code", "id", "bc_code", "bg_code", "bc_remark" }, bccode, id, bccode, bgcode, bcremark);
             MessageBox.Show("保存成功");
             Close();
         }
@@ -203,7 +203,7 @@ namespace UAS_MES.Make
         private void LoadBadCodeListView()
         {
             sql.Clear();
-            sql.Append("select bg_code,bc_name,bc_note from badcode left join badgroup on bc_groupcode=bg_code where bc_groupcode='" + badgroup.Text + "' and bg_code is not null");
+            sql.Append("select bg_code,bg_name,bc_code,bc_name,bc_note from badcode left join badgroup on bc_groupcode=bg_code where bc_groupcode='" + badgroup.Text + "' and bg_code is not null");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             //往listview中添加数据
             WaitRejectList.Items.Clear();

+ 4 - 4
UAS-MES/FunctionCode/Make/Make_Repair.Designer.cs

@@ -294,7 +294,7 @@
             this.mbp_part_label.AutoSize = true;
             this.mbp_part_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbp_part_label.ForeColor = System.Drawing.Color.Black;
-            this.mbp_part_label.Location = new System.Drawing.Point(482, 298);
+            this.mbp_part_label.Location = new System.Drawing.Point(481, 298);
             this.mbp_part_label.Name = "mbp_part_label";
             this.mbp_part_label.Size = new System.Drawing.Size(74, 21);
             this.mbp_part_label.TabIndex = 105;
@@ -432,7 +432,7 @@
             this.mbp_partdgv.Margin = new System.Windows.Forms.Padding(2);
             this.mbp_partdgv.Name = "mbp_partdgv";
             this.mbp_partdgv.RowTemplate.Height = 27;
-            this.mbp_partdgv.Size = new System.Drawing.Size(270, 152);
+            this.mbp_partdgv.Size = new System.Drawing.Size(278, 152);
             this.mbp_partdgv.TabIndex = 121;
             // 
             // mbp_part1
@@ -457,11 +457,11 @@
             this.mbl_locdgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.mbl_loc1,
             this.mbl_id});
-            this.mbl_locdgv.Location = new System.Drawing.Point(186, 335);
+            this.mbl_locdgv.Location = new System.Drawing.Point(180, 335);
             this.mbl_locdgv.Margin = new System.Windows.Forms.Padding(2);
             this.mbl_locdgv.Name = "mbl_locdgv";
             this.mbl_locdgv.RowTemplate.Height = 27;
-            this.mbl_locdgv.Size = new System.Drawing.Size(270, 152);
+            this.mbl_locdgv.Size = new System.Drawing.Size(278, 152);
             this.mbl_locdgv.TabIndex = 120;
             // 
             // mbl_loc1

+ 13 - 16
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -98,7 +98,7 @@ namespace UAS_MES.Make
             {
                 if (GetSNCode.Text == "")
                 {
-                    MessageBox.Show("序列号不允许为空!");
+                    OperatResult.AppendText(">>序列号不允许为空\n", Color.Red);
                     return;
                 }
                 string ErrorMessage = "";
@@ -121,14 +121,11 @@ namespace UAS_MES.Make
                             BaseUtil.SetFormValue(this.Controls, dt);
                             LoadBadInfTree(sender, e);
                         }
-                        else
-                            OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                        else OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                     }
-                    else
-                        OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                    else OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                 }
-                else
-                    OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                else OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
             }
         }
 
@@ -227,7 +224,7 @@ namespace UAS_MES.Make
                 if (bg_code.Text != "")
                     BadCodeTree.Nodes[bg_code.Text].Expand();
             }
-            catch (Exception){}
+            catch (Exception) { }
         }
 
         private void RefreshTreeView_Click(object sender, EventArgs e)
@@ -255,7 +252,7 @@ namespace UAS_MES.Make
                     {
                         dh.UpdateByCondition("makeserial", "ms_nextstepcode='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_status=1", "ms_sncode='" + ms_sncode.Text + "'");
                         dh.ExecuteSql(insert_makeprocess.Replace("#", "完成维修"), "insert", ms_sncode.Text, User.CurrentStepCode);
-                        OperatResult.AppendText(">>序列号" + ms_sncode.Text + "回流成功\n", Color.Green);
+                        OperatResult.AppendText(">>" + ms_sncode.Text + " 序列号回流成功\n", Color.Green);
                         GetSNCode.Clear();
                     }
                 }
@@ -267,7 +264,7 @@ namespace UAS_MES.Make
             //判断是否有无法维修的记录
             int ScrapNum = int.Parse(dh.getFieldDataByCondition("makebad", "count(0) cn", "mb_sncode='" + ms_sncode.Text + "'").ToString());
             if (ScrapNum == 0)
-                OperatResult.AppendText(">>存在无法维修的记录才允许报废\n", Color.Red);
+                OperatResult.AppendText(">>" + ms_sncode.Text + "存在无法维修的记录才允许报废\n", Color.Red);
             else
             {
                 string confirm = MessageBox.Show(this.ParentForm, "此操作不可撤销,是否确认报废", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk).ToString();
@@ -330,7 +327,7 @@ namespace UAS_MES.Make
             sql.Append(",:location,'" + bc_code.Text + "','" + nr_code.Text + "','" + GetSNCode.Text + "','" + macode + "',");
             sql.Append("sysdate,'" + User.UserCode + "' from dual");
             dh.BatchInsert(sql.GetString(), new string[] { "location" }, location.ToArray());
-            MessageBox.Show("保存成功");
+            OperatResult.AppendText(">>保存成功\n", Color.Red);
         }
 
         private void DeleteRepairInf_Click(object sender, EventArgs e)
@@ -355,8 +352,7 @@ namespace UAS_MES.Make
                 }
                 else OperatResult.AppendText(">>必须选择不良原因\n", Color.Red);
             }
-            else
-                OperatResult.AppendText(">>序列号错误,不存在或者不处于维修状态\n", Color.Red);
+            else OperatResult.AppendText(">>序列号错误,不存在或者不处于维修状态\n", Color.Red);
         }
 
         private void SaveBadLocation_Click(object sender, EventArgs e)
@@ -375,9 +371,9 @@ namespace UAS_MES.Make
                     }
                     else OperatResult.AppendText(">>请先选择不良原因\n", Color.Red);
                 }
+                else OperatResult.AppendText(">>不良位置不能为空\n", Color.Red);
             }
-            else
-                OperatResult.AppendText(">>序列号错误,不存在或者不处于维修状态\n", Color.Red);
+            else OperatResult.AppendText(">>序列号错误,不存在或者不处于维修状态\n", Color.Red);
         }
 
         private void mbl_loc_TextChanged(object sender, EventArgs e)
@@ -414,8 +410,9 @@ namespace UAS_MES.Make
                         dr["mbp_part"] = prodcode.Text;
                         dt.Rows.Add(dr);
                     }
-                    else MessageBox.Show("请先选择不良原因");
+                    else OperatResult.AppendText(">>请先选择不良原因\n", Color.Red);
                 }
+                else OperatResult.AppendText(">>不良零件不能为空\n", Color.Red);
             }
         }
 

+ 0 - 3
UAS-MES/FunctionCode/Make/Make_Repair.resx

@@ -126,9 +126,6 @@
   <metadata name="mbp_part1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mbp_part1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 9 - 8
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -161,7 +161,6 @@ namespace UAS_MES.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-
                 bool ifFirst;
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
@@ -183,7 +182,7 @@ namespace UAS_MES.Make
                             string stepcode = dt.Rows[0]["ms_stepcode"].ToString();
                             if (stepcode == User.CurrentStepCode && (status == "1" || status == "2"))
                             {
-                                OperateResult.AppendText(">>序列号已执行过" + User.CurrentStepCode + "工序,采集结果为良品\n", Color.Red);
+                                OperateResult.AppendText(">>"+ ms_sncode.Text+ " 序列号已执行过" + User.CurrentStepCode + "工序,采集结果为良品\n", Color.Red);
                                 return;
                             }
                         }
@@ -194,6 +193,7 @@ namespace UAS_MES.Make
                 }
                 else
                     OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                ms_sncode.Text = "";
             }
         }
 
@@ -243,7 +243,6 @@ namespace UAS_MES.Make
             ChoosedRejectList.BeginUpdate();
             for (int i = 0; i < dt.Rows.Count; i++)
             {
-                Console.WriteLine("ChoosedRejectList"+dt.Rows[i]["bc_code"].ToString());
                 if (!WaitList.Contains(dt.Rows[i]["bc_code"].ToString()))
                 {
                     ListViewItem lvi = new ListViewItem();
@@ -265,7 +264,6 @@ namespace UAS_MES.Make
             WaitRejectList.BeginUpdate();
             for (int i = 0; i < dt.Rows.Count; i++)
             {
-                Console.WriteLine("WaitRejectList"+dt.Rows[i]["bc_code"].ToString());
                 if (!ChoosedList.Contains(dt.Rows[i]["bc_code"].ToString()))
                 {
                     ListViewItem lvi = new ListViewItem();
@@ -273,9 +271,7 @@ namespace UAS_MES.Make
                     lvi.Text = "";
                     WaitList.Add(dt.Rows[i]["bc_code"].ToString());
                     for (int j = 0; j < dt.Columns.Count; j++)
-                    {
                         lvi.SubItems.Add(dt.Rows[i][j].ToString());
-                    }
                     WaitRejectList.Items.Add(lvi);
                 }
             }
@@ -333,6 +329,11 @@ namespace UAS_MES.Make
 
         private void Save_Click(object sender, EventArgs e)
         {
+            if (ms_sncode.Text == "")
+            {
+                OperateResult.AppendText(">>序列号不允许为空\n", Color.Red);
+                return;
+            }
             if (GoodProduct.Checked)
             {
                 SetTestPass();
@@ -431,7 +432,7 @@ namespace UAS_MES.Make
                     {
                         if (ChoosedRejectList.Items[i].ListView.Items[i].SubItems[2].Text == bc_code.Text)
                         {
-                            OperateResult.AppendText(">>已添加过不良代码\n", Color.Red);
+                            OperateResult.AppendText(">>已添加过不良代码"+bc_code.Text+"\n", Color.Red);
                             return;
                         }
                     }
@@ -441,7 +442,7 @@ namespace UAS_MES.Make
                         lvi.SubItems.Add(dt.Rows[0][j].ToString());
                     ChoosedRejectList.Items.Add(lvi);
                 }
-                else OperateResult.AppendText(">>不良代码不存在\n", Color.Red);
+                else OperateResult.AppendText(">>不良代码"+bc_code.Text+"不存在\n", Color.Red);
             }
         }
 

+ 4 - 10
UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.cs

@@ -196,7 +196,7 @@ namespace UAS_MES.OQC
                 {
                     if (dt.Rows[0]["re_statuscode"].ToString() == "AUDITED")
                     {
-                        MessageBox.Show("该批次存在已审核的返修工单,不允许撤销");
+                        OperateResult.AppendText(">> 该批次存在已审核的返修工单,不允许撤销\n", Color.Red);
                         return;
                     }
                     else
@@ -207,10 +207,7 @@ namespace UAS_MES.OQC
                             dh.ExecuteSql("delete from reworkdetail where rd_checkno='" + ob_checkno.Text + "' ", "delete");
                             dh.ExecuteSql("delete from rework where re_checkno='" + ob_checkno.Text + "' ", "delete");
                         }
-                        else
-                        {
-                            return;
-                        }
+                        else return;
                     }
                 }
                 dh.ExecuteSql("update OQCBatch set ob_status='UNCHECK' ,ob_result='' where ob_checkno='" + ob_checkno.Text + "'", "select");
@@ -219,10 +216,7 @@ namespace UAS_MES.OQC
                 OperateResult.AppendText(">>撤销判退成功\n", Color.Green);
                 GetBatch.PerformClick();
             }
-            else
-            {
-                OperateResult.AppendText(">>该抽检批次未判退,无需撤销判退\n", Color.Red);
-            }
+            else OperateResult.AppendText(">>该抽检批次未判退,无需撤销判退\n", Color.Red);
         }
 
         private void Clean_Click(object sender, EventArgs e)
@@ -289,7 +283,7 @@ namespace UAS_MES.OQC
                 {
                     //更新下一工序
                     string ErrorMessage = "";
-                    LogicHandler.UpdateMakeMessage(ms_sncode.Text, ob_makecode.Text,"OQC批判过", User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
+                    LogicHandler.UpdateMakeMessage(ms_sncode.Text, ob_makecode.Text, "OQC批判过", User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
                     //记录操作日志
                     LogicHandler.InsertMakeProcess(ms_sncode.Text, ob_makecode.Text, "批结果判定", Operate, User.UserName);
                 }

+ 226 - 158
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -33,7 +33,7 @@
             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();
-            this.ob_status_label = new System.Windows.Forms.Label();
+            this.bc_code_label = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
@@ -56,15 +56,27 @@
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_makecode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ChoosedDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
+            this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.WaitChooseDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
+            this.Column3 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.bc_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             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.dataGridViewCheckBoxColumn1 = 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();
-            this.ob_ngqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_okqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ob_ngqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_batchqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.bccode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.Refresh = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -75,18 +87,10 @@
             this.ob_checkno = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.obd_outboxcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.dataGridViewCheckBoxColumn1 = 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.Column3 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.bc_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ob_aqlcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ob_aqlcode_label = new System.Windows.Forms.Label();
+            this.ob_maxngacceptqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ob_maxngacceptqty_label = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -128,17 +132,17 @@
             this.ms_sncode_label.TabIndex = 152;
             this.ms_sncode_label.Text = "序列号";
             // 
-            // ob_status_label
+            // bc_code_label
             // 
-            this.ob_status_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            this.bc_code_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.ob_status_label.AutoSize = true;
-            this.ob_status_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_status_label.Location = new System.Drawing.Point(807, 164);
-            this.ob_status_label.Name = "ob_status_label";
-            this.ob_status_label.Size = new System.Drawing.Size(74, 21);
-            this.ob_status_label.TabIndex = 177;
-            this.ob_status_label.Text = "不良代码";
+            this.bc_code_label.AutoSize = true;
+            this.bc_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_code_label.Location = new System.Drawing.Point(807, 171);
+            this.bc_code_label.Name = "bc_code_label";
+            this.bc_code_label.Size = new System.Drawing.Size(74, 21);
+            this.bc_code_label.TabIndex = 177;
+            this.bc_code_label.Text = "不良代码";
             // 
             // label1
             // 
@@ -146,7 +150,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(807, 26);
+            this.label1.Location = new System.Drawing.Point(807, 41);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(58, 21);
             this.label1.TabIndex = 179;
@@ -158,7 +162,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(807, 129);
+            this.label4.Location = new System.Drawing.Point(807, 139);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(74, 21);
             this.label4.TabIndex = 185;
@@ -170,7 +174,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(807, 92);
+            this.label5.Location = new System.Drawing.Point(807, 105);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(58, 21);
             this.label5.TabIndex = 187;
@@ -182,7 +186,7 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             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(807, 58);
+            this.label6.Location = new System.Drawing.Point(807, 71);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(58, 21);
             this.label6.TabIndex = 189;
@@ -192,7 +196,7 @@
             // 
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(466, 166);
+            this.label9.Location = new System.Drawing.Point(466, 174);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(74, 21);
             this.label9.TabIndex = 192;
@@ -258,7 +262,7 @@
             // ob_status
             // 
             this.ob_status.AutoSize = true;
-            this.ob_status.Location = new System.Drawing.Point(497, 137);
+            this.ob_status.Location = new System.Drawing.Point(15, 9);
             this.ob_status.Name = "ob_status";
             this.ob_status.Size = new System.Drawing.Size(0, 12);
             this.ob_status.TabIndex = 212;
@@ -305,7 +309,7 @@
             this.ob_projectcode.BackColor = System.Drawing.Color.White;
             this.ob_projectcode.Enabled = false;
             this.ob_projectcode.ID = null;
-            this.ob_projectcode.Location = new System.Drawing.Point(663, 22);
+            this.ob_projectcode.Location = new System.Drawing.Point(95, 2);
             this.ob_projectcode.Name = "ob_projectcode";
             this.ob_projectcode.Power = null;
             this.ob_projectcode.Size = new System.Drawing.Size(116, 21);
@@ -384,13 +388,29 @@
             this.ChoosedDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.bc_code1,
             this.bc_name1});
-            this.ChoosedDGV.Location = new System.Drawing.Point(810, 197);
+            this.ChoosedDGV.Location = new System.Drawing.Point(810, 204);
             this.ChoosedDGV.Name = "ChoosedDGV";
             this.ChoosedDGV.RowHeadersWidth = 20;
             this.ChoosedDGV.RowTemplate.Height = 23;
-            this.ChoosedDGV.Size = new System.Drawing.Size(244, 256);
+            this.ChoosedDGV.Size = new System.Drawing.Size(244, 257);
             this.ChoosedDGV.TabIndex = 205;
             // 
+            // bc_code1
+            // 
+            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.bc_code1.DataPropertyName = "bc_code";
+            this.bc_code1.HeaderText = "不良代码";
+            this.bc_code1.Name = "bc_code1";
+            this.bc_code1.Width = 78;
+            // 
+            // bc_name1
+            // 
+            this.bc_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.bc_name1.DataPropertyName = "bc_name";
+            this.bc_name1.HeaderText = "不良原因";
+            this.bc_name1.Name = "bc_name1";
+            this.bc_name1.Width = 78;
+            // 
             // WaitChooseDGV
             // 
             this.WaitChooseDGV.AllowUserToAddRows = false;
@@ -399,7 +419,7 @@
             this.Column3,
             this.bc_code,
             this.bc_name});
-            this.WaitChooseDGV.Location = new System.Drawing.Point(472, 196);
+            this.WaitChooseDGV.Location = new System.Drawing.Point(472, 204);
             this.WaitChooseDGV.Name = "WaitChooseDGV";
             this.WaitChooseDGV.RowHeadersWidth = 20;
             this.WaitChooseDGV.RowTemplate.Height = 23;
@@ -409,6 +429,30 @@
             this.WaitChooseDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.WaitChooseDGV_DataError);
             this.WaitChooseDGV.RowHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.WaitChooseDGV_RowHeaderMouseClick);
             // 
+            // Column3
+            // 
+            this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Column3.HeaderText = "勾选";
+            this.Column3.Name = "Column3";
+            this.Column3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Column3.Width = 60;
+            // 
+            // bc_code
+            // 
+            this.bc_code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.bc_code.DataPropertyName = "pb_badgroup";
+            this.bc_code.HeaderText = "不良分组";
+            this.bc_code.Name = "bc_code";
+            this.bc_code.Width = 78;
+            // 
+            // bc_name
+            // 
+            this.bc_name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.bc_name.DataPropertyName = "bg_name";
+            this.bc_name.HeaderText = "分组名称";
+            this.bc_name.Name = "bc_name";
+            this.bc_name.Width = 78;
+            // 
             // ob_remark
             // 
             this.ob_remark.AllPower = null;
@@ -463,10 +507,61 @@
             this.CheckTypeDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.CheckTypeDGV_DataError);
             this.CheckTypeDGV.RowHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.CheckTypeDGV_RowHeaderMouseClick);
             // 
+            // dataGridViewCheckBoxColumn1
+            // 
+            this.dataGridViewCheckBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewCheckBoxColumn1.HeaderText = "勾选";
+            this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1";
+            this.dataGridViewCheckBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.dataGridViewCheckBoxColumn1.Width = 60;
+            // 
+            // oi_itemcode
+            // 
+            this.oi_itemcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            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";
+            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 = 78;
+            // 
+            // 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 = 78;
+            // 
+            // ois_remark
+            // 
+            this.ois_remark.HeaderText = "";
+            this.ois_remark.Name = "ois_remark";
+            // 
+            // ois_status
+            // 
+            this.ois_status.HeaderText = "";
+            this.ois_status.Name = "ois_status";
+            // 
+            // ois_id
+            // 
+            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")));
-            this.ChooseedReject.Location = new System.Drawing.Point(750, 349);
+            this.ChooseedReject.Location = new System.Drawing.Point(750, 357);
             this.ChooseedReject.Name = "ChooseedReject";
             this.ChooseedReject.Size = new System.Drawing.Size(50, 23);
             this.ChooseedReject.TabIndex = 195;
@@ -476,7 +571,7 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(750, 285);
+            this.WaitReject.Location = new System.Drawing.Point(750, 293);
             this.WaitReject.Name = "WaitReject";
             this.WaitReject.Size = new System.Drawing.Size(50, 23);
             this.WaitReject.TabIndex = 194;
@@ -489,58 +584,58 @@
             this.oi_checkqty.BackColor = System.Drawing.Color.White;
             this.oi_checkqty.Enabled = false;
             this.oi_checkqty.ID = null;
-            this.oi_checkqty.Location = new System.Drawing.Point(909, 59);
+            this.oi_checkqty.Location = new System.Drawing.Point(908, 72);
             this.oi_checkqty.Name = "oi_checkqty";
             this.oi_checkqty.Power = null;
-            this.oi_checkqty.Size = new System.Drawing.Size(146, 21);
+            this.oi_checkqty.Size = new System.Drawing.Size(147, 21);
             this.oi_checkqty.Str = null;
             this.oi_checkqty.Str1 = null;
             this.oi_checkqty.Str2 = null;
             this.oi_checkqty.TabIndex = 190;
             this.oi_checkqty.Tag = "NoAuto";
             // 
-            // ob_ngqty
-            // 
-            this.ob_ngqty.AllPower = null;
-            this.ob_ngqty.BackColor = System.Drawing.Color.White;
-            this.ob_ngqty.Enabled = false;
-            this.ob_ngqty.ID = null;
-            this.ob_ngqty.Location = new System.Drawing.Point(909, 93);
-            this.ob_ngqty.Name = "ob_ngqty";
-            this.ob_ngqty.Power = null;
-            this.ob_ngqty.Size = new System.Drawing.Size(146, 21);
-            this.ob_ngqty.Str = null;
-            this.ob_ngqty.Str1 = null;
-            this.ob_ngqty.Str2 = null;
-            this.ob_ngqty.TabIndex = 188;
-            this.ob_ngqty.Tag = "NoAuto";
-            // 
             // ob_okqty
             // 
             this.ob_okqty.AllPower = null;
             this.ob_okqty.BackColor = System.Drawing.Color.White;
             this.ob_okqty.Enabled = false;
             this.ob_okqty.ID = null;
-            this.ob_okqty.Location = new System.Drawing.Point(909, 130);
+            this.ob_okqty.Location = new System.Drawing.Point(908, 106);
             this.ob_okqty.Name = "ob_okqty";
             this.ob_okqty.Power = null;
-            this.ob_okqty.Size = new System.Drawing.Size(146, 21);
+            this.ob_okqty.Size = new System.Drawing.Size(147, 21);
             this.ob_okqty.Str = null;
             this.ob_okqty.Str1 = null;
             this.ob_okqty.Str2 = null;
-            this.ob_okqty.TabIndex = 186;
+            this.ob_okqty.TabIndex = 188;
             this.ob_okqty.Tag = "NoAuto";
             // 
+            // ob_ngqty
+            // 
+            this.ob_ngqty.AllPower = null;
+            this.ob_ngqty.BackColor = System.Drawing.Color.White;
+            this.ob_ngqty.Enabled = false;
+            this.ob_ngqty.ID = null;
+            this.ob_ngqty.Location = new System.Drawing.Point(908, 140);
+            this.ob_ngqty.Name = "ob_ngqty";
+            this.ob_ngqty.Power = null;
+            this.ob_ngqty.Size = new System.Drawing.Size(147, 21);
+            this.ob_ngqty.Str = null;
+            this.ob_ngqty.Str1 = null;
+            this.ob_ngqty.Str2 = null;
+            this.ob_ngqty.TabIndex = 186;
+            this.ob_ngqty.Tag = "NoAuto";
+            // 
             // ob_batchqty
             // 
             this.ob_batchqty.AllPower = null;
             this.ob_batchqty.BackColor = System.Drawing.Color.White;
             this.ob_batchqty.Enabled = false;
             this.ob_batchqty.ID = null;
-            this.ob_batchqty.Location = new System.Drawing.Point(909, 27);
+            this.ob_batchqty.Location = new System.Drawing.Point(908, 42);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Power = null;
-            this.ob_batchqty.Size = new System.Drawing.Size(146, 21);
+            this.ob_batchqty.Size = new System.Drawing.Size(147, 21);
             this.ob_batchqty.Str = null;
             this.ob_batchqty.Str1 = null;
             this.ob_batchqty.Str2 = null;
@@ -552,15 +647,15 @@
             this.bccode.AllPower = null;
             this.bccode.BackColor = System.Drawing.Color.White;
             this.bccode.ID = null;
-            this.bccode.Location = new System.Drawing.Point(910, 166);
+            this.bccode.Location = new System.Drawing.Point(908, 175);
             this.bccode.Name = "bccode";
             this.bccode.Power = null;
-            this.bccode.Size = new System.Drawing.Size(143, 21);
+            this.bccode.Size = new System.Drawing.Size(147, 21);
             this.bccode.Str = null;
             this.bccode.Str1 = null;
             this.bccode.Str2 = null;
             this.bccode.TabIndex = 178;
-            this.bccode.Tag = "ifRead";
+            this.bccode.Tag = "bc_code";
             this.bccode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bccode_KeyDown);
             // 
             // Refresh
@@ -710,102 +805,71 @@
             this.ms_sncode.Tag = "NoAuto";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_sncode_KeyDown);
             // 
-            // dataGridViewCheckBoxColumn1
-            // 
-            this.dataGridViewCheckBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.dataGridViewCheckBoxColumn1.HeaderText = "勾选";
-            this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1";
-            this.dataGridViewCheckBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.dataGridViewCheckBoxColumn1.Width = 60;
-            // 
-            // oi_itemcode
-            // 
-            this.oi_itemcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            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";
-            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 = 78;
-            // 
-            // 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 = 78;
-            // 
-            // ois_remark
-            // 
-            this.ois_remark.HeaderText = "";
-            this.ois_remark.Name = "ois_remark";
-            // 
-            // ois_status
-            // 
-            this.ois_status.HeaderText = "";
-            this.ois_status.Name = "ois_status";
-            // 
-            // ois_id
-            // 
-            this.ois_id.DataPropertyName = "ois_id";
-            this.ois_id.HeaderText = "";
-            this.ois_id.Name = "ois_id";
-            this.ois_id.Visible = false;
-            // 
-            // Column3
-            // 
-            this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.Column3.HeaderText = "勾选";
-            this.Column3.Name = "Column3";
-            this.Column3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.Column3.Width = 60;
-            // 
-            // bc_code
-            // 
-            this.bc_code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.bc_code.DataPropertyName = "pb_badgroup";
-            this.bc_code.HeaderText = "不良分组";
-            this.bc_code.Name = "bc_code";
-            this.bc_code.Width = 78;
-            // 
-            // bc_name
-            // 
-            this.bc_name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.bc_name.DataPropertyName = "bg_name";
-            this.bc_name.HeaderText = "分组名称";
-            this.bc_name.Name = "bc_name";
-            this.bc_name.Width = 78;
-            // 
-            // bc_code1
-            // 
-            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.bc_code1.DataPropertyName = "bc_code";
-            this.bc_code1.HeaderText = "不良代码";
-            this.bc_code1.Name = "bc_code1";
-            this.bc_code1.Width = 78;
-            // 
-            // bc_name1
-            // 
-            this.bc_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.bc_name1.DataPropertyName = "bc_name";
-            this.bc_name1.HeaderText = "不良原因";
-            this.bc_name1.Name = "bc_name1";
-            this.bc_name1.Width = 78;
+            // ob_aqlcode
+            // 
+            this.ob_aqlcode.AllPower = null;
+            this.ob_aqlcode.BackColor = System.Drawing.Color.White;
+            this.ob_aqlcode.Enabled = false;
+            this.ob_aqlcode.ID = null;
+            this.ob_aqlcode.Location = new System.Drawing.Point(908, 7);
+            this.ob_aqlcode.Name = "ob_aqlcode";
+            this.ob_aqlcode.Power = null;
+            this.ob_aqlcode.Size = new System.Drawing.Size(146, 21);
+            this.ob_aqlcode.Str = null;
+            this.ob_aqlcode.Str1 = null;
+            this.ob_aqlcode.Str2 = null;
+            this.ob_aqlcode.TabIndex = 215;
+            this.ob_aqlcode.Tag = "NoAuto";
+            // 
+            // ob_aqlcode_label
+            // 
+            this.ob_aqlcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.ob_aqlcode_label.AutoSize = true;
+            this.ob_aqlcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_aqlcode_label.Location = new System.Drawing.Point(807, 7);
+            this.ob_aqlcode_label.Name = "ob_aqlcode_label";
+            this.ob_aqlcode_label.Size = new System.Drawing.Size(42, 21);
+            this.ob_aqlcode_label.TabIndex = 214;
+            this.ob_aqlcode_label.Text = "AQL";
+            // 
+            // ob_maxngacceptqty
+            // 
+            this.ob_maxngacceptqty.AllPower = null;
+            this.ob_maxngacceptqty.BackColor = System.Drawing.Color.White;
+            this.ob_maxngacceptqty.Enabled = false;
+            this.ob_maxngacceptqty.ID = null;
+            this.ob_maxngacceptqty.Location = new System.Drawing.Point(645, 42);
+            this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
+            this.ob_maxngacceptqty.Power = null;
+            this.ob_maxngacceptqty.Size = new System.Drawing.Size(146, 21);
+            this.ob_maxngacceptqty.Str = null;
+            this.ob_maxngacceptqty.Str1 = null;
+            this.ob_maxngacceptqty.Str2 = null;
+            this.ob_maxngacceptqty.TabIndex = 217;
+            this.ob_maxngacceptqty.Tag = "NoAuto";
+            // 
+            // ob_maxngacceptqty_label
+            // 
+            this.ob_maxngacceptqty_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.ob_maxngacceptqty_label.AutoSize = true;
+            this.ob_maxngacceptqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_maxngacceptqty_label.Location = new System.Drawing.Point(641, 9);
+            this.ob_maxngacceptqty_label.Name = "ob_maxngacceptqty_label";
+            this.ob_maxngacceptqty_label.Size = new System.Drawing.Size(138, 21);
+            this.ob_maxngacceptqty_label.TabIndex = 216;
+            this.ob_maxngacceptqty_label.Text = "最大不合格通过数";
             // 
             // OQC_SamplingDataCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1065, 600);
+            this.ClientSize = new System.Drawing.Size(1065, 610);
+            this.Controls.Add(this.ob_maxngacceptqty);
+            this.Controls.Add(this.ob_maxngacceptqty_label);
+            this.Controls.Add(this.ob_aqlcode);
+            this.Controls.Add(this.ob_aqlcode_label);
             this.Controls.Add(this.ob_projectcode);
             this.Controls.Add(this.ob_status);
             this.Controls.Add(this.Clean);
@@ -827,14 +891,14 @@
             this.Controls.Add(this.label9);
             this.Controls.Add(this.oi_checkqty);
             this.Controls.Add(this.label6);
-            this.Controls.Add(this.ob_ngqty);
-            this.Controls.Add(this.label5);
             this.Controls.Add(this.ob_okqty);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.ob_ngqty);
             this.Controls.Add(this.label4);
             this.Controls.Add(this.ob_batchqty);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.bccode);
-            this.Controls.Add(this.ob_status_label);
+            this.Controls.Add(this.bc_code_label);
             this.Controls.Add(this.Refresh);
             this.Controls.Add(this.GetBatch);
             this.Controls.Add(this.BatchPass);
@@ -874,12 +938,12 @@
         private CustomControl.ButtonUtil.NormalButton GetBatch;
         private new CustomControl.ButtonUtil.NormalButton Refresh;
         private CustomControl.TextBoxWithIcon.EnterTextBox bccode;
-        private System.Windows.Forms.Label ob_status_label;
+        private System.Windows.Forms.Label bc_code_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_batchqty;
         private System.Windows.Forms.Label label1;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ob_okqty;
-        private System.Windows.Forms.Label label4;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_ngqty;
+        private System.Windows.Forms.Label label4;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ob_okqty;
         private System.Windows.Forms.Label label5;
         private CustomControl.TextBoxWithIcon.EnterTextBox oi_checkqty;
         private System.Windows.Forms.Label label6;
@@ -919,5 +983,9 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_remark;
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_status;
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_id;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ob_aqlcode;
+        private System.Windows.Forms.Label ob_aqlcode_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ob_maxngacceptqty;
+        private System.Windows.Forms.Label ob_maxngacceptqty_label;
     }
 }

+ 53 - 23
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -21,6 +21,7 @@ namespace UAS_MES.OQC
         List<DataGridViewRow> dgvr = new List<DataGridViewRow>();
         LogStringBuilder sql = new LogStringBuilder();
         string[] LevelDefect = new string[] { "A#A", "B#B", "C#C", "D#D" };
+
         public OQC_SamplingDataCollection()
         {
             InitializeComponent();
@@ -46,10 +47,7 @@ namespace UAS_MES.OQC
                 BaseUtil.SetFormValue(Controls, dt[0]);
                 BaseUtil.FillExpandDgvWithDataTable(CheckTypeDGV, dt[1], true);
             }
-            else
-            {
-                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
-            }
+            else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
         }
 
         private void Clean_Click(object sender, EventArgs e)
@@ -71,37 +69,22 @@ namespace UAS_MES.OQC
                         if (dt.Rows.Count > 0)
                         {
                             if (dt.Rows[0]["ob_source"].ToString() != "工序")
-                            {
                                 GetBatchTypeGridData();
-                            }
                             else
                             {
                                 string ErrorMessage = "";
                                 bool ifFirst;
                                 if (LogicHandler.CheckCurrentStepAndIfFirst(sncode.Text, dt.Rows[0]["ob_makecode"].ToString(), User.UserSourceCode, "OQC!SamplingDataCollection", out ifFirst, out ErrorMessage))
-                                {
                                     GetBatchTypeGridData();
-                                }
                                 else
-                                {
                                     OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
-                                }
                             }
                         }
-                        else
-                        {
-                            OperateResult.AppendText(">>该序列号不属于当前抽检批次\n", Color.Red);
-                        }
-                    }
-                    else
-                    {
-                        OperateResult.AppendText(">>送检批次必须是待检验或者检验中\n", Color.Red);
+                        else OperateResult.AppendText(">>该序列号不属于当前抽检批次\n", Color.Red);
                     }
+                    else OperateResult.AppendText(">>送检批次必须是待检验或者检验中\n", Color.Red);
                 }
-                else
-                {
-                    OperateResult.AppendText(">>输入的内容不能为空\n", Color.Red);
-                }
+                else OperateResult.AppendText(">>输入的内容不能为空\n", Color.Red);
             }
         }
 
@@ -214,7 +197,26 @@ namespace UAS_MES.OQC
 
         private void BatchPass_Click(object sender, EventArgs e)
         {
-
+            if (CheckBefore())
+            {
+                sql.Clear();
+                sql.Append("select max(nvl(ad_maxngacceptqty,0)) maxngacceptqty from QUA_Aql,QUA_AqlDetail where al_id=ad_alid ");
+                sql.Append("and al_statuscode='AUDITED' and al_code ='" + ob_aqlcode.Text + "' and " + (ob_batchqty.Text != "" ? ob_batchqty.Text : "0") + " >= ad_minqty");
+                sql.Append(" and " + (ob_batchqty.Text != "" ? ob_batchqty.Text : "0") + "<=ad_maxqty ");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                if (int.Parse(ob_ngqty.Text == "" ? "0" : ob_ngqty.Text) <= int.Parse(dt.Rows[0]["maxngacceptqty"].ToString() == "" ? ob_maxngacceptqty.Text : dt.Rows[0]["maxngacceptqty"].ToString()))
+                {
+                    dh.ExecuteSql("update OQCBatch set ob_status='OK',ob_result='OK' where ob_checkno='" + ob_checkno.Text + "'", "select");
+                    string ErrorMessage;
+                    LogicHandler.UpdateMakeMessage(ms_sncode.Text, ob_makecode.Text, "OQC批判过", User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
+                    //记录操作日志
+                    LogicHandler.InsertMakeProcess(ms_sncode.Text, ob_makecode.Text, "批结果判定", "批次通过", User.UserName);
+                    GetBatch.PerformClick();
+                    OperateResult.AppendText(">>通过批成功\n", Color.Green);
+                }
+                else
+                    OperateResult.AppendText(">>当前批次不合格数为" + ob_ngqty.Text + ",大于最大不合格允通过数" + ob_maxngacceptqty.Text + "\n", Color.Red);
+            }
         }
 
         private void Refresh_Click(object sender, EventArgs e)
@@ -222,6 +224,34 @@ namespace UAS_MES.OQC
 
         }
 
+        private bool CheckBefore()
+        {
+            //如果AQL标准为空
+            if (ob_aqlcode.Text == "")
+            {
+                if (ob_maxngacceptqty.Text == "")
+                    OperateResult.AppendText(">>AQL标准为空的时候必须填写最大不合格允许通过数\n", Color.Red);
+                else
+                {
+                    sql.Clear();
+                    sql.Append("select wm_concat(oi_itemcode) codes from OQCitems where ");
+                    sql.Append("nvl(oi_checkqty,0)<oi_sampleqty  and oi_sampleqty>0 and rownum<30 and oi_checkno='" + ob_checkno.Text + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        if (dt.Rows[0]["codes"].ToString() != "")
+                        {
+                            OperateResult.AppendText(">>项目编号抽检数未达到样本数,项目编号['" + ob_makecode.Text + "']\n", Color.Red);
+                            return false;
+                        }
+                        else
+                            return true;
+                    }
+                }
+            }
+            return false;
+        }
+
         private void WaitReject_Click(object sender, EventArgs e)
         {
             BaseUtil.CleanDGVData(ChoosedDGV);

+ 1 - 3
UAS-MES/PublicMethod/LogicHandler.cs

@@ -886,16 +886,14 @@ namespace UAS_MES.PublicMethod
                 case "OQCDATACOLLECTION":
                     sql.Clear();
                     sql.Append("select ob_checkno,ob_makecode,ob_prodcode,ob_batchqty,pr_detail,ob_ngqty,ob_okqty,oi_checkqty,");
-                    sql.Append("ob_remark,ob_makecode,ob_status,ob_projectcode from OQCBatch left join product on ");
+                    sql.Append("ob_remark,ob_makecode,ob_status,ob_projectcode,ob_aqlcode,ob_maxngacceptqty from OQCBatch left join product on ");
                     sql.Append("pr_code=ob_prodcode left join oqcitems on oi_checkno =ob_checkno and oi_projectcode =ob_projectcode where ob_checkno='" + iCheckNo + "'");
                     Form = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                     //状态为UNCHECK或者CHECKING并且有抽样计划的才能操作
                     if (Form.Rows.Count > 0)
                     {
                         if (Form.Rows[0]["ob_projectcode"].ToString() == "" || !(Form.Rows[0]["ob_status"].ToString() != "UNCHECK" || Form.Rows[0]["ob_status"].ToString() != "CHECKING"))
-                        {
                             oErrorMessage = "状态为未检验或者送检中并且有抽样计划的才能操作";
-                        }
                     }
                     else
                     {