浏览代码

修改抽样数据采集

shim 8 年之前
父节点
当前提交
cde3901b1e

+ 161 - 124
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -28,8 +28,9 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OQC_SamplingDataCollection));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = 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();
@@ -47,6 +48,7 @@
             this.ob_aqlcode_label = new System.Windows.Forms.Label();
             this.ob_maxngacceptqty_label = new System.Windows.Forms.Label();
             this.ob_projectcode_label = new System.Windows.Forms.Label();
+            this.BadGroupCode = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.ob_maxngacceptqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_aqlcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_projectcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -94,10 +96,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.BadGroupCode = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
+            this.Filter = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
+            this.BadInfoSource = new System.Windows.Forms.BindingSource(this.components);
+            this.label2 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfoSource)).BeginInit();
             this.SuspendLayout();
             // 
             // ob_checkno_label
@@ -106,10 +111,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             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.Location = new System.Drawing.Point(17, 32);
+            this.ob_checkno_label.Location = new System.Drawing.Point(19, 38);
             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(72, 27);
+            this.ob_checkno_label.Size = new System.Drawing.Size(86, 31);
             this.ob_checkno_label.TabIndex = 156;
             this.ob_checkno_label.Text = "抽检批";
             // 
@@ -119,10 +124,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.obd_outboxcode_label.AutoSize = true;
             this.obd_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.obd_outboxcode_label.Location = new System.Drawing.Point(17, 72);
+            this.obd_outboxcode_label.Location = new System.Drawing.Point(19, 86);
             this.obd_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.obd_outboxcode_label.Name = "obd_outboxcode_label";
-            this.obd_outboxcode_label.Size = new System.Drawing.Size(52, 27);
+            this.obd_outboxcode_label.Size = new System.Drawing.Size(62, 31);
             this.obd_outboxcode_label.TabIndex = 154;
             this.obd_outboxcode_label.Text = "箱号";
             // 
@@ -132,10 +137,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             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(17, 115);
+            this.ms_sncode_label.Location = new System.Drawing.Point(19, 138);
             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);
+            this.ms_sncode_label.Size = new System.Drawing.Size(86, 31);
             this.ms_sncode_label.TabIndex = 152;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -145,10 +150,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             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(1076, 214);
+            this.bc_code_label.Location = new System.Drawing.Point(1210, 257);
             this.bc_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_code_label.Name = "bc_code_label";
-            this.bc_code_label.Size = new System.Drawing.Size(92, 27);
+            this.bc_code_label.Size = new System.Drawing.Size(110, 31);
             this.bc_code_label.TabIndex = 177;
             this.bc_code_label.Text = "不良代码";
             // 
@@ -158,10 +163,10 @@
             | 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(1076, 51);
+            this.label1.Location = new System.Drawing.Point(1210, 61);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(72, 27);
+            this.label1.Size = new System.Drawing.Size(86, 31);
             this.label1.TabIndex = 179;
             this.label1.Text = "实批数";
             // 
@@ -171,10 +176,10 @@
             | 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(1076, 174);
+            this.label4.Location = new System.Drawing.Point(1210, 209);
             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);
+            this.label4.Size = new System.Drawing.Size(110, 31);
             this.label4.TabIndex = 185;
             this.label4.Text = "不合格数";
             // 
@@ -184,10 +189,10 @@
             | 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(1076, 131);
+            this.label5.Location = new System.Drawing.Point(1210, 157);
             this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(72, 27);
+            this.label5.Size = new System.Drawing.Size(86, 31);
             this.label5.TabIndex = 187;
             this.label5.Text = "合格数";
             // 
@@ -197,10 +202,10 @@
             | 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(1076, 90);
+            this.label6.Location = new System.Drawing.Point(1210, 108);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(72, 27);
+            this.label6.Size = new System.Drawing.Size(86, 31);
             this.label6.TabIndex = 189;
             this.label6.Text = "抽检数";
             // 
@@ -208,10 +213,10 @@
             // 
             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(621, 218);
+            this.label9.Location = new System.Drawing.Point(699, 262);
             this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(132, 27);
+            this.label9.Size = new System.Drawing.Size(158, 31);
             this.label9.TabIndex = 192;
             this.label9.Text = "待选不良分组";
             // 
