Commit 857ed225 by member

修改卡券接口

parent 23609965
...@@ -23,35 +23,15 @@ ...@@ -23,35 +23,15 @@
> >
<el-table-column label width="55"> <el-table-column label width="55">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio class="radio-style" :label="scope.row.coupCardId" v-model="radio">&nbsp;</el-radio> <el-radio class="radio-style" :label="scope.row.integralMallProId" v-model="radio">&nbsp;</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="卡券名称"> <el-table-column label="卡券名称" prop="cardName" >
<template slot-scope="scope">{{ scope.row.cardName }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="subName" label="备注名"></el-table-column> <el-table-column prop="proSubName" label="备注名"></el-table-column>
<el-table-column prop label="有效期"> <el-table-column prop="integralCost" label="兑换限制"></el-table-column>
<template slot-scope="scope"> <el-table-column prop="virtualStock" label="库存"></el-table-column>
<div
v-if="scope.row.cardEffectiveMode == 0"
>{{scope.row.beginDate+'-'+ scope.row.endDate}}</div>
<div
v-if="scope.row.cardEffectiveMode == 1"
>领取{{scope.row.startDay +'-'+ scope.row.limitDay}}天后,可以使用</div>
</template>
</el-table-column>
<el-table-column prop label="领取限制">
<template slot-scope="scope">每人限制{{scope.row.cardLimit}}</template>
</el-table-column>
<el-table-column prop label="适用门店">
<template slot-scope="scope">
<div v-if="scope.row.storeMode == 0">所有门店</div>
<div v-if="scope.row.storeMode == 1">部分分组</div>
<div v-if="scope.row.storeMode == 2">部分门店</div>
</template>
</el-table-column>
<el-table-column prop="couponStock" label="库存"></el-table-column>
</el-table> </el-table>
<div class="pagination" v-if="total>0"> <div class="pagination" v-if="total>0">
<el-pagination <el-pagination
...@@ -97,7 +77,7 @@ export default { ...@@ -97,7 +77,7 @@ export default {
// 当某行点击的时候 // 当某行点击的时候
handleCurrentChangeRow(row) { handleCurrentChangeRow(row) {
this.$nextTick(_ => { this.$nextTick(_ => {
if (row.coupCardId == this.radio) { if (row.integralMallProId == this.radio) {
this.$emit('pass-id', row); this.$emit('pass-id', row);
} }
}); });
...@@ -112,25 +92,25 @@ export default { ...@@ -112,25 +92,25 @@ export default {
searchParam: this.cardName searchParam: this.cardName
}; };
this.axios this.axios
.post(this.baseUrl + "/api-plug/get-coupon-list", qs.stringify(param)) .post(this.baseUrl + "/api-integral-mall/page-cards", qs.stringify(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.result) { if (!!resData.result.rows) {
resData.result.result.forEach((ele, index) => { // resData.result.rows.forEach((ele, index) => {
if (!!ele.beginDate) { // if (!!ele.beginDate) {
ele.beginDate = this.formatDate(ele.beginDate, "."); // ele.beginDate = this.formatDate(ele.beginDate, ".");
} // }
if (!!ele.endDate) { // if (!!ele.endDate) {
ele.endDate = this.formatDate(ele.endDate, "."); // ele.endDate = this.formatDate(ele.endDate, ".");
} // }
}); // });
this.cardData = resData.result.result; this.cardData = resData.result.rows;
} else { } else {
this.cardData = []; this.cardData = [];
} }
this.total = resData.result.totalCount; this.total = resData.result.total;
} }
} else { } else {
this.$message.error({ duration: 1000, message: resData.message }); this.$message.error({ duration: 1000, message: resData.message });
......
...@@ -670,7 +670,7 @@ export default { ...@@ -670,7 +670,7 @@ export default {
this.chooseFlag = true; this.chooseFlag = true;
// 先保存下来 // 先保存下来
this.cardName = row.cardName; this.cardName = row.cardName;
this.cardUrl = row.coupCardId; this.cardUrl = row.integralMallProId;
}, },
// -------------------------------------------------- // --------------------------------------------------
// 选择类型改变 (一级选择,保存选择类型) // 选择类型改变 (一级选择,保存选择类型)
......
...@@ -639,7 +639,7 @@ export default { ...@@ -639,7 +639,7 @@ export default {
this.chooseFlag = true; this.chooseFlag = true;
// 先保存下来 // 先保存下来
this.cardName = row.cardName; this.cardName = row.cardName;
this.cardUrl = row.coupCardId; this.cardUrl = row.integralMallProId;
}, },
// -------------------------------------------------- // --------------------------------------------------
// 选择类型改变 (一级选择,保存选择类型) // 选择类型改变 (一级选择,保存选择类型)
......
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