魏超 5 лет назад
Родитель
Сommit
b87dc48945

+ 1
- 1
src/pages/house/house/edit/components/house.jsx Просмотреть файл

@@ -144,7 +144,7 @@ function House(props) {
144 144
     },
145 145
     {
146 146
       title: '房源',
147
-      render:  (x, row) => <><span>{row.termName}/{row.blockName}/{row.blockName}/{row.unitName}/{row.floorName}/{row.roomName}</span></>,
147
+      render:  (x, row) => <><span>{row.termName}/{row.blockName}/{row.unitName}/{row.floorName}/{row.roomName}</span></>,
148 148
     },
149 149
     // {
150 150
     //   title: '期/区',

+ 2
- 3
src/pages/house/preSelect/edit/components/BasicHeat/index.jsx Просмотреть файл

@@ -12,9 +12,8 @@ const BasicHeat = props => {
12 12
 
13 13
   const houseIdList = props.houseId;
14 14
   const salesBatchId = props.salesBatchId;
15
-
15
+  console.log('houseIdList', houseIdList)
16 16
   function handleSubmit (e) {
17
-    console.log(houseIdList, salesBatchId)
18 17
     e.preventDefault();
19 18
     props.form.validateFields((err, values) => {
20 19
       if (!err){
@@ -34,7 +33,7 @@ const BasicHeat = props => {
34 33
   return (
35 34
     <>
36 35
       <Modal footer={null} title="批量修改基础热度" visible={props.visible} onCancel={props.onCancel} width={600}>
37
-        <span>将所选XX条房源预选基础热度信息修改为</span>
36
+        <span>将所选{houseIdList.length}条房源预选基础热度信息修改为</span>
38 37
         <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
39 38
           <Form.Item label="基础热度值" labelAlign='left'>
40 39
             {getFieldDecorator('heat')(<Input placeholder='填写预选基础热度,建议为0' label='left'/>)}

+ 1
- 1
src/pages/house/preSelect/edit/components/preselectionHouse.jsx Просмотреть файл

@@ -207,7 +207,7 @@ function PreselectionRecord(props) {
207 207
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
208 208
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
209 209
       </div>   
210
-      <BasicHeat visible={basicHeat.visable} houseId={basicHeat.houseId} salesBatchId={basicHeat.salesBatchId} onCancel={() => setBasicHeat({visable:false, salesBatchId:''})} onSuccess={()=>getList()}/>
210
+      <BasicHeat visible={basicHeat.visable} houseId={basicHeat.houseId} salesBatchId={basicHeat.salesBatchId} onCancel={() => setBasicHeat({visable:false, salesBatchId:'',houseId:''})} onSuccess={()=>getList()}/>
211 211
     </>
212 212
   )
213 213
 }

+ 52
- 0
src/pages/house/raise/edit/components/BatchRaise/Refund.jsx Просмотреть файл

@@ -0,0 +1,52 @@
1
+import React, { PureComponent, useState, useEffect } from 'react'
2
+import { Modal, Row, Col, Table, Pagination, Button, Form, Input,message } from 'antd'
3
+import EnDash from '../EnDash'
4
+import AuthButton from '@/components/AuthButton';
5
+
6
+import Style from './style.less'
7
+import HotBlock from '../HotBlock'
8
+import apis from '../../../../../../services/apis';
9
+import request from '../../../../../../utils/request';
10
+
11
+const Refund = props => {
12
+  const raiseRecordId = props.raiseRecordId;
13
+
14
+  function handleSubmit (e) {
15
+    e.preventDefault();
16
+    props.form.validateFields((err, values) => {
17
+      if (!err){
18
+        request({ ...apis.house.refund, data: {targetId:raiseRecordId, targetType:"house", refundReason:values.refundReason}, }).then((data) => {
19
+            message.info("操作成功")
20
+            getList({ pageNum: 1, pageSize: 10 });
21
+        }).catch((err) => {
22
+            // message.info(err.msg)
23
+        })        
24
+      }
25
+    });
26
+  }
27
+
28
+  const { getFieldDecorator } = props.form;
29
+
30
+  return (
31
+    <>
32
+      <Modal footer={null} title="退款" visible={props.visible} onCancel={props.onCancel} width={600}>
33
+        <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
34
+          <Form.Item label="退款原因" labelAlign='left'>
35
+            {getFieldDecorator('refundReason', {
36
+              rules: [{ required: true, message: ' 退款原因' }],
37
+            })(<Input label='left'/>)}
38
+          </Form.Item>
39
+          <Form.Item wrapperCol={{ span: 15, offset: 10 }}>
40
+            <Button type="primary" htmlType="submit" >
41
+              提交
42
+            </Button>
43
+          </Form.Item>
44
+        </Form>
45
+      </Modal>
46
+    </>
47
+  );
48
+}
49
+
50
+const WrappedBase = Form.create({ name: 'Refund' })(Refund);
51
+
52
+export default WrappedBase

+ 21
- 15
src/pages/house/raise/edit/components/IdentifyingChips.jsx Просмотреть файл

@@ -16,6 +16,7 @@ import HouseInfo from './HouseInfo';
16 16
 import BatchInvalid from './BatchRaise/BatchInvalid';
17 17
 import BatchPay from './BatchRaise/BatchPay';
18 18
 import BatchRefund from './BatchRaise/BatchRefund';
19
+import Refund from './BatchRaise/Refund';
19 20
 
20 21
 /**
21 22
  *图片设置
@@ -31,6 +32,7 @@ function PreselectionRecord(props) {
31 32
   const [pay, setPay] = useState({visable:false,houseIds:''})
32 33
   const [refund, setRefund] = useState({visable:false,houseIds:''})
33 34
   const [taRaiseRecords, setTaRaiseRecords] = useState([])
35
+  const [singleRefund, setSingleRefund] = useState({visable:false, raiseRecordId:''})
34 36
   const raiseId = props.raiseId.raiseId
35 37
   const salesBatchId = props.salesBatchId
36 38
   const buildingId = props.buildingId
@@ -117,21 +119,24 @@ function PreselectionRecord(props) {
117 119
     setRefund(e)
118 120
   }
119 121
 
120
-  const raiseRefund = rowData => () => {
121
-    Modal.confirm({
122
-      title: '确定退费吗',
123
-      okText: '确定',
124
-      cancelText: '取消',
125
-      onOk () {
126
-        request({ ...apis.house.refund, data: {targetId:rowData.raiseRecordId, targetType:"house"}, }).then((data) => {
127
-          message.info("操作成功")
128
-          getList({ pageNum: 1, pageSize: 10 });
129
-        }).catch((err) => {
130
-          // message.info(err.msg)
131
-        })
132
-      },
133
-    });
122
+  function raiseRefund(e){
123
+    setSingleRefund({visable:true,raiseRecordId:e.raiseRecordId});
134 124
   }
125
+  // const raiseRefund = rowData => () => {
126
+  //   Modal.confirm({
127
+  //     title: '确定退费吗',
128
+  //     okText: '确定',
129
+  //     cancelText: '取消',
130
+  //     onOk () {
131
+  //       request({ ...apis.house.refund, data: {targetId:rowData.raiseRecordId, targetType:"house"}, }).then((data) => {
132
+  //         message.info("操作成功")
133
+  //         getList({ pageNum: 1, pageSize: 10 });
134
+  //       }).catch((err) => {
135
+  //         // message.info(err.msg)
136
+  //       })
137
+  //     },
138
+  //   });
139
+  // }
135 140
 
136 141
   function toDelBatch(){
137 142
     console.log(taRaiseRecords, 'houseIdListhouseIdList')
@@ -274,7 +279,7 @@ function PreselectionRecord(props) {
274 279
       align: 'center',
275 280
       render: (text, record) => (
276 281
         <AuthButton name="admin.salesBatch.detail.get" noRight={null}>
277
-          <a style={{ color: '#66B3FF' }} onClick={raiseRefund(record)} >退费</a>
282
+          <a style={{ color: '#66B3FF' }} onClick={() => raiseRefund({visable:true, raiseRecordId: record.raiseRecordId})} >退费</a>
278 283
         </AuthButton>
279 284
       ),
280 285
     },
@@ -415,6 +420,7 @@ function PreselectionRecord(props) {
415 420
       <BatchInvalid visible={invalid.visable} houseIds={invalid.houseIds} onCancel={() => showInvalid(false)} onSuccess={() => showInvalid(false)}/>
416 421
       <BatchPay visible={pay.visable} houseIds={pay.houseIds} onCancel={() => showPay(false)} onSuccess={() => showPay(false)} />
417 422
       <BatchRefund visible={refund.visable} houseIds={refund.houseIds} onCancel={() => setRefund(false)} onSuccess={() => setRefund(false)}/>
423
+      <Refund visible={singleRefund.visable} raiseRecordId={singleRefund.raiseRecordId} onCancel={() => setSingleRefund({visable:false, raiseRecordId:''})}></Refund>
418 424
       <br/>
419 425
       <span>共筛选出{data.total}条数据</span>      
420 426
       <Table rowSelection={rowSelection} dataSource={data.records} columns={columns} pagination={false} rowKey="carouseFigureList"/>

+ 1
- 1
src/services/apis.js Просмотреть файл

@@ -1247,7 +1247,7 @@ export default {
1247 1247
     action: 'admin.taPreselection.put',
1248 1248
   },
1249 1249
   batchUpdateHeat: {
1250
-    url: `${prefix}/house/batchUpdateRaiseHeat`,
1250
+    url: `${prefix}/house/batchUpdateHeat`,
1251 1251
     method: 'PUT',
1252 1252
     action: 'admin.taPreselection.put',
1253 1253
   },