@@ -221,10 +226,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.sncode_label.AutoSize = true;
             this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sncode_label.Location = new System.Drawing.Point(17, 664);
+            this.sncode_label.Location = new System.Drawing.Point(19, 797);
             this.sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.sncode_label.Name = "sncode_label";
-            this.sncode_label.Size = new System.Drawing.Size(72, 27);
+            this.sncode_label.Size = new System.Drawing.Size(86, 31);
             this.sncode_label.TabIndex = 200;
             this.sncode_label.Text = "序列号";
             // 
@@ -234,10 +239,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_remark_label.AutoSize = true;
             this.ob_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_remark_label.Location = new System.Drawing.Point(17, 706);
+            this.ob_remark_label.Location = new System.Drawing.Point(19, 847);
             this.ob_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_remark_label.Name = "ob_remark_label";
-            this.ob_remark_label.Size = new System.Drawing.Size(52, 27);
+            this.ob_remark_label.Size = new System.Drawing.Size(62, 31);
             this.ob_remark_label.TabIndex = 202;
             this.ob_remark_label.Text = "备注";
             // 
@@ -247,10 +252,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.obd_makecode_label.AutoSize = true;
             this.obd_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.obd_makecode_label.Location = new System.Drawing.Point(17, 160);
+            this.obd_makecode_label.Location = new System.Drawing.Point(19, 192);
             this.obd_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.obd_makecode_label.Name = "obd_makecode_label";
-            this.obd_makecode_label.Size = new System.Drawing.Size(72, 27);
+            this.obd_makecode_label.Size = new System.Drawing.Size(86, 31);
             this.obd_makecode_label.TabIndex = 206;
             this.obd_makecode_label.Text = "工单号";
             // 
@@ -258,20 +263,20 @@
             // 
             this.ob_prodcode_label.AutoSize = true;
             this.ob_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_prodcode_label.Location = new System.Drawing.Point(320, 160);
+            this.ob_prodcode_label.Location = new System.Drawing.Point(360, 192);
             this.ob_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_prodcode_label.Name = "ob_prodcode_label";
-            this.ob_prodcode_label.Size = new System.Drawing.Size(92, 27);
+            this.ob_prodcode_label.Size = new System.Drawing.Size(110, 31);
             this.ob_prodcode_label.TabIndex = 208;
             this.ob_prodcode_label.Text = "产品编号";
             // 
             // ob_status
             // 
             this.ob_status.AutoSize = true;
-            this.ob_status.Location = new System.Drawing.Point(20, 11);
+            this.ob_status.Location = new System.Drawing.Point(22, 13);
             this.ob_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_status.Name = "ob_status";
-            this.ob_status.Size = new System.Drawing.Size(0, 15);
+            this.ob_status.Size = new System.Drawing.Size(0, 18);
             this.ob_status.TabIndex = 212;
             this.ob_status.Visible = false;
             // 
@@ -281,10 +286,10 @@
             | 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(1076, 9);
+            this.ob_aqlcode_label.Location = new System.Drawing.Point(1210, 11);
             this.ob_aqlcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_aqlcode_label.Name = "ob_aqlcode_label";
-            this.ob_aqlcode_label.Size = new System.Drawing.Size(52, 27);
+            this.ob_aqlcode_label.Size = new System.Drawing.Size(63, 31);
             this.ob_aqlcode_label.TabIndex = 214;
             this.ob_aqlcode_label.Text = "AQL";
             // 
@@ -294,10 +299,10 @@
             | 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(855, 9);
+            this.ob_maxngacceptqty_label.Location = new System.Drawing.Point(962, 11);
             this.ob_maxngacceptqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_maxngacceptqty_label.Name = "ob_maxngacceptqty_label";
-            this.ob_maxngacceptqty_label.Size = new System.Drawing.Size(172, 27);
+            this.ob_maxngacceptqty_label.Size = new System.Drawing.Size(206, 31);
             this.ob_maxngacceptqty_label.TabIndex = 216;
             this.ob_maxngacceptqty_label.Text = "最大不合格通过数";
             // 
