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
6e29e93c
Commit
6e29e93c
authored
Mar 04, 2025
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'B2C' of
http://gitlab.oytour.com/zk123/jz_travel
into B2C
parents
acb83a1c
33ea8d04
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1210 additions
and
966 deletions
+1210
-966
airCity.vue
pages/airTicket/airCity.vue
+97
-92
airIndex.vue
pages/airTicket/airIndex.vue
+115
-108
flightDetail.vue
pages/airTicket/flightDetail.vue
+348
-310
ticketList.vue
pages/airTicket/ticketList/ticketList.vue
+320
-287
details.vue
pages/coupon/details/details.vue
+5
-5
index.vue
pages/jiuzhai/components/sign/index.vue
+67
-50
jz_LineDetail.vue
pages/jiuzhai/jz_LineDetail.vue
+34
-13
jz_Reserve.vue
pages/jiuzhai/jz_Reserve.vue
+135
-70
visaDetail.vue
pages/visa/visaDetail.vue
+67
-23
visaList.vue
pages/visa/visaList.vue
+8
-1
visa_Reserve.vue
pages/visa/visa_Reserve.vue
+14
-7
No files found.
pages/airTicket/airCity.vue
View file @
6e29e93c
...
...
@@ -12,11 +12,11 @@
<view
@
click=
"()=>dateVisible=true"
class=
"q-mt-sm row items-center"
style=
"font-size: 24rpx;color:#000000BB"
>
<text>
{{
dateRangeValue
.
formatStartDate
}}
</text>
<u-icon
class=
"q-ml-sm"
name=
'arrow_down'
custom-prefix=
"tffont"
color=
"#00000066"
size=
"32"
></u-icon>
</view>
</view>
<chosen-city
@
closed=
"resetCityVisible=false"
@
change=
"setNewCitiesHandle"
:value=
"chosenResult"
v-if=
"resetCityVisible"
></chosen-city>
<u-popup
mode=
"bottom"
border-radius=
"20"
:popup=
"false"
v-model=
"dateVisible"
:maskCloseAble=
"true"
length=
"auto"
:safeAreaInsetBottom=
"true"
@
close=
"()=>dateVisible=false"
:z-index=
"9999"
>
<date-range
:value=
"dateRangeValue"
@
change=
'setDateHandler'
></date-range>
</u-popup>
<u-popup
mode=
"bottom"
border-radius=
"20"
:popup=
"false"
v-model=
"dateVisible"
:maskCloseAble=
"true"
length=
"auto"
:safeAreaInsetBottom=
"true"
@
close=
"()=>dateVisible=false"
:z-index=
"9999"
>
<date-range
:value=
"dateRangeValue"
@
change=
'setDateHandler'
></date-range>
</u-popup>
</view>
<scroll-view
scroll-y=
"true"
style=
"width: 100%;height: 1px;"
class=
"col"
>
<view
class=
"air-low-rank"
>
...
...
@@ -36,27 +36,32 @@
<view
class=
"city-list-item col"
>
<view
@
click=
"goListHandle('',x)"
style=
"margin-bottom: 30rpx;"
class=
" row items-center"
>
<view
class=
"bold col"
>
{{
x
.
DepartureName
}}
-
{{
x
.
ArrivalCityName
}}
</view>
<view
class=
"row items-center"
>
<view
style=
"font-size: 22rpx;"
>
更多日期
</view>
<u-icon
name=
'arrow_right'
custom-prefix=
"tffont"
color=
"#00000066"
size=
"28"
></u-icon>
</view>
</view>
<view
@
click=
"goListHandle(f.FlightDate,x)"
class=
"flights row items-center"
v-for=
"(f,fi) in x.TicketProductList"
>
<image
style=
"width: 30rpx;"
:src=
"`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/$
{f.AlCode}.png`" mode="widthFix">
</image>
<view
style=
"font-size: 22rpx;width:50rpx;margin:0 4px"
>
{{
f
.
DayCount
}}
天
</view>
<view
style=
"font-size: 22rpx;"
>
{{
f
.
FlightDateString
}}
去
</view>
<view
class=
"q-ml-sm col"
style=
"font-size: 22rpx;"
>
{{
f
.
ReturnDateString
}}
回
</view>
<text
style=
"color:#FF3166;font-size: 22rpx;"
>
¥
</text>
<view
style=
"font-weight: bold;font-size: 24rpx;color:#FF3166"
>
{{
f
.
B2BPrice
}}
</view>
<u-icon
name=
'arrow_right'
custom-prefix=
"tffont"
color=
"#00000066"
size=
"28"
></u-icon>
<view
class=
"row items-center"
>
<view
style=
"font-size: 22rpx;"
>
更多日期
</view>
<u-icon
name=
'arrow_right'
custom-prefix=
"tffont"
color=
"#00000066"
size=
"28"
></u-icon>
</view>
</view>
<view
@
click=
"goListHandle(f.FlightDate,x)"
class=
"flights row items-center"
v-for=
"(f,fi) in x.TicketProductList"
>
<image
style=
"width: 30rpx;"
:src=
"`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/48/$
{f.AlCode}.png`" mode="widthFix">
</image>
<view
style=
"font-size: 22rpx;width:50rpx;margin:0 4px"
>
{{
f
.
DayCount
}}
天
</view>
<view
style=
"font-size: 22rpx;"
>
{{
f
.
FlightDateString
}}
去
</view>
<view
class=
"q-ml-sm col"
style=
"font-size: 22rpx;"
>
{{
f
.
ReturnDateString
}}
回
</view>
<text
style=
"color:#FF3166;font-size: 22rpx;"
>
¥
</text>
<view
style=
"font-weight: bold;font-size: 24rpx;color:#FF3166"
>
<!-- #ifdef MP-DI -->
{{
f
.
B2CPrice
}}
<!-- #endif-->
<!-- #ifdef MP-AG -->
{{
f
.
B2BPrice
}}
<!-- #endif -->
</view>
<u-icon
name=
'arrow_right'
custom-prefix=
"tffont"
color=
"#00000066"
size=
"28"
></u-icon>
</view>
</view>
...
...
@@ -68,10 +73,10 @@
</view>
</
template
>
<
script
>
import
ChosenCity
from
'./components/address/ChosenCity.vue'
<
script
>
import
ChosenCity
from
'./components/address/ChosenCity.vue'
import
DateRange
from
'./components/time/DateRange.vue'
export
default
{
export
default
{
components
:{
ChosenCity
,
DateRange
},
data
()
{
return
{
...
...
@@ -91,8 +96,8 @@
type
:
0
,
ID
:
0
,
Name
:
'全部'
},
resetCityVisible
:
false
,
},
resetCityVisible
:
false
,
dateVisible
:
false
,
lowData
:
[],
chosenResult
:
[{
...
...
@@ -135,7 +140,7 @@
mounted
()
{
},
methods
:
{
methods
:
{
resolveParameterHanle
()
{
this
.
resetParameterHandle
()
...
...
@@ -143,7 +148,7 @@
this
.
parementers
.
ArriveCityId
=
this
.
chosenResult
[
1
].
ID
if
(
this
.
dateRangeValue
.
type
==
1
)
{
this
.
parementers
.
StartDate
=
this
.
dateRangeValue
.
startDate
this
.
parementers
.
StartDate
=
this
.
dateRangeValue
.
startDate
this
.
parementers
.
EndDate
=
this
.
dateRangeValue
.
startDate
}
else
{
const
d
=
this
.
resolveDateByFuzzyHandle
(
this
.
dateRangeValue
.
fuzzy
.
fuzzyType
)
...
...
@@ -203,7 +208,7 @@
this
.
loadingLow
=
true
this
.
apipost
(
'AirTicket_get_GetTopTicketProduct'
,
this
.
parementers
,
(
r
)
=>
{
if
(
r
.
resultCode
==
1
)
{
this
.
lowData
=
this
.
formatLowData
(
r
.
data
)
this
.
lowData
=
this
.
formatLowData
(
r
.
data
)
console
.
log
(
this
.
lowData
)
}
this
.
loadingLow
=
false
...
...
@@ -215,44 +220,44 @@
d
.
forEach
((
x
)
=>
{
x
.
TicketProductList
.
sort
((
a
,
b
)
=>
{
return
new
Date
(
a
.
FlightDate
)
-
new
Date
(
b
.
FlightDate
);
})
})
const
newTicket
=
x
.
TicketProductList
.
splice
(
0
,
2
)
newTicket
.
forEach
((
x
)
=>
{
const
q
=
x
.
FlightList
.
findLastIndex
((
f
)
=>
f
.
FlightType
==
3
)
x
.
ReturnDate
=
x
.
FlightList
[
q
].
FlightDate
x
.
DayCount
=
Math
.
abs
((
new
Date
(
x
.
ReturnDate
).
getTime
()
-
new
Date
(
x
.
FlightDate
).
getTime
())
/
(
24
*
60
*
60
*
1000
))
x
.
ReturnDateString
=
this
.
formatDateString
(
x
.
ReturnDate
)
x
.
FlightDateString
=
this
.
formatDateString
(
x
.
FlightDate
)
})
newTicket
.
forEach
((
x
)
=>
{
const
q
=
x
.
FlightList
.
findLastIndex
((
f
)
=>
f
.
FlightType
==
3
)
x
.
ReturnDate
=
x
.
FlightList
[
q
].
FlightDate
x
.
DayCount
=
Math
.
abs
((
new
Date
(
x
.
ReturnDate
).
getTime
()
-
new
Date
(
x
.
FlightDate
).
getTime
())
/
(
24
*
60
*
60
*
1000
))
x
.
ReturnDateString
=
this
.
formatDateString
(
x
.
ReturnDate
)
x
.
FlightDateString
=
this
.
formatDateString
(
x
.
FlightDate
)
})
x
.
TicketProductList
=
newTicket
});
return
d
},
formatDateString
(
d
){
const
date
=
new
Date
(
d
)
const
weeks
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
]
return
`
${
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)}
.
${
String
(
date
.
getDate
()).
padStart
(
2
,
'0'
)}
周
${
weeks
[
date
.
getDay
()]}
`
//周${weeks[date.getDay()]}
},
setNewCitiesHandle
(
val
){
this
.
chosenResult
=
val
uni
.
setStorageSync
(
'scf'
,{
cities
:
this
.
chosenResult
,
dateRange
:
this
.
dateRangeValue
})
this
.
getTopLowTicketHandle
()
this
.
resetCityVisible
=
false
},
setDateHandler
(
val
){
this
.
dateRangeValue
=
val
this
.
dateVisible
=
false
uni
.
setStorageSync
(
'scf'
,{
cities
:
this
.
chosenResult
,
dateRange
:
this
.
dateRangeValue
})
this
.
getTopLowTicketHandle
()
},
goListHandle
(
val
,
x
){
},
formatDateString
(
d
){
const
date
=
new
Date
(
d
)
const
weeks
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
]
return
`
${
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)}
.
${
String
(
date
.
getDate
()).
padStart
(
2
,
'0'
)}
周
${
weeks
[
date
.
getDay
()]}
`
//周${weeks[date.getDay()]}
},
setNewCitiesHandle
(
val
){
this
.
chosenResult
=
val
uni
.
setStorageSync
(
'scf'
,{
cities
:
this
.
chosenResult
,
dateRange
:
this
.
dateRangeValue
})
this
.
getTopLowTicketHandle
()
this
.
resetCityVisible
=
false
},
setDateHandler
(
val
){
this
.
dateRangeValue
=
val
this
.
dateVisible
=
false
uni
.
setStorageSync
(
'scf'
,{
cities
:
this
.
chosenResult
,
dateRange
:
this
.
dateRangeValue
})
this
.
getTopLowTicketHandle
()
},
goListHandle
(
val
,
x
){
const
newCityInfo
=
[{
type
:
0
,
ID
:
x
.
DepartureCity
,
...
...
@@ -263,18 +268,18 @@
ID
:
x
.
ArrivalCityId
,
Name
:
x
.
ArrivalCityName
}
]
uni
.
setStorageSync
(
'scf'
,{
cities
:
newCityInfo
,
dateRange
:
this
.
dateRangeValue
})
let
url
=
'/pages/airTicket/ticketList/ticketList'
if
(
val
!=
''
){
url
+=
`?dv=
${
encodeURIComponent
(
val
)}
`
}
uni
.
navigateTo
({
url
})
]
uni
.
setStorageSync
(
'scf'
,{
cities
:
newCityInfo
,
dateRange
:
this
.
dateRangeValue
})
let
url
=
'/pages/airTicket/ticketList/ticketList'
if
(
val
!=
''
){
url
+=
`?dv=
${
encodeURIComponent
(
val
)}
`
}
uni
.
navigateTo
({
url
})
}
}
}
...
...
@@ -290,8 +295,8 @@
.search-box
{
height
:
200
rpx
;
width
:
100%
;
box-shadow
:
0
0
26
rpx
#f1f1f1
;
background-image
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638750707031350012.jpg')
;
box-shadow
:
0
0
26
rpx
#f1f1f1
;
background-image
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638750707031350012.jpg')
;
background-size
:
100%
auto
;
}
...
...
@@ -301,22 +306,22 @@
color
:
#080A09
;
}
.air-low-rank
{
.air-low-rank
{
padding
:
40
rpx
;
}
.air-low-rank
.city-list-item
{
margin-left
:
18
rpx
;
}
.air-low-rank
.city-list-item
.bold
{
font-weight
:
bold
;
font-size
:
32
rpx
!important
;
color
:
#080A09
;
}
.air-low-rank
.city-list-item
.flights
{
background
:
#f1f1f1
;
border-radius
:
8
rpx
;
padding
:
10
rpx
;
margin-top
:
10
rpx
;
.air-low-rank
.city-list-item
.bold
{
font-weight
:
bold
;
font-size
:
32
rpx
!important
;
color
:
#080A09
;
}
.air-low-rank
.city-list-item
.flights
{
background
:
#f1f1f1
;
border-radius
:
8
rpx
;
padding
:
10
rpx
;
margin-top
:
10
rpx
;
}
.air-low-rank
.city-list-item
.info-text
{
font-size
:
24
rpx
;
...
...
pages/airTicket/airIndex.vue
View file @
6e29e93c
...
...
@@ -85,7 +85,14 @@
<view
class=
"col"
>
<text
style=
"font-size: 22rpx;color: #A4A4A4;font-weight: 400;"
>
仅需:
</text>
<text
style=
"color:#FF3166;font-size: 22rpx;"
>
¥
</text>
<text
style=
"font-size: 32rpx;font-weight: bold;color:#FF3166;"
>
{{
x
.
Flight
.
B2BPrice
}}
</text>
<text
style=
"font-size: 32rpx;font-weight: bold;color:#FF3166;"
>
<!-- #ifdef MP-DI-->
{{
x
.
Flight
.
B2CPrice
}}
<!-- #endif-->
<!-- #ifdef MP-AG-->
{{
x
.
Flight
.
B2BPrice
}}
<!-- #endif -->
</text>
</view>
<view
class=
"more-date"
@
click=
"openFlightHandle(x,1)"
>
更多日期
</view>
</view>
...
...
@@ -96,25 +103,25 @@
</view>
</view>
</view>
</scroll-view>
</
template
>
</scroll-view>
</
template
>
<
script
>
import
CityList
from
'./components/address/CityList.vue'
;
import
DateRange
from
'./components/time/DateRange.vue'
;
export
default
{
data
()
{
return
{
leftPos
:
0
,
import
DateRange
from
'./components/time/DateRange.vue'
;
export
default
{
data
()
{
return
{
leftPos
:
0
,
rightPos
:
0
,
leftStyle
:{
transform
:
`translateX(0px)`
,
transition
:
'transform 0.5s ease'
,
leftStyle
:{
transform
:
`translateX(0px)`
,
transition
:
'transform 0.5s ease'
,
},
rightStyle
:{
transform
:
`translateX(0px)`
,
transition
:
'transform 0.5s ease'
,
rightStyle
:{
transform
:
`translateX(0px)`
,
transition
:
'transform 0.5s ease'
,
},
scrollTop
:
0
,
containerWidth
:
0
,
...
...
@@ -159,8 +166,8 @@
Name
:
'全部低价城市'
}
],
barHeight
:
0
}
barHeight
:
0
}
},
components
:{
CityList
,
DateRange
},
created
()
{
...
...
@@ -177,7 +184,7 @@
that
.
barHeight
=
r
.
statusBarHeight
},
});
},
},
methods
:
{
searchFlightHandle
(){
uni
.
setStorageSync
(
'scf'
,{
...
...
@@ -285,24 +292,24 @@
})
.
exec
();
});
},
},
async
swapLocations
()
{
this
.
leftWidth
=
await
this
.
getDomWidthAsync
(
'.left-name'
)
this
.
rightWidth
=
await
this
.
getDomWidthAsync
(
'.right-name'
)
this
.
leftPos
=
this
.
leftPos
===
0
?
(
this
.
containerWidth
-
this
.
leftWidth
)
:
0
;
this
.
rightWidth
=
await
this
.
getDomWidthAsync
(
'.right-name'
)
this
.
leftPos
=
this
.
leftPos
===
0
?
(
this
.
containerWidth
-
this
.
leftWidth
)
:
0
;
this
.
rightPos
=
this
.
rightPos
===
0
?
-
(
this
.
containerWidth
-
this
.
rightWidth
)
:
0
;
this
.
chosenResult
[
0
].
type
=
this
.
leftPos
===
0
?
0
:
1
this
.
chosenResult
[
1
].
type
=
this
.
rightPos
===
0
?
1
:
0
this
.
rotateNum
+=
180
this
.
leftStyle
=
{
transform
:
`translateX(
${
this
.
leftPos
}
px)`
,
transition
:
'transform 0.5s ease'
,
this
.
leftStyle
=
{
transform
:
`translateX(
${
this
.
leftPos
}
px)`
,
transition
:
'transform 0.5s ease'
,
}
this
.
rightStyle
=
{
transform
:
`translateX(
${
this
.
rightPos
}
px)`
,
transition
:
'transform 0.5s ease'
,
}
this
.
rightStyle
=
{
transform
:
`translateX(
${
this
.
rightPos
}
px)`
,
transition
:
'transform 0.5s ease'
,
}
},
},
popupClose
(){
this
.
citiesVisible
=
false
this
.
dateVisible
=
false
...
...
@@ -338,12 +345,12 @@
url
:
'/pages/index/index'
})
}
}
}
</
script
>
<
style
>
@import
url("../../asset/css/flex.css")
;
}
}
</
script
>
<
style
>
@import
url("../../asset/css/flex.css")
;
.nav-box
{
height
:
44px
;
/* 这里的44px是示例高度,可根据实际设计调整 */
line-height
:
44px
;
...
...
@@ -375,17 +382,17 @@
}
.nav-box
.home-btn
:active
{
background-color
:
#ccc
;
}
.air-home
{
background-color
:
#F3F1EF
;
min-height
:
100vh
;
background-image
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/uploads/versions/flight.png')
;
background-repeat
:
no-repeat
;
background-size
:
100%
auto
;
padding
:
0
30
rpx
;
}
.air-home
{
background-color
:
#F3F1EF
;
min-height
:
100vh
;
background-image
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/uploads/versions/flight.png')
;
background-repeat
:
no-repeat
;
background-size
:
100%
auto
;
padding
:
0
30
rpx
;
padding-top
:
257
rpx
;
padding-bottom
:
36
rpx
;
}
padding-bottom
:
36
rpx
;
}
.air-low-rank
{
margin-top
:
36
rpx
;
border-radius
:
16
rpx
;
...
...
@@ -448,66 +455,66 @@
color
:
#000000
DD
;
font-size
:
22
rpx
;
font-weight
:
400
;
}
.air-home-header
{
border-radius
:
18
rpx
;
background-color
:
#FFF
;
}
.air-home-header
.title-box
{
height
:
79
rpx
;
background
:
#FAF0DB
;
position
:
relative
;
border-top-right-radius
:
18
rpx
;
}
.air-home-header
.title-box
.active-item
{
background-color
:
#fff
;
position
:
absolute
;
padding-top
:
30
rpx
;
border-top-right-radius
:
18
rpx
;
border-top-left-radius
:
18
rpx
;
top
:
-10
rpx
;
width
:
310
rpx
;
bottom
:
0
;
left
:
0
;
text-align
:
center
;
font-weight
:
bold
;
font-size
:
32
rpx
;
color
:
#B99846
;
}
.air-home-header
.title-box
.active-item
.right
{
width
:
75
rpx
;
height
:
89
rpx
;
position
:
absolute
;
background-image
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638745412034709773.png')
;
background-size
:
100%
100%
;
right
:
-62
rpx
;
top
:
0
;
}
.air-home
.air-home-header
.air-tools
{
padding
:
36
rpx
;
}
.air-tools
.cities-name
{
font-weight
:
bold
;
font-size
:
32
rpx
;
color
:
#080A09
;
}
.air-tools
.normal-label
{
font-size
:
24
rpx
;
color
:
#9999A6
;
}
.air-tools
.exchange
{
background-image
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696990221000_663.png')
;
background-repeat
:
no-repeat
;
background-position
:
center
center
;
background-size
:
38
rpx
auto
;
/* 这里设置背景图片的宽度和高度 */
height
:
30px
;
}
}
.air-home-header
{
border-radius
:
18
rpx
;
background-color
:
#FFF
;
}
.air-home-header
.title-box
{
height
:
79
rpx
;
background
:
#FAF0DB
;
position
:
relative
;
border-top-right-radius
:
18
rpx
;
}
.air-home-header
.title-box
.active-item
{
background-color
:
#fff
;
position
:
absolute
;
padding-top
:
30
rpx
;
border-top-right-radius
:
18
rpx
;
border-top-left-radius
:
18
rpx
;
top
:
-10
rpx
;
width
:
310
rpx
;
bottom
:
0
;
left
:
0
;
text-align
:
center
;
font-weight
:
bold
;
font-size
:
32
rpx
;
color
:
#B99846
;
}
.air-home-header
.title-box
.active-item
.right
{
width
:
75
rpx
;
height
:
89
rpx
;
position
:
absolute
;
background-image
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638745412034709773.png')
;
background-size
:
100%
100%
;
right
:
-62
rpx
;
top
:
0
;
}
.air-home
.air-home-header
.air-tools
{
padding
:
36
rpx
;
}
.air-tools
.cities-name
{
font-weight
:
bold
;
font-size
:
32
rpx
;
color
:
#080A09
;
}
.air-tools
.normal-label
{
font-size
:
24
rpx
;
color
:
#9999A6
;
}
.air-tools
.exchange
{
background-image
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696990221000_663.png')
;
background-repeat
:
no-repeat
;
background-position
:
center
center
;
background-size
:
38
rpx
auto
;
/* 这里设置背景图片的宽度和高度 */
height
:
30px
;
}
</
style
>
\ No newline at end of file
pages/airTicket/flightDetail.vue
View file @
6e29e93c
...
...
@@ -3,166 +3,180 @@
<view
class=
"column items-center justify-center q-mt-md"
v-if=
"loading"
>
<u-loading
mode=
"circle"
size=
"40"
></u-loading>
<view
class=
"normal-label text-center q-mt-sm"
>
正在加载信息
</view>
</view>
<scroll-view
v-if=
"flight && !loading"
scroll-y=
"true"
class=
"col"
style=
"height: 1px;"
>
<view
class=
"flight-card"
>
<view
class=
"row items-center"
@
click=
"goVisible=!goVisible"
>
<view
class=
"flight-status"
>
去程
</view>
<view
class=
"city bold"
>
{{
goList
[
0
].
DepartureName
}}
</view>
<u-icon
name=
'qianwangx'
custom-prefix=
"tffont"
color=
"#00000033"
size=
"28"
></u-icon>
<view
class=
"city bold"
>
{{
goList
[
goList
.
length
-
1
].
ArrivalCityName
}}
</view>
<view
class=
"col row"
style=
"font-size: 14px;justify-content: flex-end;"
>
<text>
{{
goList
[
0
].
FlightDate
.
split
(
'-'
).
splice
(
1
,
2
).
join
(
'-'
)
}}
{{
getWeeks
(
goList
[
0
].
FlightDate
)
}}
{{
goList
[
0
].
Departure_time
}}
</text>
<u-icon
class=
"q-ml-sm"
name=
'arrow_down'
custom-prefix=
"tffont"
color=
"#00000066"
size=
"32"
></u-icon>
</view>
</view>
<view
class=
"q-mt-md"
style=
"padding: 32rpx 0;"
v-if=
"goVisible"
>
<flight
:value=
"goList"
:show-title=
"false"
></flight>
</view>
</view>
<view
class=
"flight-card"
>
<view
class=
"row items-center"
@
click=
"backVisible=!backVisible"
>
<view
class=
"flight-status"
>
回程
</view>
<view
class=
"city bold"
>
{{
backList
[
0
].
DepartureName
}}
</view>
<u-icon
name=
'qianwangx'
custom-prefix=
"tffont"
color=
"#00000033"
size=
"28"
></u-icon>
<view
class=
"city bold"
>
{{
backList
[
goList
.
length
-
1
].
ArrivalCityName
}}
</view>
<view
class=
"col row"
style=
"font-size: 14px;justify-content: flex-end;"
>
<text>
{{
backList
[
0
].
FlightDate
.
split
(
'-'
).
splice
(
1
,
2
).
join
(
'-'
)
}}
{{
getWeeks
(
backList
[
0
].
FlightDate
)
}}
{{
backList
[
0
].
Departure_time
}}
</text>
<u-icon
class=
"q-ml-sm"
name=
'arrow_down'
custom-prefix=
"tffont"
color=
"#00000066"
size=
"32"
></u-icon>
</view>
</view>
<view
class=
"q-mt-md"
style=
"padding: 32rpx 0;"
v-if=
"backVisible"
>
<flight
:value=
"backList"
:show-title=
"false"
></flight>
</view>
</view>
<view
class=
"flight-card q-mt-md"
>
<view
class=
"title"
>
选择乘机人
</view>
<guest
@
change-visible=
"(val)=>statusVisible=val"
:max-num=
"flight.B2BSellNum"
@
selected=
"guestChangeHandle"
></guest>
<u-field
v-model=
"contactName"
label=
"联系人"
placeholder=
"联系人名称"
padding=
"20rpx 28rpx"
:borderBottom=
"true"
required
>
</u-field>
<u-field
v-model=
"contactPhone"
label=
"联系电话"
placeholder=
"请填写电话"
padding=
"20rpx 28rpx"
:borderBottom=
"true"
required
>
</u-field>
</view>
<view
class=
"flight-card q-mt-md"
v-if=
"sales.length>1"
>
<view
class=
"title"
>
服务专员
</view>
<u-field
v-model=
"createBy.EmName"
label=
"服务专员"
placeholder=
"请选择服务专员"
padding=
"20rpx 28rpx"
right-icon=
"arrow-down"
:disabled=
"true"
@
click=
"saleVisable=true"
required
>
</u-field>
</view>
<view
class=
"flight-card q-mt-md"
>
<view
class=
"title"
>
<text>
优惠券
</text>
</view>
<view
class=
"q-mt-md row items-center"
>
<view
style=
"font-size: 12px;width:1px;flex:1"
>
请选择优惠券
</view>
<view
style=
"display: flex;align-items: center;"
>
<text
style=
"color:#F20707;font-size: 12px;"
@
click=
"showCouponHandler"
>
<text
style=
"flex: 1;"
v-if=
"useCouponId == 0 &&couponList.length>0"
>
{{
couponList
.
length
}}
张可用优惠券
</text>
<text
class=
"content"
style=
"color:grey"
v-else-if=
"couponList.length==0"
>
暂无优惠券
</text>
<text
class=
"content"
v-else
:style=
"
{ color: mainColor }">已优惠
{{
currentCoupon
.
discountMoney
}}
元
</text>
</text>
<u-icon
name=
"arrow"
:size=
"32"
color=
"#111"
v-if=
"couponList.length>0"
></u-icon>
</view>
</view>
</view>
<view
class=
"flight-card q-mt-md"
>
<view
class=
"title"
>
<text>
订单金额
</text>
</view>
<view
class=
"form-items q-mt-md"
>
<view
class=
"label"
>
在线支付
</view>
<view
class=
"val f14 regular"
style=
"text-align: right"
>
<text
style=
"margin-right: 30rpx"
>
{{
guest
.
length
}}
人
</text>
<text
class=
"red"
>
¥
{{
price
}}
</text>
</view>
</view>
<view
class=
"form-items"
style=
"border-bottom: none"
>
<view
class=
"label"
>
明细
</view>
</view>
<view
v-if=
"crCount>0"
class=
"row items-center price-list-details"
>
<view
class=
"col"
>
<text
style=
"margin-right: 30rpx"
>
成人
</text>
</view>
<view>
{{
crCount
}}
人 × ¥
{{
flight
.
B2BPrice
}}
</view>
</view>
<view
v-if=
"etCount>0"
class=
"row items-center price-list-details"
>
<view
class=
"col"
>
<text
style=
"margin-right: 30rpx"
>
儿童
</text>
</view>
<view>
{{
etCount
}}
人 × ¥
{{
flight
.
B2BPrice
}}
</view>
</view>
<view
v-if=
"babyCount>0"
class=
"row items-center price-list-details"
>
<view
class=
"col"
>
<text
style=
"margin-right: 30rpx"
>
婴儿
</text>
</view>
<view>
{{
babyCount
}}
人 × ¥
{{
babyPrice
}}
</view>
</view>
<view
v-if=
"useCouponId.length>0"
class=
"row items-center price-list-details"
:style=
"
{color:mainColor}">
<view
class=
"col"
>
<text
style=
"margin-right: 30rpx"
>
优惠券
</text>
</view>
<view>
-¥
{{
currentCoupon
.
discountMoney
}}
</view>
</view>
<view
class=
"row items-center price-list-details"
>
<view
class=
"col"
>
<text
style=
"margin-right: 30rpx"
>
合计
</text>
</view>
<view>
¥
{{
(
price
-
currentCoupon
.
discountMoney
>
0
?
price
-
currentCoupon
.
discountMoney
:
0
)
}}
</view>
</view>
</view>
</view>
<scroll-view
v-if=
"flight && !loading"
scroll-y=
"true"
class=
"col"
style=
"height: 1px;"
>
<view
class=
"flight-card"
>
<view
class=
"row items-center"
@
click=
"goVisible=!goVisible"
>
<view
class=
"flight-status"
>
去程
</view>
<view
class=
"city bold"
>
{{
goList
[
0
].
DepartureName
}}
</view>
<u-icon
name=
'qianwangx'
custom-prefix=
"tffont"
color=
"#00000033"
size=
"28"
></u-icon>
<view
class=
"city bold"
>
{{
goList
[
goList
.
length
-
1
].
ArrivalCityName
}}
</view>
<view
class=
"col row"
style=
"font-size: 14px;justify-content: flex-end;"
>
<text>
{{
goList
[
0
].
FlightDate
.
split
(
'-'
).
splice
(
1
,
2
).
join
(
'-'
)
}}
{{
getWeeks
(
goList
[
0
].
FlightDate
)
}}
{{
goList
[
0
].
Departure_time
}}
</text>
<u-icon
class=
"q-ml-sm"
name=
'arrow_down'
custom-prefix=
"tffont"
color=
"#00000066"
size=
"32"
></u-icon>
</view>
</view>
<view
class=
"q-mt-md"
style=
"padding: 32rpx 0;"
v-if=
"goVisible"
>
<flight
:value=
"goList"
:show-title=
"false"
></flight>
</view>
</view>
<view
class=
"flight-card"
>
<view
class=
"row items-center"
@
click=
"backVisible=!backVisible"
>
<view
class=
"flight-status"
>
回程
</view>
<view
class=
"city bold"
>
{{
backList
[
0
].
DepartureName
}}
</view>
<u-icon
name=
'qianwangx'
custom-prefix=
"tffont"
color=
"#00000033"
size=
"28"
></u-icon>
<view
class=
"city bold"
>
{{
backList
[
goList
.
length
-
1
].
ArrivalCityName
}}
</view>
<view
class=
"col row"
style=
"font-size: 14px;justify-content: flex-end;"
>
<text>
{{
backList
[
0
].
FlightDate
.
split
(
'-'
).
splice
(
1
,
2
).
join
(
'-'
)
}}
{{
getWeeks
(
backList
[
0
].
FlightDate
)
}}
{{
backList
[
0
].
Departure_time
}}
</text>
<u-icon
class=
"q-ml-sm"
name=
'arrow_down'
custom-prefix=
"tffont"
color=
"#00000066"
size=
"32"
></u-icon>
</view>
</view>
<view
class=
"q-mt-md"
style=
"padding: 32rpx 0;"
v-if=
"backVisible"
>
<flight
:value=
"backList"
:show-title=
"false"
></flight>
</view>
</view>
<view
class=
"flight-card q-mt-md"
>
<view
class=
"title"
>
选择乘机人
</view>
<guest
@
change-visible=
"(val)=>statusVisible=val"
:max-num=
"flight.B2BSellNum"
@
selected=
"guestChangeHandle"
></guest>
<u-field
v-model=
"contactName"
label=
"联系人"
placeholder=
"联系人名称"
padding=
"20rpx 28rpx"
:borderBottom=
"true"
required
>
</u-field>
<u-field
v-model=
"contactPhone"
label=
"联系电话"
placeholder=
"请填写电话"
padding=
"20rpx 28rpx"
:borderBottom=
"true"
required
>
</u-field>
</view>
<view
class=
"flight-card q-mt-md"
v-if=
"sales.length>1"
>
<view
class=
"title"
>
服务专员
</view>
<u-field
v-model=
"createBy.EmName"
label=
"服务专员"
placeholder=
"请选择服务专员"
padding=
"20rpx 28rpx"
right-icon=
"arrow-down"
:disabled=
"true"
@
click=
"saleVisable=true"
required
>
</u-field>
</view>
<view
class=
"flight-card q-mt-md"
>
<view
class=
"title"
>
<text>
优惠券
</text>
</view>
<view
class=
"q-mt-md row items-center"
>
<view
style=
"font-size: 12px;width:1px;flex:1"
>
请选择优惠券
</view>
<view
style=
"display: flex;align-items: center;"
>
<text
style=
"color:#F20707;font-size: 12px;"
@
click=
"showCouponHandler"
>
<text
style=
"flex: 1;"
v-if=
"useCouponId == 0 &&couponList.length>0"
>
{{
couponList
.
length
}}
张可用优惠券
</text>
<text
class=
"content"
style=
"color:grey"
v-else-if=
"couponList.length==0"
>
暂无优惠券
</text>
<text
class=
"content"
v-else
:style=
"
{ color: mainColor }">已优惠
{{
currentCoupon
.
discountMoney
}}
元
</text>
</text>
<u-icon
name=
"arrow"
:size=
"32"
color=
"#111"
v-if=
"couponList.length>0"
></u-icon>
</view>
</view>
</view>
<view
class=
"flight-card q-mt-md"
>
<view
class=
"title"
>
<text>
订单金额
</text>
</view>
<view
class=
"form-items q-mt-md"
>
<view
class=
"label"
>
在线支付
</view>
<view
class=
"val f14 regular"
style=
"text-align: right"
>
<text
style=
"margin-right: 30rpx"
>
{{
guest
.
length
}}
人
</text>
<text
class=
"red"
>
¥
{{
price
}}
</text>
</view>
</view>
<view
class=
"form-items"
style=
"border-bottom: none"
>
<view
class=
"label"
>
明细
</view>
</view>
<view
v-if=
"crCount>0"
class=
"row items-center price-list-details"
>
<view
class=
"col"
>
<text
style=
"margin-right: 30rpx"
>
成人
</text>
</view>
<view>
{{
crCount
}}
人 × ¥
<!-- #ifdef MP-DI-->
{{
flight
.
B2CPrice
}}
<!-- #endif-->
<!-- #ifdef MP-AG-->
{{
flight
.
B2BPrice
}}
<!-- #endif -->
</view>
</view>
<view
v-if=
"etCount>0"
class=
"row items-center price-list-details"
>
<view
class=
"col"
>
<text
style=
"margin-right: 30rpx"
>
儿童
</text>
</view>
<view>
{{
etCount
}}
人 × ¥
<!-- #ifdef MP-DI-->
{{
flight
.
B2CPrice
}}
<!-- #endif-->
<!-- #ifdef MP-AG-->
{{
flight
.
B2BPrice
}}
<!-- #endif -->
</view>
</view>
<view
v-if=
"babyCount>0"
class=
"row items-center price-list-details"
>
<view
class=
"col"
>
<text
style=
"margin-right: 30rpx"
>
婴儿
</text>
</view>
<view>
{{
babyCount
}}
人 × ¥
{{
babyPrice
}}
</view>
</view>
<view
v-if=
"useCouponId.length>0"
class=
"row items-center price-list-details"
:style=
"
{color:mainColor}">
<view
class=
"col"
>
<text
style=
"margin-right: 30rpx"
>
优惠券
</text>
</view>
<view>
-¥
{{
currentCoupon
.
discountMoney
}}
</view>
</view>
<view
class=
"row items-center price-list-details"
>
<view
class=
"col"
>
<text
style=
"margin-right: 30rpx"
>
合计
</text>
</view>
<view>
¥
{{
(
price
-
currentCoupon
.
discountMoney
>
0
?
price
-
currentCoupon
.
discountMoney
:
0
)
}}
</view>
</view>
</view>
</scroll-view>
<view
class=
"order-box"
v-if=
"flight && !loading && !statusVisible"
>
<view
class=
"flight-card order-preview row items-center"
>
<view
class=
"col"
style=
"color: #ff3166; font-weight: bold"
>
<text
style=
"font-size: 22rpx"
>
¥
</text>
<text
v-if=
"crCount+etCount+babyCount>0"
style=
"font-size: 40rpx; margin: 0 20rpx 0 5rpx;font-family: nav-font;"
>
{{
(
price
-
currentCoupon
.
discountMoney
).
toFixed
(
2
)
}}
</text>
<text
style=
"font-size: 40rpx; margin: 0 20rpx 0 5rpx;font-family: nav-font;"
v-else
>
--
</text>
<text
style=
"color: #6e6e6e; font-size: 24rpx;font-family: microsoft yahei ui light;"
>
共计
{{
guest
.
length
}}
人
</text>
</view>
<button
class=
"jz_OrderReNow"
@
click=
"orderHandler"
:disabled=
"submit"
:loading=
"submit"
>
立即预定
</button>
</view>
<view
class=
"order-box"
v-if=
"flight && !loading && !statusVisible"
>
<view
class=
"flight-card order-preview row items-center"
>
<view
class=
"col"
style=
"color: #ff3166; font-weight: bold"
>
<text
style=
"font-size: 22rpx"
>
¥
</text>
<text
v-if=
"crCount+etCount+babyCount>0"
style=
"font-size: 40rpx; margin: 0 20rpx 0 5rpx;font-family: nav-font;"
>
{{
(
price
-
currentCoupon
.
discountMoney
).
toFixed
(
2
)
}}
</text>
<text
style=
"font-size: 40rpx; margin: 0 20rpx 0 5rpx;font-family: nav-font;"
v-else
>
--
</text>
<text
style=
"color: #6e6e6e; font-size: 24rpx;font-family: microsoft yahei ui light;"
>
共计
{{
guest
.
length
}}
人
</text>
</view>
<button
class=
"jz_OrderReNow"
@
click=
"orderHandler"
:disabled=
"submit"
:loading=
"submit"
>
立即预定
</button>
</view>
</view>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:price=
"price"
:list=
"couponList"
:current=
"useCouponId"
@
close=
"closeCouponHandler"
></coupon>
<u-picker
mode=
"selector"
v-model=
"saleVisable"
@
confirm=
"setSaleHandle"
:default-selector=
"[0]"
:range=
"sales"
range-key=
"EmName"
></u-picker>
@
close=
"closeCouponHandler"
></coupon>
<u-picker
mode=
"selector"
v-model=
"saleVisable"
@
confirm=
"setSaleHandle"
:default-selector=
"[0]"
:range=
"sales"
range-key=
"EmName"
></u-picker>
<u-modal
:border-radius=
"16"
@
confirm=
"nativageToOrderHandle"
title=
"订单提醒"
content=
"订单创建成功,请您在6小时内完成付款,否则将会被取消."
@
cancel=
"navigatorToHomeHandle"
v-model=
"successVisible"
confirm-text=
'查看订单'
cancel-text=
'返回首页'
confirm-color=
'#DEBF7B'
cancel-color=
'#080A09'
:show-cancel-button=
"true"
></u-modal>
</view>
</
template
>
<
script
>
import
guest
from
'./components/guest/index.vue'
import
coupon
from
'@/components/coupon/index'
;
import
coupon
from
'@/components/coupon/index'
;
import
Flight
from
'./components/flight/Index.vue'
export
default
{
data
()
{
...
...
@@ -215,31 +229,37 @@
},
customer
:
{},
guest
:
[],
mainColor
:
''
,
submit
:
false
,
contactName
:
''
,
contactPhone
:
''
,
successVisible
:
false
,
createBy
:{
EmName
:
''
,
CreateBy
:
0
},
sales
:[],
saleVisable
:
false
,
statusVisible
:
false
,
backVisible
:
false
,
mainColor
:
''
,
submit
:
false
,
contactName
:
''
,
contactPhone
:
''
,
successVisible
:
false
,
createBy
:{
EmName
:
''
,
CreateBy
:
0
},
sales
:[],
saleVisable
:
false
,
statusVisible
:
false
,
backVisible
:
false
,
goVisible
:
false
}
},
components
:
{
guest
,
coupon
,
coupon
,
Flight
},
computed
:
{
price
()
{
if
(
!
this
.
flight
)
return
0
const
p
=
this
.
flight
.
B2BPrice
let
p
=
0
//#ifdef MP-DI
p
=
this
.
flight
.
B2CPrice
//#endif
//#ifdef MP-AG
p
=
this
.
flight
.
B2BPrice
//#endif
if
(
this
.
guest
.
length
==
1
)
return
p
const
f
=
this
.
guest
.
filter
(
x
=>
x
.
year
>
1
).
length
const
b
=
this
.
guest
.
filter
(
x
=>
x
.
year
<
2
).
length
...
...
@@ -248,7 +268,13 @@
},
babyPrice
()
{
if
(
!
this
.
flight
)
return
0
const
p
=
this
.
flight
.
B2BPrice
let
p
=
0
//#ifdef MP-DI
p
=
this
.
flight
.
B2CPrice
//#endif
//#ifdef MP-AG
p
=
this
.
flight
.
B2BPrice
//#endif
let
bp
=
this
.
flight
.
BabyPrecent
bp
=
bp
&&
bp
!=
''
?
(
parseFloat
(
bp
)
/
100.00
)
:
0
...
...
@@ -287,116 +313,128 @@
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
this
.
customer
=
uni
.
getStorageSync
(
"b2b_user"
);
this
.
getUserCouponList
()
this
.
getSalesHandle
()
this
.
getUserCouponList
()
// #ifdef MP-DI
this
.
createBy
.
CreateBy
=
this
.
customer
.
pid
// #endif
// #ifdef MP-AG
this
.
getSalesHandle
()
// #endif
},
methods
:
{
getSalesHandle
(){
const
p
=
{
CustomerId
:
this
.
customer
.
customerId
}
this
.
apipost
(
"b2b_get_GetCustomerCreateByList"
,
p
,(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
sales
=
res
.
data
if
(
this
.
sales
.
length
==
1
)
this
.
createBy
=
this
.
sales
[
0
]
}
},(
err
)
=>
{
});
},
setSaleHandle
(
val
){
this
.
createBy
=
this
.
sales
[
val
[
0
]]
},
nativageToOrderHandle
(){
uni
.
redirectTo
({
url
:
'/pages/airTicket/TicketOrderList'
})
},
orderHandler
(){
if
(
this
.
submit
)
return
const
error
=
this
.
validate
()
if
(
error
!=
''
){
uni
.
showToast
({
icon
:
'none'
,
title
:
error
})
return
}
this
.
submit
=
true
const
p
=
this
.
createParameter
()
this
.
apipost
(
'sellorder_post_SetOrderInfoForAirTicket'
,
p
,
r
=>
{
if
(
r
.
resultCode
==
1
){
this
.
successVisible
=
true
}
else
{
uni
.
showToast
({
icon
:
'error'
,
title
:
r
.
message
})
}
this
.
submit
=
false
},
e
=>
{
this
.
submit
=
false
})
},
validate
(){
let
msg
=
''
if
(
this
.
crCount
+
this
.
etCount
+
this
.
babyCount
==
0
){
msg
=
'请选择乘机人'
}
else
if
(
this
.
crCount
+
this
.
etCount
>
this
.
flight
.
B2BSellNum
){
msg
=
'机位数不足'
}
else
if
(
this
.
crCount
==
0
){
msg
=
'不支持儿童或婴儿单独出游'
}
else
if
(
this
.
price
-
this
.
currentCoupon
.
discountMoney
<=
0
){
msg
=
'机票价格异常,无法生成订单'
}
else
if
(
this
.
contactName
==
''
){
msg
=
'请输入联系人名称'
}
else
if
(
this
.
contactPhone
==
''
||
this
.
contactPhone
.
length
!=
11
){
msg
=
'请输入11位联系电话'
}
else
if
(
this
.
createBy
.
CreateBy
==
0
){
msg
=
'请选择与你对接的服务人员'
}
return
msg
},
createParameter
(){
const
mallUser
=
uni
.
getStorageSync
(
'mall_UserInfo'
)
const
list
=
this
.
guest
.
map
(
x
=>
{
const
n
=
{
SurName
:
x
.
SurName
,
Name
:
x
.
GivenName
,
Sex
:
x
.
Sex
==
'M'
?
1
:
2
,
PassportNo
:
x
.
Passport
,
PassportExpiry
:
x
.
PassportExpired
,
Birthday
:
x
.
BrithDay
,
MobilePhone
:
x
.
Mobile
,
Nationality
:
x
.
CountryId
}
return
n
})
const
p
=
{
OrderId
:
0
,
TCID
:
this
.
id
,
CustomerType
:
2
,
GroupType
:
5
,
ContactName
:
this
.
contactName
,
ContactMobile
:
this
.
contactPhone
,
CustomerId
:
this
.
customer
.
customerId
,
OrderSource
:
5
,
Unit_Price
:
this
.
flight
.
B2BPrice
,
TC_Price
:
this
.
flight
.
B2BPrice
,
CouponAllotIds
:
this
.
useCouponId
.
join
(
','
),
ManNum
:
this
.
crCount
,
ChirdNum
:
this
.
etCount
,
ChirdNeedBedNum
:
this
.
etCount
,
BabyNum
:
this
.
babyCount
,
PreferPrice
:
this
.
price
,
YSeatNum
:
this
.
crCount
+
this
.
etCount
,
GuestNum
:
this
.
crCount
+
this
.
etCount
+
this
.
babyCount
,
PlaceOrderFrom
:
2
,
MiniAppUserId
:
mallUser
.
UserId
,
DirectCustomerId
:
0
,
EnterID
:
0
,
GuestList
:
list
,
CreateBy
:
this
.
createBy
.
CreateBy
}
return
p
methods
:
{
getSalesHandle
(){
const
p
=
{
CustomerId
:
this
.
customer
.
customerId
}
this
.
apipost
(
"b2b_get_GetCustomerCreateByList"
,
p
,(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
sales
=
res
.
data
if
(
this
.
sales
.
length
==
1
)
this
.
createBy
=
this
.
sales
[
0
]
}
},(
err
)
=>
{
});
},
setSaleHandle
(
val
){
this
.
createBy
=
this
.
sales
[
val
[
0
]]
},
nativageToOrderHandle
(){
uni
.
redirectTo
({
url
:
'/pages/airTicket/TicketOrderList'
})
},
orderHandler
(){
if
(
this
.
submit
)
return
const
error
=
this
.
validate
()
if
(
error
!=
''
){
uni
.
showToast
({
icon
:
'none'
,
title
:
error
})
return
}
this
.
submit
=
true
const
p
=
this
.
createParameter
()
this
.
apipost
(
'sellorder_post_SetOrderInfoForAirTicket'
,
p
,
r
=>
{
if
(
r
.
resultCode
==
1
){
this
.
successVisible
=
true
}
else
{
uni
.
showToast
({
icon
:
'error'
,
title
:
r
.
message
})
}
this
.
submit
=
false
},
e
=>
{
this
.
submit
=
false
})
},
validate
(){
let
msg
=
''
if
(
this
.
crCount
+
this
.
etCount
+
this
.
babyCount
==
0
){
msg
=
'请选择乘机人'
}
else
if
(
this
.
crCount
+
this
.
etCount
>
this
.
flight
.
B2BSellNum
){
msg
=
'机位数不足'
}
else
if
(
this
.
crCount
==
0
){
msg
=
'不支持儿童或婴儿单独出游'
}
else
if
(
this
.
price
-
this
.
currentCoupon
.
discountMoney
<=
0
){
msg
=
'机票价格异常,无法生成订单'
}
else
if
(
this
.
contactName
==
''
){
msg
=
'请输入联系人名称'
}
else
if
(
this
.
contactPhone
==
''
||
this
.
contactPhone
.
length
!=
11
){
msg
=
'请输入11位联系电话'
}
else
if
(
this
.
createBy
.
CreateBy
==
0
){
msg
=
'请选择与你对接的服务人员'
}
return
msg
},
createParameter
(){
const
mallUser
=
uni
.
getStorageSync
(
'mall_UserInfo'
)
const
list
=
this
.
guest
.
map
(
x
=>
{
const
n
=
{
SurName
:
x
.
SurName
,
Name
:
x
.
GivenName
,
Sex
:
x
.
Sex
==
'M'
?
1
:
2
,
PassportNo
:
x
.
Passport
,
PassportExpiry
:
x
.
PassportExpired
,
Birthday
:
x
.
BrithDay
,
MobilePhone
:
x
.
Mobile
,
Nationality
:
x
.
CountryId
}
return
n
})
let
PriceNum
=
0
//#ifdef MP-DI
PriceNum
=
this
.
flight
.
B2CPrice
//#endif
//#ifdef MP-AG
PriceNum
=
this
.
flight
.
B2CPrice
//#endif
const
p
=
{
OrderId
:
0
,
TCID
:
this
.
id
,
CustomerType
:
2
,
GroupType
:
5
,
ContactName
:
this
.
contactName
,
ContactMobile
:
this
.
contactPhone
,
CustomerId
:
this
.
customer
.
customerId
,
OrderSource
:
5
,
Unit_Price
:
PriceNum
,
TC_Price
:
PriceNum
,
CouponAllotIds
:
this
.
useCouponId
.
join
(
','
),
ManNum
:
this
.
crCount
,
ChirdNum
:
this
.
etCount
,
ChirdNeedBedNum
:
this
.
etCount
,
BabyNum
:
this
.
babyCount
,
PreferPrice
:
this
.
price
,
YSeatNum
:
this
.
crCount
+
this
.
etCount
,
GuestNum
:
this
.
crCount
+
this
.
etCount
+
this
.
babyCount
,
PlaceOrderFrom
:
2
,
MiniAppUserId
:
mallUser
.
UserId
,
DirectCustomerId
:
0
,
EnterID
:
0
,
GuestList
:
list
,
CreateBy
:
this
.
createBy
.
CreateBy
}
return
p
},
showCouponHandler
()
{
this
.
showCoupon
=
this
.
couponList
.
length
>
0
;
...
...
@@ -404,22 +442,22 @@
guestChangeHandle
(
val
)
{
this
.
guest
=
val
?
val
:
[]
},
closeCouponHandler
(
e
)
{
this
.
useCouponId
=
[]
closeCouponHandler
(
e
)
{
this
.
useCouponId
=
[]
this
.
currentCoupon
.
discountMoney
=
0
if
(
e
!=
-
1
)
{
this
.
useCouponId
=
e
;
if
(
this
.
useCouponId
.
length
>
0
)
{
const
cp
=
this
.
couponList
.
filter
(
x
=>
this
.
useCouponId
.
indexOf
(
x
.
id
)
!=-
1
)
if
(
this
.
useCouponId
.
length
>
0
)
{
const
cp
=
this
.
couponList
.
filter
(
x
=>
this
.
useCouponId
.
indexOf
(
x
.
id
)
!=-
1
)
if
(
cp
.
length
>
0
){
cp
.
forEach
(
x
=>
{
if
(
x
.
couponsType
==
1
)
{
this
.
currentCoupon
.
discountMoney
+=
x
.
denomination
}
else
{
this
.
currentCoupon
.
discountMoney
+=
parseFloat
((
parseFloat
(
this
.
price
)
*
(
1
-
parseFloat
(
x
.
denomination
/
10
))).
toFixed
(
2
))
}
})
if
(
cp
.
length
>
0
){
cp
.
forEach
(
x
=>
{
if
(
x
.
couponsType
==
1
)
{
this
.
currentCoupon
.
discountMoney
+=
x
.
denomination
}
else
{
this
.
currentCoupon
.
discountMoney
+=
parseFloat
((
parseFloat
(
this
.
price
)
*
(
1
-
parseFloat
(
x
.
denomination
/
10
))).
toFixed
(
2
))
}
})
}
}
}
...
...
@@ -578,13 +616,13 @@
background-repeat
:
no-repeat
;
height
:
100vh
;
width
:
100vw
;
padding-top
:
30
rpx
;
padding-top
:
30
rpx
;
}
.f-detail
.safeBottom
{
/* background-color: #f5f5f5; */
padding-bottom
:
calc
(
156
rpx
+
constant
(
safe-area-inset-bottom
));
padding-bottom
:
calc
(
156
rpx
+
env
(
safe-area-inset-bottom
));
.f-detail
.safeBottom
{
/* background-color: #f5f5f5; */
padding-bottom
:
calc
(
156
rpx
+
constant
(
safe-area-inset-bottom
));
padding-bottom
:
calc
(
156
rpx
+
env
(
safe-area-inset-bottom
));
}
.f-detail
.flight-card
{
background-color
:
#fff
;
...
...
@@ -665,24 +703,24 @@
padding-bottom
:
calc
(
constant
(
safe-area-inset-bottom
));
padding-bottom
:
calc
(
env
(
safe-area-inset-bottom
));
min-height
:
156
rpx
;
min-height
:
156
rpx
;
background
:
#F5F5F5
;
}
.f-detail
.order-box
.order-preview
{
margin
:
0
16px
;
padding
:
10
rpx
;
box-shadow
:
0
0
40
rpx
#00000033
;
}
.f-detail
.jz_OrderReNow
{
height
:
80
rpx
;
background-color
:
#111111
;
text-align
:
center
;
line-height
:
80
rpx
;
color
:
#fff
;
font-weight
:
600
;
font-size
:
28
rpx
;
border-radius
:
16
rpx
;
}
}
.f-detail
.order-box
.order-preview
{
margin
:
0
16px
;
padding
:
10
rpx
;
box-shadow
:
0
0
40
rpx
#00000033
;
}
.f-detail
.jz_OrderReNow
{
height
:
80
rpx
;
background-color
:
#111111
;
text-align
:
center
;
line-height
:
80
rpx
;
color
:
#fff
;
font-weight
:
600
;
font-size
:
28
rpx
;
border-radius
:
16
rpx
;
}
</
style
>
\ No newline at end of file
pages/airTicket/ticketList/ticketList.vue
View file @
6e29e93c
<
template
>
<view
style=
"height: 100vh;background-color: #F3F1EF;"
class=
"flight-list column"
>
<
template
>
<view
style=
"height: 100vh;background-color: #F3F1EF;"
class=
"flight-list column"
>
<chosen-city
:enable-all=
"false"
:padding-top=
"`$
{barHeight}px`" @closed="resetCityVisible=false" @change="setNewCitiesHandle" :value="chosenResult" v-if="resetCityVisible">
</chosen-city>
<view
class=
"nav-box row items-center"
:style=
"
{paddingTop:barHeight+'px',height:(barHeight+44)+'px'}">
<view
class=
"home-btn row items-center"
@
click=
"goBackHandle"
>
<u-icon
name=
"arrowleft"
custom-prefix=
"tffont"
color=
"#111"
size=
"34"
style=
"font-weight: bolder;"
></u-icon>
</view>
<view
class=
"home-btn row items-center"
@
click=
"goHomeHandle"
>
<u-icon
name=
"home_1"
custom-prefix=
"tffont"
color=
"#111"
size=
"38"
style=
"font-weight: bolder;"
></u-icon>
</view>
<view
class=
"title row items-center justify-center"
@
click=
"resetCityVisible=true"
>
<text>
{{
chosenResult
[
0
].
Name
}}
</text>
<view
style=
"margin:0 20rpx"
>
<u-icon
name=
"wangfan1"
custom-prefix=
"tffont"
color=
"#00000066"
size=
"36"
></u-icon>
</view>
<text>
{{
chosenResult
[
1
].
Name
}}
</text>
<u-icon
class=
"q-ml-sm"
name=
'arrow_down'
custom-prefix=
"tffont"
color=
"#00000066"
size=
"32"
></u-icon>
</view>
</view>
<view
class=
"column items-center justify-center q-mt-md"
v-if=
"loadingLow"
>
<u-loading
mode=
"circle"
size=
"40"
></u-loading>
<view
class=
"normal-label text-center q-mt-sm"
>
正在加载信息
</view>
</view>
<view
style=
"margin:10vh 0"
class=
"text-center"
v-else-if=
"lowData.length==0"
>
<u-empty
mode=
"data"
></u-empty>
</view>
<template
v-else
>
<view
class=
"time-list row"
style=
"padding:0 12rpx;"
>
<scroll-view
:scroll-left=
"scrollLeft"
scroll-x
class=
"col header-scroll"
style=
"padding:12rpx 0;width:1px;"
>
<view
class=
"row items-center"
>
<view
class=
"time-item"
:id=
"'a'+x.FlightDate.replaceAll('-','')"
@
click=
"flightDateChangeHandle(x.FlightDate)"
:class=
"
{'active':currentDate==x.FlightDate}" v-for="(x,i) in lowHeadData" :key="i">
<view
class=
""
>
{{
x
.
FlightDate
.
split
(
'-'
).
splice
(
1
,
2
).
join
(
'-'
)
}}
</view>
<view
style=
"margin: 10rpx 0;"
>
{{
x
.
WeekDayStr
}}
</view>
<view
class=
""
>
¥
{{
x
.
B2BPrice
}}
</view>
</view>
</view>
<view
class=
"nav-box row items-center"
:style=
"
{paddingTop:barHeight+'px',height:(barHeight+44)+'px'}">
<view
class=
"home-btn row items-center"
@
click=
"goBackHandle"
>
<u-icon
name=
"arrowleft"
custom-prefix=
"tffont"
color=
"#111"
size=
"34"
style=
"font-weight: bolder;"
></u-icon>
</view>
<view
class=
"home-btn row items-center"
@
click=
"goHomeHandle"
>
<u-icon
name=
"home_1"
custom-prefix=
"tffont"
color=
"#111"
size=
"38"
style=
"font-weight: bolder;"
></u-icon>
</view>
<view
class=
"title row items-center justify-center"
@
click=
"resetCityVisible=true"
>
<text>
{{
chosenResult
[
0
].
Name
}}
</text>
<view
style=
"margin:0 20rpx"
>
<u-icon
name=
"wangfan1"
custom-prefix=
"tffont"
color=
"#00000066"
size=
"36"
></u-icon>
</view>
<text>
{{
chosenResult
[
1
].
Name
}}
</text>
<u-icon
class=
"q-ml-sm"
name=
'arrow_down'
custom-prefix=
"tffont"
color=
"#00000066"
size=
"32"
></u-icon>
</view>
</view>
<view
class=
"column items-center justify-center q-mt-md"
v-if=
"loadingLow"
>
<u-loading
mode=
"circle"
size=
"40"
></u-loading>
<view
class=
"normal-label text-center q-mt-sm"
>
正在加载信息
</view>
</view>
<view
style=
"margin:10vh 0"
class=
"text-center"
v-else-if=
"lowData.length==0"
>
<u-empty
mode=
"data"
></u-empty>
</view>
<template
v-else
>
<view
class=
"time-list row"
style=
"padding:0 12rpx;"
>
<scroll-view
:scroll-left=
"scrollLeft"
scroll-x
class=
"col header-scroll"
style=
"padding:12rpx 0;width:1px;"
>
<view
class=
"row items-center"
>
<view
class=
"time-item"
:id=
"'a'+x.FlightDate.replaceAll('-','')"
@
click=
"flightDateChangeHandle(x.FlightDate)"
:class=
"
{'active':currentDate==x.FlightDate}" v-for="(x,i) in lowHeadData" :key="i">
<view
class=
""
>
{{
x
.
FlightDate
.
split
(
'-'
).
splice
(
1
,
2
).
join
(
'-'
)
}}
</view>
<view
style=
"margin: 10rpx 0;"
>
{{
x
.
WeekDayStr
}}
</view>
<view
class=
""
>
¥
<!-- #ifdef MP-DI-->
{{
x
.
B2CPrice
}}
<!-- #endif-->
<!-- #ifdef MP-AG-->
{{
x
.
B2BPrice
}}
<!-- #endif -->
</view>
</view>
</view>
</scroll-view>
<view
class=
"time-item more row items-center justify-center"
>
<date-select
:display-list=
"dateDisplay"
@
change=
"dateFilterChange"
:default-value=
"[filterDate.start,filterDate.end]"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638753835239709518.png"
mode=
"widthFix"
style=
"width: 30rpx;max-height: 60px;"
></image>
</date-select>
</view>
</view>
</view>
</view>
<view
class=
"filter-list"
>
<view
class=
"filter-items col"
@
click=
"sortChangeHandle(x.id)"
:class=
"
{'active':x.id==sortBy}" v-for="(x,i) in sortList" :key="i">
{{
x
.
name
}}
</view>
</view>
...
...
@@ -135,7 +142,14 @@
<view>
<view
class=
"price"
>
<text>
¥
</text>
<text
class=
"big"
>
{{x.B2BPrice}}
</text>
<text
class=
"big"
>
<!-- #ifdef MP-DI-->
{{x.B2CPrice}}
<!-- #endif-->
<!-- #ifdef MP-AG-->
{{x.B2BPrice}}
<!-- #endif -->
</text>
</view>
<view
class=
"num row items-center"
>
<text
style=
"padding: 6rpx;width: 56rpx;"
class=
"text-center"
>
余
</text>
...
...
@@ -147,58 +161,58 @@
</view>
</view>
</scroll-view>
</template>
</template>
</view>
</template>
</view>
</template>
<
script
>
import
DateSelect
from
'../components/time/DateSelect.vue'
;
import
ChosenCity
from
'../components/address/ChosenCity.vue'
;
export
default
{
data
()
{
return
{
barHeight
:
0
,
currentDate
:
''
,
import
ChosenCity
from
'../components/address/ChosenCity.vue'
;
export
default
{
data
()
{
return
{
barHeight
:
0
,
currentDate
:
''
,
lowData
:
[],
lowHeadData
:
[],
dateRangeValue
:
{
type
:
0
,
startDate
:
''
,
fuzzy
:
{
fuzzyType
:
0
,
fuzzyTypeName
:
''
,
weeks
:
[],
dayRangStatus
:
false
,
dayRange
:
[
4
,
10
]
},
formatStartDate
:
'任意时间出发'
lowHeadData
:
[],
dateRangeValue
:
{
type
:
0
,
startDate
:
''
,
fuzzy
:
{
fuzzyType
:
0
,
fuzzyTypeName
:
''
,
weeks
:
[],
dayRangStatus
:
false
,
dayRange
:
[
4
,
10
]
},
formatStartDate
:
'任意时间出发'
},
resetCityVisible
:
false
,
chosenResult
:
[{
type
:
0
,
ID
:
0
,
Name
:
'全部城市'
},
{
type
:
1
,
ID
:
0
,
Name
:
'全部城市'
}
],
loadingLow
:
false
,
parementers
:
{
StartDate
:
''
,
EndDate
:
''
,
DepartCityId
:
0
,
ArriveCityId
:
0
,
AirLineID
:
0
,
groupId
:
2
,
TicketType
:
2
,
StartPlayDay
:
0
,
EndPlayDay
:
0
,
WeekDay
:
''
},
resetCityVisible
:
false
,
chosenResult
:
[{
type
:
0
,
ID
:
0
,
Name
:
'全部城市'
},
{
type
:
1
,
ID
:
0
,
Name
:
'全部城市'
}
],
loadingLow
:
false
,
parementers
:
{
StartDate
:
''
,
EndDate
:
''
,
DepartCityId
:
0
,
ArriveCityId
:
0
,
AirLineID
:
0
,
groupId
:
2
,
TicketType
:
2
,
StartPlayDay
:
0
,
EndPlayDay
:
0
,
WeekDay
:
''
},
sortBy
:
0
,
scrollLeft
:
0
,
sortList
:[
...
...
@@ -212,7 +226,7 @@
end
:
''
},
dateDisplay
:{}
}
}
},
components
:{
DateSelect
,
ChosenCity
},
computed
:
{
...
...
@@ -221,31 +235,31 @@
let
filteredFlights
=
this
.
lowData
.
filter
(
flight
=>
flight
.
FlightDate
===
this
.
currentDate
);
return
this
.
applySorting
(
filteredFlights
);
}
},
created
()
{
if
(
uni
.
getStorageSync
(
'scf'
))
{
const
s
=
uni
.
getStorageSync
(
'scf'
)
this
.
dateRangeValue
=
s
.
dateRange
this
.
chosenResult
=
s
.
cities
}
this
.
chosenResult
.
sort
((
a
,
b
)
=>
{
return
a
.
type
-
b
.
type
;
});
this
.
getTopLowTicketHandle
()
},
created
()
{
if
(
uni
.
getStorageSync
(
'scf'
))
{
const
s
=
uni
.
getStorageSync
(
'scf'
)
this
.
dateRangeValue
=
s
.
dateRange
this
.
chosenResult
=
s
.
cities
}
this
.
chosenResult
.
sort
((
a
,
b
)
=>
{
return
a
.
type
-
b
.
type
;
});
this
.
getTopLowTicketHandle
()
},
onLoad
(
options
)
{
if
(
options
.
dv
){
this
.
currentDate
=
decodeURIComponent
(
options
.
dv
)
}
},
mounted
()
{
let
that
=
this
uni
.
getSystemInfo
({
success
(
r
)
{
that
.
barHeight
=
r
.
statusBarHeight
},
});
},
},
mounted
()
{
let
that
=
this
uni
.
getSystemInfo
({
success
(
r
)
{
that
.
barHeight
=
r
.
statusBarHeight
},
});
},
methods
:
{
nativageToOrderHandle
(
id
){
uni
.
navigateTo
({
...
...
@@ -253,18 +267,23 @@
})
},
applySorting
(
flights
)
{
switch
(
this
.
sortBy
)
{
case
0
:
return
flights
.
sort
((
a
,
b
)
=>
new
Date
(
`
${
a
.
FlightDate
}
${
a
.
FlightList
[
0
].
Departure_time
}
`
)
-
new
Date
(
`
${
b
.
FlightDate
}
${
b
.
FlightList
[
0
].
Departure_time
}
`
));
case
1
:
return
flights
.
sort
((
a
,
b
)
=>
this
.
getFlightDuration
(
a
)
-
this
.
getFlightDuration
(
b
));
case
2
:
return
flights
.
sort
((
a
,
b
)
=>
a
.
B2BPrice
-
b
.
B2BPrice
);
case
3
:
return
flights
.
filter
(
flight
=>
flight
.
GoFlightList
.
length
===
1
&&
flight
.
BackFlightList
.
length
===
1
);
default
:
return
flights
;
}
switch
(
this
.
sortBy
)
{
case
0
:
return
flights
.
sort
((
a
,
b
)
=>
new
Date
(
`
${
a
.
FlightDate
}
${
a
.
FlightList
[
0
].
Departure_time
}
`
)
-
new
Date
(
`
${
b
.
FlightDate
}
${
b
.
FlightList
[
0
].
Departure_time
}
`
));
case
1
:
return
flights
.
sort
((
a
,
b
)
=>
this
.
getFlightDuration
(
a
)
-
this
.
getFlightDuration
(
b
));
case
2
:
// #ifdef MP-DI
return
flights
.
sort
((
a
,
b
)
=>
a
.
B2CPrice
-
b
.
B2CPrice
);
// #endif
// #ifdef MP-AG
return
flights
.
sort
((
a
,
b
)
=>
a
.
B2BPrice
-
b
.
B2BPrice
);
// #endif
case
3
:
return
flights
.
filter
(
flight
=>
flight
.
GoFlightList
.
length
===
1
&&
flight
.
BackFlightList
.
length
===
1
);
default
:
return
flights
;
}
},
getFlightDuration
(
flight
)
{
const
duration
=
(
flight
.
DepartureTime
.
Days
*
24
*
60
)
+
(
flight
.
DepartureTime
.
Hours
*
60
)
+
flight
.
DepartureTime
.
Minutes
;
...
...
@@ -300,83 +319,83 @@
},
easeInOutQuad
(
t
)
{
return
t
<
0.5
?
2
*
t
*
t
:
-
1
+
(
4
-
2
*
t
)
*
t
;
},
resolveParameterHanle
()
{
this
.
resetParameterHandle
()
this
.
parementers
.
DepartCityId
=
this
.
chosenResult
[
0
].
ID
this
.
parementers
.
ArriveCityId
=
this
.
chosenResult
[
1
].
ID
if
(
this
.
dateRangeValue
.
type
==
1
)
{
},
resolveParameterHanle
()
{
this
.
resetParameterHandle
()
this
.
parementers
.
DepartCityId
=
this
.
chosenResult
[
0
].
ID
this
.
parementers
.
ArriveCityId
=
this
.
chosenResult
[
1
].
ID
if
(
this
.
dateRangeValue
.
type
==
1
)
{
this
.
currentDate
=
this
.
formatDateHandle
(
start
)
this
.
filterDate
.
start
=
this
.
dateRangeValue
.
startDate
this
.
filterDate
.
end
=
this
.
dateRangeValue
.
startDate
}
else
{
const
d
=
this
.
resolveDateByFuzzyHandle
(
this
.
dateRangeValue
.
fuzzy
.
fuzzyType
)
this
.
parementers
.
StartDate
=
''
this
.
filterDate
.
end
=
this
.
dateRangeValue
.
startDate
}
else
{
const
d
=
this
.
resolveDateByFuzzyHandle
(
this
.
dateRangeValue
.
fuzzy
.
fuzzyType
)
this
.
parementers
.
StartDate
=
''
this
.
parementers
.
EndDate
=
''
this
.
filterDate
.
start
=
d
[
0
]
this
.
filterDate
.
end
=
d
[
1
]
}
},
resetParameterHandle
()
{
this
.
currentDate
=
''
this
.
parementers
=
{
StartDate
:
''
,
EndDate
:
''
,
DepartCityId
:
0
,
ArriveCityId
:
0
,
AirLineID
:
0
,
groupId
:
2
,
TicketType
:
2
,
StartPlayDay
:
0
,
EndPlayDay
:
0
,
WeekDay
:
''
}
},
resolveDateByFuzzyHandle
(
t
)
{
if
(
t
==
0
)
return
[
''
,
''
]
let
start
=
new
Date
();
let
end
=
new
Date
()
if
(
t
==
-
1
)
{
start
.
setTime
(
start
.
getTime
()
+
3600
*
1000
*
24
*
1
);
end
.
setMonth
(
end
.
getMonth
()
+
1
);
}
else
if
(
t
==
-
2
)
{
start
.
setTime
(
start
.
getTime
()
+
3600
*
1000
*
24
*
1
);
end
.
setMonth
(
end
.
getMonth
()
+
3
)
}
else
{
const
currentDate
=
new
Date
()
currentDate
.
setMonth
(
currentDate
.
getMonth
()
+
t
);
const
year
=
currentDate
.
getFullYear
();
const
month
=
currentDate
.
getMonth
();
start
=
new
Date
(
year
,
month
,
1
);
end
=
new
Date
(
year
,
month
+
1
,
0
);
}
this
.
currentDate
=
this
.
formatDateHandle
(
start
)
return
[
this
.
formatDateHandle
(
start
),
this
.
formatDateHandle
(
end
)]
},
formatDateHandle
(
date
)
{
return
`
${
date
.
getFullYear
()}
-
${
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)}
-
${
String
(
date
.
getDate
()).
padStart
(
2
,
'0'
)}
`
},
getTopLowTicketHandle
()
{
this
.
resolveParameterHanle
()
this
.
lowData
=
[]
this
.
filterDate
.
end
=
d
[
1
]
}
},
resetParameterHandle
()
{
this
.
currentDate
=
''
this
.
parementers
=
{
StartDate
:
''
,
EndDate
:
''
,
DepartCityId
:
0
,
ArriveCityId
:
0
,
AirLineID
:
0
,
groupId
:
2
,
TicketType
:
2
,
StartPlayDay
:
0
,
EndPlayDay
:
0
,
WeekDay
:
''
}
},
resolveDateByFuzzyHandle
(
t
)
{
if
(
t
==
0
)
return
[
''
,
''
]
let
start
=
new
Date
();
let
end
=
new
Date
()
if
(
t
==
-
1
)
{
start
.
setTime
(
start
.
getTime
()
+
3600
*
1000
*
24
*
1
);
end
.
setMonth
(
end
.
getMonth
()
+
1
);
}
else
if
(
t
==
-
2
)
{
start
.
setTime
(
start
.
getTime
()
+
3600
*
1000
*
24
*
1
);
end
.
setMonth
(
end
.
getMonth
()
+
3
)
}
else
{
const
currentDate
=
new
Date
()
currentDate
.
setMonth
(
currentDate
.
getMonth
()
+
t
);
const
year
=
currentDate
.
getFullYear
();
const
month
=
currentDate
.
getMonth
();
start
=
new
Date
(
year
,
month
,
1
);
end
=
new
Date
(
year
,
month
+
1
,
0
);
}
this
.
currentDate
=
this
.
formatDateHandle
(
start
)
return
[
this
.
formatDateHandle
(
start
),
this
.
formatDateHandle
(
end
)]
},
formatDateHandle
(
date
)
{
return
`
${
date
.
getFullYear
()}
-
${
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)}
-
${
String
(
date
.
getDate
()).
padStart
(
2
,
'0'
)}
`
},
getTopLowTicketHandle
()
{
this
.
resolveParameterHanle
()
this
.
lowData
=
[]
this
.
loadingLow
=
true
this
.
dateDisplay
=
{}
this
.
apipost
(
'AirTicket_get_GetTopTicketProduct'
,
this
.
parementers
,
(
r
)
=>
{
if
(
r
.
resultCode
==
1
)
{
this
.
dateDisplay
=
{}
this
.
apipost
(
'AirTicket_get_GetTopTicketProduct'
,
this
.
parementers
,
(
r
)
=>
{
if
(
r
.
resultCode
==
1
)
{
this
.
lowData
=
this
.
formatLowData
(
r
.
data
)
}
this
.
centerSelectedItem
()
this
.
loadingLow
=
false
},
(
e
)
=>
{
this
.
loadingLow
=
false
})
},
formatLowData
(
d
)
{
if
(
!
d
||
d
.
length
==
0
)
return
[]
const
list
=
d
[
0
].
TicketProductList
list
.
sort
((
a
,
b
)
=>
{
return
new
Date
(
a
.
FlightDate
)
-
new
Date
(
b
.
FlightDate
);
this
.
centerSelectedItem
()
this
.
loadingLow
=
false
},
(
e
)
=>
{
this
.
loadingLow
=
false
})
},
formatLowData
(
d
)
{
if
(
!
d
||
d
.
length
==
0
)
return
[]
const
list
=
d
[
0
].
TicketProductList
list
.
sort
((
a
,
b
)
=>
{
return
new
Date
(
a
.
FlightDate
)
-
new
Date
(
b
.
FlightDate
);
})
list
.
forEach
(
x
=>
{
x
.
GoFlightList
=
x
.
FlightList
.
filter
(
f
=>
f
.
FlightType
==
1
)
...
...
@@ -392,18 +411,29 @@
if
(
this
.
lowHeadData
.
length
>
0
&&
this
.
lowHeadData
.
findIndex
(
x
=>
x
.
FlightDate
==
this
.
currentDate
)
==-
1
){
this
.
currentDate
=
this
.
lowHeadData
[
0
].
FlightDate
}
return
list
return
list
},
formatDisplayHandle
(
list
){
this
.
dateDisplay
=
list
.
reduce
((
acc
,
item
)
=>
{
const
arr
=
item
.
FlightDate
.
split
(
'-'
)
const
groupValue
=
`
${
arr
[
0
]}${
Number
(
arr
[
1
])}${
Number
(
arr
[
2
])}
`
;
const
currentPrice
=
item
.
B2BPrice
;
const
currentB2CPrice
=
item
.
B2CPrice
;
if
(
!
acc
[
groupValue
])
{
acc
[
groupValue
]
=
'¥'
+
currentPrice
;
// #ifdef MP-DI
acc
[
groupValue
]
=
'¥'
+
currentB2CPrice
;
// #endif
// #ifdef MP-AG
acc
[
groupValue
]
=
'¥'
+
currentPrice
;
// #endif
}
else
{
acc
[
groupValue
]
=
'¥'
+
Math
.
min
(
parseFloat
(
acc
[
groupValue
].
replaceAll
(
'¥'
,
''
)),
currentPrice
);
// #ifdef MP-DI
acc
[
groupValue
]
=
'¥'
+
Math
.
min
(
parseFloat
(
acc
[
groupValue
].
replaceAll
(
'¥'
,
''
)),
currentB2CPrice
);
// #endif
// #ifdef MP-AG
acc
[
groupValue
]
=
'¥'
+
Math
.
min
(
parseFloat
(
acc
[
groupValue
].
replaceAll
(
'¥'
,
''
)),
currentPrice
);
// #endif
}
return
acc
;
...
...
@@ -425,15 +455,18 @@
const
result
=
d
.
reduce
((
acc
,
item
)
=>
{
const
groupValue
=
item
.
FlightDate
;
const
currentPrice
=
item
.
B2BPrice
;
const
currentB2CPrice
=
item
.
B2CPrice
;
if
(
!
acc
[
groupValue
])
{
acc
[
groupValue
]
=
{
FlightDate
:
groupValue
,
B2BPrice
:
currentPrice
,
B2CPrice
:
currentB2CPrice
,
WeekDayStr
:
item
.
WeekDayStr
};
}
else
{
acc
[
groupValue
].
B2BPrice
=
Math
.
min
(
acc
[
groupValue
].
B2BPrice
,
currentPrice
);
acc
[
groupValue
].
B2CPrice
=
Math
.
min
(
acc
[
groupValue
].
B2CPrice
,
currentB2CPrice
);
}
return
acc
;
...
...
@@ -441,25 +474,25 @@
const
finalResult
=
Object
.
values
(
result
);
return
finalResult
},
formatDateString
(
d
)
{
const
date
=
new
Date
(
d
)
const
weeks
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
]
return
`
${
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)}
.
${
String
(
date
.
getDate
()).
padStart
(
2
,
'0'
)}
周
${
weeks
[
date
.
getDay
()]}
`
//周${weeks[date.getDay()]}
},
goBackHandle
()
{
uni
.
navigateBack
(
-
1
)
},
goHomeHandle
()
{
uni
.
redirectTo
({
url
:
'/pages/index/index'
})
},
formatDateString
(
d
)
{
const
date
=
new
Date
(
d
)
const
weeks
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
]
return
`
${
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)}
.
${
String
(
date
.
getDate
()).
padStart
(
2
,
'0'
)}
周
${
weeks
[
date
.
getDay
()]}
`
//周${weeks[date.getDay()]}
},
goBackHandle
()
{
uni
.
navigateBack
(
-
1
)
},
goHomeHandle
()
{
uni
.
redirectTo
({
url
:
'/pages/index/index'
})
},
flightDateChangeHandle
(
date
){
this
.
currentDate
=
date
this
.
centerSelectedItem
()
},
},
sortChangeHandle
(
id
){
this
.
sortBy
=
id
},
...
...
@@ -492,71 +525,71 @@
this
.
getTopLowTicketHandle
()
this
.
resetCityVisible
=
false
},
}
}
</
script
>
<
style
>
@import
url('../../../asset/css/flex.css')
;
.nav-box
{
height
:
44px
;
/* 这里的44px是示例高度,可根据实际设计调整 */
line-height
:
44px
;
background-color
:
#FFF
;
color
:
#fff
;
width
:
100vw
;
padding-left
:
30
rpx
;
background-color
:
#d4b465
;
}
.nav-box
.home-btn
{
width
:
60
rpx
;
height
:
60
rpx
;
border-radius
:
60
rpx
;
/* border:2rpx solid #ccc; */
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.nav-box
.title
{
font-weight
:
bold
;
font-size
:
32
rpx
;
color
:
#080A09
;
text-align
:
center
;
width
:
calc
(
100vw
-
140px
);
}
}
}
</
script
>
<
style
>
@import
url('../../../asset/css/flex.css')
;
.nav-box
{
height
:
44px
;
/* 这里的44px是示例高度,可根据实际设计调整 */
line-height
:
44px
;
background-color
:
#FFF
;
color
:
#fff
;
width
:
100vw
;
padding-left
:
30
rpx
;
background-color
:
#d4b465
;
}
.nav-box
.home-btn
{
width
:
60
rpx
;
height
:
60
rpx
;
border-radius
:
60
rpx
;
/* border:2rpx solid #ccc; */
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.nav-box
.title
{
font-weight
:
bold
;
font-size
:
32
rpx
;
color
:
#080A09
;
text-align
:
center
;
width
:
calc
(
100vw
-
140px
);
}
.header-scroll
{
transition
:
scroll-left
0.5s
ease
;
}
.time-list
{
background
:
linear-gradient
(
0
,
#eacf8d
,
#d4b465
);
width
:
100%
;
}
.time-list
.time-item
{
padding
:
22
rpx
33
rpx
;
font-size
:
24
rpx
;
color
:
#111
;
line-height
:
1
;
text-align
:
center
;
border-radius
:
16
rpx
;
position
:
relative
;
min-width
:
148
rpx
;
}
.time-list
.time-item
::after
{
position
:
absolute
;
display
:
block
;
right
:
0
;
width
:
1px
;
height
:
60%
;
top
:
20%
;
content
:
' '
;
background-color
:
#FFFFFF33
;
}
}
.time-list
{
background
:
linear-gradient
(
0
,
#eacf8d
,
#d4b465
);
width
:
100%
;
}
.time-list
.time-item
{
padding
:
22
rpx
33
rpx
;
font-size
:
24
rpx
;
color
:
#111
;
line-height
:
1
;
text-align
:
center
;
border-radius
:
16
rpx
;
position
:
relative
;
min-width
:
148
rpx
;
}
.time-list
.time-item
::after
{
position
:
absolute
;
display
:
block
;
right
:
0
;
width
:
1px
;
height
:
60%
;
top
:
20%
;
content
:
' '
;
background-color
:
#FFFFFF33
;
}
.time-list
.time-item.more
::before
{
position
:
absolute
;
left
:
-10
rpx
;
...
...
@@ -567,16 +600,16 @@
background-size
:
auto
100%
;
display
:
block
;
content
:
' '
;
}
.time-list
.time-item.active
{
background-color
:
#e7d9b2
;
font-weight
:
bold
;
margin-left
:
-1px
;
}
.time-list
.time-item.active
::after
,
.time-list
.time-item
:last-child::after
{
display
:
none
;
}
.time-list
.time-item.active
{
background-color
:
#e7d9b2
;
font-weight
:
bold
;
margin-left
:
-1px
;
}
.time-list
.time-item.active
::after
,
.time-list
.time-item
:last-child::after
{
display
:
none
;
}
.filter-list
{
...
...
@@ -596,7 +629,7 @@
}
.filter-list
.filter-items
:last-child
{
margin-right
:
0
;
}
}
.filter-list
.filter-items.active
{
background-color
:
#e7d9b2
;
}
...
...
@@ -753,8 +786,8 @@
margin-top
:
16px
;
font-size
:
25
rpx
;
font-weight
:
400
;
}
/* .nav-box .home-btn:active{
background-color: #ccc;
} */
}
/* .nav-box .home-btn:active{
background-color: #ccc;
} */
</
style
>
\ No newline at end of file
pages/coupon/details/details.vue
View file @
6e29e93c
...
...
@@ -54,8 +54,8 @@
<view
class=
"cdTiaojianBRText"
v-if=
"g.remark&&g.remark!=''"
>
备注:{{ g.remark }}
</view>
</view>
</view>
<view
class=
"cdTiaojianButtom"
v-if=
"type==1"
@
click=
"gouseUrl(
g
)"
>
立即使用
</view>
<view
class=
"cdTiaojianButtom"
v-else
@
click=
"g.couponReceiveCount==0?receive(
g.couponReceiveCount):gouseUrl(g
)"
>
{{ g.couponReceiveCount==0?'立即领取':'立即使用' }}
</view>
<view
class=
"cdTiaojianButtom"
v-if=
"type==1"
@
click=
"gouseUrl()"
>
立即使用
</view>
<view
class=
"cdTiaojianButtom"
v-else
@
click=
"g.couponReceiveCount==0?receive(
):gouseUrl(
)"
>
{{ g.couponReceiveCount==0?'立即领取':'立即使用' }}
</view>
</view>
</view>
...
...
@@ -108,9 +108,9 @@
return
num
},
receive
(
id
){
receive
(){
this
.
apipost
(
"b2c_post_CustomerGrantCoupon"
,
{
Id
:
id
Id
:
this
.
g
.
id
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
...
...
@@ -129,7 +129,7 @@
},
gouseUrl
(
g
)
{
gouseUrl
()
{
uni
.
redirectTo
({
url
:
'/pages/index/index'
});
...
...
pages/jiuzhai/components/sign/index.vue
View file @
6e29e93c
...
...
@@ -305,58 +305,75 @@
for
(
let
i
=
0
;
i
<
this
.
count
;
i
++
)
{
var
days
=
[];
var
week
=
0
;
for
(
var
j
=
0
;
j
<
new
Date
(
year
,
month
+
1
,
0
).
getDate
();
j
++
)
{
let
isexsit
=
false
;
const
m
=
month
+
1
>
9
?
month
+
1
:
"0"
+
(
month
+
1
);
const
d
=
j
+
1
>
9
?
j
+
1
:
"0"
+
(
j
+
1
);
const
ds
=
`
${
year
}
-
${
m
}
-
${
d
}
`
const
price
=
this
.
priceList
.
find
(
p
=>
p
.
startDate
==
ds
)
if
(
price
)
{
isexsit
=
true
if
(
price
.
remainNum
>
0
){
let
priceNum
=
0
// #ifdef MP-DI
priceNum
=
price
.
b2CPrice
/// #endif
// #ifdef MP-AG
priceNum
=
price
.
b2BPrice
/// #endif
days
.
push
(
priceNum
)
// #ifdef MP-DI
for
(
var
j
=
0
;
j
<
new
Date
(
year
,
month
+
1
,
0
).
getDate
();
j
++
)
{
let
isexsit
=
false
;
const
m
=
month
+
1
>
9
?
month
+
1
:
"0"
+
(
month
+
1
);
const
d
=
j
+
1
>
9
?
j
+
1
:
"0"
+
(
j
+
1
);
const
ds
=
`
${
year
}
-
${
m
}
-
${
d
}
`
const
price
=
this
.
priceList
.
find
(
p
=>
p
.
startDate
==
ds
)
if
(
price
)
{
isexsit
=
true
if
(
price
.
remainNum
>
0
){
days
.
push
(
price
.
b2CPrice
)
}
else
if
(
price
.
isSubstitution
==
1
)
days
.
push
(
-
2
)
else
days
.
push
(
-
1
)
}
else
{
days
.
push
(
0
);
}
else
if
(
price
.
isSubstitution
==
1
)
days
.
push
(
-
2
)
else
days
.
push
(
-
1
)
}
else
{
days
.
push
(
0
);
}
console
.
log
(
this
.
priceList
.
length
,
new
Date
(
year
,
month
+
1
,
0
).
getDate
(),
price
)
// for (var k = 0; k
<
this
.
priceList
.
length
;
k
++
)
{
// const x = this.priceList[k];
// console.log(x)
// }
// this.priceList.forEach((x) => {
// let m = month + 1 > 9 ? month + 1 : "0" + (month + 1);
// let d = j + 1 > 9 ? j + 1 : "0" + (j + 1);
// //console.log(x.startDate+'-----'+`${year}-${m}-${d}`)
// if (x.startDate == `${year}-${m}-${d}`) {
// isexsit = true;
// if (x.remainNum > 0) {
// let priceNum = 0
// // #ifdef MP-DI
// priceNum = x.b2CPrice
// // #endif
// // #ifdef MP-AG
// priceNum = x.b2BPrice
// // #endif
// days.push(priceNum);
// //days.push(x.b2CPrice);
// } else {
// days.push(-1);
// }
// }
// });
}
// #endif
// #ifdef MP-AG
for
(
var
j
=
0
;
j
<
new
Date
(
year
,
month
+
1
,
0
).
getDate
();
j
++
)
{
let
isexsit
=
false
;
const
m
=
month
+
1
>
9
?
month
+
1
:
"0"
+
(
month
+
1
);
const
d
=
j
+
1
>
9
?
j
+
1
:
"0"
+
(
j
+
1
);
const
ds
=
`
${
year
}
-
${
m
}
-
${
d
}
`
const
price
=
this
.
priceList
.
find
(
p
=>
p
.
startDate
==
ds
)
if
(
price
)
{
isexsit
=
true
if
(
price
.
remainNum
>
0
){
days
.
push
(
price
.
b2BPrice
)
}
else
if
(
price
.
isSubstitution
==
1
)
days
.
push
(
-
2
)
else
days
.
push
(
-
1
)
}
else
{
days
.
push
(
0
);
}
console
.
log
(
this
.
priceList
.
length
,
new
Date
(
year
,
month
+
1
,
0
).
getDate
(),
price
)
// for (var k = 0; k
<
this
.
priceList
.
length
;
k
++
)
{
// const x = this.priceList[k];
// console.log(x)
// }
// this.priceList.forEach((x) => {
// let m = month + 1 > 9 ? month + 1 : "0" + (month + 1);
// let d = j + 1 > 9 ? j + 1 : "0" + (j + 1);
// //console.log(x.startDate+'-----'+`${year}-${m}-${d}`)
// if (x.startDate == `${year}-${m}-${d}`) {
// isexsit = true;
// if (x.remainNum > 0) {
// let priceNum = 0
// // #ifdef MP-DI
// priceNum = x.b2CPrice
// // #endif
// // #ifdef MP-AG
// priceNum = x.b2BPrice
// // #endif
// days.push(priceNum);
// //days.push(x.b2CPrice);
// } else {
// days.push(-1);
// }
// }
// });
}
// #endif
data
.
push
(
days
);
if
(
month
==
11
)
{
year
+=
1
;
...
...
pages/jiuzhai/jz_LineDetail.vue
View file @
6e29e93c
...
...
@@ -1086,7 +1086,7 @@
<
/view
>
<
view
class
=
"line-flex"
style
=
"padding: 30rpx; background: #fff"
v
-
if
=
"createBy==0&&SaleList&&SaleList.length>1"
@
click
=
"showSalePreviwe=true"
>
<
text
style
=
"font-size: 28rpx; color: #111; font-weight: 500"
>
销售
<
/text
>
<
text
style
=
"font-size: 28rpx; color: #111; font-weight: 500"
>
服务人员
<
/text
>
<
text
style
=
"
font-size: 22rpx;
color: #999;
...
...
@@ -1206,7 +1206,7 @@
<
u
-
popup
v
-
model
=
"showSalePreviwe"
mode
=
"bottom"
border
-
radius
=
"50"
length
=
"60%"
:
safe
-
area
-
inset
-
bottom
=
"true"
>
<
view
>
<
view
style
=
"font-size: 17px;text-align: center;padding: 20px 0;"
>
选择
销售
选择
服务人员
<
/view
>
<
scroll
-
view
scroll
-
x
=
"true"
style
=
"width: 100%;height: 43vh;"
>
<
view
class
=
"SaleBox"
>
...
...
@@ -1426,7 +1426,12 @@
}
)
}
this
.
customer
=
uni
.
getStorageSync
(
"b2b_user"
);
this
.
delMsg
.
customerId
=
this
.
customer
.
customerId
// #ifdef MP-DI
this
.
delMsg
.
directCustomerId
=
this
.
customer
.
customerId
// #endif
// #ifdef MP-AG
this
.
delMsg
.
customerId
=
this
.
customer
.
customerId
// #endif
if
(
!
option
.
scene
)
{
if
(
option
.
lineId
)
{
this
.
delMsg
.
lineId
=
option
.
lineId
;
...
...
@@ -1554,7 +1559,13 @@
this
.
couponList
.
forEach
(
x
=>
{
if
(
x
.
couponsType
==
1
&&
x
.
denomination
>
this
.
maxCouponDiscount
)
this
.
maxCouponDiscount
=
x
.
denomination
if
(
x
.
couponsType
==
2
){
const
disMoney
=
this
.
currentPrice
.
b2BPrice
*
(
1
-
x
.
denomination
)
let
disMoney
=
0
// #ifdef MP-DI
disMoney
=
this
.
currentPrice
.
b2CPrice
*
(
1
-
x
.
denomination
)
// #endif
// #ifdef MP-AG
disMoney
=
this
.
currentPrice
.
b2BPrice
*
(
1
-
x
.
denomination
)
// #endif
this
.
maxCouponDiscount
=
this
.
maxCouponDiscount
<
disMoney
?
disMoney
:
this
.
maxCouponDiscount
}
}
)
...
...
@@ -2023,14 +2034,16 @@
this.is_show_auth = 1;
return;
}
if (this.SaleList&&this.SaleList.length>1&&this.SaleId==0&&this.createBy==0) {
uni.showToast({
title: "请选择销售",
icon: "none",
}
);
this.showSalePreviwe = true;
return;
}
// #ifdef MP-AG
if (this.SaleList&&this.SaleList.length>1&&this.SaleId==0&&this.createBy==0) {
uni.showToast({
title: "请选择服务人员",
icon: "none",
}
);
this.showSalePreviwe = true;
return;
}
// #endif
let myObj = {
}
;
myObj.startCityName = this.dataList.startCityName;
myObj.startDate = this.currentPrice.startDate;
...
...
@@ -2057,7 +2070,15 @@
yeCount: this.yeCount, //婴儿
etbCount: this.etbCount, //儿童不占床
}
;
let createBy = this.createBy>0?this.createBy:this.SaleId
let createBy = 0
// #ifdef MP-DI
createBy = this.createBy>0?this.createBy:this.customer.pid
// #endif
// #ifdef MP-AG
if(this.createBy>0||this.SaleId) createBy = this.createBy>0?this.createBy:this.SaleId
// #endif
let tParams = "&tcid=" +
this.delMsg.tcid +
"&cityId=" +
...
...
pages/jiuzhai/jz_Reserve.vue
View file @
6e29e93c
...
...
@@ -343,34 +343,40 @@
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
成人
</text>
</view>
<view
style=
"text-align: right"
>
{{
orderMsg
.
ManNum
}}
人 × ¥
{{
$utils
.
getretailer
()?
currentPriceInfo
.
b2BPrice
:
currentPriceInfo
.
b2CPrice
}}
</view>
<view
style=
"text-align: right"
>
{{
orderMsg
.
ManNum
}}
人 × ¥
<!-- #ifdef MP-DI -->
{{
currentPriceInfo
.
b2CPrice
}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{
currentPriceInfo
.
b2BPrice
}}
<!-- #endif -->
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:key=
"index"
v-if=
"orderMsg.ChirdNeedBedNum > 0"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
儿童(占床)
</text>
</view>
<view
style=
"text-align: right"
>
{{
orderMsg
.
ChirdNeedBedNum
}}
人 × ¥
{{
(
$utils
.
getretailer
()
?
currentPriceInfo
.
b2BPrice
:
currentPriceInfo
.
b2CPrice
)
+
(
currentPriceInfo
.
childNeedPrice
?
currentPriceInfo
.
childNeedPrice
:
0
)
}}
</view>
<view
style=
"text-align: right"
>
{{
orderMsg
.
ChirdNeedBedNum
}}
人 × ¥
<!-- #ifdef MP-DI -->
{{
currentPriceInfo
.
b2CPrice
+
(
currentPriceInfo
.
childNeedPrice
?
currentPriceInfo
.
childNeedPrice
:
0
)
}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{
currentPriceInfo
.
b2BPrice
+
(
currentPriceInfo
.
childNeedPrice
?
currentPriceInfo
.
childNeedPrice
:
0
)
}}
<!-- #endif -->
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:key=
"index"
v-if=
"orderMsg.ChirdNoBedNum > 0"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
儿童(不占床)
</text>
</view>
<view
style=
"text-align: right"
>
{{
orderMsg
.
ChirdNoBedNum
}}
人 × ¥
{{
(
$utils
.
getretailer
()
?
currentPriceInfo
.
b2BPrice
:
currentPriceInfo
.
b2CPrice
)
-
(
currentPriceInfo
.
childNoNeedPrice
?
currentPriceInfo
.
childNoNeedPrice
:
0
)
}}
</view>
<view
style=
"text-align: right"
>
{{
orderMsg
.
ChirdNoBedNum
}}
人 × ¥
<!-- #ifdef MP-DI -->
{{
currentPriceInfo
.
b2CPrice
-
(
currentPriceInfo
.
childNoNeedPrice
?
currentPriceInfo
.
childNoNeedPrice
:
0
)
}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{
currentPriceInfo
.
b2BPrice
-
(
currentPriceInfo
.
childNoNeedPrice
?
currentPriceInfo
.
childNoNeedPrice
:
0
)
}}
<!-- #endif -->
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:key=
"index"
v-if=
"orderMsg.BabyNum > 0"
>
<view
style=
"flex: 1"
>
...
...
@@ -445,9 +451,15 @@
<text
style=
"color: #6e6e6e; font-size: 24rpx;font-family: microsoft yahei ui light;"
>
共计
{{
total
}}
人
</text>
</view>
<view
style=
"display: flex; margin-top: -2px"
>
<button
class=
"jz_OrderReNow"
@
click=
"goPay()"
:disabled=
"submit"
:loading=
"submit"
>
立即预定
</button>
<button
class=
"jz_OrderReNow"
@
click=
"goPay()"
:disabled=
"submit"
:loading=
"submit"
>
<!-- #ifdef MP-DI -->
立即支付
<!-- #endif -->
<!-- #ifdef MP-AG -->
立即预定
<!-- #endif -->
</button>
</view>
</view>
</view>
...
...
@@ -532,6 +544,7 @@
CreateBy
:
0
,
showPz
:
false
,
pzCoupon
:
null
,
userInfo
:
{},
};
},
created
()
{
...
...
@@ -543,6 +556,7 @@
},
onLoad
(
option
)
{
this
.
customer
=
uni
.
getStorageSync
(
"b2b_user"
);
console
.
log
(
this
.
customer
,
'--------'
);
if
(
option
.
currentPriceInfo
)
{
this
.
currentPriceInfo
=
JSON
.
parse
(
decodeURIComponent
(
option
.
currentPriceInfo
)
...
...
@@ -569,6 +583,74 @@
this
.
getUserCouponList
();
},
methods
:
{
getUserInfoHandler
()
{
this
.
apipost
(
"GetCustomerInfo_post"
,
{
Id
:
this
.
customer
.
customerId
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
userInfo
=
res
.
data
;
console
.
log
(
this
.
userInfo
,
'----'
);
}
});
},
submitB2COrderHandler
(
orderId
)
{
let
productType
=
0
if
(
this
.
currentPriceInfo
.
teamType
==
"0"
)
{
//跟团游
productType
=
2
;
}
else
if
(
this
.
currentPriceInfo
.
teamType
==
"1"
)
{
//小包团
productType
=
10
;
}
else
if
(
this
.
currentPriceInfo
.
teamType
==
"2"
)
{
//当地游
productType
=
8
;
}
let
guestInfo
=
`成人x
${
this
.
orderMsg
.
ManNum
}
; `
;
if
(
this
.
orderMsg
.
ChirdNeedBedNum
>
0
)
{
guestInfo
+=
`占床儿童
${
this
.
orderMsg
.
ChirdNeedBedNum
}
; `
;
}
if
(
this
.
orderMsg
.
ChirdNoBedNum
>
0
)
{
guestInfo
+=
`不占床儿童x
${
this
.
orderMsg
.
ChirdNoBedNum
}
; `
;
}
if
(
this
.
orderMsg
.
BabyNum
>
0
)
{
guestInfo
+=
`婴儿x
${
this
.
orderMsg
.
BabyNum
}
; `
;
}
let
startCityName
=
this
.
realCurrentPriceInfo
.
priceUnion
&&
this
.
realCurrentPriceInfo
.
priceUnion
.
startCityName
?
this
.
realCurrentPriceInfo
.
priceUnion
.
startCityName
:
this
.
currentPriceInfo
.
startCityName
let
msg
=
{
SurName
:
''
,
Name
:
this
.
customer
.
name
,
ContactNumber
:
this
.
customer
.
contactNumber
,
Mailbox
:
''
,
GoodsId
:
this
.
currentPriceInfo
.
tcid
,
GoodsName
:
this
.
currentPriceInfo
.
title
,
GoodsPic
:
this
.
currentPriceInfo
.
CoverImg
?
this
.
currentPriceInfo
.
CoverImg
:
''
,
GoodsType
:
productType
,
OrderMake
:
`
${
this
.
currentPriceInfo
.
startDate
}
从
${
startCityName
}
出发
${
guestInfo
}
`
,
TotalPrice
:
this
.
price
,
PreferentialPrice
:
this
.
currentCoupon
.
discountMoney
,
ErpOrderId
:
orderId
,
Country
:
''
,
PlatformTax
:
0
,
Income
:
0
,
Refund
:
0
,
};
this
.
apipost
(
"AddOrderInfo_post"
,
msg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'订单创建成功'
})
this
.
goPayHandler
(
res
.
data
);
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
,
duration
:
3000
})
}
});
},
goPayHandler
(
pay
)
{
//pay.OrderNo
},
showCouponHandler
()
{
this
.
showCoupon
=
this
.
couponList
.
length
>
0
;
},
...
...
@@ -761,11 +843,12 @@
//计算价格
calcMoney
()
{
var
price
=
0
;
if
(
this
.
$utils
.
getretailer
())
{
price
=
this
.
currentPriceInfo
.
b2BPrice
;
}
else
{
// #ifdef MP-DI
price
=
this
.
currentPriceInfo
.
b2CPrice
;
}
// #endif
// #ifdef MP-AG
price
=
this
.
currentPriceInfo
.
b2BPrice
;
// #endif
this
.
orderMsg
.
ChirdNum
=
parseInt
(
this
.
orderMsg
.
ChirdNoBedNum
)
+
parseInt
(
this
.
orderMsg
.
ChirdNeedBedNum
);
//计算总人数
this
.
total
=
parseInt
(
this
.
orderMsg
.
ManNum
)
+
parseInt
(
this
.
orderMsg
.
ChirdNum
)
+
parseInt
(
this
.
orderMsg
.
BabyNum
);
...
...
@@ -813,37 +896,6 @@
},
//去支付
goPay
()
{
// for (var i = 0; i
<
this
.
GuestList
.
length
;
i
++
)
{
// if (this.GuestList[i].SurName == "") {
// uni.showToast({
// title: `请输入游客${i + 1}的姓名`,
// icon: "none",
// });
// return;
// }
// if (this.GuestList[i].IdCard == "") {
// uni.showToast({
// title: `请输入游客${i + 1}的身份证`,
// icon: "none",
// });
// return;
// }
// if (this.GuestList[i].MobilePhone == "") {
// uni.showToast({
// title: `请输入游客${i + 1}的联系电话`,
// icon: "none",
// });
// return;
// }
// }
if
(
!
this
.
CreateBy
){
uni
.
showToast
({
title
:
`销售为空,请联系销售人员!`
,
icon
:
"none"
,
});
return
}
this
.
submit
=
true
;
this
.
userInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
basedataObj
=
uni
.
getStorageSync
(
"basedata"
).
mall
;
...
...
@@ -866,11 +918,16 @@
var
CustomerType
=
this
.
customer
.
isMember
//4;
var
CustomerCreateBy
=
this
.
customer
.
createBy
;
var
price
=
0
;
if
(
this
.
$utils
.
getretailer
())
{
price
=
this
.
currentPriceInfo
.
b2BPrice
;
}
else
{
var
CreateBy
=
0
var
DirectCustomerId
=
0
// #ifdef MP-DI
price
=
this
.
currentPriceInfo
.
b2CPrice
;
}
DirectCustomerId
=
this
.
CreateBy
// #endif
// #ifdef MP-AG
price
=
this
.
currentPriceInfo
.
b2BPrice
;
CreateBy
=
this
.
CreateBy
// #endif
let
CouponAllotIds
=
''
if
(
this
.
useCouponIds
.
length
>
0
){
CouponAllotIds
=
this
.
useCouponIds
.
join
(
','
)
...
...
@@ -926,8 +983,8 @@
CommissionSharePeople
:
0
,
CommissionShareMoney
:
0
,
MiniAppUserId
:
MiniAppUserId
,
CreateBy
:
this
.
CreateBy
,
//同行联系人创建人 CustomerCreateBy
DirectCustomerId
:
0
,
//直客Id
CreateBy
:
CreateBy
,
//同行联系人创建人 CustomerCreateBy
DirectCustomerId
:
DirectCustomerId
,
//直客Id
// #ifdef MP-WEIXIN
OrderSource
:
5
,
// #endif
...
...
@@ -953,13 +1010,19 @@
if
(
tempData
.
CounponList
&&
tempData
.
CounponList
.
length
>
0
){
uni
.
setStorageSync
(
'coupons'
,
tempData
.
CounponList
)
}
uni
.
showToast
({
title
:
'订单创建成功.'
,
icon
:
'none'
})
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/jz_MyOrder"
,
});
// #ifdef MP-DI
this
.
submitB2COrderHandler
(
tempData
.
OrderId
)
// #endif
// #ifdef MP-AG
uni
.
showToast
({
title
:
'订单创建成功.'
,
icon
:
'none'
})
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/jz_MyOrder"
,
});
// #endif
// let data = res.data;
// data.CoverImg = this.currentPriceInfo.CoverImg;
// let myData = JSON.stringify(data);
...
...
@@ -979,7 +1042,9 @@
duration
:
3000
})
}
this
.
submit
=
false
;
// #ifdef MP-AG
this
.
submit
=
false
;
// #endif
},
(
e
)
=>
{
this
.
submit
=
false
;
...
...
pages/visa/visaDetail.vue
View file @
6e29e93c
...
...
@@ -42,24 +42,40 @@
<view
style=
"padding: 33rpx 30rpx 51rpx 38rpx;"
>
<view
class=
"jz_LineTitle row items-center"
>
<view
class=
"col"
>
<text>
原价:
</text>
<!-- #ifdef MP-AG -->
<text>
原价:
</text>
<!-- #endif -->
<text
class=
"jz_renmin"
>
¥
</text>
<text
class=
"jz_B2bPrice"
>
<!--{{ discountPrice }}-->
{{ $utils.getretailer()?dataList.VisaPrice:dataList.VisaB2CPrice }}
<!-- #ifdef MP-DI -->
{{dataList.VisaB2CPrice}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{dataList.VisaPrice}}
<!-- #endif -->
</text>
<text
style=
"color: #999999; font-size: 28rpx; font-weight: 400"
>
/人
</text>
<text
style=
"font-size: 13px;color:#111;margin-left: 10px;"
>
直客价:
<text
style=
"font-size: 20rpx;"
>
¥
</text>
{{ dataList.VisaB2CPrice}}
</text>
<!-- #ifdef MP-AG -->
<text
style=
"color: #999999; font-size: 28rpx; font-weight: 400"
>
/人
</text>
<text
style=
"font-size: 13px;color:#111;margin-left: 10px;"
>
直客价:
<text
style=
"font-size: 20rpx;"
>
¥
</text>
{{ dataList.VisaB2CPrice}}
</text>
<!-- #endif -->
</view>
</view>
<view
class=
"jz_LineDetaYJDKQ"
style=
"padding: 0rpx 0 0 0;"
v-if=
"couponList.length>0||TotalDiscount>0"
>
<view
class=
"jz_LineDetaYJ"
v-if=
"TotalDiscount>0"
>
<view
class=
"jz_LineDetaYJL"
>
<!--
原价 ¥{{ $utils.getretailer()?dataList.VisaPrice:dataList.VisaB2CPrice }}/人
-->
<
template
v-if=
"false"
>
原价 ¥
<!-- #ifdef MP-DI -->
{{
dataList
.
VisaB2CPrice
}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{
dataList
.
VisaPrice
}}
<!-- #endif -->
/人
</
template
>
</view>
<view
class=
"jz_LineDetaYJR"
>
最高可减{{TotalDiscount}}
</view>
</view>
...
...
@@ -80,7 +96,7 @@
<view
class=
"line-flex col"
style=
"padding: 30rpx; background: #fff;margin-top: 20rpx"
v-if=
"createBy==0&&SaleList&&SaleList.length>1"
@
click=
"showSalePreviwe=true"
>
<text
style=
"font-size: 28rpx; color: #111; font-weight: 500"
>
销售
</text>
<text
style=
"font-size: 28rpx; color: #111; font-weight: 500"
>
服务人员
</text>
<text
style=
"
font-size: 22rpx;
color: #999;
...
...
@@ -164,7 +180,12 @@
<!-- 原b2b -->
<text
style=
"font-size: 40rpx;font-family: nav-font;"
>
<!-- {{discountPrice}} -->
{{ $utils.getretailer()?dataList.VisaPrice:dataList.VisaB2CPrice }}
<!-- #ifdef MP-DI -->
{{ dataList.VisaB2CPrice }}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{ dataList.VisaPrice }}
<!-- #endif -->
</text>
<text
style=
"font-size: 22rpx"
>
/人
</text>
</view>
...
...
@@ -193,7 +214,7 @@
<u-popup
v-model=
"showSalePreviwe"
mode=
"bottom"
border-radius=
"50"
length=
"60%"
:safe-area-inset-bottom=
"true"
>
<view>
<view
style=
"font-size: 17px;text-align: center;padding: 20px 0;"
>
选择
销售
选择
服务人员
</view>
<scroll-view
scroll-x=
"true"
style=
"width: 100%;height: 43vh;"
>
<view
class=
"SaleBox"
>
...
...
@@ -517,11 +538,23 @@
this
.
couponList
.
forEach
(
x
=>
{
if
(
x
.
couponsType
==
1
&&
x
.
denomination
>
this
.
maxCouponDiscount
)
this
.
maxCouponDiscount
=
x
.
denomination
if
(
x
.
couponsType
==
2
){
const
disMoney
=
this
.
currentPrice
.
b2BPrice
*
(
1
-
x
.
denomination
)
let
disMoney
=
0
// #ifdef MP-DI
disMoney
=
this
.
currentPrice
.
b2CPrice
*
(
1
-
x
.
denomination
)
// #endif
// #ifdef MP-AG
disMoney
=
this
.
currentPrice
.
b2BPrice
*
(
1
-
x
.
denomination
)
// #endif
this
.
maxCouponDiscount
=
this
.
maxCouponDiscount
<
disMoney
?
disMoney
:
this
.
maxCouponDiscount
}
})
let
money
=
this
.
$utils
.
getretailer
()?
this
.
dataList
.
VisaPrice
:
this
.
dataList
.
VisaB2CPrice
let
money
=
0
// #ifdef MP-DI
money
=
this
.
dataList
.
VisaB2CPrice
// #endif
// #ifdef MP-AG
money
=
this
.
dataList
.
VisaPrice
// #endif
let
maxCouponDiscount
=
this
.
maxCouponDiscount
this
.
TotalDiscount
=
this
.
maxCouponDiscount
this
.
discountPrice
=
money
-
maxCouponDiscount
...
...
@@ -675,16 +708,27 @@
this
.
is_show_auth
=
1
;
return
;
}
if
(
this
.
SaleList
&&
this
.
SaleList
.
length
>
1
&&
this
.
SaleId
==
0
&&
this
.
createBy
==
0
)
{
uni
.
showToast
({
title
:
"请选择销售"
,
icon
:
"none"
,
});
this
.
showSalePreviwe
=
true
;
return
;
}
// #ifdef MP-AG
if
(
this
.
SaleList
&&
this
.
SaleList
.
length
>
1
&&
this
.
SaleId
==
0
&&
this
.
createBy
==
0
)
{
uni
.
showToast
({
title
:
"请选择服务人员"
,
icon
:
"none"
,
});
this
.
showSalePreviwe
=
true
;
return
;
}
// #endif
let
createBy
=
0
// #ifdef MP-DI
createBy
=
this
.
createBy
>
0
?
this
.
createBy
:
this
.
customer
.
pid
// #endif
// #ifdef MP-AG
if
(
this
.
createBy
>
0
||
this
.
SaleId
)
createBy
=
this
.
createBy
>
0
?
this
.
createBy
:
this
.
SaleId
// #endif
uni
.
navigateTo
({
url
:
"/pages/visa/visa_Reserve?id="
+
this
.
delMsg
.
Pid
+
'&CreateBy='
+
(
this
.
createBy
?
this
.
createBy
:
this
.
SaleId
)
,
url
:
"/pages/visa/visa_Reserve?id="
+
this
.
delMsg
.
Pid
+
'&CreateBy='
+
createBy
,
});
},
},
...
...
pages/visa/visaList.vue
View file @
6e29e93c
...
...
@@ -91,7 +91,14 @@
</view>
<view
class=
"visaListNumR"
>
<text
style=
"font-size: 20rpx;"
>
CNY
</text>
<text
class=
"price-Num"
>
{{ $utils.getretailer()?item.visaPrice:item.visaB2CPrice }}
</text>
<text
class=
"price-Num"
>
<!-- #ifdef MP-DI -->
{{parseFloat(item.visaB2CPrice).toFixed(2)}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{parseFloat(item.visaPrice).toFixed(2)}}
<!-- #endif -->
</text>
<text
class=
"price-stuff"
style=
"font-size: 20rpx;color: rgba(164, 164, 164, 1)"
>
元
</text>
</view>
</view>
...
...
pages/visa/visa_Reserve.vue
View file @
6e29e93c
...
...
@@ -1105,17 +1105,15 @@
//计算价格
calcMoney
()
{
var
price
=
0
;
if
(
this
.
$utils
.
getretailer
())
{
// #ifdef MP-DI
price
=
this
.
dataList
.
VisaB2CPrice
;
// #endif
// #ifdef MP-AG
price
=
this
.
dataList
.
VisaPrice
;
}
else
{
price
=
this
.
dataList
.
VisaB2CPrice
;
}
// #endif
let
money
=
price
*
this
.
orderMsg
.
AdultPeopleNum
;
this
.
price
=
money
;
},
//去支付
goPay
()
{
...
...
@@ -1216,6 +1214,15 @@
});
return
;
}
// #ifdef MP-AG
if
(
!
this
.
CreateBy
){
uni
.
showToast
({
title
:
`服务人员为空,请联系服务人员!`
,
icon
:
"none"
,
});
return
}
// #endif
this
.
submit
=
true
;
let
mall_customer
=
uni
.
getStorageSync
(
"mall_customer"
);
...
...
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