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
Show 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'){//开发环境
...
@@ -7,9 +7,9 @@ if(process.env.NODE_ENV === 'development'){//开发环境
}
}
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/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 @@
...
@@ -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 @
529804ff
...
@@ -344,7 +344,7 @@
...
@@ -344,7 +344,7 @@
: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"
...
@@ -418,7 +418,7 @@ export default {
...
@@ -418,7 +418,7 @@ export default {
dateList
:
[],
//日期列表
dateList
:
[],
//日期列表
timeList
:
[],
//时间列表
timeList
:
[],
//时间列表
buyKnowData
:
''
,
//购买须知数据
buyKnowData
:
''
,
//购买须知数据
editContact
:
''
,
//编辑联系人传值对象
editContact
Data
:
''
,
//编辑联系人传值对象
productId
:
''
,
//产品Id
productId
:
''
,
//产品Id
merchantId
:
''
,
//商户Id
merchantId
:
''
,
//商户Id
ticketPhone
:
''
,
//联系电话
ticketPhone
:
''
,
//联系电话
...
@@ -828,7 +828,7 @@ export default {
...
@@ -828,7 +828,7 @@ 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
()
{
...
@@ -836,23 +836,22 @@ export default {
...
@@ -836,23 +836,22 @@ export default {
},
},
//---游客选择
//---游客选择
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
[
chooseLis
t
.
length
-
1
].
ifChoose
=
false
this
.
chooseContact
[
this
.
chooseContac
t
.
length
-
1
].
ifChoose
=
false
chooseList
.
splice
(
chooseLis
t
.
length
-
1
,
1
)
this
.
chooseContact
.
splice
(
this
.
chooseContac
t
.
length
-
1
,
1
)
}
}
chooseList
.
push
(
data
[
i
]
)
//加入数组
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 +964,7 @@ export default {
...
@@ -965,7 +964,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 +991,7 @@ export default {
...
@@ -992,7 +991,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 +1142,11 @@ export default {
...
@@ -1143,12 +1142,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 +1159,29 @@ export default {
...
@@ -1161,40 +1159,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