Commit 20d27a98 authored by 黄奎's avatar 黄奎

Merge branch 'B2C' of http://gitlab.oytour.com/zk123/jz_travel into B2C

parents 0f6cb815 48555eab
...@@ -749,14 +749,14 @@ ...@@ -749,14 +749,14 @@
} }
} }
}, { }, {
"path": "orderdetails",//酒店订单详情 "path": "orderdetails"//酒店订单详情
"style": { // ,"style": {
"navigationStyle": "custom", // "navigationStyle": "custom",
"mp-alipay": { // "mp-alipay": {
"transparentTitle": "always", // "transparentTitle": "always",
"titlePenetrate": "YES" // "titlePenetrate": "YES"
} // }
} // }
} }
] ]
}, },
......
...@@ -260,7 +260,9 @@ ...@@ -260,7 +260,9 @@
goReserce(item){ goReserce(item){
this.msg.SaleName = item.SaleName this.msg.SaleName = item.SaleName
this.msg.SaleId = item.SaleId this.msg.SaleId = item.SaleId
this.showSalePreviwe = false; setTimeout(()=>{
this.showSalePreviwe = false
},500)
this.goUrl() this.goUrl()
}, },
getSale(){ getSale(){
......
...@@ -169,7 +169,10 @@ ...@@ -169,7 +169,10 @@
:PopularCities="PopularCities"></destination> :PopularCities="PopularCities"></destination>
</u-popup> </u-popup>
<u-popup v-model="showTimePopup" mode="bottom" border-radius="20" length="89%" :safe-area-inset-bottom="true"> <u-popup v-model="showTimePopup" mode="bottom"
border-radius="20" length="89%"
:safe-area-inset-bottom="true"
:mask-close-able="false">
<CheckDate :msg="parameters" @chosenDateResult="chosenDateResult"></CheckDate> <CheckDate :msg="parameters" @chosenDateResult="chosenDateResult"></CheckDate>
</u-popup> </u-popup>
...@@ -226,7 +229,8 @@ ...@@ -226,7 +229,8 @@
roomNum: 1, roomNum: 1,
numberOfAdults: 2, numberOfAdults: 2,
numberOfChildren: 0, numberOfChildren: 0,
ChildAgeDetails: null ChildAgeDetails: null,
ChildAgeTexts: [],
}], }],
}, },
day: 0, day: 0,
......
...@@ -68,12 +68,20 @@ ...@@ -68,12 +68,20 @@
@change="(e)=>{ageChange(e,index)}" @change="(e)=>{ageChange(e,index)}"
style="margin-left: 10rpx;" style="margin-left: 10rpx;"
></u-number-box> --> ></u-number-box> -->
<template v-if="item.ChildAgeTexts.length>1">
<text v-for="(items,indexs) in item.ChildAgeTexts"
:key="indexs" @click="eitAge(index,indexs)">
{{ items }}<template v-if="indexs!=(item.ChildAgeTexts.length-1)">,</template>
</text>
</template>
<uni-section title="" type="line"> <uni-section title="" type="line">
<uni-data-select <uni-data-select :ref="`select_${index}`"
placeholder="请选择年龄" :placeholder="`年龄${item.numberOfChildren>1?'(选多次)':''}`"
v-model="item.ChildAgeDetails" v-model="item.ChildAgeDetails"
:localdata="TypeList" :localdata="TypeList"
:clear="false" :clear="false"
@change="(e)=>{ageChange(e,index)}"
></uni-data-select> ></uni-data-select>
</uni-section> </uni-section>
<u-icon name="arrow" :size="32" color="#ccc" style="position: relative;top: -9rpx;"></u-icon> <u-icon name="arrow" :size="32" color="#ccc" style="position: relative;top: -9rpx;"></u-icon>
...@@ -116,6 +124,7 @@ export default { ...@@ -116,6 +124,7 @@ export default {
peoples: 2, peoples: 2,
}, },
TypeList: [], TypeList: [],
current: -1,
} }
}, },
watch:{ watch:{
...@@ -129,7 +138,7 @@ export default { ...@@ -129,7 +138,7 @@ export default {
}, },
}, },
created(){ created(){
for(let i=1;i<=14;i++){ for(let i=1;i<=18;i++){
this.TypeList.push({ this.TypeList.push({
text: i+'岁', text: i+'岁',
value: i value: i
...@@ -144,7 +153,8 @@ export default { ...@@ -144,7 +153,8 @@ export default {
roomNum: e.value, roomNum: e.value,
numberOfAdults: 1, numberOfAdults: 1,
numberOfChildren: 0, numberOfChildren: 0,
ChildAgeDetails: null ChildAgeDetails: null,
ChildAgeTexts: [],
}) })
} }
if(e.value<this.parameters.rooms){ if(e.value<this.parameters.rooms){
...@@ -154,11 +164,33 @@ export default { ...@@ -154,11 +164,33 @@ export default {
this.peopleChange() this.peopleChange()
} }
}, },
eitAge(index,indexs){
this.current = indexs
this.$refs[`select_${index}`][0].toggleSelector();
},
ageChange(e,index){ ageChange(e,index){
this.parameters.searchroomGroup[index].ChildAgeDetails = e.value; let list = this.parameters.searchroomGroup[index].ChildAgeTexts
if(this.current>=0){
this.parameters.searchroomGroup[index].ChildAgeTexts[this.current] = e
this.current = -1
}else{
if(list.length==0||list.length<this.parameters.searchroomGroup[index].numberOfChildren){
this.parameters.searchroomGroup[index].ChildAgeTexts.push(e)
}else{
this.parameters.searchroomGroup[index].ChildAgeTexts[list.length-1] = e
}
}
this.parameters.searchroomGroup[index].ChildAgeDetails = e
}, },
etChange(e,index){ etChange(e,index){
this.parameters.searchroomGroup[index].numberOfChildren = e.value; this.parameters.searchroomGroup[index].numberOfChildren = e.value;
if(e.value<this.parameters.searchroomGroup[index].ChildAgeTexts.length){
let num = this.parameters.searchroomGroup[index].ChildAgeTexts.length-e.value
for(let i=0;i<num;i++){
this.parameters.searchroomGroup[index].ChildAgeTexts.splice(i,1)
this.parameters.searchroomGroup[index].ChildAgeDetails = null
}
}
this.peopleChange() this.peopleChange()
}, },
crChange(e,index){ crChange(e,index){
...@@ -176,6 +208,16 @@ export default { ...@@ -176,6 +208,16 @@ export default {
}) })
}, },
chosenDateResult(obj) { chosenDateResult(obj) {
for(let i=0;i<this.parameters.searchroomGroup.length;i++){
let list = this.parameters.searchroomGroup[i]
if(list.numberOfChildren>list.ChildAgeTexts.length){
return uni.showToast({
title: `请选择房间${i+1} 儿童年龄`,
icon: 'none',
duration: 2000
})
}
}
this.showTimePopup = false; this.showTimePopup = false;
this.$emit('chosenDateResult',this.parameters,obj) this.$emit('chosenDateResult',this.parameters,obj)
}, },
......
...@@ -236,7 +236,10 @@ ...@@ -236,7 +236,10 @@
:safe-area-inset-bottom="true"> :safe-area-inset-bottom="true">
<orderService :msg="msg" :list="SaleList" @goReserce="goReserce"></orderService> <orderService :msg="msg" :list="SaleList" @goReserce="goReserce"></orderService>
</u-popup> </u-popup>
<u-popup v-model="showTimePopup" mode="bottom" border-radius="20" length="89%" :safe-area-inset-bottom="true"> <u-popup v-model="showTimePopup" mode="bottom"
border-radius="20" length="89%"
:safe-area-inset-bottom="true"
:mask-close-able="false">
<CheckDate :msg="searchObj" @chosenDateResult="chosenDateResult"></CheckDate> <CheckDate :msg="searchObj" @chosenDateResult="chosenDateResult"></CheckDate>
</u-popup> </u-popup>
<auth v-if="showAuth&&is_show_auth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> <auth v-if="showAuth&&is_show_auth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
......
...@@ -51,20 +51,22 @@ ...@@ -51,20 +51,22 @@
</view> --> </view> -->
</view> </view>
<view class="row-sbas-n items-center"> <view class="row-sbas-n items-center">
<!--
<view class="addPnum addPnumL" @click="orderMsg.RoomCount>1?editNum(1):''"> <view class="addPnum addPnumL" @click="orderMsg.RoomCount>1?editNum(1):''">
<image v-if="orderMsg.RoomCount>1" style="width: 27rpx;height: 27rpx;display: block;" <image v-if="orderMsg.RoomCount>1" style="width: 27rpx;height: 27rpx;display: block;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638751245939665786.png" /> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638751245939665786.png" />
<image v-else style="width: 27rpx;height: 27rpx;display: block;" <image v-else style="width: 27rpx;height: 27rpx;display: block;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638755711218891689.png" /> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638755711218891689.png" />
</view> </view>-->
<view class="col row items-center textCenter visaProductTetx"> <view class="col row items-center textCenter visaProductTetx">
{{orderMsg.RoomCount}} {{orderMsg.RoomCount}}
</view> </view>
<!--
<view class="addPnum addPnumR" @click="editNum()"> <view class="addPnum addPnumR" @click="editNum()">
<image style="width: 27rpx;height: 27rpx;display: block;" <image style="width: 27rpx;height: 27rpx;display: block;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638751245974558349.png" /> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638751245974558349.png" />
</view> </view>-->
</view> </view>
</view> </view>
<view> <view>
...@@ -74,9 +76,9 @@ ...@@ -74,9 +76,9 @@
</view> </view>
<view class="LastNameBox column val" style="width: 1px;flex: 1;"> <view class="LastNameBox column val" style="width: 1px;flex: 1;">
<view class="row items-center" v-for="(sItem,i) in item.GuestInfo" :key="i"> <view class="row items-center" v-for="(sItem,i) in item.GuestInfo" :key="i">
<input type="text" v-model="sItem.LastName" :placeholder="`住客 ${i+1} 姓`" /> <input type="text" v-model="sItem.LastName" :placeholder="`${sItem.IsAdult?'住客':'儿童'} ${i+1} 姓`" />
<input type="text" v-model="sItem.FirstName" :placeholder="`住客 ${i+1} 名`" /> <input type="text" v-model="sItem.FirstName" :placeholder="`${sItem.IsAdult?'住客':'儿童'} ${i+1} 名`" />
<view class="row" style="margin-left:20rpx;"> <!--<view class="row" style="margin-left:20rpx;">
<image v-if="item.GuestInfo.length>1" <image v-if="item.GuestInfo.length>1"
style="width: 27rpx;height: 27rpx;display: block;" style="width: 27rpx;height: 27rpx;display: block;"
@click="deleteGuest(index,i)" @click="deleteGuest(index,i)"
...@@ -86,7 +88,7 @@ ...@@ -86,7 +88,7 @@
<image style="width: 27rpx;height: 27rpx;display: block;margin-left:20rpx;" <image style="width: 27rpx;height: 27rpx;display: block;margin-left:20rpx;"
@click="addGuest(index)" @click="addGuest(index)"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638751245974558349.png" /> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638751245974558349.png" />
</view> </view>-->
</view> </view>
</view> </view>
</view> </view>
...@@ -415,28 +417,9 @@ ...@@ -415,28 +417,9 @@
this.orderMsg.CheckInDate = this.dayObj.start; this.orderMsg.CheckInDate = this.dayObj.start;
this.orderMsg.CheckOutDate = this.dayObj.end; this.orderMsg.CheckOutDate = this.dayObj.end;
this.orderMsg.RoomCount = this.searchObj.rooms this.orderMsg.RoomCount = this.searchObj.rooms
this.orderMsg.GuestList = [];
this.searchObj.searchroomGroup.forEach((item, index) => { this.getGroupData()
var guestInfoList = [];
let allprople = Number(item.numberOfAdults) + Number(item.numberOfChildren)
for (let i = 1; i <= allprople; i++) {
let obj = {
LastName: "",
FirstName: "",
Age: ""
};
guestInfoList.push(obj);
}
console.log(item.ChildAgeDetails,'-------')
var obj = {
RoomNum: index + 1,
numberOfAdults: item.numberOfAdults,
numberOfChildren: item.numberOfChildren,
ChildAgeDetails: item.ChildAgeDetails != '' ? item.ChildAgeDetails : 1,
GuestInfo: guestInfoList
};
this.orderMsg.GuestList.push(obj);
});
this.params = { this.params = {
sort: 1, sort: 1,
displayFrom: 1, displayFrom: 1,
...@@ -457,6 +440,39 @@ ...@@ -457,6 +440,39 @@
this.initHotel() this.initHotel()
}, },
methods: { methods: {
getGroupData(){
this.orderMsg.GuestList = [];
this.searchObj.searchroomGroup.forEach((item, index) => {
var guestInfoList = [];
let allprople = Number(item.numberOfAdults) + Number(item.numberOfChildren)
for (let i = 0; i <= Number(item.numberOfAdults)-1; i++) {
let obj = {
IsAdult: 1,
LastName: "",
FirstName: "",
Age: ""
};
guestInfoList.push(obj);
}
for (let i = 0; i <= Number(item.numberOfChildren)-1; i++) {
let obj = {
IsAdult: 0,
LastName: "",
FirstName: "",
Age: item.ChildAgeTexts[i]
};
guestInfoList.push(obj);
}
var obj = {
RoomNum: index + 1,
numberOfAdults: item.numberOfAdults,
numberOfChildren: item.numberOfChildren,
ChildAgeDetails: item.ChildAgeDetails != '' ? item.ChildAgeDetails : 1,
GuestInfo: guestInfoList
};
this.orderMsg.GuestList.push(obj);
});
},
getWeek(date) { getWeek(date) {
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六"); var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
var week = weekArray[new Date(date).getDay()]; //注意此处必须是先new一个Date var week = weekArray[new Date(date).getDay()]; //注意此处必须是先new一个Date
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<view class="media" :style="{ opacity: 100 - boxOption + '%' }"> <view class="media" :style="{ opacity: 100 - boxOption + '%' }">
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view @click="goback" :style="[titleStyle, { opacity: '100% !important' }]" <!-- <view @click="goback" :style="[titleStyle, { opacity: '100% !important' }]"
style="position: fixed; top: 0; left: 0; padding-left: 6rpx"> style="position: fixed; top: 0; left: 0; padding-left: 6rpx">
<u-icon name="arrow-left" size="44" style="margin-top: 22rpx"></u-icon> <u-icon name="arrow-left" size="44" style="margin-top: 22rpx"></u-icon>
</view> </view> -->
<!-- #endif --> <!-- #endif -->
<view class="orderStatusBox flex" style="margin-bottom: 30rpx"> <view class="orderStatusBox flex" style="margin-bottom: 30rpx">
<u-icon customPrefix="iconfont" name="icondaizhifu-" size="52" color="#DFBE6E" <u-icon customPrefix="iconfont" name="icondaizhifu-" size="52" color="#DFBE6E"
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="hotel-title" :style="[titleStyle]"> <view class="hotel-title" :style="[titleStyle]" v-if="false">
<view @click="goback"> <view @click="goback">
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<u-icon name="arrow-left" size="44"></u-icon> <u-icon name="arrow-left" size="44"></u-icon>
...@@ -141,6 +141,14 @@ ...@@ -141,6 +141,14 @@
<view class="ResInforL Lwidth">E-mail</view> <view class="ResInforL Lwidth">E-mail</view>
<view class="ResInforR">{{ orderData.parmResultRoomInfo.guestEmail }}</view> <view class="ResInforR">{{ orderData.parmResultRoomInfo.guestEmail }}</view>
</view> </view>
<view class="ResInforText row-sb-n">
<view class="ResInforL Lwidth">备注</view>
<view class="ResInforR">
<view style="width: 100%;overflow: hidden;">
{{ orderData.model.Remark }}
</view>
</view>
</view>
</view> </view>
<!-- <cancelProgress :datas="orderData"></cancelProgress> --> <!-- <cancelProgress :datas="orderData"></cancelProgress> -->
<view class="ReservationInforBox"> <view class="ReservationInforBox">
...@@ -192,7 +200,7 @@ ...@@ -192,7 +200,7 @@
</view> </view>
</view> </view>
<view style="height: 36rpx;"></view> <view style="height: 1rpx;"></view>
</scroll-view> </scroll-view>
<view class="jz_orderbox flex" v-if="showPayBtn"> <view class="jz_orderbox flex" v-if="showPayBtn">
...@@ -1034,7 +1042,7 @@ ...@@ -1034,7 +1042,7 @@
} }
.orderStatusBox { .orderStatusBox {
padding: 200rpx 31rpx 13rpx 31rpx; padding: 40rpx 31rpx 13rpx 31rpx;
} }
.orderIforRzBox { .orderIforRzBox {
......
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