Forráskód Böngészése

处理文档中的问题

许智捷 2 éve
szülő
commit
68d1832e46

+ 2 - 2
src/mixins/JeecgListMixin.js

@@ -85,7 +85,6 @@ export const JeecgListMixin = {
       }
       var params = this.getQueryParams();//查询条件
       this.loading = true;
-      debugger
       getAction(this.url.list, params).then((res) => {
         if (res.success) {
           //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
@@ -126,9 +125,10 @@ export const JeecgListMixin = {
         sqp['superQueryParams']=encodeURI(this.superQueryParams)
         sqp['superQueryMatchType'] = this.superQueryMatchType
       }
+      console.log(this.queryParam, this.queryParam.keyw)
       var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
       param.field = this.getQueryField();
-      param.pageNo = this.ipagination.current;
+      param.current = this.ipagination.current;
       param.pageSize = this.ipagination.pageSize;
       return filterObj(param);
     },

+ 6 - 1
src/views/markets/memberrecharge.vue

@@ -250,6 +250,11 @@ export default {
           dataIndex: "payMoney",
         },
         {
+          title: "预扣金额",
+          align: "center",
+          dataIndex: "withhold",
+        },
+        {
           title: "支付方式",
           align: "center",
           dataIndex: "paymentMethodName",
@@ -362,4 +367,4 @@ export default {
 </script>
 <style scoped>
 @import "~@assets/less/common.less";
-</style>
+</style>

+ 38 - 11
src/views/room/calendarfangtai.vue

@@ -5,14 +5,24 @@
         <a>{{ text }}</a>
       </template>
     </a-table> -->
-    <a-radio-group @change="onTypeChange" :default-value="1" button-style="solid" style="margin-bottom:8px;">
-      <a-radio-button :value="1">
-        按楼层
-      </a-radio-button>
-      <a-radio-button :value="0">
-        按房型
-      </a-radio-button>
-    </a-radio-group>
+    <a-row>
+      <a-col :span="4">
+        <a-radio-group @change="onTypeChange" :default-value="1" button-style="solid" style="margin-bottom:8px;">
+          <a-radio-button :value="1">
+            按楼层
+          </a-radio-button>
+          <a-radio-button :value="0">
+            按房型
+          </a-radio-button>
+        </a-radio-group>
+      </a-col>
+      <a-col :span="8">
+        <div>
+          <a-input placeholder="请输姓名或电话" style="width: 35%" v-model="searchValue"></a-input>
+          <a-button @click="findCustomerLocation">查询</a-button>
+        </div>
+      </a-col>
+    </a-row>
     <div class="wrapper-content">
       <div class="row-top">
         <div class="top-header">
@@ -107,9 +117,9 @@
           <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 class="wrapper-td " :key="index" v-for="(item, index) in columns" style="height:67px;"
+                <div :class="`wrapper-td ${(sIndex + '_' + rIndex + '_' + index) == findIndex ? 'wrapper-tb_true' : ''}`" :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 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>
@@ -293,7 +303,9 @@ export default {
       expandedStatus: 1,
       groupType: 1,
       groupCountArr: [],
-      res: null
+      res: null,
+      searchValue:'',
+      findIndex:''
     }
   },
   mounted() {
@@ -431,8 +443,14 @@ export default {
     },
     inDateRange(key) {
       let findKey = this.tempOrderIds.findIndex(s => s.key == key)
+
       return findKey > -1 ? this.tempOrderIds[findKey] : null
     },
+    findCustomerLocation() {
+      this.findIndex = ''
+      let find = this.tempOrderIds.find(s => s.data.customerName === this.searchValue || s.data.customerPhone === this.searchValue)
+      this.findIndex = find.key
+    },
     checkDateLt(item, type) {
       if (type == 1) return item.date == new Date().format('yyyy-MM-dd')
       return item.date >= new Date().format('yyyy-MM-dd')
@@ -547,6 +565,7 @@ export default {
                 if ((30 - dIndex) < dayCount) dayCount = (30 - dIndex);
 
                 if (dayCount > 30) dayCount = 30
+                // ${index}: 楼层下标   {rIndex}: 房间下标   {dIndex} 时间列下标
                 this.tempOrderIds.push({
                   key: `${index}_${rIndex}_${dIndex}`,
                   orderId: tpOrder.orderId,
@@ -559,6 +578,7 @@ export default {
           })
         })
       })
+      console.log(this.data)
       this.countRooms()
       this.groupCountArr = roomCountObjs
     },
@@ -665,6 +685,13 @@ export default {
 </script>
 
 <style >
+.wrapper-tb_true {
+  border-left: 3px solid #314659 !important;
+  border-top: 3px solid #314659 !important;
+  border-right: 3px solid #314659 !important;
+  border-bottom: 3px solid #314659 !important;
+}
+
 .wrapper-item {
   white-space: nowrap;
 }

+ 53 - 11
src/views/room/modules/checkIn/BillRoomForm.vue

@@ -170,10 +170,21 @@
                         :wrapperCol="wrapperCol"
                         :prop="`roomIds[${aindex}].key5`"
                       >
-                        <a-input
-                          v-model="room.key5"
-                          placeholder="请输入手机号"
-                        ></a-input>
+                        <a-auto-complete
+                            style="width: 60%;"
+                            v-model="room.key5"
+                            placeholder="请输入手机号"
+                            @search="phoneHandleSearch"
+                            @select="(e) => handleSelectMember(room, e)"
+                        >
+                          <template slot="dataSource">
+                            <a-select-option
+                                v-for="item in customerList"
+                                :key="item.id"
+                            >{{ item.name }}-{{ item.phone }}</a-select-option
+                            >
+                          </template>
+                        </a-auto-complete>
                       </a-form-model-item>
                     </a-col>
                     <a-col :span="24">
@@ -1205,7 +1216,8 @@ export default {
       ruZhuHistoryList: [],
       remenmberPayState: null,
       loadRemenmberPayState: false,
-      roomListCopy: []
+      roomListCopy: [],
+      intervalId: null
     }
   },
   computed: {
@@ -1633,7 +1645,6 @@ export default {
             )
           }
         }
-
         this.loadRooms()
       }
     )
