From e8078177f4ecf3e5b777f15201ad9199385ccb4e Mon Sep 17 00:00:00 2001 From: basssy Date: Thu, 16 Jan 2025 17:57:23 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=20objectNo=20,=20?= =?UTF-8?q?=ED=8C=9D=EC=97=85=EC=B0=BD=20=EB=8B=AB=EB=8A=94=20=EC=88=9C?= =?UTF-8?q?=EC=84=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/estimate/Estimate.jsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index 5ef2c9da..d0512fd7 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -99,7 +99,9 @@ export default function Estimate({}) { const initEstimate = (currPid = currentPid) => { console.log('🚀 ~ initEstimate ~ currPid:', currPid) + closeAll() setMenuNumber(5) + setObjectNo(objectRecoil.floorPlanObjectNo) setPlanNo(currPid) @@ -137,7 +139,6 @@ export default function Estimate({}) { }, [selectedPlan]) useEffect(() => { - closeAll() initEstimate() }, []) @@ -619,7 +620,7 @@ export default function Estimate({}) { updates.partAdd = '0' updates.saleTotPrice = (Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].salePrice.replaceAll(',', '')).toLocaleString() updates.showSaleTotPrice = ( - Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].showSalePrice?.replaceAll(',', '') + Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].salePrice?.replaceAll(',', '') ).toLocaleString() updateList = estimateContextState.itemList.map((item) => { @@ -681,7 +682,6 @@ export default function Estimate({}) { let updateList = [] let updates = {} get({ url: apiUrl }).then((res) => { - // console.log('아이템디테일::::::::', res) updates.objectNo = objectNo updates.planNo = planNo updates.itemId = res.itemId @@ -706,7 +706,6 @@ export default function Estimate({}) { updates.openFlg = res.openFlg if (estimateContextState.estimateType === 'YJSS') { - // console.log('YJSS:::,', res.pkgMaterialFlg) if (res.pkgMaterialFlg === '0') { updates.showSalePrice = '0' updates.showSaleTotPrice = '0' @@ -721,7 +720,6 @@ export default function Estimate({}) { //104671 let bomList = res.itemBomList - // console.log('updates::', updates) updateList = estimateContextState.itemList.map((item) => { if (item.dispOrder === dispOrder) { if (item?.addFlg) { @@ -729,6 +727,12 @@ export default function Estimate({}) { } else { if (estimateContextState.estimateType === 'YJSS') { return { ...item, ...updates, salePrice: '', saleTotPrice: '' } + //확인 + // if (updates.pkgMaterialFlg === '1') { + // return { ...item, ...updates, showSalePrice: updates.salePrice } + // } else { + // return { ...item, ...updates, salePrice: '', saleTotPrice: '' } + // } } else { return { ...item, ...updates } } @@ -739,7 +743,6 @@ export default function Estimate({}) { return item } }) - //paDispOrder if (bomList) { bomList.map((bomItem, index) => { @@ -879,7 +882,6 @@ export default function Estimate({}) { } const calculateYJSSTotals = (itemList) => { - // console.log(':::itemList::', itemList) itemList.sort((a, b) => a.dispOrder - b.dispOrder) makeUniqueSpecialNoteCd(itemList) itemList.forEach((item) => { @@ -918,7 +920,6 @@ export default function Estimate({}) { } } }) - // console.log('itemList::', itemList) let pkgAsp = estimateContextState.pkgAsp ? Number(estimateContextState.pkgAsp.replaceAll(',', '')) : 0 totals.pkgTotPrice = pkgAsp * totals.totVolKw * 1000 @@ -1006,7 +1007,7 @@ export default function Estimate({}) {
{getMessage('estimate.detail.objectNo')}
{/* {objectNo} (Plan No: {estimateContextState.planNo}) */} - {objectNo} (Plan No: {planNo}) + {currentObjectNo} (Plan No: {planNo})