Commit aa7750e7 by 吕明尚

优惠卷领取记录增加门店名称显示和条件

parent 9799254f
......@@ -15,6 +15,14 @@ export function listStore(query) {
})
}
export function storeList(query) {
return request({
url: '/system/store/query',
method: 'get',
params: query
})
}
// 查询门店详细
export function getStore(id) {
return request({
......
......@@ -33,7 +33,18 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="优惠开始" prop="couponTimeStart">-->
<el-form-item label="门店名称" prop="storeId">
<el-select v-model="queryParams.storeId" placeholder="请选择门店" clearable>
<el-option
v-for="dict in storeList"
:key="dict.id"
:label="dict.name"
:value="dict.id"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="优惠开始" prop="couponTimeStart">-->
<!-- <el-input-->
<!-- v-model="queryParams.couponTimeStart"-->
<!-- placeholder="请输入优惠开始"-->
......@@ -197,6 +208,13 @@
<dict-tag :options="dict.type.store_coupon_type" :value="scope.row.couponType"/>
</template>
</el-table-column>
<el-table-column label="门店名称" align="center" prop="storeId">
<template slot-scope="scope">
<div v-if="scope.row.storeId">
<div v-for="item in storeList" :key="item.id" v-if='scope.row.storeId==item.id'>{{ item.name }}</div>
</div>
</template>
</el-table-column>
<el-table-column label="时长" align="center" prop="duration"/>
<el-table-column label="优惠金额" align="center" prop="subPrice"/>
<el-table-column label="优惠券来源" align="center" prop="sourceType">
......@@ -368,6 +386,7 @@ import {
getAppKey, oauthToken
} from '@/api/system/consumerCoupon'
import log from '@/views/monitor/job/log'
import {listStore, storeList} from "../../../api/system/store";
export default {
name: 'ConsumerCoupon',
......@@ -388,6 +407,7 @@ export default {
total: 0,
// 优惠券领取记录表格数据
consumerCouponList: [],
storeList: [],
// 弹出层标题
title: '',
// 是否显示弹出层
......@@ -435,6 +455,7 @@ export default {
},
created() {
this.getList()
this.onStoreList();
},
mounted() {
window.addEventListener('message', (data) => {
......@@ -499,6 +520,12 @@ export default {
this.queryParams.pageNum = 1
this.getList()
},
onStoreList() {
storeList().then(response => {
console.log(response, 90999999999)
this.storeList = response.data;
})
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
......
......@@ -133,7 +133,7 @@
</el-table-column>
<el-table-column label="套餐" align="center" prop="packageId">
<template slot-scope="scope">
<div v-if="scope.row.packageId" style="display: flex;flex-wrap: wrap;width: 100%;">
<div v-if="scope.row.packageId">
<dict-tag :options="packList" :value="scope.row.packageId"/>
</div>
</template>
......
......@@ -129,7 +129,7 @@
</el-table-column>
<el-table-column label="套餐" align="center" prop="packageId">
<template slot-scope="scope">
<div v-if="scope.row.packageId" style="display: flex;flex-wrap: wrap;width: 100%;">
<div v-if="scope.row.packageId">
<dict-tag :options="packList" :value="scope.row.packageId"/>
</div>
</template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment