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
9488eb50
Commit
9488eb50
authored
Mar 21, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券满足条件
parent
45f64077
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
13 deletions
+10
-13
index.vue
components/coupon/index.vue
+3
-3
flightDetail.vue
pages/airTicket/flightDetail.vue
+2
-2
jz_Reserve.vue
pages/jiuzhai/jz_Reserve.vue
+3
-6
visa_Reserve.vue
pages/visa/visa_Reserve.vue
+2
-2
No files found.
components/coupon/index.vue
View file @
9488eb50
...
...
@@ -83,7 +83,7 @@
console
.
log
(
!
x
.
err
||
x
.
err
==
'订单金额不满足'
)
if
(
!
x
.
err
||
x
.
err
==
'订单金额不满足'
){
x
.
err
=
x
.
useCondition
>
this
.
price
?
'订单金额不满足'
:
null
}
else
if
(
!
x
.
err
||
x
.
err
==
`订单人数不满足,至少
${
x
.
orderGuestNum
}
人`
){
}
else
if
(
x
.
orderGuestNum
&&
(
!
x
.
err
||
x
.
err
==
`订单人数不满足,至少
${
x
.
orderGuestNum
}
人`
)
){
x
.
err
=
x
.
orderGuestNum
>
this
.
numberPeople
?
`订单人数不满足,至少
${
x
.
orderGuestNum
}
人`
:
null
}
})
...
...
@@ -141,7 +141,7 @@
this
.
ts
.
forEach
((
x
)
=>
{
if
(
!
x
.
err
&&
x
.
useCondition
>
this
.
price
){
x
.
err
=
'订单金额不满足'
}
else
if
(
!
x
.
err
&&
x
.
orderGuestNum
>
this
.
numberPeople
){
}
else
if
(
x
.
orderGuestNum
&&
!
x
.
err
&&
x
.
orderGuestNum
>
this
.
numberPeople
){
x
.
err
=
`订单人数不满足,至少
${
x
.
orderGuestNum
}
人`
}
})
...
...
@@ -213,7 +213,7 @@
if
(
x
.
overlapUse
){
if
(
!
x
.
check
&&
x
.
denomination
>
this
.
money
){
x
.
err
=
'订单金额不满足'
}
else
if
(
!
x
.
check
&&
x
.
orderGuestNum
>
this
.
numberPeople
){
}
else
if
(
x
.
orderGuestNum
&&
!
x
.
check
&&
x
.
orderGuestNum
>
this
.
numberPeople
){
x
.
err
=
`订单人数不满足,至少
${
x
.
orderGuestNum
}
人`
}
else
{
x
.
err
=
null
...
...
pages/airTicket/flightDetail.vue
View file @
9488eb50
...
...
@@ -639,13 +639,13 @@
let
discount
=
0
const
money
=
this
.
price
this
.
couponList
.
forEach
(
x
=>
{
if
(
x
.
couponsType
==
1
&&
x
.
denomination
>
discount
&&
this
.
guest
.
length
>=
x
.
orderGuestNum
)
{
if
(
x
.
couponsType
==
1
&&
x
.
denomination
>
discount
&&
(
this
.
guest
.
length
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
)
)
{
discount
=
x
.
denomination
maxCouponId
=
x
.
id
}
if
(
x
.
couponsType
==
2
){
let
disMoney
=
money
*
(
1
-
x
.
denomination
)
if
(
discount
<
disMoney
&&
this
.
guest
.
length
>=
x
.
orderGuestNum
){
if
(
discount
<
disMoney
&&
(
this
.
guest
.
length
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
)
){
discount
=
disMoney
maxCouponId
=
x
.
id
}
...
...
pages/jiuzhai/jz_Reserve.vue
View file @
9488eb50
...
...
@@ -827,24 +827,21 @@
if
(
this
.
couponList
&&
this
.
couponList
.
length
>
0
){
let
maxCouponId
=
0
let
discount
=
0
let
current
=
null
const
money
=
this
.
price
this
.
couponList
.
forEach
(
x
=>
{
if
(
x
.
couponsType
==
1
&&
x
.
denomination
>
discount
)
{
if
(
x
.
couponsType
==
1
&&
x
.
denomination
>
discount
&&
(
this
.
total
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
)
)
{
discount
=
x
.
denomination
maxCouponId
=
x
.
id
current
=
x
}
if
(
x
.
couponsType
==
2
){
let
disMoney
=
money
*
(
1
-
x
.
denomination
)
if
(
discount
<
disMoney
){
if
(
discount
<
disMoney
&&
(
this
.
total
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
)
){
discount
=
disMoney
maxCouponId
=
x
.
id
current
=
x
}
}
}
)
if
(
maxCouponId
>
0
&&
this
.
total
>=
current
.
orderGuestNum
)
this
.
closeCouponHandler
([
maxCouponId
])
if
(
maxCouponId
>
0
)
this
.
closeCouponHandler
([
maxCouponId
])
}
}
,
calcVipDisscountHandle
(){
...
...
pages/visa/visa_Reserve.vue
View file @
9488eb50
...
...
@@ -1117,13 +1117,13 @@
let
discount
=
0
const
money
=
this
.
price
this
.
couponList
.
forEach
(
x
=>
{
if
(
x
.
couponsType
==
1
&&
x
.
denomination
>
discount
&&
this
.
orderMsg
.
AdultPeopleNum
>=
x
.
orderGuestNum
)
{
if
(
x
.
couponsType
==
1
&&
x
.
denomination
>
discount
&&
(
this
.
orderMsg
.
AdultPeopleNum
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
)
)
{
discount
=
x
.
denomination
maxCouponId
=
x
.
id
}
if
(
x
.
couponsType
==
2
){
let
disMoney
=
money
*
(
1
-
x
.
denomination
)
if
(
discount
<
disMoney
&&
this
.
orderMsg
.
AdultPeopleNum
>=
x
.
orderGuestNum
){
if
(
discount
<
disMoney
&&
(
this
.
orderMsg
.
AdultPeopleNum
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
)
){
discount
=
disMoney
maxCouponId
=
x
.
id
}
...
...
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