@@ -1766,7 +1777,7 @@ export default {
       this.vipCustomerData = JSON.parse(JSON.stringify(result))
       this.vipCustomerIdChange(result.id)
       this.$confirm({
-        content: "是否是会员本人入住?",
+        content: '是否是会员本人入住?',
         onOk: function () {
           let idx = that.model.roomIds.findIndex(item => item.id == that.roomIdsIndexId)
           idx = (idx === -1 ? 0 : idx)
@@ -1775,6 +1786,13 @@ export default {
           that.model.roomIds[idx].key4 = that.vipCustomerData.certificateNo
           that.model.roomIds[idx].key5 = that.vipCustomerData.mobile
           that.model.roomIds[idx].key6 = that.vipCustomerData.address
+          console.log(that.vipCustomerData)
+          let findPayType = that.payTypeList.find(e => e.name === '会员卡')
+          that.model.orderFees.forEach(e => {
+            if (e.subjectType === 2 && that.vipCustomerData.balance >= e.money) {
+              e.payType = that.vipCustomerData.balance >= e.money ? findPayType.id : this.payTypeList[0]
+            }
+          })
           that.$forceUpdate()
         }
       })
@@ -2397,6 +2415,15 @@ export default {
       }
       this.customerList = result
     },
+    phoneHandleSearch(value) {
+      let result
+      if (!value) {
+        result = this.oldcustomerList
+      } else {
+        result = this.oldcustomerList.filter((t) => t.phone.includes(value))
+      }
+      this.customerList = result
+    },
     handleSelectMember(room, e) {
       console.log('room', room)
       var find = this.customerList.find((t) => t.id === e)
@@ -2405,12 +2432,27 @@ export default {
       this.$set(room, 'key3', '汉')
       this.$set(room, 'key5', find.phone)
       this.$set(room, 'customerId', find.id)
+      debugger
+      console.log(find)
+      console.log(this.busMemberCardList)
     },
     pulsRoom() {
-      console.log(this.canUserRooms)
-      this.$refs.modalSelectRoomForm.add(this.canUserRooms)
-      this.$refs.modalSelectRoomForm.title = '选择房间'
-      this.$refs.modalSelectRoomForm.disableSubmit = false
+      var that = this
+      if (this.canUserRooms.length === 0) {
+        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;
+          }
+        }
     },
     paymentTabsChange(e) {},
     pulsFee() {

+ 90 - 25
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -360,7 +360,7 @@
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
               /><a-button
                 type="link"
-                :disabled="selectRoomId == '1'"
+                :disabled="selectRoomId == '1' || chooseLivingRoomIds.livingOrder && chooseLivingRoomIds.livingOrder.settleType === 2"
                 @click="addProjectFee"
               >
                 增加消费
@@ -444,17 +444,17 @@
             收款详情
           </h4>
           <div style="display: flex">
-            <div style="display: flex; flex-direction: column">
+            <div @click="refund(1)"  style="display: flex; flex-direction: column">
               <a-icon
                 type="transaction"
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
-              /><a-button type="link" @click="refund(1)" > 收款 </a-button>
+              /><a-button type="link" > 收款 </a-button>
             </div>
-            <div style="display: flex; flex-direction: column">
+            <div  @click="refund(2)" style="display: flex; flex-direction: column">
               <a-icon
                 type="trademark"
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
-              /><a-button type="link" @click="refund(2)"> 退款 </a-button>
+              /><a-button type="link"> 退款 </a-button>
             </div>
             <div style="display: flex; flex-direction: column">
               <a-icon
@@ -500,18 +500,21 @@
           <a-descriptions-item label="合计收款">
             + {{ paymentAmount.toFixed(2) }}
           </a-descriptions-item>
+          <a-descriptions-item label="会员待收">
+            + {{ withholdAmout.toFixed(2) }}
+          </a-descriptions-item>
           <a-descriptions-item
             label="合计消费"
           >-{{ feesAmount.toFixed(2) }}
           </a-descriptions-item>
           <a-descriptions-item
             label="结账应退"
-            v-if="paymentAmount - feesAmount > 0"
+            v-if="paymentAmount + withholdAmout - feesAmount > 0"
           >
-            {{ (paymentAmount - feesAmount).toFixed(2) }}
+            {{ (paymentAmount + withholdAmout - feesAmount).toFixed(2) }}
           </a-descriptions-item>
           <a-descriptions-item label="结账应收" v-else>
-            {{ (feesAmount - paymentAmount).toFixed(2) }}
+            {{ (feesAmount - paymentAmount - withholdAmout).toFixed(2) }}
           </a-descriptions-item>
           <a-descriptions-item
             label="优    惠"
@@ -521,7 +524,7 @@
           </a-descriptions-item>
         </a-descriptions>
         <a-button
-          v-if="paymentAmount - feesAmount > 0"
+          v-if="paymentAmount +withholdAmout - feesAmount > 0"
           @click="handleAdd"
           type="danger"
           style="margin-left: 100px"
@@ -538,9 +541,11 @@
         >
       </div>
     </div>
+    <adjust-price-form ref="adjustPriceForm" @ok="modalFormOk"></adjust-price-form>
     <customer-modal ref="modalCustomerForm" @ok="modalFormOk"></customer-modal>
     <refund-modal ref="modalRefundForm" @ok="modalFormOk"></refund-modal>
     <payment-modal ref="modalPaymentForm" @ok="modalFormOk"></payment-modal>
+    <pay-or-refund-modal ref="modalPayOrRefundForm" @ok="modalFormOk"></pay-or-refund-modal>
     <fee-modal ref="modalFeeForm" @ok="modalFormOk"></fee-modal>
     <member-message-modal ref="modalMemberMessage"></member-message-modal>
     <lease-goods-modal ref="modalLeaseGoods"></lease-goods-modal>
@@ -635,6 +640,8 @@ import EditRemarkModal from './EditRemarkModal.vue'
 import EditBreakfastNumModal from './EditBreakfastNumModal.vue'
 import EditBookingTypeModal from './EditBookingTypeModal.vue'
 import { match } from 'assert'
+import PayOrRefundModal from '@views/room/modules/checkIn/PayOrRefundModel'
+import AdjustPriceForm from '@views/room/modules/checkIn/AdjustPriceForm'
 const columns = [
   // {
   //     title: "",
@@ -772,6 +779,8 @@ const endDate = new Date(date.setDate(date.getDate() + 1))
 export default {
   name: 'BusMeetingRoomForm',
   components: {
+    AdjustPriceForm,
+    PayOrRefundModal,
     CustomerModal,
     RefundModal,
     PaymentModal,
@@ -853,6 +862,10 @@ export default {
       selectRoomId: '1',
       selectedRowKeys1: [],
       /**
+       * 选中房间信息
+       */
+      chooseLivingRoomIds: {},
+      /**
        * 同住人
        */
       addPeopleList: [],
@@ -878,7 +891,15 @@ export default {
       // var amount2 = list2.reduce(function (total, item) {
       //   return total + item.money;
       // }, 0);
-      var amount = this.paymentList.reduce(function (total, item) {
+      var find = this.payTypeList.find(e => e.name === '会员卡')
+      var amount = this.paymentList.filter(t => t.payType !== find.id).reduce(function (total, item) {
+        return total + item.money
+      }, 0)
+      return amount
+    },
+    withholdAmout() {
+      var find = this.payTypeList.find(e => e.name === '会员卡')
+      var amount = this.paymentList.filter(t => t.payType === find.id).reduce(function (total, item) {
         return total + item.money
       }, 0)
       return amount
@@ -1312,8 +1333,13 @@ export default {
         this.feesList = this.oldfeesList
         this.paymentList = this.oldpaymentList
       } else {
-        this.feesList = this.oldfeesList.filter((t) => t.roomId == e)
-        this.paymentList = this.oldpaymentList.filter((t) => t.roomId == e)
+        this.feesList = this.oldfeesList.filter((t) => t.roomId === e)
+        this.paymentList = this.oldpaymentList.filter((t) => t.roomId === e)
+        let find = this.model.livingRoomIds.find((t) => t.roomId === this.selectRoomId)
+        this.chooseLivingRoomIds = find;
+        console.log(this.model)
+        console.log(find)
+        this.$emit('changeLivingStatu', find.livingOrder.settleType !== 2)
       }
     },
     getPayTypeText(text) {
@@ -1430,7 +1456,6 @@ export default {
       })
     },
     async getBookingOrderInfo() {
-      debugger
       if (this.payTypeList == 0) {
         await this.getbusRoomPayType()
       }
@@ -1462,6 +1487,7 @@ export default {
               : res.result.livingRoomIds[1].roomId
           this.selectRoomId = this.tabSelectRoomId
           this.model = res.result
+          debugger
           this.getWakeServiceData()
           getAction('/business/busRoomBookingOrders/living-fees', {
             bookingOrderId: this.model.orderInfo.id
@@ -1562,13 +1588,35 @@ export default {
         var sum2 = list3.reduce(function (total, item) {
           return total + item.money
         }, 0)
-        if (this.paymentAmount - this.feesAmount > 0) {
+        if(this.paymentAmount +this.withholdAmout - this.feesAmount > 0) {
           debugger
           this.$refs.modalRefundForm.edit({
-            billRefund: this.paymentAmount - this.feesAmount,
-            deposit: deposit - (sum - sum2),
-            roomFee: sum - sum2,
-            money: this.paymentAmount - this.feesAmount,
+            billRefund: this.paymentAmount + this.withholdAmout - this.feesAmount,
+            deposit: deposit,
+            roomFee: sum2,
+            money: this.paymentAmount + this.withholdAmout - this.feesAmount,
+            subjectType: 5,
+            feeType: 2,
+            bookingOrderId: this.model.orderInfo.id,
+            livingOrderId:
+                livingRoom.roomId != '1' ? livingRoom.livingOrder.id : '',
+            vipCustomerId: livingRoom.livingOrder.vipCustomerId,
+            contractTeamId: livingRoom.livingOrder.contractTeamId,
+            contractTeamProtocolId:
+            livingRoom.livingOrder.contractTeamProtocolId
+          })
+          this.$refs.modalRefundForm.title = '结账退款'
+          this.$refs.modalRefundForm.disableSubmit = false
+        } else {
+
+        }
+        if (this.paymentAmount +this.withholdAmout - this.feesAmount > 0) {
+          debugger
+          this.$refs.modalRefundForm.edit({
+            billRefund: this.paymentAmount + this.withholdAmout - this.feesAmount,
+            deposit: deposit,
+            roomFee: sum2,
+            money: this.paymentAmount + this.withholdAmout - this.feesAmount,
             subjectType: 5,
             feeType: 2,
             bookingOrderId: this.model.orderInfo.id,
@@ -1585,11 +1633,11 @@ export default {
           debugger
           this.$refs.modalPaymentForm.edit({
             billAmount: parseFloat(
-              Math.abs(this.paymentAmount - this.feesAmount).toFixed(2)
+              Math.abs(this.paymentAmount +this.withholdAmout - this.feesAmount).toFixed(2)
             ),
             deposit: deposit - (sum - sum2),
             roomFee: parseFloat(
-              Math.abs(this.paymentAmount - this.feesAmount).toFixed(2)
+              Math.abs(this.paymentAmount +this.withholdAmout - this.feesAmount).toFixed(2)
             ),
             preferentialMoney: this.preferentialMoney,
             subjectType: 5,
@@ -1634,7 +1682,7 @@ export default {
       this.model = Object.assign({}, record)
       this.visible = true
     },
-    handleLeaveNotSettle() {
+    handleLeaveNotSettle(isLeaveNotSettle) {
       if (this.selectRoomId === '1') {
         this.$message.warning('请先选择房间')
         return
@@ -1643,11 +1691,15 @@ export default {
         (t) => t.roomId == this.selectRoomId
       )
       var find = this.model.livingRoomIds[index]
+
+      console.log(find)
+      debugger
+      let url = '/business/busRoomBookingOrders/cancel-leave-not-settle?bookingOrderId='
+      if (isLeaveNotSettle) {
+        url = '/business/busRoomBookingOrders/leave-not-settle?bookingOrderId='
+      }
       httpAction(
-        '/business/busRoomBookingOrders/leave-not-settle?bookingOrderId=' +
-          find.bookingOrdersId +
-          '&livingOrderId=' +
-          find.livingOrder.id,
+        url + find.bookingOrdersId + '&livingOrderId=' + find.livingOrder.id,
         {},
         'post'
       ).then((res) => {
@@ -1660,6 +1712,19 @@ export default {
         }
       })
     },
+    adjustPrice() {
+      let roomInfos = []
+      if (this.selectRoomId === '1') {
+        roomInfos = this.model.livingRoomIds.slice(1)
+      } else {
+        var index = this.model.livingRoomIds.findLastIndex(
+            (t) => t.roomId == this.selectRoomId)
+        var find = this.model.livingRoomIds[index]
+        roomInfos.push(find)
+      }
+      this.$refs.adjustPriceForm.edit(roomInfos)
+      this.$refs.adjustPriceForm.title = '批量调价'
+    },
     submitForm() {
       const that = this
       that.$message.warning('未实现')

+ 20 - 5
src/views/room/modules/checkIn/BillRoomInfoModal.vue

@@ -16,7 +16,7 @@
           height: 80px;
         "
       >
-        <div class="menu">
+        <div class="menu" @click="adjustPrice">
           <a-icon
             type="account-book"
             style="color: #fff; font-size: 30px"
@@ -41,13 +41,21 @@
             style="color: #fff; font-size: 30px"
           /><a-button type="link"> 联房 </a-button>
         </div>
-        <div class="menu" @click="handleLeaveNotSettle">
-          <a-icon type="euro" style="color: #fff; font-size: 30px" /><a-button
+        <div class="menu" @click="handleLeaveNotSettle" v-if="livingStatu">
+          <a-icon type="euro" style="color: #fff; font-size: 30px" />
+          <a-button
             type="link"
           >
             先走不结
           </a-button>
         </div>
+        <div class="menu" @click="cancelHandleLeaveNotSettle" v-else>
+          <a-icon type="euro" style="color: #fff; font-size: 30px" />
+          <a-button
+              type="link"
+          >撤销先走不结
+          </a-button>
+        </div>
         <div class="menu">
           <a-icon
             type="printer"
@@ -62,7 +70,7 @@
         </div>
       </div></template
     >
-    <bill-room-info ref="realForm" @ok="submitCallback"></bill-room-info>
+    <bill-room-info ref="realForm" @ok="submitCallback" @changeLivingStatu="(e) =>{livingStatu = e}"></bill-room-info>
   </j-modal>
 </template>
 
@@ -81,6 +89,7 @@ export default {
       width: 1400,
       visible: false,
       disableSubmit: false,
+      livingStatu: true
     };
   },
   methods: {
@@ -139,7 +148,10 @@ export default {
       this.$refs.realForm.addLeaseGoods();
     },
     handleLeaveNotSettle() {
-      this.$refs.realForm.handleLeaveNotSettle();
+      this.$refs.realForm.handleLeaveNotSettle(true)
+    },
+    cancelHandleLeaveNotSettle() {
+      this.$refs.realForm.handleLeaveNotSettle(false)
     },
     submitCallback() {
       this.$emit("ok");
@@ -148,6 +160,9 @@ export default {
     handleCancel() {
       this.close();
     },
+    adjustPrice(){
+      this.$refs.realForm.adjustPrice()
+    }
   },
 };
 </script>

+ 33 - 3
src/views/room/modules/checkIn/Refund.vue

@@ -55,7 +55,7 @@
           </a-col>
           <a-col :span="24">
             <a-form-model-item
-              label="房费应退"
+              label="房费"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
               prop="roomFee"
@@ -84,7 +84,37 @@
           </a-col>
           <a-col :span="24">
             <a-form-model-item
-              label="实退合计"
+                label="预扣金额"
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="roomFee"
+            >
+              <a-input
+                  style="width: 100px"
+                  disabled
+                  v-model="model.roomFee"
+                  placeholder="请输入房费应退"
+              ></a-input
+              >元
+              <a-select
+                  v-model="model.payType"
+                  style="width: 200px"
+                  placeholder="支付类型"
+              >
+                <a-select-option
+                    :value="item.id"
+                    v-for="item in payTypeList"
+                    :key="item.id"
+                    :disabled="item.delFlag == 99"
+                >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item
+              label="合计消费"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
               prop="money"
@@ -293,4 +323,4 @@ export default {
     },
   },
 };
-</script>
+</script>

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

@@ -7,6 +7,7 @@
           <a-col :span="6">
             <a-form-item label="">
               <j-input
+                type="false"
                 placeholder="入住单号/房间号/姓名"
                 v-model="queryParam.keyw"
               ></j-input>

+ 157 - 143
src/views/room/modules/checkIn/SelectRoomForm.vue

@@ -42,8 +42,14 @@
                 @change="checkChange"
               /> -->
               <div style="display:flex;flex-wrap:wrap;">
-                <div v-for="(item, index) in roomStatusOptions" :class="{'check':checkedRoomStatusList.some(ele=> ele==item.value)}" :key="index" class="nocheck room-status" :style="{borderLeft:`2px solid ${item.extend}`}" @click="roomStatusChange(item, index)">
-                  {{item.label}}
+                <div
+                  v-for="(item, index) in roomStatusOptions"
+                  :class="{'check':checkedRoomStatusList.some(ele=> ele==item.value)}"
+                  :key="index"
+                  class="nocheck room-status"
+                  :style="{borderLeft:`2px solid ${item.extend}`}"
+                  @click="roomStatusChange(item, index)">
+                  {{ item.label }}
                 </div>
               </div>
             </a-form-model-item>
@@ -65,7 +71,7 @@
                 @close.stop="tagClose2(index, item.name)"
                 v-for="(item, index) in model.rooms"
                 :key="index"
-                >{{ item.name }}</a-tag
+              >{{ item.name }}</a-tag
               >
             </a-form-model-item>
           </a-col>
@@ -83,7 +89,7 @@
                 tab-position="left"
                 :style="{ height: '300px' }"
               >
-              <a-tab-pane
+                <a-tab-pane
                   tab="全部"
                   key="room-all"
                 >
@@ -93,10 +99,17 @@
                         :span="24"
                         v-for="(item, index) in (roomList || [])"
                         :key="index"
+                        v-if="item.floorRooms.length > 0"
                       >
-                        <div>{{item.buildingName + item.floorName}}</div>
+                        <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
+                            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',
@@ -109,10 +122,10 @@
                               {{ r.name }}
                             </div>
                           </div> -->
-                          {{ r.name }}
+                            {{ r.name }}
                           </div>
                         </div>
-                        </a-col>
+                      </a-col>
                     </a-row>
                   </div>
                 </a-tab-pane>
@@ -155,287 +168,288 @@
 </template>
 
 <script>
-import { httpAction, getAction } from "@/api/manage";
-import { validateDuplicateValue } from "@/utils/util";
+import { httpAction, getAction } from '@/api/manage'
+import { validateDuplicateValue } from '@/utils/util'
 export default {
-  name: "SelectRoomForm",
+  name: 'SelectRoomForm',
   components: {},
   props: {
-    //表单禁用
+    // 表单禁用
     disabled: {
       type: Boolean,
       default: false,
-      required: false,
-    },
+      required: false
+    }
   },
   data() {
-    const rooms = [];
+    const rooms = []
     for (let i = 0; i < 100; i++) {
       rooms.push({
-        id: "100" + i,
+        id: '100' + i,
         roomNo: 1000 + i,
         check: 0,
-        kz: i == 1 ? 1 : 0,
-      });
+        kz: i == 1 ? 1 : 0
+      })
     }
-    const rooms2 = [];
+    const rooms2 = []
     for (let i = 0; i < 50; i++) {
       rooms2.push({
-        id: "200" + i,
+        id: '200' + i,
         roomNo: 2000 + i,
         check: 0,
-        kz: i == 5 ? 1 : 0,
-      });
+        kz: i == 5 ? 1 : 0
+      })
     }
     return {
       visible: true,
       roomList: [
-        { key: "1层", child: rooms },
-        { key: "2层", child: rooms2 },
+        { key: '1层', child: rooms },
+        { key: '2层', child: rooms2 }
       ],
       roomStatusList: [],
       checkedRoomStatusList: [],
       roomTypeOptions: [],
       roomStatusOptions: [],
-      model: { roomType: "", rooms: [] },
+      model: { roomType: '', rooms: [] },
       labelCol: {
         xs: { span: 24 },
-        sm: { span: 2 },
+        sm: { span: 2 }
       },
       wrapperCol: {
         xs: { span: 24 },
-        sm: { span: 16 },
+        sm: { span: 16 }
       },
       confirmLoading: false,
       validatorRules: {
-        dateRange: [{ required: true, message: "请选择维修时间!" }],
-        remark: [{ required: true, message: "请输入维修原因!" }],
+        dateRange: [{ required: true, message: '请选择维修时间!' }],
+        remark: [{ required: true, message: '请输入维修原因!' }]
       },
       url: {
-        add: "/business/busMeetingRoom/add",
-        edit: "/business/busMeetingRoom/edit",
-        queryById: "/business/busMeetingRoom/queryById",
+        add: '/business/busMeetingRoom/add',
+        edit: '/business/busMeetingRoom/edit',
+        queryById: '/business/busMeetingRoom/queryById'
       },
-      layoutName: "",
+      layoutName: '',
       presetNum: 0,
       canUserRooms: [],
       oldcanUserRooms: [],
       checkLayoutList: [],
       roomLayoutList: [],
       oldroomList: [],
-      kzfLiving: false,
-    };
+      kzfLiving: false
+    }
   },
   computed: {
     formDisabled() {
-      return this.disabled;
-    },
+      return this.disabled
+    }
   },
   created() {
-    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    var _info = JSON.parse(localStorage.getItem('storeInfo'))
     if (_info) {
-      this.model.hotelId = _info.id;
+      this.model.hotelId = _info.id
     }
-    //备份model原始值
-    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    // 备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model))
 
-    getAction("/rooms/cesRoomLayout/list", { pageSize: 99999, pageNo: 1 }).then(
+    getAction('/rooms/cesRoomLayout/list', { pageSize: 99999, pageNo: 1 }).then(
       (res) => {
         if (res.success) {
-          this.roomLayoutList = res.result.records;
-          if (this.roomLayoutList && this.roomLayoutList.length > 0) {
-            this.roomLayoutList.forEach((item) => {
-              this.checkLayoutList.push(item.id);
-            });
-          }
+            this.roomLayoutList = res.result.records
+            if (this.roomLayoutList && this.roomLayoutList.length > 0) {
+              this.roomLayoutList.forEach((item) => {
+                this.checkLayoutList.push(item.id)
+              })
+            }
         }
       }
-    );
-    getAction("/rooms/cesRooms/room-status-color", {}).then((res) => {
+    )
+    getAction('/rooms/cesRooms/room-status-color', {}).then((res) => {
             if (res.success) {
                 // this.roomStatusColorList = res.result;
-                var list = [];
+                var list = []
                 res.result.forEach((item) => {
-                    list.push(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])
+                console.log(list)
+                this.roomStatusOptions = list
+                this.checkChange('', [this.roomStatusOptions[0].value, this.roomStatusOptions[1].value])
             }
-        });
-    getAction("/business/busOtherEmptyDirtyRoom/queryByHotelId", {}).then(
+        })
+    getAction('/business/busOtherEmptyDirtyRoom/queryByHotelId', {}).then(
         (res) => {
           if (res.success) {
-            this.kzfLiving = res.result.status === 1;
+            this.$nextTick(function () {
+              this.kzfLiving = res.result.status === 1
+            })
           }
         }
-      );
+      )
+    // this.$forceUpdate();
   },
   methods: {
-    filterColor(state){
-      var color = '';
-      let arr = this.roomStatusOptions.filter(item => item.value == state);
-      color = arr[0] ? arr[0].extend : '';
-      return color;
+    filterColor(state) {
+      var color = ''
+      let arr = this.roomStatusOptions.filter(item => item.value == state)
+      color = arr[0] ? arr[0].extend : ''
+      return color
     },
 
-    roomStatusChange(item, index){
-      console.log('roomStatusChange');
-      if (this.checkedRoomStatusList.some(ele=> ele==item.value)) {
-        var index = this.checkedRoomStatusList.findIndex((t) => t == item.value);
-        this.checkedRoomStatusList.splice(index, 1);
+    roomStatusChange(item, index) {
+      console.log('roomStatusChange')
+      if (this.checkedRoomStatusList.some(ele => ele == item.value)) {
+        var index = this.checkedRoomStatusList.findIndex((t) => t == item.value)
+        this.checkedRoomStatusList.splice(index, 1)
       } else {
-        this.checkedRoomStatusList.push(item.value);
+        this.checkedRoomStatusList.push(item.value)
       }
       this.checkChange()
     },
 
-    checkChange(e,stateList) {
-            console.log("e", e);
-            var list = this.oldroomList;
-            console.log(list);
+    checkChange(e, stateList) {
+            console.log('e', e)
+            var list = this.oldroomList
+            console.log(list)
+            debugger
             if (this.checkLayoutList.length > 0) {
-                list = this.oldroomList.reduce((acc, curr) => {
+              this.roomList = this.oldroomList.reduce((acc, curr) => {
                     const floorRooms = curr.floorRooms.filter((room) =>
                         this.checkLayoutList.includes(room.layoutId)
-                    );
+                    )
                     acc.push({
                         ...curr,
                         floorRooms
-                    });
-                    return acc;
-                }, []);
+                    })
+                    return acc
+                }, [])
             }
             if (this.checkedRoomStatusList.length > 0) {
-                list = list.reduce((acc, curr) => {
+              this.roomList = list.reduce((acc, curr) => {
                     const floorRooms = curr.floorRooms.filter((room) =>
                         this.checkedRoomStatusList.includes(
                             room.roomStatus.toString()
                         )
-                    );
+                    )
                     acc.push({
                         ...curr,
                         floorRooms
-                    });
-                    return acc;
-                }, []);
-            }
-            if (this.checkedRoomStatusList.length == 0) {
+                    })
+                    return acc
+                }, [])
+            } else if (this.checkedRoomStatusList.length == 0) {
               let arr = []
-              this.roomStatusOptions.forEach(ele=>{
+              this.roomStatusOptions.forEach(ele => {
                 arr.push(ele.value)
               })
-              list = list.reduce((acc, curr) => {
+              this.roomList = list.reduce((acc, curr) => {
                   const floorRooms = curr.floorRooms.filter((room) =>
                       arr.includes(
                           room.roomStatus.toString()
                       )
-                  );
+                  )
                   acc.push({
                       ...curr,
                       floorRooms
-                  });
-                  return acc;
-              }, []);
+                  })
+                  return acc
+              }, [])
             }
             if (stateList && stateList.length > 0) {
-                list = list.reduce((acc, curr) => {
+              this.roomList = list.reduce((acc, curr) => {
                     const floorRooms = curr.floorRooms.filter((room) =>
                         stateList.includes(room.roomStatus.toString())
-                    );
+                    )
                     acc.push({
                         ...curr,
                         floorRooms
-                    });
-                    return acc;
-                }, []);
+                    })
+                    return acc
+                }, [])
             }
-            console.log("list2", list);
-            this.roomList = list;
         },
 
     checkRoomClick(row) {
-      console.log(row);
+      console.log(row)
       if (!this.kzfLiving && row.roomStatus === 2) {
-            this.$message.warning("空脏房不允许入住");
-            return;
+            this.$message.warning('空脏房不允许入住')
+            return
           }
       if (row.check === 1) {
-        row.check = 0;
-        var index = this.model.rooms.findIndex((t) => t.id == row.id);
-        this.model.rooms.splice(index, 1);
+        row.check = 0
+        var index = this.model.rooms.findIndex((t) => t.id == row.id)
+        this.model.rooms.splice(index, 1)
       } else {
-        row.check = 1;
-        this.model.rooms.push(row);
+        row.check = 1
+        this.model.rooms.push(row)
       }
     },
     tagClose2(index, key1) {
-      this.model.rooms.splice(index, 1);
+      this.model.rooms.splice(index, 1)
       this.roomList.some((t) => {
         var r = t.floorRooms.some((c) => {
           if (c.name === key1) {
-            c.check = 0;
-            return true;
+            c.check = 0
+            return true
           }
-          return false;
-        });
+          return false
+        })
         if (r === true) {
-          return true;
+          return true
         }
-      });
+      })
     },
     onChange(e) {
-      console.log(e);
-      var list = [];
+      console.log(e)
+      var list = []
       this.oldroomList.forEach((item) => {
-        var floorRooms = [];
+        var floorRooms = []
         item.floorRooms.forEach((f) => {
           if (e.includes(f.layoutId)) {
-            floorRooms.push(f);
+            floorRooms.push(f)
           }
-        });
-        var itemd = JSON.parse(JSON.stringify(item));
-        itemd.floorRooms = floorRooms;
-        list.push(itemd);
-      });
-      this.roomList = list;
+        })
+        var itemd = JSON.parse(JSON.stringify(item))
+        itemd.floorRooms = floorRooms
+        list.push(itemd)
+      })
+      this.roomList = list
       // result = this.oldcustomerList.filter((t) => t.name.includes(value));
-      console.log("this.oldroomList", this.oldroomList);
-      console.log("this.roomList", this.roomList);
+      console.log('this.oldroomList', this.oldroomList)
+      console.log('this.roomList', this.roomList)
       this.checkChange()
     },
     add(row) {
-      console.log("canUserRooms", row);
+      console.log('canUserRooms', row)
       // this.canUserRooms = row;
-      this.oldroomList = JSON.parse(JSON.stringify(row[0].buildingRooms));
+      this.oldroomList = JSON.parse(JSON.stringify(row[0].buildingRooms))
 
       // this.layoutName = row.layout.name;
       // this.presetNum = row.layout.presetNum;
-      this.roomList = row[0].buildingRooms;
-      this.edit(this.modelDefault);
+      this.roomList = row[0].buildingRooms
+      this.edit(this.modelDefault)
     },
     edit(record) {
-      this.model = Object.assign({}, record);
+      this.model = Object.assign({}, record)
       this.roomList.forEach((t) => {
         t.floorRooms.forEach((f) => {
           if (f.check && f.check == 1) {
-            this.model.rooms.push(f);
+            this.model.rooms.push(f)
           }
-        });
-      });
-      this.visible = true;
+        })
+      })
+      this.visible = true
     },
     submitForm() {
-      const that = this;
+      const that = this
       if (that.model.rooms.length === 0) {
-        that.$message.warning("请先选择房间");
-        return;
+        that.$message.warning('请先选择房间')
+        return
       }
-      that.$emit("ok", that.model.rooms);
-    },
-  },
-};
+      that.$emit('ok', that.model.rooms)
+    }
+  }
+}
 </script>
 <style scoped>
 #components-grid-demo-playground [class~="ant-col"] {

