章政 8 жил өмнө
parent
commit
ae5d143869

+ 14 - 8
UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.cs

@@ -24,6 +24,7 @@ namespace UAS_MES.OQC
         private void 抽检批维护_Load(object sender, EventArgs e)
         private void 抽检批维护_Load(object sender, EventArgs e)
         {
         {
             dh = new DataHelper();
             dh = new DataHelper();
+            ob_checkno.Focus();
             asc.controllInitializeSize(this);
             asc.controllInitializeSize(this);
         }
         }
 
 
@@ -128,10 +129,9 @@ namespace UAS_MES.OQC
                         sql.Append(" select " + re_id + ",'" + dh.GetSerialNumberByCaller("Rework") + "',sysdate,'" + User.UserName + "','在录入','ENTERING','未返工',");
                         sql.Append(" select " + re_id + ",'" + dh.GetSerialNumberByCaller("Rework") + "',sysdate,'" + User.UserName + "','在录入','ENTERING','未返工',");
                         sql.Append("OQCBatch.ob_prodcode,OQCBatch.ob_batchqty,OQCBatch.ob_description,'批判退发起返工',OQCBatch.ob_makecode,OQCBatch.ob_checkno from oqcbatch where ob_checkno='" + ob_checkno.Text + "'");
                         sql.Append("OQCBatch.ob_prodcode,OQCBatch.ob_batchqty,OQCBatch.ob_description,'批判退发起返工',OQCBatch.ob_makecode,OQCBatch.ob_checkno from oqcbatch where ob_checkno='" + ob_checkno.Text + "'");
                         dh.ExecuteSql(sql.GetString(), "insert");
                         dh.ExecuteSql(sql.GetString(), "insert");
-                        int rownum = dh.getRowCount("reworkdetail");
                         sql.Clear();
                         sql.Clear();
                         sql.Append("insert into ReworkDetail (rd_id,rd_reid,rd_detno,rd_sncode,rd_prodcode,rd_checkno,rd_indate,rd_inman,rd_rwstatus) ");
                         sql.Append("insert into ReworkDetail (rd_id,rd_reid,rd_detno,rd_sncode,rd_prodcode,rd_checkno,rd_indate,rd_inman,rd_rwstatus) ");
-                        sql.Append("select ReworkDetail_seq.nextval," + re_id + "," + rownum + "+1,OQCBatchDetail.obd_sncode,ob_prodcode,ob_checkno,sysdate,'" + User.UserName + "','未返工' ");
+                        sql.Append("select ReworkDetail_seq.nextval," + re_id + ",rownum,OQCBatchDetail.obd_sncode,ob_prodcode,ob_checkno,sysdate,'" + User.UserName + "','未返工' ");
                         sql.Append("from OQCBatch  left join OQCBatchDetail on obd_obid=ob_id where ob_checkno='" + ob_checkno.Text + "'");
                         sql.Append("from OQCBatch  left join OQCBatchDetail on obd_obid=ob_id where ob_checkno='" + ob_checkno.Text + "'");
                         dh.ExecuteSql(sql.GetString(), "insert");
                         dh.ExecuteSql(sql.GetString(), "insert");
                     }
                     }
@@ -191,7 +191,7 @@ namespace UAS_MES.OQC
                 {
                 {
                     if (dt.Rows[0]["re_statuscode"].ToString() == "AUDITED")
                     if (dt.Rows[0]["re_statuscode"].ToString() == "AUDITED")
                     {
                     {
-                        OperateResult.AppendText(">> 该批次存在已审核的返修工单,不允许撤销\n", Color.Red);
+                        OperateResult.AppendText(">>该批次存在已审核的返修工单,不允许撤销\n", Color.Red);
                         return;
                         return;
                     }
                     }
                     else
                     else
@@ -267,9 +267,9 @@ namespace UAS_MES.OQC
         }
         }
 
 
         //记录操作日志
         //记录操作日志
-        private void DoLog(string Operate, string Result, string Type)
+        private void DoLog(string Kind, string Result, string Type)
         {
         {
-            LogicHandler.InsertMessageLog(User.UserName, Operate, Result, "OQCBATCH|ob_id=" + ob_id.Text + "", ob_checkno.Text);
+            LogicHandler.InsertMessageLog(User.UserName, Kind, Result, "OQCBATCH|ob_id=" + ob_id.Text + "", ob_checkno.Text);
             if (ob_source.Text == "工序")
             if (ob_source.Text == "工序")
             {
             {
                 //如果是撤销操作则更新回上一工序
                 //如果是撤销操作则更新回上一工序
@@ -295,9 +295,15 @@ namespace UAS_MES.OQC
                 {
                 {
                     //更新下一工序
                     //更新下一工序
                     string ErrorMessage = "";
                     string ErrorMessage = "";
-                    LogicHandler.UpdateOQCMessage(ms_sncode.Text, ob_makecode.Text, "OQC批判过", User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
-                    //记录操作日志
-                    LogicHandler.InsertMakeProcess(ms_sncode.Text, ob_makecode.Text, User.UserSourceCode, "批结果判定", Operate, User.UserName);
+                    LogicHandler.UpdateOQCMessage(ms_sncode.Text, ob_makecode.Text, Kind, User.UserSourceCode, User.UserName, Result, out ErrorMessage);
+                    sql.Clear();
+                    sql.Append("insert into MakeProcess(mp_id,mp_makecode,mp_maid, mp_mscode,mp_sncode,mp_stepcode,mp_stepname,");
+                    sql.Append("mp_craftcode,mp_craftname,mp_kind,mp_result,mp_indate,mp_inman,mp_wccode,mp_linecode,mp_sourcecode,mp_snstatus,mp_sncheckno,mp_snoutboxcode)");
+                    sql.Append("select MakeProcess_seq.nextval, ma_code,ma_id,ms_code,ms_sncode,mcd_stepcode,mcd_stepname,");
+                    sql.Append("ma_craftcode,ma_craftname,'"+ Kind + "','" + Result + "',sysdate,'" + User.UserCode + "',ma_wccode,'" + User.UserLineCode + "','" + User.UserSourceCode + "',");
+                    sql.Append("ms_status,ms_checkno,ms_outboxcode from make left join makecraftdetail on mcd_macode=ma_code left join makeserial on ms_makecode=ma_code ");
+                    sql.Append("where  ms_checkno='" + ob_checkno.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                    dh.ExecuteSql(sql.ToString(), "insert");
                 }
                 }
             }
             }
         }
         }

+ 31 - 4
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.cs

@@ -33,7 +33,8 @@ namespace UAS_MES.OQC
             ob_projectcode.FormName = Name;
             ob_projectcode.FormName = Name;
 
 
             ob_aqlcode.TableName = "QUA_AQL";
             ob_aqlcode.TableName = "QUA_AQL";
-            ob_aqlcode.SelectField = "AL_ID # ID,AL_CODE  # 流水编号,AL_NAME # 检验标准名称,AL_STATUS # 状态";
+            ob_aqlcode.DBTitle = "抽样标准查询";
+            ob_aqlcode.SelectField = "AL_CODE  # 流水编号,AL_NAME # 检验标准名称";
             ob_aqlcode.SetValueField = new string[] { "ob_aqlcode" };
             ob_aqlcode.SetValueField = new string[] { "ob_aqlcode" };
             ob_aqlcode.FormName = Name;
             ob_aqlcode.FormName = Name;
             ob_aqlcode.Condition = "al_statuscode='AUDITED'";
             ob_aqlcode.Condition = "al_statuscode='AUDITED'";
@@ -129,7 +130,6 @@ namespace UAS_MES.OQC
                     dh.BatchInsert(sql.GetString(), new string[] { "oi_sampleqty", "ci_kind" }, oi_sampleqty_update.ToArray(), ci_kind_update.ToArray());
                     dh.BatchInsert(sql.GetString(), new string[] { "oi_sampleqty", "ci_kind" }, oi_sampleqty_update.ToArray(), ci_kind_update.ToArray());
                     sql.Clear();
                     sql.Clear();
                 }
                 }
