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
3646ae60
Commit
3646ae60
authored
Oct 12, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合票,联票不能组合购买
parent
7c7a72be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
9 deletions
+40
-9
distributionCombiChoose.vue
...ation/distributionCombiChoose/distributionCombiChoose.vue
+40
-9
No files found.
pages/combination/distributionCombiChoose/distributionCombiChoose.vue
View file @
3646ae60
...
...
@@ -174,8 +174,11 @@
<detail
:chooseProduct=
"chooseProduct"
ref=
"detail"
></detail>
<!-- 商户详情 -->
<merchantDetail
:detailData=
'detailData'
ref=
'merchantDetail'
></merchantDetail>
<!-- 模态框 -->
<u-modal
:show=
"showModal"
@
confirm=
"chooseConfirm"
@
cancel=
"chooseCancel"
title=
"提示"
content=
"是否更改产品"
show-cancel-button=
"true"
>
<!-- 模态框1,用于是否更改产品 -->
<u-modal
:show=
"showModal1"
@
confirm=
"chooseConfirm"
@
cancel=
"chooseCancel"
title=
"提示"
content=
"是否更改产品"
show-cancel-button=
"true"
>
</u-modal>
<!-- 模态框2,用于联票不能组合购买 -->
<u-modal
:show=
"showModal2"
@
confirm=
"notBuyConfirm"
title=
"提示"
content=
"联票产品不能进行多产品购买"
>
</u-modal>
<image
class=
"suodaoImg"
v-if=
"showSuodaoImg"
src=
"https://lx.pangdly.com/img/cjsdFirst.50a2e63.jpg"
></image>
<!-- 系统无法访问时弹窗 -->
...
...
@@ -233,7 +236,8 @@ export default {
showDistance
:
false
,
//定位成功显示距离
buyKnowData
:
''
,
//购买须知数据
chooseProduct
:
[],
//选中的产品
showModal
:
false
,
//是否显示模态框
showModal1
:
false
,
//模态框1,用于是否更改产品
showModal2
:
false
,
//模态框2,用于联票不能组合购买
chooseMerchantProduct
:
''
,
//不支持多产品购买时,选中的景区产品
merchantIndex
:
0
,
//选中的商家下标
middleHeight
:
0
,
//中间列表盒子高度
...
...
@@ -257,8 +261,15 @@ export default {
handler
(
newValue
,
oldValue
)
{
//当选中产品时
if
(
newValue
.
length
>
oldValue
.
length
)
{
//找到当前选中的产品
let
product
=
newValue
[
newValue
.
length
-
1
]
//一、联票不允许组合
if
(
this
.
chooseProduct
.
length
>
1
){
if
(
this
.
chooseProduct
.
find
(
item
=>
item
.
ticketType
==
2
)){
this
.
showModal2
=
true
return
}
}
//二、该产品是否支持多产品购买
let
product
=
newValue
[
newValue
.
length
-
1
]
//找到当前选中的产品
//商家一级
let
merchant
=
''
//通过产品一级找到商家一级
...
...
@@ -277,7 +288,7 @@ export default {
if
(
product
.
isMoreBuy
!==
0
)
{
if
(
number
>
1
)
{
//显示确认弹窗
this
.
showModal
=
true
this
.
showModal
1
=
true
//当前选中的景区产品,用于确定以及取消方法取值
this
.
chooseMerchantProduct
=
product
}
...
...
@@ -301,6 +312,8 @@ export default {
return
val
})
}
}
},
deep
:
true
,
...
...
@@ -777,7 +790,7 @@ export default {
this
.
chooseProduct
=
this
.
chooseProduct
.
filter
(
function
(
val
)
{
return
val
})
this
.
showModal
=
false
this
.
showModal
1
=
false
},
//---不支持多选产品,选择取消事件
chooseCancel
()
{
...
...
@@ -796,9 +809,27 @@ export default {
this
.
chooseProduct
.
splice
(
index
,
1
)
}
})
this
.
showModal
=
false
this
.
showModal1
=
false
},
//---联票产品不支持组合购买
notBuyConfirm
(){
//获取最新的一个产品,删除最新的产品
let
product
=
this
.
chooseProduct
[
this
.
chooseProduct
.
length
-
1
]
//取消选中状态和选中背景颜色
this
.
scenicList
.
forEach
(
item2
=>
{
item2
.
productList
.
forEach
(
item3
=>
{
if
(
product
.
id
==
item3
.
id
)
{
item3
.
ifChecked
=
false
item3
.
ifChangeBg
=
false
}
})
})
delete
this
.
chooseProduct
[
this
.
chooseProduct
.
length
-
1
]
this
.
chooseProduct
=
this
.
chooseProduct
.
filter
(
function
(
val
)
{
return
val
})
this
.
showModal2
=
false
},
//---跳转填写订单页面
goFillorder
()
{
for
(
let
i
=
0
;
i
<
this
.
chooseProduct
.
length
;
i
++
)
{
...
...
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