From 7eb7bc216bb83aa4ed4eb65d60870e84f845f7d6 Mon Sep 17 00:00:00 2001 From: xiaoshi <2272816786@qq.com> Date: Thu, 12 Dec 2024 21:31:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/form/ResourceFilterExtPlugin.java | 37 +++++++++++-------- 1 file changed, 21 insertions(+), 16 deletions(-) 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 517ed7f..a124e5e 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 @@ -18,24 +18,29 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin { FormShowParameter formShowParameter = this.getView().getFormShowParameter(); Map customParams = formShowParameter.getCustomParams(); 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"}); - this.setResourceTypeStyle("material"); - this.afterSelectedTag("material"); - } else if (contractType.toString().equals("cs2")) {//设备采购 - this.getView().setVisible(true, new String[]{"flexpanelequipment"}); - this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelmaterial", "flexpanelturnover","flexpanelother"}); - this.setResourceTypeStyle("equipment"); - this.afterSelectedTag("equipment"); - }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"}); - this.setResourceTypeStyle("turnover"); - this.afterSelectedTag("turnover"); + String firstOpen = this.getPageCache().get("firstOpen"); + if (firstOpen != null) { + this.getPageCache().put("firstOpen", "false"); + 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"}); + this.setResourceTypeStyle("material"); + this.afterSelectedTag("material"); + } else if (contractType.toString().equals("cs2")) {//设备采购 + this.getView().setVisible(true, new String[]{"flexpanelequipment"}); + this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelmaterial", "flexpanelturnover","flexpanelother"}); + this.setResourceTypeStyle("equipment"); + this.afterSelectedTag("equipment"); + }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"}); + this.setResourceTypeStyle("turnover"); + this.afterSelectedTag("turnover"); + } } } + System.out.println(); }