diff --git a/src/views/product/productAdd/newIndex.vue b/src/views/product/productAdd/newIndex.vue index 1b48c6a..ad1b86b 100644 --- a/src/views/product/productAdd/newIndex.vue +++ b/src/views/product/productAdd/newIndex.vue @@ -556,11 +556,17 @@ export default { }else{ return null } - // return Boolean(this.formValidate.checkedList.filter(i=>item.id==i.attributeId).length) - }).filter(item=>item) - this.ManyAttrValue = this.ManyAttrValue.map(item=>{ - - }) + }).filter(item=>item); + setTimeout(() => { + this.ManyAttrValue.forEach((item,index)=>{ + let data = this.formValidate.stockList.find(i=>i.attributeJson==JSON.stringify(item.data)) + if(data){ + Object.assign(item,data); + console.log(data,item,"datadatadatadata") + } + }) + }, 1000); + }) }, @@ -1127,14 +1133,15 @@ export default { } }); let stockList = this.ManyAttrValue.map(item => { - let { marketPrice = "", sellPrice = "", stock = "", integral = "", skuNum = "" } = item; + let { marketPrice = "", sellPrice = "", stock = "", integral = "", skuNum = "",id=""} = item; return { attributeJson: JSON.stringify(item.data), marketPrice, sellPrice, stock, integral, - skuNum + skuNum, + id } }) console.log(this.formValidate, "formValidate"); diff --git a/src/views/statistics/searchStatisticsList.vue b/src/views/statistics/searchStatisticsList.vue index b2f4ab7..a909dc8 100644 --- a/src/views/statistics/searchStatisticsList.vue +++ b/src/views/statistics/searchStatisticsList.vue @@ -1,5 +1,6 @@