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
529804ff
Commit
529804ff
authored
Jan 05, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合票联系人处理
parent
18a1c610
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
229 additions
and
258 deletions
+229
-258
request.js
common/request.js
+2
-2
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+188
-203
editContacts.vue
pages/scenic/scenicComponents/editContacts.vue
+2
-3
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+37
-50
No files found.
common/request.js
View file @
529804ff
...
...
@@ -7,9 +7,9 @@ if(process.env.NODE_ENV === 'development'){//开发环境
}
const
request
=
(
url
=
''
,
data
=
{},
showLoad
)
=>
{
data
.
reqId
=
new
Date
().
getTime
()
//获取时间戳
let
show
=
showLoad
||
tru
e
let
show
=
showLoad
||
fals
e
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
show
){
if
(
!
show
){
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
...
...
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
529804ff
This diff is collapsed.
Click to expand it.
pages/scenic/scenicComponents/editContacts.vue
View file @
529804ff
...
...
@@ -45,7 +45,7 @@
<
script
>
export
default
{
props
:
[
'editContact
'
,
'contactTotal
'
],
props
:
[
'editContact
Data
'
],
data
()
{
return
{
showPop
:
false
,
//控制组件显示隐藏
...
...
@@ -56,9 +56,8 @@ export default {
}
},
watch
:
{
editContact
:
{
editContact
Data
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
this
.
reviseContactId
)
this
.
name
=
newValue
.
name
||
''
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
...
...
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
View file @
529804ff
...
...
@@ -344,7 +344,7 @@
:defaultAreaCode=
"defaultAreaCode"
></chooseArea>
<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
ref=
"contactList"
:contactTotal=
"contactTotal"
...
...
@@ -418,7 +418,7 @@ export default {
dateList
:
[],
//日期列表
timeList
:
[],
//时间列表
buyKnowData
:
''
,
//购买须知数据
editContact
:
''
,
//编辑联系人传值对象
editContact
Data
:
''
,
//编辑联系人传值对象
productId
:
''
,
//产品Id
merchantId
:
''
,
//商户Id
ticketPhone
:
''
,
//联系电话
...
...
@@ -828,7 +828,7 @@ export default {
showEdit
(
data
)
{
let
obj
=
data
||
''
this
.
$refs
.
editContacts
.
showPop
=
true
this
.
editContact
=
obj
this
.
editContact
Data
=
obj
},
//---展示新增联系人,并获取联系人列表
showContacts
()
{
...
...
@@ -836,23 +836,22 @@ export default {
},
//---游客选择
visitorChoose
(
i
)
{
let
chooseList
=
this
.
chooseContact
let
data
=
this
.
contactTotal
data
[
i
].
ifChoose
=
!
data
[
i
]
.
ifChoose
if
(
data
[
i
]
.
ifChoose
)
{
if
(
chooseLis
t
.
length
==
this
.
contactNum
)
{
//直接传入item,会造成item.ifChoose值变,但是this.contactTotal[i].ifChoose没变,故选择传入下标
let
item
=
this
.
contactTotal
[
i
]
item
.
ifChoose
=
!
item
.
ifChoose
if
(
item
.
ifChoose
)
{
if
(
this
.
chooseContac
t
.
length
==
this
.
contactNum
)
{
//需要人数满足时,点击增加联系人时,删除最后一个,增加点击的那个人
chooseList
[
chooseLis
t
.
length
-
1
].
ifChoose
=
false
chooseList
.
splice
(
chooseLis
t
.
length
-
1
,
1
)
this
.
chooseContact
[
this
.
chooseContac
t
.
length
-
1
].
ifChoose
=
false
this
.
chooseContact
.
splice
(
this
.
chooseContac
t
.
length
-
1
,
1
)
}
chooseList
.
push
(
data
[
i
]
)
//加入数组
this
.
chooseContact
.
push
(
item
)
//加入数组
}
else
{
let
index
=
chooseLis
t
.
findIndex
(
items
=>
{
return
items
.
id
==
data
[
i
]
.
id
let
index
=
this
.
chooseContac
t
.
findIndex
(
items
=>
{
return
items
.
id
==
item
.
id
})
chooseLis
t
.
splice
(
index
,
1
)
//删除数组
this
.
chooseContac
t
.
splice
(
index
,
1
)
//删除数组
}
this
.
$forceUpdate
()
},
//---订单数量变化
buyNumChange
(
e
)
{
...
...
@@ -965,7 +964,7 @@ export default {
merchantId
:
this
.
merchantId
,
//商户Id
openid
:
this
.
openid
}
this
.
$request
(
'wechatUser/myPage/usableCouponList'
,
data
).
then
((
res
)
=>
{
this
.
$request
(
'wechatUser/myPage/usableCouponList'
,
data
,
true
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
)
{
this
.
couponData
=
res
.
data
let
masterSlaveCouponList
=
res
.
data
.
masterSlaveCouponList
...
...
@@ -992,7 +991,7 @@ export default {
this
.
savedMoney
=
this
.
chooseCouponObj
.
savedMoney
}
else
{
if
(
res
.
data
.
unusableCouponList
.
length
>
0
)
{
res
.
data
.
unusableCouponList
.
forEach
((
item
,
i
)
=>
{
//没有可用优惠券,有达到条件可以用的优惠券,先显示条件,达到条件时显示可用优惠券
res
.
data
.
unusableCouponList
.
forEach
((
item
)
=>
{
//没有可用优惠券,有达到条件可以用的优惠券,先显示条件,达到条件时显示可用优惠券
if
(
item
.
isProduct
==
1
)
{
this
.
ableConpon
=
item
}
...
...
@@ -1143,12 +1142,11 @@ export default {
//下架状态,点击无效
return
}
if
(
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
//需要填写电话号码
if
(
!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
ticketPhone
)
&&
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
//未填写正确手机号码
if
(
this
.
productIfo
.
isFetch
==
1
&&
this
.
areaUp
)
{
//需要选择站点的票种,必须选择站点
if
(
!
this
.
areaObj
.
areaCode
)
{
uni
.
showToast
({
title
:
'请
填写正确的手机号码
'
,
title
:
'请
选择站点
'
,
icon
:
'none'
})
return
...
...
@@ -1161,25 +1159,6 @@ export default {
})
return
}
if
(
this
.
productIfo
.
tripTemplateFlag
==
1
)
{
//实名制
if
(
this
.
chooseContact
.
length
!=
this
.
buyNum
)
{
uni
.
showToast
({
title
:
'需要添加'
+
this
.
buyNum
+
'位出行人'
,
icon
:
'none'
})
return
}
}
else
if
(
this
.
productIfo
.
tripTemplateFlag
==
0
)
{
//非实名制
if
(
this
.
chooseContact
.
length
<
1
)
{
uni
.
showToast
({
title
:
'需要添加一位出行人'
,
icon
:
'none'
})
return
}
}
if
(
this
.
productIfo
.
productType
==
3
)
{
//如果为班次票,需要选择班次
if
(
this
.
cruisePlanId
==
''
)
{
...
...
@@ -1190,15 +1169,23 @@ export default {
return
}
}
if
(
this
.
productIfo
.
isFetch
==
1
&&
this
.
areaUp
)
{
//需要选择站点的票种,必须选择站点
if
(
!
this
.
areaObj
.
areaCode
)
{
uni
.
showToast
({
title
:
'请选择站点'
,
icon
:
'none'
})
return
}
if
(
this
.
chooseContact
.
length
!=
this
.
contactNum
)
{
uni
.
showToast
({
title
:
'需要添加'
+
this
.
contactNum
+
'位出行人'
,
icon
:
'none'
})
return
}
if
(
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
//需要填写电话号码
if
(
!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
ticketPhone
)
&&
this
.
productIfo
.
tripTemplateFlag
!=
2
)
{
//未填写正确手机号码
uni
.
showToast
({
title
:
'请填写正确的手机号码'
,
icon
:
'none'
})
return
}
}
this
.
preOrder
()
},
...
...
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