From 38a04d24b42362015b32af5d467f32e15fcd63fe Mon Sep 17 00:00:00 2001 From: dt_2916866708 <> Date: Fri, 19 Jan 2024 14:46:03 +0800 Subject: [PATCH] 12 --- src/views/product/productAdd/newIndex.vue | 21 +++-- src/views/statistics/searchStatisticsList.vue | 93 ++++++++++++++----- vue.config.js | 2 +- 3 files changed, 83 insertions(+), 33 deletions(-) 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 @@