Ver código fonte

Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into v3.5.1

weiximei 5 anos atrás
pai
commit
877b552600

+ 6
- 0
config/routes.js Ver arquivo

128
                 name: '到访记录',
128
                 name: '到访记录',
129
                 component: './customer/visiting/index',
129
                 component: './customer/visiting/index',
130
               },
130
               },
131
+              {
132
+                path: '/customer/customerlist/publicCustomerDetail',
133
+                name: '私客详情',
134
+                hideInMenu: true,
135
+                component: './customer/customerlist/publicCustomerDetail',
136
+              },
131
             ],
137
             ],
132
           },
138
           },
133
           {
139
           {

+ 11
- 0
src/pages/activity/groupActivity/editGroupActivity.jsx Ver arquivo

147
         ],
147
         ],
148
         help: '建议宽度:335px,高度不限',
148
         help: '建议宽度:335px,高度不限',
149
       },
149
       },
150
+      {
151
+        label: '权重',
152
+        name: 'heavy',
153
+        type: FieldTypes.Number,
154
+        render: <Input type="number" style={{ width: 80}}/>,
155
+        value: dynamicData.heavy,
156
+        rules: [
157
+          { required: true, message: '请输入权重' },
158
+        ],
159
+        help: '数字越大越靠前',
160
+      },
150
     ]
161
     ]
151
 
162
 
152
     const handleSubmit = val => {
163
     const handleSubmit = val => {

+ 2
- 23
src/pages/activity/groupActivity/list.jsx Ver arquivo

106
               <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={getSignList.bind(this, row.groupActivityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span>
106
               <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={getSignList.bind(this, row.groupActivityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span>
107
             </AuthButton>
107
             </AuthButton>
108
           }
108
           }
109
-          {row.activityStatus === 0 &&
109
+          {
110
             <AuthButton name="admin.buildingDynamic.send.dynamicId.put" noRight={null}>
110
             <AuthButton name="admin.buildingDynamic.send.dynamicId.put" noRight={null}>
111
               <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this, row)}>{row.status === 1 ? '取消发布' : '发布'}<Icon type="close-circle" className={styles.edit} /></span>
111
               <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this, row)}>{row.status === 1 ? '取消发布' : '发布'}<Icon type="close-circle" className={styles.edit} /></span>
112
             </AuthButton>
112
             </AuthButton>
113
           }
113
           }
114
-          {row.activityStatus === 0 &&
114
+          {
115
             <AuthButton name="admin.taShareActivity.list.get" noRight={null}>
115
             <AuthButton name="admin.taShareActivity.list.get" noRight={null}>
116
               <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{row.weight === 1 ? '取消标签' : '添加标签'}<Icon type="vertical-align-top" className={styles.edit} /></span>
116
               <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{row.weight === 1 ? '取消标签' : '添加标签'}<Icon type="vertical-align-top" className={styles.edit} /></span>
117
               <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{row.sort === true ? '取消推荐首页' : '推荐首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
117
               <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{row.sort === true ? '取消推荐首页' : '推荐首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
122
               <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditActivity(row.groupActivityId)}>编辑<Icon type="form" className={styles.edit} /></span>
122
               <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditActivity(row.groupActivityId)}>编辑<Icon type="form" className={styles.edit} /></span>
123
             </AuthButton>
123
             </AuthButton>
124
           }
124
           }
