Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
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
viitto
million
Commits
331a59bd
Commit
331a59bd
authored
Dec 25, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
道旅酒店
parent
240fd202
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
324 additions
and
292 deletions
+324
-292
RoomCard.vue
src/components/hotaldida/RoomCard.vue
+9
-15
detailHotalDida.vue
src/pages/detailHotalDida.vue
+59
-3
orderForm.vue
src/pages/didaHotel/orderForm.vue
+256
-274
No files found.
src/components/hotaldida/RoomCard.vue
View file @
331a59bd
...
...
@@ -113,7 +113,7 @@
</div>
<div
:class=
"{'row justify-end':$q.platform.is.mobile}"
>
<q-btn
color=
"primary"
:size=
"$q.platform.is.desktop?'md':'sm'"
label=
"立即預訂"
unelevated
@
click=
"goOrderHandler(i
ndex,indexs
,subItem)"
@
click=
"goOrderHandler(i
tem
,subItem)"
:class=
"{'q-px-xs':$q.platform.is.desktop}"
/>
</div>
</div>
...
...
@@ -310,21 +310,15 @@
null
);
},
goOrderHandler
(
item
){
let
order
=
{
msg
:
this
.
msg
,
liveNvm
:
this
.
SimilarObj
.
liveNvm
,
roomOptionCd
:
item
,
goOrderHandler
(
item
,
subItem
){
subItem
=
{
RoomName_CN
:
item
.
RoomName_CN
,
RoomName
:
item
.
RoomName
,
imageList
:
item
.
imageList
,
...
subItem
}
let
key
=
this
.
$md5
(
JSON
.
stringify
(
order
))
let
pickuporderHotal
=
localStorage
.
getItem
(
'pickuporderHotalDida'
)
pickuporderHotal
=
pickuporderHotal
?
JSON
.
parse
(
pickuporderHotal
):[]
pickuporderHotal
.
push
({
key
,
order
})
localStorage
.
setItem
(
"pickuporderHotalDida"
,
JSON
.
stringify
(
pickuporderHotal
))
this
.
CommonJump
(
'/HotalDidaForm/'
+
key
,
{});
this
.
$emit
(
'placeOrder'
,
subItem
);
},
init
()
{
this
.
chooseObj
=
null
...
...
src/pages/detailHotalDida.vue
View file @
331a59bd
...
...
@@ -437,7 +437,7 @@
>
<div
class=
"col q-mr-lg"
>
<div
class=
"f30 bold row items-center"
>
<span
class=
"ellipsis-2-lines q-pr-lg"
>
{{
hotelSummary.hotelName
}}
</span>
<span
class=
"ellipsis-2-lines q-pr-lg"
>
{{
dataList.Name_CN
}}
</span>
<q-rating
v-model=
"roomReviewRating"
size=
"1em"
color=
"orange"
:max=
"roomReviewRating"
readonly
/>
</div>
...
...
@@ -575,6 +575,7 @@
:HotelRoomTypes=
"HotelRoomTypes"
:HotelMealTypes=
"HotelMealTypes"
@
change=
"changeChosenDateHandler"
@
placeOrder=
"placeOrderHandler"
ref=
"RoomCard"
></RoomCard>
...
...
@@ -676,6 +677,7 @@
:HotelRoomTypes=
"HotelRoomTypes"
:HotelMealTypes=
"HotelMealTypes"
@
change=
"changeChosenDateHandler"
@
placeOrder=
"placeOrderHandler"
ref=
"RoomCard"
></RoomCard>
</div>
...
...
@@ -1233,6 +1235,59 @@ export default {
document
.
getElementsByTagName
(
"body"
)[
0
].
style
=
""
;
},
methods
:
{
placeOrderHandler
(
item
){
// this.getDiDaPriceConfirmList(item)
let
order
=
{
msg
:
{
hotelId
:
this
.
msg
.
hotelId
,
CheckInDate
:
this
.
msg
.
CheckInDate
,
CheckOutDate
:
this
.
msg
.
CheckOutDate
,
ratePlanID
:
item
.
RatePlanID
,
RoomCount
:
this
.
roomGroup
,
AdultCount
:
this
.
numberOfAdults
,
childNum
:
this
.
numberOfChildren
,
searchroomGroup
:
this
.
msg
.
searchroomGroup
,
},
liveNvm
:
this
.
SimilarObj
.
liveNvm
,
roomOptionCd
:
item
,
detail
:
this
.
dataList
}
let
key
=
this
.
$md5
(
JSON
.
stringify
(
order
))
let
pickuporderHotal
=
localStorage
.
getItem
(
'pickuporderHotalDida'
)
pickuporderHotal
=
pickuporderHotal
?
JSON
.
parse
(
pickuporderHotal
):[]
pickuporderHotal
.
push
({
key
,
order
})
localStorage
.
setItem
(
"pickuporderHotalDida"
,
JSON
.
stringify
(
pickuporderHotal
))
this
.
CommonJump
(
'/HotalDidaForm/'
+
key
,
{});
},
// 获取道旅确认价格
getDiDaPriceConfirmList
(
item
){
let
msg
=
{
sort
:
1
,
displayFrom
:
1
,
CheckInDate
:
this
.
msg
.
CheckInDate
,
CheckOutDate
:
this
.
msg
.
CheckOutDate
,
searchroomGroup
:
this
.
msg
.
searchroomGroup
,
ratePlanID
:
item
.
RatePlanID
,
imgUrl
:
""
,
RoomCount
:
this
.
roomGroup
,
ChildCount
:
this
.
numberOfChildren
,
AdultCount
:
this
.
numberOfAdults
,
OccupancyDetails
:
[],
hotelId
:
this
.
msg
.
hotelId
,
}
this
.
apipost
(
'dmc_post_GetDiDaPriceConfirm'
,
msg
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
res
.
data
)
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
}
})
},
getQueryName
(
type
){
if
(
type
==
1
){
this
.
qMsg
.
RoomTypeName
=
this
.
qMsg
.
RoomTypeName
!=
'房型(全部)'
?
this
.
qMsg
.
RoomTypeName
:
''
...
...
@@ -1431,13 +1486,14 @@ export default {
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempObj
=
res
.
data
.
data
;
this
.
dataList
=
res
.
data
.
data
t
his
.
dataList
.
images
=
t
empObj
.
images
.
filter
(
x
=>
{
tempObj
.
images
.
filter
(
x
=>
{
this
.
checkImageExists
(
x
,
(
exists
)
=>
{
if
(
exists
){
this
.
images
.
push
(
x
)
}
});
})
this
.
dataList
.
images
=
this
.
images
if
(
tempObj
.
HotelFacilityList
&&
tempObj
.
HotelFacilityList
.
length
>
0
)
{
this
.
Facilities
=
tempObj
.
HotelFacilityList
;
}
...
...
@@ -1451,7 +1507,7 @@ export default {
// this.hotelDetails.hotelDescription.push(x.replace(/<
\
/?[^>]+(>|$)/g, ""))
// })
this.hotelDetails.hotelDescription = tempObj.description
this.roomReviewRating = Number(this.
hotelDetails.roomReview
Rating);
this.roomReviewRating = Number(this.
dataList.Star
Rating);
this.travelLngLat.push({
Lat: tempObj.Latitude,
Lng: tempObj.Longitude,
...
...
src/pages/didaHotel/orderForm.vue
View file @
331a59bd
...
...
@@ -73,82 +73,85 @@
<div
class=
"text-subtitle1 text-weight-bolder q-mb-md"
>
旅客資料
</div>
<div
class=
"row"
>
<q-img
:src=
"details.
roomRateDetails?details.roomRateDetails.roomImageURL
:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
:src=
"details.
imageList&&details.imageList.length?details.imageList[0]
:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
class=
"rounded-borders"
spinner-color=
"grey-3"
style=
"width: 80px"
/>
<div
class=
"q-ml-md col"
>
<div
class=
"text-subtitle1 ellipsis"
>
{{
details
.
hotelName
}}
{{
OrderDate
.
detail
.
Name_CN
}}
</div>
<div
class=
"text-caption text-grey-6 ellipsis q-mt-sm"
>
{{
details
.
access
}}
{{
OrderDate
.
detail
.
Address_CN
}}
</div>
</div>
</div>
<div
class=
"q-mt-md row"
>
<div
class=
"text-grey-9"
>
<q-icon
name=
"iconfont iconrili"
size=
"20px"
class=
"q-mr-sm"
/>
<span>
{{
msg
.
arrivalDate
}}
至
{{
msg
.
departure
Date
}}
</span>
<span>
{{
msg
.
CheckInDate
}}
至
{{
msg
.
CheckOut
Date
}}
</span>
</div>
<div
class=
"text-grey-9 q-ml-sm"
>
<span
class=
"text-grey-9 q-ml-sm"
>
<q-icon
name=
"iconfont icontime"
size=
"20px"
class=
"q-mr-xs q-ml-sm"
/>
<span
class=
"q-mr-sm"
>
住宿時間
{{
OrderDate
.
liveNvm
}}
晚
</span>
<span
v-if=
"details.roomRateDetails"
>
(
</span>
<span
class=
"text-grey-9"
v-if=
"msg.roomOptionCd"
>
(
<span
class=
"fz15 text-weight-bold"
>
<span
v-if=
"details.roomRateDetails.roomType==1"
>
{{
getGradeType
(
details
.
roomRateDetails
.
gradeType
)
}}
單人間
</span>
<span
v-if=
"details.roomRateDetails.roomType==2"
>
{{
getGradeType
(
details
.
roomRateDetails
.
gradeType
)
}}
雙人間
</span>
<span
v-if=
"details.roomRateDetails.roomType==3"
>
{{
getGradeType
(
details
.
roomRateDetails
.
gradeType
)
}}
大床房
</span>
<span
v-if=
"details.roomRateDetails.roomType==4"
>
{{
getGradeType
(
details
.
roomRateDetails
.
gradeType
)
}}
三人間
</span>
<span
v-if=
"details.roomRateDetails.roomType==5"
>
{{
getGradeType
(
details
.
roomRateDetails
.
gradeType
)
}}
四人間
</span>
<span
v-if=
"details.roomRateDetails.roomType==6"
>
{{
getGradeType
(
details
.
roomRateDetails
.
gradeType
)
}}
日式房
</span>
<span
v-if=
"details.roomRateDetails.roomType==7"
>
{{
getGradeType
(
details
.
roomRateDetails
.
gradeType
)
}}
日式+西式混合房
</span>
<span
v-if=
"details.roomRateDetails.roomType==8"
>
{{
getGradeType
(
details
.
roomRateDetails
.
gradeType
)
}}
大床房(小型)
</span>
<span
v-if=
"(details.roomRateDetails.roomType==9||details.roomRateDetails.roomType=='')&&details.roomRateDetails.gradeType==''"
>
未知房型
</span>
{{
msg
.
roomOptionCd
.
RoomName_CN
}}
</span>
<span
class=
"fz13 text-grey-6 q-ml-sm"
>
<span
v-if=
"details.roomRateDetails.smoking==0"
>
禁煙,
</span>
<span
v-if=
"details.roomRateDetails.smoking==1"
>
可吸煙,
</span>
<span
v-if=
"details.roomRateDetails.withBath==0"
>
無浴室
</span>
<span
v-if=
"details.roomRateDetails.withBath==1"
>
有浴室
</span>
<span
class=
"fz13 text-grey-6 q-ml-sm"
v-if=
"roomRateDetails.RatePlanList && roomRateDetails.RatePlanList.length > 0"
>
{{
getRoomType
(
roomRateDetails
.
RatePlanList
[
0
].
BedType
)
}}
<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
}}{{
$t
(
'salesModule.Fen'
)
}}
</
template
>
</template>
</template>
</span>
)
</span>
<q-icon
name=
"iconfont jinggao1"
size=
"20px"
/><span>
僅剩
{{
details
.
currentAllotment
}}
間
</span>
<span
class=
"text-grey-9"
>
<q-icon
name=
"iconfont jinggao1"
size=
"20px"
/><span>
<
template
v-if=
"roomRateDetails&&roomRateDetails.RatePlanList.length"
>
<template
v-for=
"(item, index) in roomRateDetails.RatePlanList"
>
僅剩
{{
item
.
InventoryCount
}}
間
</
template
>
</template>
</span>
<span
class=
"q-mr-sm"
></span>
<q-icon
name=
"iconfont iconpeople"
size=
"20px"
class=
"q-mr-xs q-ml-sm"
/>
<span
class=
"q-mr-sm"
>
成人 {{numberOfAdults}}
<span
class=
"q-pl-sm"
>
兒童 {{numberOfChildren}}
</span>
</span>
</div>
</span>
</div>
<div
class=
"rounded-borders bg-blue-1 q-px-md q-py-sm q-mt-sm column"
>
<!--
<span
class=
"text-orange-6 q-pb-xs"
>
超过13岁视为成人处理
</span>
-->
<!--
<span
class=
"text-green-6"
>
预定成功后房间将为您整晚保留
</span>
-->
<span
class=
"text-red-6 q-pb-xs"
>
所填姓名需和入住時所持證件一致
</span>
<span
class=
"text-orange-6 q-pb-xs"
v-if=
"(details.cancellationPeriod1==-1||details.cancellationPeriod1==0)&&(details.cancellationType1==1||details.cancellationType1==2)"
>
<template
v-if=
"details.cancellationPeriod1==-1"
>
沒有通知取消,
</
template
>
<
template
v-if=
"details.cancellationPeriod1==0"
>
入住當日取消,
</
template
>
<
template
v-if=
"details.cancellationType1==1"
>
手續費:
{{
details
.
cancellation1
}}
%
</
template
>
<
template
v-if=
"details.cancellationType1==2"
>
手續費:
{{
details
.
cancellation1
}}
</
template
>
<span
class=
"text-orange-6 q-pb-xs"
>
超过13岁视为成人处理
</span>
<span
class=
"text-green-6"
>
预定成功后房间将为您整晚保留
</span>
<span
class=
"text-red-6 q-pt-xs"
v-if=
"
roomRateDetails.CancellationPolicyList &&
roomRateDetails.CancellationPolicyList.length > 0
"
>
<span
v-for=
"(itemCancella, index1) in roomRateDetails.CancellationPolicyList"
>
<span
v-if=
"index1==0"
>
{{ getformatDateStr(itemCancella.FromDate) }}之前免費取消
</span>
<span
v-if=
"itemCancella.Amount==roomRateDetails.TotalPrice"
>
<span>
{{ getformatDateStr(itemCancella.FromDate) }}起不可取消,取消將收取訂單全額費用;
</span>
</span>
<span
v-else
>
<span>
{{ getformatDateStr(itemCancella.FromDate) }}
<span
v-if=
"index1!=(roomRateDetails.CancellationPolicyList.length-1)"
>
-
{{ getformatDateStr(roomRateDetails.CancellationPolicyList[index1+1].FromDate) }}
之間
</span>
取消,收費{{DanWei}}{{getPrice(itemCancella.Amount)}};
</span>
</span>
<span
class=
"text-green-6 q-pb-xs"
v-if=
"(details.cancellationPeriod2==-1||details.cancellationPeriod2==0)&&(details.cancellationType2==1||details.cancellationType2==2)"
>
<
template
v-if=
"details.cancellationPeriod2==-1"
>
沒有通知取消,
</
template
>
<
template
v-if=
"details.cancellationPeriod2==0"
>
入住當日取消,
</
template
>
<
template
v-if=
"details.cancellationType2==1"
>
手續費:
{{
details
.
cancellation2
}}
%
</
template
>
<
template
v-if=
"details.cancellationType2==2"
>
手續費:
{{
details
.
cancellation2
}}
</
template
>
</span>
<span
class=
"text-green-6"
v-if=
"(details.cancellationPeriod3==-1||details.cancellationPeriod3==0)&&(details.cancellationType3==1||details.cancellationType3==2)"
>
<
template
v-if=
"details.cancellationPeriod3==-1"
>
沒有通知取消,
</
template
>
<
template
v-if=
"details.cancellationPeriod3==0"
>
入住當日取消,
</
template
>
<
template
v-if=
"details.cancellationType3==1"
>
手續費:
{{
details
.
cancellation3
}}
%
</
template
>
<
template
v-if=
"details.cancellationType3==2"
>
手續費:
{{
details
.
cancellation3
}}
</
template
>
</span>
</div>
...
...
@@ -203,14 +206,14 @@
ref=
"guestAddress"
></q-input>
</div>
<div
:class=
"filedGuestWidth"
>
<
!-- <
div :class="filedGuestWidth">
<q-input
class="q-pb-md"
standout
:value=
"parameters.
checkInTim
e"
:value="parameters.
CheckInDat
e"
label="入住時間"
:rules="[(val) => !!val || `請选入住時間`]"
ref=
"
checkInTim
e"
ref="
CheckInDat
e"
readonly
>
<template v-slot:append>
...
...
@@ -218,58 +221,57 @@
</template>
<q-popup-proxy :offset="[0, 0]" ref="qDateProxy">
<div class="row">
<q-time
format24h
v-model=
"parameters.
checkInTim
e"
mask=
"HH:mm"
<q-time format24h v-model="parameters.
CheckInDat
e" mask="HH:mm"
@input="()=>$refs.qDateProxy.hide()"/>
</div>
</q-popup-proxy>
</q-input>
</div>
</div>
-->
</div>
</div>
<q-separator
color=
"grey-2"
class=
"q-mt-md"
/>
<div
class=
"bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
v-for=
"(x,i) in parameters.
roomGroup
"
v-for=
"(x,i) in parameters.
GuestList
"
:key=
"i"
>
<div
class=
"text-subtitle1 q-pb-md text-weight-bold"
>
房間{{ x.
roomCount
}}
房間{{ x.
RoomNum
}}
</div>
<div
class=
"row q-col-gutter-md"
>
<div
class=
"row q-col-gutter-md"
v-for=
"(y,index) in x.GuestInfo"
:class=
"[index!=x.GuestInfo.length-1?'q-mb-md':'']"
>
<div
:class=
"filedGuestWidth"
>
<q-input
standout
v-model=
"
x.roomMaleCount
"
label=
"
成人男
"
v-model=
"
y.LastName
"
label=
"
英文姓
"
placeholder=
""
mask=
"
#
"
mask=
"
A
"
reverse-fill-mask
:ref=
"`guest${i}Male`"
:ref=
"`guest${i}
_${index}
Male`"
/>
<!-- :ref="`guest${i}Male`" :rules="[(val) => !!val || '請輸成人數']"-->
</div>
<div
:class=
"filedGuestWidth"
>
<q-input
standout
v-model=
"
x.roomFemaleCount
"
label=
"
成人女
"
v-model=
"
y.FirstName
"
label=
"
英文名
"
placeholder=
""
mask=
"
#
"
mask=
"
A
"
reverse-fill-mask
:ref=
"`guest${i}Female`"
:ref=
"`guest${i}
_${index}
Female`"
/>
<!-- :ref="`guest${i}Female`" :rules="[(val) => !!val || '請輸成人女數']"-->
</div>
<div
:class=
"filedGuestWidth"
>
<q-input
standout
v-model=
"
x.roomChildCount
"
label=
"
兒童
"
v-model=
"
y.Age
"
label=
"
年龄(兒童必填)
"
placeholder=
""
mask=
"#"
reverse-fill-mask
:disable=
"!numberOfChildren?true:false"
:disable=
"!
y.
numberOfChildren?true:false"
/>
<!-- :rules="[(val) => !!val || '請輸儿童數']" -->
</div>
...
...
@@ -315,10 +317,10 @@
/>
<div
class=
"q-ml-md col"
>
<div
class=
"text-subtitle1 ellipsis"
>
{{details.
hotelName
}}
{{details.
Name_CN
}}
</div>
<div
class=
"text-caption text-grey-6 ellipsis q-mt-sm"
>
{{details.
access
}}
{{details.
Address_CN
}}
</div>
</div>
</div>
...
...
@@ -327,22 +329,26 @@
<div
style=
"width: 80px"
>
入住時間:
</div>
<div
class=
"q-ml-md"
>
{{
checkInTim
eH}}
{{
CheckInDat
eH}}
{{details.roomRateDetails.roomOptions['check-inStartTime']}} 之後
</br>
{{
checkInTim
eQ+' '+details.roomRateDetails.roomOptions['finalCheck-outTime']}} 之前
{{
CheckInDat
eQ+' '+details.roomRateDetails.roomOptions['finalCheck-outTime']}} 之前
</div>
</div>
</div>
<q-separator
color=
"grey-2"
class=
"q-my-md"
/>
<div
class=
"text-grey-9"
>
<
template
v-for=
"(x,i) in details.roomGroup"
>
<template
v-for=
"y in x.rateGroup"
>
<div
class=
"row q-mb-sm"
>
<div
class=
"col"
>
{{
y
.
stayDate
}}
</div>
<
template
v-for=
"(x,i) in parameters.GuestList"
>
<div
class=
"row justify-between q-mb-sm"
>
<span>
房間
{{
x
.
RoomNum
}}
</span>
<span>
1間 *
{{
DanWei
}}{{
Price
}}
</span>
</div>
<template
v-for=
"y in x.GuestInfo"
>
<div
class=
"row q-mb-sm"
v-if=
"y.LastName!=''||y.FirstName!=''"
>
<div
class=
"col"
>
{{
y
.
LastName
}}
{{
y
.
FirstName
}}
</div>
<div>
<span
v-if=
"y.perAdultRateBySetCurrency"
>
CNY
{{
y
.
perAdultRateBySetCurrency
}}
/
人
</span>
<span
v-
else=
"y.totalPerRoomRateBySetCurrency"
>
CNY
{{
y
.
totalPerRoomRateBySetCurrency
}}
/晚
</span>
<span
>
1成
人
</span>
<span
v-
if=
"y.numberOfChildren"
>
1兒童
</span>
</div>
</div>
</
template
>
...
...
@@ -354,7 +360,7 @@
<div
class=
"row q-mb-sm items-center"
>
<div
class=
"col"
>
總金額
</div>
<div
class=
"text-subtitle2 text-weight-bolder text-primary"
>
CNY
{{ moneyFormat(sumPrice, 2) }}
{{ DanWei }}
{{ moneyFormat(sumPrice, 2) }}
</div>
</div>
<hr
style=
"border:none;border-top:1px dashed #EEE !important;"
class=
"bg-transparent q-mb-sm"
/>
...
...
@@ -364,14 +370,14 @@
class=
"text-subtitle2 text-weight-bolder text-teal"
v-if=
"parameters.DiscountMoney > 0"
>
CNY
- {{ moneyFormat(parameters.DiscountMoney, 2) }}
{{ DanWei }}
- {{ moneyFormat(parameters.DiscountMoney, 2) }}
</div>
<div
class=
"text-grey-5"
v-else
>
暫無優惠
</div>
</div>
<div
class=
"row q-mb-sm items-center"
>
<div
class=
"col"
>
支付金額
</div>
<div
class=
"text-h6 text-weight-bolder text-primary product-price"
>
CNY {{ moneyFormat(parameters.totalChargeableRateInfo
, 2) }}
{{ DanWei }} {{ moneyFormat(parameters.TotalPrice
, 2) }}
</div>
</div>
</div>
...
...
@@ -442,13 +448,26 @@ export default {
countrys
:
[],
areaCodes
:
[],
loading
:
false
,
msg
:
null
,
msg
:{
sort
:
1
,
displayFrom
:
1
,
CheckInDate
:
""
,
CheckOutDate
:
""
,
searchroomGroup
:
[],
ratePlanID
:
""
,
imgUrl
:
""
,
RoomCount
:
1
,
ChildCount
:
0
,
AdultCount
:
1
,
OccupancyDetails
:
[],
hotelId
:
0
},
JapanIncrease
:
null
,
numberOfAdults
:
0
,
numberOfChildren
:
0
,
roomRateDetails
:
[],
checkInTim
eH
:
''
,
checkInTim
eQ
:
''
,
CheckInDat
eH
:
''
,
CheckInDat
eQ
:
''
,
price
:
0
,
guest
:
{
roomCount
:
0
,
//房间编号
...
...
@@ -465,40 +484,36 @@ export default {
price
:
0
,
SettlementPrice
:
0
,
//实付
parameters
:
{
dataId
:
''
,
//订单id
hotelId
:
''
,
//酒店id
totalRoomCount
:
''
,
//使用客房总数
arrivalDate
:
''
,
//开始时间
checkInTime
:
''
,
//入住时间
departureDate
:
''
,
//结束时间
roomOptionCd
:
''
,
//房间计划CD
totalChargeableRateInfo
:
''
,
//人民币合计费用
guestRequestAppendix
:
0
,
//费用合计(日元)
totalPriceJapanese
:
''
,
//日元合计费用
comment
:
''
,
//评论
roomGroup
:[],
//每天住宿的费用明细
guestLastName
:
''
,
//姓
guestFirstName
:
''
,
//名
guestAddress
:
''
,
//住宿代表地址
guestPhoneNumber
:
''
,
//住宿代表电话
guestEmail
:
''
,
//住宿代表Email
EmployeeIdStr
:
""
,
CheckInDate
:
""
,
RatePlanID
:
""
,
CheckOutDate
:
""
,
RoomCount
:
""
,
guestLastName
:
""
,
guestFirstName
:
""
,
guestAddress
:
""
,
guestPhoneNumber
:
""
,
guestEmail
:
""
,
BookingID
:
""
,
HotelName
:
""
,
HotelPic
:
""
,
GuestList
:
[],
TotalPrice
:
0
,
CustomerPayMoney
:
0
,
DiscountMoney
:
0
,
OrderSource
:
2
,
OrderForm
:
1
,
//备注
guestRequest
:
''
,
CustomerId
:
0
,
HotelName
:
''
,
//酒店名称
HotelPic
:
''
,
//酒店图片
EmployeeIdStr
:
''
,
OldTotalPrice
:
0
,
CustomerPayMoney
:
0
,
DiscountMoney
:
0
,
//优惠
OrderSource
:
3
,
//类型 1 来源内部 2 来源B2B 3 来源B2C
OrderForm
:
1
,
CouponAllotIds
:
''
,
guestRequest
:
""
,
hotelId
:
''
,
roomType
:
0
,
RoomName
:
""
,
//房型名称
},
TotalPeople
:
0
,
//总人数
HotelRoomTypes
:
[],
//道旅床类型
HotelMealTypes
:
[],
//道旅餐食类型
DanWei
:
''
,
//单位
};
},
computed
:
{
...
...
@@ -521,8 +536,9 @@ export default {
this
.
getData
()
}
// this.initGuestHandler();
// this.getUserInfoHandler()
this
.
getdidaBedType
()
this
.
getdidaMealType
()
this
.
getUserInfoHandler
()
},
methods
:
{
//获取道旅床类型列表
...
...
@@ -564,6 +580,18 @@ export default {
});
}
return
roomtypeName
;
},
//获取餐型
getMealtype
(
mealtypeId
)
{
let
mealtypeName
=
""
;
if
(
mealtypeId
>
0
)
{
this
.
HotelMealTypes
.
forEach
((
item
)
=>
{
if
(
item
.
ID
==
mealtypeId
)
{
mealtypeName
=
item
.
Name_CN
;
}
});
}
return
mealtypeName
;
},
changeDiscountHandler
(
coupon
)
{
if
(
coupon
)
{
...
...
@@ -593,125 +621,62 @@ export default {
let
date
=
(
dt
.
getDate
()).
toString
().
padStart
(
2
,
"0"
);
return
month
+
"-"
+
date
+
"("
+
this
.
WeekList
[
dt
.
getDay
()]
+
")"
;
},
//日期格式化
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
;
},
getPrice
(
price
)
{
return
Math
.
ceil
(
price
);
},
// 获取商品详情
getData
()
{
this
.
$q
.
loading
.
show
();
this
.
apipost
(
"dmc_post_GetDiDaPriceConfirm"
,
this
.
msg
,
(
r
)
=>
{
(
r
es
)
=>
{
this
.
$q
.
loading
.
hide
();
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
details
=
r
.
data
.
data
;
this
.
parameters
.
HotelName
=
this
.
details
.
hotelName
this
.
parameters
.
HotelPic
=
this
.
details
.
roomRateDetails
.
roomImageURL
this
.
JapanIncrease
=
r
.
data
.
data
.
JapanIncrease
if
(
Object
.
prototype
.
toString
.
call
(
this
.
details
.
roomGroup
)
==
'[object Object]'
){
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
.
PriceDetails
;
this
.
roomRateDetails
=
res
.
data
.
data
.
PriceDetails
.
HotelList
[
0
];
this
.
parameters
.
BookingID
=
res
.
data
.
data
.
PriceDetails
.
ReferenceNo
;
this
.
parameters
.
CheckInDate
=
res
.
data
.
data
.
PriceDetails
.
CheckInDate
;
this
.
parameters
.
TotalPrice
=
this
.
roomRateDetails
.
TotalPrice
;
this
.
parameters
.
RoomCount
=
this
.
msg
.
RoomCount
;
this
.
DanWei
=
res
.
data
.
data
.
PriceDetails
.
HotelList
[
0
].
RatePlanList
[
0
].
Currency
;
if
(
Object
.
prototype
.
toString
.
call
(
this
.
dataList
.
HotelList
)
==
"[object Object]"
)
{
let
arr
=
[];
arr
.
push
(
this
.
d
etails
.
roomGroup
);
this
.
d
etails
.
roomGroup
=
arr
;
arr
.
push
(
this
.
d
ataList
.
HotelList
);
this
.
d
ataList
.
HotelList
=
arr
;
}
this
.
TotalChildCount
=
0
;
let
rateGrouoLen
=
0
;
//无价格 只有房间价格
this
.
sumPrice
=
0
this
.
parameters
.
totalChargeableRateInfo
=
0
this
.
parameters
.
totalPriceJapanese
=
0
this
.
details
.
roomGroup
.
forEach
((
x
,
index
)
=>
{
if
(
Object
.
prototype
.
toString
.
call
(
x
.
rateGroup
)
==
'[object Object]'
){
let
arr
=
[];
arr
.
push
(
x
.
rateGroup
);
x
.
rateGroup
=
arr
;
}
let
tt
=
0
;
let
tt2
=
0
;
let
AdultTotalPrice
=
0
;
let
childToTalPrice
=
0
;
let
AdultCount
=
0
;
let
childCount
=
0
;
let
AdultJapanPrice
=
0
;
let
ChildJapanPrice
=
0
;
let
AdultJapanCount
=
0
;
let
childJapanCount
=
0
;
//原始成人
let
oldAount
=
0
;
let
childAount
=
0
;
let
oldAuditPrice
=
0
;
let
oldChildPrice
=
0
;
this
.
TotalChildCount
+=
x
.
roomChildCount
*
x
.
rateGroup
.
length
;
rateGrouoLen
+=
x
.
rateGroup
.
length
;
this
.
chekedChildCount
=
this
.
numberOfChildren
*
rateGrouoLen
;
if
(
this
.
TotalChildCount
<
this
.
chekedChildCount
){
this
.
isBaoChild
=
true
;
}
let
onlyRoomPrice
=
0
;
let
onlyJanpnase
=
0
;
x
.
rateGroup
.
forEach
(
z
=>
{
if
(
z
.
perAdultRateBySetCurrency
){
z
.
oldAuditPrice
=
z
.
perAdultRateBySetCurrency
;
z
.
oldchildPrice
=
z
.
perChildRateBySetCurrency
;
z
.
perAdultRateBySetCurrency
=
Math
.
ceil
(
z
.
perAdultRateBySetCurrency
/
this
.
details
.
JapanIncrease
);
z
.
perChildRateBySetCurrency
=
Math
.
ceil
(
z
.
perChildRateBySetCurrency
/
this
.
details
.
JapanIncrease
);
if
(
x
.
roomAdultCount
>
0
){
AdultTotalPrice
+=
parseFloat
(
z
.
perAdultRateBySetCurrency
);
oldAuditPrice
+=
parseFloat
(
z
.
oldAuditPrice
);
AdultJapanPrice
+=
parseFloat
(
z
.
perAdultRate
);
}
if
(
x
.
roomChildCount
>
0
){
childToTalPrice
+=
parseFloat
(
z
.
perChildRateBySetCurrency
);
oldChildPrice
+=
parseFloat
(
z
.
oldchildPrice
);
ChildJapanPrice
+=
parseFloat
(
z
.
perChildRate
);
}
}
if
(
z
.
totalPerRoomRateBySetCurrency
){
z
.
totalPerRoomRateBySetCurrency
=
Math
.
ceil
(
z
.
totalPerRoomRateBySetCurrency
/
this
.
details
.
JapanIncrease
);
onlyRoomPrice
+=
parseFloat
(
z
.
totalPerRoomRateBySetCurrency
);
onlyJanpnase
+=
parseFloat
(
z
.
totalPerRoomRate
);
}
if
(
z
.
perAdultRateBySetCurrency
){
this
.
sumPrice
+=
Number
(
z
.
perAdultRateBySetCurrency
)
}
else
if
(
z
.
totalPerRoomRateBySetCurrency
){
this
.
sumPrice
+=
Number
(
z
.
totalPerRoomRateBySetCurrency
)
}
})
AdultCount
+=
AdultTotalPrice
*
x
.
roomAdultCount
;
childCount
+=
childToTalPrice
*
x
.
roomChildCount
;
// AdultCount+=AdultTotalPrice;
// childCount+=childToTalPrice;
oldAount
+=
oldAuditPrice
;
childAount
+=
childAount
;
this
.
parameters
.
totalChargeableRateInfo
+=
parseFloat
(
AdultCount
+
childCount
+
onlyRoomPrice
);
this
.
parameters
.
OldTotalPrice
+=
parseFloat
(
oldAount
+
childAount
+
onlyRoomPrice
);
AdultJapanCount
+=
AdultJapanPrice
*
x
.
roomAdultCount
;
childJapanCount
+=
ChildJapanPrice
*
x
.
roomChildCount
;
this
.
SettlementPrice
=
this
.
parameters
.
totalChargeableRateInfo
;
this
.
SettlementPrice
=
this
.
parameters
.
totalChargeableRateInfo
;
this
.
price
=
this
.
parameters
.
totalChargeableRateInfo
;
// AdultJapanCount+=AdultJapanPrice;
// childJapanCount+=ChildJapanPrice;
this
.
parameters
.
roomGroup
[
index
].
rateGroup
=
x
.
rateGroup
this
.
parameters
.
totalPriceJapanese
+=
parseFloat
(
AdultJapanCount
+
childJapanCount
+
onlyJanpnase
);
this
.
details
=
{
...
this
.
OrderDate
.
roomOptionCd
,
...
res
.
data
.
data
};
this
.
sumPrice
=
0
this
.
roomRateDetails
.
RatePlanList
[
0
].
PriceList
.
forEach
((
item
)
=>
{
this
.
sumPrice
+=
(
this
.
parameters
.
GuestList
.
length
*
Number
(
item
.
Price
))
this
.
Price
=
Number
(
item
.
Price
)
})
let
hTIme
=
date
.
formatDate
(
date
.
addToDate
(
new
Date
(
this
.
parameters
.
arrivalDate
),
{
days
:
1
}),
'YYYY/MM/DD'
)
let
qTime
=
date
.
formatDate
(
date
.
addToDate
(
new
Date
(
hTIme
),
{
days
:
-
1
}),
'YYYY/MM/DD'
)
this
.
checkInTimeH
=
qTime
this
.
checkInTimeQ
=
hTIme
console
.
log
(
this
.
roomRateDetails
,
'-------"dmc_post_GetDiDaPriceConfirm"'
)
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
)
this
.
$message
.
error
(
res
.
data
.
message
)
this
.
CommonJump
(
'/detailHotalDida'
,
{
id
:
this
.
msg
.
hotelId
,
qsearchKey
:
this
.
OrderDate
.
detail
.
Name_CN
,
qsearchDate
:
this
.
msg
.
CheckInDate
,
qsearchEndDate
:
this
.
msg
.
CheckOutDate
,
});
}
},
...
...
@@ -723,38 +688,49 @@ export default {
if
(
this
.
$route
.
params
&&
this
.
$route
.
params
.
id
)
{
let
key
=
this
.
$route
.
params
.
id
;
let
pickuporderHotal
=
localStorage
.
getItem
(
"pickuporderHotalDida"
);
pickuporderHotal
=
pickuporderHotal
?
JSON
.
parse
(
pickuporderHotal
)
:
[];
if
(
pickuporderHotal
.
length
>
0
)
{
this
.
order
=
pickuporderHotal
.
find
((
x
)
=>
x
.
key
==
key
);
if
(
this
.
order
)
{
this
.
orderKey
=
key
;
this
.
OrderDate
=
this
.
order
.
order
this
.
msg
=
this
.
OrderDate
.
msg
this
.
parameters
.
arrivalDate
=
this
.
msg
.
arrivalDate
this
.
parameters
.
departureDate
=
this
.
msg
.
departureDate
this
.
parameters
.
totalRoomCount
=
this
.
msg
.
searchroomGroup
.
length
this
.
parameters
.
roomGroup
=
[];
for
(
let
i
=
0
;
i
<
this
.
parameters
.
totalRoomCount
;
i
++
){
var
obj
=
{
roomCount
:
i
+
1
,
roomMaleCount
:
0
,
roomFemaleCount
:
0
,
roomChildCount
:
0
,
roomInfantCount
:
0
,
rateGroup
:[]
}
this
.
parameters
.
roomGroup
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
obj
)))
this
.
msg
=
{
...
this
.
msg
,
...
this
.
OrderDate
.
msg
}
this
.
numberOfAdults
=
0
this
.
numberOfChildren
=
0
,
this
.
msg
.
roomOptionCd
=
this
.
OrderDate
.
roomOptionCd
this
.
parameters
.
roomOptionCd
=
this
.
OrderDate
.
roomOptionCd
this
.
parameters
.
hotelId
=
this
.
msg
.
hotelId
this
.
msg
.
searchroomGroup
.
forEach
(
x
=>
{
console
.
log
(
this
.
OrderDate
.
detail
,
'--------this.msg'
)
this
.
parameters
.
GuestList
=
[]
this
.
msg
.
searchroomGroup
.
forEach
((
x
,
index
)
=>
{
this
.
numberOfAdults
+=
Number
(
x
.
numberOfAdults
)
this
.
numberOfChildren
+=
Number
(
x
.
numberOfChildren
)
var
guestInfoList
=
[];
let
allprople
=
x
.
numberOfAdults
+
x
.
numberOfChildren
for
(
let
i
=
0
;
i
<
allprople
;
i
++
)
{
let
obj
=
{
LastName
:
""
,
FirstName
:
""
,
Age
:
""
};
guestInfoList
.
push
(
obj
);
}
var
obj
=
{
RoomNum
:
index
+
1
,
numberOfAdults
:
x
.
numberOfAdults
,
numberOfChildren
:
x
.
numberOfChildren
,
GuestInfo
:
guestInfoList
};
this
.
parameters
.
GuestList
.
push
(
obj
);
})
console
.
log
(
this
.
parameters
.
GuestList
,
'--------this.parameters.GuestList'
)
}
}
}
...
...
@@ -769,40 +745,48 @@ export default {
return
this
.
orderKey
!=
""
;
},
async
submit
()
{
let
roomGroupLen
=
this
.
msg
.
searchroomGroup
.
length
;
//判断选择的人数与入住人数
let
Count1
=
0
let
roomGroup
=
this
.
parameters
.
roomGroup
let
roomGroup
=
this
.
parameters
.
GuestList
roomGroup
.
forEach
(
x
=>
{
Count1
+=
Number
(
x
.
roomMaleCount
)
+
Number
(
x
.
roomFemaleCount
)
+
Number
(
x
.
roomChildCount
)
Count1
+=
Number
(
x
.
numberOfAdults
)
+
Number
(
x
.
numberOfChildren
)
})
let
Count2
=
this
.
numberOfChildren
Number
?
this
.
numberOfChildrenNumber
:
0
;
Count2
=
Number
(
this
.
numberOfAdults
);
let
Count2
=
this
.
numberOfChildren
?
this
.
numberOfChildren
:
0
;
Count2
+
=
Number
(
this
.
numberOfAdults
);
if
(
Count1
!=
Count2
){
this
.
$message
.
error
(
'入住人數與總入住數不匹配'
);
return
;
}
for
(
let
i
=
0
;
i
<
roomGroup
.
length
;
i
++
)
{
roomGroup
[
i
].
roomMaleCount
=
roomGroup
[
i
].
roomMaleCount
?
roomGroup
[
i
].
roomMaleCount
:
0
roomGroup
[
i
].
roomFemaleCount
=
roomGroup
[
i
].
roomFemaleCount
?
roomGroup
[
i
].
roomFemaleCount
:
0
roomGroup
[
i
].
roomChildCount
=
roomGroup
[
i
].
roomChildCount
?
roomGroup
[
i
].
roomChildCount
:
0
if
(
!
roomGroup
[
i
].
roomMaleCount
&&!
roomGroup
[
i
].
roomMaleCount
){
if
(
!
roomGroup
[
i
].
numberOfAdults
){
this
.
$message
.
error
(
'一個房間至少入住一人'
);
return
;
}
}
this
.
parameters
.
CustomerId
=
this
.
userInfo
.
Id
;
this
.
parameters
.
EmployeeIdStr
=
this
.
userInfo
.
Surname
+
this
.
userInfo
.
Name
this
.
parameters
.
EmployeeIdStr
=
this
.
userInfo
.
Id
//`${this.userInfo.Surname?this.userInfo.Surname:''}${this.userInfo.Name?this.userInfo.Name:' '}`
console
.
log
(
this
.
parameters
,
'--------this.parameters.EmployeeIdStr'
)
this
.
$refs
.
mail
.
validate
()
this
.
$refs
.
SurName
.
validate
()
this
.
$refs
.
Name
.
validate
()
this
.
$refs
.
Mobile
.
validate
()
this
.
$refs
.
guestAddress
.
validate
()
this
.
$refs
.
checkInTim
e
.
validate
()
// this.$refs.CheckInDat
e.validate()
this
.
parameters
.
guestEmail
=
this
.
userInfo
.
Mailbox
for
(
let
i
=
0
;
i
<
this
.
parameters
.
GuestList
.
length
;
i
++
)
{
let
GuestList
=
this
.
parameters
.
GuestList
[
i
]
for
(
let
j
=
0
;
j
<
GuestList
.
GuestInfo
.
length
;
j
++
)
{
let
GuestInfo
=
GuestList
.
GuestInfo
[
j
]
if
(
GuestInfo
.
LastName
==
''
||
GuestInfo
.
FirstName
==
''
){
this
.
$message
.
error
(
'請填寫姓或名'
);
return
;
}
}
}
...
...
@@ -823,7 +807,7 @@ export default {
SetCarOrder
(){
this
.
loading
=
true
this
.
apipost
(
"dmc_post_Get
JAPAN_HotelBookingB2C
"
,
"dmc_post_Get
DiDaBookingConfirm
"
,
this
.
parameters
,
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
...
...
@@ -846,11 +830,11 @@ export default {
ContactNumber
:
this
.
parameters
.
guestPhoneNumber
?
this
.
parameters
.
guestPhoneNumber
:
this
.
userInfo
.
Mobile
,
// 联系电话
Mailbox
:
this
.
parameters
.
guestEmail
?
this
.
parameters
.
guestEmail
:
this
.
userInfo
.
Mailbox
,
//邮箱
GoodsId
:
this
.
parameters
.
hotelId
,
//商品id
GoodsName
:
this
.
parameters
.
HotelName
,
//商品名称
GoodsPic
:
this
.
parameters
.
HotelPic
,
//商品图片
GoodsName
:
this
.
OrderDate
.
dateil
.
Name_CN
,
//商品名称
GoodsPic
:
this
.
OrderDate
.
dateil
.
images
[
0
]
,
//商品图片
GoodsType
:
this
.
productType
,
OrderMake
:
this
.
parameters
.
arrival
Date
,
//订单摘要(例如出行时间)
TotalPrice
:
this
.
parameters
.
totalChargeableRateInfo
,
//总价格
OrderMake
:
this
.
parameters
.
CheckIn
Date
,
//订单摘要(例如出行时间)
TotalPrice
:
this
.
parameters
.
TotalPrice
,
//总价格
PreferentialPrice
:
this
.
parameters
.
DiscountMoney
,
// 优惠总金额
ErpOrderId
:
ErpOrderId
,
//erp订单id
Country
:
this
.
userInfo
.
Country
,
//国家id
...
...
@@ -904,9 +888,6 @@ export default {
//
seekedChangeHandler
(
e
)
{
},
initGuestHandler
()
{
},
//获取价格
getPrice
(
price
)
{
...
...
@@ -968,6 +949,7 @@ export default {
this
.
apipost
(
"GetCustomerInfo_post"
,
{
Id
:
u
.
id
},
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
userInfo
=
r
.
data
.
data
;
console
.
log
(
this
.
userInfo
,
'-----------'
);
if
(
r
.
data
.
data
.
Moblie
){
this
.
parameters
.
guestEmail
=
r
.
data
.
data
.
Moblie
this
.
userInfo
.
Mobile
=
r
.
data
.
data
.
Moblie
...
...
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