From de4a2d76a66bb61d5f29385b3d687feef32bd8f4 Mon Sep 17 00:00:00 2001 From: xiaoshi <2272816786@qq.com> Date: Thu, 12 Dec 2024 20:31:57 +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=E6=94=AF=E5=87=BA=E6=8A=A5=E9=94=99=E5=A4=84?= =?UTF-8?q?=E7=90=86=20=20=20=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E4=B9=99=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zcdev/pr/plugin/form/ContractFilterPlugin.java | 4 +++- .../pr/plugin/form/ContractSettleBillPlugin.java | 14 +++++++------- .../pr/plugin/form/ResourceFilterExtPlugin.java | 6 +++--- 3 files changed, 13 insertions(+), 11 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 499dc7f..118f473 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 @@ -30,7 +30,9 @@ public class ContractFilterPlugin extends AbstractBillPlugIn implements Plugin, BasedataEdit qdlx = this.getControl("treeresourceitem"); qdlx.addBeforeF7SelectListener(this); BasedataEdit contractprocess = this.getControl("zcgj_contractprocess"); - contractprocess.addBeforeF7SelectListener(this); + if(contractprocess != null) { + contractprocess.addBeforeF7SelectListener(this); + } } @Override diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractSettleBillPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractSettleBillPlugin.java index 9b3feca..ca12c3c 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractSettleBillPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractSettleBillPlugin.java @@ -28,10 +28,10 @@ public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plug Object changetype = this.getModel().getValue("changetype"); if(changetype!=null){ if(changetype.toString().equals("03")){ - this.getView().setVisible(true,"zcgj_parta"); + this.getView().setVisible(true,"zcgj_partb"); this.getView().setVisible(true,"zcgj_otherpart"); }else { - this.getView().setVisible(false,"zcgj_parta"); + this.getView().setVisible(false,"zcgj_partb"); this.getView().setVisible(false,"zcgj_otherpart"); } } @@ -68,17 +68,17 @@ public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plug Object contract = this.getModel().getValue("contract"); DynamicObject contractInfo = (DynamicObject) contract; String billName = contractInfo.getDataEntityType().getName(); - DynamicObject zcgjParta = (DynamicObject)this.getModel().getValue("zcgj_parta"); + DynamicObject zcgjpartb = (DynamicObject)this.getModel().getValue("zcgj_partb"); Object zcgjOtherpart = this.getModel().getValue("zcgj_otherpart"); if (billName.equals("ec_out_contract_f7")) { QFilter f1 = new QFilter("number", "=", contractInfo.getString("number")); DynamicObject outContractF7 = BusinessDataServiceHelper.loadSingle("ec_out_contract_f7", new QFilter[]{f1}); - outContractF7.set("parta",zcgjParta); + outContractF7.set("partb",zcgjpartb); OperationResult saveOperationResult = SaveServiceHelper.saveOperate("ec_out_contract_f7", new DynamicObject[]{outContractF7}, null);//支出合同F7实体 QFilter f2 = new QFilter("billno", "=", contractInfo.getString("number")); DynamicObject outContract = BusinessDataServiceHelper.loadSingle("ec_out_contract", new QFilter[]{f2}); - outContract.set("parta",zcgjParta); + outContract.set("partb",zcgjpartb); if(zcgjOtherpart!=null){ DynamicObjectCollection otherpart = (DynamicObjectCollection) this.getModel().getValue("zcgj_otherpart"); outContract.set("otherpart",otherpart); @@ -103,10 +103,10 @@ public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plug Object changetype = this.getModel().getValue("changetype"); if(changetype!=null){ if(changetype.toString().equals("03")){ - this.getView().setVisible(true,"zcgj_parta"); + this.getView().setVisible(true,"zcgj_partb"); this.getView().setVisible(true,"zcgj_otherpart"); }else { - this.getView().setVisible(false,"zcgj_parta"); + this.getView().setVisible(false,"zcgj_partb"); this.getView().setVisible(false,"zcgj_otherpart"); } } 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 202fc4d..517ed7f 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 @@ -14,7 +14,7 @@ import java.util.Map; public class ResourceFilterExtPlugin extends ResourceItemListPlugin { @Override public void afterBindData(EventObject e) { - + super.afterBindData(e); FormShowParameter formShowParameter = this.getView().getFormShowParameter(); Map customParams = formShowParameter.getCustomParams(); Object contractType = customParams.get("contractType"); @@ -24,7 +24,7 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin { this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelturnover","flexpanelother"}); this.setResourceTypeStyle("material"); this.afterSelectedTag("material"); - } else if (contractType.toString().equals("sbcg")) {//设备采购 + } 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"); @@ -37,7 +37,7 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin { } } System.out.println(); - super.afterBindData(e); + } }