|
@@ -810,9 +810,16 @@ namespace UAS_MES_NEW.Packing
|
|
|
SQLS1.Add("update makeserial set ms_status=1,ms_outboxcode='',ms_nextstepcode= (case when ms_nextstepcode='" + User.CurrentStepCode + "' then ms_nextstepcode else ms_stepcode end ),ms_paststep=replace(ms_paststep,'," + User.CurrentStepCode + "','') where ms_outboxcode='" + pa_outboxcode.Text + "'");
|
|
SQLS1.Add("update makeserial set ms_status=1,ms_outboxcode='',ms_nextstepcode= (case when ms_nextstepcode='" + User.CurrentStepCode + "' then ms_nextstepcode else ms_stepcode end ),ms_paststep=replace(ms_paststep,'," + User.CurrentStepCode + "','') where ms_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
//抽检批次不为空的时候进行移除
|
|
//抽检批次不为空的时候进行移除
|
|
|
dh.ExecuteSQLTran(SQLS1.ToArray());
|
|
dh.ExecuteSQLTran(SQLS1.ToArray());
|
|
|
- string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + pr_code.Text + "'").ToString();
|
|
|
|
|
- //置空原箱
|
|
|
|
|
- dh.ExecuteSql("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 + "'", "update");
|
|
|
|
|
|
|
+ string prcode = dh.getFieldDataByCondition("packagedetail", "pd_prodcode", "pd_outboxcode = '" + pa_outboxcode.Text + "'").ToString();
|
|
|
|
|
+ string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + prcode + "'").ToString();
|
|
|
|
|
+ if (standqty != "")
|
|
|
|
|
+ {
|
|
|
|
|
+ //置空原箱
|
|
|
|
|
+ dh.ExecuteSql("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 + "'", "update");
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ //置空原箱
|
|
|
|
|
+ dh.ExecuteSql("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 + "'", "update");
|
|
|
pa_status.Text = "0";
|
|
pa_status.Text = "0";
|
|
|
//删除箱的明细
|
|
//删除箱的明细
|
|
|
dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
|
|
dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
|