Commit 47627387 by caoyanzhi

update: 礼品列表调整库存

parent 0474c49a
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<el-button @click="cancelStockModal"> <el-button @click="cancelStockModal">
取 消 取 消
</el-button> </el-button>
<el-button type="primary" @click="confirmStockModal()"> <el-button type="primary" v-loading="loading" @click="confirmStockModal()">
确 定 确 定
</el-button> </el-button>
</div> </div>
...@@ -119,6 +119,7 @@ export default { ...@@ -119,6 +119,7 @@ export default {
giftProSkuCash: '', giftProSkuCash: '',
virtualStock: '', virtualStock: '',
headerList: [], headerList: [],
loading: false,
}; };
}, },
created () { created () {
...@@ -263,6 +264,7 @@ export default { ...@@ -263,6 +264,7 @@ export default {
// 积分 // 积分
}, },
confirmStockModal () { confirmStockModal () {
if (this.loading) return;
let skuJson = []; let skuJson = [];
const arrCash = []; // 费用 const arrCash = []; // 费用
const intergral = []; // 积分 const intergral = []; // 积分
...@@ -364,6 +366,7 @@ export default { ...@@ -364,6 +366,7 @@ export default {
return false; return false;
} }
} }
this.loading = true;
request.post('/api-integral-mall/update-gift-sku', qs.stringify(params)).then(res => { request.post('/api-integral-mall/update-gift-sku', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) { if (res.data.errorCode === 0) {
...@@ -372,6 +375,8 @@ export default { ...@@ -372,6 +375,8 @@ export default {
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
}).finally(() => {
setTimeout(() => (this.loading = false), 50);
}); });
}, },
cancelStockModal () { cancelStockModal () {
......
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