Browse Source

OQC抽样计划维护修改

Hcsy 7 years ago
parent
commit
d5428f716f

+ 1 - 0
.gitignore

@@ -212,3 +212,4 @@ _Pvt_Extensions/
 ModelManifest.xml
 *.rar
 /MES接口/MES接口.csproj
+/UAS-出货标签管理.zip

+ 33 - 5
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.cs

@@ -31,6 +31,12 @@ namespace UAS_MES.OQC
             ob_projectcode.SelectField = "pr_code # 方案编号,pr_name # 方案名称,pr_class # 检验单类型,pr_standard # 方案标准,pr_startdate # 生效日期,pr_enddate #失效日期 ,pr_status # 状态";
             ob_projectcode.SetValueField = new string[] { "ob_projectcode" };
             ob_projectcode.FormName = Name;
+
+            ob_aqlcode.TableName = "QUA_AQL";
+            ob_aqlcode.SelectField = "AL_ID # ID,AL_CODE  # 流水编号,AL_NAME # 检验标准名称,AL_STATUS # 状态";
+            ob_aqlcode.SetValueField = new string[] { "ob_aqlcode" };
+            ob_aqlcode.FormName = Name;
+
         }
 
         private void 抽样计划维护_SizeChanged(object sender, EventArgs e)
@@ -79,7 +85,7 @@ namespace UAS_MES.OQC
                     {
                         if (!(int.Parse(CheckTypeDGV.Rows[i].Cells["oi_sampleqty"].Value.ToString()) > int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text)))
                         {
-                            //ID不为0的时候进行更新操作,ID为0的时候进行插入
+                            //ID不为0的时候进行更新操作,ID为0的时候进行插入
                             if (CheckTypeDGV.Rows[i].Cells["oi_id"].Value.ToString() != "0")
                             {
                                 ci_kind_update.Add(CheckTypeDGV.Rows[i].Cells["ci_kind"].Value.ToString());
@@ -146,18 +152,17 @@ namespace UAS_MES.OQC
                     if (dt.Rows[0]["al_statuscode"].ToString() == "AUDITED")
                     {
                         SaveConfiguration.PerformClick();
-                        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");
+                        Checkob_maxngacceptqty();
                         GetBatch.PerformClick();
-                        OperateResult.AppendText(">>保存成功\n", Color.Green);
                     }
                     else
                     {
                         OperateResult.AppendText(">>AQL必须是已审核\n", Color.Red);
                     }
                 }
-                else
-                {
+                else{
                     OperateResult.AppendText(">>AQL抽样标准不存在\n", Color.Red);
+                    Checkob_maxngacceptqty();
                 }
             }
             else
@@ -166,6 +171,29 @@ namespace UAS_MES.OQC
             }
         }
 
+        //对于最大不合格允通过数的校验
+        private void Checkob_maxngacceptqty()
+        {
+            try
+            {
+                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);
+                }
+            }
+            catch
+            {
+                OperateResult.AppendText(">>最大不合格允通过数请填整数\n", Color.Red);
+                ob_maxngacceptqty.Text = null;
+            }
+        }
+
         private void Clean_Click(object sender, EventArgs e)
         {
             OperateResult.Clear();

+ 156 - 85
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.designer.cs

@@ -43,8 +43,10 @@
             this.ob_maxacceptqty_label = new System.Windows.Forms.Label();
             this.ob_aqlcode_label = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            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_aqlcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             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();
@@ -75,9 +77,10 @@
             // 
             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(526, 49);
+            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.Name = "ms_sncode_label";
-            this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
+            this.ms_sncode_label.Size = new System.Drawing.Size(72, 27);
             this.ms_sncode_label.TabIndex = 152;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -85,9 +88,10 @@
             // 
             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(21, 45);
+            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.Name = "ob_checkno_label";
-            this.ob_checkno_label.Size = new System.Drawing.Size(58, 21);
+            this.ob_checkno_label.Size = new System.Drawing.Size(72, 27);
             this.ob_checkno_label.TabIndex = 154;
             this.ob_checkno_label.Text = "批次号";
             // 
@@ -98,8 +102,9 @@
             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(1022, 33);
+            this.panel2.Size = new System.Drawing.Size(1363, 41);
             this.panel2.TabIndex = 156;
             this.panel2.Tag = "NoAuto";
             // 
@@ -108,9 +113,10 @@
             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(12, 4);
+            this.label2.Location = new System.Drawing.Point(16, 5);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(143, 21);
+            this.label2.Size = new System.Drawing.Size(177, 27);
             this.label2.TabIndex = 0;
             this.label2.Text = "OQC采样计划维护";
             // 
@@ -118,9 +124,10 @@
             // 
             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(268, 47);
+            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.Name = "obd_outboxcode_label";
-            this.obd_outboxcode_label.Size = new System.Drawing.Size(42, 21);
+            this.obd_outboxcode_label.Size = new System.Drawing.Size(52, 27);
             this.obd_outboxcode_label.TabIndex = 157;
             this.obd_outboxcode_label.Text = "箱号";
             // 
@@ -128,9 +135,10 @@
             // 
             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(21, 95);
+            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.Name = "ob_batchqty_label";
-            this.ob_batchqty_label.Size = new System.Drawing.Size(58, 21);
+            this.ob_batchqty_label.Size = new System.Drawing.Size(72, 27);
             this.ob_batchqty_label.TabIndex = 159;
             this.ob_batchqty_label.Text = "批数量";
             // 
@@ -138,9 +146,10 @@
             // 
             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, 97);
