Commit 1443c16f authored by youjie's avatar youjie

床型筛选

parent b5b8183b
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
</view> </view>
</view> </view>
</view> </view>
<view v-show="getQueryData.length>0"> <view>
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#B99846" <u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#B99846"
inactive-color="#080A09" title-size="28"> inactive-color="#080A09" title-size="28">
<u-dropdown-item :title="optionsTitle[0]" :options="options1"> <u-dropdown-item :title="optionsTitle[0]" :options="options1">
...@@ -165,6 +165,23 @@ ...@@ -165,6 +165,23 @@
</view> </view>
</scroll-view> </scroll-view>
</u-dropdown-item> </u-dropdown-item>
<u-dropdown-item :title="optionsTitle[2]" :options="options1">
<scroll-view :scroll-y="true" class="hotelScroll" style="height: 200px;">
<view class="slot-content hotelComprehensiveBox column"
style="background-color: #FCFCFC">
<view class="hotelComprehensiv row items-center"
v-for="(item,index) in qBedTypeList" :key="index"
:class="[qMsg.BedTypeName==item.BedTypeName?'active':'']"
@click="changeType(item,2)">
<text>{{ item.BedTypeName?item.BedTypeName:'-' }}</text>
<view v-if="qMsg.BedTypeName==item.BedTypeName">
<img
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638760948784111958.png" />
</view>
</view>
</view>
</scroll-view>
</u-dropdown-item>
<u-dropdown-item :title="optionsTitle[1]" :options="options1"> <u-dropdown-item :title="optionsTitle[1]" :options="options1">
<scroll-view :scroll-y="true" class="hotelScroll" style="height: 200px;"> <scroll-view :scroll-y="true" class="hotelScroll" style="height: 200px;">
<view class="slot-content hotelComprehensiveBox column" <view class="slot-content hotelComprehensiveBox column"
...@@ -183,7 +200,7 @@ ...@@ -183,7 +200,7 @@
</scroll-view> </scroll-view>
</u-dropdown-item> </u-dropdown-item>
</u-dropdown> </u-dropdown>
<hotelRoom :dataList="dataList" :rooms="getQueryData" :roomMsg="roomMsg" :search="searchObj" <hotelRoom v-show="getQueryData.length>0" :dataList="dataList" :rooms="getQueryData" :roomMsg="roomMsg" :search="searchObj"
:day="dayObj" :qRoomType="qRoomTypeList" :qMealType="qMealTypeList"></hotelRoom> :day="dayObj" :qRoomType="qRoomTypeList" :qMealType="qMealTypeList"></hotelRoom>
</view> </view>
<u-empty v-show="getQueryData.length==0&&!loading" text="暂无空房间" mode="data" padding-top="5"></u-empty> <u-empty v-show="getQueryData.length==0&&!loading" text="暂无空房间" mode="data" padding-top="5"></u-empty>
...@@ -321,7 +338,7 @@ ...@@ -321,7 +338,7 @@
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638762717498946531.png', 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638762717498946531.png',
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638762717498917358.png' 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638762717498917358.png'
], ],
optionsTitle: ["房型", "餐"], optionsTitle: ["房型", "餐型","床型"],
hotelFacilities: [{ hotelFacilities: [{
Name: '酒店信息', Name: '酒店信息',
ID: 1, ID: 1,
...@@ -349,14 +366,14 @@ ...@@ -349,14 +366,14 @@
loading: false, loading: false,
DidaHotelRoomDetails: {}, DidaHotelRoomDetails: {},
qRoomTypeList: [], qRoomTypeList: [],
qMealTypeList: [{ qMealTypeList: [],
ID: '', qBedTypeList: [],
MTypeName: "全部"
}],
HotelMealTypes: [], HotelMealTypes: [],
qMsg: { qMsg: {
RoomTypeName: "", //房型筛选 RoomTypeName: "", //房型筛选
MTypeName: "", //早餐筛选 MTypeName: "", //早餐筛选
BedTypeName: "",//床型筛选
BedType: "",
}, },
U: {}, U: {},
b2bUser: {}, b2bUser: {},
...@@ -381,10 +398,37 @@ ...@@ -381,10 +398,37 @@
} }
arrList(_this.DidaHotelRoomDetails.HotelList) arrList(_this.DidaHotelRoomDetails.HotelList)
tempData = JSON.parse(JSON.stringify(_this.DidaHotelRoomDetails.HotelList)); tempData = JSON.parse(JSON.stringify(_this.DidaHotelRoomDetails.HotelList));
console.log(_this.qMsg.RoomTypeName,'-------',_this.qMsg.BedType,'--',_this.qMsg.MTypeName)
if (_this.qMsg.RoomTypeName && _this.qMsg.RoomTypeName != '') { if (_this.qMsg.RoomTypeName && _this.qMsg.RoomTypeName != '') {
tempData = tempData.filter(qitem => qitem.RoomName_CN == _this.qMsg.RoomTypeName); tempData = tempData.filter(qitem => qitem.RoomName_CN == _this.qMsg.RoomTypeName);
} }
if (_this.qMsg.MTypeName && _this.qMsg.MTypeName.MTypeName != '') { if (_this.qMsg.BedTypeName && _this.qMsg.BedTypeName != '') {
var newDataArray = [];
tempData.forEach(qitem => {
var tempRetePlanList = [];
if (qitem.RatePlanList && qitem.RatePlanList.length > 0) {
qitem.RatePlanList.forEach(pItem => {
if (pItem.PriceList && pItem.PriceList.length > 0) {
pItem.PriceList.forEach(mItem => {
var tempObj = _this.qBedTypeList.find(
mItem => mItem.BedType == _this
.qMsg.BedType);
if (mItem.MealAmount &&
pItem.BedType == tempObj.BedType) {
tempRetePlanList.push(pItem)
}
})
}
})
}
qitem.RatePlanList = tempRetePlanList;
if (tempRetePlanList && tempRetePlanList.length > 0) {
newDataArray.push(qitem);
}
})
tempData = newDataArray;
}
if (_this.qMsg.MTypeName && _this.qMsg.MTypeName != '') {
var newDataArray = []; var newDataArray = [];
tempData.forEach(qitem => { tempData.forEach(qitem => {
var tempRetePlanList = []; var tempRetePlanList = [];
...@@ -528,12 +572,16 @@ ...@@ -528,12 +572,16 @@
this.$refs.uDropdown.highlight(index); this.$refs.uDropdown.highlight(index);
}, },
changeType(item, type) { changeType(item, type) {
if (type) { if (type==1) {
this.optionsTitle[0] = item.RoomName_CN != '全部' ? item.RoomName_CN : '房型' this.optionsTitle[0] = item.RoomName_CN != '房型(全部)' ? item.RoomName_CN : '房型'
this.qMsg.RoomTypeName = item.RoomName_CN != '全部' ? item.RoomName_CN : ''; this.qMsg.RoomTypeName = item.RoomName_CN != '房型(全部)' ? item.RoomName_CN : '';
}else if(type==2){
this.optionsTitle[2] = item.BedTypeName != '床型(全部)' ? item.BedTypeName : '床型'
this.qMsg.BedTypeName = item.BedTypeName != '床型(全部)' ? item.BedTypeName : '';
this.qMsg.BedType = item.BedType
} else { } else {
this.optionsTitle[1] = item.MTypeName != '全部' ? item.MTypeName : '餐食' this.optionsTitle[1] = item.MTypeName != '餐型(全部)' ? item.MTypeName : '餐型'
this.qMsg.MTypeName = item.MTypeName != '全部' ? item.MTypeName : ''; this.qMsg.MTypeName = item.MTypeName != '餐型(全部)' ? item.MTypeName : '';
} }
this.$refs.uDropdown.close(); this.$refs.uDropdown.close();
}, },
...@@ -568,6 +616,13 @@ ...@@ -568,6 +616,13 @@
RoomName_CN: '房型(全部)' RoomName_CN: '房型(全部)'
}) })
} }
this.qBedTypeList = tempData.qBedTypeList;
if (this.qBedTypeList && this.qBedTypeList.length > 0) {
this.qBedTypeList.unshift({
BedType: 0,
BedTypeName: '床型(全部)'
})
}
this.qMealTypeList = tempData.qMealTypeList; this.qMealTypeList = tempData.qMealTypeList;
if (this.qMealTypeList && this.qMealTypeList.length > 0) { if (this.qMealTypeList && this.qMealTypeList.length > 0) {
this.qMealTypeList.unshift({ this.qMealTypeList.unshift({
......
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