浏览代码

修改测试采集BUG,修改OQC部分逻辑

章政 8 年之前
父节点
当前提交
73a2023977

+ 93 - 81
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -26,6 +26,7 @@ namespace UAS_MES.Make
         //制造单号
         string ms_macode;
 
+        string ErrorMessage = "";
         //用于保存是否之前输入的ma_code
 
         //用于保存是否之前输入的ms_sncode
@@ -151,7 +152,7 @@ namespace UAS_MES.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
-                string ErrorMessage = "";
+
                 bool ifFirst;
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
@@ -159,8 +160,9 @@ namespace UAS_MES.Make
                     string oMSID = "";
                     if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
                     {
-                        dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,pr_detail,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='"+oMakeCode+"'", "select");
-                        if (dt.Rows.Count > 0) {
+                        dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,pr_detail,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
+                        if (dt.Rows.Count > 0)
+                        {
                             BaseUtil.SetFormValue(this.Controls, dt);
                             LockMakeCode.Checked = true;
                         }
@@ -199,7 +201,7 @@ namespace UAS_MES.Make
             //如果ms_makecode的值修改过再去查询
             sql.Clear();
             sql.Append("select pb_badgroup from make left join product on pr_code=ma_prodcode left join ");
-            sql.Append("productkind on pk_name=pr_kind left join productbadgroup on pk_code=PB_KINDCODE where ma_code='" + ma_code.Text + "' and pb_badgroup is not null");
+            sql.Append("productkind on pk_code=pr_kind left join productbadgroup on pk_code=PB_KINDCODE where ma_code='" + ma_code.Text + "' and pb_badgroup is not null");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count == 0)
             {
@@ -209,7 +211,6 @@ namespace UAS_MES.Make
                 bc_groupcode.DisplayMember = "bg_name";
                 bc_groupcode.ValueMember = "bg_code";
                 bc_groupcode.DataSource = dt;
-                //设置Combox的下拉值
             }
             else
             {
@@ -242,7 +243,7 @@ namespace UAS_MES.Make
             }
             WaitRejectList.EndUpdate();
             sql.Clear();
-            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,mb_badremark from makebad  ") ;
+            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,mb_badremark from makebad  ");
             sql.Append("left join badgroup on mb_bgcode=bg_code left join badcode on mb_badcode=bc_code ");
             sql.Append(" where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "'");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -273,26 +274,10 @@ namespace UAS_MES.Make
                 LoadBadGroupData();
                 //勾选了自动产生代码
                 if (AutoBadCode.Checked)
-                {
                     Save_Click(new object(), new EventArgs());
-                }
             }
             if (GoodProduct.Checked)
-            {
-                string RejectRecordNum = dh.getFieldDataByCondition("makeBad", "count(1) cn", "mb_sncode='" + ms_sncode.Text + "' and mb_status not in (1,-1)").ToString();
-                //存在不良记录
-                if (int.Parse(RejectRecordNum) > 0)
-                    OperateResult.AppendText(">>" + ms_sncode.Text + "已经判为不良品,不允许修改!\n", Color.Red);
-                else
-                {
-                    //良品信息采集
-                    if (LogicHandler.UpdateMakeMessage(ms_sncode.Text, ma_code.Text, "良品采集", User.UserSourceCode, User.UserCode, "检测合格", out ErrorMessage))
-                        OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为良品\n", Color.Green);
-                    else
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
-                }
-                ms_sncode.Text = "";
-            }
+                SetTestPass();
             dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
             BaseUtil.SetFormValue(Controls, dt);
         }
@@ -302,79 +287,106 @@ namespace UAS_MES.Make
             asc.controlAutoSize(this);
         }
 
