Commit 87bdfc0d authored by youjie's avatar youjie

优化

parent e14b8265
......@@ -1123,6 +1123,7 @@ export default {
itemsPerRow: 6,
CityCode: '',
CityName: '',
order: {},//订单
};
},
watch: {
......@@ -1135,6 +1136,18 @@ export default {
},
'$route': {
handler(newVal, oldVal) {
if (this.$route.params && this.$route.params.orderKey) {
let key = this.$route.params.orderKey;
let pickuporderHotal = localStorage.getItem("pickuporderHotalDida");
pickuporderHotal = pickuporderHotal ? JSON.parse(pickuporderHotal) : [];
if (pickuporderHotal.length > 0) {
this.order = pickuporderHotal.find((x) => x.key == key);
if (this.order) {
this.msg.searchroomGroup = this.order.order.msg.searchroomGroup
}
}
}
let params = newVal.params
if(params.CheckInDate){
this.msg.CheckInDate = decodeURIComponent(params.CheckInDate)
......@@ -1349,6 +1362,11 @@ export default {
x[m] = x[m] < 1 ? 1 : x[m]++;
}else{
x[m] = x[m] < 0 ? 0 : x[m]++;
if(x[m]>0)x['ChildAgeDetails'] = x['ChildAgeDetails']?x['ChildAgeDetails']:1
else x['ChildAgeDetails'] = 0
setTimeout(()=>{
this.getDiDaPriceSearchList()
},1000)
}
}
this.CountPeople()
......@@ -1361,6 +1379,7 @@ export default {
this.numberOfAdults += x.numberOfAdults
this.numberOfChildren += x.numberOfChildren
})
},
optionsFn(cd) {
return cd >= date.formatDate(date.addToDate(new Date(), { days: 8 }), 'YYYY/MM/DD')
......
......@@ -279,7 +279,7 @@
placeholder=""
mask="#"
reverse-fill-mask
:disable="!y.numberOfChildren?true:false"
:disable="!y.isChild?true:false"
/>
<!-- :rules="[(val) => !!val || '請輸儿童數']" -->
</div>
......@@ -684,7 +684,8 @@ export default {
})
} else {
this.$message.error(res.data.message)
this.CommonJump(`/detailHotalDida/${this.msg.hotelId}/${this.OrderDate.MinPrice}/${encodeURIComponent(this.msg.CheckInDate)}/${encodeURIComponent(this.msg.CheckOutDate)}`, {});
this.CommonJump(`/detailHotalDida/${this.msg.hotelId}/${this.OrderDate.MinPrice}/${encodeURIComponent(this.msg.CheckInDate)}/${encodeURIComponent(this.msg.CheckOutDate)}`,
{orderKey:this.orderKey});
}
},
......@@ -731,7 +732,8 @@ export default {
let obj = {
LastName: "",
FirstName: "",
Age: ""
Age: i<x.numberOfAdults?'':x.ChildAgeDetails,
isChild: i<x.numberOfAdults?false:true
};
guestInfoList.push(obj);
}
......
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