diff --git a/src/components/Hotel/singleProduct/HotelList.vue b/src/components/Hotel/singleProduct/HotelList.vue index 5db7bf735cfccf39656ca9261e1f744c4859b395..362310156f1d40b5a44a902af1f54a258f363d61 100644 --- a/src/components/Hotel/singleProduct/HotelList.vue +++ b/src/components/Hotel/singleProduct/HotelList.vue @@ -98,7 +98,7 @@ <el-table-column v-for='(item,index) in dataList[0].subList' :label="getDateList(item.DateStr)" :key='index' min-width="120"> <template slot-scope="scope"> - <div @click="showOrderSubmitHandler(scope.row,0,index)"> + <div @click="showOrderSubmitHandler(scope.row,index,0)"> <div class="Hotel_kong Com_hoteldiv"> <template v-if="scope.row.subList[index].PriceList.length>0"> <template v-for="childItem in scope.row.subList[index].PriceList"> @@ -381,6 +381,21 @@ HOTEL_memorandum: false }; }, + watch: { + dataList:{ + handler(val, oldVal){ + let that = this + that.$nextTick(function(){ + that.com_onresize(); + window.onresize = () => { + that.com_onresize(); + } + that.$forceUpdate(); + }) + }, + deep: true + } + }, methods: { removeEditor(){ localStorage.removeItem('editor') @@ -394,10 +409,10 @@ editor(x){ this.dataList.forEach((item,index) => { if(item.HotelId==x.HotelId){ - item.subList.forEach(xs=>{ + item.subList.forEach((xs,indexs)=>{ if(xs.DateStr==x.Date){ this.rightCarOpen = false - this.showOrderSubmitHandler(item,index,1) + this.showOrderSubmitHandler(item,indexs,1) } }) } @@ -418,7 +433,7 @@ localStorage.removeItem("editor") }, // åŠ å…¥è´ç‰©è½¦ - showOrderSubmitHandler(row,type,index){ + showOrderSubmitHandler(row,index,type){ this.orderSubmitObj = row this.orderSubmitItemObj = row.subList[index] this.showOrderPreview = true diff --git a/src/components/Hotel/singleProduct/components/TableOperation.vue b/src/components/Hotel/singleProduct/components/TableOperation.vue index d7898155d543d2de19b266c66283b85b7f6a6e9a..70a8aab7f08b415732a75f30c4eab2e841727b23 100644 --- a/src/components/Hotel/singleProduct/components/TableOperation.vue +++ b/src/components/Hotel/singleProduct/components/TableOperation.vue @@ -146,8 +146,12 @@ }, hotelInfor: { handler: function (val, oldVal) { - this.hotelInfor = val - this.setList() + if(this.hotelInfor&&this.hotelInfor.RemainingInventory){ + this.onlyNum = this.hotelInfor.RemainingInventory + } + if(this.HotelRow && this.hotelInfor){ + this.setList() + } }, deep: true }, @@ -267,9 +271,9 @@ this.setInjectHandler() }, setDateRange() { - if(!this.editorType&&!this.editor){ + if(!this.editorType&&!this.editor&&this.parameters.Date){ this.joinHouse.StartDate = this.parameters.Date - }else{ + }else if(this.editorType&&this.editor&&this.editor.Date){ this.joinHouse.StartDate = this.editor.Date } this.joinHouse.EndDate = this.getBeforeDate(-1, this.joinHouse.StartDate)