收款申请优化
This commit is contained in:
parent
e6d5e8a34f
commit
123dfe0985
|
|
@ -48,21 +48,43 @@ public class ContractSelectProjectPlugin extends AbstractBillPlugIn implements P
|
||||||
ChangeData changeData = e.getChangeSet()[0];
|
ChangeData changeData = e.getChangeSet()[0];
|
||||||
Object newValue = changeData.getNewValue();
|
Object newValue = changeData.getNewValue();
|
||||||
if (newValue != null && newValue.equals("20")) {
|
if (newValue != null && newValue.equals("20")) {
|
||||||
DynamicObject org = (DynamicObject) this.getModel().getValue("org");//所属组织
|
DynamicObject fiaccountorg = (DynamicObject) this.getModel().getValue("fiaccountorg");//财务记账组织
|
||||||
if (org != null) {
|
if (fiaccountorg != null) {
|
||||||
QFilter filter = new QFilter("zcgj_companyblentry.zcgj_org", QCP.equals, org.getPkValue());//组织
|
QFilter filter = new QFilter("zcgj_companyblentry.zcgj_org", QCP.equals, fiaccountorg.getPkValue());//组织
|
||||||
DynamicObject zcgj_companybelong = BusinessDataServiceHelper.loadSingle("zcgj_companybelong", "zcgj_headquarters",
|
DynamicObject zcgj_companybelong = BusinessDataServiceHelper.loadSingle("zcgj_companybelong", "zcgj_headquarters",
|
||||||
new QFilter[]{filter});//"公司归属区域"
|
new QFilter[]{filter});//"公司归属区域"
|
||||||
if (zcgj_companybelong != null) {
|
if (zcgj_companybelong != null) {
|
||||||
DynamicObject zcgj_headquarters = zcgj_companybelong.getDynamicObject("zcgj_headquarters");//本部
|
DynamicObject zcgj_headquarters = zcgj_companybelong.getDynamicObject("zcgj_headquarters");//本部
|
||||||
this.getModel().setValue("zcgj_hqorg", zcgj_headquarters);//总部代收组织
|
this.getModel().setValue("zcgj_hqorg", zcgj_headquarters);//总部代收组织
|
||||||
this.getModel().setValue("fiaccountorg", zcgj_headquarters);//财务记账组织
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.getView().showErrorNotification("请先选择财务记账组织");
|
||||||
|
this.getModel().setValue("zcgj_hqrec", null);
|
||||||
|
this.getModel().setValue("zcgj_hqorg", null);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.getModel().setValue("zcgj_hqorg", null);//总部代收组织
|
this.getModel().setValue("zcgj_hqorg", null);//总部代收组织
|
||||||
this.getModel().setValue("fiaccountorg", null);//财务记账组织
|
|
||||||
}
|
}
|
||||||
}
|
}/* else if (name.equals("fiaccountorg")) {
|
||||||
|
//财务记账组织
|
||||||
|
ChangeData changeData = e.getChangeSet()[0];
|
||||||
|
Object newValue = changeData.getNewValue();
|
||||||
|
if (newValue != null) {
|
||||||
|
DynamicObject fiaccountorg = (DynamicObject) newValue;
|
||||||
|
Object zcgj_hqrec = this.getModel().getValue("zcgj_hqrec");//总部代收
|
||||||
|
if (zcgj_hqrec != null && zcgj_hqrec.equals("20")) {
|
||||||
|
QFilter filter = new QFilter("zcgj_companyblentry.zcgj_org", QCP.equals, fiaccountorg.getPkValue());//组织
|
||||||
|
DynamicObject zcgj_companybelong = BusinessDataServiceHelper.loadSingle("zcgj_companybelong", "zcgj_headquarters",
|
||||||
|
new QFilter[]{filter});//"公司归属区域"
|
||||||
|
if (zcgj_companybelong != null) {
|
||||||
|
DynamicObject zcgj_headquarters = zcgj_companybelong.getDynamicObject("zcgj_headquarters");//本部
|
||||||
|
this.getModel().setValue("zcgj_hqorg", zcgj_headquarters);//总部代收组织
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.getModel().setValue("zcgj_hqrec", null);//总部代收
|
||||||
|
this.getModel().setValue("zcgj_hqorg", null);//总部代收组织
|
||||||
|
}
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue