Initial commit: One Pipe System
完整的管理系统,包含账户管理、卡片管理、套餐管理、财务管理等功能模块。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
60
src/config/constants/commission.ts
Normal file
60
src/config/constants/commission.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* 佣金相关配置
|
||||
*/
|
||||
|
||||
import { CommissionStatus, WithdrawalStatus } from '@/types/api'
|
||||
|
||||
// 佣金状态选项
|
||||
export const COMMISSION_STATUS_OPTIONS = [
|
||||
{ label: '待结算', value: CommissionStatus.PENDING, type: 'warning' as const },
|
||||
{ label: '已结算', value: CommissionStatus.SETTLED, type: 'success' as const },
|
||||
{ label: '已提现', value: CommissionStatus.WITHDRAWN, type: 'info' as const },
|
||||
{ label: '冻结', value: CommissionStatus.FROZEN, type: 'danger' as const }
|
||||
]
|
||||
|
||||
// 提现状态选项
|
||||
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.PROCESSING, type: 'primary' as const },
|
||||
{ label: '已完成', value: WithdrawalStatus.COMPLETED, type: 'success' as const },
|
||||
{ label: '失败', value: WithdrawalStatus.FAILED, type: 'danger' as const }
|
||||
]
|
||||
|
||||
// 支付方式选项
|
||||
export const PAYMENT_METHOD_OPTIONS = [
|
||||
{ label: '银行转账', value: 'bank', icon: 'bank' },
|
||||
{ label: '支付宝', value: 'alipay', icon: 'alipay' },
|
||||
{ label: '微信', value: 'wechat', icon: 'wechat' }
|
||||
]
|
||||
|
||||
// 获取佣金状态标签
|
||||
export function getCommissionStatusLabel(status: CommissionStatus): string {
|
||||
const option = COMMISSION_STATUS_OPTIONS.find((item) => item.value === status)
|
||||
return option?.label || status
|
||||
}
|
||||
|
||||
// 获取佣金状态类型
|
||||
export function getCommissionStatusType(status: CommissionStatus) {
|
||||
const option = COMMISSION_STATUS_OPTIONS.find((item) => item.value === status)
|
||||
return option?.type || 'info'
|
||||
}
|
||||
|
||||
// 获取提现状态标签
|
||||
export function getWithdrawalStatusLabel(status: WithdrawalStatus): string {
|
||||
const option = WITHDRAWAL_STATUS_OPTIONS.find((item) => item.value === status)
|
||||
return option?.label || status
|
||||
}
|
||||
|
||||
// 获取提现状态类型
|
||||
export function getWithdrawalStatusType(status: WithdrawalStatus) {
|
||||
const option = WITHDRAWAL_STATUS_OPTIONS.find((item) => item.value === status)
|
||||
return option?.type || 'info'
|
||||
}
|
||||
|
||||
// 获取支付方式标签
|
||||
export function getPaymentMethodLabel(method: string): string {
|
||||
const option = PAYMENT_METHOD_OPTIONS.find((item) => item.value === method)
|
||||
return option?.label || method
|
||||
}
|
||||
Reference in New Issue
Block a user