125
-          {row.activityStatus === 1 &&
126
-            <AuthButton name="admin.taShareActivity.finish.put" noRight={null}>
127
-              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={endGroupActivity(row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
128
-            </AuthButton>
129
-          }
130
-          {row.activityStatus === 1 &&
131
-            <AuthButton name="admin.taShareActivity.weight.put" noRight={null}>
132
-              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{row.weight === 1 ? '取消置顶' : '置顶'}<Icon type="vertical-align-top" className={styles.edit} /></span>
133
-              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{row.sort === true ? '取消推荐首页' : '推荐首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
134
-            </AuthButton>
135
-          }
136
-
137
-          {row.activityStatus === 2 &&
138
-            <AuthButton><span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={getSignList.bind(this, row.groupActivityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span></AuthButton>
139
-          }
140
-          {row.activityStatus === 2 &&
141
-            <AuthButton name="admin.taShareActivity.weight.put" noRight={null}>
142
-              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topGroupActivity(row, row.weight)}>{row.weight === 1 ? '取消置顶' : '置顶'}<Icon type="vertical-align-top" className={styles.edit} /></span>
143
-              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{row.sort === true ? '取消推荐首页' : '推荐首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
144
-            </AuthButton>
145
-          }
146
         </>
125
         </>
147
       ),
126
       ),
148
     },
127
     },

+ 30
- 5
src/pages/activity/helpActivity/edithelpActivity.jsx Ver arquivo

22
 
22
 
23
 const header = props => {
23
 const header = props => {
24
   const [isEnlist, setIsEnlist] = useState(1)
24
   const [isEnlist, setIsEnlist] = useState(1)
25
+  const [activityStatus, setActivityStatus] = useState(1)  
26
+  const [disable, setDisable] = useState(false)
25
 
27
 
26
   const radioOnChange = e => {
28
   const radioOnChange = e => {
27
     // console.log(e.target.value)
29
     // console.log(e.target.value)
42
           data.activityTime = [moment(data.startDate), moment(data.endDate)]
44
           data.activityTime = [moment(data.startDate), moment(data.endDate)]
43
           const num = data.helpNum > 0 ? 1 : 0
45
           const num = data.helpNum > 0 ? 1 : 0
44
           setIsEnlist(num)
46
           setIsEnlist(num)
47
+          setActivityStatus(data.activityStatus)
48
+          setDisable(data.activityStatus === 0 ? true : false)
45
           data.isEnlist = num
49
           data.isEnlist = num
46
           props.form.setFieldsValue(data)
50
           props.form.setFieldsValue(data)
47
           setDynamicData(data)
51
           setDynamicData(data)
140
               message: '请选择所属项目',
144
               message: '请选择所属项目',
141
             },
145
             },
142
           ],
146
           ],
143
-        })(<BuildSelect />)}
147
+        })(<BuildSelect disabled={disable} />)}
144
         </Form.Item>
148
         </Form.Item>
145
 
149
 
146
         <Form.Item label="活动标题">
150
         <Form.Item label="活动标题">
165
         })(<ImageUploader />)}
169
         })(<ImageUploader />)}
166
         </Form.Item>
170
         </Form.Item>
167
 
171
 
172
+        <Form.Item label="活动列表图" help="建议尺寸375*312px">
173
+          {getFieldDecorator('detailImg', {
174
+          rules: [
175
+            {
176
+              required: true,
177
+              message: '活动主图不能为空',
178
+            },
179
+          ],
180
+        })(<ImageUploader />)}
181
+        </Form.Item>
182
+
168
         <Form.Item label="活动时间">
183
         <Form.Item label="活动时间">
169
         {getFieldDecorator('activityTime', {
184
         {getFieldDecorator('activityTime', {
170
           rules: [
185
           rules: [
173
               message: '请选择活动时间',
188
               message: '请选择活动时间',
174
             },
189
             },
175
           ],
190
           ],
176
-        })(<RangePicker format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }}/>)}
191
+        })(<RangePicker format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }} disabled={activityStatus===0 ? true : false}/>)}
177
         </Form.Item>
192
         </Form.Item>
178
 
193
 
179
         <Form.Item label="助力邀请人数" min={1} max={10}>
194
         <Form.Item label="助力邀请人数" min={1} max={10}>
184
               message: '请输入活动人数',
199
               message: '请输入活动人数',
185
             },
200
             },
186
           ],
201
           ],
187
-        })(<Input type="number" />)}
202
+        })(<Input type="number" disabled={activityStatus===0 ? true : false}/>)}
188
         </Form.Item>
203
         </Form.Item>
189
 
204
 
190
         <Form.Item label="助力次数">
205
         <Form.Item label="助力次数">
196
             },
211
             },
197
           ],
212
           ],
198
         })(
213
         })(
199
-          <Radio.Group onChange={(e) => radioOnChange(e)}>
214
+          <Radio.Group disabled={activityStatus===0 ? true : false} onChange={(e) => radioOnChange(e)}>
200
             <Radio value={0}>不限制</Radio>
215
             <Radio value={0}>不限制</Radio>
201
             <Radio value={1}>限制</Radio>
216
             <Radio value={1}>限制</Radio>
202
           </Radio.Group>,
217
           </Radio.Group>,
211
                  message: '请输入助力人数',
226
                  message: '请输入助力人数',
212
                },
227
                },
213
              ],
228
              ],
214
-           })(<Input type="number" placeholder="助力人数限制"/>)}
229
+           })(<Input type="number" placeholder="助力人数限制" disabled={activityStatus===0 ? true : false}/>)}
215
            </Form.Item>
230
            </Form.Item>
216
          }
231
          }
217
 
232
 
225
           ],
240
           ],
226
         })(<ImageUploader />)}
241
         })(<ImageUploader />)}
227
         </Form.Item>
242
         </Form.Item>
