feat: userinfo pay order after handle
parent
8e0790a219
commit
e390968b50
|
@ -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 (
|
||||
<Table
|
||||
scroll={{ x: 1500 }}
|
||||
dataSource={userInfo!.Order}
|
||||
columns={[
|
||||
{
|
||||
title: '订单号',
|
||||
dataIndex: 'orderNo',
|
||||
align: 'center',
|
||||
fixed: 'left',
|
||||
width: 230,
|
||||
render: (_, record: Order.OrderItem) => {
|
||||
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 (
|
||||
<div className="flex items-center justify-center">
|
||||
<div className="w-[10px] h-[10px] mr-2" style={{ background: color }}></div>
|
||||
{Reflect.get(UxOrderStatus, record.orderStatus)}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
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 (
|
||||
<div className="flex items-center justify-center">
|
||||
<div className="w-[10px] h-[10px] mr-2" style={{ background: color }}></div>
|
||||
{Reflect.get(UxOrderStatus, record.orderStatus)}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
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 '';
|
||||
},
|
||||
},
|
||||
]}
|
||||
></Table>
|
||||
);
|
||||
|
@ -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',
|
||||
|
|
|
@ -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 }[];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue