魏超 5 anni fa
parent
commit
b87dc48945

+ 1
- 1
src/pages/house/house/edit/components/house.jsx Vedi File

144
     },
144
     },
145
     {
145
     {
146
       title: '房源',
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
     //   title: '期/区',
150
     //   title: '期/区',

+ 2
- 3
src/pages/house/preSelect/edit/components/BasicHeat/index.jsx Vedi File

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

+ 1
- 1
src/pages/house/preSelect/edit/components/preselectionHouse.jsx Vedi File

207
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
207
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
208
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
208
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
209
       </div>   
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 Vedi File

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 Vedi File

16
 import BatchInvalid from './BatchRaise/BatchInvalid';
16
 import BatchInvalid from './BatchRaise/BatchInvalid';
17
 import BatchPay from './BatchRaise/BatchPay';
17
 import BatchPay from './BatchRaise/BatchPay';
18
 import BatchRefund from './BatchRaise/BatchRefund';
18
 import BatchRefund from './BatchRaise/BatchRefund';
19
+import Refund from './BatchRaise/Refund';
19
 
20
 
20
 /**
21
 /**
21
  *图片设置
22
  *图片设置
31
   const [pay, setPay] = useState({visable:false,houseIds:''})
32
   const [pay, setPay] = useState({visable:false,houseIds:''})
32
   const [refund, setRefund] = useState({visable:false,houseIds:''})
33
   const [refund, setRefund] = useState({visable:false,houseIds:''})
33
   const [taRaiseRecords, setTaRaiseRecords] = useState([])
34
   const [taRaiseRecords, setTaRaiseRecords] = useState([])
35
+  const [singleRefund, setSingleRefund] = useState({visable:false, raiseRecordId:''})
34
   const raiseId = props.raiseId.raiseId
36
   const raiseId = props.raiseId.raiseId
35
   const salesBatchId = props.salesBatchId
37
   const salesBatchId = props.salesBatchId
36
   const buildingId = props.buildingId
38
   const buildingId = props.buildingId
117
     setRefund(e)
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
   function toDelBatch(){
141
   function toDelBatch(){
137
     console.log(taRaiseRecords, 'houseIdListhouseIdList')
142
     console.log(taRaiseRecords, 'houseIdListhouseIdList')
274
       align: 'center',
279
       align: 'center',
275
       render: (text, record) => (
280
       render: (text, record) => (
276
         <AuthButton name="admin.salesBatch.detail.get" noRight={null}>
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
         </AuthButton>
283
         </AuthButton>
279
       ),
284
       ),
280
     },
285
     },
415
       <BatchInvalid visible={invalid.visable} houseIds={invalid.houseIds} onCancel={() => showInvalid(false)} onSuccess={() => showInvalid(false)}/>
420
       <BatchInvalid visible={invalid.visable} houseIds={invalid.houseIds} onCancel={() => showInvalid(false)} onSuccess={() => showInvalid(false)}/>
416
       <BatchPay visible={pay.visable} houseIds={pay.houseIds} onCancel={() => showPay(false)} onSuccess={() => showPay(false)} />
421
       <BatchPay visible={pay.visable} houseIds={pay.houseIds} onCancel={() => showPay(false)} onSuccess={() => showPay(false)} />
417
       <BatchRefund visible={refund.visable} houseIds={refund.houseIds} onCancel={() => setRefund(false)} onSuccess={() => setRefund(false)}/>
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
       <br/>
424
       <br/>
419
       <span>共筛选出{data.total}条数据</span>      
425
       <span>共筛选出{data.total}条数据</span>      
420
       <Table rowSelection={rowSelection} dataSource={data.records} columns={columns} pagination={false} rowKey="carouseFigureList"/>
426
       <Table rowSelection={rowSelection} dataSource={data.records} columns={columns} pagination={false} rowKey="carouseFigureList"/>

+ 1
- 1
src/services/apis.js Vedi File

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