From 702ff4ef47276b745a83b0761d258666eea3734e Mon Sep 17 00:00:00 2001 From: xiaoshi <2272816786@qq.com> Date: Wed, 8 Jan 2025 10:32:40 +0800 Subject: [PATCH 1/2] =?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 | 2 +- .../operate/OutContractBudgetExtOp.java | 47 +++++++++++++++++++ .../operate/SubmitInContractBillOp.java | 4 +- 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/OutContractBudgetExtOp.java 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 d7e25db..7f489a2 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 @@ -31,7 +31,7 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin { if (contractType.toString().equals("wzcg01")) {//物资采购 this.setResourceTypeStyle("material"); this.afterSelectedTag("material"); - } else if (contractType.toString().equals("sbcg")) {//设备采购 + } else if (contractType.toString().equals("sbcg")||(contractType.toString().equals("sbzl"))) {//设备采购 this.setResourceTypeStyle("equipment"); this.afterSelectedTag("equipment"); }else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")|| contractType.toString().equals("ck")|| diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/OutContractBudgetExtOp.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/OutContractBudgetExtOp.java new file mode 100644 index 0000000..4961d49 --- /dev/null +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/OutContractBudgetExtOp.java @@ -0,0 +1,47 @@ +package zcgj.zcdev.zcdev.pr.plugin.operate; + + +import kd.bos.entity.plugin.AbstractOperationServicePlugIn; +import kd.bos.entity.plugin.AddValidatorsEventArgs; +import kd.bos.entity.plugin.PreparePropertysEventArgs; +import kd.ec.contract.opplugin.validator.InContractAmtControlValidator; +import kd.ec.contract.opplugin.validator.OutContractBoqControlValidator; +import kd.ec.contract.opplugin.validator.OutContractMustInputValidator; + +public class OutContractBudgetExtOp extends AbstractOperationServicePlugIn { + public void onPreparePropertys(PreparePropertysEventArgs e) { + super.onPreparePropertys(e); + e.getFieldKeys().add("cbs"); + e.getFieldKeys().add("project"); + e.getFieldKeys().add("org"); + e.getFieldKeys().add("billstatus"); + e.getFieldKeys().add("billno"); + e.getFieldKeys().add("currency"); + e.getFieldKeys().add("originaloftaxamount"); + e.getFieldKeys().add("originalamount"); + e.getFieldKeys().add("editonunit"); + e.getFieldKeys().add("unitproject"); + e.getFieldKeys().add("contracttype"); + e.getFieldKeys().add("isonlist"); + e.getFieldKeys().add("listmodelentry"); + e.getFieldKeys().add("sublistentry"); + e.getFieldKeys().add("modelname"); + e.getFieldKeys().add("listmodelid"); + e.getFieldKeys().add("listunitproject"); + e.getFieldKeys().add("cbsnumber"); + e.getFieldKeys().add("isleaf"); + e.getFieldKeys().add("incontract"); + e.getFieldKeys().add("boqnumber"); + e.getFieldKeys().add("qty"); + e.getFieldKeys().add("price"); + e.getFieldKeys().add("amount"); + e.getFieldKeys().add("isincost"); + } + + public void onAddValidators(AddValidatorsEventArgs e) { + super.onAddValidators(e); + e.getValidators().add(new InContractAmtControlValidator()); + e.getValidators().add(new OutContractMustInputValidator()); + e.getValidators().add(new OutContractBoqControlValidator()); + } +} \ No newline at end of file diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/SubmitInContractBillOp.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/SubmitInContractBillOp.java index 09869ef..a4b9c72 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/SubmitInContractBillOp.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/operate/SubmitInContractBillOp.java @@ -1,14 +1,16 @@ package zcgj.zcdev.zcdev.pr.plugin.operate; import com.apusic.juli.logging.Log; import com.apusic.juli.logging.LogFactory; +import kd.bos.entity.plugin.AbstractOperationServicePlugIn; import kd.bos.entity.plugin.AddValidatorsEventArgs; import kd.bos.entity.validate.AbstractValidator; import kd.ec.contract.opplugin.InContractBillOp; +import kd.ec.contract.opplugin.OutContractBudgetOp; import kd.ec.contract.opplugin.validator.ContractValidator; import java.util.List; -public class SubmitInContractBillOp extends InContractBillOp{ +public class SubmitInContractBillOp extends AbstractOperationServicePlugIn { private final static Log logger = LogFactory.getLog(SubmitInContractBillOp.class); @Override From 7ec830c713c65c8b2cf21366c7a373a182a4d7ee Mon Sep 17 00:00:00 2001 From: xiaoshi <2272816786@qq.com> Date: Thu, 9 Jan 2025 17:18:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=20?= =?UTF-8?q?=E6=94=AF=E5=87=BA=E5=90=88=E5=90=8C=E5=90=88=E4=BD=9C=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=BB=A3=E7=A0=81=E5=A1=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zcdev/pr/plugin/form/OutContractFromPlugin.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractFromPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractFromPlugin.java index 9146bb5..b285a5e 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractFromPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/OutContractFromPlugin.java @@ -36,10 +36,13 @@ public class OutContractFromPlugin extends AbstractBillPlugIn implements Plugin DynamicObject contractType = (DynamicObject)changeData.getNewValue(); String number = contractType.getString("number"); List comboList = new ArrayList<>(); - comboList.add(new ComboItem(new LocaleString("全面合作"), "A")); - comboList.add(new ComboItem(new LocaleString("局部合作"), "B")); if(number.equals("sbzl")){ - comboList.add(new ComboItem(new LocaleString("零星租赁"), "C")); + comboList.add(new ComboItem(new LocaleString("全部租赁"), "C")); + comboList.add(new ComboItem(new LocaleString("部分租赁"), "D")); + comboList.add(new ComboItem(new LocaleString("零星租赁"), "F")); + }else{ + comboList.add(new ComboItem(new LocaleString("全面合作"), "A")); + comboList.add(new ComboItem(new LocaleString("局部合作"), "B")); } ComboEdit comboEdit = getView().getControl("zcgj_cooperatemode"); comboEdit.setComboItems(comboList);