|
|
@@ -238,7 +238,7 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<div class="presentation_style_two" v-if="model.money < 0">退款:</div>
|
|
|
- <a-col :span="24">
|
|
|
+ <a-col :span="24" v-if="model.money < 0">
|
|
|
<a-table :columns="columns" :data-source="feeList" bordered>
|
|
|
<template slot="payType" slot-scope="text, record, index">
|
|
|
{{ getPayTypeText(text) }}
|
|
|
@@ -249,8 +249,8 @@
|
|
|
<template slot="roomId" slot-scope="text, record, index">
|
|
|
{{ getRoomName(text) }}
|
|
|
</template>
|
|
|
- <template slot="refundType" slot-scope="text, record, index">
|
|
|
- <a-select style="width: 100px" v-model="record.refundType">
|
|
|
+ <template slot="payType" slot-scope="text, record, index">
|
|
|
+ <a-select style="width: 100px" v-model="record.payType">
|
|
|
<a-select-option v-for="(item, key) in payTypeList" :key="key" :value="item.id" :disabled="item.disable">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</template>
|
|
|
@@ -367,8 +367,8 @@ export default {
|
|
|
{
|
|
|
title: '退款方式',
|
|
|
dataIndex: 'payType',
|
|
|
- width: '40%',
|
|
|
- scopedSlots: { customRender: 'refundType' }
|
|
|
+ // width: '40%',
|
|
|
+ scopedSlots: { customRender: 'payType' }
|
|
|
},
|
|
|
{
|
|
|
title: '退款金额(元)',
|
|
|
@@ -514,6 +514,7 @@ export default {
|
|
|
pageSize: 99999,
|
|
|
pageNo: 1
|
|
|
}).then((res) => {
|
|
|
+ console.log(res);
|
|
|
if (res.success) {
|
|
|
this.payTypeList = res.result.records
|
|
|
if (this.payTypeList && this.payTypeList.length > 0) {
|
|
|
@@ -680,6 +681,8 @@ export default {
|
|
|
that.$message.warning('实收金额和实收合计必须相等')
|
|
|
return
|
|
|
}
|
|
|
+ console.log(this.model);
|
|
|
+ // return
|
|
|
var obj = {}
|
|
|
var fees = []
|
|
|
if (this.model.coupon) {
|
|
|
@@ -706,13 +709,39 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
- this.payList.forEach((item) => {
|
|
|
+ // this.payList.forEach((item) => {
|
|
|
+ // let remark = '结账收款'
|
|
|
+ // let money = item.money.toFixed(2)
|
|
|
+ // if (this.isRefund) {
|
|
|
+ // remark = '结账退款'
|
|
|
+ // money = -money
|
|
|
+ // }
|
|
|
+ // fees.push({
|
|
|
+ // feeType: this.model.feeType,
|
|
|
+ // money,
|
|
|
+ // payType: item.payType,
|
|
|
+ // custorerOrderRemark: remark,
|
|
|
+ // isPreferential: this.model.isPreferential,
|
|
|
+ // preferentialMoney: this.model.preferentialMoney
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ if (this.isRefund) {
|
|
|
+ this.feeList.forEach((item) => {
|
|
|
+ let remark =
|
|
|
+ // let money = -money
|
|
|
+ fees.push({
|
|
|
+ feeType: this.model.feeType,
|
|
|
+ money: -item.prerefund,
|
|
|
+ payType: item.payType,
|
|
|
+ custorerOrderRemark: '结账退款',
|
|
|
+ isPreferential: this.model.isPreferential,
|
|
|
+ preferentialMoney: this.model.preferentialMoney
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.payList.forEach((item) => {
|
|
|
let remark = '结账收款'
|
|
|
let money = item.money.toFixed(2)
|
|
|
- if (this.isRefund) {
|
|
|
- remark = '结账退款'
|
|
|
- money = -money
|
|
|
- }
|
|
|
fees.push({
|
|
|
feeType: this.model.feeType,
|
|
|
money,
|
|
|
@@ -722,6 +751,8 @@ export default {
|
|
|
preferentialMoney: this.model.preferentialMoney
|
|
|
})
|
|
|
})
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
that.confirmLoading = true
|
|
|
var url =
|
|
|
@@ -737,6 +768,7 @@ export default {
|
|
|
this.model.selectedFeeIds.length > 0
|
|
|
) {
|
|
|
url = '/business/busRoomBookingOrders/partial-settle'
|
|
|
+ // 部分
|
|
|
obj = {
|
|
|
fees: fees,
|
|
|
livingOrderId: this.model.livingOrderId,
|