Commit d6528367 by member

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

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