|
@@ -13,34 +13,24 @@ import kd.sdk.plugin.Plugin;
|
|
|
public class BusinessProcessingEditPlugin extends AbstractListPlugin implements Plugin {
|
|
|
public static String btn_NOTICE = "fkf"; //操作
|
|
|
public static String btn_NOTICES = "skf"; //操作
|
|
|
- public static String nckd_agentparameterf7 = "nckd_agentparameterf7";//动因参数动态列表
|
|
|
+ public static String nckd_agentparameterf7 = "nckd_ywclskf";//动态列表
|
|
|
private static String bos_org = "bos_org"; //组织金额标识
|
|
|
|
|
|
@Override
|
|
|
public void afterDoOperation(AfterDoOperationEventArgs e) {
|
|
|
String operateKey = e.getOperateKey();
|
|
|
- if (btn_NOTICE.equals(e.getOperateKey())) { //切换付款方
|
|
|
- Object value = this.getModel().getValue("costcompany");//获取当前单据费用公司
|
|
|
- DynamicObjectCollection expenseentryentityWait = this.getModel().getEntryEntity("expenseentryentity_wait");
|
|
|
- DynamicObject dynamicObject = expenseentryentityWait.get(0);
|
|
|
- DynamicObject entrycostcompanyWait = dynamicObject.getDynamicObject("entrycostcompany_wait");
|
|
|
- if(entrycostcompanyWait==null){
|
|
|
- throw new KDBizException("待摊明细分录为空!");
|
|
|
- }
|
|
|
+ if (btn_NOTICE.equals(e.getOperateKey())) {
|
|
|
+ Object value = this.getModel().getValue("nckd_costcompany");//获取当前单据费用公司
|
|
|
+ DynamicObject entrycostcompanyWait = (DynamicObject)value;
|
|
|
String orgnumber = entrycostcompanyWait.getString("number");//公司编码
|
|
|
String orgid = entrycostcompanyWait.getString("id");//公司id
|
|
|
if (orgnumber == null){
|
|
|
- throw new KDBizException("付费承担公司为空!");
|
|
|
+ throw new KDBizException("费用承担公司为空!");
|
|
|
}
|
|
|
showParameter(nckd_agentparameterf7, btn_NOTICE,orgnumber,orgid);//调用弹出页面
|
|
|
- }else if (btn_NOTICES.equals(e.getOperateKey())) { //切换收款方
|
|
|
- Object value = this.getModel().getValue("costcompany");//获取当前单据费用公司
|
|
|
- DynamicObjectCollection expenseentryentityWait = this.getModel().getEntryEntity("expenseentryentity_wait");
|
|
|
- DynamicObject dynamicObject = expenseentryentityWait.get(0);
|
|
|
- DynamicObject entrycostcompanyWait = dynamicObject.getDynamicObject("entrycostcompany_wait");
|
|
|
- if(entrycostcompanyWait==null){
|
|
|
- throw new KDBizException("待摊明细分录为空!");
|
|
|
- }
|
|
|
+ }else if (btn_NOTICES.equals(e.getOperateKey())) {
|
|
|
+ Object value = this.getModel().getValue("nckd_costcompany");//获取当前单据费用公司
|
|
|
+ DynamicObject entrycostcompanyWait = (DynamicObject)value;
|
|
|
String orgnumber = entrycostcompanyWait.getString("number");//公司编码
|
|
|
String orgid = entrycostcompanyWait.getString("id");//公司id
|
|
|
if (orgnumber == null){
|