Parcourir la source

修改文档问题

许智捷 il y a 2 ans
Parent
commit
fe26191b0d

+ 71 - 13
src/components/tools/HeaderNotice.vue

@@ -29,13 +29,16 @@
                 </a-list-item-meta>
               </a-list-item>
             </a-list>-->
-            <a-tabs size="small" class="header_notice">
+            <a-tabs size="small" class="header_notice" @change="tabChange">
               <a-tab-pane :tab='"房间消息(" + roomAnnouncements.length + ")"' key="1">
                 <a-list>
                   <a-list-item
                       :key="index"
                       v-for="(record, index) in roomAnnouncements"
-                  >
+                      :selected="selectedItems">
+                    <div style="font-size: 18px;color: rgb(0, 0, 0);">
+                      <input v-model="record.checked" type="checkbox" @change="toggleSelected(record)">
+                    </div>
                     <div style="margin-left: 5%; width: 80%">
                       <p>
                         <a @click="showAnnouncement(record)">{{ record.titile }}</a>
@@ -66,9 +69,17 @@
                     </div>
                   </a-list-item>
                   <div style="margin-top: 5px; text-align: center">
-                    <a-button @click="toMyAnnouncement()" type="dashed" block
-                    >查看更多</a-button
-                    >
+                    <a-row>
+                      <a-col :span="8">
+                        <a-button @click="toMyAnnouncement()" type="dashed" block style="width: 80%">查看更多</a-button>
+                      </a-col>
+                      <a-col :span="8">
+                        <a-button @click="allSelect(roomAnnouncements)" type="dashed" block style="width: 80%">全部勾选</a-button>
+                      </a-col>
+                      <a-col :span="8">
+                        <a-button @click="readMess()" type="dashed" block style="width: 80%">已读</a-button>
+                      </a-col>
+                    </a-row>
                   </div>
                 </a-list>
               </a-tab-pane>
@@ -81,9 +92,12 @@
               <a-tab-pane :tab='"订单消息(" + orderAnnouncements.length + ")"' key="4">
                 <a-list>
                   <a-list-item
-                      :key="index"
+                      :key="record.id"
                       v-for="(record, index) in orderAnnouncements"
-                  >
+                      :selected="selectedItems">
+                    <div style="font-size: 18px;color: rgb(0, 0, 0);">
+                      <input v-model="record.checked" type="checkbox" @change="toggleSelected(record)">
+                    </div>
                     <div style="margin-left: 5%; width: 80%">
                       <p>
                         <a @click="showAnnouncement(record)">{{ record.titile }}</a>
@@ -114,9 +128,17 @@
                     </div>
                   </a-list-item>
                   <div style="margin-top: 5px; text-align: center">
-                    <a-button @click="toMyAnnouncement()" type="dashed" block
-                    >查看更多</a-button
-                    >
+                    <a-row>
+                      <a-col :span="12">
+                        <a-button @click="toMyAnnouncement()" type="dashed" block style="width: 80%">查看更多</a-button>
+                      </a-col>
+                      <a-col :span="8">
+                        <a-button @click="allSelect(orderAnnouncements)" type="dashed" block style="width: 80%">全部勾选</a-button>
+                      </a-col>
+                      <a-col :span="12">
+                        <a-button @click="readMess()" type="dashed" block style="width: 80%">已读</a-button>
+                      </a-col>
+                    </a-row>
                   </div>
                 </a-list>
 
@@ -182,6 +204,7 @@ export default {
       announcement2: [],
       roomAnnouncements: [],
       orderAnnouncements: [],
+      selectedItems: [],
       msg1Count: "0",
       msg2Count: "0",
       msg1Title: "通知(0)",
@@ -203,7 +226,7 @@ export default {
   },
   mounted() {
     this.loadData();
-    this.timerFun();
+    //this.timerFun();
     this.initWebSocket();
     // this.heartCheckFun();
   },
@@ -223,6 +246,9 @@ export default {
         this.loadData();
       }, 6000);
     },
+    tabChange() {
+      this.selectedItems = []
+    },
     loadData() {
       try {
         // 获取系统消息
@@ -237,6 +263,7 @@ export default {
               this.announcement2 = res.result.sysMsgList;
               this.msg2Count = res.result.sysMsgTotal;
               this.msg2Title = "系统消息(" + res.result.sysMsgTotal + ")";
+              console.log(this.orderAnnouncements,'this.orderAnnouncements')
             }
           })
           .catch((error) => {
@@ -259,6 +286,15 @@ export default {
         this.loadding = false;
       }, 200);
     },