+            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.Name = "ob_source_label";
-            this.ob_source_label.Size = new System.Drawing.Size(58, 21);
+            this.ob_source_label.Size = new System.Drawing.Size(72, 27);
             this.ob_source_label.TabIndex = 161;
             this.ob_source_label.Text = "批类型";
             // 
@@ -148,9 +157,10 @@
             // 
             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, 98);
+            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.Name = "pr_kind_label";
-            this.pr_kind_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_kind_label.Size = new System.Drawing.Size(92, 27);
             this.pr_kind_label.TabIndex = 165;
             this.pr_kind_label.Text = "产品类型";
             // 
@@ -158,9 +168,10 @@
             // 
             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(789, 52);
+            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.Name = "ob_prodcode_label";
-            this.ob_prodcode_label.Size = new System.Drawing.Size(74, 21);
+            this.ob_prodcode_label.Size = new System.Drawing.Size(92, 27);
             this.ob_prodcode_label.TabIndex = 163;
             this.ob_prodcode_label.Text = "产品编号";
             // 
@@ -168,9 +179,10 @@
             // 
             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(39, 544);
+            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.Name = "ob_remark_label";
-            this.ob_remark_label.Size = new System.Drawing.Size(42, 21);
+            this.ob_remark_label.Size = new System.Drawing.Size(52, 27);
             this.ob_remark_label.TabIndex = 172;
             this.ob_remark_label.Text = "备注";
             // 
@@ -178,9 +190,10 @@
             // 
             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, 98);
+            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.Name = "ob_status_label";
-            this.ob_status_label.Size = new System.Drawing.Size(42, 21);
+            this.ob_status_label.Size = new System.Drawing.Size(52, 27);
             this.ob_status_label.TabIndex = 178;
             this.ob_status_label.Text = "状态";
             // 
@@ -188,9 +201,10 @@
             // 
             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(39, 584);
+            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.Name = "ob_maxacceptqty_label";
-            this.ob_maxacceptqty_label.Size = new System.Drawing.Size(170, 21);
+            this.ob_maxacceptqty_label.Size = new System.Drawing.Size(212, 27);
             this.ob_maxacceptqty_label.TabIndex = 182;
             this.ob_maxacceptqty_label.Text = "最大不合格允许通过数";
             // 
@@ -198,9 +212,10 @@
             // 
             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(410, 544);
+            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.Name = "ob_aqlcode_label";
-            this.ob_aqlcode_label.Size = new System.Drawing.Size(42, 21);
+            this.ob_aqlcode_label.Size = new System.Drawing.Size(52, 27);
             this.ob_aqlcode_label.TabIndex = 184;
             this.ob_aqlcode_label.Text = "AQL";
             // 
@@ -208,12 +223,58 @@
             // 
             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(789, 139);
+            this.label1.Location = new System.Drawing.Point(1052, 174);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(74, 21);
+            this.label1.Size = new System.Drawing.Size(92, 27);
             this.label1.TabIndex = 186;
             this.label1.Text = "检验方案";
             // 
+            // pr_detail_label
+            // 
+            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.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.TabIndex = 188;
+            this.pr_detail_label.Text = "产品名称";
+            // 
+            // ob_aqlcode
+            // 
+            this.ob_aqlcode.AllPower = null;
+            this.ob_aqlcode.Caller = null;
+            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.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.TabIndex = 191;
+            this.ob_aqlcode.TableName = null;
+            this.ob_aqlcode.Tag = "AL_CODE";
+            this.ob_aqlcode.TextBoxEnable = false;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AllPower = null;
+            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.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.Str = null;
+            this.pr_detail.Str1 = null;
+            this.pr_detail.Str2 = null;
+            this.pr_detail.TabIndex = 189;
+            this.pr_detail.Tag = "NoAuto";
+            // 
             // ob_projectcode
             // 
             this.ob_projectcode.AllPower = null;
