This commit is contained in:
@@ -19,6 +19,11 @@ export const buildAgentRechargeActions = (
|
||||
options: BuildAgentRechargeActionsOptions
|
||||
): AgentRechargeAction[] => {
|
||||
const actions: AgentRechargeAction[] = []
|
||||
const hasApprovalRecord =
|
||||
row.approval_provider === 'wecom' ||
|
||||
row.approval_source === 'wecom' ||
|
||||
row.approval_source === 'legacy' ||
|
||||
(row.approval_instance_id !== undefined && row.approval_instance_id !== null)
|
||||
|
||||
if (
|
||||
row.payment_method === 'offline' &&
|
||||
@@ -33,6 +38,7 @@ export const buildAgentRechargeActions = (
|
||||
}
|
||||
|
||||
if (
|
||||
!hasApprovalRecord &&
|
||||
row.status === AgentRechargeStatus.PENDING &&
|
||||
row.payment_method === 'offline' &&
|
||||
options.hasAuth('agent_recharge:confirm_payment')
|
||||
@@ -44,7 +50,11 @@ export const buildAgentRechargeActions = (
|
||||
})
|
||||
}
|
||||
|
||||
if (row.status === AgentRechargeStatus.PENDING && options.hasAuth('agent_recharge:reject')) {
|
||||
if (
|
||||
!hasApprovalRecord &&
|
||||
row.status === AgentRechargeStatus.PENDING &&
|
||||
options.hasAuth('agent_recharge:reject')
|
||||
) {
|
||||
actions.push({
|
||||
label: '拒绝',
|
||||
handler: () => options.onReject(row),
|
||||
|
||||
Reference in New Issue
Block a user