Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengke
jz_Travel
Commits
556e6e34
Commit
556e6e34
authored
Apr 01, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
酒店
parent
ecdaa904
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1232 additions
and
754 deletions
+1232
-754
hotel-good.vue
pages/hotel/components/hotel-good.vue
+13
-2
hotelFacilities.vue
pages/hotel/components/hotelFacilities.vue
+2
-1
hotelRoom.vue
pages/hotel/components/hotelRoom.vue
+265
-208
search.vue
pages/hotel/components/search.vue
+10
-0
date.vue
pages/hotel/components/time/date.vue
+84
-33
index.vue
pages/hotel/components/time/index.vue
+1
-4
detail.vue
pages/hotel/detail.vue
+273
-18
list.vue
pages/hotel/list.vue
+19
-10
mapList.vue
pages/hotel/mapList.vue
+10
-2
order.vue
pages/hotel/order.vue
+452
-178
orderInfor.vue
pages/hotel/orderInfor.vue
+102
-298
paysuccess.vue
pages/jiuzhai/paysuccess.vue
+1
-0
No files found.
pages/hotel/components/hotel-good.vue
View file @
556e6e34
...
...
@@ -64,15 +64,26 @@
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/hotel4stars.png'
,
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/hotel5stars.png'
,
],
myDayObj
:
null
,
}
},
created
()
{
// console.log(this.HotelList, 'hotel');
},
watch
:{
dayObj
:
{
handler
(
val
,
oldval
)
{
if
(
val
){
this
.
myDayObj
=
val
}
},
deep
:
true
,
immediate
:
true
}
},
methods
:{
goHotelDetail
(
id
){
console
.
log
(
this
.
dayObj
,
'id'
);
let
myDayObj
=
JSON
.
stringify
(
this
.
dayObj
);
let
myDayObj
=
JSON
.
stringify
(
this
.
myDayObj
);
uni
.
navigateTo
({
url
:
"/pages/hotel/detail?id="
+
id
+
'&dayObj='
+
myDayObj
+
'&searchObj='
+
JSON
.
stringify
(
this
.
searchObj
)
});
...
...
pages/hotel/components/hotelFacilities.vue
View file @
556e6e34
...
...
@@ -107,7 +107,8 @@
</text>
</li>
</ul> -->
<view
class=
"big-titleAssis2"
>
客房信息
<view
class=
"big-titleAssis2"
>
<!-- 客房信息 -->
<view
class=
"hotelSheShitisp"
>
酒店全部客房设施信息仅供参考,可能与您入住的房型略有差异,请知晓
</view>
</view>
</view>
...
...
pages/hotel/components/hotelRoom.vue
View file @
556e6e34
<
template
>
<view>
<u-dropdown
ref=
"uDropdown"
@
open=
"open"
@
close=
"close"
active-color=
"#B99846"
inactive-color=
"#080A09"
title-size=
"28"
>
<u-dropdown-item
v-model=
"parameters.OrderByType"
:title=
"optionsTitle[0]"
:options=
"options1"
>
<view
class=
"slot-content hotelComprehensiveBox column"
style=
"background-color: #FCFCFC"
>
<view
class=
"hotelComprehensiv row items-center"
v-for=
"(item,index) in threeLevelList"
:key=
"index"
:class=
"[item.isCheck==1?'active':'']"
@
click=
"changeRoomType(item)"
>
<text>
{{
item
.
name
}}
</text>
<view
v-if=
"item.isCheck==1"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638760948784111958.png"
/>
</view>
</view>
</view>
</u-dropdown-item>
<u-dropdown-item
v-model=
"parameters.OrderByType"
:title=
"optionsTitle[1]"
:options=
"options1"
>
<view
class=
"slot-content hotelComprehensiveBox column"
style=
"background-color: #FCFCFC"
>
<view
class=
"hotelComprehensiv row items-center"
v-for=
"(item,index) in threeLevelList"
:key=
"index"
:class=
"[item.isCheck==1?'active':'']"
@
click=
"changeRoomType(item)"
>
<text>
{{
item
.
name
}}
</text>
<view
v-if=
"item.isCheck==1"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638760948784111958.png"
/>
</view>
</view>
</view>
</u-dropdown-item>
<u-dropdown-item
v-model=
"parameters.OrderByType"
:title=
"optionsTitle[2]"
:options=
"options1"
>
<view
class=
"slot-content hotelComprehensiveBox column"
style=
"background-color: #FCFCFC"
>
<view
class=
"hotelComprehensiv row items-center"
v-for=
"(item,index) in threeLevelList"
:key=
"index"
:class=
"[item.isCheck==1?'active':'']"
@
click=
"changeRoomType(item)"
>
<text>
{{
item
.
name
}}
</text>
<view
v-if=
"item.isCheck==1"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638760948784111958.png"
/>
</view>
</view>
</view>
</u-dropdown-item>
</u-dropdown>
<view
style=
"padding: 0 31rpx;"
>
<view
class=
"hotelDetailBox activeTag"
v-for=
"(item,index) in RoomList"
:key=
"index"
>
<view
class=
"hotelDetailTag"
>
热门房型
</view>
<view
class=
"hotelDetail row"
>
<template
v-for=
"(subItem,subindex) in item.RatePlanList"
>
<view
class=
"hotelDetail row"
v-if=
"!subindex"
>
<view
class=
"hotelDetailL"
@
click=
"openPicture(item.images)"
>
<image
mode=
"heightFix"
:src=
"item.Path"
/>
<view
class=
"hotelDetailLImgs"
v-if=
"item.images.length>1"
>
<view
class=
"hotelDetailLImgs"
v-if=
"item.images&&item.images.length>1"
>
{{
item
.
images
.
length
}}
</view>
</view>
<view
class=
"hotelDetailR column"
>
<view
class=
"hotelDetailRTitle row items-center"
>
<view>
{{
item
.
roomName
}}
<!--
{{
getRoomType
(
subItem
.
BedType
)
}}
-->
</view>
<!--
<img
:src=
"openImg[0]"
/>
-->
</view>
<view
class=
"hotelDetailRRoom"
>
<!--
Deluxe Double Room(2 beds)-->
{{
subItem
.
RoomName_CN
}}
</view>
<!--
<view
class=
"hotelDetailRCheckin"
>
{{
item
.
maxOccupancy
}}
人入住
{{
item
.
size
}}
㎡
{{
item
.
floor
}}
楼
</view>
-->
<view
class=
"hotelDetailREat"
>
不含早餐
<text>
入住当天18:00前可免费取消
</text>
{{
getMealtype
(
subItem
.
PriceList
[
0
].
MealType
)
}}
{{
subItem
.
PriceList
[
0
].
MealAmount
>
0
?(
'×'
+
subItem
.
PriceList
[
0
].
MealAmount
+
'份'
):
''
}}
<template
v-if=
"subItem.RatePlanCancellationPolicyList && subItem.RatePlanCancellationPolicyList != null"
>
<!--
<text
v-for=
"( itemCancella, index1 ) in subItem.RatePlanCancellationPolicyList"
:key=
"index1"
>
<text
v-if=
"index1==0"
>
{{
getformatDateStr
(
itemCancella
.
FromDate
)
}}
之前免费取消;
</text>
<text
v-if=
"itemCancella.Amount==subItem.TotalPrice"
>
<text>
{{
getformatDateStr
(
itemCancella
.
FromDate
)
}}
起不可取消,取消将收取订单全额费用;
</text>
</text>
<text
v-else
>
<text>
{{
getformatDateStr
(
itemCancella
.
FromDate
)
}}
<text
v-if=
"index1!=(subItem.RatePlanCancellationPolicyList.length-1)"
>
-
{{
getformatDateStr
(
subItem
.
RatePlanCancellationPolicyList
[
index1
+
1
].
FromDate
)
}}
之间
</text>
取消,收费
{{
subItem
.
Currency
}}{{
getPrice
(
itemCancella
.
Amount
)
}}
;
</text>
</text>
</text>
-->
<text
v-if=
"getIsCancella(subItem.RatePlanCancellationPolicyList,subItem.TotalPrice)==1"
>
限时取消
</text>
<text
v-else
>
付费取消
</text>
</
template
>
<text
v-else
>
不可退改
</text>
</view>
<view
class=
"hotelDetailRConfirmTag
"
>
<view
class=
"hotelDetailRConfirmTag"
style=
"height: 1px;flex: 1;
"
>
<text>
立即确认
</text>
</view>
<view
class=
"hotelDetailRPriceBox row"
>
...
...
@@ -103,28 +68,42 @@
<view
class=
"row"
>
<view
class=
"column"
>
<view
class=
"hotelDetailRPrice"
>
CNY
<text>
399
</text>
起/晚
{{subItem.Currency }}
<text>
{{getPrice(subItem.TotalPrice)}}
</text>
起/晚
</view>
<view
class=
"hotelDetailRPriceT"
>
2晚总价
<text>
¥1258
</text></view>
<view
class=
"hotelDetailRPriceT"
>
{{dayObj.day}}晚总价
<text>
{{subItem.Currency}}{{ getPrice(subItem.TotalPrice)*dayObj.day }}
</text></view>
</view>
<view
class=
"hotelDetailRPriceBook
"
>
<view
class=
"hotelDetailRPriceBook"
@
click=
"goUrl(subItem)
"
>
订
</view>
</view>
</view>
</view>
</view>
<view
class=
"hotelDetailMXBox"
>
<view
class=
"hotelDetailMXB"
>
查看2个价格详细
</template>
<view
class=
"hotelDetailMXBox"
v-if=
"item.RatePlanList.length>1"
>
<view
class=
"hotelDetailMXB"
@
click=
"clickShow(item)"
>
查看{{item.RatePlanList.length-1}}个价格详细
<u-icon
class=
"hotelDetailDown"
name=
"arrow-down"
></u-icon>
</view>
<view
class=
"hotelDetailMinXiBox"
>
<view
class=
"hotelDetailMinXi"
>
<view
class=
"hotelDetailMinXiTitle"
>
无早餐
</view>
<view
class=
"hotelDetailMinXiBox"
v-if=
"item.show"
>
<
template
v-for=
"(subItem,subindex) in item.RatePlanList"
>
<view
class=
"hotelDetailMinXi"
v-if=
"subindex"
>
<view
class=
"hotelDetailMinXiTitle"
:class=
"[getMealtype(subItem.PriceList[0].MealType)=='含早餐'?'active':'']"
>
{{
getMealtype
(
subItem
.
PriceList
[
0
].
MealType
)
}}
{{
subItem
.
PriceList
[
0
].
MealAmount
>
0
?(
'×'
+
subItem
.
PriceList
[
0
].
MealAmount
+
'份'
):
''
}}
</view>
<view
class=
"row"
>
<view
class=
"hotelDetailMinXiL"
>
<view
class=
"hotelDetailMinXiLT"
>
入住当天18:00前可免费取消
</view>
<view
class=
"hotelDetailMinXiLT"
>
<template
v-if=
"subItem.RatePlanCancellationPolicyList && subItem.RatePlanCancellationPolicyList != null"
>
<text
v-if=
"getIsCancella(subItem.RatePlanCancellationPolicyList,subItem.TotalPrice)==1"
>
限时取消
</text>
<text
v-else
>
付费取消
</text>
</
template
>
<text
v-else
>
不可退改
</text>
</view>
<view
class=
"hotelDetailMinXiLC"
>
<text>
立即确认
</text>
</view>
...
...
@@ -133,19 +112,22 @@
<view
class=
"column"
>
<view
class=
"hotelDetailMinXiRF"
>
</view>
<view
class=
"hotelDetailMinXiRP"
>
CNY
<text>
399
</text>
{{subItem.Currency }}
<text>
{{getPrice(subItem.TotalPrice)}}
</text>
</view>
<view
class=
"hotelDetailMinXiRT"
>
2晚总价
<text>
¥1258
</text></view>
<view
class=
"hotelDetailMinXiRT"
>
{{dayObj.day}}晚总价
<text>
{{subItem.Currency}} {{ getPrice(subItem.TotalPrice)*dayObj.day }}
</text></view>
</view>
<view
class=
"column hotelDetailMinXiRBBox"
>
<text
class=
"hotelDetailMinXiRS"
>
剩2间
</text>
<view
class=
"hotelDetailMinXiRB
"
>
<view
class=
"hotelDetailMinXiRB"
@
click=
"goUrl(subItem)
"
>
订
</view>
</view>
</view>
</view>
</view>
</template>
</view>
</view>
...
...
@@ -156,118 +138,186 @@
<
script
>
export
default
{
props
:
[
'
dataList'
,
'search'
,
'rooms
'
],
props
:
[
'
roomMsg'
,
'dataList'
,
'search'
,
'rooms'
,
'day'
,
'qRoomType'
,
'qMealType
'
],
components
:
{},
data
()
{
return
{
optionsTitle
:
[
"房型"
,
"床型"
,
"餐食"
],
searchObj
:{},
threeLevelList
:
[
{
name
:
"单人床"
,
id
:
1
,
isCheck
:
0
,
RoomList
:
[],
parameters
:
{},
dayObj
:
{},
HotelInfo
:{},
HotelMealTypes
:
[],
HotelRoomTypes
:
[],
hotelMsg
:
{
hotelId
:
0
,
hotelImageSize
:
5
,
photoGalleryGetFlg
:
1
,
groupBookingFlg
:
1
,
},
{
name
:
"大床房"
,
id
:
2
,
isCheck
:
0
,
qRoomTypeList
:
[],
qMealTypeList
:
[],
};
},
{
name
:
"双床房"
,
id
:
3
,
isCheck
:
0
,
watch
:{
qRoomType
:
{
handler
(
val
,
oldval
)
{
if
(
val
){
this
.
qRoomTypeList
=
val
}
},
{
name
:
"含早餐"
,
id
:
4
,
isCheck
:
0
,
deep
:
true
,
},
{
name
:
"可取消"
,
id
:
5
,
isCheck
:
0
,
qMealType
:
{
handler
(
val
,
oldval
)
{
if
(
val
){
this
.
qMealTypeList
=
val
}
},
],
isShowAll
:
false
,
RoomList
:
[],
parameters
:
{},
};
deep
:
true
,
},
dataList
:
{
handler
(
val
,
oldval
)
{
if
(
val
){
this
.
HotelInfo
=
val
}
},
deep
:
true
,
},
watch
:{
rooms
:
{
handler
(
val
,
oldval
)
{
if
(
val
){
this
.
RoomList
=
val
console
.
log
(
this
.
RoomList
,
'rooms'
);
}
},
deep
:
true
,
},
search
:
{
handler
(
val
,
oldval
)
{
if
(
val
){
this
.
searchObj
=
val
}
},
deep
:
true
,
},
day
:
{
handler
(
val
,
oldval
)
{
if
(
val
){
this
.
dayObj
=
val
}
},
deep
:
true
,
},
roomMsg
:
{
handler
(
val
,
oldval
)
{
if
(
val
){
this
.
hotelMsg
.
hotelId
=
val
.
hotelid
this
.
getdidaMealType
()
this
.
getdidaBedType
()
}
},
deep
:
true
,
immediate
:
false
,
},
onLoad
(
options
)
{
},
created
()
{
this
.
searchObj
=
this
.
search
},
methods
:
{
openPicture
(
item
)
{
let
imgObj
=
JSON
.
stringify
(
item
);
uni
.
navigateTo
({
url
:
"/pages/hotel/picture?imgObj="
+
imgObj
,
});
clickShow
(
item
){
item
.
show
=
!
item
.
show
this
.
$forceUpdate
()
},
//点击过滤房间
changeRoomType
(
obj
)
{
if
(
obj
.
isCheck
==
0
)
{
obj
.
isCheck
=
1
;
//日期格式化
getIsCancella
(
RatePlanCancellationPolicyList
,
TotalPrice
)
{
let
IsCancel
=
0
;
//不可取消
let
date2
=
new
Date
();
//当前时间
RatePlanCancellationPolicyList
.
forEach
((
item
,
index
)
=>
{
var
dt
=
new
Date
(
item
.
FromDate
);
//取消时间
if
(
IsCancel
==
0
)
{
if
(
dt
>
date2
)
{
if
(
item
.
Amount
==
TotalPrice
)
{
IsCancel
=
1
;
}
else
{
obj
.
isCheck
=
0
;
IsCancel
=
2
;
}
this
.
RoomList
=
[];
let
num
=
0
;
this
.
threeLevelList
.
forEach
((
x
)
=>
{
if
(
x
.
isCheck
==
1
)
{
num
++
;
this
.
dataList
.
rooms
.
forEach
((
y
)
=>
{
if
(
x
.
id
==
1
&&
y
.
BedType
==
1
)
{
this
.
RoomList
.
push
(
y
);
}
else
{
if
(
item
.
Amount
!=
TotalPrice
)
{
IsCancel
=
2
;
}
if
(
x
.
id
==
2
&&
y
.
BedType
==
2
)
{
this
.
RoomList
.
push
(
y
);
}
if
(
x
.
id
==
3
&&
y
.
BedType
==
3
)
{
this
.
RoomList
.
push
(
y
);
}
if
(
x
.
id
==
4
&&
y
.
BreakfastType
!=
4
)
{
this
.
RoomList
.
push
(
y
);
});
return
IsCancel
;
},
getPrice
(
price
)
{
return
Math
.
ceil
(
price
);
},
//日期格式化
getformatDateStr
(
value
)
{
var
dt
=
new
Date
(
value
);
let
year
=
dt
.
getFullYear
();
let
month
=
(
dt
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
"0"
);
let
date
=
(
dt
.
getDate
()).
toString
().
padStart
(
2
,
"0"
);
let
hours
=
(
dt
.
getHours
()).
toString
().
padStart
(
2
,
"0"
);
let
minutes
=
(
dt
.
getMinutes
()).
toString
().
padStart
(
2
,
"0"
);
let
seconds
=
(
dt
.
getSeconds
()).
toString
().
padStart
(
2
,
"0"
);
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hours
+
":"
+
minutes
+
":"
+
seconds
;
},
//获取道旅床类型列表
getdidaBedType
()
{
this
.
apipost
(
'dmc_post_GetDidaBedTypeBaseInfo'
,
this
.
hotelMsg
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
HotelRoomTypes
=
res
.
data
;
}
if
(
x
.
id
==
5
&&
y
.
IsCancel
==
2
)
{
this
.
RoomList
.
push
(
y
);
},
null
)
},
//获取道旅餐食类型
getdidaMealType
()
{
this
.
apipost
(
'dmc_post_GetDidaMealType'
,
this
.
hotelMsg
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
HotelMealTypes
=
res
.
data
;
}
});
},
null
)
},
//获取房型
getRoomType
(
roomtypeId
)
{
let
roomtypeName
=
""
;
if
(
roomtypeId
>
0
)
{
this
.
HotelRoomTypes
.
forEach
((
item
)
=>
{
if
(
item
.
ID
==
roomtypeId
)
{
roomtypeName
=
item
.
Name_CN
;
}
});
if
(
num
==
this
.
threeLevelList
.
length
)
{
this
.
isShowAll
=
true
;
}
else
{
this
.
isShowAll
=
false
;
}
if
(
num
==
0
)
{
this
.
RoomList
=
this
.
dataList
.
rooms
;
return
roomtypeName
;
},
//获取餐型
getMealtype
(
mealtypeId
)
{
let
mealtypeName
=
""
;
if
(
mealtypeId
>
0
)
{
this
.
HotelMealTypes
.
forEach
((
item
)
=>
{
if
(
item
.
ID
==
mealtypeId
)
{
mealtypeName
=
item
.
Name_CN
;
}
});
}
return
mealtypeName
;
},
open
(
index
)
{
// 展开某个下来菜单时,先关闭原来的其他菜单的高亮
// 同时内部会自动给当前展开项进行高亮
this
.
$refs
.
uDropdown
.
highlight
(
);
goUrl
(
subItem
)
{
uni
.
navigateTo
({
url
:
`/pages/hotel/order?searchObj=
${
JSON
.
stringify
(
this
.
searchObj
)}
&dayObj=
${
JSON
.
stringify
(
this
.
dayObj
)}
&HotelInfo=
${
JSON
.
stringify
(
this
.
HotelInfo
)}
&RoomInfo=
${
JSON
.
stringify
(
subItem
)}
`
,
}
);
},
close
(
index
)
{
// 关闭的时候,给当前项加上高亮
// 当然,您也可以通过监听dropdown-item的@change事件进行处理
this
.
$refs
.
uDropdown
.
highlight
(
index
);
openPicture
(
item
)
{
let
imgObj
=
JSON
.
stringify
(
item
);
uni
.
navigateTo
({
url
:
"/pages/hotel/picture?imgObj="
+
imgObj
,
});
},
},
};
</
script
>
...
...
@@ -949,6 +999,9 @@
font-size
:
28
rpx
;
color
:
#333333
;
padding
:
8
rpx
0
10
rpx
0
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.hotelDetailRCheckin
{
font-weight
:
500
;
...
...
@@ -986,6 +1039,7 @@
.hotelDetailRPrice
{
font-size
:
20
rpx
;
color
:
#FF3166
;
text-align
:
right
;
}
.hotelDetailRPrice
text
{
font-size
:
34
rpx
;
...
...
@@ -1046,6 +1100,9 @@
font-size
:
32
rpx
;
color
:
#080A09
;
}
.hotelDetailMinXiTitle.active
{
color
:
#B99846
;
}
.hotelDetailMinXiL
{
width
:
1px
;
flex
:
1
;
...
...
@@ -1070,9 +1127,9 @@
height
:
90
rpx
;
}
.hotelDetailMinXiRP
{
font-size
:
20
rpx
;
color
:
#FF3166
;
text-align
:
right
;
}
.hotelDetailMinXiRP
text
{
font-weight
:
800
;
...
...
pages/hotel/components/search.vue
View file @
556e6e34
...
...
@@ -291,6 +291,14 @@
childrenNumberBZC
:
0
,
peoples
:
2
,
interCurrent
:
0
,
searchroomGroup
:
[
{
roomNum
:
1
,
numberOfAdults
:
2
,
numberOfChildren
:
0
,
ChildAgeDetails
:
''
}
],
},
day
:
0
,
startDay
:
""
,
...
...
@@ -375,6 +383,7 @@
this
.
startDay
=
obj
.
startDay
;
this
.
endDay
=
obj
.
endDay
;
this
.
day
=
obj
.
day
;
this
.
dayObj
=
obj
this
.
getCity
()
this
.
getSearchCondition
()
// this.getLocation()
...
...
@@ -564,6 +573,7 @@
this
.
day
=
obj
.
day
;
this
.
dayObj
=
obj
;
this
.
showTimePopup
=
false
;
this
.
$emit
(
'getItem'
,
this
.
parameters
,
this
.
dayObj
)
},
closeDropdown
()
{
this
.
$refs
.
uDropdown
.
close
();
...
...
pages/hotel/components/time/date.vue
View file @
556e6e34
...
...
@@ -7,7 +7,7 @@
<view
style=
"flex: 1; width: 100%; height: 1rpx"
>
<canlendar
@
finish=
"chosenDateResult"
title=
"日期和人数"
></canlendar>
</view>
<view
style=
"background: #ecf1f4; padding: 20rpx 0 50rpx 0;"
>
<view
class=
"column"
style=
"background: #ecf1f4; padding: 20rpx 0 50rpx 0;"
>
<view
class=
"row line-flex"
style=
"padding: 30rpx; background: #fff"
>
<text
style=
"font-size: 28rpx; color: #111; font-weight: 500"
>
房间
</text>
<text
style=
"
...
...
@@ -19,32 +19,59 @@
<u-number-box
size=
"28"
:min=
"1"
:max=
"100000"
v-model=
"parameters.rooms"
@
change=
"getRooms"
></u-number-box>
</view>
<view
class=
"row line-flex"
style=
"padding: 30rpx; background: #fff"
>
<scroll-view
:scroll-y=
"true"
class=
"hotelScroll"
style=
"max-height: 200rpx;"
>
<view
style=
"padding: 0 10rpx;background: #fff"
>
<view
class=
"row items-center"
v-for=
"(item,index) in parameters.searchroomGroup"
style=
"padding-bottom: 20rpx;"
>
<view
class=
"line-flex"
style=
"height: 29px;margin-right: 10rpx;"
>
房间
{{
item
.
roomNum
}}
</view>
<view
class=
"col"
>
<view
class=
"row line-flex"
style=
"margin-left: 20rpx;"
>
<view
style=
"margin-right: 10rpx;"
>
<text
style=
"font-size: 28rpx; color: #111; font-weight: 500"
>
成人
</text>
<!--
<text
style=
"
font-size: 22rpx;
color: #999;
margin-left: 30rpx;
flex: 1;
"
>
18周岁以上
</text>
"
>
18周岁以上
</text>
-->
</view>
<u-number-box
size=
"28"
:min=
"1"
:max=
"100000
"
v-model=
"parameters.adultsNumber
"
@
change=
"crChange
"
></u-number-box>
:max=
"9
"
v-model=
"item.numberOfAdults
"
@
change=
"(e)=>
{crChange(e,index)}
">
</u-number-box>
</view>
<view
class=
"row line-flex"
style=
"padding: 30rpx; background: #fff"
>
<text
style=
"font-size: 28rpx; color: #111; font-weight: 500"
>
儿童(占床)
</text>
<view
class=
"row line-flex"
style=
"margin-left: 20rpx;"
>
<view
style=
"margin-right: 10rpx;"
>
<text
style=
"font-size: 28rpx; color: #111; font-weight: 500"
>
儿童
<!--(占床)-->
</text>
<!--
<text
style=
"
font-size: 22rpx;
color: #999;
margin-left: 30rpx;
flex: 1;
"
>
2-18周岁(不含)
</text>
<u-number-box
size=
"28"
:min=
"0"
:max=
"100000"
v-model=
"parameters.childrenNumberZC"
@
change=
"etChange"
"
>
2-18周岁(不含)
</text>
-->
</view>
<u-number-box
size=
"28"
:min=
"0"
:max=
"5"
v-model=
"item.numberOfChildren"
@
change=
"(e)=>
{etChange(e,index)}"
style="margin-right: 10rpx;"
>
</u-number-box>
<text
style=
"font-size: 28rpx; color: #111; font-weight: 500;"
>
年龄
</text>
<u-number-box
size=
"28"
:min=
"1"
:max=
"12"
v-model=
"item.ChildAgeDetails"
@
change=
"(e)=>
{ageChange(e,index)}"
style="margin-left: 10rpx;"
>
</u-number-box>
</view>
</view>
</view>
</view>
</scroll-view>
<!--
<view
class=
"row line-flex"
style=
"padding: 30rpx; background: #fff"
>
<text
style=
"font-size: 28rpx; color: #111; font-weight: 500"
>
儿童(不占床)
</text>
...
...
@@ -89,18 +116,42 @@ export default {
},
methods
:
{
getRooms
(
e
){
if
(
e
.
value
>
this
.
parameters
.
rooms
||
e
.
value
<
this
.
parameters
.
rooms
){
if
(
e
.
value
>
this
.
parameters
.
rooms
){
this
.
parameters
.
searchroomGroup
.
push
({
roomNum
:
e
.
value
,
numberOfAdults
:
1
,
numberOfChildren
:
0
,
ChildAgeDetails
:
''
})
}
if
(
e
.
value
<
this
.
parameters
.
rooms
){
this
.
parameters
.
searchroomGroup
.
splice
(
e
.
value
,
1
)
}
this
.
parameters
.
rooms
=
e
.
value
;
this
.
peopleChange
()
}
},
ageChange
(
e
,
index
){
this
.
parameters
.
searchroomGroup
[
index
].
ChildAgeDetails
=
e
.
value
;
},
etChange
(
e
){
this
.
parameters
.
childrenNumberZC
=
e
.
value
;
etChange
(
e
,
index
){
this
.
parameters
.
searchroomGroup
[
index
].
numberOfChildren
=
e
.
value
;
this
.
peopleChange
()
},
crChange
(
e
){
this
.
parameters
.
adultsNumber
=
e
.
value
;
crChange
(
e
,
index
){
this
.
parameters
.
searchroomGroup
[
index
].
numberOfAdults
=
e
.
value
;
this
.
peopleChange
()
},
peopleChange
(){
this
.
parameters
.
peoples
=
Number
(
this
.
parameters
.
adultsNumber
)
+
Number
(
this
.
parameters
.
childrenNumberZC
)
this
.
parameters
.
peoples
=
0
this
.
parameters
.
adultsNumber
=
0
this
.
parameters
.
childrenNumberZC
=
0
this
.
parameters
.
searchroomGroup
.
forEach
((
item
,
index
)
=>
{
this
.
parameters
.
peoples
+=
(
Number
(
item
.
numberOfAdults
)
+
Number
(
item
.
numberOfChildren
))
this
.
parameters
.
adultsNumber
+=
Number
(
item
.
numberOfAdults
)
this
.
parameters
.
childrenNumberZC
+=
Number
(
item
.
numberOfChildren
)
})
},
chosenDateResult
(
obj
)
{
this
.
showTimePopup
=
false
;
...
...
pages/hotel/components/time/index.vue
View file @
556e6e34
...
...
@@ -243,7 +243,6 @@ export default {
uni
.
getStorage
({
key
:
"Time"
,
success
:
(
res
)
=>
{
console
.
log
(
res
);
if
(
res
&&
res
.
data
)
{
var
obj
=
JSON
.
parse
(
res
.
data
);
this
.
start
=
this
.
setDefaultDate
(
obj
.
start
);
...
...
@@ -344,13 +343,11 @@ export default {
}
if
(
this
.
priceStauts
.
length
>
0
)
{
console
.
log
(
this
.
lastNot
);
for
(
var
i
=
newVal
[
0
];
i
<
this
.
priceStauts
.
length
;
i
++
)
{
if
(
i
==
newVal
[
0
])
{
for
(
var
j
=
newVal
[
1
];
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
{
this
.
lastNot
=
[
i
,
j
];
console
.
log
(
this
.
lastNot
);
return
;
}
}
...
...
@@ -358,7 +355,6 @@ export default {
for
(
var
j
=
0
;
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
{
this
.
lastNot
=
[
i
,
j
];
console
.
log
(
this
.
lastNot
);
return
;
}
}
...
...
@@ -652,6 +648,7 @@ export default {
"-"
+
endDay
,
day
:
this
.
day
,
year
:
this
.
date
[
this
.
start
[
0
]].
year
,
};
/*此处应把需要的数据进行保存,如入住离开日期...添加到vuex然后再进行跳转到上一页
...
...
pages/hotel/detail.vue
View file @
556e6e34
...
...
@@ -185,8 +185,63 @@
</view>
</view>
</view>
<hotelRoom
:dataList=
"dataList"
:rooms=
"RoomList"
:search=
"searchObj"
></hotelRoom>
<view
v-show=
"getQueryData.length>0"
>
<u-dropdown
ref=
"uDropdown"
@
open=
"open"
@
close=
"close"
active-color=
"#B99846"
inactive-color=
"#080A09"
title-size=
"28"
>
<u-dropdown-item
:title=
"optionsTitle[0]"
: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 qRoomTypeList"
:key=
"index"
:class=
"[qMsg.RoomTypeName==item.RoomName_CN?'active':'']"
@
click=
"changeType(item,1)"
>
<text>
{{
item
.
RoomName_CN
}}
</text>
<view
v-if=
"qMsg.RoomTypeName==item.RoomName_CN"
>
<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"
>
<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 qMealTypeList"
:key=
"index"
:class=
"[qMsg.MTypeName==item.MTypeName?'active':'']"
@
click=
"changeType(item)"
>
<text>
{{
item
.
MTypeName
?
item
.
MTypeName
:
'-'
}}
</text>
<view
v-if=
"qMsg.MTypeName==item.MTypeName"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638760948784111958.png"
/>
</view>
</view>
</view>
</scroll-view>
</u-dropdown-item>
</u-dropdown>
<hotelRoom
:dataList=
"dataList"
:rooms=
"getQueryData"
:roomMsg=
"roomMsg"
:search=
"searchObj"
:day=
"dayObj"
:qRoomType=
"qRoomTypeList"
:qMealType=
"qMealTypeList"
></hotelRoom>
</view>
<u-empty
v-show=
"getQueryData.length==0"
text=
"暂无相关房间"
mode=
"data"
padding-top=
"5"
></u-empty>
</view>
<view
style=
"border-radius: 15rpx 15rpx 0 0;background: #fff;overflow: hidden;"
>
<view
class=
"hotelFacilitiesBox"
>
...
...
@@ -275,6 +330,7 @@ export default {
nearbyType
:
0
,
searchObj
:
{
date
:
{},
searchroomGroup
:[]
},
roomMsg
:
{
hotelid
:
0
,
...
...
@@ -328,7 +384,7 @@ export default {
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638762717498946531.png'
,
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638762717498917358.png'
],
optionsTitle
:
[
"房型"
,
"
床型"
,
"
餐食"
],
optionsTitle
:
[
"房型"
,
"餐食"
],
hotelFacilities
:
[
{
Name
:
'酒店信息'
,
ID
:
1
,
val
:
'hotelInfor'
,
top
:
0
,},
{
Name
:
'酒店政策'
,
ID
:
2
,
val
:
'hotelPolicy'
,
top
:
0
,},
...
...
@@ -338,9 +394,71 @@ export default {
scrollTop
:
100
,
old
:{
scrollTop
:
0
},
loading
:
false
,
DidaHotelRoomDetails
:{},
qRoomTypeList
:
[],
qMealTypeList
:
[
{
ID
:
''
,
MTypeName
:
"全部"
}
],
HotelMealTypes
:
[],
qMsg
:
{
RoomTypeName
:
""
,
//房型筛选
MTypeName
:
""
,
//早餐筛选
}
};
},
computed
:
{
getQueryData
:
{
get
()
{
var
_this
=
this
;
var
tempData
=
[];
_this
.
loading
=
true
;
if
(
_this
.
DidaHotelRoomDetails
&&
_this
.
DidaHotelRoomDetails
.
HotelList
&&
_this
.
DidaHotelRoomDetails
.
HotelList
.
length
>
0
&&
_this
.
DidaHotelRoomDetails
.
HotelList
[
0
].
GroupRoomTypeList
)
{
let
arrList
=
function
(
list
){
list
.
forEach
(
item
=>
{
item
.
show
=
false
})
}
arrList
(
_this
.
DidaHotelRoomDetails
.
HotelList
[
0
].
GroupRoomTypeList
)
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
DidaHotelRoomDetails
.
HotelList
[
0
].
GroupRoomTypeList
));
if
(
_this
.
qMsg
.
RoomTypeName
&&
_this
.
qMsg
.
RoomTypeName
!=
''
)
{
tempData
=
tempData
.
filter
(
qitem
=>
qitem
.
RoomName_CN
==
_this
.
qMsg
.
RoomTypeName
);
}
if
(
_this
.
qMsg
.
MTypeName
&&
_this
.
qMsg
.
MTypeName
.
MTypeName
!=
''
)
{
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
.
qMealTypeList
.
find
(
mtItem
=>
mtItem
.
MTypeName
==
_this
.
qMsg
.
MTypeName
);
if
(
mItem
.
MealAmount
==
tempObj
.
MealAmount
&&
mItem
.
MealType
==
tempObj
.
MealType
)
{
tempRetePlanList
.
push
(
pItem
)
}
})
}
})
}
qitem
.
RatePlanList
=
tempRetePlanList
;
if
(
tempRetePlanList
&&
tempRetePlanList
.
length
>
0
)
{
newDataArray
.
push
(
qitem
);
}
})
tempData
=
newDataArray
;
}
}
_this
.
loading
=
false
;
return
tempData
;
},
}
},
created
()
{
this
.
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
...
...
@@ -405,9 +523,121 @@ export default {
if
(
options
.
searchObj
)
{
this
.
searchObj
=
JSON
.
parse
(
options
.
searchObj
);
}
this
.
getRecomHotel
();
// this.getRecomHotel();
this
.
getHotelPrices
()
this
.
getdidaMealType
()
},
methods
:
{
open
(
index
)
{
// 展开某个下来菜单时,先关闭原来的其他菜单的高亮
// 同时内部会自动给当前展开项进行高亮
this
.
$refs
.
uDropdown
.
highlight
();
},
close
(
index
)
{
// 关闭的时候,给当前项加上高亮
// 当然,您也可以通过监听dropdown-item的@change事件进行处理
this
.
$refs
.
uDropdown
.
highlight
(
index
);
},
changeType
(
item
,
type
){
if
(
type
){
this
.
optionsTitle
[
0
]
=
item
.
RoomName_CN
!=
'全部'
?
item
.
RoomName_CN
:
'房型'
this
.
qMsg
.
RoomTypeName
=
item
.
RoomName_CN
!=
'全部'
?
item
.
RoomName_CN
:
''
;
}
else
{
this
.
optionsTitle
[
1
]
=
item
.
MTypeName
!=
'全部'
?
item
.
MTypeName
:
'餐食'
this
.
qMsg
.
MTypeName
=
item
.
MTypeName
!=
'全部'
?
item
.
MTypeName
:
''
;
}
this
.
$refs
.
uDropdown
.
close
();
},
// 获取房间价格
getHotelPrices
(){
let
that
=
this
this
.
apipost
(
'dmc_post_GetDiDaPriceSearchList'
,{
hotelId
:
this
.
roomMsg
.
hotelid
,
sort
:
0
,
displayFrom
:
1
,
roomOptionCd
:
""
,
searchroomGroup
:
[{
roomNum
:
1
,
numberOfAdults
:
2
,
numberOfChildren
:
0
,
ChildAgeDetails
:
""
}],
auditNum
:
this
.
searchObj
.
adultsNumber
,
childNum
:
this
.
searchObj
.
childrenNumberZC
,
CheckInDate
:
this
.
dayObj
.
startTime
,
CheckOutDate
:
this
.
dayObj
.
endTime
,
// CheckInDate: '2025-04-08',
// CheckOutDate: '2025-04-11',
},
res
=>
{
if
(
res
.
resultCode
==
1
){
var
tempData
=
res
.
data
;
this
.
DidaHotelRoomDetails
=
tempData
;
if
(
tempData
)
{
if
(
tempData
.
HotelList
&&
tempData
.
HotelList
.
length
>
0
)
{
tempData
.
HotelList
.
forEach
(
rootItem
=>
{
if
(
rootItem
&&
rootItem
.
GroupRoomTypeList
&&
rootItem
.
GroupRoomTypeList
.
length
>
0
)
{
rootItem
.
GroupRoomTypeList
.
forEach
(
rItem
=>
{
if
(
rItem
.
RoomName_CN
&&
rItem
.
RoomName_CN
!=
''
)
{
this
.
qRoomTypeList
.
push
({
RoomName_CN
:
rItem
.
RoomName_CN
});
}
})
}
this
.
qRoomTypeList
.
unshift
({
RoomName_CN
:
'全部'
})
if
(
rootItem
&&
rootItem
.
RatePlanList
&&
rootItem
.
RatePlanList
.
length
>
0
)
{
rootItem
.
RatePlanList
.
forEach
(
pItem
=>
{
if
(
pItem
&&
pItem
.
PriceList
&&
pItem
.
PriceList
.
length
>
0
)
{
pItem
.
PriceList
.
forEach
(
mItem
=>
{
var
MTypeName
=
that
.
getMealtype
(
mItem
.
MealType
);
if
(
mItem
.
MealAmount
>
0
)
{
MTypeName
+=
mItem
.
MealAmount
+
"份"
;
}
var
mObj
=
{
MTypeName
:
MTypeName
,
MealAmount
:
mItem
.
MealAmount
,
MealType
:
mItem
.
MealType
};
var
qObj
=
that
.
qMealTypeList
.
find
((
qMItem
)
=>
{
return
qMItem
.
MealType
===
mObj
.
MealType
&&
qMItem
.
MealAmount
==
mObj
.
MealAmount
;
})
if
(
!
qObj
)
{
that
.
qMealTypeList
.
push
(
mObj
);
}
})
}
});
}
});
}
}
}
})
},
//获取道旅餐食类型
getdidaMealType
()
{
this
.
apipost
(
'dmc_post_GetDidaMealType'
,
this
.
hotelMsg
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
HotelMealTypes
=
res
.
data
;
}
},
null
)
},
//获取餐型
getMealtype
(
mealtypeId
)
{
let
mealtypeName
=
""
;
if
(
mealtypeId
>
0
)
{
this
.
HotelMealTypes
.
forEach
((
item
)
=>
{
if
(
item
.
ID
==
mealtypeId
)
{
mealtypeName
=
item
.
Name_CN
;
}
});
}
return
mealtypeName
;
},
goFacil
(
item
){
this
.
current
=
item
.
ID
;
this
.
scrollTop
=
this
.
old
.
scrollTop
...
...
@@ -476,10 +706,16 @@ export default {
this
.
roomMsg
.
EndDate
=
obj
.
end
;
this
.
startDay
=
obj
.
startDay
;
this
.
endDay
=
obj
.
endDay
;
this
.
day
=
obj
.
day
;
this
.
getRoomType
();
this
.
dayObj
=
obj
;
// this.getRoomType();
this
.
dayObj
=
{
...
obj
,
startTime
:
`
${
obj
.
year
}
-
${
obj
.
startDay
}
`
,
endTime
:
`
${
obj
.
year
}
-
${
obj
.
endDay
}
`
}
this
.
showTimePopup
=
false
;
this
.
getHotelPrices
()
},
//切换日期获取房型
getRoomType
()
{
...
...
@@ -639,17 +875,17 @@ export default {
for
(
let
i
=
0
;
i
<
res
.
data
.
images
.
length
;
i
++
){
res
.
data
.
images
[
i
].
Path
=
res
.
data
.
images
[
i
].
url
}
for
(
let
i
=
0
;
i
<
res
.
data
.
rooms
.
length
;
i
++
){
let
list
=
res
.
data
.
rooms
[
i
].
images
.
filter
(
x
=>
{
return
x
.
isDefault
})
res
.
data
.
rooms
[
i
].
images
.
forEach
(
x
=>
{
x
.
Path
=
x
.
url
})
if
(
list
.
length
>
0
)
res
.
data
.
rooms
[
i
].
Path
=
list
[
0
].
url
else
res
.
data
.
rooms
[
i
].
Path
=
res
.
data
.
rooms
[
i
].
images
.
length
>
0
&&
res
.
data
.
rooms
[
i
].
images
[
0
].
url
?
res
.
data
.
rooms
[
i
].
images
[
0
].
url
:
''
this
.
RoomList
.
push
(
res
.
data
.
rooms
[
i
])
}
//
for(let i=0;i
<
res
.
data
.
rooms
.
length
;
i
++
){
//
let list = res.data.rooms[i].images.filter(x=>{
//
return x.isDefault
//
})
//
res.data.rooms[i].images.forEach(x=>{
//
x.Path = x.url
//
})
//
if(list.length>0) res.data.rooms[i].Path = list[0].url
//
else res.data.rooms[i].Path = res.data.rooms[i].images.length>0&&res.data.rooms[i].images[0].url?res.data.rooms[i].images[0].url:''
//
this.RoomList.push(res.data.rooms[i])
//
}
this
.
hotelData
.
hotelid
=
this
.
dataList
.
hotelid
;
this
.
hotelData
.
name
=
this
.
dataList
.
name
;
// this.hotelData.Booking = this.dataList.Booking;
...
...
@@ -1380,5 +1616,24 @@ export default {
.hotelFacilitiesTitle.active
.hotelFacilitiesTb
view
{
background
:
#E2AB4E
;
}
.hotelComprehensiveBox
{
padding
:
0
30
rpx
;
}
.hotelComprehensiv
{
height
:
78
rpx
;
line-height
:
70
rpx
;
font-size
:
28
rpx
;
color
:
#080A09
;
justify-content
:
space-between
;
}
.hotelComprehensiv.active
{
color
:
#B99846
;
font-weight
:
bold
;
}
.hotelComprehensiv
img
{
width
:
28
rpx
;
height
:
28
rpx
;
display
:
block
;
}
</
style
>
pages/hotel/list.vue
View file @
556e6e34
...
...
@@ -2,7 +2,11 @@
<view
class=
"hotel-list column"
style=
"background: #F3F1EF;"
>
<view
class=
"hotel-listHeader"
>
<hotelHeaders
:title=
"pageTitle"
></hotelHeaders>
<hotelSearch
:msg=
"searchObj"
:isMap=
"1"
@
change=
"change"
></hotelSearch>
<hotelSearch
:msg=
"searchObj"
:isMap=
"1"
@
change=
"change"
@
getItem=
"getItem"
></hotelSearch>
<!--
<view
style=
"padding: 9rpx 30rpx 19rpx 30rpx;"
>
<scroll-view
:scroll-x=
"true"
>
<view
class=
"ComprehensiveSortings row"
>
...
...
@@ -65,9 +69,6 @@
// City: 262, //市
// District: 0, //区
},
day
:
0
,
startDay
:
""
,
endDay
:
""
,
HotelList
:
[],
//酒店数据
tempRateAndPrice
:
{
price
:
{},
...
...
@@ -124,27 +125,35 @@
let
Day2
=
day2
>
9
?
day2
:
'0'
+
day2
;
var
obj
=
{
start
:
`
${
d1
.
getFullYear
()}
-
${
Month1
}
-
${
Day1
}
`
,
end
:
`
${
d
2
.
getFullYear
()}
-
${
Month2
}
-
${
Day2
}
`
,
end
:
`
${
d
1
.
getFullYear
()}
-
${
Month2
}
-
${
Day2
}
`
,
startDay
:
`
${
Month1
}
-
${
Day1
}
`
,
endDay
:
`
${
Month2
}
-
${
Day2
}
`
,
day
:
1
,
startWeek
:
startWeek
,
endWeek
:
endWeek
,
startTime
:
`
${
d1
.
getFullYear
()}
-
${
Month1
}
-
${
Day1
}
`
,
endTime
:
`
${
d1
.
getFullYear
()}
-
${
Month2
}
-
${
Day2
}
`
};
this
.
dayObj
=
obj
;
uni
.
setStorage
({
key
:
"Time"
,
data
:
JSON
.
stringify
(
obj
),
});
// this.searchObj.QStartDate = obj.start;
// this.searchObj.QEndDate = obj.end;
this
.
startDay
=
obj
.
startDay
;
this
.
endDay
=
obj
.
endDay
;
this
.
day
=
obj
.
day
;
this
.
getSearchCondition
();
// this.getList();
},
methods
:
{
getItem
(
parameters
,
obj
)
{
this
.
searchObj
=
{
...
this
.
searchObj
,
...
parameters
}
this
.
dayObj
=
{
...
obj
,
startTime
:
`
${
obj
.
year
}
-
${
obj
.
startDay
}
`
,
endTime
:
`
${
obj
.
year
}
-
${
obj
.
endDay
}
`
}
},
scroll
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
;
},
...
...
pages/hotel/mapList.vue
View file @
556e6e34
...
...
@@ -2,7 +2,8 @@
<view
class=
"hotel-list column"
style=
"background: #F3F1EF;"
>
<view
class=
"hotel-listHeader"
>
<hotelHeaders
:title=
"pageTitle"
></hotelHeaders>
<hotelSearch
@
change=
"change"
></hotelSearch>
<hotelSearch
@
change=
"change"
@
getItem=
"getItem"
></hotelSearch>
</view>
<view
style=
"height: 1px;flex: 1;overflow: hidden;position: relative;"
>
<!-- :latitude="latitude" :longitude="longitude" :markers="covers" -->
...
...
@@ -33,7 +34,7 @@
current==index?'active':'',
nextCurrent==index?'activeNext':'',]"
>
<view
class=
"hotelMapList"
>
<hotel-good
:item=
"item"
:isMap=
"1"
></hotel-good>
<hotel-good
:item=
"item"
:
dayObj=
"dayObj"
:searchObj=
"searchObj"
:
isMap=
"1"
></hotel-good>
</view>
</swiper-item>
</swiper>
...
...
@@ -208,6 +209,13 @@
// this.getLocation()
},
methods
:
{
getItem
(
obj
)
{
this
.
dayObj
=
{
...
obj
,
startTime
:
`
${
obj
.
year
}
-
${
obj
.
startDay
}
`
,
endTime
:
`
${
obj
.
year
}
-
${
obj
.
endDay
}
`
}
},
handleCalloutClick
(
marker
)
{
console
.
log
(
'点击了标记:'
,
marker
.
detail
);
// 可自定义弹窗逻辑或跳转页面
...
...
pages/hotel/order.vue
View file @
556e6e34
...
...
@@ -3,7 +3,7 @@
<scroll-view
scroll-y=
"true"
style=
"height: 1px;flex: 1;box-sizing: border-box;"
>
<view
class=
"hotel-order"
>
<view
class=
"o-head"
>
<view
class=
"o-head-title"
>
成田国际花园酒店
</view>
<view
class=
"o-head-title"
>
{{
HotelInfo
.
name
}}
</view>
<view
class=
"o-timer"
>
<view
class=
"row-sb-n"
>
<view
class=
"row items-center"
>
...
...
@@ -18,17 +18,19 @@
<view
class=
"o-detail"
@
click=
"goUrl"
>
详情
</view>
</view>
<view
class=
"room-dateil row items-center"
>
<view
class=
"room-name"
>
{{
HotelInfo
.
HotelName
?
HotelInfo
.
HotelName
:
''
}}
</view>
<view
class=
"room-name"
>
{{
RoomInfo
.
RoomName_CN
?
RoomInfo
.
RoomName_CN
:
''
}}
</view>
<view
class=
"roomline"
></view>
<view
class=
"room-remark"
>
{{
RoomInfo
.
BreakfastTypeStr
}}
{{
searchObj
.
rooms
}}
间
<!-- |
{{
RoomInfo
.
BedTypeStr
}}
|
{{
RoomInfo
.
RoomSize
}}
㎡ |
{{
RoomInfo
.
HasWindowStr
}}
-->
</view>
<view
class=
"roomline"
></view>
<view
class=
"roomPrice"
>
1500/人
<!--
{{
searchObj
.
peoples
}}
-->
{{
RoomInfo
.
Currency
}}{{
getPrice
(
orderMsg
.
TotalPrice
)
}}
<!-- /人 -->
</view>
</view>
</view>
...
...
@@ -46,14 +48,14 @@
</view>
</view>
<view
class=
"row-sbas-n items-center"
>
<view
class=
"addPnum addPnumL"
@
click=
"orderMsg.Room
Number
>1?editNum(1):''"
>
<image
v-if=
"orderMsg.Room
Number
>1"
style=
"width: 27rpx;height: 27rpx;display: block;"
<view
class=
"addPnum addPnumL"
@
click=
"orderMsg.Room
Count
>1?editNum(1):''"
>
<image
v-if=
"orderMsg.Room
Count
>1"
style=
"width: 27rpx;height: 27rpx;display: block;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638751245939665786.png"
/>
<image
v-else
style=
"width: 27rpx;height: 27rpx;display: block;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638755711218891689.png"
/>
</view>
<view
class=
"col row items-center textCenter visaProductTetx"
>
{{
orderMsg
.
Room
Number
}}
{{
orderMsg
.
Room
Count
}}
间
</view>
<view
class=
"addPnum addPnumR"
@
click=
"editNum()"
>
...
...
@@ -63,12 +65,36 @@
</view>
</view>
<view>
<template
v-for=
"(item,index) in orderMsg.GuestList"
>
<view
class=
"form-items row"
>
<view
class=
"label"
>
{{
orderMsg
.
GuestList
.
length
==
1
?
'住客信息'
:
`房间${index+1
}
住客`
}}
<
/view
>
<
view
class
=
"LastNameBox column val"
style
=
"width: 1px;flex: 1;"
>
<
view
class
=
"row"
v
-
for
=
"(sItem,i) in item.GuestInfo"
>
<
input
type
=
"text"
v
-
model
=
"sItem.LastName"
:
placeholder
=
"`输入住客 ${i+1
}
姓`"
/>
<
input
type
=
"text"
v
-
model
=
"sItem.FirstName"
:
placeholder
=
"`输入住客 ${i+1
}
名`"
/>
<
/view
>
<
/view
>
<
/view
>
<
/template
>
<
view
class
=
"form-items"
>
<view
class=
"label"
>
住客姓名
</view>
<
view
class
=
"label"
>
联系姓名
<
/view
>
<
view
class
=
"val"
>
<input
type=
"text"
v-model=
"orderMsg.Consignee"
placeholder=
"若是多人,输入代表人员即可"
/>
<
input
type
=
"text"
v
-
model
=
"orderMsg.guestLastName"
placeholder
=
"请输入联系人姓名"
/>
<
/view
>
<
/view
>
<!--
<
view
class
=
"form-items"
>
<
view
class
=
"label"
>
联系人名
<
/view
>
<
view
class
=
"val"
>
<
input
type
=
"text"
v
-
model
=
"orderMsg.guestFirstName"
placeholder
=
"请输入联系人名"
/>
<
/view
>
<
/view> --
>
<
view
class
=
"form-items"
>
<
view
class
=
"label"
>
联系电话
<
/view
>
<
view
class
=
"form-itemsL row"
...
...
@@ -78,20 +104,20 @@
<
u
-
icon
name
=
"arrow-down"
color
=
"#080A09"
size
=
"20"
/>
<
/view
>
<
view
class
=
"val"
>
<input
type=
"text"
v-model=
"orderMsg.
ConsigneeMobile
"
placeholder=
"输入电话号码"
/>
<
input
type
=
"text"
v
-
model
=
"orderMsg.
guestPhoneNumber
"
placeholder
=
"输入电话号码"
/>
<
/view
>
<
/view
>
<view
class=
"form-items"
>
<
!--
<
view
class
=
"form-items"
>
<
view
class
=
"label"
>
预计到店
<
/view
>
<
view
class
=
"val flex form-itemsTime"
@
click
=
"showtime=true"
>
<
view
style
=
"flex: 1;"
class
=
"f14"
>
{{
orderMsg
.
ArrivalTime
}}
房间整晚保留
<
/view
>
<!--
<u-icon
name=
"arrow"
color=
"#D9D9D9"
size=
"20"
/>
-->
</view>
<
u
-
icon
name
=
"arrow"
color
=
"#D9D9D9"
size
=
"20"
/>
<
/view
>
<
/view>-->
<
view
class
=
"form-items"
>
<
view
class
=
"label"
>
E
-
mail
<
/view
>
<
view
class
=
"val"
>
<input
type=
"text"
v-model=
"orderMsg.Email"
placeholder=
"用于接收信息"
/>
<
input
type
=
"text"
v
-
model
=
"orderMsg.
guest
Email"
placeholder
=
"用于接收信息"
/>
<
/view
>
<
/view>
<
/view
>
...
...
@@ -120,12 +146,12 @@
<
view
class
=
"form"
style
=
"margin:20rpx 0 15rpx 0;padding: 0;"
>
<
view
class
=
"form-items PriceZaiXian"
>
<
view
class
=
"label"
>
在线支付
商品总价
<
/view
>
<
view
class
=
"val f14 regular"
style
=
"text-align: right;"
>
<text
style=
"margin-right: 30rpx;"
>
{{
orderMsg
.
RoomNumber
}}
人
</text>
<text
style=
"margin-right: 30rpx;"
>
{{
orderMsg
.
Room
Number
}}
间房
</text>
<text
class=
"red"
>
¥
{{
orderMsg
.
Final_Price
}}
</text>
<
text
style
=
"margin-right: 30rpx;"
>
{{
searchObj
.
peoples
}}
人
<
/text
>
<
text
style
=
"margin-right: 30rpx;"
>
{{
orderMsg
.
Room
Count
}}
间房
<
/text
>
<
text
class
=
"red"
>
{{
RoomInfo
.
Currency
}}
{{
getPrice
(
orderMsg
.
TotalPrice
)
*
orderMsg
.
RoomCount
}}
<
/text
>
<
/view
>
<
/view
>
<
view
class
=
"form-items PriceMinXi"
style
=
"border-bottom: none;"
>
...
...
@@ -133,17 +159,26 @@
明细
<
/view
>
<
/view
>
<view
class=
"flex f12 grey"
style=
"margin-bottom:40rpx;"
v-for=
"(item,index) in priceList"
:key=
"index"
>
<view
style=
"flex:1"
>
<text
style=
"margin-right: 30rpx;"
>
{{
item
.
DateStr
}}
</text>
<text
v-if=
"index!=0"
>
{{
item
.
BreakfastTypeStr
}}
</text>
<
view
class
=
"flex f12 grey"
style
=
"margin-bottom: 40rpx"
>
<
view
style
=
"flex: 1"
>
<
text
style
=
"margin-right: 30rpx"
>
房间
<
/text
>
<
/view
>
<
view
style
=
"text-align: right"
>
{{
orderMsg
.
RoomCount
}}
间×
{{
RoomInfo
.
Currency
}}
{{
getPrice
(
orderMsg
.
TotalPrice
)
}}
<
/view
>
<
/view
>
<
view
class
=
"flex f12 grey"
style
=
"margin-bottom: 40rpx"
:
style
=
"{'color':mainColor+' !important'
}
"
v
-
if
=
"useCouponIds.length>0"
>
<
view
style
=
"flex: 1"
>
<
text
style
=
"margin-right: 30rpx"
>
优惠券
<
/text
>
<
/view
>
<view
style=
"text-align: right;"
v-if=
"index!=priceList.length-1"
>
{{
orderMsg
.
RoomNumber
}}
间 × ¥
{{
$utils
.
getretailer
()
==
true
?
item
.
B2BPrice
:
item
.
SalesPrice
}}
</view>
</view
>
<view
class=
"PriceTole row-sb-n"
>
<view>
合计
</view>
<
view
style
=
"text-align: right"
>
-
¥
{{
currentCoupon
.
discountMoney
}}
<
/view
>
<
/view
>
<
view
class
=
"flex f12"
>
<
view
style
=
"flex: 1"
>
小计
<
/view>
<
view
>
¥100
{{
RoomInfo
.
Currency
}}
{{
(
getPrice
(
orderMsg
.
TotalPrice
)
*
orderMsg
.
RoomCount
)
-
currentCoupon
.
discountMoney
}}
<
/view
>
<
/view
>
<
/view
>
...
...
@@ -155,10 +190,24 @@
<
/view
>
<
view
class
=
"rule"
>
<
text
class
=
"king"
>
此房间
<template
v-if=
"RoomInfo.IsCancel==0"
>
支持免费取消,
</
template
>
<
template
v-if=
"RoomInfo.IsCancel==1"
>
不可取消,
</
template
>
<
/text
>
<
text
v
-
if
=
"roomRateDetails&&
roomRateDetails.CancellationPolicyList &&
roomRateDetails.CancellationPolicyList.length > 0"
>
<
template
v
-
for
=
"(itemCancella, index1) in roomRateDetails.CancellationPolicyList"
>
<
template
v
-
if
=
"index1==0"
>
{{
getformatDateStr
(
itemCancella
.
FromDate
)
}}
之前免费取消
<
/template
>
<
template
v
-
if
=
"itemCancella.Amount==roomRateDetails.TotalPrice"
>
<
template
>
{{
getformatDateStr
(
itemCancella
.
FromDate
)
}}
起不可取消,取消将收取订单全额费用
;
<
/template
>
<
/template
>
<
template
v
-
else
>
<
template
>
{{
getformatDateStr
(
itemCancella
.
FromDate
)
}}
<
template
v
-
if
=
"index1!=(roomRateDetails.CancellationPolicyList.length-1)"
>-
{{
getformatDateStr
(
roomRateDetails
.
CancellationPolicyList
[
index1
+
1
].
FromDate
)
}}
之间
<
/template
>
取消,收费
{{
DanWei
}}
{{
getPrice
(
itemCancella
.
Amount
)
}}
;
<
/template
>
<
/template
>
<
/template
>
<
/text
>
<text>
订单需要等待酒店或供应商确认后生效,订单确认结果我们将会通知推送到您的微信,请您在下单时同意结果订阅,以便您能正常收到消息。
</text>
<
/view
>
<
/view
>
<
view
style
=
"height: 27rpx"
><
/view
>
...
...
@@ -179,24 +228,22 @@
<
view
class
=
"opera-box"
>
<
view
class
=
"box flex"
>
<
view
class
=
"price"
>
<text
class=
"f11"
>
¥
</text>
<text>
{{
orderMsg.Final_Price
}}
</text>
<
text
class
=
"f11"
>
{{
RoomInfo
.
Currency
}}
<
/text
>
<
text
>
{{
(
getPrice
(
orderMsg
.
TotalPrice
)
*
orderMsg
.
RoomCount
)
-
currentCoupon
.
discountMoney
}}
<
/text
>
<
/view
>
<view
class=
"sum-detail"
>
共计 {{orderMsg.Room
Number
}}间房
</view>
<u-button
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btnStyle"
@
click=
"buyRoom"
>
立即购买
</u-button>
<
view
class
=
"sum-detail"
>
共计
{{
orderMsg
.
Room
Count
}}
间房
<
/view
>
<
u
-
button
:
ripple
=
"true"
:
hair
-
line
=
"false"
:
custom
-
style
=
"btnStyle"
@
click
=
"buyRoom"
:
loading
=
"submit"
>
立即购买
<
/u-button
>
<
/view
>
<
/view
>
<u-picker
v-model=
"showtime"
mode=
"time"
@
confirm=
'confirm'
:params=
"params"
:default-time=
'orderMsg.ArrivalTime'
></u-picker>
<
u
-
picker
v
-
model
=
"showtime"
mode
=
"time"
@
confirm
=
'confirm'
:
params
=
"params
Time
"
:
default
-
time
=
'orderMsg.ArrivalTime'
><
/u-picker
>
<
u
-
toast
ref
=
"uToast"
/>
<
u
-
picker
mode
=
"selector"
v
-
model
=
"showCountry"
:
default
-
selector
=
"[0]"
:
range
=
"countrys"
@
confirm
=
'(e)=>{changeDown(e,CountryType)
}
'
range
-
key
=
"label"
@
input
=
"showCountry=false"
><
/u-picker
>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:price=
"price"
:list=
"couponList"
:current=
"useCouponIds"
@
close=
"closeCouponHandler"
:current-price=
"realCurrentPriceInfo"
:order=
"orderMsg"
></coupon>
<
coupon
v
-
if
=
"couponList.length > 0 && showCoupon"
:
price
=
"price"
:
list
=
"couponList"
:
current
=
"useCouponIds"
@
close
=
"closeCouponHandler"
:
current
-
price
=
"realCurrentPriceInfo"
:
order
=
"orderMsg"
:
numberPeople
=
"searchObj.peoples"
><
/coupon
>
<
/view
>
<
/template
>
...
...
@@ -226,18 +273,42 @@ import coupon from '@/components/coupon/index';
dayObj
:{
}
,
HotelInfo
:{
}
,
orderMsg
:{
ProductId
:
0
,
//房间id
StartDate
:
''
,
EndDate
:
''
,
RoomNumber
:
1
,
Unit_Price
:
''
,
Final_Price
:
''
,
Consignee
:
''
,
//联系人
ConsigneeMobile
:
''
,
//;联系电话
ArrivalTime
:
'14:00'
//预计到达时间
// ProductId:0, //房间id
// StartDate:'',
// EndDate:'',
// RoomNumber:1,
// Unit_Price:'',
// Final_Price:'',
// Consignee:'', //联系人
// ConsigneeMobile:'', //;联系电话
// ArrivalTime:'14:00', //预计到达时间
EmployeeIdStr
:
""
,
//销售id
CheckInDate
:
""
,
//到店时间
RatePlanID
:
""
,
CheckOutDate
:
""
,
//离店时间
RoomCount
:
""
,
//房间数量
guestLastName
:
""
,
//英文姓
guestFirstName
:
""
,
//英文名
guestAddress
:
""
,
guestPhoneNumber
:
""
,
guestEmail
:
""
,
//Email
BookingID
:
""
,
HotelName
:
""
,
//酒店名称
HotelPic
:
""
,
//酒店封面
GuestList
:
[],
TotalPrice
:
0
,
//总价
CustomerPayMoney
:
0
,
DiscountMoney
:
0
,
//优惠
OrderSource
:
2
,
OrderForm
:
4
,
//订单来源
//备注
guestRequest
:
""
,
hotelId
:
''
,
//酒店Id
roomType
:
0
,
}
,
showtime
:
false
,
params
:
{
params
Time
:
{
year
:
false
,
month
:
false
,
day
:
false
,
...
...
@@ -245,13 +316,6 @@ import coupon from '@/components/coupon/index';
minute
:
true
,
second
:
false
}
,
priceList
:[],
//每日价格
rMsg
:{
HotelId
:
0
,
productId
:
0
,
StartDate
:
''
,
EndDate
:
''
},
tipsText
:
''
,
showCountry
:
false
,
countrys
:[],
...
...
@@ -265,40 +329,159 @@ import coupon from '@/components/coupon/index';
}
,
showPz
:
false
,
pzCoupon
:
null
,
searchObj
:
null
,
mainColor
:
''
,
activeStyle
:
''
,
params
:
{
sort
:
1
,
displayFrom
:
1
,
CheckInDate
:
""
,
CheckOutDate
:
""
,
searchroomGroup
:
[],
ratePlanID
:
""
,
imgUrl
:
""
,
RoomCount
:
1
,
ChildCount
:
0
,
AdultCount
:
1
,
OccupancyDetails
:
[],
hotelId
:
0
}
,
roomRateDetails
:
{
}
,
dataList
:
{
}
,
customer
:
{
}
,
CreateBy
:
0
,
submit
:
false
,
orderInfo
:
null
,
}
}
,
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
activeStyle
=
`background:${this.mainColor
}
;`
;
}
,
onLoad
(
options
)
{
if
(
options
.
RoomInfo
){
this
.
RoomInfo
=
JSON
.
parse
(
options
.
RoomInfo
)
this
.
customer
=
uni
.
getStorageSync
(
"b2b_user"
)
console
.
log
(
this
.
customer
,
'------this.customer'
)
if
(
options
.
searchObj
){
this
.
searchObj
=
JSON
.
parse
(
options
.
searchObj
)
}
if
(
options
.
HotelInfo
){
this
.
HotelInfo
=
JSON
.
parse
(
options
.
HotelInfo
)
console
.
log
(
this
.
HotelInfo
,
'-----------HotelInfo'
)
this
.
orderMsg
.
hotelId
=
this
.
HotelInfo
.
hotelid
;
}
if
(
options
.
RoomInfo
){
this
.
RoomInfo
=
JSON
.
parse
(
options
.
RoomInfo
)
}
if
(
options
.
dayObj
){
this
.
dayObj
=
JSON
.
parse
(
options
.
dayObj
)
}
this
.
rMsg
.
HotelId
=
this
.
HotelInfo
.
HotelId
;
this
.
rMsg
.
productId
=
this
.
RoomInfo
.
ID
;
this
.
rMsg
.
StartDate
=
this
.
dayObj
.
start
;
this
.
rMsg
.
EndDate
=
this
.
dayObj
.
end
;
this
.
orderMsg
.
ProductId
=
this
.
RoomInfo
.
ID
;
this
.
orderMsg
.
Unit_Price
=
this
.
RoomInfo
.
B2BPrice
;
this
.
orderMsg
.
StartDate
=
this
.
dayObj
.
start
;
this
.
orderMsg
.
EndDate
=
this
.
dayObj
.
end
;
uni
.
setNavigationBarTitle
({
title
:
this
.
HotelInfo
.
HotelName
if
(
options
.
CreateBy
)
{
this
.
CreateBy
=
options
.
CreateBy
}
this
.
orderMsg
.
ProductId
=
this
.
RoomInfo
.
RoomTypeID
;
console
.
log
(
this
.
searchObj
,
'-----------searchObj'
)
console
.
log
(
this
.
RoomInfo
,
'-----------RoomInfo'
)
this
.
orderMsg
.
RatePlanID
=
this
.
RoomInfo
.
RatePlanID
this
.
orderMsg
.
TotalPrice
=
this
.
getPrice
(
this
.
RoomInfo
.
TotalPrice
);
this
.
orderMsg
.
CheckInDate
=
this
.
dayObj
.
start
;
this
.
orderMsg
.
CheckOutDate
=
this
.
dayObj
.
end
;
this
.
orderMsg
.
RoomCount
=
this
.
searchObj
.
rooms
this
.
orderMsg
.
GuestList
=
[];
this
.
searchObj
.
searchroomGroup
.
forEach
((
item
,
index
)
=>
{
var
guestInfoList
=
[];
let
allprople
=
item
.
numberOfAdults
+
item
.
numberOfChildren
;
for
(
let
i
=
1
;
i
<=
allprople
;
i
++
)
{
let
obj
=
{
LastName
:
""
,
FirstName
:
""
,
Age
:
""
}
;
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
);
}
);
console
.
log
(
this
.
orderMsg
.
GuestList
)
this
.
params
=
{
sort
:
1
,
displayFrom
:
1
,
CheckInDate
:
this
.
orderMsg
.
CheckInDate
,
CheckOutDate
:
this
.
orderMsg
.
CheckOutDate
,
searchroomGroup
:
this
.
searchObj
.
searchroomGroup
,
ratePlanID
:
this
.
orderMsg
.
RatePlanID
,
imgUrl
:
""
,
RoomCount
:
this
.
orderMsg
.
RoomCount
,
ChildCount
:
this
.
searchObj
.
childrenNumberZC
,
AdultCount
:
this
.
searchObj
.
adultsNumber
,
OccupancyDetails
:
[],
hotelId
:
this
.
orderMsg
.
hotelId
}
this
.
CalTotalPrice
();
this
.
getRoomPrice
();
this
.
GetCountryInfo
()
this
.
initHotel
()
}
,
methods
:{
//日期格式化
getformatDateStr
(
value
)
{
var
dt
=
new
Date
(
value
);
let
year
=
dt
.
getFullYear
();
let
month
=
(
dt
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
"0"
);
let
date
=
(
dt
.
getDate
()).
toString
().
padStart
(
2
,
"0"
);
return
year
+
"-"
+
month
+
"-"
+
date
;
}
,
initHotel
()
{
uni
.
showLoading
({
title
:
'加载中...'
,
mask
:
true
}
);
this
.
apipost
(
"dmc_post_GetDiDaPriceConfirm"
,
this
.
params
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
hideLoading
();
uni
.
setNavigationBarTitle
({
title
:
this
.
HotelInfo
.
HotelName
}
);
this
.
dataList
=
res
.
data
.
PriceDetails
;
this
.
roomRateDetails
=
res
.
data
.
PriceDetails
.
HotelList
[
0
];
this
.
orderMsg
.
BookingID
=
res
.
data
.
PriceDetails
.
ReferenceNo
;
this
.
orderMsg
.
checkInTime
=
res
.
data
.
PriceDetails
.
CheckInDate
;
this
.
orderMsg
.
HotelName
=
this
.
HotelInfo
.
HotelName
// this.orderMsg.TotalPrice = this.getPrice(this.roomRateDetails.TotalPrice);
if
(
this
.
roomRateDetails
.
RatePlanList
&&
this
.
roomRateDetails
.
RatePlanList
.
length
>
0
){
this
.
orderMsg
.
roomType
=
this
.
roomRateDetails
.
RatePlanList
[
0
].
BedType
}
// this.orderMsg.HotelPic = this.HotelInfo.HotelPic
if
(
Object
.
prototype
.
toString
.
call
(
this
.
dataList
.
HotelList
)
==
"[object Object]"
)
{
let
arr
=
[];
arr
.
push
(
this
.
dataList
.
HotelList
);
this
.
dataList
.
HotelList
=
arr
;
}
}
}
);
}
,
getPrice
(
price
)
{
return
Math
.
ceil
(
price
);
}
,
goUrl
(){
uni
.
navigateTo
({
url
:
'/pages/hotel/orderInfor'
url
:
`/pages/hotel/orderInfor?msg=${encodeURIComponent(JSON.stringify(this.params))
}
&dayObj=${JSON.stringify(this.dayObj)
}
&searchObj=${JSON.stringify(this.searchObj)
}
&HotelInfo=${JSON.stringify(this.HotelInfo)
}
`
}
)
}
,
showCouponHandler
()
{
...
...
@@ -330,12 +513,34 @@ import coupon from '@/components/coupon/index';
}
this
.
showCoupon
=
false
;
}
,
calcMaxCouponHandle
(){
if
(
this
.
couponList
&&
this
.
couponList
.
length
>
0
){
let
maxCouponId
=
0
let
discount
=
0
const
money
=
this
.
price
this
.
couponList
.
forEach
(
x
=>
{
if
(
x
.
couponsType
==
1
&&
x
.
denomination
>
discount
&&
(
this
.
orderMsg
.
AdultPeopleNum
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
))
{
discount
=
x
.
denomination
maxCouponId
=
x
.
id
}
if
(
x
.
couponsType
==
2
){
let
disMoney
=
money
*
(
1
-
x
.
denomination
)
if
(
discount
<
disMoney
&&
(
this
.
orderMsg
.
AdultPeopleNum
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
)){
discount
=
disMoney
maxCouponId
=
x
.
id
}
}
}
)
if
(
maxCouponId
>
0
)
this
.
closeCouponHandler
([
maxCouponId
])
else
this
.
closeCouponHandler
(
-
1
)
}
}
,
getUserCouponList
()
{
let
couponParams
=
{
"lineId"
:
''
,
//线路ID
"lineteamId"
:
0
,
//系列ID
"userId"
:
this
.
customer
.
accountId
,
"CouponsUseScope"
:
9
,
//特定使用平台(当地游=8 跟团游=2 小包团=10)
"CouponsUseScope"
:
11
,
//特定使用平台(当地游=8 跟团游=2 小包团=10)
"isExpansion"
:
0
,
//是否启动膨胀金1-是
"CustomerType"
:
0
,
//客户类型 0-同行,1-直客
"TCID"
:
''
,
...
...
@@ -346,7 +551,8 @@ import coupon from '@/components/coupon/index';
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
"coupon_post_GetUserCanUseCouponList_res"
,
res
);
this
.
couponList
=
res
.
data
this
.
calcPzCouponHandler
()
// this.calcPzCouponHandler()
this
.
calcMaxCouponHandle
()
}
}
,
(
err
)
=>
{
...
...
@@ -394,11 +600,27 @@ import coupon from '@/components/coupon/index';
}
,
editNum
(
type
)
{
if
(
type
==
1
)
{
if
(
this
.
orderMsg
.
RoomNumber
>
1
)
this
.
orderMsg
.
RoomNumber
--
;
if
(
this
.
orderMsg
.
RoomCount
>
1
){
this
.
orderMsg
.
RoomCount
--
;
this
.
orderMsg
.
GuestList
.
splice
(
this
.
orderMsg
.
GuestList
.
length
-
1
,
1
)
}
}
else
{
this
.
orderMsg
.
RoomNumber
++
;
this
.
orderMsg
.
RoomCount
++
;
this
.
orderMsg
.
GuestList
.
push
({
RoomNum
:
this
.
orderMsg
.
GuestList
.
length
+
1
,
numberOfAdults
:
1
,
numberOfChildren
:
0
,
ChildAgeDetails
:
''
,
GuestInfo
:
[
{
LastName
:
""
,
FirstName
:
""
,
Age
:
""
}
]
}
)
}
this
.
getRoomNumber
()
this
.
CalTotalPrice
();
}
,
getDate
(
date
){
if
(
date
){
...
...
@@ -415,130 +637,176 @@ import coupon from '@/components/coupon/index';
confirm
(
val
){
this
.
orderMsg
.
ArrivalTime
=
val
.
hour
+
':'
+
val
.
minute
;
}
,
//改变房间数量
getRoomNumber
(
val
){
this
.
orderMsg
.
RoomNumber
=
val
.
value
;
this
.
CalTotalPrice
();
},
//获取房型报价
getRoomPrice
(){
this
.
request2
({
url
:
'/api/Hotel/GetHotelRoomPrice'
,
data
:
this
.
rMsg
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
priceList
=
res
.
data
;
this
.
CalTotalPrice
();
}
}
);
},
//计算总价
CalTotalPrice
(){
this
.
orderMsg
.
Final_Price
=
0
;
this
.
priceList
.
forEach
(
x
=>
{
console
.
log
(
"xx"
,
x
);
if
(
this
.
$utils
.
getretailer
()){
console
.
log
(
"1"
,
x
.
B2BPrice
)
this
.
orderMsg
.
Final_Price
+=
parseInt
(
this
.
orderMsg
.
RoomNumber
)
*
x
.
B2BPrice
;
}
else
{
console
.
log
(
"2"
,
x
.
SalesPrice
)
this
.
orderMsg
.
Final_Price
+=
parseInt
(
this
.
orderMsg
.
RoomNumber
)
*
x
.
SalesPrice
;
}
})
console
.
log
(
this
.
orderMsg
.
Final_Price
,
'this.orderMsg.Final_Price'
);
}
,
validate
(){
let
email
=
/^
[
a-zA-Z0-9_.-
]
+@
[
a-zA-Z0-9-
]
+
(\.[
a-zA-Z0-9-
]
+
)
*
\.[
a-zA-Z0-9
]
{2,6
}
$/
let
msg
=
''
for
(
let
i
=
0
;
i
<
this
.
orderMsg
.
GuestList
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
orderMsg
.
GuestList
[
i
].
GuestInfo
.
length
;
j
++
){
if
(
this
.
orderMsg
.
GuestList
[
i
].
GuestInfo
[
j
].
LastName
==
''
){
return
msg
=
'请输入住客姓'
}
if
(
this
.
orderMsg
.
GuestList
[
i
].
GuestInfo
[
j
].
FirstName
==
''
){
return
msg
=
'请输入住客名'
}
}
}
if
(
this
.
orderMsg
.
guestLastName
==
''
){
msg
=
'请输入姓名'
}
else
if
(
this
.
orderMsg
.
guestPhoneNumber
==
''
){
msg
=
'请输入联系电话'
}
else
if
(
this
.
orderMsg
.
guestPhoneNumber
&&
this
.
orderMsg
.
guestPhoneNumber
.
length
!=
11
){
msg
=
'请输入正确的电话号码'
}
else
if
(
this
.
orderMsg
.
guestEmail
==
''
||!
this
.
orderMsg
.
guestEmail
){
msg
=
'请输入邮箱地址'
}
else
if
(
!
email
.
test
(
this
.
orderMsg
.
guestEmail
))
{
msg
=
'请输入正确的邮箱地址'
}
else
if
(
this
.
orderMsg
.
CheckInDate
==
''
)
{
msg
=
'入住时间不能为空'
}
else
if
(
this
.
orderMsg
.
CheckOutDate
==
''
)
{
msg
=
'离店时间不能为空'
}
return
msg
}
,
//立即购买
buyRoom
(){
let
that
=
this
;
if
(
that
.
orderMsg
.
Consignee
==
''
)
{
this
.
$refs
.
uToast
.
show
({
title
:
'请输入住客姓名!'
,
type
:
'warning'
});
return
;
}
if
(
that
.
orderMsg
.
ConsigneeMobile
==
''
)
{
this
.
$refs
.
uToast
.
show
({
title
:
'请输入联系电话!'
,
type
:
'warning'
});
return
;
}
var
tempObj
=
uni
.
getStorageSync
(
'basedata'
).
mall
.
wechatmessage
;
var
tmplIds
=
[];
if
(
tempObj
&&
tempObj
.
length
>
0
){
tempObj
.
forEach
(
x
=>
{
if
(
x
.
Name
==
'下单成功提醒'
||
x
.
Name
==
'订单取消提醒'
||
x
.
Name
==
'订单确认通知'
){
tmplIds
.
push
(
x
.
MessageId
)
}
const
error
=
this
.
validate
()
if
(
error
!=
''
){
uni
.
showToast
({
icon
:
'none'
,
title
:
error
}
)
return
}
uni
.
requestSubscribeMessage
({
tmplIds
:
tmplIds
,
complete
(
res
)
{
that
.
request2
({
url
:
'/api/Hotel/SetAppletHotelOrder'
,
data
:
that
.
orderMsg
},
if
(
this
.
submit
)
return
;
this
.
submit
=
true
;
let
that
=
this
;
var
CustomerId
=
0
var
CreateBy
=
0
//同行id
var
DirectCustomerId
=
0
//直客id
// #ifdef MP-DI
DirectCustomerId
=
this
.
customer
.
customerId
CreateBy
=
this
.
customer
.
customerId
this
.
orderMsg
.
OrderSource
=
7
// #endif
// #ifdef MP-AG
CreateBy
=
this
.
CreateBy
CustomerId
=
this
.
customer
.
customerId
this
.
orderMsg
.
OrderSource
=
5
// #endif
this
.
orderMsg
.
EmployeeIdStr
=
CreateBy
;
console
.
log
(
that
.
orderMsg
,
'-----酒店下单'
);
that
.
apipost
(
'dmc_post_GetDiDaBookingConfirm'
,
that
.
orderMsg
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
that
.
queren
(
res
.
data
)
const
tempData
=
res
.
data
// #ifdef MP-DI
this
.
submitB2COrderHandler
(
tempData
.
orderId
)
// #endif
// #ifdef MP-AG
this
.
submit
=
false
uni
.
showToast
({
title
:
'订单创建成功.'
,
icon
:
'none'
}
)
uni
.
redirectTo
({
url
:
`/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=3`
,
}
);
// #endif
console
.
log
(
res
,
'-------酒店erp下单成功'
)
}
}
);
}
})
},
queren
(
OrderId
){
let
url
=
'/api/WeChatPay/GetDmcPayInfo'
let
GoodsName
=
this
.
RoomInfo
.
RoomName
;
GoodsName
=
GoodsName
.
slice
(
0
,
10
)
this
.
request2
({
url
:
url
,
data
:
{
OrderId
:
OrderId
,
GoodsName
:
GoodsName
,
OrderPayType
:
1
,
OpenId
:
uni
.
getStorageSync
(
'mall_UserInfo'
).
OpenId
,
}
}
,
res
=>
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
);
this
.
Pay
()
submitB2COrderHandler
(
OrderId
)
{
let
userInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
guestInfo
=
`成人x${this.searchObj.adultsNumber
}
; `
;
if
(
this
.
orderMsg
.
ChirdNeedBedNum
>
0
)
{
guestInfo
+=
`儿童${this.searchObj.childrenNumberZC
}
; `
;
}
let
msg
=
{
SurName
:
this
.
customer
.
SurName
,
Name
:
this
.
customer
.
name
,
ContactNumber
:
this
.
orderMsg
.
guestPhoneNumber
,
Mailbox
:
this
.
orderMsg
.
guestEmail
,
GoodsId
:
this
.
orderMsg
.
RatePlanID
,
GoodsName
:
this
.
HotelInfo
.
name
,
GoodsPic
:
this
.
HotelInfo
.
images
[
0
].
Path
,
GoodsType
:
9
,
OrderMake
:
`${this.orderMsg.CheckInDate
}
入住;${this.orderMsg.CheckOutDate
}
离店 ${guestInfo
}
`
,
TotalPrice
:
this
.
getPrice
(
this
.
orderMsg
.
TotalPrice
),
PreferentialPrice
:
this
.
currentCoupon
.
discountMoney
,
ErpOrderId
:
OrderId
,
Country
:
0
,
PlatformTax
:
0
,
Income
:
0
,
Refund
:
0
,
MallBaseId
:
userInfo
.
MallBaseId
,
CreateBy
:
0
}
;
// #ifdef MP-DI
if
(
this
.
customer
.
salesBaseInfo
&&
this
.
customer
.
salesBaseInfo
.
employeeId
){
msg
.
CreateBy
=
this
.
customer
.
salesBaseInfo
.
employeeId
}
// #endif
this
.
apipost
(
"AddOrderInfo_post"
,
msg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
.
sPayInfo
)
uni
.
showToast
({
icon
:
'none'
,
title
:
'订单创建成功'
}
)
this
.
goPayHandler
(
res
.
data
.
OrderNo
);
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
,
duration
:
3000
}
)
this
.
submit
=
false
;
}
);
}
);
}
,
Pay
()
{
let
that
=
this
;
goPayHandler
(
OrderNo
)
{
let
that
=
this
;
uni
.
requestPayment
({
provider
:
'wxpay'
,
provider
:
"wxpay"
,
timeStamp
:
this
.
orderInfo
.
timeStamp
,
nonceStr
:
this
.
orderInfo
.
nonceStr
,
package
:
this
.
orderInfo
.
package
,
signType
:
this
.
orderInfo
.
signType
,
paySign
:
this
.
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
that
.
submit
=
false
;
uni
.
showToast
({
title
:
"支付成功"
})
setTimeout
(()
=>
{
title
:
"支付成功"
,
}
)
;
setTimeout
(()
=>
{
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/paysuccess?PreferPrice='
+
that
.
orderMsg
.
Final_Price
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
(
that
.
getPrice
(
that
.
orderMsg
.
TotalPrice
)
-
that
.
currentCoupon
.
discountMoney
).
toFixed
(
2
)
+
"&isFrom=5"
,
}
);
},
100
)
}
,
100
);
}
,
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
that
.
submit
=
false
;
uni
.
showToast
({
title
:
"支付失败"
})
setTimeout
(()
=>
{
title
:
"支付失败"
,
icon
:
"none"
,
}
);
setTimeout
(()
=>
{
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/allorderList'
url
:
"/pages/jiuzhai/jz_SureOrder?OrderNo="
+
OrderNo
,
}
);
},
100
)
}
}
,
100
);
}
,
}
);
}
,
}
...
...
@@ -605,7 +873,7 @@ import coupon from '@/components/coupon/index';
padding
:
10
rpx
15
rpx
20
rpx
15
rpx
;
}
.
hotel
-
order
.
form
.
form
-
items
.
label
{
width
:
1
12
rpx
;
width
:
1
30
rpx
;
font
-
size
:
28
rpx
;
font
-
weight
:
500
;
margin
-
right
:
57
rpx
;
...
...
@@ -867,4 +1135,10 @@ import coupon from '@/components/coupon/index';
color
:
#
1
D1D20
;
line
-
height
:
42
rpx
;
}
.
LastNameBox
view
{
margin
-
bottom
:
20
rpx
;
}
.
LastNameBox
view
:
last
-
child
{
margin
-
bottom
:
0
;
}
<
/style
>
pages/hotel/orderInfor.vue
View file @
556e6e34
<
template
>
<view
class=
"hotel-detail"
>
<view
class=
"hotel-detail"
v-if=
"roomRateDetails.RatePlanList&&roomRateDetails.RatePlanList.length>0"
>
<scroll-view
ref=
"scrollView"
scroll-y=
"true"
...
...
@@ -13,14 +13,14 @@
@click="openPicture"
>
<u-swiper
:list=
"
dataList.HotelImg
"
:list=
"
HotelInfo.images
"
:effect3d=
"false"
:height=
"545"
:interval=
"5000"
:border-radius=
"0"
name=
"Path"
v-if=
"active == 1"
></u-swiper>
<!--
<view
class=
"video-box"
v-if=
"active == 0"
>
<video
id=
"myVideo"
...
...
@@ -33,14 +33,14 @@
object-fit=
"fill"
></video>
<view
@
click=
"enlarge"
class=
"play-btn"
>
<!-- 播放按钮 -->
播放按钮
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style=
"width: 37rpx; height: 44rpx"
mode=
""
></image>
</view>
</view>
</view>
-->
<!-- #ifdef MP-WEIXIN -->
<view
@
click=
"goback"
...
...
@@ -56,7 +56,7 @@
</view>
<!-- #endif -->
<view
class=
"orderIforDiZhi"
>
<view
class=
"orderIforDiZhiL"
>
成田国际花园酒店
</view>
<view
class=
"orderIforDiZhiL"
>
{{
HotelInfo
.
name
}}
</view>
<view
class=
"orderIforDiZhiR row"
>
<view
class=
"orderIforDiZhiRImg"
>
<img
...
...
@@ -64,7 +64,9 @@
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638766148323678002.png"
/>
</view>
<view
class=
"orderIforDiZhiRText"
>
95 Cheongpa-ro 20-gil, 龙山区, 首尔, 首尔(及其周边地区),韩国
{{
HotelInfo
.
location
.
address
}}
,
{{
HotelInfo
.
location
.
destination
.
name
}}
,
{{
HotelInfo
.
location
.
country
.
name
}}
</view>
</view>
</view>
...
...
@@ -79,7 +81,7 @@
style=
"flex: 1; margin-left: 30rpx; text-align: left"
class=
"name-ali"
>
{{
dataList
.
HotelN
ame
}}
{{
HotelInfo
.
n
ame
}}
</view
>
</view>
...
...
@@ -87,23 +89,32 @@
<view
class=
"ReservationInforTitle"
>
预定信息
</view>
<view
class=
"ResInforText row-sb-n"
>
<view
class=
"ResInforL"
>
入住时间
</view>
<view
class=
"ResInforR"
>
2025-02-05(周二
)
</view>
<view
class=
"ResInforR"
>
{{
roomMsg
.
StartDate
}}
(
{{
getWeek
(
roomMsg
.
StartDate
)
}}
)
</view>
</view>
<view
class=
"ResInforText row-sb-n"
>
<view
class=
"ResInforL"
>
离店日期
</view>
<view
class=
"ResInforR"
>
2025-02-05(周二
)
</view>
<view
class=
"ResInforR"
>
{{
roomMsg
.
EndDate
}}
(
{{
getWeek
(
roomMsg
.
EndDate
)
}}
)
</view>
</view>
<view
class=
"ResInforText row-sb-n"
>
<view
class=
"ResInforL"
>
入住时间
</view>
<view
class=
"ResInforR"
>
共
1
晚
</view>
<view
class=
"ResInforR"
>
共
{{
day
}}
晚
</view>
</view>
<view
class=
"ResInforText row-sb-n"
>
<view
class=
"ResInforL"
>
房型
</view>
<view
class=
"ResInforR"
>
高级双床房(1
间)
</view>
<view
class=
"ResInforR"
>
{{
roomRateDetails
.
RatePlanList
[
0
].
RatePlanName
}}
(
{{
searchObj
.
rooms
}}
间)
</view>
</view>
<view
class=
"ResInforText row-sb-n"
>
<view
class=
"ResInforL"
>
餐型
</view>
<view
class=
"ResInforR"
>
含早餐 x2份
</view>
<view
class=
"ResInforR"
v-if=
"roomRateDetails.RatePlanList && roomRateDetails.RatePlanList.length > 0"
>
<template
v-for=
"( itemp, indexp ) in roomRateDetails.RatePlanList[0].PriceList"
>
<template
v-if=
"!indexp"
>
{{
getMealtype
(
itemp
.
MealType
)
}}
<template
v-if=
"itemp.MealAmount>0"
>
×
{{
itemp
.
MealAmount
}}
份
</
template
>
</template>
</template>
</view>
</view>
<view
class=
"ResInforText row-sb-n"
>
<view
class=
"ResInforL"
>
窗户
</view>
...
...
@@ -111,7 +122,7 @@
</view>
<view
class=
"ResInforText row-sb-n"
>
<view
class=
"ResInforL"
>
人数
</view>
<view
class=
"ResInforR"
>
最多入住
2
人
</view>
<view
class=
"ResInforR"
>
最多入住
{{ roomRateDetails.RatePlanList[0].MaxOccupancy}}
人
</view>
</view>
<view
class=
"ResInforText row-sb-n"
>
<view
class=
"ResInforL"
>
面积
</view>
...
...
@@ -127,72 +138,34 @@
</view>
<view
class=
"ResInforText row-sb-n"
>
<view
class=
"ResInforL"
>
取消政策
</view>
<view
class=
"ResInforR"
>
不可修改
</view>
<view
class=
"ResInforR"
>
<text
v-if=
"roomRateDetails&&
roomRateDetails.CancellationPolicyList &&
roomRateDetails.CancellationPolicyList.length > 0"
>
<
template
v-for=
"(itemCancella, index1) in roomRateDetails.CancellationPolicyList"
>
<template
v-if=
"index1==0"
>
{{
getformatDateStr
(
itemCancella
.
FromDate
)
}}
之前免费取消
</
template
>
<
template
v-if=
"itemCancella.Amount==roomRateDetails.TotalPrice"
>
<template>
{{
getformatDateStr
(
itemCancella
.
FromDate
)
}}
起不可取消,取消将收取订单全额费用;
</
template
>
</template>
<
template
v-else
>
<template>
{{
getformatDateStr
(
itemCancella
.
FromDate
)
}}
<template
v-if=
"index1!=(roomRateDetails.CancellationPolicyList.length-1)"
>
-
{{
getformatDateStr
(
roomRateDetails
.
CancellationPolicyList
[
index1
+
1
].
FromDate
)
}}
之间
</
template
>
取消,收费 {{DanWei}}{{getPrice(itemCancella.Amount)}};
</template>
</template>
</template>
</text>
</view>
</view>
</view>
<view
class=
"ReservationInforBox"
>
<view
class=
"ReservationInforTitle"
>
立即确认
</view>
<view
class=
"ReservationInforTitle"
@
click=
"goback"
>
立即确认
</view>
<view
class=
"ResInforText ResInforTtisp row-sb-n"
>
<view
class=
"ResInforTisp"
>
订单提交后,酒店将立即确认您的订单,保障您的住房需求。
</view>
</view>
</view>
<view
style=
"height: 36rpx;"
></view>
</scroll-view>
<u-popup
v-model=
"showTimePopup"
mode=
"bottom"
border-radius=
"20"
length=
"85%"
:safe-area-inset-bottom=
"true"
>
<view
style=
"
width: 100%;
height: 100%;
display: flex;
flex-direction: column;"
>
<view
style=
"flex: 1; width: 100%; height: 1rpx"
>
<canlendar
@
finish=
"chosenDateResult"
title=
"日期和人数"
></canlendar>
</view>
<view
style=
"background: #ecf1f4; padding: 20rpx 0;margin-bottom: 80rpx;"
>
<view
class=
"row line-flex"
style=
"padding: 30rpx; background: #fff"
>
<text
style=
"font-size: 28rpx; color: #111; font-weight: 500"
>
房间
</text>
<text
style=
"
font-size: 22rpx;
color: #999;
margin-left: 30rpx;
flex: 1;
"
></text>
<u-number-box
size=
"28"
:min=
"1"
:max=
"100000"
v-model=
"searchObj.rooms"
></u-number-box>
</view>
<view
class=
"row line-flex"
style=
"padding: 30rpx; background: #fff"
>
<text
style=
"font-size: 28rpx; color: #111; font-weight: 500"
>
成人
</text>
<text
style=
"
font-size: 22rpx;
color: #999;
margin-left: 30rpx;
flex: 1;
"
>
18周岁以上
</text>
<u-number-box
size=
"28"
:min=
"1"
:max=
"100000"
v-model=
"searchObj.adultsNumber"
@
change=
"crChange"
></u-number-box>
</view>
<view
class=
"row line-flex"
style=
"padding: 30rpx; background: #fff"
>
<text
style=
"font-size: 28rpx; color: #111; font-weight: 500"
>
儿童(占床)
</text>
<text
style=
"
font-size: 22rpx;
color: #999;
margin-left: 30rpx;
flex: 1;
"
>
2-18周岁(不含)
</text>
<u-number-box
size=
"28"
:min=
"0"
:max=
"100000"
v-model=
"searchObj.childrenNumberZC"
@
change=
"etChange"
></u-number-box>
</view>
</view>
</view>
</u-popup>
</view>
</template>
...
...
@@ -235,7 +208,6 @@
opacity
:
0
,
},
mainColor
:
""
,
showTimePopup
:
false
,
controls
:
false
,
videoUrl
:
"https://video.c-ctrip.com/videos/230i1r000001hxb2mEEE4.mp4"
,
active
:
1
,
...
...
@@ -306,7 +278,11 @@
scrollTop
:
100
,
old
:{
scrollTop
:
0
}
},
HotelInfo
:{},
roomRateDetails
:{},
params
:{},
HotelMealTypes
:
[],
};
},
created
()
{
...
...
@@ -315,6 +291,14 @@
:
0
;
},
onLoad
(
options
)
{
if
(
options
.
msg
){
this
.
params
=
JSON
.
parse
(
decodeURIComponent
(
options
.
msg
))
console
.
log
(
JSON
.
parse
(
decodeURIComponent
(
options
.
msg
)))
}
if
(
options
.
HotelInfo
){
this
.
HotelInfo
=
JSON
.
parse
(
options
.
HotelInfo
)
console
.
log
(
this
.
HotelInfo
,
'酒店详情'
)
}
this
.
id
=
options
.
id
;
this
.
roomMsg
.
HotelId
=
options
.
id
;
let
that
=
this
;
...
...
@@ -336,150 +320,65 @@
this
.
endDay
=
tempDay
.
endDay
;
this
.
day
=
tempDay
.
day
;
this
.
dayObj
=
tempDay
;
}
else
{
let
d1
=
new
Date
();
let
d
=
new
Date
();
let
d2
=
new
Date
(
d
.
setDate
(
d
.
getDate
()
+
1
));
let
startWeek
=
"周"
+
"日一二三四五六"
.
charAt
(
new
Date
().
getDay
());
let
endWeek
=
"周"
+
"日一二三四五六"
.
charAt
(
new
Date
().
getDay
()
+
1
);
let
month1
=
d1
.
getMonth
()
+
1
;
let
day1
=
d1
.
getDate
();
let
Month1
=
month1
>
9
?
month1
:
'0'
+
month1
;
let
Day1
=
day1
>
9
?
day1
:
'0'
+
day1
;
let
month2
=
d2
.
getMonth
()
+
1
;
let
day2
=
d2
.
getDate
();
let
Month2
=
month2
>
9
?
month2
:
'0'
+
month2
;
let
Day2
=
day2
>
9
?
day2
:
'0'
+
day2
;
var
obj
=
{
start
:
`
${
d1
.
getFullYear
()}
-
${
Month1
}
-
${
Day1
}
`
,
end
:
`
${
d2
.
getFullYear
()}
-
${
Month2
}
-
${
Day2
}
`
,
startDay
:
`
${
Month1
}
-
${
Day1
}
`
,
endDay
:
`
${
Month2
}
-
${
Day2
}
`
,
day
:
1
,
startWeek
:
startWeek
,
endWeek
:
endWeek
,
};
this
.
roomMsg
.
StartDate
=
obj
.
start
;
this
.
roomMsg
.
EndDate
=
obj
.
end
;
this
.
startDay
=
obj
.
startDay
;
this
.
endDay
=
obj
.
endDay
;
this
.
day
=
obj
.
day
;
this
.
dayObj
=
obj
;
}
if
(
this
.
id
>
0
)
{
this
.
getHotelDetail
(
this
.
id
);
}
if
(
options
.
searchObj
)
{
this
.
searchObj
=
JSON
.
parse
(
options
.
searchObj
);
}
this
.
getRecomHotel
();
this
.
getdidaMealType
()
this
.
initHotel
()
},
methods
:
{
goFacil
(
item
){
this
.
current
=
item
.
ID
;
this
.
scrollTop
=
this
.
old
.
scrollTop
this
.
$nextTick
(
function
()
{
this
.
scrollTop
=
item
.
top
});
},
openTime
()
{
this
.
showTimePopup
=
true
;
},
etChange
(
e
){
this
.
searchObj
.
childrenNumberZC
=
e
.
value
;
this
.
peopleChange
()
},
crChange
(
e
){
this
.
searchObj
.
adultsNumber
=
e
.
value
;
this
.
peopleChange
()
},
peopleChange
(){
this
.
searchObj
.
peoples
=
this
.
searchObj
.
adultsNumber
+
this
.
searchObj
.
childrenNumberZC
console
.
log
(
this
.
searchObj
.
peoples
,
'人数'
)
//日期格式化
getformatDateStr
(
value
)
{
var
dt
=
new
Date
(
value
);
let
year
=
dt
.
getFullYear
();
let
month
=
(
dt
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
"0"
);
let
date
=
(
dt
.
getDate
()).
toString
().
padStart
(
2
,
"0"
);
return
year
+
"-"
+
month
+
"-"
+
date
;
},
//获取推荐酒店
getRecomHotel
()
{
this
.
searchObj
.
HotelId
=
this
.
id
;
this
.
request2
(
{
url
:
"/api/Hotel/AppGetHotelPage"
,
data
:
this
.
searchObj
,
},
(
res
)
=>
{
//获取道旅餐食类型
getdidaMealType
()
{
this
.
apipost
(
'dmc_post_GetDidaMealType'
,
{},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
// console.log(res, '推荐酒店');
this
.
HotelArr
=
[];
let
tempHotel
=
res
.
data
.
pageData
;
tempHotel
.
forEach
((
x
)
=>
{
if
(
this
.
HotelArr
.
length
<
2
)
{
this
.
HotelArr
.
push
(
x
);
this
.
HotelMealTypes
=
res
.
data
;
}
});
},
null
)
},
//获取餐型
getMealtype
(
mealtypeId
)
{
let
mealtypeName
=
""
;
if
(
mealtypeId
>
0
)
{
this
.
HotelMealTypes
.
forEach
((
item
)
=>
{
if
(
item
.
ID
==
mealtypeId
)
{
mealtypeName
=
item
.
Name_CN
;
}
});
}
)
;
return
mealtypeName
;
},
goMap
(
name
,
lon
,
lat
)
{
let
newLon
=
parseFloat
(
lon
);
let
newLat
=
parseFloat
(
lat
);
uni
.
openLocation
({
latitude
:
newLat
,
longitude
:
newLon
,
scale
:
18
,
name
:
name
,
address
:
name
,
success
:
(
res
)
=>
{},
fail
:
(
err
)
=>
{},
initHotel
()
{
uni
.
showLoading
({
title
:
'加载中...'
,
mask
:
true
});
this
.
apipost
(
"dmc_post_GetDiDaPriceConfirm"
,
this
.
params
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
hideLoading
();
this
.
roomRateDetails
=
res
.
data
.
PriceDetails
.
HotelList
[
0
];
console
.
log
(
this
.
HotelInfo
.
HotelName
,
'酒店详情'
)
this
.
dataList
=
res
.
data
.
PriceDetails
;
}
});
},
openPicture
()
{
let
imgObj
=
JSON
.
stringify
(
this
.
dataList
.
HotelImg
);
let
imgObj
=
JSON
.
stringify
(
this
.
HotelInfo
.
images
);
uni
.
navigateTo
({
url
:
"/pages/hotel/picture?imgObj="
+
imgObj
,
});
},
openDescription
()
{
let
hotelObj
=
JSON
.
stringify
({
id
:
this
.
id
,
start
:
this
.
dayObj
.
start
,
end
:
this
.
dayObj
.
end
,
});
uni
.
navigateTo
({
url
:
"/pages/hotel/description?hotelObj="
+
encodeURIComponent
(
hotelObj
),
});
},
chosenDateResult
(
obj
)
{
this
.
roomMsg
.
StartDate
=
obj
.
start
;
this
.
roomMsg
.
EndDate
=
obj
.
end
;
this
.
startDay
=
obj
.
startDay
;
this
.
endDay
=
obj
.
endDay
;
this
.
day
=
obj
.
day
;
this
.
getRoomType
();
this
.
dayObj
=
obj
;
this
.
showTimePopup
=
false
;
},
//切换日期获取房型
getRoomType
()
{
this
.
request2
(
{
url
:
"/api/Hotel/GetHotelRoom"
,
data
:
this
.
roomMsg
,
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
RoomList
=
res
.
data
.
RoomList
;
}
}
);
},
formatMonthDay
(
str
)
{
let
temp
=
str
.
split
(
"-"
);
// temp[0] = temp[0] > 9 ? temp[0] : "0" + temp[0];
// temp[1] = temp[1] > 9 ? temp[1] : "0" + temp[1];
return
`
${
temp
[
0
]}
月
${
temp
[
1
]}
日`
;
},
getMonth
(
date
)
{
let
m
=
date
.
getMonth
()
+
1
;
return
m
>
9
?
m
:
"0"
+
m
;
...
...
@@ -493,66 +392,6 @@
var
week
=
weekArray
[
new
Date
(
date
).
getDay
()];
//注意此处必须是先new一个Date
return
"周"
+
week
;
},
changeNearbyType
(
t
)
{
this
.
nearbyType
=
t
;
},
//显示全部
getAllRoom
()
{
this
.
isShowAll
=
!
this
.
isShowAll
;
if
(
this
.
isShowAll
)
{
this
.
threeLevelList
.
forEach
((
x
)
=>
{
x
.
isCheck
=
1
;
});
this
.
RoomList
=
this
.
dataList
.
RoomList
;
}
else
{
this
.
threeLevelList
.
forEach
((
x
)
=>
{
x
.
isCheck
=
0
;
});
}
},
//点击过滤房间
changeRoomType
(
obj
)
{
if
(
obj
.
isCheck
==
0
)
{
obj
.
isCheck
=
1
;
}
else
{
obj
.
isCheck
=
0
;
}
this
.
RoomList
=
[];
let
num
=
0
;
this
.
threeLevelList
.
forEach
((
x
)
=>
{
if
(
x
.
isCheck
==
1
)
{
num
++
;
this
.
dataList
.
RoomList
.
forEach
((
y
)
=>
{
if
(
x
.
id
==
1
&&
y
.
BedType
==
1
)
{
this
.
RoomList
.
push
(
y
);
}
if
(
x
.
id
==
2
&&
y
.
BedType
==
2
)
{
this
.
RoomList
.
push
(
y
);
}
if
(
x
.
id
==
3
&&
y
.
BedType
==
3
)
{
this
.
RoomList
.
push
(
y
);
}
if
(
x
.
id
==
4
&&
y
.
BreakfastType
!=
4
)
{
this
.
RoomList
.
push
(
y
);
}
if
(
x
.
id
==
5
&&
y
.
IsCancel
==
2
)
{
this
.
RoomList
.
push
(
y
);
}
});
}
});
if
(
num
==
this
.
threeLevelList
.
length
)
{
this
.
isShowAll
=
true
;
}
else
{
this
.
isShowAll
=
false
;
}
if
(
num
==
0
)
{
this
.
RoomList
=
this
.
dataList
.
RoomList
;
}
},
changeLike
()
{
this
.
islike
=
!
this
.
islike
;
},
previewImage
(
i
)
{
uni
.
previewImage
({
urls
:
this
.
imgsList
,
...
...
@@ -598,41 +437,6 @@
delta
:
1
,
});
},
changeHandler
(
i
)
{
this
.
active
=
i
;
},
//获取酒店详情
getHotelDetail
(
id
)
{
let
msg
=
{
HotelId
:
id
,
StartDate
:
this
.
dayObj
.
start
,
EndDate
:
this
.
dayObj
.
end
,
};
this
.
request2
(
{
url
:
"/api/Hotel/GetHotelInfo"
,
data
:
msg
,
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
// console.log(res, '详情数据');
this
.
dataList
=
res
.
data
;
this
.
RoomList
=
this
.
dataList
.
RoomList
;
this
.
hotelData
.
HotelId
=
this
.
dataList
.
HotelId
;
this
.
hotelData
.
HotelName
=
this
.
dataList
.
HotelName
;
this
.
hotelData
.
Booking
=
this
.
dataList
.
Booking
;
setTimeout
(()
=>
{
this
.
hotelFacilities
.
forEach
((
x
)
=>
{
const
query
=
uni
.
createSelectorQuery
().
select
(
`#
${
x
.
val
}
`
);
query
.
boundingClientRect
((
rect
)
=>
{
x
.
top
=
rect
.
top
+
250
;
}).
exec
();
})
},
1000
);
}
}
);
},
// #ifdef MP-WEIXIN
//分享朋友圈
onShareTimeline
()
{
...
...
pages/jiuzhai/paysuccess.vue
View file @
556e6e34
...
...
@@ -73,6 +73,7 @@ export default {
});
}
else
if
(
this
.
isLineOrder
==
3
)
num
=
'6'
//签证订单
else
if
(
this
.
isLineOrder
==
4
)
num
=
'1'
//机票订单
else
if
(
this
.
isLineOrder
==
5
)
num
=
'8,9,10,11'
//酒店订单
if
(
num
){
uni
.
redirectTo
({
url
:
`/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=
${
num
}
`
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment