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
eacc79a8
Commit
eacc79a8
authored
May 08, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复小包团优惠券
parent
08292bd5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
10 deletions
+23
-10
cancelPrompt.vue
components/cancelPrompt/cancelPrompt.vue
+0
-2
jz_Reserve.vue
pages/jiuzhai/jz_Reserve.vue
+23
-8
No files found.
components/cancelPrompt/cancelPrompt.vue
View file @
eacc79a8
...
...
@@ -199,9 +199,7 @@ export default {
}
},
created
()
{
console
.
log
(
uni
.
getStorageSync
(
"b2b_user"
),
'=======b2b_user'
)
this
.
erpBaseInfo
=
uni
.
getStorageSync
(
"b2b_user"
).
erpBaseInfo
console
.
log
(
this
.
datas
,
'----=====datas'
)
},
mounted
()
{
setTimeout
(()
=>
{
...
...
pages/jiuzhai/jz_Reserve.vue
View file @
eacc79a8
...
...
@@ -825,21 +825,36 @@
);
}
,
calcMaxCouponHandle
(){
const
shengyu
=
this
.
realCurrentPriceInfo
.
totalSeat
-
this
.
realCurrentPriceInfo
.
leaderNum
const
remainNum
=
this
.
realCurrentPriceInfo
.
remainNum
const
orderNum
=
this
.
orderMsg
.
ManNum
+
this
.
orderMsg
.
ChirdNeedBedNum
+
this
.
orderMsg
.
ChirdNoBedNum
let
errorMsg
=
null
if
(
this
.
realCurrentPriceInfo
&&
this
.
realCurrentPriceInfo
.
teamType
==
1
)
{
if
(
shengyu
!=
remainNum
)
errorMsg
=
'当前定制团存在其他订单,无法使用专享优惠券'
else
if
(
orderNum
<
shengyu
)
errorMsg
=
'报名人数小于团队机位人数,无法使用专享优惠券'
}
if
(
this
.
couponList
&&
this
.
couponList
.
length
>
0
){
let
maxCouponId
=
0
let
discount
=
0
const
money
=
this
.
price
this
.
couponList
.
forEach
(
x
=>
{
if
(
x
.
coupons
Type
==
1
&&
x
.
denomination
>
discount
&&
(
this
.
total
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
)
&&
this
.
price
>=
x
.
useCondition
)
{
discount
=
x
.
denomination
maxCouponId
=
x
.
id
}
if
(
x
.
couponsType
==
2
){
let
disMoney
=
money
*
(
1
-
x
.
denomination
)
if
(
discount
<
disMoney
&&
(
this
.
total
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
)
&&
this
.
price
>=
x
.
useCondition
)
{
discount
=
disMoney
if
(
x
.
coupons
UseScope
==
10
&&
errorMsg
)
{
uni
.
showToast
({
title
:
errorMsg
,
icon
:
'none'
}
)
}
else
{
if
(
x
.
couponsType
==
1
&&
x
.
denomination
>
discount
&&
(
this
.
total
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
)
&&
this
.
price
>=
x
.
useCondition
)
{
discount
=
x
.
denomination
maxCouponId
=
x
.
id
}
if
(
x
.
couponsType
==
2
){
let
disMoney
=
money
*
(
1
-
x
.
denomination
)
if
(
discount
<
disMoney
&&
(
this
.
total
>=
x
.
orderGuestNum
||!
x
.
orderGuestNum
)
&&
this
.
price
>=
x
.
useCondition
){
discount
=
disMoney
maxCouponId
=
x
.
id
}
}
}
}
)
if
(
maxCouponId
>
0
)
this
.
closeCouponHandler
([
maxCouponId
])
...
...
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