From 24e32f6a4a76e42b3f8a6139d9bd1a7bc0b8d458 Mon Sep 17 00:00:00 2001 From: basssy Date: Wed, 27 Nov 2024 17:06:35 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/estimate/Estimate.jsx | 43 ++++++++++++---------------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index b3b41626..3b00d2ee 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -660,31 +660,25 @@ export default function Estimate({ params }) { } }) let estimateOption = estimateContextState?.estimateOption?.split('、') - estimateOption = estimateOption.filter((option) => !pushData.includes(option)) - let estimateOptionString = estimateOption.join('、') - console.log('바꾼값:::::::', estimateOptionString) + let removeEstimateOption = estimateOption.filter((option) => pushData.includes(option)) + // let estimateOptionString = estimateOption.join('、') - console.log('SpecialNoteLis::', specialNoteList) + // console.log('SpecialNoteLis::', specialNoteList) - //새로 추가한 아이템 견적 특이사항 체크.. - // specialNoteList.map((row) => { - // let spnAttrCds = res?.spnAttrCds?.split('、') - // let estimateOption = estimateContextState?.estimateOption?.split('、') - // let combineArray = Array.from(new Set([...spnAttrCds, ...estimateOption])).sort() - // row.check = false - // combineArray.map((row2) => { - // if (row.pkgYn === '0') { - // if (row2 === row.code) { - // row.check = true - // } - // } else { - // if (row.code.includes(row2)) { - // row.check = true - // return - // } - // } - // }) - // }) + specialNoteList.map((row) => { + row.check = false + estimateOption.map((row2) => { + if (row.pkgYn === '0') { + if (row2 === row.code) { + row.check = true + } + } else { + console.log('제품가대세팅::::', row.code) + console.log('removeEstimateOption::::', removeEstimateOption) + return + } + }) + }) estimateContextState.itemList.map((item) => { delete item.showSalePrice @@ -707,6 +701,7 @@ export default function Estimate({ params }) { // const price totAmount += amount supplyPrice += price + console.log('공급가액::::::::::::::::::::::', supplyPrice) } }) @@ -771,7 +766,7 @@ export default function Estimate({ params }) { } } }) - supplyPrice = addSupplyPrice + Number(estimateContextState.pkgTotPrice) + supplyPrice = addSupplyPrice + Number(estimateContextState.pkgTotPrice / 1000) vatPrice = supplyPrice * 0.1 totPrice = supplyPrice + vatPrice setEstimateContextState({