@@ -307,23 +312,33 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_projectcode_label.AutoSize = true;
             this.ob_projectcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_projectcode_label.Location = new System.Drawing.Point(855, 90);
+            this.ob_projectcode_label.Location = new System.Drawing.Point(962, 108);
             this.ob_projectcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_projectcode_label.Name = "ob_projectcode_label";
-            this.ob_projectcode_label.Size = new System.Drawing.Size(92, 27);
+            this.ob_projectcode_label.Size = new System.Drawing.Size(110, 31);
             this.ob_projectcode_label.TabIndex = 218;
             this.ob_projectcode_label.Text = "检验方案";
             // 
+            // BadGroupCode
+            // 
+            this.BadGroupCode.FormattingEnabled = true;
+            this.BadGroupCode.Location = new System.Drawing.Point(855, 265);
+            this.BadGroupCode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.BadGroupCode.Name = "BadGroupCode";
+            this.BadGroupCode.Size = new System.Drawing.Size(194, 26);
+            this.BadGroupCode.TabIndex = 219;
+            this.BadGroupCode.SelectedIndexChanged += new System.EventHandler(this.BadGroupCode_SelectedIndexChanged);
+            // 
             // ob_maxngacceptqty
             // 
             this.ob_maxngacceptqty.AllPower = null;
             this.ob_maxngacceptqty.BackColor = System.Drawing.Color.White;
             this.ob_maxngacceptqty.ID = null;
-            this.ob_maxngacceptqty.Location = new System.Drawing.Point(860, 51);
-            this.ob_maxngacceptqty.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_maxngacceptqty.Location = new System.Drawing.Point(968, 61);
+            this.ob_maxngacceptqty.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
             this.ob_maxngacceptqty.Power = null;
-            this.ob_maxngacceptqty.Size = new System.Drawing.Size(193, 25);
+            this.ob_maxngacceptqty.Size = new System.Drawing.Size(217, 28);
             this.ob_maxngacceptqty.Str = null;
             this.ob_maxngacceptqty.Str1 = null;
             this.ob_maxngacceptqty.Str2 = null;
@@ -336,11 +351,11 @@
             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(1211, 9);
-            this.ob_aqlcode.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_aqlcode.Location = new System.Drawing.Point(1362, 11);
+            this.ob_aqlcode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ob_aqlcode.Name = "ob_aqlcode";
             this.ob_aqlcode.Power = null;
-            this.ob_aqlcode.Size = new System.Drawing.Size(193, 25);
+            this.ob_aqlcode.Size = new System.Drawing.Size(217, 28);
             this.ob_aqlcode.Str = null;
             this.ob_aqlcode.Str1 = null;
             this.ob_aqlcode.Str2 = null;
@@ -353,11 +368,11 @@
             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(860, 132);
-            this.ob_projectcode.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_projectcode.Location = new System.Drawing.Point(968, 158);
+            this.ob_projectcode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ob_projectcode.Name = "ob_projectcode";
             this.ob_projectcode.Power = null;
-            this.ob_projectcode.Size = new System.Drawing.Size(193, 25);
+            this.ob_projectcode.Size = new System.Drawing.Size(217, 28);
             this.ob_projectcode.Str = null;
             this.ob_projectcode.Str1 = null;
             this.ob_projectcode.Str2 = null;
@@ -372,13 +387,13 @@
             this.Clean.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1349, 711);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4);
+            this.Clean.Location = new System.Drawing.Point(1518, 853);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(64, 30);
+            this.Clean.Size = new System.Drawing.Size(72, 36);
             this.Clean.TabIndex = 211;
             this.Clean.Tag = "OQC!Inspection";
             this.Clean.Text = "清除";
@@ -388,10 +403,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(916, 588);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(1030, 706);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(425, 153);
+            this.OperateResult.Size = new System.Drawing.Size(478, 183);
             this.OperateResult.TabIndex = 210;
             this.OperateResult.Text = "";
             // 
@@ -401,11 +416,11 @@
             this.ob_prodcode.BackColor = System.Drawing.Color.White;
             this.ob_prodcode.Enabled = false;
             this.ob_prodcode.ID = null;
