|
|
@@ -791,6 +791,9 @@
|
|
|
:options="roomStatusList"
|
|
|
@change="checkChange"
|
|
|
>
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
+ 111
|
|
|
+ </template> -->
|
|
|
</a-checkbox-group>
|
|
|
<p
|
|
|
style="
|
|
|
@@ -828,8 +831,8 @@
|
|
|
房间信息
|
|
|
</p>
|
|
|
<a-checkbox-group
|
|
|
- v-model="checkedCesRoomLayoutList"
|
|
|
- :options="['欠费', '无押金', '续住', '换房', '租借', '不足']"
|
|
|
+ v-model="checkedCestList"
|
|
|
+ :options="roomInformationScreening"
|
|
|
@change="checkChange"
|
|
|
>
|
|
|
</a-checkbox-group>
|
|
|
@@ -838,7 +841,7 @@
|
|
|
</p>
|
|
|
<a-checkbox-group
|
|
|
v-model="checkedStateList"
|
|
|
- :options="['生日', '叫醒', '免打扰', '免查询']"
|
|
|
+ :options="customerServiceScreening"
|
|
|
@change="checkChange"
|
|
|
>
|
|
|
</a-checkbox-group>
|
|
|
@@ -1072,6 +1075,58 @@ export default {
|
|
|
color: 'rgba(128, 128, 128, 1)'
|
|
|
}
|
|
|
},
|
|
|
+ // 叫醒房间
|
|
|
+ rouseRoomList: [],
|
|
|
+ // 房间信息筛选暂时
|
|
|
+ roomInformationScreening:[
|
|
|
+ {
|
|
|
+ label: '欠费',
|
|
|
+ value: '1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '无押金',
|
|
|
+ value: '2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '续住',
|
|
|
+ value: '3'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '换房',
|
|
|
+ value: '4'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '租借',
|
|
|
+ value: '5'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '不足',
|
|
|
+ value: '6'
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ // 对客服务筛选
|
|
|
+ customerServiceScreening:[
|
|
|
+ {
|
|
|
+ label: '生日',
|
|
|
+ value: '1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '叫醒',
|
|
|
+ value: '2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '免打扰',
|
|
|
+ value: '3'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '免查询',
|
|
|
+ value: '4'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '保密房',
|
|
|
+ value: '5'
|
|
|
+ },
|
|
|
+ ],
|
|
|
startDate: '',
|
|
|
endDate: '',
|
|
|
customerSourceList: [],
|
|
|
@@ -1089,7 +1144,12 @@ export default {
|
|
|
checkInBtnDis: false,
|
|
|
kzfLiving: false,
|
|
|
roomCard: false,
|
|
|
- roomClear: false
|
|
|
+ roomClear: false,
|
|
|
+ CustomerSourceScreening:[],
|
|
|
+ // 房间类型
|
|
|
+ checkedCestList: [],
|
|
|
+ // 房间信息暂存数据
|
|
|
+ rouseinfoRoomList:[]
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -1182,6 +1242,7 @@ export default {
|
|
|
hotelId: _info.id,
|
|
|
dictId: '1639538915239743490'
|
|
|
}).then((res) => {
|
|
|
+ console.log(res);
|
|
|
if (res.success) {
|
|
|
var list = []
|
|
|
res.result.records.forEach((item) => {
|
|
|
@@ -1194,6 +1255,7 @@ export default {
|
|
|
pageSize: 99999,
|
|
|
pageNo: 1
|
|
|
}).then((res) => {
|
|
|
+ // console.log(res);
|
|
|
if (res.success) {
|
|
|
var list = []
|
|
|
res.result.records.forEach((item) => {
|
|
|
@@ -1208,6 +1270,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
getAction('/rooms/cesRooms/room-status-color', {}).then((res) => {
|
|
|
+ // console.log(res,'1214');
|
|
|
if (res.success) {
|
|
|
this.roomStatusColorList = res.result
|
|
|
var list = []
|
|
|
@@ -1218,6 +1281,9 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.loadData()
|
|
|
+
|
|
|
+ console.log(this.roomCard);
|
|
|
+ console.log(this.roomList);
|
|
|
},
|
|
|
mounted() {
|
|
|
// this.handleBillInfo();
|
|
|
@@ -1233,7 +1299,137 @@ export default {
|
|
|
// this.$refs.ModalEditScheduleRoom.disableSubmit = false;
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ // 处理筛选条件数据-房型
|
|
|
+ roomTypeData(val) {
|
|
|
+ this.cesRoomLayoutList.forEach(item => {
|
|
|
+ if (item.value == val) {
|
|
|
+ let tempindex = this.cesRoomLayoutList.findIndex(index => index == item)
|
|
|
+ if (item.label.substr(-1) == '1') {
|
|
|
+ this.cesRoomLayoutList.splice(tempindex,1,{label: item.label,value: item.value})
|
|
|
+ } else if ('figure' in item){
|
|
|
+ this.cesRoomLayoutList.splice(tempindex,1,{label: item.label, figure:item.figure + 1, value: item.value})
|
|
|
+ } else {
|
|
|
+ this.cesRoomLayoutList.splice(tempindex,1,{label: item.label, figure:1, value: item.value})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 处理筛选条件数据-对客服务
|
|
|
+ customerServiceProcessing(val,rouse) {
|
|
|
+ this.customerServiceScreening.forEach(ids => {
|
|
|
+ // 处理叫醒
|
|
|
+ if (ids.value == '2' && rouse == true) {
|
|
|
+ let tempindex = this.customerServiceScreening.findIndex(index => index == ids)
|
|
|
+ if (ids.label.substr(-1) == '1') {
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label,value: ids.value})
|
|
|
+ } else if ('figure' in ids){
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label, figure:ids.figure + 1, value: ids.value})
|
|
|
+ } else {
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label, figure:1, value: ids.value})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // console.log(ids);
|
|
|
+ // 处理免打扰
|
|
|
+ if (ids.value == '3' && val.ddisturb == true) {
|
|
|
+ let tempindex = this.customerServiceScreening.findIndex(index => index == ids)
|
|
|
+ if (ids.label.substr(-1) == '1') {
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label,value: ids.value})
|
|
|
+ } else if ('figure' in ids){
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label, figure:ids.figure + 1, value: ids.value})
|
|
|
+ } else {
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label, figure:1, value: ids.value})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 处理免查询
|
|
|
+ if (ids.value == '4' && val.dquery == true) {
|
|
|
+ let tempindex = this.customerServiceScreening.findIndex(index => index == ids)
|
|
|
+ if (ids.label.substr(-1) == '1') {
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label,value: ids.value})
|
|
|
+ } else if ('figure' in ids){
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label, figure:ids.figure + 1, value: ids.value})
|
|
|
+ } else {
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label, figure:1, value: ids.value})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 处理保密房
|
|
|
+ if (ids.value == '5' && val.secrecy == true) {
|
|
|
+ let tempindex = this.customerServiceScreening.findIndex(index => index == ids)
|
|
|
+ if (ids.label.substr(-1) == '1') {
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label,value: ids.value})
|
|
|
+ } else if ('figure' in ids){
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label, figure:ids.figure + 1, value: ids.value})
|
|
|
+ } else {
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: ids.label, figure:1, value: ids.value})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 处理筛选条件数据-房间信息
|
|
|
+ roomInformationFiltering(val,rouse) {
|
|
|
+ this.roomInformationScreening.forEach(ids => {
|
|
|
+ // 处理租借
|
|
|
+ if (ids.value == '5' && rouse == true) {
|
|
|
+ let tempindex = this.roomInformationScreening.findIndex(index => index == ids)
|
|
|
+ if (ids.label.substr(-1) == '1') {
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label,value: ids.value})
|
|
|
+ } else if ('figure' in ids){
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label, figure:ids.figure + 1, value: ids.value})
|
|
|
+ } else {
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label, figure:1, value: ids.value})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // console.log(ids);
|
|
|
+ // 处理续住
|
|
|
+ if (ids.value == '3' && val.isStayOver == true) {
|
|
|
+ let tempindex = this.roomInformationScreening.findIndex(index => index == ids)
|
|
|
+ if (ids.label.substr(-1) == '1') {
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label,value: ids.value})
|
|
|
+ } else if ('figure' in ids){
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label, figure:ids.figure + 1, value: ids.value})
|
|
|
+ } else {
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label, figure:1, value: ids.value})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 处理换房
|
|
|
+ if (ids.value == '4' && val.isChangeRoom == true) {
|
|
|
+ let tempindex = this.roomInformationScreening.findIndex(index => index == ids)
|
|
|
+ if (ids.label.substr(-1) == '1') {
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label,value: ids.value})
|
|
|
+ } else if ('figure' in ids){
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label, figure:ids.figure + 1, value: ids.value})
|
|
|
+ } else {
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label, figure:1, value: ids.value})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 处理保密房
|
|
|
+ if (ids.value == '1' && val.shouKuan - val.xiaoFei < 0) {
|
|
|
+ let tempindex = this.roomInformationScreening.findIndex(index => index == ids)
|
|
|
+ if (ids.label.substr(-1) == '1') {
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label,value: ids.value})
|
|
|
+ } else if ('figure' in ids){
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label, figure:ids.figure + 1, value: ids.value})
|
|
|
+ } else {
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: ids.label, figure:1, value: ids.value})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 处理筛选条件数据-客源
|
|
|
+ screeningQuantity(val) {
|
|
|
+ this.customerSourceList.forEach(ids => {
|
|
|
+ if (ids.value == val) {
|
|
|
+ let tempindex = this.customerSourceList.findIndex(index => index == ids)
|
|
|
+ // console.log(!('figure' in ids));
|
|
|
+ if (ids.label.substr(-1) == '1') {
|
|
|
+ this.customerSourceList.splice(tempindex,1,{label: ids.label,value: ids.value})
|
|
|
+ } else if ('figure' in ids){
|
|
|
+ this.customerSourceList.splice(tempindex,1,{label: ids.label, figure:ids.figure + 1, value: ids.value})
|
|
|
+ } else {
|
|
|
+ this.customerSourceList.splice(tempindex,1,{label: ids.label, figure:1, value: ids.value})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },)
|
|
|
+ },
|
|
|
handleContextMenu(event) {
|
|
|
event.preventDefault()
|
|
|
const dropdown = this.$refs.dropdown
|
|
|
@@ -1321,6 +1517,9 @@ export default {
|
|
|
this.$refs.posOrderModal.visible = true
|
|
|
},
|
|
|
getCustomerSourceList(customerSource, first) {
|
|
|
+ // console.log(customerSource);
|
|
|
+ // console.log(this.customerSourceList);
|
|
|
+ // console.log(first);
|
|
|
var find = this.customerSourceList.find((t) => t.value == customerSource)
|
|
|
if (find) {
|
|
|
return first ? find.label.substr(0, 1) : find.label
|
|
|
@@ -1412,7 +1611,7 @@ export default {
|
|
|
this.$message.warning(e.message)
|
|
|
return
|
|
|
}
|
|
|
- debugger
|
|
|
+ // debugger
|
|
|
this.$refs.ModalBillRoomForm.addList(selectRoom, e.key)
|
|
|
this.$refs.ModalBillRoomForm.title =
|
|
|
e.key == '1' ? '散客入住登记' : '团队入住登记'
|
|
|
@@ -1562,6 +1761,7 @@ export default {
|
|
|
this.checkedroomBuildingFloorList
|
|
|
)
|
|
|
var list = this.oldRoomList
|
|
|
+ // 筛选房型
|
|
|
if (this.checkedCesRoomLayoutList.length > 0) {
|
|
|
list = this.oldRoomList.reduce((acc, curr) => {
|
|
|
const rooms = curr.rooms.filter((room) =>
|
|
|
@@ -1571,6 +1771,7 @@ export default {
|
|
|
return acc
|
|
|
}, [])
|
|
|
}
|
|
|
+ // 筛选房态
|
|
|
if (this.checkedRoomStatusList.length > 0) {
|
|
|
list = list.reduce((acc, curr) => {
|
|
|
const rooms = curr.rooms.filter((room) =>
|
|
|
@@ -1582,7 +1783,7 @@ export default {
|
|
|
return acc
|
|
|
}, [])
|
|
|
}
|
|
|
- debugger
|
|
|
+ // 筛选来源
|
|
|
if (this.checkedCustomerSourceList.length > 0) {
|
|
|
list = list.reduce((acc, curr) => {
|
|
|
const rooms = curr.rooms.filter((room) =>
|
|
|
@@ -1600,12 +1801,80 @@ export default {
|
|
|
return acc
|
|
|
}, [])
|
|
|
}
|
|
|
- console.log(this.checkedRoomStatusList)
|
|
|
-
|
|
|
+ // 筛选房间信息
|
|
|
+ if (this.checkedCestList.length > 0) {
|
|
|
+ console.log(this.checkedCestList);
|
|
|
+ // 过滤掉没有客人的房间
|
|
|
+ list = list.reduce((acc, curr) => {
|
|
|
+ const rooms = curr.rooms.filter(room => {
|
|
|
+ return room.livingData.livingOrder !== null
|
|
|
+ })
|
|
|
+ acc.push({ ...curr, rooms })
|
|
|
+ return acc
|
|
|
+ }, [])
|
|
|
+ // 筛选出对应服务的房间信息
|
|
|
+ console.log(list);
|
|
|
+ this.checkedCestList.forEach(item => {
|
|
|
+ console.log(item);
|
|
|
+ console.log(list);
|
|
|
+ list = list.reduce((acc, curr) => {
|
|
|
+ // if(item == '3') {
|
|
|
+ const rooms = curr.rooms.filter(room => {
|
|
|
+ if (item == '1') {
|
|
|
+ return room.livingData.livingOrder.shouKuan - room.livingData.livingOrder.xiaoFei < 0
|
|
|
+ }
|
|
|
+ if (item == '2') {
|
|
|
+ return room.livingData.livingOrder.deposit == 0
|
|
|
+ }
|
|
|
+ if (item == '3') {
|
|
|
+ return room.livingData.livingOrder.isStayOver == true
|
|
|
+ }
|
|
|
+ if (item == '4') {
|
|
|
+ return room.livingData.livingOrder.isChangeRoom == true
|
|
|
+ }
|
|
|
+ if (item == '5') {
|
|
|
+ return room.tempinfo == true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ acc.push({ ...curr, rooms })
|
|
|
+ return acc
|
|
|
+ }, [])
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log(list);
|
|
|
+ // 筛选对客服务
|
|
|
if (this.checkedStateList.length > 0) {
|
|
|
- if (this.checkedStateList.includes('免打扰')) {
|
|
|
- }
|
|
|
-
|
|
|
+ // 过滤掉没有客人的房间
|
|
|
+ list = list.reduce((acc, curr) => {
|
|
|
+ const rooms = curr.rooms.filter(room => {
|
|
|
+ return room.livingData.livingOrder !== null
|
|
|
+ })
|
|
|
+ acc.push({ ...curr, rooms })
|
|
|
+ return acc
|
|
|
+ }, [])
|
|
|
+ // 筛选出对应服务的房间
|
|
|
+ this.checkedStateList.forEach(item => {
|
|
|
+ console.log(item);
|
|
|
+ list = list.reduce((acc, curr) => {
|
|
|
+ // if(item == '3') {
|
|
|
+ const rooms = curr.rooms.filter(room => {
|
|
|
+ if (item == '2') {
|
|
|
+ return room.temproom == true
|
|
|
+ }
|
|
|
+ if (item == '3') {
|
|
|
+ return room.livingData.livingOrder.ddisturb == true
|
|
|
+ }
|
|
|
+ if (item == '4') {
|
|
|
+ return room.livingData.livingOrder.dquery == true
|
|
|
+ }
|
|
|
+ if (item == '5') {
|
|
|
+ return room.livingData.livingOrder.secrecy == true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ acc.push({ ...curr, rooms })
|
|
|
+ return acc
|
|
|
+ }, [])
|
|
|
+ })
|
|
|
}
|
|
|
if (this.checkedroomBuildingFloorList.length > 0) {
|
|
|
list = list.filter(
|
|
|
@@ -1638,21 +1907,21 @@ export default {
|
|
|
console.log('list2', list)
|
|
|
this.roomList = list
|
|
|
},
|
|
|
- // roomStatusChange(e) {
|
|
|
- // console.log("e", e);
|
|
|
- // var list = this.oldRoomList;
|
|
|
- // if (this.checkedRoomStatusList.length > 0) {
|
|
|
- // list = this.oldRoomList.reduce((acc, curr) => {
|
|
|
- // const rooms = curr.rooms.filter((room) =>
|
|
|
- // this.checkedRoomStatusList.includes(room.roomInfo.roomStatus.toString())
|
|
|
- // );
|
|
|
- // acc.push({ ...curr, rooms });
|
|
|
- // return acc;
|
|
|
- // }, []);
|
|
|
- // }
|
|
|
- // console.log("list2", list);
|
|
|
- // this.roomList = list;
|
|
|
- // },
|
|
|
+ roomStatusChange(e) {
|
|
|
+ console.log("e", e);
|
|
|
+ var list = this.oldRoomList;
|
|
|
+ if (this.checkedRoomStatusList.length > 0) {
|
|
|
+ list = this.oldRoomList.reduce((acc, curr) => {
|
|
|
+ const rooms = curr.rooms.filter((room) =>
|
|
|
+ this.checkedRoomStatusList.includes(room.roomInfo.roomStatus.toString())
|
|
|
+ );
|
|
|
+ acc.push({ ...curr, rooms });
|
|
|
+ return acc;
|
|
|
+ }, []);
|
|
|
+ }
|
|
|
+ console.log("list2", list);
|
|
|
+ this.roomList = list;
|
|
|
+ },
|
|
|
collapseClick(row, value) {
|
|
|
this.$set(row, 'collapse', value)
|
|
|
},
|
|
|
@@ -2093,6 +2362,66 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 处理房态数据代码
|
|
|
+ houseStateNumbers() {
|
|
|
+ // 处理房态数据
|
|
|
+ var tempGreen = 0
|
|
|
+ var tempBlack = 0
|
|
|
+ var tempRed = 0
|
|
|
+ var temppurple = 0
|
|
|
+ var tempDarkGreeb = 0
|
|
|
+ var tempGray = 0
|
|
|
+ var tempYellow = 0
|
|
|
+ this.roomList.forEach(item => {
|
|
|
+ item.rooms.forEach(index => {
|
|
|
+ if (index.roomInfo.roomStatus == '1') {
|
|
|
+ tempGreen++
|
|
|
+ }
|
|
|
+ if (index.roomInfo.roomStatus == '2') {
|
|
|
+ tempBlack++
|
|
|
+ }
|
|
|
+ if (index.roomInfo.roomStatus == '3') {
|
|
|
+ tempRed++
|
|
|
+ }
|
|
|
+ if (index.roomInfo.roomStatus == '4') {
|
|
|
+ temppurple++
|
|
|
+ }
|
|
|
+ if (index.roomInfo.roomStatus == '5') {
|
|
|
+ tempDarkGreeb++
|
|
|
+ }
|
|
|
+ if (index.roomInfo.roomStatus == '6') {
|
|
|
+ tempGray++
|
|
|
+ }
|
|
|
+ if (index.roomInfo.roomStatus == '7') {
|
|
|
+ tempYellow++
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ let templist = this.roomStatusList.map(item => {
|
|
|
+ if (item.value == '1') {
|
|
|
+ return {label:item.label + tempGreen,value: item.value}
|
|
|
+ }
|
|
|
+ if (item.value == '2') {
|
|
|
+ return {label:item.label + tempBlack,value: item.value}
|
|
|
+ }
|
|
|
+ if (item.value == '3') {
|
|
|
+ return {label:item.label + tempRed,value: item.value}
|
|
|
+ }
|
|
|
+ if (item.value == '4') {
|
|
|
+ return {label:item.label + temppurple,value: item.value}
|
|
|
+ }
|
|
|
+ if (item.value == '5') {
|
|
|
+ return {label:item.label + tempDarkGreeb,value: item.value}
|
|
|
+ }
|
|
|
+ if (item.value == '6') {
|
|
|
+ return {label:item.label + tempGray,value: item.value}
|
|
|
+ }
|
|
|
+ if (item.value == '7') {
|
|
|
+ return {label:item.label + tempYellow,value: item.value}
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.roomStatusList = templist
|
|
|
+ },
|
|
|
modalBillRoomFormOk(e) {
|
|
|
this.loadData()
|
|
|
console.log('e', e)
|
|
|
@@ -2143,19 +2472,152 @@ export default {
|
|
|
params: { id: e }
|
|
|
})
|
|
|
},
|
|
|
- loadData() {
|
|
|
+ async loadData() {
|
|
|
this.checkInBtnDis = false
|
|
|
this.scheduleBtnDis = false
|
|
|
- getAction('/rooms/cesRooms/realtime-rooms', {}).then((res) => {
|
|
|
+ await getAction('/rooms/cesRooms/realtime-rooms', {}).then((res) => {
|
|
|
+ console.log(res);
|
|
|
if (res.success) {
|
|
|
res.result.forEach((row) => {
|
|
|
this.$set(row, 'collapse', 1)
|
|
|
})
|
|
|
this.roomList = res.result
|
|
|
this.oldRoomList = JSON.parse(JSON.stringify(res.result))
|
|
|
+ // 处理房态
|
|
|
+ this.houseStateNumbers()
|
|
|
+ // 处理来源
|
|
|
+ this.roomList.forEach(item => {
|
|
|
+ item.rooms.forEach(cust => {
|
|
|
+ if (cust.livingData.livingOrder !== null) {
|
|
|
+ this.screeningQuantity(cust.livingData.livingOrder.customerSource)
|
|
|
+ }
|
|
|
+ if (cust.bookingData.bookingOrder !== null) {
|
|
|
+ this.screeningQuantity(cust.bookingData.bookingOrder.customerSource)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.customerSourceList.forEach(item => {
|
|
|
+ if ('figure' in item) {
|
|
|
+ let tempindex = this.customerSourceList.findIndex(index => index == item)
|
|
|
+ this.customerSourceList.splice(tempindex,1,{label: item.label + item.figure,value: item.value})
|
|
|
+ } else {
|
|
|
+ let tempindex = this.customerSourceList.findIndex(index => index == item)
|
|
|
+ this.customerSourceList.splice(tempindex,1,{label: item.label + 0,value: item.value})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(this.customerSourceList);
|
|
|
+
|
|
|
+ // 处理房型
|
|
|
+ this.roomList.forEach(item => {
|
|
|
+ item.rooms.forEach(cust => {
|
|
|
+ this.roomTypeData(cust.layout.id)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.cesRoomLayoutList.forEach(item => {
|
|
|
+ if ('figure' in item) {
|
|
|
+ let tempindex = this.cesRoomLayoutList.findIndex(index => index == item)
|
|
|
+ this.cesRoomLayoutList.splice(tempindex,1,{label: item.label + item.figure,value: item.value})
|
|
|
+ } else {
|
|
|
+ let tempindex = this.cesRoomLayoutList.findIndex(index => index == item)
|
|
|
+ this.cesRoomLayoutList.splice(tempindex,1,{label: item.label + 0,value: item.value})
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+ await getAction("/fw/fwLivingJx/getJxRooms", {}).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.success) {
|
|
|
+ res.result.forEach((row) => {
|
|
|
+ this.$set(row, "collapse", 1);
|
|
|
+ });
|
|
|
+ this.rouseRoomList = res.result;
|
|
|
+ }
|
|
|
+ var temproomlist = this.oldRoomList
|
|
|
+ // 这里处理对客服务中的叫醒数据
|
|
|
+ this.rouseRoomList.forEach(item => {
|
|
|
+ temproomlist.forEach((cust,custindex) => {
|
|
|
+ cust.rooms.forEach(index => {
|
|
|
+ if (index.roomInfo.id == item.id) {
|
|
|
+ let tempindex = cust.rooms.findIndex(room => room == index)
|
|
|
+ let temproom = true
|
|
|
+ cust.rooms.splice(tempindex,1,{...index,temproom:temproom})
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.roomList = temproomlist
|
|
|
+ console.log(this.roomList);
|
|
|
+ // 处理对客服务数字
|
|
|
+ this.roomList.forEach(item => {
|
|
|
+ item.rooms.forEach(cust => {
|
|
|
+ if (cust.livingData.livingOrder !== null) {
|
|
|
+ if ('temproom' in cust) {
|
|
|
+ this.customerServiceProcessing(cust.livingData.livingOrder, cust.temproom)
|
|
|
+ } else {
|
|
|
+ this.customerServiceProcessing(cust.livingData.livingOrder)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.customerServiceScreening.forEach(item => {
|
|
|
+ if ('figure' in item) {
|
|
|
+ let tempindex = this.customerServiceScreening.findIndex(index => index == item)
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: item.label + item.figure,value: item.value})
|
|
|
+ } else {
|
|
|
+ let tempindex = this.customerServiceScreening.findIndex(index => index == item)
|
|
|
+ this.customerServiceScreening.splice(tempindex,1,{label: item.label + 0,value: item.value})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ await getAction("/order/cesOrderLeaseGoods/getLeaseRoom", {}).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.success) {
|
|
|
+ res.result.forEach((row) => {
|
|
|
+ this.$set(row, "collapse", 1);
|
|
|
+ });
|
|
|
+ this.rouseinfoRoomList = res.result;
|
|
|
+ }
|
|
|
+ let templeaseroomlist = this.oldRoomList
|
|
|
+ // 这里处理对房间信息中的租借
|
|
|
+ this.rouseinfoRoomList.forEach(item => {
|
|
|
+ templeaseroomlist.forEach((cust,custindex) => {
|
|
|
+ cust.rooms.forEach(index => {
|
|
|
+ if (index.roomInfo.id == item.id) {
|
|
|
+ let tempindex = cust.rooms.findIndex(room => room == index)
|
|
|
+ let tempinfo = true
|
|
|
+ cust.rooms.splice(tempindex,1,{...index,tempinfo:tempinfo})
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ // 可能有问题
|
|
|
+ this.roomList = templeaseroomlist
|
|
|
+ console.log(this.roomList);
|
|
|
+ // 处理房间信息数字
|
|
|
+ this.roomList.forEach(item => {
|
|
|
+ item.rooms.forEach(cust => {
|
|
|
+ if (cust.livingData.livingOrder !== null) {
|
|
|
+ if ('tempinfo' in cust) {
|
|
|
+ this.roomInformationFiltering(cust.livingData.livingOrder, cust.tempinfo)
|
|
|
+ } else {
|
|
|
+ this.roomInformationFiltering(cust.livingData.livingOrder)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.roomInformationScreening.forEach(item => {
|
|
|
+ if ('figure' in item) {
|
|
|
+ let tempindex = this.roomInformationScreening.findIndex(index => index == item)
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: item.label + item.figure,value: item.value})
|
|
|
+ } else {
|
|
|
+ let tempindex = this.roomInformationScreening.findIndex(index => index == item)
|
|
|
+ this.roomInformationScreening.splice(tempindex,1,{label: item.label + 0,value: item.value})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
getAction('/business/busOtherEmptyDirtyRoom/queryByHotelId', {}).then(
|
|
|
(res) => {
|
|
|
if (res.success) {
|