周立森 vor 5 Jahren
Ursprung
Commit
82394b1c6d
3 geänderte Dateien mit 325 neuen und 0 gelöschten Zeilen
  1. 5
    0
      config/routes.js
  2. 169
    0
      src/pages/customer/visiting/index.jsx
  3. 151
    0
      src/pages/customer/visiting/style.less

+ 5
- 0
config/routes.js Datei anzeigen

@@ -123,6 +123,11 @@ export default [
123 123
                 name: '经纪人',
124 124
                 component: './customer/independentList/index',
125 125
               },
126
+              {
127
+                path: '/customer/visiting',
128
+                name: '到访记录',
129
+                component: './customer/visiting/index',
130
+              },
126 131
             ],
127 132
           },
128 133
           {

+ 169
- 0
src/pages/customer/visiting/index.jsx Datei anzeigen

@@ -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

+ 151
- 0
src/pages/customer/visiting/style.less Datei anzeigen

@@ -0,0 +1,151 @@
1
+.SubmitButton {
2
+  background: rgba(239,39,58,1);
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.text {
7
+  color: rgba(239,39,58,1);
8
+}
9
+.SelectFrom {
10
+  width: 180px;
11
+  background: #ffffff;
12
+  border-radius: 7px;
13
+  border: 1px solid #dbdbdb;
14
+}
15
+.addButton {
16
+  background: #50be00;
17
+  border-radius: 4px;
18
+  border: 0px;
19
+  margin: 10px 0px;
20
+}
21
+.cardText {
22
+  color: #333;
23
+  display: flex;
24
+  align-items: center;
25
+  position: relative;
26
+  line-height: 1.5;
27
+  font-size: 0.106rem;
28
+  margin-bottom: 0.08rem;
29
+
30
+}
31
+.cardItem{
32
+  color: #666;
33
+  display: flex;
34
+  align-items: center; 
35
+  line-height: 1.5;
36
+  font-size: 0.106rem;
37
+  margin-bottom: 0.08rem; 
38
+}
39
+.ediText {
40
+  font-size: 0.106rem;
41
+  color: #ff925c;
42
+  line-height: 24px;
43
+  position: absolute;
44
+  right: 0;
45
+}
46
+.title{
47
+  display: inline-block;
48
+  width:  0.54rem;
49
+  justify-content: space-between;
50
+  text-align: justify;
51
+  text-align-last:justify
52
+}
53
+
54
+.address { 
55
+  width: 400px;
56
+  height: 24px; 
57
+  text-overflow: ellipsis; 
58
+  white-space: nowrap;
59
+  overflow: hidden;
60
+}
61
+
62
+.pitchButton { 
63
+  border-color: rgba(255,126,72,1);
64
+  background-color: rgba(255,126,72,1);
65
+  color: rgba(255,255,255,1); 
66
+}
67
+.noButton {
68
+  border-color: rgba(255,126,72,1);
69
+  color: rgba(255,126,72,1);
70
+}
71
+.displayS {
72
+  display: none;
73
+}
74
+
75
+
76
+// 客户详情样式
77
+.cardBox{
78
+  display: flex;
79
+  .leftBox{
80
+    width:342px;
81
+    min-width:342px;
82
+    height:511px;
83
+    background:rgba(255,255,255,1);
84
+    box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
85
+    border-radius:8px;
86
+    display: inline-block;
87
+    margin-right: 30px;
88
+    padding: 30px;
89
+    overflow: hidden;
90
+  }
91
+  .rightBox{
92
+    width:-webkit-fill-available;
93
+    height:511px;
94
+    min-width: 800px;
95
+    background:rgba(255,255,255,1);
96
+    box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
97
+    border-radius:8px;
98
+    display: inline-block;
99
+    padding: 30px;
100
+    overflow: hidden;
101
+    position: relative;
102
+  }
103
+  .tit{
104
+    font-size:24px;
105
+    font-weight:600;
106
+    color:#222;
107
+    margin: 10px 0 0 0;
108
+  }
109
+  .touxiang{
110
+    width: 120px;
111
+    width: 120px;
112
+    border-radius: 6px;
113
+    margin: 30px 0 20px 0;
114
+  }
115
+  .infoItem{
116
+    color:#666;
117
+    font-size: 19px;
118
+    margin: 0 0 10px 0;
119
+    
120
+  }
121
+  .rightItem{
122
+    color:#666;
123
+    font-size: 19px;
124
+    margin: 0 0 15px 0;
125
+  }
126
+  .right{
127
+    position: absolute;
128
+    top:108px;
129
+    left:170px;
130
+  }
131
+  .rightInfo{
132
+    position: absolute;
133
+    top:50px;
134
+    left:50%;
135
+  }
136
+  
137
+}
138
+.recordBox{
139
+  width:100%;
140
+  background:rgba(255,255,255,1);
141
+  box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
142
+  border-radius:8px;
143
+  margin-top: 30px;
144
+  padding: 30px;
145
+  .tableName{
146
+    font-size:24px;
147
+    font-weight:600;
148
+    color:#222;
149
+  }
150
+}
151
+