Commit d6528367 by member

fix: 修复了优惠券分页查询问题

parent 455e8b60
<template>
<div>
<div class="filter-list">
<el-select v-model="cardType" style="width: 200px;" placeholder="卡券类型" clearable @change="handleChange">
<!-- <el-option
v-for="item in cardOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-input v-model="cardName" style="width: 200px; margin-left: 20px;" clear placeholder="输入卡券名称" @keyup.native.enter="handleSearch"></el-input> -->
<el-select v-model="cardType" style="width: 200px;" placeholder="卡券类型" clearable @change="handleChange">
<el-option
v-for="item in cardOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-input v-model="cardName" style="width: 200px; margin-left: 20px;" clear placeholder="输入卡券名称" @keyup.native.enter="handleSearch"></el-input>
</div>
<el-table
......@@ -87,25 +86,16 @@ export default {
currentPage: this.cardCurrentPage,
pageSize: this.cardPageSize,
requestProject: this.pname,
cardLimitType: this.cardLimitType,
cardTypes: this.cardType,
searchParam: this.cardName
cardType: this.cardType,
proName: this.cardName
};
this.axios
.post(this.baseUrl + "/api-integral-mall/page-cards", qs.stringify(param))
.get(this.baseUrl + "/api-integral-mall/page-cards-plug", {params: param})
.then(res => {
const resData = res.data;
if (resData.errorCode == 0) {
if (!!resData.result) {
if (!!resData.result.rows) {
// resData.result.rows.forEach((ele, index) => {
// if (!!ele.beginDate) {
// ele.beginDate = this.formatDate(ele.beginDate, ".");
// }
// if (!!ele.endDate) {
// ele.endDate = this.formatDate(ele.endDate, ".");
// }
// });
this.cardData = resData.result.rows;
} else {
this.cardData = [];
......@@ -129,9 +119,11 @@ export default {
this.getCardList();
},
handleChange(val) {
this.cardCurrentPage = 1;
this.getCardList();
},
handleSearch() {
this.cardCurrentPage = 1;
this.getCardList();
}
},
......@@ -144,6 +136,7 @@ export default {
this.baseUrl = host;
}
},
mounted() {
this.getCardList();
}
......
......@@ -674,8 +674,12 @@ export default {
},
methods: {
changeVisible() {
this.$emit('linkSelect', {});
this.$emit('update:linkVisible', false);
// 因为确认之后弹窗关闭也是会触发close事件
// 如果直接close会有id 如果确认之后是没有id
if ('id' in this.selectLinkObj) {
this.$emit('linkSelect', {});
this.$emit('update:linkVisible', false);
}
},
handlePaddGift(list) {
// 拼接id
......
<template>
<!-- 链接小工具 -->
<div class="link-tools-contain">
......@@ -645,8 +643,12 @@ export default {
},
methods: {
changeVisible() {
this.$emit('linkSelect', {});
this.$emit('update:linkVisible', false);
// 因为确认之后弹窗关闭也是会触发close事件
// 如果直接close会有id 如果确认之后是没有id
if ('id' in this.selectLinkObj) {
this.$emit('linkSelect', {});
this.$emit('update:linkVisible', false);
}
},
handlePaddGift(list) {
// 拼接id
......
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