1.优化收款单付款人编码携带

2.注释付款单成本中心,利润中心必填逻辑
--s
This commit is contained in:
weiyunlong 2025-07-04 14:05:09 +08:00
parent 1bd8b4b98d
commit b0af76d40e
2 changed files with 65 additions and 65 deletions

View File

@ -38,7 +38,7 @@ public class RecBillFromPlugin extends AbstractFormPlugin implements Plugin {
public void afterBindData(EventObject e) {
super.afterBindData(e);
//携带付款人编码
String payerformid = ""+this.getView().getModel().getValue("payerformid");//付款人类型标识ID
String payerformid = ""+this.getView().getModel().getValue("payertype");//付款人类型标识ID
Long payer = Long.valueOf(""+this.getView().getModel().getValue("payer"));//付款人ID
if (payer != 0 && payerformid!= null &&!payerformid.isEmpty()) {
if (!"other".equals(payerformid)) {

View File

@ -39,38 +39,38 @@ public class TextFieldDemo extends AbstractFormPlugin {
}
}
DynamicObject paymentidentify = (DynamicObject)this.getView().getModel().getValue("paymentidentify");//付款单标识
if (null != paymentidentify) {
//FKBS01 主动付款 FKBS02 被动付款
String number = paymentidentify.getString("number");//付款单标识
//再加个判断如果是 主动付款不进行必填校验
if (!"FKBS01".equals(number)) {
// 获取成本中心和利润中心的控件
BasedataEdit shjh_costcenter = this.getView().getControl("shjh_costcenter");
BasedataEdit shjh_profitcenter = this.getView().getControl("shjh_pc");
//根据业务小类设置 成本中心,利润中心是否必填
DynamicObject shjhBizsmall = (DynamicObject)this.getView().getModel().getValue("shjh_bizsmall");
BasedataProp tp = (BasedataProp) shjh_costcenter.getProperty();
BasedataProp td = (BasedataProp) shjh_profitcenter.getProperty();
if (null != shjhBizsmall) {
shjhBizsmall = BusinessDataServiceHelper.loadSingle(shjhBizsmall.getPkValue(),"shjh_bizsmalltype");
// 获取成本中心的必填配置
boolean shjhCc = shjhBizsmall.getBoolean("shjh_cc");
shjh_costcenter.setMustInput(shjhCc);
tp.setMustInput(shjhCc);
// 获取利润中心的必填配置
boolean shjhPc = shjhBizsmall.getBoolean("shjh_pc");
shjh_profitcenter.setMustInput(shjhPc);
td.setMustInput(shjhPc);
}else {
shjh_costcenter.setMustInput(false);
tp.setMustInput(false);
shjh_profitcenter.setMustInput(false);
td.setMustInput(false);
}
}
}
// DynamicObject paymentidentify = (DynamicObject)this.getView().getModel().getValue("paymentidentify");//付款单标识
// if (null != paymentidentify) {
// //FKBS01 主动付款 FKBS02 被动付款
// String number = paymentidentify.getString("number");//付款单标识
// //再加个判断如果是 主动付款不进行必填校验
// if (!"FKBS01".equals(number)) {
// // 获取成本中心和利润中心的控件
// BasedataEdit shjh_costcenter = this.getView().getControl("shjh_costcenter");
// BasedataEdit shjh_profitcenter = this.getView().getControl("shjh_pc");
// //根据业务小类设置 成本中心,利润中心是否必填
// DynamicObject shjhBizsmall = (DynamicObject)this.getView().getModel().getValue("shjh_bizsmall");
// BasedataProp tp = (BasedataProp) shjh_costcenter.getProperty();
// BasedataProp td = (BasedataProp) shjh_profitcenter.getProperty();
//
// if (null != shjhBizsmall) {
// shjhBizsmall = BusinessDataServiceHelper.loadSingle(shjhBizsmall.getPkValue(),"shjh_bizsmalltype");
// // 获取成本中心的必填配置
// boolean shjhCc = shjhBizsmall.getBoolean("shjh_cc");
// shjh_costcenter.setMustInput(shjhCc);
// tp.setMustInput(shjhCc);
// // 获取利润中心的必填配置
// boolean shjhPc = shjhBizsmall.getBoolean("shjh_pc");
// shjh_profitcenter.setMustInput(shjhPc);
// td.setMustInput(shjhPc);
// }else {
// shjh_costcenter.setMustInput(false);
// tp.setMustInput(false);
// shjh_profitcenter.setMustInput(false);
// td.setMustInput(false);
// }
// }
// }
//赋值结算方式
@ -80,38 +80,38 @@ public class TextFieldDemo extends AbstractFormPlugin {
@Override
public void propertyChanged(PropertyChangedArgs e) {
super.propertyChanged(e);
DynamicObject paymentidentify = (DynamicObject)this.getView().getModel().getValue("paymentidentify");//付款单标识
if (null != paymentidentify) {
//FKBS01 主动付款 FKBS02 被动付款
String number = paymentidentify.getString("number");//付款单标识
//再加个判断如果是 主动付款不进行必填校验
if (!"FKBS01".equals(number)) {
// 获取成本中心和利润中心的控件
BasedataEdit shjh_costcenter = this.getView().getControl("shjh_costcenter");
BasedataEdit shjh_profitcenter = this.getView().getControl("shjh_pc");
//根据业务小类设置 成本中心,利润中心是否必填
DynamicObject shjhBizsmall = (DynamicObject)this.getView().getModel().getValue("shjh_bizsmall");
BasedataProp tp = (BasedataProp) shjh_costcenter.getProperty();
BasedataProp td = (BasedataProp) shjh_profitcenter.getProperty();
if (null != shjhBizsmall) {
shjhBizsmall = BusinessDataServiceHelper.loadSingle(shjhBizsmall.getPkValue(),"shjh_bizsmalltype");
// 获取成本中心的必填配置
boolean shjhCc = shjhBizsmall.getBoolean("shjh_cc");
shjh_costcenter.setMustInput(shjhCc);
tp.setMustInput(shjhCc);
// 获取利润中心的必填配置
boolean shjhPc = shjhBizsmall.getBoolean("shjh_pc");
shjh_profitcenter.setMustInput(shjhPc);
td.setMustInput(shjhPc);
}else {
shjh_costcenter.setMustInput(false);
tp.setMustInput(false);
shjh_profitcenter.setMustInput(false);
td.setMustInput(false);
}
}
}
// DynamicObject paymentidentify = (DynamicObject)this.getView().getModel().getValue("paymentidentify");//付款单标识
// if (null != paymentidentify) {
// //FKBS01 主动付款 FKBS02 被动付款
// String number = paymentidentify.getString("number");//付款单标识
// //再加个判断如果是 主动付款不进行必填校验
// if (!"FKBS01".equals(number)) {
// // 获取成本中心和利润中心的控件
// BasedataEdit shjh_costcenter = this.getView().getControl("shjh_costcenter");
// BasedataEdit shjh_profitcenter = this.getView().getControl("shjh_pc");
// //根据业务小类设置 成本中心,利润中心是否必填
// DynamicObject shjhBizsmall = (DynamicObject)this.getView().getModel().getValue("shjh_bizsmall");
// BasedataProp tp = (BasedataProp) shjh_costcenter.getProperty();
// BasedataProp td = (BasedataProp) shjh_profitcenter.getProperty();
//
// if (null != shjhBizsmall) {
// shjhBizsmall = BusinessDataServiceHelper.loadSingle(shjhBizsmall.getPkValue(),"shjh_bizsmalltype");
// // 获取成本中心的必填配置
// boolean shjhCc = shjhBizsmall.getBoolean("shjh_cc");
// shjh_costcenter.setMustInput(shjhCc);
// tp.setMustInput(shjhCc);
// // 获取利润中心的必填配置
// boolean shjhPc = shjhBizsmall.getBoolean("shjh_pc");
// shjh_profitcenter.setMustInput(shjhPc);
// td.setMustInput(shjhPc);
// }else {
// shjh_costcenter.setMustInput(false);
// tp.setMustInput(false);
// shjh_profitcenter.setMustInput(false);
// td.setMustInput(false);
// }
// }
// }
//赋值结算方式