Commit 726b5c52 by damodmg

更新卡券列表接口

parent 92f68e0e
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.b949e86957345ef60abd04cc5284c8f4.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.4d1a10f67d00682ae1c9.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.58213c4dd9ab9c955db42dc011150359.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.d45316c962928710025d.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,11 +6,15 @@
<el-input v-model="searchValue" placeholder="请输入卡号/卡密券码" prefix-icon="el-icon-search" clearable @keyup.enter.native="getSearchList" @clear="getSearchList"> </el-input>
</div>
<el-table :data="couponListModal.tableDate" style="width: 100%">
<el-table-column prop="cardNum" label="卡号" width="160px;"> </el-table-column>
<el-table-column prop="cardPass" label="卡密/券码" width="160px;"> </el-table-column>
<el-table-column prop="cardNumber" label="卡号" width="160px;">
<template slot-scope="scope">
<p>{{ scope.row.cardNumber ? scope.row.cardNumber : '--' }}</p>
</template>
</el-table-column>
<el-table-column prop="cardPassWord" label="卡密/券码" width="160px;"> </el-table-column>
<el-table-column prop="status" label="兑换状态" width="120px;">
<template slot-scope="scope">
<p class="intergral-edit">{{ scope.row.status === 0 ? '未兑换' : '已兑换' }}</p>
<p class="intergral-edit">{{ scope.row.status === 1 ? '未兑换' : '已兑换' }}</p>
</template>
</el-table-column>
<el-table-column label="操作" width="140px;">
......@@ -36,7 +40,7 @@
</div>
</template>
</el-table>
<div style="margin:15px 0;text-align:right">
<div style="margin:15px 0;text-align:right" v-if="couponListModal.tableDate.length > 0">
<el-pagination :page-size="20" :pager-count="5" @current-change="handleCurrentChange" layout="prev, pager, next" :current-page="couponCurrentPage" :total="total"> </el-pagination>
</div>
</div>
......@@ -73,9 +77,9 @@ export default {
//删除
deleteList(item) {
let params = {
id: item.id
giftCardId: item.giftCardId
};
request.post('/api-integral-mall/delete-pro', qs.stringify(params)).then(res => {
request.post('/api-integral-mall/delete-giftcard', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
this.$message.success('删除成功');
this.$emit('getChildSearch', this.searchValue, this.couponListModal.integralMallProId, this.couponCurrentPage);
......
......@@ -207,18 +207,7 @@ export default {
couponListModal: {
dialogVisible: false,
integralMallProId: '',
tableDate: [
{
cardNum: '154621154',
cardPass: '4546542312dwa',
status: 1
},
{
cardNum: '16577777777777',
cardPass: '2313214444444445',
status: 0
}
]
tableDate: []
},
couponListSearch: '',
couponCurrentPage: 1,
......@@ -357,8 +346,13 @@ export default {
currentPage: this.couponCurrentPage,
pageSize: 20
};
request.get('/api-integral-mall/page-gift', { params }).then(res => {
request.post('/api-integral-mall/page-giftcard', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
if (res.data.result.rows) {
this.couponListModal.tableDate = res.data.result.rows;
} else {
this.couponListModal.tableDate = [];
}
this.couponListModal.dialogVisible = true;
this.couponListModal.integralMallProId = integralMallProId;
} else {
......
......@@ -650,6 +650,7 @@ export default {
} else {
this.giftForm.limitTimeBegin = '';
}
//配送方式
if (res.data.result.giftType === 1) {
//实物礼品
......@@ -659,7 +660,6 @@ export default {
//虚拟礼品
this.giftForm.changeType = Number(res.data.result.changeType);
}
if (this.giftForm.changeType === 1) {
this.refundTypeStatus = true;
} else {
......@@ -728,27 +728,39 @@ export default {
this.skuList.push(tem);
}
}
if (this.giftProStandardJson.length > 0) {
if (this.skuList.length > 0) {
//spu库存是否可输入
this.stockDisabled = true;
if (res.data.result.giftType === 1) {
//实物礼品
if (this.giftProStandardJson.length > 0) {
if (this.skuList.length > 0) {
//spu库存是否可输入
this.stockDisabled = true;
} else {
this.stockDisabled = false;
}
} else {
this.stockDisabled = false;
}
} else {
this.stockDisabled = false;
} else if (res.data.result.giftType === 0) {
//虚拟
if (this.giftForm.changeType === 5) {
//文本券码
this.stockDisabled = true;
} else {
//在线发货
if (this.giftProStandardJson.length > 0) {
if (this.skuList.length > 0) {
//有sku(主要是处理老数据)
//spu库存是否可输入
this.stockDisabled = true;
} else {
//无sku的数据
this.stockDisabled = false;
}
} else {
this.stockDisabled = false;
}
}
}
//根据sku的库存获得spu的库存
// let temSum = 0;
// for (let i in this.skuList) {
// for (let j in this.skuList[i]) {
// if (this.skuList[i].length - j == 3) {
// if (this.skuList[i][j].valueName !== '') temSum += Number(this.skuList[i][j].valueName);
// }
// }
// }
// this.giftForm.virtualStock = temSum;
} else {
this.$message.error(res.data.message);
}
......
......@@ -58,7 +58,7 @@
<div class="info-name">
<p class="pro-ellipsis">{{ scope.row.giftName }}</p>
<!-- status: 1是未领取,2是已领取 -->
<p style="font-size:13px;color:#909399"><span v-if="scope.row.status === 2">已领取</span><span v-if="scope.row.status <= 2">未领取</span> / <span v-if="scope.row.useStatus === 5">已使用</span><span v-if="scope.row.useStatus === 0">未使用</span></p>
<p style="font-size:13px;color:#909399"><span v-if="scope.row.status === 2">已领取</span><span v-if="scope.row.status < 2">未领取</span> / <span v-if="scope.row.useStatus === 5">已使用</span><span v-if="scope.row.useStatus === 0">未使用</span></p>
<!-- <p class="category-ellipsis">
<span v-for="(i, v) in scope.row.sku" :key="v" style="margin-right:3px">{{ i.proName }}:{{ v.valueName ? v.valueName : '--' }}</span>
</p>
......
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