+        private void SetTestPass()
+        {
+            string RejectRecordNum = dh.getFieldDataByCondition("makeBad", "count(1) cn", "mb_sncode='" + ms_sncode.Text + "' and mb_status not in (1,-1)").ToString();
+            //存在不良记录
+            if (int.Parse(RejectRecordNum) > 0)
+                OperateResult.AppendText(">>" + ms_sncode.Text + "已经判为不良品,不允许修改!\n", Color.Red);
+            else
+            {
+                //良品信息采集
+                if (LogicHandler.UpdateMakeMessage(ms_sncode.Text, ma_code.Text, "良品采集", User.UserSourceCode, User.UserCode, "检测合格", out ErrorMessage))
+                    OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为良品\n", Color.Green);
+                else
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+            }
+            ms_sncode.Text = "";
+        }
+
         private void Save_Click(object sender, EventArgs e)
         {
-            int RejectCount = ChoosedRejectList.Items.Count;
-            string[] bccode = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
-            string[] bcremark = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
-            string[] bgcode = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
-            string ErrorMessage = "";
-            if (AutoBadCode.Checked)
+            if (GoodProduct.Checked)
             {
-                string defaultvalue = Properties.Settings.Default.DefaultCollectionValue;
-                bccode = new string[] { defaultvalue };
-                bcremark = new string[] { defaultvalue };
-                bgcode = new string[] { defaultvalue };
+                SetTestPass();
             }
-            else
+            else if (Reject.Checked)
             {
-                if (ChoosedRejectList.Items.Count == 0 && bc_code.Text == "")
-                    OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
+                int RejectCount = ChoosedRejectList.Items.Count;
+                string[] bccode = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
+                string[] bcremark = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
+                string[] bgcode = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
+                string ErrorMessage = "";
+                if (AutoBadCode.Checked)
+                {
+                    string defaultvalue = Properties.Settings.Default.DefaultCollectionValue;
+                    bccode = new string[] { defaultvalue };
+                    bcremark = new string[] { defaultvalue };
+                    bgcode = new string[] { defaultvalue };
+                }
                 else
                 {
-                    //判断不良原因代码是否重复,不良原因保存表(makebad)
-                    //保存前台传送的不良信息保存至makebad 表。(判断不良原因是否重复)
-                    //新建不良代码和备注的变量
-                    //不良品的输入
-                    //如果长度不相等表示用户自行填写了
-                    if (bccode.Length != RejectCount)
+                    if (ChoosedRejectList.Items.Count == 0 && bc_code.Text == "")
                     {
-                        bgcode[0] = bc_groupcode.SelectedValue.ToString();
-                        bccode[0] = bc_code.Text;
-                        bcremark[0] = bc_remark.Text;
+                        OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
+                        return;
                     }
-                    //用户未填写不良代码一切按照正常逻辑,填写了从index=1开始执行
-                    for (int i = (bc_code.Text == "" ? 0 : 1); i < (bc_code.Text == "" ? RejectCount : RejectCount + 1); i++)
+                    else
                     {
-                        if (!(bccode[0] == ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[1].Text))
+                        //判断不良原因代码是否重复,不良原因保存表(makebad)
+                        //保存前台传送的不良信息保存至makebad 表。(判断不良原因是否重复)
+                        //新建不良代码和备注的变量
+                        //不良品的输入
+                        //如果长度不相等表示用户自行填写了
+                        if (bccode.Length != RejectCount)
                         {
-                            //截取分号前面的内容
-                            bgcode[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[1].Text.Split(':')[0];
-                            //获取所有的不良代码
-                            bccode[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[2].Text;
-                            //获取所有的不良备注
-                            bcremark[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[3].Text;
+                            bgcode[0] = bc_groupcode.SelectedValue.ToString();
+                            bccode[0] = bc_code.Text;
+                            bcremark[0] = bc_remark.Text;
+                        }
+                        //用户未填写不良代码一切按照正常逻辑,填写了从index=1开始执行
+                        for (int i = (bc_code.Text == "" ? 0 : 1); i < (bc_code.Text == "" ? RejectCount : RejectCount + 1); i++)
+                        {
+                            if (!(bccode[0] == ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[1].Text))
+                            {
+                                //截取分号前面的内容
+                                bgcode[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[1].Text.Split(':')[0];
+                                //获取所有的不良代码
+                                bccode[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[2].Text;
+                                //获取所有的不良备注
+                                bcremark[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[3].Text;
+                            }
                         }
                     }
                 }
+                //如果之前是良品的
+                dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno" }, "ms_sncode='" + ms_sncode.Text + "' and ms_stepcode='" + User.CurrentStepCode + "'");
+                if (dt.Rows.Count > 0)
+                {
+                    string status = dt.Rows[0]["ms_status"].ToString();
+                    if (status == "1" || status == "2")
+                        dh.UpdateByCondition("makecraftdetail", "mcd_okqty=mcd_okqty-1", "mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                    string checkno = dt.Rows[0]["ms_checkno"].ToString();
+                    //存在抽检批次更新为空
+                    if (checkno != "")
+                        dh.UpdateByCondition("makeserial", "ms_checkno=''", "ms_sncode='" + ms_sncode.Text + "' and ms_makecode='" + ma_code.Text + "'");
+                }
+                //不良信息采集
+                dh.ExecuteSql("delete from makebad where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "'", "delete");
+                if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserName, User.UserSourceCode, "检查未通过", bgcode, bccode, bcremark, out ErrorMessage))
+                {
+                    OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为不良\n", Color.Green);
+                    //清除不良信息
+                    bc_groupcode.DataSource = null;
+                    bc_groupcode.Text = "";
+                    bc_code.Text = "";
+                    WaitRejectList.Items.Clear();
+                    ChoosedRejectList.Items.Clear();
+                    ms_sncode.Text = "";
+                }
+                else
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
             }
-            //如果之前是良品的
-            dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno" }, "ms_sncode='" + ms_sncode.Text + "' and ms_stepcode='" + User.CurrentStepCode + "'");
-            if (dt.Rows.Count > 0)
-            {
-                string status = dt.Rows[0]["ms_status"].ToString();
-                if (status == "1" || status == "2")
-                    dh.UpdateByCondition("makecraftdetail", "mcd_okqty=mcd_okqty-1", "mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
-                string checkno = dt.Rows[0]["ms_checkno"].ToString();
-                //存在抽检批次更新为空
-                if (checkno != "")
-                    dh.UpdateByCondition("makeserial", "ms_checkno=''", "ms_sncode='" + ms_sncode.Text + "' and ms_makecode='" + ma_code.Text + "'");
-            }
-            //不良信息采集
-            dh.ExecuteSql("delete from makebad where mb_sncode='"+ms_sncode.Text+"' and mb_makecode='"+ma_code.Text+"'","delete");
-            if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserName, User.UserSourceCode, "检查未通过", bgcode, bccode, bcremark, out ErrorMessage))
-            {
-                OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为不良\n", Color.Green);
-                //清除不良信息
-                bc_groupcode.DataSource = null;
-                bc_groupcode.Text = "";
-                bc_code.Text = "";
-                WaitRejectList.Items.Clear();
-                ChoosedRejectList.Items.Clear();
-                ms_sncode.Text = "";
-            }
-            else
-                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
         }
 
         private void bc_code_KeyDown(object sender, KeyEventArgs e)

+ 51 - 58
UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.Designer.cs

@@ -47,7 +47,6 @@
             this.ob_maxngacceptqty_label = new System.Windows.Forms.Label();
             this.richTextBox1 = new System.Windows.Forms.RichTextBox();
             this.label5 = new System.Windows.Forms.Label();
-            this.ob_maxngacceptqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.GetBatch = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_makecode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -70,6 +69,7 @@
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.ob_id = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_source = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ob_maxngacceptqty = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxNumOnly();
             this.panel2.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -77,7 +77,7 @@
             // 
             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.Location = new System.Drawing.Point(512, 239);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(510, 231);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(58, 21);
             this.ob_batchqty_label.TabIndex = 158;
@@ -87,7 +87,7 @@
             // 
             this.ob_result_label.AutoSize = true;
             this.ob_result_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_result_label.Location = new System.Drawing.Point(512, 198);
+            this.ob_result_label.Location = new System.Drawing.Point(510, 190);
             this.ob_result_label.Name = "ob_result_label";
             this.ob_result_label.Size = new System.Drawing.Size(74, 21);
             this.ob_result_label.TabIndex = 166;
@@ -97,7 +97,7 @@
             // 
             this.ob_okqty_label.AutoSize = true;
             this.ob_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_okqty_label.Location = new System.Drawing.Point(512, 324);
+            this.ob_okqty_label.Location = new System.Drawing.Point(510, 316);
             this.ob_okqty_label.Name = "ob_okqty_label";
             this.ob_okqty_label.Size = new System.Drawing.Size(58, 21);
             this.ob_okqty_label.TabIndex = 160;
@@ -107,7 +107,7 @@
             // 
             this.ob_ngqty_label.AutoSize = true;
             this.ob_ngqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_ngqty_label.Location = new System.Drawing.Point(512, 366);
+            this.ob_ngqty_label.Location = new System.Drawing.Point(510, 358);
             this.ob_ngqty_label.Name = "ob_ngqty_label";
             this.ob_ngqty_label.Size = new System.Drawing.Size(74, 21);
             this.ob_ngqty_label.TabIndex = 162;
@@ -117,7 +117,7 @@
             // 
             this.oi_checkqty_label.AutoSize = true;
             this.oi_checkqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.oi_checkqty_label.Location = new System.Drawing.Point(512, 282);
+            this.oi_checkqty_label.Location = new System.Drawing.Point(510, 274);
             this.oi_checkqty_label.Name = "oi_checkqty_label";
             this.oi_checkqty_label.Size = new System.Drawing.Size(58, 21);
             this.oi_checkqty_label.TabIndex = 164;
@@ -127,7 +127,7 @@
             // 
             this.ReworkRequire.AutoSize = true;
             this.ReworkRequire.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ReworkRequire.Location = new System.Drawing.Point(122, 534);
+            this.ReworkRequire.Location = new System.Drawing.Point(122, 525);
             this.ReworkRequire.Name = "ReworkRequire";
             this.ReworkRequire.Size = new System.Drawing.Size(125, 25);
             this.ReworkRequire.TabIndex = 168;
@@ -138,7 +138,7 @@
             // 
             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(512, 410);
+            this.ob_aqlcode_label.Location = new System.Drawing.Point(510, 402);
             this.ob_aqlcode_label.Name = "ob_aqlcode_label";
             this.ob_aqlcode_label.Size = new System.Drawing.Size(42, 21);
             this.ob_aqlcode_label.TabIndex = 169;
@@ -148,7 +148,7 @@
             // 
             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(256, 150);
+            this.ob_prodcode_label.Location = new System.Drawing.Point(256, 142);
             this.ob_prodcode_label.Name = "ob_prodcode_label";
             this.ob_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.ob_prodcode_label.TabIndex = 218;
@@ -158,7 +158,7 @@
             // 
             this.ob_makecode_label.AutoSize = true;
             this.ob_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_makecode_label.Location = new System.Drawing.Point(8, 151);
+            this.ob_makecode_label.Location = new System.Drawing.Point(8, 143);
             this.ob_makecode_label.Name = "ob_makecode_label";
             this.ob_makecode_label.Size = new System.Drawing.Size(58, 21);
             this.ob_makecode_label.TabIndex = 216;
@@ -168,7 +168,7 @@
             // 
             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(8, 49);
+            this.ob_checkno_label.Location = new System.Drawing.Point(8, 41);
             this.ob_checkno_label.Name = "ob_checkno_label";
             this.ob_checkno_label.Size = new System.Drawing.Size(58, 21);
             this.ob_checkno_label.TabIndex = 214;
@@ -178,7 +178,7 @@
             // 
             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(8, 81);
+            this.obd_outboxcode_label.Location = new System.Drawing.Point(8, 73);
             this.obd_outboxcode_label.Name = "obd_outboxcode_label";
             this.obd_outboxcode_label.Size = new System.Drawing.Size(42, 21);
             this.obd_outboxcode_label.TabIndex = 212;
@@ -188,7 +188,7 @@
             // 
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(8, 115);
+            this.ms_sncode_label.Location = new System.Drawing.Point(8, 107);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_sncode_label.TabIndex = 210;
@@ -202,7 +202,7 @@
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(0, 0);
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(982, 33);
+            this.panel2.Size = new System.Drawing.Size(982, 30);
             this.panel2.TabIndex = 220;
             this.panel2.Tag = "NoAuto";
             // 
@@ -221,7 +221,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(36, 463);
+            this.label3.Location = new System.Drawing.Point(36, 454);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(444, 20);
             this.label3.TabIndex = 222;
@@ -231,7 +231,7 @@
             // 
             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(36, 434);
+            this.ob_maxngacceptqty_label.Location = new System.Drawing.Point(36, 426);
             this.ob_maxngacceptqty_label.Name = "ob_maxngacceptqty_label";
             this.ob_maxngacceptqty_label.Size = new System.Drawing.Size(170, 21);
             this.ob_maxngacceptqty_label.TabIndex = 223;
@@ -239,7 +239,7 @@
             // 
             // richTextBox1
             // 
-            this.richTextBox1.Location = new System.Drawing.Point(88, 199);
+            this.richTextBox1.Location = new System.Drawing.Point(88, 191);
             this.richTextBox1.Name = "richTextBox1";
             this.richTextBox1.Size = new System.Drawing.Size(411, 225);
             this.richTextBox1.TabIndex = 225;
@@ -249,27 +249,12 @@
             // 
             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(8, 199);
+            this.label5.Location = new System.Drawing.Point(8, 191);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(42, 21);
             this.label5.TabIndex = 226;
             this.label5.Text = "备注";
             // 
-            // 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(262, 434);
-            this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
-            this.ob_maxngacceptqty.Power = null;
-            this.ob_maxngacceptqty.Size = new System.Drawing.Size(172, 21);
-            this.ob_maxngacceptqty.Str = null;
-            this.ob_maxngacceptqty.Str1 = null;
-            this.ob_maxngacceptqty.Str2 = null;
-            this.ob_maxngacceptqty.TabIndex = 224;
-            this.ob_maxngacceptqty.Tag = "NoAuto";
-            // 
             // GetBatch
             // 
             this.GetBatch.AllPower = "ifall";
@@ -277,7 +262,7 @@
             this.GetBatch.DownImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.DownImage")));
             this.GetBatch.Image = ((System.Drawing.Image)(resources.GetObject("GetBatch.Image")));
             this.GetBatch.IsShowBorder = true;
-            this.GetBatch.Location = new System.Drawing.Point(515, 153);
+            this.GetBatch.Location = new System.Drawing.Point(511, 146);
             this.GetBatch.MoveImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.MoveImage")));
             this.GetBatch.Name = "GetBatch";
             this.GetBatch.NormalImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.NormalImage")));
@@ -294,7 +279,7 @@
             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(355, 155);
+            this.ob_prodcode.Location = new System.Drawing.Point(355, 147);
             this.ob_prodcode.Name = "ob_prodcode";
             this.ob_prodcode.Power = null;
             this.ob_prodcode.Size = new System.Drawing.Size(144, 21);
@@ -310,7 +295,7 @@
             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(88, 153);
+            this.ob_makecode.Location = new System.Drawing.Point(88, 145);
             this.ob_makecode.Name = "ob_makecode";
             this.ob_makecode.Power = null;
             this.ob_makecode.Size = new System.Drawing.Size(160, 21);
@@ -325,7 +310,7 @@
             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(88, 51);
+            this.ob_checkno.Location = new System.Drawing.Point(88, 43);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Power = "ifread";
             this.ob_checkno.Size = new System.Drawing.Size(411, 21);
@@ -341,7 +326,7 @@
             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(88, 83);
+            this.obd_outboxcode.Location = new System.Drawing.Point(88, 75);
             this.obd_outboxcode.Name = "obd_outboxcode";
             this.obd_outboxcode.Power = null;
             this.obd_outboxcode.Size = new System.Drawing.Size(411, 21);
@@ -356,7 +341,7 @@
             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(88, 117);
+            this.ms_sncode.Location = new System.Drawing.Point(88, 109);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = "ifread";
             this.ms_sncode.Size = new System.Drawing.Size(411, 21);
@@ -373,7 +358,7 @@
             this.ob_batchqty.BackColor = System.Drawing.Color.White;
             this.ob_batchqty.Enabled = false;
             this.ob_batchqty.ID = null;
-            this.ob_batchqty.Location = new System.Drawing.Point(602, 239);
+            this.ob_batchqty.Location = new System.Drawing.Point(600, 231);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Power = null;
             this.ob_batchqty.Size = new System.Drawing.Size(147, 21);
@@ -389,7 +374,7 @@
             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(602, 324);
+            this.ob_okqty.Location = new System.Drawing.Point(600, 316);
             this.ob_okqty.Name = "ob_okqty";
             this.ob_okqty.Power = null;
             this.ob_okqty.Size = new System.Drawing.Size(147, 21);
@@ -405,7 +390,7 @@
             this.oi_checkqty.BackColor = System.Drawing.Color.White;
             this.oi_checkqty.Enabled = false;
             this.oi_checkqty.ID = null;
-            this.oi_checkqty.Location = new System.Drawing.Point(602, 282);
+            this.oi_checkqty.Location = new System.Drawing.Point(600, 274);
             this.oi_checkqty.Name = "oi_checkqty";
             this.oi_checkqty.Power = null;
             this.oi_checkqty.Size = new System.Drawing.Size(147, 21);
@@ -421,7 +406,7 @@
             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(602, 366);
+            this.ob_ngqty.Location = new System.Drawing.Point(600, 358);
             this.ob_ngqty.Name = "ob_ngqty";
             this.ob_ngqty.Power = null;
             this.ob_ngqty.Size = new System.Drawing.Size(147, 21);
@@ -437,7 +422,7 @@
             this.ob_result.BackColor = System.Drawing.Color.White;
             this.ob_result.Enabled = false;
             this.ob_result.ID = null;
-            this.ob_result.Location = new System.Drawing.Point(602, 198);
+            this.ob_result.Location = new System.Drawing.Point(600, 190);
             this.ob_result.Name = "ob_result";
             this.ob_result.Power = null;
             this.ob_result.Size = new System.Drawing.Size(147, 21);
@@ -453,7 +438,7 @@
             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(602, 410);
+            this.ob_aqlcode.Location = new System.Drawing.Point(600, 402);
             this.ob_aqlcode.Name = "ob_aqlcode";
             this.ob_aqlcode.Power = null;
             this.ob_aqlcode.Size = new System.Drawing.Size(147, 21);
@@ -471,7 +456,7 @@
             this.WithdrawPass.Enabled = false;
             this.WithdrawPass.Image = ((System.Drawing.Image)(resources.GetObject("WithdrawPass.Image")));
             this.WithdrawPass.IsShowBorder = true;
-            this.WithdrawPass.Location = new System.Drawing.Point(435, 494);
+            this.WithdrawPass.Location = new System.Drawing.Point(435, 485);
             this.WithdrawPass.MoveImage = ((System.Drawing.Image)(resources.GetObject("WithdrawPass.MoveImage")));
             this.WithdrawPass.Name = "WithdrawPass";
             this.WithdrawPass.NormalImage = ((System.Drawing.Image)(resources.GetObject("WithdrawPass.NormalImage")));
@@ -490,7 +475,7 @@
             this.BatchRejection.Enabled = false;
             this.BatchRejection.Image = ((System.Drawing.Image)(resources.GetObject("BatchRejection.Image")));
             this.BatchRejection.IsShowBorder = true;
-            this.BatchRejection.Location = new System.Drawing.Point(31, 535);
+            this.BatchRejection.Location = new System.Drawing.Point(31, 526);
             this.BatchRejection.MoveImage = ((System.Drawing.Image)(resources.GetObject("BatchRejection.MoveImage")));
             this.BatchRejection.Name = "BatchRejection";
             this.BatchRejection.NormalImage = ((System.Drawing.Image)(resources.GetObject("BatchRejection.NormalImage")));
@@ -509,7 +494,7 @@
             this.ForcePass.Enabled = false;
             this.ForcePass.Image = ((System.Drawing.Image)(resources.GetObject("ForcePass.Image")));
             this.ForcePass.IsShowBorder = true;
-            this.ForcePass.Location = new System.Drawing.Point(295, 494);
+            this.ForcePass.Location = new System.Drawing.Point(295, 485);
             this.ForcePass.MoveImage = ((System.Drawing.Image)(resources.GetObject("ForcePass.MoveImage")));
             this.ForcePass.Name = "ForcePass";
             this.ForcePass.NormalImage = ((System.Drawing.Image)(resources.GetObject("ForcePass.NormalImage")));
@@ -528,7 +513,7 @@
             this.ForceRejection.Enabled = false;
             this.ForceRejection.Image = ((System.Drawing.Image)(resources.GetObject("ForceRejection.Image")));
             this.ForceRejection.IsShowBorder = true;
-            this.ForceRejection.Location = new System.Drawing.Point(295, 537);
+            this.ForceRejection.Location = new System.Drawing.Point(295, 528);
             this.ForceRejection.MoveImage = ((System.Drawing.Image)(resources.GetObject("ForceRejection.MoveImage")));
             this.ForceRejection.Name = "ForceRejection";
             this.ForceRejection.NormalImage = ((System.Drawing.Image)(resources.GetObject("ForceRejection.NormalImage")));
@@ -547,7 +532,7 @@
             this.WithdrawRejection.Enabled = false;
             this.WithdrawRejection.Image = ((System.Drawing.Image)(resources.GetObject("WithdrawRejection.Image")));
             this.WithdrawRejection.IsShowBorder = true;
-            this.WithdrawRejection.Location = new System.Drawing.Point(435, 537);
+            this.WithdrawRejection.Location = new System.Drawing.Point(435, 528);
             this.WithdrawRejection.MoveImage = ((System.Drawing.Image)(resources.GetObject("WithdrawRejection.MoveImage")));
             this.WithdrawRejection.Name = "WithdrawRejection";
             this.WithdrawRejection.NormalImage = ((System.Drawing.Image)(resources.GetObject("WithdrawRejection.NormalImage")));
@@ -566,7 +551,7 @@
             this.BatchPass.Enabled = false;
             this.BatchPass.Image = ((System.Drawing.Image)(resources.GetObject("BatchPass.Image")));
             this.BatchPass.IsShowBorder = true;
-            this.BatchPass.Location = new System.Drawing.Point(31, 493);
+            this.BatchPass.Location = new System.Drawing.Point(31, 484);
             this.BatchPass.MoveImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.MoveImage")));
             this.BatchPass.Name = "BatchPass";
             this.BatchPass.NormalImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.NormalImage")));
@@ -584,7 +569,7 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(835, 522);
+            this.Clean.Location = new System.Drawing.Point(835, 514);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -598,7 +583,7 @@
             // 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(760, 179);
+            this.OperateResult.Location = new System.Drawing.Point(760, 171);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(210, 319);
             this.OperateResult.TabIndex = 227;
@@ -610,7 +595,7 @@
             this.ob_id.BackColor = System.Drawing.Color.White;
             this.ob_id.Enabled = false;
             this.ob_id.ID = null;
-            this.ob_id.Location = new System.Drawing.Point(759, 63);
+            this.ob_id.Location = new System.Drawing.Point(759, 55);
             this.ob_id.Name = "ob_id";
             this.ob_id.Power = null;
             this.ob_id.Size = new System.Drawing.Size(147, 21);
@@ -627,7 +612,7 @@
             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(759, 83);
+            this.ob_source.Location = new System.Drawing.Point(759, 75);
             this.ob_source.Name = "ob_source";
             this.ob_source.Power = null;
             this.ob_source.Size = new System.Drawing.Size(147, 21);
@@ -637,17 +622,25 @@
             this.ob_source.TabIndex = 229;
             this.ob_source.Tag = "NoAuto";
             // 
+            // ob_maxngacceptqty
+            // 
+            this.ob_maxngacceptqty.Location = new System.Drawing.Point(212, 426);
+            this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
+            this.ob_maxngacceptqty.Size = new System.Drawing.Size(194, 21);
+            this.ob_maxngacceptqty.TabIndex = 230;
+            this.ob_maxngacceptqty.Text = "0";
+            // 
             // OQC_BatchResultJudge
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(982, 576);
+            this.ClientSize = new System.Drawing.Size(982, 565);
+            this.Controls.Add(this.ob_maxngacceptqty);
             this.Controls.Add(this.ob_source);
             this.Controls.Add(this.ob_id);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.richTextBox1);
-            this.Controls.Add(this.ob_maxngacceptqty);
             this.Controls.Add(this.ob_maxngacceptqty_label);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.GetBatch);
@@ -730,12 +723,12 @@
         private System.Windows.Forms.Label label1;
         private CustomControl.ButtonUtil.NormalButton GetBatch;
         private System.Windows.Forms.Label label3;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ob_maxngacceptqty;
         private System.Windows.Forms.Label ob_maxngacceptqty_label;
         private System.Windows.Forms.RichTextBox richTextBox1;
         private System.Windows.Forms.Label label5;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_id;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_source;
+        private CustomControl.TextBoxWithIcon.TextBoxNumOnly ob_maxngacceptqty;
     }
 }

+ 0 - 11
UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.cs

@@ -24,7 +24,6 @@ namespace UAS_MES.OQC
         private void 抽检批维护_Load(object sender, EventArgs e)
         {
             dh = new DataHelper();
-
             asc.controllInitializeSize(this);
         }
 
@@ -108,9 +107,7 @@ namespace UAS_MES.OQC
                     OperateResult.AppendText(">>通过批成功\n", Color.Green);
                 }
                 else
