Commit 331a59bd authored by youjie's avatar youjie

道旅酒店

parent 240fd202
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
</div> </div>
<div :class="{'row justify-end':$q.platform.is.mobile}"> <div :class="{'row justify-end':$q.platform.is.mobile}">
<q-btn color="primary" :size="$q.platform.is.desktop?'md':'sm'" label="立即預訂" unelevated <q-btn color="primary" :size="$q.platform.is.desktop?'md':'sm'" label="立即預訂" unelevated
@click="goOrderHandler(index,indexs,subItem)" @click="goOrderHandler(item,subItem)"
:class="{'q-px-xs':$q.platform.is.desktop}"/> :class="{'q-px-xs':$q.platform.is.desktop}"/>
</div> </div>
</div> </div>
...@@ -310,21 +310,15 @@ ...@@ -310,21 +310,15 @@
null null
); );
}, },
goOrderHandler(item){ goOrderHandler(item,subItem){
let order = { subItem = {
msg: this.msg, RoomName_CN: item.RoomName_CN,
liveNvm: this.SimilarObj.liveNvm, RoomName: item.RoomName,
roomOptionCd: item, imageList: item.imageList,
...subItem
} }
let key = this.$md5(JSON.stringify(order)) this.$emit('placeOrder', subItem);
let pickuporderHotal = localStorage.getItem('pickuporderHotalDida')
pickuporderHotal = pickuporderHotal?JSON.parse(pickuporderHotal):[]
pickuporderHotal.push({
key,
order
})
localStorage.setItem("pickuporderHotalDida",JSON.stringify(pickuporderHotal))
this.CommonJump('/HotalDidaForm/'+key, {});
}, },
init() { init() {
this.chooseObj = null this.chooseObj = null
......
...@@ -437,7 +437,7 @@ ...@@ -437,7 +437,7 @@
> >
<div class="col q-mr-lg"> <div class="col q-mr-lg">
<div class="f30 bold row items-center"> <div class="f30 bold row items-center">
<span class="ellipsis-2-lines q-pr-lg">{{ hotelSummary.hotelName }}</span> <span class="ellipsis-2-lines q-pr-lg">{{ dataList.Name_CN }}</span>
<q-rating v-model="roomReviewRating" size="1em" <q-rating v-model="roomReviewRating" size="1em"
color="orange" :max="roomReviewRating" readonly /> color="orange" :max="roomReviewRating" readonly />
</div> </div>
...@@ -575,6 +575,7 @@ ...@@ -575,6 +575,7 @@
:HotelRoomTypes="HotelRoomTypes" :HotelRoomTypes="HotelRoomTypes"
:HotelMealTypes="HotelMealTypes" :HotelMealTypes="HotelMealTypes"
@change="changeChosenDateHandler" @change="changeChosenDateHandler"
@placeOrder="placeOrderHandler"
ref="RoomCard" ref="RoomCard"
></RoomCard> ></RoomCard>
...@@ -676,6 +677,7 @@ ...@@ -676,6 +677,7 @@
:HotelRoomTypes="HotelRoomTypes" :HotelRoomTypes="HotelRoomTypes"
:HotelMealTypes="HotelMealTypes" :HotelMealTypes="HotelMealTypes"
@change="changeChosenDateHandler" @change="changeChosenDateHandler"
@placeOrder="placeOrderHandler"
ref="RoomCard" ref="RoomCard"
></RoomCard> ></RoomCard>
</div> </div>
...@@ -1233,6 +1235,59 @@ export default { ...@@ -1233,6 +1235,59 @@ export default {
document.getElementsByTagName("body")[0].style = ""; document.getElementsByTagName("body")[0].style = "";
}, },
methods: { methods: {
placeOrderHandler(item){
// this.getDiDaPriceConfirmList(item)
let order = {
msg: {
hotelId: this.msg.hotelId,
CheckInDate: this.msg.CheckInDate,
CheckOutDate: this.msg.CheckOutDate,
ratePlanID: item.RatePlanID,
RoomCount: this.roomGroup,
AdultCount: this.numberOfAdults,
childNum: this.numberOfChildren,
searchroomGroup: this.msg.searchroomGroup,
},
liveNvm: this.SimilarObj.liveNvm,
roomOptionCd: item,
detail: this.dataList
}
let key = this.$md5(JSON.stringify(order))
let pickuporderHotal = localStorage.getItem('pickuporderHotalDida')
pickuporderHotal = pickuporderHotal?JSON.parse(pickuporderHotal):[]
pickuporderHotal.push({
key,
order
})
localStorage.setItem("pickuporderHotalDida",JSON.stringify(pickuporderHotal))
this.CommonJump('/HotalDidaForm/'+key, {});
},
// 获取道旅确认价格
getDiDaPriceConfirmList(item){
let msg = {
sort: 1,
displayFrom: 1,
CheckInDate: this.msg.CheckInDate,
CheckOutDate: this.msg.CheckOutDate,
searchroomGroup: this.msg.searchroomGroup,
ratePlanID: item.RatePlanID,
imgUrl: "",
RoomCount: this.roomGroup,
ChildCount: this.numberOfChildren,
AdultCount: this.numberOfAdults,
OccupancyDetails: [],
hotelId: this.msg.hotelId,
}
this.apipost('dmc_post_GetDiDaPriceConfirm', msg, (res) => {
if (res.data.resultCode == 1) {
console.log(res.data)
} else {
this.$message.error(res.data.message)
}
})
},
getQueryName(type){ getQueryName(type){
if(type==1){ if(type==1){
this.qMsg.RoomTypeName = this.qMsg.RoomTypeName!='房型(全部)'?this.qMsg.RoomTypeName:'' this.qMsg.RoomTypeName = this.qMsg.RoomTypeName!='房型(全部)'?this.qMsg.RoomTypeName:''
...@@ -1431,13 +1486,14 @@ export default { ...@@ -1431,13 +1486,14 @@ export default {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
var tempObj = res.data.data; var tempObj = res.data.data;
this.dataList = res.data.data this.dataList = res.data.data
this.dataList.images = tempObj.images.filter(x=>{ tempObj.images.filter(x=>{
this.checkImageExists(x, (exists) => { this.checkImageExists(x, (exists) => {
if(exists){ if(exists){
this.images.push(x) this.images.push(x)
} }
}); });
}) })
this.dataList.images = this.images
if (tempObj.HotelFacilityList && tempObj.HotelFacilityList.length > 0) { if (tempObj.HotelFacilityList && tempObj.HotelFacilityList.length > 0) {
this.Facilities = tempObj.HotelFacilityList; this.Facilities = tempObj.HotelFacilityList;
} }
...@@ -1451,7 +1507,7 @@ export default { ...@@ -1451,7 +1507,7 @@ export default {
// this.hotelDetails.hotelDescription.push(x.replace(/<\/?[^>]+(>|$)/g, "")) // this.hotelDetails.hotelDescription.push(x.replace(/<\/?[^>]+(>|$)/g, ""))
// }) // })
this.hotelDetails.hotelDescription = tempObj.description this.hotelDetails.hotelDescription = tempObj.description
this.roomReviewRating = Number(this.hotelDetails.roomReviewRating); this.roomReviewRating = Number(this.dataList.StarRating);
this.travelLngLat.push({ this.travelLngLat.push({
Lat: tempObj.Latitude, Lat: tempObj.Latitude,
Lng: tempObj.Longitude, Lng: tempObj.Longitude,
......
This diff is collapsed.
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