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