+    toggleSelected(record) {
+      const idx = this.selectedItems.indexOf(record)
+      if (idx === -1) {
+        this.selectedItems.push(record)
+      } else {
+        this.selectedItems.splice(idx, 1)
+      }
+      console.log(this.selectedItems,'selectedItems')
+    },
     showAnnouncement(record) {
       putAction(this.url.editCementSend, { anntId: record.id }).then((res) => {
         if (res.success) {
@@ -279,6 +315,25 @@ export default {
         path: "/isps/userAnnouncement",
       });
     },
+    allSelect(announcements) {
+      console.log(announcements, "orderAnnouncements")
+      announcements.forEach(item => {
+        item.checked = true
+      })
+      this.selectedItems = JSON.parse(JSON.stringify(announcements))
+      this.$forceUpdate()
+    },
+    readMess() {
+      let ids = this.selectedItems.map(e => e.id)
+      let idStr = ids.join()
+      console.log(idStr);
+      putAction(this.url.editCementSend, { anntId: idStr }).then((res) => {
+        if (res.success) {
+          this.loadData();
+          this.selectedItems = []
+        }
+      });
+    },
     modalFormOk() {},
     handleHoverChange(visible) {
       this.hovered = visible;
@@ -299,9 +354,10 @@ export default {
       let token = Vue.ls.get(ACCESS_TOKEN);
       // this.websock = new WebSocket(url, [token]);
       this.websock = new WebSocket(
-        "ws://118.195.195.200:8080/jeecg-boot/websocket/" + userId,
+        "ws://14.215.164.140:8081/jeecg-boot/websocket/" + userId,
         [token]
       );
+      console.log(this.websock,'this.websock')
       //update-end-author:taoyan date:2022-4-22 for:  v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278
       this.websock.onopen = this.websocketOnopen;
       this.websock.onerror = this.websocketOnerror;
@@ -326,6 +382,7 @@ export default {
       this.reconnect();
     },
     websocketOnmessage: function (e) {
+      console.log("进来了")
       console.log("-----接收消息-------", e.data);
       var data = eval("(" + e.data + ")"); //解析对象
       this.voiceBroadcast(data.msgTxt);
@@ -339,8 +396,9 @@ export default {
       //心跳检测重置
       //this.heartCheck.reset().start();
       this.$notification.open({
-        message: "消息提醒",
+        message: "消息提醒!",
         description: data.msgTxt,
+        duration: 120,
         onClick: () => {},
       });
     },

+ 3 - 3
src/mixins/JeecgListMixin.js

@@ -84,15 +84,15 @@ export const JeecgListMixin = {
         this.ipagination.current = 1;
       }
       var params = this.getQueryParams();//查询条件
-      // 
+      //
       this.loading = true;
+      this.dataSource = []
       await getAction(this.url.list, params).then((res) => {
         console.log(res);
         if (res.success) {
           //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
-          this.dataSource = []
           // setTimeout(() => {
-            this.dataSource = res.result.records || res.result;
+            this.dataSource = res.result.records || res.result
           // }, 50)
           if(res.result.total)
           {

+ 4 - 1
src/views/room/advanceOrder.vue

@@ -25,7 +25,7 @@
           </a-col>
           <a-col :span="6">
                 <a-form-item label="">
-                  <a-radio-group v-model="queryParam.bookingStatus" button-style="solid">
+                  <a-radio-group v-model="queryParam.bookingStatus" button-style="solid" @change="bookingStatusChange">
                     <a-radio-button value="0">全部</a-radio-button>
                     <a-radio-button value="1">预定中</a-radio-button>
                     <a-radio-button value="2">已入住</a-radio-button>
@@ -310,6 +310,9 @@ export default {
         }
       })
     },
+    bookingStatusChange() {
+      this.loadData()
+    },
     handleInfo(record) {
       // 预约单
       this.$router.push({

+ 153 - 125
src/views/room/calendarfangtai.vue

@@ -24,10 +24,10 @@
                 <a-calendar :fullscreen="false" v-model="mStartDate" @change="onPanelChange" />
               </template>
               <span style="display: flex;justify-content: center; text-align: center; margin-right: 20px" >起始日期:
-              <div style="border: 1px solid #CDCDCDCC; text-align: center; width: 100px; height: 32px">
-                {{ startDate.format('yyyy-MM-dd') }}
-              </div>
-                </span>
+                <div style="border: 1px solid #CDCDCDCC; text-align: center; width: 100px; height: 32px">
+                  {{ startDate.format('yyyy-MM-dd') }}
+                </div>
+              </span>
             </a-popover>
           </div>
           <a-input placeholder="请输姓名或电话" style="width: 35%" v-model="searchValue"></a-input>
@@ -57,22 +57,28 @@
               </template>
               <div class="wrapper-td date-selection" style="border-left:none;border-right: 1px solid #CDCDCDCC;">
                 {{ startDate.format('yyyy-MM-dd') }}
+                <br> {{ weeks[startDate.getDay()] }}
               </div>
             </a-popover>
 
           </div>
           <div>
-            <div class="wrapper-td date-selection" style="border-right:1px solid #CDCDCDCC; cursor:pointer;border-left: none;"
+            <div
+              class="wrapper-td date-selection"
+              style="border-right:1px solid #CDCDCDCC; cursor:pointer;border-left: none;"
               @click="changeExpanded">
               {{ expandedStatus == 1 ? "收起" : "展开" }}
             </div>
           </div>
         </div>
-        <div style="overflow-x: auto;overflow-y: scroll;" ref='externalForm' class="wrapper-item wrapper-header no-scorll"
+        <div
+          style="overflow-x: auto;overflow-y: scroll;"
+          ref="externalForm"
+          class="wrapper-item wrapper-header no-scorll"
           @scroll="sysHandleScroll">
           <div class="wrapper-item data-row">
             <div class="wrapper-td" :key="index" v-for="(item, index) in columns">
-              {{ item.title }}
+              {{ item.title }} <br> {{ weeks[new Date(item.date).getDay()] }}
             </div>
           </div>
           <div class="wrapper-item data-row">
@@ -83,7 +89,10 @@
         </div>
       </div>
       <div v-if="expandedStatus == 1" class="row-top no-scorll" style="display: flex; height:585px;overflow-y:hidden;">
-        <div class="lefter row-top" ref="leftScrl" @scroll="leftScroll"
+        <div
+          class="lefter row-top"
+          ref="leftScrl"
+          @scroll="leftScroll"
           style="flex-direction: column;width: fit-content;width: 210px; height:calc(585px - 9px);overflow-y:auto;overflow-x:hidden;">
           <div class="top-header" style="width: fit-content;" v-for="(item, index) in data" :key="index">
             <div class="left-wrapper">
@@ -93,8 +102,11 @@
                 </div>
               </div>
               <div style="display: flex; flex-direction: column;">
-                <div class="wrapper-td date-selection left-content" :key="roomIndex"
-                  style="border-right:1px solid #CDCDCDCC;height: 67px;" v-for="(room, roomIndex) in item.rooms">
+                <div
+                  class="wrapper-td date-selection left-content"
+                  :key="roomIndex"
+                  style="border-right:1px solid #CDCDCDCC;height: 67px;"
+                  v-for="(room, roomIndex) in item.rooms">
                   <a-popover placement="right">
                     <template slot="content">
                       <div v-if="room.roomStatus == 6" style="text-align: left;">
@@ -136,16 +148,25 @@
             </div>
           </div>
         </div>
-        <div class="wrapper-header" style="flex: 1; overflow-x: auto;height: 100%;overflow-y: auto; cursor: pointer;"
-          @scroll="exterHandleScroll" ref="systemForm">
+        <div
+          class="wrapper-header"
+          style="flex: 1; overflow-x: auto;height: 100%;overflow-y: auto; cursor: pointer;"
+          @scroll="exterHandleScroll"
+          ref="systemForm">
           <div v-for="(sItem, sIndex) in data" :key="sIndex">
             <div v-for="(rItem, rIndex) in sItem.rooms" :key="rIndex" style="height:67px;">
               <div class="wrapper-item data-row" >
-                <div :id="`${sIndex}_${rIndex}_${index}`"  tabindex = "0"
-                     class="wrapper-td"
-                     :key="index" v-for="(item, index) in columns" style="height:67px;"
-                  @mouseenter="onMouseenter($event, `${sIndex}_${rIndex}_${index}`)" @mouseleave="onMouseleave">
-                  <div class="wrapper-td-flex align-left"
+                <div
+                  :id="`${sIndex}_${rIndex}_${index}`"
+                  tabindex="0"
+                  class="wrapper-td"
+                  :key="index"
+                  v-for="(item, index) in columns"
+                  style="height:67px;"
+                  @mouseenter="onMouseenter($event, `${sIndex}_${rIndex}_${index}`)"
+                  @mouseleave="onMouseleave">
+                  <div
+                    class="wrapper-td-flex align-left"
                     v-if="tax == `${sIndex}_${rIndex}_${index}` && !inDateRange(`${sIndex}_${rIndex}_${index}`)"
                     style="position: relative;z-index: 88; background-color: blanchedalmond;color: #1890FF;">
                     <span style="color: transparent;">a</span>
@@ -204,12 +225,14 @@
                         </div>
                       </div>
                     </template>
-                    <div :class="`wrapper-td-flex align-left ${(sIndex + '_' + rIndex + '_' + index) == findIndex ? 'wrapper-tb_true' : ''}`"
+                    <div
+                      :class="`wrapper-td-flex align-left ${(sIndex + '_' + rIndex + '_' + index) == findIndex ? 'wrapper-tb_true' : ''}`"
                       style="color: aliceblue; height: 100%;font-size: smaller;position: relative;z-index: 99;border-radius: 3px; "
                       :style="{
                         width: `${(inDateRange(`${sIndex}_${rIndex}_${index}`).dayCount * 110) - 4}px`, backgroundColor: ((inDateRange(`${sIndex}_${rIndex}_${index}`).data.settleType < 1 ?
                           (inDateRange(`${sIndex}_${rIndex}_${index}`).data.isLiving ? '#d32424' : '#2490dc') : '#aaa'))
-                      }" @click="handleBillInfo(inDateRange(`${sIndex}_${rIndex}_${index}`).data)">
+                      }"
+                      @click="handleBillInfo(inDateRange(`${sIndex}_${rIndex}_${index}`).data)">
                       <span style="color: transparent;">a</span>
                       <div
                         style="display: flex; flex-direction: column;justify-content: start;align-items: start;height: 100%;">
@@ -242,22 +265,28 @@
           </div>
         </div>
 
-
       </div>
       <div v-if="expandedStatus == 0" class="row-top no-scorll" style="display: flex; height:580px;overflow-y:hidden;">
-        <div class="lefter row-top" ref="leftScrl" @scroll="leftScroll"
+        <div
+          class="lefter row-top"
+          ref="leftScrl"
+          @scroll="leftScroll"
           style="flex-direction: column;width: fit-content;width: 210px; height:calc(500px - 9px);overflow-y:auto;overflow-x:hidden;">
           <div class="top-header" style="width: fit-content;" v-for="(item, index) in data" :key="index">
             <div class="left-wrapper">
-              <div class="wrapper-td date-selection left-content"
+              <div
+                class="wrapper-td date-selection left-content"
                 :style="{ height: `${100 * (item.roomsCount.length)}px` }">
                 <div class="wrapper-td-flex">
                   {{ item.name }}
                 </div>
               </div>
               <div style="display: flex; flex-direction: column;">
-                <div class="wrapper-td date-selection left-content" :key="roomIndex"
-                  style="border-right:1px solid #CDCDCDCC;height: 67px;" v-for="(room, roomIndex) in item.roomsCount">
+                <div
+                  class="wrapper-td date-selection left-content"
+                  :key="roomIndex"
+                  style="border-right:1px solid #CDCDCDCC;height: 67px;"
+                  v-for="(room, roomIndex) in item.roomsCount">
                   <div class="wrapper-td-flex" style="position: relative;">
                     <span>剩余</span>
                   </div>
@@ -266,8 +295,11 @@
             </div>
           </div>
         </div>
-        <div class="wrapper-header" style="flex: 1; overflow-x: auto;height: 100%;overflow-y: auto;"
-          @scroll="exterHandleScroll" ref="systemForm">
+        <div
+          class="wrapper-header"
+          style="flex: 1; overflow-x: auto;height: 100%;overflow-y: auto;"
+          @scroll="exterHandleScroll"
+          ref="systemForm">
           <div v-for="(sItem, sIndex) in data" :key="sIndex">
             <div v-for="(rItem, rIndex) in sItem.roomsCount" :key="rIndex" style="height:100px;">
               <div class="wrapper-item">
@@ -292,15 +324,17 @@
 </template>
 
 <script>
-import { httpAction, getAction, postAction } from "@/api/manage";
-import UpkeepRoomModal from "./modules/upkeep/UpkeepRoomModal.vue";
-import BillRoomInfoModal from "./modules/checkIn/BillRoomInfoModal.vue";
-import BillRoomFormModal from "./modules/checkIn/BillRoomFormModal.vue";
-import ScheduleRoomModal from "./modules/schedule/ScheduleRoomModal.vue";
-import LockRoomModal from "./modules/lock/LockRoomModal.vue";
-import CleanRoomModal from "./modules/clean/CleanRoomModal.vue";
+import { httpAction, getAction, postAction } from '@/api/manage'
+import UpkeepRoomModal from './modules/upkeep/UpkeepRoomModal.vue'
+import BillRoomInfoModal from './modules/checkIn/BillRoomInfoModal.vue'
+import BillRoomFormModal from './modules/checkIn/BillRoomFormModal.vue'
+import ScheduleRoomModal from './modules/schedule/ScheduleRoomModal.vue'
+import LockRoomModal from './modules/lock/LockRoomModal.vue'
+import CleanRoomModal from './modules/clean/CleanRoomModal.vue'
 import moment from 'moment'
 
+const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
+
 export default {
   components: {
     CleanRoomModal,
@@ -311,8 +345,8 @@ export default {
     BillRoomInfoModal
   },
   data() {
-
     return {
+      weeks: weeks,
       flag: false,
       data: [],
       oldData: [],
@@ -331,8 +365,8 @@ export default {
       groupType: 1,
       groupCountArr: [],
       res: null,
-      searchValue:'',
-      findIndex:'',
+      searchValue: '',
+      findIndex: '',
       roomLayouts: [],
       floorList: [],
       chooseLayout: null,
@@ -343,7 +377,7 @@ export default {
   },
   watch: {
     '$route'(to, from) {
-      if (to.path === '/room/dynamic/fangtai'){
+      if (to.path === '/room/dynamic/fangtai') {
         this.getData()
       }
     }
@@ -354,110 +388,109 @@ export default {
       this.getData()
     }, 200)
     this.loadLayout()
-
   },
   methods: {
     handleWx(roomInfo) {
-      var selectRoom = [{ roomId: roomInfo.id, roomNo: roomInfo.name }];
-      this.$refs.modalForm.add({ roomRepairList: selectRoom });
-      this.$refs.modalForm.title = "维修";
-      this.$refs.modalForm.disableSubmit = false;
+      var selectRoom = [{ roomId: roomInfo.id, roomNo: roomInfo.name }]
+      this.$refs.modalForm.add({ roomRepairList: selectRoom })
+      this.$refs.modalForm.title = '维修'
+      this.$refs.modalForm.disableSubmit = false
     },
     handleLock(roomInfo) {
-      var selectRoom = [{ roomId: roomInfo.id, roomNo: roomInfo.name }];
-      this.$refs.ModalLockRoom.add({ roomLockList: selectRoom });
-      this.$refs.ModalLockRoom.title = "锁房";
-      this.$refs.ModalLockRoom.disableSubmit = false;
+      var selectRoom = [{ roomId: roomInfo.id, roomNo: roomInfo.name }]
+      this.$refs.ModalLockRoom.add({ roomLockList: selectRoom })
+      this.$refs.ModalLockRoom.title = '锁房'
+      this.$refs.ModalLockRoom.disableSubmit = false
     },
     handleClean(roomInfo) {
-      var selectRoom = [{ roomId: roomInfo.id, roomNo: roomInfo.name }];
-      this.$refs.ModalCleanRoom.add({ roomCleanList: selectRoom });
-      this.$refs.ModalCleanRoom.title = "清理房间";
-      this.$refs.ModalCleanRoom.disableSubmit = false;
+      var selectRoom = [{ roomId: roomInfo.id, roomNo: roomInfo.name }]
+      this.$refs.ModalCleanRoom.add({ roomCleanList: selectRoom })
+      this.$refs.ModalCleanRoom.title = '清理房间'
+      this.$refs.ModalCleanRoom.disableSubmit = false
     },
     scheduleClick(roomInfo, date) {
-      var selectRoom = [roomInfo];
-      this.$refs.ModalScheduleRoom.addList(selectRoom, "1",date);
-      this.$refs.ModalScheduleRoom.title = "散客预定登记";
-      this.$refs.ModalScheduleRoom.disableSubmit = false;
+      var selectRoom = [roomInfo]
+      this.$refs.ModalScheduleRoom.addList(selectRoom, '1', date)
+      this.$refs.ModalScheduleRoom.title = '散客预定登记'
+      this.$refs.ModalScheduleRoom.disableSubmit = false
     },
     handleMenuClick(roomInfo) {
-      var selectRoom = [roomInfo];
-      this.$refs.ModalBillRoomForm.addList(selectRoom, "1");
-      this.$refs.ModalBillRoomForm.title = "散客入住登记";
-      this.$refs.ModalBillRoomForm.disableSubmit = false;
+      var selectRoom = [roomInfo]
+      this.$refs.ModalBillRoomForm.addList(selectRoom, '1')
+      this.$refs.ModalBillRoomForm.title = '散客入住登记'
+      this.$refs.ModalBillRoomForm.disableSubmit = false
     },
     handleBillInfo(info) {
       if (info.isLiving != 1) {
         this.$router.push({
-          name: "room-scheduledetail",
+          name: 'room-scheduledetail',
           params: {
             id: info.orderNo
-          },
-        });
+          }
+        })
         return
       }
       this.$refs.ModalBillRoomInfo.add(
         info.bookingOrderId,
         1
-      );
-      this.$refs.ModalBillRoomInfo.title = "账单";
-      this.$refs.ModalBillRoomInfo.disableSubmit = true;
+      )
+      this.$refs.ModalBillRoomInfo.title = '账单'
+      this.$refs.ModalBillRoomInfo.disableSubmit = true
     },
     handleCompleteRepair(roomInfo) {
-      var ids = roomInfo.id;
-      postAction("/fw/fwRoomRepair/completeRepairRoom?roomIds=" + ids, {}).then(
+      var ids = roomInfo.id
+      postAction('/fw/fwRoomRepair/completeRepairRoom?roomIds=' + ids, {}).then(
         (res) => {
           if (res.success) {
-            this.$message.success(res.message);
-            this.onPanelChange();
+            this.$message.success(res.message)
+            this.onPanelChange()
           }
         }
-      );
+      )
     },
 
     handleDirty(roomInfo) {
-      var ids = roomInfo.id;
-      postAction("/rooms/cesRooms/dirtyRoom?roomIds=" + ids, {}).then((res) => {
+      var ids = roomInfo.id
+      postAction('/rooms/cesRooms/dirtyRoom?roomIds=' + ids, {}).then((res) => {
         if (res.success) {
-          this.$message.success(res.message);
-          this.onPanelChange();
+          this.$message.success(res.message)
+          this.onPanelChange()
         }
-      });
+      })
     },
     handleOffLock(roomInfo) {
-      var ids = roomInfo.id;
-      postAction("/fw/fwRoomLock/offLockRoom?roomIds=" + ids, {}).then(
+      var ids = roomInfo.id
+      postAction('/fw/fwRoomLock/offLockRoom?roomIds=' + ids, {}).then(
         (res) => {
           if (res.success) {
-            this.$message.success(res.message);
-            this.onPanelChange();
+            this.$message.success(res.message)
+            this.onPanelChange()
           }
         }
-      );
+      )
     },
     modalFormOk(e) {
-      this.onPanelChange();
+      this.onPanelChange()
       this.$router.push({
-        name: "room-scheduledetail",
-        params: { id: e },
-      });
+        name: 'room-scheduledetail',
+        params: { id: e }
+      })
     },
     modalBillRoomFormOk(e) {
-      this.onPanelChange();
-      console.log("e", e);
-      this.$refs.ModalBillRoomInfo.add(e);
-      this.$refs.ModalBillRoomInfo.title = "账单";
-      this.$refs.ModalBillRoomInfo.disableSubmit = true;
+      this.onPanelChange()
+      console.log('e', e)
+      this.$refs.ModalBillRoomInfo.add(e)
+      this.$refs.ModalBillRoomInfo.title = '账单'
+      this.$refs.ModalBillRoomInfo.disableSubmit = true
     },
     onTypeChange(e) {
-      console.log(e);
+      console.log(e)
       this.groupType = e.target.value
       this.oldData = this.groupType == 1 ? this.res.result.floorRoomVos : this.res.result.layoutRoomVos
       this.changeState()
     },
     onPanelChange() {
-      console.log(this.mStartDate);
+      console.log(this.mStartDate)
       this.startDate = new Date(this.mStartDate.format('YYYY-MM-DD'))
       this.initColumns()
       setTimeout(() => {
@@ -466,7 +499,7 @@ export default {
     },
     mapRoomStatus(status) {
       switch (status) {
-        case 1: return "空净"
+        case 1: return '空净'
       }
     },
     getGroupCount(typeId, date) {
@@ -478,7 +511,7 @@ export default {
       return 0
     },
     changeExpanded() {
-      this.expandedStatus = this.expandedStatus == 1 ? 0 : 1;
+      this.expandedStatus = this.expandedStatus == 1 ? 0 : 1
     },
     checkDirty(status) {
       return status == 2 || status == 4
@@ -518,7 +551,6 @@ export default {
       }
       this.nowRoomIds = nowRoomIds
       this.loadDataSource()
-
     },
     checkDateLt(item, type) {
       if (type == 1) return item.date == new Date().format('yyyy-MM-dd')
@@ -550,33 +582,33 @@ export default {
     },
     getOrderSource() {
       return new Promise((rs, rj) => {
-        var _info = JSON.parse(localStorage.getItem("storeInfo"));
-        getAction("/business/busDictItem/list", {
+        var _info = JSON.parse(localStorage.getItem('storeInfo'))
+        getAction('/business/busDictItem/list', {
           hotelId: _info.id,
-          dictId: "1639538915239743490",
+          dictId: '1639538915239743490'
         }).then((res) => {
           if (res.success) {
-            this.customerSourceList = res.result.records;
+            this.customerSourceList = res.result.records
           }
           rs(true)
         }).catch(() => {
           rs(false)
-        });
+        })
       })
     },
     async getData() {
       await this.getOrderSource()
       let end = new Date(this.startDate.format('yyyy-MM-dd'))
       for (let i = 0; i < 30; i++) {
-        end = end.setDate(end.getDate() + 1);
-        end = new Date(end);
+        end = end.setDate(end.getDate() + 1)
+        end = new Date(end)
       }
       this.endDate = end
-      getAction("/business/busRoomBookingOrders/rili-fangtai", {
-        start: this.startDate.format("yyyy-MM-dd"),
+      getAction('/business/busRoomBookingOrders/rili-fangtai', {
+        start: this.startDate.format('yyyy-MM-dd'),
         end: end.format('yyyy-MM-dd')
       }).then(res => {
-        console.log('rilifangtai', res);
+        console.log('rilifangtai', res)
         this.res = res
         this.oldData = JSON.parse(JSON.stringify(this.groupType == 1 ? res.result.floorRoomVos : res.result.layoutRoomVos))
         this.data = this.groupType == 1 ? res.result.floorRoomVos : res.result.layoutRoomVos
@@ -587,7 +619,7 @@ export default {
         this.oldData.forEach(e => {
           let floor = {
             id: e.id,
-            name: e.name,
+            name: e.name
           }
           floorList.push(floor)
         })
@@ -599,11 +631,11 @@ export default {
         .then((res) => {
           if (res.success) {
             // this.roomLayouts = res.result.records;
-            var data = [];
+            var data = []
             res.result.records.forEach((item) => {
-              data.push({ label: item.name, value: item.id });
-            });
-            this.roomLayouts = data;
+              data.push({ label: item.name, value: item.id })
+            })
+            this.roomLayouts = data
           }
         })
     },
@@ -624,7 +656,6 @@ export default {
           typeId: s.id
         }]
         s.rooms.forEach((t, rIndex) => {
-
           this.columns.forEach((d, dIndex) => {
             let fdIndex = roomCountObjs.findIndex(c => c.typeId == s.id && c.date == d.date)
             if (fdIndex == -1) {
@@ -641,7 +672,7 @@ export default {
             if (findOrderIndex > -1) {
               // 计算房间占用数量
               let fdIndex1 = roomCountObjs.findIndex(c => c.typeId == s.id && c.date == d.date)
-              roomCountObjs[fdIndex1].goCount++;
+              roomCountObjs[fdIndex1].goCount++
               let tpOrder = JSON.parse(JSON.stringify(this.roomStatuList[findOrderIndex]))
               let findExistOrderIndex = this.tempOrderIds.findIndex(w => w.orderId === tpOrder.orderId && w.roomId === tpOrder.roomId)
               if (findExistOrderIndex == -1) {
@@ -656,10 +687,9 @@ export default {
                 } else if (new Date(tpOrder.arrivalTime).format('yyyy-MM-dd HH:mm:ss') < this.endDate.format('yyyy-MM-dd HH:mm:ss') && new Date(tpOrder.dueOutTime).format('yyyy-MM-dd HH:mm:ss') > this.endDate.format('yyyy-MM-dd HH:mm:ss')) {
                   let dayCountSub = Math.abs(this.getDiffDay(new Date(tpOrder.arrivalTime).format('yyyy-MM-dd'), this.endDate.format('yyyy-MM-dd')))
                   if (dayCountSub > 0) dayCount = dayCount - dayCountSub
-
                 }
 
-                if ((30 - dIndex) < dayCount) dayCount = (30 - dIndex);
+                if ((30 - dIndex) < dayCount) dayCount = (30 - dIndex)
 
                 if (dayCount > 30) dayCount = 30
                 // ${index}: 楼层下标   {rIndex}: 房间下标   {dIndex} 时间列下标
@@ -691,7 +721,7 @@ export default {
       totalDays = Math.ceil(diffDate / (1000 * 3600 * 24)) // 向下取整
       // console.log(totalDays)
       if (totalDays == 0) totalDays = 1
-      return totalDays    // 相差的天数
+      return totalDays // 相差的天数
     },
     calDataRows(items, matches) {
       let roomRows = []
@@ -722,12 +752,12 @@ export default {
       this.columns[0]['customRender'] = function (value, row, index) {
         const obj = {
           children: value,
-          attrs: {},
-        };
+          attrs: {}
+        }
 
         if (index > 0) {
           let sIndex = rowSpans.filter(s => (s.index - s.span + 1) == index)
-          console.log(sIndex,);
+          console.log(sIndex)
           if (sIndex.length > 0) {
             let it = sIndex[0]
             obj.attrs.rowSpan = it.span
@@ -740,12 +770,10 @@ export default {
           obj.attrs.colSpan = 2
         }
 
-        return obj;
+        return obj
       }
-
     },
     countRooms() {
-
       let countObjs = []
       this.columnsCount = []
       console.log(this.roomCount, 'roomCount')
@@ -756,11 +784,11 @@ export default {
         console.log(this.nowRoomIds, 'nowRoomIds')
 
         this.roomStatuList.forEach(r => {
-          if (!this.nowRoomIds.includes(r.roomId)){
+          if (!this.nowRoomIds.includes(r.roomId)) {
             return
           }
           if (s.date >= new Date(r.arrivalTime).format('yyyy-MM-dd') && s.date < new Date(r.dueOutTime).format('yyyy-MM-dd')) {
-            dayCountTitle -= 1;
+            dayCountTitle -= 1
           }
         })
         countObjs.push({
@@ -771,11 +799,11 @@ export default {
       this.columnsCount = countObjs
     },
     initColumns() {
-      let cols = [];
-      let dateTime = new Date(this.startDate.format('yyyy-MM-dd'));
+      let cols = []
+      let dateTime = new Date(this.startDate.format('yyyy-MM-dd'))
       for (let i = 0; i < 30; i++) {
-        dateTime = dateTime.setDate(dateTime.getDate() + (i == 0 ? 0 : 1));
-        dateTime = new Date(dateTime);
+        dateTime = dateTime.setDate(dateTime.getDate() + (i == 0 ? 0 : 1))
+        dateTime = new Date(dateTime)
         let title = dateTime.format('MM-dd')
         if (title == new Date().format('MM-dd')) title = '今天'
         cols.push({

+ 164 - 175
src/views/room/fangtailive.vue

@@ -19,22 +19,22 @@
       <div style="width: 80%" class="course-week">
         <div style="display: flex; flex-direction: column">
           <div style="display: flex; gap: 5px; flex-flow: wrap">
-            <a-dropdown :disabled="scheduleBtnDis">
-              <a-menu slot="overlay" @click="scheduleClick">
-                <a-menu-item key="1"> 散客预定 </a-menu-item>
-                <a-menu-item key="2"> 团队预定</a-menu-item>
-              </a-menu>
-              <a-button type="danger"> 预定 <a-icon type="down" /> </a-button>
-            </a-dropdown>
-            <a-dropdown :disabled="checkInBtnDis">
-              <a-menu slot="overlay" @click="handleMenuClick">
-                <a-menu-item key="1"> 散客入住 </a-menu-item>
-                <a-menu-item key="2"> 团队入住</a-menu-item>
-              </a-menu>
-              <a-button type="danger">
-                入住 <a-icon type="down" />
-              </a-button>
-            </a-dropdown>
+            <!--            <a-dropdown :disabled="scheduleBtnDis">-->
+            <!--              <a-menu slot="overlay" @click="scheduleClick">-->
+            <!--                <a-menu-item key="1"> 散客预定 </a-menu-item>-->
+            <!--                <a-menu-item key="2"> 团队预定</a-menu-item>-->
+            <!--              </a-menu>-->
+            <a-button type="danger" @click="scheduleClick"> 预定 </a-button>
+            <!--            </a-dropdown>-->
+            <!--            <a-dropdown :disabled="checkInBtnDis">-->
+            <!--              <a-menu slot="overlay" @click="handleMenuClick">-->
+            <!--                <a-menu-item key="1"> 散客入住 </a-menu-item>-->
+            <!--                <a-menu-item key="2"> 团队入住</a-menu-item>-->
+            <!--              </a-menu>-->
+            <a-button type="danger" @click="handleMenuClick">
+              入住
+            </a-button>
+            <!--            </a-dropdown>-->
             <a-button
               style="margin-bottom: 10px"
               @click="handleClean"
@@ -173,6 +173,7 @@
                       {{ roomLive.livingData.livingOrder.relTag }}
                     </div>
                     <a-popover
+                      v-model="roomLive.popoverShow"
                       placement="rightTop"
                       :mouseLeaveDelay="0"
                       overlayClassName="popoverWidth"
@@ -219,7 +220,7 @@
                         </p>
                         <p>注:{{ roomLive.livingData.livingOrder.remark }}</p>
                         <p v-if="roomLive.bookingData.releBookingRooms != null && roomLive.bookingData.releBookingRooms.length > 1">关联房:{{ releBookingRoom(roomLive.bookingData.releBookingRooms) }}</p>
-                        <p>对客服务:{{ roomLive.livingData.livingOrder.ddisturb ? "  免打扰" : '' }} {{ roomLive.livingData.livingOrder.dquery ? "  免查询" : ''  }}</p>
+                        <p>对客服务:{{ roomLive.livingData.livingOrder.ddisturb ? "  免打扰" : '' }} {{ roomLive.livingData.livingOrder.dquery ? "  免查询" : '' }}</p>
                       </template>
                       <template
                         slot="title"
@@ -453,9 +454,9 @@
                             <a-tag
                               color="blue"
                               v-if="roomLive.livingData &&
-                                  roomLive.livingData.livingOrder &&
-                                  roomLive.livingData.livingOrder.shouKuan -
-                                  roomLive.livingData.livingOrder.xiaoFei <0">
+                                roomLive.livingData.livingOrder &&
+                                roomLive.livingData.livingOrder.shouKuan -
+                                roomLive.livingData.livingOrder.xiaoFei <0">
                             </a-tag>
                             <a-tag
@@ -464,45 +465,41 @@
                             </a-tag>
                             <a-tag
-                                color="blue"
-                                v-if="roomLive.livingData &&
-                                  roomLive.livingData.livingOrder &&
-                                  roomLive.livingData.livingOrder.dueOutTime.substr(0,10) === moment(new Date()).format('YYYY-MM-DD')">
+                              color="blue"
+                              v-if="roomLive.livingData &&
+                                roomLive.livingData.livingOrder &&
+                                roomLive.livingData.livingOrder.dueOutTime.substr(0,10) === moment(new Date()).format('YYYY-MM-DD')">
                             </a-tag>
                             <a-tag
-                                color="blue"
-                                v-if="roomLive.isExamine">
+                              color="blue"
+                              v-if="roomLive.isExamine">
                             </a-tag>
                             <a-tag
                               color="blue"
-                              v-if="
-                                roomLive.livingData &&
-                                  roomLive.livingData.livingOrder &&
-                                  roomLive.livingData.livingOrder.livingType == 2
+                              v-if="roomLive.livingData && roomLive.livingData.livingOrder &&
+                                roomLive.livingData.livingOrder.livingType == 2
                               "
-                            >钟</a-tag
-                            >
+                            >钟</a-tag>
                             <a-tag
                               color="blue"
-                              v-if="
-                                roomLive.livingData &&
-                                  roomLive.livingData.livingOrder &&
-                                  roomLive.livingData.livingOrder.isTeam
+                              v-if="roomLive.livingData && roomLive.livingData.livingOrder &&
+                                roomLive.livingData.livingOrder.livingType == 5
                               "
-                            >团</a-tag
-                            >
+                            >长</a-tag>
                             <a-tag
                               color="blue"
-                              v-if="
-                                roomLive.livingData &&
-                                  roomLive.livingData.livingOrder &&
-                                  roomLive.livingData.livingOrder.dueOutTime ==
-                                  currentDate
+                              v-if=" roomLive.livingData &&
+                                roomLive.livingData.livingOrder &&
+                                roomLive.livingData.livingOrder.isTeam
                               "
-                            >离</a-tag
-                            >
+                            >团</a-tag >
+                            <a-tag
+                              color="blue"
+                              v-if=" roomLive.livingData && roomLive.livingData.livingOrder &&
+                                roomLive.livingData.livingOrder.dueOutTime == currentDate"
+                            >离</a-tag >
                             <a-tag color="blue">{{
                               getCustomerSourceList(
                                 roomLive.livingData.livingOrder.customerSource,
@@ -572,13 +569,8 @@
                                 }}</span
                               >
                             </div> -->
-                            <a-tag
-                              v-if="
-                                roomLive.bookingData &&
-                                  roomLive.bookingData.bookingOrder
-                              "
-                            >订</a-tag
-                            >
+                            <a-tag v-if="roomLive.bookingData &&roomLive.bookingData.bookingOrder">订</a-tag>
+                            <a-tag v-if="roomLive.bookingData &&roomLive.bookingData.bookingOrder && roomLive.roomInfo.lastRoomStatus == 2">脏</a-tag>
                           </template>
                         </div>
                         <!--右键弹出标签-->
@@ -652,8 +644,8 @@
                           </template>
                           <a-menu-item
                             key="31"
-                            v-if="roomLive.roomInfo.roomStatus === 2 || roomLive.roomInfo.roomStatus === 4"
-                          >
+                            v-if="roomLive.roomInfo.roomStatus === 2 || roomLive.roomInfo.roomStatus === 4
+                              || (roomLive.roomInfo.roomStatus === 7 && roomLive.roomInfo.lastRoomStatus === 2)">
                             置干净
                           </a-menu-item>
                           <a-menu-item
@@ -1108,7 +1100,7 @@ export default {
       // 叫醒房间
       rouseRoomList: [],
       // 房间信息筛选暂时
-      roomInformationScreening:[
+      roomInformationScreening: [
         {
           label: '欠费',
           value: '1'
@@ -1132,10 +1124,10 @@ export default {
         {
           label: '不足',
           value: '6'
-        },
+        }
       ],
       // 老房间信息筛选暂时
-      oldRoomInformationScreening:[
+      oldRoomInformationScreening: [
         {
           label: '欠费',
           value: '1'
@@ -1159,10 +1151,10 @@ export default {
         {
           label: '不足',
           value: '6'
-        },
+        }
       ],
       // 对客服务筛选
-      customerServiceScreening:[
+      customerServiceScreening: [
         {
           label: '生日',
           value: '1'
@@ -1182,10 +1174,10 @@ export default {
         {
           label: '保密房',
           value: '5'
-        },
+        }
       ],
       // 老对客服务筛选
-      oldCustomerServiceScreening:[
+      oldCustomerServiceScreening: [
         {
           label: '生日',
           value: '1'
@@ -1205,7 +1197,7 @@ export default {
         {
           label: '保密房',
           value: '5'
-        },
+        }
       ],
       startDate: '',
       endDate: '',
@@ -1225,13 +1217,13 @@ export default {
       kzfLiving: false,
       roomCard: false,
       roomClear: false,
-      CustomerSourceScreening:[],
+      CustomerSourceScreening: [],
       // 房间类型
       checkedCestList: [],
       // 房间信息暂存数据
-      rouseinfoRoomList:[],
+      rouseinfoRoomList: [],
       // 需要查房或正在查房的房间
-      needExamineRoomIds:[],
+      needExamineRoomIds: [],
       // 老房态数据
       oldRoomStatusList: [],
       // 老来源数据
@@ -1245,7 +1237,7 @@ export default {
       // console.log('activeKey', key)
     },
     '$route'(to, from) {
-      if (to.path == '/room/dynamic/fangtai'){
+      if (to.path == '/room/dynamic/fangtai') {
         this.loadData()
       }
     }
@@ -1332,19 +1324,19 @@ export default {
       hotelId: _info.id,
       dictId: '1639538915239743490'
     }).then((res) => {
-      console.log(res);
+      console.log(res)
       if (res.success) {
         let list = []
         res.result.records.forEach((item) => {
           list.push({ label: item.itemText, value: item.id })
         })
-        console.log(list);
+        console.log(list)
         this.customerSourceList = this.customerSourceList.concat(list)
         this.oldCustomerSourceList = this.oldCustomerSourceList.concat(list)
         // this.customerSourceList = list
         // this.oldCustomerSourceList = list
-        console.log(this.customerSourceList);
-        console.log(this.oldCustomerSourceList);
+        console.log(this.customerSourceList)
+        console.log(this.oldCustomerSourceList)
       }
     })
     getAction('/rooms/cesRoomLayout/list', {
@@ -1411,10 +1403,10 @@ export default {
         // }
         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})
+          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})
+          this.cesRoomLayoutList.splice(tempindex, 1, { label: item.label + 0, value: item.value })
         }
       })
     },
@@ -1424,27 +1416,27 @@ export default {
         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})
+            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})
+            this.cesRoomLayoutList.splice(tempindex, 1, { label: item.label, figure: 1, value: item.value })
           }
         }
       })
     },
     // 处理筛选条件数据-对客服务
-    customerServiceProcessing(val,rouse) {
+    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})
+              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})
+              this.customerServiceScreening.splice(tempindex, 1, { label: ids.label, figure: 1, value: ids.value })
             }
         }
         // console.log(ids);
@@ -1452,50 +1444,49 @@ export default {
         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})
+            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})
+            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})
+            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})
+            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})
+            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})
+            this.customerServiceScreening.splice(tempindex, 1, { label: ids.label, figure: 1, value: ids.value })
           }
         }
       })
     },
     // 处理筛选条件数据-房间信息
-    roomInformationFiltering(val,rouse) {
-      console.log(this.roomInformationScreening)
+    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})
+              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})
+              this.roomInformationScreening.splice(tempindex, 1, { label: ids.label, figure: 1, value: ids.value })
             }
         }
         // console.log(ids);
@@ -1503,33 +1494,33 @@ export default {
         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})
+            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})
+            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})
+            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})
+            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})
+            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})
+            this.roomInformationScreening.splice(tempindex, 1, { label: ids.label, figure: 1, value: ids.value })
           }
         }
       })
