收入支出合同界面插件

This commit is contained in:
小石 2024-12-03 10:27:53 +08:00
parent 973aa95709
commit 4ccb84dd51
2 changed files with 69 additions and 1 deletions

View File

@ -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<ComboItem> 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);
}
}
}
}

View File

@ -9,6 +9,7 @@ import java.util.List;
public class SubmitInContractBillOp extends InContractBillOp{ public class SubmitInContractBillOp extends InContractBillOp{
@Override @Override
public void onAddValidators(AddValidatorsEventArgs e) { public void onAddValidators(AddValidatorsEventArgs e) {
super.onAddValidators(e);
List<AbstractValidator> validators = e.getValidators(); List<AbstractValidator> validators = e.getValidators();
for (AbstractValidator validator:validators){ for (AbstractValidator validator:validators){
if (validator instanceof ContractValidator){ if (validator instanceof ContractValidator){
@ -17,6 +18,5 @@ public class SubmitInContractBillOp extends InContractBillOp{
break; break;
} }
} }
super.onAddValidators(e);
} }
} }