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
a377a907
Commit
a377a907
authored
Jan 09, 2024
by
qipeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://192.168.0.204/panyongping/uni-pdtravel
into develop
parents
3720a1f1
54139f00
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
380 additions
and
389 deletions
+380
-389
request.js
common/request.js
+2
-3
distributionCombiChoose.vue
...ation/distributionCombiChoose/distributionCombiChoose.vue
+14
-1
center.vue
pages/indexs/center/center.vue
+2
-2
numberChoose.vue
pages/my/takeNumber/numberChoose/numberChoose.vue
+1
-1
numberIndex.vue
pages/my/takeNumber/numberIndex/numberIndex.vue
+25
-15
rowNumber.vue
pages/my/takeNumber/rowNumber/rowNumber.vue
+16
-29
scenicCombiOrder-old.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder-old.vue
+0
-38
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+258
-241
contactList.vue
pages/scenic/scenicComponents/contactList.vue
+1
-6
editContacts.vue
pages/scenic/scenicComponents/editContacts.vue
+2
-3
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+59
-50
No files found.
common/request.js
View file @
a377a907
...
@@ -5,12 +5,11 @@ if(process.env.NODE_ENV === 'development'){//开发环境
...
@@ -5,12 +5,11 @@ if(process.env.NODE_ENV === 'development'){//开发环境
}
else
{
}
else
{
baseUrl
=
'https://manager.pangdly.com/'
baseUrl
=
'https://manager.pangdly.com/'
}
}
const
request
=
(
url
=
''
,
data
=
{},
showLoad
)
=>
{
const
request
=
(
url
=
''
,
data
=
{},
showLoad
)
=>
{
data
.
reqId
=
new
Date
().
getTime
()
//获取时间戳
data
.
reqId
=
new
Date
().
getTime
()
//获取时间戳
let
show
=
showLoad
||
tru
e
let
show
=
showLoad
||
fals
e
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
show
){
if
(
!
show
){
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
mask
:
true
mask
:
true
...
...
pages/combination/distributionCombiChoose/distributionCombiChoose.vue
View file @
a377a907
...
@@ -328,7 +328,10 @@ export default {
...
@@ -328,7 +328,10 @@ export default {
//清空之前选中的数据以及状态
//清空之前选中的数据以及状态
this
.
detailData
=
''
this
.
detailData
=
''
this
.
chooseProduct
=
[]
this
.
chooseProduct
=
[]
if
(
this
.
$refs
.
detail
){
//解决支付宝小程序报错问题
this
.
$refs
.
detail
.
showPop
=
false
this
.
$refs
.
detail
.
showPop
=
false
}
let
token
=
uni
.
getStorageSync
(
'token'
)
let
token
=
uni
.
getStorageSync
(
'token'
)
if
(
token
)
{
if
(
token
)
{
uni
.
getLocation
({
uni
.
getLocation
({
...
@@ -608,6 +611,16 @@ export default {
...
@@ -608,6 +611,16 @@ export default {
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/combination/combiOrder/combiOrder'
+
query
url
:
'/pages/combination/combiOrder/combiOrder'
+
query
})
})
//如果有联票
// if(this.chooseProduct.find(item=>item.ticketType==2)){
// uni.navigateTo({
// url: '/pages/combination/combiOrder/combiOrder' + query
// })
// }else{
// uni.navigateTo({
// url: '/pages/scenic/scenicCombiOrder/scenicCombiOrder' + query
// })
// }
}
}
},
},
//---跳转影集页面
//---跳转影集页面
...
...
pages/indexs/center/center.vue
View file @
a377a907
...
@@ -134,14 +134,14 @@
...
@@ -134,14 +134,14 @@
我的影集
我的影集
</view>
</view>
</view>
</view>
<view
class=
"middle3-list"
@
click=
"goshopping()"
>
<
!--
<
view
class=
"middle3-list"
@
click=
"goshopping()"
>
<view>
<view>
<image
src=
"@/static/img/my/center/shopping.png"
></image>
<image
src=
"@/static/img/my/center/shopping.png"
></image>
</view>
</view>
<view>
<view>
购物车
购物车
</view>
</view>
</view>
</view>
-->
<view
class=
"middle3-list"
@
click=
"goTravelList()"
>
<view
class=
"middle3-list"
@
click=
"goTravelList()"
>
<view>
<view>
<image
src=
"@/static/img/my/center/schedule.png"
></image>
<image
src=
"@/static/img/my/center/schedule.png"
></image>
...
...
pages/my/takeNumber/numberChoose/numberChoose.vue
View file @
a377a907
...
@@ -144,7 +144,7 @@ export default {
...
@@ -144,7 +144,7 @@ export default {
}
}
.btn
{
.btn
{
display
:
inline-block
;
display
:
inline-block
;
line-height
:
60
rpx
;
line-height
:
76
rpx
;
width
:
212rpx
;
width
:
212rpx
;
height
:
80rpx
;
height
:
80rpx
;
background
:
#3688FF
;
background
:
#3688FF
;
...
...
pages/my/takeNumber/numberIndex/numberIndex.vue
View file @
a377a907
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
<view
class=
"wrap"
>
<view
class=
"wrap"
>
<view>
<view>
<view
class=
"first"
>
<view
class=
"first"
>
<input
placeholder=
"请输入购票预留手机号/身份证号"
v-model=
"
search
"
/>
<input
placeholder=
"请输入购票预留手机号/身份证号"
v-model=
"
credentialNumber
"
/>
</view>
</view>
<view
class=
"query"
>
<view
class=
"query"
>
<text
class=
"button"
@
click=
"
q
uery()"
>
查询订单
</text>
<text
class=
"button"
@
click=
"
clickQ
uery()"
>
查询订单
</text>
</view>
</view>
</view>
</view>
...
@@ -33,19 +33,26 @@ export default {
...
@@ -33,19 +33,26 @@ export default {
data
()
{
data
()
{
return
{
return
{
showMark
:
false
,
//是否显示遮罩层
showMark
:
false
,
//是否显示遮罩层
search
:
''
,
//输入框的值
credentialNumber
:
''
,
//输入框的值
noNumberList
:[],
//未排号站点列表
noNumberList
:[],
//未排号站点列表
orderId
:
''
,
//订单Id
orderId
:
''
,
//订单Id
merchantCode
:
''
//商户码
merchantCode
:
''
,
//商户码
thirdOrderId
:
''
,
//三方Id
channelName
:
''
,
//渠道名称
productName
:
''
,
//产品名称
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
merchantCode
=
this
.
$commonjs
.
getKey
(
option
,
'merchantCode'
)
this
.
merchantCode
=
this
.
$commonjs
.
getKey
(
option
,
'merchantCode'
)
},
},
methods
:
{
methods
:
{
//---点击查询
clickQuery
(){
uni
.
$u
.
throttle
(
this
.
queryList
,
3000
)
},
//---查询订单
//---查询订单
query
(){
query
List
(){
if
(
!
this
.
search
){
if
(
!
this
.
credentialNumber
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'请输入手机号或者身份证号'
,
title
:
'请输入手机号或者身份证号'
,
icon
:
'none'
icon
:
'none'
...
@@ -53,7 +60,7 @@ export default {
...
@@ -53,7 +60,7 @@ export default {
return
return
}
}
let
data
=
{
let
data
=
{
search
:
this
.
search
,
//输入框的值
credentialNumber
:
this
.
credentialNumber
,
//输入框的值
userId
:
uni
.
getStorageSync
(
'openid'
)
||
''
,
userId
:
uni
.
getStorageSync
(
'openid'
)
||
''
,
merchantCode
:
this
.
merchantCode
,
merchantCode
:
this
.
merchantCode
,
startPlayDate
:
new
Date
().
Format
(
'yyyy-MM-dd'
)
+
' 00:00:00'
,
//开始日期
startPlayDate
:
new
Date
().
Format
(
'yyyy-MM-dd'
)
+
' 00:00:00'
,
//开始日期
...
@@ -65,10 +72,13 @@ export default {
...
@@ -65,10 +72,13 @@ export default {
if
(
list
.
length
==
0
){
if
(
list
.
length
==
0
){
this
.
showMark
=
true
this
.
showMark
=
true
}
else
{
}
else
{
this
.
orderId
=
list
[
0
].
id
//下面参数需要传给下一个页面
let
thirdId
=
list
[
0
].
thirdOrderId
||
''
this
.
orderId
=
list
[
0
].
id
||
''
let
merchantId
=
list
[
0
].
merchantId
||
''
this
.
thirdOrderId
=
list
[
0
].
thirdOrderId
||
''
this
.
getFetchInfo
(
thirdId
,
merchantId
)
this
.
merchantCode
=
list
[
0
].
merchantCode
||
''
this
.
channelName
=
list
[
0
].
channelName
||
''
this
.
productName
=
list
[
0
].
productName
||
''
this
.
getFetchInfo
()
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -79,10 +89,10 @@ export default {
...
@@ -79,10 +89,10 @@ export default {
})
})
},
},
//---获取排号信息
//---获取排号信息
getFetchInfo
(
thirdId
,
merchantId
){
getFetchInfo
(){
let
data
=
{
let
data
=
{
thirdId
,
thirdId
:
this
.
thirdOrderId
,
merchant
Id
merchant
Code
:
this
.
merchantCode
}
}
this
.
noNumberList
=
[]
this
.
noNumberList
=
[]
this
.
$request
(
'distribution/distribution/getFetchInfoOta'
,
data
).
then
((
res
)
=>
{
this
.
$request
(
'distribution/distribution/getFetchInfoOta'
,
data
).
then
((
res
)
=>
{
...
@@ -161,7 +171,7 @@ export default {
...
@@ -161,7 +171,7 @@ export default {
if
(
this
.
noNumberList
.
length
==
1
){
if
(
this
.
noNumberList
.
length
==
1
){
let
chooseArea
=
JSON
.
stringify
(
this
.
noNumberList
[
0
])
let
chooseArea
=
JSON
.
stringify
(
this
.
noNumberList
[
0
])
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/my/takeNumber/rowNumber/rowNumber?chooseArea=
${
chooseArea
}
&orderId=
${
this
.
orderId
}
`
url
:
`/pages/my/takeNumber/rowNumber/rowNumber?chooseArea=
${
chooseArea
}
&orderId=
${
this
.
orderId
}
&thirdOrderId=
${
this
.
thirdOrderId
}
&merchantCode=
${
this
.
merchantCode
}
&channelName=
${
this
.
channelName
}
&productName=
${
this
.
productName
}
`
})
})
}
}
if
(
this
.
noNumberList
.
length
>
1
){
if
(
this
.
noNumberList
.
length
>
1
){
...
...
pages/my/takeNumber/rowNumber/rowNumber.vue
View file @
a377a907
...
@@ -79,44 +79,25 @@
...
@@ -79,44 +79,25 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
merchantCode
:
''
,
//商家编号
chooseArea
:
''
,
//站点信息
chooseArea
:
''
,
//站点信息
numberInfo
:
''
,
//排号信息
merchantCode
:
''
,
//商家编号
channelName
:
''
,
//渠道名称
channelName
:
''
,
//渠道名称
productName
:
''
,
//产品名称
productName
:
''
,
//产品名称
thirdOrderId
:
''
,
//三方订单Id
thirdOrderId
:
''
,
//三方订单Id
orderId
:
''
,
//订单Id
orderId
:
''
,
//订单Id
ticketPhone
:
''
,
//联系人电话
numberInfo
:
''
,
//排号信息
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
chooseArea
=
option
.
chooseArea
?
JSON
.
parse
(
option
.
chooseArea
):
''
this
.
chooseArea
=
option
.
chooseArea
?
JSON
.
parse
(
option
.
chooseArea
):
''
this
.
orderId
=
option
.
orderId
||
''
this
.
orderId
=
option
.
orderId
||
''
this
.
query
()
this
.
merchantCode
=
option
.
merchantCode
||
''
},
this
.
channelName
=
option
.
channelName
||
''
methods
:
{
this
.
productName
=
option
.
productName
||
''
//---查询订单信息
this
.
thirdOrderId
=
option
.
thirdOrderId
||
''
query
(){
let
data
=
{
search
:
this
.
orderId
}
this
.
$request
(
'order/userOrder/findOrderPageListByCode'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
let
list
=
res
.
data
||
[]
this
.
thirdOrderId
=
list
[
0
].
thirdOrderId
this
.
merchantCode
=
list
[
0
].
merchantCode
this
.
channelName
=
list
[
0
].
channelName
this
.
productName
=
list
[
0
].
productName
this
.
ticketPhone
=
list
[
0
].
ticketPhone
this
.
getNumberInfo
()
this
.
getNumberInfo
()
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
},
methods
:
{
//---获取排号信息
//---获取排号信息
getNumberInfo
(){
getNumberInfo
(){
let
data
=
{
let
data
=
{
...
@@ -147,12 +128,18 @@ export default {
...
@@ -147,12 +128,18 @@ export default {
},
},
//---立即取号
//---立即取号
rowNumber
(){
rowNumber
(){
if
(
!
this
.
merchantCode
||!
this
.
chooseArea
.
projectIds
||!
this
.
thirdOrderId
||!
this
.
orderId
){
uni
.
showToast
({
title
:
'缺少取号参数'
,
icon
:
'none'
})
return
}
let
data
=
{
let
data
=
{
merchantCode
:
this
.
merchantCode
,
//商户编号
merchantCode
:
this
.
merchantCode
,
//商户编号
areaCode
:
this
.
chooseArea
.
projectIds
,
//站点编号
areaCode
:
this
.
chooseArea
.
projectIds
,
//站点编号
thirdId
:
this
.
thirdOrderId
,
//三方订单id
thirdId
:
this
.
thirdOrderId
,
//三方订单id
userId
:
uni
.
getStorageSync
(
'openid'
)
||
''
,
userId
:
uni
.
getStorageSync
(
'openid'
)
||
''
,
ticketPhone
:
this
.
ticketPhone
,
//电话号码
orderId
:
this
.
orderId
,
//订单Id
orderId
:
this
.
orderId
,
//订单Id
}
}
this
.
$request
(
'distribution/distribution/newFetchNumber'
,
data
).
then
((
res
)
=>
{
this
.
$request
(
'distribution/distribution/newFetchNumber'
,
data
).
then
((
res
)
=>
{
...
...
pages/scenic/scenicCombiOrder/scenicCombiOrder-old.vue
deleted
100644 → 0
View file @
3720a1f1
<
template
>
<view>
<web-view
:src=
"outUrl"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
enterUrl
:
''
,
//进入页面路由
outUrl
:
''
,
//跳出页面路由
}
},
onLoad
(
option
){
let
groupId
=
option
.
groupId
||
''
let
groupChannelId
=
option
.
groupChannelId
||
''
let
companyId
=
option
.
companyId
||
''
let
productIdList
=
option
.
productIdList
||
''
let
orderSource
=
option
.
orderSource
||
''
let
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
let
pdUserId
=
uni
.
getStorageSync
(
'userId'
)
let
baseUrl
=
this
.
$wxurl
+
'combiOrder?pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
let
url
=
'&groupId='
+
groupId
+
'&groupChannelId='
+
groupChannelId
+
'&productIdList='
+
productIdList
+
'&orderSource='
+
orderSource
+
'&companyId='
+
companyId
+
'&ifyukuaiCode='
+
ifyukuaiCode
this
.
outUrl
=
baseUrl
+
url
},
methods
:
{
}
}
</
script
>
<
style
>
</
style
>
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
a377a907
...
@@ -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.startDate && item.endDate && 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"
>
...
@@ -140,40 +140,45 @@
...
@@ -140,40 +140,45 @@
</u-number-box>
</u-number-box>
</view>
</view>
</view>
</view>
<view
class=
"list-coupon"
v-if=
"couponData.length>0"
@
click=
"showCoupon()"
>
<!-- 有可用优惠券,并且未选中 -->
<view
class=
" list-coupon"
v-if=
"item.couponData&&item.couponData.masterSlaveCouponList&&item.couponData.masterSlaveCouponList.length>0&&!item.chooseCouponObj"
@
click=
"showCoupon(index)"
>
<view>
<view>
券
券
</view>
</view>
<!-- 有可用优惠券,并且未选中 -->
<template
v-if=
"item.couponData.masterSlaveCouponList&&item.couponData.masterSlaveCouponList.length>0&&!item.chooseCouponObj"
>
<view>
<view>
{{
item
.
couponData
.
masterSlaveCouponList
[
0
].
couponName
}}
{{
item
.
couponData
.
masterSlaveCouponList
[
0
].
couponName
}}
</view>
</view>
<view
>
<view
>
未使用优惠券
未使用优惠券
</view>
</view>
</
template
>
<u-icon
name=
"arrow-right"
color=
"#3688FF"
></u-icon>
</view>
<!-- 有可用优惠券 -->
<!-- 有可用优惠券 -->
<
template
v-if=
"item.chooseCouponObj&&item.savedMoney>0"
>
<view
class=
" list-coupon"
v-if=
"item.chooseCouponObj&&item.chooseCouponObj.savedMoney>0"
@
click=
"showCoupon(index)"
>
<view>
券
</view>
<view>
<view>
{{
item
.
chooseCouponObj
.
couponName
}}
{{
item
.
chooseCouponObj
.
couponName
}}
</view>
</view>
<view
style=
"font-size: 32rpx;"
>
<view
style=
"font-size: 32rpx;"
>
<text
style=
"font-size: 24rpx;position: relative;top: 6rpx;"
>
¥
</text>
<text
style=
"font-size: 24rpx;position: relative;top: 6rpx;"
>
¥
</text>
{{
parseFloat
(
item
.
savedMoney
.
toFixed
(
2
))
}}
{{
parseFloat
(
item
.
chooseCouponObj
.
savedMoney
.
toFixed
(
2
))
}}
</view>
<u-icon
name=
"arrow-right"
color=
"#3688FF"
></u-icon>
</view>
</view>
</
template
>
<!-- 可用优惠券条件-->
<!-- 可用优惠券条件-->
<
template
v-if=
"item.ableConpon"
>
<view
class=
" list-coupon"
v-if=
"item.ableConpon"
@
click=
"showCoupon(index)"
>
<view>
券
</view>
<view>
<view>
{{
item
.
ableConpon
.
couponName
}}
{{
item
.
ableConpon
.
couponName
}}
</view>
</view>
<view>
<view>
{{
item
.
ableConpon
.
couponRule
}}
{{
item
.
ableConpon
.
couponRule
}}
</view>
</view>
</
template
>
<u-icon
name=
"arrow-right"
color=
"#3688FF"
></u-icon>
<u-icon
name=
"arrow-right"
color=
"#3688FF"
></u-icon>
</view>
</view>
</view>
</view>
...
@@ -190,34 +195,34 @@
...
@@ -190,34 +195,34 @@
<!--
<text
class=
"title-bold"
v-if=
"contactNum - chooseContact.length > 0"
>
,还需
{{
contactNum
-
chooseContact
.
length
}}
位
</text>
-->
<!--
<text
class=
"title-bold"
v-if=
"contactNum - chooseContact.length > 0"
>
,还需
{{
contactNum
-
chooseContact
.
length
}}
位
</text>
-->
</text>
</text>
</view>
</view>
<view
class=
"visitorPlus"
v-if=
"contactTotal.length>0"
>
<view
class=
"visitorPlus"
v-if=
"
item.contactTotal&&item.
contactTotal.length>0"
>
<!-- 这里key必须是index,如果是id会出现数据改变和样式不改变的bug -->
<!-- 这里key必须是index,如果是id会出现数据改变和样式不改变的bug -->
<view
<view
class=
"plus-list"
class=
"plus-list"
:class=
"{on:item.ifChoose}"
:class=
"
{on:item
2
.ifChoose}"
v-for=
"(item2, index2) of contactTotal.slice(0, 3)"
v-for="(item2, index2) of
item.
contactTotal.slice(0, 3)"
@
click=
"visitorChoose(index2)"
@click="visitorChoose(index
,index
2)"
:key="index2"
:key="index2"
>
>
{{
item2
.
name
}}
{{
item2
.
name
}}
<view
v-if=
"item.ifChoose"
class=
"date-icon"
>
<view
v-if=
"item
2
.ifChoose"
class=
"date-icon"
>
<u-icon
name=
"checkmark"
color=
"#ffffff"
></u-icon>
<u-icon
name=
"checkmark"
color=
"#ffffff"
></u-icon>
</view>
</view>
</view>
</view>
<view
@
click=
"showContacts()"
class=
"plus-list plus-list-last"
>
<view
@
click=
"showContacts(
index
)"
class=
"plus-list plus-list-last"
>
选择/新增
选择/新增
<u-icon
name=
"arrow-right"
color=
"#3688FF"
></u-icon>
<u-icon
name=
"arrow-right"
color=
"#3688FF"
></u-icon>
</view>
</view>
</view>
</view>
<view
class=
"visitorBtn"
v-else
@
click=
"
$refs.editContacts.showEdit = true
"
>
<view
class=
"visitorBtn"
v-else
@
click=
"
showEdit()
"
>
<u-icon
name=
"plus-circle"
color=
"#3688FF"
size=
"52"
></u-icon>
<u-icon
name=
"plus-circle"
color=
"#3688FF"
size=
"52"
></u-icon>
<text
style=
"margin-left:16rpx;"
>
新增
</text>
<text
style=
"margin-left:16rpx;"
>
新增
</text>
</view>
</view>
<view
class=
"visitorEdit"
v-show=
"item.chooseContact&&item.chooseContact.length
>
0"
>
<view
class=
"visitorEdit"
v-show=
"item.chooseContact&&item.chooseContact.length
>
0"
>
<view
class=
"edit-list"
v-for=
"(item2, index2) of item.chooseContact"
:key=
"item2.id"
>
<view
class=
"edit-list"
v-for=
"(item2, index2) of item.chooseContact"
:key=
"item2.id"
>
<view
@
click=
"delChooseContact(item
2,
index2)"
>
<view
@
click=
"delChooseContact(item
,item2,
index2)"
>
<u-icon
name=
"close-circle"
color=
"#3688ff"
size=
"40"
></u-icon>
<u-icon
name=
"close-circle"
color=
"#3688ff"
size=
"40"
></u-icon>
</view>
</view>
...
@@ -290,12 +295,12 @@
...
@@ -290,12 +295,12 @@
:defaultAreaCode=
"defaultAreaCode"
:defaultAreaCode=
"defaultAreaCode"
></chooseArea>
></chooseArea>
<times
ref=
"times"
:chooseTimeList=
"chooseTimeList"
@
timeConfig=
"timeConfig"
:timeActive=
"timeActive"
></times>
<times
ref=
"times"
:chooseTimeList=
"chooseTimeList"
@
timeConfig=
"timeConfig"
:timeActive=
"timeActive"
></times>
<editContacts
ref=
"editContacts"
:editContact
=
"editContact"
:contactTotal=
"contactTotal"
></editContacts>
<editContacts
ref=
"editContacts"
:editContact
Data=
"editContactData"
></editContacts>
<contactList
<contactList
@
contactListConfig=
'contactListConfig'
ref=
"contactList"
ref=
"contactList"
@
getEditContact=
"getEditContact"
:contactTotal=
"productList[moreContactIndex].contactTotal"
:contactTotal=
"contactTotal"
:contactNum=
"productList[moreContactIndex].contactNum"
:contactNum=
"contactNum"
></contactList>
></contactList>
<orderCoupon
:couponData=
"couponData"
ref=
"orderCoupon"
@
couponChoose=
"couponChoose"
:chooseCouponObj=
"chooseCouponObj"
></orderCoupon>
<orderCoupon
:couponData=
"couponData"
ref=
"orderCoupon"
@
couponChoose=
"couponChoose"
:chooseCouponObj=
"chooseCouponObj"
></orderCoupon>
<!--一个站点时获取排队信息弹窗-->
<!--一个站点时获取排队信息弹窗-->
...
@@ -360,26 +365,19 @@ export default {
...
@@ -360,26 +365,19 @@ export default {
productIdList
:[],
//产品id列表入参
productIdList
:[],
//产品id列表入参
timeActive
:
10000
,
//时间下标,默认不选中
timeActive
:
10000
,
//时间下标,默认不选中
buyKnowData
:
''
,
//购买须知数据
buyKnowData
:
''
,
//购买须知数据
editContact
:
''
,
//编辑联系人传值对象
editContact
Data
:
''
,
//编辑联系人传值对象
ticketPhone
:
''
,
//联系电话
ticketPhone
:
''
,
//联系电话
chooseContact
:
[],
//选中的游客信息列表
timeNumber
:
''
,
//当前时间转化为数字
timeNumber
:
''
,
//当前时间转化为数字
timeFlag
:
''
,
//setTimeout函数
timeFlag
:
''
,
//setTimeout函数
productDepositTotal
:
0
,
//产品总押金
productDepositTotal
:
0
,
//产品总押金
docQuery
:
''
,
//元素变量
docQuery
:
''
,
//元素变量
timeScroll
:
''
,
//时间滚动值
timeScroll
:
''
,
//时间滚动值
openid
:
uni
.
getStorageSync
(
'openid'
)
||
''
,
//openid
openid
:
uni
.
getStorageSync
(
'openid'
)
||
''
,
//openid
couponData
:[],
//所有劵数据
chooseCouponObj
:
''
,
//默认选中最优价格优惠券
ableConpon
:
''
,
//没有可用优惠券时,达到一定条件可用,显示达到的条件
orderStatus
:
''
,
//上下架状态,任何一个产品状态为下架,该状态为下架
orderStatus
:
''
,
//上下架状态,任何一个产品状态为下架,该状态为下架
chooseTimeList
:[],
//选中产品时间列表
chooseTimeList
:[],
//选中产品时间列表
moreDateIndex
:
0
,
//点击的更多日期下标
moreTimeIndex
:
0
,
//点击的更多时间下标
chooseDateList
:[],
//点击更多日期时对应的日期列表
chooseDateList
:[],
//点击更多日期时对应的日期列表
showTelephone
:
true
,
//用于判断是否显示输入联系人电话号码
showTelephone
:
true
,
//用于判断是否显示输入联系人电话号码
areaIndex
:
0
,
//选择站点时对应的产品下标
areaIndex
:
0
,
//选择站点时对应的产品下标
contactTotal
:
[],
//所有联系人列表
originalTotal
:
0
,
//原价总价
originalTotal
:
0
,
//原价总价
sellTotal
:
0
,
//卖价总价
sellTotal
:
0
,
//卖价总价
maxBookNum
:
999
,
//最大购买数量
maxBookNum
:
999
,
//最大购买数量
...
@@ -389,7 +387,12 @@ export default {
...
@@ -389,7 +387,12 @@ export default {
sortInforPop
:
false
,
//一个站点时获取排队信息弹窗
sortInforPop
:
false
,
//一个站点时获取排队信息弹窗
showChooseArea
:
false
,
//控制选择站点弹窗显示隐藏
showChooseArea
:
false
,
//控制选择站点弹窗显示隐藏
defaultAreaCode
:
''
,
//默认站点
defaultAreaCode
:
''
,
//默认站点
numberSync
:
true
,
//数量和联系人同步
moreDateIndex
:
0
,
//点击的更多日期下标
moreTimeIndex
:
0
,
//点击的更多时间下标
moreContactIndex
:
0
,
//点击的选择、新增联系人下标
couponIndex
:
''
,
//点击的券的下标
couponData
:[],
//选择产品的所有劵数据
chooseCouponObj
:
''
,
//选择产品选中的券
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -531,6 +534,7 @@ export default {
...
@@ -531,6 +534,7 @@ export default {
//解决初始化日期不显示的情况
//解决初始化日期不显示的情况
this
.
$forceUpdate
()
this
.
$forceUpdate
()
}
else
{
}
else
{
this
.
maxBookNum
=
0
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
,
icon
:
'none'
icon
:
'none'
...
@@ -628,25 +632,33 @@ export default {
...
@@ -628,25 +632,33 @@ export default {
}
}
this
.
$request
(
'wechatUser/contact/findContactList'
,
data
).
then
(
res
=>
{
this
.
$request
(
'wechatUser/contact/findContactList'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
if
(
res
.
code
==
'00'
)
{
this
.
contactTotal
=
res
.
data
let
contactTotal
=
res
.
data
||
[]
this
.
contactTotal
.
forEach
(
item
=>
{
contactTotal
.
forEach
(
item
=>
{
//用于判断是否被选中
//用于判断是否被选中
item
.
ifChoose
=
false
item
.
ifChoose
=
false
})
})
this
.
productList
.
forEach
((
item
)
=>
{
item
.
contactTotal
=
JSON
.
parse
(
JSON
.
stringify
(
contactTotal
))
//数据不出现问题
this
.
$forceUpdate
()
})
//编辑成功重新调该方法时,把之前选中的游客,设为选中状态
//编辑成功重新调该方法时,把之前选中的游客,设为选中状态
this
.
contactTotal
.
forEach
(
item
=>
{
this
.
productList
.
forEach
(
item
=>
{
this
.
chooseContact
.
forEach
(
item2
=>
{
item
.
contactTotal
.
forEach
(
item2
=>
{
if
(
item
.
id
==
item2
.
id
)
{
item
.
chooseContact
.
forEach
(
item3
=>
{
if
(
item2
.
id
==
item3
.
id
)
{
item
.
ifChoose
=
true
item
.
ifChoose
=
true
}
}
})
})
})
})
//删除联系人成功重新调该方法时,之前选中的联系人,数据库可能被删除,删除该联系人
this
.
chooseContact
.
forEach
((
item
,
index
)
=>
{
if
(
!
this
.
contactTotal
.
find
(
item2
=>
item
.
id
==
item2
.
id
))
{
this
.
chooseContact
.
splice
(
index
,
1
)
}
})
})
// //删除联系人成功重新调该方法时,之前选中的联系人,数据库可能被删除,删除该联系人
// this.chooseContact.forEach((item, index) => {
// if (!this.contactTotal.find(item2 => item.id == item2.id)) {
// this.chooseContact.splice(index, 1)
// }
// })
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
,
...
@@ -702,7 +714,6 @@ export default {
...
@@ -702,7 +714,6 @@ export default {
},
},
//---获取子组件的传值---已修改
//---获取子组件的传值---已修改
areaSure
(
data
)
{
areaSure
(
data
)
{
console
.
log
(
this
.
areaIndex
)
this
.
productList
[
this
.
areaIndex
].
areaObj
=
data
this
.
productList
[
this
.
areaIndex
].
areaObj
=
data
},
},
//---展示选择站点---已修改
//---展示选择站点---已修改
...
@@ -729,7 +740,8 @@ export default {
...
@@ -729,7 +740,8 @@ export default {
dateChoose
(
item
,
item2
,
index
)
{
dateChoose
(
item
,
item2
,
index
)
{
item
.
dateActive
=
index
//修改选中样式
item
.
dateActive
=
index
//修改选中样式
this
.
maxBookNum
=
999
//默认可以去支付
this
.
maxBookNum
=
999
//默认可以去支付
item
.
realMaxNum
=
Math
.
min
(
item
.
maxBookNum
,
item2
.
surplus
)
//获取实际最大购买数量
//由于会多次进行比较,防止出现bug,故重新增加一个字段,获取实际最大购买数量
item
.
realMaxNum
=
Math
.
min
(
item
.
maxBookNum
,
item2
.
surplus
)
for
(
let
i
=
0
;
i
<
this
.
productList
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
this
.
productList
.
length
;
i
++
){
let
item
=
this
.
productList
[
i
]
let
item
=
this
.
productList
[
i
]
//任何一个产品无库存时,无法进行支付
//任何一个产品无库存时,无法进行支付
...
@@ -806,48 +818,97 @@ export default {
...
@@ -806,48 +818,97 @@ export default {
this
.
$forceUpdate
()
this
.
$forceUpdate
()
}).
exec
()
}).
exec
()
},
},
//---获取点击的编辑联系人信息,传给编辑联系人组件
//---删除选中的联系人---已修改
getEditContact
(
data
)
{
delChooseContact
(
item
,
item2
,
index2
)
{
this
.
editContact
=
data
},
//---删除选中的联系人
delChooseContact
(
item
,
index
)
{
//所有联系人中找到删除联系人下标,改成未选中状态
//所有联系人中找到删除联系人下标,改成未选中状态
let
sub
=
this
.
contactTotal
.
findIndex
(
item2
=>
item2
.
id
==
item
.
id
)
let
sub
=
item
.
contactTotal
.
findIndex
(
item3
=>
item3
.
id
==
item2
.
id
)
this
.
contactTotal
[
sub
].
ifChoose
=
false
item
.
contactTotal
[
sub
].
ifChoose
=
false
this
.
chooseContact
.
splice
(
index
,
1
)
//删除数组
item
.
chooseContact
.
splice
(
index2
,
1
)
//删除数组
//解决样式和数据未及时更新问题
this
.
$forceUpdate
()
},
},
//---展示编辑联系人
//---展示编辑联系人---已修改
showEdit
(
obj
)
{
showEdit
(
data
)
{
this
.
$refs
.
editContacts
.
showEdit
=
true
let
obj
=
data
||
''
this
.
editContact
=
obj
this
.
$refs
.
editContacts
.
showPop
=
true
this
.
editContactData
=
obj
},
},
//---展示新增联系人,并获取联系人列表
//---展示新增联系人,并获取联系人列表---已修改
showContacts
()
{
showContacts
(
index
)
{
this
.
moreContactIndex
=
index
this
.
$refs
.
contactList
.
showPop
=
true
this
.
$refs
.
contactList
.
showPop
=
true
},
},
//---游客选择
//---联系人列表弹窗确认选中---已修改
visitorChoose
(
i
)
{
contactListConfig
(
data
){
let
chooseList
=
this
.
chooseContact
let
index
=
this
.
moreContactIndex
let
data
=
this
.
contactTotal
this
.
productList
[
index
].
chooseContact
=
data
data
[
i
].
ifChoose
=
!
data
[
i
].
ifChoose
this
.
productList
[
index
].
contactTotal
.
forEach
(
item
=>
{
if
(
data
[
i
].
ifChoose
)
{
//在总的列表里面回去选中的联系人
if
(
chooseList
.
length
==
this
.
contactNum
)
{
item
.
ifChoose
=
false
this
.
productList
[
index
].
chooseContact
.
forEach
(
item2
=>
{
if
(
item
.
id
==
item2
.
id
){
item
.
ifChoose
=
true
}
})
})
//选中的排在前面
this
.
productList
[
index
].
contactTotal
.
sort
(
function
(
a
,
b
)
{
return
b
.
ifChoose
-
a
.
ifChoose
})
//选中样式以及选中数据的更新
this
.
$forceUpdate
()
},
//---游客选择---已修改
visitorChoose
(
index
,
index2
)
{
//底层原理不明,特殊情况,需特殊处理
//直接传入item,item2时 会报错,故选择传入下标
let
item
=
this
.
productList
[
index
]
let
item2
=
this
.
productList
[
index
].
contactTotal
[
index2
]
item2
.
ifChoose
=!
item2
.
ifChoose
if
(
item2
.
ifChoose
)
{
if
(
item
.
chooseContact
.
length
==
item
.
contactNum
)
{
//需要人数满足时,点击增加联系人时,删除最后一个,增加点击的那个人
//需要人数满足时,点击增加联系人时,删除最后一个,增加点击的那个人
chooseList
[
chooseList
.
length
-
1
].
ifChoose
=
false
item
.
contactTotal
.
forEach
(
item3
=>
{
chooseList
.
splice
(
chooseList
.
length
-
1
,
1
)
if
(
item3
.
id
==
item
.
chooseContact
[
item
.
chooseContact
.
length
-
1
].
id
){
item3
.
ifChoose
=
false
}
})
item
.
chooseContact
.
splice
(
item
.
chooseContact
.
length
-
1
,
1
)
}
item
.
chooseContact
.
push
(
item2
)
//加入数组
}
else
{
let
index
=
item
.
chooseContact
.
findIndex
(
items
=>
{
return
items
.
id
==
item2
.
id
})
item
.
chooseContact
.
splice
(
index
,
1
)
//删除数组
}
//解决选中联系人样式不更新的bug
this
.
$forceUpdate
()
},
//---添加并选中联系人--用于添加联系人之后直接从联系人列表选出需要填写的几位联系人
addChoose
()
{
let
data
=
{
openid
:
this
.
openid
}
this
.
$request
(
'wechatUser/contact/findContactList'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
this
.
contactTotal
=
res
.
data
for
(
let
i
=
0
;
i
<
this
.
contactNum
;
i
++
)
{
let
item
=
this
.
contactTotal
[
i
]
||
null
if
(
item
)
{
item
.
ifChoose
=
true
}
}
chooseList
.
push
(
data
[
i
])
//加入数组
}
this
.
chooseContact
=
this
.
contactTotal
.
slice
(
0
,
this
.
contactNum
)
}
else
{
}
else
{
let
index
=
chooseList
.
findIndex
(
items
=>
{
uni
.
showToast
({
return
items
.
id
==
data
[
i
].
id
title
:
res
.
message
,
icon
:
'none'
})
})
chooseList
.
splice
(
index
,
1
)
//删除数组
}
}
//先注释
})
// this.$forceUpdate()
},
},
//---订单数量变化---
正在
修改
//---订单数量变化---
已
修改
buyNumChange
(
e
)
{
buyNumChange
(
e
)
{
let
value
=
e
.
value
let
value
=
e
.
value
let
index
=
e
.
name
let
index
=
e
.
name
...
@@ -868,13 +929,13 @@ export default {
...
@@ -868,13 +929,13 @@ export default {
//当选中联系人数量大于购买数量时
//当选中联系人数量大于购买数量时
item
.
chooseContact
.
splice
(
item
.
chooseContact
.
length
-
1
,
1
)
//删除多余的联系人
item
.
chooseContact
.
splice
(
item
.
chooseContact
.
length
-
1
,
1
)
//删除多余的联系人
//联系人列表重新判断是否选中
//联系人列表重新判断是否选中
item
.
contactTotal
.
forEach
(
item
=>
{
item
.
ifChoose
=
false
})
item
.
chooseContact
.
forEach
(
item
=>
{
item
.
contactTotal
.
forEach
(
item2
=>
{
item
.
contactTotal
.
forEach
(
item2
=>
{
if
(
item
.
id
==
item2
.
id
){
item2
.
ifChoose
=
false
item2
.
ifChoose
=
true
})
item
.
chooseContact
.
forEach
(
item2
=>
{
item
.
contactTotal
.
forEach
(
item3
=>
{
if
(
item2
.
id
==
item3
.
id
){
item3
.
ifChoose
=
true
}
}
})
})
})
})
...
@@ -887,7 +948,7 @@ export default {
...
@@ -887,7 +948,7 @@ export default {
this
.
computedPrice
()
this
.
computedPrice
()
clearTimeout
(
this
.
timeFlag
)
clearTimeout
(
this
.
timeFlag
)
this
.
timeFlag
=
setTimeout
(()
=>
{
this
.
timeFlag
=
setTimeout
(()
=>
{
this
.
initCoupon
()
this
.
initCoupon
(
item
)
},
1500
)
},
1500
)
},
},
//---展示购票须知---已修改
//---展示购票须知---已修改
...
@@ -895,73 +956,50 @@ export default {
...
@@ -895,73 +956,50 @@ export default {
this
.
buyKnowData
=
this
.
productList
[
index
]
this
.
buyKnowData
=
this
.
productList
[
index
]
this
.
$refs
.
buyKnow
.
showPop
=
true
this
.
$refs
.
buyKnow
.
showPop
=
true
},
},
//---添加并选中联系人--用于添加联系人之后直接从联系人列表选出需要填写的几位联系人
//---加载优惠券---已修改
addChoose
()
{
initCoupon
(
item
)
{
let
data
=
{
openid
:
this
.
openid
}
this
.
$request
(
'wechatUser/contact/findContactList'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
this
.
contactTotal
=
res
.
data
for
(
let
i
=
0
;
i
<
this
.
contactNum
;
i
++
)
{
let
item
=
this
.
contactTotal
[
i
]
||
null
if
(
item
)
{
item
.
ifChoose
=
true
}
}
this
.
chooseContact
=
this
.
contactTotal
.
slice
(
0
,
this
.
contactNum
)
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
//---加载优惠券
initCoupon
()
{
let
savedMoneyList
=
[]
let
savedMoneyList
=
[]
this
.
chooseCouponObj
=
''
item
.
chooseCouponObj
=
''
this
.
ableConpon
=
''
item
.
ableConpon
=
''
this
.
couponData
=
[]
item
.
couponData
=
[]
let
data
=
{
let
data
=
{
productId
:
this
.
productI
d
,
//产品id
productId
:
item
.
i
d
,
//产品id
tickets
:
this
.
buyNum
,
//房间
数量
tickets
:
item
.
buyNum
,
//
数量
singleMoney
:
this
.
sellingPrice
,
//单价
singleMoney
:
item
.
sellingPrice
,
//单价
money
:
parseFloat
((
this
.
buyNum
*
this
.
sellingPrice
).
toFixed
(
2
)),
//订单总价,不算券,和现金红包
money
:
parseFloat
((
item
.
buyNum
*
item
.
sellingPrice
).
toFixed
(
2
)),
//订单总价,不算券,和现金红包
merchantId
:
this
.
merchantId
,
//商户Id
merchantId
:
item
.
merchantId
,
//商户Id
openid
:
this
.
openid
openid
:
this
.
openid
}
}
this
.
$request
(
'wechatUser/myPage/usableCouponList'
,
data
).
then
((
res
)
=>
{
this
.
$request
(
'wechatUser/myPage/usableCouponList'
,
data
,
true
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
)
{
if
(
res
.
code
==
'00'
)
{
this
.
couponData
=
res
.
data
item
.
couponData
=
res
.
data
let
masterSlaveCouponList
=
res
.
data
.
masterSlaveCouponList
let
masterSlaveCouponList
=
res
.
data
.
masterSlaveCouponList
if
(
masterSlaveCouponList
&&
masterSlaveCouponList
.
length
>
0
)
{
if
(
masterSlaveCouponList
&&
masterSlaveCouponList
.
length
>
0
)
{
masterSlaveCouponList
.
forEach
((
item
)
=>
{
//获取最优券
masterSlaveCouponList
.
forEach
((
item
2
)
=>
{
//获取最优券
savedMoneyList
.
push
(
item
.
savedMoney
)
savedMoneyList
.
push
(
item
2
.
savedMoney
)
})
})
let
maxMoney
=
Math
.
max
.
apply
(
null
,
savedMoneyList
)
let
maxMoney
=
Math
.
max
.
apply
(
null
,
savedMoneyList
)
let
arr
=
masterSlaveCouponList
.
filter
((
item
)
=>
{
//找到最大值的数组
let
arr
=
masterSlaveCouponList
.
filter
((
item
2
)
=>
{
//找到最大值的数组
return
item
.
savedMoney
==
maxMoney
return
item
2
.
savedMoney
==
maxMoney
})
})
if
(
arr
.
length
==
1
){
if
(
arr
.
length
==
1
){
this
.
chooseCouponObj
=
arr
[
0
]
item
.
chooseCouponObj
=
arr
[
0
]
}
else
{
}
else
{
let
index
=
arr
.
findIndex
((
item
)
=>
{
//如果有多个,找到是否有平台券,平台劵优先
let
index
=
arr
.
findIndex
((
item
2
)
=>
{
//如果有多个,找到是否有平台券,平台劵优先
return
item
.
createSource
==
1
return
item
2
.
createSource
==
1
})
})
if
(
index
>-
1
){
if
(
index
>-
1
){
this
.
chooseCouponObj
=
arr
[
index
]
item
.
chooseCouponObj
=
arr
[
index
]
}
else
{
}
else
{
this
.
chooseCouponObj
=
arr
[
0
]
item
.
chooseCouponObj
=
arr
[
0
]
}
}
}
}
this
.
savedMoney
=
this
.
chooseCouponObj
.
savedMoney
item
.
savedMoney
=
item
.
chooseCouponObj
.
savedMoney
}
else
{
}
else
{
if
(
res
.
data
.
unusableCouponList
.
length
>
0
)
{
if
(
res
.
data
.
unusableCouponList
.
length
>
0
)
{
res
.
data
.
unusableCouponList
.
forEach
((
item
,
i
)
=>
{
//没有可用优惠券,有达到条件可以用的优惠券,先显示条件,达到条件时显示可用优惠券
res
.
data
.
unusableCouponList
.
forEach
((
item
2
,
i
)
=>
{
//没有可用优惠券,有达到条件可以用的优惠券,先显示条件,达到条件时显示可用优惠券
if
(
item
.
isProduct
==
1
)
{
if
(
item
2
.
isProduct
==
1
)
{
this
.
ableConpon
=
item
item
.
ableConpon
=
item2
}
}
})
})
}
}
...
@@ -970,32 +1008,25 @@ export default {
...
@@ -970,32 +1008,25 @@ export default {
}
}
})
})
},
},
//---获取优惠价格
//---子组件券选择之后触发的事件---已修改
getDiscountPrice
()
{
let
data
=
{
productId
:
this
.
productId
,
//产品ID
merchantId
:
this
.
merchantId
,
//商家ID
companyId
:
this
.
companyId
,
//公司ID
openid
:
this
.
openid
//openid
}
this
.
$request
(
'scenic/user/productRule/getProductRule'
,
data
).
then
(
res
=>
{})
},
//---子组件券选择之后触发的事件
couponChoose
(
data
)
{
couponChoose
(
data
)
{
if
(
data
){
if
(
data
){
this
.
chooseCouponObj
=
data
this
.
productList
[
this
.
couponIndex
].
chooseCouponObj
=
data
this
.
savedMoney
=
this
.
chooseCouponObj
.
savedMoney
||
0
}
else
{
}
else
{
this
.
chooseCouponObj
=
''
this
.
productList
[
this
.
couponIndex
].
chooseCouponObj
=
''
this
.
savedMoney
=
0
}
}
this
.
computedPrice
()
this
.
computedPrice
()
//复制公众号,还未复现是否需要
this
.
$forceUpdate
()
},
},
//---展示券列表
//---展示券列表---已修改
showCoupon
()
{
showCoupon
(
index
)
{
this
.
couponIndex
=
index
this
.
couponData
=
this
.
productList
[
index
].
couponData
this
.
chooseCouponObj
=
this
.
productList
[
index
].
chooseCouponObj
this
.
$refs
.
orderCoupon
.
showPop
=
true
this
.
$refs
.
orderCoupon
.
showPop
=
true
},
},
//---下单---
正在
修改
//---下单---
已
修改
goPay
()
{
goPay
()
{
if
(
this
.
orderStatus
==
1
)
{
if
(
this
.
orderStatus
==
1
)
{
//下架状态,点击无效
//下架状态,点击无效
...
@@ -1019,81 +1050,67 @@ export default {
...
@@ -1019,81 +1050,67 @@ export default {
})
})
return
return
}
}
}
if
(
item
.
isFetch
==
1
&&
item
.
areaUp
)
{
if
(
this
.
showTelephone
)
{
//需要选择站点的票种,必须选择站点
//需要填写电话号码
if
(
!
item
.
areaObj
.
areaCode
)
{
if
(
!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
ticketPhone
))
{
//未填写正确手机号码
uni
.
showToast
({
uni
.
showToast
({
title
:
'请填写正确的手机号码
'
,
title
:
'请选择站点
'
,
icon
:
'none'
icon
:
'none'
})
})
return
return
}
}
}
}
// if (!item.startDate || !item.endDate) {
if
(
!
item
.
startDate
||
!
item
.
endDate
)
{
// uni.showToast({
//游玩日期未选择
// title:item.merchantName+'请选择游玩日期',
// icon: 'none'
// })
// return
// }
//循环判断联系人数量,班次,站点是否填写完善
for
(
let
i
=
0
;
i
<
this
.
productList
.
length
;
i
++
){
let
item
=
this
.
productList
[
i
]
if
(
item
.
tripTemplateFlag
==
1
){
//实名制
if
(
item
.
orderTouristList
.
length
!=
item
.
buyNum
){
uni
.
showToast
({
uni
.
showToast
({
title
:
item
.
merchantName
+
'需要添加'
+
item
.
buyNum
+
'位出行人
'
,
title
:
item
.
merchantName
+
'请选择游玩日期
'
,
icon
:
'none'
icon
:
'none'
})
})
return
return
}
}
if
(
item
.
productType
==
3
){
}
//如果为班次票,需要选择班次
if
(
item
.
tripTemplateFlag
==
0
){
//非实名制
if
(
!
item
.
cruisePlanId
){
if
(
item
.
orderTouristList
.
length
<
1
){
uni
.
showToast
({
uni
.
showToast
({
title
:
item
.
merchantName
+
'需要添加一位出行人
'
,
title
:
'请选择'
+
item
.
merchantName
+
'游玩时间
'
,
icon
:
'none'
icon
:
'none'
})
})
return
return
}
}
}
}
if
(
item
.
productType
==
3
){
//如果为班次票,需要选择班次
if
(
item
.
chooseContact
.
length
!=
item
.
contactNum
){
if
(
!
item
.
cruisePlanId
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'请选择'
+
item
.
merchantName
+
'游玩时间
'
,
title
:
item
.
merchantName
+
'需要添加'
+
item
.
contactNum
+
'位出行人
'
,
icon
:
'none'
icon
:
'none'
})
})
return
return
}
}
}
}
if
(
item
.
isFetch
==
1
&&
item
.
areaUp
)
{
if
(
this
.
showTelephone
)
{
//需要选择站点的票种,必须选择站点
//需要填写电话号码
if
(
!
item
.
areaObj
.
areaCode
)
{
if
(
!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
ticketPhone
))
{
//未填写正确手机号码
uni
.
showToast
({
uni
.
showToast
({
title
:
'请选择站点
'
,
title
:
'请填写正确的手机号码
'
,
icon
:
'none'
icon
:
'none'
})
})
return
return
}
}
}
}
}
this
.
preOrder
()
this
.
preOrder
()
},
},
//---预下单
//---预下单
preOrder
()
{
preOrder
()
{
this
.
productList
.
forEach
(
item
=>
{
//获取游客信息参数
//获取游客信息参数
// let orderTouristList = this.chooseContact.map((item
) => {
item
.
orderTouristList
=
item
.
chooseContact
.
map
((
item2
)
=>
{
//
return {
return
{
//
category: 0,
category
:
0
,
// name: item
.name,
name
:
item2
.
name
,
// credentialNumber: item
.credentialNumber
credentialNumber
:
item2
.
credentialNumber
//
}
}
//
})
})
//获取券参数
//获取券参数
this
.
productList
.
forEach
(
item
=>
{
if
(
item
.
chooseCouponObj
){
if
(
item
.
chooseCouponObj
){
//有从券取值从券,没有从券取值主劵
//有从券取值从券,没有从券取值主劵
if
(
item
.
chooseCouponObj
.
slaveList
.
length
>
0
){
if
(
item
.
chooseCouponObj
.
slaveList
.
length
>
0
){
...
@@ -1137,8 +1154,8 @@ export default {
...
@@ -1137,8 +1154,8 @@ export default {
subOrderType
:
0
,
//产品类型,网络
subOrderType
:
0
,
//产品类型,网络
unitPrice
:
item
.
sellingPrice
,
//产品单价
unitPrice
:
item
.
sellingPrice
,
//产品单价
distributionPrice
:
item
.
sellingPrice
,
//临时用
distributionPrice
:
item
.
sellingPrice
,
//临时用
productAreaCode
:
item
.
areaObj
.
areaCode
||
item
.
defaultAreaCode
,
//出发站点
productAreaCode
:
item
.
areaObj
?
item
.
areaObj
.
areaCode
:
''
,
//出发站点
orderTouristList
:
item
.
chooseTour
ist
,
//游客信息
orderTouristList
:
item
.
orderTouristL
ist
,
//游客信息
couponList
:
item
.
couponList
//优惠券
couponList
:
item
.
couponList
//优惠券
}
}
})
})
...
...
pages/scenic/scenicComponents/contactList.vue
View file @
a377a907
...
@@ -94,18 +94,13 @@ export default {
...
@@ -94,18 +94,13 @@ export default {
//---确定选中的联系人
//---确定选中的联系人
config
()
{
config
()
{
this
.
showPop
=
false
this
.
showPop
=
false
//选中的排在前面
this
.
listTotal
.
sort
(
function
(
a
,
b
)
{
return
b
.
ifChoose
-
a
.
ifChoose
})
this
.
$parent
.
contactTotal
=
this
.
listTotal
let
chooseArr
=
[]
let
chooseArr
=
[]
this
.
listTotal
.
forEach
(
item
=>
{
this
.
listTotal
.
forEach
(
item
=>
{
if
(
item
.
ifChoose
){
if
(
item
.
ifChoose
){
chooseArr
.
push
(
item
)
chooseArr
.
push
(
item
)
}
}
})
})
this
.
$
parent
.
chooseContact
=
chooseArr
this
.
$
emit
(
'contactListConfig'
,
chooseArr
)
},
},
//---联系人姓名变化
//---联系人姓名变化
chooseContactChange
(
e
){
chooseContactChange
(
e
){
...
...
pages/scenic/scenicComponents/editContacts.vue
View file @
a377a907
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
'editContact
'
,
'contactTotal
'
],
props
:
[
'editContact
Data
'
],
data
()
{
data
()
{
return
{
return
{
showPop
:
false
,
//控制组件显示隐藏
showPop
:
false
,
//控制组件显示隐藏
...
@@ -56,9 +56,8 @@ export default {
...
@@ -56,9 +56,8 @@ export default {
}
}
},
},
watch
:
{
watch
:
{
editContact
:
{
editContact
Data
:
{
handler
(
newValue
,
oldValue
)
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
this
.
reviseContactId
)
this
.
name
=
newValue
.
name
||
''
this
.
name
=
newValue
.
name
||
''
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
...
...
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
View file @
a377a907
...
@@ -344,11 +344,12 @@
...
@@ -344,11 +344,12 @@
:defaultAreaCode=
"defaultAreaCode"
:defaultAreaCode=
"defaultAreaCode"
></chooseArea>
></chooseArea>
<times
ref=
"times"
:chooseTimeList=
"timeList"
@
timeConfig=
"timeConfig"
:timeActive=
"timeActive"
></times>
<times
ref=
"times"
:chooseTimeList=
"timeList"
@
timeConfig=
"timeConfig"
:timeActive=
"timeActive"
></times>
<editContacts
ref=
"editContacts"
:editContact
=
"editContact"
:contactTotal=
"contactTotal
"
></editContacts>
<editContacts
ref=
"editContacts"
:editContact
Data=
"editContactData
"
></editContacts>
<contactList
<contactList
ref=
"contactList"
ref=
"contactList"
:contactTotal=
"contactTotal"
:contactTotal=
"contactTotal"
:contactNum=
"contactNum"
:contactNum=
"contactNum"
@
contactListConfig=
'contactListConfig'
></contactList>
></contactList>
<orderCoupon
:couponData=
"couponData"
ref=
"orderCoupon"
@
couponChoose=
"couponChoose"
:chooseCouponObj=
"chooseCouponObj"
></orderCoupon>
<orderCoupon
:couponData=
"couponData"
ref=
"orderCoupon"
@
couponChoose=
"couponChoose"
:chooseCouponObj=
"chooseCouponObj"
></orderCoupon>
<!--一个站点时获取排队信息弹窗-->
<!--一个站点时获取排队信息弹窗-->
...
@@ -418,7 +419,7 @@ export default {
...
@@ -418,7 +419,7 @@ export default {
dateList
:
[],
//日期列表
dateList
:
[],
//日期列表
timeList
:
[],
//时间列表
timeList
:
[],
//时间列表
buyKnowData
:
''
,
//购买须知数据
buyKnowData
:
''
,
//购买须知数据
editContact
:
''
,
//编辑联系人传值对象
editContact
Data
:
''
,
//编辑联系人传值对象
productId
:
''
,
//产品Id
productId
:
''
,
//产品Id
merchantId
:
''
,
//商户Id
merchantId
:
''
,
//商户Id
ticketPhone
:
''
,
//联系电话
ticketPhone
:
''
,
//联系电话
...
@@ -828,31 +829,51 @@ export default {
...
@@ -828,31 +829,51 @@ export default {
showEdit
(
data
)
{
showEdit
(
data
)
{
let
obj
=
data
||
''
let
obj
=
data
||
''
this
.
$refs
.
editContacts
.
showPop
=
true
this
.
$refs
.
editContacts
.
showPop
=
true
this
.
editContact
=
obj
this
.
editContact
Data
=
obj
},
},
//---展示新增联系人,并获取联系人列表
//---展示新增联系人,并获取联系人列表
showContacts
()
{
showContacts
()
{
this
.
$refs
.
contactList
.
showPop
=
true
this
.
$refs
.
contactList
.
showPop
=
true
},
},
//---联系人列表弹窗确认选中
contactListConfig
(
data
){
this
.
chooseContact
=
data
this
.
contactTotal
.
forEach
(
item
=>
{
//在总的列表里面回去选中的联系人
item
.
ifChoose
=
false
this
.
chooseContact
.
forEach
(
item2
=>
{
if
(
item
.
id
==
item2
.
id
){
item
.
ifChoose
=
true
}
})
})
//选中的排在前面
this
.
contactTotal
.
sort
(
function
(
a
,
b
)
{
return
b
.
ifChoose
-
a
.
ifChoose
})
},
//---游客选择
//---游客选择
visitorChoose
(
i
)
{
visitorChoose
(
i
)
{
let
chooseList
=
this
.
chooseContact
//直接传入item,会造成item.ifChoose值变,但是this.contactTotal[i].ifChoose没变,故选择传入下标
let
data
=
this
.
contactTotal
let
item
=
this
.
contactTotal
[
i
]
data
[
i
].
ifChoose
=
!
data
[
i
]
.
ifChoose
item
.
ifChoose
=
!
item
.
ifChoose
if
(
data
[
i
]
.
ifChoose
)
{
if
(
item
.
ifChoose
)
{
if
(
chooseLis
t
.
length
==
this
.
contactNum
)
{
if
(
this
.
chooseContac
t
.
length
==
this
.
contactNum
)
{
//需要人数满足时,点击增加联系人时,删除最后一个,增加点击的那个人
//需要人数满足时,点击增加联系人时,删除最后一个,增加点击的那个人
chooseList
[
chooseList
.
length
-
1
].
ifChoose
=
false
this
.
contactTotal
.
forEach
(
item2
=>
{
chooseList
.
splice
(
chooseList
.
length
-
1
,
1
)
if
(
item2
.
id
==
this
.
chooseContact
[
this
.
chooseContact
.
length
-
1
].
id
){
item2
.
ifChoose
=
false
}
}
chooseList
.
push
(
data
[
i
])
//加入数组
})
this
.
chooseContact
.
splice
(
this
.
chooseContact
.
length
-
1
,
1
)
}
this
.
chooseContact
.
push
(
item
)
//加入数组
}
else
{
}
else
{
let
index
=
chooseLis
t
.
findIndex
(
items
=>
{
let
index
=
this
.
chooseContac
t
.
findIndex
(
items
=>
{
return
items
.
id
==
data
[
i
]
.
id
return
items
.
id
==
item
.
id
})
})
chooseLis
t
.
splice
(
index
,
1
)
//删除数组
this
.
chooseContac
t
.
splice
(
index
,
1
)
//删除数组
}
}
this
.
$forceUpdate
()
},
},
//---订单数量变化
//---订单数量变化
buyNumChange
(
e
)
{
buyNumChange
(
e
)
{
...
@@ -965,7 +986,7 @@ export default {
...
@@ -965,7 +986,7 @@ export default {
merchantId
:
this
.
merchantId
,
//商户Id
merchantId
:
this
.
merchantId
,
//商户Id
openid
:
this
.
openid
openid
:
this
.
openid
}
}
this
.
$request
(
'wechatUser/myPage/usableCouponList'
,
data
).
then
((
res
)
=>
{
this
.
$request
(
'wechatUser/myPage/usableCouponList'
,
data
,
true
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
)
{
if
(
res
.
code
==
'00'
)
{
this
.
couponData
=
res
.
data
this
.
couponData
=
res
.
data
let
masterSlaveCouponList
=
res
.
data
.
masterSlaveCouponList
let
masterSlaveCouponList
=
res
.
data
.
masterSlaveCouponList
...
@@ -992,7 +1013,7 @@ export default {
...
@@ -992,7 +1013,7 @@ export default {
this
.
savedMoney
=
this
.
chooseCouponObj
.
savedMoney
this
.
savedMoney
=
this
.
chooseCouponObj
.
savedMoney
}
else
{
}
else
{
if
(
res
.
data
.
unusableCouponList
.
length
>
0
)
{
if
(
res
.
data
.
unusableCouponList
.
length
>
0
)
{
res
.
data
.
unusableCouponList
.
forEach
((
item
,
i
)
=>
{
//没有可用优惠券,有达到条件可以用的优惠券,先显示条件,达到条件时显示可用优惠券
res
.
data
.
unusableCouponList
.
forEach
((
item
)
=>
{
//没有可用优惠券,有达到条件可以用的优惠券,先显示条件,达到条件时显示可用优惠券
if
(
item
.
isProduct
==
1
)
{
if
(
item
.
isProduct
==
1
)
{
this
.
ableConpon
=
item
this
.
ableConpon
=
item
}
}
...
@@ -1143,12 +1164,11 @@ export default {
...
@@ -1143,12 +1164,11 @@ export default {
//下架状态,点击无效
//下架状态,点击无效
return
return
}
}
if
(
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
if
(
this
.
productIfo
.
isFetch
==
1
&&
this
.
areaUp
)
{
//需要填写电话号码
//需要选择站点的票种,必须选择站点
if
(
!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
ticketPhone
)
&&
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
if
(
!
this
.
areaObj
.
areaCode
)
{
//未填写正确手机号码
uni
.
showToast
({
uni
.
showToast
({
title
:
'请
填写正确的手机号码
'
,
title
:
'请
选择站点
'
,
icon
:
'none'
icon
:
'none'
})
})
return
return
...
@@ -1161,40 +1181,29 @@ export default {
...
@@ -1161,40 +1181,29 @@ export default {
})
})
return
return
}
}
if
(
this
.
productIfo
.
tripTemplateFlag
==
1
)
{
if
(
this
.
productIfo
.
productType
==
3
)
{
//实名制
//如果为班次票,需要选择班次
if
(
this
.
chooseContact
.
length
!=
this
.
buyNum
)
{
if
(
this
.
cruisePlanId
==
''
)
{
uni
.
showToast
({
title
:
'需要添加'
+
this
.
buyNum
+
'位出行人'
,
icon
:
'none'
})
return
}
}
else
if
(
this
.
productIfo
.
tripTemplateFlag
==
0
)
{
//非实名制
if
(
this
.
chooseContact
.
length
<
1
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'
需要添加一位出行人
'
,
title
:
'
该票为班次票,请选择游玩时间
'
,
icon
:
'none'
icon
:
'none'
})
})
return
return
}
}
}
}
if
(
this
.
productIfo
.
productType
==
3
)
{
if
(
this
.
chooseContact
.
length
!=
this
.
contactNum
)
{
//如果为班次票,需要选择班次
if
(
this
.
cruisePlanId
==
''
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'该票为班次票,请选择游玩时间
'
,
title
:
'需要添加'
+
this
.
contactNum
+
'位出行人
'
,
icon
:
'none'
icon
:
'none'
})
})
return
return
}
}
}
if
(
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
if
(
this
.
productIfo
.
isFetch
==
1
&&
this
.
areaUp
)
{
//需要填写电话号码
//需要选择站点的票种,必须选择站点
if
(
!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
ticketPhone
)
&&
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
if
(
!
this
.
areaObj
.
areaCode
)
{
//未填写正确手机号码
uni
.
showToast
({
uni
.
showToast
({
title
:
'请选择站点
'
,
title
:
'请填写正确的手机号码
'
,
icon
:
'none'
icon
:
'none'
})
})
return
return
...
...
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