From 7e9b42806af2985ffbc810922a3be237829d1674 Mon Sep 17 00:00:00 2001 From: xuhaihui <2098865055@qq.com> Date: Fri, 21 Nov 2025 16:23:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E5=87=BA=E5=90=88=E5=90=8C=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E4=BC=98=E5=8C=96=E6=8C=89=E8=AE=BE=E5=A4=87=E8=B4=B9?= =?UTF-8?q?=E7=94=A8=E7=BB=93=E7=AE=97=E5=8D=95=E7=BB=93=E7=AE=97=E9=9A=90?= =?UTF-8?q?=E6=98=BE=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/OutContractSettleEditPluginExt.java | 58 ++++--------------- 1 file changed, 11 insertions(+), 47 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractSettleEditPluginExt.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractSettleEditPluginExt.java index 75b5019..116dad3 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractSettleEditPluginExt.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractSettleEditPluginExt.java @@ -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) {