-                {
                     OperateResult.AppendText(">>当前批次不合格数为" + ob_ngqty.Text + ",大于最大不合格允通过数" + ob_maxngacceptqty.Text + "\n", Color.Red);
-                }
             }
         }
 
@@ -148,9 +145,7 @@ namespace UAS_MES.OQC
                     GetBatch.PerformClick();
                 }
                 else
-                {
                     OperateResult.AppendText(">>当前批次不合格数为" + ob_ngqty.Text + ",大于最大不合格允通过数" + ob_maxngacceptqty.Text + "\n", Color.Red);
-                }
             }
         }
 
@@ -244,9 +239,7 @@ namespace UAS_MES.OQC
             if (ob_aqlcode.Text == "")
             {
                 if (ob_maxngacceptqty.Text == "")
-                {
                     OperateResult.AppendText(">>AQL标准为空的时候必须填写最大不合格允许通过数\n", Color.Red);
-                }
                 else
                 {
                     sql.Clear();
@@ -261,9 +254,7 @@ namespace UAS_MES.OQC
                             return false;
                         }
                         else
-                        {
                             return true;
-                        }
                     }
                 }
             }
@@ -313,9 +304,7 @@ namespace UAS_MES.OQC
         private void ob_checkno_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
-            {
                 GetBatch.PerformClick();
-            }
         }
 
         private void ms_sncode_KeyDown(object sender, KeyEventArgs e)

