浏览代码

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 年之前
父节点
当前提交
ec7fb5986f
共有 2 个文件被更改,包括 72 次插入69 次删除
  1. 6 4
      UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.cs
  2. 66 65
      UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.designer.cs

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

@@ -99,6 +99,11 @@ namespace UAS_MES.OQC
                 List<string> ci_kind_update = new List<string>();
                 List<string> oi_sampleqty_update = new List<string>();
                 int ChooseCount = 0;
+                if (int.Parse(ob_maxngacceptqty.Text == "" ? "0" : ob_maxngacceptqty.Text) > int.Parse(ad_qty.Text == "" ? "0" : ad_qty.Text))
+                {
+                    OperateResult.AppendText(">>最大不合格通过数不允许大于抽检数\n", Color.Red);
+                    return;
+                }
                 for (int i = 0; i < CheckTypeDGV.Rows.Count; i++)
                 {
                     //用户勾选的数据才进行操作
@@ -241,10 +246,7 @@ namespace UAS_MES.OQC
         {
             for (int i = 0; i < CheckTypeDGV.Rows.Count; i++)
             {
-                if (CheckTypeDGV.Rows[i].Cells["oi_sampleqty"].Value.ToString() == "0")
-                {
-                    CheckTypeDGV.Rows[i].Cells["oi_sampleqty"].Value = ad_qty.Text;
-                }
+                CheckTypeDGV.Rows[i].Cells["oi_sampleqty"].Value = ad_qty.Text;
             }
         }
 

+ 66 - 65
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.designer.cs

@@ -42,6 +42,7 @@
             this.label1 = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.ob_maxngacceptqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ad_qty = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxNumOnly();
             this.ad_qty_label = new System.Windows.Forms.Label();
             this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -54,18 +55,17 @@
             this.GetBatch = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.Save = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.CheckTypeDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
-            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.oi_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ci_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ci_kind = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_sampleqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_nowcheckqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.obd_outboxcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_checkno = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ChooseAll = new UAS_MES.CustomControl.ButtonUtil.ChooseAllButton();
-            this.ob_maxngacceptqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.oi_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ci_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ci_kind = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_sampleqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.panel2.SuspendLayout();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -222,6 +222,22 @@
             this.panel1.Size = new System.Drawing.Size(993, 120);
             this.panel1.TabIndex = 193;
             // 
+            // 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(585, 22);
+            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 = 195;
+            this.ob_maxngacceptqty.Tag = "NoAuto";
+            // 
             // ad_qty
             // 
             this.ad_qty.Location = new System.Drawing.Point(100, 74);
@@ -425,49 +441,6 @@
             this.CheckTypeDGV.Size = new System.Drawing.Size(993, 398);
             this.CheckTypeDGV.TabIndex = 167;
             // 
-            // Choose
-            // 
-            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.Choose.DataPropertyName = "Choose";
-            this.Choose.HeaderText = "勾选";
-            this.Choose.Name = "Choose";
-            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.Choose.Width = 60;
-            // 
-            // oi_id
-            // 
-            this.oi_id.DataPropertyName = "oi_id";
-            this.oi_id.HeaderText = "oi_id";
-            this.oi_id.Name = "oi_id";
-            this.oi_id.Visible = false;
-            // 
-            // ci_id
-            // 
-            this.ci_id.DataPropertyName = "ci_id";
-            this.ci_id.HeaderText = "ci_id";
-            this.ci_id.Name = "ci_id";
-            this.ci_id.ReadOnly = true;
-            this.ci_id.Visible = false;
-            // 
-            // ci_kind
-            // 
-            this.ci_kind.DataPropertyName = "ci_kind";
-            this.ci_kind.HeaderText = "检验类型";
-            this.ci_kind.Name = "ci_kind";
-            this.ci_kind.ReadOnly = true;
-            this.ci_kind.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.ci_kind.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.ci_kind.Width = 150;
-            // 
-            // oi_sampleqty
-            // 
-            this.oi_sampleqty.DataPropertyName = "oi_sampleqty";
-            this.oi_sampleqty.HeaderText = "样本数量";
-            this.oi_sampleqty.Name = "oi_sampleqty";
-            this.oi_sampleqty.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.oi_sampleqty.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.oi_sampleqty.Width = 150;
-            // 
             // ob_prodcode
             // 
             this.ob_prodcode.AllPower = null;
@@ -563,21 +536,49 @@
             this.ChooseAll.Text = "全选";
             this.ChooseAll.UseVisualStyleBackColor = true;
             // 
-            // ob_maxngacceptqty
+            // Choose
             // 
-            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(585, 22);
-            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 = 195;
-            this.ob_maxngacceptqty.Tag = "NoAuto";
+            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Choose.DataPropertyName = "Choose";
+            this.Choose.HeaderText = "勾选";
+            this.Choose.Name = "Choose";
+            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.Choose.Width = 60;
+            // 
+            // oi_id
+            // 
+            this.oi_id.DataPropertyName = "oi_id";
+            this.oi_id.HeaderText = "oi_id";
+            this.oi_id.Name = "oi_id";
+            this.oi_id.Visible = false;
+            // 
+            // ci_id
+            // 
+            this.ci_id.DataPropertyName = "ci_id";
+            this.ci_id.HeaderText = "ci_id";
+            this.ci_id.Name = "ci_id";
+            this.ci_id.ReadOnly = true;
+            this.ci_id.Visible = false;
+            // 
+            // ci_kind
+            // 
+            this.ci_kind.DataPropertyName = "ci_kind";
+            this.ci_kind.HeaderText = "检验类型";
+            this.ci_kind.Name = "ci_kind";
+            this.ci_kind.ReadOnly = true;
+            this.ci_kind.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.ci_kind.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.ci_kind.Width = 150;
+            // 
+            // oi_sampleqty
+            // 
+            this.oi_sampleqty.DataPropertyName = "oi_sampleqty";
+            this.oi_sampleqty.HeaderText = "样本数量";
+            this.oi_sampleqty.Name = "oi_sampleqty";
+            this.oi_sampleqty.ReadOnly = true;
+            this.oi_sampleqty.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.oi_sampleqty.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.oi_sampleqty.Width = 150;
             // 
             // OQC_PlanMaintain
             // 
@@ -656,12 +657,12 @@
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Label ad_qty_label;
         private CustomControl.TextBoxWithIcon.TextBoxNumOnly ad_qty;
+        private CustomControl.ButtonUtil.ChooseAllButton ChooseAll;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ob_maxngacceptqty;
         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.ButtonUtil.ChooseAllButton ChooseAll;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ob_maxngacceptqty;
     }
 }