|
@@ -0,0 +1,169 @@
|
|
1
|
+import React, { useState, useEffect } from 'react';
|
|
2
|
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar } from 'antd';
|
|
3
|
+import moment from 'moment';
|
|
4
|
+import request from '../../../utils/request';
|
|
5
|
+import apis from '../../../services/apis';
|
|
6
|
+import Styles from './style.less';
|
|
7
|
+import BuildSelect from '../../../components/SelectButton/BuildSelect'
|
|
8
|
+import AuthButton from '@/components/AuthButton';
|
|
9
|
+
|
|
10
|
+const columns = [
|
|
11
|
+ {
|
|
12
|
+ title: '头像',
|
|
13
|
+ dataIndex: 'picture',
|
|
14
|
+ key: 'picture',
|
|
15
|
+ align: 'center',
|
|
16
|
+ width: '15%',
|
|
17
|
+ render: (_, record) => <Avatar shape="square" size={64} icon="user" />,
|
|
18
|
+ },
|
|
19
|
+ {
|
|
20
|
+ title: '姓名',
|
|
21
|
+ dataIndex: 'name',
|
|
22
|
+ key: 'name',
|
|
23
|
+ align: 'center',
|
|
24
|
+ width: '10%',
|
|
25
|
+ // eslint-disable-next-line no-nested-ternary
|
|
26
|
+ // render: (_, record) => <><span>{customerType === 'private' ? record.name : record.nickname}</span></>,
|
|
27
|
+ },
|
|
28
|
+ {
|
|
29
|
+ title: '电话',
|
|
30
|
+ dataIndex: 'phone',
|
|
31
|
+ key: 'phone',
|
|
32
|
+ align: 'center',
|
|
33
|
+ width: '15%',
|
|
34
|
+ },
|
|
35
|
+ {
|
|
36
|
+ title: '性别',
|
|
37
|
+ dataIndex: 'sex',
|
|
38
|
+ key: 'sex',
|
|
39
|
+ align: 'center',
|
|
40
|
+ width: '15%',
|
|
41
|
+ },
|
|
42
|
+ {
|
|
43
|
+ title: '置业顾问',
|
|
44
|
+ dataIndex: 'asdf',
|
|
45
|
+ key: 'asdf',
|
|
46
|
+ align: 'center',
|
|
47
|
+ width: '15%',
|
|
48
|
+ },
|
|
49
|
+ {
|
|
50
|
+ title: '置业顾问电话',
|
|
51
|
+ dataIndex: 'tel',
|
|
52
|
+ key: 'tel',
|
|
53
|
+ align: 'center',
|
|
54
|
+ width: '15%',
|
|
55
|
+ },
|
|
56
|
+ {
|
|
57
|
+ title: '到访时间',
|
|
58
|
+ dataIndex: 'time',
|
|
59
|
+ key: 'time',
|
|
60
|
+ align: 'center',
|
|
61
|
+ width: '15%',
|
|
62
|
+ },
|
|
63
|
+]
|
|
64
|
+
|
|
65
|
+const data = [
|
|
66
|
+
|
|
67
|
+]
|
|
68
|
+
|
|
69
|
+function onChangetime(dates, dateStrings) {
|
|
70
|
+
|
|
71
|
+ // setEndDate(dateStrings[1])
|
|
72
|
+ // setStartDate(dateStrings[0])
|
|
73
|
+
|
|
74
|
+}
|
|
75
|
+
|
|
76
|
+function exportReport() {
|
|
77
|
+ // request({ ...apis.customer.customerRecommendReportExport, responseType: 'blob' })
|
|
78
|
+ // .then(response => {
|
|
79
|
+ // download(response)
|
|
80
|
+ // })
|
|
81
|
+}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+function body (props) {
|
|
90
|
+ const { getFieldDecorator, getFieldsValue } = props.form
|
|
91
|
+ const { RangePicker } = DatePicker;
|
|
92
|
+
|
|
93
|
+ function handleReset() {
|
|
94
|
+ props.form.resetFields();
|
|
95
|
+ // getList({ pageNumber: 1, pageSize: 10, customerType })
|
|
96
|
+ }
|
|
97
|
+
|
|
98
|
+ function handleSubmit(e) {
|
|
99
|
+
|
|
100
|
+ }
|
|
101
|
+
|
|
102
|
+ // 分页
|
|
103
|
+ function onChange(pageNum) {
|
|
104
|
+
|
|
105
|
+ // getList({ pageNumber: pageNum, pageSize: 9 })
|
|
106
|
+ }
|
|
107
|
+
|
|
108
|
+ return (
|
|
109
|
+ <>
|
|
110
|
+ <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
|
|
111
|
+ <Form.Item>
|
|
112
|
+ {getFieldDecorator('buildingId')(
|
|
113
|
+ <BuildSelect />,
|
|
114
|
+ )}
|
|
115
|
+ </Form.Item>
|
|
116
|
+
|
|
117
|
+ <Form.Item>
|
|
118
|
+ {getFieldDecorator('name')(
|
|
119
|
+ <Input
|
|
120
|
+ prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
|
|
121
|
+ placeholder="姓名"
|
|
122
|
+ />,
|
|
123
|
+ )}
|
|
124
|
+ </Form.Item>
|
|
125
|
+ <Form.Item>
|
|
126
|
+ {getFieldDecorator('tel')(
|
|
127
|
+ <Input
|
|
128
|
+ prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
|
|
129
|
+ placeholder="电话"
|
|
130
|
+ />,
|
|
131
|
+ )}
|
|
132
|
+ </Form.Item>
|
|
133
|
+
|
|
134
|
+ <Form.Item label="到访时间">
|
|
135
|
+ { getFieldDecorator('time')(
|
|
136
|
+ <RangePicker
|
|
137
|
+ style={{ width: '400px' }}
|
|
138
|
+ // placeholder="到访时间"
|
|
139
|
+ // ranges={{
|
|
140
|
+ // Today: [moment(), moment()],
|
|
141
|
+ // 'This Month': [moment().startOf('month'), moment().endOf('month')],
|
|
142
|
+ // }}
|
|
143
|
+ // defaultValue={[moment(new Date(new Date().setDate((new Date().getDate() - 6))), 'YYYY-MM-DD HH:MM:SS'), moment(new Date(), 'YYYY-MM-DD HH:MM:SS')]}
|
|
144
|
+ showTime
|
|
145
|
+ onChange={onChangetime}
|
|
146
|
+ />
|
|
147
|
+ )}
|
|
148
|
+ </Form.Item>
|
|
149
|
+ <Form.Item>
|
|
150
|
+ <Button type="primary" htmlType="submit" >
|
|
151
|
+ 查询
|
|
152
|
+ </Button>
|
|
153
|
+ <Button style={{ marginLeft: 8 }} onClick={handleReset}>
|
|
154
|
+ 重置
|
|
155
|
+ </Button>
|
|
156
|
+ </Form.Item>
|
|
157
|
+ </Form>
|
|
158
|
+ <Button type="primary" onClick={() => exportReport()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
|
|
159
|
+ 导出
|
|
160
|
+ </Button>
|
|
161
|
+
|
|
162
|
+ <Table dataSource={data} columns={columns} pagination={{ total: 1, onChange }} />
|
|
163
|
+ {/* pagination={{ total: dataSource.total, onChange }} */}
|
|
164
|
+ </>
|
|
165
|
+ );
|
|
166
|
+}
|
|
167
|
+const WrappedBody = Form.create({ name: 'body' })(body);
|
|
168
|
+
|
|
169
|
+export default WrappedBody
|