@@ -1541,14 +1532,14 @@ export default {
           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})
+            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})
+            this.customerSourceList.splice(tempindex, 1, { label: ids.label, figure: 1, value: ids.value })
           }
         }
-      },)
+      })
     },
     handleContextMenu(event) {
       event.preventDefault()
@@ -1708,8 +1699,7 @@ export default {
         })
       })
       this.$refs.ModalScheduleRoom.addList(selectRoom, e.key)
-      this.$refs.ModalScheduleRoom.title =
-        e.key == '1' ? '散客预定登记' : '团队预定登记'
+      this.$refs.ModalScheduleRoom.title = '散客预定登记'
       this.$refs.ModalScheduleRoom.disableSubmit = false
     },
     handleMenuClick(e) {
@@ -1732,9 +1722,9 @@ export default {
         return
       }
       //
-      this.$refs.ModalBillRoomForm.addList(selectRoom, e.key)
-      this.$refs.ModalBillRoomForm.title =
-        e.key == '1' ? '散客入住登记' : '团队入住记'
+      // this.$refs.ModalBillRoomForm.addList(selectRoom, e.key)
+      this.$refs.ModalBillRoomForm.addList(selectRoom, 1)
+      this.$refs.ModalBillRoomForm.title = '散客入住记'
       this.$refs.ModalBillRoomForm.disableSubmit = false
     },
     roomItemClick(roomLive) {
@@ -1813,6 +1803,7 @@ export default {
     },
     handleBillInfo(roomLive) {
       // console.log('handleBillInfo', roomLive)
+      roomLive.popoverShow = false
       if (this.timeId) {
         clearTimeout(this.timeId)
       }
@@ -1974,7 +1965,7 @@ export default {
         }, [])
         // 筛选出对应服务的房间
         this.checkedStateList.forEach(item => {
-            console.log(item);
+            console.log(item)
             list = list.reduce((acc, curr) => {
               // if(item == '3') {
                 const rooms = curr.rooms.filter(room => {
@@ -2029,18 +2020,18 @@ export default {
     },
     roomStatusChange(e) {
       // console.log("e", e);
-      var list = this.oldRoomList;
+      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;
-        }, []);
+          )
+          acc.push({ ...curr, rooms })
+          return acc
+        }, [])
       }
       // console.log("list2", list);
-      this.roomList = list;
+      this.roomList = list
     },
     collapseClick(row, value) {
       this.$set(row, 'collapse', value)
@@ -2197,7 +2188,9 @@ export default {
         if (row.bookingData && row.bookingData.bookingOrder) {
           this.$confirm({
             title: '提示',
-            content: '此房间已被:' + row.bookingData.bookingCustomer.name + ',电话:' + row.bookingData.bookingCustomer.phone + ' 预定,是否预定转入住?',
+            okText: '预定单入住',
+            cancelText: '非预订单入住',
+            content: '房间已被:' + row.bookingData.bookingCustomer.name + ',电话:' + row.bookingData.bookingCustomer.phone + ' 预定,是否预定转入住?',
             onOk: function () {
               that.$router.push({
                 name: 'room-scheduledetail',
@@ -2447,8 +2440,6 @@ export default {
           }
         })
       } else if (e.key == 97) {
-
-
         that.$message.success('设置成功')
       } else if (e.key == 96) {
         let obj = {
@@ -2530,25 +2521,25 @@ export default {
       })
       let templist = this.roomStatusList.map(item => {
         if (item.value == '1') {
-          return {label:item.label + tempGreen,value: item.value}
+          return { label: item.label + tempGreen, value: item.value }
         }
         if (item.value == '2') {
-          return {label:item.label + tempBlack,value: item.value}
+          return { label: item.label + tempBlack, value: item.value }
         }
         if (item.value == '3') {
-          return {label:item.label + tempRed,value: item.value}
+          return { label: item.label + tempRed, value: item.value }
         }
         if (item.value == '4') {
-          return {label:item.label + temppurple,value: item.value}
+          return { label: item.label + temppurple, value: item.value }
         }
         if (item.value == '5') {
-          return {label:item.label + tempDarkGreeb,value: item.value}
+          return { label: item.label + tempDarkGreeb, value: item.value }
         }
         if (item.value == '6') {
-          return {label:item.label + tempGray,value: item.value}
+          return { label: item.label + tempGray, value: item.value }
         }
         if (item.value == '7') {
-          return {label:item.label + tempYellow,value: item.value}
+          return { label: item.label + tempYellow, value: item.value }
         }
       })
       this.roomStatusList = templist
@@ -2565,17 +2556,17 @@ export default {
           }
         })
       })
-      console.log(this.customerSourceList);
+      console.log(this.customerSourceList)
       this.customerSourceList.forEach(item => {
         // if(this.isNumber) {
         //   return
         // }
         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})
+          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})
+          this.customerSourceList.splice(tempindex, 1, { label: item.label + 0, value: item.value })
         }
       })
     },