@@ -221,42 +282,28 @@
             this.ob_projectcode.Condition = null;
             this.ob_projectcode.DBTitle = null;
             this.ob_projectcode.FormName = null;
-            this.ob_projectcode.Location = new System.Drawing.Point(872, 141);
-            this.ob_projectcode.Margin = new System.Windows.Forms.Padding(2);
+            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.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(136, 21);
+            this.ob_projectcode.Size = new System.Drawing.Size(181, 26);
             this.ob_projectcode.TabIndex = 187;
             this.ob_projectcode.TableName = null;
             this.ob_projectcode.Tag = "pr_code";
             this.ob_projectcode.TextBoxEnable = false;
             // 
-            // ob_aqlcode
-            // 
-            this.ob_aqlcode.AllPower = null;
-            this.ob_aqlcode.BackColor = System.Drawing.Color.White;
-            this.ob_aqlcode.ID = null;
-            this.ob_aqlcode.Location = new System.Drawing.Point(472, 546);
-            this.ob_aqlcode.Name = "ob_aqlcode";
-            this.ob_aqlcode.Power = null;
-            this.ob_aqlcode.Size = new System.Drawing.Size(169, 21);
-            this.ob_aqlcode.Str = null;
-            this.ob_aqlcode.Str1 = null;
-            this.ob_aqlcode.Str2 = null;
-            this.ob_aqlcode.TabIndex = 185;
-            this.ob_aqlcode.Tag = "NoAuto";
-            // 
             // 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(215, 584);
+            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(169, 21);
+            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;
@@ -269,10 +316,11 @@
             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, 98);
+            this.ob_status.Location = new System.Drawing.Point(1163, 122);
+            this.ob_status.Margin = new System.Windows.Forms.Padding(4);
             this.ob_status.Name = "ob_status";
             this.ob_status.Power = null;
-            this.ob_status.Size = new System.Drawing.Size(136, 21);
+            this.ob_status.Size = new System.Drawing.Size(180, 25);
             this.ob_status.Str = null;
             this.ob_status.Str1 = null;
             this.ob_status.Str2 = null;
@@ -282,9 +330,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(805, 173);
+            this.OperateResult.Location = new System.Drawing.Point(1073, 216);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(203, 318);
+            this.OperateResult.Size = new System.Drawing.Size(269, 396);
             this.OperateResult.TabIndex = 177;
             this.OperateResult.Text = "";
             // 
@@ -296,12 +345,13 @@
             this.Clean.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(874, 498);
+            this.Clean.Location = new System.Drawing.Point(1165, 622);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4);
             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(68, 24);
+            this.Clean.Size = new System.Drawing.Size(91, 30);
             this.Clean.TabIndex = 176;
             this.Clean.Tag = "";
             this.Clean.Text = "清除";
@@ -313,10 +363,11 @@
             this.ob_remark.AllPower = null;
             this.ob_remark.BackColor = System.Drawing.Color.White;
             this.ob_remark.ID = null;
-            this.ob_remark.Location = new System.Drawing.Point(102, 546);
+            this.ob_remark.Location = new System.Drawing.Point(136, 682);
+            this.ob_remark.Margin = new System.Windows.Forms.Padding(4);
             this.ob_remark.Name = "ob_remark";
             this.ob_remark.Power = null;
-            this.ob_remark.Size = new System.Drawing.Size(282, 21);
+            this.ob_remark.Size = new System.Drawing.Size(375, 25);
             this.ob_remark.Str = null;
             this.ob_remark.Str1 = null;
             this.ob_remark.Str2 = null;
@@ -331,12 +382,13 @@
             this.GetBatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GetBatch.Image = ((System.Drawing.Image)(resources.GetObject("GetBatch.Image")));
             this.GetBatch.IsShowBorder = true;
-            this.GetBatch.Location = new System.Drawing.Point(507, 136);
+            this.GetBatch.Location = new System.Drawing.Point(676, 170);
+            this.GetBatch.Margin = new System.Windows.Forms.Padding(4);
             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(68, 24);
+            this.GetBatch.Size = new System.Drawing.Size(91, 30);
             this.GetBatch.TabIndex = 171;
             this.GetBatch.Tag = "OQC!Inspection";
             this.GetBatch.Text = "获取批";