-            this.ob_prodcode.Location = new System.Drawing.Point(460, 164);
-            this.ob_prodcode.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_prodcode.Location = new System.Drawing.Point(518, 197);
+            this.ob_prodcode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ob_prodcode.Name = "ob_prodcode";
             this.ob_prodcode.Power = null;
-            this.ob_prodcode.Size = new System.Drawing.Size(153, 25);
+            this.ob_prodcode.Size = new System.Drawing.Size(172, 28);
             this.ob_prodcode.Str = null;
             this.ob_prodcode.Str1 = null;
             this.ob_prodcode.Str2 = null;
@@ -418,11 +433,11 @@
             this.ob_makecode.BackColor = System.Drawing.Color.White;
             this.ob_makecode.Enabled = false;
             this.ob_makecode.ID = null;
-            this.ob_makecode.Location = new System.Drawing.Point(127, 164);
-            this.ob_makecode.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_makecode.Location = new System.Drawing.Point(143, 197);
+            this.ob_makecode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ob_makecode.Name = "ob_makecode";
             this.ob_makecode.Power = null;
-            this.ob_makecode.Size = new System.Drawing.Size(153, 25);
+            this.ob_makecode.Size = new System.Drawing.Size(172, 28);
             this.ob_makecode.Str = null;
             this.ob_makecode.Str1 = null;
             this.ob_makecode.Str2 = null;
@@ -438,12 +453,12 @@
             this.bg_code1,
             this.bc_code1,
             this.bc_name1});
-            this.ChoosedDGV.Location = new System.Drawing.Point(1080, 255);
-            this.ChoosedDGV.Margin = new System.Windows.Forms.Padding(4);
+            this.ChoosedDGV.Location = new System.Drawing.Point(1215, 306);
+            this.ChoosedDGV.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ChoosedDGV.Name = "ChoosedDGV";
             this.ChoosedDGV.RowHeadersWidth = 20;
             this.ChoosedDGV.RowTemplate.Height = 23;
-            this.ChoosedDGV.Size = new System.Drawing.Size(325, 321);
+            this.ChoosedDGV.Size = new System.Drawing.Size(366, 385);
             this.ChoosedDGV.TabIndex = 205;
             // 
             // or_id
@@ -486,12 +501,12 @@
             this.bg_code,
             this.bc_code,
             this.bc_name});
-            this.WaitChooseDGV.Location = new System.Drawing.Point(629, 255);
-            this.WaitChooseDGV.Margin = new System.Windows.Forms.Padding(4);
+            this.WaitChooseDGV.Location = new System.Drawing.Point(708, 306);
+            this.WaitChooseDGV.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.WaitChooseDGV.Name = "WaitChooseDGV";
             this.WaitChooseDGV.RowHeadersWidth = 20;
             this.WaitChooseDGV.RowTemplate.Height = 23;
-            this.WaitChooseDGV.Size = new System.Drawing.Size(357, 320);
+            this.WaitChooseDGV.Size = new System.Drawing.Size(402, 384);
             this.WaitChooseDGV.TabIndex = 204;
             this.WaitChooseDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.WaitChooseDGV_DataError);
             // 
@@ -532,11 +547,11 @@
             this.ob_remark.AllPower = null;
             this.ob_remark.BackColor = System.Drawing.Color.White;
             this.ob_remark.ID = null;
-            this.ob_remark.Location = new System.Drawing.Point(123, 709);
-            this.ob_remark.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_remark.Location = new System.Drawing.Point(138, 851);
+            this.ob_remark.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ob_remark.Name = "ob_remark";
             this.ob_remark.Power = null;
-            this.ob_remark.Size = new System.Drawing.Size(487, 25);
+            this.ob_remark.Size = new System.Drawing.Size(547, 28);
             this.ob_remark.Str = null;
             this.ob_remark.Str1 = null;
             this.ob_remark.Str2 = null;
@@ -548,11 +563,11 @@
             this.sncode.AllPower = null;
             this.sncode.BackColor = System.Drawing.Color.White;
             this.sncode.ID = null;
-            this.sncode.Location = new System.Drawing.Point(123, 668);
-            this.sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.sncode.Location = new System.Drawing.Point(138, 802);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.sncode.Name = "sncode";
             this.sncode.Power = null;
