|
@@ -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"/>
|