Commit 52256a12 by damodmg

sku校验

parent c05d9154
<!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.8f90d9155925a910cb4a678e8e3b0298.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.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.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.00.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.02.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a66e15144de1c0f565b.js></script><script type=text/javascript src=./static/js/app.12c8be6934d4fb4a9900.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.58522a9479facd72cfe56ad539b8a081.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.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.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.00.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.02.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a66e15144de1c0f565b.js></script><script type=text/javascript src=./static/js/app.e65945b6f038ce8c7bd5.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.
......@@ -511,19 +511,19 @@ export default {
for (let i in this.skuList) {
let length = this.skuList[i].length;
if (this.intergral) {
this.skuList[i][length - 5].valueName = this.intergral;
this.skuList[i][length - 6].valueName = this.intergral;
}
if (this.cash) {
this.skuList[i][length - 4].valueName = this.cash;
this.skuList[i][length - 5].valueName = this.cash;
}
if (this.stock) {
this.skuList[i][length - 3].valueName = this.stock;
this.skuList[i][length - 4].valueName = this.stock;
}
if (this.code) {
this.skuList[i][length - 2].valueName = this.code;
this.skuList[i][length - 3].valueName = this.code;
}
if (this.barCode) {
this.skuList[i][length - 1].valueName = this.barCode;
this.skuList[i][length - 2].valueName = this.barCode;
}
}
this.$emit('getSkuList', this.skuList);
......@@ -531,7 +531,7 @@ export default {
},
skuInput(item1, item2, index1, index2) {
let reg = /^[0-9a-zA-Z]+?$/;
if (item1.length - index2 === 5) {
if (item1.length - index2 === 6) {
//积分
//价格
if (Number(item2.valueName < 0)) {
......@@ -548,7 +548,7 @@ export default {
} else {
item2.valueName = Number(item2.valueName).toFixed(0);
}
} else if (item1.length - index2 === 4) {
} else if (item1.length - index2 === 5) {
//现金
if (Number(item2.valueName < 0)) {
this.$message.error('请输入大于0的数字');
......@@ -564,7 +564,7 @@ export default {
} else {
item2.valueName = Number(item2.valueName).toFixed(2);
}
} else if (item1.length - index2 === 3) {
} else if (item1.length - index2 === 4) {
//库存
if (Number(item2.valueName < 0)) {
this.$message.error('请输入大于0的数字');
......@@ -578,14 +578,14 @@ export default {
} else {
item2.valueName = Number(item2.valueName).toFixed(0);
}
} else if (item1.length - index2 === 2) {
} else if (item1.length - index2 === 3) {
//规格编码
if (!reg.test(item2.valueName)) {
this.$message.error('请输入数字或者字母');
item2.valueName = '';
}
item2.valueName = item2.valueName.slice(0, 32);
} else if (item1.length - index2 === 1) {
} else if (item1.length - index2 === 2) {
//商品条形码
if (!reg.test(item2.valueName)) {
this.$message.error('请输入数字或者字母');
......
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