Selaa lähdekoodia

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

weiximei 5 vuotta sitten
vanhempi
commit
877b552600

+ 6
- 0
config/routes.js Näytä tiedosto

@@ -128,6 +128,12 @@ export default [
128 128
                 name: '到访记录',
129 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 Näytä tiedosto

@@ -147,6 +147,17 @@ const Edit = props => {
147 147
         ],
148 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 163
     const handleSubmit = val => {

+ 2
- 23
src/pages/activity/groupActivity/list.jsx Näytä tiedosto

@@ -106,12 +106,12 @@ const header = props => {
106 106
               <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={getSignList.bind(this, row.groupActivityId)}>拼团记录<Icon type="snippets" className={styles.shoppingCart} /></span>
107 107
             </AuthButton>
108 108
           }
109
-          {row.activityStatus === 0 &&
109
+          {
110 110
             <AuthButton name="admin.buildingDynamic.send.dynamicId.put" noRight={null}>
111 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 112
             </AuthButton>
113 113
           }
114
-          {row.activityStatus === 0 &&
114
+          {
115 115
             <AuthButton name="admin.taShareActivity.list.get" noRight={null}>
116 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 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,27 +122,6 @@ const header = props => {
122 122
               <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditActivity(row.groupActivityId)}>编辑<Icon type="form" className={styles.edit} /></span>
123 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 Näytä tiedosto

@@ -22,6 +22,8 @@ const { TextArea } = Input;
22 22
 
23 23
 const header = props => {
24 24
   const [isEnlist, setIsEnlist] = useState(1)
25
+  const [activityStatus, setActivityStatus] = useState(1)  
26
+  const [disable, setDisable] = useState(false)
25 27
 
26 28
   const radioOnChange = e => {
27 29
     // console.log(e.target.value)
@@ -42,6 +44,8 @@ const header = props => {
42 44
           data.activityTime = [moment(data.startDate), moment(data.endDate)]
43 45
           const num = data.helpNum > 0 ? 1 : 0
44 46
           setIsEnlist(num)
47
+          setActivityStatus(data.activityStatus)
48
+          setDisable(data.activityStatus === 0 ? true : false)
45 49
           data.isEnlist = num
46 50
           props.form.setFieldsValue(data)
47 51
           setDynamicData(data)
@@ -140,7 +144,7 @@ const header = props => {
140 144
               message: '请选择所属项目',
141 145
             },
142 146
           ],
143
-        })(<BuildSelect />)}
147
+        })(<BuildSelect disabled={disable} />)}
144 148
         </Form.Item>
145 149
 
146 150
         <Form.Item label="活动标题">
@@ -165,6 +169,17 @@ const header = props => {
165 169
         })(<ImageUploader />)}
166 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 183
         <Form.Item label="活动时间">
169 184
         {getFieldDecorator('activityTime', {
170 185
           rules: [
@@ -173,7 +188,7 @@ const header = props => {
173 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 192
         </Form.Item>
178 193
 
179 194
         <Form.Item label="助力邀请人数" min={1} max={10}>
@@ -184,7 +199,7 @@ const header = props => {
184 199
               message: '请输入活动人数',
185 200
             },
186 201
           ],
187
-        })(<Input type="number" />)}
202
+        })(<Input type="number" disabled={activityStatus===0 ? true : false}/>)}
188 203
         </Form.Item>
189 204
 
190 205
         <Form.Item label="助力次数">
@@ -196,7 +211,7 @@ const header = props => {
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 215
             <Radio value={0}>不限制</Radio>
201 216
             <Radio value={1}>限制</Radio>
202 217
           </Radio.Group>,
@@ -211,7 +226,7 @@ const header = props => {
211 226
                  message: '请输入助力人数',
212 227
                },
213 228
              ],
214
-           })(<Input type="number" placeholder="助力人数限制"/>)}
229
+           })(<Input type="number" placeholder="助力人数限制" disabled={activityStatus===0 ? true : false}/>)}
215 230
            </Form.Item>
216 231
          }
217 232
 
@@ -225,6 +240,16 @@ const header = props => {
225 240
           ],
