收入/支出财务确认单超链接点击为编码时取消原逻辑 跳转至自定义页面

This commit is contained in:
zhangzhiguo 2025-07-16 15:29:35 +08:00
parent e115fd8cd4
commit 411b1619a8
2 changed files with 36 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.permission.PermissionServiceHelper;
import kd.bos.servicehelper.user.UserServiceHelper;
import kd.sdk.plugin.Plugin;
import kd.ssc.task.formplugin.util.VoucherUtil;
import java.util.ArrayList;
import java.util.List;
@ -39,6 +40,10 @@ public class InContractFinaceConfirmeListPlugin extends AbstractListPlugin imple
// 超链接点击为编码时取消原逻辑 跳转至自定义页面
showOutContractSettleForm();
args.setCancel(true);
}if ("zcgj_voucherbillno".equals(fieldName)) {//查看凭证
// 超链接点击为编码时取消原逻辑 跳转至自定义页面
viewVoucher();
args.setCancel(true);
}
}
@ -59,6 +64,19 @@ public class InContractFinaceConfirmeListPlugin extends AbstractListPlugin imple
}
}
private void viewVoucher() {
BillList billList = this.getView().getControl(AbstractListPlugin.BILLLISTID);
// 获取表单选中行
ListSelectedRowCollection selectedRows = billList.getSelectedRows();
if(selectedRows.size() !=1 ){
this.getView().showTipNotification("请选择一条数据。");
}else{
Object[] primaryKeyValues = selectedRows.getPrimaryKeyValues();
VoucherUtil.viewVoucher(String.valueOf(primaryKeyValues[0]), this.getView(), true);
}
}
//列表F7 所属组织增加过滤
@Override
public void filterContainerBeforeF7Select(BeforeFilterF7SelectEvent args) {

View File

@ -31,6 +31,7 @@ import kd.bos.servicehelper.user.UserServiceHelper;
import kd.ec.contract.common.enums.DirectionEnum;
import kd.ec.contract.common.enums.PayDirectionEnum;
import kd.sdk.plugin.Plugin;
import kd.ssc.task.formplugin.util.VoucherUtil;
import java.math.BigDecimal;
import java.util.*;
@ -48,6 +49,10 @@ public class OutContractFinaceConfirmeListPlugin extends AbstractListPlugin impl
// 超链接点击为编码时取消原逻辑 跳转至自定义页面
showOutContractSettleForm();
args.setCancel(true);
}if ("zcgj_voucherbillno".equals(fieldName)) {//查看凭证
// 超链接点击为编码时取消原逻辑 跳转至自定义页面
viewVoucher();
args.setCancel(true);
}
}
@ -68,6 +73,19 @@ public class OutContractFinaceConfirmeListPlugin extends AbstractListPlugin impl
}
}
private void viewVoucher() {
BillList billList = this.getView().getControl(AbstractListPlugin.BILLLISTID);
// 获取表单选中行
ListSelectedRowCollection selectedRows = billList.getSelectedRows();
if(selectedRows.size() !=1 ){
this.getView().showTipNotification("请选择一条数据。");
}else{
Object[] primaryKeyValues = selectedRows.getPrimaryKeyValues();
VoucherUtil.viewVoucher(String.valueOf(primaryKeyValues[0]), this.getView(), true);
}
}
//列表F7 所属组织增加过滤
@Override
public void filterContainerBeforeF7Select(BeforeFilterF7SelectEvent args) {