Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f7217a5c
authored
Sep 15, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能修复】商城:修复满减送批量合并的错误部分
parent
1a8c04d7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
src/views/mall/promotion/coupon/components/CouponSelect.vue
+2
-1
src/views/mall/promotion/coupon/formatter.ts
+2
-3
src/views/mall/promotion/rewardActivity/RewardForm.vue
+0
-2
No files found.
src/views/mall/promotion/coupon/components/CouponSelect.vue
View file @
f7217a5c
...
@@ -116,6 +116,7 @@ import {
...
@@ -116,6 +116,7 @@ import {
validityTypeFormat
validityTypeFormat
}
from
'@/views/mall/promotion/coupon/formatter'
}
from
'@/views/mall/promotion/coupon/formatter'
import
*
as
CouponTemplateApi
from
'@/api/mall/promotion/coupon/couponTemplate'
import
*
as
CouponTemplateApi
from
'@/api/mall/promotion/coupon/couponTemplate'
import
{
CouponTemplateTakeTypeEnum
}
from
'@/utils/constants'
defineOptions
({
name
:
'CouponSelect'
})
defineOptions
({
name
:
'CouponSelect'
})
...
@@ -138,7 +139,7 @@ const queryParams = reactive({
...
@@ -138,7 +139,7 @@ const queryParams = reactive({
pageSize
:
10
,
pageSize
:
10
,
name
:
null
,
name
:
null
,
discountType
:
null
,
discountType
:
null
,
canTakeTypes
:
[
1
]
//
只获得直接领取的券
canTakeTypes
:
[
CouponTemplateTakeTypeEnum
.
USER
.
type
]
//
只获得直接领取的券
})
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
queryFormRef
=
ref
()
// 搜索的表单
const
selectedCouponList
=
ref
<
CouponTemplateApi
.
CouponTemplateVO
[]
>
([])
// 选择的数据
const
selectedCouponList
=
ref
<
CouponTemplateApi
.
CouponTemplateVO
[]
>
([])
// 选择的数据
...
...
src/views/mall/promotion/coupon/formatter.ts
View file @
f7217a5c
...
@@ -16,15 +16,14 @@ export const discountFormat = (row: CouponTemplateVO) => {
...
@@ -16,15 +16,14 @@ export const discountFormat = (row: CouponTemplateVO) => {
// 格式化【领取上限】
// 格式化【领取上限】
export
const
takeLimitCountFormat
=
(
row
:
CouponTemplateVO
)
=>
{
export
const
takeLimitCountFormat
=
(
row
:
CouponTemplateVO
)
=>
{
if
(
row
.
takeLimitCount
)
{
if
(
row
.
takeLimitCount
)
{
if
(
row
.
takeLimitCount
===
-
1
)
{
if
(
row
.
takeLimitCount
===
-
1
)
{
return
'无领取限制'
return
'无领取限制'
}
}
return
`
${
row
.
takeLimitCount
}
张/人`
return
`
${
row
.
takeLimitCount
}
张/人`
}
else
{
}
else
{
return
' '
return
' '
}
}
}
}
// 格式化【有效期限】
// 格式化【有效期限】
...
...
src/views/mall/promotion/rewardActivity/RewardForm.vue
View file @
f7217a5c
...
@@ -118,7 +118,6 @@ const open = async (type: string, id?: number) => {
...
@@ -118,7 +118,6 @@ const open = async (type: string, id?: number) => {
data
.
startAndEndTime
=
[
data
.
startTime
,
data
.
endTime
]
data
.
startAndEndTime
=
[
data
.
startTime
,
data
.
endTime
]
// 规则分转元
// 规则分转元
data
.
rules
?.
forEach
((
item
:
any
)
=>
{
data
.
rules
?.
forEach
((
item
:
any
)
=>
{
item
.
limit
=
fenToYuan
(
item
.
limit
||
0
)
item
.
discountPrice
=
fenToYuan
(
item
.
discountPrice
||
0
)
item
.
discountPrice
=
fenToYuan
(
item
.
discountPrice
||
0
)
if
(
data
.
conditionType
===
PromotionConditionTypeEnum
.
PRICE
.
type
)
{
if
(
data
.
conditionType
===
PromotionConditionTypeEnum
.
PRICE
.
type
)
{
item
.
limit
=
fenToYuan
(
item
.
limit
||
0
)
item
.
limit
=
fenToYuan
(
item
.
limit
||
0
)
...
@@ -154,7 +153,6 @@ const submitForm = async () => {
...
@@ -154,7 +153,6 @@ const submitForm = async () => {
delete
data
.
startAndEndTime
delete
data
.
startAndEndTime
// 规则元转分
// 规则元转分
data
.
rules
.
forEach
((
item
)
=>
{
data
.
rules
.
forEach
((
item
)
=>
{
item
.
limit
=
yuanToFen
(
item
.
limit
||
0
)
item
.
discountPrice
=
yuanToFen
(
item
.
discountPrice
||
0
)
item
.
discountPrice
=
yuanToFen
(
item
.
discountPrice
||
0
)
if
(
data
.
conditionType
===
PromotionConditionTypeEnum
.
PRICE
.
type
)
{
if
(
data
.
conditionType
===
PromotionConditionTypeEnum
.
PRICE
.
type
)
{
item
.
limit
=
yuanToFen
(
item
.
limit
||
0
)
item
.
limit
=
yuanToFen
(
item
.
limit
||
0
)
...
...
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