|
|
@@ -118,7 +118,7 @@
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
/></a-descriptions-item>
|
|
|
<a-descriptions-item label="入住类型">
|
|
|
- {{ item.livingOrder.livingType == 1 ? "全天" : "钟点" }}
|
|
|
+ {{ getlivingTypeText(item.livingOrder.livingType) }}
|
|
|
<a-icon
|
|
|
v-if="livingIndex > 0"
|
|
|
@click="editBookingType(item)"
|
|
|
@@ -158,42 +158,58 @@
|
|
|
style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
/>
|
|
|
</a-descriptions-item>
|
|
|
- <template v-if="wakeList.filter(item=> { return tabSelectRoomId==1? item : tabSelectRoomId==item.roomId}).length==0">
|
|
|
- <a-descriptions-item
|
|
|
- label="叫醒服务"
|
|
|
- :span="2"
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ wakeList.filter((item) => {
|
|
|
+ return tabSelectRoomId == 1
|
|
|
+ ? item
|
|
|
+ : tabSelectRoomId == item.roomId;
|
|
|
+ }).length == 0
|
|
|
+ "
|
|
|
>
|
|
|
- <a-icon
|
|
|
- type="plus-circle"
|
|
|
- class="dynamic-delete-button"
|
|
|
- @click="puls()"
|
|
|
- />
|
|
|
- </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="叫醒服务" :span="2">
|
|
|
+ <a-icon
|
|
|
+ type="plus-circle"
|
|
|
+ class="dynamic-delete-button"
|
|
|
+ @click="puls()"
|
|
|
+ />
|
|
|
+ </a-descriptions-item>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<a-descriptions-item
|
|
|
- label="叫醒服务"
|
|
|
- :span="2"
|
|
|
- v-for="(item, index) in wakeList.filter(item=> { return tabSelectRoomId==1? item : tabSelectRoomId==item.roomId})"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- {{item.roomName}} {{item.jxDate? item.jxDate+' /' :''}} {{item.jxTime}}
|
|
|
- <a-icon
|
|
|
- v-if="wakeList.filter(item=> { return tabSelectRoomId==1? item : tabSelectRoomId==item.roomId}).length - 1 == index"
|
|
|
- type="plus-circle"
|
|
|
- class="dynamic-delete-button"
|
|
|
- @click="puls()"
|
|
|
- />
|
|
|
- <a-icon
|
|
|
- type="minus-circle"
|
|
|
- style="color: #f56c6c"
|
|
|
- class="dynamic-delete-button"
|
|
|
- @click="removeWakeService(item.id)"
|
|
|
- />
|
|
|
- </a-descriptions-item>
|
|
|
+ label="叫醒服务"
|
|
|
+ :span="2"
|
|
|
+ v-for="(item, index) in wakeList.filter((item) => {
|
|
|
+ return tabSelectRoomId == 1
|
|
|
+ ? item
|
|
|
+ : tabSelectRoomId == item.roomId;
|
|
|
+ })"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ {{ item.roomName }}
|
|
|
+ {{ item.jxDate ? item.jxDate + " /" : "" }} {{ item.jxTime }}
|
|
|
+ <a-icon
|
|
|
+ v-if="
|
|
|
+ wakeList.filter((item) => {
|
|
|
+ return tabSelectRoomId == 1
|
|
|
+ ? item
|
|
|
+ : tabSelectRoomId == item.roomId;
|
|
|
+ }).length -
|
|
|
+ 1 ==
|
|
|
+ index
|
|
|
+ "
|
|
|
+ type="plus-circle"
|
|
|
+ class="dynamic-delete-button"
|
|
|
+ @click="puls()"
|
|
|
+ />
|
|
|
+ <a-icon
|
|
|
+ type="minus-circle"
|
|
|
+ style="color: #f56c6c"
|
|
|
+ class="dynamic-delete-button"
|
|
|
+ @click="removeWakeService(item.id)"
|
|
|
+ />
|
|
|
+ </a-descriptions-item>
|
|
|
</template>
|
|
|
-
|
|
|
-
|
|
|
</a-descriptions>
|
|
|
<div style="display: flex; justify-content: space-between">
|
|
|
<h4
|
|
|
@@ -503,14 +519,28 @@
|
|
|
></edit-booking-type-modal>
|
|
|
|
|
|
<!-- 叫醒服务弹窗 -->
|
|
|
- <a-modal :title="'叫醒服务'" :visible="wakeService" @cancel="wakeService = false" @ok="wakeServiceOk" destroyOnClose>
|
|
|
+ <a-modal
|
|
|
+ :title="'叫醒服务'"
|
|
|
+ :visible="wakeService"
|
|
|
+ @cancel="wakeService = false"
|
|
|
+ @ok="wakeServiceOk"
|
|
|
+ destroyOnClose
|
|
|
+ >
|
|
|
<a-select
|
|
|
style="width: 100px"
|
|
|
placeholder="房间号"
|
|
|
@change="onChange"
|
|
|
v-model="wakeTime.id"
|
|
|
>
|
|
|
- <a-select-option :value="item.livingOrder.id" v-for="(item, index) in (model.livingRoomIds || []).filter(item=> item.roomName!='全部')" :key="index"> {{item.roomName}} </a-select-option>
|
|
|
+ <a-select-option
|
|
|
+ :value="item.livingOrder.id"
|
|
|
+ v-for="(item, index) in (model.livingRoomIds || []).filter(
|
|
|
+ (item) => item.roomName != '全部'
|
|
|
+ )"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ {{ item.roomName }}
|
|
|
+ </a-select-option>
|
|
|
<!-- <a-select-option value="lucy"> 1002 </a-select-option> -->
|
|
|
</a-select>
|
|
|
<a-date-picker
|
|
|
@@ -673,7 +703,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
wakeService: false,
|
|
|
- wakeTime:{
|
|
|
+ wakeTime: {
|
|
|
id: "",
|
|
|
date: "",
|
|
|
time: "",
|
|
|
@@ -807,7 +837,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
// 叫醒服务
|
|
|
- wakeServiceOk(){
|
|
|
+ wakeServiceOk() {
|
|
|
console.log(this.wakeTime);
|
|
|
if (!this.wakeTime.id) {
|
|
|
this.$message.warning("请选择房间号");
|
|
|
@@ -825,50 +855,52 @@ export default {
|
|
|
livingOrderId: this.wakeTime.id,
|
|
|
jxDate: this.wakeTime.date,
|
|
|
jxTime: this.wakeTime.time,
|
|
|
- }
|
|
|
- postAction('/fw/fwLivingJx/add',obj).then(res=>{
|
|
|
- if(res.success){
|
|
|
+ };
|
|
|
+ postAction("/fw/fwLivingJx/add", obj).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
this.$message.success("添加成功");
|
|
|
this.wakeTime = {};
|
|
|
- this.getWakeServiceData()
|
|
|
+ this.getWakeServiceData();
|
|
|
this.wakeService = false;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.$message.warning(res.message);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
//获取叫醒服务数据
|
|
|
- getWakeServiceData(){
|
|
|
- let ids = []
|
|
|
- this.model.livingRoomIds.forEach(item=>{
|
|
|
- if(item.roomName!='全部'){
|
|
|
- ids.push(item.livingOrder.id)
|
|
|
+ getWakeServiceData() {
|
|
|
+ let ids = [];
|
|
|
+ this.model.livingRoomIds.forEach((item) => {
|
|
|
+ if (item.roomName != "全部") {
|
|
|
+ ids.push(item.livingOrder.id);
|
|
|
}
|
|
|
- })
|
|
|
- getAction('/fw/fwLivingJx/list?livingOrderId=' + ids.toString()).then(res=>{
|
|
|
- if(res.success){
|
|
|
- this.wakeList = res.result.records;
|
|
|
+ });
|
|
|
+ getAction("/fw/fwLivingJx/list?livingOrderId=" + ids.toString()).then(
|
|
|
+ (res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.wakeList = res.result.records;
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
+ );
|
|
|
},
|
|
|
//删除叫醒服务
|
|
|
- removeWakeService(id){
|
|
|
- deleteAction('/fw/fwLivingJx/delete?id=' + id).then(res=>{
|
|
|
- if(res.success){
|
|
|
+ removeWakeService(id) {
|
|
|
+ deleteAction("/fw/fwLivingJx/delete?id=" + id).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
this.$message.success("删除成功");
|
|
|
this.getWakeServiceData();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.$message.warning(res.message);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- onChangeWakeService(e, e1){
|
|
|
+ onChangeWakeService(e, e1) {
|
|
|
console.log(e, e1);
|
|
|
this.wakeTime.date = e1;
|
|
|
},
|
|
|
- onChangeWakeServiceTime(e,e1){
|
|
|
- console.log(e,e1);
|
|
|
- this.wakeTime.time = e1
|
|
|
+ onChangeWakeServiceTime(e, e1) {
|
|
|
+ console.log(e, e1);
|
|
|
+ this.wakeTime.time = e1;
|
|
|
},
|
|
|
editBookingType(item) {
|
|
|
var obj = {
|
|
|
@@ -909,6 +941,21 @@ export default {
|
|
|
this.$refs.modalEditWarranter.title = "修改";
|
|
|
this.$refs.modalEditWarranter.disableSubmit = false;
|
|
|
},
|
|
|
+ getlivingTypeText(livingType) {
|
|
|
+ var text = "";
|
|
|
+ if (livingType === 1) {
|
|
|
+ text = "全天";
|
|
|
+ } else if (livingType === 2) {
|
|
|
+ text = "钟点";
|
|
|
+ } else if (livingType === 3) {
|
|
|
+ text = "自用";
|
|
|
+ } else if (livingType === 4) {
|
|
|
+ text = "免费";
|
|
|
+ } else if (livingType === 4) {
|
|
|
+ text = "长租";
|
|
|
+ }
|
|
|
+ return text;
|
|
|
+ },
|
|
|
editCustomerSource(item) {
|
|
|
var obj = {
|
|
|
orderId: item.livingOrder.id,
|
|
|
@@ -983,18 +1030,18 @@ export default {
|
|
|
);
|
|
|
console.log(this.model.livingRoomIds);
|
|
|
var find = this.model.livingRoomIds[index];
|
|
|
- let arr = []
|
|
|
- this.model.livingRoomIds.forEach(ele=>{
|
|
|
- if (ele.roomName!='全部') {
|
|
|
- arr.push(ele.livingOrder.id)
|
|
|
+ let arr = [];
|
|
|
+ this.model.livingRoomIds.forEach((ele) => {
|
|
|
+ if (ele.roomName != "全部") {
|
|
|
+ arr.push(ele.livingOrder.id);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
this.$refs.modalSelectCheckInRoomOrder.add();
|
|
|
this.$refs.modalSelectCheckInRoomOrder.title = "请选择需要关联的订单";
|
|
|
this.$refs.modalSelectCheckInRoomOrder.disableSubmit = false;
|
|
|
this.$refs.modalSelectCheckInRoomOrder.livingOrderId =
|
|
|
find.livingOrder.id;
|
|
|
- this.$refs.modalSelectCheckInRoomOrder.filterIds = arr
|
|
|
+ this.$refs.modalSelectCheckInRoomOrder.filterIds = arr;
|
|
|
this.$refs.modalSelectCheckInRoomOrder.livingRoomId = find.roomId;
|
|
|
},
|
|
|
addLeaseGoods() {
|
|
|
@@ -1234,7 +1281,7 @@ export default {
|
|
|
: res.result.livingRoomIds[1].roomId;
|
|
|
this.selectRoomId = this.tabSelectRoomId;
|
|
|
this.model = res.result;
|
|
|
- this.getWakeServiceData()
|
|
|
+ this.getWakeServiceData();
|
|
|
getAction("/business/busRoomBookingOrders/living-fees", {
|
|
|
bookingOrderId: this.model.orderInfo.id,
|
|
|
}).then((res) => {
|