dingxin 5 anni fa
parent
commit
9751482cc4

+ 15
- 15
src/pages/activity/helpActivity/edithelpActivity.jsx Vedi File

178
     if (helpActivityId) {
178
     if (helpActivityId) {
179
       console.log(helpActivityId, 'helpActivityId')
179
       console.log(helpActivityId, 'helpActivityId')
180
       useEffect(() => {
180
       useEffect(() => {
181
-        request({ ...apis.activity.poster, params: { targetId: helpActivityId, targetType: 'activity' } }).then((data) => {
181
+        request({ ...apis.activity.poster, params: { targetId: helpActivityId, targetType: 'helpActivity' } }).then((data) => {
182
           console.log(data, "2222")
182
           console.log(data, "2222")
183
           if (data.length > 0) {
183
           if (data.length > 0) {
184
             setPosterId(data[0].posterId)
184
             setPosterId(data[0].posterId)
206
     const submitPoster = () => {
206
     const submitPoster = () => {
207
       if (helpActivityId) {
207
       if (helpActivityId) {
208
         if (posterId) {
208
         if (posterId) {
209
-          request({ ...apis.activity.updatePoster, urlData: { id: posterId }, data: { targetId: helpActivityId, targetType: 'activity', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue }, }).then((data) => {
209
+          request({ ...apis.activity.updatePoster, urlData: { id: posterId }, data: { targetId: helpActivityId, targetType: 'helPactivity', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue }, }).then((data) => {
210
             message.info("保存成功")
210
             message.info("保存成功")
211
           }).catch((err) => {
211
           }).catch((err) => {
212
             message.info(err.msg || err.message)
212
             message.info(err.msg || err.message)
213
           })
213
           })
214
         } else {
214
         } else {
215
-          request({ ...apis.activity.addPoster, data: { targetId: helpActivityId, targetType: 'activity', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue }, }).then((data) => {
215
+          request({ ...apis.activity.addPoster, data: { targetId: helpActivityId, targetType: 'helPactivity', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue }, }).then((data) => {
216
             setPosterId(data.posterId)
216
             setPosterId(data.posterId)
217
             message.info("保存成功")
217
             message.info("保存成功")
218
           }).catch((err) => {
218
           }).catch((err) => {
264
 
264
 
265
         <div >
265
         <div >
266
           <div style={{ display: 'flex', width: '100%', margin: '60px 0' }}>
266
           <div style={{ display: 'flex', width: '100%', margin: '60px 0' }}>
267
-            <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报图片1</p>
267
+            <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报图片</p>
268
             <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
268
             <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
269
           </div>
269
           </div>
270
           <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
270
           <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
271
-            <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题1</p>
271
+            <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
272
             <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />
272
             <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />
273
           </div>
273
           </div>
274
           <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
274
           <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
275
-            <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报描述1</p>
275
+            <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报描述</p>
276
             <TextArea rows={5} value={textAreaValue} onChange={e => changeTextArea(e.target.value)} />
276
             <TextArea rows={5} value={textAreaValue} onChange={e => changeTextArea(e.target.value)} />
277
           </div>
277
           </div>
278
 
278
 
293
 
293
 
294
     if (helpActivityId) {
294
     if (helpActivityId) {
295
       useEffect(() => {
295
       useEffect(() => {
296
-        request({ ...apis.activity.shareContent, params: { targetId: helpActivityId, targetType: 'activity' }, }).then((data) => {
296
+        request({ ...apis.activity.shareContent, params: { targetId: helpActivityId, targetType: 'helPactivity' }, }).then((data) => {
297
           console.log(data, "2222")
297
           console.log(data, "2222")
298
           if (data.length > 0) {
298
           if (data.length > 0) {
299
             setShareContentId(data[0].shareContentId)
299
             setShareContentId(data[0].shareContentId)
309
     const submitShare = () => {
309
     const submitShare = () => {
310
       if (helpActivityId) {
310
       if (helpActivityId) {
311
         if (shareContentId) {
311
         if (shareContentId) {
312
-          request({ ...apis.activity.updateShareContent, urlData: { id: shareContentId }, data: { targetId: helpActivityId, shareContentType: 'activity', shareContentImg: imgValue, shareContentTitle: inputValue }, }).then((data) => {
312
+          request({ ...apis.activity.updateShareContent, urlData: { id: shareContentId }, data: { targetId: helpActivityId, shareContentType: 'helPactivity', shareContentImg: imgValue, shareContentTitle: inputValue }, }).then((data) => {
313
             message.info("保存成功")
313
             message.info("保存成功")
314
           }).catch((err) => {
314
           }).catch((err) => {
315
             message.info(err.msg || err.message)
315
             message.info(err.msg || err.message)
316
           })
316
           })
317
         } else {
317
         } else {
318
-          request({ ...apis.activity.addShareContent, data: { targetId: helpActivityId, shareContentType: 'activity', shareContentImg: imgValue, shareContentTitle: inputValue }, }).then((data) => {
318
+          request({ ...apis.activity.addShareContent, data: { targetId: helpActivityId, shareContentType: 'helPactivity', shareContentImg: imgValue, shareContentTitle: inputValue }, }).then((data) => {
319
             setShareContentId(data.shareContentId)
319
             setShareContentId(data.shareContentId)
320
             message.info("保存成功")
320
             message.info("保存成功")
321
           }).catch((err) => {
321
           }).catch((err) => {
329
 
329
 
330
     return <div style={{ padding: '20px' }}>
330
     return <div style={{ padding: '20px' }}>
331
       <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
331
       <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
332
-        <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享模板1</p>
332
+        <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享模板</p>
333
         <div>
333
         <div>
334
           <p style={{ display: 'flex', alignItems: 'center', fontSize: '14px', color: '#999', margin: '0', lineHeight: '0' }}><img src={logo} style={{ width: '22px', marginRight: '10px' }} />知与行互动</p>
334
           <p style={{ display: 'flex', alignItems: 'center', fontSize: '14px', color: '#999', margin: '0', lineHeight: '0' }}><img src={logo} style={{ width: '22px', marginRight: '10px' }} />知与行互动</p>
335
           <p style={{ fontSize: '16px', color: '#222', fontWeight: '600', margin: '0' }}>{inputValue ? inputValue : '置业V客厅 精准获客平台'}</p>
335
           <p style={{ fontSize: '16px', color: '#222', fontWeight: '600', margin: '0' }}>{inputValue ? inputValue : '置业V客厅 精准获客平台'}</p>
337
         </div>
337
         </div>
338
       </div>
338
       </div>
339
       <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
339
       <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
340
-        <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享标题1</p>
340
+        <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享标题</p>
341
         <Input placeholder="请输入分享标题" value={inputValue} onChange={e => changeInput(e.target.value)} />
341
         <Input placeholder="请输入分享标题" value={inputValue} onChange={e => changeInput(e.target.value)} />
342
       </div>
342
       </div>
343
       <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
343
       <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
344
-        <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享图片1</p>
344
+        <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享图片</p>
345
         <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
345
         <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
346
       </div>
346
       </div>
347
       <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
347
       <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
353
     <div>
353
     <div>
354
       <div>
354
       <div>
355
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
355
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
356
-          <Radio.Button value="basic">基本信息1</Radio.Button>
357
-          <Radio.Button value="poster">海报图片1</Radio.Button>
358
-          <Radio.Button value="share">分享设置1</Radio.Button>
356
+          <Radio.Button value="basic">基本信息</Radio.Button>
357
+          <Radio.Button value="poster">海报图片</Radio.Button>
358
+          <Radio.Button value="share">分享设置</Radio.Button>
359
         </Radio.Group>
359
         </Radio.Group>
360
       </div>
360
       </div>
361
       <div>
361
       <div>

+ 22
- 19
src/pages/activity/helpActivity/helpRecord.jsx Vedi File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar, Radio, Modal, Descriptions } from 'antd';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar, Radio, Modal, Descriptions, message } from 'antd';
3
 import moment from 'moment';
3
 import moment from 'moment';
4
 import request from '../../../utils/request';
4
 import request from '../../../utils/request';
5
 import apis from '../../../services/apis';
5
 import apis from '../../../services/apis';
123
   constructor(props) {
123
   constructor(props) {
124
     super(props);
124
     super(props);
125
     this.state = {
125
     this.state = {
126
-      helpRecordInitiateId: { id: '' },
127
-      visibleData: { visible: false, customerId: '', realtyConsultant: '', helpRecordInitiateId: '' },
126
+      verification: { verificationCode: '' },
127
+      visibleData: { visible: false, customerId: '', realtyConsultant: '', helpRecordInitiateId: '', verificationCode: '' },
128
     }
128
     }
129
   }
129
   }
130
 
130
 
131
   // 挂载之后
131
   // 挂载之后
132
   componentDidMount () {
132
   componentDidMount () {
133
     const { customerId } = this.state.visibleData
133
     const { customerId } = this.state.visibleData
134
-    this.getList({ helpRecordInitiateId: customerId, pageNumber: 1, pageSize: 5 })
135
   }
134
   }
136
 
135
 
137
   componentDidUpdate (preProps, preState) {
136
   componentDidUpdate (preProps, preState) {
138
     const { customerId } = this.state.visibleData
137
     const { customerId } = this.state.visibleData
139
-    console.log('this.state.visibleData', this.state.visibleData)
140
     if (this.props.visibleData.customerId !== preState.visibleData.customerId) {
138
     if (this.props.visibleData.customerId !== preState.visibleData.customerId) {
141
-      this.getList({ helpRecordInitiateId: customerId, pageNumber: 1, pageSize: 5 })
142
-      this.setState({ visibleData: this.props.visibleData });
139
+      this.setState({ visibleData: { visible: this.props.visibleData.visible, customerId: this.props.visibleData.customerId, verificationCode: '' } })
143
     }
140
     }
144
   }
141
   }
145
 
142
 
154
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
151
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
155
   }
152
   }
156
 
153
 
154
+  // eslint-disable-next-line class-methods-use-this
157
   getList (params) {
155
   getList (params) {
158
-    request({ ...apis.helpActivity.helpPeopleDetails, params: { ...params } }).then(res => {
159
-      this.setState({ dataSource: res })
156
+    request({ ...apis.helpActivity.verification, params: { ...params } }).then(res => {
157
+      // eslint-disable-next-line no-undef
158
+      message.info('核销成功')
160
     }).catch(err => {
159
     }).catch(err => {
161
       // eslint-disable-next-line no-unused-expressions
160
       // eslint-disable-next-line no-unused-expressions
162
       <Alert
161
       <Alert
172
 
171
 
173
   // eslint-disable-next-line class-methods-use-this
172
   // eslint-disable-next-line class-methods-use-this
174
   verify(e) {
173
   verify(e) {
175
-    console.log('111', e.target.value)
174
+    this.setState({ visibleData: { visible: true, customerId: this.props.visibleData.customerId, verificationCode: e.target.value } })
176
   }
175
   }
177
 
176
 
178
   // eslint-disable-next-line class-methods-use-this
177
   // eslint-disable-next-line class-methods-use-this
179
   verification(e) {
178
   verification(e) {
180
-    console.log('this.state.visibleData', this.state.visibleData)
181
-      alert(1)
179
+    this.getList({ helpRecordInitiateId: this.state.visibleData.customerId, verifyCode: this.state.visibleData.verificationCode })
182
   }
180
   }
183
 
181
 
184
   render () {
182
   render () {
286
 
284
 
287
   // 助力成功/进行中/助力失败
285
   // 助力成功/进行中/助力失败
288
   function radioButtonHandleSizeChange(e) {
286
   function radioButtonHandleSizeChange(e) {
289
-    setGInviteData({ visible: true, customerId: '', realtyConsultant: '' })
287
+    setGInviteData({ visible: false, customerId: '', realtyConsultant: '' })
290
     displayNone()
288
     displayNone()
291
 
289
 
292
     const { value } = e.target
290
     const { value } = e.target
335
 // 助力记录弹框
333
 // 助力记录弹框
336
 function helpRecord(row) {
334
 function helpRecord(row) {
337
 // 关闭核销
335
 // 关闭核销
338
-// eslint-disable-next-line max-len
339
-setVerifierData({ visible: false, customerId: row.helpRecordInitiateId, realtyConsultant: row.realtyConsultant })
340
-  // eslint-disable-next-line max-len
336
+console.log('gInviteData', gInviteData)
337
+
338
+
341
   setGInviteData({ visible: true, customerId: row.helpRecordInitiateId, realtyConsultant: row.realtyConsultant })
339
   setGInviteData({ visible: true, customerId: row.helpRecordInitiateId, realtyConsultant: row.realtyConsultant })
340
+
341
+  setVerifierData({ visible: false, customerId: row.helpRecordInitiateId, realtyConsultant: row.realtyConsultant })
342
 }
342
 }
343
  // 核销
343
  // 核销
344
  function helpInitiateRecordVerify(row) {
344
  function helpInitiateRecordVerify(row) {
345
+
346
+  console.log('gVerifierData', gVerifierData)
345
 // 关闭助力记录弹框
347
 // 关闭助力记录弹框
346
-// eslint-disable-next-line max-len
347
-  setVerifierData({ visible: true, customerId: row.helpRecordInitiateId, realtyConsultant: row.realtyConsultant })
348
-  // eslint-disable-next-line max-len
349
   setGInviteData({ visible: false, customerId: row.helpRecordInitiateId, realtyConsultant: row.realtyConsultant })
348
   setGInviteData({ visible: false, customerId: row.helpRecordInitiateId, realtyConsultant: row.realtyConsultant })
349
+
350
+  setVerifierData({ visible: true, customerId: row.helpRecordInitiateId, realtyConsultant: row.realtyConsultant })
351
+
352
+
350
  }
353
  }
351
 
354
 
352
   const publicColumns = [
355
   const publicColumns = [

+ 6
- 6
src/pages/activity/helpActivity/list.jsx Vedi File

79
       key: 'isEnlist',
79
       key: 'isEnlist',
80
       align: 'center',
80
       align: 'center',
81
       render: (text, records) => {
81
       render: (text, records) => {
82
-        if (records.status === 0) { return '未开始' }
83
-        if (records.status === 1) { return '进行中' }
84
-        if (records.status === 2) { return '已结束' }
82
+        if (records.activityStatus === 0) { return '未开始' }
83
+        if (records.activityStatus === 1) { return '进行中' }
84
+        if (records.activityStatus === 2) { return '已结束' }
85
       },
85
       },
86
     },
86
     },
87
     {
87
     {
91
       align: 'center',
91
       align: 'center',
92
       render: (x, row) => (
92
       render: (x, row) => (
93
         <>
93
         <>
94
-          {row.status === 1 &&
94
+          {row.activityStatus === 1 &&
95
           <AuthButton name="admin.SignList.get" noRight={null}>
95
           <AuthButton name="admin.SignList.get" noRight={null}>
96
         
96
         
97
             <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" className={styles.shoppingCart} /></span>
97
             <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" className={styles.shoppingCart} /></span>
100
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
100
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" className={styles.edit} /></span>
101
           </AuthButton> }
101
           </AuthButton> }
102
 
102
 
103
-          {row.status === 0 &&
103
+          {row.activityStatus === 0 &&
104
            <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
104
            <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
105
                       <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditGoods(row.helpActivityId)}>编辑<Icon type="form" className={styles.edit} /></span>
105
                       <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditGoods(row.helpActivityId)}>编辑<Icon type="form" className={styles.edit} /></span>
106
                       <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
106
                       <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
109
             </AuthButton>
109
             </AuthButton>
110
           }
110
           }
111
 
111
 
112
-          {row.status === 2 &&
112
+          {row.activityStatus === 2 &&
113
         <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
113
         <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
114
            <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" className={styles.shoppingCart} /></span>
114
            <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={ getSignList.bind(this, row.helpActivityId)}>助力记录<Icon type="snippets" className={styles.shoppingCart} /></span>
115
            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
115
            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>

+ 5
- 0
src/services/apis.js Vedi File

714
     method: 'get',
714
     method: 'get',
715
     action: 'admin.taRole.get',
715
     action: 'admin.taRole.get',
716
   },
716
   },
717
+  verification: {
718
+    url: `${prefix}/helpInitiateRecordVerify`,
719
+    method: 'post',
720
+    action: 'admin.taRole.get',
721
+  },
717
  },
722
  },
718
  groupActivity: {
723
  groupActivity: {
719
   list: {
724
   list: {