@@ -351,12 +403,13 @@
             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(299, 507);
+            this.SaveConfiguration.Location = new System.Drawing.Point(399, 634);
+            this.SaveConfiguration.Margin = new System.Windows.Forms.Padding(4);
             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(68, 24);
+            this.SaveConfiguration.Size = new System.Drawing.Size(91, 30);
             this.SaveConfiguration.TabIndex = 170;
             this.SaveConfiguration.Tag = "OQC!Inspection";
             this.SaveConfiguration.Text = "保存配置";
@@ -371,12 +424,13 @@
             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(460, 507);
+            this.RefreshConfiguration.Location = new System.Drawing.Point(613, 634);
+            this.RefreshConfiguration.Margin = new System.Windows.Forms.Padding(4);
             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(68, 24);
+            this.RefreshConfiguration.Size = new System.Drawing.Size(91, 30);
             this.RefreshConfiguration.TabIndex = 169;
             this.RefreshConfiguration.Tag = "OQC!Inspection";
             this.RefreshConfiguration.Text = "刷新配置";
@@ -391,12 +445,13 @@
             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(413, 580);
+            this.Save.Location = new System.Drawing.Point(551, 725);
+            this.Save.Margin = new System.Windows.Forms.Padding(4);
             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(70, 24);
+            this.Save.Size = new System.Drawing.Size(93, 30);
             this.Save.TabIndex = 168;
             this.Save.Tag = "OQC!Inspection";
             this.Save.Text = "保存";
@@ -413,10 +468,11 @@
             this.ci_id,
             this.ci_kind,
             this.oi_sampleqty});
-            this.CheckTypeDGV.Location = new System.Drawing.Point(43, 173);
+            this.CheckTypeDGV.Location = new System.Drawing.Point(57, 216);
+            this.CheckTypeDGV.Margin = new System.Windows.Forms.Padding(4);
             this.CheckTypeDGV.Name = "CheckTypeDGV";
             this.CheckTypeDGV.RowTemplate.Height = 23;
-            this.CheckTypeDGV.Size = new System.Drawing.Size(745, 318);
+            this.CheckTypeDGV.Size = new System.Drawing.Size(993, 398);
             this.CheckTypeDGV.TabIndex = 167;
             this.CheckTypeDGV.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.CheckTypeDGV_CellContentClick);
             // 
@@ -469,10 +525,12 @@
             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, 98);
+            this.pr_kind.Location = new System.Drawing.Point(811, 122);
+            this.pr_kind.Margin = new System.Windows.Forms.Padding(4);
             this.pr_kind.Name = "pr_kind";
             this.pr_kind.Power = null;
-            this.pr_kind.Size = new System.Drawing.Size(136, 21);
+            this.pr_kind.ReadOnly = true;
+            this.pr_kind.Size = new System.Drawing.Size(180, 25);
             this.pr_kind.Str = null;
             this.pr_kind.Str1 = null;
             this.pr_kind.Str2 = null;
@@ -485,10 +543,11 @@
             this.ob_prodcode.BackColor = System.Drawing.Color.White;
             this.ob_prodcode.Enabled = false;
             this.ob_prodcode.ID = null;
-            this.ob_prodcode.Location = new System.Drawing.Point(872, 54);
+            this.ob_prodcode.Location = new System.Drawing.Point(1163, 68);
+            this.ob_prodcode.Margin = new System.Windows.Forms.Padding(4);
             this.ob_prodcode.Name = "ob_prodcode";
             this.ob_prodcode.Power = null;
-            this.ob_prodcode.Size = new System.Drawing.Size(136, 21);
+            this.ob_prodcode.Size = new System.Drawing.Size(180, 25);
             this.ob_prodcode.Str = null;
             this.ob_prodcode.Str1 = null;
             this.ob_prodcode.Str2 = null;
@@ -501,10 +560,11 @@
             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, 97);
+            this.ob_source.Location = new System.Drawing.Point(463, 121);
+            this.ob_source.Margin = new System.Windows.Forms.Padding(4);
             this.ob_source.Name = "ob_source";
             this.ob_source.Power = null;
-            this.ob_source.Size = new System.Drawing.Size(136, 21);
+            this.ob_source.Size = new System.Drawing.Size(180, 25);
             this.ob_source.Str = null;
             this.ob_source.Str1 = null;
             this.ob_source.Str2 = null;
@@ -515,11 +575,14 @@
             // 
             this.ob_batchqty.AllPower = null;
             this.ob_batchqty.BackColor = System.Drawing.Color.White;
