|
@@ -52,24 +52,41 @@
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
- <el-table height="500" border v-loading="loading" :data="storeCouponUserList" @selection-change="handleSelectionChange">
|
|
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
- <el-table-column label="ID" align="center" prop="id" />
|
|
|
|
|
- <el-table-column label="会员昵称" align="center" prop="nickname" />
|
|
|
|
|
- <el-table-column label="会员手机号" align="center" prop="phone" />
|
|
|
|
|
- <el-table-column label="优惠券名称" align="center" prop="couponTitle" />
|
|
|
|
|
- <el-table-column label="优惠券的面值" align="center" prop="couponPrice" />
|
|
|
|
|
- <el-table-column label="最低消费" align="center" prop="useMinPrice" />
|
|
|
|
|
- <el-table-column label="优惠券结束时间" align="center" prop="limitTime" width="180">
|
|
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ height="500"
|
|
|
|
|
+ border
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ v-loading="loading"
|
|
|
|
|
+ :data="storeCouponUserList"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-table-column label="会员" min-width="120" show-overflow-tooltip>
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <div class="cell-main">{{ scope.row.nickname || '-' }}</div>
|
|
|
|
|
+ <div class="cell-sub">{{ scope.row.phone || '-' }}</div>
|
|
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="领取时间" align="center" prop="createTime" width="180"></el-table-column>
|
|
|
|
|
- <el-table-column label="使用时间" align="center" prop="useTime" width="180">
|
|
|
|
|
|
|
+ <el-table-column label="优惠券" min-width="140" show-overflow-tooltip>
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <div class="cell-main">{{ scope.row.couponTitle || '-' }}</div>
|
|
|
|
|
+ <div class="cell-sub">面值 {{ scope.row.couponPrice }} / 满 {{ scope.row.useMinPrice }}</div>
|
|
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column label="获取方式" align="center" prop="type" /> -->
|
|
|
|
|
- <el-table-column label="状态" align="center" prop="status" >
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-tag prop="status" v-for="(item, index) in statusOptions" v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <el-table-column label="领取/有效期" min-width="150">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <div class="cell-sub">领:{{ formatTime(scope.row.createTime) }}</div>
|
|
|
|
|
+ <div class="cell-sub">止:{{ formatTime(scope.row.limitTime) }}</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="核销信息" min-width="150">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <div class="cell-main">{{ scope.row.verifyUserName || '-' }}</div>
|
|
|
|
|
+ <div class="cell-sub">{{ formatTime(scope.row.verifyTime || scope.row.useTime) }}</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="状态" width="80" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-tag size="mini" :type="statusTagType(scope.row.status)">{{ statusLabel(scope.row.status) }}</el-tag>
|
|
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
|
@@ -165,12 +182,31 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
- this.getDicts("store_coupon_user_status").then((response) => {
|
|
|
|
|
- this.statusOptions = response.data;
|
|
|
|
|
|
|
+ this.getDicts("live_coupon_user_status").then((response) => {
|
|
|
|
|
+ this.statusOptions = response.data || [];
|
|
|
});
|
|
});
|
|
|
this.getList();
|
|
this.getList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ statusLabel(status) {
|
|
|
|
|
+ const hit = (this.statusOptions || []).find(item => String(item.dictValue) === String(status));
|
|
|
|
|
+ if (hit) {
|
|
|
|
|
+ return hit.dictLabel;
|
|
|
|
|
+ }
|
|
|
|
|
+ const fallback = { 0: "未核销", 1: "已核销", 2: "已过期" };
|
|
|
|
|
+ return fallback[status] != null ? fallback[status] : status;
|
|
|
|
|
+ },
|
|
|
|
|
+ statusTagType(status) {
|
|
|
|
|
+ const map = { 0: "info", 1: "success", 2: "danger" };
|
|
|
|
|
+ return map[status] || "info";
|
|
|
|
|
+ },
|
|
|
|
|
+ formatTime(val) {
|
|
|
|
|
+ if (!val) {
|
|
|
|
|
+ return "-";
|
|
|
|
|
+ }
|
|
|
|
|
+ const text = String(val).replace("T", " ");
|
|
|
|
|
+ return text.length >= 16 ? text.substring(0, 16) : text;
|
|
|
|
|
+ },
|
|
|
/** 查询优惠券发放记录列表 */
|
|
/** 查询优惠券发放记录列表 */
|
|
|
getList() {
|
|
getList() {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
@@ -291,3 +327,15 @@ export default {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+.cell-main {
|
|
|
|
|
+ line-height: 18px;
|
|
|
|
|
+ color: #303133;
|
|
|
|
|
+}
|
|
|
|
|
+.cell-sub {
|
|
|
|
|
+ line-height: 18px;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #909399;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|