+ 10 - 41
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.cs

@@ -36,7 +36,7 @@ namespace UAS_MES.OQC
             ob_aqlcode.SelectField = "AL_ID # ID,AL_CODE  # 流水编号,AL_NAME # 检验标准名称,AL_STATUS # 状态";
             ob_aqlcode.SetValueField = new string[] { "ob_aqlcode" };
             ob_aqlcode.FormName = Name;
-
+            ob_aqlcode.Condition = "al_statuscode='AUDITED'";
         }
 
         private void 抽样计划维护_SizeChanged(object sender, EventArgs e)
@@ -126,9 +126,7 @@ namespace UAS_MES.OQC
                 OperateResult.AppendText(">>保存配置成功\n", Color.Green);
             }
             else
-            {
                 OperateResult.AppendText(">>送检批次必须为待检验状态\n", Color.Red);
-            }
         }
 
         private void RefreshConfiguration_Click(object sender, EventArgs e)
@@ -146,51 +144,26 @@ namespace UAS_MES.OQC
         {
             if (ob_aqlcode.Text != "" || ob_maxngacceptqty.Text != "")
             {
-                dt = (DataTable)dh.ExecuteSql(" select  al_statuscode  from qua_aql where al_code='" + ob_aqlcode.Text + "'", "select");
-                if (dt.Rows.Count > 0)
-                {
-                    if (dt.Rows[0]["al_statuscode"].ToString() == "AUDITED")
-                    {
-                        SaveConfiguration.PerformClick();
-                        Checkob_maxngacceptqty();
-                        GetBatch.PerformClick();
-                    }
-                    else
-                    {
-                        OperateResult.AppendText(">>AQL必须是已审核\n", Color.Red);
-                    }
-                }
-                else{
-                    OperateResult.AppendText(">>AQL抽样标准不存在\n", Color.Red);
-                    Checkob_maxngacceptqty();
-                }
+                SaveConfiguration.PerformClick();
+                Checkob_maxngacceptqty();
+                GetBatch.PerformClick();
             }
             else
-            {
                 OperateResult.AppendText(">>AQL和最大不合格允许通过数至少填写一个\n", Color.Red);
-            }
         }
 
         //对于最大不合格允通过数的校验
         private void Checkob_maxngacceptqty()
         {
-            try
+            if (ob_maxngacceptqty.Text == "" || int.Parse(ob_maxngacceptqty.Text) < 0)
             {
-                if (ob_maxngacceptqty.Text == "" || int.Parse(ob_maxngacceptqty.Text) < 0)
-                {
-                    OperateResult.AppendText(">>最大不合格允通过数必须大于0或者为空\n", Color.Red);
-                    ob_maxngacceptqty.Text = null;
-                }
-                else
-                {
-                    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");
-                    OperateResult.AppendText(">>保存成功\n", Color.Green);
-                }
+                OperateResult.AppendText(">>最大不合格允通过数必须大于0或者为空\n", Color.Red);
+                ob_maxngacceptqty.Text = null;
             }
-            catch
+            else
             {
-                OperateResult.AppendText(">>最大不合格允通过数请填整数\n", Color.Red);
-                ob_maxngacceptqty.Text = null;
+                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");
+                OperateResult.AppendText(">>保存成功\n", Color.Green);
             }
         }
 
