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 b6753d1..499dc7f 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 @@ -29,7 +29,8 @@ public class ContractFilterPlugin extends AbstractBillPlugIn implements Plugin, supplies.addBeforeF7SelectListener(this); BasedataEdit qdlx = this.getControl("treeresourceitem"); qdlx.addBeforeF7SelectListener(this); - + BasedataEdit contractprocess = this.getControl("zcgj_contractprocess"); + contractprocess.addBeforeF7SelectListener(this); } @Override @@ -67,6 +68,17 @@ public class ContractFilterPlugin extends AbstractBillPlugIn implements Plugin, showParameter.setCustomParam("contractType",contractType.getString("number")); } + } else if (name1.equals("zcgj_contractprocess")) { + String name = this.getModel().getDataEntity().getDataEntityType().getName(); + if(name.equals("ec_in_contract")){ + Object project = this.getModel().getValue("project"); + if(project!=null){ + DynamicObject projectInfo = (DynamicObject)project; + QFilter qFilter = new QFilter("project.id", QCP.equals, projectInfo.getLong("id")); + ListShowParameter showParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); + showParameter.getListFilterParameter().getQFilters().add(qFilter); + } + } } } // } 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 e79e901..9b3feca 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 @@ -18,7 +18,7 @@ import java.util.EventObject; /** * 单据界面插件 - * 收入合同结算供应商变更插件 + * 支出合同结算供应商变更插件 */ public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plugin { diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/EcContractFromPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/EcContractFromPlugin.java index 983f96b..edc8050 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/EcContractFromPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/EcContractFromPlugin.java @@ -48,7 +48,8 @@ public class EcContractFromPlugin extends AbstractBillPlugIn implements Plugin { // this.getModel().setValue("zcgj_pjnhbhshte", amount); // this.getModel().setValue("zcgj_pjnhse", rate); } else if (name.equals("zcgj_pjnhbhshte")) { - Object zcgjPjnhhshte = this.getModel().getValue("zcgj_pjnhbhshte"); +// Object zcgjPjnhhshte = this.getModel().getValue("zcgj_pjnhbhshte"); + Object zcgjPjnhhshte = changeData.getNewValue(); System.out.println(); if (zcgjPjnhhshte != null) { amount = new BigDecimal(zcgjPjnhhshte.toString()); @@ -57,6 +58,7 @@ public class EcContractFromPlugin extends AbstractBillPlugIn implements Plugin { rate = ofamount.subtract(amount); // this.getModel().setValue("zcgj_pjnhhshte", ofamount); // this.getModel().setValue("zcgj_pjnhse", rate); + dataEntity.set("zcgj_pjnhbhshte", amount); dataEntity.set("zcgj_pjnhhshte", ofamount); dataEntity.set("zcgj_pjnhse", rate); }else if (name.equals("zcgj_yjhshtsr")) { 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 2842661..dd4c6fa 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 @@ -1,12 +1,17 @@ package zcgj.zcdev.zcdev.pr.plugin.form; +import kd.bos.entity.tree.TreeNode; import kd.bos.form.FormShowParameter; +import kd.bos.form.IPageCache; +import kd.bos.form.control.TreeView; +import kd.ec.basedata.common.enums.ResourceTypeEnum; import kd.ec.basedata.formplugin.ResourceFilterPlugin; +import kd.ec.basedata.formplugin.ResourceItemListPlugin; import java.util.EventObject; import java.util.Map; -public class ResourceFilterExtPlugin extends ResourceFilterPlugin { +public class ResourceFilterExtPlugin extends ResourceItemListPlugin { @Override public void afterBindData(EventObject e) { super.afterBindData(e); @@ -17,14 +22,21 @@ public class ResourceFilterExtPlugin extends ResourceFilterPlugin { 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("sbcg")) {//设备采购 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(); } + }