-                OperateResult.AppendText(">>保存配置成功\n", Color.Green);
                 RefreshConfiguration.PerformClick();
                 RefreshConfiguration.PerformClick();
             }
             }
             else
             else
@@ -163,14 +163,14 @@ namespace UAS_MES.OQC
         //对于最大不合格允通过数的校验
         //对于最大不合格允通过数的校验
         private void Checkob_maxngacceptqty()
         private void Checkob_maxngacceptqty()
         {
         {
-            if (ob_maxngacceptqty.Text == "" || int.Parse(ob_maxngacceptqty.Text) < 0)
+            if (ob_maxngacceptqty.Text == "0" || ob_maxngacceptqty.Text == "" || int.Parse(ob_maxngacceptqty.Text) < 0)
             {
             {
                 OperateResult.AppendText(">>最大不合格允通过数必须大于0或者为空\n", Color.Red);
                 OperateResult.AppendText(">>最大不合格允通过数必须大于0或者为空\n", Color.Red);
                 ob_maxngacceptqty.Text = null;
                 ob_maxngacceptqty.Text = null;
             }
             }
             else
             else
             {
             {
-               int result =  (int)dh.ExecuteSql("update OQCBatch set ob_projectcode='" + ob_projectcode.Text + "',ob_remark = '" + ob_remark.Text + "',ob_aqlcode='" + ob_aqlcode.Text + "',ob_maxngacceptqty='" + ob_maxngacceptqty.Text + "' where ob_checkno='" + ob_checkno.Text + "' ", "update");
+                int result = (int)dh.ExecuteSql("update OQCBatch set ob_projectcode='" + ob_projectcode.Text + "',ob_remark = '" + ob_remark.Text + "',ob_aqlcode='" + ob_aqlcode.Text + "',ob_maxngacceptqty='" + ob_maxngacceptqty.Text + "' where ob_checkno='" + ob_checkno.Text + "' ", "update");
                 if (result > 0)
                 if (result > 0)
                 {
                 {
                     OperateResult.AppendText(">>保存成功\n", Color.Green);
                     OperateResult.AppendText(">>保存成功\n", Color.Green);
@@ -203,5 +203,32 @@ namespace UAS_MES.OQC
             if (e.KeyCode == Keys.Enter)
             if (e.KeyCode == Keys.Enter)
                 GetBatch.PerformClick();
                 GetBatch.PerformClick();
         }
         }
+
+        private void ob_aqlcode_UserControlTextChanged(object sender, EventArgs e)
+        {
+            dt = (DataTable)dh.ExecuteSql("select nvl(ad_minqty,0)ad_minqty,nvl(ad_maxqty,0)ad_maxqty,nvl(ad_maxngacceptqty,0)ad_maxngacceptqty,ad_qty from QUA_Aql left join qua_aqldetail on ad_alid=al_id where al_code='" + ob_aqlcode.Text + "'", "select");
+            if (dt.Rows.Count > 0)
+            {
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    int batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
+                    int minqty = int.Parse(dt.Rows[i]["ad_minqty"].ToString());
+                    int maxqty = int.Parse(dt.Rows[i]["ad_maxqty"].ToString());
+                    if (batchqty > minqty && batchqty <= maxqty)
+                    {
+                        ob_maxngacceptqty.Text = dt.Rows[i]["ad_maxngacceptqty"].ToString();
+                        ad_qty.Text = dt.Rows[i]["ad_qty"].ToString();
+                    }
+                }
+            }
+        }
+
+        private void ad_qty_TextChanged_1(object sender, EventArgs e)
+        {
+            for (int i = 0; i < CheckTypeDGV.Rows.Count; i++)
+            {
+                CheckTypeDGV.Rows[i].Cells["oi_sampleqty"].Value = ad_qty.Text;
+            }
+        }
     }
     }
 }
 }

+ 91 - 126
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.designer.cs

@@ -35,11 +35,8 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.obd_outboxcode_label = new System.Windows.Forms.Label();
             this.obd_outboxcode_label = new System.Windows.Forms.Label();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
-            this.ob_source_label = new System.Windows.Forms.Label();
-            this.pr_kind_label = new System.Windows.Forms.Label();
             this.ob_prodcode_label = new System.Windows.Forms.Label();
             this.ob_prodcode_label = new System.Windows.Forms.Label();
             this.ob_remark_label = new System.Windows.Forms.Label();
             this.ob_remark_label = new System.Windows.Forms.Label();
-            this.ob_status_label = new System.Windows.Forms.Label();
             this.ob_maxacceptqty_label = new System.Windows.Forms.Label();
             this.ob_maxacceptqty_label = new System.Windows.Forms.Label();
             this.ob_aqlcode_label = new System.Windows.Forms.Label();
             this.ob_aqlcode_label = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
@@ -48,7 +45,6 @@
             this.ob_aqlcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.ob_aqlcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.pr_detail = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pr_detail = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_projectcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.ob_projectcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
-            this.ob_status = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.Clean = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.Clean = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -62,15 +58,18 @@
             this.ci_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ci_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ci_kind = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ci_kind = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.oi_sampleqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.oi_sampleqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_kind = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.ob_source = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_batchqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_batchqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.obd_outboxcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.obd_outboxcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_checkno = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_checkno = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ob_status = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.ad_qty_label = new System.Windows.Forms.Label();
+            this.ad_qty = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxNumOnly();
             this.panel2.SuspendLayout();
             this.panel2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
+            this.panel1.SuspendLayout();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
             // ms_sncode_label
             // ms_sncode_label
@@ -130,37 +129,17 @@
             // 
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.Location = new System.Drawing.Point(21, 84);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(528, 88);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(58, 21);
             this.ob_batchqty_label.Size = new System.Drawing.Size(58, 21);
             this.ob_batchqty_label.TabIndex = 159;
             this.ob_batchqty_label.TabIndex = 159;
             this.ob_batchqty_label.Text = "批数量";
             this.ob_batchqty_label.Text = "批数量";
             // 
             // 
-            // ob_source_label
-            // 
-            this.ob_source_label.AutoSize = true;
-            this.ob_source_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_source_label.Location = new System.Drawing.Point(268, 86);
-            this.ob_source_label.Name = "ob_source_label";
-            this.ob_source_label.Size = new System.Drawing.Size(58, 21);
-            this.ob_source_label.TabIndex = 161;
-            this.ob_source_label.Text = "批类型";
-            // 
-            // pr_kind_label
-            // 
-            this.pr_kind_label.AutoSize = true;
-            this.pr_kind_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_kind_label.Location = new System.Drawing.Point(526, 87);
-            this.pr_kind_label.Name = "pr_kind_label";
-            this.pr_kind_label.Size = new System.Drawing.Size(74, 21);
-            this.pr_kind_label.TabIndex = 165;
-            this.pr_kind_label.Text = "产品类型";
-            // 
             // ob_prodcode_label
             // ob_prodcode_label
             // 
             // 
             this.ob_prodcode_label.AutoSize = true;
             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.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(789, 52);
