Browse Source

卡通箱拆箱时更新标准容量

Hcsy 7 years ago
parent
commit
a835b9cb9b

+ 2 - 1
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -813,8 +813,9 @@ namespace UAS_MES.Make
                                 //抽检批次不为空的时候进行移除
                                 dh.ExecuteSQLTran(SQLS1.ToArray());
                                 List<string> SQLS2 = new List<string>();
+                                string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + pr_code.Text + "'").ToString();
                                 //置空原箱
-                                SQLS2.Add("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'");
+                                SQLS2.Add("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = "+ standqty + " where pa_outboxcode='" + pa_outboxcode.Text + "'");
                                 pa_status.Text = "0";
                                 //删除箱的明细
                                 SQLS2.Add("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'");

+ 2 - 1
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -811,8 +811,9 @@ namespace UAS_MES.Make
                                 //抽检批次不为空的时候进行移除
                                 dh.ExecuteSQLTran(SQLS1.ToArray());
                                 List<string> SQLS2 = new List<string>();
+                                string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + pr_code.Text + "'").ToString();
                                 //置空原箱
-                                SQLS2.Add("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'");
+                                SQLS2.Add("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = "+ standqty + " where pa_outboxcode='" + pa_outboxcode.Text + "'");
                                 pa_status.Text = "0";
                                 //删除箱的明细
                                 SQLS2.Add("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'");

+ 2 - 1
UAS_MES_NEW/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -811,8 +811,9 @@ namespace UAS_MES_NEW.Packing
                                 //抽检批次不为空的时候进行移除
                                 dh.ExecuteSQLTran(SQLS1.ToArray());
                                 List<string> SQLS2 = new List<string>();
+                                string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty","pr_code = '"+pr_code.Text+"'").ToString();
                                 //置空原箱
-                                SQLS2.Add("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'");
+                                SQLS2.Add("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY= "+ standqty + " where pa_outboxcode='" + pa_outboxcode.Text + "'");
                                 pa_status.Text = "0";
                                 //删除箱的明细
                                 SQLS2.Add("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'");

+ 2 - 1
UAS_MES_NEW/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -804,8 +804,9 @@ namespace UAS_MES_NEW.Packing
                                 //抽检批次不为空的时候进行移除
                                 dh.ExecuteSQLTran(SQLS1.ToArray());
                                 List<string> SQLS2 = new List<string>();
+                                string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + pr_code.Text + "'").ToString();
                                 //置空原箱
-                                SQLS2.Add("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'");
+                                SQLS2.Add("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY="+ standqty + " where pa_outboxcode='" + pa_outboxcode.Text + "'");
                                 pa_status.Text = "0";
                                 //删除箱的明细
                                 SQLS2.Add("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'");