@@ -207,17 +180,13 @@ namespace UAS_MES.OQC
         private void ob_checkno_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
-            {
                 GetBatch.PerformClick();
-            }
         }
 
         private void ms_sncode_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
-            {
                 GetBatch.PerformClick();
-            }
         }
     }
 }

+ 84 - 120
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.designer.cs

@@ -47,7 +47,6 @@
             this.ob_aqlcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.pr_detail = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_projectcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
-            this.ob_maxngacceptqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_status = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.Clean = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -69,6 +68,7 @@
             this.obd_outboxcode = 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.ob_maxngacceptqty = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxNumOnly();
             this.panel2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
             this.SuspendLayout();
@@ -77,10 +77,9 @@
             // 
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(701, 61);
-            this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_sncode_label.Location = new System.Drawing.Point(526, 49);
             this.ms_sncode_label.Name = "ms_sncode_label";
-            this.ms_sncode_label.Size = new System.Drawing.Size(72, 27);
+            this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_sncode_label.TabIndex = 152;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -88,10 +87,9 @@
             // 
             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(28, 56);
-            this.ob_checkno_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_checkno_label.Location = new System.Drawing.Point(21, 45);
             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(58, 21);
             this.ob_checkno_label.TabIndex = 154;
             this.ob_checkno_label.Text = "批次号";
             // 
@@ -102,9 +100,8 @@
             this.panel2.Controls.Add(this.label2);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(0, 0);
-            this.panel2.Margin = new System.Windows.Forms.Padding(4);
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(1363, 41);
+            this.panel2.Size = new System.Drawing.Size(1022, 33);
             this.panel2.TabIndex = 156;
             this.panel2.Tag = "NoAuto";
             // 
@@ -113,10 +110,9 @@
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.label2.Location = new System.Drawing.Point(16, 5);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(12, 4);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(177, 27);
+            this.label2.Size = new System.Drawing.Size(143, 21);
             this.label2.TabIndex = 0;
             this.label2.Text = "OQC采样计划维护";
             // 
@@ -124,10 +120,9 @@
             // 
             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(357, 59);
-            this.obd_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.obd_outboxcode_label.Location = new System.Drawing.Point(268, 47);
             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(42, 21);
             this.obd_outboxcode_label.TabIndex = 157;
             this.obd_outboxcode_label.Text = "箱号";
             // 
@@ -135,10 +130,9 @@
             // 
             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.Location = new System.Drawing.Point(28, 119);
-            this.ob_batchqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(21, 95);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
-            this.ob_batchqty_label.Size = new System.Drawing.Size(72, 27);
+            this.ob_batchqty_label.Size = new System.Drawing.Size(58, 21);
             this.ob_batchqty_label.TabIndex = 159;
             this.ob_batchqty_label.Text = "批数量";
             // 