@@ -2633,7 +2624,7 @@ export default {
       this.checkInBtnDis = false
       this.scheduleBtnDis = false
       await getAction('/rooms/cesRooms/realtime-rooms', {}).then((res) => {
-        console.log(res);
+        console.log(res)
         if (res.success) {
           res.result.forEach((row) => {
             this.$set(row, 'collapse', 1)
@@ -2643,36 +2634,34 @@ export default {
           // 处理房态
           this.houseStateNumbers()
           // 处理来源
-          this.customerSourceList = Object.assign([], this.oldCustomerSourceList);
+          this.customerSourceList = Object.assign([], this.oldCustomerSourceList)
           this.handleSourceFigure()
           // 处理房型
-          this.cesRoomLayoutList = Object.assign([], this.oldCesRoomLayoutList);
+          this.cesRoomLayoutList = Object.assign([], this.oldCesRoomLayoutList)
           this.treatmentRoomType()
-
         }
       })
-      await getAction("/fw/fwLivingJx/getJxRooms", {}).then((res) => {
-        console.log(res);
+      await getAction('/fw/fwLivingJx/getJxRooms', {}).then((res) => {
+        console.log(res)
           if (res.success) {
-              this.rouseRoomList = res.result;
+              this.rouseRoomList = res.result
           }
           var temproomlist = this.oldRoomList
-          this.customerServiceScreening = Object.assign([], this.oldCustomerServiceScreening);
+          this.customerServiceScreening = Object.assign([], this.oldCustomerServiceScreening)
           // 这里处理对客服务中的叫醒数据
           this.rouseRoomList.forEach(item => {
-            temproomlist.forEach((cust,custindex) => {
+            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})
+                  cust.rooms.splice(tempindex, 1, { ...index, temproom: temproom })
                 }
-
               })
             })
           })
           this.roomList = temproomlist
-          console.log(this.roomList);
+          console.log(this.roomList)
           // 处理对客服务数字
           this.roomList.forEach(item => {
             item.rooms.forEach(cust => {
@@ -2685,43 +2674,43 @@ export default {
               }
             })
           })
-          console.log(111);
+          console.log(111)
           this.customerServiceScreening.forEach(item => {
             // if(this.isNumber) {
             //   return
             // }
             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})
+              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})
+              this.customerServiceScreening.splice(tempindex, 1, { label: item.label + 0, value: item.value })
             }
           })
