|
|
|
@ -622,6 +622,10 @@ |
|
|
|
this.shopId = v.id |
|
|
|
this.searchForm.shopId = v.id |
|
|
|
this.addGoodsForm.shopId = v.id |
|
|
|
// if(this.addGoodsForm.productGroupBuyPrices == null){ |
|
|
|
// this.addGoodsForm.productGroupBuyPrices = [] |
|
|
|
// } |
|
|
|
console.log('aaa',this.addGoodsForm) |
|
|
|
this.screenWidth = window.screen.width; |
|
|
|
// 获取树数据 |
|
|
|
this.getGoodsType(); |
|
|
|
@ -1138,13 +1142,13 @@ |
|
|
|
let data = JSON.parse(str); |
|
|
|
console.log('111111',data) |
|
|
|
this.addGoodsForm = data; |
|
|
|
if(this.addGoodsForm.productGroupBuyPrices == ''){ |
|
|
|
this.addGoodsForm.productGroupBuyPrices = [] |
|
|
|
} |
|
|
|
this.addGoodsForm.attributeList1 = JSON.parse(this.addGoodsForm.attributeList) |
|
|
|
this.addGoodsForm.attributeList1 = new Map(Object.entries(this.addGoodsForm.attributeList1)); |
|
|
|
this.addGoodsForm.attributeListPrice = JSON.parse(this.addGoodsForm.attributeListPrice) |
|
|
|
|
|
|
|
console.log("this.addGoodsForm.attributeList1",this.addGoodsForm.attributeList1) |
|
|
|
console.log("this.addGoodsForm.attributeListPrice",this.addGoodsForm.attributeListPrice) |
|
|
|
|
|
|
|
this.addGoodsForm.attributeList1.forEach((value, key) => { |
|
|
|
for(let i = 0;i<value.title.length;i++){ |
|
|
|
this.attrValueArr.push({ |
|
|
|
@ -1155,7 +1159,6 @@ |
|
|
|
}); |
|
|
|
this.specValueArr = this.addGoodsForm.attributeListPrice |
|
|
|
|
|
|
|
|
|
|
|
this.addGoodsForm.sellTime = this.addGoodsForm.sellBeginTime != '' ? 1 : 0 |
|
|
|
this.modalVisible = true; |
|
|
|
}, |
|
|
|
@ -1184,6 +1187,7 @@ |
|
|
|
}); |
|
|
|
} else if (this.modalType == 1) { |
|
|
|
// 编辑 |
|
|
|
|
|
|
|
this.addGoodsForm.attributeListPrice = JSON.stringify(this.addGoodsForm.attributeListPrice) |
|
|
|
this.addGoodsForm.attributeList = Object.fromEntries(this.addGoodsForm.attributeList1) |
|
|
|
this.addGoodsForm.attributeList = JSON.stringify(this.addGoodsForm.attributeList) |
|
|
|
|