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
ebd721c8
Commit
ebd721c8
authored
Feb 12, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一个券时,可以取消券
parent
bc469a3e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
4 deletions
+42
-4
orderCoupon.vue
components/orderCoupon.vue
+35
-2
ourPayment.vue
pages/payment/ourPayment/ourPayment.vue
+7
-2
No files found.
components/orderCoupon.vue
View file @
ebd721c8
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
</view>
</view>
<!----------------------------------------------------可用------------------------------------------>
<!----------------------------------------------------可用------------------------------------------>
<view
v-show=
"active==0"
>
<view
v-show=
"active==0"
>
<view
class=
"middle"
v-if=
"couponList.usableCouponList&&couponList.usableCouponList.length>0"
>
<view
class=
"middle"
>
<radio-group
@
change=
"radioChange"
>
<radio-group
@
change=
"radioChange"
v-if=
"couponList.usableCouponList&&couponList.usableCouponList.length>1"
>
<view
v-for=
"(item,index) of couponList.usableCouponList"
:key=
"index"
class=
"listBox"
>
<view
v-for=
"(item,index) of couponList.usableCouponList"
:key=
"index"
class=
"listBox"
>
<label>
<label>
<view>
<view>
...
@@ -34,6 +34,28 @@
...
@@ -34,6 +34,28 @@
</label>
</label>
</view>
</view>
</radio-group>
</radio-group>
<checkbox-group
@
change=
"checkboxChange"
v-if=
"couponList.usableCouponList&&couponList.usableCouponList.length==1"
>
<view
v-for=
"(item,index) of couponList.usableCouponList"
:key=
"index"
class=
"listBox"
>
<label>
<view>
{{
item
.
couponName
}}
<checkbox
:value=
"item.couponId"
:checked=
"true"
/>
</view>
<view>
{{
item
.
couponRule
}}
</view>
<view>
{{
item
.
useStartDate
}}
-
{{
item
.
useEndDate
}}
<text>
<text>
¥
</text>
{{
parseFloat
(
item
.
savedMoney
.
toFixed
(
2
))
}}
</text>
</view>
</label>
</view>
</checkbox-group>
</view>
</view>
<view
class=
"empty"
v-if=
"!couponList.usableCouponList||couponList.usableCouponList.length==0"
>
<view
class=
"empty"
v-if=
"!couponList.usableCouponList||couponList.usableCouponList.length==0"
>
...
@@ -118,6 +140,17 @@
...
@@ -118,6 +140,17 @@
this
.
$emit
(
"couponChoose"
,
this
.
chooseCoupon
)
this
.
$emit
(
"couponChoose"
,
this
.
chooseCoupon
)
}
}
},
},
//---多选框值变化
checkboxChange
(
evt
){
if
(
evt
.
detail
.
value
){
this
.
chooseCoupon
=
this
.
couponList
.
usableCouponList
.
find
((
item
)
=>
{
return
item
.
couponId
==
evt
.
detail
.
value
})
this
.
$emit
(
"couponChoose"
,
this
.
chooseCoupon
)
}
else
{
this
.
$emit
(
"couponChoose"
,
""
)
}
},
cancelCoupon
(){
//------------------------------------取消选中优惠券
cancelCoupon
(){
//------------------------------------取消选中优惠券
this
.
chooseCoupon
=
""
this
.
chooseCoupon
=
""
this
.
show
=
false
this
.
show
=
false
...
...
pages/payment/ourPayment/ourPayment.vue
View file @
ebd721c8
...
@@ -291,8 +291,13 @@
...
@@ -291,8 +291,13 @@
},
1500
)
},
1500
)
},
},
couponChoose
(
data
)
{
//---子组件券选择之后触发的事件
couponChoose
(
data
)
{
//---子组件券选择之后触发的事件
if
(
data
){
this
.
chooseCouponObj
=
data
this
.
chooseCouponObj
=
data
this
.
savedMoney
=
this
.
chooseCouponObj
.
savedMoney
||
0
this
.
savedMoney
=
this
.
chooseCouponObj
.
savedMoney
||
0
}
else
{
this
.
chooseCouponObj
=
""
this
.
savedMoney
=
0
}
},
},
showCoupon
()
{
//---展示券列表
showCoupon
()
{
//---展示券列表
...
...
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