+            this.ob_prodcode_label.Location = new System.Drawing.Point(21, 84);
             this.ob_prodcode_label.Name = "ob_prodcode_label";
             this.ob_prodcode_label.Name = "ob_prodcode_label";
             this.ob_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.ob_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.ob_prodcode_label.TabIndex = 163;
             this.ob_prodcode_label.TabIndex = 163;
@@ -170,27 +149,17 @@
             // 
             // 
             this.ob_remark_label.AutoSize = true;
             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.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(39, 550);
+            this.ob_remark_label.Location = new System.Drawing.Point(259, 63);
             this.ob_remark_label.Name = "ob_remark_label";
             this.ob_remark_label.Name = "ob_remark_label";
             this.ob_remark_label.Size = new System.Drawing.Size(42, 21);
             this.ob_remark_label.Size = new System.Drawing.Size(42, 21);
             this.ob_remark_label.TabIndex = 172;
             this.ob_remark_label.TabIndex = 172;
             this.ob_remark_label.Text = "备注";
             this.ob_remark_label.Text = "备注";
             // 
             // 
-            // ob_status_label
-            // 
-            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(789, 87);
-            this.ob_status_label.Name = "ob_status_label";
-            this.ob_status_label.Size = new System.Drawing.Size(42, 21);
-            this.ob_status_label.TabIndex = 178;
-            this.ob_status_label.Text = "状态";
-            // 
             // ob_maxacceptqty_label
             // ob_maxacceptqty_label
             // 
             // 
             this.ob_maxacceptqty_label.AutoSize = true;
             this.ob_maxacceptqty_label.AutoSize = true;
             this.ob_maxacceptqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_maxacceptqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_maxacceptqty_label.Location = new System.Drawing.Point(39, 584);
+            this.ob_maxacceptqty_label.Location = new System.Drawing.Point(259, 18);
             this.ob_maxacceptqty_label.Name = "ob_maxacceptqty_label";
             this.ob_maxacceptqty_label.Name = "ob_maxacceptqty_label";
             this.ob_maxacceptqty_label.Size = new System.Drawing.Size(170, 21);
             this.ob_maxacceptqty_label.Size = new System.Drawing.Size(170, 21);
             this.ob_maxacceptqty_label.TabIndex = 182;
             this.ob_maxacceptqty_label.TabIndex = 182;
@@ -200,7 +169,7 @@
             // 
             // 
             this.ob_aqlcode_label.AutoSize = true;
             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.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(410, 550);
+            this.ob_aqlcode_label.Location = new System.Drawing.Point(12, 18);
             this.ob_aqlcode_label.Name = "ob_aqlcode_label";
             this.ob_aqlcode_label.Name = "ob_aqlcode_label";
             this.ob_aqlcode_label.Size = new System.Drawing.Size(42, 21);
             this.ob_aqlcode_label.Size = new System.Drawing.Size(42, 21);
             this.ob_aqlcode_label.TabIndex = 184;
             this.ob_aqlcode_label.TabIndex = 184;
@@ -210,7 +179,7 @@
             // 
             // 
             this.label1.AutoSize = true;
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             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(268, 126);
+            this.label1.Location = new System.Drawing.Point(773, 88);
             this.label1.Name = "label1";
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 186;
             this.label1.TabIndex = 186;
@@ -220,7 +189,7 @@
             // 
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(21, 126);
+            this.pr_detail_label.Location = new System.Drawing.Point(268, 84);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
@@ -229,7 +198,7 @@
             // 
             // 
             // ob_maxngacceptqty
             // ob_maxngacceptqty
             // 
             // 
-            this.ob_maxngacceptqty.Location = new System.Drawing.Point(215, 584);
+            this.ob_maxngacceptqty.Location = new System.Drawing.Point(439, 18);
             this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
             this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
             this.ob_maxngacceptqty.Size = new System.Drawing.Size(169, 21);
             this.ob_maxngacceptqty.Size = new System.Drawing.Size(169, 21);
             this.ob_maxngacceptqty.TabIndex = 192;
             this.ob_maxngacceptqty.TabIndex = 192;
@@ -242,17 +211,18 @@
             this.ob_aqlcode.Condition = null;
             this.ob_aqlcode.Condition = null;
             this.ob_aqlcode.DBTitle = null;
             this.ob_aqlcode.DBTitle = null;
             this.ob_aqlcode.FormName = null;
             this.ob_aqlcode.FormName = null;
-            this.ob_aqlcode.Location = new System.Drawing.Point(460, 552);
+            this.ob_aqlcode.Location = new System.Drawing.Point(76, 20);
             this.ob_aqlcode.Margin = new System.Windows.Forms.Padding(2);
             this.ob_aqlcode.Margin = new System.Windows.Forms.Padding(2);
             this.ob_aqlcode.Name = "ob_aqlcode";
             this.ob_aqlcode.Name = "ob_aqlcode";
             this.ob_aqlcode.Power = null;
             this.ob_aqlcode.Power = null;
             this.ob_aqlcode.SelectField = null;
             this.ob_aqlcode.SelectField = null;
             this.ob_aqlcode.SetValueField = null;
             this.ob_aqlcode.SetValueField = null;
-            this.ob_aqlcode.Size = new System.Drawing.Size(196, 21);
+            this.ob_aqlcode.Size = new System.Drawing.Size(176, 21);
             this.ob_aqlcode.TabIndex = 191;
             this.ob_aqlcode.TabIndex = 191;
             this.ob_aqlcode.TableName = null;
             this.ob_aqlcode.TableName = null;
             this.ob_aqlcode.Tag = "AL_CODE";
             this.ob_aqlcode.Tag = "AL_CODE";
             this.ob_aqlcode.TextBoxEnable = false;
             this.ob_aqlcode.TextBoxEnable = false;
+            this.ob_aqlcode.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextChange(this.ob_aqlcode_UserControlTextChanged);
             // 
             // 
             // pr_detail
             // pr_detail
             // 
             // 
@@ -260,7 +230,7 @@
             this.pr_detail.BackColor = System.Drawing.Color.White;
             this.pr_detail.BackColor = System.Drawing.Color.White;
             this.pr_detail.Enabled = false;
             this.pr_detail.Enabled = false;
             this.pr_detail.ID = null;
             this.pr_detail.ID = null;
-            this.pr_detail.Location = new System.Drawing.Point(101, 126);
+            this.pr_detail.Location = new System.Drawing.Point(346, 88);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(2);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(2);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Power = null;
             this.pr_detail.Power = null;
@@ -279,7 +249,7 @@
             this.ob_projectcode.Condition = null;
             this.ob_projectcode.Condition = null;
             this.ob_projectcode.DBTitle = null;
             this.ob_projectcode.DBTitle = null;
             this.ob_projectcode.FormName = null;
             this.ob_projectcode.FormName = null;
-            this.ob_projectcode.Location = new System.Drawing.Point(347, 126);
+            this.ob_projectcode.Location = new System.Drawing.Point(852, 88);
             this.ob_projectcode.Margin = new System.Windows.Forms.Padding(2);
             this.ob_projectcode.Margin = new System.Windows.Forms.Padding(2);
             this.ob_projectcode.Name = "ob_projectcode";
             this.ob_projectcode.Name = "ob_projectcode";
             this.ob_projectcode.Power = null;
             this.ob_projectcode.Power = null;
