const columns: any = [
...baseColumns,
{
title: '操作',
width: 230,
dataIndex: 'ACTION',
align: 'center',
fixed: 'right',
actions: ({ record }) => [
{
label: '通过',
auth: 'sys.user.delete',
popConfirm: {
title: '你确定要删除吗?',
onConfirm: async () => {
await prcessWithdrawal({
id: record.id,
audit_status: 1,
});
dynamicTableInstance?.reload();
},
},
},
{
label: '不通过',
auth: 'sys.user.delete',
popConfirm: {
title: '你确定要删除吗?',
onConfirm: async () => {
await prcessWithdrawal({
id: record.id,
audit_status: 2,
});
dynamicTableInstance?.reload();
},
},
},
],
},
{
title: '操作',
width: 230,
fixed: 'right',
align: 'center',
customRender: ({ record }: { record: any }) => {
if (record.audit_status === null) {
return h('div', [
h(
Button,
{
onClick: async () => {
Modal.confirm({
title: '你确定通过该申请吗?',
onOk: async () => {
await prcessWithdrawal({
id: record.id,
audit_status: 1,
});
dynamicTableInstance?.reload();
},
});
},
},
'通过',
),
h(
Button,
{
onClick: async () => {
Modal.confirm({
title: '你确定不通过该申请吗?',
onOk: async () => {
await prcessWithdrawal({
id: record.id,
audit_status: 2,
});
dynamicTableInstance?.reload();
},
});
},
},
'不通过',
),
]);
}
},
},
];
正文完