DESKTOP-B78GIPM\admin 2 lat temu
rodzic
commit
f67e8d81e8

+ 23 - 10
src/views/room/fangtailive.vue

@@ -997,16 +997,29 @@ export default {
   },
   },
   computed: {
   computed: {
     joinDisabled() {
     joinDisabled() {
-      return !this.roomList.some((t) => {
-        return (
-          t.rooms.filter((c) => c.roomInfo.state === 88).length == 1 &&
-          t.rooms.filter(
-            (c) =>
-              c.roomInfo.state === 88 &&
-              (c.roomInfo.roomStatus === 3 || c.roomInfo.roomStatus === 4)
-          ).length == 1
-        );
-      });
+      // return !this.roomList.some((t) => {
+      //   return (
+      //     t.rooms.filter((c) => c.roomInfo.state === 88).length == 1 &&
+      //     t.rooms.filter(
+      //       (c) =>
+      //         c.roomInfo.state === 88 &&
+      //         (c.roomInfo.roomStatus === 3 || c.roomInfo.roomStatus === 4)
+      //     ).length == 1
+      //   );
+      // });
+      let roomLst = []
+      this.roomList.forEach((t) => {
+        t.rooms.forEach((c) => {
+          if (c.roomInfo.state === 88) {
+            roomLst.push(c)
+          }
+        })
+      })
+      if (roomLst.some(t=> t.roomInfo.roomStatus != 3 && t.roomInfo.roomStatus != 4 )) {
+        console.log(1);
+        return true
+      }
+      return roomLst.every((c) => c.livingData.livingOrder.isRel )
     },
     },
     lockDisabled() {
     lockDisabled() {
       return !this.roomList.some((t) =>
       return !this.roomList.some((t) =>

+ 2 - 1
src/views/room/modules/checkIn/BillRoomForm.vue

@@ -2901,7 +2901,8 @@ export default {
         let idx;
         let idx;
         idx = that.model.roomPrices.findIndex((item) => item.roomId == t.id)
         idx = that.model.roomPrices.findIndex((item) => item.roomId == t.id)
         info = JSON.parse(JSON.stringify(that.model.orderInfo))
         info = JSON.parse(JSON.stringify(that.model.orderInfo))
-        info.dueOutTime = that.model.roomPrices[idx].editPriceTime[that.model.roomPrices[idx].editPriceTime.length-1] + " " + moment(that.model.orderInfo.dueOutTimeSpan).format("HH:mm")
+        info.dueOutTime = that.addDate(info.arrivalTime2, that.model.roomPrices[idx].day) + " " + moment(that.model.orderInfo.dueOutTimeSpan).format("HH:mm")
+        // info.dueOutTime = that.model.roomPrices[idx].editPriceTime[that.model.roomPrices[idx].editPriceTime.length-1] + " " + moment(that.model.orderInfo.dueOutTimeSpan).format("HH:mm")
         t.roomOrderInfo = info
         t.roomOrderInfo = info
         t.roomOrderInfo.customerSource = t.customerSource
         t.roomOrderInfo.customerSource = t.customerSource
         t.roomId = t.id;
         t.roomId = t.id;

+ 1 - 1
src/views/room/modules/checkIn/liveBatchCardForm.vue

@@ -365,7 +365,7 @@ export default {
           }
           }
       if (row.check === 1) {
       if (row.check === 1) {
         row.check = 0;
         row.check = 0;
-        var index = this.model.rooms.findIndex((t) => t.key1 == row.key1);
+        var index = this.model.rooms.findIndex((t) => t.id == row.id);
         this.model.rooms.splice(index, 1);
         this.model.rooms.splice(index, 1);
       } else {
       } else {
         row.check = 1;
         row.check = 1;