Commit 5545a7be by damodmg

更新规格值重复添加问题

parent 38e0e091
<!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.5f0a8f68493700ba6fc74b56f46a98ed.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.30.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.05.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 src=//web-1251519181.file.myqcloud.com/components/people.2.0.26.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.085109144eb6ba6c5f53.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.19bf7df08d2d269a4f45f0cddb26d778.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.30.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.05.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 src=//web-1251519181.file.myqcloud.com/components/people.2.0.26.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.1f6fd1825e3fffb0e059.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.
......@@ -258,11 +258,32 @@ export default {
};
request.post('/api-integral-mall/save-standard_value', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
item.valueList[index].valueId = res.data.result;
this.handleSku();
this.$emit('IsAgreeUpload', this.isStdImg);
this.$emit('getStandradList', this.skuJson);
this.$emit('getSkuList', this.skuList);
if (res.data.result) {
let repeatId = '';
if (
item.valueList.find(item => {
return item.valueId === res.data.result;
})
) {
repeatId = item.valueList.find(item => {
return item.valueId === res.data.result;
}).valueId;
} else {
repeatId = '';
}
//添加重复
if (repeatId !== res.data.result) {
item.valueList[index].valueId = res.data.result;
this.handleSku();
this.$emit('IsAgreeUpload', this.isStdImg);
this.$emit('getStandradList', this.skuJson);
this.$emit('getSkuList', this.skuList);
} else {
this.$message.error('禁止重复添加');
item.valueList[index].valueName = '';
return false;
}
}
} else {
this.$message.error(res.data.message);
}
......
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