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
76c4644b
authored
Sep 01, 2023
by
owen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mall:优惠券发送优化
parent
190c6e38
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
17 deletions
+25
-17
src/api/mall/promotion/coupon/couponTemplate.ts
+0
-8
src/utils/constants.ts
+18
-0
src/views/mall/promotion/coupon/components/CouponSend.vue
+5
-8
src/views/mall/promotion/coupon/index.vue
+2
-1
No files found.
src/api/mall/promotion/coupon/couponTemplate.ts
View file @
76c4644b
...
@@ -73,14 +73,6 @@ export function getCouponTemplatePage(params: PageParam) {
...
@@ -73,14 +73,6 @@ export function getCouponTemplatePage(params: PageParam) {
})
})
}
}
// 获得可用于领取的优惠劵模板分页
export
function
getCanTakeCouponTemplatePage
(
params
:
PageParam
)
{
return
request
.
get
({
url
:
'/promotion/coupon-template/can-take-page'
,
params
:
params
})
}
// 导出优惠劵模板 Excel
// 导出优惠劵模板 Excel
export
function
exportCouponTemplateExcel
(
params
:
PageParam
)
{
export
function
exportCouponTemplateExcel
(
params
:
PageParam
)
{
return
request
.
get
({
return
request
.
get
({
...
...
src/utils/constants.ts
View file @
76c4644b
...
@@ -210,6 +210,24 @@ export const CouponTemplateValidityTypeEnum = {
...
@@ -210,6 +210,24 @@ export const CouponTemplateValidityTypeEnum = {
}
}
/**
/**
* 优惠劵模板的领取方式的枚举
*/
export
const
CouponTemplateTakeTypeEnum
=
{
BY_USER
:
{
type
:
1
,
name
:
'直接领取'
},
BY_ADMIN
:
{
type
:
2
,
name
:
'指定发放'
},
BY_REGISTER
:
{
type
:
3
,
name
:
'新人券'
}
}
/**
* 营销的商品范围枚举
* 营销的商品范围枚举
*/
*/
export
const
PromotionProductScopeEnum
=
{
export
const
PromotionProductScopeEnum
=
{
...
...
src/views/mall/promotion/coupon/components/CouponSend.vue
View file @
76c4644b
...
@@ -90,6 +90,7 @@ import {
...
@@ -90,6 +90,7 @@ import {
userPriceFormat
,
userPriceFormat
,
validityTypeFormat
validityTypeFormat
}
from
'@/views/mall/promotion/coupon/formatter'
}
from
'@/views/mall/promotion/coupon/formatter'
import
{
CouponTemplateTakeTypeEnum
}
from
'@/utils/constants'
defineOptions
({
name
:
'PromotionCouponSend'
})
defineOptions
({
name
:
'PromotionCouponSend'
})
...
@@ -102,7 +103,8 @@ const dialogVisible = ref(false) // 弹窗的是否展示
...
@@ -102,7 +103,8 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const
queryParams
=
ref
({
const
queryParams
=
ref
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
name
:
null
name
:
null
,
canTakeTypes
:
[
CouponTemplateTakeTypeEnum
.
BY_ADMIN
.
type
]
})
// 查询参数
})
// 查询参数
const
queryFormRef
=
ref
()
// 搜索的表单
const
queryFormRef
=
ref
()
// 搜索的表单
// 领取人的编号列表
// 领取人的编号列表
...
@@ -122,7 +124,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
...
@@ -122,7 +124,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
const
data
=
await
CouponTemplateApi
.
getC
anTakeC
ouponTemplatePage
(
queryParams
.
value
)
const
data
=
await
CouponTemplateApi
.
getCouponTemplatePage
(
queryParams
.
value
)
list
.
value
=
data
.
list
list
.
value
=
data
.
list
total
.
value
=
data
.
total
total
.
value
=
data
.
total
}
finally
{
}
finally
{
...
@@ -132,7 +134,7 @@ const getList = async () => {
...
@@ -132,7 +134,7 @@ const getList = async () => {
/** 搜索按钮操作 */
/** 搜索按钮操作 */
const
handleQuery
=
()
=>
{
const
handleQuery
=
()
=>
{
queryParams
.
pageNo
=
1
queryParams
.
value
.
pageNo
=
1
getList
()
getList
()
}
}
...
@@ -154,9 +156,4 @@ const handleSendCoupon = async (templateId: number) => {
...
@@ -154,9 +156,4 @@ const handleSendCoupon = async (templateId: number) => {
sendLoading
.
value
=
false
sendLoading
.
value
=
false
}
}
}
}
/** 初始化 **/
// onMounted(async () => {
// await getList()
// })
</
script
>
</
script
>
src/views/mall/promotion/coupon/index.vue
View file @
76c4644b
...
@@ -122,7 +122,8 @@ const queryParams = reactive({
...
@@ -122,7 +122,8 @@ const queryParams = reactive({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
createTime
:
[],
createTime
:
[],
status
:
undefined
status
:
undefined
,
nickname
:
undefined
})
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
queryFormRef
=
ref
()
// 搜索的表单
...
...
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