diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractPublicBillPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractPublicBillPlugin.java new file mode 100644 index 0000000..0a7adf4 --- /dev/null +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/ContractPublicBillPlugin.java @@ -0,0 +1,68 @@ +package zcgj.zcdev.zcdev.pr.plugin.form; + +import kd.bos.bill.AbstractBillPlugIn; +import kd.bos.dataentity.entity.LocaleString; +import kd.bos.entity.datamodel.events.PropertyChangedArgs; +import kd.bos.form.field.ComboEdit; +import kd.bos.form.field.ComboItem; +import kd.bos.form.field.TextEdit; +import kd.sdk.plugin.Plugin; + +import java.util.ArrayList; +import java.util.List; + +/** + * 单据界面插件 + */ +public class ContractPublicBillPlugin extends AbstractBillPlugIn implements Plugin { + + @Override + public void propertyChanged(PropertyChangedArgs e) { + super.propertyChanged(e); + String name = e.getProperty().getName(); + if(name.equals("zcgj_jtnw")){ + Object zcgj_jtnw = this.getModel().getValue("zcgj_jtnw"); + if(zcgj_jtnw!=null && zcgj_jtnw!=""){ + List comboList = new ArrayList<>(); + if(zcgj_jtnw.toString().equals("")){ + comboList.add(new ComboItem(new LocaleString("中材矿山"), "1")); + comboList.add(new ComboItem(new LocaleString("中材国际"), "2")); + comboList.add(new ComboItem(new LocaleString("中联水泥"), "3")); + comboList.add(new ComboItem(new LocaleString("中联同力"), "4")); + comboList.add(new ComboItem(new LocaleString("南方水泥"), "5")); + comboList.add(new ComboItem(new LocaleString("浙江水泥"), "6")); + comboList.add(new ComboItem(new LocaleString("江西水泥"), "7")); + comboList.add(new ComboItem(new LocaleString("中南水泥"), "8")); + comboList.add(new ComboItem(new LocaleString("西南水泥"), "9")); + comboList.add(new ComboItem(new LocaleString("云南水泥"), "10")); + comboList.add(new ComboItem(new LocaleString("贵州水泥"), "11")); + comboList.add(new ComboItem(new LocaleString("新疆水泥"), "12")); + comboList.add(new ComboItem(new LocaleString("三狮材料"), "13")); + comboList.add(new ComboItem(new LocaleString("华南材料"), "14")); + comboList.add(new ComboItem(new LocaleString("华东材料"), "15")); + comboList.add(new ComboItem(new LocaleString("中材水泥"), "16")); + comboList.add(new ComboItem(new LocaleString("北方水泥"), "17")); + comboList.add(new ComboItem(new LocaleString("宁夏建材"), "18")); +// comboList.add(new ComboItem(new LocaleString("祁连山"), "19")); + comboList.add(new ComboItem(new LocaleString("中材科技"), "20")); + comboList.add(new ComboItem(new LocaleString("中建投"), "21")); + comboList.add(new ComboItem(new LocaleString("地勘"), "22")); + comboList.add(new ComboItem(new LocaleString("资产管理公司"), "23")); + }else{ + comboList.add(new ComboItem(new LocaleString("山水"), "24")); +// comboList.add(new ComboItem(new LocaleString(""), "25")); + comboList.add(new ComboItem(new LocaleString("华新"), "26")); + comboList.add(new ComboItem(new LocaleString("华润"), "27")); + comboList.add(new ComboItem(new LocaleString("红狮"), "28")); + comboList.add(new ComboItem(new LocaleString("亚泰"), "29")); + comboList.add(new ComboItem(new LocaleString("金隅"), "30")); + comboList.add(new ComboItem(new LocaleString("昆钢"), "31")); + comboList.add(new ComboItem(new LocaleString("台泥"), "32")); + comboList.add(new ComboItem(new LocaleString("万年青"), "33")); + } + ComboEdit comboEdit = getView().getControl("zcgj_belongingsector"); + comboEdit.setComboItems(comboList); + } + } + } +} \ 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 454a906..a94b2e6 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 @@ -9,6 +9,7 @@ import java.util.List; public class SubmitInContractBillOp extends InContractBillOp{ @Override public void onAddValidators(AddValidatorsEventArgs e) { + super.onAddValidators(e); List validators = e.getValidators(); for (AbstractValidator validator:validators){ if (validator instanceof ContractValidator){ @@ -17,6 +18,5 @@ public class SubmitInContractBillOp extends InContractBillOp{ break; } } - super.onAddValidators(e); } }