-          console.log(this.customerServiceScreening);
-      });
-      await getAction("/order/cesOrderLeaseGoods/getLeaseRoom", {}).then((res) => {
-          console.log(res);
+          console.log(this.customerServiceScreening)
+      })
+      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;
+                  this.$set(row, 'collapse', 1)
+              })
+              this.rouseinfoRoomList = res.result
           }
           let templeaseroomlist = this.oldRoomList
-          this.roomInformationScreening = Object.assign([], this.oldRoomInformationScreening);
+          this.roomInformationScreening = Object.assign([], this.oldRoomInformationScreening)
           // 这里处理对房间信息中的租借
           this.rouseinfoRoomList.forEach(item => {
-            templeaseroomlist.forEach((cust,custindex) => {
+            templeaseroomlist.forEach((cust, custindex) => {
               let find = cust.rooms.find(room => room.roomInfo.id === item.id)
-              if (find != null){
+              if (find != null) {
                 this.$set(find, 'tempinfo', true)
               }
             })
           })
           // 可能有问题
           this.roomList = templeaseroomlist
-          console.log(this.roomList);
+          console.log(this.roomList)
           // 处理房间信息数字
           this.roomList.forEach(item => {
             item.rooms.forEach(cust => {
@@ -2740,25 +2729,25 @@ export default {
             // }
             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})
+              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})
+              this.roomInformationScreening.splice(tempindex, 1, { label: item.label + 0, value: item.value })
             }
           })
-      });
+      })
       await getAction('/fw/fwRoomExamine/getExamineRoom', {}).then((res) => {
-          console.log(res);
+          console.log(res)
           if (res.success) {
-              this.needExamineRoomIds = res.result;
+              this.needExamineRoomIds = res.result
           }
           let templeaseroomlist = this.oldRoomList
           // this.roomInformationScreening = Object.assign([], this.oldRoomInformationScreening);
           // 这里处理对房间信息中的租借
           this.needExamineRoomIds.forEach(item => {
-            templeaseroomlist.forEach((cust,custindex) => {
+            templeaseroomlist.forEach((cust, custindex) => {
               let find = cust.rooms.find(room => room.roomInfo.id === item)
-              if (find != null){
+              if (find != null) {
                 this.$set(find, 'isExamine', true)
               }
             })
@@ -2790,7 +2779,7 @@ export default {
           //     this.roomInformationScreening.splice(tempindex,1,{label: item.label + 0,value: item.value})
           //   }
           // })
-      });
+      })
 
       getAction('/business/busOtherEmptyDirtyRoom/queryByHotelId', {}).then(
         (res) => {

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

@@ -55,7 +55,8 @@ export default {
       this.visible = true
       this.roomInfoList = []
       roomInfos.forEach(e => {
-        console.log(new Date().format('yyyy-MM-dd'))
+        // console.log(new Date().format('yyyy-MM-dd'))
+        // console.log(e.livingDayPrices, 'e.livingDayPrices')
         let dayPrices = e.livingDayPrices.filter(dayPrice => dayPrice.dayTime >= new Date().format('yyyy-MM-dd'))
         const roomInfo = {
           id: e.id,

+ 130 - 39
src/views/room/modules/checkIn/BillRoomForm.vue

@@ -22,20 +22,15 @@
                   <a-tab-pane
                     v-for="(room, aindex) in model.roomIds"
                     :key="room.id"
-                    :tab="room.name"
+                    :tab='(aindex === 0 ? "主" : "") + room.name'
                     :closable="true"
                     force-render
                   >
                     <div style="display: flex; justify-content: space-between">
-                      <h4
-                        style="
-                          color: rgba(255, 141, 26, 1);
-                          font-weight: 600;
-                        "
-                      >
+                      <h4 style=" color: rgba(255, 141, 26, 1); font-weight: 600;">
                         宾客信息{{ utcTxt }}
                       </h4>
-                      <div v-if="model.roomIds&&model.roomIds.length>1"><a-switch v-model="otherRoomSync" />附属房间录入信息</div>
+                      <div v-if="model.roomIds && model.roomIds.length > 1"><a-switch v-model="otherRoomSync" />附属房间录入信息</div>
                     </div>
                     <a-divider />
                     <!-- <a-col :span="8">
@@ -519,7 +514,7 @@
                             style="width: 120px"
                             :allowClear="false"
                             :disabled-date="disabledDate"
-                            :disabled="model.orderInfo.bookingType === 2"
+                            :disabled="model.orderInfo.bookingType === 2 || model.orderInfo.bookingType == 5"
                             @change="arrivalTimeChange2"
                         />
                         <a-time-picker
@@ -654,7 +649,21 @@
                           <a-col :span="5">
                             <a-input-number v-model="item.money":min="0" placeholder="输入金额" style="width: 90%" @change="$forceUpdate()"></a-input-number>
                           </a-col>
-                          <a-col :span="4"><span>{{ item.chargeType == 3 ? '元/吨' : (item.chargeType == 4 ? '元/度' : '元') }}</span></a-col>
+                          <a-col :span="4">
+                            <span v-if="item.chargeType == 1 || item.chargeType == 2">{{ '元' }}</span>
+                            <span v-else-if="item.chargeType == 3">{{ '元/吨' }}</span>
+                            <span v-else-if="item.chargeType == 4">{{ '元/度' }}</span>
+                            <span v-else-if="item.chargeType == 5">{{'元/立方' }}</span>
+                          </a-col>
+                          <a-col :span="5" v-if="item.chargeType == 3">
+                            <a-input-number v-model="model.roomIds[roomIdsIndex].waterMeter" :min="0" placeholder="输入读数" style="width: 90%"></a-input-number>
+                          </a-col>
+                          <a-col :span="5" v-if="item.chargeType == 4">
+                            <a-input-number v-model="model.roomIds[roomIdsIndex].energyMeter" :min="0" placeholder="输入读数" style="width: 90%"></a-input-number>
+                          </a-col>
+                          <a-col :span="5" v-if="item.chargeType == 5">
+                            <a-input-number v-model="model.roomIds[roomIdsIndex].gasMeter" :min="0" placeholder="输入读数" style="width: 90%"></a-input-number>
+                          </a-col>
                           <a-col :span="5" v-if="item.chargeType == 2">
                             <a-input-number v-model="item.cycleNum" :min="0" placeholder="输入周期" style="width: 90%"></a-input-number>
                           </a-col>
@@ -910,7 +919,8 @@
                     text-align: right;
                   "
                 >
-                  合计应收:{{ amount.toFixed(2) }}
+                  <span v-if="model.orderInfo.bookingType !== 5">合计应收:{{ amount.toFixed(2) }}</span>
+                  <span v-else>合计应收:{{ longRentPayableAmout.toFixed(2) }}</span>
                 </div>
                 <div style=" display: flex; justify-content: space-between; align-items: center; margin-top: 30px; " >
                   <a-tabs
@@ -968,6 +978,7 @@
                                 :value="item.id"
                                 v-for="item in payTypeList"
                                 :key="item.id"
+                                :disabled="getUserPayType(item)"
                               >
                                 {{ item.name }}
                               </a-select-option>
@@ -1018,7 +1029,7 @@
                           </div>
                         </template>
                       </a-table>
-                      <div style="color: rgba(255, 141, 26, 1); font-weight: 200">
+                      <div style="color: rgba(255, 141, 26, 1); font-weight: 200" v-if="model.orderInfo.bookingType !== 5">
                         <p style="margin-bottom: 2px">
                           预定已收:{{ bookingPaidMoney }}
                         </p>
@@ -1030,19 +1041,21 @@
                           合计收款:{{ orderFeesAmout.toFixed(2) }}
                         </p>
                       </div>
-                      <div
-                        style="color: rgba(255, 87, 51, 1); font-weight: 200"
-                      >
+                      <div style="color: rgba(255, 87, 51, 1); font-weight: 200" v-if="model.orderInfo.bookingType !== 5">
                         <p v-if="orderFeesArrearsAmout < 0">
                           欠费:{{ orderFeesArrearsAmout.toFixed(2) }}元
                         </p>
                       </div>
+                      <div style="color: rgba(255, 141, 26, 1); font-weight: 200" v-else>
+                        <p style="margin-bottom: 2px">
+                          合计收款:{{ longRentRelMoneyAmout.toFixed(2) }}
+                        </p>
+                      </div>
                     </a-tab-pane>
                     <a-tab-pane key="2" tab="信用卡预授权">
                       <a-row
                         v-for="(item, index) in payPalModel.list"
-                        :key="index"
-                      >
+                        :key="index">
                         <a-col :span="9">
                           <a-form-model-item
                             :labelCol="{
@@ -1125,7 +1138,7 @@
     ></select-room-form-modal>
 
     <!-- 修改每日单价弹窗 -->
-    <a-modal :visible="editPriceModal" title="调价" @cancel="editPriceModal = false" :width="800" @ok="editPriceOk">
+    <a-modal :visible="editPriceModal" title="调价" @cancel="closeEditPrice" :width="800" @ok="editPriceOk">
       <template v-if="editPriceData.length>0">
         <table v-for="(item, index) in editPriceData" :key="index">
           <tr v-if="index==0">
@@ -1165,7 +1178,7 @@
                 {{ sItem.day }}
               </div>
               <div>
-                <a-input-number :min="0" v-model="sItem.price" />
+                <a-input-number :min="0" v-model="sItem.price" @blur="$forceUpdate()" />
               </div>
             </td>
           </th>
@@ -1386,7 +1399,7 @@ export default {
       depositSplit: true, // 押金分别记账到每个房间
       paymentSplit: true, // 押金,房费分开收款
       bookingPaidFee: [],
-      bookingPaidMoney: null,
+      bookingPaidMoney: 0,
       activeKey: '',
       PriceData: [],
       newTabIndex: 0,
@@ -1431,6 +1444,7 @@ export default {
         roomPrices: [],
         orderFees: []
       },
+      roomPricesCopy: {},
       labelCol: {
         xs: { span: 24 },
         sm: { span: 7 }
@@ -1510,6 +1524,7 @@ export default {
       bookingdicWayList: [],
       warranterList: [],
       hourRoomRuleList: [],
+      oldHourRoomRuleList: [],
       canUserRooms: [],
       customerList: [],
       oldcustomerList: [],
@@ -1533,7 +1548,7 @@ export default {
   },
   computed: {
     editPriceData() {
-      console.log(this.model.roomPrices)
+      // console.log()
       let copy = JSON.parse(JSON.stringify(this.model.roomPrices))
       if (this.model.orderInfo.bookingType === 1) {
         copy.forEach((item, index) => {
@@ -1541,23 +1556,28 @@ export default {
           for (let j = 0; j < item.day; j++) {
             let day = this.addDate(this.model.orderInfo.arrivalTime2, j)
             let newPrice = this.getDayPrice(day, item.layoutId) * this.discount / 100
-            console.log(newPrice,'ppppppppppp')
             brr.push({
               day: day,
               price: newPrice
             })
+            //
+            if (item.editPriceTime && item.editPriceTime.length > 0) {
+              let idx = item.editPriceTime.findIndex(
+                  (item) => item == brr[j].day
+              )
+              if (idx > -1) {
+                console.log(item.editPrice[idx])
+                brr[j].price = item.editPrice[idx]
+              }
+            }
           }
-          console.log('brr', brr, '<<<<<<<<<<<<<')
-          debugger
           item.edit = brr
         })
       }
-      console.log(copy, 'copy')
       // this.model.roomPrices = copy
       // this.$forceUpdate()
       return copy
     },
-
     formDisabled() {
       return this.disabled
     },
@@ -1568,6 +1588,23 @@ export default {
       })
       return sum
     },
+    /* 长租房合计收款 */
+    longRentPayableAmout() {
+      var sum = 0
+      this.collectionChargeList.forEach((item) => {
+        sum += item.payable
+      })
+      return sum
+    },
+    /* 长租房合计收款 */
+    longRentRelMoneyAmout() {
+      var sum = 0
+      this.collectionChargeList.forEach((item) => {
+        sum += item.relMoney
+        debugger
+      })
+      return sum
+    },
     orderFeesArrearsAmout() {
       return this.orderFeesAmout - this.amount
     },
@@ -1889,8 +1926,19 @@ export default {
       pageNo: 1,
       pageSize: 100
     }).then((res) => {
-      if (res.success) {
-        this.hourRoomRuleList = res.result.records
+      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
+          }
+          e.layoutIdArr = e.layoutIds.split(',')
+        })
+        this.oldHourRoomRuleList = res.result.records
+        this.hourRoomRuleList = this.oldHourRoomRuleList.filter(e => e.layoutIdArr.includes(this.model.roomIds[0].layoutId))
+        console.log(this.hourRoomRuleList, 'hourRoomRuleList')
       }
     })
     getAction('/bus/busCustomer/list', {}).then((res) => {
@@ -1953,6 +2001,13 @@ export default {
     //  this.getcesRoomLayout();
   },
   methods: {
+    getUserPayType(item) {
+      if (this.model.orderInfo.customerType === 2 && item.name === '单位挂账'
+      || this.model.orderInfo.customerType === 3 && item.name === '会员卡') {
+        return true
+      }
+      return false
+    },
     customerSourceChange(e) {
       let idx = this.model.roomIds.findIndex(item => item.id == this.roomIdsIndexId)
       this.model.roomIds[idx].customerSource = e
@@ -1960,6 +2015,9 @@ export default {
     },
     // 房价方案改变事件
     roomPriceChange(item) {
+      if (this.model.orderInfo.roomPriceSlnId != null) {
+        this.discount = 100
+      }
       item.roomPrices.forEach(e => {
         e.edit.forEach(ele => {
           ele.price = this.getDayPrice(ele.day, e.layoutId)
@@ -1981,6 +2039,12 @@ export default {
       this.rentCharges = this.chooseLongRentScheme.houseLongRentChargeList.find(e => e.chargeType === 2 && e.isMust)
       // 自定义费项
       this.collectionChargeList = this.chooseLongRentScheme.houseLongRentChargeList.filter(e => e.chargeType !== 3 && e.chargeType !== 4 && e.chargeType !== 5)
+      this.monthCount = this.rentCharges.num
+      this.monthCountChange(this.rentCharges.num)
+      let find = this.chooseLongRentScheme.houseLongRentChargeList.find(e => e.chargeType === 3)
+      if (find != null) {
+        // find.meterRead = thi
+      }
     },
     depositNumChange(value) {
       let payable = this.depositCharges.money * this.depositCharges.num
@@ -1993,14 +2057,22 @@ export default {
       this.rentCharges.payable = payable
     },
     addCharges() {
+      console.log(this.model, 'model,,,,')
       if (this.chargeType == null) {
         this.$message.warning('请先选择要添加的费项')
         return
       }
+      if ((this.chargeType === 3 || this.chargeType === 4 || this.chargeType === 5)
+          && this.chooseLongRentScheme.houseLongRentChargeList.some(e => e.chargeType === this.chargeType)) {
+        this.$message.warning('该抄表类费项已存在')
+        return
+      }
       let charge = {
         name: null,
         chargeType: this.chargeType,
         money: null,
+        relMoney: 0,
+        payable: 0,
         cycleUnit: null,
         payType: this.payTypeList[0].id
       }
@@ -2045,6 +2117,9 @@ export default {
       this.model.orderInfo.vipCustomerId = null
       this.model.orderInfo.contractTeamProtocolId = null
       this.model.orderInfo.contractTeamId = null
+      this.vipCustomerData = {}
+      this.agreementUnitData = { customerName: '' }
+      this.busMarketAgreementCustomer = {}
       this.discount = 100
       console.log(value)
       this.housePriceSchemeList = this.specialSchemeList.filter(e => e.guestType == null || e.guestType === value)
@@ -2053,10 +2128,7 @@ export default {
       if (this.housePriceSchemeList.find(e => e.id === this.model.orderInfo.roomPriceSlnId) == null) {
         this.model.orderInfo.roomPriceSlnId = null
       }
-      debugger
-      if (value === 1) {
-        this.changeRoomPrice(100)
-      }
+      this.editPriceOk()
     },
     handleSearchAgreementUnit(value) {
       let result
@@ -2171,7 +2243,7 @@ export default {
     loadOrderFees() {
       getAction('/business/busOrderFee/getBookingDeposit', { bookingOrderId: this.model.orderInfo.id }).then(resp => {
         if (resp.success && resp.result.length > 0) {
-          this.bookingPaidMoney = null
+          this.bookingPaidMoney = 0
           console.log(resp.result)
           // 预定时支付的费用
           let feeList = []
@@ -2382,8 +2454,13 @@ export default {
       console.log(idx)
       this.editPriceIndex = idx
       console.log('11111111111111111111111', this.model.roomPrices)
+      this.roomPriceCopy = JSON.parse(JSON.stringify(this.model.roomPrices))
       this.editPriceModal = true
     },
+    closeEditPrice() {
+      this.editPriceModal = false;
+      this.model.roomPrices = this.roomPriceCopy
+    },
 
     /**
      * 修改完成
@@ -2612,11 +2689,20 @@ export default {
       console.log(this.model.roomPrices)
     },
     monthCountChange(e) {
-      if (e) {
+      if (e < this.rentCharges.num) {
+        this.monthCount = this.rentCharges.num
+        this.$message.warning('居住月份不能短于付的月份')
+        this.$forceUpdate()
+        return
+      }
+      if (this.monthCount) {
         this.model.orderInfo.dueOutTime2 = moment(this.model.orderInfo.arrivalTime2).add(e, 'month').format('YYYY-MM-DD')
       }
     },
     disabledDate(current) {
+      if (this.model.orderInfo.bookingType == 5){
+        return false
+      }
       return current && current < moment().add(-1, 'days').endOf('day')
     },
     arrivalTimeChange(e) {
@@ -2735,19 +2821,22 @@ export default {
     pulsRoom() {
       var that = this
       if (this.canUserRooms.length === 0) {
+        if (this.this.intervalId != null) {
+          return
+        }
         setTimeout(() => {
           this.intervalId = setInterval(() => {
             this.pulsRoom() // 加载数据函数
           }, 5000)
         })
       } else {
-          this.$refs.modalSelectRoomForm.add(this.canUserRooms)
-          this.$refs.modalSelectRoomForm.title = '选择房间'
-          this.$refs.modalSelectRoomForm.disableSubmit = false
           if (that.intervalId !== null) {
             clearInterval(this.intervalId) // 清除计时器
             this.intervalId = null
           }
+          this.$refs.modalSelectRoomForm.add(this.canUserRooms)
+          this.$refs.modalSelectRoomForm.title = '选择房间'
+          this.$refs.modalSelectRoomForm.disableSubmit = false
         }
     },
     paymentTabsChange(e) {},
@@ -2968,10 +3057,12 @@ export default {
       console.log('tabClick', e)
       var index = this.model.roomIds.findIndex((t) => t.id == e)
       console.log('index', index)
-      this.model.orderInfo.customerSource = this.model.roomIds[index].customerSource
+      let room = this.model.roomIds[index]
+      this.model.orderInfo.customerSource = room.customerSource
       this.model.orderInfo.dayCount = this.model.roomPrices[index].day
       this.roomIdsIndexId = e
       this.roomIdsIndex = index
+      this.hourRoomRuleList = this.oldHourRoomRuleList.filter(e => e.layoutIdArr.includes(room.layoutId))
     },
     /* 添加房间回调 */
     modalFormOk(e) {
@@ -3066,7 +3157,7 @@ export default {
       }
     },
     addList(roomLiveList, key, orderInfo) {
-      console.log('roomLiveList', this.modelDefault)
+      console.log('roomLiveList', roomLiveList)
       this.modelDefault = Object.assign({}, this.modelDefault, {
         roomIds: JSON.parse(JSON.stringify(roomLiveList))
       })

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

@@ -24,7 +24,7 @@ export default {
   data() {
     return {
       title: "",
-      width: 1300,
+      width: 1400,
       visible: false,
       disableSubmit: false,
     };

+ 26 - 7
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -281,8 +281,8 @@
               </a-col>
               <a-col :span="5">
                 <a-radio-group v-model="fItem.gender">
-                  <a-radio :value="1">男</a-radio>
-                  <a-radio :value="2">女</a-radio>
+                  <a-radio :value="1" style="margin-right: 0px">男</a-radio>
+                  <a-radio :value="2" style="margin-right: 0px">女</a-radio>
                 </a-radio-group>
               </a-col>
               <a-col :span="6">
@@ -302,7 +302,8 @@
                 <a-icon @click="cancelPeople(index)" style="color: #f56c6c" class="dynamic-delete-button" type="close-circle" />
               </a-col>
               <a-col :span="21">
-                <a-input v-model="fItem.address" placeholder="请输入地址"></a-input>
+                <a-input v-model="fItem.address" placeholder="请输入地址" style="width: 70%;"></a-input>
+                <a-button type="primary" ghost style="width: 20%; margin-left: 20px">读卡</a-button>
               </a-col>
             </a-row>
             <div id="livingCustomers-grid">
@@ -929,28 +930,32 @@ const columns2 = [
   {
     title: '入账时间',
     dataIndex: 'createTime',
+    align: 'center',
     // width: 110,
     customRender: function (text, record) {
       if (text !== null && text !== '') {
-        return record.createTime.substring(0, 10)
+        return record.createTime
       }
     }
   },
   {
     title: '支付方式',
     dataIndex: 'payType',
+    align: 'center',
     // width: 100,
     scopedSlots: { customRender: 'payType' }
   },
   {
     title: '备注',
     dataIndex: 'remark',
+    align: 'center',
     // width: 120,
     scopedSlots: { customRender: 'subjectType' }
   },
   {
     title: '金额',
-    dataIndex: 'money'
+    dataIndex: 'money',
+    align: 'center',
     // width: 60,
   }
 ]
@@ -1713,10 +1718,17 @@ export default {
         msg = '预收房费'
       } else if (text == 3) {
         msg = '每日房费'
+        if (record.remark != null) {
+          msg = record.remark
+        }
       } else if (text == 4) {
         msg = '优惠金额'
       } else if (text == 5) {
-        msg = '结账收款'
+        if (record.money < 0) {
+          msg = '结账退款'
+        } else {
+          msg = '结账收款'
+        }
       } else if (text == 6) {
         msg = '商品-' + record.feeGoodVo.name
       } else if (text == 7) {
@@ -2004,6 +2016,8 @@ export default {
         this.$confirm({
           title: '提示',
           content: '是否团队结账?',
+          okText: '团队结账',
+          cancelText: '单房结账',
           onOk: function () {
             that.tabSelectRoomId = '1'
             that.tabChange('1')
@@ -2125,7 +2139,12 @@ export default {
       })
     },
     adjustPrice() {
-      if (this.model.livingRoomIds.some(e => moment(e.livingOrder.dueOutTime).format('yyyy-MM-DD') <= new Date().format('yyyy-MM-dd'))) {
+      console.log(this.model.livingRoomIds, 'this.model.livingRoomIds')
+      console.log(this.chooseLivingRoom)
+      if (this.chooseLivingRoom.roomId === '1' && this.model.livingRoomIds.every(e => moment(e.livingOrder.dueOutTime).format('yyyy-MM-DD') <= new Date().format('yyyy-MM-dd'))) {
+        this.$message.warning('当前时间已过预离时间,不能进行操作')
+        return
+      } else if (moment(this.chooseLivingRoom.livingOrder.dueOutTime).format('yyyy-MM-DD') <= new Date().format('yyyy-MM-dd')){
         this.$message.warning('当前时间已过预离时间,不能进行操作')
         return
       }

+ 15 - 4
src/views/room/modules/checkIn/CustomerForm.vue

@@ -17,15 +17,26 @@
             >
               <a-select
                 v-model="model.certType"
-                style="width: 100%"
+                style="width: 70%"
                 placeholder="证件类型"
                 :allowClear="true"
               >
                 <a-select-option :value="1">身份证</a-select-option>
                 <a-select-option :value="2">护照</a-select-option>
               </a-select>
+              <a-button type="primary" ghost style="width: 20%; margin-left: 20px">读卡</a-button>
+
             </a-form-model-item>
           </a-col>
+<!--          <a-col :span="2">-->
+<!--            <a-form-model-item-->
+<!--                label=""-->
+<!--                :labelCol="labelCol"-->
+<!--                :wrapperCol="wrapperCol"-->
+<!--                prop=""-->
+<!--            >-->
+<!--            </a-form-model-item>-->
+<!--          </a-col>-->
           <a-col :span="24">
             <a-form-model-item
               label="姓名"
@@ -86,11 +97,11 @@
               ></a-input>
             </a-form-model-item>
           </a-col>
-          <!-- <a-col :span="24">
+          <a-col :span="24">
             <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
               <a-input v-model="model.address" placeholder="请输入地址"  ></a-input>
             </a-form-model-item>
-          </a-col> -->
+          </a-col>
         </a-row>
       </a-form-model>
     </j-form-container>
@@ -233,4 +244,4 @@ export default {
     },
   },
 };
-</script>
+</script>

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

@@ -11,7 +11,7 @@
                 <a-form-model ref="form" :model="model" :rules="validatorRules">
                   <a-col :span="9">
                     <a-form-model-item>
-                      <a-input v-model="queryParams.name" style="width: 80%" placeholder="名称" />
+                      <a-input v-model="queryParams.name" style="width: 80%" @pressEnter="loadData" placeholder="名称" />
                     </a-form-model-item>
                   </a-col>
                   <a-col :span="3">

+ 9 - 2
src/views/room/modules/checkIn/PayOrRefund.vue

@@ -819,6 +819,9 @@ export default {
               // 将组合退款上的退款金额,按支付方式摊到各个收款单
               let prerefund = e.prerefund
               originalFeeList.forEach(ele => {
+                if (ele.payType !== e.payType) {
+                  return
+                }
                 if (prerefund > ele.money) {
                   ele.prerefund = ele.money
                   prerefund -= ele.money
@@ -837,7 +840,9 @@ export default {
                 payType: item.payType,
                 custorerOrderRemark: '结账退款',
                 isPreferential: this.model.isPreferential,
-                preferentialMoney: this.model.preferentialMoney
+                preferentialMoney: this.model.preferentialMoney,
+                returnFeeId: item.id,
+                returnItem: true
               })
             })
           } else {
@@ -908,7 +913,7 @@ export default {
           // 过滤掉退款单
           this.originalFeeList = res.result.filter(e => !e.returnItem)
           this.originalFeeList.forEach(e => {
-            let returnMoney = res.result.filter(ele => e.id === ele.returnFeeId).reduce((accumulator, ele) => accumulator + ele.money, 0)
+            let returnMoney = res.result.filter(ele => e.id === ele.returnFeeId && ele.returnItem).reduce((accumulator, ele) => accumulator + ele.money, 0)
             e.money = e.money - returnMoney
           })
           console.log(res.result.filter(e => e.returnItem))
@@ -920,6 +925,8 @@ export default {
               return
             }
             let find = this.combineFeeList.find(ele => ele.payType != null && e.payType === ele.payType)
+            console.log(find)
+            debugger
             if (find != null) {
               find.money += e.money
             } else {

+ 18 - 2
src/views/room/modules/fangtaiModal/continuedModal/continuedForm.vue

@@ -14,6 +14,7 @@
                   <a-date-picker
                       v-model="model.batchTime"
                       :disabled-date="disabledDate"
+                      :disabled-time="disabledTime"
                       show-time
                       format="YYYY-MM-DD HH:mm:ss"
                       @change="batchChangeTime" />
@@ -40,6 +41,7 @@
                 <a-date-picker
                     v-model="record.newDueOutTime"
                     :disabled-date="disabledDate"
+                    :disabled-time="disabledTime"
                     show-time
                     format="YYYY-MM-DD HH:mm:ss"
                     @change="timeChange(record)"/>
@@ -151,7 +153,7 @@ const columns = [
     scopedSlots: { customRender: 'breakfastNum' }
   },
   {
-    title: '新预离时间',
+    title: '时间',
     width: 80,
     align: 'center',
     scopedSlots: { customRender: 'newDueOutTime' }
@@ -281,6 +283,20 @@ export default {
     disabledDate(current) {
       return current && current < moment().add(-1, 'days').endOf('day')
     },
+    disabledTime() {
+      return {
+        disabledHours: () => this.range(0, 24),
+        disabledMinutes: () => this.range(0, 60),
+        disabledSeconds: () => this.range(0, 60)
+      };
+    },
+    range (start, end) {
+      const result = []
+      for (let i = start; i < end; i++) {
+        result.push(i)
+      }
+      return result
+    },
     onSelectChange(selectedRowKeys, selectionRows) {
       console.log(selectedRowKeys, selectionRows)
       this.selectedRowKeys = selectedRowKeys
@@ -389,7 +405,7 @@ export default {
       const diffDays = (secondDate - firstDate) / oneDay;
       this.isAddDate = diffDays >= 0;
       if (Math.round(diffDays) <= 0) {
-        
+
         this.PriceData = []
       }
       return Math.round(diffDays);

+ 145 - 15
src/views/room/modules/fangtaiModal/exchangeHouses/exchangeHousesForm.vue

@@ -14,7 +14,7 @@
             :dataSource="tableData">
             <template slot="arrivalTime" slot-scope="text, record, index">
                 <!-- {{ getSubjectTypeText(text,record) }} -->
-                {{ handleDateFromat(record.arrivalTime) + '' + handleDateFromat(record.dueOutTime) }}
+                {{ handleDateFromat(record.arrivalTime) + '~' + handleDateFromat(record.dueOutTime) }}
               </template>
           </a-table>
           <a-form-model ref="form" :model="model" slot="detail">
@@ -23,7 +23,7 @@
                 <a-form-model-item label="新房间" :labelCol="labelCol" :wrapperCol="wrapperCol" style="margin-top: 10px; margin-bottom: 10px" prop="">
                   <template v-if="selectData.length>0">
                     {{ newRoom && newRoom.name }}
-                  </template> <a href="#" @click="selectVisible = true">选择</a>
+                  </template> <a href="#" @click="() => {selectVisible = true}">选择</a>
                 </a-form-model-item>
               </a-col>
               <a-col :span="24">
@@ -142,16 +142,83 @@
               {{ selectData[0].roomInfo && selectData[0].roomInfo.name }}
             </div>
           </div>
-
         </a-col>
-        <a-col :span="24" v-if="dataList.length>0">
-          <div style="height:300px;overflow: scroll;">
-            <div style="display:flex;flex-wrap:wrap;">
-              <div v-for="(item,index) in dataList" :key="index" @click="selectRoom(item, index)" :class="{'active':index==link}" style="border:1px solid #ccc;padding: 5px 20px;margin-right:10px;margin-top:10px;border-radius:5px;height:30px;" >
-                {{ item && item.name }}
+        <a-col :span="24">
+          <a-tabs
+              default-active-key="room-all"
+              tab-position="left"
+              :style="{ height: '300px' }"
+          >
+            <a-tab-pane
+                tab="全部"
+                key="room-all"
+            >
+              <div>
+                <a-row :gutter="[8, 8]" style="overflow: auto;height:300px;">
+                  <a-col
+                      :span="24"
+                      v-for="(item, index) in (roomList || [])"
+                      :key="index"
+                      v-if="item.floorRooms && item.floorRooms.length > 0"
+                  >
+                    <div>{{ item.buildingName + item.floorName }}</div>
+                    <div style="display:flex;flex-wrap:wrap;">
+                      <div
+                          v-for="(r, rIndex) in item.floorRooms"
+                          :style="{'border-left-color':filterColor(r.roomStatus)}"
+                          @click="checkRoomClick(r)"
+                          :key="'floorRooms' + rIndex"
+                          :class="[r.check == 1 ? 'check' : 'nocheck', r.kz == 1 ? 'kz' : '',]"
+                          class="nocheck room-status">
+                        <!-- <div
+                        :class="[
+                          r.check == 1 ? 'check' : 'nocheck',
+                          r.kz == 1 ? 'kz' : '',
+                        ]"
+                        style="display:flex;flex-wrap:wrap;"
+                        @click="checkRoomClick(r)"
+                      >
+                        <div class="nocheck room-status">
+                          {{ r.name }}
+                        </div>
+                      </div> -->
+                        {{ r.name }}
+                      </div>
+                    </div>
+                  </a-col>
+                </a-row>
               </div>
-            </div>
-          </div>
+            </a-tab-pane>
+            <a-tab-pane
+                v-for="(room, index) in roomList"
+                :key="'room' + index"
+                :tab="room.floorName"
+            >
+              <div
+                  id="components-grid-demo-playground"
+                  style="height: 300px; overflow: hidden auto"
+              >
+                <a-row :gutter="[8, 8]">
+                  <a-col
+                      :span="3"
+                      v-for="(r, rIndex) in room.floorRooms"
+                      :key="'floorRooms' + rIndex"
+                  >
+                    <div
+                        :class="[
+                            r.check == 1 ? 'check' : 'nocheck',
+                            r.kz == 1 ? 'kz' : '',
+                          ]"
+                        :style="{'border-left-color':filterColor(r.roomStatus)}"
+                        @click="checkRoomClick(r)"
+                    >
+                      {{ r.name }}
+                    </div></a-col
+                  >
+                </a-row>
+              </div>
+            </a-tab-pane>
+          </a-tabs>
         </a-col>
       </a-row>
     </a-modal>
@@ -267,7 +334,8 @@ export default {
             timeData: [],
             oldTimeData: [],
             roomScheme: 1,
-            differPrice: 0 // 新旧房间总差价
+            differPrice: 0, // 新旧房间总差价
+            roomStatusOptions: []
         }
     },
     watch: {
@@ -348,8 +416,45 @@ export default {
             }
             this.plus()
         })
+        //
+        getAction('/rooms/cesRooms/room-status-color', {}).then((res) => {
+          if (res.success) {
+            // this.roomStatusColorList = res.result;
+            var list = []
+            res.result.forEach((item) => {
+              list.push(item)
+            })
+            list = list.filter(item => item.label == '空净' || item.label == '空脏')
+            console.log(list)
+            this.roomStatusOptions = list
+            this.checkChange('', [this.roomStatusOptions[0].value, this.roomStatusOptions[1].value])
+          }
+        })
+
     },
     methods: {
+      filterColor(state) {
+        var color = ''
+        let arr = this.roomStatusOptions.filter(item => item.value == state)
+        color = arr[0] ? arr[0].extend : ''
+        return color
+      },
+      checkRoomClick(row) {
+        console.log(row)
+        if (!this.kzfLiving && row.roomStatus === 2) {
+          this.$message.warning('空脏房不允许入住')
+          return
+        }
+        if (row.check === 1) {
+          row.check = 0
+          this.selectData.splice(0, 1)
+        } else {
+          row.check = 1
+          this.selectData.length > 0 ? this.selectData[0].check = 0 : ''
+          this.selectData[0] = row
+        }
+        this.$forceUpdate()
+      },
       // 处理日期
         handleDateFromat(val) {
           let str  = val.substr(5, 5)
@@ -465,7 +570,7 @@ export default {
             })
         },
         roomSchemeChange(e) {
-          
+
           console.log(this.oldTimeData)
           if (this.roomScheme === 1) {
             this.timeData = JSON.parse(JSON.stringify(this.oldTimeData))
@@ -555,7 +660,6 @@ export default {
             this.edit(this.modelDefault)
         },
         edit(record) {
-          
           console.log(record)
             this.tableData = [{
               roomName: record.roomInfo.name,
@@ -577,8 +681,9 @@ export default {
                     price: this.model.livingData.price[i].price
                 }
             }
-            let nowDate = new moment().format('yyyy-MM-DD')
-             arr = arr.filter(e => e.day > nowDate)
+            let nowDate = moment(new Date()).format('yyyy-MM-DD')
+          console.log(nowDate,'nowDate')
+             arr = arr.filter(e => e.day >= nowDate)
             this.timeData = arr
             // 用于改回原房价时
             this.oldTimeData = JSON.parse(JSON.stringify(arr))
@@ -692,4 +797,29 @@ export default {
   color: #1890ff;
   transition: all 0.3s;
 }
+
+#components-grid-demo-playground .nocheck {
+  border: 1px solid #cccccc;
+  border-left-width: 2px;
+}
+.check {
+  border: 1px solid #00a0e9 !important;
+}
+.nocheck {
+  border: 1px solid #cccccc;
+}
+.room-status{
+  /* height: 100%; */
+  /* line-height: 100%; */
+  font-size: 13px;
+  text-align: center;
+  cursor: pointer;
+  border-radius: 5px;
+  margin-right: 10px;
+  border: 1px solid #cccccc;
+  padding: 0px 16px;
+  margin-top: 5px;
+  border-left-width: 2px;
+  border-left-style: solid;
+}
 </style>

+ 4 - 1
src/views/room/modules/schedule/SelectRoomForm.vue

@@ -273,13 +273,16 @@ export default {
     add(row, chooseRooms) {
       this.oldRow = row
       let record = JSON.parse(JSON.stringify(row))
-      this.chooseRooms = JSON.parse(JSON.stringify(chooseRooms))
+      if (chooseRooms != null) {
+        this.chooseRooms = JSON.parse(JSON.stringify(chooseRooms))
+      }
       this.layoutName = record.layout.name
       this.presetNum = record.layout.presetNum
       this.roomList = record.buildingRooms
       this.edit(this.modelDefault)
     },
     edit(record) {
+      console.log(this.roomList,'this.roomList')
       this.model = Object.assign({}, record)
       this.roomList.forEach((t) => {
         t.floorRooms.forEach((f) => {

+ 1 - 1
src/views/room/modules/scheduleTeam/EdiBatchScheduleRoomForm.vue

@@ -1332,4 +1332,4 @@ export default {
   line-height: 16px;
   display: inline-block;
 }
-</style>
+</style>

+ 1 - 1
src/views/room/modules/scheduleTeam/SelectRoomFormModal.vue

@@ -62,4 +62,4 @@ export default {
     },
   },
 };
-</script>
+</script>

+ 13 - 31
src/views/settings/components/roomModules/modules/housePriceSchemeLayout/housePriceSchemeLayoutForm.vue

@@ -28,7 +28,7 @@
               {{item.content}}
             </a-button>
           </div>
-          
+
         </div>
       </div>
     </a-calendar> -->
@@ -36,8 +36,12 @@
     <a-modal v-model="visibleMoney" title="修改房价" @ok="handleOk">
       <a-input-number style="width: 100%;margin: auto" v-model="updateMoney" />
     </a-modal>
-  <a-table :columns="columns" :alert="true" :data-source="calendarData" :rowKey="(record, index) => index + 1">
-    <template v-for="item in columns" :slot="item.dataIndex" slot-scope="text, record">
+  <a-table :columns="columns" :alert="true" :data-source="calendarData" :rowKey="(record, index) => index + 1" >
+    <span v-for="item in columns.slice(1)" :slot='"titleDate" + item.dataIndex' >
+      {{ item.dataIndex }} <br> {{ weeks[new Date(item.dataIndex).getDay()] }}
+    </span>
+
+    <template v-for="item in columns.slice(1)" :slot="item.dataIndex" slot-scope="text, record">
       <div :class="isWeekend(new Date(item.dataIndex)) ? 'cell_style' : 'cell_stylez'" @click="editPrice(record,item,record[item.dataIndex])">
         {{ record[item.dataIndex] }}
       </div>
@@ -52,6 +56,8 @@
   import { validateDuplicateValue } from '@/utils/util'
   import moment from 'moment';
   import * as dayjs from "dayjs";
+
+  const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
   const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
 
   export default {
@@ -68,6 +74,7 @@
     },
     data () {
       return {
+        weeks: weeks,
         columns: [
           {
             title: '房型',
@@ -204,7 +211,7 @@
             let tempcol = []
             tmeplist[0].schemeLayoutDailyPriceList.forEach(index => {
               let tempindex = {
-                title: index.date,
+                slots: { title: 'titleDate' + index.date },
                 dataIndex: index.date,
                 align: 'center',
                 'scopedSlots': { 'customRender': index.date }
@@ -214,8 +221,7 @@
             this.columns = this.columns.concat(tempcol)
             let temprol = []
             tmeplist.forEach(item => {
-              console.log(item);
-              // let 
+              console.log(item)
               let tempindex = {}
               item.schemeLayoutDailyPriceList.forEach(index => {
                   tempindex[index.date] = index.money
@@ -236,30 +242,6 @@
       isWeekend(date = new Date()) {
         return date.getDay() === 6 || date.getDay() === 0;
       },
-      // // 处理周末
-      // exitCustomRow(record, index) {
-      //   console.log(record);
-      //   for (let item in record) {
-      //     console.log(item);
-      //     const d1 = new Date(item);
-      //     let tempcolor = this.isWeekend(d1)
-      //     // console.log(this.isWeekend(d1));
-      //     console.log(tempcolor);
-      //     if (this.isWeekend(d1)) {
-      //       // console.log(123);
-      //       return 'table-color-dust'
-      //     }
-      //     // if (!this.isWeekend(d1)) {
-      //     //   // console.log(123);
-      //     //   return {
-      //     //     style: {
-      //     //       background: 'red',
-      //     //     },
-      //     //   }
-      //     // }
-      //   }
-      //   console.log(index);
-      // },
       edit (record) {
         console.log(record);
         this.model = Object.assign({}, record);
@@ -267,7 +249,7 @@
         this.schemeLayoutId = record.id
         this.getDateList()
       },
-      
+
       handleMoney(e,value,item){
         var _time = moment(new Date(value)).format('YYYY-MM-DD 00:00:00')
         this.visibleMoney = true

+ 1 - 1
src/views/settings/components/roomModules/roomNumSettings/roomNumTable.vue

@@ -242,7 +242,7 @@ export default {
       url: {
         // list: 'org.jeecg.modules.business/busMarketMember/list',
         list: '/rooms/cesRooms/list',
-        delete: '/rooms/cesRooms/remove',
+        delete: '/rooms/cesRooms/deleteOne',
         deleteBatch: '/rooms/cesRooms/deleteBatch',
         exportXlsUrl: '/rooms/cesRooms/exportXls',
         importExcelUrl: 'rooms/cesRooms/importExcel'