|
|
@@ -576,10 +576,10 @@
|
|
|
<a-input-number v-model="rentCharges.money" :min="0" placeholder="输入金额" style="width: 100%"></a-input-number>
|
|
|
</a-col>
|
|
|
<a-col :span="3">元/月</a-col>
|
|
|
-<!-- <a-col :span="7">-->
|
|
|
-<!-- <a-input-number v-model="rentCharges.cycleNum" :min="0" placeholder="输入周期" style="width: 80%"></a-input-number>-->
|
|
|
-<!-- </a-col>-->
|
|
|
-<!-- <a-col :span="2"><span>月</span></a-col>-->
|
|
|
+ <!-- <a-col :span="7">-->
|
|
|
+ <!-- <a-input-number v-model="rentCharges.cycleNum" :min="0" placeholder="输入周期" style="width: 80%"></a-input-number>-->
|
|
|
+ <!-- </a-col>-->
|
|
|
+ <!-- <a-col :span="2"><span>月</span></a-col>-->
|
|
|
|
|
|
<!-- <a-col :span="6">-->
|
|
|
<!-- <a-select v-model="rentCharges.cycleUnit">-->
|
|
|
@@ -614,11 +614,11 @@
|
|
|
</a-col>
|
|
|
<a-col :span="2"><span>付</span></a-col>
|
|
|
<a-col :span="7">
|
|
|
-<!-- <a-select v-model="rentCharges.num" @change="rentNumChange">-->
|
|
|
-<!-- <a-select-option :value="1"> 付1 </a-select-option>-->
|
|
|
-<!-- <a-select-option :value="2"> 付2 </a-select-option>-->
|
|
|
-<!-- <a-select-option :value="3"> 付3 </a-select-option>-->
|
|
|
-<!-- </a-select>-->
|
|
|
+ <!-- <a-select v-model="rentCharges.num" @change="rentNumChange">-->
|
|
|
+ <!-- <a-select-option :value="1"> 付1 </a-select-option>-->
|
|
|
+ <!-- <a-select-option :value="2"> 付2 </a-select-option>-->
|
|
|
+ <!-- <a-select-option :value="3"> 付3 </a-select-option>-->
|
|
|
+ <!-- </a-select>-->
|
|
|
<a-input-number v-model="rentCharges.num" :min="1" @change="rentNumChange"></a-input-number>
|
|
|
</a-col>
|
|
|
</a-form-model-item>
|
|
|
@@ -674,13 +674,13 @@
|
|
|
<a-col :span="5" v-else-if="item.chargeType == 5">
|
|
|
<a-input-number v-model="model.roomIds[roomIdsIndex].gasMeter" :min="0" placeholder="读数" style="width: 100%"></a-input-number>
|
|
|
</a-col>
|
|
|
-<!-- <a-col :span="5" v-else-if="item.chargeType == 2">-->
|
|
|
-<!-- /月-->
|
|
|
-<!-- </a-col>-->
|
|
|
+ <!-- <a-col :span="5" v-else-if="item.chargeType == 2">-->
|
|
|
+ <!-- /月-->
|
|
|
+ <!-- </a-col>-->
|
|
|
|
|
|
<!-- <a-col :span="5" v-else-if="item.chargeType == 2">-->
|
|
|
-<!-- <a-input-number v-model="item.cycleNum" :min="0" placeholder="周期" style="width: 100%"></a-input-number>-->
|
|
|
-<!-- </a-col>-->
|
|
|
+ <!-- <a-input-number v-model="item.cycleNum" :min="0" placeholder="周期" style="width: 100%"></a-input-number>-->
|
|
|
+ <!-- </a-col>-->
|
|
|
<!-- <a-col :span="5" v-if="item.chargeType == 2">-->
|
|
|
<!-- <a-select v-model="item.cycleUnit">-->
|
|
|
<!-- <a-select-option :value="1"> 月 </a-select-option>-->
|
|
|
@@ -727,22 +727,22 @@
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="24" v-if="model.orderInfo.customerType === 2">
|
|
|
- <a-card :bordered="true" style="width: 100%;padding: 0 !important;">
|
|
|
+ <a-col :span="12" v-if="model.orderInfo.customerType === 2" style="display: flex; justify-content: flex-end;">
|
|
|
+ <a-card :bordered="true" style="width: 90%;padding: 0 !important; ">
|
|
|
<p>
|
|
|
<a-form-model-item
|
|
|
label="会员"
|
|
|
:labelCol="{
|
|
|
xs: { span: 24 },
|
|
|
- sm: { span: 2 },
|
|
|
+ sm: { span: 4 },
|
|
|
}"
|
|
|
:wrapperCol="{
|
|
|
xs: { span: 24 },
|
|
|
- sm: { span: 22 },
|
|
|
+ sm: { span: 20 },
|
|
|
}"
|
|
|
prop="orderInfo.vipCustomerId"
|
|
|
>
|
|
|
- <a-auto-complete v-model="vipCustomerData.name" @select="(e)=>handleSelectVip(e)" @search="handleSearchVip">
|
|
|
+ <a-auto-complete v-model="vipCustomerData.name" @select="(e)=>handleSelectVip(e)" @search="handleSearchVip" style="width: 60%;">
|
|
|
<template slot="dataSource">
|
|
|
<a-select-option
|
|
|
:key="item.id"
|
|
|
@@ -754,18 +754,21 @@
|
|
|
</a-select-option>
|
|
|
</template>
|
|
|
</a-auto-complete>
|
|
|
+ <a-button @click="addMember">增加</a-button>
|
|
|
</a-form-model-item>
|
|
|
</p>
|
|
|
<p>
|
|
|
<a-row>
|
|
|
- <a-col :span="8">名称:{{ vipCustomerData.name }}</a-col>
|
|
|
- <a-col :span="8">电话:{{ vipCustomerData.mobile }}</a-col>
|
|
|
- <a-col :span="8">级别:{{ vipCustomerData.gradeName }}</a-col>
|
|
|
+ <a-col :span="12">名称:{{ vipCustomerData.name }}</a-col>
|
|
|
+ <a-col :span="12">电话:{{ vipCustomerData.mobile }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="12">级别:{{ vipCustomerData.gradeName }}</a-col>
|
|
|
+ <a-col :span="12">余额:{{ vipCustomerData.balance }}</a-col>
|
|
|
</a-row>
|
|
|
<a-row>
|
|
|
- <a-col :span="8">余额:{{ vipCustomerData.balance }}</a-col>
|
|
|
- <a-col :span="8">积分:{{ vipCustomerData.integral }}</a-col>
|
|
|
- <a-col :span="8">卡号:{{ vipCustomerData.cardNo }}</a-col>
|
|
|
+ <a-col :span="12">积分:{{ vipCustomerData.integral }}</a-col>
|
|
|
+ <a-col :span="12">卡号:{{ vipCustomerData.cardNo }}</a-col>
|
|
|
</a-row>
|
|
|
</p>
|
|
|
</a-card>
|
|
|
@@ -883,7 +886,7 @@
|
|
|
财务信息
|
|
|
</h4>
|
|
|
<div v-if="model.orderInfo.bookingType !== 5">
|
|
|
- <a-switch v-model="depositSplit"/> 押金、房费分别记账到每个房间
|
|
|
+ <a-switch v-model="depositSplit"/> 押金分别记账到每个房间
|
|
|
</div>
|
|
|
</div>
|
|
|
<a-divider />
|
|
|
@@ -898,22 +901,18 @@
|
|
|
style=" height: auto"
|
|
|
>
|
|
|
<template slot="prefPrice" slot-scope="text, record, index">
|
|
|
- <div>
|
|
|
+ <div v-if="editPriceData[index].edit.length === 1">
|
|
|
+ <a-input-number v-model="editPriceData[index].edit[0].price" @blur="editPriceOk"></a-input-number>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
{{ text }}<a-icon @click="onCellExpand(index)" style="margin-left:10px;" type="edit" />
|
|
|
- <!-- <editable-cell
|
|
|
- :text="text"
|
|
|
-
|
|
|
- @change.stop="onCellChange('prefPrice', index, $event)"
|
|
|
- /> -->
|
|
|
</div>
|
|
|
+<!-- {{ text }}<a-icon @click="onCellExpand(index)" style="margin-left:10px;" type="edit" />-->
|
|
|
+
|
|
|
</template>
|
|
|
- <template slot="deposit" slot-scope="text, record, index">
|
|
|
- <!-- <editable-cell
|
|
|
- :text="text"
|
|
|
- @change="onCellChangeCopy('deposit', index, $event)"
|
|
|
- /> -->
|
|
|
- <a-input-number v-model="record.deposit" @change="onCellChangeCopy('deposit', index, $event)" :min="bookingPaidMoney == null ? 0 : bookingPaidMoney"></a-input-number>
|
|
|
- </template>
|
|
|
+ <!-- <template slot="deposit" slot-scope="text, record, index">-->
|
|
|
+ <!-- <a-input-number v-model="record.deposit" @change="onCellChangeCopy('deposit', index, $event)" :min="bookingPaidMoney == null ? 0 : bookingPaidMoney"></a-input-number>-->
|
|
|
+ <!-- </template>-->
|
|
|
</a-table>
|
|
|
<!-- 长租房账单-->
|
|
|
<a-table
|
|
|
@@ -928,30 +927,30 @@
|
|
|
class="zhandan_class "
|
|
|
>
|
|
|
<template slot="fangName" slot-scope="text, record, index" >
|
|
|
-<!-- <div style="margin: 0px -16px;">-->
|
|
|
-<!-- <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" class="table_list_item">-->
|
|
|
-<!-- {{ record.name }}-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
+ <!-- <div style="margin: 0px -16px;">-->
|
|
|
+ <!-- <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" class="table_list_item">-->
|
|
|
+ <!-- {{ record.name }}-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </div>-->
|
|
|
{{ record.name }}
|
|
|
</template>
|
|
|
<template slot="name" slot-scope="text, record, index" >
|
|
|
<div style="margin: 0 -16px;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
|
|
|
- <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" :title="item.name" class="table_list_item">
|
|
|
+ <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" :title="item.name" class="table_list_item">
|
|
|
{{ item.name }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template slot="chargeType" slot-scope="text, record, index" >
|
|
|
<div style="margin: 0 -16px;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
|
|
|
- <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" class="table_list_item">
|
|
|
+ <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" class="table_list_item">
|
|
|
{{ getChargeTypeText(item.chargeType) }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template slot="marketPrice" slot-scope="text, record, index" >
|
|
|
<div style="margin: 0 -16px;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
|
|
|
- <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" class="table_list_item">
|
|
|
+ <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" class="table_list_item">
|
|
|
{{ getMarketPriceText(item) }}
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -1178,7 +1177,9 @@
|
|
|
</div>
|
|
|
<div style="display:flex;justify-content: end; margin-top:20px;">
|
|
|
|
|
|
- <a-checkbox defaultChecked>打印入住登记单</a-checkbox></div>
|
|
|
+ <a-checkbox defaultChecked v-model="isPrintTemplate">打印入住登记单</a-checkbox>
|
|
|
+ <a-checkbox defaultChecked>预览入住登记单</a-checkbox>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -1242,7 +1243,10 @@
|
|
|
<member-card-modal ref="modalMemberCardInfo"></member-card-modal>
|
|
|
<agreement-unit-modal ref="modalAgreementUnitInfo"></agreement-unit-modal>
|
|
|
<agreement-unit-modal-table ref="modalAgreementUnitTable" @ok="modalAgreementUnitTableOk"></agreement-unit-modal-table>
|
|
|
- <history-modal ref="modalHistoryInfo"></history-modal>
|
|
|
+ <history-modal ref="modalHistoryInfo" @ok="modalHistoryOk"></history-modal>
|
|
|
+ <bus-member-top-up-modal ref="modalMemberTopUp"></bus-member-top-up-modal>
|
|
|
+ <bus-member-card-modal ref="modalMemberCard" @ok="addMemberOk"></bus-member-card-modal>
|
|
|
+ <print-template-modal ref="modalPrintTemplate"></print-template-modal>
|
|
|
</a-spin>
|
|
|
</template>
|
|
|
|
|
|
@@ -1255,6 +1259,11 @@ import MemberCardModal from './MemberCardModal'
|
|
|
import AgreementUnitModal from './AgreementUnitModal'
|
|
|
import AgreementUnitModalTable from './AgreementUnitModalTable'
|
|
|
import HistoryModal from './HistoryModal'
|
|
|
+import BusMemberTopUpModal from '@views/markets/modules/memberCard/BusMemberTopUp'
|
|
|
+import BusMemberCardModal from '@views/markets/modules/memberCard/BusMemberCardModal'
|
|
|
+import { goodBatchDel } from '@api/good'
|
|
|
+import PrintTemplate from '@views/settings/components/printTemplate'
|
|
|
+import PrintTemplateModal from '@views/settings/components/modules/printTemplateModal'
|
|
|
const columns = [
|
|
|
// {
|
|
|
// title: "",
|
|
|
@@ -1293,9 +1302,8 @@ const columns = [
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
- title: '押金',
|
|
|
+ title: '应缴押金',
|
|
|
dataIndex: 'deposit',
|
|
|
- scopedSlots: { customRender: 'deposit' },
|
|
|
width: 100
|
|
|
}
|
|
|
]
|
|
|
@@ -1404,6 +1412,10 @@ const endDate = new Date(date.setDate(date.getDate() + 1))
|
|
|
export default {
|
|
|
name: 'BillRoomForm',
|
|
|
components: {
|
|
|
+ PrintTemplateModal,
|
|
|
+ PrintTemplate,
|
|
|
+ BusMemberCardModal,
|
|
|
+ BusMemberTopUpModal,
|
|
|
EditableCell,
|
|
|
SelectRoomFormModal,
|
|
|
MemberCardModal,
|
|
|
@@ -1421,6 +1433,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ isPrintTemplate: true,
|
|
|
i: 1,
|
|
|
allChargeList: [],
|
|
|
utcTxt: null,
|
|
|
@@ -1583,9 +1596,9 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
editPriceData() {
|
|
|
- // console.log()
|
|
|
let copy = JSON.parse(JSON.stringify(this.model.roomPrices))
|
|
|
if (this.model.orderInfo.bookingType === 1) {
|
|
|
+ copy.length > 0 ? console.log("计算属性进来了") : ''
|
|
|
copy.forEach((item, index) => {
|
|
|
let brr = []
|
|
|
for (let j = 0; j < item.day; j++) {
|
|
|
@@ -1704,7 +1717,7 @@ export default {
|
|
|
})
|
|
|
this.editPriceOk()
|
|
|
}
|
|
|
- if (val == 1 ) {
|
|
|
+ if (val == 1) {
|
|
|
debugger
|
|
|
this.editPriceData.forEach(item => {
|
|
|
let arr = {}
|
|
|
@@ -1971,7 +1984,6 @@ export default {
|
|
|
if (res.success && res.result.records.length > 0) {
|
|
|
console.log(res.result.records)
|
|
|
res.result.records.forEach(e => {
|
|
|
- console.log(e)
|
|
|
if (e.layoutIds == null) {
|
|
|
e.layoutIdArr = []
|
|
|
return
|
|
|
@@ -2043,6 +2055,20 @@ export default {
|
|
|
// this.getcesRoomLayout();
|
|
|
},
|
|
|
methods: {
|
|
|
+ addMember() {
|
|
|
+ this.$refs.modalMemberCard.add()
|
|
|
+ },
|
|
|
+ addMemberOk() {
|
|
|
+ getAction('/business/busMemberCard/list', {
|
|
|
+ pageSize: 99999,
|
|
|
+ pageNo: 1
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.busMemberCardList = res.result.records
|
|
|
+ this.oldBusMemberCardList = JSON.parse(JSON.stringify(this.busMemberCardList))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getUserPayType(item) {
|
|
|
// if (this.model.orderInfo.customerType === 2 && item.name === '单位挂账' ||
|
|
|
// this.model.orderInfo.customerType === 3 && item.name === '会员卡' ||
|
|
|
@@ -2058,7 +2084,6 @@ export default {
|
|
|
// }
|
|
|
// return true
|
|
|
|
|
|
-
|
|
|
if (item.name === '会员卡') {
|
|
|
return this.model.orderInfo.customerType !== 2
|
|
|
} else if (item.name === '单位挂账') {
|
|
|
@@ -2077,10 +2102,8 @@ export default {
|
|
|
this.discount = 100
|
|
|
}
|
|
|
item.roomPrices.forEach(e => {
|
|
|
- e.edit.forEach(ele => {
|
|
|
- ele.price = this.getDayPrice(ele.day, e.layoutId)
|
|
|
- })
|
|
|
- e.prefPrice = e.edit[0].price
|
|
|
+ e.editPriceTime = []
|
|
|
+ // 会自动触发计算属性editPriceData,改变每日房价
|
|
|
})
|
|
|
this.editPriceOk()
|
|
|
},
|
|
|
@@ -2107,7 +2130,6 @@ export default {
|
|
|
this.monthCountChange(this.rentCharges.num)
|
|
|
|
|
|
this.rentNumChange()
|
|
|
-
|
|
|
},
|
|
|
// 押数量改变
|
|
|
depositNumChange(value) {
|
|
|
@@ -2143,10 +2165,10 @@ export default {
|
|
|
return '抄表类燃气费'
|
|
|
}
|
|
|
},
|
|
|
- getMarketPriceText(record){
|
|
|
+ getMarketPriceText(record) {
|
|
|
let standard = ''
|
|
|
standard = record.money + '元'
|
|
|
- if (record.chargeType === 2){
|
|
|
+ if (record.chargeType === 2) {
|
|
|
standard += '/月'
|
|
|
}
|
|
|
// if (record.cycleUnit === 1) {
|
|
|
@@ -2158,11 +2180,11 @@ export default {
|
|
|
// }
|
|
|
return standard
|
|
|
},
|
|
|
- getMeterText(charge, room){
|
|
|
- if (charge.chargeType === 1 && charge.isMust){
|
|
|
+ getMeterText(charge, room) {
|
|
|
+ if (charge.chargeType === 1 && charge.isMust) {
|
|
|
return '押' + charge.num
|
|
|
}
|
|
|
- if (charge.chargeType === 2 && charge.isMust){
|
|
|
+ if (charge.chargeType === 2 && charge.isMust) {
|
|
|
return '付' + charge.num
|
|
|
}
|
|
|
if (charge.chargeType === 3) {
|
|
|
@@ -2174,7 +2196,6 @@ export default {
|
|
|
if (charge.chargeType === 5) {
|
|
|
return '起始读数: ' + room.gasMeter
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
addCharges() {
|
|
|
if (this.chargeType == null) {
|
|
|
@@ -2240,6 +2261,7 @@ export default {
|
|
|
this.vipCustomerData = {}
|
|
|
this.agreementUnitData = { customerName: '' }
|
|
|
this.busMarketAgreementCustomer = {}
|
|
|
+ this.model.roomPrices.forEach(e => e.editPriceTime = [])
|
|
|
this.discount = 100
|
|
|
console.log(value)
|
|
|
this.housePriceSchemeList = this.specialSchemeList.filter(e => e.guestType == null || e.guestType === value)
|
|
|
@@ -2341,7 +2363,9 @@ export default {
|
|
|
var info = res.result
|
|
|
if (info) {
|
|
|
if (info.type === 0 && info.discount > 0 && this.model.orderInfo.roomPriceSlnId == null) {
|
|
|
+ this.model.roomPrices.forEach(e => e.editPriceTime = [])
|
|
|
this.discount = info.discount
|
|
|
+ console.log(this.discount, 'this.discount')
|
|
|
this.editPriceOk()
|
|
|
}
|
|
|
if (info.leaveTime != null && info.leaveTime !== '') {
|
|
|
@@ -2360,6 +2384,10 @@ export default {
|
|
|
this.discount = info.discount
|
|
|
}
|
|
|
},
|
|
|
+ modalHistoryOk(record) {
|
|
|
+ let find = this.customerList.find(e => e.id === record.id)
|
|
|
+ find.blackStatus = record.blackStatus
|
|
|
+ },
|
|
|
loadOrderFees() {
|
|
|
getAction('/business/busOrderFee/getBookingDeposit', { bookingOrderId: this.model.orderInfo.id }).then(resp => {
|
|
|
if (resp.success && resp.result.length > 0) {
|
|
|
@@ -2507,9 +2535,6 @@ export default {
|
|
|
}
|
|
|
roomIndex++
|
|
|
})
|
|
|
-
|
|
|
- console.log(orderFees, 'order')
|
|
|
- debugger
|
|
|
this.model.orderFees = orderFees
|
|
|
this.model.orderFees = this.model.orderFees.concat(this.bookingPaidFee)
|
|
|
setTimeout(() => {
|
|
|
@@ -2587,6 +2612,7 @@ export default {
|
|
|
*/
|
|
|
editPriceOk() {
|
|
|
this.model.roomPrices = JSON.parse(JSON.stringify(this.editPriceData))
|
|
|
+ console.log(this.model.roomPrices, 'this.model.roomPrices测试')
|
|
|
this.model.roomPrices.forEach((ele, index) => {
|
|
|
ele.editPriceTime = []
|
|
|
ele.editPrice = []
|
|
|
@@ -2927,16 +2953,40 @@ export default {
|
|
|
handleSelectMember(room, e) {
|
|
|
console.log('room', room)
|
|
|
let find = this.customerList.find((t) => t.id === e)
|
|
|
- this.$set(room, 'key1', find.name)
|
|
|
- this.$set(room, 'key2', find.gender)
|
|
|
- this.$set(room, 'key3', '汉')
|
|
|
- this.$set(room, 'key4', find.certNo)
|
|
|
- this.$set(room, 'key5', find.phone)
|
|
|
- this.$set(room, 'key6', find.address)
|
|
|
- this.$set(room, 'customerId', find.id)
|
|
|
- if (find.relationVipId !== null) {
|
|
|
- this.handleSelectVip(find.relationVipId)
|
|
|
+ console.log(find, 'find---------------')
|
|
|
+ if (!find.blackStatus) {
|
|
|
+ this.$set(room, 'key1', find.name)
|
|
|
+ this.$set(room, 'key2', find.gender)
|
|
|
+ this.$set(room, 'key3', '汉')
|
|
|
+ this.$set(room, 'key4', find.certNo)
|
|
|
+ this.$set(room, 'key5', find.phone)
|
|
|
+ this.$set(room, 'key6', find.address)
|
|
|
+ this.$set(room, 'customerId', find.id)
|
|
|
+ if (find.relationVipId !== null) {
|
|
|
+ this.handleSelectVip(find.relationVipId)
|
|
|
+ }
|
|
|
+ return
|
|
|
}
|
|
|
+ let that = this
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '该客人已在黑名单,是否确认入住',
|
|
|
+ okText: '确认',
|
|
|
+ cancelText: '取消',
|
|
|
+ closeOnClickModal: false,
|
|
|
+ onOk: () => {
|
|
|
+ that.$set(room, 'key1', find.name)
|
|
|
+ that.$set(room, 'key2', find.gender)
|
|
|
+ that.$set(room, 'key3', '汉')
|
|
|
+ that.$set(room, 'key4', find.certNo)
|
|
|
+ that.$set(room, 'key5', find.phone)
|
|
|
+ that.$set(room, 'key6', find.address)
|
|
|
+ that.$set(room, 'customerId', find.id)
|
|
|
+ if (find.relationVipId !== null) {
|
|
|
+ that.handleSelectVip(find.relationVipId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
pulsRoom() {
|
|
|
var that = this
|
|
|
@@ -3345,7 +3395,18 @@ export default {
|
|
|
console.log(this.model.roomPrices, 'this.model.roomPrices')
|
|
|
console.log(this.editPriceIndex, 'this.editPriceIndex')
|
|
|
var find = this.model.roomPrices[this.editPriceIndex]
|
|
|
+ console.log(find, 'find')
|
|
|
if (!find) {
|
|
|
+ console.log(this.model.roomIds.layoutDayPrices,'this.model --------------')
|
|
|
+ let editPrice = []
|
|
|
+ let editPriceTime = []
|
|
|
+ console.log(this.model.roomIds.layoutDayPrices)
|
|
|
+ if (item.layoutDayPrices && item.layoutDayPrices.length > 0) {
|
|
|
+ item.layoutDayPrices.forEach(layoutDayPrice => {
|
|
|
+ editPriceTime.push(layoutDayPrice.dayTime)
|
|
|
+ editPrice.push(layoutDayPrice.price)
|
|
|
+ })
|
|
|
+ }
|
|
|
var obj = {
|
|
|
roomNo: item.name,
|
|
|
roomId: item.id,
|
|
|
@@ -3355,7 +3416,9 @@ export default {
|
|
|
roomFee: 0,
|
|
|
deposit: this.compuleDeposit(item.marketPrice),
|
|
|
layoutName: roomLayout ? roomLayout.name : '',
|
|
|
- layoutId: item.layoutId
|
|
|
+ layoutId: item.layoutId,
|
|
|
+ editPrice: editPrice,
|
|
|
+ editPriceTime: editPriceTime
|
|
|
}
|
|
|
roomPrices.push(obj)
|
|
|
} else {
|
|
|
@@ -3364,6 +3427,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.model.roomPrices = [...this.model.roomPrices, ...roomPrices]
|
|
|
+ console.log(roomPrices, 'this.model.roomPrices')
|
|
|
+ console.log(this.model.roomPrices, 'this.model.roomPrices')
|
|
|
if (this.roomListCopy.length == 0) {
|
|
|
this.roomListCopy = JSON.parse(JSON.stringify(this.model.roomPrices))
|
|
|
} else {
|
|
|
@@ -3548,6 +3613,48 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ printTemplate(record) {
|
|
|
+ if (!this.isPrintTemplate) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ getAction('business/busPrintTemplate/list', { type: 8 }).then(resp => {
|
|
|
+ if (resp.success && resp.result.records.length > 0) {
|
|
|
+ resp.result.records[0].feeInfo = this.getPrintModal(record)
|
|
|
+ this.$refs.modalPrintTemplate.edit(resp.result.records[0])
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getPrintModal(record) {
|
|
|
+ console.log(record, 'record============')
|
|
|
+ let obj = {
|
|
|
+ orderNo: 'NO202305172255',
|
|
|
+ customerName: record.roomIds[0].key1,
|
|
|
+ customerSex: record.roomIds[0].key2 === 1 ? '男' : '女',
|
|
|
+ customerPhone: record.roomIds[0].key5,
|
|
|
+ customerCard: record.roomIds[0].key4,
|
|
|
+ customerAddress: record.roomIds[0].key6,
|
|
|
+ arrivalTime: record.orderInfo.arrivalTime,
|
|
|
+ checkInTime: '2023-05-15 16:30',
|
|
|
+ dueOutTime: record.orderInfo.dueOutTime,
|
|
|
+ stayDuration: record.orderInfo.dayCount,
|
|
|
+ checkInType: record.orderInfo.bookingType,
|
|
|
+ customerType: record.orderInfo.customerType,
|
|
|
+ customerIsVip: 0, // 0-不是;1-是vip
|
|
|
+ memberCardNo: 'VIP001',
|
|
|
+ memberLevel: '5',
|
|
|
+ memberCardBalance: '280元',
|
|
|
+ memberCardIntegral: '1400积分',
|
|
|
+ layoutName: '单人间',
|
|
|
+ source: '美团',
|
|
|
+ deposit: '现金支付:100.00元',
|
|
|
+ roomPrice: '微信支付:100.00元',
|
|
|
+ totalPaid: '200',
|
|
|
+ marketName: '张三',
|
|
|
+ breakfastNum: 8,
|
|
|
+ roomNo: '8212'
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+ },
|
|
|
submitForm() {
|
|
|
const that = this
|
|
|
let record = JSON.parse(JSON.stringify(this.model))
|
|
|
@@ -3596,7 +3703,6 @@ export default {
|
|
|
let chargeList = []
|
|
|
if (this.chooseLongRentScheme == null || this.chooseLongRentScheme.id == null) {
|
|
|
this.$message.warning('请选择长租房房价方案')
|
|
|
- return
|
|
|
}
|
|
|
record.orderInfo.longSchemeId = this.chooseLongRentScheme.id
|
|
|
this.collectionChargeList.forEach(e => {
|
|
|
@@ -3651,7 +3757,6 @@ export default {
|
|
|
console.log('record', record)
|
|
|
if (record.roomIds.length <= 0) {
|
|
|
that.$message.warning('请先添加房间')
|
|
|
- return
|
|
|
}
|
|
|
record.orderFees = record.orderFees.filter(t => !t.bookingYj)
|
|
|
// return
|
|
|
@@ -3695,6 +3800,7 @@ export default {
|
|
|
if (res.success) {
|
|
|
that.$message.success(res.message)
|
|
|
that.$emit('ok', { order: res.result, model: record })
|
|
|
+ that.printTemplate(record)
|
|
|
var arr = [
|
|
|
that.paymentSplit ? 1 : 2,
|
|
|
record.orderFees[0].subjectType == 1 ? 2 : 1,
|
|
|
@@ -3719,6 +3825,7 @@ export default {
|
|
|
order: res.result,
|
|
|
model: record
|
|
|
})
|
|
|
+ that.printTemplate(record)
|
|
|
} else {
|
|
|
if (res.message.indexOf('与预约时间有冲突') >= 0) {
|
|
|
} else {
|