@@ -291,28 +261,12 @@
             this.ob_projectcode.Tag = "pr_code";
             this.ob_projectcode.Tag = "pr_code";
             this.ob_projectcode.TextBoxEnable = false;
             this.ob_projectcode.TextBoxEnable = false;
             // 
             // 
-            // ob_status
-            // 
-            this.ob_status.AllPower = null;
-            this.ob_status.BackColor = System.Drawing.Color.White;
-            this.ob_status.Enabled = false;
-            this.ob_status.ID = null;
-            this.ob_status.Location = new System.Drawing.Point(872, 87);
-            this.ob_status.Name = "ob_status";
-            this.ob_status.Power = null;
-            this.ob_status.Size = new System.Drawing.Size(136, 21);
-            this.ob_status.Str = null;
-            this.ob_status.Str1 = null;
-            this.ob_status.Str2 = null;
-            this.ob_status.TabIndex = 179;
-            this.ob_status.Tag = "NoAuto";
-            // 
             // OperateResult
             // OperateResult
             // 
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             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(807, 194);
+            this.OperateResult.Location = new System.Drawing.Point(777, 252);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(203, 318);
+            this.OperateResult.Size = new System.Drawing.Size(233, 318);
             this.OperateResult.TabIndex = 177;
             this.OperateResult.TabIndex = 177;
             this.OperateResult.Text = "";
             this.OperateResult.Text = "";
             // 
             // 
@@ -324,7 +278,7 @@
             this.Clean.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             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.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(872, 518);
+            this.Clean.Location = new System.Drawing.Point(859, 576);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -341,10 +295,10 @@
             this.ob_remark.AllPower = null;
             this.ob_remark.AllPower = null;
             this.ob_remark.BackColor = System.Drawing.Color.White;
             this.ob_remark.BackColor = System.Drawing.Color.White;
             this.ob_remark.ID = null;
             this.ob_remark.ID = null;
-            this.ob_remark.Location = new System.Drawing.Point(102, 552);
+            this.ob_remark.Location = new System.Drawing.Point(439, 63);
             this.ob_remark.Name = "ob_remark";
             this.ob_remark.Name = "ob_remark";
             this.ob_remark.Power = null;
             this.ob_remark.Power = null;
-            this.ob_remark.Size = new System.Drawing.Size(282, 21);
+            this.ob_remark.Size = new System.Drawing.Size(169, 21);
             this.ob_remark.Str = null;
             this.ob_remark.Str = null;
             this.ob_remark.Str1 = null;
             this.ob_remark.Str1 = null;
             this.ob_remark.Str2 = null;
             this.ob_remark.Str2 = null;
@@ -359,7 +313,7 @@
             this.GetBatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             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.Image = ((System.Drawing.Image)(resources.GetObject("GetBatch.Image")));
             this.GetBatch.IsShowBorder = true;
             this.GetBatch.IsShowBorder = true;
-            this.GetBatch.Location = new System.Drawing.Point(460, 160);
+            this.GetBatch.Location = new System.Drawing.Point(777, 51);
             this.GetBatch.MoveImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.MoveImage")));
             this.GetBatch.MoveImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.MoveImage")));
             this.GetBatch.Name = "GetBatch";
             this.GetBatch.Name = "GetBatch";
             this.GetBatch.NormalImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.NormalImage")));
             this.GetBatch.NormalImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.NormalImage")));
@@ -379,7 +333,7 @@
             this.SaveConfiguration.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.SaveConfiguration.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.SaveConfiguration.Image = ((System.Drawing.Image)(resources.GetObject("SaveConfiguration.Image")));
             this.SaveConfiguration.Image = ((System.Drawing.Image)(resources.GetObject("SaveConfiguration.Image")));
             this.SaveConfiguration.IsShowBorder = true;
             this.SaveConfiguration.IsShowBorder = true;
-            this.SaveConfiguration.Location = new System.Drawing.Point(299, 518);
+            this.SaveConfiguration.Location = new System.Drawing.Point(869, 154);
             this.SaveConfiguration.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveConfiguration.MoveImage")));
             this.SaveConfiguration.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveConfiguration.MoveImage")));
             this.SaveConfiguration.Name = "SaveConfiguration";
             this.SaveConfiguration.Name = "SaveConfiguration";
             this.SaveConfiguration.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveConfiguration.NormalImage")));
             this.SaveConfiguration.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveConfiguration.NormalImage")));
@@ -389,6 +343,7 @@
             this.SaveConfiguration.Tag = "OQC!Inspection";
             this.SaveConfiguration.Tag = "OQC!Inspection";
             this.SaveConfiguration.Text = "保存配置";
             this.SaveConfiguration.Text = "保存配置";
             this.SaveConfiguration.UseVisualStyleBackColor = true;
             this.SaveConfiguration.UseVisualStyleBackColor = true;
+            this.SaveConfiguration.Visible = false;
             this.SaveConfiguration.Click += new System.EventHandler(this.SaveConfiguration_Click);
             this.SaveConfiguration.Click += new System.EventHandler(this.SaveConfiguration_Click);
             // 
             // 
             // RefreshConfiguration
             // RefreshConfiguration
@@ -399,7 +354,7 @@
             this.RefreshConfiguration.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.RefreshConfiguration.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.RefreshConfiguration.Image = ((System.Drawing.Image)(resources.GetObject("RefreshConfiguration.Image")));
             this.RefreshConfiguration.Image = ((System.Drawing.Image)(resources.GetObject("RefreshConfiguration.Image")));
             this.RefreshConfiguration.IsShowBorder = true;
             this.RefreshConfiguration.IsShowBorder = true;
-            this.RefreshConfiguration.Location = new System.Drawing.Point(460, 518);
+            this.RefreshConfiguration.Location = new System.Drawing.Point(943, 154);
             this.RefreshConfiguration.MoveImage = ((System.Drawing.Image)(resources.GetObject("RefreshConfiguration.MoveImage")));
             this.RefreshConfiguration.MoveImage = ((System.Drawing.Image)(resources.GetObject("RefreshConfiguration.MoveImage")));
             this.RefreshConfiguration.Name = "RefreshConfiguration";
             this.RefreshConfiguration.Name = "RefreshConfiguration";
             this.RefreshConfiguration.NormalImage = ((System.Drawing.Image)(resources.GetObject("RefreshConfiguration.NormalImage")));
             this.RefreshConfiguration.NormalImage = ((System.Drawing.Image)(resources.GetObject("RefreshConfiguration.NormalImage")));
@@ -409,6 +364,7 @@
             this.RefreshConfiguration.Tag = "OQC!Inspection";
             this.RefreshConfiguration.Tag = "OQC!Inspection";
             this.RefreshConfiguration.Text = "刷新配置";
             this.RefreshConfiguration.Text = "刷新配置";
             this.RefreshConfiguration.UseVisualStyleBackColor = true;
             this.RefreshConfiguration.UseVisualStyleBackColor = true;
+            this.RefreshConfiguration.Visible = false;
             this.RefreshConfiguration.Click += new System.EventHandler(this.RefreshConfiguration_Click);
             this.RefreshConfiguration.Click += new System.EventHandler(this.RefreshConfiguration_Click);
             // 
             // 
             // Save
             // Save