243
+        <Form.Item label="权重">
244
+        {getFieldDecorator('heavy', {
245
+          rules: [
246
+            {
247
+              required: true,
248
+              message: '请输入权重',
249
+            },
250
+          ],
251
+        })(<Input type="number" disabled={activityStatus===0 ? true : false} style={{ width: 80}}/>)}<span style={{ marginLeft: 30, color:'grey'}}>数字越大越靠前</span>
252
+        </Form.Item>
228
         <Form.Item wrapperCol={{ span: 12, offset: 8 }}>
253
         <Form.Item wrapperCol={{ span: 12, offset: 8 }}>
229
           <Button type="primary" htmlType="submit">
254
           <Button type="primary" htmlType="submit">
230
             确认
255
             确认

+ 19
- 29
src/pages/activity/helpActivity/list.jsx Ver arquivo

91
       align: 'center',
91
       align: 'center',
92
       render: (x, row) => (
92
       render: (x, row) => (
93
         <>
93
         <>
94
-          {row.activityStatus === 0 &&
94
+          {(row.activityStatus === 0 || row.activityStatus === 2) &&
95
           <AuthButton name="admin.helpRecord.get">
95
           <AuthButton name="admin.helpRecord.get">
96
              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" style={{color:'#bebebe'}}   className={styles.shoppingCart} /></span>
96
              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" style={{color:'#bebebe'}}   className={styles.shoppingCart} /></span>
97
           </AuthButton>}
97
           </AuthButton>}
98
+          {
99
+            <AuthButton name="admin.top.update.post" noRight={null}>
100
+              <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this, row)}>{row.status === 1 ? '取消发布' : '发布'}<Icon type="close-circle" className={styles.edit} /></span>
101
+            </AuthButton>
102
+          }
98
           {row.activityStatus === 0 &&
103
           {row.activityStatus === 0 &&
104
+            <AuthButton name="admin.top.update.post" noRight={null}>
105
+            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" style={{color:'#bebebe'}} className={styles.edit} /></span> </AuthButton>
106
+          }
107
+          {
99
           <AuthButton name="admin.top.update.post" noRight={null}>
108
           <AuthButton name="admin.top.update.post" noRight={null}>
100
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" style={{color:'#bebebe'}} className={styles.edit} /></span>
101
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top"  style={{color:'#bebebe'}} className={styles.edit} /></span>
109
+            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消标签' : '添加标签' }<Icon type="vertical-align-top"  style={{color:'#bebebe'}} className={styles.edit} /></span>
102
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
110
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
103
           </AuthButton> }
111
           </AuthButton> }
104
 
112
 
105
-          {row.activityStatus === 1 &&
113
+          {(row.activityStatus === 1 || row.activityStatus === 0) &&
106
           <AuthButton name="admin.helpActivity.update.put" noRight={null}>
114
           <AuthButton name="admin.helpActivity.update.put" noRight={null}>
107
             <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditGoods(row.helpActivityId)}>编辑<Icon type="form" style={{color:'#bebebe'}} className={styles.edit} /></span>
115
             <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditGoods(row.helpActivityId)}>编辑<Icon type="form" style={{color:'#bebebe'}} className={styles.edit} /></span>
108
           </AuthButton>
116
           </AuthButton>
109
           }
117
           }
110
-          {row.activityStatus === 1 &&
111
-           <AuthButton name="admin.top.update.post" noRight={null}>
112
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
113
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
114
-            </AuthButton>
115
-          }
116
-
117
-          {row.activityStatus === 2 &&
118
-          <AuthButton name="admin.helpRecord.get" noRight={null}>
119
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" style={{color:'#bebebe'}} className={styles.shoppingCart} /></span>
120
-          </AuthButton>
121
-          }
122
-           {row.activityStatus === 2 &&
123
-        <AuthButton name="admin.top.update.post" noRight={null}>
124
-           <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
125
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
126
-        </AuthButton>
127
-          }
128
         </>
118
         </>
129
       ),
119
       ),
130
     },
120
     },
168
       })
158
       })
169
   }
159
   }
170
   
160
   
171
-  // const sendOrPublicDynamic = (row) => {
172
-  //     if (row.status === 1) {
173
-  //         cancelDynamic(row)
174
-  //     } else {
175
-  //         sendDynamic(row)
176
-  //     }
177
-  // }
161
+  const sendOrPublicDynamic = (row) => {
162
+      if (row.status === 1) {
163
+          cancelDynamic(row)
164
+      } else {
165
+          sendDynamic(row)
166
+      }
167
+  }
178
   
168
   
179
   // 取消活动
169
   // 取消活动