-            this.sncode.Size = new System.Drawing.Size(487, 25);
+            this.sncode.Size = new System.Drawing.Size(547, 28);
             this.sncode.Str = null;
             this.sncode.Str1 = null;
             this.sncode.Str2 = null;
@@ -574,12 +589,12 @@
             this.oi_leveldefect,
             this.ois_remark,
             this.ois_status});
-            this.CheckTypeDGV.Location = new System.Drawing.Point(22, 214);
-            this.CheckTypeDGV.Margin = new System.Windows.Forms.Padding(4);
+            this.CheckTypeDGV.Location = new System.Drawing.Point(25, 257);
+            this.CheckTypeDGV.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.CheckTypeDGV.Name = "CheckTypeDGV";
             this.CheckTypeDGV.RowHeadersWidth = 20;
             this.CheckTypeDGV.RowTemplate.Height = 23;
-            this.CheckTypeDGV.Size = new System.Drawing.Size(589, 415);
+            this.CheckTypeDGV.Size = new System.Drawing.Size(663, 498);
             this.CheckTypeDGV.TabIndex = 198;
             this.CheckTypeDGV.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.CheckTypeDGV_CellValueChanged);
             this.CheckTypeDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.CheckTypeDGV_DataError);
@@ -604,8 +619,8 @@
             // 
             this.ci_name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.ci_name.DataPropertyName = "ci_name";
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.ci_name.DefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.ci_name.DefaultCellStyle = dataGridViewCellStyle3;
             this.ci_name.HeaderText = "项目名称";
             this.ci_name.Name = "ci_name";
             this.ci_name.ReadOnly = true;
@@ -626,7 +641,7 @@
             this.oi_checkqty.HeaderText = "已检数";
             this.oi_checkqty.Name = "oi_checkqty";
             this.oi_checkqty.ReadOnly = true;
-            this.oi_checkqty.Width = 81;
+            this.oi_checkqty.Width = 98;
             // 
             // oi_ng
             // 
@@ -663,10 +678,10 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(1000, 369);
-            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4);
+            this.ChooseedReject.Location = new System.Drawing.Point(1125, 443);
+            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ChooseedReject.Name = "ChooseedReject";
-            this.ChooseedReject.Size = new System.Drawing.Size(67, 29);
+            this.ChooseedReject.Size = new System.Drawing.Size(75, 35);
             this.ChooseedReject.TabIndex = 195;
             this.ChooseedReject.UseVisualStyleBackColor = true;
             this.ChooseedReject.Click += new System.EventHandler(this.ChooseedReject_Click);
@@ -674,10 +689,10 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(1000, 442);
-            this.WaitReject.Margin = new System.Windows.Forms.Padding(4);
+            this.WaitReject.Location = new System.Drawing.Point(1125, 530);
+            this.WaitReject.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.WaitReject.Name = "WaitReject";
-            this.WaitReject.Size = new System.Drawing.Size(67, 29);
+            this.WaitReject.Size = new System.Drawing.Size(75, 35);
             this.WaitReject.TabIndex = 194;
             this.WaitReject.UseVisualStyleBackColor = true;
             this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
@@ -688,11 +703,11 @@
             this.oi_checkqty1.BackColor = System.Drawing.Color.White;
             this.oi_checkqty1.Enabled = false;
             this.oi_checkqty1.ID = null;
-            this.oi_checkqty1.Location = new System.Drawing.Point(1211, 91);
-            this.oi_checkqty1.Margin = new System.Windows.Forms.Padding(4);
+            this.oi_checkqty1.Location = new System.Drawing.Point(1362, 109);
+            this.oi_checkqty1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.oi_checkqty1.Name = "oi_checkqty1";
             this.oi_checkqty1.Power = null;
-            this.oi_checkqty1.Size = new System.Drawing.Size(195, 25);
+            this.oi_checkqty1.Size = new System.Drawing.Size(219, 28);
             this.oi_checkqty1.Str = null;
             this.oi_checkqty1.Str1 = null;
             this.oi_checkqty1.Str2 = null;
@@ -705,11 +720,11 @@
             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(1211, 132);
