Commit 6358c0f7 by 吕明尚

赠送优惠卷只显示有效期内的

parent db5e966d
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -48,6 +48,7 @@
"js-beautify": "1.13.0",
"js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1",
"moment": "^2.30.1",
"nprogress": "0.2.0",
"quill": "1.3.7",
"screenfull": "5.0.2",
......
......@@ -9,6 +9,13 @@ export function listConsumer(query) {
})
}
export function queryConsumer() {
return request({
url: '/system/consumer/query',
method: 'get'
})
}
// 查询会员用户详细
export function getConsumer(id) {
return request({
......
......@@ -323,6 +323,7 @@
import { listConsumer, getConsumer, delConsumer, addConsumer, updateConsumer } from "@/api/system/consumer";
import {listDuration} from "../../../api/system/coupon";
import {give} from "../../../api/system/consumerCoupon";
import moment from "moment";
export default {
name: "Consumer",
......@@ -369,7 +370,8 @@ export default {
},
couponQueryParams: {
pageNum: 1,
pageSize: 10
pageSize: 10,
endDate: null
},
// 表单参数
form: {},
......@@ -402,6 +404,7 @@ export default {
});
},
getCouponList() {
this.couponQueryParams.endDate = moment().format('YYYY-MM-DD')
listDuration(this.couponQueryParams).then(response => {
this.couponList = response.rows;
this.couponTotal = response.total;
......
......@@ -17,6 +17,22 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="用户手机号" prop="phone">
<el-input
v-model="queryParams.phone"
placeholder="请输入用户手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="用户昵称" prop="nickName">
<el-input
v-model="queryParams.nickName"
placeholder="请输入用户昵称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="门店名称" prop="storeId">
<el-select v-model="queryParams.storeId" placeholder="请选择门店" clearable>
<el-option
......@@ -117,18 +133,18 @@
>美团授权
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:consumerCoupon:remove']"
>删除
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['system:consumerCoupon:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
......@@ -144,9 +160,12 @@
</el-row>
<el-table v-loading="loading" :data="consumerCouponList" @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="用户ID" align="center" prop="consumerId"/>
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<!--序号-->
<el-table-column type="index" width="55" align="center" label="序号"/>
<!-- <el-table-column label="ID" align="center" prop="id"/>-->
<el-table-column label="用户手机号" align="center" prop="phone"/>
<el-table-column label="用户昵称" align="center" prop="nickName"/>
<el-table-column label="优惠券编码" align="center" prop="couponCode"/>
<el-table-column label="优惠券名称" align="center" prop="name" width="240px"/>
<el-table-column label="优惠券类型" align="center" prop="couponType">
......@@ -349,6 +368,7 @@ import log from '@/views/monitor/job/log'
import {listStore, storeList} from "../../../api/system/store";
import {query} from '@/api/system/pack'
export default {
name: 'ConsumerCoupon',
dicts: ['consumer_coupon_platform_type', 'store_coupon_type', 'consumer_coupon_source_type', 'store_room_type', 'coupon_use_status', 'store_order_type'],
......@@ -434,11 +454,10 @@ export default {
getList() {
this.loading = true
listConsumerCoupon(this.queryParams).then(response => {
console.log(response,90999999999)
this.consumerCouponList = response.rows
this.total = response.total
this.loading = false
})
});
},
// 取消按钮
cancel() {
......@@ -485,7 +504,6 @@ export default {
},
onStoreList() {
storeList().then(response => {
console.log(response, 90999999999)
this.storeList = response.data;
})
},
......@@ -558,7 +576,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除优惠券领取记录编号为"' + ids + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除优惠券领取记录编号为"' + row.name + '"的数据项?').then(function () {
return delConsumerCoupon(ids)
}).then(() => {
this.getList()
......
......@@ -69,30 +69,30 @@
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:coupon:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:coupon:remove']"
>删除
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['system:coupon:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['system:coupon:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
......@@ -108,7 +108,8 @@
</el-row>
<el-table v-loading="loading" :data="couponList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column type="index" width="55" align="center" label="序号"/>
<el-table-column label="优惠券名称" align="center" prop="name"/>
<el-table-column label="优惠券类型" align="center" prop="couponType">
<template slot-scope="scope">
......@@ -467,7 +468,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除优惠券编号为"' + ids + '"的数据项?').then(function () {
this.$modal.confirm('是否确认删除优惠券编号为"' + row.name + '"的数据项?').then(function () {
return delCoupon(ids);
}).then(() => {
this.getList();
......
......@@ -69,30 +69,30 @@
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:coupon:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:coupon:remove']"
>删除
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['system:coupon:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['system:coupon:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
......@@ -108,7 +108,8 @@
</el-row>
<el-table v-loading="loading" :data="couponList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column type="index" width="55" align="center" label="序号"/>
<el-table-column label="优惠券名称" align="center" prop="name"/>
<el-table-column label="优惠券类型" align="center" prop="couponType">
<template slot-scope="scope">
......@@ -506,7 +507,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除优惠券编号为"' + ids + '"的数据项?').then(function () {
this.$modal.confirm('是否确认删除优惠券编号为"' + row.name + '"的数据项?').then(function () {
return delCoupon(ids);
}).then(() => {
this.getList();
......
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