diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index dcaef5f5..a52f8423 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -273,12 +273,6 @@ export default function Estimate({ params }) { }) } - //비워주기 - setEstimateContextState({ - pkgAsp: '0', - pkgTotPrice: '0', - }) - //YJOD로 돌아가도 UNIT_PRICE로 프라이싱 실행해서 정가로 셋팅 if (handlePricingFlag) { handlePricing('UNIT_PRICE') @@ -456,6 +450,9 @@ export default function Estimate({ params }) { updates.itemChangeFlg = '1' updates.partAdd = '0' updates.saleTotPrice = (Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].salePrice.replaceAll(',', '')).toLocaleString() + updates.showSaleTotPrice = ( + Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].showSalePrice?.replaceAll(',', '') + ).toLocaleString() updateList = estimateContextState.itemList.map((item) => { if (item.dispOrder === dispOrder) { @@ -487,6 +484,8 @@ export default function Estimate({ params }) { let updates = {} updates.salePrice = salePrice updates.saleTotPrice = (Number(salePrice.replaceAll(',', '')) * estimateContextState.itemList[index].amount.replaceAll(',', '')).toLocaleString() + updates.showSalePrice = updates.salePrice + updates.showSaleTotPrice = updates.saleTotPrice updateList = estimateContextState.itemList.map((item) => { if (item.dispOrder === dispOrder) { @@ -675,34 +674,6 @@ export default function Estimate({ params }) { } } }) - let estimateOption = estimateContextState?.estimateOption?.split('、') - // console.log('오리진::', estimateOption) - let removeEstimateOption = estimateOption.filter((option) => !pushData.includes(option)) - // console.log('남길거?? ', removeEstimateOption) - let removeEstimateOptionString = removeEstimateOption.join('、') - - // console.log('SpecialNoteLis::', specialNoteList) - - // specialNoteList.map((row) => { - // row.check = false - // estimateOption.map((row2) => { - // if (row.pkgYn === '0') { - // if (row2 === row.code) { - // row.check = true - // } - // } else { - // // console.log('지울꺼::', removeEstimateOptionString) - // if (row.code.includes(removeEstimateOptionString)) { - // // console.log('removeEstimateOption::::', removeEstimateOption) - // // row.check = false - // return - // } else { - // // console.log('제품가대세팅::::', row.code) - // // row.check = true - // } - // } - // }) - // }) estimateContextState.itemList.map((item) => { delete item.showSalePrice @@ -1221,7 +1192,7 @@ export default function Estimate({ params }) {