180
   const cancelDynamic = (row) => {
170
   const cancelDynamic = (row) => {

+ 0
- 6
src/pages/channel/channelList.jsx Ver arquivo

72
     key: 'recommendCount',
72
     key: 'recommendCount',
73
     align: 'center',
73
     align: 'center',
74
   },
74
   },
75
-  {
76
-    title: '邀请经纪人',
77
-    dataIndex: 'inviteCount',
78
-    key: 'inviteCount',
79
-    align: 'center',
80
-  },
81
   {
75
   {
82
     title: '操作',
76
     title: '操作',
83
     dataIndex: '',
77
     dataIndex: '',

+ 84
- 31
src/pages/customer/customerlist/customerDetail.jsx Ver arquivo

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Table } from 'antd';
2
+import { Form, Table, Pagination } from 'antd';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import styles from './style.less';
4
 import styles from './style.less';
5
 import apis from '../../../services/apis';
5
 import apis from '../../../services/apis';
17
   // eslint-disable-next-line react-hooks/rules-of-hooks
17
   // eslint-disable-next-line react-hooks/rules-of-hooks
18
   const [data, setData] = useState([{ visitRecords: [] }])
18
   const [data, setData] = useState([{ visitRecords: [] }])
19
   const [dataConsultant, setDataonsultant] = useState({})
19
   const [dataConsultant, setDataonsultant] = useState({})
20
+  const [intentionData, setIntentionData] = useState([])
20
 
21
 
21
   // eslint-disable-next-line react-hooks/rules-of-hooks
22
   // eslint-disable-next-line react-hooks/rules-of-hooks
22
   useEffect(() => {
23
   useEffect(() => {
35
       setDataonsultant(res.geoInfo)
36
       setDataonsultant(res.geoInfo)
36
     })
37
     })
37
   }
38
   }
38
-
39
+// 分页
40
+  const changePageNum = pageNumber => {
41
+    // getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
42
+  }
39
   const columns = [
43
   const columns = [
40
     {
44
     {
41
       title: '访问事件',
45
       title: '访问事件',
58
       render: (_, record) => <span>{record.visitDuration === null ? 0 : record.visitDuration }秒</span>,
62
       render: (_, record) => <span>{record.visitDuration === null ? 0 : record.visitDuration }秒</span>,
59
     },
63
     },
60
   ]
64
   ]
