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
Show 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 @@
...
@@ -111,7 +111,7 @@
</view>
</view>
</view>
</view>
</scroll-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>
<text
class=
"no-time"
v-if=
"!item.startDate || !item.endDate"
>
请先选游玩日期
</text>
<view
class=
"timeMore"
@
click=
"showTime(item,index)"
>
<view
class=
"timeMore"
@
click=
"showTime(item,index)"
>
<view
class=
"time-more-content"
>
<view
class=
"time-more-content"
>
...
@@ -279,18 +279,12 @@
...
@@ -279,18 +279,12 @@
<buyKnow
ref=
"buyKnow"
:buyKnowData=
"buyKnowData"
></buyKnow>
<buyKnow
ref=
"buyKnow"
:buyKnowData=
"buyKnowData"
></buyKnow>
<detail
<detail
ref=
"detail"
ref=
"detail"
:sellTotal=
'sellTotal'
:productList=
"productList"
:merchantName=
"productIfo.merchantName"
:sellTotal=
"sellTotal"
:name=
"productIfo.name"
:buyNum=
"buyNum"
:sellingPrice=
"sellingPrice"
:chooseService=
"chooseService"
:productDepositTotal=
"productDepositTotal"
:chooseCouponObj=
"chooseCouponObj"
></detail>
></detail>
<chooseArea
<chooseArea
v-if=
"showChooseArea"
v-if=
"showChooseArea"
:areaList=
"product
Ifo.product
AreaList"
:areaList=
"productAreaList"
@
areaSure=
"areaSure"
@
areaSure=
"areaSure"
:sortArr=
"sortArr"
:sortArr=
"sortArr"
:defaultAreaCode=
"defaultAreaCode"
:defaultAreaCode=
"defaultAreaCode"
...
@@ -338,7 +332,7 @@
...
@@ -338,7 +332,7 @@
import
calendar
from
'../scenicComponents/calendar'
//日历组件
import
calendar
from
'../scenicComponents/calendar'
//日历组件
import
buyKnow
from
'@/components/buyKnow.vue'
//购票须知
import
buyKnow
from
'@/components/buyKnow.vue'
//购票须知
import
orderCoupon
from
'@/components/orderCoupon'
//优惠券
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
chooseArea
from
'../scenicComponents/chooseArea'
//选择站点
import
contactList
from
'../scenicComponents/contactList'
//联系人弹窗
import
contactList
from
'../scenicComponents/contactList'
//联系人弹窗
import
editContacts
from
'../scenicComponents/editContacts'
//编辑联系人弹窗
import
editContacts
from
'../scenicComponents/editContacts'
//编辑联系人弹窗
...
@@ -364,10 +358,6 @@ export default {
...
@@ -364,10 +358,6 @@ export default {
companyId
:
''
,
//公司Id
companyId
:
''
,
//公司Id
productList
:[],
//初始化产品数据
productList
:[],
//初始化产品数据
productIdList
:[],
//产品id列表入参
productIdList
:[],
//产品id列表入参
sortArr
:
[],
//多个站点排号信息列表
sortIfo
:
''
,
//单个站点排号信息
sortInforPop
:
false
,
//一个站点时获取排队信息弹窗
showChooseArea
:
false
,
//控制选择站点弹窗显示隐藏
timeActive
:
10000
,
//时间下标,默认不选中
timeActive
:
10000
,
//时间下标,默认不选中
buyKnowData
:
''
,
//购买须知数据
buyKnowData
:
''
,
//购买须知数据
editContact
:
''
,
//编辑联系人传值对象
editContact
:
''
,
//编辑联系人传值对象
...
@@ -393,6 +383,12 @@ export default {
...
@@ -393,6 +383,12 @@ export default {
originalTotal
:
0
,
//原价总价
originalTotal
:
0
,
//原价总价
sellTotal
:
0
,
//卖价总价
sellTotal
:
0
,
//卖价总价
maxBookNum
:
999
,
//最大购买数量
maxBookNum
:
999
,
//最大购买数量
productAreaList
:[],
//长江索道选择站点数据
sortArr
:
[],
//多个站点排号信息列表
sortIfo
:
''
,
//单个站点排号信息
sortInforPop
:
false
,
//一个站点时获取排队信息弹窗
showChooseArea
:
false
,
//控制选择站点弹窗显示隐藏
defaultAreaCode
:
''
,
//默认站点
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -520,10 +516,18 @@ export default {
...
@@ -520,10 +516,18 @@ export default {
//需要排号
//需要排号
if
(
item
.
isFetch
==
1
){
if
(
item
.
isFetch
==
1
){
this
.
areaIndex
=
index
this
.
areaIndex
=
index
this
.
sortUpDown
(
item
.
merchantVo
.
code
)
this
.
sortUpDown
(
item
)
}
}
//默认选择每个产品第一个日期的值
//默认选择每个产品第一个日期的值
this
.
dateChoose
(
item
,
item
.
priceStockList
[
0
],
0
)
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
{
}
else
{
uni
.
showToast
({
title
:
'没有库存'
,
icon
:
'none'
})
uni
.
showToast
({
title
:
'没有库存'
,
icon
:
'none'
})
this
.
maxBookNum
=
0
this
.
maxBookNum
=
0
...
@@ -546,9 +550,9 @@ export default {
...
@@ -546,9 +550,9 @@ export default {
})
})
},
},
//---排号是否上下架---已修改
//---排号是否上下架---已修改
sortUpDown
(
merchantCode
)
{
sortUpDown
(
item
)
{
let
data
=
{
let
data
=
{
merchantCode
//商户code
merchantCode
:
item
.
merchantVo
.
code
//商户code
}
}
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
...
@@ -556,28 +560,32 @@ export default {
...
@@ -556,28 +560,32 @@ export default {
})
})
this
.
$request
(
'distribution/distribution/findNewFetchInfoFromSceinc'
,
data
).
then
(
res
=>
{
this
.
$request
(
'distribution/distribution/findNewFetchInfoFromSceinc'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
if
(
res
.
code
==
'00'
)
{
this
.
sortArr
=
res
.
data
.
data
this
.
sortArr
=
res
.
data
.
data
||
[]
let
data
=
res
.
data
let
data
=
res
.
data
this
.
productList
.
forEach
(
item
=>
{
item
.
areaObj
=
{}
if
(
item
.
productAreaList
.
length
>
1
){
if
(
item
.
productAreaList
.
length
>
1
){
//有库存并且需要选择两个站点以上的票种,显示区域组件
//有库存并且需要选择两个站点以上的票种,显示区域组件
for
(
let
item2
in
data
.
main
)
{
for
(
let
key
in
data
.
main
)
{
if
(
data
.
main
[
item2
].
sceneSortStatus
==
'1'
){
if
(
data
.
main
[
key
].
sceneSortStatus
==
'1'
){
//上架
//上架
item
.
areaUp
=
true
item
.
areaUp
=
true
this
.
productAreaList
=
item
.
productAreaList
if
(
item
.
defaultAreaCode
){
if
(
item
.
defaultAreaCode
){
//有默认的站点
//有默认的站点
item
.
areaObj
=
{}
this
.
defaultAreaCode
=
item
.
defaultAreaCode
item
.
areaObj
.
areaCode
=
item
.
areaCode
item
.
productAreaList
.
forEach
(
item2
=>
{
item
.
areaObj
.
areaName
=
item
.
areaName
if
(
item2
.
areaCode
==
item
.
defaultAreaCode
){
}
else
{
item
.
areaObj
.
areaCode
=
item2
.
areaCode
item
.
areaObj
=
{}
item
.
areaObj
.
areaName
=
item2
.
areaName
}
})
}
}
//暂时下面只适应长江索道
//暂时下面只适应长江索道
this
.
showChooseArea
=
true
this
.
showChooseArea
=
true
}
}
}
}
}
else
if
(
item
.
productAreaList
.
length
==
1
)
{
}
if
(
item
.
productAreaList
.
length
==
1
)
{
//只有一个站点时,直接选中站点(现目前还没有一个站点的景区)
//只有一个站点时,直接选中站点(现目前还没有一个站点的景区)
for
(
let
item
in
data
.
main
)
{
for
(
let
item
in
data
.
main
)
{
if
(
data
.
main
[
item
].
sceneSortStatus
==
'1'
)
{
if
(
data
.
main
[
item
].
sceneSortStatus
==
'1'
)
{
...
@@ -588,7 +596,7 @@ export default {
...
@@ -588,7 +596,7 @@ export default {
}
}
}
}
}
}
})
}
}
})
})
},
},
...
@@ -607,7 +615,7 @@ export default {
...
@@ -607,7 +615,7 @@ export default {
})
})
this
.
$request
(
'distribution/distribution/getTimeStock'
,
data
).
then
(
res
=>
{
this
.
$request
(
'distribution/distribution/getTimeStock'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
if
(
res
.
code
==
'00'
)
{
item
.
timeList
=
res
.
data
item
.
timeList
=
res
.
data
||
[]
//增加一个时间Number字段,用于判断当前时间大于班次结束时间时,显示售罄
//增加一个时间Number字段,用于判断当前时间大于班次结束时间时,显示售罄
item
.
timeList
.
forEach
(
item2
=>
{
item
.
timeList
.
forEach
(
item2
=>
{
let
text
=
parseFloat
((
item2
.
last
/
item2
.
total
).
toFixed
(
2
))
||
0
let
text
=
parseFloat
((
item2
.
last
/
item2
.
total
).
toFixed
(
2
))
||
0
...
@@ -695,7 +703,6 @@ export default {
...
@@ -695,7 +703,6 @@ export default {
//---获取排号信息---暂时未使用
//---获取排号信息---暂时未使用
getSortInfor
(
merchantCode
)
{
getSortInfor
(
merchantCode
)
{
let
data
=
{
let
data
=
{
areaCode
:
this
.
areaObj
.
areaCode
,
merchantCode
//商户code
merchantCode
//商户code
}
}
uni
.
showLoading
({
uni
.
showLoading
({
...
@@ -717,6 +724,7 @@ export default {
...
@@ -717,6 +724,7 @@ export default {
},
},
//---获取子组件的传值---已修改
//---获取子组件的传值---已修改
areaSure
(
data
)
{
areaSure
(
data
)
{
console
.
log
(
this
.
areaIndex
)
this
.
productList
[
this
.
areaIndex
].
areaObj
=
data
this
.
productList
[
this
.
areaIndex
].
areaObj
=
data
},
},
//---展示选择站点---已修改
//---展示选择站点---已修改
...
@@ -758,18 +766,15 @@ export default {
...
@@ -758,18 +766,15 @@ export default {
this
.
$refs
.
calendar
.
defaultDate
=
item
.
chooseDate
//日历组件选中日期
this
.
$refs
.
calendar
.
defaultDate
=
item
.
chooseDate
//日历组件选中日期
item
.
endDate
=
item2
.
endTime
//开始日期
item
.
endDate
=
item2
.
endTime
//开始日期
item
.
startDate
=
item2
.
startTime
//结束日期
item
.
startDate
=
item2
.
startTime
//结束日期
uni
.
$u
.
throttle
(()
=>
{
this
.
initCoupon
(
item
)
if
(
item
.
productType
==
3
){
if
(
item
.
productType
==
3
){
//productType=3为场次票
//productType=3为场次票
item
.
cruisePlanId
=
''
item
.
cruisePlanId
=
''
item
.
timeActive
=
10000
item
.
timeActive
=
10000
this
.
timeActive
=
10000
this
.
timeActive
=
10000
uni
.
$u
.
throttle
(()
=>
{
this
.
getTimeStock
(
item
)
this
.
getTimeStock
(
item
)
this
.
initCoupon
(
item
)
},
3000
)
}
}
uni
.
$u
.
throttle
(()
=>
{
this
.
initCoupon
(
item
)
},
3000
)
},
3000
)
this
.
computedPrice
()
this
.
computedPrice
()
//解决点击日期无反应的情况
//解决点击日期无反应的情况
...
...
pages/scenic/scenicComponents/chooseArea.vue
View file @
5273d112
<
template
>
<
template
>
<view
class=
"area-box"
>
<view
class=
"area-bg"
>
<view
class=
"area-wrap"
>
<view
class=
"top"
@
click=
"closeSon()"
>
<view
class=
"top"
@
click=
"closeSon()"
>
<view
class=
"top-left"
>
<view
class=
"top-left"
>
选择(索道)出发站点
选择(索道)出发站点
...
@@ -150,6 +151,8 @@
...
@@ -150,6 +151,8 @@
</view>
</view>
</view>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
...
@@ -172,12 +175,20 @@ export default {
...
@@ -172,12 +175,20 @@ export default {
created
()
{
created
()
{
//如果有默认站点
//如果有默认站点
if
(
this
.
defaultAreaCode
&&
this
.
sortArr
.
length
>
0
){
if
(
this
.
defaultAreaCode
&&
this
.
sortArr
.
length
>
0
){
//获取排号信息
this
.
sortArr
.
forEach
(
item
=>
{
this
.
sortArr
.
forEach
(
item
=>
{
if
(
item
.
projectId
==
this
.
defaultAreaCode
){
if
(
item
.
projectId
==
this
.
defaultAreaCode
){
this
.
sortIfo
=
item
this
.
sortIfo
=
item
this
.
sortIfo
.
peopleNumber
=
Math
.
max
(
item
.
sortTotalCapacity
-
item
.
showEnd
,
0
)
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
return
}
}
uni
.
getLocation
({
uni
.
getLocation
({
...
@@ -247,14 +258,22 @@ export default {
...
@@ -247,14 +258,22 @@ export default {
font-size
:
32rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.area-b
ox
{
.area-b
g
{
position
:
fixed
;
position
:
fixed
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
bottom
:
0
;
bottom
:
0
;
z-index
:
99
;
z-index
:
99
;
background
:rgba
(
0
,
0
,
0
,
0
.4
)
;
padding-top
:
100rpx
;
}
.area-wrap
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
background
:
#ECF3FE
;
background
:
#ECF3FE
;
border-radius
:
20rpx
;
}
}
.top
{
.top
{
display
:
flex
;
display
:
flex
;
...
@@ -263,6 +282,7 @@ export default {
...
@@ -263,6 +282,7 @@ export default {
height
:
80rpx
;
height
:
80rpx
;
align-items
:
center
;
align-items
:
center
;
padding
:
0
24rpx
;
padding
:
0
24rpx
;
border-radius
:
20rpx
;
}
}
.top-left
{
.top-left
{
flex
:
1
;
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 {
...
@@ -176,13 +176,14 @@ export default {
right
:
0
;
right
:
0
;
bottom
:
0
;
bottom
:
0
;
z-index
:
999
;
z-index
:
999
;
padding-top
:
1
2
0rpx
;
padding-top
:
1
0
0rpx
;
}
}
.list-wrap
{
.list-wrap
{
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
20rpx
;
}
}
.top-num
{
.top-num
{
height
:
100rpx
;
height
:
100rpx
;
...
...
pages/scenic/scenicComponents/editContacts.vue
View file @
5273d112
...
@@ -146,13 +146,14 @@ export default {
...
@@ -146,13 +146,14 @@ export default {
right
:
0
;
right
:
0
;
bottom
:
0
;
bottom
:
0
;
z-index
:
1000
;
z-index
:
1000
;
padding-top
:
1
2
0rpx
;
padding-top
:
1
0
0rpx
;
}
}
.edit-wrap
{
.edit-wrap
{
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
20rpx
;
}
}
.return
{
.return
{
height
:
100rpx
;
height
:
100rpx
;
...
...
pages/scenic/scenicOrder/scenicOrder.vue
View file @
5273d112
...
@@ -697,7 +697,7 @@ export default {
...
@@ -697,7 +697,7 @@ export default {
})
})
this
.
$request
(
'distribution/distribution/getTimeStock'
,
data
).
then
(
res
=>
{
this
.
$request
(
'distribution/distribution/getTimeStock'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
if
(
res
.
code
==
'00'
)
{
this
.
timeList
=
res
.
data
this
.
timeList
=
res
.
data
||
[]
this
.
timeList
.
forEach
((
item
,
index
)
=>
{
this
.
timeList
.
forEach
((
item
,
index
)
=>
{
//增加一个时间Number字段,用于判断当前时间大于班次结束时间时,显示售罄
//增加一个时间Number字段,用于判断当前时间大于班次结束时间时,显示售罄
let
text
=
parseFloat
((
item
.
last
/
item
.
total
).
toFixed
(
2
))
||
0
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