@@ -419,7 +375,7 @@
             this.Save.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Save.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Save.Image = ((System.Drawing.Image)(resources.GetObject("Save.Image")));
             this.Save.Image = ((System.Drawing.Image)(resources.GetObject("Save.Image")));
             this.Save.IsShowBorder = true;
             this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(413, 583);
+            this.Save.Location = new System.Drawing.Point(413, 586);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
             this.Save.Name = "Save";
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
@@ -441,7 +397,7 @@
             this.ci_id,
             this.ci_id,
             this.ci_kind,
             this.ci_kind,
             this.oi_sampleqty});
             this.oi_sampleqty});
-            this.CheckTypeDGV.Location = new System.Drawing.Point(43, 194);
+            this.CheckTypeDGV.Location = new System.Drawing.Point(25, 252);
             this.CheckTypeDGV.Name = "CheckTypeDGV";
             this.CheckTypeDGV.Name = "CheckTypeDGV";
             this.CheckTypeDGV.RowTemplate.Height = 23;
             this.CheckTypeDGV.RowTemplate.Height = 23;
             this.CheckTypeDGV.Size = new System.Drawing.Size(745, 318);
             this.CheckTypeDGV.Size = new System.Drawing.Size(745, 318);
@@ -490,30 +446,13 @@
             this.oi_sampleqty.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.oi_sampleqty.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.oi_sampleqty.Width = 150;
             this.oi_sampleqty.Width = 150;
             // 
             // 
-            // pr_kind
-            // 
-            this.pr_kind.AllPower = null;
-            this.pr_kind.BackColor = System.Drawing.Color.White;
-            this.pr_kind.Enabled = false;
-            this.pr_kind.ID = null;
-            this.pr_kind.Location = new System.Drawing.Point(608, 87);
-            this.pr_kind.Name = "pr_kind";
-            this.pr_kind.Power = null;
-            this.pr_kind.ReadOnly = true;
-            this.pr_kind.Size = new System.Drawing.Size(136, 21);
-            this.pr_kind.Str = null;
-            this.pr_kind.Str1 = null;
-            this.pr_kind.Str2 = null;
-            this.pr_kind.TabIndex = 166;
-            this.pr_kind.Tag = "NoAuto";
-            // 
             // ob_prodcode
             // ob_prodcode
             // 
             // 
             this.ob_prodcode.AllPower = null;
             this.ob_prodcode.AllPower = null;
             this.ob_prodcode.BackColor = System.Drawing.Color.White;
             this.ob_prodcode.BackColor = System.Drawing.Color.White;
             this.ob_prodcode.Enabled = false;
             this.ob_prodcode.Enabled = false;
             this.ob_prodcode.ID = null;
             this.ob_prodcode.ID = null;
-            this.ob_prodcode.Location = new System.Drawing.Point(872, 54);
+            this.ob_prodcode.Location = new System.Drawing.Point(101, 88);
             this.ob_prodcode.Name = "ob_prodcode";
             this.ob_prodcode.Name = "ob_prodcode";
             this.ob_prodcode.Power = null;
             this.ob_prodcode.Power = null;
             this.ob_prodcode.Size = new System.Drawing.Size(136, 21);
             this.ob_prodcode.Size = new System.Drawing.Size(136, 21);
@@ -523,29 +462,13 @@
             this.ob_prodcode.TabIndex = 164;
             this.ob_prodcode.TabIndex = 164;
             this.ob_prodcode.Tag = "NoAuto";
             this.ob_prodcode.Tag = "NoAuto";
             // 
             // 
-            // ob_source
-            // 
-            this.ob_source.AllPower = null;
-            this.ob_source.BackColor = System.Drawing.Color.White;
-            this.ob_source.Enabled = false;
-            this.ob_source.ID = null;
-            this.ob_source.Location = new System.Drawing.Point(347, 86);
-            this.ob_source.Name = "ob_source";
-            this.ob_source.Power = null;
-            this.ob_source.Size = new System.Drawing.Size(136, 21);
-            this.ob_source.Str = null;
-            this.ob_source.Str1 = null;
-            this.ob_source.Str2 = null;
-            this.ob_source.TabIndex = 162;
-            this.ob_source.Tag = "NoAuto";
-            // 
             // ob_batchqty
             // ob_batchqty
             // 
             // 
             this.ob_batchqty.AllPower = null;
             this.ob_batchqty.AllPower = null;
             this.ob_batchqty.BackColor = System.Drawing.Color.White;
             this.ob_batchqty.BackColor = System.Drawing.Color.White;
             this.ob_batchqty.Enabled = false;
             this.ob_batchqty.Enabled = false;
             this.ob_batchqty.ID = null;
             this.ob_batchqty.ID = null;
-            this.ob_batchqty.Location = new System.Drawing.Point(101, 86);
+            this.ob_batchqty.Location = new System.Drawing.Point(608, 88);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Power = null;
             this.ob_batchqty.Power = null;
             this.ob_batchqty.ReadOnly = true;
             this.ob_batchqty.ReadOnly = true;
@@ -604,36 +527,78 @@
             this.ms_sncode.Tag = "NoAuto";
             this.ms_sncode.Tag = "NoAuto";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_sncode_KeyDown);
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_sncode_KeyDown);
             // 
             // 
+            // ob_status
+            // 
+            this.ob_status.AllPower = null;
+            this.ob_status.BackColor = System.Drawing.Color.White;
+            this.ob_status.Enabled = false;
+            this.ob_status.ID = null;
+            this.ob_status.Location = new System.Drawing.Point(875, 127);
+            this.ob_status.Name = "ob_status";
+            this.ob_status.Power = null;
+            this.ob_status.Size = new System.Drawing.Size(136, 21);
+            this.ob_status.Str = null;
+            this.ob_status.Str1 = null;
+            this.ob_status.Str2 = null;
+            this.ob_status.TabIndex = 179;
+            this.ob_status.Tag = "NoAuto";
+            this.ob_status.Visible = false;
+            // 
+            // panel1
+            // 
+            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel1.Controls.Add(this.ad_qty);
+            this.panel1.Controls.Add(this.ad_qty_label);
+            this.panel1.Controls.Add(this.ob_remark);
+            this.panel1.Controls.Add(this.ob_maxngacceptqty);
+            this.panel1.Controls.Add(this.ob_remark_label);
+            this.panel1.Controls.Add(this.ob_aqlcode);
+            this.panel1.Controls.Add(this.ob_aqlcode_label);
+            this.panel1.Controls.Add(this.ob_maxacceptqty_label);
+            this.panel1.Location = new System.Drawing.Point(25, 130);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(745, 100);
+            this.panel1.TabIndex = 193;
+            // 
+            // ad_qty_label
+            // 
+            this.ad_qty_label.AutoSize = true;
+            this.ad_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ad_qty_label.Location = new System.Drawing.Point(12, 63);
+            this.ad_qty_label.Name = "ad_qty_label";
+            this.ad_qty_label.Size = new System.Drawing.Size(58, 21);
+            this.ad_qty_label.TabIndex = 193;
+            this.ad_qty_label.Text = "样本数";
+            // 
+            // ad_qty
+            // 
+            this.ad_qty.Location = new System.Drawing.Point(75, 63);
+            this.ad_qty.Name = "ad_qty";
+            this.ad_qty.Size = new System.Drawing.Size(154, 21);
+            this.ad_qty.TabIndex = 194;
+            this.ad_qty.Text = "0";
+            this.ad_qty.TextChanged += new System.EventHandler(this.ad_qty_TextChanged_1);
+            // 
             // OQC_PlanMaintain
             // OQC_PlanMaintain
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1022, 625);
             this.ClientSize = new System.Drawing.Size(1022, 625);