65
+  // 意向
66
+  const intention = [
67
+    {
68
+      title: 'Name',
69
+      dataIndex: 'name',
70
+      width: 150,
71
+      render: (_, record) => <span>香颂半岛</span>,
72
+    },
73
+    {
74
+      title: 'Address',
75
+      dataIndex: 'address',
76
+      render: (_, record) => <span style={{ marginLeft: '55%' }}>22</span>,
77
+    },
78
+  ];
79
+
80
+for (let i = 0; i < 100; i++) {
81
+  intentionData.push({
82
+    key: i,
83
+    name: `Edward King ${i}`,
84
+    age: 32,
85
+    address: `London, Park Lane no. ${i}`,
86
+  });
87
+}
61
   return (
88
   return (
62
     <>
89
     <>
63
       <div className={styles.cardBox}>
90
       <div className={styles.cardBox}>
64
      {/* { console.log("data:",data),console.log("data:",dataConsultant)} */}
91
      {/* { console.log("data:",data),console.log("data:",dataConsultant)} */}
65
-        <div className={styles.leftBox}>
66
-          <p className={styles.tit}>置业顾问信息</p>
67
-          <img className={styles.touxiang} src={ data.consultant && data.consultant.picture } />
68
-          <p className={styles.infoItem}>姓名:{ data.consultant && data.consultant.name }</p>
69
-          <p className={styles.infoItem}>部门:{ data.consultant && data.consultant.department }</p>
70
-          <p className={styles.infoItem}>岗位:{ data.consultant && data.consultant.post }</p>
71
-          <p className={styles.infoItem}>号码:{ data.consultant && data.consultant.phone } </p>
72
-          <p className={styles.infoItem}>公司:{ data.consultant && data.consultant.company } </p>
73
-          <p className={styles.infoItem}>
74
-            所属项目:
75
-            {
76
-              data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
77
-            }
78
-          </p>
79
-        </div>
80
         <div className={styles.rightBox}>
92
         <div className={styles.rightBox}>
81
           <p className={styles.tit}>客户信息</p>
93
           <p className={styles.tit}>客户信息</p>
82
           <img className={styles.touxiang} src={ data.picture && data.picture } />
94
           <img className={styles.touxiang} src={ data.picture && data.picture } />
83
           <div className={styles.right}>
95
           <div className={styles.right}>
84
             <p className={styles.rightItem}>用户名称:{ data.name }</p>
96
             <p className={styles.rightItem}>用户名称:{ data.name }</p>
85
             <p className={styles.rightItem}>手机号码:{ data.phone }</p>
97
             <p className={styles.rightItem}>手机号码:{ data.phone }</p>
86
-            <p className={styles.rightItem}>来访渠道:活动分享</p>
98
+            <p className={styles.rightItem}>首次访问时间:{data.visitTime && moment(data.visitTime).format('YYYY-MM-DD')}</p>
99
+          </div>
100
+          <div className={styles.Centered}>
101
+          <p>访问时长:{ data.duration }秒</p>
102
+          <p>访问次数:{ data.visitTimes }</p>
103
+          <p className={styles.rightItem}>客户描述:{ data.describe }</p>
104
+          {/* <p>预约人数:{ data.visiteNum }</p> */}
105
+          </div>
106
+          <div className={styles.rightCentered}>
107
+          <p >需求类型:{ data.demandType }</p>
108
+          <p >价格区间:{data.priceRange }</p>
109
+          <p >物业类型:{ data.realtyManageType }</p>
110
+          {/* <p>预约人数:{ data.visiteNum }</p> */}
87
           </div>
111
           </div>
88
-          <p className={styles.rightItem}>访问时长:{ data.duration }秒</p>
89
-          <p className={styles.rightItem}>访问次数:{ data.visitTimes }</p>
90
-          <p className={styles.rightItem}>预约人数:{ data.visiteNum }</p>
91
-          <p className={styles.rightItem}>首次访问时间:{data.visitTime && moment(data.visitTime).format('YYYY-MM-DD')}</p>
92
-          <p className={styles.rightItem}>预约到访时间:{data.appointmentTime && moment(data.appointmentTime).format('YYYY-MM-DD') }</p>
112
+          {/* <p className={styles.rightItem}>预约到访时间:{data.appointmentTime && moment(data.appointmentTime).format('YYYY-MM-DD') }</p> */}
93
           <div className={styles.rightInfo}>
113
           <div className={styles.rightInfo}>
94
             <p className={styles.rightItem}>国家:{ dataConsultant&&dataConsultant.country }</p>
114
             <p className={styles.rightItem}>国家:{ dataConsultant&&dataConsultant.country }</p>
95
             <p className={styles.rightItem}>省份:{ dataConsultant&&dataConsultant.provience }</p>
115
             <p className={styles.rightItem}>省份:{ dataConsultant&&dataConsultant.provience }</p>
96
             <p className={styles.rightItem}>城市:{dataConsultant&&dataConsultant.city }</p>
116
             <p className={styles.rightItem}>城市:{dataConsultant&&dataConsultant.city }</p>
97
-            <p className={styles.rightItem}>详细信息:</p>
98
-            <p className={styles.rightItem}>意向项目:{data.intention }</p>
99
-            <p className={styles.rightItem}>价格区间:{data.priceRange }</p>
100
-            <p className={styles.rightItem}>客户说明:{ data.verifyRemark }</p>
101
-            <p className={styles.rightItem}>客户描述:{ data.describe }</p>
102
-            <p className={styles.rightItem}>需求类型:{ data.demandType }</p>
103
-            <p className={styles.rightItem}>物业类型:{ data.realtyManageType }</p>
117
+            <p className={styles.rightItem}>来访渠道:活动分享</p>
118
+            {/* <p className={styles.rightItem}>详细信息:</p> */}
119
+            {/* <p className={styles.rightItem}>意向项目:{data.intention }</p> */} 
120
+            {/* <p className={styles.rightItem}>客户说明:{ data.verifyRemark }</p> */}
104
           </div>
121
           </div>
105
         </div>
122
         </div>
123
+        
124
+      </div>
125
+      <br></br>
126
+      <div className={styles.cardBox}>
127
+        <div className={styles.rightBoxCentre}>
128
+        <p className={styles.tit}>置业顾问信息</p>
129
+          <img className={styles.touxiang} src={ data.picture && data.picture } />
130
+          <p className={styles.infoItem}>曹玉文</p>
131
+          <div className={styles.right}>
132
+          {/* <p className={styles.infoItem}>姓名:{ data.consultant && data.consultant.name }</p>
133
+          <p className={styles.infoItem}>部门:{ data.consultant && data.consultant.department }</p> */}
134
+          <p className={styles.infoItem}>号码:{ data.consultant && data.consultant.phone } </p>
135
+          <p className={styles.infoItem}>岗位:{ data.consultant && data.consultant.post }</p>
136
+          </div>
137
+          <div className={styles.left}>
138
+          <p className={styles.infoItem}>公司:{ data.consultant && data.consultant.company } </p>
139
+          <p className={styles.infoItem}>
140
+            所属项目:
141
+            {
142
+              data.consultant && data.consultant.projects.map((item, _) => <span>{item}</span>)
143
+            }
144
+          </p>
145
+          </div>
146
+        </div>
147
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
148
+        <div className={styles.leftBoxCentre}>
149
+          <div className={styles.tit}>
150
+                <span>项目名称</span>
151
+                <span style={{ marginLeft: '47%' }}>项目名称</span>
152
+          </div>
153
+          {/* <img className={styles.touxiang} src={ data.picture && data.picture } /> */}
154
+          <div className={styles.infoItem}>
155
+          <Table columnWidth={10} showHeader={false} columns={intention} dataSource={intentionData} pagination={{ pageSize: 50 }} scroll={{ y: 240 }}/>,
156
+          </div>
157
+        </div>
158
+
106
       </div>
159
       </div>
107
       <div className={styles.recordBox}>
160
       <div className={styles.recordBox}>
108
         <p className={styles.tableName}>访问记录</p>
161
         <p className={styles.tableName}>访问记录</p>
109
-        <Table dataSource={data.visitRecords} columns={columns} pagination={false} rowKey="customerDetail" />
162
+        <Table showQuickJumper defaultCurrent={1} dataSource={data.visitRecords} columns={columns} current={50} />
110
       </div>
163
       </div>
111
 
164
 
112
     </>
165
     </>

+ 73
- 3
src/pages/customer/customerlist/index.jsx Ver arquivo

8
 
8
 
9
 import Attribution from './components/attribution'
9
 import Attribution from './components/attribution'
10
 import IntegralRecord from './components/integralRecord'
10
 import IntegralRecord from './components/integralRecord'
11
+import ModalRecommendRecord from './components/recommend'
11
 import ChangeStatus from './components/changeStatus'
12
 import ChangeStatus from './components/changeStatus'
12
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
13
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
13
 import AuthButton from '@/components/AuthButton';
14
 import AuthButton from '@/components/AuthButton';
50
   const [statusVisibleData, setStatusVisibleData] = useState({ visible: false, customerId: '', status: '' })
51
   const [statusVisibleData, setStatusVisibleData] = useState({ visible: false, customerId: '', status: '' })
51
   // 变更状态 ============= end
52
   // 变更状态 ============= end
52
 
53
 
54
+  // 推荐客户
55
+  const [recommendVisibleData, setRecommendVisibleData] = useState({ visible: false, customerId: '' })
56
+
53
   // eslint-disable-next-line react-hooks/rules-of-hooks
57
   // eslint-disable-next-line react-hooks/rules-of-hooks
54
   useEffect(() => {
58
   useEffect(() => {
55
     getList({ pageNumber: 1, pageSize: 10, customerType })
59
     getList({ pageNumber: 1, pageSize: 10, customerType })
76
     setRecordVisibleData({ visible: false, customerId: '' })
80
     setRecordVisibleData({ visible: false, customerId: '' })
77
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '' })
81
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '' })
78
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
82
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
83
+    setRecommendVisibleData({ visible: false, customerId: '' })
79
   }
84
   }