+ 14 - 4
src/views/room/modules/fangtaiModal/continuedModal/continuedForm.vue

@@ -6,7 +6,7 @@
                 <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
                     <a-row>
                         <a-col :span="24">
-                            <a-form-model-item label="续住总价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" v-if="isAddDate">
+                            <a-form-model-item label="续住总价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" >
                                 <!-- <a-input v-model="model.name" placeholder="请输入餐桌名称"></a-input> -->
                                 {{PriceData.reduce((pre,cur)=> pre+cur.price*1,0 ) || 0}}
                                 <a-popover placement="right" v-if="dayNum>0">
@@ -257,7 +257,15 @@ export default {
             pageNo: 1,
         }).then((res) => {
             if (res.success) {
-                this.payTypeList = res.result.records;
+              debugger
+              this.payTypeList = res.result.records;
+              console.log(this.model)
+              if (this.model.livingData.livingOrder.vipCustomerId && this.model.livingData.livingOrder.vipCustomerId !== null) {
+                console.log(this.payTypeList)
+                var findPayType = this.payTypeList.find((e) => e.name === '会员卡')
+                this.$set(this.model, "payType", findPayType.id)
+                this.model.payType = findPayType.id
+              }
             }
         });
     },
@@ -291,6 +299,7 @@ export default {
           const diffDays = (secondDate - firstDate) / oneDay;
           this.isAddDate = diffDays >= 0;
           if (Math.round(diffDays) <= 0) {
+            debugger
             this.PriceData = []
           }
           return Math.round(Math.abs(diffDays));
@@ -310,6 +319,9 @@ export default {
             // this.model.startValue = record.livingData.livingOrder.dueOutTime
             this.visible = true
         },
+
+        chooseVipPay() {
+        },
         submitForm() {
             const that = this;
             // 触发表单验证
@@ -336,14 +348,12 @@ export default {
                             price:item.price,
                         }))
                     }
