gqx 2 years ago
parent
commit
75dcd969ea

+ 39 - 31
src/views/room/fangtailive.vue

@@ -335,8 +335,9 @@
                               <span>
                               <span>
                                 {{
                                 {{
                                   roomLive.livingData.livingCustomers
                                   roomLive.livingData.livingCustomers
-                              ? roomLive.livingData.livingCustomers.customerName
-                              : ""
+                                    ? roomLive.livingData.livingCustomers
+                                        .customerName
+                                    : ""
                                 }}
                                 }}
                                 <a-tag
                                 <a-tag
                                   color="pink"
                                   color="pink"
@@ -733,10 +734,14 @@
       ref="modalSelectCheckInRoomOrder"
       ref="modalSelectCheckInRoomOrder"
       @ok="modalLockRoomFormOk"
       @ok="modalLockRoomFormOk"
     ></select-check-in-room-order-modal>
     ></select-check-in-room-order-modal>
-    <customer-modal ref="modalCustomerForm" @ok="modalLockRoomFormOk"></customer-modal>
-    <exchange-houses-modalVue ref="exchangeHousesModalVue" @ok="modalLockRoomFormOk" />
-
-
+    <customer-modal
+      ref="modalCustomerForm"
+      @ok="modalLockRoomFormOk"
+    ></customer-modal>
+    <exchange-houses-modalVue
+      ref="exchangeHousesModalVue"
+      @ok="modalLockRoomFormOk"
+    />
   </a-card>
   </a-card>
 </template>
 </template>
 
 
@@ -759,14 +764,13 @@ import guestorders from "./guestorders";
 import leasegoods from "./leasegoods";
 import leasegoods from "./leasegoods";
 import membermessage from "./membermessage";
 import membermessage from "./membermessage";
 import membergoodsmanage from "./membergoodsmanage";
 import membergoodsmanage from "./membergoodsmanage";
-import fangwuLookRoom from './fangwuLookRoom.vue'
+import fangwuLookRoom from "./fangwuLookRoom.vue";
 
 
-import lookRoomModalVue from './modules/fangtaiModal/lookRoomModal/lookRoomModal.vue';
-import continuedModalVue from './modules/fangtaiModal/continuedModal/continuedModal.vue';
+import lookRoomModalVue from "./modules/fangtaiModal/lookRoomModal/lookRoomModal.vue";
+import continuedModalVue from "./modules/fangtaiModal/continuedModal/continuedModal.vue";
 import SelectCheckInRoomOrderModal from "./modules/checkIn/SelectCheckInRoomOrderModal.vue";
 import SelectCheckInRoomOrderModal from "./modules/checkIn/SelectCheckInRoomOrderModal.vue";
 import CustomerModal from "./modules/checkIn/CustomerModal.vue";
 import CustomerModal from "./modules/checkIn/CustomerModal.vue";
-import exchangeHousesModalVue from './modules/fangtaiModal/exchangeHouses/exchangeHousesModal.vue';
-
+import exchangeHousesModalVue from "./modules/fangtaiModal/exchangeHouses/exchangeHousesModal.vue";
 
 
 import { TreeSelect } from "ant-design-vue";
 import { TreeSelect } from "ant-design-vue";
 import moment from "moment";
 import moment from "moment";
