Commit aa7750e7 by 吕明尚

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

parent 9799254f
...@@ -15,6 +15,14 @@ export function listStore(query) { ...@@ -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) { export function getStore(id) {
return request({ return request({
......
...@@ -33,7 +33,18 @@ ...@@ -33,7 +33,18 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </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--> <!-- <el-input-->
<!-- v-model="queryParams.couponTimeStart"--> <!-- v-model="queryParams.couponTimeStart"-->
<!-- placeholder="请输入优惠开始"--> <!-- placeholder="请输入优惠开始"-->
...@@ -197,6 +208,13 @@ ...@@ -197,6 +208,13 @@
<dict-tag :options="dict.type.store_coupon_type" :value="scope.row.couponType"/> <dict-tag :options="dict.type.store_coupon_type" :value="scope.row.couponType"/>
</template> </template>
</el-table-column> </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="duration"/>
<el-table-column label="优惠金额" align="center" prop="subPrice"/> <el-table-column label="优惠金额" align="center" prop="subPrice"/>
<el-table-column label="优惠券来源" align="center" prop="sourceType"> <el-table-column label="优惠券来源" align="center" prop="sourceType">
...@@ -368,6 +386,7 @@ import { ...@@ -368,6 +386,7 @@ import {
getAppKey, oauthToken getAppKey, oauthToken
} from '@/api/system/consumerCoupon' } from '@/api/system/consumerCoupon'
import log from '@/views/monitor/job/log' import log from '@/views/monitor/job/log'
import {listStore, storeList} from "../../../api/system/store";
export default { export default {
name: 'ConsumerCoupon', name: 'ConsumerCoupon',
...@@ -388,6 +407,7 @@ export default { ...@@ -388,6 +407,7 @@ export default {
total: 0, total: 0,
// 优惠券领取记录表格数据 // 优惠券领取记录表格数据
consumerCouponList: [], consumerCouponList: [],
storeList: [],
// 弹出层标题 // 弹出层标题
title: '', title: '',
// 是否显示弹出层 // 是否显示弹出层
...@@ -435,6 +455,7 @@ export default { ...@@ -435,6 +455,7 @@ export default {
}, },
created() { created() {
this.getList() this.getList()
this.onStoreList();
}, },
mounted() { mounted() {
window.addEventListener('message', (data) => { window.addEventListener('message', (data) => {
...@@ -499,6 +520,12 @@ export default { ...@@ -499,6 +520,12 @@ export default {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
this.getList() this.getList()
}, },
onStoreList() {
storeList().then(response => {
console.log(response, 90999999999)
this.storeList = response.data;
})
},
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm('queryForm') this.resetForm('queryForm')
......
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
</el-table-column> </el-table-column>
<el-table-column label="套餐" align="center" prop="packageId"> <el-table-column label="套餐" align="center" prop="packageId">
<template slot-scope="scope"> <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"/> <dict-tag :options="packList" :value="scope.row.packageId"/>
</div> </div>
</template> </template>
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
</el-table-column> </el-table-column>
<el-table-column label="套餐" align="center" prop="packageId"> <el-table-column label="套餐" align="center" prop="packageId">
<template slot-scope="scope"> <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"/> <dict-tag :options="packList" :value="scope.row.packageId"/>
</div> </div>
</template> </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