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
4f8de789
Commit
4f8de789
authored
Mar 09, 2023
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/million
parents
0948bf45
b82b8064
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
2391 additions
and
73 deletions
+2391
-73
App.vue
src/App.vue
+1
-1
orderPreview.vue
src/components/ScenicSpotTicket/orderPreview.vue
+265
-0
kkday.vue
src/components/searchdata/kkday.vue
+6
-0
smaple.vue
src/components/trip/smaple.vue
+1
-0
details.vue
src/pages/ScenicSpotTicket/details.vue
+1117
-0
orderForm.vue
src/pages/ScenicSpotTicket/orderForm.vue
+986
-0
detailsCar.vue
src/pages/detailsCar.vue
+4
-69
detailsNew.vue
src/pages/detailsNew.vue
+3
-3
routes.js
src/router/routes.js
+8
-0
No files found.
src/App.vue
View file @
4f8de789
...
...
@@ -10,7 +10,7 @@ export default {
};
</
script
>
<
style
>
@import
url("//at.alicdn.com/t/c/font_1890699_
l4zj0bx0p69
.css")
;
@import
url("//at.alicdn.com/t/c/font_1890699_
sm7qminrp2
.css")
;
@font-face
{
font-family
:
"oswald"
;
src
:
url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf")
;
...
...
src/components/ScenicSpotTicket/orderPreview.vue
0 → 100644
View file @
4f8de789
<
template
>
<div
class=
"column full-height"
>
<div
class=
"col"
>
<div
class=
"text-right"
v-if=
"$q.platform.is.desktop"
>
<q-btn
color=
"primary"
icon=
"refresh"
label=
"全部重選"
@
click=
"resetHandler"
flat
/>
</div>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇門票類型
</div>
<div
class=
"row wrap"
>
<div
v-for=
"(x,i) in dataList.TicketList"
:key=
"i"
>
<q-chip
size=
"14px"
clickable
@
click=
"handleSelect(x)"
:text-color=
"selectedObj&&selectedObj.Id==x.Id?'white':'dark'"
:color=
"selectedObj&&selectedObj.Id==x.Id?'primary':'grey-3'"
square
>
{{
x
.
TicketName
}}
</q-chip>
</div>
</div>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇數量
</div>
<div
class=
"row items-end"
>
<div
class=
"col"
:class=
"
{'column':$q.platform.is.mobile}">
<div
v-if=
"selectedObj"
>
<span
class=
"text-subtitle2 text-weight-bold"
>
{{
selectedObj
.
TicketName
}}
</span>
<span
class=
"text-grey-6 f12 q-ml-sm"
></span>
(1人/票)
</span>
</div>
<div
v-if=
"$q.platform.is.mobile"
>
<span
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY
{{
moneyFormat
(
p
.
originalB2CPrice
,
0
)
}}
/每票
</span>
</div>
</div>
<div
class=
"row items-end"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY
{{
moneyFormat
(
p
.
originalB2CPrice
,
0
)
}}
/每票
</span>
<q-input
style=
"width: 150px"
@
input=
"changePeople"
v-model=
"chosenObj.Count"
class=
"col"
:class=
"
{
'q-ml-sm q-px-none q-pl-none': $q.platform.is.desktop,
}"
mask="#"
reverse-fill-mask
dense
standout
readonly
>
<template
v-slot:prepend
>
<q-btn
color=
"primary"
size=
"sm"
class=
"q-px-none"
flat
icon=
"remove"
@
click=
"addPeople('Count', -1)"
/>
</
template
>
<
template
v-slot:append
>
<q-btn
color=
"primary"
size=
"sm"
class=
"q-px-none"
flat
icon=
"add"
@
click=
"addPeople('Count', 1)"
/>
</
template
>
</q-input>
</div>
</div>
</div>
<div
class=
"q-mt-md q-pt-md"
style=
"border-top: 1px dashed #eee"
>
<div
class=
"row items-center"
>
<span
class=
"text-subtitle2 text-grey-6 col"
>
總金額
</span>
<span
class=
"text-h6 text-primary product-price"
>
CNY {{ moneyFormat(sumPrice,0) }}
</span>
</div>
<div
class=
"q-mt-md text-right"
:class=
"{'row wrap justify-end items-start':$q.platform.is.mobile}"
>
<span
:class=
"{'col-12 q-mb-sm':$q.platform.is.mobile}"
>
<span
class=
"f12 text-negative"
v-if=
"!p.startDate"
:class=
"{'q-mr-lg':$q.platform.is.desktop}"
>
{{$q.platform.is.mobile?'請選擇上面的出行日期':'請選擇左側的出行日期'}}
</span>
<span
class=
"f12 text-negative"
:class=
"{'q-mr-lg':$q.platform.is.desktop}"
v-if=
"p.startDate&&!selectedObj"
>
{{`請選擇上面的門票類型`}}
</span>
</span>
<q-btn
color=
"primary"
label=
"立即訂購"
unelevated
class=
"q-px-lg"
:disable=
"sumPrice==0||!selectedObj"
@
click=
"goOrderHandler"
/>
</div>
</div>
</div>
</template>
<
script
>
import
{
date
}
from
"quasar"
;
export
default
{
props
:
[
"dataList"
,
"price"
,
"configId"
,
"Month"
],
watch
:
{
price
:
{
handler
(
n
,
o
)
{
this
.
p
=
n
;
if
(
n
&&
n
.
startDate
){
this
.
chosenObj
.
startDate
=
n
.
startDate
;
}
this
.
calcMoney
()
},
deep
:
true
,
immediate
:
false
},
dataList
:
{
handler
(
n
,
o
)
{
this
.
dataList
=
n
;
},
deep
:
true
,
immediate
:
true
},
},
data
()
{
return
{
p
:
{},
chosenObj
:
null
,
sumPrice
:
0
,
selectedObj
:
null
,
priceList
:
[],
};
},
created
()
{
this
.
initModel
();
if
(
this
.
p
.
startDate
){
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
calcMoney
()
this
.
getCarPriceData2
()
}
},
methods
:
{
goOrderHandler
(){
let
order
=
{
CouponsId
:
this
.
configId
,
TicketId
:
this
.
selectedObj
.
Id
,
Month
:
this
.
Month
,
startDate
:
this
.
p
.
startDate
,
originalB2CPrice
:
this
.
p
.
originalB2CPrice
,
orderInfo
:
this
.
chosenObj
,
}
let
key
=
this
.
$md5
(
JSON
.
stringify
(
order
))
let
pickuporderScenTickets
=
localStorage
.
getItem
(
'pickuporderScenTickets'
)
pickuporderScenTickets
=
pickuporderScenTickets
?
JSON
.
parse
(
pickuporderScenTickets
):[]
pickuporderScenTickets
.
push
({
key
,
order
})
localStorage
.
setItem
(
"pickuporderScenTickets"
,
JSON
.
stringify
(
pickuporderScenTickets
))
this
.
CommonJump
(
'/PickuporderForm/'
+
key
,
{});
},
// 获取报价的详情
getCarPriceData2
()
{
this
.
priceList
=
[]
this
.
apipost
(
"b2c_get_GetTicketCouponsMonthPrice"
,
{
CouponsId
:
this
.
configId
,
TicketId
:
this
.
selectedObj
.
Id
,
Month
:
this
.
Month
,
},
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
let
arr
=
[]
r
.
data
.
data
.
forEach
(
x
=>
{
if
(
x
.
Price
){
if
(
this
.
chosenObj
.
startDate
==
x
.
Date
){
this
.
p
.
originalB2CPrice
=
x
.
Price
}
let
dataObj
=
{
startDate
:
x
.
Date
,
originalB2CPrice
:
x
.
Price
,
remainNum
:
1
,
Count
:
1
,
isSupportChildren
:
1
,
safeMoney
:
0
,
}
if
(
date
.
formatDate
(
Date
.
now
(),
'YYYY-MM-DD'
)
!=
x
.
Date
&&
x
.
Date
>
date
.
formatDate
(
Date
.
now
(),
'YYYY-MM-DD'
)){
arr
.
push
(
dataObj
)
}
}
})
const
temp
=
JSON
.
parse
(
JSON
.
stringify
(
r
.
data
.
data
))
let
PriceArr
=
temp
.
filter
(
x
=>
{
return
x
.
Price
>
0
})
if
(
PriceArr
.
length
>
0
){
this
.
$emit
(
'getPriceList'
,
JSON
.
stringify
(
arr
),
this
.
selectedObj
.
Id
)
}
else
{
let
dataObj
=
{
startDate
:
''
,
originalB2CPrice
:
''
,
remainNum
:
0
,
Count
:
0
,
safeMoney
:
0
,
PeopleNum
:
1
}
this
.
priceList
.
push
(
dataObj
)
this
.
$emit
(
'getPriceList'
,
JSON
.
stringify
(
this
.
priceList
),
this
.
selectedObj
.
Id
)
this
.
p
.
originalB2CPrice
=
0
this
.
resetHandler
()
}
}
},
null
)
},
handleSelect
(
item
){
this
.
selectedObj
=
item
setTimeout
(()
=>
{
this
.
getCarPriceData2
()
},
100
)
},
initModel
()
{
this
.
sumPrice
=
0
this
.
chosenObj
=
{
startDate
:
""
,
Count
:
1
,
remark
:
""
,
};
},
resetHandler
(
type
)
{
if
(
type
){
this
.
selectedObj
=
null
}
setTimeout
(()
=>
{
this
.
p
=
{};
this
.
initModel
()
},
100
)
this
.
$emit
(
"reset"
);
},
changePeople
(
val
)
{},
addPeople
(
m
,
i
,
isDf
=
false
)
{
this
.
chosenObj
[
m
]
=
parseInt
(
this
.
chosenObj
[
m
])
+
i
;
if
(
m
!=
'Count'
){
this
.
chosenObj
[
m
]
=
this
.
chosenObj
[
m
]
<
0
?
0
:
this
.
chosenObj
[
m
]
++
;
}
else
{
this
.
chosenObj
[
m
]
=
this
.
chosenObj
[
m
]
<
1
?
1
:
this
.
chosenObj
[
m
]
++
;
}
this
.
calcMoney
()
},
calcMoney
()
{
if
(
!
this
.
p
)
return
;
let
money
=
this
.
p
.
originalB2CPrice
*
this
.
chosenObj
.
Count
;
this
.
sumPrice
=
money
;
},
},
};
</
script
>
<
style
></
style
>
src/components/searchdata/kkday.vue
View file @
4f8de789
...
...
@@ -745,6 +745,12 @@ this.dayArray = this.dayArray.filter(item => arr.includes(item.id))
{
}
);
return
}
else if(item.productType === 2) { // 景区门票
this.CommonJump(
"
/
detailsScenicSpotTicket
/
"+item.configId,
{
}
);
return
}
this.CommonJump(
"
/
detail
/
" + encodeURIComponent(item.id) + "
/
" + item.tcid + "
/
" + item.configId,
...
...
src/components/trip/smaple.vue
View file @
4f8de789
...
...
@@ -72,6 +72,7 @@ export default {
methods
:
{
formatTeam
(){
let
p
=
this
.
trip
.
priceList
[
0
]
if
(
!
p
)
return
let
t
=
p
.
priceTeamType
??
1
t
=
t
==
0
?
1
:
t
if
(
t
==
1
){
...
...
src/pages/ScenicSpotTicket/details.vue
0 → 100644
View file @
4f8de789
<
template
>
<div
style=
"min-height: 80vh"
>
<div
style=
"
position: fixed;
left: 0;
right: 0;
top: 0;
border-top: 1px solid #eee;
box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
z-index: 999;
"
class=
"bg-white"
v-if=
"
(currentHeight > navs[0].top + 100 && $q.platform.is.desktop) ||
(currentHeight > priceListHeight &&
currentHeight
<
navs
[
0
].
top
&&
$
q
.
platform
.
is
.
mobile
)
"
:style=
"
{ transform: stickyHeight }"
>
<div
style=
"max-width: 1200px; margin-left: auto; margin-right: auto"
:class=
"
{ 'q-px-md': $q.screen.width
<
1220
}"
class=
"q-py-sm row items-center"
>
<span
class=
"col product-price text-subtitle1 text-weight-bold"
style=
"text-align: left"
>
<span
v-if=
"priceList2&&priceList2.length"
>
{{
dataList
.
CurrencyCode
}}
{{
moneyFormat
(
priceList2
[
0
].
originalB2CPrice
,
0
)
}}
</span>
<span
class=
"q-ml-sm f12 text-grey-7"
>
起
</span>
</span>
<q-btn
color=
"primary"
unelevated
class=
"q-px-xl"
label=
"選擇方案"
@
click=
"goScrollHandler(priceListHeight)"
/>
</div>
</div>
<div
v-if=
"dataList"
style=
"max-width: 1200px; margin-left: auto; margin-right: auto"
:class=
"
{ 'q-px-md': $q.screen.width
<
1220
}"
>
<div
class=
"row items-center q-mt-md q-mb-lg"
>
<q-breadcrumbs
class=
"col f12 no-wrap q-mr-md"
v-if=
"dataList"
style=
"font-size: 13px"
>
<q-breadcrumbs-el
icon=
"home"
label=
"首頁"
class=
"cursor-pointer"
@
click=
"CommonJump('/index',
{})"
/>
<q-breadcrumbs-el
label=
"日本"
class=
"cursor-pointer"
/>
<q-breadcrumbs-el>
<span
v-for=
"(x, i) in citys"
:key=
"i"
>
<span
class=
"cursor-pointer"
>
{{
x
}}
</span>
<span
v-if=
"i + 1 != citys.length"
class=
"q-mr-sm"
>
,
</span>
</span>
</q-breadcrumbs-el>
<q-breadcrumbs-el
v-if=
"$q.platform.is.desktop"
:label=
"dataList.title"
class=
"text-grey-6 ellipsis"
/>
</q-breadcrumbs>
<div
class=
"text-grey-6 f12"
>
Product No. #
{{
dataList
.
id
}}
</div>
</div>
<div
style=
"padding-bottom: calc((100% - 0px) / 3); position: relative"
>
<div
style=
"position: absolute; left: 0; top: 0; right: 0; bottom: 0"
class=
"overflow-hidden rounded-borders"
>
<slider
ref=
"slider"
:options=
"options"
@
slide=
"slideHandler"
style=
"height: 100%"
>
<slideritem
v-if=
"dataList.videoStr"
style=
"width: 80%"
class=
"q-mx-sm"
key=
"video"
>
<vue-core-video-players
ref=
"video"
:src=
"dataList.videoStr"
:title=
"dataList.title"
:muted=
"true"
:autoplay=
"false"
@
play=
"playHandler"
@
pause=
"pauseHandler"
@
seeked=
"seekedChangeHandler"
@
timeupdate=
"timeChangeHandler"
logo=
"../statics/img/transparent_logo.png"
:loop=
"false"
id=
"trip_video"
/>
</slideritem>
<slideritem
v-for=
"(item, index) in dataList.imgCover"
:key=
"index"
style=
"width: 80%"
class=
"q-mx-sm"
>
<q-img
:src=
"item"
spinner-color=
"grey"
spinner-size=
"20px"
/>
</slideritem>
<div
slot=
"loading"
>
loading...
</div>
</slider>
</div>
</div>
<div
class=
"q-py-lg"
:class=
"
{ row: $q.platform.is.desktop, column: $q.platform.is.mobile }"
style="border-bottom: 1px solid #eee"
>
<div
class=
"col q-mr-lg"
>
<div
class=
"text-h6 ellipsis-2-lines"
>
{{
dataList
.
Name
}}
</div>
<!--
<div
class=
"text-grey-7 fz17 ellipsis-2-lines"
>
{{
dataList
.
Description
}}
</div>
-->
<div
class=
"q-mt-md f12 text-grey-6"
>
<q-icon
name=
"iconfont icondingweixiao"
size=
"16px"
class=
"q-mr-sm"
/>
<span
>
{{
dataList
.
CountryName
}}
-
<span>
<span
class=
"cursor-pointer"
>
{{
dataList
.
CityName
}}
</span>
</span>
</span>
</div>
<div
class=
"q-mt-md row"
>
<q-chip
class=
"transparent q-mr-xl no-padding"
square
icon=
"iconfont iconOwner-1"
label=
" 印象自組團"
/>
<q-chip
class=
"transparent q-mr-xl no-padding"
square
icon=
"iconfont icontime"
label=
"行程時間 1 天"
/>
<q-chip
class=
"transparent q-mr-xl no-padding"
square
icon=
"iconfont iconnetwork-fill"
label=
"日本語/中文 導覽"
/>
<q-chip
class=
"transparent q-mr-xl no-padding"
square
icon=
"iconfont iconquxiao"
label=
"不可取消"
/>
</div>
</div>
<div
:style=
"
{ width: $q.platform.is.mobile ? '100%' : '293px' }"
class="bg-grey-3 rounded-borders q-px-md"
:class="{
'q-py-lg': $q.platform.is.desktop,
'row justify-between items-center q-mt-sm q-py-sm':
$q.platform.is.mobile,
}"
>
<div
class=
"product-price text-h6"
v-if=
"priceList2&&priceList2.length>0"
>
<!-- CNY:
{{
dataList
.
}}
-->
{{
dataList
.
CurrencyCode
?
dataList
.
CurrencyCode
:
'CNY'
}}
:
{{
moneyFormat
(
priceList2
[
0
].
originalB2CPrice
,
0
)
}}
<span
class=
"f12 text-grey-6"
>
起
</span>
</div>
<div
v-else
class=
"text-subtitle1 text-grey-6"
>
暫無報價
</div>
<q-btn
color=
"primary"
label=
"選擇方案"
unelevated
:disable=
"priceList.length>0?false:true"
@
click=
"goScrollHandler(priceListHeight)"
:class=
"
{ 'q-mt-md full-width': $q.platform.is.desktop }"
/>
</div>
</div>
<div
class=
"q-mt-lg"
v-if=
"dataList.productRecommend"
>
<div
class=
"q-mt-sm"
v-for=
"(x, i) in dataList.productRecommend.split('\n')"
:key=
"i"
>
<q-icon
name=
"iconfont iconhongqi"
color=
"primary"
size=
"16px"
class=
"q-mr-md"
/>
{{
x
}}
</div>
</div>
</div>
<div
class=
"bg-white"
style=
"
position: fixed;
left: 0;
right: 0;
top: -1px;
border-top: 1px solid #eee;
box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
z-index: 999;
"
v-if=
"currentHeight > priceListHeight + 800 && $q.platform.is.mobile"
:style=
"
{ transform: stickyHeight }"
>
<q-tabs
v-model=
"tab"
dense
class=
"text-grey"
active-color=
"primary"
indicator-color=
"primary"
align=
"left"
narrow-indicator
>
<q-tab
v-for=
"(x, i) in navs"
:key=
"i"
@
click=
"goScrollHandler(x.top + 20)"
:name=
"x.display"
:label=
"x.display"
></q-tab>
</q-tabs>
</div>
<div
v-if=
"dataList"
class=
"q-pa-lg bg-grey-3 q-mt-lg text-grey-9"
ref=
"pricelist"
>
<div
id=
"scheme"
style=
"max-width: 1200px; margin-left: auto; margin-right: auto"
>
<div
class=
"text-h6"
>
選擇方案
</div>
<div
class=
"rounded-borders bg-white q-pa-md q-mt-md"
v-if=
"$q.platform.is.mobile"
>
<q-field
class=
"q-mt-md"
stack-label
label=
"選擇日期、選項"
standout
dense
>
<div
class=
"self-center full-width no-outline"
tabindex=
"0"
>
{{
currentPrice
.
startDate
}}
</div>
<q-popup-proxy
ref=
"qDateProxy"
>
<calendar
class=
"bg-white q-pa-md"
:priceList=
"priceList"
@
change=
"changeChosenDateHandler"
ref=
"calendar"
></calendar>
</q-popup-proxy>
</q-field>
<order-preview
:dataList=
"dataList"
:configId=
"msg.configId"
:Month=
"currentYM.str"
:price=
"currentPrice"
@
reset=
"resetHandler"
@
getPriceList=
"getPriceList"
></order-preview>
</div>
<!--方案选择区 -->
<div
class=
"text-h6 q-pt-lg"
v-if=
"$q.platform.is.mobile"
>
所選方案詳情
</div>
<div
class=
"bg-white rounded-borders q-mt-md"
v-if=
"priceList && priceList.length > 0"
>
<div
class=
"q-pa-md row"
>
<div
class=
"col"
>
<div
class=
"text-subtitle1 text-weight-bold row items-center"
v-if=
"$q.platform.is.desktop"
>
<span
class=
"q-mr-md"
>
行程標準出行方案
</span>
<q-chip
square
color=
"orange"
size=
"sm"
text-color=
"grey-2"
class=
"text-light"
label=
"不可取消"
/>
</div>
<!--
<div
class=
"text-grey f12"
>
<ul
class=
"q-pl-md no-margin"
>
<li
v-for=
"(x, i) in warnBuy"
:class=
"
{'q-mt-md':$q.platform.is.desktop|(i!=0
&&
$q.platform.is.mobile)}" :key="i">
{{
x
}}
</li>
</ul>
</div>
-->
</div>
<div
class=
""
v-if=
"$q.platform.is.desktop"
>
<div
class=
"row items-center"
>
<span
class=
"product-price text-h6 q-mr-md"
>
{{
dataList
.
CurrencyCode
?
dataList
.
CurrencyCode
:
'CNY'
}}
{{
moneyFormat
(
priceList2
[
0
].
originalB2CPrice
,
0
)
}}
</span
>
<q-btn
color=
"primary"
outline
:label=
"showOrderPreview ? '取消選擇' : '選擇'"
@
click=
"changeShowOrderPreviewHandler"
class=
"q-px-lg"
/>
</div>
<div
class=
"text-info q-mt-md text-right"
>
最早可預訂日期:
{{
priceList2
[
0
].
startDate
}}
</div>
</div>
</div>
<div
class=
"q-pa-md"
style=
"border-top: 1px solid #eee"
v-if=
"showOrderPreview"
>
<div
class=
"q-pa-md bg-grey-2 row items-center rounded-borders"
>
<div
class=
"text-subtitle2 text-weight-bold q-mr-xl"
>
關於此方案
</div>
<q-chip
class=
"transparent q-mr-xl no-padding"
square
icon=
"iconfont iconquxiao"
label=
"不可取消"
/>
<q-chip
class=
"transparent q-mr-xl no-padding"
square
icon=
"iconfont iconroundcheck"
label=
"6個工作日內(不含例休假)確認"
/>
</div>
<div
class=
"q-mt-lg row"
v-if=
"$q.platform.is.desktop"
>
<div
class=
"col"
>
<calendar
:priceList=
"priceList"
@
change=
"changeChosenDateHandler"
ref=
"calendar"
></calendar>
</div>
<div
class=
"col q-ml-xl"
>
<order-preview
:dataList=
"dataList"
:configId=
"msg.configId"
:Month=
"currentYM.str"
:price=
"currentPrice"
@
reset=
"resetHandler"
@
getPriceList=
"getPriceList"
></order-preview>
</div>
</div>
</div>
</div>
</div>
</div>
<div
v-if=
"dataList"
style=
"max-width: 1200px; margin-left: auto; margin-right: auto"
class=
"q-mt-xl row"
:class=
"
{ 'q-px-md': $q.screen.width
<
1220
&&
$
q
.
screen
.
width
>
760 }"
>
<div
:class=
"
{ 'col-8': $q.platform.is.desktop, col: $q.platform.is.mobile }"
>
<div
ref=
"product"
class=
"text-h5 text-weight-bold text-left q-mt-xl"
:class=
"
{
'q-px-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
mobile
,
}"
>
產品介紹
</div>
<div
class=
"q-mt-md"
ref=
"diyContext"
v-html=
"dataList.Feature"
v-if=
"dataList.Feature"
></div>
<div
class=
"q-mt-md trip-text q-pb-xl"
:class=
"
{
'q-px-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
mobile
,
}"
>
<div
v-if=
"dataList.OpeningHours"
class=
"row"
><span>
开放时间
</span><div>
{{
dataList
.
OpeningHours
}}
{{
dataList
.
OpeningHours
.
substring
(
6
,
13
)
}}
停止入场
</div></div>
<div
v-if=
"dataList.GeographicTag||dataList.ScenicSpotTag"
class=
"row"
><span>
景区特色
</span>
<div>
<q-chip
v-if=
"dataList.GeographicTag"
size=
"14px"
clickable
v-for=
"(s,i) in dataList.GeographicTag.split(',')"
:key=
"i"
text-color=
"white"
color=
"primary"
square
>
{{
s
}}
</q-chip>
<q-chip
v-if=
"dataList.ScenicSpotTag"
size=
"14px"
clickable
v-for=
"(s,i) in dataList.ScenicSpotTag.split(',')"
:key=
"i"
text-color=
"dark"
color=
"grey-3"
square
>
{{
s
}}
</q-chip>
</div>
</div>
<div
v-if=
"dataList.TrafficInfo"
class=
"row"
><span>
交通说明
</span><div>
{{
dataList
.
TrafficInfo
?
dataList
.
TrafficInfo
:
'-'
}}
</div></div>
</div>
<div
class=
"text-h5 text-weight-bold text-left q-mt-xl"
ref=
"warning"
:class=
"
{
'q-px-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
mobile
,
}"
>
購買須知
</div>
<div
class=
"q-mt-lg trip-text bg-orange-1 q-pa-md rounded-borders q-mb-xl"
style=
"border: 1px dashed var(--q-color-warning)"
v-html=
"
dataList.BookingInfo
? dataList.BookingInfo || '暂无购买须知'
: '暂无购买须知'
"
:class=
"
{
'q-mx-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
mobile
,
}"
></div>
<div
class=
"text-h5 text-weight-bold text-left q-mt-xl"
ref=
"assemblypoint"
:class=
"
{
'q-px-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
mobile
,
}"
>
景區地址
</div>
<div
class=
"q-mt-lg trip-text rounded-borders q-mb-xl"
style=
"border: 1px dashed var(--q-color-warning)"
:class=
"
{
'q-mx-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
mobile
,
}"
>
<div
class=
"q-pa-md"
style=
"border-bottom: 1px dashed var(--q-color-warning)"
>
<div
class=
"text-weight-bold text-h6"
>
地點名稱:
{{
dataList
.
Name
}}
</div>
<div
class=
"text-grey-9"
>
地址:
{{
`${dataList.Address
}
`
}}
<
/div
>
<
/div
>
<
div
class
=
"q-pa-md"
:
class
=
"{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}
"
>
<
componentsMap
:
AddressObj
=
"AddressObj"
/>
<
/div
>
<
/div
>
<
div
class
=
"text-h5 text-weight-bold text-left q-mt-xl"
ref
=
"tips"
:
class
=
"{
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}
"
>
溫馨提示
<
/div
>
<
div
class
=
"q-mt-lg trip-text bg-white q-pa-md rounded-borders q-mb-xl"
style
=
"border: 1px dashed var(--q-color-info)"
v
-
html
=
"
dataList.About
? dataList.About || '暂无溫馨提示'
: '暂无溫馨提示'
"
:
class
=
"{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}
"
><
/div
>
<
div
class
=
"text-h5 text-weight-bold text-left q-mt-xl"
ref
=
"cancelTips"
:
class
=
"{
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}
"
>
取消政策
<
/div
>
<
div
class
=
"q-mt-lg trip-text q-mb-xl"
:
class
=
"{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}
"
>
<
ul
class
=
"no-padding text-grey-9 q-ml-md"
>
<
li
>
所选日期
15
天(含)之前取消,收取手续费
0
%<
/li
>
<
li
class
=
"q-mt-sm"
>
所选日期
8
~
14
天之间取消,收取手续费
30
%<
/li
>
<
li
class
=
"q-mt-sm"
>
所选日期
4
~
7
天之间取消,收取手续费
50
%<
/li
>
<
li
class
=
"q-mt-sm"
>
所选日期
1
~
3
天之间取消,收取手续费
80
%<
/li
>
<
li
class
=
"q-mt-sm"
>
所选日期
0
~
0
天之间取消,收取手续费
100
%<
/li
>
<
/ul
>
<
div
class
=
"q-mt-lg f12 text-grey-6"
>
<
q
-
icon
name
=
"iconfont icontishi"
class
=
"q-mr-sm"
/>
<
span
>
注意:由于站内商品来自全球各地,订单取消时间将依该供应商所在时区判定。供应商需
2
-
5
个工作天进行取消流程,依照您购买的商品取消政策收取手续费,并于取消流程完成后
14
个工作天内退款。
<
/spa
n
>
<
/div
>
<
/div
>
<
/div
>
<
template
v
-
if
=
"$q.platform.is.desktop"
>
<
div
class
=
"col-1"
><
/div
>
<
div
class
=
"col q-ml-xl position-relative"
>
<
div
style
=
"position: sticky; top: 100px"
>
<
div
class
=
"text-subtitle2 text-grey-6 cursor-pointer q-mb-md"
v
-
for
=
"(x, i) in navs"
:
key
=
"i"
@
click
=
"goScrollHandler(x.top + 20)"
:
class
=
"{
'active-trip-module':
currentHeight >= x.top &&
(i == navs.length - 1 || currentHeight < navs[i + 1].top),
}
"
>
{{
x
.
display
}}
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
/div
>
<!--
<
auth
><
/auth> --
>
<
/div
>
<
/template
>
<
script
>
import
auth
from
"src/components/common/auth.vue"
;
import
{
slider
,
slideritem
}
from
"vue-concise-slider"
;
import
calendar
from
"src/components/trip/calendar.vue"
;
import
OrderPreview
from
"src/components/ScenicSpotTicket/orderPreview.vue"
;
import
smaple
from
"src/components/trip/smaple.vue"
;
import
Trip
from
"src/components/trip/trip.vue"
;
import
block
from
"src/components/trip/block/index"
;
import
{
date
}
from
"quasar"
;
import
componentsMap
from
"src/components/car/Map.vue"
;
import
*
as
dayjs
from
"dayjs"
;
export
default
{
props
:
[],
data
()
{
return
{
AddressObj
:
null
,
priceList2
:
[],
priceList
:
[],
selectedId
:
''
,
currentYM
:
{
year
:
2023
,
month
:
2
,
str
:
"2023-02"
}
,
// 当前年月
isCurrent
:
false
,
isLast
:
false
,
daysList
:
[],
tab
:
""
,
searchDate
:
""
,
clickDate
:
""
,
slide
:
1
,
msg
:
{
configId
:
""
,
cityId
:
0
,
preview
:
0
,
tcid
:
0
,
teamType
:
0
,
isGetPriceFlight
:
true
,
}
,
currentPrice
:
{
}
,
isShow
:
false
,
dataList
:
null
,
isDirect
:
1
,
TripConfig
:
{
}
,
isShowNav
:
false
,
clickIndex
:
1
,
isLoading
:
false
,
isShowDialog
:
false
,
citys
:
[],
//Slider configuration [obj]
options
:
{
currentPage
:
0
,
speed
:
300
,
itemAnimation
:
true
,
centeredSlides
:
true
,
thresholdDistance
:
100
,
thresholdTime
:
300
,
loopedSlides
:
2
,
slidesToScroll
:
1
,
loop
:
true
,
}
,
warnBuy
:
[
"如一輛車位不夠使用,請購買多輛車"
,
"收費公路費、停車費、入園費等請另行繳納"
,
"由於交通擁堵,時長可能會略有變化"
,
"每增加 30 分鐘,將收取相應的延期費。 (現場支付)"
,
],
showOrderPreview
:
false
,
videoPosition
:
0
,
currentHeight
:
0
,
isPictureInPicture
:
false
,
days
:
[
{
val
:
""
,
top
:
0
,
isActive
:
false
,
display
:
""
,
}
,
],
navs
:
[
{
val
:
"product"
,
top
:
0
,
isActive
:
false
,
display
:
"產品介紹"
,
}
,
{
val
:
"warning"
,
top
:
0
,
isActive
:
false
,
display
:
"購買須知"
,
}
,
{
val
:
"assemblypoint"
,
top
:
0
,
isActive
:
false
,
display
:
"景區地址"
,
}
,
{
val
:
"tips"
,
top
:
0
,
isActive
:
false
,
display
:
"溫馨提示"
,
}
,
{
val
:
"cancelTips"
,
top
:
0
,
isActive
:
false
,
display
:
"取消政策"
,
}
,
],
priceListHeight
:
0
,
stickyHeight
:
0
,
zoomDiyContext
:
1
,
}
;
}
,
components
:
{
slider
,
slideritem
,
calendar
,
OrderPreview
,
smaple
,
Trip
,
block
,
componentsMap
,
auth
,
}
,
watch
:
{
days
:
{
handler
:
function
(
val
,
oldval
)
{
this
.
days
=
val
;
}
,
immediate
:
true
,
deep
:
true
,
}
,
priceList
:
{
handler
:
function
(
val
,
oldval
)
{
this
.
priceList
=
val
;
}
,
immediate
:
true
,
deep
:
true
,
}
,
currentPrice
:
{
handler
:
function
(
val
,
oldval
)
{
this
.
currentPrice
=
val
;
}
,
immediate
:
false
,
deep
:
true
,
}
,
}
,
created
()
{
if
(
this
.
$route
.
params
.
id
)
{
this
.
msg
.
configId
=
decodeURIComponent
(
this
.
$route
.
params
.
id
);
}
if
(
this
.
$route
.
params
.
tcid
)
{
this
.
msg
.
tcid
=
decodeURIComponent
(
this
.
$route
.
params
.
tcid
);
}
}
,
mounted
()
{
window
.
addEventListener
(
"scroll"
,
this
.
handleScroll
);
const
timeStamp
=
Date
.
now
()
const
formattedString
=
date
.
formatDate
(
timeStamp
,
'YYYY-MM'
)
this
.
currentYM
=
{
year
:
date
.
formatDate
(
timeStamp
,
'YYYY'
),
month
:
date
.
formatDate
(
timeStamp
,
'MM'
),
str
:
formattedString
}
if
(
localStorage
.
baseifo
)
{
this
.
TripConfig
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"baseifo"
));
}
window
.
addEventListener
(
"scroll"
,
this
.
menu
);
window
.
addEventListener
(
"scroll"
,
this
.
menu
);
this
.
getData
();
}
,
methods
:
{
changeShowOrderPreviewHandler
(){
this
.
showOrderPreview
=!
this
.
showOrderPreview
if
(
!
this
.
showOrderPreview
){
this
.
changeTripShowHandler
()
}
}
,
changeTripShowHandler
()
{
this
.
$nextTick
(()
=>
{
this
.
navs
.
forEach
((
x
)
=>
{
x
.
top
=
this
.
$refs
[
x
.
val
].
getBoundingClientRect
().
top
+
this
.
currentHeight
-
60
;
}
);
}
);
}
,
getPriceList
(
Arr
,
id
){
this
.
priceList
=
JSON
.
parse
(
Arr
)
if
(
this
.
selectedId
===
id
)
{
this
.
selectedId
=
''
}
else
{
this
.
selectedId
=
id
}
}
,
getTopNum
(
x
)
{
this
.
days
=
JSON
.
parse
(
x
);
}
,
handleScroll
(
e
)
{
let
temp
=
this
.
getScroll
().
top
;
this
.
stickyHeight
=
document
.
querySelector
(
".q-header--hidden"
)
?
"translateY(0px)"
:
"translateY(45px)"
;
this
.
currentHeight
=
temp
;
if
(
this
.
videoPosition
>
0
&&
this
.
videoPosition
<
this
.
currentHeight
&&
this
.
options
.
currentPage
==
0
&&
!
this
.
isPictureInPicture
)
{
this
.
isPictureInPicture
=
true
;
let
t
=
document
.
querySelectorAll
(
"video"
)[
0
];
try
{
t
.
requestPictureInPicture
();
}
catch
(
error
)
{
}
}
else
if
(
this
.
videoPosition
>
0
&&
this
.
videoPosition
>
this
.
currentHeight
&&
this
.
options
.
currentPage
==
0
&&
this
.
isPictureInPicture
)
{
this
.
isPictureInPicture
=
false
;
document
.
exitPictureInPicture
();
}
let
h
=
document
.
location
.
hash
;
if
(
h
.
indexOf
(
"#/detailsScenicSpotTicket/"
)
==
-
1
)
{
window
.
removeEventListener
(
"scroll"
,
this
.
handleScroll
);
}
}
,
getScroll
()
{
return
{
left
:
window
.
pageXOffset
||
document
.
documentElement
.
scrollLeft
||
document
.
body
.
scrollLeft
||
0
,
top
:
window
.
pageYOffset
||
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
||
0
,
}
;
}
,
goScrollHandler
(
top
)
{
window
.
scrollTo
(
0
,
top
);
// document.querySelector(id).scrollIntoView(
{
behavior
:
"smooth"
}
);
}
,
slideHandler
(
e
)
{
this
.
options
.
currentPage
=
e
.
currentPage
;
if
(
e
.
currentPage
!=
0
&&
this
.
$refs
.
video
&&
this
.
$refs
.
video
.
isPlaying
)
{
this
.
$refs
.
video
.
pause
();
}
}
,
playHandler
(
e
)
{
}
,
pauseHandler
(
e
)
{
}
,
timeChangeHandler
(
e
)
{
//console.log(e)
}
,
//
seekedChangeHandler
(
e
)
{
//console.log(e)
}
,
resetHandler
()
{
this
.
currentPrice
.
startDate
=
""
;
if
(
!
this
.
$q
.
platform
.
is
.
mobile
){
this
.
$refs
.
calendar
.
reset
();
}
}
,
changeChosenDateHandler
(
val
)
{
val
.
price
.
version
=
new
Date
().
getTime
();
this
.
currentPrice
=
JSON
.
parse
(
JSON
.
stringify
(
val
.
price
));
if
(
this
.
$q
.
platform
.
is
.
mobile
){
this
.
$refs
.
qDateProxy
.
hide
();
}
}
,
showDialog
()
{
this
.
isShowDialog
=
true
;
}
,
//关闭弹窗
closeDialog
()
{
this
.
isShowDialog
=
false
;
}
,
// 获取商品详情
getData
()
{
this
.
$q
.
loading
.
show
();
this
.
apipost
(
"b2c_get_GetTicketCouponsDetail"
,
{
CouponsId
:
this
.
msg
.
configId
}
,
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
r
.
data
.
data
;
this
.
selectedId
=
this
.
dataList
.
TicketList
.
find
(
x
=>
x
.
Id
)
this
.
dataList
.
imgCover
=
this
.
dataList
.
PicPathList
;
this
.
AddressObj
=
this
.
dataList
this
.
AddressObj
.
Address
=
`${this.dataList.CountryName
}
-${this.dataList.CityName
}
-${this.dataList.ProvinceName
}
-${this.dataList.Address
}
`
//
{
// Address:`$
{
this
.
dataList
.
CountryName
}
-
$
{
this
.
dataList
.
CityName
}
-
$
{
this
.
dataList
.
Address
}
`
//
}
this.isShow = true;
if (this.dataList.videoStr && this.dataList.videoStr != "") {
this.options.loop = false;
this.options.currentPage = 1;
this.$nextTick(() => {
setTimeout(() => {
let t = document.querySelectorAll(".slider-wrapper");
if (t.length > 0) {
let d = t[0].getBoundingClientRect();
this.videoPosition = d.top + d.height;
}
}
, 1000);
}
);
}
this.$nextTick(() => {
this.getCarPriceData2()
setTimeout(() => {
this.navs.forEach((x) => {
x.top =
this.$refs[x.val].getBoundingClientRect().top + this.currentHeight - 60;
}
);
this.priceListHeight =
this.$refs.pricelist.getBoundingClientRect().top +
this.currentHeight -
60;
}
, 1000);
try {
document
.querySelector("#scrollId .q-page-container")
.addEventListener("scroll", this.handleScrollDay);
}
catch (error) {
// console.log(document.querySelector('#scrollId .q-page-container'))
// console.log('异常信息', error)
}
}
);
}
else {
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
}
);
}
this.$q.loading.hide();
}
,
null
);
}
,
// 获取报价的详情
getCarPriceData2() {
this.priceList = []
this.apipost(
"b2c_get_GetTicketCouponsMonthPrice",
{
CouponsId: this.msg.configId,
TicketId: this.dataList.TicketList[1].Id,
Month: this.currentYM.str,
}
,
(r) => {
if (r.data.resultCode == 1) {
let arr = []
r.data.data.forEach(x=>{
if(x.Price){
let dataObj = {
startDate: x.Date,
originalB2CPrice: x.Price,
remainNum: 1,
Count: 1,
safeMoney: 0,
PeopleNum: 1
}
if(date.formatDate(Date.now(), 'YYYY-MM-DD')!=x.Date&&x.Date>date.formatDate(Date.now(), 'YYYY-MM-DD')){
arr.push(dataObj)
}
}
}
)
this.priceList = JSON.parse(JSON.stringify(arr))
this.priceList2 = JSON.parse(JSON.stringify(arr))
}
}
,null)
}
,
menu() {
this.scroll =
document.documentElement.scrollTop || document.body.scrollTop;
if (this.scroll > 300) {
this.isShowNav = true;
}
else {
this.isShowNav = false;
}
}
,
goNavList(val) {
let newval = "#" + val;
document.querySelector(newval).scrollIntoView(true);
}
,
}
,
}
;
</script>
<style>
.active-trip-module {
color: var(--q-color-primary);
font-weight: 800;
position: relative;
}
.active-trip-module::before {
position: absolute;
content: " ";
top: 0;
bottom: 0;
left: -25px;
width: 5px;
border-radius: 5px;
background: var(--q-color-primary);
}
.slider-item {
transform: scale(1);
transition-timing-function: ease;
transition-duration: 300ms;
}
.slider-item.slider-active {
transform: scale(1);
z-index: 999;
}
.trip-text img {
max-width: 100%;
height: auto;
border-radius: 6px;
}
.trip-text {
line-height: 1.6;
}
.slider-item.slider-active-copy {
transform: scale(1);
z-index: 999;
}
.active-trip-module {
color: var(--q-color-primary);
font-weight: 800;
position: relative;
}
.active-trip-module::before {
position: absolute;
content: " ";
top: 0;
bottom: 0;
left: -25px;
width: 5px;
border-radius: 5px;
background: var(--q-color-primary);
}
.trip-module {
color: #9e9e9e;
transition: all 0.3s;
font-weight: 100;
text-align: center;
line-height: 38px;
font-size: 18px;
width: 38px;
height: 38px;
border: 1px solid #ccc;
border-radius: 50%;
font-family: lettergothicstd;
}
.active-trip-moduleDay {
position: relative;
border: 0;
left: -15px;
font-size: 51px;
}
.active-trip-moduleDay.active::before {
opacity: 1;
}
.active-trip-moduleDay::before {
display: inline-block;
position: absolute;
top: 0px;
left: -50px;
content: "DAY";
font-size: 13px;
font-family: fangsong;
line-height: 58px;
opacity: 0;
}
#setZoom > div {
zoom: calc(100 / 1000);
}
</style>
<style scoped>
.car-select {
background: #ef7a70;
color: #fff;
}
.gray {
color: #999;
}
.date-table {
width: 100%;
padding: 5px;
border-collapse: separate;
table-layout: fixed;
}
.cell-day {
padding: 10px 0 20px;
text-align: center;
color: #666;
font-weight: 700;
}
.cell-date.selectable {
cursor: pointer;
}
.cell-date {
position: relative;
padding: 8px 4px;
border-radius: 6px;
text-align: center;
vertical-align: baseline;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.cell-date .date-num {
font-size: 1.6rem;
font-weight: 700;
}
.disabled {
color: #666;
}
.option-booking .cell-date .price {
min-height: 20px;
color: #666;
font-size: 1.2rem;
}
.cell-date.selected.selected-end {
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
position: relative;
}
.cell-date.selected.selected-start {
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}
.cell-date.selected.selected-end,
.cell-date.selected.selected-start {
color: #fff;
background-color: #26bdc9;
}
.cancel {
background-color: #ef7a70;
margin-left: 10px;
padding: 4px 8px;
border-radius: 4px;
color: #fff;
font-size: 12px;
}
.about {
background-color: #f6f6f6;
padding: 15px 20px;
margin: 20px 0;
border-radius: 10px;
}
</style>
\ No newline at end of file
src/pages/ScenicSpotTicket/orderForm.vue
0 → 100644
View file @
4f8de789
<
template
>
<div
class=
"content-page order-preview"
>
<q-stepper
v-model=
"step"
ref=
"stepper"
color=
"primary"
inactive-color=
"grey-5 "
class=
"bg-transparent"
flat
animated
>
<q-step
:name=
"1"
title=
"確認訂單"
icon=
"settings"
:done=
"step > 1"
></q-step>
<q-step
:name=
"2"
title=
"付款"
icon=
"iconfont iconPayment-1"
:done=
"step > 2"
></q-step>
<q-step
:name=
"3"
title=
"訂購完成"
icon=
"iconfont iconicon_finish_R"
:done=
"step == 3"
></q-step>
</q-stepper>
<div
class=
"row q-pa-md"
style=
"min-width: 375px; margin: 0 auto"
:class=
"
{
row: $q.screen.width >= 1200
&&
$q.platform.is.desktop,
column: $q.screen.width
<
1200
||
$
q
.
platform
.
is
.
mobile
,
}"
>
<div
class=
"col"
>
<q-form
ref=
"baseUserInfo"
>
<q-card
flat
class=
"q-pa-md"
>
<div
class=
"text-subtitle1 text-weight-bolder"
>
訂購人資訊
</div>
<q-separator
color=
"grey-2"
class=
"q-my-md"
/>
<div
class=
"row q-col-gutter-md"
>
<div
:class=
"filedWidth"
>
<q-select
v-model=
"userInfo.Country"
@
input=
"changeCountry"
:options=
"countrys"
emit-value
option-label=
"Name"
option-value=
"ID"
map-options
label=
"國家/地區"
standout
/>
</div>
<div
:class=
"filedWidth"
>
<q-input
standout
v-model=
"userInfo.Mailbox"
label=
"郵箱地址"
:rules=
"[(val) => /^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]
{2,5}$/.test(val) || '請輸入正確的郵箱地址']"
ref="mail"
/>
</div>
</div>
</q-card>
<q-card
flat
class=
"q-pa-md q-mt-lg"
v-if=
"details"
>
<div
class=
"text-subtitle1 text-weight-bolder q-mb-md"
>
旅客資料
</div>
<div
class=
"row"
>
<vue-core-video-players
v-if=
"details.videoStr"
ref=
"video"
:src=
"details.videoStr"
:title=
"details.title"
:muted=
"true"
:autoplay=
"false"
@
play=
"playHandler"
@
pause=
"pauseHandler"
@
seeked=
"seekedChangeHandler"
@
timeupdate=
"timeChangeHandler"
logo=
"../statics/img/transparent_logo.png"
:loop=
"false"
id=
"trip_video"
class=
"rounded-borders"
style=
"width: 80px"
/>
<q-img
v-else
:src=
"details?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
.
Name
}}
</div>
<div
class=
"text-caption text-grey-6 ellipsis q-mt-sm"
>
{{
details
.
Description
}}
</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>
{{
OrderDate
.
startDate
}}
</span>
</div>
<div
class=
"text-grey-9 q-ml-md"
v-if=
"chosenObj.Count > 0&&CarObj"
>
<q-icon
name=
"iconfont iconjiaotong"
size=
"20px"
class=
"q-mr-sm"
/>
<span
class=
"q-mr-sm"
>
{{
CarObj
.
CarName
}}
x
{{
chosenObj
.
Count
}}
辆
</span
>
<span
class=
"q-mr-sm"
>
(
{{
CarObj
.
PeopleNum
}}
人/辆)
</span
>
<template
v-if=
"details.TravelHours>0"
>
<q-icon
name=
"iconfont icontime"
size=
"20px"
class=
"q-mr-xs q-ml-sm"
/>
<span
class=
"q-mr-sm"
>
{{
`包車時長:${details.TravelHours
}
h`
}}
<
/span
>
<
/template
>
<
/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"
>
<
div
class
=
"text-subtitle1 q-pb-md text-weight-bold"
><
/div
>
<
div
class
=
"row q-col-gutter-md"
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.SurName"
label
=
"本國姓"
placeholder
=
"例:張"
:
rules
=
"[(val) => !!val || '請輸本國姓']"
ref
=
"SurName"
/>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.Name"
label
=
"本國名"
placeholder
=
"例:三"
:
rules
=
"[(val) => !!val || '請輸本國名']"
ref
=
"Name"
/>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.ContactWay"
label
=
"联络方式"
placeholder
=
"例:WeChat"
:
rules
=
"[(val) => !!val || '請輸联络方式']"
ref
=
"ContactWay"
mask
=
"X"
reverse
-
fill
-
mask
>
<
/q-input
>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.Mobile"
label
=
"電話"
:
rules
=
"[(val) => !!val && val.length == 11 || '請輸正確電話']"
ref
=
"Mobile"
mask
=
"#"
reverse
-
fill
-
mask
>
<
template
v
-
slot
:
prepend
>
<
div
class
=
"text-subtitle2"
>+
{{
userInfo
.
areaCode
}}
<
/div
>
<
/template
>
<
/q-input
>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
>
<
div
class
=
"row items-center q-mt-md"
>
<
span
>
選擇性別:
<
/span
>
<
q
-
radio
v
-
model
=
"parameters.Sex"
dense
:
val
=
"1"
label
=
"男"
class
=
"q-mr-lg"
/>
<
q
-
radio
v
-
model
=
"parameters.Sex"
dense
:
val
=
"2"
label
=
"女"
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
template
v
-
if
=
"details.CarType!=3"
>
<
div
class
=
"text-subtitle1 text-weight-bolder q-my-md"
>
{{
details
.
CarType
==
1
?
'抵達'
:
'起飛'
}}
班机資料
<
/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"
>
<
div
class
=
"text-subtitle1 q-pb-md text-weight-bold"
><
/div
>
<
div
class
=
"row q-col-gutter-md"
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.AirportTerminal"
label
=
"航廈"
placeholder
=
"例:航廈"
:
rules
=
"[(val) => !!val || '請輸航廈']"
ref
=
"AirportTerminal"
readonly
>
<
q
-
popup
-
proxy
:
offset
=
"[0, 10]"
ref
=
"qDateProxy7"
>
<
q
-
input
type
=
"textarea"
dense
standout
autofocus
v
-
model
=
"parameters.AirportTerminal"
placeholder
=
"請輸航廈"
/>
<
/q-popup-proxy
>
<
/q-input
>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.AirLine"
label
=
"航空公司"
placeholder
=
""
:
rules
=
"[(val) => !!val || '請輸航空公司名稱']"
ref
=
"AirLine"
readonly
>
<
q
-
popup
-
proxy
:
offset
=
"[0, 10]"
ref
=
"qDateProxy8"
>
<
q
-
input
type
=
"textarea"
dense
standout
autofocus
v
-
model
=
"parameters.AirLine"
placeholder
=
"請輸航空公司名稱"
/>
<
/q-popup-proxy
>
<
/q-input
>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.FlightNumber"
label
=
"航班編號"
placeholder
=
"例:CA123"
:
rules
=
"[(val) => !!val || '請輸航班編號']"
ref
=
"FlightNumber"
mask
=
"X"
reverse
-
fill
-
mask
/>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
class
=
"q-pb-md"
standout
:
value
=
"!flightTime?'':parameters.FlightTime"
:
label
=
"`航班${details.CarType==1?'抵達':'起飛'
}
時間`"
:
rules
=
"[(val) => !!val || `請选航班${details.CarType==1?'抵達':'起飛'
}
時間`]"
ref
=
"FlightTime"
>
<
template
v
-
slot
:
append
>
<
q
-
icon
name
=
"event"
class
=
"cursor-pointer"
><
/q-icon
>
<
/template
>
<
q
-
popup
-
proxy
:
offset
=
"[0, 0]"
ref
=
"qDateProxy1"
>
<
div
class
=
"row"
>
<!--
<
q
-
date
mask
=
"YYYY-MM-DD HH:mm"
:
title
=
"$t('search_date_begin')"
subtitle
=
"選擇"
v
-
model
=
"parameters.FlightTime"
:
options
=
"optionsFn"
/>
<
div
class
=
"q-px-sm"
><
/div> --
>
<
q
-
time
format24h
v
-
model
=
"flightTime"
mask
=
"HH:mm"
@
input
=
"getTime(1)"
/>
<
/div
>
<
/q-popup-proxy
>
<
/q-input
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
div
class
=
"text-subtitle1 text-weight-bolder q-my-md"
>
{{
details
.
CarType
==
1
?
'接机'
:
details
.
CarType
==
2
?
'送机'
:
'包车'
}}
資料
<
/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"
>
<
div
class
=
"text-subtitle1 q-pb-md text-weight-bold"
><
/div
>
<
div
class
=
"row q-col-gutter-md"
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"!getBusTime?'':parameters.OrderDate"
label
=
"接駁日期"
:
rules
=
"[(val) => !!val || '請选接駁日期']"
ref
=
"OrderDate"
>
<
template
v
-
slot
:
append
>
<
q
-
icon
name
=
"event"
class
=
"cursor-pointer"
><
/q-icon
>
<
/template
>
<
q
-
popup
-
proxy
:
offset
=
"[0, 0]"
ref
=
"qDateProxy2"
>
<
div
class
=
"row"
>
<!--
<
q
-
date
mask
=
"YYYY-MM-DD"
:
title
=
"$t('search_date_begin')"
subtitle
=
"選擇"
v
-
model
=
"getBusTimeDate"
:
options
=
"optionsFn"
@
input
=
"getTime(3)"
/>
<
div
class
=
"q-px-sm"
><
/div> --
>
<
q
-
time
format24h
v
-
model
=
"getBusTime"
mask
=
"HH:mm"
@
input
=
"getTime(2)"
/>
<
/div
>
<
/q-popup-proxy
>
<
/q-input
>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
v
-
if
=
"details.CarType!=1"
>
<
q
-
input
standout
v
-
model
=
"parameters.GetonAddress"
label
=
"上車地點"
placeholder
=
""
:
rules
=
"[(val) => !!val || '請輸上車地點供司機參考']"
ref
=
"GetonAddress"
readonly
>
<
template
v
-
slot
:
append
>
<!--
<
q
-
icon
name
=
"iconfont iconaddress"
size
=
"20px"
class
=
"q-mr-sm"
@
click
=
"getAddress(1)"
/>
-->
<
/template
>
<
q
-
popup
-
proxy
:
offset
=
"[0, 10]"
ref
=
"qDateProxy5"
>
<
q
-
input
type
=
"textarea"
dense
standout
autofocus
v
-
model
=
"parameters.GetonAddress"
placeholder
=
"請輸上車地點供司機參考"
/>
<
/q-popup-proxy
>
<
/q-input
>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
v
-
if
=
"details.CarType!=2"
>
<
q
-
input
standout
v
-
model
=
"parameters.GetoffAddress"
label
=
"下車地點"
placeholder
=
""
:
rules
=
"[(val) => !!val || '請輸下車地點供司機參考']"
ref
=
"GetoffAddress"
readonly
>
<
template
v
-
slot
:
append
>
<!--
<
q
-
icon
name
=
"iconfont iconaddress"
size
=
"20px"
class
=
"q-mr-sm"
@
click
=
"getAddress(2)"
/>
-->
<
/template
>
<
q
-
popup
-
proxy
:
offset
=
"[0, 10]"
ref
=
"qDateProxy6"
>
<
q
-
input
type
=
"textarea"
dense
standout
autofocus
v
-
model
=
"parameters.GetoffAddress"
placeholder
=
"請輸下車地點供司機參考"
/>
<
/q-popup-proxy
>
<
/q-input
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"text-subtitle1 text-weight-bolder q-my-md"
>
乘客資料
<
/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"
>
<
div
class
=
"text-subtitle1 q-pb-md text-weight-bold"
>
乘客数量
<
/div
>
<
div
class
=
"row q-col-gutter-md"
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.ManNum"
label
=
"成人數(18-99岁)"
@
input
=
"getNum"
:
rules
=
"[(val) => !!val || '請輸成人數']"
ref
=
"ManNum"
mask
=
"#"
reverse
-
fill
-
mask
/>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.ChildNum"
label
=
"兒童數(3-17岁)"
@
input
=
"getNum"
mask
=
"#"
reverse
-
fill
-
mask
/>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.BabyNum"
label
=
"嬰幼兒數(0-2岁)"
@
input
=
"getNum"
mask
=
"#"
reverse
-
fill
-
mask
/>
<
/div
>
<
/div
>
<
template
v
-
if
=
"details.CarType!=3"
>
<
div
class
=
"text-subtitle1 q-py-md text-weight-bold"
>
行李数量
<
/div
>
<
div
class
=
"row q-col-gutter-md"
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.HandLuggageNum"
label
=
"手提行李"
mask
=
"#"
reverse
-
fill
-
mask
/>
<
/div
>
<
div
:
class
=
"filedGuestWidth"
>
<
q
-
input
standout
v
-
model
=
"parameters.RegisteredLuggageNum"
label
=
"托运行李"
mask
=
"#"
reverse
-
fill
-
mask
/>
<
/div
>
<
/div
>
<
/template
>
<
/div
>
<
div
class
=
"text-subtitle1 q-my-md text-weight-bold"
>
特殊需求備註:
<
/div
>
<
q
-
input
standout
v
-
model
=
"parameters.Remark"
input
-
style
=
"height:170px;"
type
=
"textarea"
placeholder
=
"此欄位僅限資料備註。不在商品規範內的個人需求,不保證提供"
maxlength
=
"200"
counter
/>
<
/q-card
>
<
/q-form
>
<
/div
>
<
div
class
=
"relative-position"
v
-
if
=
"details"
:
class
=
"{
'q-ml-lg': !($q.screen.width < 1200 || $q.platform.is.mobile),
'q-mt-lg full-width': $q.screen.width < 1200 || $q.platform.is.mobile,
}
"
>
<
div
class
=
"rounded-borders bg-white q-pa-md"
style
=
"width: 300px"
:
style
=
"{
width:
$q.screen.width < 1200 || $q.platform.is.mobile
? 'unset'
: '300px',
position:$q.platform.is.mobile?'unset':'sticky',
top:$q.platform.is.mobile?'unset':'50px',
}
"
>
<
div
class
=
"text-subtitle1 text-weight-bolder"
>
付款明細
<
/div
>
<
div
class
=
"row q-mt-md"
>
<
vue
-
core
-
video
-
players
v
-
if
=
"details.videoStr"
ref
=
"video"
:
src
=
"details.videoStr"
:
title
=
"details.title"
:
muted
=
"true"
:
autoplay
=
"false"
@
play
=
"playHandler"
@
pause
=
"pauseHandler"
@
seeked
=
"seekedChangeHandler"
@
timeupdate
=
"timeChangeHandler"
logo
=
"../statics/img/transparent_logo.png"
:
loop
=
"false"
id
=
"trip_video"
class
=
"rounded-borders"
style
=
"width: 80px"
/>
<
q
-
img
v
-
else
:
src
=
"details?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
.
Name
}}
<
/div
>
<
div
class
=
"text-caption text-grey-6 ellipsis q-mt-sm"
>
{{
details
.
Description
}}
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"q-mt-md text-grey-6"
>
<
div
class
=
"row q-pb-xs no-wrap"
v
-
if
=
"AirportObj&&AirportObj.Name"
>
<
div
style
=
"width: 80px"
>
{{
details
.
CarType
==
1
?
'接'
:
'送'
}}
機機場:
<
/div
>
<
div
class
=
"q-ml-md ellipsis-2-lines"
>
{{
AirportObj
.
Name
}}
<
/div
>
<
/div
>
<
div
class
=
"row q-pb-xs no-wrap"
v
-
if
=
"AirportObj&&AirportObj.Name"
>
<
div
style
=
"width: 80px"
>
{{
details
.
CarType
==
1
?
'抵達'
:
'起飛'
}}
時間:
<
/div
>
<
div
class
=
"q-ml-md ellipsis-2-lines"
>
{{
parameters
.
FlightTime
}}
<
/div
>
<
/div
>
<
div
class
=
"row q-pb-xs no-wrap"
v
-
if
=
"parameters.GetonAddress"
>
<
div
style
=
"width: 80px"
>
上車點:
<
/div
>
<
div
class
=
"q-ml-md ellipsis-2-lines"
>
{{
parameters
.
GetonAddress
}}
<
/div
>
<
/div
>
<
div
class
=
"row q-pb-xs no-wrap"
v
-
if
=
"parameters.GetoffAddress"
>
<
div
style
=
"width: 80px"
>
下車點:
<
/div
>
<
div
class
=
"q-ml-md ellipsis-2-lines"
>
{{
parameters
.
GetoffAddress
}}
<
/div
>
<
/div
>
<
div
class
=
"row"
>
<
div
style
=
"width: 80px"
>
<!--
出發日期:
-->
接駁日期:
<
/div
>
<
div
class
=
"q-ml-md"
>
{{
parameters
.
OrderDate
}}
<
/div
>
<
/div
>
<
/div
>
<
q
-
separator
color
=
"grey-2"
class
=
"q-my-md"
/>
<
div
class
=
"text-grey-9"
>
<
div
class
=
"row q-mb-sm"
v
-
if
=
"chosenObj.Count>0&&CarObj"
>
<
div
class
=
"col"
>
{{
CarObj
.
CarName
}}
x
{{
chosenObj
.
Count
}}
<
/div
>
<
div
>
{{
details
.
CurrencyCode
}}
{{
moneyFormat
(
OrderDate
.
originalB2CPrice
,
2
)
}}
<
/div
>
<
/div
>
<!--
<
hr
style
=
"border:none;border-top:1px dashed #EEE !important;"
class
=
"bg-transparent q-mb-sm"
/>
<
div
class
=
"row q-mb-sm items-center"
v
-
if
=
"(chosenObj.Count)>0"
>
<
div
class
=
"col"
>
總金額
<
/div
>
<
div
class
=
"text-subtitle2 text-weight-bolder text-primary"
>
{{
details
.
CurrencyCode
}}
{{
moneyFormat
(
OrderDate
.
sumPrice
,
2
)
}}
<
/div
>
<
/div> --
>
<
hr
style
=
"border:none;border-top:1px dashed #EEE !important;"
class
=
"bg-transparent q-mb-sm"
/>
<
div
class
=
"row q-mb-sm items-center"
v
-
if
=
"chosenObj.Count>0"
>
<
div
class
=
"col"
>
支付金額
<
/div
>
<
div
class
=
"text-h6 text-weight-bolder text-primary product-price"
>
{{
details
.
CurrencyCode
}}
{{
moneyFormat
(
OrderDate
.
sumPrice
,
2
)
}}
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"text-right q-mt-md"
v
-
if
=
"step!=3"
>
<
q
-
btn
v
-
if
=
"step!=3"
unelevated
color
=
"primary"
:
loading
=
"loading"
:
label
=
"step!=3?'立即支付':'已支付'"
@
click
=
"submit()"
:
disable
=
"step!=3&&loading"
/>
<
q
-
btn
v
-
else
unelevated
color
=
"primary"
label
=
""
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
q
-
dialog
v
-
model
=
"isShowDialog"
>
<
q
-
card
class
=
"q-pa-lg"
:
style
=
"{'width':$q.platform.is.desktop?'100%':'500px'
}
"
>
<
div
class
=
"text-h6Detail"
>
<
span
>
乘客
{{
onoffbus
==
1
?
'上'
:
'下'
}}
車範圍
<
/span
>
<
i
class
=
"iconfont iconbaseline-close-px"
@
click
=
"isShowDialog=false"
><
/i
>
<
/div
>
<
q
-
separator
/>
<
div
style
=
"max-height: 600px;padding:20px 0"
class
=
"scroll"
>
<
componentsMap
:
AddressObj
=
"onCarObj"
/>
<
/div
>
<
/q-card
>
<
/q-dialog
>
<
div
v
-
if
=
"!orderKey || orderKey == ''"
class
=
"text-center q-my-xl"
>
<
none
-
data
iconType
=
"order"
title
=
"沒有找到您的訂單信息哦"
subtitle
=
"趕緊去挑選心儀的旅遊產品吧,三秒後自動跳轉到首頁"
><
/none-data
>
<
/div
>
<
auth
><
/auth
>
<
/div
>
<
/template
>
<
script
>
import
NoneData
from
"src/components/common/noneData.vue"
;
import
auth
from
"src/components/common/auth.vue"
;
import
{
date
}
from
'quasar'
import
{
json
}
from
"body-parser"
;
import
coupon
from
'src/components/common/coupon.vue'
import
componentsMap
from
"src/components/car/Map.vue"
;
export
default
{
components
:{
coupon
,
componentsMap
,
NoneData
,
auth
}
,
data
()
{
return
{
order
:
null
,
//订单信息
orderKey
:
""
,
isShowDialog
:
false
,
AddressObj
:
null
,
onCarObj
:
null
,
//上车范围
unCarObj
:
null
,
//下车范围
CarObj
:
null
,
//车型
AirportObj
:
null
,
//机场
details
:
null
,
//产品详情
options
:
{
//音频控件
currentPage
:
0
,
speed
:
300
,
itemAnimation
:
true
,
centeredSlides
:
true
,
thresholdDistance
:
100
,
thresholdTime
:
300
,
loopedSlides
:
2
,
slidesToScroll
:
1
,
loop
:
true
,
}
,
OrderDate
:
null
,
//接收产品相关信息
step
:
1
,
userInfo
:
{
Country
:
0
,
areaCode
:
""
,
Mailbox
:
""
,
}
,
chosenObj
:
{
}
,
countrys
:
[],
areaCodes
:
[],
loading
:
false
,
parameters
:
{
OrderId
:
0
,
OrderType
:
0
,
OrderDate
:
''
,
//预定日期
Unit_Price
:
''
,
//单价
Num
:
''
,
//数量
Money
:
0.0
,
Sex
:
1
,
//1男2女
SurName
:
''
,
//姓
Name
:
''
,
//名
Remark
:
''
,
AirportId
:
''
,
AirportTerminal
:
''
,
//航厦
AirLine
:
''
,
//航空公司名称
FlightNumber
:
''
,
//航班号
FlightTime
:
''
,
//航班时间
GetonAddress
:
''
,
//上车点
GetoffAddress
:
''
,
//下车点
ManNum
:
null
,
//成人数
ChildNum
:
null
,
//儿童数
BabyNum
:
null
,
//婴儿数
HandLuggageNum
:
null
,
//手提行李数量
RegisteredLuggageNum
:
null
,
//托运行李数量
ContactWay
:
''
,
//联络方式 WeChat
Mobile
:
''
,
//电话
ProductId
:
''
,
CarId
:
''
,
//产品类型ID
OrderSource
:
1
,
//类型 0 来源B2B 1 来源B2C
}
,
flightTime
:
null
,
//航班起飞抵达时间
getBusTime
:
null
,
//预约车时间
getBusTimeDate
:
null
,
//预约日期
TotalPeople
:
0
,
//总人数
onoffbus
:
1
,
//1 上车 2下车
}
;
}
,
computed
:
{
filedWidth
()
{
return
{
"col-12"
:
this
.
$q
.
screen
.
width
<
1200
,
"col-6"
:
this
.
$q
.
screen
.
width
>=
1200
,
}
;
}
,
filedGuestWidth
()
{
return
{
"col-12"
:
this
.
$q
.
screen
.
width
<
1200
,
"col-4"
:
this
.
$q
.
screen
.
width
>=
1200
,
}
;
}
,
}
,
created
()
{
}
,
mounted
()
{
if
(
this
.
checkParamsHandler
()){
this
.
getCarData
()
}
this
.
initGuestHandler
();
this
.
getUserInfoHandler
()
}
,
methods
:
{
// 获取商品详情
getCarData
()
{
this
.
$q
.
loading
.
show
();
this
.
apipost
(
"b2c_get_GetCarSingleProductDetail"
,
{
ProductId
:
this
.
parameters
.
ProductId
}
,
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
details
=
r
.
data
.
data
;
this
.
CarObj
=
this
.
details
.
CarTypeList
.
find
((
x
)
=>
this
.
OrderDate
.
CarId
==
x
.
Id
);
this
.
onCarObj
=
this
.
details
.
PlaceList
.
find
((
x
)
=>
this
.
OrderDate
.
onCarId
==
x
.
Id
)
//上车范围
this
.
unCarObj
=
this
.
details
.
PlaceList
.
find
((
x
)
=>
this
.
OrderDate
.
unCarId
==
x
.
Id
)
//下车范围
if
(
this
.
details
.
CarType
!=
3
){
this
.
AirportObj
=
this
.
details
.
AirportList
.
find
((
x
)
=>
this
.
OrderDate
.
AirportId
==
x
.
Id
);
this
.
parameters
.
AirportId
=
this
.
OrderDate
.
AirportId
this
.
parameters
.
FlightTime
=
this
.
OrderDate
.
startDate
}
this
.
parameters
.
CarId
=
this
.
OrderDate
.
CarId
this
.
parameters
.
OrderType
=
this
.
details
.
CarType
}
else
{
this
.
$q
.
notify
({
type
:
"negative"
,
message
:
r
.
data
.
message
,
position
:
"top"
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
}
);
}
this
.
$q
.
loading
.
hide
();
}
,
null
);
}
,
checkParamsHandler
()
{
try
{
if
(
this
.
$route
.
params
&&
this
.
$route
.
params
.
id
)
{
let
key
=
this
.
$route
.
params
.
id
;
let
pickuporderScenTickets
=
localStorage
.
getItem
(
"pickuporderScenTickets"
);
pickuporderScenTickets
=
pickuporderScenTickets
?
JSON
.
parse
(
pickuporderScenTickets
)
:
[];
if
(
pickuporderScenTickets
.
length
>
0
)
{
this
.
order
=
pickuporderScenTickets
.
find
((
x
)
=>
x
.
key
==
key
);
if
(
this
.
order
)
{
this
.
orderKey
=
key
;
this
.
OrderDate
=
this
.
order
.
order
this
.
chosenObj
=
this
.
OrderDate
.
orderInfo
;
this
.
parameters
.
ProductId
=
this
.
order
.
order
.
Id
this
.
parameters
.
OrderDate
=
this
.
OrderDate
.
startDate
this
.
getBusTimeDate
=
this
.
OrderDate
.
startDate
this
.
parameters
.
Unit_Price
=
this
.
OrderDate
.
originalB2CPrice
this
.
parameters
.
Num
=
this
.
chosenObj
.
Count
this
.
parameters
.
Money
=
this
.
OrderDate
.
sumPrice
}
}
}
}
catch
(
error
)
{
console
.
log
(
error
);
}
if
(
this
.
orderKey
==
""
)
{
setTimeout
(()
=>
{
}
,
3000
);
}
return
this
.
orderKey
!=
""
;
}
,
async
submit
()
{
this
.
$refs
.
mail
.
validate
()
this
.
$refs
.
SurName
.
validate
()
this
.
$refs
.
Name
.
validate
()
this
.
$refs
.
ContactWay
.
validate
()
this
.
$refs
.
Mobile
.
validate
()
this
.
$refs
.
OrderDate
.
validate
()
this
.
$refs
.
ManNum
.
validate
()
if
(
this
.
details
.
CarType
!=
3
){
this
.
$refs
.
AirportTerminal
.
validate
()
this
.
$refs
.
AirLine
.
validate
()
this
.
$refs
.
FlightNumber
.
validate
()
this
.
$refs
.
FlightTime
.
validate
()
if
(
this
.
details
.
CarType
!=
1
){
this
.
$refs
.
GetonAddress
.
validate
()
}
else
{
this
.
$refs
.
GetoffAddress
.
validate
()
}
}
else
{
this
.
$refs
.
GetonAddress
.
validate
()
this
.
$refs
.
GetoffAddress
.
validate
()
}
let
flag
=
true
flag
=
await
this
.
formValidateHandler
(
'baseUserInfo'
)
if
(
!
flag
){
let
errorObj
=
this
.
$refs
.
baseUserInfo
.
getValidationComponents
().
find
(
x
=>
x
.
innerError
)
window
.
scrollTo
(
0
,
errorObj
.
$el
.
offsetTop
)
}
else
{
this
.
SetCarOrder
()
}
}
,
async
formValidateHandler
(
formName
){
let
temp
=
this
.
$refs
[
formName
]
let
formObj
=
temp
instanceof
Array
?
temp
[
0
]
:
temp
return
formObj
.
validate
()
}
,
SetCarOrder
(){
this
.
loading
=
true
this
.
apipost
(
"CarSingle_post_SetTYCarOrder"
,
this
.
parameters
,
(
r
)
=>
{
// this.$refs.myform.resetValidation()
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
step
=
2
let
ErpOrderId
=
r
.
data
.
data
.
Id
this
.
AddOrderInfo
(
ErpOrderId
)
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
)
this
.
loading
=
false
}
}
)
}
,
AddOrderInfo
(
ErpOrderId
){
let
GoodsType
=
null
//13接机 14送机 12包车
if
(
this
.
parameters
.
OrderType
==
1
){
GoodsType
=
13
}
else
if
(
this
.
parameters
.
OrderType
==
2
){
GoodsType
=
14
}
else
if
(
this
.
parameters
.
OrderType
==
3
){
GoodsType
=
12
}
this
.
apipost
(
"AddOrderInfo_post"
,
{
SurName
:
this
.
parameters
.
SurName
,
Name
:
this
.
parameters
.
Name
,
ContactNumber
:
this
.
parameters
.
Mobile
,
// 联系电话
Mailbox
:
this
.
userInfo
.
Mailbox
,
//邮箱
GoodsId
:
this
.
parameters
.
ProductId
,
//商品id
GoodsName
:
this
.
details
.
Name
,
//商品名称
GoodsPic
:
this
.
details
.
ImageList
[
0
],
//商品图片
GoodsType
:
GoodsType
,
//商品类型(见枚举) 12包车 13 接机 14送机
OrderMake
:
this
.
parameters
.
OrderDate
,
//订单摘要(例如出行时间)
TotalPrice
:
this
.
parameters
.
Money
,
//总价格
PreferentialPrice
:
0
,
// 优惠总金额
ErpOrderId
:
ErpOrderId
,
//erp订单id
Country
:
this
.
userInfo
.
Country
,
//国家id
PlatformTax
:
0
,
//平台税金默认0
Income
:
0
,
//已收默认0
Refund
:
0
,
//退款金额默认0
}
,
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
step
=
3
this
.
$message
.
success
(
"訂單創建成功"
)
this
.
goPayHandler
(
r
.
data
.
data
)
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
)
}
this
.
loading
=
false
}
)
}
,
goPayHandler
(
pay
){
let
key
=
this
.
$md5
(
JSON
.
stringify
(
pay
))
let
pays
=
localStorage
.
getItem
(
'pays'
)
pays
=
pays
?
JSON
.
parse
(
pays
):[]
pays
.
push
({
key
,
pay
}
)
localStorage
.
setItem
(
"pays"
,
JSON
.
stringify
(
pays
))
let
pickuporderScenTickets
=
localStorage
.
getItem
(
'pickuporderScenTickets'
)
pickuporderScenTickets
=
pickuporderScenTickets
?
JSON
.
parse
(
pickuporderScenTickets
):[]
let
i
=
pickuporderScenTickets
.
findIndex
(
x
=>
x
.
key
==
this
.
orderKey
)
if
(
i
>=
0
){
pickuporderScenTickets
.
splice
(
i
,
1
)
localStorage
.
setItem
(
"pickuporderScenTickets"
,
JSON
.
stringify
(
pickuporderScenTickets
))
}
this
.
CommonJump
(
'/pay/'
+
key
,
{
}
);
}
,
// 航班起飞抵达时间
getTime
(
type
){
// 1航班时间 2预约时间
this
.
onoffbus
=
type
if
(
type
==
1
){
this
.
parameters
.
FlightTime
=
this
.
OrderDate
.
startDate
+
' '
+
this
.
flightTime
this
.
$refs
.
qDateProxy1
.
hide
()
}
else
if
(
type
==
2
){
this
.
parameters
.
OrderDate
=
this
.
OrderDate
.
startDate
+
' '
+
this
.
getBusTime
this
.
$refs
.
qDateProxy2
.
hide
()
}
else
if
(
type
==
3
){
this
.
parameters
.
OrderDate
=
this
.
OrderDate
.
startDate
+
' '
+
this
.
getBusTime
}
}
,
optionsFn
(
cd
)
{
return
(
cd
>=
date
.
formatDate
(
date
.
addToDate
(
new
Date
(),
{
days
:
0
}
),
"YYYY/MM/DD"
)
);
}
,
// 地图上选址
getAddress
(
type
){
if
(
type
==
1
){
this
.
AddressObj
=
this
.
onCarObj
}
else
{
this
.
AddressObj
=
this
.
unCarObj
}
this
.
isShowDialog
=
true
}
,
// 计算人数
getNum
(){
this
.
TotalPeople
=
this
.
parameters
.
ManNum
+
this
.
parameters
.
ChildNum
+
this
.
parameters
.
BabyNum
}
,
// 音频
slideHandler
(
e
)
{
this
.
options
.
currentPage
=
e
.
currentPage
;
if
(
e
.
currentPage
!=
0
&&
this
.
$refs
.
video
&&
this
.
$refs
.
video
.
isPlaying
)
{
this
.
$refs
.
video
.
pause
();
}
}
,
playHandler
(
e
)
{
}
,
pauseHandler
(
e
)
{
}
,
timeChangeHandler
(
e
)
{
//console.log(e)
}
,
//
seekedChangeHandler
(
e
)
{
//console.log(e)
}
,
initGuestHandler
()
{
}
,
// 获取当前用户信息
getUserInfoHandler
()
{
let
u
=
this
.
$user
.
userInfo
;
if
(
u
)
{
this
.
apipost
(
"GetCustomerInfo_post"
,
{
Id
:
u
.
id
}
,
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
userInfo
=
r
.
data
.
data
;
if
(
r
.
data
.
data
.
Moblie
){
this
.
parameters
.
Mobile
=
r
.
data
.
data
.
Moblie
}
}
else
{
this
.
$user
.
userInfo
=
null
;
}
this
.
initCountry
();
}
);
}
}
,
// 初始化国家
initCountry
()
{
this
.
apipost
(
"GetCountryInfo_post"
,
{
}
,
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
countrys
=
r
.
data
.
data
.
countList
;
this
.
userInfo
.
Country
=
this
.
countrys
[
0
].
ID
;
this
.
areaCodes
=
r
.
data
.
data
.
phoneCountList
;
this
.
changeCountry
(
this
.
userInfo
.
Country
);
this
.
areaCodes
.
forEach
((
x
)
=>
{
let
temp
=
this
.
countrys
.
find
((
y
)
=>
y
.
ID
==
x
.
ID
);
x
.
EnName
=
`${temp.EnName
}
(${x.PhoneCode
}
)`
;
}
);
}
}
);
}
,
changeCountry
(
id
)
{
this
.
userInfo
.
areaCode
=
this
.
areaCodes
.
find
((
x
)
=>
x
.
ID
==
id
).
PhoneCode
;
}
,
}
,
}
;
<
/script
>
<
style
>
.
order
-
preview
.
q
-
stepper__content
{
display
:
none
!
important
;
}
.
order
-
preview
.
q
-
toggle__track
{
height
:
0.7
em
;
border
-
radius
:
0.35
em
;
opacity
:
0.38
;
width
:
50
px
;
}
.
order
-
preview
.
q
-
toggle__thumb
{
top
:
0.42
em
;
left
:
0.45
em
;
width
:
0.5
em
;
height
:
0.5
em
;
transition
:
left
0.22
s
ease
-
in
-
out
;
user
-
select
:
none
;
z
-
index
:
0
;
}
.
order
-
preview
.
q
-
toggle__inner
--
truthy
.
q
-
toggle__thumb
{
left
:
0.94
em
;
}
.
order
-
preview
.
q
-
toggle__inner
{
width
:
1.9
em
;
}
.
order
-
preview
.
q
-
toggle__label
{
margin
-
top
:
12
px
;
}
.
guest
-
item
:
hover
{
background
:
rgba
(
241
,
65
,
108
,.
04
)
!
important
;
}
.
text
-
h6Detail
{
text
-
align
:
center
;
font
-
size
:
18
px
;
color
:
#
333
;
font
-
weight
:
700
;
position
:
relative
;
width
:
100
%
;
height
:
50
px
;
}
.
text
-
h6Detail
i
{
position
:
absolute
;
right
:
20
px
;
top
:
10
px
;
cursor
:
pointer
;
font
-
size
:
23
px
;
}
<
/style
>
\ No newline at end of file
src/pages/detailsCar.vue
View file @
4f8de789
...
...
@@ -132,11 +132,10 @@
class=
"q-mr-sm"
/>
<span
>
日本 -
<span
v-for=
"(x, i) in citys"
:key=
"i"
>
<span
class=
"cursor-pointer"
>
{{
x
}}
</span>
<span
v-if=
"i + 1 != citys.length"
class=
"q-mr-sm"
>
,
</span>
v-for=
"(x, i) in dataList.CityList2"
:key=
"i"
>
{{
x
.
CountryName
}}
-
<span>
<span
class=
"cursor-pointer"
>
{{
x
.
CityName
}}
</span>
<span
v-if=
"i + 1 != dataList.CityList2.length"
class=
"q-mr-sm"
>
,
</span>
</span>
</span>
</div>
...
...
@@ -1011,7 +1010,6 @@ export default {
originalB2CPrice
:
x
.
Price
,
remainNum
:
1
,
Count
:
1
,
isSupportChildren
:
1
,
safeMoney
:
0
,
}
if
(
date
.
formatDate
(
Date
.
now
(),
'YYYY-MM-DD'
)
!=
x
.
Date
){
...
...
@@ -1025,69 +1023,6 @@ export default {
},
null
)
},
getCarPriceData
()
{
this
.
$q
.
loading
.
show
();
this
.
apipost
(
"b2c_get_GetCarSingleProductMonthPriceAll"
,
{
ProductId
:
this
.
msg
.
configId
,
Month
:
this
.
currentYM
.
str
},
(
r
)
=>
{
let
list
=
[[]];
let
y
=
0
;
// 元素纵向下标
let
day
=
0
;
if
(
r
.
data
.
resultCode
==
1
)
{
let
week
=
dayjs
(
this
.
currentYM
.
str
+
"-01"
).
day
();
console
.
log
(
"week"
,
week
);
list
[
0
].
length
=
week
;
const
isCurrent
=
this
.
currentYM
.
year
===
dayjs
().
year
()
&&
this
.
currentYM
.
month
===
dayjs
().
month
()
+
1
;
this
.
isCurrent
=
isCurrent
;
this
.
isLast
=
this
.
currentYM
.
year
===
dayjs
().
year
()
+
1
&&
this
.
currentYM
.
month
===
dayjs
().
month
()
+
1
;
// 如果是当前月
if
(
isCurrent
)
{
let
days
=
dayjs
(
r
.
data
.
data
[
0
].
Date
).
date
();
day
=
days
;
for
(
let
i
=
1
;
i
<=
days
;
i
++
)
{
list
[
y
].
push
({
day
:
i
,
disabled
:
true
,
});
week
++
;
if
(
week
===
7
)
{
week
=
0
;
y
++
;
list
[
y
]
=
[];
}
}
}
r
.
data
.
data
.
forEach
((
item
)
=>
{
list
[
y
].
push
({
...
item
,
day
:
++
day
,
});
week
++
;
if
(
week
===
7
)
{
week
=
0
;
y
++
;
list
[
y
]
=
[];
}
});
this
.
daysList
=
list
;
console
.
log
(
"list"
,
list
);
}
else
{
this
.
$q
.
notify
({
type
:
"negative"
,
message
:
r
.
data
.
message
,
position
:
"top"
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
});
}
this
.
$q
.
loading
.
hide
();
},
null
);
},
menu
()
{
this
.
scroll
=
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
;
...
...
src/pages/detailsNew.vue
View file @
4f8de789
...
...
@@ -196,7 +196,7 @@
/>
</div>
</div>
<div
class=
"q-mt-lg"
>
<div
class=
"q-mt-lg"
v-if=
"dataList.productRecommend"
>
<div
class=
"q-mt-sm"
v-for=
"(x, i) in dataList.productRecommend.split('\n')"
...
...
@@ -388,7 +388,7 @@
<div
class=
"col q-ml-xl position-relative"
v-if=
"
(!(dataList.priceList && dataList.priceList[0].teamType==2)&&!(dataList.currentPrice && dataList.currentPrice.teamType==2)) &&
dataList.priceList.length>0&&
(!(dataList.priceList && dataList.priceList[0].teamType==2)&&!(dataList.currentPrice && dataList.currentPrice.teamType==2)) &&
currentHeight > days[0].top - 60 &&
currentHeight
<
navs
[
2
].
top
&&
$
q
.
platform
.
is
.
desktop
...
...
@@ -452,7 +452,7 @@
'q-px-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
desktop
,
}"
></smaple>
<template
v-if=
"(dataList.priceList && dataList.priceList[0].teamType==2)||(dataList.currentPrice && dataList.currentPrice.teamType==2)"
>
<template
v-if=
"
dataList.priceList.length>0&&
(dataList.priceList && dataList.priceList[0].teamType==2)||(dataList.currentPrice && dataList.currentPrice.teamType==2)"
>
<trip
:trip=
"dataList"
@
change=
"changeTripShowHandler"
></trip>
</
template
>
<
template
v-else
>
...
...
src/router/routes.js
View file @
4f8de789
...
...
@@ -36,6 +36,14 @@ const routes = [{
path
:
'/PickuporderForm/:id'
,
component
:
()
=>
import
(
'pages/Pickuporder/orderForm.vue'
)
},
{
// 景区门票详情
path
:
'/detailsScenicSpotTicket/:id'
,
component
:
()
=>
import
(
'pages/ScenicSpotTicket/details.vue'
)
},
{
// 景区门票下单
path
:
'/ScenicSpotTicketOrderForm/:id'
,
component
:
()
=>
import
(
'pages/ScenicSpotTicket/orderForm.vue'
)
},
{
// 酒店
path
:
'/detailHotal/:id'
,
component
:
()
=>
...
...
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