|
29 | 29 | <el-table v-loading="loading" :data="list">
|
30 | 30 | <el-table-column label="会员信息" align="center" prop="nickname" /> <!-- TODO 芋艿:以后支持头像,支持跳转 -->
|
31 | 31 | <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"> |
34 | 33 | <template slot-scope="scope">
|
35 |
| - <span>{{ parseTime(scope.row.validStartTime) }}</span> |
| 34 | + <dict-tag :type="DICT_TYPE.PROMOTION_DISCOUNT_TYPE" :value="scope.row.discountType" /> |
36 | 35 | </template>
|
37 | 36 | </el-table-column>
|
38 |
| - <el-table-column label="生效结束时间" align="center" prop="validEndTime" width="180"> |
| 37 | + <el-table-column label="领取方式" align="center" prop="takeType"> |
39 | 38 | <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" /> |
41 | 40 | </template>
|
42 | 41 | </el-table-column>
|
43 |
| - <el-table-column label="使用时间" align="center" prop="useTime" width="180"> |
| 42 | + <el-table-column label="状态" align="center" prop="status"> |
44 | 43 | <template slot-scope="scope">
|
45 |
| - <span>{{ parseTime(scope.row.useTime) }}</span> |
| 44 | + <dict-tag :type="DICT_TYPE.PROMOTION_COUPON_STATUS" :value="scope.row.status" /> |
46 | 45 | </template>
|
47 | 46 | </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"> |
49 | 48 | <template slot-scope="scope">
|
50 | 49 | <span>{{ parseTime(scope.row.createTime) }}</span>
|
51 | 50 | </template>
|
52 | 51 | </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> |
53 | 57 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
54 | 58 | <template slot-scope="scope">
|
55 | 59 | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
@@ -94,7 +98,7 @@ export default {
|
94 | 98 | createTime: [],
|
95 | 99 | status: undefined,
|
96 | 100 | },
|
97 |
| - // Tab 想选 |
| 101 | + // Tab 筛选 |
98 | 102 | activeTab: 'all',
|
99 | 103 | statusTabs: [{
|
100 | 104 | label: '全部',
|
@@ -148,9 +152,9 @@ export default {
|
148 | 152 | this.$modal.msgSuccess("删除成功");
|
149 | 153 | }).catch(() => {});
|
150 | 154 | },
|
| 155 | + /** tab 切换 */ |
151 | 156 | tabClick(tab) {
|
152 | 157 | this.queryParams.status = tab.name === 'all' ? undefined : tab.name;
|
153 |
| - this.list = []; |
154 | 158 | this.getList();
|
155 | 159 | }
|
156 | 160 | }
|
|
0 commit comments