80
 
85
 
81
   // 提交事件
86
   // 提交事件
126
     setGVisibleData({ visible: true, customerId: record.customerId, realtyConsultant: record.realtyConsultant, buildingId: record.buildingId })
131
     setGVisibleData({ visible: true, customerId: record.customerId, realtyConsultant: record.realtyConsultant, buildingId: record.buildingId })
127
     setRecordVisibleData({ visible: false, customerId: '' })
132
     setRecordVisibleData({ visible: false, customerId: '' })
128
     setStatusVisibleData({ visible: false, customerId: '' })
133
     setStatusVisibleData({ visible: false, customerId: '' })
134
+    setRecommendVisibleData({ visible: false, customerId: '' })
129
   }
135
   }
130
 
136
 
131
   function showRecord(record) {
137
   function showRecord(record) {
132
     setRecordVisibleData({ visible: true, customerId: record.customerId })
138
     setRecordVisibleData({ visible: true, customerId: record.customerId })
133
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
139
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
134
     setStatusVisibleData({ visible: false, customerId: '' })
140
     setStatusVisibleData({ visible: false, customerId: '' })
141
+    setRecommendVisibleData({ visible: false, customerId: '' })
135
   }
142
   }
136
 
143
 
137
   function showStatus(record) {
144
   function showStatus(record) {
138
     setRecordVisibleData({ visible: false, customerId: '' })
145
     setRecordVisibleData({ visible: false, customerId: '' })
139
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
146
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
147
+    setRecommendVisibleData({ visible: false, customerId: '' })
140
     setStatusVisibleData({ visible: true, customerId: record.customerId, status: record.status })
148
     setStatusVisibleData({ visible: true, customerId: record.customerId, status: record.status })
141
   }
149
   }
