zlisen 3 년 전
부모
커밋
243fa90f9b

+ 2
- 2
config/proxy.js 파일 보기

@@ -8,8 +8,8 @@
8 8
 export default {
9 9
   dev: {
10 10
     '/api/': {
11
-      // target: 'https://xlk.njyz.tech/',
12
-      target: 'http://localhost:8567/',
11
+      target: 'https://xlk.njyz.tech/',
12
+      // target: 'http://localhost:8567/',
13 13
       // target: 'https://xlj.newlandsh.com/',
14 14
       changeOrigin: true,
15 15
       pathRewrite: {

+ 25
- 6
config/routes.js 파일 보기

@@ -97,16 +97,16 @@ export default [
97 97
                 hideInMenu: true,
98 98
                 component: './customer/customerlist/customerDetail',
99 99
               },
100
-              {
101
-                path: '/customer/drift/list',
102
-                name: '游客列表',
103
-                component: './customer/drift/index',
104
-              },
100
+              // {
101
+              //   path: '/customer/drift/list',
102
+              //   name: '游客列表',
103
+              //   component: './customer/drift/index',
104
+              // },
105 105
               {
106 106
                 path: '/customer/customerlist/publicCustomerDetail',
107 107
                 name: '公客详情',
108 108
                 hideInMenu: true,
109
-                component: './customer/customerlist/publicCustomerDetail',
109
+                component: './customer/Customer/PublicCustomer/publicCustomerDetail',
110 110
               },
111 111
               {
112 112
                 path: '/customer/recommend/list',
@@ -121,6 +121,25 @@ export default [
121 121
               },
122 122
             ],
123 123
           },
124
+
125
+          {
126
+            path: '/recommend',
127
+            name: '推荐客户',
128
+            component: '../layouts/BlankLayout',
129
+            routes: [
130
+              {
131
+                path: '/recommend/recommendCustomer/list',
132
+                name: '推荐记录',
133
+                component: './recommend/recommendCustomer/index',
134
+              },
135
+              {
136
+                path: '/recommend/recommendCustomer/audit',
137
+                name: '客户审核',
138
+                hideInMenu: true,
139
+                component: './recommend/recommendCustomer/audit',
140
+              },
141
+            ],
142
+          },
124 143
           {
125 144
             path: '/staff',
126 145
             name: '员工管理',

+ 55
- 49
src/pages/customer/Customer/PrivateCustomer/CustomerDetail.jsx 파일 보기

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Table, Pagination, Button } from 'antd';
2
+import { Form, Table, Pagination, Button, Descriptions,Card } from 'antd';
3 3
 
4 4
 import styles from '../style.less';
5 5
 import apis from '@/services/apis';
@@ -8,7 +8,6 @@ import moment from 'moment';
8 8
 import BuildSelect from '@/components/SelectButton/BuildSelect';
9 9
 
10 10
 import router from 'umi/router';
11
-import Prompt from 'umi/prompt';
12 11
 
13 12
 function CustomerDetail(props) {
14 13
   /**
@@ -96,12 +95,12 @@ function CustomerDetail(props) {
96 95
       key: 'activity',
97 96
       align: 'center',
98 97
     },
99
-    {
100
-      title: '访问内容',
101
-      dataIndex: 'activityName',
102
-      key: 'activityName',
103
-      align: 'center',
104
-    },
98
+    // {
99
+    //   title: '访问内容',
100
+    //   dataIndex: 'activityName',
101
+    //   key: 'activityName',
102
+    //   align: 'center',
103
+    // },
105 104
     {
106 105
       title: '访问时间',
107 106
       dataIndex: 'visitTime',
@@ -139,61 +138,77 @@ function CustomerDetail(props) {
139 138
         <Button onClick={() => router.go(-1)}>返回</Button>
140 139
       </div>
141 140
 
141
+      
142
+
142 143
       <div className={styles.cardBox}>
143 144
         <div className={styles.rightBox}>
144 145
           <p className={styles.tit}>客户信息</p>
145 146
           <div className={styles.flexBox}>
146
-            <img className={styles.touxiang} src={data.picture && data.picture} />
147
+            <div>
148
+              <img className={styles.touxiang} src={data.picture && data.picture} />
149
+            </div>
147 150
             <div className={styles.right}>
148
-              <p className={styles.rightItem}>用户名称:{data.name}</p>
149
-              <p className={styles.rightItem}>手机号码:{data.phone}</p>
150
-              <p className={styles.rightItem}>
151
-                首次访问时间:{data.visitTime && moment(data.visitTime).format('YYYY-MM-DD')}
152
-              </p>
151
+
152
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>用户名称:</span><span>{data.name}</span></p>
153
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>手机号码:</span><span>{data.phone}</span></p>
154
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>家庭住址:</span><span>{data.name}</span></p>
155
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>访问次数:</span><span>{data.name}</span></p>
156
+
157
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>年龄段:</span><span>{data.name}</span></p>
158
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>家庭年收入:</span><span>{data.name}</span></p>
159
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>已有房产数:</span><span>{data.name}</span></p>
160
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>预计购房时间:</span><span>{data.name}</span></p>
161
+
162
+        
163
+
153 164
             </div>
154 165
             <div className={styles.Centered}>
155
-              <p>访问时长:{data.duration}秒</p>
156
-              <p>访问次数:{data.visitTimes}次</p>
157
-              <p className={styles.rightItem}>客户描述:{data.describe}</p>
158
-              {/* <p>预约人数:{ data.visiteNum }</p> */}
166
+
167
+                
168
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>昵称:</span><span>{data.name}</span></p>
169
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>性别:</span><span>{data.phone}</span></p>
170
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>工作住址:</span><span>{data.name}</span></p>
171
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>来源渠道:</span><span>{data.name}</span></p>
172
+
173
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>职业:</span><span>{data.name}</span></p>
174
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>家庭成员数:</span><span>{data.name}</span></p>
175
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>已有车辆数:</span><span>{data.name}</span></p>
176
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>购房动机:</span><span>{data.name}</span></p>
177
+
178
+
159 179
             </div>
160 180
             <div className={styles.rightCentered}>
161
-              <p>需求类型:{data.demandType}</p>
162
-              <p>价格区间:{data.priceRange}</p>
163
-              <p>物业类型:{data.realtyManageType}</p>
164
-              {/* <p>预约人数:{ data.visiteNum }</p> */}
165
-            </div>
166
-            {/* <p className={styles.rightItem}>预约到访时间:{data.appointmentTime && moment(data.appointmentTime).format('YYYY-MM-DD') }</p> */}
167
-            <div className={styles.rightInfo}>
168
-              <p className={styles.rightItem}>国家:{dataConsultant && dataConsultant.country}</p>
169
-              <p className={styles.rightItem}>省份:{dataConsultant && dataConsultant.provience}</p>
170
-              <p className={styles.rightItem}>城市:{dataConsultant && dataConsultant.city}</p>
171
-              <p className={styles.rightItem}>
172
-                来源渠道:{data.personFrom ? data.personFrom : '其他'}
173
-              </p>
174
-              {/* <p className={styles.rightItem}>详细信息:</p> */}
175
-              {/* <p className={styles.rightItem}>意向项目:{data.intention }</p> */}
176
-              {/* <p className={styles.rightItem}>客户说明:{ data.verifyRemark }</p> */}
181
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>客户资讯重点:</span><span>{data.name}</span></p>
182
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>客户抗性分析:</span><span>{data.name}</span></p>
183
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>对项目认可点:</span><span>{data.name}</span></p>
184
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>备注:</span><span>{data.name}</span></p>
185
+
186
+         
187
+      
177 188
             </div>
189
+      
178 190
           </div>
179 191
         </div>
180 192
       </div>
181 193
       <br></br>
194
+
182 195
       <div className={styles.cardBox}>
183 196
         <div className={styles.rightBoxCentre}>
184 197
           <p className={styles.tit}>置业顾问信息</p>
185 198
           <div>
186 199
             <img className={styles.touxiangphoto} src={data.consultant && data.consultant.photo} />
187
-            <p>{data.consultant && data.consultant.userName}</p>
200
+         
188 201
           </div>
189 202
           <div className={styles.rightphone}>
190
-            {/* <p className={styles.infoItem}>姓名:{ data.consultant && data.consultant.name }</p>
191
-          <p className={styles.infoItem}>部门:{ data.consultant && data.consultant.department }</p> */}
192
-            <p className={styles.infoItem}>号码:{data.consultant && data.consultant.phone} </p>
193
-            <p className={styles.infoItem}>岗位:{data.consultant && data.consultant.position}</p>
203
+          <p className={styles.infoItem}>{data.consultant && data.consultant.userName}</p>
204
+          <p className={styles.infoItem}>号码:{data.consultant && data.consultant.phone} </p>
205
+      
194 206
           </div>
195 207
           <div className={styles.left}>
196
-            <p className={styles.infoItem}>公司:{data.consultant && data.consultant.orgName} </p>
208
+          <p className={styles.infoItem}>部门:{data.consultant && data.consultant.orgName} </p>
209
+          <p className={styles.infoItem}>岗位:{data.consultant && data.consultant.orgName} </p>
210
+          <p className={styles.infoItem}>公司:{data.consultant && data.consultant.orgName} </p>
211
+           
197 212
             <p className={styles.infoItem}>
198 213
               所属项目:
199 214
               {data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)}
@@ -231,15 +246,6 @@ function CustomerDetail(props) {
231 246
         />
232 247
         {/* <Pagination showQuickJumper defaultCurrent={1} total={data.records} onChange={e => changePageNum(e)} current={data.visitRecords.total}/> */}
233 248
       </div>
234
-      <Prompt
235
-        message={location =>
236
-          location.pathname.startsWith('/customer/customerlist')
237
-            ? true
238
-            : (localStorage.removeItem('priPageParams'),
239
-              localStorage.removeItem('pubPageParams'),
240
-              localStorage.removeItem('state'))
241
-        }
242
-      />
243 249
     </>
244 250
   );
245 251
 }

+ 246
- 0
src/pages/customer/Customer/PrivateCustomer/CustomerDetailold.jsx 파일 보기

@@ -0,0 +1,246 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Table, Pagination, Button } from 'antd';
3
+
4
+import styles from '../style.less';
5
+import apis from '@/services/apis';
6
+import request from '@/utils/request';
7
+import moment from 'moment';
8
+import BuildSelect from '@/components/SelectButton/BuildSelect';
9
+
10
+import router from 'umi/router';
11
+import Prompt from 'umi/prompt';
12
+
13
+function CustomerDetail(props) {
14
+  /**
15
+   * @param {*} props
16
+   * @returns
17
+   */
18
+  // eslint-disable-next-line react-hooks/rules-of-hooks
19
+  const [data, setData] = useState([{}]);
20
+  const [tableData, setTableDataData] = useState([{}]);
21
+  const [dataConsultant, setDataonsultant] = useState({});
22
+  const [intentionData, setIntentionData] = useState([]);
23
+  const [buildingIdValue, setBuildingIdData] = useState();
24
+
25
+  // eslint-disable-next-line react-hooks/rules-of-hooks
26
+  useEffect(() => {
27
+    getById();
28
+    toLoadIntention();
29
+  }, []);
30
+
31
+  function toLoadIntention() {
32
+    const arr = [];
33
+    // 意向值
34
+    for (let i = 0; i < intentionData.length; i++) {
35
+      const a = [].concat(
36
+        intentionData.concat([
37
+          {
38
+            key: i,
39
+            name: `Edward King ${i}`,
40
+            age: 32,
41
+            address: `London, Park Lane no. ${i}`,
42
+          },
43
+        ]),
44
+      );
45
+      arr.push(a);
46
+    }
47
+    setIntentionData(arr);
48
+  }
49
+
50
+  // 查询
51
+  const { id } = props.location.query;
52
+  function getById(params) {
53
+    if (id === '' || id === undefined) {
54
+      return;
55
+    }
56
+    // eslint-disable-next-line max-len
57
+    request({
58
+      ...apis.customer.CustomerRecommendGet,
59
+      urlData: { id },
60
+      params: { ...params, pageNumber: 1, pageSize: 10 },
61
+    }).then(res => {
62
+      setData(res);
63
+      if (res.visitRecords) {
64
+        setTableDataData(res.visitRecords);
65
+      }
66
+      setDataonsultant(res.geoInfo);
67
+      setIntentionData(res.intentions);
68
+    });
69
+  }
70
+  // 分页
71
+  function onChange(number) {
72
+    if (id === '' || id === undefined) {
73
+      return;
74
+    }
75
+    // eslint-disable-next-line max-len
76
+    request({
77
+      ...apis.customer.CustomerRecommendGet,
78
+      urlData: { id },
79
+      params: { pageNumber: number, pageSize: 10 },
80
+    }).then(res => {
81
+      setData(res);
82
+      setTableDataData(res.visitRecords);
83
+      setDataonsultant(res.geoInfo);
84
+    });
85
+  }
86
+
87
+  function changBuilding(buildingId) {
88
+    setBuildingIdData(buildingId);
89
+    getById({ pageNumber: 1, pageSize: 10, buildingId: buildingId });
90
+  }
91
+
92
+  const columns = [
93
+    {
94
+      title: '访问事件',
95
+      dataIndex: 'activity',
96
+      key: 'activity',
97
+      align: 'center',
98
+    },
99
+    {
100
+      title: '访问内容',
101
+      dataIndex: 'activityName',
102
+      key: 'activityName',
103
+      align: 'center',
104
+    },
105
+    {
106
+      title: '访问时间',
107
+      dataIndex: 'visitTime',
108
+      key: 'visitTime',
109
+      align: 'center',
110
+      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD HH:mm:ss')}</span>,
111
+    },
112
+    {
113
+      title: '停留时间',
114
+      dataIndex: 'visitDuration',
115
+      key: 'visitDuration',
116
+      align: 'center',
117
+      render: (_, record) => (
118
+        <span>{record.visitDuration === null ? 0 : record.visitDuration}秒</span>
119
+      ),
120
+    },
121
+  ];
122
+  // 意向
123
+  const intention = [
124
+    {
125
+      title: <span styles={{ color: '#222', fontSize: '24px' }}>项目名称</span>,
126
+      dataIndex: 'name',
127
+      width: '64%',
128
+      render: (_, record) => <span>{record.buildingName}</span>,
129
+    },
130
+    {
131
+      title: <span styles={{ color: '#222', fontSize: '24px' }}>意向值</span>,
132
+      dataIndex: 'address',
133
+      render: (_, record) => <span>{record.intention}</span>,
134
+    },
135
+  ];
136
+  return (
137
+    <>
138
+      <div style={{ textAlign: 'right', marginBottom: '16px' }}>
139
+        <Button onClick={() => router.go(-1)}>返回</Button>
140
+      </div>
141
+
142
+      <div className={styles.cardBox}>
143
+        <div className={styles.rightBox}>
144
+          <p className={styles.tit}>客户信息</p>
145
+          <div className={styles.flexBox}>
146
+            <img className={styles.touxiang} src={data.picture && data.picture} />
147
+            <div className={styles.right}>
148
+              <p className={styles.rightItem}>用户名称:{data.name}</p>
149
+              <p className={styles.rightItem}>手机号码:{data.phone}</p>
150
+              <p className={styles.rightItem}>
151
+                首次访问时间:{data.visitTime && moment(data.visitTime).format('YYYY-MM-DD')}
152
+              </p>
153
+            </div>
154
+            <div className={styles.Centered}>
155
+              <p>访问时长:{data.duration}秒</p>
156
+              <p>访问次数:{data.visitTimes}次</p>
157
+              <p className={styles.rightItem}>客户描述:{data.describe}</p>
158
+              {/* <p>预约人数:{ data.visiteNum }</p> */}
159
+            </div>
160
+            <div className={styles.rightCentered}>
161
+              <p>需求类型:{data.demandType}</p>
162
+              <p>价格区间:{data.priceRange}</p>
163
+              <p>物业类型:{data.realtyManageType}</p>
164
+              {/* <p>预约人数:{ data.visiteNum }</p> */}
165
+            </div>
166
+            {/* <p className={styles.rightItem}>预约到访时间:{data.appointmentTime && moment(data.appointmentTime).format('YYYY-MM-DD') }</p> */}
167
+            {/* <div className={styles.rightInfo}>
168
+              <p className={styles.rightItem}>国家:{dataConsultant && dataConsultant.country}</p>
169
+              <p className={styles.rightItem}>省份:{dataConsultant && dataConsultant.provience}</p>
170
+              <p className={styles.rightItem}>城市:{dataConsultant && dataConsultant.city}</p>
171
+              <p className={styles.rightItem}>
172
+                来源渠道:{data.personFrom ? data.personFrom : '其他'}
173
+              </p>
174
+    
175
+            </div> */}
176
+          </div>
177
+        </div>
178
+      </div>
179
+      <br></br>
180
+      <div className={styles.cardBox}>
181
+        <div className={styles.rightBoxCentre}>
182
+          <p className={styles.tit}>置业顾问信息</p>
183
+          <div>
184
+            <img className={styles.touxiangphoto} src={data.consultant && data.consultant.photo} />
185
+            <p>{data.consultant && data.consultant.userName}</p>
186
+          </div>
187
+          <div className={styles.rightphone}>
188
+            {/* <p className={styles.infoItem}>姓名:{ data.consultant && data.consultant.name }</p>
189
+          <p className={styles.infoItem}>部门:{ data.consultant && data.consultant.department }</p> */}
190
+            <p className={styles.infoItem}>号码:{data.consultant && data.consultant.phone} </p>
191
+            <p className={styles.infoItem}>岗位:{data.consultant && data.consultant.position}</p>
192
+          </div>
193
+          <div className={styles.left}>
194
+            <p className={styles.infoItem}>公司:{data.consultant && data.consultant.orgName} </p>
195
+            <p className={styles.infoItem}>
196
+              所属项目:
197
+              {data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)}
198
+            </p>
199
+          </div>
200
+        </div>
201
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
202
+        <div className={styles.leftBoxCentre}>
203
+          {/* <div className={styles.tit}>
204
+                <span>项目名称</span>
205
+                <span style={{ marginLeft: '50%' }}>意向值</span>
206
+          </div> */}
207
+          {/* <img className={styles.touxiang} src={ data.picture && data.picture } /> */}
208
+          {/* <div className={styles.infoItem}> */}
209
+          <Table
210
+            bordered={false}
211
+            columnWidth={10}
212
+            columns={intention}
213
+            dataSource={intentionData}
214
+            pagination={false}
215
+            scroll={intentionData && intentionData.length >= 3 ? { y: 240 } : false}
216
+            width={500}
217
+          />
218
+          {/* </div> */}
219
+        </div>
220
+      </div>
221
+      <div className={styles.recordBox}>
222
+        <p className={styles.tableName}>访问记录</p>
223
+        <BuildSelect onChange={changBuilding} value={buildingIdValue} />
224
+        <Table
225
+          dataSource={tableData.records}
226
+          columns={columns}
227
+          style={{ marginTop: '15px' }}
228
+          pagination={{ pageSize: 10, total: tableData.total, onChange }}
229
+        />
230
+        {/* <Pagination showQuickJumper defaultCurrent={1} total={data.records} onChange={e => changePageNum(e)} current={data.visitRecords.total}/> */}
231
+      </div>
232
+      <Prompt
233
+        message={location =>
234
+          location.pathname.startsWith('/customer/customerlist')
235
+            ? true
236
+            : (localStorage.removeItem('priPageParams'),
237
+              localStorage.removeItem('pubPageParams'),
238
+              localStorage.removeItem('state'))
239
+        }
240
+      />
241
+    </>
242
+  );
243
+}
244
+const WrappedHeader = Form.create({ name: 'header' })(CustomerDetail);
245
+
246
+export default WrappedHeader;