-            this.ob_okqty.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_okqty.Location = new System.Drawing.Point(1362, 158);
+            this.ob_okqty.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ob_okqty.Name = "ob_okqty";
             this.ob_okqty.Power = null;
-            this.ob_okqty.Size = new System.Drawing.Size(195, 25);
+            this.ob_okqty.Size = new System.Drawing.Size(219, 28);
             this.ob_okqty.Str = null;
             this.ob_okqty.Str1 = null;
             this.ob_okqty.Str2 = null;
@@ -722,11 +737,11 @@
             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(1211, 175);
-            this.ob_ngqty.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_ngqty.Location = new System.Drawing.Point(1362, 210);
+            this.ob_ngqty.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ob_ngqty.Name = "ob_ngqty";
             this.ob_ngqty.Power = null;
-            this.ob_ngqty.Size = new System.Drawing.Size(195, 25);
+            this.ob_ngqty.Size = new System.Drawing.Size(219, 28);
             this.ob_ngqty.Str = null;
             this.ob_ngqty.Str1 = null;
             this.ob_ngqty.Str2 = null;
@@ -739,11 +754,11 @@
             this.ob_nowcheckqty.BackColor = System.Drawing.Color.White;
             this.ob_nowcheckqty.Enabled = false;
             this.ob_nowcheckqty.ID = null;
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(1211, 52);
-            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(1362, 62);
+            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Power = null;
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(195, 25);
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(219, 28);
             this.ob_nowcheckqty.Str = null;
             this.ob_nowcheckqty.Str1 = null;
             this.ob_nowcheckqty.Str2 = null;
@@ -755,11 +770,11 @@
             this.bccode.AllPower = null;
             this.bccode.BackColor = System.Drawing.Color.White;
             this.bccode.ID = null;
-            this.bccode.Location = new System.Drawing.Point(1211, 219);
-            this.bccode.Margin = new System.Windows.Forms.Padding(4);
+            this.bccode.Location = new System.Drawing.Point(1362, 263);
+            this.bccode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.bccode.Name = "bccode";
             this.bccode.Power = null;
-            this.bccode.Size = new System.Drawing.Size(195, 25);
+            this.bccode.Size = new System.Drawing.Size(219, 28);
             this.bccode.Str = null;
             this.bccode.Str1 = null;
             this.bccode.Str2 = null;
@@ -775,13 +790,13 @@
             this.GetBatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GetBatch.Image = ((System.Drawing.Image)(resources.GetObject("GetBatch.Image")));
             this.GetBatch.IsShowBorder = true;
-            this.GetBatch.Location = new System.Drawing.Point(629, 118);
-            this.GetBatch.Margin = new System.Windows.Forms.Padding(4);
+            this.GetBatch.Location = new System.Drawing.Point(708, 142);
+            this.GetBatch.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.GetBatch.MoveImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.MoveImage")));
             this.GetBatch.Name = "GetBatch";
             this.GetBatch.NormalImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.NormalImage")));
             this.GetBatch.Power = "ifRead";
-            this.GetBatch.Size = new System.Drawing.Size(80, 30);
+            this.GetBatch.Size = new System.Drawing.Size(90, 36);
             this.GetBatch.TabIndex = 175;
             this.GetBatch.Tag = "IFREAD";
             this.GetBatch.Text = "获取批";
@@ -796,13 +811,13 @@
             this.BatchPass.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.BatchPass.Image = ((System.Drawing.Image)(resources.GetObject("BatchPass.Image")));
             this.BatchPass.IsShowBorder = true;
-            this.BatchPass.Location = new System.Drawing.Point(720, 119);
-            this.BatchPass.Margin = new System.Windows.Forms.Padding(4);
+            this.BatchPass.Location = new System.Drawing.Point(810, 143);
+            this.BatchPass.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.BatchPass.MoveImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.MoveImage")));
             this.BatchPass.Name = "BatchPass";
             this.BatchPass.NormalImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.NormalImage")));
             this.BatchPass.Power = "ifWrite";
