Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
panyongping
uni-pdtravel
Commits
5273d112
Commit
5273d112
authored
Dec 20, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合下单详情以及bug修复
parent
e36a52c1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
311 additions
and
190 deletions
+311
-190
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+68
-63
chooseArea.vue
pages/scenic/scenicComponents/chooseArea.vue
+144
-124
combiDetail.vue
pages/scenic/scenicComponents/combiDetail.vue
+94
-0
contactList.vue
pages/scenic/scenicComponents/contactList.vue
+2
-1
editContacts.vue
pages/scenic/scenicComponents/editContacts.vue
+2
-1
scenicOrder.vue
pages/scenic/scenicOrder/scenicOrder.vue
+1
-1
No files found.
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
5273d112
...
...
@@ -111,7 +111,7 @@
</view>
</view>
</scroll-view>
<text
class=
"no-time"
v-if=
"
item.timeList&&
item.timeList.length==0"
>
该日票种已售罄,请选择其他日期
</text>
<text
class=
"no-time"
v-if=
"
!item.timeList||
item.timeList.length==0"
>
该日票种已售罄,请选择其他日期
</text>
<text
class=
"no-time"
v-if=
"!item.startDate || !item.endDate"
>
请先选游玩日期
</text>
<view
class=
"timeMore"
@
click=
"showTime(item,index)"
>
<view
class=
"time-more-content"
>
...
...
@@ -278,19 +278,13 @@
<calendar
ref=
"calendar"
@
dateConfig=
"dateConfig"
:dateList=
"chooseDateList"
v-show=
"chooseDateList.length > 0"
></calendar>
<buyKnow
ref=
"buyKnow"
:buyKnowData=
"buyKnowData"
></buyKnow>
<detail
ref=
"detail"
:sellTotal=
'sellTotal'
:merchantName=
"productIfo.merchantName"
:name=
"productIfo.name"
:buyNum=
"buyNum"
:sellingPrice=
"sellingPrice"
:chooseService=
"chooseService"
:productDepositTotal=
"productDepositTotal"
:chooseCouponObj=
"chooseCouponObj"
ref=
"detail"
:productList=
"productList"
:sellTotal=
"sellTotal"
></detail>
<chooseArea
v-if=
"showChooseArea"
:areaList=
"product
Ifo.product
AreaList"
:areaList=
"productAreaList"
@
areaSure=
"areaSure"
:sortArr=
"sortArr"
:defaultAreaCode=
"defaultAreaCode"
...
...
@@ -338,7 +332,7 @@
import
calendar
from
'../scenicComponents/calendar'
//日历组件
import
buyKnow
from
'@/components/buyKnow.vue'
//购票须知
import
orderCoupon
from
'@/components/orderCoupon'
//优惠券
import
detail
from
'../scenicComponents/
d
etail.vue'
//明细弹窗
import
detail
from
'../scenicComponents/
combiD
etail.vue'
//明细弹窗
import
chooseArea
from
'../scenicComponents/chooseArea'
//选择站点
import
contactList
from
'../scenicComponents/contactList'
//联系人弹窗
import
editContacts
from
'../scenicComponents/editContacts'
//编辑联系人弹窗
...
...
@@ -364,10 +358,6 @@ export default {
companyId
:
''
,
//公司Id
productList
:[],
//初始化产品数据
productIdList
:[],
//产品id列表入参
sortArr
:
[],
//多个站点排号信息列表
sortIfo
:
''
,
//单个站点排号信息
sortInforPop
:
false
,
//一个站点时获取排队信息弹窗
showChooseArea
:
false
,
//控制选择站点弹窗显示隐藏
timeActive
:
10000
,
//时间下标,默认不选中
buyKnowData
:
''
,
//购买须知数据
editContact
:
''
,
//编辑联系人传值对象
...
...
@@ -393,6 +383,12 @@ export default {
originalTotal
:
0
,
//原价总价
sellTotal
:
0
,
//卖价总价
maxBookNum
:
999
,
//最大购买数量
productAreaList
:[],
//长江索道选择站点数据
sortArr
:
[],
//多个站点排号信息列表
sortIfo
:
''
,
//单个站点排号信息
sortInforPop
:
false
,
//一个站点时获取排队信息弹窗
showChooseArea
:
false
,
//控制选择站点弹窗显示隐藏
defaultAreaCode
:
''
,
//默认站点
}
},
onLoad
(
option
)
{
...
...
@@ -520,10 +516,18 @@ export default {
//需要排号
if
(
item
.
isFetch
==
1
){
this
.
areaIndex
=
index
this
.
sortUpDown
(
item
.
merchantVo
.
code
)
this
.
sortUpDown
(
item
)
}
//默认选择每个产品第一个日期的值
this
.
dateChoose
(
item
,
item
.
priceStockList
[
0
],
0
)
//解决如果班次票不是第一个产品时,dateChoose方法里面不会执行下面代码
if
(
item
.
productType
==
3
){
//productType=3为场次票
item
.
cruisePlanId
=
''
item
.
timeActive
=
10000
this
.
timeActive
=
10000
this
.
getTimeStock
(
item
)
}
}
else
{
uni
.
showToast
({
title
:
'没有库存'
,
icon
:
'none'
})
this
.
maxBookNum
=
0
...
...
@@ -546,9 +550,9 @@ export default {
})
},
//---排号是否上下架---已修改
sortUpDown
(
merchantCode
)
{
sortUpDown
(
item
)
{
let
data
=
{
merchantCode
//商户code
merchantCode
:
item
.
merchantVo
.
code
//商户code
}
uni
.
showLoading
({
title
:
'加载中'
,
...
...
@@ -556,39 +560,43 @@ export default {
})
this
.
$request
(
'distribution/distribution/findNewFetchInfoFromSceinc'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
this
.
sortArr
=
res
.
data
.
data
this
.
sortArr
=
res
.
data
.
data
||
[]
let
data
=
res
.
data
this
.
productList
.
forEach
(
item
=>
{
if
(
item
.
productAreaList
.
length
>
1
){
//有库存并且需要选择两个站点以上的票种,显示区域组件
for
(
let
item2
in
data
.
main
)
{
if
(
data
.
main
[
item2
].
sceneSortStatus
==
'1'
){
//上架
item
.
areaUp
=
true
if
(
item
.
defaultAreaCode
){
//有默认的站点
item
.
areaObj
=
{}
item
.
areaObj
.
areaCode
=
item
.
areaCode
item
.
areaObj
.
areaName
=
item
.
areaName
}
else
{
item
.
areaObj
=
{}
}
//暂时下面只适应长江索道
this
.
showChooseArea
=
true
}
}
}
else
if
(
item
.
productAreaList
.
length
==
1
)
{
//只有一个站点时,直接选中站点(现目前还没有一个站点的景区)
for
(
let
item
in
data
.
main
)
{
if
(
data
.
main
[
item
].
sceneSortStatus
==
'1'
)
{
//上架
item
.
areaUp
=
true
item
.
areaObj
.
areaCode
=
item
.
productAreaList
[
0
].
areaCode
item
.
areaObj
.
areaName
=
item
.
productAreaList
[
0
].
areaName
}
}
}
})
item
.
areaObj
=
{}
if
(
item
.
productAreaList
.
length
>
1
){
//有库存并且需要选择两个站点以上的票种,显示区域组件
for
(
let
key
in
data
.
main
)
{
if
(
data
.
main
[
key
].
sceneSortStatus
==
'1'
){
//上架
item
.
areaUp
=
true
this
.
productAreaList
=
item
.
productAreaList
if
(
item
.
defaultAreaCode
){
//有默认的站点
this
.
defaultAreaCode
=
item
.
defaultAreaCode
item
.
productAreaList
.
forEach
(
item2
=>
{
if
(
item2
.
areaCode
==
item
.
defaultAreaCode
){
item
.
areaObj
.
areaCode
=
item2
.
areaCode
item
.
areaObj
.
areaName
=
item2
.
areaName
}
})
}
//暂时下面只适应长江索道
this
.
showChooseArea
=
true
}
}
}
if
(
item
.
productAreaList
.
length
==
1
)
{
//只有一个站点时,直接选中站点(现目前还没有一个站点的景区)
for
(
let
item
in
data
.
main
)
{
if
(
data
.
main
[
item
].
sceneSortStatus
==
'1'
)
{
//上架
item
.
areaUp
=
true
item
.
areaObj
.
areaCode
=
item
.
productAreaList
[
0
].
areaCode
item
.
areaObj
.
areaName
=
item
.
productAreaList
[
0
].
areaName
}
}
}
}
})
},
...
...
@@ -607,7 +615,7 @@ export default {
})
this
.
$request
(
'distribution/distribution/getTimeStock'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
item
.
timeList
=
res
.
data
item
.
timeList
=
res
.
data
||
[]
//增加一个时间Number字段,用于判断当前时间大于班次结束时间时,显示售罄
item
.
timeList
.
forEach
(
item2
=>
{
let
text
=
parseFloat
((
item2
.
last
/
item2
.
total
).
toFixed
(
2
))
||
0
...
...
@@ -695,7 +703,6 @@ export default {
//---获取排号信息---暂时未使用
getSortInfor
(
merchantCode
)
{
let
data
=
{
areaCode
:
this
.
areaObj
.
areaCode
,
merchantCode
//商户code
}
uni
.
showLoading
({
...
...
@@ -717,6 +724,7 @@ export default {
},
//---获取子组件的传值---已修改
areaSure
(
data
)
{
console
.
log
(
this
.
areaIndex
)
this
.
productList
[
this
.
areaIndex
].
areaObj
=
data
},
//---展示选择站点---已修改
...
...
@@ -758,18 +766,15 @@ export default {
this
.
$refs
.
calendar
.
defaultDate
=
item
.
chooseDate
//日历组件选中日期
item
.
endDate
=
item2
.
endTime
//开始日期
item
.
startDate
=
item2
.
startTime
//结束日期
if
(
item
.
productType
==
3
){
//productType=3为场次票
item
.
cruisePlanId
=
''
item
.
timeActive
=
10000
this
.
timeActive
=
10000
uni
.
$u
.
throttle
(()
=>
{
this
.
getTimeStock
(
item
)
this
.
initCoupon
(
item
)
},
3000
)
}
uni
.
$u
.
throttle
(()
=>
{
this
.
initCoupon
(
item
)
if
(
item
.
productType
==
3
){
//productType=3为场次票
item
.
cruisePlanId
=
''
item
.
timeActive
=
10000
this
.
timeActive
=
10000
this
.
getTimeStock
(
item
)
}
},
3000
)
this
.
computedPrice
()
//解决点击日期无反应的情况
...
...
pages/scenic/scenicComponents/chooseArea.vue
View file @
5273d112
<
template
>
<view
class=
"area-box"
>
<view
class=
"top"
@
click=
"closeSon()"
>
<view
class=
"top-left"
>
选择(索道)出发站点
</view>
<view>
<u-icon
name=
"close"
bold
></u-icon>
</view>
</view>
<!-- 没有默认站点时-->
<template
v-if=
"!defaultAreaCode"
>
<view
class=
"bottom"
>
<view
class=
"bottom1"
>
<view>
您所在位置距离“
{{
areaList
[
distanceIndex
].
areaName
}}
”较近
</view>
<view
class=
"bottom1-choose"
>
建议选择
<text>
【
{{
areaList
[
distanceIndex
].
areaName
}}
】
</text>
</view>
<view
class=
"bottom1-btn"
>
<text
class=
"btn"
@
click=
"chooseArea(item)"
v-for=
"(item,index) of areaList"
:key=
"index"
>
{{
item
.
areaName
}}
</text>
</view>
<view
class=
"area-bg"
>
<view
class=
"area-wrap"
>
<view
class=
"top"
@
click=
"closeSon()"
>
<view
class=
"top-left"
>
选择(索道)出发站点
</view>
<view
class=
"bottom2"
>
<image
src=
"../static/scenic/chooseArea.jpg"
mode=
"widthFix"
></image>
<view
style=
"margin-top: 20rpx;"
>
选错站点可导致排队号码无效。
</view>
<view>
若无法确定站点,请向索道工作人员咨询。
</view>
<view>
<u-icon
name=
"close"
bold
></u-icon>
</view>
</view>
<
view
class=
"pop-wrap"
v-show=
"showPop
"
>
<view
class=
"
pop-content
"
>
<view>
<
text
>
您
选择的站点是:
</
text
>
</view>
<!-- 没有默认站点时-->
<
template
v-if=
"!defaultAreaCode
"
>
<view
class=
"
bottom
"
>
<view
class=
"bottom1"
>
<
view
>
您
所在位置距离“
{{
areaList
[
distanceIndex
].
areaName
}}
”较近
</
view
>
<text>
{{
areaObj
.
areaName
}}
<view
class=
"bottom1-choose"
>
建议选择
<text>
【
{{
areaList
[
distanceIndex
].
areaName
}}
】
</text>
</view>
</text>
<view
class=
"bottom1-btn"
>
<text
class=
"btn"
@
click=
"chooseArea(item)"
v-for=
"(item,index) of areaList"
:key=
"index"
>
{{
item
.
areaName
}}
</text>
</view>
</view>
<template
v-if=
"sortIfo"
>
<view
class=
"bottom2"
>
<image
src=
"../static/scenic/chooseArea.jpg"
mode=
"widthFix"
></image>
<view
style=
"margin-top: 20rpx;"
>
选错站点可导致排队号码无效。
</view>
<view>
若无法确定站点,请向索道工作人员咨询。
</view>
</view>
</view>
<view
class=
"pop-wrap"
v-show=
"showPop"
>
<view
class=
"pop-content"
>
<view>
<text>
当前排队人数
:
您选择的站点是
:
</text>
<text>
{{
sortIfo
.
peopleNumber
}}
{{
areaObj
.
areaName
}}
</text>
</view>
<view>
<template
v-if=
"sortIfo"
>
<view>
<text>
当前排队人数:
</text>
<text>
{{
sortIfo
.
peopleNumber
}}
</text>
</view>
<view>
<text>
预计进入排队等候区时间:
</text>
<text>
{{
sortIfo
.
sortTotalTime
}}
</text>
</view>
</
template
>
<!-- <view>
<text>
预计进入排队等候区时间
:
退票规则
:
</text>
<text>
{{
sortIfo
.
sortTotalTime
}}
不可退
</text>
</view> -->
<view>
返程时,根据现场情况需重新取号
</view>
<view
v-if=
"!sortIfo"
style=
"font-size:32rpx;color:#FC6703;"
>
未找到本站信息,请根据现场大屏幕信息合理购票
</view>
<view
style=
"text-align: center;"
>
<text
class=
"btn"
@
click=
"hidePop()"
style=
"color: #555;margin-right: 48rpx;"
>
取消
</text>
<text
class=
"btn"
@
click=
"sure()"
>
确定
</text>
</view>
</
template
>
<!-- <view>
<text>
退票规则:
</text>
<text>
不可退
</text>
</view> -->
<view>
返程时,根据现场情况需重新取号
</view>
<view
v-if=
"!sortIfo"
style=
"font-size:32rpx;color:#FC6703;"
>
未找到本站信息,请根据现场大屏幕信息合理购票
</view>
<view
style=
"text-align: center;"
>
<text
class=
"btn"
@
click=
"hidePop()"
style=
"color: #555;margin-right: 48rpx;"
>
取消
</text>
<text
class=
"btn"
@
click=
"sure()"
>
确定
</text>
</view>
</view>
</template>
<!-- 有默认站点时 -->
<view
v-else
class=
"defaultArea"
>
<view>
<text>
当前站点:
</text>
<text>
{{areaObj.areaName}}
</text>
</view>
<view>
<text>
当前排队人数:
</text>
<text>
{{sortIfo.peopleNumber}}
</text>
</view>
<view>
<text>
预计进入排队等候区时间:
</text>
<text>
{{sortIfo.sortTotalTime}}
</text>
</view>
<!-- <view>
<text>
退票规则:
</text>
</view>
</template>
<!-- 有默认站点时 -->
<view
v-else
class=
"defaultArea"
>
<view>
<text>
当前站点:
</text>
<text>
{{areaObj.areaName}}
</text>
</view>
<view>
<text>
当前排队人数:
</text>
<text>
{{sortIfo.peopleNumber}}
</text>
</view>
<view>
<text>
预计进入排队等候区时间:
</text>
<text>
{{sortIfo.sortTotalTime}}
</text>
</view>
<!-- <view>
<text>
退票规则:
</text>
<text>
不可退
</text>
</view> -->
<view>
<image
src=
"../static/scenic/chooseArea.jpg"
mode=
"widthFix"
></image>
</view>
<text>
不可退
</text>
</view> -->
<view>
<image
src=
"../static/scenic/chooseArea.jpg"
mode=
"widthFix"
></image>
</view>
<view>
<a
class=
"btn"
@
click=
"closeSon()"
>
确定
</a>
</view>
<view>
<a
class=
"btn"
@
click=
"closeSon()"
>
确定
</a>
</view>
</view>
</view>
</view>
</template>
...
...
@@ -172,12 +175,20 @@ export default {
created
()
{
//如果有默认站点
if
(
this
.
defaultAreaCode
&&
this
.
sortArr
.
length
>
0
){
//获取排号信息
this
.
sortArr
.
forEach
(
item
=>
{
if
(
item
.
projectId
==
this
.
defaultAreaCode
){
this
.
sortIfo
=
item
this
.
sortIfo
.
peopleNumber
=
Math
.
max
(
item
.
sortTotalCapacity
-
item
.
showEnd
,
0
)
}
})
//获取站点信息
this
.
areaList
.
forEach
(
item
=>
{
if
(
item
.
areaCode
==
this
.
defaultAreaCode
){
this
.
areaObj
.
areaCode
=
item
.
areaCode
this
.
areaObj
.
areaName
=
item
.
areaName
}
})
return
}
uni
.
getLocation
({
...
...
@@ -247,14 +258,22 @@ export default {
font-size
:
32rpx
;
font-weight
:
bold
;
}
.area-b
ox
{
.area-b
g
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
99
;
background
:rgba
(
0
,
0
,
0
,
0
.4
)
;
padding-top
:
100rpx
;
}
.area-wrap
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
background
:
#ECF3FE
;
border-radius
:
20rpx
;
}
.top
{
display
:
flex
;
...
...
@@ -263,6 +282,7 @@ export default {
height
:
80rpx
;
align-items
:
center
;
padding
:
0
24rpx
;
border-radius
:
20rpx
;
}
.top-left
{
flex
:
1
;
...
...
pages/scenic/scenicComponents/combiDetail.vue
0 → 100644
View file @
5273d112
<
template
>
<u-popup
:show=
"showPop"
:round=
"20"
@
close=
"showPop = false"
closeable
>
<view
class=
"son-wrap"
>
<view
class=
"detail-title"
>
费用明细
</view>
<view
style=
"flex: 1; overflow-y: scroll"
>
<view
v-for=
"(item, index) of productList"
:key=
"index"
class=
"list-wrap"
>
<view
class=
"list"
>
<view>
{{
item
.
merchantName
}}
(
{{
item
.
name
}}
)
</view>
<view>
¥
{{
item
.
sellingPrice
}}
x
{{
item
.
buyNum
}}
份
<!--
<small
v-if=
"item.deposit"
>
押金:¥
{{
item
.
deposit
}}
<span
v-if=
"item.depositType == 2"
>
x
{{
item
.
buyNum
}}
</span>
</small>
-->
</view>
</view>
<view
class=
"list"
v-if=
"item.chooseCouponObj && item.chooseCouponObj.savedMoney > 0"
>
<view>
券
</view>
<view>
-¥
<text
style=
"font-size:36rpx;"
>
{{
parseFloat
(
item
.
chooseCouponObj
.
savedMoney
.
toFixed
(
2
))
}}
</text>
</view>
</view>
</view>
<view
class=
"detail-bottom"
>
<text>
合计
</text>
<text>
¥
{{
sellTotal
}}
</text>
</view>
</view>
</view>
</u-popup>
</
template
>
<
script
>
export
default
{
props
:
[
'productList'
,
'sellTotal'
],
data
()
{
return
{
showPop
:
false
,
//控制弹窗显示隐藏
}
},
methods
:
{
//---展示该组件
showDetail
()
{
this
.
showPop
=
true
}
}
}
</
script
>
<
style
scoped=
"scoped"
lang=
"scss"
>
.son-wrap
{
position
:
relative
;
height
:
65vh
;
display
:
flex
;
flex-direction
:
column
;
}
.detail-title
{
text-align
:
center
;
font-size
:
32rpx
;
font-weight
:
bold
;
padding
:
30rpx
24rpx
;
border-radius
:
20rpx
20rpx
0
0
;
}
.list-wrap
{
border-bottom
:
1px
solid
#f0f0f0
;
padding
:
0
30rpx
;
}
.list
{
height
:
120rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.list
view
:last-child
{
text-align
:
right
;
flex-shrink
:
0
;
margin-left
:
20rpx
;
}
.detail-bottom
{
display
:
flex
;
justify-content
:
space-between
;
color
:
$red
;
font-weight
:
bold
;
align-items
:
center
;
padding
:
40rpx
30rpx
;
font-size
:
32rpx
;
}
</
style
>
pages/scenic/scenicComponents/contactList.vue
View file @
5273d112
...
...
@@ -176,13 +176,14 @@ export default {
right
:
0
;
bottom
:
0
;
z-index
:
999
;
padding-top
:
1
2
0rpx
;
padding-top
:
1
0
0rpx
;
}
.list-wrap
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
background
:
#ffffff
;
border-radius
:
20rpx
;
}
.top-num
{
height
:
100rpx
;
...
...
pages/scenic/scenicComponents/editContacts.vue
View file @
5273d112
...
...
@@ -146,13 +146,14 @@ export default {
right
:
0
;
bottom
:
0
;
z-index
:
1000
;
padding-top
:
1
2
0rpx
;
padding-top
:
1
0
0rpx
;
}
.edit-wrap
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
background
:
#ffffff
;
border-radius
:
20rpx
;
}
.return
{
height
:
100rpx
;
...
...
pages/scenic/scenicOrder/scenicOrder.vue
View file @
5273d112
...
...
@@ -697,7 +697,7 @@ export default {
})
this
.
$request
(
'distribution/distribution/getTimeStock'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
this
.
timeList
=
res
.
data
this
.
timeList
=
res
.
data
||
[]
this
.
timeList
.
forEach
((
item
,
index
)
=>
{
//增加一个时间Number字段,用于判断当前时间大于班次结束时间时,显示售罄
let
text
=
parseFloat
((
item
.
last
/
item
.
total
).
toFixed
(
2
))
||
0
...
...
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