魏超 5 years ago
parent
commit
664ebafee1

+ 5
- 5
src/components/SelectButton/LivePlatSelect.jsx View File

@@ -22,7 +22,7 @@ function usePrevious(props) {
22 22
 const LivePlatSelect = props => {
23 23
   const [data, setData] = useState([])
24 24
   const [value, setValue] = useState([])
25
-  console.log('props', props.cityId);
25
+  console.log('props', props);
26 26
   useEffect(() => {
27 27
     getLivePlatList();
28 28
   }, [props.cityId])
@@ -38,9 +38,9 @@ const LivePlatSelect = props => {
38 38
 
39 39
 
40 40
   const checkValue = (data) => {
41
-    if (props.value) {
42
-      const tempData = data.filter(f => f.buildingId == props.value)
43
-      const va = (tempData.length > 0) ? props.value : '平台已下线,请重新选择'
41
+    if (props.liveApp) {
42
+      const tempData = data.filter(f => f.id == props.liveApp)
43
+      const va = (tempData.length > 0) ? props.liveApp : '平台已下线,请重新选择'
44 44
       props.onChange(va)
45 45
 
46 46
     }
@@ -57,7 +57,7 @@ const LivePlatSelect = props => {
57 57
         option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
58 58
       }>
59 59
           {data.map(building => (
60
-            <Option key={building.id} value={building.livePlatValue}>{building.livePlatName}</Option>
60
+            <Option key={building.id} value={building.id}>{building.livePlatName}</Option>
61 61
           ))}
62 62
       </Select>
63 63
   )

+ 1
- 1
src/pages/activity/groupActivity/editGroupActivity.jsx View File

@@ -303,7 +303,7 @@ const Edit = props => {
303 303
             <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>拼团海报图</p>
304 304
             <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
305 305
           </div>
306
-          <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px'}}>建议图片尺寸:750*668px,比例375:334,格式:jpg,用于拼团活动海报</p>
306
+          <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px'}}>建议图片尺寸:750*600,比例5:4,格式:jpg,用于拼团活动海报</p>
307 307
           <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
308 308
             <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
309 309
             <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />

+ 1
- 1
src/pages/activity/groupActivity/helpRecord.jsx View File

@@ -478,7 +478,7 @@ function helpRecord(row) {
478 478
       render: (x, row) => (
479 479
         <>
480 480
           {row.verificationStatus === 0 &&
481
-          <AuthButton name="admin.taShareSuccessRecord.get" noRight={null}>
481
+          <AuthButton name="admin.taShare.writeOff" noRight={null}>
482 482
            <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={(e) => shareRecordVerify(row)}>核销</span>
483 483
           </AuthButton>
484 484
         }

+ 1
- 1
src/pages/activity/helpActivity/edithelpActivity.jsx View File

@@ -416,7 +416,7 @@ const Edit = props => {
416 416
             <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>助力海报图</p>
417 417
             <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
418 418
           </div>
419
-          <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px'}}>建议图片尺寸:750*668px,比例375:334,格式:jpg,用于助力活动海报</p>
419
+          <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px'}}>建议图片尺寸:750*600px,比例5:4,格式:jpg,用于助力活动海报</p>
420 420
           <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
421 421
             <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
422 422
             <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />

+ 1
- 1
src/pages/activity/helpActivity/signList.jsx View File

@@ -487,7 +487,7 @@ function helpRecord(row) {
487 487
       render: (x, row) => (
488 488
         <>
489 489
           {row.verificationStatus === 0 &&
490
-          <AuthButton name="admin.SignList.get" noRight={null}>
490
+          <AuthButton name="admin.help.writeOff" noRight={null}>
491 491
            <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={() => helpInitiateRecordVerify(row)}>核销</span>
492 492
           </AuthButton>
493 493
         }

+ 3
- 3
src/pages/activity/liveActivity/edit/components/base.jsx View File

@@ -33,7 +33,7 @@ const header = props => {
33 33
   const getLiveActivityData = (liveActivityId) => {
34 34
     request({ ...apis.taliveActivity.getTaLiveActivity, urlData: {id: liveActivityId} }).then((data) => {
35 35
         console.log(data)
36
-        setLiveActivityData(data)
36
+        setLiveActivityData(data.data)
37 37
         // if(data.qrCode == 'null'){
38 38
         //   message.error("暂时无法获取二维码")
39 39
         // }
@@ -135,9 +135,9 @@ const header = props => {
135 135
         </Form.Item>
136 136
         <Form.Item label="直播小程序">
137 137
           {getFieldDecorator('liveApp', {
138
-              initialValue: liveActivityData.liveApp,
138
+              initialValue: liveActivityData.liveAppName,
139 139
               rules: [{ required: true, message: '请选择直播小程序' }],
140
-            })(<LivePlatSelect />)}
140
+            })(<LivePlatSelect liveApp={liveActivityData.liveAppName}/>)}
141 141
         </Form.Item>
142 142
         <Form.Item label="房间参数">
143 143
           {getFieldDecorator('liveRoomParam', {

+ 64
- 2
src/pages/house/raise/edit/components/BatchRaise/Refund.jsx View File

@@ -1,5 +1,5 @@
1 1
 import React, { PureComponent, useState, useEffect } from 'react'
2
-import { Modal, Row, Col, Table, Pagination, Button, Form, Input,message } from 'antd'
2
+import { Modal, Row, Col, Table, Pagination, Button, Form, Input, message, Select } from 'antd'
3 3
 import EnDash from '../EnDash'
4 4
 import AuthButton from '@/components/AuthButton';
5 5
 
@@ -10,13 +10,58 @@ import request from '../../../../../../utils/request';
10 10
 
11 11
 const Refund = props => {
12 12
   const raiseRecordId = props.raiseRecordId;
13
+  const raiseId = props.raiseId;
14
+  const [data, setData] = useState([])
13 15
 
16
+  
17
+
18
+  useEffect(() => {
19
+    getList();
20
+  }, [props,raiseRecordId])
21
+
22
+  function getList(params) {
23
+    request({
24
+      ...apis.house.taRaiseById,
25
+      urlData: { id: raiseId }
26
+    }).then((data) => {
27
+      setData(data)
28
+    })
29
+  }
30
+
31
+  function toDecimal2 (x){
32
+    var f = parseFloat(x);
33
+    if (isNaN(f)) {
34
+      return false;
35
+    }
36
+    var f = Math.round(x * 100) / 100;
37
+    var s = f.toString();
38
+    var rs = s.indexOf('.');
39
+    if (rs < 0) {
40
+      rs = s.length;
41
+      s += '.';
42
+    }
43
+    while (s.length <= rs + 2) {
44
+      s += '0';
45
+    }
46
+    return s;
47
+  }
48
+  function regFenToYuan(fen){
49
+    var num = fen;
50
+    num = fen * 0.01;
51
+    num += '';
52
+    var reg = num.indexOf('.') > -1 ? /(\d{1,3})(?=(?:\d{3})+\.)/g : /(\d{1,3})(?=(?:\d{3})+$)/g;
53
+    num = num.replace(reg, '$1');
54
+    num = toDecimal2(num)
55
+    return num
56
+  }
57
+  
14 58
   function handleSubmit (e) {
15 59
     e.preventDefault();
16 60
     props.form.validateFields((err, values) => {
17 61
       if (!err){
18 62
         request({ ...apis.house.refund, data: {targetId:raiseRecordId, targetType:"house", refundReason:values.refundReason}, }).then((data) => {
19
-            message.info("操作成功")
63
+          console.log('caozuochgegngong')
64
+            message.info("操作成功,微信退费会有延迟,请在稍后查询认筹单状态")
20 65
             props.onSuccess(false);
21 66
         }).catch((err) => {
22 67
             // message.info(err.msg)
@@ -31,6 +76,18 @@ const Refund = props => {
31 76
     <>
32 77
       <Modal footer={null} title="退款" visible={props.visible} onCancel={props.onCancel} width={600}>
33 78
         <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
79
+          <div><span>当前系统设置认筹金额:{regFenToYuan(data.raisePrice)}元</span></div>
80
+          <div><span>用户实付金额:{regFenToYuan(data.raisePrice)}元</span></div>
81
+          <div><span>即将退费金额:{regFenToYuan(data.raisePrice)}元</span></div>
82
+          <Form.Item label="退费方式" labelAlign='left'>
83
+              {getFieldDecorator('refundType', {
84
+                  rules: [{ required: true, message: ' 退款原因' }],initialValue:'onLine'
85
+                })(
86
+                <Select style={{width: '120px'}} disabled>
87
+                  <Option value="onLine">线上退费</Option>
88
+                </Select>,
89
+              )}
90
+          </Form.Item>
34 91
           <Form.Item label="退款原因" labelAlign='left'>
35 92
             {getFieldDecorator('refundReason', {
36 93
               rules: [{ required: true, message: ' 退款原因' }],
@@ -42,6 +99,11 @@ const Refund = props => {
42 99
             </Button>
43 100
           </Form.Item>
44 101
         </Form>
102
+        <div>
103
+          <font style={{color:'#999'}}>支持退费的认筹单:</font><br/>
104
+          <font style={{color:'#999'}}>1.认筹单缴费状态为已缴费且缴费结果为成功且退费状态为未退费的。</font><br/><br/>
105
+          <font style={{color:'#999'}}>注意:发起线上退费后需要微信和银行处理,退费是否成功结果请到退费记录中查看</font><br/>
106
+        </div>
45 107
       </Modal>
46 108
     </>
47 109
   );

+ 6
- 5
src/pages/house/raise/edit/components/IdentifyingChips.jsx View File

@@ -56,8 +56,9 @@ function PreselectionRecord(props) {
56 56
 
57 57
   function getList(params) {
58 58
     // 网路请求
59
-    console.log(params,'params')
59
+
60 60
     request({ ...apis.house.houseRaiseRecord, params: { ...params, salesBatchId: salesBatchId, raiseId: raiseId } }).then(res => {
61
+      console.log(params,'params')
61 62
       setData(res)
62 63
     }).catch(err => {
63 64
       openNotificationWithIcon('error', err.message)
@@ -115,7 +116,6 @@ function PreselectionRecord(props) {
115 116
   }
116 117
 
117 118
   function showBatchDel(e){
118
-    console.log(e,'eeeeeee')
119 119
     if (taRaiseRecords.length <= 0){
120 120
       message.info("请选择数据");
121 121
       return;
@@ -143,8 +143,9 @@ function PreselectionRecord(props) {
143 143
   }
144 144
 
145 145
   function raiseRefund(e){
146
+    console.log('页面刷新')
146 147
     setSingleRefund(e);
147
-    getList({ pageNumber: 1, pageSize: 10 })
148
+    getList();
148 149
   }
149 150
 
150 151
   function toDelBatch(){
@@ -425,11 +426,11 @@ function PreselectionRecord(props) {
425 426
       <Button type="primary" onClick={() => showRefund({visable:true, houseIds: taRaiseRecords})} style={{ marginTop: '20px', marginRight:'20px'}}>批量线下退费</Button>
426 427
       <UserInfo visible={userInfo.visable} raiseId={userInfo.raiseId} raiseRecordId={userInfo.raiseRecord} onCancel={e => setUserInfo(e)} />
427 428
       <HouseInfo visible={houseInfo.visable} salesBatchId={houseInfo.salesBatchId} raiseRecordId={houseInfo.raiseRecordId} raiseId={raiseId} buildingId={houseInfo.buildingId} onCancel={(e) => hideHouseInfo({visable:false, raiseRecordId:''})} />
428
-      <BatchInvalid visible={invalid.visable} houseIds={invalid.houseIds} onCancel={() => showInvalid(false)} onSuccess={() => showInvalid(false)}/>
429
+      <BatchInvalid visible={invalid.visable} houseIds={invalid.houseIds} onCancel={() => showInvalid({visable:false, houseIds: taRaiseRecords})} onSuccess={() => showInvalid({visable:false, taRaiseRecords:[]})}/>
429 430
       <BatchDel visible={batchDel.visable} houseIds={batchDel.houseIds} onCancel={() => showBatchDel({visable:false, houseIds: taRaiseRecords})} onSuccess={() => showBatchDel({visable:false, houseIds:'' })}/>
430 431
       <BatchPay visible={pay.visable} houseIds={pay.houseIds} onCancel={() => showPay(false)} onSuccess={() => showPay(false)} />
431 432
       <BatchRefund visible={refund.visable} houseIds={refund.houseIds} onCancel={() => setRefund(false)} onSuccess={() => showRefund(false)}/>
432
-      <Refund visible={singleRefund.visable} raiseRecordId={singleRefund.raiseRecordId} onCancel={() => raiseRefund({visable:false, raiseRecordId:''})} onSuccess={() => raiseRefund({visable:false, raiseRecordId:''})}></Refund>
433
+      <Refund visible={singleRefund.visable} raiseId={raiseId} raiseRecordId={singleRefund.raiseRecordId} onCancel={() => raiseRefund({visable:false, raiseRecordId:''})} onSuccess={(e) => raiseRefund(e)}></Refund>
433 434
       <div style={{marginTop:'20px', marginBottom:'20px'}}><span>共筛选出{data.total}条数据</span></div>
434 435
       <Table rowSelection={rowSelection} dataSource={data.records} columns={columns} pagination={false} rowKey="carouseFigureList"/>
435 436
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>

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

@@ -1306,6 +1306,11 @@ export default {
1306 1306
     method: 'PUT',
1307 1307
     action: 'admin.taRaise.put',
1308 1308
   },
1309
+  checkBeforeInvalidRecord:{
1310
+    url: `${prefix}/raise/checkBeforeInvalidRecord`,
1311
+    method: 'POST',
1312
+    action: 'admin.taRaise.post',
1313
+  },
1309 1314
   batchDeleteRaiseRecord: {
1310 1315
     url: `${prefix}/batchDeleteRaiseRecord`,
1311 1316
     method: 'PUT',