Commit df3d1c0e by 萱草

Merge branch 'feature/福利中心-礼品管理' into dev

# Conflicts:
#	dist/index.html
#	dist/js/app.a0a63180.js
#	dist/js/app.c68bde7f.js
#	dist/js/app.ffcc74ac.js
#	dist/js/chunk-3339acd5.ae0b9220.js
parents 4a254395 e864c8d3
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.
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.
......@@ -112,10 +112,12 @@ export default {
giftSkuStrand: skuList[i].giftSkuStrand, // 礼品sku规格信息
giftId: skuList[i].giftId
});
for (let j = 0; j < JSON.parse(skuList[i].giftSkuStrand).length; j++) {
mapData[i].id.push(JSON.parse(skuList[i].giftSkuStrand)[j].specStandardValueId);
if(skuList[i].giftSkuStrand){
for (let j = 0; j < JSON.parse(skuList[i].giftSkuStrand).length; j++) {
mapData[i].id.push(JSON.parse(skuList[i].giftSkuStrand)[j].specStandardValueId);
}
mapData[i].mapId = mapData[i].id.join('_');
}
mapData[i].mapId = mapData[i].id.join('_');
}
for (let item of mapData) {
skuSellObj[item.mapId] = {
......@@ -133,8 +135,7 @@ export default {
this.skuSellObj = deepClone(skuSellObj);
console.log(this.skuSellObj);
}
this.goodsStandardInfo = JSON.parse(this.giftSpecInfo); // 礼品规格信息
console.log(this.goodsStandardInfo);
this.goodsStandardInfo = this.giftSpecInfo ? JSON.parse(this.giftSpecInfo) : []; // 礼品规格信息
if (this.goodsStandardInfo.length > 0) {
this.isStdImg = this.goodsStandardInfo[0].standardimg === 2 ? true : false;
} else {
......@@ -142,6 +143,8 @@ export default {
}
if (this.goodsStandardInfo.length > 0) {
this.getSkuList();
}else{
this.giftSkuId = skuList[0].giftSkuId;
}
}
});
......@@ -225,7 +228,7 @@ export default {
}
this.skuSellObj = deepClone(this.skuSellObj);
this.costPrice = this.skuSellObj[this.goodsSkuList[0].mapId].giftSkuCostPrice;
this.giftSkuId = this.skuSellObj[this.goodsSkuList[0].mapId].giftSkuId;
// this.giftSkuId = this.skuSellObj[this.goodsSkuList[0].mapId].giftSkuId;
this.refash = !this.refash;
},
combine(arr) {
......
......@@ -134,10 +134,12 @@ export default {
giftSkuStrand: skuList[i].giftSkuStrand, // 礼品sku规格信息
giftId: skuList[i].giftId
});
for (let j = 0; j < JSON.parse(skuList[i].giftSkuStrand).length; j++) {
mapData[i].id.push(JSON.parse(skuList[i].giftSkuStrand)[j].specStandardValueId);
if(skuList[i].giftSkuStrand){
for (let j = 0; j < JSON.parse(skuList[i].giftSkuStrand).length; j++) {
mapData[i].id.push(JSON.parse(skuList[i].giftSkuStrand)[j].specStandardValueId);
}
mapData[i].mapId = mapData[i].id.join('_');
}
mapData[i].mapId = mapData[i].id.join('_');
}
for (let item of mapData) {
skuSellObj[item.mapId] = {
......@@ -155,8 +157,7 @@ export default {
this.skuSellObj = deepClone(skuSellObj);
console.log(this.skuSellObj);
}
this.goodsStandardInfo = JSON.parse(this.giftSpecInfo); // 礼品规格信息
console.log(this.goodsStandardInfo);
this.goodsStandardInfo = this.giftSpecInfo ? JSON.parse(this.giftSpecInfo) : []; // 礼品规格信息
if (this.goodsStandardInfo.length > 0) {
this.isStdImg = this.goodsStandardInfo[0].standardimg === 2 ? true : false;
} else {
......@@ -164,6 +165,8 @@ export default {
}
if (this.goodsStandardInfo.length > 0) {
this.getSkuList();
}else{
this.giftSkuId = skuList[0].giftSkuId;
}
}
});
......@@ -290,7 +293,7 @@ export default {
}
}
this.skuSellObj = deepClone(this.skuSellObj);
this.giftSkuId = this.skuSellObj[this.goodsSkuList[0].mapId].giftSkuId;
// this.giftSkuId = this.skuSellObj[this.goodsSkuList[0].mapId].giftSkuId;
console.log(this.skuSellObj);
this.refash = !this.refash;
},
......
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