Skip to content

Commit cb3eda1

Browse files
committed
promotion:增加优惠劵的前端分页界面 100%
1 parent 7c89159 commit cb3eda1

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

src/utils/dict.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const DICT_TYPE = {
6565
PROMOTION_PRODUCT_SCOPE: 'promotion_product_scope', // 营销的商品范围
6666
PROMOTION_COUPON_TEMPLATE_VALIDITY_TYPE: 'promotion_coupon_template_validity_type', // 优惠劵模板的有限期类型
6767
PROMOTION_COUPON_STATUS: 'promotion_coupon_status', // 优惠劵的状态
68+
PROMOTION_COUPON_TAKE_TYPE: 'promotion_coupon_take_type', // 优惠劵的领取方式
6869
}
6970

7071
/**

src/views/mall/promotion/coupon/index.vue

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,31 @@
2929
<el-table v-loading="loading" :data="list">
3030
<el-table-column label="会员信息" align="center" prop="nickname" /> <!-- TODO 芋艿:以后支持头像,支持跳转 -->
3131
<el-table-column label="优惠劵" align="center" prop="name" />
32-
<el-table-column label="优惠码状态" align="center" prop="status" />
33-
<el-table-column label="生效开始时间" align="center" prop="validStartTime" width="180">
32+
<el-table-column label="优惠券类型" align="center" prop="discountType">
3433
<template slot-scope="scope">
35-
<span>{{ parseTime(scope.row.validStartTime) }}</span>
34+
<dict-tag :type="DICT_TYPE.PROMOTION_DISCOUNT_TYPE" :value="scope.row.discountType" />
3635
</template>
3736
</el-table-column>
38-
<el-table-column label="生效结束时间" align="center" prop="validEndTime" width="180">
37+
<el-table-column label="领取方式" align="center" prop="takeType">
3938
<template slot-scope="scope">
40-
<span>{{ parseTime(scope.row.validEndTime) }}</span>
39+
<dict-tag :type="DICT_TYPE.PROMOTION_COUPON_TAKE_TYPE" :value="scope.row.takeType" />
4140
</template>
4241
</el-table-column>
43-
<el-table-column label="使用时间" align="center" prop="useTime" width="180">
42+
<el-table-column label="状态" align="center" prop="status">
4443
<template slot-scope="scope">
45-
<span>{{ parseTime(scope.row.useTime) }}</span>
44+
<dict-tag :type="DICT_TYPE.PROMOTION_COUPON_STATUS" :value="scope.row.status" />
4645
</template>
4746
</el-table-column>
48-
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
47+
<el-table-column label="领取时间" align="center" prop="createTime" width="180">
4948
<template slot-scope="scope">
5049
<span>{{ parseTime(scope.row.createTime) }}</span>
5150
</template>
5251
</el-table-column>
52+
<el-table-column label="使用时间" align="center" prop="useTime" width="180">
53+
<template slot-scope="scope">
54+
<span>{{ parseTime(scope.row.useTime) }}</span>
55+
</template>
56+
</el-table-column>
5357
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
5458
<template slot-scope="scope">
5559
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
@@ -94,7 +98,7 @@ export default {
9498
createTime: [],
9599
status: undefined,
96100
},
97-
// Tab 想选
101+
// Tab 筛选
98102
activeTab: 'all',
99103
statusTabs: [{
100104
label: '全部',
@@ -148,9 +152,9 @@ export default {
148152
this.$modal.msgSuccess("删除成功");
149153
}).catch(() => {});
150154
},
155+
/** tab 切换 */
151156
tabClick(tab) {
152157
this.queryParams.status = tab.name === 'all' ? undefined : tab.name;
153-
this.list = [];
154158
this.getList();
155159
}
156160
}

0 commit comments

Comments
 (0)