@@ -146,10 +140,9 @@
             // 
             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(357, 121);
-            this.ob_source_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_source_label.Location = new System.Drawing.Point(268, 97);
             this.ob_source_label.Name = "ob_source_label";
-            this.ob_source_label.Size = new System.Drawing.Size(72, 27);
+            this.ob_source_label.Size = new System.Drawing.Size(58, 21);
             this.ob_source_label.TabIndex = 161;
             this.ob_source_label.Text = "批类型";
             // 
@@ -157,10 +150,9 @@
             // 
             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(701, 122);
-            this.pr_kind_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_kind_label.Location = new System.Drawing.Point(526, 98);
             this.pr_kind_label.Name = "pr_kind_label";
-            this.pr_kind_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_kind_label.Size = new System.Drawing.Size(74, 21);
             this.pr_kind_label.TabIndex = 165;
             this.pr_kind_label.Text = "产品类型";
             // 
@@ -168,10 +160,9 @@
             // 
             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(1052, 65);
-            this.ob_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_prodcode_label.Location = new System.Drawing.Point(789, 52);
             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(74, 21);
             this.ob_prodcode_label.TabIndex = 163;
             this.ob_prodcode_label.Text = "产品编号";
             // 
@@ -179,10 +170,9 @@
             // 
             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(52, 680);
-            this.ob_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_remark_label.Location = new System.Drawing.Point(39, 544);
             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(42, 21);
             this.ob_remark_label.TabIndex = 172;
             this.ob_remark_label.Text = "备注";
             // 
@@ -190,10 +180,9 @@
             // 
             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(1052, 122);
-            this.ob_status_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_status_label.Location = new System.Drawing.Point(789, 98);
             this.ob_status_label.Name = "ob_status_label";
-            this.ob_status_label.Size = new System.Drawing.Size(52, 27);
+            this.ob_status_label.Size = new System.Drawing.Size(42, 21);
             this.ob_status_label.TabIndex = 178;
             this.ob_status_label.Text = "状态";
             // 
@@ -201,10 +190,9 @@
             // 
             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.Location = new System.Drawing.Point(52, 730);
-            this.ob_maxacceptqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_maxacceptqty_label.Location = new System.Drawing.Point(39, 584);
             this.ob_maxacceptqty_label.Name = "ob_maxacceptqty_label";
-            this.ob_maxacceptqty_label.Size = new System.Drawing.Size(212, 27);
+            this.ob_maxacceptqty_label.Size = new System.Drawing.Size(170, 21);
             this.ob_maxacceptqty_label.TabIndex = 182;
             this.ob_maxacceptqty_label.Text = "最大不合格允许通过数";
             // 
@@ -212,10 +200,9 @@
             // 
             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(547, 680);
-            this.ob_aqlcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ob_aqlcode_label.Location = new System.Drawing.Point(410, 544);
             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(42, 21);
             this.ob_aqlcode_label.TabIndex = 184;
             this.ob_aqlcode_label.Text = "AQL";
             // 
@@ -223,10 +210,9 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(1052, 174);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(789, 139);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 186;
             this.label1.Text = "检验方案";
             // 
@@ -234,9 +220,10 @@
             // 
             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.Location = new System.Drawing.Point(28, 170);
+            this.pr_detail_label.Location = new System.Drawing.Point(21, 136);
+            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.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 188;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -247,12 +234,13 @@
             this.ob_aqlcode.Condition = null;
             this.ob_aqlcode.DBTitle = null;
             this.ob_aqlcode.FormName = null;
-            this.ob_aqlcode.Location = new System.Drawing.Point(613, 678);
+            this.ob_aqlcode.Location = new System.Drawing.Point(460, 542);
+            this.ob_aqlcode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.ob_aqlcode.Name = "ob_aqlcode";
             this.ob_aqlcode.Power = null;
             this.ob_aqlcode.SelectField = null;
             this.ob_aqlcode.SetValueField = null;
-            this.ob_aqlcode.Size = new System.Drawing.Size(247, 40);
+            this.ob_aqlcode.Size = new System.Drawing.Size(193, 21);
             this.ob_aqlcode.TabIndex = 191;
             this.ob_aqlcode.TableName = null;
             this.ob_aqlcode.Tag = "AL_CODE";
@@ -264,11 +252,12 @@
             this.pr_detail.BackColor = System.Drawing.Color.White;
             this.pr_detail.Enabled = false;
             this.pr_detail.ID = null;
-            this.pr_detail.Location = new System.Drawing.Point(135, 176);
+            this.pr_detail.Location = new System.Drawing.Point(101, 141);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Power = null;
             this.pr_detail.ReadOnly = true;
-            this.pr_detail.Size = new System.Drawing.Size(180, 25);
+            this.pr_detail.Size = new System.Drawing.Size(136, 21);
             this.pr_detail.Str = null;
             this.pr_detail.Str1 = null;
             this.pr_detail.Str2 = null;
@@ -282,45 +271,28 @@
             this.ob_projectcode.Condition = null;
             this.ob_projectcode.DBTitle = null;
             this.ob_projectcode.FormName = null;
-            this.ob_projectcode.Location = new System.Drawing.Point(1163, 176);
-            this.ob_projectcode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ob_projectcode.Location = new System.Drawing.Point(872, 141);
+            this.ob_projectcode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.ob_projectcode.Name = "ob_projectcode";
             this.ob_projectcode.Power = null;
             this.ob_projectcode.SelectField = null;
             this.ob_projectcode.SetValueField = null;
-            this.ob_projectcode.Size = new System.Drawing.Size(181, 26);
+            this.ob_projectcode.Size = new System.Drawing.Size(136, 21);
             this.ob_projectcode.TabIndex = 187;
             this.ob_projectcode.TableName = null;
             this.ob_projectcode.Tag = "pr_code";
             this.ob_projectcode.TextBoxEnable = false;
             // 
-            // 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(287, 730);
-            this.ob_maxngacceptqty.Margin = new System.Windows.Forms.Padding(4);
-            this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
-            this.ob_maxngacceptqty.Power = null;
-            this.ob_maxngacceptqty.Size = new System.Drawing.Size(224, 25);
-            this.ob_maxngacceptqty.Str = null;
-            this.ob_maxngacceptqty.Str1 = null;
-            this.ob_maxngacceptqty.Str2 = null;
-            this.ob_maxngacceptqty.TabIndex = 183;
-            this.ob_maxngacceptqty.Tag = "NoAuto";
-            // 
             // 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(1163, 122);
-            this.ob_status.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_status.Location = new System.Drawing.Point(872, 98);
             this.ob_status.Name = "ob_status";
             this.ob_status.Power = null;
-            this.ob_status.Size = new System.Drawing.Size(180, 25);
+            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;
@@ -330,10 +302,9 @@
             // 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(1073, 216);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(805, 173);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(269, 396);
+            this.OperateResult.Size = new System.Drawing.Size(203, 318);
             this.OperateResult.TabIndex = 177;
             this.OperateResult.Text = "";
             // 
@@ -345,13 +316,12 @@
             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(1165, 622);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4);
+            this.Clean.Location = new System.Drawing.Point(874, 498);
             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(91, 30);
+            this.Clean.Size = new System.Drawing.Size(68, 24);
             this.Clean.TabIndex = 176;
             this.Clean.Tag = "";
             this.Clean.Text = "清除";
@@ -363,11 +333,10 @@
             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(136, 682);