+ 3
- 22
src/pages/customer/Customer/PrivateCustomer/index.jsx 파일 보기

@@ -153,13 +153,13 @@ const PrivateCustomer = () => {
153 153
         align: 'center',
154 154
         width: '20%',
155 155
         render: withActions((_, record) => [
156
-          <Button className={Styles.text} type="link" onClick={() => toCustomerDateil(record)}>
156
+          <Button  type="link" onClick={() => toCustomerDateil(record)}>
157 157
             查看详情
158 158
           </Button>,
159 159
           // <EditIcon color="#FF4A4A" text="查看详情" onClick={() => toCustomerDateil(record)} />,
160 160
           <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
161 161
             <Button
162
-              className={Styles.text}
162
+            
163 163
               type="link"
164 164
               onClick={() => handShowModel(record, actionList.changeStatus)}
165 165
             >
@@ -169,7 +169,7 @@ const PrivateCustomer = () => {
169 169
 
170 170
           <AuthButton name="admin.customer.recommend.belong" noRight={null}>
171 171
             <Button
172
-              className={Styles.text}
172
+            
173 173
               type="link"
174 174
               onClick={() => handShowModel(record, actionList.attribution)}
175 175
             >
@@ -177,25 +177,6 @@ const PrivateCustomer = () => {
177 177
             </Button>
178 178
           </AuthButton>,
179 179
 
180
-          <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
181
-            <Button
182
-              className={Styles.text}
183
-              type="link"
184
-              onClick={() => handShowModel(record, actionList.integralRecord)}
185
-            >
186
-              积分记录
187
-            </Button>
188
-          </AuthButton>,
189
-
190
-          <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
191
-            <Button
192
-              className={Styles.text}
193
-              type="link"
194
-              onClick={() => handShowModel(record, actionList.recommend)}
195
-            >
196
-              推荐客户
197
-            </Button>
198
-          </AuthButton>,
199 180
         ]),
200 181
       },
201 182
     ];

+ 7
- 23
src/pages/customer/Customer/PublicCustomer/index.jsx 파일 보기

@@ -67,11 +67,11 @@ const PublicCustomer = () => {
67 67
     // setBatchAssistVisibleData({ visible: true, customerId: personInfo, buildingId: personInfo[0].buildingId })
68 68
   }
69 69
 
70
-  function toCustomerDateil(record) {
70
+  function publicCustomerDetail(record) {
71 71
     router.push({
72
-      pathname: '/customer/customerlist/privateCustomerDetail',
72
+      pathname: '/customer/customerlist/publicCustomerDetail',
73 73
       query: {
74
-        id: record.customerId,
74
+        id: record.personId,
75 75
       },
76 76
     });
77 77
   }
@@ -168,29 +168,13 @@ const PublicCustomer = () => {
168 168
         align: 'center',
169 169
        
170 170
         render: withActions((_, record) => [
171
-          <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
172
-            <Button
173
-              className={Styles.text}
174
-              type="link"
175
-              onClick={() => handShowModel(record, actionList.integralRecord)}
176
-            >
177
-              积分记录
178
-            </Button>
179
-          </AuthButton>,
180
-
181
-          <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
182
-            <Button
183
-              className={Styles.text}
184
-              type="link"
185
-              onClick={() => handShowModel(record, actionList.recommend)}
186
-            >
187
-              推荐客户
188
-            </Button>
189
-          </AuthButton>,
171
+          <Button  type="link" onClick={() => publicCustomerDetail(record)}>
172
+            查看详情
173
+          </Button>,
190 174
 
191 175
           <AuthButton name="admin.customer.assign" noRight={null}>
192 176
             <Button
193
-              className={Styles.text}
177
+        
194 178
               type="link"
195 179
               onClick={() => handShowModel(record, actionList.assistConsultant)}
196 180
             >

+ 242
- 0
src/pages/customer/Customer/PublicCustomer/publicCustomerDetail.jsx 파일 보기

@@ -0,0 +1,242 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Table, Pagination, Button } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import publicStyle from './publicStyle.less';
5
+import styles from '../style.less';
6
+import apis from '@/services/apis';
7
+import request from '@/utils/request';
8
+import moment from 'moment';
9
+import BuildSelect from '@/components/SelectButton/BuildSelect';
10
+
11
+import router from 'umi/router';
12
+import Prompt from 'umi/prompt';
13
+
14
+function header(props) {
15
+  /**
16
+   * @param {*} props
17
+   * @returns
18
+   */
19
+  // eslint-disable-next-line react-hooks/rules-of-hooks
20
+  const [data, setData] = useState([{}]);
21
+  const [tableData, setTableDataData] = useState([{}]);
22
+  const [dataConsultant, setDataonsultant] = useState({});
23
+  const [intentionData, setIntentionData] = useState([]);
24
+  const [buildingIdValue, setBuildingIdData] = useState();
25
+
26
+  // eslint-disable-next-line react-hooks/rules-of-hooks
27
+  useEffect(() => {
28
+    getById();
29
+    toLoadIntention();
30
+  }, []);
31
+
32
+  function toLoadIntention() {
33
+    if (intentionData) {
34
+      return;
35
+    }
36
+    const arr = [];
37
+    // 意向值
38
+    for (let i = 0; i < intentionData.length; i++) {
39
+      const a = [].concat(
40
+        intentionData.concat([
41
+          {
42
+            key: i,
43
+            name: `Edward King ${i}`,
44
+            age: 32,
45
+            address: `London, Park Lane no. ${i}`,
46
+          },
47
+        ]),
48
+      );
49
+      arr.push(a);
50
+    }
51
+    setIntentionData(arr);
52
+  }
53
+
54
+  // 查询
55
+  const { id } = props.location.query;
56
+  function getById(params) {
57
+    if (id === '' || id === undefined) {
58
+      return;
59
+    }
60
+
61
+    request({ ...apis.customer.cecommendPublic, urlData: { id }, params: { ...params } }).then(
62
+      res => {
63
+        setTableDataData(res.visitRecords);
64
+        setData(res);
65
+        setDataonsultant(res.geoInfo);
66
+        setIntentionData(res.intentions);
67
+      },
68
+    );
69
+  }
70
+  // 分页
71
+  // 分页
72
+  function onChange(number) {
73
+    if (id === '' || id === undefined) {
74
+      return;
75
+    }
76
+    request({
77
+      ...apis.customer.cecommendPublic,
78
+      urlData: { id },
79
+      params: { pageNumber: number, pageSize: 10 },
80
+    }).then(res => {
81
+      setData(res);
82
+      setTableDataData(res.visitRecords);
83
+      setDataonsultant(res.geoInfo);
84
+    });
85
+  }
86
+
87
+  function changBuilding(buildingId) {
88
+    setBuildingIdData(buildingId);
89
+    getById({ pageNumber: 1, pageSize: 10, buildingId: buildingId });
90
+  }
91
+
92
+  const columns = [
93
+    {
94
+      title: '访问事件',
95
+      dataIndex: 'activity',
96
+      key: 'activity',
97
+      align: 'center',
98
+    },
99
+    // {
100
+    //   title: '访问内容',
101
+    //   dataIndex: 'activityName',
102
+    //   key: 'activityName',
103
+    //   align: 'center',
104
+    // },
105
+    {
106
+      title: '访问时间',
107
+      dataIndex: 'visitTime',
108
+      key: 'visitTime',
109
+      align: 'center',
110
+      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD HH:mm:ss')}</span>,
111
+    },
112
+    {
113
+      title: '停留时间',
114
+      dataIndex: 'visitDuration',
115
+      key: 'visitDuration',
116
+      align: 'center',
117
+      render: (_, record) => (
118
+        <span>{record.visitDuration === null ? 0 : record.visitDuration}秒</span>
119
+      ),
120
+    },
121
+  ];
122
+  // 意向
123
+  const intention = [
124
+    {
125
+      title: <span styles={{ color: '#222', fontSize: '24px' }}>项目名称</span>,
126
+      dataIndex: 'name',
127
+      width: '64%',
128
+      render: (_, record) => <span>{record.buildingName}</span>,
129
+    },
130
+    {
131
+      title: <span styles={{ color: '#222', fontSize: '24px' }}>意向值</span>,
132
+      dataIndex: 'address',
133
+      render: (_, record) => <span>{record.intention}</span>,
134
+    },
135
+  ];
136
+  return (
137
+    <>
138
+      <div style={{ textAlign: 'right', marginBottom: '16px' }}>
139
+        <Button onClick={() => router.go(-1)}>返回</Button>
140
+      </div>
141
+
142
+      <div className={publicStyle.cardBox}>
143
+        {/* { console.log("data:",data),console.log("data:",dataConsultant)} */}
144
+        <div className={publicStyle.rightBox}>
145
+        <div >
146
+          <p className={styles.tit}>客户信息</p>
147
+          <div className={styles.flexBox}>
148
+            <div>
149
+              <img className={styles.touxiang} src={data.picture && data.picture} />
150
+            </div>
151
+            <div className={styles.right}>
152
+
153
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>用户名称:</span><span>{data.name}</span></p>
154
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>手机号码:</span><span>{data.phone}</span></p>
155
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>家庭住址:</span><span>{data.name}</span></p>
156
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>访问次数:</span><span>{data.name}</span></p>
157
+
158
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>年龄段:</span><span>{data.name}</span></p>
159
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>家庭年收入:</span><span>{data.name}</span></p>
160
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>已有房产数:</span><span>{data.name}</span></p>
161
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>预计购房时间:</span><span>{data.name}</span></p>
162
+
163
+        
164
+
165
+            </div>
166
+            <div className={styles.Centered}>
167
+
168
+                
169
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>昵称:</span><span>{data.name}</span></p>
170
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>性别:</span><span>{data.phone}</span></p>
171
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>工作住址:</span><span>{data.name}</span></p>
172
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>来源渠道:</span><span>{data.name}</span></p>
173
+
174
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>职业:</span><span>{data.name}</span></p>
175
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>家庭成员数:</span><span>{data.name}</span></p>
176
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>已有车辆数:</span><span>{data.name}</span></p>
177
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>购房动机:</span><span>{data.name}</span></p>
178
+
179
+
180
+            </div>
181
+            <div className={styles.rightCentered}>
182
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>客户资讯重点:</span><span>{data.name}</span></p>
183
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>客户抗性分析:</span><span>{data.name}</span></p>
184
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>对项目认可点:</span><span>{data.name}</span></p>
185
+              <p className={styles.rightItem}><span style={{width:'20%',minWidth:"100px"}}>备注:</span><span>{data.name}</span></p>
186
+      
187
+              </div>
188
+         
189
+      
190
+           
191
+        </div>
192
+      </div>
193
+        </div>
194
+        {/* { console.log("data:",data),console.log("data:",dataConsultant)} */}
195
+        <div className={publicStyle.leftBoxCentre}>
196
+          {/* <img className={styles.touxiang} src={ data.picture && data.picture } /> */}
197
+          <div className={publicStyle.infoItem}>
198
+            <Table
199
+              columnWidth={10}
200
+              columns={intention}
201
+              dataSource={intentionData}
202
+              pagination={false}
203
+              scroll={intentionData.length >= 3 ? { y: 240 } : false}
204
+            />
205
+          </div>
206
+        </div>
207
+      </div>
208
+      <div className={publicStyle.recordBox}>
209
+        <p className={publicStyle.tableName}>访问记录</p>
210
+        <BuildSelect onChange={changBuilding} value={buildingIdValue} />
211
+        <Table
212
+          dataSource={tableData.records}
213
+          columns={columns}
214
+          style={{ marginTop: '15px' }}
215
+          pagination={{ pageSize: 10, total: tableData.total, onChange }}
216
+        />
217
+      </div>
218
+    </>
219
+  );
220
+}
221
+const WrappedHeader = Form.create({ name: 'header' })(header);
222
+
223
+export default WrappedHeader;
224
+
225
+// <p className={publicStyle.tit}>客户信息</p>
226
+//           <img className={publicStyle.touxiang} src={data.avatarurl && data.avatarurl} />
227
+//           <div className={publicStyle.right}>
228
+//             <p className={publicStyle.rightItem}>用户名称:{data.name === null ? data.nickname : data.name}</p>
229
+//             <p className={publicStyle.rightItem}>手机号码:{data.phone}</p>
230
+//             <p className={publicStyle.rightItem}>首次访问时间:{data.visitTime && moment(data.visitTime).format('YYYY-MM-DD')}</p>
231
+//           </div>
232
+//           <div className={publicStyle.Centered}>
233
+//             <p>访问时长:{data.duration}秒</p>
234
+//             <p>访问次数:{data.visitTimes}次</p>
235
+//             <p className={publicStyle.rightItem}>来源渠道:{data.personFrom ? data.personFrom : '其他'}</p>
236
+//           </div>
237
+// <div className={publicStyle.rightInfo}>
238
+//             <p className={publicStyle.rightItem}>国家:{data && data.country}</p>
239
+//             <p className={publicStyle.rightItem}>省份:{data && data.province}</p>
240
+//             <p className={publicStyle.rightItem}>城市:{data && data.city}</p>
241
+
242
+//           </div>

+ 209
- 0
src/pages/customer/Customer/PublicCustomer/publicStyle.less 파일 보기

@@ -0,0 +1,209 @@
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:90%;
81
+    min-width:28.5%;
82
+    height:315px;
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:865px;
93
+    min-width:342px;
94
+    // height:290px;
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
+    margin-right: 30px;
100
+    padding: 30px;
101
+    overflow: hidden;
102
+  }
103
+  .rightBox{
104
+    width:-webkit-fill-available;
105
+    // height:315px;
106
+    min-width: 70%;
107
+    background:rgba(255,255,255,1);
108
+    box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
109
+    border-radius:8px;
110
+    display: inline-block;
111
+    padding: 30px;
112
+    overflow: hidden;
113
+    position: relative;
114
+  }
115
+  .rightBoxCentre{
116
+    width:865px;
117
+    // height:315px;
118
+    min-width: 60%;
119
+    background:rgba(255,255,255,1);
120
+    box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
121
+    border-radius:8px;
122
+    display: inline-block;
123
+    padding: 30px;
124
+    overflow: hidden;
125
+    position: relative;
126
+  }
127
+  .leftBoxCentre{
128
+    width:100%;
129
+    // height:315px;
130
+    background:rgba(255,255,255,1);
131
+    box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
132
+    border-radius:8px;
133
+    display: inline-block;
134
+    padding: 30px;
135
+    overflow: hidden;
136
+    position: relative;
137
+  }
138
+  .tit{
139
+    font-size:0.15rem;
140
+    font-weight:600;
141
+    color:#222;
142
+    margin: 10px 0 0 0;
143
+  }
144
+  .touxiang{
145
+    width: 120px;
146
+    width: 120px;
147
+    border-radius: 6px;
148
+    margin: 30px 0 20px 0;
149
+  }
150
+  .infoItem{
151
+    color:#666;
152
+    font-size: 0.1rem;
153
+    margin: 0 0 10px 0;
154
+    
155
+  }
156
+  .rightItem{
157
+    color:#666;
158
+    font-size: 0.1rem;
159
+    margin: 0 0 15px 0;
160
+  }
161
+  .right{
162
+    position: absolute;
163
+    top:108px;
164
+    left:170px;
165
+  }
166
+  .left{
167
+    position: absolute;
168
+    top:108px;
169
+    left:60%;
170
+  }
171
+  .rightInfo{
172
+    position: absolute;
173
+    top:108px;
174
+    left:80%;
175
+  }
176
+
177
+  .Centered{
178
+    position: absolute;
179
+    top:108px;
180
+    left:50%;
181
+    margin: 0 0 15px 0;
182
+    color:#666;
183
+    font-size: 0.1rem;
184
+  }
185
+
186
+  .rightCentered{
187
+    position: absolute;
188
+    top:108px;
189
+    left:55%;
190
+    margin: 0 0 15px 0;
191
+    color:#666;
192
+    font-size: 0.1rem;
193
+  }
194
+  
195
+}
196
+.recordBox{
197
+  width:100%;
198
+  background:rgba(255,255,255,1);
199
+  box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
200
+  border-radius:8px;
201
+  margin-top: 30px;
202
+  padding: 30px;
203
+  .tableName{
204
+    font-size:24px;
205
+    font-weight:600;
206
+    color:#222;
207
+  }
208
+}
209
+

+ 139
- 14
src/pages/customer/Customer/style.less 파일 보기

@@ -72,6 +72,142 @@
72 72
   display: none;
73 73
 }
74 74
 
75
+.leftBox{
76
+  width:1000px;
77
+  min-width:350px;
78
+  height:1000px;
79
+  background:rgba(255,255,255,1);
80
+  box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
81
+  border-radius:8px;
82
+  display: inline-block;
83
+  margin-right: 30px;
84
+  padding: 30px;
85
+  overflow: hidden;
86
+}
87
+
88
+.rightBox{
89
+  width:-webkit-fill-available;
90
+  min-width: 300px;
91
+  background:rgba(255,255,255,1);
92
+  box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
93
+  border-radius:8px;
94
+  display: inline-block;
95
+  padding: 30px;
96
+  overflow: hidden;
97
+  position: relative;
98
+}
99
+.rightBoxCentre{
100
+  width:865px;
101
+  height:345px;
102
+  min-width: 60%;
103
+  background:rgba(255,255,255,1);
104
+  box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
105
+  border-radius:8px;
106
+  display: inline-block;
107
+  padding: 30px;
108
+  overflow: hidden;
109
+  position: relative;
110
+}
111
+.leftBoxCentre{
112
+  width:100%;
113
+  height:345px;
114
+  background:rgba(255,255,255,1);
115
+  box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
116
+  border-radius:8px;
117
+  display: inline-block;
118
+  padding: 30px;
119
+  overflow: hidden;
120
+  position: relative;
121
+}
122
+.tit{
123
+  font-size:0.15rem;
124
+  font-weight:600;
125
+  color:#222;
126
+  margin: 10px 0 0 0;
127
+}
128
+.flexBox{
129
+  display: flex;
130
+  align-items: end;
131
+}
132
+.touxiang{
133
+  width: 120px;
134
+  width: 120px;
135
+  border-radius: 6px;
136
+  margin: 30px 0 20px 0;
137
+}
138
+.touxiangphoto{
139
+  width: 80px;
140
+  height: 80px;
141
+  margin: 38px 0 0px 0;
142
+}
143
+.infoItem{
144
+  color:#666;
145
+  font-size: 0.1rem;
146
+  margin: 0 0 30px 0;
147
+  
148
+}
149
+.rightItem{
150
+  color:#666;
151
+  font-size: 0.1rem;
152
+  margin: 0 0 15px 0;
153
+  display: flex;
154
+}
155
+.right{
156
+  width: 25%;
157
+  min-width: 1.3rem;
158
+  margin-left: 0.1rem;
159
+  padding-top: 0.3rem;
160
+  // position: absolute;
161
+  // top:108px;
162
+  // left:170px;
163
+}
164
+.rightphone{
165
+
166
+  position: absolute;
167
+  top:108px;
168
+  left:170px;
169
+}
170
+.left{
171
+  position: absolute;
172
+  top:108px;
173
+  left:60%;
174
+
175
+}
176
+.rightInfo{
177
+  width: 28%;
178
+  min-width: 1.3rem;
179
+  margin-right: 0.1rem;
180
+  padding-top: 0.3rem;
181
+  // position: absolute;
182
+  // top:108px;
183
+  // left:80%;
184
+}
185
+
186
+.Centered{
187
+  width: 28%;
188
+  // position: absolute;
189
+  // top:108px;
190
+  // left:30%;
191
+  min-width: 1.3rem;
192
+  margin: 0 0 15px 0;
193
+  color:#666;
194
+  font-size: 0.1rem;
195
+  padding-top: 0.3rem;
196
+}
197
+
198
+.rightCentered{
199
+  // position: absolute;
200
+  // top:108px;
201
+  // left:55%;
202
+  flex: 1;
203
+  // width: 25%;
204
+  min-width: 1.3rem;
205
+  margin: 0 0 15px 0;
206
+  padding-top: 0.3rem;
207
+  color:#666;
208
+  font-size: 0.1rem;
209
+}
210
+
75 211
 
76 212
 // 客户详情样式
77 213
 .cardBox{
@@ -88,22 +224,10 @@
88 224
     padding: 30px;
89 225
     overflow: hidden;
90 226
   }
91
-  .rightBox{
92
-    width:865px;
93
-    min-width:342px;
94
-    height:290px;
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
-    margin-right: 30px;
100
-    padding: 30px;
101
-    overflow: hidden;
102
-  }
227
+
103 228
   .rightBox{
104 229
     width:-webkit-fill-available;
105
-    height:315px;
106
-    min-width: 100%;
230
+    min-width: 300px;
107 231
     background:rgba(255,255,255,1);
108 232
     box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
109 233
     border-radius:8px;
@@ -166,6 +290,7 @@
166 290
     color:#666;
167 291
     font-size: 0.1rem;
168 292
     margin: 0 0 15px 0;
293
+    display: flex;
169 294
   }
170 295
   .right{
171 296
     width: 25%;