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
Unverified
Commit
1a8c04d7
authored
Sep 15, 2024
by
芋道源码
Committed by
Gitee
Sep 15, 2024
Browse files
Options
Browse Files
Download
Plain Diff
!553 批量优化或修改BUG
Merge pull request !553 from 痴货/develop-mall
parents
8dafe26b
f069f809
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
11 deletions
+34
-11
src/api/mall/promotion/reward/rewardActivity.ts
+6
-6
src/components/DiyEditor/components/mobile/ProductCard/index.vue
+1
-1
src/views/mall/product/spu/form/InfoForm.vue
+1
-1
src/views/mall/promotion/coupon/components/CouponSelect.vue
+1
-1
src/views/mall/promotion/coupon/formatter.ts
+5
-0
src/views/mall/promotion/discountActivity/DiscountActivityForm.vue
+1
-1
src/views/mall/promotion/discountActivity/discountActivity.data.ts
+11
-0
src/views/mall/promotion/rewardActivity/RewardForm.vue
+2
-0
src/views/mall/promotion/rewardActivity/index.vue
+6
-1
No files found.
src/api/mall/promotion/reward/rewardActivity.ts
View file @
1a8c04d7
...
...
@@ -47,12 +47,12 @@ export const getReward = async (id: number) => {
return
await
request
.
get
({
url
:
'/promotion/reward-activity/get?id='
+
id
})
}
// 关闭拼团活动
export
const
closeRewardActivity
=
async
(
id
:
number
)
=>
{
return
await
request
.
put
({
url
:
'/promotion/reward-activity/close?id='
+
id
})
}
// 删除限时折扣活动
// 删除满减送活动
export
const
deleteRewardActivity
=
async
(
id
:
number
)
=>
{
return
await
request
.
delete
({
url
:
'/promotion/reward-activity/delete?id='
+
id
})
}
// 关闭满减送活动
export
const
closeRewardActivity
=
async
(
id
:
number
)
=>
{
return
await
request
.
put
({
url
:
'/promotion/reward-activity/close?id='
+
id
})
}
src/components/DiyEditor/components/mobile/ProductCard/index.vue
View file @
1a8c04d7
...
...
@@ -67,7 +67,7 @@
class=
"text-16px"
:style=
"
{ color: property.fields.price.color }"
>
¥
{{
fenToYuan
(
spu
.
price
)
}}
¥
{{
fenToYuan
(
spu
.
price
as
any
)
}}
</span>
<!-- 市场价 -->
<span
...
...
src/views/mall/product/spu/form/InfoForm.vue
View file @
1a8c04d7
...
...
@@ -45,7 +45,7 @@
:show-word-limit="true"
class="w-80!"
maxlength="128"
placeholder="请输入商品
名称
"
placeholder="请输入商品
简介
"
type="textarea"
/>
</el-form-item>
...
...
src/views/mall/promotion/coupon/components/CouponSelect.vue
View file @
1a8c04d7
...
...
@@ -138,7 +138,7 @@ const queryParams = reactive({
pageSize
:
10
,
name
:
null
,
discountType
:
null
,
canTakeTypes
:
null
canTakeTypes
:
[
1
]
//只获得直接领取的券
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
selectedCouponList
=
ref
<
CouponTemplateApi
.
CouponTemplateVO
[]
>
([])
// 选择的数据
...
...
src/views/mall/promotion/coupon/formatter.ts
View file @
1a8c04d7
...
...
@@ -16,10 +16,15 @@ export const discountFormat = (row: CouponTemplateVO) => {
// 格式化【领取上限】
export
const
takeLimitCountFormat
=
(
row
:
CouponTemplateVO
)
=>
{
if
(
row
.
takeLimitCount
){
if
(
row
.
takeLimitCount
===
-
1
)
{
return
'无领取限制'
}
return
`
${
row
.
takeLimitCount
}
张/人`
}
else
{
return
' '
}
}
// 格式化【有效期限】
...
...
src/views/mall/promotion/discountActivity/DiscountActivityForm.vue
View file @
1a8c04d7
...
...
@@ -190,7 +190,7 @@ const submitForm = async () => {
const
products
=
cloneDeep
(
spuAndSkuListRef
.
value
.
getSkuConfigs
(
'productConfig'
))
products
.
forEach
((
item
:
DiscountActivityApi
.
DiscountProductVO
)
=>
{
item
.
discountPercent
=
convertToInteger
(
item
.
discountPercent
)
item
.
discountPrice
=
convertToInteger
(
item
.
discountPrice
)
item
.
discountPrice
=
convertToInteger
(
yuanToFen
(
item
.
discountPrice
)
)
})
const
data
=
cloneDeep
(
formRef
.
value
.
formModel
)
as
DiscountActivityApi
.
DiscountActivityVO
data
.
products
=
products
...
...
src/views/mall/promotion/discountActivity/discountActivity.data.ts
View file @
1a8c04d7
...
...
@@ -71,6 +71,17 @@ const crudSchemas = reactive<CrudSchema[]>([
}
},
{
label
:
'优惠类型'
,
field
:
'discountType'
,
dictType
:
DICT_TYPE
.
PROMOTION_DISCOUNT_TYPE
,
dictClass
:
'number'
,
isSearch
:
true
,
form
:
{
component
:
'Radio'
,
value
:
1
}
},
{
label
:
'活动商品'
,
field
:
'spuId'
,
isTable
:
true
,
...
...
src/views/mall/promotion/rewardActivity/RewardForm.vue
View file @
1a8c04d7
...
...
@@ -118,6 +118,7 @@ const open = async (type: string, id?: number) => {
data
.
startAndEndTime
=
[
data
.
startTime
,
data
.
endTime
]
// 规则分转元
data
.
rules
?.
forEach
((
item
:
any
)
=>
{
item
.
limit
=
fenToYuan
(
item
.
limit
||
0
)
item
.
discountPrice
=
fenToYuan
(
item
.
discountPrice
||
0
)
if
(
data
.
conditionType
===
PromotionConditionTypeEnum
.
PRICE
.
type
)
{
item
.
limit
=
fenToYuan
(
item
.
limit
||
0
)
...
...
@@ -153,6 +154,7 @@ const submitForm = async () => {
delete
data
.
startAndEndTime
// 规则元转分
data
.
rules
.
forEach
((
item
)
=>
{
item
.
limit
=
yuanToFen
(
item
.
limit
||
0
)
item
.
discountPrice
=
yuanToFen
(
item
.
discountPrice
||
0
)
if
(
data
.
conditionType
===
PromotionConditionTypeEnum
.
PRICE
.
type
)
{
item
.
limit
=
yuanToFen
(
item
.
limit
||
0
)
...
...
src/views/mall/promotion/rewardActivity/index.vue
View file @
1a8c04d7
...
...
@@ -27,7 +27,7 @@
placeholder=
"请选择活动状态"
>
<el-option
v-for=
"dict in getIntDictOptions(DICT_TYPE.
PROMOTION_ACTIVITY
_STATUS)"
v-for=
"dict in getIntDictOptions(DICT_TYPE.
COMMON
_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
...
...
@@ -71,6 +71,11 @@
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
default-expand-all
row-key=
"id"
>
<el-table-column
label=
"活动名称"
prop=
"name"
/>
<el-table-column
label=
"活动范围"
prop=
"productScope"
>
<template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.PROMOTION_PRODUCT_SCOPE"
:value=
"scope.row.productScope"
/>
</
template
>
</el-table-column>
<el-table-column
:formatter=
"dateFormatter"
align=
"center"
...
...
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