zhoulisen 5 лет назад
Родитель
Сommit
ea2ad34a52

+ 1
- 0
src/pages/activity/dataRecord/index.jsx Просмотреть файл

@@ -46,6 +46,7 @@ const DataRecord = props => {
46 46
     return <>
47 47
         <div>
48 48
             <div>
49
+                <span>{data.activityName || '0'}</span>
49 50
                 <Icon type="question-circle" theme="filled" style={{ fontSize: '25px', color: '#F00', marginLeft: '30px' }} onClick={() => setShowHelp(true)} />
50 51
                 <Modal
51 52
                     title="指标说明(数据会存在一定时间延迟)"

+ 56
- 51
src/pages/channel/independentList/index.jsx Просмотреть файл

@@ -24,11 +24,11 @@ class ModalTable extends React.Component {
24 24
   }
25 25
 
26 26
   // 挂载之后
27
-  componentDidMount () {
27
+  componentDidMount() {
28 28
     this.getList({ pageNumber: 1, pageSize: 5 })
29 29
   }
30 30
 
31
-  componentDidUpdate (preProps, preState) {
31
+  componentDidUpdate(preProps, preState) {
32 32
     if (this.props.visibleData.customerId !== preState.visibleData.customerId) {
33 33
       this.getList({ pageNumber: 1, pageSize: 5 })
34 34
       this.setState({ visibleData: this.props.visibleData });
@@ -37,16 +37,16 @@ class ModalTable extends React.Component {
37 37
 
38 38
   // 弹框确定按钮
39 39
   // eslint-disable-next-line react/sort-comp
40
-  handleOk () {
40
+  handleOk() {
41 41
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
42 42
   }
43 43
 
44 44
   // 弹框取消按钮
45
-  handleCancel () {
45
+  handleCancel() {
46 46
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
47 47
   }
48 48
 
49
-  getList (params) {
49
+  getList(params) {
50 50
     console.log('this.state.visibleData', this.state.visibleData)
51 51
     const { customerId } = this.state.visibleData
52 52
     if (customerId === '' || customerId === undefined) {
@@ -70,7 +70,7 @@ class ModalTable extends React.Component {
70 70
   }
71 71
 
72 72
   // 分页
73
-  onChange (pageNum) {
73
+  onChange(pageNum) {
74 74
     props.form.validateFields((err, values) => {
75 75
       if (!err) {
76 76
         getList({ pageNumber: pageNum, pageSize: 5, ...values })
@@ -78,7 +78,7 @@ class ModalTable extends React.Component {
78 78
     });
79 79
   }
80 80
 
81
-  render () {
81
+  render() {
82 82
     const columns = [
83 83
       {
84 84
         title: '头像',
@@ -89,7 +89,7 @@ class ModalTable extends React.Component {
89 89
         title: '用户名',
90 90
         dataIndex: 'name',
91 91
         key: 'name',
92
-        render: (row) => <><span>{console.log(row,'row')}{ row.name || row.nickname }</span></>,
92
+        // render: (row) => <><span>{console.log(row, 'row')}{row.name || row.nickname}</span></>,
93 93
       },
94 94
       {
95 95
         title: '电话',
@@ -111,20 +111,20 @@ class ModalTable extends React.Component {
111 111
         title: '推荐时间',
112 112
         dataIndex: 'createDate',
113 113
         key: 'createDate',
114
-        render: (_, record) => <><span>{ record.createDate && moment(record.createDate).format('YYYY-MM-DD HH:mm:ss') }</span></>,
114
+        render: (_, record) => <><span>{record.createDate && moment(record.createDate).format('YYYY-MM-DD HH:mm:ss')}</span></>,
115 115
       },
116 116
       {
117 117
         title: '状态',
118 118
         // eslint-disable-next-line consistent-return
119 119
         render: (text, records) => {
120 120
           console.log("retrun", records)
121
-      //     if (records.status === 1) { return '报备' }
122
-      // if (records.status === 2) { return '推荐' }
123
-      // if (records.status === 3) { return '认购' }
124
-      // if (records.status === 4) { return '签约' }
125
-      // if (records.verifyStatus === 1) { return '待审核' }
126
-      // if (records.verifyStatus === 2) { return '审核同意' }
127
-      // if (records.verifyStatus === 3) { return '签约' }
121
+          //     if (records.status === 1) { return '报备' }
122
+          // if (records.status === 2) { return '推荐' }
123
+          // if (records.status === 3) { return '认购' }
124
+          // if (records.status === 4) { return '签约' }
125
+          // if (records.verifyStatus === 1) { return '待审核' }
126
+          // if (records.verifyStatus === 2) { return '审核同意' }
127
+          // if (records.verifyStatus === 3) { return '签约' }
128 128
           // if (records.status === 1) { if(records.reportRecommendStatus === 1) {return '报备'} if(records.reportRecommendStatus === 2) {return '推荐'}  }
129 129
           // if (records.status === 2) { return '到访' }
130 130
           // if (records.status === 3) { return '认购' }
@@ -132,7 +132,12 @@ class ModalTable extends React.Component {
132 132
           // if (records.verifyStatus === 1) { return '待审核' }
133 133
           // if (records.verifyStatus === 2) { return '审核同意' }
134 134
           // if (records.verifyStatus === 3) { return '签约' }
135
-          if (records.status === 1) { if(records.verifyStatus === 0) {return '待审核'} if(records.verifyStatus === 1) {return '报备'} if(records.verifyStatus === 2) {return '审核不通过'}  }
135
+          if (records.status === 1) {
136
+            if (records.verifyStatus === 0) { return '待审核' }
137
+            if (records.verifyStatus === 1) {
138
+              if (records.reportRecommendStatus === 1) { return '报备' }
139
+              if (records.reportRecommendStatus === 2) { return '推荐' }}
140
+            if (records.verifyStatus === 2) { return '审核驳回' } }
136 141
           if (records.status === 2) { return '到访' }
137 142
           if (records.status === 3) { return '认购' }
138 143
           if (records.status === 4) { return '签约' }
@@ -172,13 +177,13 @@ class InviteTable extends React.Component {
172 177
   }
173 178
 
174 179
   // 挂载之后
175
-  componentDidMount () {
176
-    
180
+  componentDidMount() {
181
+
177 182
   }
178 183
 
179
-  componentDidUpdate (preProps, preState) {
184
+  componentDidUpdate(preProps, preState) {
180 185
     const { customerId } = this.props.visibleData
181
-    
186
+
182 187
     if (this.props.visibleData.visible !== preState.visibleData.visible) {
183 188
       this.getList({ id: customerId, pageNumber: 1, pageSize: 5 })
184 189
       this.setState({ visibleData: this.props.visibleData });
@@ -187,18 +192,18 @@ class InviteTable extends React.Component {
187 192
 
188 193
   // 弹框确定按钮
189 194
   // eslint-disable-next-line react/sort-comp
190
-  handleOk () {
195
+  handleOk() {
191 196
     this.setState({ dataSource: { records: [] } })
192 197
     this.props.onCancel()
193 198
   }
194 199
 
195 200
   // 弹框取消按钮
196
-  handleCancel () {
201
+  handleCancel() {
197 202
     this.setState({ dataSource: { records: [] } })
198 203
     this.props.onCancel()
199 204
   }
200 205
 
201
-  getList (params) {
206
+  getList(params) {
202 207
     const { id } = params
203 208
     console.log(id)
204 209
     if (id === '' || id === undefined) {
@@ -208,16 +213,16 @@ class InviteTable extends React.Component {
208 213
       this.setState({ dataSource: res })
209 214
     }).catch(err => {
210 215
       // eslint-disable-next-line no-unused-expressions
211
-    
216
+
212 217
     })
213 218
   }
214 219
 
215 220
   // 分页
216
-  onChange (pageNum) {
221
+  onChange(pageNum) {
217 222
     this.getList({ pageNumber: pageNum, pageSize: 5 })
218 223
   }
219 224
 
220
-  render () {
225
+  render() {
221 226
     const columns = [
222 227
       {
223 228
         title: '头像',
@@ -231,7 +236,7 @@ class InviteTable extends React.Component {
231 236
         dataIndex: 'nickname',
232 237
         key: 'nickname',
233 238
         align: 'center',
234
-      render: (row) => <><span>{console.log(row,'row')}{ row.name || row.nickname }</span></>,
239
+        render: (row) => <><span>{console.log(row, 'row')}{row.name || row.nickname}</span></>,
235 240
       },
236 241
       {
237 242
         title: '电话',
@@ -271,7 +276,7 @@ class InviteTable extends React.Component {
271 276
  * @param {*} props
272 277
  * @returns
273 278
  */
274
-function body (props) {
279
+function body(props) {
275 280
   const { getFieldDecorator, getFieldsValue } = props.form
276 281
 
277 282
   // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -283,7 +288,7 @@ function body (props) {
283 288
   }, [])
284 289
 
285 290
 
286
-  function openNotificationWithIcon (type, message) {
291
+  function openNotificationWithIcon(type, message) {
287 292
     notification[type]({
288 293
       message,
289 294
       description:
@@ -291,7 +296,7 @@ function body (props) {
291 296
     });
292 297
   }
293 298
 
294
-  function getList (params) {
299
+  function getList(params) {
295 300
     // 网路请求
296 301
     request({ ...apis.customer.agents, params: { ...params } }).then(res => {
297 302
       setDataSource(res)
@@ -301,7 +306,7 @@ function body (props) {
301 306
   }
302 307
 
303 308
   // 提交事件
304
-  function handleSubmit (e) {
309
+  function handleSubmit(e) {
305 310
     e.preventDefault();
306 311
     props.form.validateFields((err, values) => {
307 312
       if (!err) {
@@ -314,24 +319,24 @@ function body (props) {
314 319
   // eslint-disable-next-line react-hooks/rules-of-hooks
315 320
   const [gInviteData, setGInviteData] = useState({ visible: false, customerId: '', realtyConsultant: '' })
316 321
   // Change 事件
317
-  function handleSelectChange (e) {
322
+  function handleSelectChange(e) {
318 323
     // eslint-disable-next-line no-console
319 324
     console.log(e)
320 325
   }
321
-  function gM (row) {
326
+  function gM(row) {
322 327
     setGVisibleData({ visible: true, customerId: row.personId, realtyConsultant: row.realtyConsultant })
323 328
 
324 329
     setGInviteData({ visible: false })
325 330
   }
326 331
 
327
-  function Invite (row) {
332
+  function Invite(row) {
328 333
     setGInviteData({ visible: true, customerId: row.personId, realtyConsultant: row.realtyConsultant })
329 334
 
330 335
     setGVisibleData({ visible: false })
331 336
   }
332 337
 
333 338
   // 分页
334
-  function onChange (pageNum) {
339
+  function onChange(pageNum) {
335 340
     // eslint-disable-next-line react-hooks/rules-of-hooks
336 341
     getList({ pageNumber: pageNum, pageSize: 10 })
337 342
   }
@@ -339,11 +344,11 @@ function body (props) {
339 344
   /**
340 345
     * 重置搜索
341 346
     */
342
-  function handleReset () {
347
+  function handleReset() {
343 348
     props.form.resetFields();
344 349
   }
345 350
 
346
-  function toAudit (cuurentId) {
351
+  function toAudit(cuurentId) {
347 352
     router.push({
348 353
       pathname: '/customer/recommendCustomer/audit',
349 354
       query: {
@@ -352,7 +357,7 @@ function body (props) {
352 357
     })
353 358
   }
354 359
 
355
-  function exportIndependen () {
360
+  function exportIndependen() {
356 361
     const fieldsValue = getFieldsValue()
357 362
     console.log('fieldsValue', fieldsValue)
358 363
     request({ ...apis.customer.customerRecommendAgentsExport, responseType: 'blob', params: { ...fieldsValue } })
@@ -363,7 +368,7 @@ function body (props) {
363 368
       })
364 369
   }
365 370
 
366
-  function download (data) {
371
+  function download(data) {
367 372
     if (!data) {
368 373
       return
369 374
     }
@@ -387,7 +392,7 @@ function body (props) {
387 392
       title: '姓名',
388 393
       dataIndex: 'nickname',
389 394
       key: 'nickname',
390
-      render: (_, record) => <><span>{ record.name || record.nickname }</span></>,
395
+      render: (_, record) => <><span>{record.name || record.nickname}</span></>,
391 396
     },
392 397
     {
393 398
       title: '电话',
@@ -411,7 +416,7 @@ function body (props) {
411 416
       title: '所属渠道',
412 417
       dataIndex: 'channelName',
413 418
       key: 'channelName',
414
-      render: (_, record) => <><span>{record.channelName }</span></>,
419
+      render: (_, record) => <><span>{record.channelName}</span></>,
415 420
     },
416 421
     {
417 422
       title: '操作',
@@ -451,16 +456,16 @@ function body (props) {
451 456
   return (
452 457
     <>
453 458
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{ display: 'flex', alignItems: 'center' }}>
454
-      <Form.Item>
459
+        <Form.Item>
455 460
           {getFieldDecorator('channelId')(
456
-           <ChannelSelect />
457
-          //   <Select defaultValue="渠道名称" style={{ width: 180 }} onChange={handleChange}>
458
-          //   <option value="">全部</option>
459
-          //   {data.channelNmae.map(Item =>
460
-          //     <Option value={Item.channelId}> {Item.channelName} </Option>,
461
-          //   )}
462
-      
463
-          // </Select>,
461
+            <ChannelSelect />
462
+            //   <Select defaultValue="渠道名称" style={{ width: 180 }} onChange={handleChange}>
463
+            //   <option value="">全部</option>
464
+            //   {data.channelNmae.map(Item =>
465
+            //     <Option value={Item.channelId}> {Item.channelName} </Option>,
466
+            //   )}
467
+
468
+            // </Select>,
464 469
           )}
465 470
         </Form.Item>
466 471
         <Form.Item>

+ 34
- 29
src/pages/channel/recommendClients.jsx Просмотреть файл

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select,Avatar } from 'antd';
2
+import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select, Avatar } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import channels from './channelList.less';
5 5
 import router from 'umi/router';
@@ -52,14 +52,14 @@ const columns = [
52 52
     // key: 'img',
53 53
     align: 'center',
54 54
 
55
-    render: (text, record) =>  <Avatar shape="square"   src={record.picture} size={64} icon="user" /> ,
55
+    render: (text, record) => <Avatar shape="square" src={record.picture} size={64} icon="user" />,
56 56
   },
57 57
   {
58 58
     title: '用户姓名',
59 59
     dataIndex: 'name',
60 60
     key: 'name',
61 61
     align: 'center',
62
-    render:  (text, record) => <div>{record.name}</div> ,
62
+    render: (text, record) => <div>{record.name}</div>,
63 63
   },
64 64
   {
65 65
     title: '电话',
@@ -72,7 +72,7 @@ const columns = [
72 72
     dataIndex: 'sex',
73 73
     key: 'sex',
74 74
     align: 'center',
75
-    render: (text, record) => <span>{ record.sex === 1 ? '男' : record.sex === 2 ? '女' : '未知' }</span>
75
+    render: (text, record) => <span>{record.sex === 1 ? '男' : record.sex === 2 ? '女' : '未知'}</span>
76 76
   },
77 77
   {
78 78
     title: '意向项目',
@@ -85,7 +85,7 @@ const columns = [
85 85
     dataIndex: 'createDate',
86 86
     key: 'createDate',
87 87
     align: 'center',
88
-    render: (_, record) => <><span>{ record.createDate && moment(record.createDate).format('YYYY-MM-DD HH:mm:ss') }</span></>,
88
+    render: (_, record) => <><span>{record.createDate && moment(record.createDate).format('YYYY-MM-DD HH:mm:ss')}</span></>,
89 89
   },
90 90
   {
91 91
     title: '状态',
@@ -94,13 +94,13 @@ const columns = [
94 94
     align: 'center',
95 95
     // eslint-disable-next-line consistent-return
96 96
     render: (text, records) => {
97
-          //    if (records.status === 1) { if(records.reportRecommendStatus === 0) {return '未审核'} if(records.reportRecommendStatus === 1) {return '报备'} if(records.reportRecommendStatus === 2) {return '推荐'}  }
98
-          // if (records.status === 2) { return '到访' }
99
-          // if (records.status === 3) { return '认购' }
100
-          // if (records.status === 4) { return '签约' }
101
-          // if (records.verifyStatus === 1) { return '待审核' }
102
-          // if (records.verifyStatus === 2) { return '审核同意' }
103
-          // if (records.verifyStatus === 3) { return '签约' }
97
+      //    if (records.status === 1) { if(records.reportRecommendStatus === 0) {return '未审核'} if(records.reportRecommendStatus === 1) {return '报备'} if(records.reportRecommendStatus === 2) {return '推荐'}  }
98
+      // if (records.status === 2) { return '到访' }
99
+      // if (records.status === 3) { return '认购' }
100
+      // if (records.status === 4) { return '签约' }
101
+      // if (records.verifyStatus === 1) { return '待审核' }
102
+      // if (records.verifyStatus === 2) { return '审核同意' }
103
+      // if (records.verifyStatus === 3) { return '签约' }
104 104
       // if (records.status === 1) { return '报备' }
105 105
       // if (records.status === 2) { return '推荐' }
106 106
       // if (records.status === 3) { return '认购' }
@@ -108,10 +108,15 @@ const columns = [
108 108
       // if (records.verifyStatus === 1) { return '待审核' }
109 109
       // if (records.verifyStatus === 2) { return '审核同意' }
110 110
       // if (records.verifyStatus === 3) { return '签约' }
111
-      if (records.status === 1) { if(records.verifyStatus === 0) {return '待审核'} if(records.verifyStatus === 1) {return '报备'} if(records.verifyStatus === 2) {return '审核不通过'}  }
112
-          if (records.status === 2) { return '到访' }
113
-          if (records.status === 3) { return '认购' }
114
-          if (records.status === 4) { return '签约' }
111
+      if (records.status === 1) {
112
+        if (records.verifyStatus === 0) { return '待审核' }
113
+        if (records.verifyStatus === 1) {
114
+          if (records.reportRecommendStatus === 1) { return '报备' }
115
+          if (records.reportRecommendStatus === 2) { return '推荐' }}
116
+        if (records.verifyStatus === 2) { return '审核驳回' } }
117
+      if (records.status === 2) { return '到访' }
118
+      if (records.status === 3) { return '认购' }
119
+      if (records.status === 4) { return '签约' }
115 120
     },
116 121
   },
117 122
 ];
@@ -119,7 +124,7 @@ const columns = [
119 124
 const header = props => {
120 125
   // eslint-disable-next-line react-hooks/rules-of-hooks
121 126
   const [data, setData] = useState({})
122
-//   const [page, changePage] = useState({})
127
+  //   const [page, changePage] = useState({})
123 128
   // eslint-disable-next-line react-hooks/rules-of-hooks
124 129
   useEffect(() => {
125 130
     getListRecommend({ pageNumber: 1, pageSize: 10 })
@@ -140,23 +145,23 @@ const header = props => {
140 145
   function getListRecommend(params) {
141 146
     request({ ...apis.channelList.getListRecommend, urlData: { id: props.location.query.id }, params: { ...params } }).then((data) => {
142 147
       setData(data)
143
-  }).catch((err) => {
148
+    }).catch((err) => {
144 149
       console.log(err)
145 150
       message.info(err.msg || err.message)
146
-  })
151
+    })
147 152
   }
148 153
 
149 154
 
150
-   // 分页
151
- function onChange(pageNum) {
152
-      // eslint-disable-next-line react-hooks/rules-of-hooks
153
-      getListRecommend({ pageNumber: pageNum, pageSize: 9 })
154
-    }
155
-return (
156
-  <>
157
-  <Table dataSource={data.records} rowKey="recommendClist" columns={columns} pagination={{ pageSize: 10, total: data.total, onChange }} />
158
-  </>
159
-)
155
+  // 分页
156
+  function onChange(pageNum) {
157
+    // eslint-disable-next-line react-hooks/rules-of-hooks
158
+    getListRecommend({ pageNumber: pageNum, pageSize: 9 })
159
+  }
160
+  return (
161
+    <>
162
+      <Table dataSource={data.records} rowKey="recommendClist" columns={columns} pagination={{ pageSize: 10, total: data.total, onChange }} />
163
+    </>
164
+  )
160 165
 }
161 166
 
162 167
 function handleMenuClick(e) {