|
|
@@ -76,7 +76,7 @@ namespace UAS_MES.Warehouse
|
|
|
BaseUtil.SetFormValue(this.Controls, dtpi);
|
|
|
}
|
|
|
sql.Clear();
|
|
|
- sql.Append("select nvl((select sum(pd_outqty) from prodiodetail where pd_piid=''),0)outqty,nvl((select count(1)cn from prodiomac where pim_inoutno=pd_inoutno),0) getqty , ");
|
|
|
+ sql.Append("select nvl((select sum(pd_outqty) from prodiodetail where pd_piid='"+pi_id.Text+"'),0)outqty,nvl((select count(1)cn from prodiomac where pim_inoutno=pd_inoutno),0) getqty , ");
|
|
|
sql.Append("nvl((select sum(CASE WHEN pim_type='BOX' then 1 else nvl((select pa_packageqty from package where pa_outboxcode=pim_outboxcode),0)end) from prodiomac ");
|
|
|
sql.Append("where pim_inoutno='" + pi_inoutno.Text + "' and NVL(PIM_OUTBOXCODE,' ')<>' ' AND pim_type in('BOX','PALLET')),0) boxqty from prodiodetail where pd_piid='" + pi_id.Text + "' ");
|
|
|
dtform = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
@@ -168,6 +168,7 @@ namespace UAS_MES.Warehouse
|
|
|
dh.ExecuteSql("update package set pa_status=2 where exists (select 1 from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_outboxcode=pa_outboxcode and ((pim_type='PALLET' AND PA_TYPE=3) OR (PIM_TYPE='BOX' AND PA_TYPE IN(1,2)))) AND PA_OUTNO='" + pi_inoutno.Text + "'", "update");
|
|
|
dh.ExecuteSql("update prodinout set pi_pdastatus='已出库' where pi_inoutno='" + pi_inoutno.Text + "'", "update");
|
|
|
dh.ExecuteSql("insert into messagelog(ml_id,ml_date,ml_man,ml_content,ml_result,ml_search)values(messagelog_seq.nextval,sysdate,'" + User.UserName + "','确认出货','确认出货成功','ProdInOut!Sale|pi_id=" + pi_id.Text + "')", "insert");
|
|
|
+ OperateResult.AppendText("出货单" + pi_inoutno.Text + "出库成功\n", Color.Red,pi_inoutno);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
@@ -514,7 +515,8 @@ namespace UAS_MES.Warehouse
|
|
|
dh.ExecuteSql("update package set pa_outno = '' where exists (select 1 from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_outboxcode=pa_outboxcode and ((pim_type='PALLET' AND PA_TYPE=3) OR (PIM_TYPE='BOX' AND PA_TYPE IN(1,2)))) AND PA_OUTNO='" + pi_inoutno.Text + "'", "update");
|
|
|
dh.ExecuteSql("delete from prodiomac where pim_inoutno='" + pi_inoutno.Text + "'", "delete");
|
|
|
dh.ExecuteSql("update prodinout set pi_pdastatus='未备货' where pi_inoutno='" + pi_inoutno.Text + "'", "update");
|
|
|
- dh.ExecuteSql("insert into messagelog(ml_id,ml_date,ml_man,ml_content,ml_result,ml_search)values(messagelog_seq.nextval,sysdate,'" + User.UserName+ "','清除全部备货明细',''清除备货明细成功'','ProdInOut!Sale|pi_id=" + pi_id.Text+"')", "insert");
|
|
|
+ dh.ExecuteSql("insert into messagelog(ml_id,ml_date,ml_man,ml_content,ml_result,ml_search)values(messagelog_seq.nextval,sysdate,'" + User.UserName+ "','清除全部备货明细','清除备货明细成功','ProdInOut!Sale|pi_id=" + pi_id.Text+"')", "insert");
|
|
|
+ OperateResult.AppendText("出货单" + pi_inoutno.Text + "取消明细成功\n", Color.Black,input);
|
|
|
}
|
|
|
else {
|
|
|
OperateResult.AppendText("出货单" + pi_inoutno.Text + "不存在\n", Color.Red, pi_inoutno);
|