Commit 73c56feb by chenyu

update: bugfix

parent 22c85ca8
......@@ -553,11 +553,13 @@ export default {
},
//sku库存相加得spu库存
addStock() {
console.log(1);
let temSum = 0;
let minIntergral = { integralCost: '', cashCost: '' };
for (let i in this.skuList) {
for (let j in this.skuList[i]) {
if (this.skuList[i].length - j == 6) {
// 现金
if (minIntergral.integralCost === '') {
minIntergral = Object.assign({}, minIntergral, {
integralCost: this.skuList[i][j].valueName,
......@@ -580,8 +582,9 @@ export default {
}
}
if (this.skuList[i].length - j == 5) {
// 积分
if (Number(this.skuList[i][Number(j) - 1].valueName) <= Number(minIntergral.integralCost) && Number(this.skuList[i][j].valueName) <= Number(minIntergral.cashCost)) {
minIntergral = Object.assign({}, minIntergral, { integralCost: this.skuList[i][Number(j) - 1].valueName, cashCost: this.skuList[i][j].valueName });
minIntergral = Object.assign({}, minIntergral, { integralCost: this.skuList[i][Number(j) - 1].valueName, cashCost: this.skuList[i][j].valueName || '0' });
this.$emit('changeMinIntegral', minIntergral);
}
}
......@@ -617,7 +620,6 @@ export default {
this.addStock();
},
skuInput(item1, item2, index1, index2) {
console.log(1);
let reg = /^[0-9a-zA-Z]+?$/;
if (item1.length - index2 === 6) {
//积分
......
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