Browse Source

测试参数必须填写才能上传

callm 3 tuần trước cách đây
mục cha
commit
27bbd9554b

+ 1 - 1
UAS_MES_XMW/FunctionCode/Make/Make_MakeDown.Designer.cs

@@ -389,7 +389,7 @@
             this.Load += new System.EventHandler(this.Make_MakeDown_Load);
             this.SizeChanged += new System.EventHandler(this.Make_MakeDown_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 1 - 1
UAS_MES_XMW/FunctionCode/Make/Make_OutBoxSnCheck.Designer.cs

@@ -254,7 +254,7 @@
             this.Load += new System.EventHandler(this.Make_LabelCheck_Load);
             this.SizeChanged += new System.EventHandler(this.Make_LabelCheck_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.CheckSnDGV)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 7 - 4
UAS_MES_XMW/FunctionCode/Make/Make_TestCollection_Param.Designer.cs

@@ -972,6 +972,7 @@ namespace UAS_MES_NEW.Make
             // 
             // ParamDataGridView
             // 
+            this.ParamDataGridView.AllowUserToAddRows = false;
             this.ParamDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.ParamDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.pid_detno,
@@ -986,19 +987,21 @@ namespace UAS_MES_NEW.Make
             // 
             // pid_detno
             // 
+            this.pid_detno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
             this.pid_detno.DataPropertyName = "pid_detno";
             this.pid_detno.HeaderText = "序号";
             this.pid_detno.MinimumWidth = 50;
             this.pid_detno.Name = "pid_detno";
-            this.pid_detno.Width = 50;
+            this.pid_detno.Width = 103;
             // 
             // pid_item
             // 
+            this.pid_item.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
             this.pid_item.DataPropertyName = "pid_item";
             this.pid_item.HeaderText = "参数名称";
             this.pid_item.MinimumWidth = 10;
             this.pid_item.Name = "pid_item";
-            this.pid_item.Width = 200;
+            this.pid_item.Width = 151;
             // 
             // pid_value
             // 
@@ -1072,11 +1075,11 @@ namespace UAS_MES_NEW.Make
             this.Load += new System.EventHandler(this.TestCollection_Load);
             this.SizeChanged += new System.EventHandler(this.测试采集_SizeChanged);
             this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Make_TestCollection_KeyDown);
-            this.panel1.ResumeLayout(false);
+            this.panel1.ResumeLayout(true);
             this.panel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.ParamDataGridView)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 18 - 0
UAS_MES_XMW/FunctionCode/Make/Make_TestCollection_Param.cs

@@ -234,6 +234,7 @@ namespace UAS_MES_NEW.Make
                                 LockMakeCode.Checked = true;
                             }
                         }
+
                         dt = (DataTable)dh.ExecuteSql("select ms_nextstepcode,ms_sncode,ms_reworkstatus,nvl(ms_ifrework,0)ms_ifrework,ms_stepcode,ms_status,nvl(st_ifrepair,0) st_ifrepair from makeserial left join step on ms_stepcode=st_code where ms_id='" + oMSID + "'", "select");
                         string status = dt.Rows[0]["ms_status"].ToString();
                         reworkstatus = dt.Rows[0]["ms_reworkstatus"].ToString();
@@ -245,6 +246,7 @@ namespace UAS_MES_NEW.Make
                             OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.Red, ms_sncode);
                             return;
                         }
+
                         ifrework = dt.Rows[0]["ms_ifrework"].ToString();
                         if (GoodProduct.Checked)
                         {
@@ -265,6 +267,14 @@ namespace UAS_MES_NEW.Make
                                 }
                             }
                         }
+                        for (int i = 0; i < ParamDataGridView.Rows.Count; i++)
+                        {
+                            if (ParamDataGridView.Rows[i].Cells["pid_value"].Value == null)
+                            {
+                                OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号测试参数" + ParamDataGridView.Rows[i].Cells["pid_item"].Value + "未填写\n", Color.Red, ms_sncode);
+                                return;
+                            }
+                        }
                         SetCollectResult();
                     }
                     else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
@@ -392,6 +402,12 @@ namespace UAS_MES_NEW.Make
                             {
                                 dh.ExecuteSql("update makeserial set ms_iftest=-1 where ms_id='" + oMSID + "'", "update");
                             }
+                            for (int i = 0; i < ParamDataGridView.Rows.Count; i++)
+                            {
+                                dh.ExecuteSql("insert into STEPTESTDETAIL(std_id,STD_SN, STD_MAKECODE, STD_CLASS, STD_ACTUALVALUE)" +
+                                    " values(STEPTESTDETAIL_seq.nextval,'" + ms_sncode.Text + "','" + ma_code.Text + "','" + ParamDataGridView.Rows[i].Cells["pid_item"].Value + "','" + ParamDataGridView.Rows[i].Cells["pid_value"].Value + "')", "insert");
+                                ParamDataGridView.Rows[i].Cells["pid_values"].Value = null;
+                            }
                             //提示正确返回时传递的信息
                             if (ErrorMessage.Contains("AFTERSUCCESS"))
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n");
@@ -766,6 +782,8 @@ namespace UAS_MES_NEW.Make
         private void ma_prodcode_TextChanged(object sender, EventArgs e)
         {
             LoadBadGroupData();
+            DataTable par = (DataTable)dh.ExecuteSql("select PID_DETNO, PID_ITEM from productitem left join productitemdetail on pi_id=pid_piid where pi_prodcode='" + ma_prodcode.Text + "'", "select");
+            BaseUtil.FillDgvWithDataTable(ParamDataGridView, par);
         }
 
         private void Filter_UserControlTextChanged(object sender, EventArgs e)

+ 1 - 1
UAS_MES_XMW/FunctionCode/Make/Make_TestCollection_Param.resx

@@ -259,7 +259,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEQAACxEBf2RfkQAACdNJREFUeF7t3dtOW4cW
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDwAACw8BkvkDpQAACdNJREFUeF7t3dtOW4cW
         heFe9VUibakv1/eoVGk/TFedps2hnCGAjTnYnAlgbGNzJpUqza2xgL2zmSlL4oqV8V98Fx2q190/YxwC
         30XEdwA8pQGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMNAHykAYCPNADwkQYAPtIAwEcaAPhIAwAfaQDg
         Iw0AfKQBgI80APCRBgA+0gDARxoA+EgDAB9pAOAjDQB8pAGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMN