Commit 86005f80 by lixiaomin

修改优惠券列表查询

parent 8a32f72c
...@@ -126,10 +126,8 @@ export default { ...@@ -126,10 +126,8 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
let userId=null; let userId=null;
let userPhone=null;
if(this.customerList.length>0){ if(this.customerList.length>0){
userId=this.customerList[0].id; userId=this.customerList[0].id;
userPhone=this.customerList[0].phoneNumber;
}else{ }else{
this.$message.error("请查询赠送优惠券的用户!"); this.$message.error("请查询赠送优惠券的用户!");
return; return;
...@@ -139,7 +137,7 @@ export default { ...@@ -139,7 +137,7 @@ export default {
this.$message.error("请选择需要赠送的优惠券!"); this.$message.error("请选择需要赠送的优惠券!");
return; return;
} }
giveCoupon({"userId":userId,"userPhone":userPhone,"couponId":couponId}).then((response) => { giveCoupon({"userId":userId,"couponId":couponId}).then((response) => {
if(response.code==200){ if(response.code==200){
this.$modal.msgSuccess("赠送成功"); this.$modal.msgSuccess("赠送成功");
this.giveOpen = false; this.giveOpen = false;
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
<el-form-item label="分类名称 " prop="name"> <el-form-item label="分类名称 ">
<el-input v-model="queryParams.name" placeholder="分类名称 " clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.name" placeholder="请输入分类名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="优惠券类别">
<!-- <el-select v-model="queryParams.state" placeholder="请选择" clearable @keyup.enter.native="handleQuery"> <el-select v-model="queryParams.categoryId" placeholder="请选择优惠券类别" clearable @keyup.enter.native="handleQuery">
<el-option <el-option
v-for="item in options" v-for="item in couCategoryList"
:key="item.value" :key="item.id"
:label="item.label" :label="item.name"
:value="item.value"> :value="item.id">
</el-option> </el-option>
</el-select> --> </el-select>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="queryParams.state" placeholder="请选择状态" clearable @keyup.enter.native="handleQuery">
<el-option label="生效中" value="1"></el-option>
<el-option label="未生效" value="2"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['coupon:coupon:query']">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['coupon:coupon:query']">搜索</el-button>
...@@ -274,6 +280,7 @@ export default { ...@@ -274,6 +280,7 @@ export default {
created() { created() {
this.getList(); this.getList();
this.getCategoryList(); this.getCategoryList();
this.getcouCategoryList();
this.getShopList(); this.getShopList();
this.getCityList(); this.getCityList();
}, },
...@@ -438,11 +445,10 @@ export default { ...@@ -438,11 +445,10 @@ export default {
this.form.sendMsgTag=2 this.form.sendMsgTag=2
this.open = true; this.open = true;
this.title = "新增优惠券"; this.title = "新增优惠券";
this.getcouCategoryList();
this.getShopRangeList(); this.getShopRangeList();
this.getStoresList(); this.getStoresList();
}, },
/** 启用、禁用按钮操作 */ /** 上线、下线按钮操作 */
handleStatus(row,tag) { handleStatus(row,tag) {
let mess=""; let mess="";
if(tag=='1'){ if(tag=='1'){
......
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