Commit 60410311 by lixiaomin

修改优惠券列表

parent 1c32f146
import request from "@/utils/request";
// 查询列表
export function listClass(query) {
export function listCoupon(data) {
return request({
url: "/system/category/list",
method: "get",
params: query,
url: "/coupon/list",
method: "post",
data: data,
});
}
// 查询详细
export function getClass(id) {
return request({
url: "/system/category/" + id,
method: "get",
});
}
// 新增
export function addCoupon(data) {
......@@ -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 @@
</el-col>
</el-row>
<el-table v-loading="loading" :data="couponTypeList">
<el-table v-loading="loading" :data="couponList">
<el-table-column label="优惠券名称" align="center" prop="name">
<template slot-scope="scope">
<a @click="handleUpdate(scope.row)" style="color: blue">{{ scope.row.name }}</a>
......@@ -137,7 +137,7 @@
</el-col>
<el-col :span="7">
<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-col>
</el-row>
......@@ -184,7 +184,7 @@
<script>
import {
addCoupon,
addCoupon,listCoupon
} from "@/api/coupon/coupon";
import {getCouCategoryList} from "@/api/coupon/couponType";
import GiveCoupon from './giveCoupon.vue';
......@@ -203,7 +203,7 @@ export default {
// 总条数
total: 0,
// 表格数据
couponTypeList: [],
couponList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
......@@ -213,7 +213,8 @@ export default {
pageNum: 1,
pageSize: 10,
name: null,
state: null
state: null,
categoryId:null
},
// 表单参数
form: {
......@@ -388,10 +389,12 @@ export default {
/** 查询列表 */
getList() {
this.loading = true;
listClass(this.queryParams).then((response) => {
this.couponTypeList = response.rows;
this.total = response.total;
this.loading = false;
listCoupon(this.queryParams).then((response) => {
if(response.code==200){
this.couponList = response.rows;
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