-            this.BatchPass.Size = new System.Drawing.Size(80, 30);
+            this.BatchPass.Size = new System.Drawing.Size(90, 36);
             this.BatchPass.TabIndex = 174;
             this.BatchPass.Tag = "OQC!Inspection";
             this.BatchPass.Text = "批判过";
@@ -817,13 +832,13 @@
             this.Confirm.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(629, 709);
-            this.Confirm.Margin = new System.Windows.Forms.Padding(4);
+            this.Confirm.Location = new System.Drawing.Point(708, 851);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.Power = "ifWrite";
-            this.Confirm.Size = new System.Drawing.Size(80, 30);
+            this.Confirm.Size = new System.Drawing.Size(90, 36);
             this.Confirm.TabIndex = 172;
             this.Confirm.Tag = "ifWrite";
             this.Confirm.Text = "确认";
@@ -835,11 +850,11 @@
             this.ob_checkno.AllPower = "ifall";
             this.ob_checkno.BackColor = System.Drawing.Color.White;
             this.ob_checkno.ID = null;
-            this.ob_checkno.Location = new System.Drawing.Point(127, 36);
-            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_checkno.Location = new System.Drawing.Point(143, 43);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Power = "ifread";
-            this.ob_checkno.Size = new System.Drawing.Size(487, 25);
+            this.ob_checkno.Size = new System.Drawing.Size(547, 28);
             this.ob_checkno.Str = null;
             this.ob_checkno.Str1 = null;
             this.ob_checkno.Str2 = null;
@@ -852,11 +867,11 @@
             this.obd_outboxcode.AllPower = null;
             this.obd_outboxcode.BackColor = System.Drawing.Color.White;
             this.obd_outboxcode.ID = null;
-            this.obd_outboxcode.Location = new System.Drawing.Point(127, 76);
-            this.obd_outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.obd_outboxcode.Location = new System.Drawing.Point(143, 91);
+            this.obd_outboxcode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.obd_outboxcode.Name = "obd_outboxcode";
             this.obd_outboxcode.Power = null;
-            this.obd_outboxcode.Size = new System.Drawing.Size(487, 25);
+            this.obd_outboxcode.Size = new System.Drawing.Size(547, 28);
             this.obd_outboxcode.Str = null;
             this.obd_outboxcode.Str1 = null;
             this.obd_outboxcode.Str2 = null;
@@ -868,11 +883,11 @@
             this.ms_sncode.AllPower = "ifall";
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(127, 119);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.ms_sncode.Location = new System.Drawing.Point(143, 143);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = "ifread";
-            this.ms_sncode.Size = new System.Drawing.Size(487, 25);
+            this.ms_sncode.Size = new System.Drawing.Size(547, 28);
             this.ms_sncode.Str = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str2 = null;
@@ -915,20 +930,38 @@
             this.obd_id.Name = "obd_id";
             this.obd_id.Visible = false;
             // 
-            // BadGroupCode
+            // Filter
             // 
-            this.BadGroupCode.FormattingEnabled = true;
-            this.BadGroupCode.Location = new System.Drawing.Point(760, 221);
-            this.BadGroupCode.Name = "BadGroupCode";
-            this.BadGroupCode.Size = new System.Drawing.Size(173, 23);
-            this.BadGroupCode.TabIndex = 219;
-            this.BadGroupCode.SelectedIndexChanged += new System.EventHandler(this.BadGroupCode_SelectedIndexChanged);
+            this.Filter.BackColor = System.Drawing.Color.Transparent;
+            this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
+            this.Filter.Location = new System.Drawing.Point(855, 212);
+            this.Filter.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.Filter.Name = "Filter";
+            this.Filter.PlaceHolder = "不良名称搜索";
+            this.Filter.Size = new System.Drawing.Size(194, 28);
+            this.Filter.TabIndex = 220;
+            this.Filter.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.Filter_UserControlTextChanged);
+            // 
+            // label2
+            // 
+            this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            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(786, 209);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(62, 31);
+            this.label2.TabIndex = 221;
+            this.label2.Text = "搜索";
             // 
             // OQC_SamplingDataCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1420, 762);
+            this.ClientSize = new System.Drawing.Size(1598, 914);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.Filter);
             this.Controls.Add(this.BadGroupCode);
             this.Controls.Add(this.ob_projectcode_label);
             this.Controls.Add(this.ob_maxngacceptqty);
