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

修改房价方案,修改预约时间改变时选中房间失效

许智捷 2 éve
szülő
commit
02a1bcaa81

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 377 - 430
src/views/room/modules/checkIn/BillRoomForm.vue


+ 24 - 20
src/views/room/modules/schedule/ScheduleRoomForm.vue

@@ -538,6 +538,7 @@ export default {
       warranterList: [],
       hourRoomRuleList: [],
       canUserRooms: [],
+      chooseRooms: [],
       customerList: [],
       oldcustomerList: [],
       supportLayoutIds: []
@@ -724,14 +725,8 @@ export default {
     },
     async loadRooms() {
       await getAction('/rooms/cesRooms/can-user-rooms', {
-        startOf:
-          this.model.orderInfo.arrivalTime2 +
-          ' ' +
-          moment(this.model.orderInfo.arrivalTimeSpan).format('HH:mm'),
-        endOf:
-          this.model.orderInfo.dueOutTime2 +
-          ' ' +
-          moment(this.model.orderInfo.dueOutTimeSpan).format('HH:mm'),
+        startOf: this.model.orderInfo.arrivalTime2 + ' ' + moment(this.model.orderInfo.arrivalTimeSpan).format('HH:mm'),
+        endOf: this.model.orderInfo.dueOutTime2 + ' ' + moment(this.model.orderInfo.dueOutTimeSpan).format('HH:mm'),
         bookingType: this.model.orderInfo.bookingType,
         hourRoomRuleId: this.model.orderInfo.hourRoomId
       }).then((res) => {
@@ -747,9 +742,18 @@ export default {
             t.buildingRooms.forEach((b) => {
               b.floorRooms.forEach((f) => {
                 this.$set(f, 'check', 0)
+                let room = this.chooseRooms.find(e => e.id === f.id)
+                if (room != null) {
+                  f.check = 1
+                  t.layout.presetNum = t.layout.presetNum + 1
+                  t.layout.canUseCount--
+                  t.rooms.push(room)
+                }
               })
             })
           })
+          console.log(this.canUserRooms)
+          console.log(res.result, 'res.result')
           this.canUserRooms = res.result
         }
       })
@@ -891,26 +895,29 @@ export default {
       var findIndex = this.canUserRooms[index].rooms.findIndex(
         (t) => t.id === id
       )
+      if (findIndex === -1){
+        return
+      }
+      let chooseIndex = this.chooseRooms.indexOf(e => e.id === this.canUserRooms[index].rooms[findIndex].id)
+      this.chooseRooms.splice(chooseIndex, 1)
       this.canUserRooms[index].rooms.splice(findIndex, 1)
 
-      this.$set(
-        this.canUserRooms[index].buildingRooms[bindex].floorRooms[rindex],
-        'check',
-        0
-      )
+      this.$set(this.canUserRooms[index].buildingRooms[bindex].floorRooms[rindex], 'check', 0 )
       console.log(this.canUserRooms)
     },
