Browse Source

万利达MES近期程序调整

caosy 5 years ago
parent
commit
9851b07005

+ 5 - 0
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -765,6 +765,11 @@ namespace UAS_MES.Make
 
         private void SaveBadLocation_Click(object sender, EventArgs e)
         {
+            if (mbl_loc.Text.Length > 6)
+            {
+                OperatResult.AppendText(">>不良位置长度不能大于6\n", Color.Red);
+                return;
+            }
             DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode from makeserial where ms_id='" + msid + "' and ms_sncode='" + GetSNCode.Text + "' and ms_status=3", "select");
             if (dt.Rows.Count > 0)
             {

+ 2 - 4
UAS-MES/FunctionCode/Make/Make_SmtTestCollection.cs

@@ -985,7 +985,7 @@ namespace UAS_MES.Make
             {
                 if (ma_prodcode.Text != "")
                 {
-                    if (psl_location.Text != "")
+                    if (psl_location.Text != "" && psl_location.Text.Length<=6)
                     {
                         DataTable dt =  (DataTable)dh.ExecuteSql("select bd_soncode,bd_location,pr_spec,pr_detail from (with temp1 as (select bd_soncode,bd_location,pr_spec,pr_detail from bomdetail innner join  bom on bo_id=bd_bomid left join product on bd_soncode = pr_code start with bo_mothercode= '" + ma_prodcode.Text + "' and  nvl(bd_usestatus,' ') <> 'DISABLE' connect by bo_mothercode= prior bd_soncode)select * from temp1) where bd_location = '" + psl_location.Text.ToUpper() + "' OR bd_location LIKE '" + psl_location.Text.ToUpper() + ",%' OR bd_location LIKE '%," + psl_location.Text.ToUpper() + "' OR bd_location LIKE '%," + psl_location.Text.ToUpper() + ",%'", "select");
 
@@ -1051,15 +1051,13 @@ namespace UAS_MES.Make
                                     OperateResult.AppendText(">>站位" + psl_location.Text + "有替代料,需要提前采集不良零件,当前所选行均未采集对应不良零件\n", Color.Red);
                                 }
                             }
-                            
-                          
                         }
                         else {
                             OperateResult.AppendText(">>站位"+ psl_location.Text.ToUpper() + "无对应物料\n", Color.Red, psl_location);
                         }
                     }
                     else {
-                        OperateResult.AppendText(">>不良位置录入不能为空\n", Color.Red);
+                        OperateResult.AppendText(">>不良位置录入不能为空或长度不能大于6\n", Color.Red);
                     }
                 }
                 else

+ 2 - 4
UAS-MES/FunctionCode/Make/Make_SpiTestCollection.cs

@@ -990,7 +990,7 @@ namespace UAS_MES.Make
             {
                 if (ma_prodcode.Text != "")
                 {
-                    if (psl_location.Text != "")
+                    if (psl_location.Text != "" && psl_location.Text.Length <= 6)
                     {
                         DataTable dt = (DataTable)dh.ExecuteSql("select bd_soncode,bd_location,pr_spec,pr_detail from (with temp1 as (select bd_soncode,bd_location,pr_spec,pr_detail from bomdetail innner join  bom on bo_id=bd_bomid left join product on bd_soncode = pr_code start with bo_mothercode= '" + ma_prodcode.Text + "'and  nvl(bd_usestatus,' ') <> 'DISABLE' connect by bo_mothercode= prior bd_soncode)select * from temp1) where bd_location = '" + psl_location.Text.ToUpper() + "' OR bd_location LIKE '" + psl_location.Text.ToUpper() + ",%' OR bd_location LIKE '%," + psl_location.Text.ToUpper() + "' OR bd_location LIKE '%," + psl_location.Text.ToUpper() + ",%'", "select");
 
@@ -1057,8 +1057,6 @@ namespace UAS_MES.Make
                                     OperateResult.AppendText(">>站位" + psl_location.Text + "有替代料,需要提前采集不良零件,当前所选行均未采集对应不良零件\n", Color.Red);
                                 }
                             }
-
-
                         }
                         else
                         {
@@ -1067,7 +1065,7 @@ namespace UAS_MES.Make
                     }
                     else
                     {
-                        OperateResult.AppendText(">>不良位置录入不能为空\n", Color.Red);
+                        OperateResult.AppendText(">>不良位置录入不能为空或长度不能大于6\n", Color.Red);
                     }
                 }
                 else

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_XrayTestCollection.cs

