diff --git a/src/pages/User/UserDetails.tsx b/src/pages/User/UserDetails.tsx index 827235c..7f31a08 100644 --- a/src/pages/User/UserDetails.tsx +++ b/src/pages/User/UserDetails.tsx @@ -1,5 +1,5 @@ import { getUserByIdAPI } from '@/services/system/user'; -import { OrderPayType, OrderPayTypeStr, UxOrderStatus, UxOrderStatusTag } from '@/utils/const'; +import { OrderPayType, OrderPayTypeStr, OrderStatus, UxOrderStatus, UxOrderStatusTag } from '@/utils/const'; import { formatDateTime } from '@/utils/format'; import { AlipayCircleOutlined, WechatOutlined } from '@ant-design/icons'; import { ActionType } from '@ant-design/pro-components'; @@ -118,12 +118,15 @@ const UserDetailsModal = (props: PropTypes) => { } return ( { if (record.isApply === true) { return record.orderNo + '(试用)'; @@ -132,13 +135,31 @@ const UserDetailsModal = (props: PropTypes) => { }, }, { - title: '第三方订单号', - dataIndex: 'platformOrderStatus', + title: '订单状态', + dataIndex: 'orderStatus', + fixed: 'left', + width: 140, + align: 'center', + render: (_, record: Order.OrderItem) => { + const color = Reflect.get(UxOrderStatusTag, record.orderStatus); + return ( +
+
+ {Reflect.get(UxOrderStatus, record.orderStatus)} +
+ ); + }, + }, + { + title: '支付总金额', + dataIndex: 'totalPrice', + width: 120, align: 'center', }, { title: '支付类型', dataIndex: 'payType', + width: 100, align: 'center', render: (_, record: Order.OrderItem) => { // 支付类型 1. 微信 2. 支付宝 3. paypal -1: 后台创建 @@ -157,33 +178,44 @@ const UserDetailsModal = (props: PropTypes) => { if (record.payType === OrderPayType.PAYPAL) { return Reflect.get(OrderPayTypeStr, OrderPayType.PAYPAL); } - return '后台创建'; + return record.isApply ? '试用' : '-'; }, }, + { + title: '第三方订单号', + dataIndex: 'platformNo', + align: 'center', + }, + { + title: '第三方订单状态', + dataIndex: 'platformOrderStatus', + width: 150, + align: 'center', + }, { title: '套餐', dataIndex: 'goodsName', + width: 80, align: 'center', }, - { - title: '订单状态', - dataIndex: 'orderStatus', - align: 'center', - render: (_, record: Order.OrderItem) => { - const color = Reflect.get(UxOrderStatusTag, record.orderStatus); - return ( -
-
- {Reflect.get(UxOrderStatus, record.orderStatus)} -
- ); - }, - }, { title: '订单创建时间', dataIndex: 'createdDateTime', + width: 200, align: 'center', }, + { + title: '订单完成时间', + dataIndex: 'lastUpdateDateTime', + width: 200, + align: 'center', + render: (_, record: Order.OrderItem) => { + if (record.orderStatus === OrderStatus.HAVE_PAY) { + return record.lastUpdateDateTime; + } + return ''; + }, + }, ]} >
); @@ -208,6 +240,18 @@ const UserDetailsModal = (props: PropTypes) => { return record.size + record.type; }, }, + { + title: '扩容数量', + align: 'center', + dataIndex: 'quantity', + }, + { + title: '扩容总量', + align: 'center', + render: (_, record: User.UserItemByInfo['dilatationLogs'][0]) => { + return record.size * record.quantity + record.type; + }, + }, { title: '扩容时间', dataIndex: 'createDate', diff --git a/src/services/system/user/typing.d.ts b/src/services/system/user/typing.d.ts index 4e50602..a229cb3 100644 --- a/src/services/system/user/typing.d.ts +++ b/src/services/system/user/typing.d.ts @@ -36,6 +36,6 @@ declare namespace User { projectCount: number; projectCount: number; materialsGroup: { _count: number; materialType: string }[]; - dilatationLogs: { id: string; type: string; size: string; desc: string; createDate: string }[]; + dilatationLogs: { id: string; type: string; size: number; desc: string; createDate: string; quantity: number }[]; }; }