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
64c68248
Commit
64c68248
authored
Jan 10, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合下单开发
parent
b60597a6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
113 additions
and
96 deletions
+113
-96
distributionCombiChoose.vue
...ation/distributionCombiChoose/distributionCombiChoose.vue
+4
-4
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+91
-77
editContacts.vue
pages/scenic/scenicComponents/editContacts.vue
+1
-1
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+17
-14
No files found.
pages/combination/distributionCombiChoose/distributionCombiChoose.vue
View file @
64c68248
...
...
@@ -610,13 +610,13 @@ export default {
let
query
=
'?productIdList='
+
JSON
.
stringify
(
productIdList
)
+
'&groupId='
+
this
.
groupId
+
'&groupChannelId='
+
this
.
groupChannelId
+
'&orderSource=3'
//如果有联票
if
(
this
.
chooseProduct
.
find
(
item
=>
item
.
ticketType
==
2
)){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/combination/combiOrder/combiOrder'
+
query
})
})
}
else
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicCombiOrder/scenicCombiOrder'
+
query
})
})
}
}
},
...
...
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
64c68248
...
...
@@ -411,7 +411,7 @@ export default {
this
.
docQuery
=
uni
.
createSelectorQuery
().
in
(
this
)
},
methods
:
{
//---页面初始化数据,获取产品基本信息
---已修改
//---页面初始化数据,获取产品基本信息
initData
()
{
let
data
=
{
productList
:
this
.
productIdList
,
//产品id列表
...
...
@@ -449,7 +449,7 @@ export default {
}
})
},
//---获取产品价格库存列表
---已修改
//---获取产品价格库存列表
getPriceList
()
{
let
data
=
{
productIds
:
this
.
productIdList
,
//产品id集合
...
...
@@ -542,7 +542,7 @@ export default {
}
})
},
//---排号是否上下架
---已修改
//---排号是否上下架
sortUpDown
(
item
)
{
let
data
=
{
merchantCode
:
item
.
merchantVo
.
code
//商户code
...
...
@@ -589,7 +589,7 @@ export default {
}
})
},
//---获取班次票
---已修改
//---获取班次票
getTimeStock
(
item
)
{
item
.
timeList
=
[]
let
data
=
{
...
...
@@ -625,50 +625,8 @@ export default {
}
})
},
//---初始化联系人列表
getContactList
()
{
let
data
=
{
openid
:
this
.
openid
}
this
.
$request
(
'wechatUser/contact/findContactList'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
let
contactTotal
=
res
.
data
||
[]
contactTotal
.
forEach
(
item
=>
{
//用于判断是否被选中
item
.
ifChoose
=
false
})
this
.
productList
.
forEach
((
item
)
=>
{
item
.
contactTotal
=
JSON
.
parse
(
JSON
.
stringify
(
contactTotal
))
//数据不出现问题
this
.
$forceUpdate
()
})
//编辑成功重新调该方法时,把之前选中的游客,设为选中状态
this
.
productList
.
forEach
(
item
=>
{
item
.
contactTotal
.
forEach
(
item2
=>
{
item
.
chooseContact
.
forEach
(
item3
=>
{
if
(
item2
.
id
==
item3
.
id
)
{
item2
.
ifChoose
=
true
item3
=
JSON
.
parse
(
JSON
.
stringify
(
item2
))
}
})
})
})
// //删除联系人成功重新调该方法时,之前选中的联系人,数据库可能被删除,删除该联系人
// this.chooseContact.forEach((item, index) => {
// if (!this.contactTotal.find(item2 => item.id == item2.id)) {
// this.chooseContact.splice(index, 1)
// }
// })
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
//---计算价格---已修改
//---计算价格
computedPrice
(){
let
savedMoney
=
0
let
original
=
0
...
...
@@ -713,31 +671,31 @@ export default {
}
})
},
//---获取子组件的传值
---已修改
//---获取子组件的传值
areaSure
(
data
)
{
this
.
productList
[
this
.
areaIndex
].
areaObj
=
data
},
//---展示选择站点
---已修改
//---展示选择站点
openArea
(
index
)
{
this
.
areaIndex
=
index
this
.
showChooseArea
=
true
},
//---关闭选择站点
---已修改
//---关闭选择站点
closeArea
()
{
this
.
showChooseArea
=
false
},
//---展示详情弹窗
---已修改
//---展示详情弹窗
showDetail
()
{
this
.
$refs
.
detail
.
showPop
=
true
},
//---展示日历
---已修改
//---展示日历
showCalendar
(
index
)
{
this
.
$refs
.
calendar
.
defaultDate
=
this
.
productList
[
index
].
chooseDate
//日历组件选中日期
this
.
moreDateIndex
=
index
this
.
chooseDateList
=
this
.
productList
[
index
].
priceStockList
this
.
$refs
.
calendar
.
showPop
=
true
},
//---日期选择
---已改
//---日期选择
dateChoose
(
item
,
item2
,
index
)
{
item
.
dateActive
=
index
//修改选中样式
this
.
maxBookNum
=
999
//默认可以去支付
...
...
@@ -769,7 +727,7 @@ export default {
//解决点击日期无反应的情况
this
.
$forceUpdate
()
},
//---日历确认事件
---已修改
//---日历确认事件
dateConfig
(
data
)
{
let
index2
=
this
.
chooseDateList
.
findIndex
(
item
=>
{
return
item
.
startTime
.
substr
(
0
,
10
)
==
data
...
...
@@ -783,7 +741,7 @@ export default {
this
.
$forceUpdate
()
}).
exec
()
},
//---展示更多时间
---已改好
//---展示更多时间
showTime
(
item
,
index
)
{
this
.
chooseTimeList
=
item
.
timeList
this
.
moreTimeIndex
=
index
...
...
@@ -794,7 +752,7 @@ export default {
}
this
.
$refs
.
times
.
showPop
=
true
},
//---时间选择
---已改好
//---时间选择
chooseTime
(
item
,
item2
,
index2
)
{
if
(
item2
.
copyLast
!=
'售罄'
){
item
.
timeActive
=
index2
...
...
@@ -807,7 +765,7 @@ export default {
this
.
$forceUpdate
()
}
},
//---时间确认事件
---已改好
//---时间确认事件
timeConfig
(
index2
)
{
let
item
=
this
.
productList
[
this
.
moreTimeIndex
]
let
item2
=
this
.
chooseTimeList
[
index2
]
...
...
@@ -819,7 +777,7 @@ export default {
this
.
$forceUpdate
()
}).
exec
()
},
//---删除选中的联系人
---已修改
//---删除选中的联系人
delChooseContact
(
item
,
item2
,
index2
)
{
//所有联系人中找到删除联系人下标,改成未选中状态
let
sub
=
item
.
contactTotal
.
findIndex
(
item3
=>
item3
.
id
==
item2
.
id
)
...
...
@@ -828,18 +786,18 @@ export default {
//解决样式和数据未及时更新问题
this
.
$forceUpdate
()
},
//---展示编辑联系人
---已修改
//---展示编辑联系人
showEdit
(
data
)
{
let
obj
=
data
||
''
this
.
$refs
.
editContacts
.
showPop
=
true
this
.
editContactData
=
obj
},
//---展示新增联系人,并获取联系人列表
---已修改
//---展示新增联系人,并获取联系人列表
showContacts
(
index
)
{
this
.
moreContactIndex
=
index
this
.
$refs
.
contactList
.
showPop
=
true
},
//---联系人列表弹窗确认选中
---已修改
//---联系人列表弹窗确认选中
contactListConfig
(
data
){
let
index
=
this
.
moreContactIndex
this
.
productList
[
index
].
chooseContact
=
data
...
...
@@ -859,7 +817,7 @@ export default {
//选中样式以及选中数据的更新
this
.
$forceUpdate
()
},
//---游客选择
---已修改
//---游客选择
visitorChoose
(
index
,
index2
)
{
//底层原理不明,特殊情况,需特殊处理
//直接传入item,item2时 会报错,故选择传入下标
...
...
@@ -886,6 +844,51 @@ export default {
//解决选中联系人样式不更新的bug
this
.
$forceUpdate
()
},
//---初始化联系人列表
getContactList
()
{
let
data
=
{
openid
:
this
.
openid
}
this
.
$request
(
'wechatUser/contact/findContactList'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
let
contactTotal
=
res
.
data
||
[]
contactTotal
.
forEach
(
item
=>
{
//用于判断是否被选中
item
.
ifChoose
=
false
})
this
.
productList
.
forEach
((
item
)
=>
{
item
.
contactTotal
=
JSON
.
parse
(
JSON
.
stringify
(
contactTotal
))
if
(
item
.
chooseContact
&&
item
.
chooseContact
.
length
>
0
){
//编辑成功重新调该方法时,把之前选中的游客,设为选中状态
item
.
contactTotal
.
forEach
(
item2
=>
{
item
.
chooseContact
.
forEach
(
item3
=>
{
if
(
item2
.
id
==
item3
.
id
)
{
item2
.
ifChoose
=
true
//更新选中的联系人的值
item3
.
credentialNumber
=
item2
.
credentialNumber
item3
.
name
=
item2
.
name
item3
.
phone
=
item2
.
phone
}
})
})
//删除联系人成功重新调该方法时,之前选中的联系人,数据库可能被删除,删除该联系人
item
.
chooseContact
.
forEach
((
item2
,
index
)
=>
{
if
(
!
item
.
contactTotal
.
find
(
item3
=>
item2
.
id
==
item3
.
id
))
{
item
.
chooseContact
.
splice
(
index
,
1
)
}
})
}
//数据不出现问题
this
.
$forceUpdate
()
})
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
//---添加并选中联系人--用于添加联系人之后直接从联系人列表选出需要填写的几位联系人
addChoose
()
{
let
data
=
{
...
...
@@ -893,14 +896,25 @@ export default {
}
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
)
let
contactTotal
=
res
.
data
||
[]
contactTotal
.
forEach
(
item
=>
{
//用于判断是否被选中
item
.
ifChoose
=
false
})
this
.
productList
.
forEach
((
item
)
=>
{
item
.
contactTotal
=
JSON
.
parse
(
JSON
.
stringify
(
contactTotal
))
for
(
let
i
=
0
;
i
<
item
.
contactNum
;
i
++
)
{
let
item2
=
item
.
contactTotal
[
i
]
||
null
if
(
item2
)
{
item2
.
ifChoose
=
true
}
}
item
.
chooseContact
=
item
.
contactTotal
.
slice
(
0
,
item
.
contactNum
)
//数据不出现问题
this
.
$forceUpdate
()
})
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
...
...
@@ -909,7 +923,7 @@ export default {
}
})
},
//---订单数量变化
---已修改
//---订单数量变化
buyNumChange
(
e
)
{
let
value
=
e
.
value
let
index
=
e
.
name
...
...
@@ -952,12 +966,12 @@ export default {
this
.
initCoupon
(
item
)
},
1500
)
},
//---展示购票须知
---已修改
//---展示购票须知
showBuyKnow
(
index
)
{
this
.
buyKnowData
=
this
.
productList
[
index
]
this
.
$refs
.
buyKnow
.
showPop
=
true
},
//---加载优惠券
---已修改
//---加载优惠券
initCoupon
(
item
)
{
let
savedMoneyList
=
[]
item
.
chooseCouponObj
=
''
...
...
@@ -1009,7 +1023,7 @@ export default {
}
})
},
//---子组件券选择之后触发的事件
---已修改
//---子组件券选择之后触发的事件
couponChoose
(
data
)
{
if
(
data
){
this
.
productList
[
this
.
couponIndex
].
chooseCouponObj
=
data
...
...
@@ -1020,14 +1034,14 @@ export default {
//复制公众号,还未复现是否需要
this
.
$forceUpdate
()
},
//---展示券列表
---已修改
//---展示券列表
showCoupon
(
index
)
{
this
.
couponIndex
=
index
this
.
couponData
=
this
.
productList
[
index
].
couponData
this
.
chooseCouponObj
=
this
.
productList
[
index
].
chooseCouponObj
this
.
$refs
.
orderCoupon
.
showPop
=
true
},
//---下单
---已修改
//---下单
goPay
()
{
if
(
this
.
orderStatus
==
1
)
{
//下架状态,点击无效
...
...
pages/scenic/scenicComponents/editContacts.vue
View file @
64c68248
...
...
@@ -117,7 +117,7 @@ export default {
//新增的时候
this
.
$parent
.
addChoose
()
//显示联系人列表弹窗
this
.
$parent
.
showContacts
()
this
.
$parent
.
$refs
.
contactList
.
showPop
=
true
//成功之后清空数据,防止下次新增的时候出现之前的数据
this
.
name
=
''
this
.
credentialNumber
=
''
...
...
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
View file @
64c68248
...
...
@@ -926,19 +926,22 @@ export default {
this
.
contactTotal
.
forEach
(
item
=>
{
//用于判断是否被选中
item
.
ifChoose
=
false
})
//编辑成功重新调该方法时,把之前选中的游客,设为选中状态
this
.
contactTotal
.
forEach
(
item
=>
{
this
.
chooseContact
.
forEach
(
item2
=>
{
if
(
item
.
id
==
item2
.
id
)
{
item
.
ifChoose
=
true
}
})
})
//删除联系人成功重新调该方法时,之前选中的联系人,数据库可能被删除,删除该联系人
this
.
chooseContact
.
forEach
((
item
,
index
)
=>
{
if
(
!
this
.
contactTotal
.
find
(
item2
=>
item
.
id
==
item2
.
id
))
{
this
.
chooseContact
.
splice
(
index
,
1
)
if
(
this
.
chooseContact
.
length
>
0
){
//编辑成功重新调该方法时,把之前选中的游客,设为选中状态
this
.
chooseContact
.
forEach
(
item2
=>
{
if
(
item
.
id
==
item2
.
id
)
{
item
.
ifChoose
=
true
item2
.
credentialNumber
=
item
.
credentialNumber
item2
.
name
=
item
.
name
item2
.
phone
=
item
.
phone
}
})
//删除联系人成功重新调该方法时,之前选中的联系人,数据库可能被删除,删除该联系人
this
.
chooseContact
.
forEach
((
item
,
index
)
=>
{
if
(
!
this
.
contactTotal
.
find
(
item2
=>
item
.
id
==
item2
.
id
))
{
this
.
chooseContact
.
splice
(
index
,
1
)
}
})
}
})
}
else
{
...
...
@@ -956,7 +959,7 @@ export default {
}
this
.
$request
(
'wechatUser/contact/findContactList'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
this
.
contactTotal
=
res
.
data
this
.
contactTotal
=
res
.
data
||
[]
for
(
let
i
=
0
;
i
<
this
.
contactNum
;
i
++
)
{
let
item
=
this
.
contactTotal
[
i
]
||
null
if
(
item
)
{
...
...
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