@@ -795,7 +799,7 @@ export default {
     continuedModalVue,
     continuedModalVue,
     SelectCheckInRoomOrderModal,
     SelectCheckInRoomOrderModal,
     CustomerModal,
     CustomerModal,
-    exchangeHousesModalVue
+    exchangeHousesModalVue,
   },
   },
   data() {
   data() {
     return {
     return {
@@ -1141,7 +1145,8 @@ export default {
       } else {
       } else {
         this.$refs.ModalBillRoomInfo.add(
         this.$refs.ModalBillRoomInfo.add(
           roomLive.livingData.livingOrder.bookingOrderId,
           roomLive.livingData.livingOrder.bookingOrderId,
-          1
+          1,
+          roomLive.roomInfo.id
         );
         );
         this.$refs.ModalBillRoomInfo.title = "账单";
         this.$refs.ModalBillRoomInfo.title = "账单";
         this.$refs.ModalBillRoomInfo.disableSubmit = true;
         this.$refs.ModalBillRoomInfo.disableSubmit = true;
@@ -1512,42 +1517,45 @@ export default {
         this.$message.error("接口程序未打开,请打开接口程序");
         this.$message.error("接口程序未打开,请打开接口程序");
         return;
         return;
       } else if (e.key == 15) {
       } else if (e.key == 15) {
-        this.$refs.modalCustomerForm.add(row.livingData.livingOrder.id, row.roomInfo.id);
+        this.$refs.modalCustomerForm.add(
+          row.livingData.livingOrder.id,
+          row.roomInfo.id
+        );
         this.$refs.modalCustomerForm.title = "添加同住人";
         this.$refs.modalCustomerForm.title = "添加同住人";
         this.$refs.modalCustomerForm.disableSubmit = false;
         this.$refs.modalCustomerForm.disableSubmit = false;
         return;
         return;
       } else if (e.key == 18) {
       } else if (e.key == 18) {
         this.$message.error("暂未实现");
         this.$message.error("暂未实现");
         return;
         return;
-      }else if(e.key == 8){
-        this.$refs.lookRoomModalVue.edit(row)
+      } else if (e.key == 8) {
+        this.$refs.lookRoomModalVue.edit(row);
         console.log(this.$refs.lookRoomModalVue);
         console.log(this.$refs.lookRoomModalVue);
-        this.$refs.lookRoomModalVue.title = '查房'
+        this.$refs.lookRoomModalVue.title = "查房";
         this.$refs.lookRoomModalVue.disableSubmit = true;
         this.$refs.lookRoomModalVue.disableSubmit = true;
-        return
-      }else if(e.key == 9){
+        return;
+      } else if (e.key == 9) {
         this.handleBillInfo(row);
         this.handleBillInfo(row);
-        return
-      }else if(e.key == 10){
-        this.$refs.continuedModalVue.edit(row)
-        this.$refs.continuedModalVue.title = '续住'
+        return;
+      } else if (e.key == 10) {
+        this.$refs.continuedModalVue.edit(row);
+        this.$refs.continuedModalVue.title = "续住";
         this.$refs.continuedModalVue.disableSubmit = false;
         this.$refs.continuedModalVue.disableSubmit = false;
-        return
-      }else if( e.key == 14 ){
+        return;
+      } else if (e.key == 14) {
         this.$refs.modalSelectCheckInRoomOrder.add();
         this.$refs.modalSelectCheckInRoomOrder.add();
         this.$refs.modalSelectCheckInRoomOrder.title = "请选择需要关联的订单";
         this.$refs.modalSelectCheckInRoomOrder.title = "请选择需要关联的订单";
         this.$refs.modalSelectCheckInRoomOrder.disableSubmit = false;
         this.$refs.modalSelectCheckInRoomOrder.disableSubmit = false;
         this.$refs.modalSelectCheckInRoomOrder.livingOrderId =
         this.$refs.modalSelectCheckInRoomOrder.livingOrderId =
           row.livingData.livingOrder.id;
           row.livingData.livingOrder.id;
         this.$refs.modalSelectCheckInRoomOrder.livingRoomId = row.roomInfo.id;
         this.$refs.modalSelectCheckInRoomOrder.livingRoomId = row.roomInfo.id;
-        return
-      }else if( e.key==13 ){
-        this.$refs.exchangeHousesModalVue.edit(row)
-        this.$refs.exchangeHousesModalVue.title = '换房'
+        return;
+      } else if (e.key == 13) {
+        this.$refs.exchangeHousesModalVue.edit(row);
+        this.$refs.exchangeHousesModalVue.title = "换房";
         this.$refs.exchangeHousesModalVue.disableSubmit = false;
         this.$refs.exchangeHousesModalVue.disableSubmit = false;
-      }else if( e.key == 16){
+      } else if (e.key == 16) {
         this.handleBillInfo(row);
         this.handleBillInfo(row);
-        return
+        return;
       }
       }
     },
     },
     modalBillRoomFormOk(e) {
     modalBillRoomFormOk(e) {

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

@@ -1419,6 +1419,7 @@ export default {
       this.model.orderInfo.vipCustomerId = value;
       this.model.orderInfo.vipCustomerId = value;
       console.log(result);
       console.log(result);
       this.vipCustomerData = result;
       this.vipCustomerData = result;
+      this.vipCustomerIdChange(result.id)
     },
     },
 
 
     loadOrderFees() {
     loadOrderFees() {

+ 13 - 5
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -34,7 +34,7 @@
           </div>
           </div>
         </div>
         </div>
         <a-divider />
         <a-divider />
-        <a-tabs @change="tabChange">
+        <a-tabs @change="tabChange" v-model="tabSelectRoomId">
           <a-tab-pane
           <a-tab-pane
             :key="item.roomId"
             :key="item.roomId"
             v-for="(item, livingIndex) in model.livingRoomIds"
             v-for="(item, livingIndex) in model.livingRoomIds"
@@ -69,7 +69,7 @@
               /></a-descriptions-item>
               /></a-descriptions-item>
               <a-descriptions-item label="性别">
               <a-descriptions-item label="性别">
                 {{
                 {{
-                  item.livingCustomers  && item.livingCustomers[0]
+                  item.livingCustomers && item.livingCustomers[0]
                     ? item.livingCustomers[0].gender === 1
                     ? item.livingCustomers[0].gender === 1
                       ? "男"
                       ? "男"
                       : "女"
                       : "女"
@@ -77,11 +77,13 @@
                 }}</a-descriptions-item
                 }}</a-descriptions-item
               >
               >
               <a-descriptions-item label="房间数量">
               <a-descriptions-item label="房间数量">
-                {{ livingIndex == 0 ? model.livingRoomIds.length : 1 }}间
+                {{ livingIndex == 0 ? model.livingRoomIds.length - 1 : 1 }}间
               </a-descriptions-item>
               </a-descriptions-item>
               <a-descriptions-item label="手机号">
               <a-descriptions-item label="手机号">
                 {{
                 {{
-                  item.livingCustomers  && item.livingCustomers[0] ? item.livingCustomers[0].phone : "--"
+                  item.livingCustomers && item.livingCustomers[0]
+                    ? item.livingCustomers[0].phone
+                    : "--"
                 }}
                 }}
                 <a-icon
                 <a-icon
                   type="edit"
                   type="edit"
@@ -607,6 +609,8 @@ export default {
           "/business/busRoomBookingOrders/getBookingOrderInfo",
           "/business/busRoomBookingOrders/getBookingOrderInfo",
       },
       },
       id: "",
       id: "",
+      roomId: "",
+      tabSelectRoomId: "",
       customerSourceList: [],
       customerSourceList: [],
       warranterList: [],
       warranterList: [],
       key: 0,
       key: 0,
@@ -941,6 +945,9 @@ export default {
           });
           });
           livingRoomId.livingCustomers = list;
           livingRoomId.livingCustomers = list;
           res.result.livingRoomIds.unshift(livingRoomId);
           res.result.livingRoomIds.unshift(livingRoomId);
+          this.tabSelectRoomId = this.roomId
+            ? this.roomId
+            : res.result.livingRoomIds[1].roomId;
           this.model = res.result;
           this.model = res.result;
           getAction("/business/busRoomBookingOrders/living-fees", {
           getAction("/business/busRoomBookingOrders/living-fees", {
             bookingOrderId: this.model.orderInfo.id,
             bookingOrderId: this.model.orderInfo.id,
@@ -1032,9 +1039,10 @@ export default {
     onChange(e) {
     onChange(e) {
       console.log(e);
       console.log(e);
     },
     },
-    add(id, key) {
+    add(id, key, roomId) {
       this.key = key;
       this.key = key;
       this.id = id;
       this.id = id;
+      this.roomId = roomId;
       this.edit(this.modelDefault);
       this.edit(this.modelDefault);
       this.getBookingOrderInfo();
       this.getBookingOrderInfo();
     },
     },

+ 3 - 3
src/views/room/modules/checkIn/BillRoomInfoModal.vue

@@ -85,11 +85,11 @@ export default {
     };
     };
   },
   },
   methods: {
   methods: {
-    add(id, key) {
+    add(id, key, roomId) {
       console.log("id", id);
       console.log("id", id);
       this.visible = true;
       this.visible = true;
       this.$nextTick(() => {
       this.$nextTick(() => {
-        this.$refs.realForm.add(id, key);
+        this.$refs.realForm.add(id, key, roomId);
       });
       });
     },
     },
     edit(record) {
     edit(record) {
@@ -122,7 +122,7 @@ export default {
       // this.visible = false;
       // this.visible = false;
     },
     },
     handleCancel() {
     handleCancel() {
-      this.$emit("close")
+      this.$emit("close");
       this.close();
       this.close();
     },
     },
   },
   },