-            this.Controls.Add(this.ob_maxngacceptqty);
-            this.Controls.Add(this.ob_aqlcode);
+            this.Controls.Add(this.panel1);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.ob_projectcode);
             this.Controls.Add(this.ob_projectcode);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.label1);
-            this.Controls.Add(this.ob_aqlcode_label);
-            this.Controls.Add(this.ob_maxacceptqty_label);
             this.Controls.Add(this.ob_status);
             this.Controls.Add(this.ob_status);
-            this.Controls.Add(this.ob_status_label);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.Clean);
             this.Controls.Add(this.Clean);
-            this.Controls.Add(this.ob_remark);
-            this.Controls.Add(this.ob_remark_label);
             this.Controls.Add(this.GetBatch);
             this.Controls.Add(this.GetBatch);
             this.Controls.Add(this.SaveConfiguration);
             this.Controls.Add(this.SaveConfiguration);
             this.Controls.Add(this.RefreshConfiguration);
             this.Controls.Add(this.RefreshConfiguration);
             this.Controls.Add(this.Save);
             this.Controls.Add(this.Save);
             this.Controls.Add(this.CheckTypeDGV);
             this.Controls.Add(this.CheckTypeDGV);
-            this.Controls.Add(this.pr_kind);
-            this.Controls.Add(this.pr_kind_label);
             this.Controls.Add(this.ob_prodcode);
             this.Controls.Add(this.ob_prodcode);
             this.Controls.Add(this.ob_prodcode_label);
             this.Controls.Add(this.ob_prodcode_label);
-            this.Controls.Add(this.ob_source);
-            this.Controls.Add(this.ob_source_label);
             this.Controls.Add(this.ob_batchqty);
             this.Controls.Add(this.ob_batchqty);
             this.Controls.Add(this.ob_batchqty_label);
             this.Controls.Add(this.ob_batchqty_label);
             this.Controls.Add(this.obd_outboxcode);
             this.Controls.Add(this.obd_outboxcode);
@@ -652,6 +617,8 @@
             this.panel2.ResumeLayout(false);
             this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
             this.panel2.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).EndInit();
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
             this.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
             this.PerformLayout();
 
 
@@ -669,10 +636,6 @@
         private System.Windows.Forms.Label obd_outboxcode_label;
         private System.Windows.Forms.Label obd_outboxcode_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_batchqty;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_batchqty;
         private System.Windows.Forms.Label ob_batchqty_label;
         private System.Windows.Forms.Label ob_batchqty_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ob_source;
-        private System.Windows.Forms.Label ob_source_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox pr_kind;
-        private System.Windows.Forms.Label pr_kind_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_prodcode;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_prodcode;
         private System.Windows.Forms.Label ob_prodcode_label;
         private System.Windows.Forms.Label ob_prodcode_label;
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum CheckTypeDGV;
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum CheckTypeDGV;
@@ -684,8 +647,6 @@
         private System.Windows.Forms.Label ob_remark_label;
         private System.Windows.Forms.Label ob_remark_label;
         private CustomControl.ButtonUtil.NormalButton Clean;
         private CustomControl.ButtonUtil.NormalButton Clean;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ob_status;
-        private System.Windows.Forms.Label ob_status_label;
         private System.Windows.Forms.Label ob_maxacceptqty_label;
         private System.Windows.Forms.Label ob_maxacceptqty_label;
         private System.Windows.Forms.Label ob_aqlcode_label;
         private System.Windows.Forms.Label ob_aqlcode_label;
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Label label1;
@@ -699,5 +660,9 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ci_kind;
         private System.Windows.Forms.DataGridViewTextBoxColumn ci_kind;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_sampleqty;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_sampleqty;
         private CustomControl.TextBoxWithIcon.TextBoxNumOnly ob_maxngacceptqty;
         private CustomControl.TextBoxWithIcon.TextBoxNumOnly ob_maxngacceptqty;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ob_status;
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Label ad_qty_label;
+        private CustomControl.TextBoxWithIcon.TextBoxNumOnly ad_qty;
     }
     }
 }
 }

+ 110 - 104
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -55,17 +55,16 @@
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_makecode = 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.ChoosedDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
+            this.or_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            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.WaitChooseDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
+            this.Column3 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.bg_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bg_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.CheckTypeDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
             this.CheckTypeDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
-            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.oi_itemcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_ng = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_leveldefect = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ois_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ois_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ois_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ChooseedReject = new UAS_MES.CustomControl.ButtonUtil.ArrowRightButton();
             this.ChooseedReject = new UAS_MES.CustomControl.ButtonUtil.ArrowRightButton();
             this.WaitReject = new UAS_MES.CustomControl.ButtonUtil.ArrowLeftButton();
             this.WaitReject = new UAS_MES.CustomControl.ButtonUtil.ArrowLeftButton();
             this.oi_checkqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.oi_checkqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -86,12 +85,13 @@
             this.obd_outboxcode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.obd_outboxcode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ob_makecode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ob_makecode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.obd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.obd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column3 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.bg_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bg_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.or_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.oi_itemcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_ng = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_leveldefect = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ois_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ois_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ois_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -418,6 +418,29 @@
             this.ChoosedDGV.Size = new System.Drawing.Size(244, 257);
             this.ChoosedDGV.Size = new System.Drawing.Size(244, 257);
             this.ChoosedDGV.TabIndex = 205;
             this.ChoosedDGV.TabIndex = 205;
             // 
             // 
+            // or_id
+            // 
+            this.or_id.DataPropertyName = "or_id";
+            this.or_id.HeaderText = "or_id";
+            this.or_id.Name = "or_id";
+            this.or_id.Visible = false;
+            // 
+            // bc_code1
+            // 
+            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.bc_code1.DataPropertyName = "bg_code";
+            this.bc_code1.HeaderText = "不良代码";
+            this.bc_code1.Name = "bc_code1";
+            this.bc_code1.ReadOnly = true;
+            // 
+            // bc_name1
+            // 
+            this.bc_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.bc_name1.DataPropertyName = "bg_name";
+            this.bc_name1.HeaderText = "不良原因";
+            this.bc_name1.Name = "bc_name1";
+            this.bc_name1.ReadOnly = true;
+            // 
             // WaitChooseDGV
             // WaitChooseDGV
             // 
             // 
             this.WaitChooseDGV.AllowUserToAddRows = false;
             this.WaitChooseDGV.AllowUserToAddRows = false;
@@ -437,6 +460,30 @@
             this.WaitChooseDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.WaitChooseDGV_DataError);
             this.WaitChooseDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.WaitChooseDGV_DataError);
             this.WaitChooseDGV.RowHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.WaitChooseDGV_RowHeaderMouseClick);
             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;
