HistoryModal.tsx
1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { postServiceOrderQueryHistoryOrderRecord } from '@/services';
import { Button, Modal, Timeline } from 'antd';
export default ({ subOrders, onClose }) => {
let subOrderIds = subOrders?.map((subOrder: any) => {
return subOrder.id;
});
const handleOk = () => {
onClose();
};
const getHistory = async () => {
let res = await postServiceOrderQueryHistoryOrderRecord({
data: { ids: subOrderIds },
});
console.log(res);
};
getHistory();
const handleCancel = () => {
onClose();
};
return (
<>
<Modal
title="订单历史记录"
open
onOk={handleOk}
onCancel={handleCancel}
footer={() => (
<>
<Button onClick={handleCancel}>返回</Button>
</>
)}
>
<Timeline
className="pt-10"
items={[
{
children: 'Create a services site 2015-09-01',
},
{
children: 'Solve initial network problems 2015-09-01',
},
{
children: 'Technical testing 2015-09-01',
},
{
children: 'Network problems being solved 2015-09-01',
},
]}
/>
</Modal>
</>
);
};