File tree Expand file tree Collapse file tree 5 files changed +456
-2
lines changed Expand file tree Collapse file tree 5 files changed +456
-2
lines changed Original file line number Diff line number Diff line change
1
+ import request from '@/utils/request'
2
+
3
+ // 创建优惠劵模板
4
+ export function createCouponTemplate ( data ) {
5
+ return request ( {
6
+ url : '/promotion/coupon-template/create' ,
7
+ method : 'post' ,
8
+ data : data
9
+ } )
10
+ }
11
+
12
+ // 更新优惠劵模板
13
+ export function updateCouponTemplate ( data ) {
14
+ return request ( {
15
+ url : '/promotion/coupon-template/update' ,
16
+ method : 'put' ,
17
+ data : data
18
+ } )
19
+ }
20
+
21
+ // 删除优惠劵模板
22
+ export function deleteCouponTemplate ( id ) {
23
+ return request ( {
24
+ url : '/promotion/coupon-template/delete?id=' + id ,
25
+ method : 'delete'
26
+ } )
27
+ }
28
+
29
+ // 获得优惠劵模板
30
+ export function getCouponTemplate ( id ) {
31
+ return request ( {
32
+ url : '/promotion/coupon-template/get?id=' + id ,
33
+ method : 'get'
34
+ } )
35
+ }
36
+
37
+ // 获得优惠劵模板分页
38
+ export function getCouponTemplatePage ( query ) {
39
+ return request ( {
40
+ url : '/promotion/coupon-template/page' ,
41
+ method : 'get' ,
42
+ params : query
43
+ } )
44
+ }
45
+
46
+ // 导出优惠劵模板 Excel
47
+ export function exportCouponTemplateExcel ( query ) {
48
+ return request ( {
49
+ url : '/promotion/coupon-template/export-excel' ,
50
+ method : 'get' ,
51
+ params : query ,
52
+ responseType : 'blob'
53
+ } )
54
+ }
Original file line number Diff line number Diff line change @@ -236,3 +236,45 @@ export const ProductSpuStatusEnum = {
236
236
name : '上架'
237
237
} ,
238
238
}
239
+
240
+ /**
241
+ * 优惠类型枚举
242
+ */
243
+ export const PromotionDiscountTypeEnum = {
244
+ PRICE : {
245
+ type : 1 ,
246
+ name : '满减'
247
+ } ,
248
+ PERCENT : {
249
+ type : 2 ,
250
+ name : '折扣'
251
+ }
252
+ }
253
+
254
+ /**
255
+ * 优惠劵模板的有限期类型的枚举
256
+ */
257
+ export const CouponTemplateValidityTypeEnum = {
258
+ DATE : {
259
+ type : 1 ,
260
+ name : '固定日期可用'
261
+ } ,
262
+ TERM : {
263
+ type : 2 ,
264
+ name : '领取之后可用'
265
+ }
266
+ }
267
+
268
+ /**
269
+ * 营销的商品范围枚举
270
+ */
271
+ export const PromotionProductScopeEnum = {
272
+ ALL : {
273
+ scope : 1 ,
274
+ name : '全部商品参与'
275
+ } ,
276
+ SPU : {
277
+ scope : 2 ,
278
+ name : '指定商品参与'
279
+ }
280
+ }
Original file line number Diff line number Diff line change @@ -59,6 +59,11 @@ export const DICT_TYPE = {
59
59
60
60
// ========== MALL - PRODUCT 模块 ==========
61
61
PRODUCT_SPU_STATUS : 'product_spu_status' , // 商品 SPU 状态
62
+
63
+ // ========== MALL - PROMOTION 模块 ==========
64
+ PROMOTION_DISCOUNT_TYPE : 'promotion_discount_type' , // 优惠类型
65
+ PROMOTION_PRODUCT_SCOPE : 'promotion_product_scope' , // 营销的商品范围
66
+ COUPON_TEMPLATE_VALIDITY_TYPE : 'coupon_template_validity_type' , // 优惠劵模板的有限期类型
62
67
}
63
68
64
69
/**
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" app-container" >
3
3
4
- <!-- 搜索工作栏 -->
5
- <el-form :model =" queryParams" ref =" queryForm" size =" small" :inline =" true" v-show =" showSearch" label-width =" 68px" >
4
+ « <el-form :model =" queryParams" ref =" queryForm" size =" small" :inline =" true" v-show =" showSearch" label-width =" 68px" >
6
5
<el-form-item label =" 品牌名称" prop =" name" >
7
6
<el-input v-model =" queryParams.name" placeholder =" 请输入品牌名称" clearable @keyup.enter.native =" handleQuery" />
8
7
</el-form-item >
You can’t perform that action at this time.
0 commit comments