+            // 
+            // bg_code
+            // 
+            this.bg_code.DataPropertyName = "bg_code";
+            this.bg_code.HeaderText = "不良分组";
+            this.bg_code.Name = "bg_code";
+            this.bg_code.ReadOnly = true;
+            this.bg_code.Width = 93;
+            // 
+            // bg_name
+            // 
+            this.bg_name.DataPropertyName = "bg_name";
+            this.bg_name.HeaderText = "分组名称";
+            this.bg_name.Name = "bg_name";
+            this.bg_name.ReadOnly = true;
+            this.bg_name.Width = 93;
+            // 
             // ob_remark
             // ob_remark
             // 
             // 
             this.ob_remark.AllPower = null;
             this.ob_remark.AllPower = null;
@@ -491,55 +538,6 @@
             this.CheckTypeDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.CheckTypeDGV_DataError);
             this.CheckTypeDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.CheckTypeDGV_DataError);
             this.CheckTypeDGV.RowHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.CheckTypeDGV_RowHeaderMouseClick);
             this.CheckTypeDGV.RowHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.CheckTypeDGV_RowHeaderMouseClick);
             // 
             // 
-            // choose
-            // 
-            this.choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.choose.DataPropertyName = "choose";
-            this.choose.HeaderText = "勾选";
-            this.choose.Name = "choose";
-            this.choose.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.choose.Width = 60;
-            // 
-            // oi_itemcode
-            // 
-            this.oi_itemcode.DataPropertyName = "oi_checkkind";
-            this.oi_itemcode.HeaderText = "检验类型";
-            this.oi_itemcode.Name = "oi_itemcode";
-            this.oi_itemcode.Width = 78;
-            // 
-            // oi_ng
-            // 
-            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.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
             // ChooseedReject
             // 
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
@@ -822,52 +820,60 @@
             this.obd_id.Name = "obd_id";
             this.obd_id.Name = "obd_id";
             this.obd_id.Visible = false;
             this.obd_id.Visible = false;
             // 
             // 
-            // Column3
+            // choose
             // 
             // 
-            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;
+            this.choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.choose.DataPropertyName = "choose";
+            this.choose.HeaderText = "勾选";
+            this.choose.Name = "choose";
+            this.choose.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.choose.Width = 60;
             // 
             // 
-            // bg_code
+            // oi_itemcode
             // 
             // 
-            this.bg_code.DataPropertyName = "bg_code";
-            this.bg_code.HeaderText = "不良分组";
-            this.bg_code.Name = "bg_code";
-            this.bg_code.ReadOnly = true;
-            this.bg_code.Width = 93;
+            this.oi_itemcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.oi_itemcode.DataPropertyName = "oi_checkkind";
+            this.oi_itemcode.HeaderText = "检验类型";
+            this.oi_itemcode.Name = "oi_itemcode";
+            this.oi_itemcode.Width = 78;
             // 
             // 
-            // bg_name
+            // oi_ng
             // 
             // 
-            this.bg_name.DataPropertyName = "bg_name";
-            this.bg_name.HeaderText = "分组名称";
-            this.bg_name.Name = "bg_name";
-            this.bg_name.ReadOnly = true;
-            this.bg_name.Width = 93;
+            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;
             // 
             // 
-            // or_id
+            // oi_leveldefect
             // 
             // 
-            this.or_id.DataPropertyName = "or_id";
-            this.or_id.HeaderText = "or_id";
-            this.or_id.Name = "or_id";
-            this.or_id.Visible = false;
+            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;
             // 
             // 
-            // bc_code1
+            // ois_remark
             // 
             // 
-            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.bc_code1.DataPropertyName = "bg_code";
-            this.bc_code1.HeaderText = "不良代码";
-            this.bc_code1.Name = "bc_code1";
-            this.bc_code1.ReadOnly = true;
+            this.ois_remark.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.ois_remark.HeaderText = "";
+            this.ois_remark.Name = "ois_remark";
             // 
             // 
-            // bc_name1
+            // ois_status
             // 
             // 
-            this.bc_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.bc_name1.DataPropertyName = "bg_name";
-            this.bc_name1.HeaderText = "不良原因";
-            this.bc_name1.Name = "bc_name1";
-            this.bc_name1.ReadOnly = true;
+            this.ois_status.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.ois_status.HeaderText = "";
+            this.ois_status.Name = "ois_status";
+            // 
+            // ois_id
+            // 
+            this.ois_id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.ois_id.DataPropertyName = "ois_id";
+            this.ois_id.HeaderText = "";
+            this.ois_id.Name = "ois_id";
+            this.ois_id.Visible = false;
             // 
             // 
             // OQC_SamplingDataCollection
             // OQC_SamplingDataCollection
             // 
             // 
@@ -982,13 +988,6 @@
         private System.Windows.Forms.Label ob_aqlcode_label;
         private System.Windows.Forms.Label ob_aqlcode_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_maxngacceptqty;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_maxngacceptqty;
         private System.Windows.Forms.Label ob_maxngacceptqty_label;
         private System.Windows.Forms.Label ob_maxngacceptqty_label;
-        private System.Windows.Forms.DataGridViewCheckBoxColumn choose;
-        private System.Windows.Forms.DataGridViewTextBoxColumn oi_itemcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn oi_ng;
-        private System.Windows.Forms.DataGridViewTextBoxColumn oi_leveldefect;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ois_remark;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ois_status;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ois_id;
         private System.Windows.Forms.Label ob_projectcode_label;
         private System.Windows.Forms.Label ob_projectcode_label;
         private System.Windows.Forms.DataGridViewTextBoxColumn or_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn or_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_code1;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_code1;
@@ -996,5 +995,12 @@
         private System.Windows.Forms.DataGridViewCheckBoxColumn Column3;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Column3;
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_code;
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_code;
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_name;
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_name;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn choose;
+        private System.Windows.Forms.DataGridViewTextBoxColumn oi_itemcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn oi_ng;
+        private System.Windows.Forms.DataGridViewTextBoxColumn oi_leveldefect;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ois_remark;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ois_status;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ois_id;
     }
     }
 }
 }

+ 17 - 8
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -51,6 +51,10 @@ namespace UAS_MES.OQC
             if (ErrorMessage == "")
             if (ErrorMessage == "")
             {
             {
                 BaseUtil.SetFormValue(Controls, dt[0]);
                 BaseUtil.SetFormValue(Controls, dt[0]);
+                if (ob_aqlcode.Text == "")
+                {
+
+                }
                 dgvr.Clear();
                 dgvr.Clear();
             }
             }
             else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
             else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