-            this.ob_remark.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_remark.Location = new System.Drawing.Point(102, 546);
             this.ob_remark.Name = "ob_remark";
             this.ob_remark.Power = null;
-            this.ob_remark.Size = new System.Drawing.Size(375, 25);
+            this.ob_remark.Size = new System.Drawing.Size(282, 21);
             this.ob_remark.Str = null;
             this.ob_remark.Str1 = null;
             this.ob_remark.Str2 = null;
@@ -382,13 +351,12 @@
             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(676, 170);
-            this.GetBatch.Margin = new System.Windows.Forms.Padding(4);
+            this.GetBatch.Location = new System.Drawing.Point(507, 136);
             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(91, 30);
+            this.GetBatch.Size = new System.Drawing.Size(68, 24);
             this.GetBatch.TabIndex = 171;
             this.GetBatch.Tag = "OQC!Inspection";
             this.GetBatch.Text = "获取批";
@@ -403,13 +371,12 @@
             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.IsShowBorder = true;
-            this.SaveConfiguration.Location = new System.Drawing.Point(399, 634);
-            this.SaveConfiguration.Margin = new System.Windows.Forms.Padding(4);
+            this.SaveConfiguration.Location = new System.Drawing.Point(299, 507);
             this.SaveConfiguration.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveConfiguration.MoveImage")));
             this.SaveConfiguration.Name = "SaveConfiguration";
             this.SaveConfiguration.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveConfiguration.NormalImage")));
             this.SaveConfiguration.Power = "ifWrite";
-            this.SaveConfiguration.Size = new System.Drawing.Size(91, 30);
+            this.SaveConfiguration.Size = new System.Drawing.Size(68, 24);
             this.SaveConfiguration.TabIndex = 170;
             this.SaveConfiguration.Tag = "OQC!Inspection";
             this.SaveConfiguration.Text = "保存配置";
@@ -424,13 +391,12 @@
             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.IsShowBorder = true;
-            this.RefreshConfiguration.Location = new System.Drawing.Point(613, 634);
-            this.RefreshConfiguration.Margin = new System.Windows.Forms.Padding(4);
+            this.RefreshConfiguration.Location = new System.Drawing.Point(460, 507);
             this.RefreshConfiguration.MoveImage = ((System.Drawing.Image)(resources.GetObject("RefreshConfiguration.MoveImage")));
             this.RefreshConfiguration.Name = "RefreshConfiguration";
             this.RefreshConfiguration.NormalImage = ((System.Drawing.Image)(resources.GetObject("RefreshConfiguration.NormalImage")));
             this.RefreshConfiguration.Power = "ifRead";
-            this.RefreshConfiguration.Size = new System.Drawing.Size(91, 30);
+            this.RefreshConfiguration.Size = new System.Drawing.Size(68, 24);
             this.RefreshConfiguration.TabIndex = 169;
             this.RefreshConfiguration.Tag = "OQC!Inspection";
             this.RefreshConfiguration.Text = "刷新配置";
@@ -445,13 +411,12 @@
             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.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(551, 725);
-            this.Save.Margin = new System.Windows.Forms.Padding(4);
+            this.Save.Location = new System.Drawing.Point(413, 583);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
             this.Save.Power = "ifWrite";
-            this.Save.Size = new System.Drawing.Size(93, 30);
+            this.Save.Size = new System.Drawing.Size(70, 24);
             this.Save.TabIndex = 168;
             this.Save.Tag = "OQC!Inspection";
             this.Save.Text = "保存";
@@ -468,11 +433,10 @@
             this.ci_id,
             this.ci_kind,
             this.oi_sampleqty});
-            this.CheckTypeDGV.Location = new System.Drawing.Point(57, 216);
-            this.CheckTypeDGV.Margin = new System.Windows.Forms.Padding(4);
+            this.CheckTypeDGV.Location = new System.Drawing.Point(43, 173);
             this.CheckTypeDGV.Name = "CheckTypeDGV";
             this.CheckTypeDGV.RowTemplate.Height = 23;
-            this.CheckTypeDGV.Size = new System.Drawing.Size(993, 398);
+            this.CheckTypeDGV.Size = new System.Drawing.Size(745, 318);
             this.CheckTypeDGV.TabIndex = 167;
             this.CheckTypeDGV.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.CheckTypeDGV_CellContentClick);
             // 
@@ -525,12 +489,11 @@
             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(811, 122);
-            this.pr_kind.Margin = new System.Windows.Forms.Padding(4);
+            this.pr_kind.Location = new System.Drawing.Point(608, 98);
             this.pr_kind.Name = "pr_kind";
             this.pr_kind.Power = null;
             this.pr_kind.ReadOnly = true;
-            this.pr_kind.Size = new System.Drawing.Size(180, 25);
+            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;
@@ -543,11 +506,10 @@
             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(1163, 68);
-            this.ob_prodcode.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_prodcode.Location = new System.Drawing.Point(872, 54);
             this.ob_prodcode.Name = "ob_prodcode";
             this.ob_prodcode.Power = null;
-            this.ob_prodcode.Size = new System.Drawing.Size(180, 25);
+            this.ob_prodcode.Size = new System.Drawing.Size(136, 21);
             this.ob_prodcode.Str = null;
             this.ob_prodcode.Str1 = null;
             this.ob_prodcode.Str2 = null;
@@ -560,11 +522,10 @@
             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(463, 121);
-            this.ob_source.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_source.Location = new System.Drawing.Point(347, 97);
             this.ob_source.Name = "ob_source";
             this.ob_source.Power = null;
-            this.ob_source.Size = new System.Drawing.Size(180, 25);
+            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;
@@ -577,12 +538,11 @@
             this.ob_batchqty.BackColor = System.Drawing.Color.White;
             this.ob_batchqty.Enabled = false;
             this.ob_batchqty.ID = null;
-            this.ob_batchqty.Location = new System.Drawing.Point(135, 121);
-            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_batchqty.Location = new System.Drawing.Point(101, 97);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Power = null;
             this.ob_batchqty.ReadOnly = true;
-            this.ob_batchqty.Size = new System.Drawing.Size(180, 25);
+            this.ob_batchqty.Size = new System.Drawing.Size(136, 21);
             this.ob_batchqty.Str = null;
             this.ob_batchqty.Str1 = null;
             this.ob_batchqty.Str2 = null;
@@ -594,11 +554,10 @@
             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(463, 61);
-            this.obd_outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.obd_outboxcode.Location = new System.Drawing.Point(347, 49);
             this.obd_outboxcode.Name = "obd_outboxcode";
             this.obd_outboxcode.Power = null;
-            this.obd_outboxcode.Size = new System.Drawing.Size(180, 25);
+            this.obd_outboxcode.Size = new System.Drawing.Size(136, 21);
             this.obd_outboxcode.Str = null;
             this.obd_outboxcode.Str1 = null;
             this.obd_outboxcode.Str2 = null;
@@ -610,11 +569,10 @@
             this.ob_checkno.AllPower = null;
             this.ob_checkno.BackColor = System.Drawing.Color.White;
             this.ob_checkno.ID = null;
-            this.ob_checkno.Location = new System.Drawing.Point(135, 59);
-            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_checkno.Location = new System.Drawing.Point(101, 47);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Power = null;
-            this.ob_checkno.Size = new System.Drawing.Size(180, 25);
+            this.ob_checkno.Size = new System.Drawing.Size(136, 21);
             this.ob_checkno.Str = null;
             this.ob_checkno.Str1 = null;
             this.ob_checkno.Str2 = null;
