Skip to content

Commit fd27386

Browse files
author
LAPTOP-CNV4CMCJ\cheng
committed
Merge branch 'feature/1.8.0-uniapp' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into feature/1.8.0-uniapp
2 parents 4f4e7de + 5a8c3dd commit fd27386

File tree

5 files changed

+456
-2
lines changed

5 files changed

+456
-2
lines changed

src/api/promotion/couponTemplate.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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+
}

src/utils/constants.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,45 @@ export const ProductSpuStatusEnum = {
236236
name: '上架'
237237
},
238238
}
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+
}

src/utils/dict.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ export const DICT_TYPE = {
5959

6060
// ========== MALL - PRODUCT 模块 ==========
6161
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', // 优惠劵模板的有限期类型
6267
}
6368

6469
/**

src/views/mall/product/brand/index.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<template>
22
<div class="app-container">
33

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">
65
<el-form-item label="品牌名称" prop="name">
76
<el-input v-model="queryParams.name" placeholder="请输入品牌名称" clearable @keyup.enter.native="handleQuery"/>
87
</el-form-item>

0 commit comments

Comments
 (0)