Commit 60410311 by lixiaomin

修改优惠券列表

parent 1c32f146
import request from "@/utils/request"; import request from "@/utils/request";
// 查询列表 // 查询列表
export function listClass(query) { export function listCoupon(data) {
return request({ return request({
url: "/system/category/list", url: "/coupon/list",
method: "get", method: "post",
params: query, data: data,
}); });
} }
// 查询详细
export function getClass(id) {
return request({
url: "/system/category/" + id,
method: "get",
});
}
// 新增 // 新增
export function addCoupon(data) { export function addCoupon(data) {
...@@ -43,11 +36,3 @@ export function delClass(id) { ...@@ -43,11 +36,3 @@ export function delClass(id) {
}); });
} }
// 查询排序列表
export function turnList(query) {
return request({
url: "/system/category/turnOrder",
method: "get",
params: query,
});
}
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-table v-loading="loading" :data="couponTypeList"> <el-table v-loading="loading" :data="couponList">
<el-table-column label="优惠券名称" align="center" prop="name"> <el-table-column label="优惠券名称" align="center" prop="name">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="handleUpdate(scope.row)" style="color: blue">{{ scope.row.name }}</a> <a @click="handleUpdate(scope.row)" style="color: blue">{{ scope.row.name }}</a>
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="优惠券可领取时间" > <el-form-item label="优惠券可领取时间" >
<el-date-picker v-model="form.startTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择领取日期" style="width: 205px;"/> <el-date-picker v-model="form.receivableTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择领取日期" style="width: 205px;"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
<script> <script>
import { import {
addCoupon, addCoupon,listCoupon
} from "@/api/coupon/coupon"; } from "@/api/coupon/coupon";
import {getCouCategoryList} from "@/api/coupon/couponType"; import {getCouCategoryList} from "@/api/coupon/couponType";
import GiveCoupon from './giveCoupon.vue'; import GiveCoupon from './giveCoupon.vue';
...@@ -203,7 +203,7 @@ export default { ...@@ -203,7 +203,7 @@ export default {
// 总条数 // 总条数
total: 0, total: 0,
// 表格数据 // 表格数据
couponTypeList: [], couponList: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
...@@ -213,7 +213,8 @@ export default { ...@@ -213,7 +213,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
name: null, name: null,
state: null state: null,
categoryId:null
}, },
// 表单参数 // 表单参数
form: { form: {
...@@ -388,10 +389,12 @@ export default { ...@@ -388,10 +389,12 @@ export default {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listClass(this.queryParams).then((response) => { listCoupon(this.queryParams).then((response) => {
this.couponTypeList = response.rows; if(response.code==200){
this.total = response.total; this.couponList = response.rows;
this.loading = false; this.total = response.total;
this.loading = false;
}
}); });
}, },
// 取消按钮 // 取消按钮
......
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