|
@@ -1,8 +1,138 @@
|
1
|
|
-import React from 'react';
|
|
1
|
+import React, { useRef, useState } from 'react';
|
|
2
|
+import moment from 'moment';
|
|
3
|
+import { Button, Modal, Form, Input } from 'antd';
|
2
|
4
|
import { PageHeaderWrapper } from '@ant-design/pro-layout';
|
|
5
|
+import PageTable from '@/components/PageTable'
|
|
6
|
+import BanjiSearch from '@/components/BanjiSearch';
|
|
7
|
+import { getInvoiceDetailHistoryList } from '@/services/invoiceDetail'
|
3
|
8
|
|
4
|
9
|
export default (props) => {
|
|
10
|
+ const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };
|
|
11
|
+ const [form] = Form.useForm();
|
|
12
|
+ const FormItem = Form.Item;
|
|
13
|
+ const [editModal, setEditModal] = useState(false);
|
|
14
|
+ const actionRef = useRef();
|
|
15
|
+
|
|
16
|
+ const handelModel = (val) => {
|
|
17
|
+ form.setFieldsValue(val);
|
|
18
|
+ setEditModal(true);
|
|
19
|
+ };
|
|
20
|
+
|
|
21
|
+ const onCancel = () => {
|
|
22
|
+ form.resetFields();
|
|
23
|
+ setEditModal(false);
|
|
24
|
+ };
|
|
25
|
+
|
|
26
|
+ const columns = [
|
|
27
|
+ {
|
|
28
|
+ title: '班次名称',
|
|
29
|
+ dataIndex: 'invoiceId',
|
|
30
|
+ key: 'invoiceId',
|
|
31
|
+ search: true,
|
|
32
|
+ hideInTable: true,
|
|
33
|
+ renderFormItem: () => (
|
|
34
|
+ <BanjiSearch placeholder='请输入班次名称' />
|
|
35
|
+ ),
|
|
36
|
+ formItemProps: {
|
|
37
|
+ rules: [
|
|
38
|
+ {
|
|
39
|
+ required: true,
|
|
40
|
+ message: '请输入班次名称',
|
|
41
|
+ }
|
|
42
|
+ ],
|
|
43
|
+ }
|
|
44
|
+ },
|
|
45
|
+ {
|
|
46
|
+ title: '开票单位',
|
|
47
|
+ dataIndex: 'orgName',
|
|
48
|
+ key: 'orgName',
|
|
49
|
+ search: false,
|
|
50
|
+ },
|
|
51
|
+ {
|
|
52
|
+ title: '人员姓名',
|
|
53
|
+ dataIndex: 'personName',
|
|
54
|
+ key: 'personName',
|
|
55
|
+ search: true,
|
|
56
|
+ },
|
|
57
|
+ {
|
|
58
|
+ title: '提交时间',
|
|
59
|
+ dataIndex: 'createDate',
|
|
60
|
+ key: 'createDate',
|
|
61
|
+ render: (t) => t ? moment(t).format('YYYY-MM-DD HH:mm') : '-',
|
|
62
|
+ search: false
|
|
63
|
+ },
|
|
64
|
+ {
|
|
65
|
+ title: '操作',
|
|
66
|
+ valueType: 'option',
|
|
67
|
+ key: 'option',
|
|
68
|
+ ellipsis: true,
|
|
69
|
+ render: (_, record) => [
|
|
70
|
+ <Button style={{ padding: 0 }} type="link" key={1} onClick={() => handelModel(record)}>
|
|
71
|
+ 详情
|
|
72
|
+ </Button>
|
|
73
|
+ ]
|
|
74
|
+ },
|
|
75
|
+ ]
|
5
|
76
|
return (
|
6
|
|
- <PageHeaderWrapper></PageHeaderWrapper>
|
|
77
|
+ <PageHeaderWrapper>
|
|
78
|
+ <PageTable
|
|
79
|
+ request={getInvoiceDetailHistoryList}
|
|
80
|
+ columns={columns}
|
|
81
|
+ options={false}
|
|
82
|
+ onCancel={onCancel}
|
|
83
|
+ actionRef={actionRef}
|
|
84
|
+ manualRequest={true}
|
|
85
|
+ form={{ ignoreRules: false }}
|
|
86
|
+ />
|
|
87
|
+ <Modal
|
|
88
|
+ forceRender
|
|
89
|
+ title='历史详情'
|
|
90
|
+ visible={editModal}
|
|
91
|
+ keyboard={false}
|
|
92
|
+ maskClosable={false}
|
|
93
|
+ destroyOnClose={true}
|
|
94
|
+ onCancel={onCancel}
|
|
95
|
+ footer={null}
|
|
96
|
+ >
|
|
97
|
+ <Form {...formItemLayout} form={form}>
|
|
98
|
+ <FormItem label="开票单位" name="orgName">
|
|
99
|
+ <Input bordered={false} disabled={false} />
|
|
100
|
+ </FormItem>
|
|
101
|
+ <FormItem label="纳税号" name="taxNo">
|
|
102
|
+ <Input bordered={false} disabled={false} />
|
|
103
|
+ </FormItem>
|
|
104
|
+ <FormItem label="单位地址" name="address">
|
|
105
|
+ <Input bordered={false} disabled={false} />
|
|
106
|
+ </FormItem>
|
|
107
|
+ <FormItem label="单位电话" name="phone">
|
|
108
|
+ <Input bordered={false} disabled={false} />
|
|
109
|
+ </FormItem>
|
|
110
|
+ <FormItem label="开户银行" name="bankName">
|
|
111
|
+ <Input bordered={false} disabled={false} />
|
|
112
|
+ </FormItem>
|
|
113
|
+ <FormItem label="是否合开" name="mergeRemark">
|
|
114
|
+ <Input bordered={false} disabled={false} />
|
|
115
|
+ </FormItem>
|
|
116
|
+ <FormItem label="收件人姓名" name="mailUser">
|
|
117
|
+ <Input bordered={false} disabled={false} />
|
|
118
|
+ </FormItem>
|
|
119
|
+ <FormItem label="收件人电话" name="mailPhone">
|
|
120
|
+ <Input bordered={false} disabled={false} />
|
|
121
|
+ </FormItem>
|
|
122
|
+ <FormItem label="收件人地址" name="mailAddress">
|
|
123
|
+ <Input bordered={false} disabled={false} />
|
|
124
|
+ </FormItem>
|
|
125
|
+ <FormItem label=" " colon={false}>
|
|
126
|
+ <Button
|
|
127
|
+ type="primary"
|
|
128
|
+ onClick={onCancel}
|
|
129
|
+ style={{ marginLeft: '20em' }}
|
|
130
|
+ >
|
|
131
|
+ 关闭
|
|
132
|
+ </Button>
|
|
133
|
+ </FormItem>
|
|
134
|
+ </Form>
|
|
135
|
+ </Modal>
|
|
136
|
+ </PageHeaderWrapper>
|
7
|
137
|
)
|
8
|
138
|
}
|