150
+
151
+  // 推荐客户
152
+  function showRecommend(personId) {
153
+    setRecordVisibleData({ visible: false, customerId: '' })
154
+    setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
155
+    setStatusVisibleData({ visible: false, customerId: '', status: '' })
156
+    setRecommendVisibleData({ visible: true, customerId: personId })
157
+  }
142
   function toCustomerDateil(record) {
158
   function toCustomerDateil(record) {
143
     router.push({
159
     router.push({
144
       pathname: '/customer/customerlist/customerDetail',
160
       pathname: '/customer/customerlist/customerDetail',
147
       },
163
       },
148
     });
164
     });
149
   }
165
   }
166
+  // 私客详情
167
+  function publicCustomerDetail(record) {
168
+    router.push({
169
+      pathname: '/customer/customerlist/publicCustomerDetail',
170
+      query: {
171
+        id: record.customerId,
172
+      },
173
+    });
174
+  }
150
 
175
 
151
   function exportCustomer () {
176
   function exportCustomer () {
152
     const fieldsValue = getFieldsValue()
177
     const fieldsValue = getFieldsValue()
173
 
198
 
174
   // 关闭调整归属的窗口
199
   // 关闭调整归属的窗口
175
   function closeAttribution() {
200
   function closeAttribution() {
201
+    alert(1)
176
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
202
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
177
     getList({ pageNum: 1, pageSize: 10, customerType, ...props.form.getFieldsValue() })
203
     getList({ pageNum: 1, pageSize: 10, customerType, ...props.form.getFieldsValue() })
178
   }
204
   }
205
+  // 回调关闭所有弹框
206
+  function closeAll() {
207
+    alert(1)
208
+    setRecordVisibleData({ visible: false, customerId: '' })
209
+    setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
210
+    setStatusVisibleData({ visible: false, customerId: '', status: '' })
211
+    setRecommendVisibleData({ visible: false, customerId: '' })
212
+  }
179
 
213
 
180
   const publicColumns = [
214
   const publicColumns = [
181
     {
215
     {
209
       align: 'center',
243
       align: 'center',
210
       width: '15%',
244
       width: '15%',
211
     },
245
     },
246
+    {
247
+      title: '性别',
248
+      dataIndex: 'sex',
249
+      key: 'sex',
250
+      align: 'center',
251
+      width: '10%',
252
+      // eslint-disable-next-line no-nested-ternary
253
+      render: (_, record) => <><span>{record.sex === 1 ? '男' : record.sex === 2 ? '女' : '未知'}</span></>,
254
+    },
255
+    {
256
+      title: '操作',
257
+      dataIndex: 'customerId',
258
+      key: 'customerId',
259
+      align: 'center',
260
+      width: '25%',
261
+      // eslint-disable-next-line no-nested-ternary
262
+      render: (_, record) => (
263
+        <>
264
+          <AuthButton>
265
+            <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => publicCustomerDetail(record)}>查看详情</Button>
266
+          </AuthButton>
267
+          &nbsp;&nbsp;
268
+          <AuthButton>
269
+            <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
270
+          </AuthButton>
271
+        </>
272
+      ),
273
+    },
212
   ]
274
   ]
213
 
275
 
214
   const privateColumns = [
276
   const privateColumns = [
290
       // eslint-disable-next-line no-nested-ternary
352
       // eslint-disable-next-line no-nested-ternary
291
       render: (_, record) => (
353
       render: (_, record) => (
292
         <>
354
         <>
355
+            &nbsp;
293
           <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
356
           <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
294
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
357
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
295
             &nbsp;&nbsp;
358
             &nbsp;&nbsp;
296
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
359
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
297
           </AuthButton>
360
           </AuthButton>
298
-            <br />
361
+            &nbsp;&nbsp;
299
           <AuthButton name="admin.customer.recommend.get" noRight={null}>
362
           <AuthButton name="admin.customer.recommend.get" noRight={null}>
300
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
363
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
301
           </AuthButton>
364
           </AuthButton>
303
           <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
366
           <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
304
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
367
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
305
           </AuthButton>
368
           </AuthButton>
369
+            &nbsp;
370
+          <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
371
+            <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecommend(record.customerId)}>推荐客户</Button>
372
+          </AuthButton>
306
         </>
373
         </>
307
       ),
374
       ),
308
     },
375
     },
