Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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
zhengke
jz_Travel
Commits
3ff4b65b
Commit
3ff4b65b
authored
Feb 21, 2025
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改优惠
parent
97a362a1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
14 deletions
+32
-14
index.vue
components/coupon/index.vue
+15
-0
flightDetail.vue
pages/airTicket/flightDetail.vue
+17
-14
No files found.
components/coupon/index.vue
View file @
3ff4b65b
...
...
@@ -73,6 +73,21 @@
money
:
0
,
};
},
watch
:
{
price
:
{
deep
:
true
,
immediate
:
true
,
handler
:
function
(
newVal
,
oldVal
)
{
this
.
ts
.
forEach
((
x
)
=>
{
console
.
log
(
!
x
.
err
||
x
.
err
==
'订单金额不满足'
)
if
(
!
x
.
err
||
x
.
err
==
'订单金额不满足'
){
x
.
err
=
x
.
useCondition
>
this
.
price
?
'订单金额不满足'
:
null
}
})
this
.
OverlayCalculation
()
},
},
},
mounted
()
{
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
currentChosen
=
this
.
current
;
...
...
pages/airTicket/flightDetail.vue
View file @
3ff4b65b
...
...
@@ -147,7 +147,7 @@
</view>
</view>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:price=
"
1
"
:list=
"couponList"
:current=
"useCouponId"
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:price=
"
price
"
:list=
"couponList"
:current=
"useCouponId"
@
close=
"closeCouponHandler"
></coupon>
<u-picker
mode=
"selector"
v-model=
"saleVisable"
@
confirm=
"setSaleHandle"
:default-selector=
"[0]"
:range=
"sales"
range-key=
"EmName"
></u-picker>
<u-modal
:border-radius=
"16"
@
confirm=
"nativageToOrderHandle"
title=
"订单提醒"
content=
"订单创建成功,请您在6小时内完成付款,否则将会被取消."
@
cancel=
"navigatorToHomeHandle"
v-model=
"successVisible"
confirm-text=
'查看订单'
cancel-text=
'返回首页'
confirm-color=
'#DEBF7B'
cancel-color=
'#080A09'
:show-cancel-button=
"true"
></u-modal>
...
...
@@ -202,7 +202,7 @@
},
showCoupon
:
false
,
couponList
:
[],
useCouponId
:
0
,
useCouponId
:
[]
,
currentCoupon
:
{
discountMoney
:
0
},
...
...
@@ -371,7 +371,7 @@
OrderSource
:
5
,
Unit_Price
:
this
.
flight
.
B2BPrice
,
TC_Price
:
this
.
flight
.
B2BPrice
,
CouponAllotIds
:
this
.
useCouponId
.
toString
(
),
CouponAllotIds
:
this
.
useCouponId
.
join
(
','
),
ManNum
:
this
.
crCount
,
ChirdNum
:
this
.
etCount
,
ChirdNeedBedNum
:
this
.
etCount
,
...
...
@@ -395,19 +395,22 @@
this
.
guest
=
val
?
val
:
[]
},
closeCouponHandler
(
e
)
{
this
.
useCouponId
=
[]
this
.
currentCoupon
.
discountMoney
=
0
if
(
e
!=
-
1
)
{
this
.
useCouponId
=
e
;
if
(
this
.
useCouponId
)
{
this
.
currentCoupon
=
this
.
couponList
.
find
(
x
=>
x
.
id
==
this
.
useCouponId
)
if
(
this
.
currentCoupon
.
couponsType
==
1
)
{
this
.
currentCoupon
.
discountMoney
=
this
.
currentCoupon
.
denomination
if
(
this
.
useCouponId
.
length
>
0
)
{
const
cp
=
this
.
couponList
.
filter
(
x
=>
this
.
useCouponId
.
indexOf
(
x
.
id
)
!=-
1
)
if
(
cp
.
length
>
0
){
cp
.
forEach
(
x
=>
{
if
(
x
.
couponsType
==
1
)
{
this
.
currentCoupon
.
discountMoney
+=
x
.
denomination
}
else
{
this
.
currentCoupon
.
discountMoney
=
(
parseFloat
(
this
.
price
)
*
(
1
-
parseFloat
(
this
.
currentCoupon
.
denomination
/
10
)))
.
toFixed
(
2
)
this
.
currentCoupon
.
discountMoney
+=
parseFloat
((
parseFloat
(
this
.
price
)
*
(
1
-
parseFloat
(
x
.
denomination
/
10
))).
toFixed
(
2
))
}
})
}
}
else
{
this
.
currentCoupon
.
discountMoney
=
0
}
}
this
.
showCoupon
=
false
;
...
...
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