优化代码 合同计量与支出合同

This commit is contained in:
xiaoshi 2024-12-23 18:31:26 +08:00
parent bb6b654434
commit 20565cbd5e
1 changed files with 11 additions and 8 deletions

View File

@ -9,14 +9,17 @@ public class OutContractMeasureBillEditExtPlugin extends OutContractMeasureBillE
protected void controlCostMustInput() {
super.controlCostMustInput();
DynamicObject contract = this.getModel().getDataEntity().getDynamicObject("contract");
String number = contract.getDynamicObject("contracttype").getString("number");
if (number .equals("wzcg01")||number.equals("sbcg")||number.equals("jjfb")){
BasedataEdit basedataEdit = (BasedataEdit)this.getControl("listcbs");
basedataEdit.setMustInput(false);
basedataEdit = (BasedataEdit)this.getControl("cbs");
basedataEdit.setMustInput(false);
this.getView().setVisible(false,"listcbs");
this.getView().setVisible(false,"cbs");
if(contract!=null){
String number = contract.getDynamicObject("contracttype").getString("number");
if (number .equals("wzcg01")||number.equals("sbcg")||number.equals("jjfb")){
BasedataEdit basedataEdit = (BasedataEdit)this.getControl("listcbs");
basedataEdit.setMustInput(false);
basedataEdit = (BasedataEdit)this.getControl("cbs");
basedataEdit.setMustInput(false);
this.getView().setVisible(false,"listcbs");
this.getView().setVisible(false,"cbs");
}
}
}
}