From e0c6e8ab2e9406cf9b9b28944004366b5f438d3e Mon Sep 17 00:00:00 2001 From: xiaoshi <2272816786@qq.com> Date: Wed, 11 Dec 2024 19:39:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=B8=85=E5=8D=95=E8=BF=87?= =?UTF-8?q?=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pr/plugin/form/ContractFilterPlugin.java | 2 +- .../plugin/form/ResourceFilterExtPlugin.java | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractFilterPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractFilterPlugin.java index 931f779..b6753d1 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractFilterPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractFilterPlugin.java @@ -60,7 +60,7 @@ public class ContractFilterPlugin extends AbstractBillPlugIn implements Plugin, //设置F7列表左树的过滤条件 showParameter.getTreeFilterParameter().getQFilters().add(treeFilter); } else if (name1.equals("treeresourceitem")) { - FormShowParameter showParameter = beforeF7SelectEvent.getFormShowParameter(); + ListShowParameter showParameter =(ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); Object contType = this.getModel().getValue("contracttype"); if(contType!=null){ DynamicObject contractType = (DynamicObject)contType; diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ResourceFilterExtPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ResourceFilterExtPlugin.java index 6eafb89..2842661 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ResourceFilterExtPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ResourceFilterExtPlugin.java @@ -10,12 +10,21 @@ public class ResourceFilterExtPlugin extends ResourceFilterPlugin { @Override public void afterBindData(EventObject e) { super.afterBindData(e); - FormShowParameter formShowParameter = this.getView().getParentView().getFormShowParameter(); + FormShowParameter formShowParameter = this.getView().getFormShowParameter(); Map customParams = formShowParameter.getCustomParams(); - FormShowParameter formShowParameter1 = this.getView().getParentView().getParentView().getFormShowParameter(); - Map customParams1 = formShowParameter.getCustomParams(); - -// customParams.get("contractType") + Object contractType = customParams.get("contractType"); + if (contractType != null) { + if (contractType.toString().equals("wzcg")) {//物资采购 + this.getView().setVisible(true, new String[]{"flexpanelmaterial"}); + this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelturnover","flexpanelother"}); + } else if (contractType.toString().equals("sbcg")) {//设备采购 + this.getView().setVisible(true, new String[]{"flexpanelequipment"}); + this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelmaterial", "flexpanelturnover","flexpanelother"}); + }else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")) {//产出物 + this.getView().setVisible(true, new String[]{"flexpanelturnover"}); + this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelmaterial","flexpanelother"}); + } + } System.out.println(); } }