Commit e9ce4d8d authored by youjie's avatar youjie

优化

parent aea4f8d4
......@@ -101,15 +101,16 @@
<span class="fz13">{{subItem.Currency }}</span>
<!-- style="border-bottom: 1px dotted #f44336;"
@click="getDiDaPriceConfirm(index,indexs,subItem)" -->
<span class="text-red text-weight-bold q-px-sm"
<!-- v-loading="index==currentIndex&&indexs==currentSubIndex&&confirmLoading" -->
<span class="text-red text-weight-bold q-px-sm" v-if="subItem&&subItem.PriceList&&subItem.PriceList.length"
:class="{'fz28':$q.platform.is.desktop}"
@click="getDiDaPriceConfirm(index,indexs,subItem)"
v-loading="index==currentIndex&&indexs==currentSubIndex&&confirmLoading">
>
{{ subItem.PriceList&&subItem.PriceList.length?getPrice(subItem.PriceList[0].Price):getPrice(subItem.TotalPrice) }}
<span v-if="subItem.PriceList&&subItem.PriceList.length"
style="font-size:12px;color:#888888">/間</span>
</span>
<!-- <span>{{getPrice(subItem.chargeableRateInfoPerPersonForANightBySetCurrency)}}</span> -->
</div>
<div :class="{'row justify-end':$q.platform.is.mobile}">
<q-btn color="primary" :size="$q.platform.is.desktop?'md':'sm'" label="立即預訂" unelevated
......@@ -124,9 +125,6 @@
class="absolute q-px-sm text-white"
:class="itemp.MealAmount==0?'bg-dark':'bg-green'"
style="left: 0;top:0;border-top-right-radius: 5px;border-bottom-right-radius: 5px;">
<!-- <span class="text-red">{{subItem.Currency }}
{{getPrice(itemp.Price) }}
</span> -->
{{getMealtype(itemp.MealType)}}
{{itemp.MealAmount>0?('×'+itemp.MealAmount+'份'):''}}
</span>
......@@ -268,7 +266,7 @@
return totelPrice;
},
getPrice(price) {
return Math.ceil(price);
return price //Math.ceil(price);
},
getDiDaPriceConfirm(index, subIndex, item) {
this.currentIndex = index;
......@@ -338,10 +336,6 @@
images,
});
},
getPrice2(price){
if(this.SimilarObj.JapanIncrease)
return Math.ceil(price / this.SimilarObj.JapanIncrease)
},
//获取餐型
getMealtype(mealtypeId) {
let mealtypeName = "";
......
......@@ -29,8 +29,7 @@
searchroomGroup:msg.searchroomGroup}"
Type="1"
@change="changQuery"
@changeCity="changCity"
@clear="changQuery"></destination>
@changeCity="changCity"></destination>
<div class="q-pt-sm cursor-pointer">
<div v-show="regionList.length" class="self-center no-outline text-s"
tabindex="0"
......@@ -745,10 +744,12 @@ export default {
this.$emit('change', this.msg)
},
changCity(y){
// this.msg.CityCode2 = y.CityCode
this.msg.CityCode = y.CityCode
this.msg.CityName = y.CityName
this.resetQuery()
this.msg = {
...this.msg,
...y
}
this.$emit('change', this.msg)
// this.resetQuery()
this.getRegion(this.msg.CityCode)
},
clickHandler(e) {
......
......@@ -399,7 +399,7 @@
</template>
</q-img>
<div class="col column q-ml-xs">
<q-img class="cursor-pointer" :src="images[1]"
<q-img class="cursor-pointer" :src="images[1]?images[1]:'../assets/img/errImg.png'"
:ratio="16/9" @click="showImageHandler(1)">
<template v-slot:error>
<div class="absolute-full flex flex-center bg-grey-3 text-dark">
......@@ -407,7 +407,7 @@
</div>
</template>
</q-img>
<q-img class="q-mt-xs cursor-pointer" :src="images[2]"
<q-img class="q-mt-xs cursor-pointer" :src="images[2]?images[2]:'../assets/img/errImg.png'"
:ratio="16/9" @click="showImageHandler(2)">
<template v-slot:error>
<div class="absolute-full flex flex-center bg-grey-3 text-dark">
......@@ -417,7 +417,7 @@
</q-img>
</div>
<div class="col column q-ml-xs">
<q-img class="cursor-pointer" :src="images[3]"
<q-img class="cursor-pointer" :src="images[3]?images[3]:'../assets/img/errImg.png'"
:ratio="16/9" @click="showImageHandler(3)">
<template v-slot:error>
<div class="absolute-full flex flex-center bg-grey-3 text-dark">
......@@ -425,7 +425,7 @@
</div>
</template>
</q-img>
<q-img class="q-mt-xs cursor-pointer" :src="images[4]"
<q-img class="q-mt-xs cursor-pointer" :src="images[4]?images[4]:'../assets/img/errImg.png'"
:ratio="16/9" @click="showImageHandler(4)">
<template v-slot:error>
<div class="absolute-full flex flex-center bg-grey-3 text-dark">
......@@ -1199,6 +1199,7 @@ export default {
if (tempRetePlanList && tempRetePlanList.length > 0) {
newDataArray.push(qitem);
}
})
tempData = newDataArray;
}
......@@ -1236,8 +1237,11 @@ export default {
methods: {
changeMsg(msg,item){
if(item){
this.detaMsg.hotelId = item.Id
this.msg.hotelId = item.Id
this.detaMsg.hotelId = item.hotelId
this.msg = {
...this.msg,
...item,
}
this.MinPrice = item.Price
}else{
this.CityCode = msg.CityCode
......@@ -1526,7 +1530,6 @@ export default {
const row = tempObj.RoomFacilityList.slice(startIndex, endIndex)
this.RoomFacilities.push(row)
}
console.log(this.RoomFacilities,'----')
}
// let description = tempObj.description.split('<br/>')
// this.hotelDetails.hotelDescription = []
......@@ -1582,6 +1585,7 @@ export default {
}
})
})
if(item.images.length==0) item.imageList = this.images
})
this.DidaHotelRoomDetails = tempData;
this.qRoomTypeList = tempData.qRoomTypeList?tempData.qRoomTypeList:[];
......
......@@ -270,9 +270,10 @@ export default {
// });
}else if(y.Type==2){
this.HotalMsg.KeyWords2 = ''
this.HotalMsg.KeyWords = ''
this.HotalMsg.hotelId = y.Id
this.$emit('change', this.HotalMsg,y)
this.$emit('change', this.HotalMsg,{hotelId:y.Id,Price:y.Price})
}
this.showKeyWordsList = false
this.showSplitPannel = false
......@@ -323,9 +324,12 @@ export default {
this.loading2 = false
})
},
getHotalList(type){
getHotalList(type,cit){
let msg = JSON.parse(JSON.stringify(this.HotalMsg))
if(this.KeyWords3) msg.KeyWords = this.KeyWords3
// if(this.KeyWords3) msg.KeyWords = this.KeyWords3
if(!type) {
msg.hotelId = ''
} if(cit) msg.KeyWords = ''
this.apipost(
"dmc_post_B2BAndB2CGetDidaHotelPage",msg,
res => {
......@@ -373,8 +377,7 @@ export default {
// this.HotalMsg.hotelId = ''
this.HotalMsg.StartDate = this.HotalMsg.StartDate?this.HotalMsg.StartDate:date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD")
this.HotalMsg.EndDate = this.HotalMsg.EndDate?this.HotalMsg.EndDate:date.formatDate(date.addToDate(new Date(), { days: 9}), "YYYY/MM/DD")
console.log(this.HotalMsg,'------')
if(!type&&this.Type>0) this.$emit('change',this.HotalMsg)
if(!type&&this.Type>0||type&&this.Type) this.$emit('change',this.HotalMsg)
return
this.showSplitPannel = true
this.showKeyWordsList = false
......@@ -404,7 +407,7 @@ export default {
searchBlurHandler(type){
},
searchChangeHandler(type){
searchChangeHandler(type,cit){
setTimeout(()=>{
if(!type&&(!this.HotalMsg.KeyWords||this.HotalMsg.KeyWords=='')&&(!this.KeyWords3||this.KeyWords3=='')) {
this.loading = false
......@@ -412,7 +415,7 @@ export default {
this.showSplitPannel = false
if(this.Type>0) this.$emit('change', this.HotalMsg)
return
}else if(type&&(!this.HotalMsg.KeyWords2||this.HotalMsg.KeyWords2=='')){
}else if(type&&(!this.HotalMsg.KeyWords2||this.HotalMsg.KeyWords2=='')&&(!this.HotalMsg.CityCode||this.HotalMsg.CityCode=='')){
this.loading = false
this.showKeyWordsList = false
if(this.Type>0) this.$emit('change', this.HotalMsg)
......@@ -423,7 +426,7 @@ export default {
if(!type) {
if(!this.Type){
this.loading = true
this.getHotalList()
this.getHotalList(type,cit)
}else{
this.$emit('change', this.HotalMsg)
}
......@@ -439,15 +442,18 @@ export default {
this.HotalMsg.CityCode = y.CityCode
this.HotalMsg.StartDate = this.HotalMsg.StartDate?this.HotalMsg.StartDate:date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD")
this.HotalMsg.EndDate = this.HotalMsg.EndDate?this.HotalMsg.EndDate:date.formatDate(date.addToDate(new Date(), { days: 9}), "YYYY/MM/DD")
this.HotalMsg.KeyWords2 = y.CityName
// this.HotalMsg.KeyWords2 = y.CityName
if(this.Type>0) {
this.HotalMsg.KeyWords2 = ''
this.HotalMsg.KeyWords = ''
this.$emit('changeCity', this.HotalMsg)
this.showSplitPannel = false
// this.searchChangeHandler(1)
}else{
// this.HotalMsg.KeyWords = ''
this.searchChangeHandler(1)
this.searchChangeHandler(0,1)
// this.CommonJump('/searchdida', {
// ...this.HotalMsg
// });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment