1.付款申请优化项目携带(选合同会刷新项目)

S
This commit is contained in:
weiyunlong 2024-12-19 14:25:32 +08:00
parent 288fa85533
commit 052593a8e3
1 changed files with 4 additions and 7 deletions

View File

@ -12,8 +12,9 @@ import java.util.EventObject;
public class PayreqProjectFormPlugin extends AbstractBillPlugIn {
@Override
public void afterBindData(EventObject e) {
super.afterBindData(e);
public void afterCreateNewData(EventObject e) {
super.afterCreateNewData(e);
//根据组织携带项目
updateRenovationProject();
}
@ -30,14 +31,10 @@ public class PayreqProjectFormPlugin extends AbstractBillPlugIn {
private void updateRenovationProject() {
DynamicObject org = (DynamicObject) this.getModel().getValue("org");
DynamicObject project =(DynamicObject) this.getModel().getValue("project");
// 只有在需求组织不为空的情况下才进行查询
if (org != null) {
setRenovationProjectByOrg(org);
} else {
// 组织为空清空项目
this.getModel().setValue("project", null);
this.getView().updateView("project");
}
}