覃浩 2 vuotta sitten
vanhempi
commit
fd6fd37afb

+ 19 - 21
src/views/room/calendarfangtai.vue

@@ -48,19 +48,19 @@
           </div>
         </div>
       </div>
-      <div v-if="expandedStatus == 1" class="row-top no-scorll" style="display: flex; height:500px;overflow-y:hidden;">
+      <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"
-          style="flex-direction: column;width: fit-content;width: 210px; height:calc(500px - 9px);overflow-y:auto;overflow-x:hidden;">
+          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">
-              <div class="wrapper-td date-selection left-content" :style="{ height: `${100 * (item.rooms.length)}px`, borderLeft:'none' }">
+              <div class="wrapper-td date-selection left-content" :style="{ height: `${67 * (item.rooms.length)}px`, borderLeft:'none' }">
                 <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: 100px;" v-for="(room, roomIndex) in item.rooms">
+                  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;">
@@ -105,9 +105,9 @@
         <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:100px;">
+            <div v-for="(rItem, rIndex) in sItem.rooms" :key="rIndex" style="height:67px;">
               <div class="wrapper-item data-row">
-                <div class="wrapper-td " :key="index" v-for="(item, index) in columns" style="height:100px;"
+                <div 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}`)"
@@ -116,17 +116,15 @@
                     <div
                       style="width: 100%; display: flex; flex-direction: column;justify-content: center;align-items: start;">
                       <div style="flex: 1;width: 1px;"></div>
-                      <span>{{ rItem.layoutName }}</span>
-                      <div style="flex: 1;width: 1px;"></div>
-                      <span>{{ rItem.name }}</span>
+                      <span style="font-size: 0.4rem">{{ rItem.layoutName }}</span>
                       <div style="flex: 1;width: 1px;"></div>
-                      <span>¥{{ rItem.marketPrice }}</span>
+                      <span style="font-size: 0.4rem">¥{{ rItem.marketPrice }}</span>
                       <div v-if="checkDateLt(item)" style="height:1px;width: 100%;background-color: #CDCDCDaa;"></div>
                       <span v-if="checkDateLt(item)" style="position: relative;left: -10px;">
-                        <a-button type="link" size="small" @click="scheduleClick(rItem)">
+                        <a-button type="link" size="small" @click="scheduleClick(rItem,item.date)" style="font-size: 0.4rem">
                           预定
                         </a-button>
-                        <a-button type="link" size="small" v-if="checkDateLt(item, 1)" @click="handleMenuClick(rItem)">
+                        <a-button type="link" size="small" v-if="checkDateLt(item, 1)" @click="handleMenuClick(rItem)" style="font-size: 0.4rem">
                           入住
                         </a-button>
                       </span>
@@ -173,21 +171,21 @@
                     <div class="wrapper-td-flex align-left"
                       style="color: aliceblue; height: 100%;font-size: smaller;position: relative;z-index: 99;border-radius: 3px; "
                       :style="{
-                        width: `${(inDateRange(`${sIndex}_${rIndex}_${index}`).dayCount * 110) - 16}px`, backgroundColor: ((inDateRange(`${sIndex}_${rIndex}_${index}`).data.settleType < 1 ?
+                        width: `${(inDateRange(`${sIndex}_${rIndex}_${index}`).dayCount * 110) - 4}px`, backgroundColor: ((inDateRange(`${sIndex}_${rIndex}_${index}`).data.settleType < 1 ?
                           (inDateRange(`${sIndex}_${rIndex}_${index}`).data.isLiving ? 'red' : 'blue') : '#aaa'))
                       }" @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%;">
                         <div style="flex: 1;width: 1px;"></div>
-                        <span style="word-wrap: break-word; font-weight: 600;">{{
+                        <span style="word-wrap: break-word;font-size: 0.4rem;">{{
                           inDateRange(`${sIndex}_${rIndex}_${index}`).data.customerName }}</span>
                         <div style="flex: 1;width: 1px;"></div>
-                        <span style=" font-weight: 600;">{{
+                        <span style="font-size: 0.4rem;">{{
                           getCusSource(inDateRange(`${sIndex}_${rIndex}_${index}`).data.customerSourceId) }}</span>
                         <div style="flex: 1;width: 1px;"></div>
                         <span>
-                          <a-tag color="#000000" v-if="inDateRange(`${sIndex}_${rIndex}_${index}`).data.yuE < 0">
+                          <a-tag style="padding: 2px !important; height:1rem !important; line-height: 8px;" color="#000000" v-if="inDateRange(`${sIndex}_${rIndex}_${index}`).data.yuE < 0">
                           </a-tag>
                         </span>
@@ -210,7 +208,7 @@
 
 
       </div>
-      <div v-if="expandedStatus == 0" class="row-top no-scorll" style="display: flex; height:500px;overflow-y:hidden;">
+      <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"
           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">
@@ -223,7 +221,7 @@
               </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: 100px;" v-for="(room, roomIndex) in item.roomsCount">
+                  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>
@@ -323,9 +321,9 @@ export default {
       this.$refs.ModalCleanRoom.title = "清理房间";
       this.$refs.ModalCleanRoom.disableSubmit = false;
     },
-    scheduleClick(roomInfo) {
+    scheduleClick(roomInfo, date) {
       var selectRoom = [roomInfo];
-      this.$refs.ModalScheduleRoom.addList(selectRoom, "1");
+      this.$refs.ModalScheduleRoom.addList(selectRoom, "1",date);
       this.$refs.ModalScheduleRoom.title = "散客预定登记";
       this.$refs.ModalScheduleRoom.disableSubmit = false;
     },
@@ -672,7 +670,7 @@ export default {
 }
 
 .wrapper-td {
-  padding: 6px 8px;
+  padding: 2px 2px;
   text-align: center;
   display: inline-block;
   width: 110px !important;

+ 3 - 0
src/views/room/modules/schedule/ScheduleRoomForm.vue

@@ -512,6 +512,9 @@ export default {
     );
   },
   methods: {
+    setArrivalTime(dateTime) {
+      this.model.orderInfo.arrivalTime2 = moment(new Date(dateTime)).format("YYYY-MM-DD")
+    },
     presetNumChange(e, record) {
       console.log(e);
       record.layout.canUseCount = record.layout.oldTags - e;

+ 12 - 19
src/views/room/modules/schedule/ScheduleRoomModal.vue

@@ -1,25 +1,13 @@
 <template>
-  <j-modal
-    :title="title"
-    :width="width"
-    :visible="visible"
-    switchFullscreen
-    @ok="handleOk"
-    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
-    @cancel="handleCancel"
-    cancelText="关闭"
-  >
-    <schedule-room-form
-      ref="realForm"
-      @ok="submitCallback"
-      :disabled="disableSubmit"
-      :bookingOrdersId="bookingOrdersId"
-    ></schedule-room-form>
+  <j-modal :title="title" :width="width" :visible="visible" switchFullscreen @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
+    <schedule-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"
+      :bookingOrdersId="bookingOrdersId"></schedule-room-form>
   </j-modal>
 </template>
 
 <script>
-import ScheduleRoomForm from "./ScheduleRoomForm";
+import ScheduleRoomForm from "./ScheduleRoomForm.vue";
 export default {
   name: "ScheduleRoomModal",
   components: {
@@ -46,10 +34,14 @@ export default {
         this.$refs.realForm.add();
       });
     },
-    addList(record,key) {
+    addList(record, key, initArrivalTime) {
       this.visible = true;
+
       this.$nextTick(() => {
-        this.$refs.realForm.addList(record,key);
+        if (initArrivalTime) {
+          this.$refs.realForm.setArrivalTime(initArrivalTime)
+        }
+        this.$refs.realForm.addList(record, key);
       });
     },
     edit(record) {
@@ -80,6 +72,7 @@ export default {
   padding: 12px;
   max-height: calc(80vh - 150px);
   overflow-y: auto;
+
   &::-webkit-scrollbar {
     width: 6px;
     /*高宽分别对应横竖滚动条的尺寸*/