383
       <Attribution visibleData={gVisibleData} onCancel={() => closeAttribution()}/>
450
       <Attribution visibleData={gVisibleData} onCancel={() => closeAttribution()}/>
384
 
451
 
385
       {/* 积分记录 */}
452
       {/* 积分记录 */}
386
-      <IntegralRecord visibleData={recordVisibleData} />
453
+      <IntegralRecord visibleData={recordVisibleData} onCancel={() => closeAll()} />
387
 
454
 
388
       {/* 变更状态 */}
455
       {/* 变更状态 */}
389
-      <ChangeStatus visibleData={statusVisibleData} />
456
+      <ChangeStatus visibleData={statusVisibleData} onCancel={() => closeAll()}/>
457
+
458
+      {/* 推荐客户 */}
459
+      <ModalRecommendRecord visibleData={recommendVisibleData} onCancel={() => closeAll()}/>
390
     </>
460
     </>
391
   );
461
   );
392
 }
462
 }

+ 64
- 6
src/pages/customer/customerlist/style.less Ver arquivo

77
 .cardBox{
77
 .cardBox{
78
   display: flex;
78
   display: flex;
79
   .leftBox{
79
   .leftBox{
80
-    width:342px;
80
+    width:1000px;
81
     min-width:342px;
81
     min-width:342px;
82
-    height:511px;
82
+    height:1000px;
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;
83
     background:rgba(255,255,255,1);
95
     background:rgba(255,255,255,1);
84
     box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
96
     box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
85
     border-radius:8px;
97
     border-radius:8px;
90
   }
102
   }
91
   .rightBox{
103
   .rightBox{
92
     width:-webkit-fill-available;
104
     width:-webkit-fill-available;
93
-    height:511px;
94
-    min-width: 800px;
105
+    height:315px;
106
+    min-width: 100%;
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;
95
     background:rgba(255,255,255,1);
130
     background:rgba(255,255,255,1);
96
     box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
131
     box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
97
     border-radius:8px;
132
     border-radius:8px;
128
     top:108px;
163
     top:108px;
129
     left:170px;
164
     left:170px;
130
   }
165
   }
166
+  .left{
167
+    position: absolute;
168
+    top:108px;
169
+    left:60%;
170
+  }
131
   .rightInfo{
171
   .rightInfo{
132
     position: absolute;
172
     position: absolute;
133
-    top:50px;
134
-    left:50%;
173
+    top:108px;
174
+    left:80%;
175
+  }
176
+
177
+  .Centered{
178
+    position: absolute;
179
+    top:108px;
180
+    left:30%;
181
+    margin: 0 0 15px 0;
182
+    color:#666;
183
+    font-size: 19px;
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: 19px;
135
   }
193
   }
136
   
194
   
137
 }
195
 }

+ 1
- 1
src/pages/news/list/editNewsList.jsx Ver arquivo

64
         ]
64
         ]
65
       },
65
       },
66
       {
66
       {
67
-        label: '资讯图',
67
+        label: '资讯列表图',
68
         name: 'newsImg',
68
         name: 'newsImg',
69
         type: FieldTypes.ImageUploader,
69
         type: FieldTypes.ImageUploader,
70
         value: dynamicData.newsImg,
70
         value: dynamicData.newsImg,

+ 15
- 0
src/services/apis.js Ver arquivo

288
       url: `${prefix}/customer/recommend/export`,
288
       url: `${prefix}/customer/recommend/export`,
289
       action: 'admin.customer.recommend.export.get',
289
       action: 'admin.customer.recommend.export.get',
290
     },
290
     },
291
+    recommendClient: {
292
+      method: 'GET',
293
+      url: `${prefix}/customer/recommend/:id`,
294
+      action: 'admin.customer.recommend.get',
295
+    },
291
   },
296
   },
292
   indexEcharts: {
297
   indexEcharts: {
293
     list:{
298
     list:{
772
     method: 'post',
777
     method: 'post',
773
     action: 'admin.top.update.post',
778
     action: 'admin.top.update.post',
774
   },
779
   },
780
+  cancel: {
781
+    method: 'PUT',
782
+    url: `${prefix}/helpActivity/cancel/:id`,
783
+    action: 'admin.helpActivity.update.put',
784
+  },
785
+  send: {
786
+    url: `${prefix}/helpActivity/send/:id`,
787
+    method: 'PUT',
788
+    action: 'admin.helpActivity.update.put',
789
+  },
775
   record: {
790
   record: {
776
     url: `${prefix}/helpRecord`,
791
     url: `${prefix}/helpRecord`,
777
     method: 'get',
792
     method: 'get',