|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div class="tab_height" style="display: flex; gap: 15px">
|
|
|
- <div style="width: 37%">
|
|
|
+ <div style="width: 33%">
|
|
|
<div style="display: flex; justify-content: space-between">
|
|
|
<h4
|
|
|
style="
|
|
|
@@ -22,7 +22,7 @@
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"/>
|
|
|
<a-button type="link"> 改为主房 </a-button>
|
|
|
</div>
|
|
|
- <div style="display: flex; flex-direction: column" @click="puls()">
|
|
|
+ <div style="display: flex; flex-direction: column" @click="puls()" v-if="isLiving">
|
|
|
<a-icon
|
|
|
type="clock-circle"
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
@@ -73,7 +73,7 @@
|
|
|
: "--"
|
|
|
}}
|
|
|
<a-icon
|
|
|
- v-if="livingIndex > 0"
|
|
|
+ v-if="livingIndex > 0 && isLiving"
|
|
|
@click="editCustomer(item)"
|
|
|
type="edit"
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
@@ -97,7 +97,7 @@
|
|
|
: "--"
|
|
|
}}
|
|
|
<a-icon
|
|
|
- v-if="livingIndex > 0"
|
|
|
+ v-if="livingIndex > 0 && isLiving"
|
|
|
@click="editCustomer(item)"
|
|
|
type="edit"
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
@@ -106,7 +106,7 @@
|
|
|
<a-descriptions-item label="宾客类型">
|
|
|
{{ customerTypeName( item.livingOrder && item.livingOrder.customerType) }}
|
|
|
<a-icon
|
|
|
- v-if="livingIndex > 0"
|
|
|
+ v-if="livingIndex > 0 && isLiving"
|
|
|
@click="editCustomerType(item)"
|
|
|
type="edit"
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
@@ -121,7 +121,7 @@
|
|
|
<a-descriptions-item label="订单来源">
|
|
|
{{ customerSourceName( item.livingOrder && item.livingOrder.customerSource) }}
|
|
|
<a-icon
|
|
|
- v-if="livingIndex > 0"
|
|
|
+ v-if="livingIndex > 0 && isLiving"
|
|
|
@click="editCustomerSource(item)"
|
|
|
type="edit"
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
@@ -129,7 +129,7 @@
|
|
|
<a-descriptions-item label="入住类型">
|
|
|
{{ getlivingTypeText( item.livingOrder && item.livingOrder.livingType) }}
|
|
|
<a-icon
|
|
|
- v-if="livingIndex > 0"
|
|
|
+ v-if="livingIndex > 0 && isLiving"
|
|
|
@click="editBookingType(item)"
|
|
|
type="edit"
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
@@ -141,7 +141,7 @@
|
|
|
<a-descriptions-item label="早餐券">
|
|
|
{{ item.livingOrder && item.livingOrder.breakfastNum }}
|
|
|
<a-icon
|
|
|
- v-if="livingIndex > 0"
|
|
|
+ v-if="livingIndex > 0 && isLiving"
|
|
|
@click="editBreakfastNum(item)"
|
|
|
type="edit"
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
@@ -153,7 +153,7 @@
|
|
|
<a-descriptions-item label="销售员工">
|
|
|
{{ warranterName( item.livingOrder && item.livingOrder.warranter) }}
|
|
|
<a-icon
|
|
|
- v-if="livingIndex > 0"
|
|
|
+ v-if="livingIndex > 0 && isLiving"
|
|
|
@click="editWarranter(item)"
|
|
|
type="edit"
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
@@ -161,7 +161,7 @@
|
|
|
<a-descriptions-item label="订单备注" :span="2">
|
|
|
{{ item.livingOrder && item.livingOrder.remark
|
|
|
}}<a-icon
|
|
|
- v-if="livingIndex > 0"
|
|
|
+ v-if="livingIndex > 0 && isLiving"
|
|
|
@click="editRemark(item)"
|
|
|
type="edit"
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
@@ -178,7 +178,8 @@
|
|
|
>
|
|
|
<a-descriptions-item label="叫醒服务" :span="2">
|
|
|
<a-icon
|
|
|
- type="plus-circle"
|
|
|
+ v-if="isLiving"
|
|
|
+ type="plus-circle"
|
|
|
class="dynamic-delete-button"
|
|
|
@click="puls()"
|
|
|
/>
|
|
|
@@ -371,7 +372,7 @@
|
|
|
</a-descriptions></template
|
|
|
>
|
|
|
</div>
|
|
|
- <div style="width: 46%">
|
|
|
+ <div style="width: 50%">
|
|
|
<div style="display: flex; justify-content: space-between">
|
|
|
<h4
|
|
|
style="
|
|
|
@@ -385,6 +386,7 @@
|
|
|
<div style="display: flex">
|
|
|
<div
|
|
|
@click="strikeBalance"
|
|
|
+ :class="`${isLiving ? '' : 'disabled'}`"
|
|
|
style="display: flex; flex-direction: column">
|
|
|
<a-icon
|
|
|
type="pound"
|
|
|
@@ -408,7 +410,7 @@
|
|
|
增加消费
|
|
|
</a-button>
|
|
|
</div>
|
|
|
- <div style="display: flex; flex-direction: column">
|
|
|
+ <div :class="`${isLiving ? '' : 'disabled'}`" style="display: flex; flex-direction: column">
|
|
|
<a-icon
|
|
|
type="property-safety"
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
@@ -425,7 +427,7 @@
|
|
|
<a-tabs :v-model="active" @change="tabFeeChange" style="padding-top: 0px">
|
|
|
<a-tab-pane tab="全部账单" key="0" :forceRender="true">
|
|
|
<a-table
|
|
|
- :columns="columns"
|
|
|
+ :columns="columns0"
|
|
|
:data-source="entiretyList"
|
|
|
:pagination="false"
|
|
|
:scroll="{ y: 160 }"
|
|
|
@@ -447,20 +449,24 @@
|
|
|
<span class="strike_style" v-if="record.returnItem">{{ record.dayTime }}</span>
|
|
|
<span v-else>{{ record.dayTime }}</span>
|
|
|
</template>
|
|
|
- <!-- <template slot="originalPrice" slot-scope="text, record, index" class="strike_style">
|
|
|
- {{ record.originalPrice }}
|
|
|
- </template> -->
|
|
|
- <template slot="feeType" slot-scope="text, record, index" class="strike_style">
|
|
|
- <span class="strike_style" v-if="record.returnItem">{{ (record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.num ? record.feeGoodVo.num : 1 }}</span>
|
|
|
+ <!-- 单价-->
|
|
|
+ <template slot="originalPrice" slot-scope="text, record, index" class="strike_style">
|
|
|
+ <span class="strike_style" v-if="record.returnItem">--</span>
|
|
|
+ <span v-else>{{ (record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.originalPrice ? record.feeGoodVo.originalPrice : record.originalMoney }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="num" slot-scope="text, record, index" class="strike_style">
|
|
|
+ <span class="strike_style" v-if="record.returnItem">{{ record.returnNum }}</span>
|
|
|
<span v-else>{{ (record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.num ? record.feeGoodVo.num : 1 }}</span>
|
|
|
</template>
|
|
|
+ <!-- 小计 -->
|
|
|
<template slot="originalMoney" slot-scope="text, record, index" class="strike_style">
|
|
|
- <span class="strike_style" v-if="record.returnItem">{{ record.originalMoney }}</span>
|
|
|
+ <span class="strike_style" v-if="record.returnItem">{{ record.money }}</span>
|
|
|
<span v-else>{{ record.originalMoney }}</span>
|
|
|
</template>
|
|
|
+ <!--优惠价-->
|
|
|
<template slot="money" slot-scope="text, record, index" class="strike_style">
|
|
|
- <span class="strike_style" v-if="record.returnItem">{{ record.originalMoney / ((record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.num ? record.feeGoodVo.num : 1) }}</span>
|
|
|
- <span v-else>{{ record.originalMoney / ((record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.num ? record.feeGoodVo.num : 1) }}</span>
|
|
|
+ <span class="strike_style" v-if="record.returnItem">--</span>
|
|
|
+ <span v-else>{{ (record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.price ? record.feeGoodVo.price : 1 }}</span>
|
|
|
</template>
|
|
|
<!-- <template slot="roomId" slot-scope="text, record, index" class="strike_style">
|
|
|
{{ getRoomName(text) }}
|
|
|
@@ -478,16 +484,14 @@
|
|
|
</a-tab-pane>
|
|
|
<a-tab-pane tab="未结算" key="1" :forceRender="true">
|
|
|
<a-table
|
|
|
- :columns="columns"
|
|
|
+ :columns="columns1"
|
|
|
:data-source="feesList"
|
|
|
:pagination="false"
|
|
|
:scroll="{ y: 160 }"
|
|
|
rowKey="id"
|
|
|
:rowSelection="{
|
|
|
consumSelectedRowKeys: consumSelectedRowKeys,
|
|
|
- onChange: onSelectChange,
|
|
|
- }"
|
|
|
- >
|
|
|
+ onChange: onSelectChange}">
|
|
|
<template slot="subjectType" slot-scope="text, record, index">
|
|
|
{{ getSubjectTypeText(text,record) }}
|
|
|
</template>
|
|
|
@@ -507,7 +511,7 @@
|
|
|
</a-tab-pane>
|
|
|
<a-tab-pane tab="已结算" key="2">
|
|
|
<a-table
|
|
|
- :columns="columns"
|
|
|
+ :columns="columns1"
|
|
|
:data-source="paidList"
|
|
|
:pagination="false"
|
|
|
:scroll="{ y: 160 }"
|
|
|
@@ -576,6 +580,7 @@
|
|
|
<div style="display: flex" >
|
|
|
<div
|
|
|
@click="enterAccount"
|
|
|
+ :class="`${isLiving ? '' : 'disabled'}`"
|
|
|
style="display: flex; flex-direction: column">
|
|
|
<a-icon
|
|
|
type="transaction"
|
|
|
@@ -764,7 +769,7 @@ import AdjustPriceForm from '@views/room/modules/checkIn/AdjustPriceForm'
|
|
|
import StrikeBalance from '@views/room/modules/checkIn/StrikeBalanceModel'
|
|
|
import StrikeBalanceModel from '@views/room/modules/checkIn/StrikeBalanceModel'
|
|
|
import EnterAccountModel from '@views/room/modules/checkIn/EnterAccountModel'
|
|
|
-const columns = [
|
|
|
+const columns0 = [
|
|
|
{
|
|
|
title: '房间号',
|
|
|
dataIndex: 'roomId',
|
|
|
@@ -797,12 +802,12 @@ const columns = [
|
|
|
width: 67,
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'originalPrice' },
|
|
|
- customRender: function (text, record) {
|
|
|
- if ((record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.originalPrice) {
|
|
|
- return record.feeGoodVo.originalPrice
|
|
|
- }
|
|
|
- return record.originalMoney
|
|
|
- }
|
|
|
+ // customRender: function (text, record) {
|
|
|
+ // if ((record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.originalPrice) {
|
|
|
+ // return record.feeGoodVo.originalPrice
|
|
|
+ // }
|
|
|
+ // return record.originalMoney
|
|
|
+ // }
|
|
|
},
|
|
|
{
|
|
|
title: '优惠价',
|
|
|
@@ -811,15 +816,18 @@ const columns = [
|
|
|
scopedSlots: { customRender: 'money' },
|
|
|
width: 67,
|
|
|
// customRender: function (text, record) {
|
|
|
- // return (record.originalMoney / record.feeType)
|
|
|
+ // if ((record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.price) {
|
|
|
+ // return record.feeGoodVo.price
|
|
|
+ // }
|
|
|
+ // return record.originalMoney
|
|
|
// }
|
|
|
},
|
|
|
{
|
|
|
title: '数量',
|
|
|
- dataIndex: 'feeType',
|
|
|
+ dataIndex: 'num',
|
|
|
width: 60,
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'feeType' },
|
|
|
+ scopedSlots: { customRender: 'num' },
|
|
|
// customRender: function (text, record) {
|
|
|
// if ((record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.num) {
|
|
|
// return record.feeGoodVo.num
|
|
|
@@ -836,6 +844,76 @@ const columns = [
|
|
|
},
|
|
|
|
|
|
]
|
|
|
+const columns1 = [
|
|
|
+ {
|
|
|
+ title: '房间号',
|
|
|
+ dataIndex: 'roomId',
|
|
|
+ width: 80,
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: { customRender: 'roomId' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '费项',
|
|
|
+ dataIndex: 'subjectType',
|
|
|
+ width: 150,
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: { customRender: 'subjectType' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '入账日期',
|
|
|
+ dataIndex: 'dayTime',
|
|
|
+ width: 180,
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: { customRender: 'dayTime' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '单价',
|
|
|
+ // dataIndex: 'money',
|
|
|
+ width: 67,
|
|
|
+ align: 'center',
|
|
|
+ // scopedSlots: { customRender: 'originalPrice' },
|
|
|
+ customRender: function (text, record) {
|
|
|
+ if ((record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.originalPrice) {
|
|
|
+ return record.feeGoodVo.originalPrice
|
|
|
+ }
|
|
|
+ return record.originalMoney
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '优惠价',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'money',
|
|
|
+ // scopedSlots: { customRender: 'money' },
|
|
|
+ width: 67,
|
|
|
+ customRender: function (text, record) {
|
|
|
+ if ((record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.price) {
|
|
|
+ return record.feeGoodVo.price
|
|
|
+ }
|
|
|
+ return record.originalMoney
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '数量',
|
|
|
+ dataIndex: 'num',
|
|
|
+ width: 60,
|
|
|
+ align: 'center',
|
|
|
+ // scopedSlots: { customRender: 'num' },
|
|
|
+ customRender: function (text, record) {
|
|
|
+ if ((record.subjectType === 6 || record.subjectType === 7) && record.feeGoodVo.num) {
|
|
|
+ return record.feeGoodVo.num
|
|
|
+ }
|
|
|
+ return 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '小计',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'originalMoney',
|
|
|
+ scopedSlots: { customRender: 'originalMoney' },
|
|
|
+ width: 67
|
|
|
+ },
|
|
|
+
|
|
|
+]
|
|
|
|
|
|
const columns2 = [
|
|
|
{
|
|
|
@@ -871,14 +949,14 @@ const strikeColumns = [
|
|
|
{
|
|
|
title: '房间号',
|
|
|
dataIndex: 'roomId',
|
|
|
- width: 80,
|
|
|
+ width: 60,
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'roomId' }
|
|
|
},
|
|
|
{
|
|
|
title: '费项',
|
|
|
dataIndex: 'subjectType',
|
|
|
- width: 150,
|
|
|
+ width: 120,
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'subjectType' }
|
|
|
},
|
|
|
@@ -887,11 +965,12 @@ const strikeColumns = [
|
|
|
dataIndex: 'dayTime',
|
|
|
width: 110,
|
|
|
align: 'center',
|
|
|
- customRender: function (text, record) {
|
|
|
- if (text !== null && text !== '') {
|
|
|
- return record.dayTime.substring(0, 10)
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '冲账数量',
|
|
|
+ align: 'center',
|
|
|
+ dataIndex: 'returnNum',
|
|
|
+ width: 67,
|
|
|
},
|
|
|
{
|
|
|
title: '冲账金额',
|
|
|
@@ -957,6 +1036,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ isLiving: true,
|
|
|
wakeService: false,
|
|
|
wakeTime: {
|
|
|
id: '',
|
|
|
@@ -967,7 +1047,8 @@ export default {
|
|
|
consumSelectedRowKeys: [],
|
|
|
consumSelectedRows: [],
|
|
|
data,
|
|
|
- columns,
|
|
|
+ columns0,
|
|
|
+ columns1,
|
|
|
data2,
|
|
|
columns2,
|
|
|
strikeColumns,
|
|
|
@@ -1581,7 +1662,8 @@ export default {
|
|
|
console.log(this.tempindex);
|
|
|
this.entiretyList.splice(tempindex+1,0,item)
|
|
|
})
|
|
|
- this.$emit('changeLivingStatu', find.livingOrder.settleType !== 2)
|
|
|
+ this.isLiving = find.livingOrder.settleType === -1
|
|
|
+ this.$emit('changeLivingStatu', find.livingOrder.settleType)
|
|
|
}
|
|
|
},
|
|
|
getPayTypeText(text) {
|
|
|
@@ -1856,6 +1938,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
let fees = JSON.parse(JSON.stringify(this.feesList))
|
|
|
+ fees.forEach(e => {
|
|
|
+ if (e.subjectType === 6 || e.subjectType === 7) {
|
|
|
+ let returnNum = this.strikeList.filter(ele => ele.returnFeeId === e.id).reduce((sum, val) => {
|
|
|
+ return sum + val.returnNum
|
|
|
+ }, 0)
|
|
|
+ e.feeGoodVo.num = e.feeGoodVo.num - returnNum;
|
|
|
+ }
|
|
|
+ })
|
|
|
let vipId = {
|
|
|
vipCustomerId: this.model.vipCustomerId
|
|
|
}
|