@@ -627,11 +585,10 @@
             this.ms_sncode.AllPower = null;
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(811, 64);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.ms_sncode.Location = new System.Drawing.Point(608, 51);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
-            this.ms_sncode.Size = new System.Drawing.Size(180, 25);
+            this.ms_sncode.Size = new System.Drawing.Size(136, 21);
             this.ms_sncode.Str = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str2 = null;
@@ -639,18 +596,26 @@
             this.ms_sncode.Tag = "NoAuto";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_sncode_KeyDown);
             // 
+            // ob_maxngacceptqty
+            // 
+            this.ob_maxngacceptqty.Location = new System.Drawing.Point(215, 584);
+            this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
+            this.ob_maxngacceptqty.Size = new System.Drawing.Size(169, 21);
+            this.ob_maxngacceptqty.TabIndex = 192;
+            this.ob_maxngacceptqty.Text = "0";
+            // 
             // OQC_PlanMaintain
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1363, 770);
+            this.ClientSize = new System.Drawing.Size(1022, 616);
+            this.Controls.Add(this.ob_maxngacceptqty);
             this.Controls.Add(this.ob_aqlcode);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.ob_projectcode);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.ob_aqlcode_label);
-            this.Controls.Add(this.ob_maxngacceptqty);
             this.Controls.Add(this.ob_maxacceptqty_label);
             this.Controls.Add(this.ob_status);
             this.Controls.Add(this.ob_status_label);
@@ -679,7 +644,6 @@
             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.Name = "OQC_PlanMaintain";
             this.Tag = "OQC!PlanMaintain";
             this.Text = "抽样计划维护";
@@ -722,7 +686,6 @@
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_status;
         private System.Windows.Forms.Label ob_status_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ob_maxngacceptqty;
         private System.Windows.Forms.Label ob_maxacceptqty_label;
         private System.Windows.Forms.Label ob_aqlcode_label;
         private System.Windows.Forms.Label label1;
@@ -735,5 +698,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ci_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn ci_kind;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_sampleqty;
+        private CustomControl.TextBoxWithIcon.TextBoxNumOnly ob_maxngacceptqty;
     }
 }

+ 15 - 0
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.resx

@@ -788,4 +788,19 @@
   <metadata name="oi_sampleqty.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_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ci_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ci_kind.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>
 </root>

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

@@ -188,15 +188,13 @@ namespace UAS_MES.OQC
                         sql.Append("and ois_itemcode=oi_itemcode)where oi_checkno ='" + ob_checkno.Text + "' and oi_projectcode ='" + ob_projectcode.Text + "'");
                         dh.ExecuteSql(sql.GetString(), "update");
                         //更新检验状态,如果是待检验的更新为检验中
-                        dh.ExecuteSql("update OQCBatch set ob_status='CHECKING'  where ob_checkno='" + ob_checkno.Text + "' and ob_status='UNCHECK'", "update");
+                        dh.ExecuteSql("update OQCBatch set ob_status='CHECKING' where ob_checkno='" + ob_checkno.Text + "' and ob_status='UNCHECK'", "update");
                         //更新批次中的合格数不合格数:用抽检批检验项目表获取最大的抽检数和不合格数
-                        dh.ExecuteSql(" update OQCBATCH set (ob_ngqty,ob_okqty)=(select nvl(max(oi_ngqty), 0), max(oi_checkqty) - nvl(max(oi_ngqty), 0) from OQCItems where oi_checkno ='" + ob_checkno.Text + "') where ob_checkno ='" + ob_checkno.Text + "'", "update");
+                        dh.ExecuteSql("update OQCBATCH set (ob_ngqty,ob_okqty)=(select nvl(max(oi_ngqty), 0), max(oi_checkqty) - nvl(max(oi_ngqty), 0) from OQCItems where oi_checkno ='" + ob_checkno.Text + "') where ob_checkno ='" + ob_checkno.Text + "'", "update");
                         OperateResult.AppendText(">>操作成功\n", Color.Green);
                     }
                     else
-                    {
                         OperateResult.AppendText(">>请勾选不良明细\n", Color.Red);
-                    }
                 }
                 else
                 {

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

@@ -910,7 +910,7 @@ namespace UAS_MES.PublicMethod
                     //查询Form数据
                     sql.Clear();
                     sql.Append("select ob_id,ob_makecode,ob_status,ob_prodcode,(select  max(oi_checkqty) oi_checkqty from OQCItems where oi_checkno='" + iCheckNo + "'),");
-                    sql.Append("ob_batchqty,ob_okqty,ob_ngqty,ob_maxngacceptqty,ob_source,ob_checkno,ob_result from OQCBatch where ob_checkno='" + iCheckNo + "'");
+                    sql.Append("ob_batchqty,nvl(ob_okqty,0) ob_okqty,nvl(ob_ngqty,0) ob_ngqty,ob_maxngacceptqty,ob_source,ob_checkno,ob_result from OQCBatch where ob_checkno='" + iCheckNo + "'");
                     Form = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                     if (Form.Rows.Count == 0)
                     {

+ 23 - 5
UAS-MES/UAS-MES.csproj

@@ -405,6 +405,18 @@
     <Compile Include="Form1.Designer.cs">
       <DependentUpon>Form1.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_ColorBoxLabelPrint.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_ColorBoxLabelPrint.Designer.cs">
+      <DependentUpon>Make_ColorBoxLabelPrint.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_FuselageLabelPrint.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_FuselageLabelPrint.Designer.cs">
+      <DependentUpon>Make_FuselageLabelPrint.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_NewBadCode.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -587,11 +599,11 @@
     <Compile Include="FunctionCode\Make\Make_NewPallet.Designer.cs">
       <DependentUpon>Make_NewPallet.cs</DependentUpon>
     </Compile>
-    <Compile Include="FunctionCode\Make\Make_LabelPrint.cs">
+    <Compile Include="FunctionCode\Make\Make_ColorBoxLoadPrint.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="FunctionCode\Make\Make_LabelPrint.Designer.cs">
-      <DependentUpon>Make_LabelPrint.cs</DependentUpon>
+    <Compile Include="FunctionCode\Make\Make_ColorBoxLoadPrint.Designer.cs">
+      <DependentUpon>Make_ColorBoxLoadPrint.cs</DependentUpon>
     </Compile>
     <Compile Include="FunctionCode\Make\Make_PalletWeigh.cs">
       <SubType>Form</SubType>
@@ -855,6 +867,12 @@
     <EmbeddedResource Include="Form1.resx">
       <DependentUpon>Form1.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_ColorBoxLabelPrint.resx">
+      <DependentUpon>Make_ColorBoxLabelPrint.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_FuselageLabelPrint.resx">
+      <DependentUpon>Make_FuselageLabelPrint.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_NewBadCode.resx">
       <DependentUpon>Make_NewBadCode.cs</DependentUpon>
     </EmbeddedResource>
@@ -941,8 +959,8 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_NewPallet.resx">
       <DependentUpon>Make_NewPallet.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="FunctionCode\Make\Make_LabelPrint.resx">
-      <DependentUpon>Make_LabelPrint.cs</DependentUpon>
+    <EmbeddedResource Include="FunctionCode\Make\Make_ColorBoxLoadPrint.resx">
+      <DependentUpon>Make_ColorBoxLoadPrint.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_PalletWeigh.resx">
       <DependentUpon>Make_PalletWeigh.cs</DependentUpon>