|
|
@@ -515,11 +515,6 @@
|
|
|
<a-descriptions-item label="结账应收" v-else>
|
|
|
{{ (feesAmount - paymentAmount).toFixed(2) }}
|
|
|
</a-descriptions-item>
|
|
|
- <a-descriptions-item
|
|
|
- label="优 惠">
|
|
|
- <a-input-number v-model="preferentialMoney"></a-input-number>
|
|
|
- 元
|
|
|
- </a-descriptions-item>
|
|
|
</a-descriptions>
|
|
|
<a-button
|
|
|
v-if="paymentAmount - feesAmount > 0"
|
|
|
@@ -675,9 +670,12 @@ const columns = [
|
|
|
},
|
|
|
{
|
|
|
title: '单价',
|
|
|
- dataIndex: 'id',
|
|
|
+ dataIndex: 'money',
|
|
|
// width: 60,
|
|
|
customRender: function (text, record) {
|
|
|
+ if (record.subjectType === 6 && record.feeGoodVo.originalPrice) {
|
|
|
+ return record.feeGoodVo.originalPrice
|
|
|
+ }
|
|
|
return record.money
|
|
|
}
|
|
|
},
|
|
|
@@ -685,12 +683,21 @@ const columns = [
|
|
|
title: '优惠价',
|
|
|
dataIndex: 'money',
|
|
|
// width: 60,
|
|
|
+ customRender: function (text, record) {
|
|
|
+ if (record.subjectType === 6 && record.feeGoodVo.price) {
|
|
|
+ return record.feeGoodVo.price
|
|
|
+ }
|
|
|
+ return text
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '数量',
|
|
|
dataIndex: 'feeType',
|
|
|
width: 60,
|
|
|
- customRender: function (text) {
|
|
|
+ customRender: function (text, record) {
|
|
|
+ if (record.subjectType === 6 && record.feeGoodVo.num) {
|
|
|
+ return record.feeGoodVo.num
|
|
|
+ }
|
|
|
return 1
|
|
|
}
|
|
|
},
|
|
|
@@ -837,7 +844,6 @@ export default {
|
|
|
feesList: [],
|
|
|
oldfeesList: [],
|
|
|
paymentList: [],
|
|
|
- preferentialMoney: 0,
|
|
|
oldpaymentList: [],
|
|
|
payTypeList: [],
|
|
|
vipCustomer: {},
|
|
|
@@ -863,28 +869,9 @@ export default {
|
|
|
}, 0)
|
|
|
},
|
|
|
paymentAmount() {
|
|
|
- // var list = this.paymentList.filter((t) => t.subjectType !== 5);
|
|
|
- // var amount = list.reduce(function (total, item) {
|
|
|
- // return total + item.money;
|
|
|
- // }, 0);
|
|
|
-
|
|
|
- // var list2 = this.paymentList.filter((t) => t.subjectType == 5);
|
|
|
- // var amount2 = list2.reduce(function (total, item) {
|
|
|
- // return total + item.money;
|
|
|
- // }, 0);
|
|
|
- // var find = this.payTypeList.find(e => e.name === '会员卡')
|
|
|
- // var amount = this.paymentList.filter(t => t.payType !== find.id).reduce(function (total, item) {
|
|
|
- // return total + item.money
|
|
|
- // }, 0)
|
|
|
- let amount = 0
|
|
|
- this.paymentList.forEach(e => {
|
|
|
- if (e.subjectType === 13) {
|
|
|
- amount -= e.money
|
|
|
- } else {
|
|
|
- amount += e.money
|
|
|
- }
|
|
|
- })
|
|
|
- return amount
|
|
|
+ return this.paymentList.reduce(function (total, item) {
|
|
|
+ return total + item.money
|
|
|
+ }, 0)
|
|
|
},
|
|
|
btnSisabled() {
|
|
|
var index = this.model.livingRoomIds.findLastIndex(
|
|
|
@@ -1529,14 +1516,15 @@ export default {
|
|
|
this.$refs.modalRefundForm.payTypeList = this.payTypeList
|
|
|
},
|
|
|
strikeBalance() {
|
|
|
- debugger
|
|
|
- console.log(this.consumSelectedRows)
|
|
|
- if (this.consumSelectedRows.length === 0) {
|
|
|
- this.$message.warning('请先选择消费详情中需要冲账的账单')
|
|
|
- return
|
|
|
- }
|
|
|
- this.$refs.modalStrikeBalanceForm.title = '冲账单'
|
|
|
- this.$refs.modalStrikeBalanceForm.edit(this.consumSelectedRows)
|
|
|
+ console.log(this.model)
|
|
|
+ let map = new Map()
|
|
|
+ this.model.livingRoomIds.forEach(e => {
|
|
|
+ if (e.roomId !== '1') {
|
|
|
+ map.set(e.roomId, e.roomName)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$refs.modalStrikeBalanceForm.edit(this.feesList, map)
|
|
|
+ this.$refs.modalStrikeBalanceForm.title = '冲账'
|
|
|
},
|
|
|
enterAccount() {
|
|
|
let chooseRooms = [this.chooseLivingRoom]
|
|
|
@@ -1554,10 +1542,6 @@ export default {
|
|
|
)
|
|
|
var livingRoom = this.model.livingRoomIds[index]
|
|
|
var livingOrderId = ''
|
|
|
- if (livingRoom.isMain && livingRoom.roomId !== '1') {
|
|
|
- this.$message.warning('主房不能单独结账,请选择 全部')
|
|
|
- return
|
|
|
- }
|
|
|
if (livingRoom.roomId != '1') {
|
|
|
livingOrderId = livingRoom.livingOrder.id
|
|
|
} else {
|
|
|
@@ -1595,19 +1579,17 @@ export default {
|
|
|
subjectType: 5,
|
|
|
feeType: 2,
|
|
|
bookingOrderId: this.model.orderInfo.id,
|
|
|
- preferentialMoney: this.preferentialMoney,
|
|
|
livingOrderId:
|
|
|
livingRoom.roomId != '1' ? livingRoom.livingOrder.id : '',
|
|
|
vipCustomerId: livingRoom.livingOrder.vipCustomerId,
|
|
|
contractTeamId: livingRoom.livingOrder.contractTeamId,
|
|
|
- contractTeamProtocolId:
|
|
|
- livingRoom.livingOrder.contractTeamProtocolId,
|
|
|
+ contractTeamProtocolId: livingRoom.livingOrder.contractTeamProtocolId,
|
|
|
preferentialType: 1,
|
|
|
couponFirstAmount: 0,
|
|
|
discount: 9,
|
|
|
- isRefund: differMoney + this.preferentialMoney > 0
|
|
|
+ isRefund: differMoney > 0
|
|
|
})
|
|
|
- if (differMoney - this.preferentialMoney > 0) {
|
|
|
+ if (differMoney > 0) {
|
|
|
this.$refs.modalPayOrRefundForm.title = '结账收款'
|
|
|
// this.$refs.modalPayOrRefundForm.isRefund = false
|
|
|
} else {
|