@@ -973,7 +1006,7 @@
             this.Controls.Add(this.ms_sncode);
             this.Controls.Add(this.ms_sncode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.Name = "OQC_SamplingDataCollection";
             this.Tag = "OQC!SamplingDataCollection";
             this.Text = " ";
@@ -983,6 +1016,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfoSource)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -1055,5 +1089,8 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_code1;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_code1;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_name1;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder Filter;
+        private System.Windows.Forms.BindingSource BadInfoSource;
+        private System.Windows.Forms.Label label2;
     }
 }

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

@@ -17,7 +17,7 @@ namespace UAS_MES.OQC
         DataHelper dh;
         DataTable dt;
         DataTable BadCode;
-
+        
         List<DataGridViewRow> dgvr = new List<DataGridViewRow>();
         LogStringBuilder sql = new LogStringBuilder();
         string[] LevelDefect = new string[] { "A#A", "B#B", "C#C", "D#D" };
@@ -335,6 +335,7 @@ namespace UAS_MES.OQC
                         dh.ExecuteSql("update OQCBATCH set ob_ngqty='" + ngqty + "',ob_actsampleqty='" + checkqty + "',ob_okqty=('" + checkqty + "'-'" + ngqty + "') where ob_checkno ='" + ob_checkno.Text + "'", "update");
                         OperateResult.AppendText(">>序列号 " + sncode.Text + "操作成功\n", Color.Green);
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "抽样数据采集", "检验项目采集成功", sncode.Text, ob_checkno.Text);
+                        dh.ExecuteSql("update oqcbatchdetail set obd_ifcheck = '-1' where obd_checkno='"+ob_checkno.Text+"' and obd_sncode='"+sncode.Text+"'","update");
                         ChoosedDGV.DataSource = null;
                         BaseUtil.CleanDGVData(CheckTypeDGV);
                         BaseUtil.CleanDGVData(WaitChooseDGV);
@@ -447,7 +448,7 @@ namespace UAS_MES.OQC
         {
             if (e.KeyCode == Keys.Enter)
             {
-                dt = (DataTable)dh.ExecuteSql("select bc_code bg_code,bc_name bg_name from badgroup left join badcode on bg_code=bc_groupcode where bc_code='" + bccode.Text + "'", "select");
+                dt = (DataTable)dh.ExecuteSql("select bc_code bg_code,bc_name bg_name from badcode where bc_code='" + bccode.Text + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
                     try
@@ -489,6 +490,7 @@ namespace UAS_MES.OQC
             sql.Append("left join badcode on bgd_badcode=bc_code where bg_code='" + ((bg_code != "" && bg_code != "System.Data.DataRowView") ? bg_code.ToString() : "") + "' and bg_code is not null ");
             sql.Append(" order by bc_code");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BadInfoSource.DataSource = dt;
             BaseUtil.FillDgvWithDataTable(WaitChooseDGV, dt);
         }
 
@@ -496,5 +498,23 @@ namespace UAS_MES.OQC
         {
             dh.Dispose();
         }
+
+        private void Filter_UserControlTextChanged(object sender, EventArgs e)
+        {
+            try
+            {
+                DataRow[] dr = (BadInfoSource.DataSource as DataTable).Select("bc_code like '%" + Filter.Text + "%' or bc_name like '%" + Filter.Text + "%'");
+                DataTable dt = (BadInfoSource.DataSource as DataTable).Clone();
+                for (int i = 0; i < dr.Length; i++)
+                {
+                    dt.Rows.Add(dr[i].ItemArray);
+                }
+                BaseUtil.FillDgvWithDataTable(WaitChooseDGV, dt);
+            }
+            catch (Exception)
+            {
+
+            }
+        }
     }
 }

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

@@ -261,6 +261,30 @@
   <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="bg_code1.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="ChooseAll.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="bc_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bc_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="ChooseAll.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -300,6 +324,33 @@
   <metadata name="ois_status.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="ci_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_sampleqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_checkqty.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>
   <data name="ChooseedReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
@@ -746,4 +797,7 @@
   <metadata name="obd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="BadInfoSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>