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

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() { protected void controlCostMustInput() {
super.controlCostMustInput(); super.controlCostMustInput();
DynamicObject contract = this.getModel().getDataEntity().getDynamicObject("contract"); DynamicObject contract = this.getModel().getDataEntity().getDynamicObject("contract");
String number = contract.getDynamicObject("contracttype").getString("number"); if(contract!=null){
if (number .equals("wzcg01")||number.equals("sbcg")||number.equals("jjfb")){ String number = contract.getDynamicObject("contracttype").getString("number");
BasedataEdit basedataEdit = (BasedataEdit)this.getControl("listcbs"); if (number .equals("wzcg01")||number.equals("sbcg")||number.equals("jjfb")){
basedataEdit.setMustInput(false); BasedataEdit basedataEdit = (BasedataEdit)this.getControl("listcbs");
basedataEdit = (BasedataEdit)this.getControl("cbs"); basedataEdit.setMustInput(false);
basedataEdit.setMustInput(false); basedataEdit = (BasedataEdit)this.getControl("cbs");
this.getView().setVisible(false,"listcbs"); basedataEdit.setMustInput(false);
this.getView().setVisible(false,"cbs"); this.getView().setVisible(false,"listcbs");
this.getView().setVisible(false,"cbs");
}
} }
} }
} }