支出合同结算优化按设备费用结算单结算隐显逻辑
This commit is contained in:
parent
6af8068791
commit
7e9b42806a
|
|
@ -690,55 +690,12 @@ public class OutContractSettleEditPluginExt extends AbstractBillPlugIn implement
|
|||
}
|
||||
}
|
||||
|
||||
/* protected void contractChanged(ChangeData changeData) {
|
||||
this.getModel().setValue("issettlebymatin", false);
|
||||
this.getModel().deleteEntryData("materialinentry");
|
||||
this.getModel().setValue("issettlebyreconc", false);
|
||||
this.getModel().deleteEntryData("reconcentry");
|
||||
this.getModel().setValue("iseqsettle", false);
|
||||
this.getModel().deleteEntryData("eqsettleentry");
|
||||
DynamicObject contract = (DynamicObject) changeData.getNewValue();
|
||||
if (contract == null) {
|
||||
this.getView().setVisible(false, new String[]{"issettlebymatin"});
|
||||
this.getView().setVisible(false, new String[]{"issettlebyreconc"});
|
||||
this.getView().setVisible(false, new String[]{"iseqsettle"});
|
||||
} else {
|
||||
DynamicObject project = contract.getDynamicObject("project");
|
||||
if (project == null) {
|
||||
this.getView().setEnable(false, new String[]{"project"});
|
||||
}
|
||||
|
||||
boolean isPurchaseContract = this.isPurchaseType();
|
||||
if (isPurchaseContract) {
|
||||
String contractSettle = contract.getString("settlemethod");
|
||||
if (StringUtils.equals(contractSettle, "B")) {
|
||||
this.getModel().setValue("issettlebymatin", true);
|
||||
this.getModel().setValue("issettlebyreconc", false);
|
||||
} else if (StringUtils.equals(contractSettle, "A")) {
|
||||
this.getModel().setValue("issettlebymatin", false);
|
||||
this.getModel().setValue("issettlebyreconc", true);
|
||||
}
|
||||
}
|
||||
|
||||
this.getView().setVisible(isPurchaseContract, new String[]{"issettlebymatin"});
|
||||
this.getView().setVisible(isPurchaseContract, new String[]{"issettlebyreconc"});
|
||||
boolean isLeaseContract = this.isLeaseType();
|
||||
this.getView().setVisible(isLeaseContract, new String[]{"iseqsettle"});
|
||||
}
|
||||
}*///系统代码
|
||||
protected void contractChanged(ChangeData changeData) {
|
||||
this.getModel().setValue("issettlebymatin", false);
|
||||
this.getModel().deleteEntryData("materialinentry");
|
||||
this.getModel().setValue("issettlebyreconc", false);
|
||||
this.getModel().deleteEntryData("reconcentry");
|
||||
Object value = this.getModel().getValue("contattr");//合同属性
|
||||
if (value != null) {
|
||||
DynamicObject contAttr = (DynamicObject) value;
|
||||
String numebr = contAttr.getString("number");
|
||||
if (!numebr.equals("sbwbl")) {
|
||||
this.getModel().setValue("iseqsettle", false);
|
||||
}
|
||||
}
|
||||
this.getModel().setValue("iseqsettle", false);
|
||||
this.getModel().deleteEntryData("eqsettleentry");
|
||||
DynamicObject contract = (DynamicObject) changeData.getNewValue();
|
||||
if (contract == null) {
|
||||
|
|
@ -765,10 +722,17 @@ public class OutContractSettleEditPluginExt extends AbstractBillPlugIn implement
|
|||
|
||||
this.getView().setVisible(isPurchaseContract, new String[]{"issettlebymatin"});
|
||||
this.getView().setVisible(isPurchaseContract, new String[]{"issettlebyreconc"});
|
||||
boolean isLeaseContract = this.isLeaseType();
|
||||
this.getView().setVisible(isLeaseContract, new String[]{"iseqsettle"});
|
||||
/* boolean isLeaseContract = this.isLeaseType();
|
||||
this.getView().setVisible(isLeaseContract, new String[]{"iseqsettle"});*///二开注释掉的系统代码
|
||||
//二开添加逻辑↓
|
||||
DynamicObject contractType = contract.getDynamicObject("contracttype");//合同名称-合同类型
|
||||
QFilter[] qFilters = new QFilter[]{new QFilter("number", QCP.equals, contractType.get("number"))};
|
||||
DynamicObject ec_conttype = BusinessDataServiceHelper.loadSingle("ec_conttype", "contattr", qFilters);//合同类型
|
||||
DynamicObject contattr = ec_conttype.getDynamicObject("contattr");//合同属性
|
||||
this.getView().setVisible(contattr != null && contattr.getString("number").equals("sbwbl"), "iseqsettle");//按设备费用结算单结算隐显
|
||||
//二开添加逻辑↑
|
||||
}
|
||||
}//二开替换
|
||||
}
|
||||
|
||||
|
||||
protected void itemUnitProjectChanged(ChangeData changeData) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue