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
51e76ffd
authored
Jun 03, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review:优惠劵管理
parent
7c6d7e80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
33 deletions
+13
-33
src/api/mall/promotion/coupon.ts
+2
-0
src/utils/constants.ts
+0
-22
src/views/mall/promotion/coupon/index.vue
+11
-11
No files found.
src/api/mall/promotion/coupon.ts
View file @
51e76ffd
import
request
from
'@/config/axios'
// TODO @dhb52:vo 缺少
// 删除优惠劵
export
const
deleteCoupon
=
async
(
id
:
number
)
=>
{
return
request
.
delete
({
...
...
src/utils/constants.ts
View file @
51e76ffd
...
...
@@ -282,28 +282,6 @@ export const PromotionConditionTypeEnum = {
}
/**
* 促销活动的状态枚举
*/
export
const
PromotionActivityStatusEnum
=
{
WAIT
:
{
type
:
10
,
name
:
'未开始'
},
RUN
:
{
type
:
20
,
name
:
'进行中'
},
END
:
{
type
:
30
,
name
:
'已结束'
},
CLOSE
:
{
type
:
40
,
name
:
'已关闭'
}
}
/**
* 优惠类型枚举
*/
export
const
PromotionDiscountTypeEnum
=
{
...
...
src/views/mall/promotion/coupon/index.vue
View file @
51e76ffd
...
...
@@ -142,17 +142,6 @@ const statusTabs = reactive([
const
queryFormRef
=
ref
<
FormInstance
|
null
>
(
null
)
onMounted
(()
=>
{
getList
()
// 设置 statuses 过滤
for
(
const
dict
of
getIntDictOptions
(
DICT_TYPE
.
PROMOTION_COUPON_STATUS
))
{
statusTabs
.
push
({
label
:
dict
.
label
,
value
:
dict
.
value
as
string
})
}
})
/** 查询列表 */
const
getList
=
async
()
=>
{
loading
.
value
=
true
...
...
@@ -197,4 +186,15 @@ const onTabChange = (tabName) => {
queryParams
.
status
=
tabName
===
'all'
?
undefined
:
tabName
getList
()
}
onMounted
(()
=>
{
getList
()
// 设置 statuses 过滤
for
(
const
dict
of
getIntDictOptions
(
DICT_TYPE
.
PROMOTION_COUPON_STATUS
))
{
statusTabs
.
push
({
label
:
dict
.
label
,
value
:
dict
.
value
as
string
})
}
})
</
script
>
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