feat: 添加订单状态(10)为部分退款

This commit is contained in:
2025-10-30 14:39:51 +08:00
parent 3c664413b9
commit 7ab9d15761
10 changed files with 89 additions and 42 deletions
@@ -28,8 +28,9 @@ const RefundReviewModal: React.FC<RefundReviewModalProps> = ({
// 审核结果选项
const reviewResults = [
{ label: '审核通过', value: 1 },
{ label: '审核拒绝', value: 2 },
{ label: '部分退款', value: 3 },
{ label: '全额退款', value: 1 },
{ label: '拒绝退款', value: 2 },
];
// 格式化金额(分转元)
@@ -63,6 +64,7 @@ const RefundReviewModal: React.FC<RefundReviewModalProps> = ({
0: { text: '审核中', bgColor: '#fff7e6', textColor: '#d46b08' }, // orange
1: { text: '审核通过', bgColor: '#f6ffed', textColor: '#52c41a' }, // lime
2: { text: '审核失败', bgColor: '#fff1f0', textColor: '#f5222d' }, // red
3: { text: '部分退款', bgColor: '#EE82EE', textColor: '#EE82EE' }, // Violet
};
return statusMap[state] || { text: '未知状态', bgColor: '#f5f5f5', textColor: '#666' };
};
@@ -341,8 +343,8 @@ const RefundReviewModal: React.FC<RefundReviewModalProps> = ({
<Form form={form} layout="vertical">
<Form.Item
name="reviewResult"
label="审核结果"
rules={[{ required: true, message: '请选择审核结果' }]}
label="退款类型"
rules={[{ required: true, message: '请选择退款类型' }]}
>
<Select placeholder="请选择" options={reviewResults} />
</Form.Item>
@@ -15,8 +15,9 @@ export const ORDER_STATUS_OPTIONS: { label: string; value: number; color?: strin
{ label: '素材上传中', value: 5, color: 'geekblue' },
{ label: '素材上传完成', value: 6, color: 'green' },
{ label: '退款中', value: 7, color: 'orange' },
{ label: '退款成功', value: 8, color: 'lime' },
{ label: '退款失败', value: 9, color: 'red' },
{ label: '全额退款', value: 8, color: 'lime' },
{ label: '拒绝退款', value: 9, color: 'red' },
{ label: '部分退款', value: 10, color: 'plum' },
];
export const findLabel = (arr: { label: string; value: number }[], v?: number) => arr.find(o => o.value === v)?.label || '未知';