-    modalFormOk(e) {
+    modalFormOk(e, chooseRooms) {
       // this.modelDefault = Object.assign({}, this.modelDefault, {
       //   rooms: e,
       // });
       // this.edit(this.modelDefault);
+      console.log(this.chooseRooms)
+      console.log(chooseRooms, 'chooseRooms')
+      this.chooseRooms = chooseRooms
       this.$set(this.canUserRooms[this.selectIndex], 'rooms', e)
-      console.log(this.canUserRooms[this.selectIndex])
     },
     pulsRoom(index) {
       this.selectIndex = index
-      this.$refs.modalSelectRoomForm.add(this.canUserRooms[this.selectIndex])
+      this.$refs.modalSelectRoomForm.add(this.canUserRooms[this.selectIndex],this.chooseRooms)
       this.$refs.modalSelectRoomForm.title = '排房'
       this.$refs.modalSelectRoomForm.disableSubmit = false
     },
@@ -970,7 +977,6 @@ export default {
         this.setArrivalTime(initArrivalTime)
       }
       await this.loadRooms()
-      console.log('this.canUserRooms', this.canUserRooms)
       const dataSource = JSON.parse(JSON.stringify(this.canUserRooms))
       if (this.model.rooms && this.model.rooms.length > 0) {
         this.model.rooms.forEach((item) => {
@@ -983,12 +989,11 @@ export default {
               target.layout['presetNum'] += 1
               target.layout['canUseCount'] = this.canUserRooms[findIndex].layout.canUseCount - target.layout['presetNum']
               target.buildingRooms.forEach((b) => {
-                console.log(item)
-                console.log(b)
                 var room = b.floorRooms.find((f) => f.id == item.id)
                 if (room) {
                   room.check = 1
                   target.rooms.push(room)
+                  this.chooseRooms.push(room)
                 }
               })
             }
@@ -1033,7 +1038,6 @@ export default {
         }
       })
       that.model.orderInfo.bookingOrdersId = this.bookingOrdersId
-      console.log('this.model', this.model)
       if (that.model.roomIds.length <= 0) {
         that.$message.warning('请先添加房间')
       }

+ 20 - 8
src/views/room/modules/schedule/SelectRoomForm.vue

@@ -212,7 +212,9 @@ export default {
         queryById: '/business/busMeetingRoom/queryById'
       },
       layoutName: '',
-      presetNum: 0
+      presetNum: 0,
+      oldRow: {},
+      chooseRooms: []
     }
   },
   computed: {
@@ -232,7 +234,11 @@ export default {
     checkRoomClick(row) {
       if (row.check === 1) {
         row.check = 0
-        var index = this.model.rooms.findIndex((t) => t.key1 == row.key1)
+        var index = this.model.rooms.findIndex((t) => t.key1 === row.key1)
+        let chooseIndex = this.chooseRooms.findIndex(e => e.id === this.model.rooms[index].id)
+        console.log(chooseIndex)
+        chooseIndex === -1 ? '' : this.chooseRooms.splice(chooseIndex, 1)
+        console.log(this.chooseRooms,'chooseRooms')
         this.model.rooms.splice(index, 1)
       } else {
         if (this.model.rooms.length >= this.presetNum) {
@@ -241,9 +247,12 @@ export default {
         }
         row.check = 1
         this.model.rooms.push(row)
+        this.chooseRooms.push(row)
       }
     },
     tagClose2(index, key1) {
+      let chooseIndex = this.chooseRooms.findIndex(e => e.id === this.model.rooms[index].id)
+      chooseIndex === -1 ? '' : this.chooseRooms.splice(chooseIndex, 1)
       this.model.rooms.splice(index, 1)
       this.roomList.some((t) => {
         var r = t.floorRooms.some((c) => {
@@ -261,11 +270,13 @@ export default {
     onChange(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
+    add(row, chooseRooms) {
+      this.oldRow = row
+      let record = JSON.parse(JSON.stringify(row))
+      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) {
@@ -285,7 +296,8 @@ export default {
         that.$message.warning('请先选择房间')
         return
       }
-      that.$emit('ok', that.model.rooms)
+      this.oldRow.buildingRooms = this.roomList
+      that.$emit('ok', that.model.rooms, this.chooseRooms)
     }
   }
 }

+ 6 - 6
src/views/room/modules/schedule/SelectRoomFormModal.vue

@@ -33,10 +33,10 @@ export default {
     };
   },
   methods: {
-    add(row) {
+    add(row,chooseRooms) {
       this.visible = true;
       this.$nextTick(() => {
-        this.$refs.realForm.add(row);
+        this.$refs.realForm.add(row,chooseRooms);
       });
     },
     edit(record) {
@@ -52,9 +52,9 @@ export default {
     handleOk() {
       this.$refs.realForm.submitForm();
     },
-    submitCallback(e) {
-      console.log("e", e);
-      this.$emit("ok", e);
+    submitCallback(e, chooseRooms) {
+      console.log("e", e, chooseRooms);
+      this.$emit("ok", e, chooseRooms);
       this.visible = false;
     },
     handleCancel() {
@@ -62,4 +62,4 @@ export default {
     },
   },
 };
-</script>
+</script>

+ 6 - 6
src/views/settings/components/roomModules/housePriceSchemeSettingModel.vue

@@ -2,7 +2,7 @@
   <div>
     <j-modal :visible="visible" :title="title" @cancel="visible = !visible" :width="500" @ok="submitForm">
       <a-form-model ref="form" :model="model">
-        <a-form-model-item v-if="model.type === 1" label="周末房价执行时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weekends">
+        <a-form-model-item v-if="model.schemeType === 1" label="周末房价执行时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weekends">
           <a-checkbox-group v-model="model.weekends" >
             <a-checkbox :value="item.value" v-for="item in weeks" :key="item.value">
               {{ item.text }}
@@ -10,7 +10,7 @@
           </a-checkbox-group>
         </a-form-model-item>
 
-        <a-form-model-item  v-if="model.type === 2" label="节假日时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="holiday" >
+        <a-form-model-item  v-if="model.schemeType === 2" label="节假日时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="holiday" >
           <a-radio-group >
             <a-radio :value="0">同步法定节假日</a-radio>
             <a-radio :value="1">自定义节假日时间</a-radio>
@@ -132,10 +132,12 @@ export default {
               [moment(new Date(this.model.validStartTime)).format('YYYY-MM-DD 00:00:00'),
                 moment(new Date(this.model.validEndTime)).format('YYYY-MM-DD 00:00:00')]
         }
-        this.model.holiday = '2023-11-28~2023-11-29'
         let holidayStrArr = this.model.holiday.split(',')
         let allHolidayArr = []
         holidayStrArr.forEach(e => {
+          if (e === ''){
+            return
+          }
           let holidayArr = e.split('~')
           if (holidayArr.length > 0) {
             holidayArr[0] = moment(holidayArr[0])
@@ -153,7 +155,6 @@ export default {
           allHolidayArr.push(obj)
         }
         this.allHolidayArr = allHolidayArr
-        console.log(this.allHolidayArr, 'allHolidayArr')
       })
     },
     puls() {
@@ -193,8 +194,7 @@ export default {
         holidayStr += e.list.join('~')
         holidayStr += ','
       })
-      this.holiday = holidayStr
-      console.log(this.model)
+      this.model.holiday = holidayStr
       this.$refs.form.validate((valid) => {
         if (valid) {
           that.confirmLoading = true

+ 282 - 0
src/views/settings/components/roomModules/longRentScheme.vue

@@ -0,0 +1,282 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="loadScheme">
+        <a-row :gutter="24">
+          <a-col :span="6">
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="loadScheme" type="primary" icon="add">查询</a-button>
+      <a-button @click="addScheme" type="primary" icon="plus">新增</a-button>
+    </div>
+    <!-- <div class="table-operator">
+        <a-tabs v-model:activeKey="activeKey">
+            <a-tab-pane key="1" tab="Tab 1">Content of Tab Pane 1</a-tab-pane>
+            <a-tab-pane key="2" tab="Tab 2" force-render>Content of Tab Pane 2</a-tab-pane>
+            <a-tab-pane key="3" tab="Tab 3">Content of Tab Pane 3</a-tab-pane>
+        </a-tabs>
+    </div> -->
+
+    <!-- table区域-begin -->
+    <div>
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
+  <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
+  <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
+  >项
+  <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+</div> -->
+
+      <a-table
+        rowKey="id"
+        :columns="columns"
+        :dataSource="longRentSchemeList"
+        bordered
+        :pagination="ipagination"
+        class="j-table-force-nowrap">
+        <template slot="name" slot-scope="text, record, index" >
+          <div style="margin: -15px -16px">
+            <div v-for="(item, indexs) in record.houseLongRentChargeList" :key="indexs" class="table_list_item">
+              {{ item.name }}
+            </div>
+          </div>
+        </template>
+        <template slot="chargeType" slot-scope="text, record, index" >
+          <div style="margin: -15px -16px">
+            <div v-for="(item, indexs) in record.houseLongRentChargeList" :key="indexs" class="table_list_item">
+              {{ getChargeTypeText(item.chargeType) }}
+            </div>
+          </div>
+        </template>
+        <template slot="marketPrice" slot-scope="text, record, index" >
+          <div style="margin: -15px -16px">
+            <div v-for="(item, indexs) in record.houseLongRentChargeList" :key="indexs" class="table_list_item">
+              {{ getMarketPriceText(item) }}
+            </div>
+          </div>
+        </template>
+        <template slot="state" slot-scope="text, record, index" >
+          <a-switch/>启用
+        </template>
+        <template slot="action" slot-scope="text, record, index" >
+            <a @click="editScheme(record)">修改</a>
+            <a-divider type="vertical" />
+            <a-popconfirm title="确定删除吗?" >
+                <a :disabled="flag">删除</a>
+            </a-popconfirm>
+        </template>
+      </a-table>
+    </div>
+    <!--        <room-layout-form ref="modalForm" @ok="modalFormOk"></room-layout-form>-->
+    <!--        <room-layout-price-modal ref="priceModal" @ok="onPriceSave"></room-layout-price-modal>-->
+    <!--        <room-layout-detail-modal @saveOk="onSaveOk" ref="detailModal"></room-layout-detail-modal>-->
+    <long-rent-scheme-model ref="longRentSchemeModel" @ok="longRentSchemeModelOk"></long-rent-scheme-model>
+  </a-card>
+</template>
+
+<script>
+
+import HousePriceSchemeModal from './modules/housePriceSchemeModal'
+import { httpAction, getAction } from '@/api/manage'
+import HousePriceSchemeDetailModal from './modules/housePriceSchemeDetailModal'
+import LongRentSchemeModel from '@views/settings/components/roomModules/longRentSchemeModel'
+let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+export default {
+  name: 'LongRentScheme',
+  components: {
+    LongRentSchemeModel,
+    HousePriceSchemeDetailModal,
+    HousePriceSchemeModal
+  },
+  watch: {
+
+  },
+  data() {
+    return {
+      visible: false,
+      queryParam: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 7 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 }
+      },
+      // 分页参数
+      ipagination: {
+        current: 1,
+        pageSize: 3,
+        pageSizeOptions: ['3', '6', '9'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 共' + total + '条'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0
+      },
+      // 表头
+      columns: [
+        {
+          title: '房价方案',
+          align: 'center',
+          width: 80,
+          dataIndex: 'name'
+        },
+        {
+          title: '费用名称',
+          dataIndex: 'name',
+          width: 80,
+          scopedSlots: { customRender: 'name' }
+        },
+        {
+          title: '费用类型',
+          dataIndex: 'chargeType',
+          width: 80,
+          scopedSlots: { customRender: 'chargeType' }
+        },
+        {
+          title: '费用标准',
+          dataIndex: 'marketPrice',
+          width: 60,
+          scopedSlots: { customRender: 'marketPrice' }
+        },
+        {
+          title: '状态',
+          dataIndex: 'state',
+          align: 'center',
+          width: 147,
+          scopedSlots: { customRender: 'state' }
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          width: 147,
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: '/rooms/cesHousePriceScheme/list?hotelId=' + hotelInfo.id
+      },
+      longRentSchemeList: [],
+      // 新增费项
+      addChargeList: [],
+      // 新增时选择的费项类型
+      chargeType: null,
+      rentCharges: {
+        chargeType: 2,
+        isMust: true
+      },
+      depositCharges: {
+        chargeType: 1,
+        isDepositCustom: false,
+        isMust: true
+      },
+      newScheme: {}
+    }
+  },
+  created() {
+    this.loadScheme()
+    // console.log(111);
+    // this.getMember()
+  },
+  methods: {
+    getChargeTypeText(text) {
+      if (text === 1) {
+        return '一次性'
+      } else if (text === 2) {
+        return '周期性'
+      } else if (text === 3) {
+        return '水费'
+      } else if (text === 4) {
+        return '电费'
+      } else if (text === 5) {
+        return '燃气费'
+      }
+    },
+    getMarketPriceText(record) {
+      let standard = ''
+      standard = record.money + '元'
+      if (record.cycleUnit === 1) {
+        standard += '/月'
+      } else if (record.cycleUnit === 1) {
+        standard += '/季'
+      } else if (record.cycleUnit === 1) {
+        standard += '/年'
+      } else if (record.chargeType === 3) {
+        standard += '/吨'
+      } else if (record.chargeType === 4) {
+        standard += '/度'
+      } else if (record.chargeType === 5) {
+
+      }
+      return standard
+    },
+    longRentChange(record) {
+      console.log(record, 'record')
+      this.chooseLongRentScheme = this.longRentSchemeList.find(e => e.id === record)
+      if (this.chooseLongRentScheme == null) {
+        return
+      }
+      // 押金
+      this.depositCharges = this.chooseLongRentScheme.houseLongRentChargeList.find(e => e.chargeType === 1 && e.isMust)
+      // 租金
+      this.rentCharges = this.chooseLongRentScheme.houseLongRentChargeList.find(e => e.chargeType === 2 && e.isMust)
+      console.log(this.depositCharges)
+      console.log(this.rentCharges, 'rentCharges')
+    },
+    loadScheme() {
+      getAction('rooms/cesHouseLongRentScheme/page', { pageSize: this.ipagination.pageSize, pageNo: this.ipagination.current}
+      ).then((res) => {
+        if (res.success && res.result.records.length > 0) {
+          this.longRentSchemeList = res.result.records
+        }
+      })
+    },
+    addScheme() {
+      this.$refs.longRentSchemeModel.visible = true
+      this.$nextTick(() => {
+        this.$refs.longRentSchemeModel.add()
+        this.$refs.longRentSchemeModel.title = '新增方案'
+      })
+    },
+    editScheme(value) {
+      this.$refs.longRentSchemeModel.visible = true
+      this.$nextTick(() => {
+        this.$refs.longRentSchemeModel.edit(value)
+        this.$refs.longRentSchemeModel.title = '修改方案'
+      })
+    },
+    longRentSchemeModelOk() {
+      this.loadScheme()
+    }
+  }
+}
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+
+.dynamic-delete-button {
+  cursor: pointer;
+  position: relative;
+  /* top: 4px; */
+  margin-left: 5px;
+  font-size: 18px;
+  color: #1890ff;
+  transition: all 0.3s;
+}
+
+.table_list_item{
+  height: 65px;
+  line-height: 65px;
+  padding: 0 16px;
+  border-bottom: 1px solid #e8e8e8;
+}
+</style>

+ 29 - 28
src/views/settings/components/roomModules/modules/housePriceSchemeDetailList.vue

@@ -247,7 +247,6 @@
          created() {
             // console.log(JeecgListMixin);
             this.getSuperFieldList()
-           console.log(this.typess, '2222222222')
             // console.log(this.dataSource);
             // console.log(this.dataSource);
         },
@@ -311,29 +310,29 @@
             },
             // 拿到协议方案
             async getAgreement() {
-            await getAction('/business/busMarketAgreementUnit/getAgreementUnitsDetail').then(res => {
-                this.agreementList = res.result
-            })
-            let templist = {
-                    title: '协议',
-                    children: [
-                    ]
-                }
-                this.agreementList.forEach(item => {
-                    let tempchildren = {
-                        title: item.customerName,
-                        dataIndex: item.id,
-                        discount: item.marketAgreementCustomer.discount
-                    }
-                    templist.children.push(tempchildren)
-                })
-                this.columns.splice(5, 0, templist)
-                // this.memberList = templist
-                this.handlelistData.forEach(item => {
-                    templist.children.forEach(index => {
-                        item[index.dataIndex] = (item.layoutPrice * (index.discount * 0.01))
-                    })
-                })
+              await getAction('/business/busMarketAgreementUnit/getAgreementUnitsDetail').then(res => {
+                  this.agreementList = res.result
+              })
+              let templist = {
+                      title: '协议',
+                      children: [
+                      ]
+                  }
+                  this.agreementList.forEach(item => {
+                      let tempchildren = {
+                          title: item.customerName,
+                          dataIndex: item.id,
+                          discount: item.marketAgreementCustomer.discount
+                      }
+                      templist.children.push(tempchildren)
+                  })
+                  this.columns.splice(5, 0, templist)
+                  // this.memberList = templist
+                  this.handlelistData.forEach(item => {
+                      templist.children.forEach(index => {
+                          item[index.dataIndex] = (item.layoutPrice * (index.discount * 0.01))
+                      })
+                  })
             },
             // 获取钟点房
             async getHourlyRoom() {
@@ -430,7 +429,6 @@
               this.choosePriceSchemeLayout = record
             },
             editMoneyOk() {
-              var that = this
               // 修改执行房价
               var param = {
                 money: this.choosePriceSchemeLayout.money,
@@ -449,10 +447,13 @@
               })
             },
             // 重置按钮
-            handleReset() {
-
+            handleReset(record) {
+              getAction('business/busHousePriceSchemeLayout/resetDailyPrice', { priceSchemeLayoutId: record.id }).then(resp => {
+                if (resp.success) {
+                  this.$message.success(resp.message)
+                }
+              })
             }
-
         }
     }
 </script>

+ 30 - 28
src/views/settings/components/roomModules/modules/housePriceSchemeForm.vue

@@ -18,37 +18,37 @@
                 :allowClear="true"
                 @change="e=>handleGuestType(e)"
               >
-                <a-select-option :value="undefined">请选择</a-select-option>
+                <a-select-option :value="null">全部</a-select-option>
                 <a-select-option :value="item.value" v-for="item in guestTypeList" :key="item.value">{{ item.text }}</a-select-option>
               </a-select>
             </a-col>
-            <a-col :span="8">
-              <a-select
-                v-if="model.guestType == 2"
-                style="width: 100%"
-                v-model="model.martketMemberId"
-                placeholder="请选择会员"
-                :allowClear="true"
-                @change="e=>handleGuestType(e)"
-              >
-                <a-select-option :value="undefined">请选择</a-select-option>
-                <a-select-option :value="item.id" v-for="item in customerList" :key="item.id">{{ item.name }}</a-select-option>
-              </a-select>
+<!--            <a-col :span="8">-->
+<!--              <a-select-->
+<!--                v-if="model.guestType == 2"-->
+<!--                style="width: 100%"-->
+<!--                v-model="model.martketMemberId"-->
+<!--                placeholder="请选择会员"-->
+<!--                :allowClear="true"-->
+<!--                @change="e=>handleGuestType(e)"-->
+<!--              >-->
+<!--                <a-select-option :value="undefined">请选择</a-select-option>-->
+<!--                <a-select-option :value="item.id" v-for="item in customerList" :key="item.id">{{ item.name }}</a-select-option>-->
+<!--              </a-select>-->
 
-              <a-select
-                v-if="model.guestType == 3"
-                style="width: 100%"
-                v-model="model.agreementUnitId"
-                placeholder="请选择协议单位"
-                :allowClear="true"
-                @change="e=>handleGuestType(e)"
-              >
-                <a-select-option :value="undefined">请选择</a-select-option>
-                <a-select-option :value="item.id" v-for="item in agreementUnitList" :key="item.id">{{ item.customerName }}</a-select-option>
-              </a-select>
+<!--              <a-select-->
+<!--                v-if="model.guestType == 3"-->
+<!--                style="width: 100%"-->
+<!--                v-model="model.agreementUnitId"-->
+<!--                placeholder="请选择协议单位"-->
+<!--                :allowClear="true"-->
+<!--                @change="e=>handleGuestType(e)"-->
+<!--              >-->
+<!--                <a-select-option :value="undefined">请选择</a-select-option>-->
+<!--                <a-select-option :value="item.id" v-for="item in agreementUnitList" :key="item.id">{{ item.customerName }}</a-select-option>-->
+<!--              </a-select>-->
 
-              <a-input v-if="model.guestType == 4" style="width: 90%;margin: auto;" v-model="model.mediation" placeholder="请输入名称/简介/联系人"></a-input>
-            </a-col>
+<!--              <a-input v-if="model.guestType == 4" style="width: 90%;margin: auto;" v-model="model.mediation" placeholder="请输入名称/简介/联系人"></a-input>-->
+<!--            </a-col>-->
           </a-row>
         </a-form-model-item>
         <a-form-model-item label="有效期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="validTime">
@@ -123,7 +123,7 @@
                 confirmLoading: false,
                 validatorRules: {
                     priceScheme: [{ required: true, message: '请输入房价方案!' }],
-                    guestType: [{ required: true, message: '请选择客人类型!' }],
+                    // guestType: [{ required: true, message: '请选择客人类型!' }],
                     checkInTime: [{ required: true, message: '请选择入住时间!' }],
                     validTime: [{ required: true, message: '请选择有效期!' }],
                     open: [{ required: true, message: '请选择是否开启!' }]
@@ -195,7 +195,6 @@
                     if (res.success) {
                         this.guestTypeList = res.result
                     }
-                    this.model.guestType = res.result[0].value
                 })
                 // 初始化字典 - 客人类型
                 // initDictOptions('house_price_zmjr').then((res) => {
@@ -254,6 +253,8 @@
 
                 console.log(_record)
                 this.model = Object.assign({}, _record)
+                this.model.guestType == null ? '' : this.model.guestType = this.model.guestType.toString()
+
                 this.visible = true
                 if (this.model.id) {
                     if (this.model.checkInTime === 1) {
@@ -402,6 +403,7 @@
             },
             handleGuestType(e) {
                 console.log(e)
+              this.$forceUpdate()
             }
         }
     }