+            this.ob_batchqty.Enabled = false;
             this.ob_batchqty.ID = null;
-            this.ob_batchqty.Location = new System.Drawing.Point(101, 97);
+            this.ob_batchqty.Location = new System.Drawing.Point(135, 121);
+            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Power = null;
-            this.ob_batchqty.Size = new System.Drawing.Size(136, 21);
+            this.ob_batchqty.ReadOnly = true;
+            this.ob_batchqty.Size = new System.Drawing.Size(180, 25);
             this.ob_batchqty.Str = null;
             this.ob_batchqty.Str1 = null;
             this.ob_batchqty.Str2 = null;
@@ -531,10 +594,11 @@
             this.obd_outboxcode.AllPower = null;
             this.obd_outboxcode.BackColor = System.Drawing.Color.White;
             this.obd_outboxcode.ID = null;
-            this.obd_outboxcode.Location = new System.Drawing.Point(347, 49);
+            this.obd_outboxcode.Location = new System.Drawing.Point(463, 61);
+            this.obd_outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.obd_outboxcode.Name = "obd_outboxcode";
             this.obd_outboxcode.Power = null;
-            this.obd_outboxcode.Size = new System.Drawing.Size(136, 21);
+            this.obd_outboxcode.Size = new System.Drawing.Size(180, 25);
             this.obd_outboxcode.Str = null;
             this.obd_outboxcode.Str1 = null;
             this.obd_outboxcode.Str2 = null;
@@ -546,10 +610,11 @@
             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(101, 47);
+            this.ob_checkno.Location = new System.Drawing.Point(135, 59);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Power = null;
-            this.ob_checkno.Size = new System.Drawing.Size(136, 21);
+            this.ob_checkno.Size = new System.Drawing.Size(180, 25);
             this.ob_checkno.Str = null;
             this.ob_checkno.Str1 = null;
             this.ob_checkno.Str2 = null;
@@ -562,10 +627,11 @@
             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(608, 51);
+            this.ms_sncode.Location = new System.Drawing.Point(811, 64);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
-            this.ms_sncode.Size = new System.Drawing.Size(136, 21);
+            this.ms_sncode.Size = new System.Drawing.Size(180, 25);
             this.ms_sncode.Str = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str2 = null;
@@ -575,12 +641,14 @@
             // 
             // OQC_PlanMaintain
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1022, 616);
+            this.ClientSize = new System.Drawing.Size(1363, 770);
+            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);
             this.Controls.Add(this.ob_aqlcode_label);
             this.Controls.Add(this.ob_maxngacceptqty);
             this.Controls.Add(this.ob_maxacceptqty_label);
@@ -611,6 +679,7 @@
             this.Controls.Add(this.ms_sncode);
             this.Controls.Add(this.ms_sncode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "OQC_PlanMaintain";
             this.Tag = "OQC!PlanMaintain";
             this.Text = "抽样计划维护";
@@ -655,14 +724,16 @@
         private System.Windows.Forms.Label ob_status_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_maxngacceptqty;
         private System.Windows.Forms.Label ob_maxacceptqty_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ob_aqlcode;
         private System.Windows.Forms.Label ob_aqlcode_label;
         private System.Windows.Forms.Label label1;
+        private CustomControl.TextBoxWithIcon.SearchTextBox ob_projectcode;
+        private System.Windows.Forms.Label pr_detail_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pr_detail;
+        private CustomControl.TextBoxWithIcon.SearchTextBox ob_aqlcode;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn ci_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn ci_kind;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_sampleqty;
-        private CustomControl.TextBoxWithIcon.SearchTextBox ob_projectcode;
     }
 }

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

@@ -788,19 +788,4 @@
   <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>

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

@@ -824,7 +824,7 @@ namespace UAS_MES.PublicMethod
                 case "OQCPLANMAINTAIN":
                     sql.Clear();
                     sql.Append("select ob_prodcode,ob_id,ob_checkno,ob_projectcode,ob_batchqty,ob_source,ob_remark,");
-                    sql.Append("ob_status,pr_id,pr_detail,pr_kind,pr_manutype,pr_qualmethod from OQCBatch left join product on ");
+                    sql.Append("ob_status,pr_id,pr_detail,pr_kind,pr_manutype,pr_qualmethod,nvl(ob_aqlcode,pr_aql)ob_aqlcode from OQCBatch left join product on ");
                     sql.Append("pr_code=ob_prodcode where ob_checkno='" + iCheckNo + "'");
                     Form = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                     sql.Clear();