Files
GDstarmotion-admin/src/pages/order/components/BonusFormModal.tsx
PC-202306242200\Administrator e1647dcdda 部分修改
2024-09-26 09:37:53 +08:00

86 lines
1.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* @Note:
* @Author: 2058827620@qq.com
* @Date: 2022-04-03 10:53:25
*/
import React, { useState, useEffect } from 'react';
import {
Modal,
Table
} from 'antd';
import { orderList } from '@/services/order';
export default ({ values, modalOpenState, onModalOpenState }) => {
const [config, setConfig] = useState(null);
const [items, setItems] = useState(null);
useEffect(() => {
if (!values?.id) {
return
}
orderList(values?.id).then(({ data }) => {
setItems(data || []);
}).catch(() => {
});
}, [values]);
const columns = [
{
title: 'id',
dataIndex: 'id',
search: false,
},
{
title: '投资人',
dataIndex: 'shop',
search: false,
render: (_, record) => {
return <>
<div>{record?.userName}</div>
<div>{record?.phone}</div>
<div>{record?.level}</div>
</>
},
},
{
title: '类型',
dataIndex: 'typeValue',
search: false,
},
{
title: '金额',
dataIndex: 'points',
search: false,
},
{
title: '创建时间',
dataIndex: 'createTime',
search: false,
},
];
return (
<>
<Modal width="800px" title="分红" open={modalOpenState} onOk={() => {
onModalOpenState(false);
}} onCancel={() => {
onModalOpenState(false)
}}>
<>
<Table
rowKey="id"
columns={columns}
dataSource={items}
pagination={false}
/>
</>
</Modal>
</>
);
};