@@ -985,7 +985,7 @@ namespace UAS_MES.Make
             {
                 if (ma_prodcode.Text != "")
                 {
-                    if (psl_location.Text != "")
+                    if (psl_location.Text != "" && psl_location.Text.Length <= 6)
                     {
                         DataTable dt = (DataTable)dh.ExecuteSql("select bd_soncode,bd_location,pr_spec,pr_detail from (with temp1 as (select bd_soncode,bd_location,pr_spec,pr_detail from bomdetail innner join  bom on bo_id=bd_bomid left join product on bd_soncode = pr_code start with bo_mothercode= '" + ma_prodcode.Text + "' and  nvl(bd_usestatus,' ') <> 'DISABLE' connect by bo_mothercode= prior bd_soncode)select * from temp1) where bd_location = '" + psl_location.Text.ToUpper() + "' OR bd_location LIKE '" + psl_location.Text.ToUpper() + ",%' OR bd_location LIKE '%," + psl_location.Text.ToUpper() + "' OR bd_location LIKE '%," + psl_location.Text.ToUpper() + ",%'", "select");
 
@@ -1062,7 +1062,7 @@ namespace UAS_MES.Make
                     }
                     else
                     {
-                        OperateResult.AppendText(">>不良位置录入不能为空\n", Color.Red);
+                        OperateResult.AppendText(">>不良位置录入不能为空或长度不能大于6\n", Color.Red);
                     }
                 }
                 else

+ 3 - 3
UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.Designer.cs

@@ -132,9 +132,9 @@
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.Location = new System.Drawing.Point(387, 12);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(113, 21);
+            this.label2.Size = new System.Drawing.Size(122, 21);
             this.label2.TabIndex = 238;
-            this.label2.Text = "当前栈板/箱数";
+            this.label2.Text = "最近采集明细数";
             // 
             // outboxqty
             // 
@@ -310,7 +310,7 @@
             this.SizeChanged += new System.EventHandler(this.Warehouse_ProductMakeIn_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.InOutDetailDGV)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }

+ 2 - 6
UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.cs

@@ -313,9 +313,6 @@ namespace UAS_MES.Warehouse
 
                 }
                 getqty.Text = ((DataTable)bindingSource1.DataSource).Rows.Count.ToString();
-                DataView dv = ((DataTable)bindingSource1.DataSource).DefaultView;
-                DataTable dta = dv.ToTable(true, "pim_outboxcode");
-                outboxqty.Text = dta.Rows.Count.ToString();
 
             }
         }
@@ -404,6 +401,7 @@ namespace UAS_MES.Warehouse
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 (bindingSource1.DataSource as DataTable).Merge(dt.Copy());
                 BaseUtil.FillDgvWithDataTable(InOutDetailDGV, (DataTable)bindingSource1.DataSource);
+                outboxqty.Text = dt.Rows.Count+"";
             }
             else
             {
@@ -413,6 +411,7 @@ namespace UAS_MES.Warehouse
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 (bindingSource1.DataSource as DataTable).Merge(dt.Copy());
                 BaseUtil.FillDgvWithDataTable(InOutDetailDGV, (DataTable)bindingSource1.DataSource);
+                outboxqty.Text = dt.Rows.Count + "";
             }
         }
 
@@ -532,9 +531,6 @@ namespace UAS_MES.Warehouse
         private void InOutDetailDGV_DataSourceChanged(object sender, EventArgs e)
         {
             getqty.Text = InOutDetailDGV.Rows.Count.ToString();
-            DataView dv = ((DataTable)InOutDetailDGV.DataSource).DefaultView;
-            DataTable dt = dv.ToTable(true, "pim_outboxcode");
-            outboxqty.Text = dt.Rows.Count.ToString();
 
         }
     }

+ 21 - 0
UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.resx

@@ -141,4 +141,25 @@
   <metadata name="Sp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pim_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pim_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pim_mac.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pim_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Sp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>