@@ -96,7 +100,13 @@ namespace UAS_MES.OQC
                             string oMsID = "";
                             string oMsID = "";
                             if (LogicHandler.CheckStepSNAndMacode(dt.Rows[0]["ob_makecode"].ToString(), User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
                             if (LogicHandler.CheckStepSNAndMacode(dt.Rows[0]["ob_makecode"].ToString(), User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
                             {
                             {
-                                return true;
+                                if (ob_aqlcode.Text == "")
+                                {
+                                    return false;
+                                }
+                                else {
+                                    return true;
+                                }
                             }
                             }
                             else {
                             else {
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
@@ -124,6 +134,11 @@ namespace UAS_MES.OQC
         {
         {
             dt = (DataTable)dh.ExecuteSql("select oi_checkkind,max(oi_sampleqty) oi_count,nvl(max(oi_checkqty),0) oi_checkedcount from OQCBatch  left join OQCItems on ob_checkno=oi_checkno  where oi_checkno='" + ob_checkno.Text + "' group by oi_checkkind ", "select");
             dt = (DataTable)dh.ExecuteSql("select oi_checkkind,max(oi_sampleqty) oi_count,nvl(max(oi_checkqty),0) oi_checkedcount from OQCBatch  left join OQCItems on ob_checkno=oi_checkno  where oi_checkno='" + ob_checkno.Text + "' group by oi_checkkind ", "select");
             BaseUtil.FillExpandDgvWithDataTable(CheckTypeDGV, dt, true);
             BaseUtil.FillExpandDgvWithDataTable(CheckTypeDGV, dt, true);
+            if (CheckTypeDGV.Rows.Count == 0)
+            {
+                OperateResult.AppendText(">>请先维护抽样计划\n", Color.Red);
+                return;
+            }
             sql.Clear();
             sql.Clear();
             sql.Append("select bg_code,bg_name from product left join productkind ");
             sql.Append("select bg_code,bg_name from product left join productkind ");
             sql.Append("on pr_kind=pk_code left join PRODUCTBADGROUP on pk_code= pb_kindcode ");
             sql.Append("on pr_kind=pk_code left join PRODUCTBADGROUP on pk_code= pb_kindcode ");
@@ -164,7 +179,6 @@ namespace UAS_MES.OQC
                         //将布尔值转换为0,-1
                         //将布尔值转换为0,-1
                         if (TempForCheckType.Rows[i]["ois_id"].ToString() != "" && TempForCheckType.Rows[i]["ois_id"].ToString() != "0")
                         if (TempForCheckType.Rows[i]["ois_id"].ToString() != "" && TempForCheckType.Rows[i]["ois_id"].ToString() != "0")
                         {
                         {
-                            Console.WriteLine("ioi_ng" + TempForCheckType.Rows[i]["oi_ng"].ToString());
                             ois_ifng_update.Add(TempForCheckType.Rows[i]["oi_ng"].ToString() == "True" ? "-1" : "0");
                             ois_ifng_update.Add(TempForCheckType.Rows[i]["oi_ng"].ToString() == "True" ? "-1" : "0");
                             ois_defectlevel_update.Add(TempForCheckType.Rows[i]["oi_leveldefect"].ToString());
                             ois_defectlevel_update.Add(TempForCheckType.Rows[i]["oi_leveldefect"].ToString());
                             ois_remark_update.Add(TempForCheckType.Rows[i]["ois_remark"].ToString());
                             ois_remark_update.Add(TempForCheckType.Rows[i]["ois_remark"].ToString());
@@ -172,7 +186,6 @@ namespace UAS_MES.OQC
                         }
                         }
                         else
                         else
                         {
                         {
-                            Console.WriteLine("uoi_ng" + TempForCheckType.Rows[i]["oi_ng"].ToString());
                             oi_itemcode_insert.Add(TempForCheckType.Rows[i]["oi_itemcode"].ToString());
                             oi_itemcode_insert.Add(TempForCheckType.Rows[i]["oi_itemcode"].ToString());
                             ois_ifng_insert.Add(TempForCheckType.Rows[i]["oi_ng"].ToString() == "True" ? "-1" : "0");
                             ois_ifng_insert.Add(TempForCheckType.Rows[i]["oi_ng"].ToString() == "True" ? "-1" : "0");
                             ois_defectlevel_insert.Add(TempForCheckType.Rows[i]["oi_leveldefect"].ToString());
                             ois_defectlevel_insert.Add(TempForCheckType.Rows[i]["oi_leveldefect"].ToString());
@@ -181,17 +194,13 @@ namespace UAS_MES.OQC
                     }
                     }
                     //判断是否含不通过的内容
                     //判断是否含不通过的内容
                     bool AllPass = true;
                     bool AllPass = true;
-                    Console.WriteLine(ois_ifng_insert.Count);
                     for (int i = 0; i < ois_ifng_insert.Count; i++)
                     for (int i = 0; i < ois_ifng_insert.Count; i++)
                     {
                     {
-                        Console.WriteLine(ois_ifng_insert[i]);
                         if (ois_ifng_insert[i] == "-1")
                         if (ois_ifng_insert[i] == "-1")
                             AllPass = false;
                             AllPass = false;
                     }
                     }
-                    Console.WriteLine(ois_ifng_update.Count);
                     for (int i = 0; i < ois_ifng_update.Count; i++)
                     for (int i = 0; i < ois_ifng_update.Count; i++)
                     {
                     {
-                        Console.WriteLine(ois_ifng_update[i]);
                         if (ois_ifng_update[i] == "-1")
                         if (ois_ifng_update[i] == "-1")
                             AllPass = false;
                             AllPass = false;
                     }
                     }
@@ -274,7 +283,7 @@ namespace UAS_MES.OQC
                 {
                 {
                     dh.ExecuteSql("update OQCBatch set ob_status='OK',ob_result='OK' where ob_checkno='" + ob_checkno.Text + "'", "select");
                     dh.ExecuteSql("update OQCBatch set ob_status='OK',ob_result='OK' where ob_checkno='" + ob_checkno.Text + "'", "select");
                     string ErrorMessage;
                     string ErrorMessage;
-                    LogicHandler.UpdateMakeMessage(ms_sncode.Text, ob_makecode.Text, "OQC批判过", User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
+                    LogicHandler.UpdateOQCMessage(ms_sncode.Text, ob_makecode.Text, "OQC批判过", User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
                     //记录操作日志
                     //记录操作日志
                     LogicHandler.InsertMakeProcess(ms_sncode.Text, ob_makecode.Text, User.UserSourceCode, "批结果判定", "批次通过", User.UserName);
                     LogicHandler.InsertMakeProcess(ms_sncode.Text, ob_makecode.Text, User.UserSourceCode, "批结果判定", "批次通过", User.UserName);
                     GetBatch.PerformClick();
                     GetBatch.PerformClick();

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

@@ -933,7 +933,6 @@ namespace UAS_MES.PublicMethod
             sql.Append("ms_status,ms_checkno,ms_outboxcode from make left join makecraftdetail on mcd_macode=ma_code left join makeserial on ms_makecode=ma_code ");
             sql.Append("ms_status,ms_checkno,ms_outboxcode from make left join makecraftdetail on mcd_macode=ma_code left join makeserial on ms_makecode=ma_code ");
             sql.Append("where ms_sncode='" + iSnCode + "' and ma_code='" + iMakeCode + "' and mcd_stepcode='" + CurrentStep + "'");
             sql.Append("where ms_sncode='" + iSnCode + "' and ma_code='" + iMakeCode + "' and mcd_stepcode='" + CurrentStep + "'");
             dh.ExecuteSql(sql.ToString(), "insert");
             dh.ExecuteSql(sql.ToString(), "insert");
-            sql.Clear();
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -1326,8 +1325,6 @@ namespace UAS_MES.PublicMethod
             //更新序列号已经采集的工序 ms_paststep 已采集数据,更新下一工序
             //更新序列号已经采集的工序 ms_paststep 已采集数据,更新下一工序
             dh.ExecuteSQLTran(sqls.ToArray());
             dh.ExecuteSQLTran(sqls.ToArray());
             sqls.Clear();
             sqls.Clear();
-            //记录操作日志
-            InsertMakeProcess(iSnCode, iMakeCode, iSourceCode, iMPKind, iResult, iUserCode);
             //检测下道工序是否存在,不存在 更新状态为已完成
             //检测下道工序是否存在,不存在 更新状态为已完成
             if (nextstepcode == null || nextstepcode.ToString() == "")
             if (nextstepcode == null || nextstepcode.ToString() == "")
             {
             {