diff --git a/main/java/shjh/jhzj7/fi/fi/plugin/form/RecBillFromPlugin.java b/main/java/shjh/jhzj7/fi/fi/plugin/form/RecBillFromPlugin.java index 7a27c8f..c54d749 100644 --- a/main/java/shjh/jhzj7/fi/fi/plugin/form/RecBillFromPlugin.java +++ b/main/java/shjh/jhzj7/fi/fi/plugin/form/RecBillFromPlugin.java @@ -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)) { diff --git a/main/java/shjh/jhzj7/fi/fi/plugin/form/TextFieldDemo.java b/main/java/shjh/jhzj7/fi/fi/plugin/form/TextFieldDemo.java index 700c01d..7634b53 100644 --- a/main/java/shjh/jhzj7/fi/fi/plugin/form/TextFieldDemo.java +++ b/main/java/shjh/jhzj7/fi/fi/plugin/form/TextFieldDemo.java @@ -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); +// } +// } +// } //赋值结算方式