DESKTOP-B78GIPM\admin лет назад: 2
Родитель
Сommit
e0986ed664

+ 24 - 2
src/views/room/fangtailive.vue

@@ -732,6 +732,7 @@
       @ok="modalLockRoomFormOk"
     ></clean-room-modal>
     <posOrderModal ref="posOrderModal" />
+    <batchCardModal ref="batchCheckInModal" @ok="modalBatchhFormOk" />
 
     <!-- 右键菜单 -->
     <look-room-modalVue ref="lookRoomModalVue" @ok="modalLockRoomFormOk" />
@@ -772,6 +773,7 @@ import membermessage from "./membermessage";
 import membergoodsmanage from "./membergoodsmanage";
 import fangwuLookRoom from "./fangwuLookRoom.vue";
 import posOrderModal from './posOrderModal.vue';
+import batchCardModal from "./modules/checkIn/batchCardModal.vue";
 
 import lookRoomModalVue from "./modules/fangtaiModal/lookRoomModal/lookRoomModal.vue";
 import continuedModalVue from "./modules/fangtaiModal/continuedModal/continuedModal.vue";
@@ -807,10 +809,12 @@ export default {
     SelectCheckInRoomOrderModal,
     CustomerModal,
     exchangeHousesModalVue,
-    posOrderModal
+    posOrderModal,
+    batchCardModal
   },
   data() {
     return {
+      YDorder:null,
       currentDate: moment(new Date()).format("YYYY-MM-DD"),
       activeKey: "1",
       timeId: null,
@@ -1572,7 +1576,25 @@ export default {
     modalBillRoomFormOk(e) {
       this.loadData();
       console.log("e", e);
-      this.$refs.ModalBillRoomInfo.add(e);
+      this.YDorder = e.order
+      getAction(`/business/busOtherRoomCard/queryByHotelId`).then(res=>{
+        console.log(res);
+        if (res.success && res.result) {
+          if (res.result.status==1) {
+            this.$refs.batchCheckInModal.visible = true;
+            this.$refs.batchCheckInModal.edit(e.model)
+          }else{
+            this.$refs.ModalBillRoomInfo.add(e.order);
+            this.$refs.ModalBillRoomInfo.title = "账单";
+            this.$refs.ModalBillRoomInfo.disableSubmit = true;
+          }
+        }
+      })
+      
+      
+    },
+    modalBatchhFormOk(){
+      this.$refs.ModalBillRoomInfo.add(this.YDorder);
       this.$refs.ModalBillRoomInfo.title = "账单";
       this.$refs.ModalBillRoomInfo.disableSubmit = true;
     },

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

@@ -2425,11 +2425,13 @@ export default {
           //   httpurl = "/business/busRoomBookingOrders/add-batch";
           //   method = "post";
           // }
+          // that.$emit("ok", {order:'res.result', model:this.model});
+          // return
           httpAction(httpurl, this.model, method)
             .then((res) => {
               if (res.success) {
                 that.$message.success(res.message);
-                that.$emit("ok", res.result);
+                that.$emit("ok", {order:res.result, model:that.model});
               } else {
                 if (res.message.indexOf("与预约时间有冲突") >= 0) {
                   that.$confirm({
@@ -2441,7 +2443,7 @@ export default {
                         .then((res) => {
                           if (res.success) {
                             that.$message.success(res.message);
-                            that.$emit("ok", res.result);
+                            that.$emit("ok", {order:res.result, model:that.model});
                           } else {
                             if (res.message.indexOf("与预约时间有冲突") >= 0) {
                             } else {

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

@@ -56,6 +56,7 @@ export default {
       this.$refs.realForm.submitForm();
     },
     submitCallback(e) {
+      console.log(e);
       this.$emit("ok",e);
       this.visible = false;
     },

+ 36 - 20
src/views/room/modules/checkIn/batchCardDetail.vue

@@ -12,7 +12,7 @@
                             当前房间号
                         </h3>
                         <div style="color:#fff;background: rgba(42, 130, 228, 1);line-height:60px;width:50%;text-align:center;border-radius:12px;">
-                            {{roomList[roomIndex]}}
+                            {{roomList[roomIndex] && roomList[roomIndex].roomNo}}
                         </div>
                     </div>
                 </a-col>
@@ -20,17 +20,17 @@
                     <div style="display:flex;flex-direction:column;justify-content:flex-end;height:100%;">
                         <div style="display:flex;align-items:center;justify-content:space-between">
                             <div>
-                                入住时长:3
+                                入住时长:{{roomList[roomIndex] && roomList[roomIndex].day}}
                             </div>
                             <div>
-                                已制卡:1
+                                已制卡:{{0}}
                             </div>
                         </div>
                         <div>
-                            入住时间
+                            入住时间:{{roomList[roomIndex] && roomList[roomIndex].Info.arrivalTime2}}
                         </div>
                         <div>
-                            预离时间
+                            预离时间:{{roomList[roomIndex] && roomList[roomIndex].Info.dueOutTime2}}
                         </div>
                     </div>
                 </a-col>
@@ -59,7 +59,7 @@
             </a-row>
         </p>
         <p>
-            <a-table ref="table" size="middle" :scroll="{ x: '100%' }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" class="j-table-force-nowrap">
+            <a-table ref="table" size="middle" :scroll="{ x: '100%' }" bordered rowKey="id" :columns="columns" :dataSource="roomList" :pagination="ipagination" :loading="loading" class="j-table-force-nowrap">
                 <span slot="state" slot-scope="record">
                     {{record?'已制卡':''}}
                     <!-- {{record}} -->
@@ -81,34 +81,35 @@ export default {
     data() {
         return {
             // 表头
-            columns: [{
-                    title: "序号",
-                    align: "center",
-                    loading:false,
-                    width: 60,
-                    scopedSlots: {
-                        customRender: 'num'
-                    }
-                },
+            columns: [
+                // {
+                //     title: "序号",
+                //     align: "center",
+                //     loading:false,
+                //     width: 60,
+                //     scopedSlots: {
+                //         customRender: 'num'
+                //     }
+                // },
                 {
                     title: "房间号",
                     align: "center",
-                    dataIndex: "room_name",
+                    dataIndex: "roomNo",
                 },
                 {
                     title: "房型",
                     align: "center",
-                    dataIndex: "layout_name",
+                    dataIndex: "layoutName",
                 },
                 {
                     title: "住客姓名",
                     align: "center",
-                    dataIndex: "name",
+                    dataIndex: "roomInfo.key1",
                 },
                 {
                     title: "手机号码",
                     align: "center",
-                    dataIndex: "iphone",
+                    dataIndex: "roomInfo.key5",
                 },
                 {
                     title: "",
@@ -119,7 +120,7 @@ export default {
             ipagination:{},
             dataSource:[],
             loading:false,
-            roomList:['8306','8307','8308','8309'],
+            roomList:[],
             roomIndex:0,
         }
     },
@@ -143,6 +144,21 @@ export default {
                 return                
             }
             this.roomIndex--;
+        },
+        edit(record){
+            console.log(record);
+            let arr = []
+            arr = record.roomPrices
+            console.log(arr);
+            arr.forEach(ele=>{
+                ele.roomInfo = record.roomIds.filter(item=> item.roomId==ele.roomId)[0]
+                ele.Info = record.orderInfo
+            })
+            console.log(arr);
+            this.roomList = arr;
+        },
+        submitForm(){
+            this.$emit('ok')
         }
     }
 }