From 20565cbd5e290ecc91c350d15bdfb7320685678d Mon Sep 17 00:00:00 2001 From: xiaoshi <2272816786@qq.com> Date: Mon, 23 Dec 2024 18:31:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=20=20?= =?UTF-8?q?=E5=90=88=E5=90=8C=E8=AE=A1=E9=87=8F=E4=B8=8E=E6=94=AF=E5=87=BA?= =?UTF-8?q?=E5=90=88=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OutContractMeasureBillEditExtPlugin.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractMeasureBillEditExtPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractMeasureBillEditExtPlugin.java index de322b9..f7ffa24 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractMeasureBillEditExtPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractMeasureBillEditExtPlugin.java @@ -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"); + } } + } }