-                  console.log()
                   if (typeof (this.model.startValue) === 'undefined') {
                     this.model.startValue = this.model.livingData.livingOrder.dueOutTime
                   }
                     var date = new Date(this.model.startValue)
                     let startValueFormat = date.format('yyyy-MM-dd hh:mm:ss')
 
-// debugger
                   httpAction(`/business/busRoomBookingOrders/isBooked?livingOrderId=${this.model.roomInfo.livingOrderId}&dueOutTime=${startValueFormat}`,{},"post")
                       .then(res => {
                         if (!res.success) {

+ 81 - 74
src/views/room/modules/schedule/SelectRoomForm.vue

@@ -56,7 +56,7 @@
                 @close.stop="tagClose2(index, item.name)"
                 v-for="(item, index) in model.rooms"
                 :key="index"
-                >{{ item.name }}</a-tag
+              >{{ item.name }}</a-tag
               >
             </a-form-model-item>
           </a-col>
@@ -75,19 +75,25 @@
                 :style="{ height: '300px' }"
               >
                 <a-tab-pane
-                    tab="全部"
-                    key="room-all"
+                  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"
+                        :span="24"
+                        v-for="(item, index) in (roomList || [])"
+                        :key="index"
+                        v-if="item.floorRooms.length > 0"
                       >
-                        <div v-if="item.floorRooms.length !== 0">{{item.buildingName + item.floorName}}</div>
+                        <div>{{ item.buildingName + item.floorName }}</div>
                         <div style="display:flex;flex-wrap:wrap;">
-                          <div v-for="(r, rIndex) in item.floorRooms"  @click="checkRoomClick(r)" :key="'floorRooms' + rIndex" :class="[r.check == 1 ? 'check' : 'nocheck', r.kz == 1 ? 'kz' : '',]" class="nocheck room-status">
+                          <div
+                            v-for="(r, rIndex) in item.floorRooms"
+                            @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',
@@ -127,6 +133,7 @@
                             r.check == 1 ? 'check' : '',
                             r.kz == 1 ? 'kz' : '',
                           ]"
+                          class="nocheck"
                           @click="checkRoomClick(r)"
                         >
                           {{ r.name }}
@@ -145,143 +152,143 @@
 </template>
 
 <script>
-import { httpAction, getAction } from "@/api/manage";
-import { validateDuplicateValue } from "@/utils/util";
+import { httpAction, getAction } from '@/api/manage'
+import { validateDuplicateValue } from '@/utils/util'
 export default {
-  name: "SelectRoomForm",
+  name: 'SelectRoomForm',
   components: {},
   props: {
-    //表单禁用
+    // 表单禁用
     disabled: {
       type: Boolean,
       default: false,
-      required: false,
-    },
+      required: false
+    }
   },
   data() {
-    const rooms = [];
+    const rooms = []
     for (let i = 0; i < 100; i++) {
       rooms.push({
-        id: "100" + i,
+        id: '100' + i,
         roomNo: 1000 + i,
         check: 0,
-        kz: i == 1 ? 1 : 0,
-      });
+        kz: i == 1 ? 1 : 0
+      })
     }
-    const rooms2 = [];
+    const rooms2 = []
     for (let i = 0; i < 50; i++) {
       rooms2.push({
-        id: "200" + i,
+        id: '200' + i,
         roomNo: 2000 + i,
         check: 0,
-        kz: i == 5 ? 1 : 0,
-      });
+        kz: i == 5 ? 1 : 0
+      })
     }
     return {
       visible: true,
       roomList: [
-        { key: "1层", child: rooms },
-        { key: "2层", child: rooms2 },
+        { key: '1层', child: rooms },
+        { key: '2层', child: rooms2 }
       ],
       roomTypeOptions: [],
-      roomStatusOptions: ["空净", "空脏"],
-      model: { roomType: "", rooms: [] },
+      roomStatusOptions: ['空净', '空脏'],
+      model: { roomType: '', rooms: [] },
       labelCol: {
         xs: { span: 24 },
-        sm: { span: 2 },
+        sm: { span: 2 }
       },
       wrapperCol: {
         xs: { span: 24 },
-        sm: { span: 16 },
+        sm: { span: 16 }
       },
       confirmLoading: false,
       validatorRules: {
-        dateRange: [{ required: true, message: "请选择维修时间!" }],
-        remark: [{ required: true, message: "请输入维修原因!" }],
+        dateRange: [{ required: true, message: '请选择维修时间!' }],
+        remark: [{ required: true, message: '请输入维修原因!' }]
       },
       url: {
-        add: "/business/busMeetingRoom/add",
-        edit: "/business/busMeetingRoom/edit",
-        queryById: "/business/busMeetingRoom/queryById",
+        add: '/business/busMeetingRoom/add',
+        edit: '/business/busMeetingRoom/edit',
+        queryById: '/business/busMeetingRoom/queryById'
       },
-      layoutName: "",
-      presetNum: 0,
-    };
+      layoutName: '',
+      presetNum: 0
+    }
   },
   computed: {
     formDisabled() {
-      return this.disabled;
-    },
+      return this.disabled
+    }
   },
   created() {
-    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    var _info = JSON.parse(localStorage.getItem('storeInfo'))
     if (_info) {
-      this.model.hotelId = _info.id;
+      this.model.hotelId = _info.id
     }
-    //备份model原始值
-    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    // 备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model))
   },
   methods: {
     checkRoomClick(row) {
       if (row.check === 1) {
-        row.check = 0;
-        var index = this.model.rooms.findIndex((t) => t.key1 == row.key1);
-        this.model.rooms.splice(index, 1);
+        row.check = 0
+        var index = this.model.rooms.findIndex((t) => t.key1 == row.key1)
+        this.model.rooms.splice(index, 1)
       } else {
         if (this.model.rooms.length >= this.presetNum) {
-          this.$message.warning("超过排房数量");
-          return;
+          this.$message.warning('超过排房数量')
+          return
         }
-        row.check = 1;
-        this.model.rooms.push(row);
+        row.check = 1
+        this.model.rooms.push(row)
       }
     },
     tagClose2(index, key1) {
-      this.model.rooms.splice(index, 1);
+      this.model.rooms.splice(index, 1)
       this.roomList.some((t) => {
         var r = t.floorRooms.some((c) => {
           if (c.name === key1) {
-            c.check = 0;
-            return true;
+            c.check = 0
+            return true
           }
-          return false;
-        });
+          return false
+        })
         if (r === true) {
-          return true;
+          return true
         }
-      });
+      })
     },
     onChange(date, dateString) {
-      console.log(date, dateString);
+      console.log(date, dateString)
     },
     add(row) {
-      console.log("buildingRooms", row.buildingRooms);
-      this.layoutName = row.layout.name;
-      this.presetNum = row.layout.presetNum;
-      this.roomList = row.buildingRooms;
-      this.edit(this.modelDefault);
+      console.log('buildingRooms', row.buildingRooms)
+      this.layoutName = row.layout.name
+      this.presetNum = row.layout.presetNum
+      this.roomList = row.buildingRooms
+      this.edit(this.modelDefault)
     },
     edit(record) {
-      this.model = Object.assign({}, record);
+      this.model = Object.assign({}, record)
       this.roomList.forEach((t) => {
         t.floorRooms.forEach((f) => {
           if (f.check && f.check == 1) {
-            this.model.rooms.push(f);
+            this.model.rooms.push(f)
           }
-        });
-      });
-      this.visible = true;
+        })
+      })
+      this.visible = true
     },
     submitForm() {
-      const that = this;
+      const that = this
       if (that.model.rooms.length === 0) {
-        that.$message.warning("请先选择房间");
-        return;
+        that.$message.warning('请先选择房间')
+        return
       }
-      that.$emit("ok", that.model.rooms);
-    },
-  },
-};
+      that.$emit('ok', that.model.rooms)
+    }
+  }
+}
 </script>
 <style scoped>
 #components-grid-demo-playground [class~="ant-col"] {

+ 1 - 1
src/views/settings/components/modules/BusMarketRechargeForm.vue

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