Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengke
jz_Travel
Commits
1085099b
Commit
1085099b
authored
Oct 23, 2023
by
18224442217
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
e2b1033f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
189 additions
and
43 deletions
+189
-43
airTicketList.vue
pages/airTicket/airTicketList.vue
+34
-43
indexGroup.vue
pages/airTicket/components/address/indexGroup.vue
+155
-0
No files found.
pages/airTicket/airTicketList.vue
View file @
1085099b
...
...
@@ -3,7 +3,7 @@
:class=
"[NewDataList.length==0||2>NewDataList.length?'height100vh':'height100']"
>
<view
class=
"bgFFF"
>
<AirTicketHeader></AirTicketHeader>
<view
class=
"StartStopAddress"
v-if=
"(
DepartureCityList&&DepartureCityList
.length>0)||(ArrivalCity&&ArrivalCity.length>0)"
>
<view
class=
"StartStopAddress"
v-if=
"(
AddressListAll&&AddressListAll
.length>0)||(ArrivalCity&&ArrivalCity.length>0)"
>
<view
class=
"row-sb-n"
>
<view
class=
"StartStopAddressText-box"
>
<view
class=
"column"
>
...
...
@@ -40,17 +40,6 @@
<view
class=
"height-line1 MT20"
></view>
</view>
<view
class=
"DepartureTime column"
>
<!--
<text
class=
"fz24 color9999A6"
>
出发时间
</text>
<text
class=
"fz30 fontBold MT31 MB20"
:class=
"[StartDateObj.math?'':'color9999A5']"
>
<template
v-if=
"StartDateObj.math"
>
{{
StartDateObj
.
math
}}
月
{{
StartDateObj
.
date
}}
日(周
{{
StartDateObj
.
week
}}
)
</
template
>
<
template
v-else
>
{{
!
StartDateObj
.
math
&&
NewDateList
.
length
>
0
?
'点击以下日期进行筛查'
:
'--'
}}
</
template
>
</text>
-->
<text
class=
"fz24 color9999A6"
>
行程类型
</text>
<view
class=
"fz30 fontBold MT31 MB20 row-aic-n"
>
<view
v-for=
"(item,index) in typeList"
...
...
@@ -99,14 +88,6 @@
</view>
</view>
</view>
<!-- <view class="ScreeningCondition row-sb-n bgFFF">
<view class="ScreeningConditionC bgF5"
:class="[item.Id==activeId?'active':'']" v-for="(item,index) in ConditionList"
@click="clickSearch(item.Id,2)">
<text class="fz24">{{item.Name}}</text>
</view>
</view> -->
<view
class=
"MT40"
></view>
<u-empty
v-if=
"NewDataList.length==0"
text=
"暂无数据"
mode=
"data"
padding-top=
"20"
></u-empty>
<scroll-view
v-else
:scroll-y=
"true"
style=
"background-color: #f0f4f7;"
...
...
@@ -132,12 +113,6 @@
:priceList=
"dataList"
title=
"选择日期"
></canlendar>
<!-- <canlendar
:StartDate="msg.StartDate"
:EndDate="msg.EndDate"
@finish="chosenDateResult"
title="选起止出发日期">
</canlendar> -->
</u-popup>
<u-popup
v-model=
"showAddressPreviwe"
...
...
@@ -145,10 +120,10 @@
border-radius=
"50"
:safe-area-inset-bottom=
"true"
@
close=
"OffPopup(2)"
>
<Address
:AddressType=
"AddressType"
<AddressGroup
:OriginAddressObj=
"OriginAddress"
:dataList=
"Address
Type==1?DepartureCityList:ArrivalCity
"
@
RenewalAddres=
"RenewalAddres"
></Address>
:dataList=
"Address
List
"
@
RenewalAddres=
"RenewalAddres"
></Address
Group
>
</u-popup>
</view>
...
...
@@ -157,6 +132,7 @@
import
AirTicketHeader
from
"./components/airTicketHeader.vue"
;
import
canlendar
from
"./components/sign/index.vue"
;
import
Address
from
"./components/address/index.vue"
;
import
AddressGroup
from
"./components/address/indexGroup.vue"
;
import
AirTicketList
from
"./components/airTicketList.vue"
;
import
{
gegerateDates
,
getBeforeDate
,
getDateWeek
}
from
"./dates.js"
;
export
default
{
...
...
@@ -164,6 +140,7 @@
AirTicketHeader
,
canlendar
,
Address
,
AddressGroup
,
AirTicketList
},
data
()
{
...
...
@@ -172,8 +149,8 @@
{
Name
:
'往返'
,
Id
:
2
},
{
Name
:
'单程'
,
Id
:
1
},
],
DepartureCityList
:[],
A
rrivalCity
:[],
AddressListAll
:[],
A
ddressList
:[],
AddressType
:
null
,
//1出发 2目的地
OriginAddress
:{
DepartCityName
:
''
,
...
...
@@ -274,14 +251,11 @@
}
}
},
RenewalAddres
(
SelectObj
,
AddressType
){
if
(
AddressType
==
1
){
this
.
OriginAddress
.
DepartCityName
=
SelectObj
.
Name
,
this
.
msg
.
DepartCityId
=
this
.
msgAddress
.
DepartCityId
=
this
.
OriginAddress
.
DepartCityId
=
SelectObj
.
ID
}
else
{
this
.
OriginAddress
.
ArriveCityName
=
SelectObj
.
Name
,
this
.
msg
.
ArriveCityId
=
this
.
msgAddress
.
ArriveCityId
=
this
.
OriginAddress
.
ArriveCityId
=
SelectObj
.
ID
}
RenewalAddres
(
SelectObj
){
this
.
OriginAddress
.
DepartCityName
=
SelectObj
.
DepartCityName
,
this
.
msg
.
DepartCityId
=
this
.
msgAddress
.
DepartCityId
=
this
.
OriginAddress
.
DepartCityId
=
SelectObj
.
DepartCityId
this
.
OriginAddress
.
ArriveCityName
=
SelectObj
.
ArriveCityName
,
this
.
msg
.
ArriveCityId
=
this
.
msgAddress
.
ArriveCityId
=
this
.
OriginAddress
.
ArriveCityId
=
SelectObj
.
ArriveCityId
this
.
showAddressPreviwe
=
false
this
.
getDataList
()
},
...
...
@@ -451,16 +425,33 @@
this
.
apipost
(
"AirTicket_get_GetTicketCity"
,
this
.
msgAddress
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
){
this
.
DepartureCityList
=
res
.
data
.
DepartureCityList
this
.
ArrivalCity
=
res
.
data
.
ArrivalCity
this
.
AddressListAll
=
[]
res
.
data
.
forEach
(
x
=>
{
let
obj
=
{
Name
:
x
.
Name
,
ID
:
x
.
ID
,
}
this
.
AddressListAll
.
push
(
obj
)
x
.
CityList
.
forEach
(
y
=>
{
let
obj2
=
{
Name
:
y
.
Name
,
ID
:
y
.
ID
,
}
this
.
AddressListAll
.
push
(
obj2
)
if
(
this
.
msg
.
ArriveCityId
==
y
.
ID
){
this
.
msg
.
DepartCityId
=
x
.
ID
}
})
})
this
.
AddressList
=
res
.
data
if
(
this
.
msg
.
DepartCityId
){
let
DepartCityName
=
this
.
DepartureCityList
.
filter
(
x
=>
{
let
DepartCityName
=
this
.
AddressListAll
.
filter
(
x
=>
{
return
x
.
ID
==
this
.
msg
.
DepartCityId
})
this
.
OriginAddress
.
DepartCityName
=
DepartCityName
.
length
>
0
?
DepartCityName
[
0
].
Name
:
''
}
if
(
this
.
msg
.
ArriveCityId
){
let
ArriveCityName
=
this
.
A
rrivalCity
.
filter
(
x
=>
{
let
ArriveCityName
=
this
.
A
ddressListAll
.
filter
(
x
=>
{
return
x
.
ID
==
this
.
msg
.
ArriveCityId
})
this
.
OriginAddress
.
ArriveCityName
=
ArriveCityName
.
length
>
0
?
ArriveCityName
[
0
].
Name
:
''
...
...
pages/airTicket/components/address/indexGroup.vue
0 → 100644
View file @
1085099b
<
template
>
<view
class=
"addressIndex-box"
>
<view
class=
"fz30 fontBold textCenter MB30 PX53 relative"
>
选择出发地/目的地
<text
v-if=
"SelectObj.DepartCityId||SelectObj.ArriveCityId"
class=
"fz24 color9999A5 absolute PX10"
style=
"right: 53rpx;top: 0;bottom: 0;"
@
click=
"Clear"
>
清空
</text>
</view>
<view
class=
"fz30 fontBold MB30 PX53 row-aic-n"
>
<text
style=
"width: 50%;"
>
当前出发地
</text>
<text>
当前目的地
</text>
</view>
<view
class=
"MT30 PX53 row-aic-n"
>
<view
style=
"width: 50%;"
>
<view
class=
"addressIndex-Orientation inlineblock bgF5 row-ajc-n textCenter"
style=
"width: auto; padding: 15rpx 50rpx;"
>
<img
class=
"inlineblock MR10"
mode=
"widthFix"
style=
"width: 18rpx;height: 22rpx"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696743247000_254.png"
/>
<text
class=
"fz30"
>
<template
v-if=
"SelectObj.DepartCityName"
>
{{
SelectObj
.
DepartCityName
}}
</
template
>
<
template
v-else
>
--
</
template
>
</text>
</view>
</view>
<view>
<view
class=
"addressIndex-Orientation inlineblock bgF5 row-ajc-n textCenter"
style=
"width: auto; padding: 15rpx 50rpx;"
>
<img
class=
"inlineblock MR10"
mode=
"widthFix"
style=
"width: 18rpx;height: 22rpx"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696743247000_254.png"
/>
<text
class=
"fz30"
>
<
template
v-if=
"SelectObj.ArriveCityName"
>
{{
SelectObj
.
ArriveCityName
}}
</
template
>
<
template
v-else
>
--
</
template
>
</text>
</view>
</view>
</view>
<view
class=
"height-line1 MT25"
></view>
<view
class=
"fz30 fontBold MT20 PX53 MB20 row-aic-n"
>
<view
style=
"width: 150rpx;"
>
出发地
</view>
<view
class=
"flexG"
>
目的地
</view>
</view>
<view
class=
"hidden"
style=
"height: calc(100vh - 60vh);"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:style=
"{ height: '100%' }"
>
<
template
v-for=
"(item,index) in dataList"
>
<view
class=
"addressIndex-toponym row-aic-n"
:key=
"item.ID"
>
<view
style=
"width: 150rpx;"
:class=
"[SelectObj.DepartCityId==item.ID?'colorDEBF7B':'']"
@
click=
"getAddress(item)"
>
{{
item
.
Name
}}
</view>
<view
class=
"flexG row-aic-w"
>
<view
class=
"addressIndex-toponym-box"
v-for=
"(items,index) in item.CityList"
:key=
"items.ID"
>
<view
class=
"addressIndex-Orientation inlineblock textCenter MT10 fz30"
:class=
"[SelectObj.ArriveCityId==items.ID?'bgDEBF7B':'bgF5']"
@
click=
"getAddress(item,items)"
>
{{
items
.
Name
}}
</view>
</view>
</view>
</view>
<view
class=
"height-line1 MT10"
></view>
</
template
>
</scroll-view>
</view>
<view
class=
"AirplanePassengerList-footer fixedFooter bgFFF fixed z-index2"
>
<view
class=
"AirplanePassengerList-buttom bgDEBF7B fz32 fontBold textCenter"
@
click=
"RenewalAddres"
>
确认
</view>
</view>
</view>
</template>
<
script
>
export
default
{
props
:[
'OriginAddressObj'
,
'dataList'
],
data
()
{
return
{
SelectObj
:
{},
}
},
onLoad
(
options
){
},
watch
:
{
OriginAddressObj
:
{
handler
(
newVal
,
oldval
)
{
this
.
SelectObj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
OriginAddressObj
))
},
deep
:
true
},
},
created
()
{},
mounted
()
{
},
methods
:
{
RenewalAddres
(){
this
.
$emit
(
'RenewalAddres'
,
this
.
SelectObj
)
},
Clear
(){
this
.
ClearData
(
null
,
null
,
1
)
},
ClearData
(
item
,
items
,
type
){
if
(
item
||
type
){
this
.
SelectObj
.
DepartCityName
=
''
this
.
SelectObj
.
DepartCityId
=
0
}
if
(
items
||
type
){
this
.
SelectObj
.
ArriveCityName
=
''
this
.
SelectObj
.
ArriveCityId
=
0
}
},
getAddress
(
item
,
items
){
if
(
item
&&
items
){
this
.
ClearData
(
item
,
items
)
}
if
(
!
items
){
this
.
ClearData
(
item
,
items
,
1
)
}
this
.
ClearData
(
item
,
items
)
this
.
SelectObj
.
DepartCityName
=
item
.
Name
this
.
SelectObj
.
DepartCityId
=
item
.
ID
if
(
items
){
this
.
SelectObj
.
ArriveCityName
=
items
.
Name
this
.
SelectObj
.
ArriveCityId
=
items
.
ID
}
// this.$forceUpdate()
},
}
}
</
script
>
<
style
scoped
>
@import
url("@/asset/css/flex.css")
;
@import
url("../../style.css")
;
.addressIndex-box
{
padding
:
46
rpx
0
139
rpx
0
;
}
.addressIndex-Orientation
{
width
:
160
rpx
;
padding
:
15
rpx
0
;
border-radius
:
30
rpx
;
}
.addressIndex-toponym
{
padding
:
0
0
0
53
rpx
;
}
.addressIndex-toponym-box
{
flex
:
0
0
33.33%
;
}
</
style
>
\ No newline at end of file
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