Commit a167b2bd by 吕明尚

优惠卷增加查询条件

parent 7b2e4e04
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<!-- <el-form-item label="用户ID" prop="consumerId">-->
<!-- <el-input-->
<!-- v-model="queryParams.consumerId"-->
<!-- placeholder="请输入用户ID"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="优惠券ID" prop="couponId">-->
<!-- <el-input-->
<!-- v-model="queryParams.couponId"-->
<!-- placeholder="请输入优惠券ID"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="优惠券编码" prop="couponCode">
<el-input
v-model="queryParams.couponCode"
......@@ -43,55 +27,31 @@
/>
</el-select>
</el-form-item>
<el-form-item label="订单类型" prop="orderType">
<el-select v-model="queryParams.orderType" placeholder="请选择订单类型" clearable>
<el-option
key="1"
label="预订"
value="1"
/>
<el-option
key="2"
label="续单"
value="2"
/>
</el-select>
</el-form-item>
<el-form-item label="适用套餐" prop="packageId">
<el-select v-model="queryParams.packageId" placeholder="请选择适用套餐" clearable>
<el-option
v-for="dict in packList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="优惠开始" prop="couponTimeStart">-->
<!-- <el-input-->
<!-- v-model="queryParams.couponTimeStart"-->
<!-- placeholder="请输入优惠开始"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="优惠结束" prop="couponTimeEnd">-->
<!-- <el-input-->
<!-- v-model="queryParams.couponTimeEnd"-->
<!-- placeholder="请输入优惠结束"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="折扣最大时长" prop="maxDuration">-->
<!-- <el-input-->
<!-- v-model="queryParams.maxDuration"-->
<!-- placeholder="请输入折扣最大时长"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="时长" prop="duration">-->
<!-- <el-input-->
<!-- v-model="queryParams.duration"-->
<!-- placeholder="请输入时长"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="门槛金额" prop="minPrice">-->
<!-- <el-input-->
<!-- v-model="queryParams.minPrice"-->
<!-- placeholder="请输入门槛金额"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="减去金额" prop="subPrice">-->
<!-- <el-input-->
<!-- v-model="queryParams.subPrice"-->
<!-- placeholder="请输入减去金额(满减券单位:元,折扣为系数)"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="有效期开始" prop="startDate">
<el-date-picker clearable
v-model="queryParams.startDate"
......@@ -119,31 +79,7 @@
>
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="删除状态" prop="isDelete">-->
<!-- <el-input-->
<!-- v-model="queryParams.isDelete"-->
<!-- placeholder="请输入删除状态(0:未删除,1:已删除)"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="更新者" prop="deleteBy">-->
<!-- <el-input-->
<!-- v-model="queryParams.deleteBy"-->
<!-- placeholder="请输入更新者"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="更新时间" prop="deleteTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="queryParams.deleteTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择更新时间"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
......@@ -228,6 +164,18 @@
<dict-tag :options="dict.type.consumer_coupon_platform_type" :value="scope.row.platformType"/>
</template>
</el-table-column>
<el-table-column label="订单类型" align="center" prop="orderType">
<template slot-scope="scope">
<dict-tag :options="dict.type.store_order_type" :value="scope.row.orderType"/>
</template>
</el-table-column>
<el-table-column label="套餐" align="center" prop="packageId">
<template slot-scope="scope">
<div v-if="scope.row.packageId">
<dict-tag :options="packList" :value="scope.row.packageId"/>
</div>
</template>
</el-table-column>
<el-table-column label="有效开始时段" align="center" prop="couponTimeStart"/>
<el-table-column label="有效结束时段" align="center" prop="couponTimeEnd"/>
<el-table-column label="有效期开始" align="center" prop="startDate" width="180">
......@@ -389,10 +337,11 @@ import {
} from '@/api/system/consumerCoupon'
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'],
dicts: ['consumer_coupon_platform_type', 'store_coupon_type', 'consumer_coupon_source_type', 'store_room_type', 'coupon_use_status', 'store_order_type'],
data() {
return {
// 遮罩层
......@@ -410,6 +359,7 @@ export default {
// 优惠券领取记录表格数据
consumerCouponList: [],
storeList: [],
packList: [],
// 弹出层标题
title: '',
// 是否显示弹出层
......@@ -458,6 +408,7 @@ export default {
created() {
this.getList()
this.onStoreList();
this.onPackList();
},
mounted() {
window.addEventListener('message', (data) => {
......@@ -528,6 +479,25 @@ export default {
this.storeList = response.data;
})
},
onPackList() {
query().then(res => {
this.packList = res.data.map(obj => {
return {
...obj,
raw: {
dictSort: 1,
dictValue: "1",
listClass: "primary",
cssClass: ''
},
value: obj.id.toString(),
label: obj.name,
}
})
this.$forceUpdate();
this.getList();
})
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
......
......@@ -9,27 +9,32 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="优惠券类型" prop="couponType">
<el-select v-model="queryParams.couponType" placeholder="请选择优惠券类型" clearable>
<el-form-item label="订单类型" prop="orderType">
<el-select v-model="queryParams.orderType" placeholder="请选择订单类型" clearable>
<el-option
v-for="dict in dict.type.store_coupon_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
key="1"
label="预订"
value="1"
/>
<el-option
key="2"
label="续单"
value="2"
/>
</el-select>
</el-form-item>
<el-form-item label="第三方平台类型" prop="platformType">
<el-select v-model="queryParams.platformType" placeholder="请选择第三方平台类型" clearable>
<el-form-item label="适用套餐" prop="packageId">
<el-select v-model="queryParams.packageId" placeholder="请选择适用套餐" clearable>
<el-option
v-for="dict in dict.type.store_platform_type"
v-for="dict in packList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="有效期开始" prop="startDate">
<el-date-picker clearable
v-model="queryParams.startDate"
......@@ -272,7 +277,7 @@ import {query} from '@/api/system/pack'
export default {
name: "Coupon",
dicts: ['store_coupon_type', 'store_type', 'store_room_type', 'store_platform_type', 'duration_coupon_type', 'store_order_type'],
dicts: ['store_coupon_type', 'store_type', 'store_room_type', 'store_platform_type', 'duration_coupon_type', 'store_order_type', 'coupon_use_status'],
data() {
return {
// 遮罩层
......
......@@ -9,27 +9,32 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="优惠券类型" prop="couponType">
<el-select v-model="queryParams.couponType" placeholder="请选择优惠券类型" clearable>
<el-form-item label="订单类型" prop="orderType">
<el-select v-model="queryParams.orderType" placeholder="请选择订单类型" clearable>
<el-option
v-for="dict in dict.type.store_coupon_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
key="1"
label="预订"
value="1"
/>
<el-option
key="2"
label="续单"
value="2"
/>
</el-select>
</el-form-item>
<el-form-item label="第三方平台类型" prop="platformType">
<el-select v-model="queryParams.platformType" placeholder="请选择第三方平台类型" clearable>
<el-form-item label="适用套餐" prop="packageId">
<el-select v-model="queryParams.packageId" placeholder="请选择适用套餐" clearable>
<el-option
v-for="dict in dict.type.store_platform_type"
v-for="dict in packList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="有效期开始" prop="startDate">
<el-date-picker clearable
v-model="queryParams.startDate"
......@@ -271,7 +276,7 @@ import {query} from '@/api/system/pack'
export default {
name: "Coupon",
dicts: ['store_coupon_type', 'store_type', 'store_room_type', 'store_platform_type', 'cash_coupon_type', 'store_order_type'],
dicts: ['store_coupon_type', 'store_type', 'store_room_type', 'store_platform_type', 'cash_coupon_type', 'store_order_type', 'coupon_use_status'],
data() {
return {
// 遮罩层
......
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