Commit fe087a81 authored by 黄奎's avatar 黄奎

1

parent 72f01d92
......@@ -34,6 +34,11 @@ static async GetHotelRoomsList(param:any): Promise<HttpResponse> {
static async GetHotelDetails(param:any): Promise<HttpResponse> {
return request('dmc_post_GetDidaHotelDetails', param)
}
//道旅酒店下单确认
static async GetDiDaPriceConfirm(param:any): Promise<HttpResponse> {
return request('dmc_post_GetDiDaPriceConfirm', param)
}
// 道旅酒店列表
static async GetDidaHotelList(param: any): Promise<HttpResponse> {
param.reviewRatingUpperLimits = param.reviewRatingUpperLimits && param.reviewRatingUpperLimits != '' ? param.reviewRatingUpperLimits : 0
......
......@@ -6,6 +6,35 @@
<q-date v-model="dateRange" :options="optionsFn" range mask="YYYY/MM/DD" landscape @range-end="dateRangeHandler"></q-date>
</q-popup-proxy>
</q-field>
<!-- <div class="row" :class="{'q-mt-sm':$q.platform.is.mobile}">
<q-select :class="{'q-ml-lg':$q.platform.is.desktop}" style="min-width: 90px;z-index: 99999;"
v-model="search.BedTypeID"
dense
:options="HotelRoomTypes"
emit-value
option-label="Name_CN"
option-value="ID"
clearable
map-options
:label="$t('v101.scattered.fangxingtype')"
standout
/>
</div>
<div class="row" :class="{'q-mt-sm':$q.platform.is.mobile}">
<q-select :class="{'q-ml-lg':$q.platform.is.desktop}" style="min-width: 90px;z-index: 99999;"
v-model="search.BreakfastTypeID"
dense
:options="HotelMealTypes"
emit-value
option-label="Name_CN"
option-value="ID"
clearable
map-options
:label="$t('v101.scattered.canxingtype')"
standout
/>
</div> -->
<div class="row" :class="{'q-mt-sm':$q.platform.is.mobile}">
<q-select :class="{'q-ml-lg':$q.platform.is.desktop}" style="min-width: 90px;z-index: 99999;" unelevated v-model="room" dense :options="theRooms" emit-value option-label="name" option-value="id" map-options :label="$t('v101.scattered.kefang')" standout @update:model-value="getRoomList">
</q-select>
......@@ -56,49 +85,49 @@
<div class="text-right text-green q-pt-md">
{{getRoomType(item.BedType)}}
</div>
<div class="row no-wrap justify-end q-pt-md text-right">
<span class="text-blue text-right q-pt-md" style="white-space: nowrap;">
<span>库存:{{item.InventoryCount}}</span>
</span>
</div>
</div>
</div>
<div class="col" :style="{'border-left': $q.platform.is.mobile?'1px solid #eeeeee':''}">
<div class="relative-position" v-if="item.RatePlanList&&item.RatePlanList.length>0" v-for="(subItem,subIndex) in item.RatePlanList" :key="subIndex" v-show="subIndex<(isShow===index ? item.RatePlanList.length:3)" >
<q-separator v-if="subIndex!=0"/>
<div class="col q-ml-lg q-pt-lg q-pb-md q-pr-md" >
<div class="col q-pt-sm" :class="{'row items-center no-wrap': $q.platform.is.desktop,'common': $q.platform.is.mobile}">
<div class="absolute text-white q-px-lg" style="left: 25%;top: 0;border-bottom-right-radius: 10px;"
:class="item.BreakfastType==2?'HD_Black':'HD_Green'">{{item.BreakfastType==1?"不含早":"含早"}}</div>
<div class="absolute text-white q-px-lg" style="left: 0%;top: 0;border-bottom-right-radius: 10px;"
:class="subItem.BreakfastType==2?'HD_Black':'HD_Green'">{{subItem.BreakfastType==1?"不含早":"含早"}}</div>
<div class="col-3" :class="{'q-pl-lg':$q.platform.is.desktop}" v-if="$q.platform.is.desktop">{{item.RatePlanName}}</div>
<div class="col-3" :class="{'q-pl-lg':$q.platform.is.desktop}" v-if="$q.platform.is.desktop">{{subItem.RatePlanName}}</div>
<div class="col-2 text-grey-6" v-if="item.PriceList&&item.PriceList!=null">
<q-card class="row q-mb-md" style="box-shadow:none;" v-for="(itemPrice,indexPrice) in item.PriceList" :key="indexPrice" v-loading="loading">
<div class="col-2 text-grey-6" v-if="subItem.PriceList&&subItem.PriceList!=null">
<q-card class="row q-mb-md" style="box-shadow:none;" v-for="(itemPrice,indexPrice) in subItem.PriceList" :key="indexPrice" v-loading="loading">
<div class="text-right text-green q-pt-md">
{{getformatDateStr(itemPrice.StayDate)}} 报价:{{itemPrice.Price}}</div>
</q-card>
</div>
<div v-if="item.RatePlanCancellationPolicyList&&item.RatePlanCancellationPolicyList!=null">
<q-card class="row q-mb-md " style="box-shadow:none;" v-for="(itemCancella,index1) in item.RatePlanCancellationPolicyList" :key="index1" v-loading="loading">
<div v-if="subItem.RatePlanCancellationPolicyList&&subItem.RatePlanCancellationPolicyList!=null">
<q-card class="row q-mb-md " style="box-shadow:none;" v-for="(itemCancella,index1) in subItem.RatePlanCancellationPolicyList" :key="index1" v-loading="loading">
<div class="column q-pl-md q-pr-md">
<span class="text-right text-grey-6 q-pt-md">{{getformatDateStr(itemCancella.FromDate)}}起取消({{item.Currency}}):-{{itemCancella.Amount}}</span>
<span class="text-right text-grey-6 q-pt-md">{{getformatDateStr(itemCancella.FromDate)}}起取消({{subItem.Currency}}):-{{itemCancella.Amount}}</span>
<span></span>
</div>
</q-card>
</div>
<div class="row no-wrap justify-end items-center " :class="{'q-pl-lg':$q.platform.is.desktop}">
<div class="row no-wrap items-center q-pr-lg ">
<span class="text-grey-6">{{item.Currency}}</span>
<span class="fz20 text-red q-px-sm" >{{getPrice(item.TotalPrice)}}</span>
<span class="text-grey-6">{{subItem.Currency}}</span>
<span class="fz20 text-red q-px-sm" >{{getPrice(subItem.TotalPrice)}}</span>
</div>
<div class="q-pt-xs" style="position:absolute; right:3%;">
<q-btn class="bg-green-6 hover q-px-md q-py-xs q-ml-xs text-white" @click="goUrl('/scattered/HotelSure',subItem)" :label="$t('v101.scatteredDetails.yuyue')"/>
<q-btn class="bg-green-6 hover q-px-md q-py-xs q-ml-xs text-white" @click="goUrl('/scattered/didaHotelSure',subItem)" :label="$t('v101.scatteredDetails.yuyue')"/>
</div>
</div>
</div>
<div class="q-pt-sm">
<span class="text-green fz12 q-px-sm" style="border:1px solid green">库存:{{subItem.InventoryCount}}</span>
</div>
</div>
</div>
<div class="order-show" @click="showMore(index)" v-if="SimilarList[index].RatePlanList.length>3">
<span class="oder-show-content icon-gengduo">{{isShow===index ? "点击收起" : "点击显示更多"}}</span>
</div>
</div>
</q-card>
......@@ -135,6 +164,7 @@ import { HotelArea, useHotel } from "../../../utils/hotelRate";
const qNameProxy = ref(null) as any
const { locale, t } = useI18n()
const data = reactive({
isShow:'',
scrollStyle: {} as any,
Areas: [] as Array<HotelArea>,//区域
cascader: {
......@@ -152,10 +182,10 @@ import { HotelArea, useHotel } from "../../../utils/hotelRate";
childrenList: [] as Array<Number>,//儿童下拉
isShowPop: false,//房间
SimilarList: [] as Array<any>,
AllSimilarList: [] as Array<any>,
RoomTypeList: [] as Array<HotelArea>,//房间等级
HotelRoomTypes: [] as Array<HotelArea>,//散客房间类型
ScatMeaList: [] as Array<HotelArea>//散客房间餐型
ScatMeaList: [] as Array<HotelArea>,//散客房间餐型
HotelMealTypes: [] as Array<HotelRate>, //餐型
})
for(let i=1;i<11;i++){
data.theRooms.push(i)
......@@ -190,7 +220,8 @@ import { HotelArea, useHotel } from "../../../utils/hotelRate";
data.ScatMeaList = useHotel.getHotelScatMeal()
const methods = {
goUrl(url:stringify,row: {}){
url = `${url}/${search.hotelId}/${row.roomOptionCd}`
console.log("row", row);
url = `${url}/${search.hotelId}/${row.RatePlanID}`
let d = {
room: data.room,
auditNum: data.auditNum,
......@@ -200,6 +231,13 @@ import { HotelArea, useHotel } from "../../../utils/hotelRate";
// window.open(url, '_blank')
// $router.push({ path:url })
},
showMore(index){
if (data.isShow===index){
data.isShow=''
}else{
data.isShow= index;
}
},
getPrice(price){
return Math.ceil(price )
},
......@@ -211,7 +249,15 @@ import { HotelArea, useHotel } from "../../../utils/hotelRate";
let date = (dt.getDate()+1).toString().padStart(2,'0');
return year+"-"+month+"-"+date;
},
setData() {
localStorage.removeItem(DirtionmaryHelper.SCATTERED_DiDaHOTEL_DATE);
let d = {
CheckInDate: search.CheckInDate,
CheckOutDate: search.CheckOutDate,
};
// 先不缓存
localStorage.setItem(DirtionmaryHelper.SCATTERED_DiDaHOTEL_DATE, JSON.stringify(d));
},
//获取房型
getRoomType(roomtypeId) {
let roomtypeName = "";
......@@ -224,7 +270,7 @@ import { HotelArea, useHotel } from "../../../utils/hotelRate";
}
return roomtypeName;
},
//获取道旅型列表
//获取道旅床类型列表
getdidaBedType() {
DidaService.GetDidaBedType({}).then((res) => {
console.log("getdidaBedType", res);
......@@ -233,24 +279,31 @@ import { HotelArea, useHotel } from "../../../utils/hotelRate";
}
});
},
//获取道旅餐食类型
getdidaMealType() {
DidaService.GetDidaMealType({}).then((res) => {
console.log("getdidaMealType", res);
if (res.data.resultCode == 1) {
data.HotelMealTypes = res.data.data;
}
});
},
initHotel() {
data.loading = true
let param = Object.assign(search)
DidaService.GetHotelRoomsList(param)
.then(r => {
data.SimilarList = [] as Array<any>
data.AllSimilarList = [] as Array<any>
console.log("道旅酒店详情",r.data.data.HotelList);
context.emit('getPriceDetails',r.data.data.HotelList[0].LowestPrice)
if (r.data.resultCode == ApiResult.SUCCESS) {
if (
Object.prototype.toString.call(r.data.data.HotelList[0].RatePlanList) ==
Object.prototype.toString.call(r.data.data.HotelList[0].GroupRatePlanList) ==
"[object Object]"
) {
data.SimilarList.push(r.data.data.HotelList[0].RatePlanList);
data.SimilarList.push(r.data.data.HotelList[0].GroupRatePlanList);
} else {
data.SimilarList = r.data.data.HotelList[0].RatePlanList;
data.SimilarList = r.data.data.HotelList[0].GroupRatePlanList;
}
console.log(" 道旅data.SimilarList", data.SimilarList);
}
......@@ -317,9 +370,14 @@ import { HotelArea, useHotel } from "../../../utils/hotelRate";
return cd >= date.formatDate(date.addToDate(new Date(), { days: 8 }), 'YYYY/MM/DD')
},
}
watch(search, (n, o) => {
methods.setData()
})
onMounted(()=>{
methods.getdidaBedType();
methods.initHotel()
methods.getdidaMealType();
methods.initHotel();
methods.setData();
})
return {
...toRefs(data),
......@@ -344,5 +402,14 @@ import { HotelArea, useHotel } from "../../../utils/hotelRate";
.HD_Green{
background-color: green;
}
/* 显示隐藏 */
.order-show {
width: 40%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
color: #f6665d;
}
</style>
\ No newline at end of file
......@@ -55,6 +55,10 @@ const routes: RouteRecordRaw[] = [{
path: '/scattered/HotelSure/:hotelId/:roomOptionCd',
component: () => import('pages/scattered/HotelSure.vue')
},
{
path: '/scattered/didaHotelSure/:hotelId/:ratePlanID',
component: () => import('pages/scattered/didaHotelSure.vue')
},
{
path: '/scattered/HotelOrder',
component: () => import('pages/scattered/HotelOrder.vue')
......
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