diff --git a/src/hooks/useProductsQuotationFormat.js b/src/hooks/useProductsQuotationFormat.js index a61a249..daa47a4 100644 --- a/src/hooks/useProductsQuotationFormat.js +++ b/src/hooks/useProductsQuotationFormat.js @@ -80,13 +80,15 @@ export const chunkBy = (use_year, dataList = [], by = []) => { }, {}); // 补全产品旺季的人等分组 (当旺季和平季的人等不完全一致时) - for (const WPI in PGroupSizeSS) { - if (Object.prototype.hasOwnProperty.call(PGroupSizeSS, WPI)) { + const allWPI = unique(allQuotesSSS2.map((ele) => ele.WPI_SN)); + for (const WPI of allWPI) { + // for (const WPI in PGroupSizeSS) { + // if (Object.prototype.hasOwnProperty.call(PGroupSizeSS, WPI)) { const element = PGroupSizeSS[WPI] || []; const elementP = PGroupSizePS[WPI] || []; const diff = (elementP || []).filter((ele, index) => !element.includes(ele)); PGroupSizeSS[WPI] = element.concat(diff); - } + // } } // console.log('PGroupSizeSS', PGroupSizeSS, '\nPGroupSizePS', PGroupSizePS, '\nallQuotesSSS', allQuotesSSS2)