226 241
         })(<ImageUploader />)}
227 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 253
         <Form.Item wrapperCol={{ span: 12, offset: 8 }}>
229 254
           <Button type="primary" htmlType="submit">
230 255
             确认

+ 19
- 29
src/pages/activity/helpActivity/list.jsx Näytä tiedosto

@@ -91,40 +91,30 @@ const toEditGoods = (helpActivityId) => () => {
91 91
       align: 'center',
92 92
       render: (x, row) => (
93 93
         <>
94
-          {row.activityStatus === 0 &&
94
+          {(row.activityStatus === 0 || row.activityStatus === 2) &&
95 95
           <AuthButton name="admin.helpRecord.get">
96 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 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 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 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 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 111
           </AuthButton> }
104 112
 
105
-          {row.activityStatus === 1 &&
113
+          {(row.activityStatus === 1 || row.activityStatus === 0) &&
106 114
           <AuthButton name="admin.helpActivity.update.put" noRight={null}>
107 115
             <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditGoods(row.helpActivityId)}>编辑<Icon type="form" style={{color:'#bebebe'}} className={styles.edit} /></span>
108 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,13 +158,13 @@ const toEditGoods = (helpActivityId) => () => {
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 170
   const cancelDynamic = (row) => {

+ 0
- 6
src/pages/channel/channelList.jsx Näytä tiedosto

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

+ 84
- 31
src/pages/customer/customerlist/customerDetail.jsx Näytä tiedosto

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Table } from 'antd';
2
+import { Form, Table, Pagination } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import styles from './style.less';
5 5
 import apis from '../../../services/apis';
@@ -17,6 +17,7 @@ function header(props) {
17 17
   // eslint-disable-next-line react-hooks/rules-of-hooks
18 18
   const [data, setData] = useState([{ visitRecords: [] }])
19 19
   const [dataConsultant, setDataonsultant] = useState({})
20
+  const [intentionData, setIntentionData] = useState([])
20 21
 
21 22
   // eslint-disable-next-line react-hooks/rules-of-hooks
22 23
   useEffect(() => {
@@ -35,7 +36,10 @@ function header(props) {
35 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 43
   const columns = [
40 44
     {
41 45
       title: '访问事件',
@@ -58,55 +62,104 @@ function header(props) {
58 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 88
   return (
62 89
     <>
63 90
       <div className={styles.cardBox}>
64 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 92
         <div className={styles.rightBox}>
81 93
           <p className={styles.tit}>客户信息</p>
82 94
           <img className={styles.touxiang} src={ data.picture && data.picture } />
83 95
           <div className={styles.right}>
84 96
             <p className={styles.rightItem}>用户名称:{ data.name }</p>
85 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 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 113
           <div className={styles.rightInfo}>
94 114
             <p className={styles.rightItem}>国家:{ dataConsultant&&dataConsultant.country }</p>
95 115
             <p className={styles.rightItem}>省份:{ dataConsultant&&dataConsultant.provience }</p>
96 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 121
           </div>
105 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 159
       </div>
107 160
       <div className={styles.recordBox}>
108 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 163
       </div>
111 164
 
112 165
     </>

+ 73
- 3
src/pages/customer/customerlist/index.jsx Näytä tiedosto

@@ -8,6 +8,7 @@ import router from 'umi/router';
8 8
 
9 9
 import Attribution from './components/attribution'
10 10
 import IntegralRecord from './components/integralRecord'
11
+import ModalRecommendRecord from './components/recommend'
11 12
 import ChangeStatus from './components/changeStatus'
12 13
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
13 14
 import AuthButton from '@/components/AuthButton';
@@ -50,6 +51,9 @@ function body(props) {
50 51
   const [statusVisibleData, setStatusVisibleData] = useState({ visible: false, customerId: '', status: '' })
51 52
   // 变更状态 ============= end
52 53
 
54
+  // 推荐客户
55
+  const [recommendVisibleData, setRecommendVisibleData] = useState({ visible: false, customerId: '' })
56
+
53 57
   // eslint-disable-next-line react-hooks/rules-of-hooks
54 58
   useEffect(() => {
55 59
     getList({ pageNumber: 1, pageSize: 10, customerType })
@@ -76,6 +80,7 @@ function body(props) {
76 80
     setRecordVisibleData({ visible: false, customerId: '' })
77 81
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '' })
78 82
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
83
+    setRecommendVisibleData({ visible: false, customerId: '' })
79 84
   }
80 85
 
81 86
   // 提交事件
@@ -126,19 +131,30 @@ function body(props) {
126 131
     setGVisibleData({ visible: true, customerId: record.customerId, realtyConsultant: record.realtyConsultant, buildingId: record.buildingId })
127 132
     setRecordVisibleData({ visible: false, customerId: '' })
128 133
     setStatusVisibleData({ visible: false, customerId: '' })
134
+    setRecommendVisibleData({ visible: false, customerId: '' })
129 135
   }
130 136
 
131 137
   function showRecord(record) {
132 138
     setRecordVisibleData({ visible: true, customerId: record.customerId })
133 139
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
134 140
     setStatusVisibleData({ visible: false, customerId: '' })
141
+    setRecommendVisibleData({ visible: false, customerId: '' })
135 142
   }
136 143
 
137 144
   function showStatus(record) {
138 145
     setRecordVisibleData({ visible: false, customerId: '' })
139 146
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
147
+    setRecommendVisibleData({ visible: false, customerId: '' })
140 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 158
   function toCustomerDateil(record) {
143 159
     router.push({
144 160
       pathname: '/customer/customerlist/customerDetail',
@@ -147,6 +163,15 @@ function body(props) {
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 176
   function exportCustomer () {
152 177
     const fieldsValue = getFieldsValue()
@@ -173,9 +198,18 @@ function body(props) {
173 198
 
174 199
   // 关闭调整归属的窗口
175 200
   function closeAttribution() {
201
+    alert(1)
176 202
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
177 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 214
   const publicColumns = [
181 215
     {
@@ -209,6 +243,34 @@ function body(props) {
209 243
       align: 'center',
210 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 276
   const privateColumns = [
@@ -290,12 +352,13 @@ function body(props) {
290 352
       // eslint-disable-next-line no-nested-ternary
291 353
       render: (_, record) => (
292 354
         <>
355
+            &nbsp;
293 356
           <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
294 357
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
295 358
             &nbsp;&nbsp;
296 359
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
297 360
           </AuthButton>
298
-            <br />
361
+            &nbsp;&nbsp;
299 362
           <AuthButton name="admin.customer.recommend.get" noRight={null}>
300 363
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
301 364
           </AuthButton>
@@ -303,6 +366,10 @@ function body(props) {
303 366
           <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
304 367
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
305 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,10 +450,13 @@ function body(props) {
383 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 Näytä tiedosto

@@ -77,9 +77,21 @@
77 77
 .cardBox{
78 78
   display: flex;
79 79
   .leftBox{
80
-    width:342px;
80
+    width:1000px;
81 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 95
     background:rgba(255,255,255,1);
84 96
     box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
85 97
     border-radius:8px;
@@ -90,8 +102,31 @@
90 102
   }
91 103
   .rightBox{
92 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 130
     background:rgba(255,255,255,1);
96 131
     box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
97 132
     border-radius:8px;
@@ -128,10 +163,33 @@
128 163
     top:108px;
129 164
     left:170px;
130 165
   }
166
+  .left{
167
+    position: absolute;
168
+    top:108px;
169
+    left:60%;
170
+  }
131 171
   .rightInfo{
132 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 Näytä tiedosto

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

+ 15
- 0
src/services/apis.js Näytä tiedosto

@@ -288,6 +288,11 @@ export default {
288 288
       url: `${prefix}/customer/recommend/export`,
289 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 297
   indexEcharts: {
293 298
     list:{
@@ -772,6 +777,16 @@ export default {
772 777
     method: 'post',
773 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 790
   record: {
776 791
     url: `${prefix}/helpRecord`,
777 792
     method: 'get',