|
@@ -99,7 +99,7 @@
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<view
|
|
|
- @click="tabCli(item2.roomNumber,item2.houseBaseId,roomData.roomDataList)"
|
|
|
+ @click="tabCli(item2.roomNumber,item2.houseBaseId,roomData.roomDataList,item2)"
|
|
|
class="tdP">
|
|
|
<text>{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'guestName',item2.floor)}}</text>
|
|
|
<text>{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'status',item2.floor)}}</text>
|
|
@@ -249,14 +249,21 @@
|
|
|
//this.scrollLeft = e.detail.scrollLeft; // div 到左边的距离
|
|
|
},
|
|
|
//关房
|
|
|
- tabCli(roomNumber, id, roomId) {
|
|
|
+ tabCli(roomNumber, id, roomId,row) {
|
|
|
+ // console.log(row)
|
|
|
+ // console.log(roomId)
|
|
|
+ // console.log(id)
|
|
|
+ // console.log(roomNumber)
|
|
|
if (roomNumber) {
|
|
|
let obj = {};
|
|
|
- for (let i = 0; i < roomId.length; i++) {
|
|
|
- if (id == roomId[i].houseBaseId && roomNumber == roomId[i].roomNumber) {
|
|
|
- obj = roomId[i];
|
|
|
- }
|
|
|
- }
|
|
|
+ // for (let i = 0; i < roomId.length; i++) {
|
|
|
+ // if (id == roomId[i].houseBaseId && roomNumber == roomId[i].roomNumber) {
|
|
|
+ // obj = roomId[i];
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ obj=roomId.filter((item)=>item.houseBaseId==id&&item.roomNumber==roomNumber)
|
|
|
+ console.log(11)
|
|
|
+ console.log(obj)
|
|
|
//已预订,已入住 待确认 待支付
|
|
|
if (obj.status == 1 || obj.status == 2 || obj.status == -1 || obj.status == -2) {
|
|
|
let orderId = obj.orderId;
|
|
@@ -264,16 +271,24 @@
|
|
|
url: "/pages/house/orderInfo?orderId=" + orderId
|
|
|
})
|
|
|
//到详情
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
+ // console.log(this.checkDataRoomId)
|
|
|
+ console.log('--------------')
|
|
|
+ console.log(obj)
|
|
|
+ console.log(this.checkDataRoomId)
|
|
|
+ console.log('------------------')
|
|
|
//更改状态
|
|
|
this.areaShow = true;
|
|
|
- this.checkDataRoomId = [obj.id];
|
|
|
+ this.checkDataRoomId = [obj[0].id];
|
|
|
+ console.log(222)
|
|
|
+ console.log(this.checkDataRoomId)
|
|
|
this.checkStatus = obj.status;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
//确定关房
|
|
|
- passengerConfirm(e) {
|
|
|
+ passengerConfirm(e) {
|
|
|
+ console.log(this.checkDataRoomId)
|
|
|
let status = this.area[e.indexs[0]].id;
|
|
|
this.$api.post('/merchant/hotel/room/state/updRoomState', {
|
|
|
roomIds: this.checkDataRoomId,
|
|
@@ -353,7 +368,9 @@
|
|
|
}, 1500);
|
|
|
},
|
|
|
//选择房间
|
|
|
- check(roomNumber, id, item, position, floor) {
|
|
|
+ check(roomNumber, id, item, position, floor) {
|
|
|
+ console.log(floor)
|
|
|
+ console.log(item)
|
|
|
for (let i = 0; i < item.roomDataList.length; i++) {
|
|
|
if (
|
|
|
floor == item.roomDataList[i].floor && id == item.roomDataList[i].houseBaseId &&
|
|
@@ -377,7 +394,8 @@
|
|
|
(roomId) => roomId == item.roomDataList[i].id
|
|
|
);
|
|
|
this.checkDataRoomId.splice(index, 1);
|
|
|
- }
|
|
|
+ }
|
|
|
+ console.log(this.checkDataRoomId)
|
|
|
//日期
|
|
|
if (this.checkPosition.indexOf(position) > -1) {
|
|
|
this.checkDataDate.push(item.rentDate);
|