From 28232e62a7118d98425b066f5f87a406b0bc719f Mon Sep 17 00:00:00 2001 From: wwwwwwwww <526125649@qq.com> Date: Thu, 11 Jun 2026 14:14:58 +0800 Subject: [PATCH] 1 --- .../src/pages/AdminPaymentStats.tsx | 275 ++++++++---------- 1 file changed, 124 insertions(+), 151 deletions(-) diff --git a/video-gen-admin/src/pages/AdminPaymentStats.tsx b/video-gen-admin/src/pages/AdminPaymentStats.tsx index ffbea5df..ea85bfb4 100644 --- a/video-gen-admin/src/pages/AdminPaymentStats.tsx +++ b/video-gen-admin/src/pages/AdminPaymentStats.tsx @@ -1,7 +1,8 @@ import React, { useEffect, useState } from 'react'; import { - Card, Col, Row, Space, Table, Tag, Typography, Statistic, message, Select, DatePicker, Button + Card, Col, Row, Space, Table, Tag, Typography, Statistic, message, Select, DatePicker, Button, ConfigProvider } from 'antd'; +import zhCN from 'antd/locale/zh_CN'; import { DollarOutlined, CheckCircleOutlined, ClockCircleOutlined, CloseCircleOutlined, ReloadOutlined } from '@ant-design/icons'; @@ -110,162 +111,134 @@ const AdminPaymentStats: React.FC = () => { const monthInfo = stats.month || { count: 0, amount: 0 }; return ( -
- {/* Filters */} - - - - 支付方式: - + +
+ {/* Summary cards */} + + + + } + suffix="元" + valueStyle={{ color: '#10b981', fontWeight: 700 }} + /> + + {stats.today.paidCount} 笔订单 + + - - 状态: - - - - 日期范围: - - - - + + + } + suffix="元" + valueStyle={{ color: '#6366f1', fontWeight: 700 }} + /> + + {monthInfo.paidCount} 笔订单 + + - - {/* Summary cards */} - - - - } - suffix="元" - valueStyle={{ color: '#10b981', fontWeight: 700 }} - /> - - {stats.today.paidCount} 笔订单 - - - - - - } - suffix="元" - valueStyle={{ color: '#6366f1', fontWeight: 700 }} - /> - - {monthInfo.paidCount} 笔订单 - - - - - - } - suffix="笔" - valueStyle={{ color: '#f59e0b', fontWeight: 700 }} - /> - - ¥{pendingInfo.amount.toFixed(2)} 待付 - - - - - - } - suffix="笔" - valueStyle={{ color: '#94a3b8', fontWeight: 700 }} - /> - - ¥{cancelledInfo.amount.toFixed(2)} 已取消 - - - - - - {/* Status breakdown */} - 订单状态分布}> - - {['paid', 'pending', 'cancelled'].map(s => { - const info = stats.byStatus?.[s] || { count: 0, amount: 0 }; - const c = statusConfig[s]; - const pct = totalOrders > 0 ? ((info.count / totalOrders) * 100).toFixed(1) : '0.0'; - return ( - -
- - {c.label} - {pct}% - -
- {info.count} + {/* Status breakdown */} + 订单状态分布}> + + {['paid', 'pending', 'cancelled'].map(s => { + const info = stats.byStatus?.[s] || { count: 0, amount: 0 }; + const c = statusConfig[s]; + const pct = totalOrders > 0 ? ((info.count / totalOrders) * 100).toFixed(1) : '0.0'; + return ( + +
+ + {c.label} + {pct}% + +
+ {info.count} +
+
+ ¥{info.amount.toFixed(2)} +
-
- ¥{info.amount.toFixed(2)} -
-
- - ); - })} - - + + ); + })} + + - {/* Recent orders table */} - 订单列表}> - - - + {/* Recent orders table */} + 订单列表}> + {/* Filters */} + + + 支付方式: + + + + 状态: + + + + 日期范围: + + + + + + + +
+ + + ); };