|
|
@@ -85,6 +85,26 @@ type SetLimitFormData = SetLimitRequest;
|
|
|
type AdjustLimitFormData = AdjustLimitRequest;
|
|
|
type CheckoutFormData = CheckoutRequest;
|
|
|
|
|
|
+// 变更类型转换为中文
|
|
|
+const getChangeTypeText = (changeType: string): string => {
|
|
|
+ switch (changeType) {
|
|
|
+ case 'SET_LIMIT':
|
|
|
+ return '设置额度';
|
|
|
+ case 'PAYMENT':
|
|
|
+ return '支付扣减';
|
|
|
+ case 'CHECKOUT':
|
|
|
+ return '结账恢复';
|
|
|
+ case 'CANCEL_ORDER':
|
|
|
+ return '取消订单恢复';
|
|
|
+ case 'REFUND':
|
|
|
+ return '退款恢复';
|
|
|
+ case 'ADJUST':
|
|
|
+ return '调整额度';
|
|
|
+ default:
|
|
|
+ return changeType;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
export const CreditBalanceDialog: React.FC<CreditBalanceDialogProps> = ({
|
|
|
userId,
|
|
|
userName = '用户',
|
|
|
@@ -871,7 +891,7 @@ export const CreditBalanceDialog: React.FC<CreditBalanceDialogProps> = ({
|
|
|
</TableCell>
|
|
|
<TableCell>
|
|
|
<Badge variant="outline">
|
|
|
- {log.changeType}
|
|
|
+ {getChangeTypeText(log.changeType)}
|
|
|
</Badge>
|
|
|
</TableCell>
|
|
|
<TableCell className={log.changeAmount >= 0 ? 'text-green-600' : 'text-red-600'}>
|