入库单添加采购申请选择后赋值申请人和申请人部门字段逻辑
This commit is contained in:
parent
b264a65d71
commit
9614b86ae4
|
@ -77,6 +77,19 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
|||
entryCollection.clear();
|
||||
this.getView().updateView("entryentity");//刷新分录
|
||||
}
|
||||
if (newValue != null) {
|
||||
DynamicObject purchaseApply = (DynamicObject) newValue;
|
||||
QFilter[] qFilter = new QFilter[]{new QFilter("id", QCP.equals, purchaseApply.getPkValue())};
|
||||
DynamicObject ecma_purchaseApply = BusinessDataServiceHelper.loadSingle("ecma_purchaseapply",
|
||||
"applyer,zcgj_persondepart", qFilter);//采购申请单
|
||||
if (ecma_purchaseApply != null) {
|
||||
this.getModel().setValue("zcgj_reqperson", ecma_purchaseApply.get("applyer"));//物料申请人
|
||||
this.getModel().setValue("zcgj_applidepart", ecma_purchaseApply.get("zcgj_persondepart"));//申请人部门
|
||||
}
|
||||
} else {
|
||||
this.getModel().setValue("zcgj_reqperson", null);//清空物料申请人字段
|
||||
this.getModel().setValue("zcgj_applidepart", null);//清空申请人部门字段
|
||||
}
|
||||
} else if ("warehouse".equals(key)) {
|
||||
//仓库
|
||||
this.getModel().setValue("zcgj_purchaseapply", null);//清空采购申请单字段
|
||||
|
|
Loading…
Reference in New Issue