|
@@ -0,0 +1,158 @@
|
|
1
|
+import React, { useState, useEffect } from 'react';
|
|
2
|
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker, notification } from 'antd';
|
|
3
|
+import router from 'umi/router';
|
|
4
|
+import moment from 'moment';
|
|
5
|
+import AuthButton from '@/components/AuthButton';
|
|
6
|
+import withActions from '@/components/ActionList';
|
|
7
|
+import EditIcon from '@/components/EditIcon';
|
|
8
|
+import Navigate from '@/components/Navigate';
|
|
9
|
+import styles from '../../style/GoodsList.less';
|
|
10
|
+import SelectCity from '../../../components/SelectButton/CitySelect'
|
|
11
|
+import BuildSelect from '@/components/SelectButton/BuildSelect'
|
|
12
|
+import ChannelSelect from '@/components/SelectButton/channelSelect'
|
|
13
|
+import apis from '../../../services/apis';
|
|
14
|
+import request from '../../../utils/request';
|
|
15
|
+
|
|
16
|
+// import RaiseHelpDoc from '../edit/components/RaiseHelpDoc';
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+const header = props => {
|
|
21
|
+ const [data, setData] = useState()
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+ // 查询列表
|
|
25
|
+ // const getList = params => {
|
|
26
|
+ // request({ ...apis.taEcontract.listContractTemplate, params: { ...params } }).then(data => {
|
|
27
|
+ // console.log(data)
|
|
28
|
+ // setData(data)
|
|
29
|
+ // })
|
|
30
|
+ // }
|
|
31
|
+
|
|
32
|
+ // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
33
|
+ // useEffect(() => {
|
|
34
|
+ // getList({ pageNum: 1, pageSize: 10 });
|
|
35
|
+ // }, [])
|
|
36
|
+
|
|
37
|
+ // const toAdd = rowData => () => {
|
|
38
|
+ // router.push({
|
|
39
|
+ // pathname: '/eContract/template/add',
|
|
40
|
+ // });
|
|
41
|
+ // }
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+ /**
|
|
46
|
+ *
|
|
47
|
+ *
|
|
48
|
+ * @param {*} props
|
|
49
|
+ * @returns
|
|
50
|
+ */
|
|
51
|
+ // const columns = [
|
|
52
|
+ // {
|
|
53
|
+ // title: '合同标题',
|
|
54
|
+ // dataIndex: 'contractTemplateName',
|
|
55
|
+ // key: 'contractTemplateName',
|
|
56
|
+ // align: 'center',
|
|
57
|
+ // render: (x, row) => <Navigate onClick={toDetail(row)}>{row.contractTemplateName}</Navigate>,
|
|
58
|
+ // },
|
|
59
|
+ // {
|
|
60
|
+ // title: '新增时间',
|
|
61
|
+ // dataIndex: 'createDate',
|
|
62
|
+ // key: 'createDate',
|
|
63
|
+ // align: 'center',
|
|
64
|
+ // render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
|
|
65
|
+ // },
|
|
66
|
+ // {
|
|
67
|
+ // title: '操作',
|
|
68
|
+ // dataIndex: '',
|
|
69
|
+ // key: '',
|
|
70
|
+ // align: 'center',
|
|
71
|
+ // render: withActions((text, record) => [(
|
|
72
|
+ // <AuthButton name="admin.eContractTemplate.detail.get" noRight={null}>
|
|
73
|
+ // <EditIcon type="look" text="查看详情" onClick={toDetail(record)}></EditIcon>
|
|
74
|
+ // </AuthButton>
|
|
75
|
+ // ),])
|
|
76
|
+ // },
|
|
77
|
+ // ];
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+ // const changePageNum = pageNumber => {
|
|
81
|
+ // getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
|
|
82
|
+ // }
|
|
83
|
+
|
|
84
|
+ // const rowSelection = {
|
|
85
|
+ // onChange: (selectedRowKeys, selectedRows) => {
|
|
86
|
+ // console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
|
|
87
|
+ // setContractList(selectedRows)
|
|
88
|
+ // },
|
|
89
|
+ // };
|
|
90
|
+
|
|
91
|
+ // // 提交事件
|
|
92
|
+ // const handleSubmit = e => {
|
|
93
|
+ // e.preventDefault();
|
|
94
|
+ // props.form.validateFields((err, values) => {
|
|
95
|
+ // if (!err) {
|
|
96
|
+ // getList({ pageNum: 1, pageSize: 10, ...values })
|
|
97
|
+ // }
|
|
98
|
+ // });
|
|
99
|
+ // }
|
|
100
|
+
|
|
101
|
+ // // 重置搜索
|
|
102
|
+ function handleReset() {
|
|
103
|
+ props.form.resetFields();
|
|
104
|
+ // setTime('')
|
|
105
|
+ // getList({ pageNum: 1, pageSize: 10 })
|
|
106
|
+ }
|
|
107
|
+
|
|
108
|
+ const { getFieldDecorator } = props.form
|
|
109
|
+ return (
|
|
110
|
+
|
|
111
|
+ <>
|
|
112
|
+ <div>234</div>
|
|
113
|
+ <Form layout="inline" onSubmit={e => handleSubmit(e)}>
|
|
114
|
+ <Form.Item>
|
|
115
|
+ {getFieldDecorator('qrcodetype')(
|
|
116
|
+ <Input
|
|
117
|
+ placeholder="二维码类型"
|
|
118
|
+ />,
|
|
119
|
+ )}
|
|
120
|
+ </Form.Item>
|
|
121
|
+ <Form.Item>
|
|
122
|
+ {getFieldDecorator('qrcodename')(
|
|
123
|
+ <Input
|
|
124
|
+ placeholder="二维码内容"
|
|
125
|
+ />,
|
|
126
|
+ )}
|
|
127
|
+ </Form.Item>
|
|
128
|
+ <Form.Item>
|
|
129
|
+ {getFieldDecorator('channe')(
|
|
130
|
+ <ChannelSelect all />,
|
|
131
|
+ )}
|
|
132
|
+ </Form.Item>
|
|
133
|
+ <Form.Item>
|
|
134
|
+ {getFieldDecorator('build')(
|
|
135
|
+ <BuildSelect />,
|
|
136
|
+ )}
|
|
137
|
+ </Form.Item>
|
|
138
|
+ <Form.Item>
|
|
139
|
+ <Button type="primary" htmlType="submit" className={styles.searchBtn}>搜索</Button>
|
|
140
|
+ <Button style={{ marginLeft: 8 }} onClick={handleReset}>重置</Button>
|
|
141
|
+ </Form.Item>
|
|
142
|
+ </Form>
|
|
143
|
+
|
|
144
|
+ <Button type="danger" >新增</Button>
|
|
145
|
+
|
|
146
|
+ <Button type="primary" style={{ marginLeft: '30px' }}>删除</Button>
|
|
147
|
+
|
|
148
|
+ {/* <Table rowSelection={rowSelection}
|
|
149
|
+ dataSource={data.records} columns={columns} pagination={false} rowKey={r => r.contractTemplateId} />
|
|
150
|
+ <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
|
|
151
|
+ <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current}/>
|
|
152
|
+ </div> */}
|
|
153
|
+ </>
|
|
154
|
+ )
|
|
155
|
+}
|
|
156
|
+const WrappedHeader = Form.create({ name: 'header' })(header);
|
|
157
|
+
|
|
158
|
+export default WrappedHeader
|