Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigwood
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
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
罗超
bigwood
Commits
eef91431
Commit
eef91431
authored
Jan 17, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
c4761c7e
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1617 additions
and
3 deletions
+1617
-3
App.vue
src/App.vue
+6
-0
CharteredBus.ts
src/api/CharteredBus.ts
+39
-0
CharteredBusCard.vue
src/components/CharteredBus/CharteredBusCard.vue
+265
-0
ListHeader.vue
src/components/CharteredBus/list/ListHeader.vue
+233
-0
ListTable.vue
src/components/CharteredBus/list/ListTable.vue
+185
-0
ListTable.vue
src/components/ticket/list/ListTable.vue
+1
-1
index.ts
src/i18n/zh-TW/index.ts
+79
-0
CharteredBusList.vue
src/pages/CharteredBus/CharteredBusList.vue
+57
-0
CharteredBusOrder.vue
src/pages/CharteredBus/CharteredBusOrder.vue
+56
-0
CharteredBusPreview.vue
src/pages/CharteredBus/CharteredBusPreview.vue
+684
-0
TicketOrderPreview.vue
src/pages/ticket/TicketOrderPreview.vue
+1
-1
routes.ts
src/router/routes.ts
+3
-1
hotelRate.ts
src/utils/hotelRate.ts
+8
-0
No files found.
src/App.vue
View file @
eef91431
...
@@ -131,10 +131,16 @@ export default defineComponent({
...
@@ -131,10 +131,16 @@ export default defineComponent({
font-size
:
10px
font-size
:
10px
.fz14
.fz14
font-size
:
14px
font-size
:
14px
.fz15
font-size
:
15px
.fz16
.fz16
font-size
:
16px
font-size
:
16px
.fz17
font-size
:
17px
.fz18
.fz18
font-size
:
18px
font-size
:
18px
.fz19
font-size
:
19px
.fz20
.fz20
font-size
:
20px
font-size
:
20px
.mycard
.mycard
...
...
src/api/CharteredBus.ts
0 → 100644
View file @
eef91431
import
{
HttpResponse
}
from
'../@types'
import
request
from
'./request'
class
CharteredBusService
{
// 取消门票訂單
static
async
setTicketOrderCancel
(
OrderId
:
number
):
Promise
<
HttpResponse
>
{
return
request
(
'ticket_post_CancelTicketOrder'
,{
OrderId
})
}
// 门票訂單列表
static
async
getTicketOrderList
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'ticket_post_GetMyTicketOrderPageList'
,
param
)
}
// 提交包车訂單
static
async
SetTYCarOrder
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'CarSingle_post_SetTYCarOrder'
,
param
)
}
// 获取产品报价
static
async
GetTYCarSingleProductMonthPrice
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'CarSingle_post_GetTYCarSingleProductMonthPrice'
,
param
)
}
// 包车详情
static
async
GetTYCarSingleProductInfo
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'CarSingle_post_GetTYCarSingleProductInfo'
,
param
)
}
// 包车列表
static
async
getTYCarSingleProductList
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'CarSingle_post_GetTYCarSingleProductPageList'
,
param
)
}
// 获取包车机场
static
async
GetCarSingleAllAirport
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'CarSingle_post_GetCarSingleAllAirportList'
,
params
)
}
// 获取包车所有国家
static
async
GetCarSingleAllPlace
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'CarSingle_post_GetCarSingleAllPlaceList'
,
params
)
}
}
export
default
CharteredBusService
src/components/CharteredBus/CharteredBusCard.vue
0 → 100644
View file @
eef91431
<
template
>
<q-card
class=
"bg-white q-py-lg column"
style=
"max-width: 1366px; min-width: 375px; width: 70%; height: 80vh"
>
<div
class=
"q-px-lg q-mb-lg"
:class=
"
{ 'row justify-between': $q.platform.is.desktop }">
<div
:class=
"
{ 'row items-center': $q.platform.is.desktop, '': $q.platform.is.mobile }">
<div
class=
"mobile-only row items-center"
>
<div
class=
"bg-info text-grey-100 rounded-borders q-mr-sm q-px-md"
></div>
<div
class=
"text-weight-bold fz20 ellipsis"
style=
"width: 280px"
>
{{
t
.
Name
}}
</div>
<q-icon
class=
"text-grey-13 cursor-pointer text-right q-ml-sm"
name=
"close"
size=
"md"
v-close-popup
></q-icon>
</div>
<div
class=
"text-weight-bold fz20 ellipsis desktop-only"
>
<span
class=
"inline-block"
>
{{
t
.
Name
}}
<q-badge
color=
"info"
:label=
"typeInfo.name"
/>
</span>
</div>
<div
:class=
"
{'q-ml-md':$q.platform.is.desktop}">
<!--
<q-rating
v-model=
"h.Star"
size=
"1.5em"
color=
"orange"
:max=
"h.Star"
readonly
/>
-->
</div>
</div>
<q-icon
class=
"text-grey-13 cursor-pointer desktop-only"
name=
"close"
size=
"md"
v-close-popup
></q-icon>
</div>
<q-scroll-area
:thumb-style=
"scrollStyle.thumbStyle"
:bar-style=
"scrollStyle.barStyle"
class=
"col q-px-lg"
>
<div
class=
"row nowrap"
v-if=
"t.CityList2"
>
<q-icon
class=
"text-grey-13 q-mr-xs"
name=
"place"
size=
"xs"
></q-icon>
<span
class=
"col fz14 text-weight-bold text-blick"
>
{{
t
.
CityList2
[
0
].
CountryName
}}{{
t
.
CityList2
[
0
].
CityName
}}
</span>
</div>
<!--
<div
class=
"q-pt-sm"
:class=
"
{ row: $q.platform.is.desktop, column: $q.platform.is.mobile }">
<div>
<q-icon
class=
"text-grey-13 q-mr-xs"
name=
"phone"
size=
"xs"
></q-icon>
<span
class=
"fz14 text-weight-bold text-blick"
>
{{
$t
(
'hotel.details.zuoji'
)
}}
:
</span>
<span
class=
"fz14 text-weight-bold text-blue q-ml-sm q-mr-md"
>
FAX:
{{
t
.
Tel
}}
</span>
</div>
<div
:class=
"
{ 'q-mr-lg': $q.platform.is.desktop, 'q-mt-sm': $q.platform.is.mobile }">
<span
class=
"fz14 text-weight-bold text-blick"
>
{{
$t
(
'hotel.details.guanwang'
)
}}
:
</span>
<a
class=
"fz14 text-weight-bold text-blue q-ml-sm"
:href=
"t.Url"
target=
"_blank"
>
{{
t
.
Url
}}
</a>
</div>
</div>
-->
<div
class=
"q-py-lg no-wrap col"
:class=
"
{ row: $q.platform.is.desktop, column: $q.platform.is.mobile }">
<div
class=
"row rounded-borders relative-position"
:class=
"
{ 'col-6': $q.platform.is.desktop, 'height-320': $q.platform.is.mobile }" style="overflow: hidden" v-if="t.ImageList">
<div
v-if=
"t.PlayTimeHour||t.PlayTimeMinutes"
class=
"f12 absolute-left bg-white"
style=
"padding: 5px; bottom: unset; z-index: 1; border-bottom-right-radius: 4px"
>
<div
class=
"row items-center rounded-borders"
style=
"overflow: hidden"
>
<div
class=
"bg-dark text-white"
style=
"padding: 0 4px; font-size: 12px"
>
{{
$t
(
'v102.CharteredBus.recommendTime'
)
}}
</div>
<div
class=
"text-dark"
style=
"padding: 0 4px; font-size: 12px; background: #f0bd86"
>
<template
v-if=
"t.PlayTimeHour"
>
{{
t
.
PlayTimeHour
}}{{
$t
(
'v102.CharteredBus.hour'
)
}}
</
template
>
<
template
v-if=
"t.PlayTimeMinutes"
>
{{
t
.
PlayTimeMinutes
}}{{
$t
(
'v102.CharteredBus.minutes'
)
}}
</
template
>
</div>
</div>
</div>
<div
class=
"col-7"
:class=
"{ 'col-7': t.ImageList.length >= 3, 'col-6': t.ImageList.length == 2, 'col-12': t.ImageList.length == 1 }"
>
<q-img
@
click=
"showImageHandler(`${t.ImageList[0]}`)"
:src=
"`${t.ImageList[0]}`"
spinner-color=
"drk"
spinner-size=
"20px"
height=
"100%"
mode=
"cover"
>
<
template
v-slot:error
>
<div
class=
"absolute-full flex flex-center bg-blue-1 text-dark"
>
{{
$t
(
'v102.CharteredBus.load'
)
}}
</div>
</
template
>
</q-img>
</div>
<div
class=
"col q-pl-sm"
v-if=
"t.ImageList.length > 1"
>
<div
:style=
"{ height: t.ImageList.length > 2 ? '50%' : '100%' }"
>
<q-img
@
click=
"showImageHandler(`${t.ImageList[1]}`)"
:src=
"`${t.ImageList[1]}`"
spinner-color=
"drk"
spinner-size=
"20px"
height=
"100%"
mode=
"cover"
>
<
template
v-slot:error
>
<div
class=
"absolute-full flex flex-center bg-blue-1 text-dark"
>
{{
$t
(
'v102.CharteredBus.load'
)
}}
</div>
</
template
>
</q-img>
</div>
<div
class=
"row items-end q-pt-sm"
style=
"height: 50%"
v-if=
"t.ImageList.length > 2"
>
<q-img
@
click=
"showImageHandler(`${t.ImageList[2]}`)"
:src=
"`${t.ImageList[2]}`"
spinner-color=
"drk"
spinner-size=
"20px"
height=
"100%"
mode=
"cover"
>
<
template
v-slot:error
>
<div
class=
"absolute-full flex flex-center bg-blue-1 text-dark"
>
{{
$t
(
'v102.CharteredBus.load'
)
}}
</div>
</
template
>
<div
class=
"absolute-full text-subtitle2 flex flex-center"
v-if=
"t.ImageList.length > 3"
>
<span
class=
"fz20 text-weight-bold"
>
+
</span>
<span
class=
"text-h5 text-weight-bold"
>
{{ t.ImageList.length - 3 }}
</span>
</div>
</q-img>
</div>
</div>
</div>
<div
class=
"rounded-borders"
:class=
"{ 'q-ml-sm col': $q.platform.is.desktop, 'q-mt-sm height-320': $q.platform.is.mobile }"
style=
"overflow: hidden"
id=
"baiduCharteredBusMapBaoChe"
>
<GoogleMap
api-key=
"AIzaSyCvRZN9lGl3y3EsM0A0sWPf1pZ2olGsyNg"
style=
"width: 100%; height: 100%"
:center=
"center"
:zoom=
"15"
v-if=
"center"
>
<Marker
:options=
"{ position: center }"
/>
</GoogleMap>
</div>
</div>
<div
class=
"bg-light-blue-1 q-pa-md fz14 rounded-borders"
>
<div
class=
"text-weight-bold"
>
{{ $t('v102.CharteredBus.detail') }}
</div>
<div
class=
"text-grey-8 q-mt-sm"
>
{{t.Description}}
</div>
</div>
<div
:class=
"{ 'q-px-lg': $q.platform.is.desktop }"
>
<div
class=
"q-mt-lg row"
>
<div
class=
"col-3 f12 text-grey-500"
>
{{ $t('v102.CharteredBus.d1') }}
</div>
<div
class=
"col text-subtitle2 text-weight-bolder"
>
{{t.Introduce?t.Introduce:'-'}}
</div>
</div>
</div>
<div
v-if=
"t.CarType==3"
:class=
"{ 'q-px-lg': $q.platform.is.desktop }"
>
<div
class=
"q-mt-lg row"
>
<div
class=
"col-3 f12 text-grey-500"
>
{{ $t('v102.CharteredBus.d7') }}
</div>
<div
class=
"col text-subtitle2 text-weight-bolder"
>
{{t.TravelHours?t.TravelHours:'-'}}
</div>
</div>
</div>
<div
:class=
"{ 'q-px-lg': $q.platform.is.desktop }"
>
<div
class=
"q-mt-lg row"
>
<div
class=
"col-3 f12 text-grey-500"
>
{{ $t('v102.CharteredBus.d5') }}
</div>
<div
class=
"col text-subtitle2 text-weight-bolder"
>
<
template
v-if=
"t.PriceIncludeList&&t.PriceIncludeList.length>0"
>
<q-badge
v-for=
"x in t.PriceIncludeList"
color=
"light-blue-1"
class=
"q-mr-md text-light-blue"
>
{{
x
}}
</q-badge>
</
template
>
<
template
v-else
>
-
</
template
>
</div>
</div>
</div>
<div
:class=
"{ 'q-px-lg': $q.platform.is.desktop }"
>
<div
class=
"q-mt-lg row"
>
<div
class=
"col-3 f12 text-grey-500"
>
{{ $t('v102.CharteredBus.d6') }}
</div>
<div
class=
"col text-subtitle2 text-weight-bolder"
>
<
template
v-if=
"t.PriceNotIncludeList&&t.PriceNotIncludeList.length>0"
>
<q-badge
v-for=
"x in t.PriceNotIncludeList"
color=
"light-blue-1"
class=
"q-mr-md text-light-blue"
>
{{
x
}}
</q-badge>
</
template
>
<
template
v-else
>
-
</
template
>
</div>
</div>
</div>
<div
:class=
"{ 'q-px-lg': $q.platform.is.desktop }"
>
<div
class=
"q-mt-lg row"
>
<div
class=
"col-3 f12 text-grey-500"
>
{{ $t('v102.CharteredBus.d2') }}
</div>
<div
class=
"col text-subtitle2 text-weight-bolder"
>
{{t.HowUse?t.HowUse:'-'}}
</div>
</div>
</div>
<div
:class=
"{ 'q-px-lg': $q.platform.is.desktop }"
>
<div
class=
"q-mt-lg row"
>
<div
class=
"col-3 f12 text-grey-500"
>
{{ $t('v102.CharteredBus.d3') }}
</div>
<div
class=
"col text-subtitle2 text-weight-bolder"
>
{{t.CancelPolicy?t.CancelPolicy:'-'}}
</div>
</div>
</div>
<!-- <div class="q-mt-lg">
<div class="bg-orange-1 q-pa-md rounded-borders fz14" style="border: 1px dashed orange">
<div class="text-weight-bold">{{ $t('v102.CharteredBus.d2') }}</div>
<div class="text-grey-700 q-mt-sm">{{t.HowUse}}</div>
</div>
</div> -->
<div
class=
"q-mt-lg"
>
<div
class=
"bg-orange-1 q-pa-md rounded-borders fz14"
style=
"border: 1px dashed orange"
>
<div
class=
"text-weight-bold"
>
{{ $t('v102.CharteredBus.d4') }}
</div>
<div
class=
"text-grey-700 q-mt-sm"
>
{{t.BuyNotes}}
</div>
</div>
</div>
</q-scroll-area>
</q-card>
<q-inner-loading
:showing=
"loading"
:label=
"$t('loading')"
label-class=
"text-grey-6 f12"
/>
<q-dialog
class=
"no-padding"
v-model=
"showImagePriview"
persistent
>
<image-preview
:current=
"currentImage"
:images=
"images"
></image-preview>
</q-dialog>
</template>
<
script
lang=
"ts"
>
import
CharteredBusService
from
'../../api/CharteredBus'
import
{
DirtionmaryHelper
}
from
"src/config/dictionary"
;
import
useScrollModule
from
"src/module/scrollbar/scrollModule"
;
import
{
defineComponent
,
nextTick
,
reactive
,
toRefs
,
watch
}
from
"vue"
;
import
{
GoogleMap
,
Marker
}
from
'vue3-google-map'
import
ImagePreview
from
"../common/ImagePreview.vue"
;
import
{
ApiResult
}
from
'../../@types/enumHelper'
import
message
from
'../../utils/message'
import
{
useHotel
}
from
'../../utils/hotelRate'
export
default
defineComponent
({
props
:[
"ProductId"
],
components
:{
GoogleMap
,
ImagePreview
},
setup
(
props
)
{
const
data
=
reactive
({
t
:{}
as
any
,
scrollStyle
:
{}
as
any
,
loading
:
false
,
currentImage
:
''
,
showImagePriview
:
false
,
center
:{}
as
any
,
images
:[],
type
:
[],
typeInfo
:
{}
as
any
,
Id
:
props
.
ProductId
})
// data.Id = props.ProductId
// watch(
// () => data.Id,
// (n, o) => {
// methods.getInfo()
// }
// )
data
.
scrollStyle
=
useScrollModule
().
scrollStyle
data
.
type
=
useHotel
.
getCharteredBusType
()
const
methods
=
{
showImageHandler
(
url
:
string
)
{
data
.
currentImage
=
url
data
.
showImagePriview
=
true
},
getInfo
(){
let
param
=
{
ProductId
:
data
.
Id
}
CharteredBusService
.
GetTYCarSingleProductInfo
(
param
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
data
.
t
=
r
.
data
.
data
data
.
typeInfo
=
data
.
type
.
find
(
y
=>
y
.
id
==
data
.
t
.
CarType
)
??
data
.
type
[
1
]
data
.
images
=
r
.
data
.
data
.
ImageList
nextTick
(()
=>
{
methods
.
initMap
(
data
.
t
.
PlaceList
[
0
].
Lng
,
data
.
t
.
PlaceList
[
0
].
Lat
)
})
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
}).
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
})
},
initMap
(
lat
:
any
,
lng
:
any
)
{
let
country
=
localStorage
.
getItem
(
DirtionmaryHelper
.
USER_IN_COUNTRY
)
??
'GW'
if
(
country
!=
'CN'
){
data
.
center
=
{
lat
:
parseFloat
(
lng
),
lng
:
parseFloat
(
lat
)
}
}
else
{
let
Bmap
=
window
.
BMapGL
var
b
=
new
Bmap
.
Map
(
'baiduCharteredBusMapBaoChe'
)
b
.
centerAndZoom
(
new
Bmap
.
Point
(
lat
,
lng
),
15
)
b
.
enableScrollWheelZoom
(
true
)
b
.
addOverlay
(
new
Bmap
.
Marker
(
new
Bmap
.
Point
(
lat
,
lng
)))
}
},
}
methods
.
getInfo
()
return
{
...
toRefs
(
data
),
...
methods
}
}
})
</
script
>
<
style
>
</
style
>
src/components/CharteredBus/list/ListHeader.vue
0 → 100644
View file @
eef91431
<
template
>
<div
class=
"rounded-borders bg-white row items-center q-pa-md"
>
<q-select
v-if=
"$q.platform.is.desktop"
style=
"min-width: 190px;"
unelevated
v-model=
"searchClone.CarType"
dense
:options=
"CharteredBusType"
emit-value
option-label=
"name"
option-value=
"id"
map-options
:label=
"$t('v102.CharteredBus.baochetype')"
standout
@
update:model-value=
"getCarType"
/>
<n-cascader
v-if=
"$q.platform.is.desktop"
class=
"col-2 no-border q-ml-lg"
@
update:value=
"changearea"
v-model:value=
"cascader.addressValue"
size=
"large"
:placeholder=
"$t('hotel.area')"
clearable
check-strategy=
"all"
:options=
"provinces"
value-field=
"ID"
label-field=
"Name"
remote
cascade
/>
<n-cascader
v-if=
"$q.platform.is.desktop&&searchClone.CarType!=3"
class=
"col-2 no-border q-ml-lg"
@
update:value=
"changeareaAirport"
v-model:value=
"cascader.AirportValue"
size=
"large"
:placeholder=
"$t('v102.CharteredBus.jiansuojichang')"
clearable
check-strategy=
"all"
:options=
"AirportList"
value-field=
"ID"
label-field=
"Name"
remote
cascade
/>
<q-field
v-if=
"$q.platform.is.desktop"
stack-label
:label=
"$t('daterange')"
standout
class=
"q-ml-lg col-2"
style=
"min-width: 190px"
dense
>
<div
class=
"self-center full-width no-outline"
tabindex=
"0"
>
{{
searchClone
.
Q_Date
}}
</div>
<q-popup-proxy
:offset=
"[0, 10]"
ref=
"qDateProxy"
>
<q-date
v-model=
"searchClone.Q_Date"
:options=
"optionsFn"
mask=
"YYYY/MM/DD"
@
update:model-value=
"dateRangeHandler"
></q-date>
</q-popup-proxy>
</q-field>
<div
class=
"col"
></div>
<q-btn
unelevated
class=
"bg-grey-3 hover q-mr-md"
:title=
"$t('morequery')"
>
<q-badge
rounded
class=
"din bg-red-2 text-red-14 text-weight-bold"
floating
:label=
"searchCnt"
v-if=
"searchCnt > 0"
/>
<svg-icon
color=
"dark"
icon=
"Text/Filter.svg"
:tips=
"$t('morequery')"
:size=
"20"
></svg-icon>
<q-tooltip>
{{
$t
(
'morequery'
)
}}
</q-tooltip>
<q-popup-proxy
class=
"no-shadow"
style=
"box-shadow: 0 0 50px #ddd !important"
:offset=
"[0, 20]"
:model-value=
"canHide"
>
<q-card
class=
"q-pa-md rounded-borders"
style=
"width: 300px"
>
<div
class=
"q-mb-md text-subtitle2"
>
{{
$t
(
'morequery'
)
}}
</div>
<div
class=
"q-my-md"
v-if=
"$q.platform.is.mobile"
>
<q-select
v-if=
"$q.platform.is.desktop"
style=
"min-width: 190px;"
unelevated
v-model=
"searchClone.CarType"
dense
:options=
"CharteredBusType"
emit-value
option-label=
"name"
option-value=
"id"
map-options
:label=
"$t('v102.CharteredBus.baochetype')"
standout
/>
</div>
<div
class=
"q-my-md"
v-if=
"$q.platform.is.mobile"
>
<n-cascader
class=
"col-2 no-border"
@
update:value=
"changearea"
v-model:value=
"cascader.addressValue"
size=
"large"
:placeholder=
"$t('hotel.area')"
clearable
check-strategy=
"all"
:options=
"provinces"
value-field=
"ID"
label-field=
"Name"
remote
cascade
/>
</div>
<div
class=
"q-my-md"
v-if=
"$q.platform.is.mobile"
>
<q-field
stack-label
:label=
"$t('daterange')"
standout
class=
"col-2"
style=
"min-width: 190px"
dense
>
<div
class=
"self-center full-width no-outline"
tabindex=
"0"
>
{{
searchClone
.
Q_Date
}}
</div>
<q-popup-proxy
:offset=
"[0, 10]"
ref=
"qDateProxy"
>
<q-date
v-model=
"searchClone.Q_Date"
:options=
"optionsFn"
mask=
"YYYY/MM/DD"
@
update:model-value=
"dateRangeHandler"
></q-date>
</q-popup-proxy>
</q-field>
</div>
<div
class=
"q-my-md"
v-if=
"$q.platform.is.mobile&&searchClone.CarType!=3"
>
<n-cascader
class=
"no-border"
@
update:value=
"changeareaAirport"
v-model:value=
"cascader.AirportValue"
size=
"large"
:placeholder=
"$t('hotel.area')"
clearable
check-strategy=
"all"
:options=
"AirportList"
value-field=
"ID"
label-field=
"Name"
remote
cascade
/>
</div>
<div
class=
"q-my-md row items-center "
>
<q-input
v-model=
"searchClone.Q_SPeopleNum"
class=
"col q-mr-md"
mask=
"#"
reverse-fill-mask
dense
type=
"text"
standout
:label=
"$t('v102.CharteredBus.qishirenshu')"
/>
<q-input
v-model=
"searchClone.Q_EPeopleNum"
class=
"col"
dense
mask=
"#"
reverse-fill-mask
ftype=
"text"
standout
:label=
"$t('v102.CharteredBus.jiezhirenshu')"
/>
</div>
<div
class=
"row items-center"
>
<q-input
v-model=
"searchClone.Q_SPrice"
class=
"col q-mr-md"
mask=
"#.##"
reverse-fill-mask
dense
type=
"text"
standout
:label=
"$t('hotel.minPrice')"
/>
<q-input
v-model=
"searchClone.Q_EPrice"
class=
"col"
dense
mask=
"#.##"
reverse-fill-mask
ftype=
"text"
standout
:label=
"$t('hotel.maxPrice')"
/>
</div>
</q-card>
</q-popup-proxy>
</q-btn>
<q-btn
v-if=
"$q.platform.is.desktop"
color=
"primary"
unelevated
:label=
"$t('query')"
@
click=
"setSearchHandler"
/>
<q-btn
v-else
color=
"primary"
:round=
"$q.platform.is.mobile"
:dense=
"$q.platform.is.mobile"
:icon=
"$q.platform.is.mobile?'search':''"
unelevated
:label=
"$q.platform.is.mobile?'':$t('query')"
@
click=
"setSearchHandler"
/>
</div>
</
template
>
<
script
lang=
"ts"
>
import
svgIcon
from
'../../global/svg-icon.vue'
import
{
date
}
from
'quasar'
import
{
useQuasar
}
from
'quasar'
import
{
computed
,
ref
,
inject
,
reactive
,
toRefs
}
from
'vue'
import
{
DirtionmaryHelper
}
from
'src/config/dictionary'
import
CharteredBusService
from
'src/api/CharteredBus'
import
{
CascaderOption
,
NCascader
}
from
'naive-ui'
import
{
ApiResult
}
from
'src/@types/enumHelper'
import
message
from
'src/utils/message'
import
{
useHotel
}
from
'../../../utils/hotelRate'
export
default
{
components
:
{
svgIcon
,
NCascader
},
setup
(
props
)
{
const
$q
=
useQuasar
()
const
qDateProxy
=
ref
(
null
)
as
any
const
data
=
reactive
({
CharteredBusType
:
useHotel
.
getCharteredBusType
(),
provinces
:
[]
as
any
,
cascader
:
{
addressValue
:
null
,
AirportValue
:
null
}
as
any
,
searchClone
:{}
as
any
,
canHide
:
false
,
AirportList
:
[]
as
any
})
const
search
=
inject
(
DirtionmaryHelper
.
TICKET_QUERY_PARAM
)
as
any
data
.
searchClone
=
JSON
.
parse
(
JSON
.
stringify
(
search
.
msg
))
const
methods
=
{
getCarType
(
e
:
any
){
if
(
e
){
methods
.
initAddress
()
methods
.
initAirport
()
}
else
{
data
.
provinces
=
[]
as
any
data
.
AirportList
=
[]
as
any
data
.
cascader
.
addressValue
=
null
data
.
cascader
.
AirportValue
=
null
data
.
searchClone
.
Q_Province
=
0
data
.
searchClone
.
Q_City
=
0
data
.
searchClone
.
Q_AirportId
=
0
}
},
// 获取城市地址
initAddress
()
{
CharteredBusService
.
GetCarSingleAllPlace
({
AirportId
:
data
.
searchClone
.
Q_AirportId
,
Type
:
data
.
searchClone
.
CarType
})
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
let
newData
=
[]
r
.
data
.
data
.
forEach
((
x
:
any
)
=>
{
let
newobj
=
{
ID
:
x
.
Country
,
Name
:
x
.
CountryName
,
isLeaf
:
false
,
depth
:
1
,
children
:
[]
as
any
}
x
.
CityList
.
forEach
((
y
:
any
)
=>
{
let
newobj2
=
{
ID
:
y
.
City
,
Name
:
y
.
CityName
,
isLeaf
:
true
,
depth
:
2
}
newobj
.
children
.
push
(
newobj2
)
})
newData
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
newobj
)))
})
data
.
provinces
=
newData
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
})
.
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
})
},
// 获取机场
initAirport
(){
CharteredBusService
.
GetCarSingleAllAirport
({
CountryId
:
data
.
searchClone
.
Q_Country
,
CityId
:
data
.
searchClone
.
Q_City
,
Type
:
data
.
searchClone
.
CarType
})
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
let
newData
=
[]
r
.
data
.
data
.
forEach
((
x
:
any
)
=>
{
let
newobj
=
{
ID
:
x
.
Country
,
Name
:
x
.
CountryName
,
isLeaf
:
false
,
depth
:
1
,
children
:
[]
as
any
}
x
.
AirportList
.
forEach
((
y
:
any
)
=>
{
let
newobj2
=
{
ID
:
y
.
AirportId
,
Name
:
y
.
AirportName
,
isLeaf
:
true
,
depth
:
2
}
newobj
.
children
.
push
(
newobj2
)
})
newData
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
newobj
)))
})
data
.
AirportList
=
newData
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
})
.
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
})
},
changearea
(
e
:
number
,
option
:
any
,
pathValues
:
Array
<
any
>
)
{
data
.
searchClone
.
Q_Province
=
0
data
.
searchClone
.
Q_City
=
0
if
(
pathValues
)
{
if
(
pathValues
.
length
>
0
)
{
data
.
searchClone
.
Q_Province
=
pathValues
[
0
].
ID
}
if
(
pathValues
.
length
>
1
)
{
data
.
searchClone
.
Q_City
=
pathValues
[
1
].
ID
}
}
methods
.
initAirport
()
},
changeareaAirport
(
e
:
number
,
option
:
any
,
pathValues
:
Array
<
any
>
)
{
data
.
searchClone
.
Q_AirportId
=
0
if
(
pathValues
)
{
if
(
pathValues
.
length
>
0
)
{
// data.searchClone.Q_Province = pathValues[0].ID
}
if
(
pathValues
.
length
>
1
)
{
data
.
searchClone
.
Q_AirportId
=
pathValues
[
1
].
ID
}
}
},
setSearchHandler
(){
search
.
msg
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
searchClone
))
},
changeViewHandler
(
t
:
number
){
data
.
searchClone
.
ViewType
=
t
methods
.
setSearchHandler
()
},
dateRangeHandler
(
e
:
any
)
{
if
(
qDateProxy
.
value
)
qDateProxy
.
value
.
hide
()
},
optionsFn
(
cd
:
any
)
{
return
cd
>=
date
.
formatDate
(
date
.
addToDate
(
new
Date
(),
{
days
:
1
}),
'YYYY/MM/DD'
)
},
}
const
searchCnt
=
computed
(()
=>
{
let
setCnt
=
0
if
(
$q
.
platform
.
is
.
mobile
)
{
if
(
data
.
searchClone
.
CarType
>
0
)
setCnt
++
if
(
data
.
searchClone
.
Q_Country
>
0
||
data
.
searchClone
.
Q_City
)
setCnt
++
if
(
data
.
searchClone
.
Q_AirportId
>
0
)
setCnt
++
if
(
data
.
searchClone
.
Q_Date
)
setCnt
++
}
if
(
data
.
searchClone
.
Q_SPeopleNum
>
0
)
setCnt
++
if
(
data
.
searchClone
.
Q_EPeopleNum
>
0
)
setCnt
++
if
(
data
.
searchClone
.
Q_SPrice
>
0
)
setCnt
++
if
(
data
.
searchClone
.
Q_EPrice
>
0
)
setCnt
++
return
setCnt
})
return
{
qDateProxy
,
searchCnt
,
...
toRefs
(
data
),
...
methods
}
}
}
</
script
>
<
style
></
style
>
src/components/CharteredBus/list/ListTable.vue
0 → 100644
View file @
eef91431
<
template
>
<!--
<div
v-if=
"search.msg.ViewType == 1 || $q.platform.is.mobile"
class=
"q-pt-lg row"
:class=
"
{ 'q-col-gutter-sm': $q.platform.is.mobile, 'q-col-gutter-lg': $q.platform.is.desktop }">
<q-card
v-for=
"x in dataList"
:class=
"
{ 'col-4': $q.screen.lt.lg
&&
$q.platform.is.desktop, 'col-3': $q.screen.gt.md
&&
$q.platform.is.desktop, 'col-6': $q.platform.is.mobile
&&
search.msg.ViewType == 1, 'col-12 q-mb-sm': $q.platform.is.mobile
&&
search.msg.ViewType == 2 }" class="transparent" flat>
<q-img
:src=
"x.PicPathList[0]"
:ratio=
"16 / 9"
spinner-color=
"grey"
spinner-size=
"50px"
width=
"100%"
fit=
"cover"
class=
"rounded-borders"
>
<template
v-slot:error
>
<div
class=
"absolute-full flex flex-center bg-blue-1 text-dark"
>
{{
$t
(
'v102.ticket.load'
)
}}
</div>
</
template
>
</q-img>
<q-card-section
class=
"bg-white"
>
<div
class=
"text-subtitle1 text-weight-bolder ellipsis-2-lines cursor-pointer"
:class=
"{ 'text-subtitle2': $q.platform.is.mobile }"
@
click=
"showCardHandler(x)"
>
{{x.Name}}
</div>
<div
class=
"f12 text-grey-700 ellipsis"
>
{{$t('v102.ticket.Japan')}} {{x.ProvinceName}} {{x.CityName}} {{x.Address}}
</div>
<div
class=
"q-mt-lg row items-center"
>
<div
class=
"text-grey-900 col"
:class=
"{ f12: $q.platform.is.mobile, 'text-subtitle2 text-weight-bold': $q.platform.is.desktop }"
>
{{ $t('v102.ticket.showtt.t1') }}
<span
class=
"text-weight-bolder"
>
{{x.TicketPriceList.length}}
</span>
{{ $t('v102.ticket.showtt.t2') }}
</div>
<q-btn
color=
"primary"
icon=
"local_grocery_store"
unelevated
dense
size=
"sm"
:label=
"$q.platform.is.desktop || search.msg.ViewType == 2 ? $t('v102.ticket.buy') : $t('v102.ticket.shortBuy')"
@
click=
"toPreviewOrderHandler(x.ID)"
/>
</div>
</q-card-section>
</q-card>
</div>
-->
<div
v-if=
"search.msg.ViewType == 2"
class=
"row wrap justify-center"
>
<div
class=
"q-py-md"
style=
"width: 70%;min-width: 1000px;"
>
<div
class=
"row q-pa-md q-mb-md bg-white rounded-borders"
>
<div
class=
"col"
></div>
<q-btn
class=
"hover q-mr-md"
v-for=
"(item,index) in 2"
:class=
"{'bg-blue text-white':pages.Q_OrderBy==index+1&&pages.Q_OrderBy!=0,'bg-grey-3':pages.Q_OrderBy!=index+1}"
@
click=
"getList(index+1)"
>
{{index+1==1?$t('v102.CharteredBus.jiageshenxu'):$t('v102.CharteredBus.jiagejianxu')}}
</q-btn>
</div>
<q-card
v-for=
"i in dataList"
flat
class=
"full-width row items-center q-mb-md rounded-borders"
style=
"overflow: hidden;"
>
<div>
<q-img
:src=
"i.ImageList[0]"
:ratio=
"1"
spinner-color=
"grey"
spinner-size=
"50px"
width=
"160px"
height=
"100%"
fit=
"cover"
class=
""
>
<
template
v-slot:error
>
<div
class=
"absolute-full flex flex-center bg-blue-1 text-dark"
>
{{
$t
(
'v102.ticket.load'
)
}}
</div>
</
template
>
</q-img>
</div>
<div
class=
"q-mx-md col"
>
<div
class=
"fz17 q-py-xs text-subtitle1 text-weight-bolder cursor-pointer"
@
click=
"showCardHandler(i)"
>
{{i.Name}}
</div>
<div
class=
"q-my-xs"
v-if=
"i.FreeCancelDay>0||(i.CarType==3&&i.TravelHours>0)"
>
<q-badge
v-if=
"i.FreeCancelDay>0"
color=
"light-blue-1"
class=
"q-mr-md text-light-blue"
>
{{i.FreeCancelDay+$t('v102.CharteredBus.mianfeiquxiao')}}
</q-badge>
<q-badge
v-if=
"i.CarType==3&&i.TravelHours>0"
color=
"light-blue-1"
class=
"q-mr-md text-light-blue"
>
{{$t('v102.CharteredBus.baoche')+i.TravelHours+$t('v102.CharteredBus.xiaoshi')}}
</q-badge>
</div>
<div
class=
"ellipsis fz14 text-grey-6 q-my-xs"
>
{{i.Description}}
</div>
<div
class=
"fz12 text-grey-6 row items-center q-my-sm "
>
<div
class=
"cursor-pointer"
@
click=
"showCardHandler(i)"
>
<q-icon
class=
"text-grey-13 q-mr-xs"
name=
"place"
size=
"xs"
></q-icon>
<span>
{{i.CityList2[0].CountryName }}{{i.CityList2[0].CityName }}
</span>
</div>
<q-btn
color=
"primary"
icon=
"map"
:label=
"$t('v102.ticket.map')"
size=
"sm"
dense
flat
class=
"q-ml-md"
@
click=
"showCardHandler(i)"
/>
<span
class=
"q-pl-lg"
>
{{$t('v102.CharteredBus.zuizaokeyudin')+': '+i.EarlyDate}}
</span>
</div>
<div
class=
"row items-center justify-between"
>
<div
class=
"text-h6 din text-negative"
>
<span>
{{i.MinPrice.toFixed(2)}}
</span>
<span
class=
"f12 text-grey-600 q-ml-sm"
>
<!-- {{$t('unit.jp')}} -->
<span
class=
"fz15"
>
{{i.CurrencyCode}}
</span>
{{ $t('hotel.col.low') }}
</span>
</div>
<div
class=
"text-right"
>
<q-btn
color=
"primary"
icon=
"shopping_cart"
:label=
"$t('v102.ticket.buy')"
dense
outline
size=
"sm"
@
click=
"toPreviewOrderHandler(i.Id)"
/>
</div>
</div>
</div>
</q-card>
<div
class=
"bg-white q-my-md q-pa-sm rounded-borders"
>
<q-pagination
class=
"full-width justify-end"
v-model=
"pages.PageIndex"
color=
"primary"
:max=
"pages.PageCount"
:input=
"true"
@
update:model-value=
"changePageHandler"
/>
</div>
</div>
</div>
<q-dialog
v-model=
"showDetails"
>
<CharteredBusCard
:ProductId=
"ProductId"
></CharteredBusCard>
</q-dialog>
</template>
<
script
lang=
"ts"
>
import
{
date
}
from
'quasar'
import
{
ApiResult
}
from
'../../../@types/enumHelper'
import
{
useQuasar
}
from
'quasar'
import
CharteredBusService
from
'../../../api/CharteredBus'
import
message
from
'../../../utils/message'
import
{
DirtionmaryHelper
}
from
'src/config/dictionary'
import
{
defineComponent
,
inject
,
reactive
,
toRefs
,
watch
}
from
'vue'
import
{
useRouter
}
from
'vue-router'
import
CharteredBusCard
from
'../CharteredBusCard.vue'
export
default
defineComponent
({
components
:
{
CharteredBusCard
},
setup
(
props
)
{
const
$q
=
useQuasar
()
const
$router
=
useRouter
()
const
data
=
reactive
({
loading
:
false
,
pages
:
{
PageIndex
:
1
,
PageSize
:
10
,
PageCount
:
10
,
Q_OrderBy
:
0
},
dataList
:
[]
as
any
[],
ProductId
:
{}
as
any
,
showDetails
:
false
})
// if ($q.platform.is.desktop) {
// if ($q.screen.gt.md) {
// data.pages.PageSize = 12
// } else {
// data.pages.PageSize = 9
// }
// } else {
// data.pages.PageSize = 10
// }
const
search
=
inject
(
DirtionmaryHelper
.
TICKET_QUERY_PARAM
)
as
any
watch
(
search
,
(
n
,
o
)
=>
{
if
(
data
.
loading
)
return
console
.
log
(
'search change'
)
data
.
pages
.
PageIndex
=
1
methods
.
getList
()
})
const
methods
=
{
getList
(
index
)
{
if
(
data
.
pages
.
Q_OrderBy
==
index
){
data
.
pages
.
Q_OrderBy
=
0
}
else
{
data
.
pages
.
Q_OrderBy
=
index
}
let
param
=
Object
.
assign
(
data
.
pages
,
search
.
msg
)
CharteredBusService
.
getTYCarSingleProductList
(
param
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
data
.
dataList
=
r
.
data
.
data
.
pageData
data
.
pages
.
PageCount
=
r
.
data
.
data
.
pageCount
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
}).
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
data
.
loading
=
false
})
},
optionsFn
(
cd
:
any
)
{
return
cd
>=
date
.
formatDate
(
date
.
addToDate
(
new
Date
(),
{
days
:
0
}),
'YYYY/MM/DD'
)
},
toPreviewOrderHandler
(
id
:
number
){
let
onldOpen
=
`
${
search
.
msg
.
Q_Date
.
split
(
'/'
)}
`
let
newOpen
=
onldOpen
.
substring
(
0
,
4
)
+
onldOpen
.
substring
(
5
,
7
)
+
onldOpen
.
substring
(
8
,
10
)
$router
.
push
({
path
:
`/vehicle/Preview/
${
id
}
/
${
newOpen
}
`
})
},
changePageHandler
(
n
:
number
)
{
data
.
pages
.
PageIndex
=
n
methods
.
getList
(
data
.
pages
.
Q_OrderBy
)
},
showCardHandler
(
x
:
any
){
data
.
ProductId
=
x
.
Id
data
.
showDetails
=
true
}
}
methods
.
getList
(
data
.
pages
.
Q_OrderBy
)
return
{
...
toRefs
(
data
),
...
methods
,
search
}
}
})
</
script
>
<
style
></
style
>
src/components/ticket/list/ListTable.vue
View file @
eef91431
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</div>
</div>
<div
class=
"q-ml-md col"
>
<div
class=
"q-ml-md col"
>
<div
class=
"text-subtitle1 text-weight-bolder cursor-pointer"
@
click=
"showCardHandler(i)"
>
{{i.Name}}
</div>
<div
class=
"text-subtitle1 text-weight-bolder cursor-pointer"
@
click=
"showCardHandler(i)"
>
{{i.Name}}
</div>
<div
class=
"f14 text-grey-600"
>
<div
class=
"f
z
14 text-grey-600"
>
{{ $t('v102.ticket.addr') }}:
{{ $t('v102.ticket.addr') }}:
<span>
{{i.CityName}} {{i.Address}}
</span>
<span>
{{i.CityName}} {{i.Address}}
</span>
<q-btn
color=
"primary"
icon=
"map"
:label=
"$t('v102.ticket.map')"
size=
"sm"
dense
flat
class=
"q-ml-md"
@
click=
"showCardHandler(i)"
/>
<q-btn
color=
"primary"
icon=
"map"
:label=
"$t('v102.ticket.map')"
size=
"sm"
dense
flat
class=
"q-ml-md"
@
click=
"showCardHandler(i)"
/>
...
...
src/i18n/zh-TW/index.ts
View file @
eef91431
...
@@ -927,6 +927,85 @@ export default {
...
@@ -927,6 +927,85 @@ export default {
s9
:
'報價詳情'
,
s9
:
'報價詳情'
,
s10
:
'確認報價'
,
s10
:
'確認報價'
,
}
}
},
CharteredBus
:{
baochetype
:
'包車類型'
,
baochetype0
:
'不限'
,
baochetype1
:
'接機'
,
baochetype2
:
'送機'
,
baochetype3
:
'包車'
,
jiansuojichang
:
'檢索機場'
,
qishirenshu
:
'起始人數'
,
jiezhirenshu
:
'截止人數'
,
jiageshenxu
:
'升序'
,
jiagejianxu
:
'降序'
,
baoche
:
'包車'
,
xiaoshi
:
'小時'
,
mianfeiquxiao
:
'天前可免費取消'
,
zuizaokeyudin
:
' 最早可预定'
,
detail
:
'产品詳情'
,
d1
:
'產品介紹'
,
d2
:
'如何使用'
,
d3
:
'取消政策'
,
d4
:
'預訂須知'
,
d5
:
'費用包含'
,
d6
:
'費用不包含'
,
d7
:
'行程时长'
,
baochexinxi
:
'信息'
,
ordertip
:
'請在出发前一天的23:00前完成預訂'
,
pt
:
'日期'
,
tt
:
'選擇車型'
,
jc
:
'選擇機場'
,
bc
:
'購買輛數'
,
unit
:
'輛'
,
scfw
:
'上車範圍'
,
gi
:
'訂單類型'
,
lianluo
:
'聯絡'
,
chengke
:
'乘客'
,
hangban
:
'航班'
,
dida
:
'抵達'
,
chufa
:
'出發'
,
xunxi
:
'訊息'
,
nt
:
'沒有選擇車型'
,
rtt
:
'取消限製'
,
sjc
:{
c1
:
'姓名'
,
c2
:
'電話'
,
c3
:
'性別'
,
c4
:
'聯絡方式'
,
c5
:
'上車地點'
,
c6
:
'下車地點'
,
c7
:
'選擇預定時間'
,
c8
:
'預定時間'
,
c9
:
'航廈'
,
c10
:
'航空公司名稱'
,
c11
:
'航班號'
,
c12
:
'航班抵達時間'
,
c13
:
'航班出發時間'
,
c14
:
'成人数'
,
c15
:
'儿童数'
,
c16
:
'婴儿数'
,
c17
:
'手提行李数'
,
c18
:
'托运行李数'
,
},
sjcp
:{
c1
:
'請輸入姓'
,
c1m
:
'請輸入名'
,
c2
:
'電話'
,
c3
:
'性別'
,
c4
:
'聯絡方式(Line號,WeChat號)'
,
c5
:
'請輸入上車地點'
,
c6
:
'請輸入下車地點'
,
c7
:
'請輸入航厦'
,
c8
:
'請輸入航空公司名称'
,
c9
:
'請輸入航班号'
,
c10
:
'航班时间'
,
c11
:
'請輸入成人数'
,
c12
:
'輸入儿童数'
,
c13
:
'輸入婴儿数'
,
c14
:
'輸入手提行李数'
,
c15
:
'輸入托运行李数'
,
}
}
}
},
},
//#endregion
//#endregion
...
...
src/pages/CharteredBus/CharteredBusList.vue
0 → 100644
View file @
eef91431
<
template
>
<div
class=
"fix-height-subpage column no-wrap q-pa-md"
>
<list-header></list-header>
<list-table></list-table>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
date
}
from
'quasar'
import
{
inject
,
provide
,
reactive
,
toRefs
,
defineComponent
}
from
'vue'
;
import
useMetaModule
from
'../../module/meta/metaModule'
import
{
useI18n
}
from
'vue-i18n'
import
{
DirtionmaryHelper
}
from
'../../config/dictionary'
;
import
ListHeader
from
'src/components/CharteredBus/list/ListHeader.vue'
;
import
ListTable
from
'src/components/CharteredBus/list/ListTable.vue'
;
export
default
defineComponent
({
components
:
{
ListHeader
,
ListTable
},
setup
(
props
)
{
let
{
setTitle
}
=
useMetaModule
()
const
{
t
}
=
useI18n
()
const
pageTitle
=
inject
(
DirtionmaryHelper
.
PAGE_TITLE_KEY
)
as
any
pageTitle
.
value
=
t
(
'v102.ticket.pageTitle'
)
setTitle
(
pageTitle
.
value
)
const
data
=
reactive
({
})
const
search
=
reactive
({
msg
:{
CarType
:
0
,
//类型 1接机 2送机 3包车
Q_SPeopleNum
:
''
,
//起始人数
Q_EPeopleNum
:
''
,
//截止人数
Q_Country
:
0
,
Q_City
:
0
,
Q_AirportId
:
0
,
Q_Date
:
date
.
formatDate
(
date
.
addToDate
(
new
Date
(),
{
days
:
1
}),
'YYYY/MM/DD'
),
//预约日期
Q_SPrice
:
''
,
//起始价格
Q_EPrice
:
''
,
// 结束价格
ViewType
:
2
,
//列表模式
}
})
provide
(
DirtionmaryHelper
.
TICKET_QUERY_PARAM
,
search
)
const
menu
=
inject
(
DirtionmaryHelper
.
MENU_KEYS
)
as
any
menu
.
value
=
8
const
methods
=
{
}
return
{
...
toRefs
(
data
),
...
methods
}
}
})
</
script
>
<
style
>
</
style
>
src/pages/CharteredBus/CharteredBusOrder.vue
0 → 100644
View file @
eef91431
<
template
>
<div
class=
"fix-height-subpage column no-wrap q-pa-md"
>
<ticket-order-header></ticket-order-header>
<ticket-order-list></ticket-order-list>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
inject
,
provide
,
reactive
,
toRefs
,
onMounted
}
from
'vue'
import
{
currentRouter
}
from
'src/router'
import
useMetaModule
from
'../../module/meta/metaModule'
import
{
useI18n
}
from
'vue-i18n'
import
TicketOrderHeader
from
'src/components/CharteredBus/order/TicketOrderHeader.vue'
import
{
DirtionmaryHelper
}
from
'src/config/dictionary'
import
TicketOrderList
from
'src/components/CharteredBus/order/TicketOrderList.vue'
export
default
defineComponent
({
components
:
{
TicketOrderHeader
,
TicketOrderList
},
setup
(
props
)
{
let
{
setTitle
}
=
useMetaModule
()
const
{
t
}
=
useI18n
()
const
pageTitle
=
inject
(
DirtionmaryHelper
.
PAGE_TITLE_KEY
)
as
any
pageTitle
.
value
=
t
(
'v102.to.pageTitle'
)
setTitle
(
pageTitle
.
value
)
const
search
=
reactive
({
OrderId
:
''
,
OrderNo
:
''
,
OrderStatus
:
0
,
StartTime
:
''
,
EndTime
:
''
,
// TicketName:'',//景区名称
CouponsName
:
''
,
//景区名称
ContactNumber
:
''
,
//电话
Name
:
''
,
//顾客名称
UseSTime
:
''
,
//门票开始时间
UseETime
:
''
,
//门票结束时间
MailingState
:
-
1
})
search
.
OrderId
=
currentRouter
.
currentRoute
.
value
.
params
.
orderId
provide
(
DirtionmaryHelper
.
TICKET_ORDER_SEARCH
,
search
)
const
menu
=
inject
(
DirtionmaryHelper
.
MENU_KEYS
)
as
any
menu
.
value
=
9
const
data
=
reactive
({})
const
methods
=
{}
onMounted
(()
=>
{})
return
{
...
toRefs
(
data
),
...
methods
,
search
}
}
})
</
script
>
<
style
></
style
>
src/pages/CharteredBus/CharteredBusPreview.vue
0 → 100644
View file @
eef91431
<
template
>
<div
class=
"fix-height-subpage column no-wrap"
v-if=
"detailsObj"
>
<div
class=
"row q-pa-md"
style=
"min-width: 375px; margin: 0 auto"
:style=
"
{ width: $q.screen.lt.xl ? '100%' : '1320px' }" :class="{'row':$q.screen.width>=1200
&&
$q.platform.is.desktop,'column':$q.screen.width
<1200
||
$
q
.
platform
.
is
.
mobile
}"
>
<div
class=
"col"
>
<q-card
class=
"q-pa-md"
flat
>
<div
class=
"text-h6 q-mb-md"
>
<template
v-if=
"detailsObj.CarType
<3
"
>
{{
detailsObj
.
CarType
==
1
?
$t
(
'v102.CharteredBus.baochetype1'
):
$t
(
'v102.CharteredBus.baochetype2'
)
}}
</
template
>
<
template
v-else
>
{{
$t
(
'v102.CharteredBus.baochetype3'
)
}}
</
template
>
{{ $t('v102.CharteredBus.baochexinxi') }}
</div>
<div
class=
"row q-pb-md q-mb-md"
style=
"border-bottom: 1px solid #f1f1f1"
>
<div
class=
"q-mr-md"
>
<q-img
v-if=
"detailsObj.ImageList&&detailsObj.ImageList.length>0"
:src=
"detailsObj.ImageList[0]"
:ratio=
"16 / 9"
spinner-color=
"grey"
spinner-size=
"50px"
width=
"100px"
fit=
"cover"
class=
"rounded-borders"
>
<
template
v-slot:error
>
<div
class=
"absolute-full flex flex-center bg-blue-1 text-dark fz12"
>
{{
$t
(
'v102.ticket.load'
)
}}
</div>
</
template
>
</q-img>
</div>
<div
class=
"col"
>
<div
class=
"text-subtitle1 text-weight-bolder cursor-pointer"
@
click=
"showCardHandler"
>
{{detailsObj.Name}}
</div>
<div
class=
"fz14 text-grey-600"
>
{{ $t('v102.CharteredBus.ordertip') }}
</div>
</div>
</div>
<div>
<div
:class=
"{ 'q-px-lg': $q.platform.is.desktop }"
>
<div
class=
"q-mt-lg"
:class=
"{'column q-mb-md':($q.screen.width<1200 || $q.platform.is.mobile),'row items-center':!($q.screen.width<1200 || $q.platform.is.mobile)}"
>
<div
class=
"f12 text-dark"
:class=
"{ 'col-2': $q.platform.is.desktop, 'col-3': $q.platform.is.mobile,'q-mb-md':($q.screen.width<1200 || $q.platform.is.mobile) }"
>
<
template
v-if=
"detailsObj.CarType<3"
>
{{
detailsObj
.
CarType
==
1
?
$t
(
'v102.CharteredBus.baochetype1'
):
$t
(
'v102.CharteredBus.baochetype2'
)
}}
</
template
>
<
template
v-else
>
{{
$t
(
'v102.CharteredBus.baochetype3'
)
}}
</
template
>
{{ $t('v102.CharteredBus.pt') }}:
</div>
<div
class=
"text-subtitle2 text-weight-bolder row"
>
<q-field
standout
:model-value=
"SetOutTime"
class=
"text-dark cursor-pointer"
>
<
template
v-slot:control
>
<div
class=
"self-center full-width no-outline"
tabindex=
"0"
>
{{
SetOutTime
}}
</div>
</
template
>
<q-popup-proxy
:offset=
"[0, 10]"
ref=
"qDateProxy"
>
<q-date
v-model=
"SetOutTime"
:options=
"optionsFn"
mask=
"YYYY-MM-DD"
@
update:model-value=
"dateRangeHandler3"
></q-date>
</q-popup-proxy>
</q-field>
</div>
</div>
</div>
<div
:class=
"{ 'q-px-lg': $q.platform.is.desktop }"
>
<div
:class=
"{'column':($q.screen.width<1200 || $q.platform.is.mobile),'row items-center':!($q.screen.width<1200 || $q.platform.is.mobile)}"
>
<div
class=
"f12 text-dark"
:class=
"{ 'col-2': $q.platform.is.desktop, 'col-3': $q.platform.is.mobile }"
>
{{ $t('v102.CharteredBus.jc') }}:
</div>
<div
class=
"row items-center col wrap q-mt-md"
>
<div
class=
"q-pa-sm rounded-borders q-mr-md cursor-pointer row items-center"
:class=
"{ 'bg-grey-2': !x.checked, 'bg-primary text-white': x.checked }"
@
click=
"changeDetailListHandler(x,1)"
v-for=
"x in AirportTypes"
>
<span>
{{ x.AirportName }}
</span>
</div>
</div>
</div>
</div>
<!-- <div :class="{ 'q-px-lg': $q.platform.is.desktop }">
<div :class="{'column':($q.screen.width<1200 || $q.platform.is.mobile),'row items-center':!($q.screen.width<1200 || $q.platform.is.mobile)}">
<div class="f12 text-dark" :class="{ 'col-2': $q.platform.is.desktop, 'col-3': $q.platform.is.mobile }">{{ $t('v102.CharteredBus.sc') }}:</div>
<div class="row items-center col wrap q-mt-md">
<div class="q-pa-sm rounded-borders q-mr-md q-mb-md cursor-pointer row items-center" :class="{ 'bg-grey-2': !x.checked, 'bg-primary text-white': x.checked }" @click="changeDetailListHandler(x,2)" v-for="x in PlaceTypes">
<span>{{ x.Address }}</span>
</div>
</div>
</div>
</div> -->
<div
:class=
"{ 'q-px-lg': $q.platform.is.desktop }"
>
<div
:class=
"{'column':($q.screen.width<1200 || $q.platform.is.mobile),'row items-center':!($q.screen.width<1200 || $q.platform.is.mobile)}"
>
<div
class=
"f12 text-dark"
:class=
"{ 'col-2': $q.platform.is.desktop, 'col-3': $q.platform.is.mobile }"
>
{{ $t('v102.CharteredBus.tt') }}:
</div>
<div
class=
"row items-center col wrap q-mt-md"
>
<div
class=
"q-pa-sm rounded-borders q-mr-md q-mb-md cursor-pointer row items-center"
:class=
"{ 'bg-grey-2': !x.checked, 'bg-primary text-white': x.checked }"
@
click=
"changeDetailListHandler(x,3)"
v-for=
"x in types"
>
<span
:style=
"{'border-right': x.B2BPrice>0?'1px solid #eee':''}"
:class=
"{'q-mr-sm q-pr-sm':x.B2BPrice>0}"
>
{{ x.CarName }}
</span>
<span
v-if=
"x.B2BPrice>0"
>
{{ x.B2BPrice.toFixed(2) }}
</span>
</div>
</div>
</div>
</div>
<div
:class=
"{ 'q-px-lg': $q.platform.is.desktop }"
>
<div
class=
"row"
>
<div
class=
"f12 text-grey-900"
:class=
"{ 'col-2': $q.platform.is.desktop, 'col-3': $q.platform.is.mobile }"
>
{{ $t('v102.CharteredBus.bc') }}:
</div>
<div
v-if=
"isCheck"
>
<
template
v-for=
"x in types"
>
<q-input
style=
"width: 100%"
v-if=
"x.checked"
class=
"q-mb-md"
@
update:model-value=
"changePeople"
v-model=
"x.num"
mask=
"#"
reverse-fill-mask
dense
standout
>
<template
v-slot:prepend
>
<q-btn
color=
"primary"
size=
"sm"
class=
"q-px-none"
flat
icon=
"remove"
@
click=
"addPeople(x, 0)"
/>
</
template
>
<
template
v-slot:append
>
<div
class=
"q-mr-sm f12"
>
{{
$t
(
'v102.CharteredBus.unit'
)
}}
{{
x
.
CarName
}}
</div>
<q-btn
color=
"primary"
size=
"sm"
class=
"q-px-none"
flat
icon=
"add"
@
click=
"addPeople(x, 1)"
/>
</
template
>
</q-input>
</template>
</div>
</div>
</div>
</div>
</q-card>
<q-card
class=
"q-pa-md q-mt-lg"
flat
>
<div>
<div
class=
"text-h6 q-mb-md"
>
{{ $t('v102.CharteredBus.gi') }}
</div>
<div
class=
"row items-center"
>
<span
class=
"f12 text-grey-900 text-subtitle2 text-weight-bold"
:class=
"{ 'col-2': $q.platform.is.desktop, 'col-3': $q.platform.is.mobile }"
>
{{ $t('v102.CharteredBus.gi') }}:
</span>
<span
class=
"col f12"
>
<q-radio
v-if=
"msg.OrderType==1"
v-model=
"msg.OrderType"
checked-icon=
"task_alt"
unchecked-icon=
"panorama_fish_eye"
val=
"1"
:label=
"$t('v102.CharteredBus.baochetype1')"
/>
<q-radio
v-if=
"msg.OrderType==2"
v-model=
"msg.OrderType"
checked-icon=
"task_alt"
unchecked-icon=
"panorama_fish_eye"
val=
"2"
:label=
"$t('v102.CharteredBus.baochetype2')"
/>
<q-radio
v-if=
"msg.OrderType==3"
v-model=
"msg.OrderType"
checked-icon=
"task_alt"
unchecked-icon=
"panorama_fish_eye"
val=
"3"
:label=
"$t('v102.CharteredBus.baochetype3')"
/>
</span>
</div>
<div
class=
"bg-light-blue-1 q-pa-md fz14 rounded-borders q-mt-md"
>
<div
class=
"text-weight-bold"
>
{{ $t('v102.CharteredBus.detail') }}
</div>
<div
class=
"text-grey-900 q-mt-sm f12"
>
{{ detailsObj.Description }}
</div>
</div>
<!-- 航班信息 -->
<div
v-if=
"detailsObj.CarType!=3"
>
<div
class=
"q-mt-md"
>
<span
class=
"f12 text-grey-900 text-subtitle2 text-weight-bold"
>
{{$t('v102.CharteredBus.hangban')}}{{detailsObj.CarType==1?$t('v102.CharteredBus.dida'):$t('v102.CharteredBus.chufa')}}{{$t('v102.CharteredBus.xunxi')}}
</span>
</div>
<div
class=
"row items-center q-mt-md text-grey-600 q-mb-md"
v-if=
"$q.platform.is.desktop"
>
<div
class=
"col q-mr-md"
>
{{ $t('v102.CharteredBus.sjc.c9') }}
</div>
<div
class=
"col q-mr-md"
>
{{ $t('v102.CharteredBus.sjc.c10') }}
</div>
<div
class=
"col q-mr-md"
>
{{ $t('v102.CharteredBus.sjc.c11') }}
</div>
<div
class=
"col"
>
{{ detailsObj.CarType==1?$t('v102.CharteredBus.sjc.c12'):$t('v102.CharteredBus.sjc.c13') }}
</div>
</div>
<div
style=
"border-top: 1px dashed #eee"
:class=
"{'row items-center':$q.platform.is.desktop,'column':$q.platform.is.mobile}"
>
<q-input
dense
standout
v-model=
"msg.AirportTerminal"
class=
"col q-mt-md col"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c7')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestAirportTerminal"
/>
<q-input
dense
standout
v-model=
"msg.AirLine"
class=
"col q-mt-md"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c8')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestAirLine"
/>
<q-input
dense
standout
v-model=
"msg.FlightNumber"
class=
"col q-mt-md"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c9')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestFlightNumber"
/>
<div
class=
"col"
>
<q-field
standout
:model-value=
"msg.FlightTime"
class=
"height text-dark cursor-pointer"
ref=
"guestFlightTime"
>
<
template
v-slot:control
>
<div
class=
"self-center full-width no-outline"
tabindex=
"0"
>
<template
v-if=
"msg.FlightTime"
>
{{
msg
.
FlightTime
}}
</
template
>
<span
v-else
class=
"text-grey-6"
>
{{$t('v102.CharteredBus.sjcp.c10') }}
</span>
</div>
</template>
<!-- <q-popup-proxy :offset="[0, 10]" ref="qDateProxy2">
<q-date v-model="SetOutTime2" :options="optionsFn" mask="YYYY-MM-DD" @update:model-value="dateRangeHandler"></q-date>
</q-popup-proxy> -->
<q-popup-proxy
:offset=
"[0, 10]"
ref=
"qTimeProxy2"
>
<q-time
v-model=
"timeData2"
format24h
@
update:model-value=
"dateRangeHandler2"
></q-time>
</q-popup-proxy>
</q-field>
</div>
</div>
</div>
<!-- 接送讯息 -->
<div>
<div
class=
"q-mt-md"
>
<span
class=
"f12 text-grey-900 text-subtitle2 text-weight-bold"
>
<
template
v-if=
"msg.OrderType==1"
>
{{
$t
(
'v102.CharteredBus.baochetype1'
)
}}
</
template
>
<
template
v-if=
"msg.OrderType==2"
>
{{
$t
(
'v102.CharteredBus.baochetype2'
)
}}
</
template
>
<
template
v-if=
"msg.OrderType==3"
>
{{
$t
(
'v102.CharteredBus.baochetype2'
)
}}
</
template
>
{{$t('v102.CharteredBus.xunxi')}}
</span>
</div>
<div
class=
"row items-center q-mt-md text-grey-600 q-mb-md"
v-if=
"$q.platform.is.desktop"
>
<div
class=
"col q-mr-md"
>
{{ $t('v102.CharteredBus.sjc.c5') }}
</div>
<div
class=
"col q-mr-md"
>
{{ $t('v102.CharteredBus.sjc.c6') }}
</div>
<div
class=
"col"
>
{{ $t('v102.CharteredBus.sjc.c8') }}
</div>
</div>
<div
style=
"border-top: 1px dashed #eee"
:class=
"{'row items-center':$q.platform.is.desktop,'column':$q.platform.is.mobile}"
>
<q-input
dense
standout
v-model=
"msg.GetonAddress"
class=
"col q-mt-md col"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c5')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestGetonAddress"
/>
<q-input
dense
standout
v-model=
"msg.GetoffAddress"
class=
"col q-mt-md"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c6')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestGetoffAddress"
/>
<q-field
standout
:model-value=
"msg.OrderDate"
class=
"col text-dark cursor-pointer height"
ref=
"guestTimeData"
>
<
template
v-slot:control
>
<div
class=
"self-center full-width no-outline"
tabindex=
"0"
>
<template
v-if=
"msg.OrderDate"
>
{{
msg
.
OrderDate
}}
</
template
>
<span
v-else
class=
"text-grey-6"
>
{{$t('v102.CharteredBus.sjc.c8') }}
</span>
</div>
</template>
<q-popup-proxy
:offset=
"[0, 10]"
ref=
"qTimeProxy"
>
<q-time
v-model=
"timeData"
format24h
@
update:model-value=
"dateRangeHandler"
></q-time>
</q-popup-proxy>
</q-field>
</div>
</div>
<!-- 乘客资料 -->
<div>
<div
class=
"q-mt-md"
>
<span
class=
"f12 text-grey-900 text-subtitle2 text-weight-bold"
>
{{$t('v102.CharteredBus.chengke')}}{{$t('v102.CharteredBus.xunxi')}}
</span>
</div>
<div
class=
"row items-center q-mt-md text-grey-600 q-mb-md"
v-if=
"$q.platform.is.desktop"
>
<div
class=
"col q-mr-md"
>
{{ $t('v102.CharteredBus.sjc.c14') }}
</div>
<div
class=
"col q-mr-md"
>
{{ $t('v102.CharteredBus.sjc.c15') }}
</div>
<div
class=
"col q-mr-md"
>
{{ $t('v102.CharteredBus.sjc.c16') }}
</div>
<div
class=
"col q-mr-md"
>
{{ $t('v102.CharteredBus.sjc.c17') }}
</div>
<div
class=
"col"
>
{{ $t('v102.CharteredBus.sjc.c18') }}
</div>
</div>
<div
style=
"border-top: 1px dashed #eee"
:class=
"{'row items-center':$q.platform.is.desktop,'column':$q.platform.is.mobile}"
>
<q-input
dense
standout
v-model=
"msg.ManNum"
mask=
"#"
class=
"col q-mt-md col"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c11')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestManNum"
/>
<q-input
dense
standout
v-model=
"msg.ChildNum"
mask=
"#"
class=
"col q-mt-md"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c12')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestChildNum"
/>
<q-input
dense
standout
v-model=
"msg.BabyNum"
mask=
"#"
class=
"col q-mt-md"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c13')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestBabyNum"
/>
<q-input
dense
standout
v-model=
"msg.HandLuggageNum"
mask=
"#"
class=
"col q-mt-md"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c14')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestHandLuggageNum"
/>
<q-input
dense
standout
v-model=
"msg.RegisteredLuggageNum"
mask=
"#"
class=
"col q-mt-md"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c15')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestRegisteredLuggageNum"
/>
</div>
</div>
<!-- 联络讯息 -->
<div>
<div
class=
"q-mt-md"
>
<span
class=
"f12 text-grey-900 text-subtitle2 text-weight-bold"
>
<!-- <template v-if="msg.OrderType==1">
{{$t('v102.CharteredBus.baochetype1')}}
</template>
<template v-if="msg.OrderType==2">
{{$t('v102.CharteredBus.baochetype2')}}
</template>
<template v-if="msg.OrderType==3">
{{$t('v102.CharteredBus.baochetype2')}}
</template> -->
{{$t('v102.CharteredBus.lianluo')+$t('v102.CharteredBus.xunxi')}}
</span>
</div>
<div
class=
"row items-center q-mt-md text-grey-600 q-mb-md"
v-if=
"$q.platform.is.desktop"
>
<div
class=
"col-7 q-mr-md"
>
{{ $t('v102.CharteredBus.sjc.c1') }}
</div>
<div
class=
"col q-mr-md"
>
{{ $t('v102.CharteredBus.sjc.c2') }}
</div>
<!-- <div class="col q-mr-md">{{ $t('v102.CharteredBus.sjc.c4') }}</div> -->
<div
class=
"col-2"
>
{{ $t('v102.CharteredBus.sjc.c3') }}
</div>
</div>
<div
style=
"border-top: 1px dashed #eee"
:class=
"{'row items-center':$q.platform.is.desktop,'column':$q.platform.is.mobile}"
>
<div
class=
"col-7 row"
>
<q-input
dense
standout
v-model=
"msg.SurName"
class=
"col q-mt-md col"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c1')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestSurName"
/>
<q-input
dense
standout
v-model=
"msg.Name"
class=
"col q-mt-md col"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c1m')"
:rules=
"[ val => val && val.length > 0 || ' ']"
ref=
"guestName"
/>
</div>
<q-input
dense
standout
v-model=
"msg.Mobile"
class=
"col q-mt-md"
:class=
"{'q-mr-md':$q.platform.is.desktop}"
:placeholder=
"$t('v102.CharteredBus.sjcp.c2')"
:rules=
"[ val => val && val.length == 11 || ' ']"
ref=
"guestMobile"
/>
<!-- <q-input dense standout v-model="msg.ContactWay" class="col q-mt-md" :class="{'q-mr-md':$q.platform.is.desktop}" :placeholder="$t('v102.CharteredBus.sjcp.c4')" :rules="[ val => val && val.length >0 || ' ']" ref="guestContactWay"/> -->
<div
class=
"col-2 q-mr-md"
>
<q-radio
v-model=
"msg.Sex"
checked-icon=
"task_alt"
unchecked-icon=
"panorama_fish_eye"
val=
"1"
:label=
"$t('v102.ticket.sex.man')"
/>
<q-radio
v-model=
"msg.Sex"
checked-icon=
"task_alt"
unchecked-icon=
"panorama_fish_eye"
val=
"2"
:label=
"$t('v102.ticket.sex.women')"
/>
</div>
</div>
</div>
<div
class=
"q-mt-md"
>
<q-input
v-model=
"msg.Remark"
standout
autogrow
:label=
"$t('v102.ticket.or') "
/>
</div>
</div>
</q-card>
<div
class=
"q-mt-lg"
v-if=
"!($q.screen.width<1200 || $q.platform.is.mobile)"
>
<div
class=
"bg-orange-1 q-pa-md rounded-borders fz14"
style=
"border: 1px dashed orange"
>
<div
class=
"text-weight-bold"
>
{{ $t('v102.ticket.d5') }}
</div>
<div
class=
"text-grey-700 q-mt-sm"
>
{{detailsObj.BuyNotes}}
</div>
</div>
</div>
</div>
<div
class=
""
:class=
"{'q-ml-lg':!($q.screen.width<1200 || $q.platform.is.mobile),'q-mt-lg':($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)?'100%':'300px'}"
>
<div
class=
"text-h6 text-grey-900"
>
{{ $t('v102.ticket.st') }}
</div>
<div
class=
"q-mt-md q-mb-lg"
>
<div
class=
"bg-red-1 q-pa-sm rounded-borders fz14"
style=
"border: 1px dashed var(--q-negative)"
>
<div
class=
"text-grey-900 text-subtitle2 text-weight-bold"
>
{{ $t('v102.CharteredBus.rtt') }}
</div>
<div
class=
"text-grey-700 q-mt-sm f12"
>
{{ detailsObj.CancelPolicy }}
</div>
</div>
</div>
<div
class=
"q-pt-md q-mb-lg"
style=
"border-top: 1px dashed #eee"
>
<div
class=
"text-grey-900 text-subtitle2 text-weight-bold"
>
{{ $t('v102.ticket.ms') }}
</div>
<div
v-if=
"isCheck"
>
<
template
v-for=
"x in types"
>
<div
class=
"row items-center q-mt-md"
v-if=
"x.checked"
>
<q-badge
color=
"grey-3"
style=
"padding: 5px 8px"
text-color=
"info"
:label=
"x.CarName"
/>
<div
class=
"col f12 text-right"
>
{{
x
.
B2BPrice
.
toFixed
(
2
)
}}
x
{{
x
.
num
}}{{
$t
(
'v102.ticket.unit'
)
}}
</div>
</div>
</
template
>
</div>
<div
v-else
class=
"text-center text-grey-600 q-py-lg"
>
{{ $t('v102.CharteredBus.nt') }}
</div>
</div>
<div
class=
"q-pt-md q-mb-lg text-right"
style=
"border-top: 1px dashed #eee"
>
<span
class=
"f12 text-dark q-mr-md"
>
{{ $t('v102.ticket.ds') }}:
</span>
<span
class=
"text-h6 text-negative"
>
{{ msg.Money.toFixed(2) }}
</span>
</div>
<div
class=
"text-right"
>
<q-btn
color=
"primary"
unelevated
class=
"q-px-lg"
:disable=
"!isCheck"
:label=
"$t('v102.ticket.sb')"
@
click=
"submit"
/>
</div>
</div>
</div>
<div
class=
"q-mt-lg"
v-if=
"($q.screen.width<1200 || $q.platform.is.mobile)"
>
<div
class=
"bg-orange-1 q-pa-md rounded-borders fz14"
style=
"border: 1px dashed orange"
>
<div
class=
"text-weight-bold"
>
{{ $t('v102.ticket.d5') }}
</div>
<div
class=
"text-grey-700 q-mt-sm"
>
{{detailsObj.BookingInfo}}
</div>
</div>
</div>
</div>
</div>
<q-dialog
v-model=
"showDetails"
>
<CharteredBusCard
:ProductId=
"ProductId"
></CharteredBusCard>
</q-dialog>
</template>
<
script
lang=
"ts"
>
import
{
useRouter
}
from
'vue-router'
import
{
ApiResult
}
from
'src/@types/enumHelper'
import
TicketService
from
'../../api/CharteredBus'
import
message
from
'../../utils/message'
import
{
currentRouter
}
from
'src/router'
import
{
ref
,
inject
,
provide
,
reactive
,
toRefs
,
defineComponent
,
watch
}
from
'vue'
import
useMetaModule
from
'../../module/meta/metaModule'
import
{
useI18n
}
from
'vue-i18n'
import
{
DirtionmaryHelper
}
from
'../../config/dictionary'
import
CharteredBusCard
from
'../../components/CharteredBus/CharteredBusCard.vue'
import
CharteredBusService
from
'../../api/CharteredBus'
import
{
date
}
from
'quasar'
export
default
defineComponent
({
components
:
{
CharteredBusCard
},
setup
(
props
)
{
const
$router
=
useRouter
()
let
{
setTitle
}
=
useMetaModule
()
const
{
t
}
=
useI18n
()
const
pageTitle
=
inject
(
DirtionmaryHelper
.
PAGE_TITLE_KEY
)
as
any
pageTitle
.
value
=
t
(
'v102.ticket.preview.pageTitle'
)
setTitle
(
pageTitle
.
value
)
const
data
=
reactive
({
SetOutTime2
:
''
,
timeData2
:
ref
(
'19:42'
),
timeData
:
ref
(
'19:42'
),
showDetails
:
false
,
loading
:
false
,
msg
:
{
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
:
''
,
//成人数
ChildNum
:
''
,
//儿童数
BabyNum
:
''
,
//婴儿数
HandLuggageNum
:
''
,
//手提行李数量
RegisteredLuggageNum
:
''
,
//托运行李数量
ContactWay
:
''
,
//联络方式 WeChat
Mobile
:
''
,
//电话
ProductId
:
''
,
CarId
:
''
,
//产品类型ID
MailingState
:
'1'
,
//邮寄状态 1自取 2邮寄
MailingAddress
:
''
,
//MailingState =2 填写邮寄
Name
:
''
,
EName
:
''
,
Birthday
:
''
,
CouponsId
:
''
,
//景点id
DetailList
:[]
as
any
,
},
types
:
[],
AirportTypes
:
[],
PlaceTypes
:
[],
isCheck
:
false
,
SetOutTime
:
''
,
detailsObj
:
{}
as
any
,
})
const
qDateProxy
=
ref
(
null
)
as
any
const
qDateProxy2
=
ref
(
null
)
as
any
const
qTimeProxy
=
ref
(
null
)
as
any
const
qTimeProxy2
=
ref
(
null
)
as
any
// 上下车
const
guestGetonAddress
=
ref
(
null
)
as
any
const
guestGetoffAddress
=
ref
(
null
)
as
any
const
guestTimeData
=
ref
(
null
)
as
any
// 航班信息
const
guestAirportTerminal
=
ref
(
null
)
as
any
const
guestAirLine
=
ref
(
null
)
as
any
const
guestFlightNumber
=
ref
(
null
)
as
any
const
guestFlightTime
=
ref
(
null
)
as
any
// 验证乘客数
const
guestManNum
=
ref
(
null
)
as
any
const
guestChildNum
=
ref
(
null
)
as
any
const
guestBabyNum
=
ref
(
null
)
as
any
// 行李数
const
guestHandLuggageNum
=
ref
(
null
)
as
any
const
guestRegisteredLuggageNum
=
ref
(
null
)
as
any
// 联络信息
const
guestSurName
=
ref
(
null
)
as
any
const
guestName
=
ref
(
null
)
as
any
const
guestMobile
=
ref
(
null
)
as
any
const
guestContactWay
=
ref
(
null
)
as
any
let
time
=
currentRouter
.
currentRoute
.
value
.
params
.
Time
data
.
SetOutTime
=
time
.
substring
(
0
,
4
)
+
'-'
+
time
.
substring
(
4
,
6
)
+
'-'
+
time
.
substring
(
6
,
8
)
data
.
msg
.
ProductId
=
currentRouter
.
currentRoute
.
value
.
params
.
ProductId
data
.
ProductId
=
data
.
msg
.
ProductId
const
menu
=
inject
(
DirtionmaryHelper
.
MENU_KEYS
)
as
any
menu
.
value
=
8
const
methods
=
{
dateRangeHandler
(
e
:
any
){
data
.
msg
.
OrderDate
=
data
.
SetOutTime
+
' '
+
data
.
timeData
if
(
qTimeProxy
.
value
)
qTimeProxy
.
value
.
hide
()
},
dateRangeHandler2
(
e
:
any
){
data
.
msg
.
FlightTime
=
data
.
SetOutTime
+
' '
+
data
.
timeData2
if
(
qTimeProxy2
.
value
)
qTimeProxy2
.
value
.
hide
()
},
dateRangeHandler3
(
e
:
any
)
{
if
(
qDateProxy
.
value
)
qDateProxy
.
value
.
hide
()
if
(
data
.
types
.
findIndex
(
x
=>
x
.
checked
)
>-
1
)
methods
.
getQuotation
()
},
// 获取报价
getQuotation
(){
let
param
=
{
AirportId
:
data
.
msg
.
AirportId
,
CarTypeId
:
data
.
msg
.
CarId
,
Month
:
data
.
SetOutTime
,
ProductId
:
data
.
msg
.
ProductId
,
}
CharteredBusService
.
GetTYCarSingleProductMonthPrice
(
param
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
let
newData
=
r
.
data
.
data
.
filter
(
x
=>
x
.
Date
==
data
.
SetOutTime
)
let
types
=
data
.
types
.
filter
(
x
=>
x
.
checked
)
data
.
types
.
forEach
((
item
:
any
,
index
:
Number
)
=>
{
if
(
types
[
0
].
Id
==
item
.
Id
&&
newData
[
0
].
Price
>
0
){
item
.
B2BPrice
=
newData
[
0
].
Price
data
.
msg
.
Unit_Price
=
newData
[
0
].
Price
}
});
if
(
data
.
isCheck
){
methods
.
calcMoneyHandler
()
}
else
{
data
.
msg
.
Money
=
0.0
}
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
}).
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
data
.
isCheck
=
false
})
},
getInfo
(
value
:
String
,
reason
:
any
,
details
:
any
){
let
param
=
{
ProductId
:
data
.
msg
.
ProductId
,
}
CharteredBusService
.
GetTYCarSingleProductInfo
(
param
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
data
.
detailsObj
=
r
.
data
.
data
data
.
msg
.
OrderType
=
String
(
data
.
detailsObj
.
CarType
)
let
addList
=
function
(
arr
)
{
arr
.
forEach
(
item
=>
{
item
.
checked
=
false
item
.
num
=
1
item
.
B2BPrice
=
0
});
};
addList
(
r
.
data
.
data
.
AirportList
);
addList
(
r
.
data
.
data
.
PlaceList
);
addList
(
r
.
data
.
data
.
CarTypeList
);
data
.
AirportTypes
=
r
.
data
.
data
.
AirportList
data
.
PlaceTypes
=
r
.
data
.
data
.
PlaceList
data
.
types
=
r
.
data
.
data
.
CarTypeList
if
(
data
.
types
&&
data
.
types
.
length
==
0
){
message
.
errorMsg
(
`
${
t
(
'v102.ticket.nobj'
)}
`
)
}
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
}).
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
data
.
isCheck
=
false
})
},
submit
(){
methods
.
getNum
()
let
flag
=
false
if
(
data
.
detailsObj
.
CarType
!=
3
){
guestAirportTerminal
.
value
.
validate
()
guestAirLine
.
value
.
validate
()
guestFlightNumber
.
value
.
validate
()
guestFlightTime
.
value
.
validate
()
}
guestGetonAddress
.
value
.
validate
()
guestGetoffAddress
.
value
.
validate
()
guestTimeData
.
value
.
validate
()
guestManNum
.
value
.
validate
()
guestSurName
.
value
.
validate
()
guestName
.
value
.
validate
()
guestMobile
.
value
.
validate
()
if
(
data
.
detailsObj
.
CarType
!=
3
){
if
(
!
data
.
msg
.
AirportId
){
message
.
errorMsg
(
`
${
t
(
'v102.CharteredBus.sjc.jc'
)}
`
)
return
}
flag
=
!
guestAirportTerminal
.
value
.
hasError
&&
!
guestAirLine
.
value
.
hasError
&&
!
guestFlightNumber
.
value
.
hasError
&&
!
guestFlightTime
.
value
.
hasError
&&
!
guestGetonAddress
.
value
.
hasError
&&
!
guestGetoffAddress
.
value
.
hasError
&&
!
guestTimeData
.
value
.
hasError
&&
!
guestManNum
.
value
.
hasError
&&
!
guestSurName
.
value
.
hasError
&&
!
guestName
.
value
.
hasError
&&
!
guestMobile
.
value
.
hasError
// && !guestContactWay.value.hasError
}
else
{
flag
=
!
guestGetonAddress
.
value
.
hasError
&&
!
guestGetoffAddress
.
value
.
hasError
&&
!
guestTimeData
.
value
.
hasError
&&
!
guestManNum
.
value
.
hasError
&&
!
guestSurName
.
value
.
hasError
&&
!
guestName
.
value
.
hasError
&&
!
guestMobile
.
value
.
hasError
}
if
(
!
flag
)
return
if
(
!
data
.
msg
.
OrderDate
){
message
.
errorMsg
(
`
${
t
(
'v102.CharteredBus.sjc.c8'
)}
`
)
return
}
if
(
!
data
.
msg
.
CarId
){
message
.
errorMsg
(
`
${
t
(
'v102.CharteredBus.sjc.tt'
)}
`
)
return
}
if
(
data
.
detailsObj
.
CarType
!=
3
){
if
(
!
data
.
msg
.
FlightTime
){
message
.
errorMsg
(
`
${
data
.
detailsObj
.
CarType
==
1
?
t
(
'v102.CharteredBus.sjc.c12'
):
t
(
'v102.CharteredBus.sjc.c13'
)}
`
)
return
}
}
if
(
!
data
.
isCheck
)
return
if
(
data
.
loading
)
return
data
.
loading
=
true
data
.
types
.
forEach
(
x
=>
{
if
(
x
.
checked
){
data
.
msg
.
Unit_Price
=
x
.
B2BPrice
data
.
msg
.
Num
=
x
.
num
}
})
let
param
=
Object
.
assign
(
data
.
msg
)
CharteredBusService
.
SetTYCarOrder
(
param
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
message
.
successMsg
(
`
${
t
(
'success'
)}
`
)
$router
.
push
({
path
:
'/vehicle/order'
})
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
methods
.
getInfo
()
data
.
loading
=
false
}).
catch
(
e
=>
{
data
.
loading
=
false
message
.
errorMsg
(
e
.
message
)
})
},
showCardHandler
()
{
data
.
showDetails
=
true
},
optionsFn
(
cd
:
any
)
{
return
cd
>=
date
.
formatDate
(
date
.
addToDate
(
new
Date
(),
{
days
:
1
}),
'YYYY/MM/DD'
)
},
changeDetailListHandler
(
e
:
any
,
i
:
Number
)
{
if
(
i
==
1
){
data
.
AirportTypes
.
forEach
(
x
=>
{
x
.
checked
=
false
})
e
.
checked
=
!
e
.
checked
let
AirportTypes
=
data
.
AirportTypes
.
filter
(
x
=>
x
.
checked
)
if
(
AirportTypes
&&
AirportTypes
[
0
]){
data
.
msg
.
AirportId
=
AirportTypes
[
0
].
AirportId
}
if
(
data
.
types
.
findIndex
(
x
=>
x
.
checked
)
>
-
1
)
methods
.
getQuotation
()
}
if
(
i
==
2
){
data
.
PlaceTypes
.
forEach
(
x
=>
{
x
.
checked
=
false
})
e
.
checked
=
!
e
.
checked
}
if
(
i
==
3
){
data
.
types
.
forEach
(
x
=>
{
x
.
checked
=
false
})
if
(
e
.
checked
)
{
e
.
num
=
1
}
e
.
checked
=
!
e
.
checked
let
types
=
data
.
types
.
filter
(
x
=>
x
.
checked
)
if
(
types
&&
types
[
0
]){
data
.
msg
.
CarId
=
types
[
0
].
Id
}
methods
.
getQuotation
()
data
.
isCheck
=
data
.
types
.
findIndex
(
x
=>
x
.
checked
)
>
-
1
}
},
addPeople
(
item
:
any
,
type
:
any
)
{
if
(
type
==
1
)
{
item
.
num
++
}
else
if
(
type
==
0
&&
item
.
num
>
1
)
{
item
.
num
--
}
item
.
num
=
item
.
num
!=
''
?
item
.
num
:
'1'
methods
.
calcMoneyHandler
()
},
changePeople
(
val
:
string
)
{
methods
.
getNum
()
},
getNum
(){
data
.
types
.
forEach
(
x
=>
{
if
(
x
.
num
>
10
){
x
.
num
=
10
}
})
setTimeout
(()
=>
{
methods
.
calcMoneyHandler
()
},
50
)
},
calcMoneyHandler
(){
data
.
msg
.
Money
=
0.0
data
.
types
.
forEach
(
x
=>
{
if
(
x
.
checked
){
data
.
msg
.
Money
+=
x
.
B2BPrice
*
x
.
num
}
})
}
}
methods
.
getInfo
()
return
{
...
toRefs
(
data
),
...
methods
,
qDateProxy
,
qDateProxy2
,
qTimeProxy
,
qTimeProxy2
,
guestGetonAddress
,
guestGetoffAddress
,
guestTimeData
,
guestAirportTerminal
,
guestAirLine
,
guestFlightNumber
,
guestFlightTime
,
guestManNum
,
guestChildNum
,
guestBabyNum
,
guestHandLuggageNum
,
guestRegisteredLuggageNum
,
guestSurName
,
guestName
,
guestMobile
,
guestContactWay
}
}
})
</
script
>
<
style
scoped
>
:deep
(
.height.q-field--auto-height
.q-field__control
)
{
min-height
:
40px
!important
;
}
:deep
(
.height.q-field--auto-height
.q-field__native
)
{
min-height
:
40px
!important
;
}
</
style
>
src/pages/ticket/TicketOrderPreview.vue
View file @
eef91431
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
</div>
</div>
<div
class=
"col"
>
<div
class=
"col"
>
<div
class=
"text-subtitle1 text-weight-bolder cursor-pointer"
@
click=
"showCardHandler"
>
{{detailsObj.Name}}
</div>
<div
class=
"text-subtitle1 text-weight-bolder cursor-pointer"
@
click=
"showCardHandler"
>
{{detailsObj.Name}}
</div>
<div
class=
"f14 text-grey-600"
>
<div
class=
"f
z
14 text-grey-600"
>
{{ $t('v102.ticket.ordertip') }}
{{ $t('v102.ticket.ordertip') }}
</div>
</div>
</div>
</div>
...
...
src/router/routes.ts
View file @
eef91431
...
@@ -20,7 +20,9 @@ const routes: RouteRecordRaw[] = [
...
@@ -20,7 +20,9 @@ const routes: RouteRecordRaw[] = [
{
path
:
'/ticket/preview/:ticketId/:Time'
,
component
:
()
=>
import
(
'pages/ticket/TicketOrderPreview.vue'
)
},
{
path
:
'/ticket/preview/:ticketId/:Time'
,
component
:
()
=>
import
(
'pages/ticket/TicketOrderPreview.vue'
)
},
{
path
:
'/ticket/order'
,
component
:
()
=>
import
(
'pages/ticket/TicketOrder.vue'
)
},
{
path
:
'/ticket/order'
,
component
:
()
=>
import
(
'pages/ticket/TicketOrder.vue'
)
},
{
path
:
'/vehicle/index'
,
component
:
()
=>
import
(
'pages/vehicle/index.vue'
)
},
//车辆
{
path
:
'/vehicle/index'
,
component
:
()
=>
import
(
'pages/CharteredBus/CharteredBusList.vue'
)
},
//车辆
{
path
:
'/vehicle/Preview/:ProductId/:Time'
,
component
:
()
=>
import
(
'pages/CharteredBus/CharteredBusPreview.vue'
)
},
{
path
:
'/vehicle/order'
,
component
:
()
=>
import
(
'pages/CharteredBus/CharteredBusOrder.vue'
)
},
{
path
:
'/ticket/preview/:ticketId/:Time'
,
component
:
()
=>
import
(
'pages/ticket/TicketOrderPreview.vue'
)
},
{
path
:
'/ticket/preview/:ticketId/:Time'
,
component
:
()
=>
import
(
'pages/ticket/TicketOrderPreview.vue'
)
},
{
path
:
'/ticket/order/:orderId?'
,
component
:
()
=>
import
(
'pages/ticket/TicketOrder.vue'
)
}
{
path
:
'/ticket/order/:orderId?'
,
component
:
()
=>
import
(
'pages/ticket/TicketOrder.vue'
)
}
]
]
...
...
src/utils/hotelRate.ts
View file @
eef91431
...
@@ -151,6 +151,14 @@ const useHotel={
...
@@ -151,6 +151,14 @@ const useHotel={
}
}
return
rates
return
rates
},
},
// 包车类型
getCharteredBusType
():
HotelRate
[]{
let
rates
=
[]
as
HotelRate
[]
for
(
let
i
=
0
;
i
<
4
;
i
++
){
rates
.
push
({
name
:
t
(
`v102.CharteredBus.baochetype
${
i
}
`
),
id
:
i
})
}
return
rates
},
}
}
export
{
useHotel
,
export
{
useHotel
,
type
HotelRate
,
type
HotelRate
,
...
...
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