This commit is contained in:
@@ -19,7 +19,12 @@ export const WITHDRAWAL_STATUS_OPTIONS = [
|
||||
{ label: '待审核', value: WithdrawalStatus.PENDING, type: 'warning' as const },
|
||||
{ label: '已通过', value: WithdrawalStatus.APPROVED, type: 'success' as const },
|
||||
{ label: '已拒绝', value: WithdrawalStatus.REJECTED, type: 'danger' as const },
|
||||
{ label: '已到账', value: WithdrawalStatus.COMPLETED, type: 'success' as const }
|
||||
{ label: '已到账', value: WithdrawalStatus.COMPLETED, type: 'success' as const },
|
||||
{
|
||||
label: '审批提交失败',
|
||||
value: WithdrawalStatus.APPROVAL_SUBMISSION_FAILED,
|
||||
type: 'danger' as const
|
||||
}
|
||||
]
|
||||
|
||||
// 支付方式选项
|
||||
@@ -36,9 +41,22 @@ export const WithdrawalStatusMap = {
|
||||
1: { label: '待审核', type: 'warning' as const, color: '#E6A23C' },
|
||||
2: { label: '已通过', type: 'success' as const, color: '#67C23A' },
|
||||
3: { label: '已拒绝', type: 'danger' as const, color: '#F56C6C' },
|
||||
4: { label: '已到账', type: 'success' as const, color: '#67C23A' }
|
||||
4: { label: '已到账', type: 'success' as const, color: '#67C23A' },
|
||||
5: { label: '审批提交失败', type: 'danger' as const, color: '#F56C6C' }
|
||||
}
|
||||
|
||||
export const WITHDRAWAL_QUALIFICATION_APPROVAL_FAILED = 4
|
||||
export const WITHDRAWAL_QUALIFICATION_STATUS_OPTIONS = [
|
||||
{ label: '待审批', value: 0 },
|
||||
{ label: '已通过', value: 1 },
|
||||
{ label: '已驳回', value: 2 },
|
||||
{ label: '已作废', value: 3 },
|
||||
{ label: '审批提交失败', value: WITHDRAWAL_QUALIFICATION_APPROVAL_FAILED }
|
||||
]
|
||||
|
||||
export const canResubmitWithdrawal = (status: number): boolean =>
|
||||
status === WithdrawalStatus.REJECTED || status === WithdrawalStatus.APPROVAL_SUBMISSION_FAILED
|
||||
|
||||
// ========== 佣金状态映射 ==========
|
||||
|
||||
// 佣金状态映射 (1:已冻结, 2:解冻中, 3:已发放, 4:已失效, 99:待人工修正)
|
||||
@@ -134,10 +152,7 @@ export const COMMISSION_RECORD_STATUS_OPTIONS = [
|
||||
]
|
||||
|
||||
// 是否回溯明细行(source 与 status 双判断,兼容未返回 source 的响应)
|
||||
export function isCommissionClawbackRecord(record: {
|
||||
source?: string
|
||||
status?: number
|
||||
}): boolean {
|
||||
export function isCommissionClawbackRecord(record: { source?: string; status?: number }): boolean {
|
||||
return record.source === 'clawback' || record.status === CommissionStatus.CLAWBACK
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user