'use client' import { useEffect, useState, useContext } from 'react' import { useRecoilValue } from 'recoil' import { floorPlanObjectState } from '@/store/floorPlanObjectAtom' import { useMessage } from '@/hooks/useMessage' import { useCanvasMenu } from '@/hooks/common/useCanvasMenu' import SingleDatePicker from '../common/datepicker/SingleDatePicker' import EstimateFileUploader from './EstimateFileUploader' import { useAxios } from '@/hooks/useAxios' import { globalLocaleStore } from '@/store/localeAtom' import { isNotEmptyArray, isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils' import dayjs from 'dayjs' import { useCommonCode } from '@/hooks/common/useCommonCode' import { useEstimateController } from '@/hooks/floorPlan/estimate/useEstimateController' import { SessionContext } from '@/app/SessionProvider' import Select, { components } from 'react-select' import { convertNumberToPriceDecimal, convertNumberToPriceDecimalToFixed } from '@/util/common-utils' import ProductFeaturesPop from './popup/ProductFeaturesPop' import { v4 as uuidv4 } from 'uuid' export default function Estimate({ params }) { const [handlePricingFlag, setHandlePricingFlag] = useState(false) const [specialNoteFirstFlg, setSpecialNoteFirstFlg] = useState(false) const fixedKey = 'itemKey' const [itemChangeYn, setItemChangeYn] = useState(false) const { session } = useContext(SessionContext) const [objectNo, setObjectNo] = useState('') //물건번호 const [planNo, setPlanNo] = useState('') //플랜번호 const [files, setFiles] = useState([]) // 보내는 첨부파일 const [originFiles, setOriginFiles] = useState([]) //기존 첨부파일 const [showPriceCd, setShowPriceCd] = useState('') const [showContentCode, setShowContentCode] = useState('ATTR001') const [productFeaturesPopupOpen, setProductFeaturesPopupOpen] = useState(false) //견적특이사항 팝업 const [showProductFeatureData, setShowProductFeatureData] = useState([]) //팝업에 보여줄 견적특이사항 데이터 const [selection, setSelection] = useState(new Set()) //견적특이사항 접고 펼치기 const [hidden, setHidden] = useState(false) //아이템 자동완성 리스트 const [displayItemList, setDisplayItemList] = useState([]) //공통코드 const { findCommonCode } = useCommonCode() const [honorificCodeList, setHonorificCodeList] = useState([]) //경칭 공통코드 const [storePriceList, setStorePriceList] = useState([]) //가격표시 option const [startDate, setStartDate] = useState(new Date()) const singleDatePickerProps = { startDate, setStartDate, } const objectRecoil = useRecoilValue(floorPlanObjectState) //견적서 상세데이터 const { estimateContextState, setEstimateContextState, addItem, handleEstimateFileDownload } = useEstimateController(params.pid) //견적특이사항 List const [specialNoteList, setSpecialNoteList] = useState([]) const [popShowSpecialNoteList, setPopShowSpecialNoteList] = useState([]) const globalLocaleState = useRecoilValue(globalLocaleStore) const { get, promisePost } = useAxios(globalLocaleState) const { getMessage } = useMessage() const { setMenuNumber } = useCanvasMenu() //새로 추가한 첨부파일 props const fileUploadProps = { uploadFiles: files, setUploadFiles: setFiles, } useEffect(() => { setMenuNumber(5) setObjectNo(objectRecoil.floorPlanObjectNo) setPlanNo(params.pid) // 공통코드 const code1 = findCommonCode(200800) if (code1 != null) { setHonorificCodeList(code1) } //아이템 자동완성 목록 가져오기 const param = { saleStoreId: session.storeId, } const apiUrl = `/api/display-item/item-list?${queryStringFormatter(param)}` get({ url: apiUrl }).then((res) => { if (res.length > 0) { setDisplayItemList(res) } }) //견적특이사항 API호출 //여러개 선택하면 구분자로 (、) //제품영역 팝업용 let url = '/api/estimate/special-note-list' get({ url: url }).then((res) => { if (isNotEmptyArray(res)) { setPopShowSpecialNoteList(res) } }) }, []) useEffect(() => { //견적특이사항 API호출 //여러개 선택하면 구분자로 (、) //체크용 if (!specialNoteFirstFlg) { let url = `/api/estimate/special-note-title-list` get({ url: url }).then((res) => { if (isNotEmptyArray(res)) { //디테일 ATTR001、ATTR002、ATTR003、ATTR007、ATTR009、ATTR010、ATTR015、ATTR019 if (estimateContextState?.estimateOption) { res.map((row) => { let estimateOption = estimateContextState?.estimateOption?.split('、') row.check = false estimateOption.map((row2) => { if (row.pkgYn === '0') { if (row2 === row.code) { row.check = true } } else { if (row.code.includes(row2)) { row.check = true return } } }) //detail과 상관없이 디폴트 체크목록 //ATTR003,ATTR007 if (row.code === 'ATTR003') { row.check = true } if (row.code === 'ATTR007') { row.check = true } }) setSpecialNoteList(res) setSpecialNoteFirstFlg(true) } } }) } }, [estimateContextState?.estimateOption]) //API데이터로 견적일 셋팅 let begin = 1 useEffect(() => { if (begin === 1) { setStartDate(estimateContextState?.estimateDate) begin++ } }, [estimateContextState?.estimateDate]) //견적일 set useEffect(() => { let estimateDate = dayjs(startDate).format('YYYY-MM-DD') if (begin === 1) { setEstimateContextState({ estimateDate: estimateDate }) } }, [startDate]) useEffect(() => { //선택된 견적특이사항 setEstimateContextState if (isNotEmptyArray(specialNoteList)) { const liveCheckedData = specialNoteList.filter((row) => row.check === true) const data = [] for (let ele of liveCheckedData) { data.push(ele.code) } const newData = data.join('、') setEstimateContextState({ estimateOption: newData }) } }, [specialNoteList]) // 견적특이사항 remark 보여주기 const settingShowContent = (code, event) => { setShowContentCode(code) event.stopPropagation() } // 추가한 첨부파일 estimateContextState에 넣기 useEffect(() => { if (isNotEmptyArray(files)) { files.map((row) => { setEstimateContextState({ fileList: row.data }) }) } else { setEstimateContextState({ fileList: [] }) } }, [files]) //상세에서 내려온 첨부파일 set 만들기 useEffect(() => { if (isNotEmptyArray(estimateContextState.fileList)) { setOriginFiles(estimateContextState.fileList) } }, [estimateContextState?.fileList]) // 기존첨부파일 삭제 const deleteOriginFile = async (objectNo, no) => { const delParams = { userId: session.userId, objectNo: objectNo, no: no, } await promisePost({ url: 'api/file/fileDelete', data: delParams }).then((res) => { if (res.status === 204) { setOriginFiles(originFiles.filter((file) => file.objectNo === objectNo && file.no !== no)) setEstimateContextState({ fileList: originFiles.filter((file) => file.objectNo === objectNo && file.no !== no), }) } }) } //가격표시 option 목록 최초세팅 && 주문분류 변경시 useEffect(() => { if (estimateContextState.estimateType !== '') { const param = { saleStoreId: session.storeId, sapSalesStoreCd: session.custCd, docTpCd: estimateContextState?.estimateType, } const apiUrl = `/api/estimate/price/store-price-list?${queryStringFormatter(param)}` get({ url: apiUrl }).then((res) => { if (isNotEmptyArray(res?.data)) { setStorePriceList(res.data) } }) if (estimateContextState.estimateType === 'YJSS') { if (specialNoteList.length > 0) { specialNoteList.map((item) => { if (item.code === 'ATTR002') { item.check = false } }) } //YJSS UNIT_PIRCE로 프라이싱 실행 if (handlePricingFlag) { handlePricing('UNIT_PRICE') } } else { if (specialNoteList.length > 0) { specialNoteList.map((item) => { if (item.code === 'ATTR002') { item.check = true } }) } //비워주기 setEstimateContextState({ pkgAsp: '0', pkgTotPrice: '0', }) //YJOD로 돌아가도 UNIT_PRICE로 프라이싱 실행해서 정가로 셋팅 if (handlePricingFlag) { handlePricing('UNIT_PRICE') } } setItemChangeYn(true) } }, [estimateContextState?.estimateType]) useEffect(() => { if (estimateContextState?.priceCd) { setShowPriceCd(estimateContextState.priceCd) } }, [estimateContextState?.priceCd]) //가격 표시 option 변경 이벤트 const onChangeStorePriceList = (priceCd) => { const param = { saleStoreId: session.storeId, sapSalesStoreCd: session.custCd, docTpCd: priceCd, } //프라이싱 했을때 priceCd setEstimateContextState //화면에 보여지는 값은 showPriceCd로 관리 setShowPriceCd(priceCd) const apiUrl = `/api/estimate/price/store-price-list?${queryStringFormatter(param)}` get({ url: apiUrl }).then((res) => { if (isNotEmptyArray(res?.data)) { setStorePriceList(res.data) } }) } //Pricing 버튼 const handlePricing = async (showPriceCd) => { const param = { saleStoreId: session.storeId, sapSalesStoreCd: session.custCd, docTpCd: estimateContextState.estimateType, priceCd: showPriceCd, itemIdList: estimateContextState.itemList.filter((item) => item.delFlg === '0' && item.paDispOrder === null), } if (param.itemIdList.length > 0) { let pass = true param.itemIdList.map((item) => { if (item.itemId === '') { pass = false } }) if (!pass) { //Pricing이 누락된 아이템이 있습니다. Pricing을 진행해주세요. return alert(getMessage('estimate.detail.showPrice.pricingBtn.noItemId')) } } await promisePost({ url: '/api/estimate/price/item-price-list', data: param }).then((res) => { let updateList = [] if (res) { if (res.status === 200) { const data = res.data //기존itemList랑 프라이싱결과랑 비교해서 단가만 업뎃 서로 갯수가 안맞을 수 있음 없는 itemId면 unitPrice 0으로 //itemId로 비교해서 salePrice만 업데이트 if (data.result.code === 200) { setEstimateContextState({ pkgAsp: data?.data?.pkgUnitPrice, }) //주택PKG단가 체인지 이벤트 발생시키기 onChangePkgAsp(data.data.pkgUnitPrice) if (isNotEmptyArray(data.data2)) { estimateContextState.itemList.map((item) => { let checkYn = false data.data2.map((item2) => { if (item2) { if (item2.itemId === item.itemId) { updateList.push({ ...item, salePrice: item2.unitPrice === null ? '0' : item2.unitPrice, saleTotPrice: (item.amount * item2.unitPrice).toString(), }) checkYn = true } } }) if (!checkYn) { updateList.push({ ...item, salePrice: '0', saleTotPrice: '0' }) } }) setEstimateContextState({ priceCd: showPriceCd, itemList: updateList, }) setItemChangeYn(true) } } } } }) } const getAbledItems = (items) => { return items.filter((items) => items.paDispOrder === null) } const onChangeSelectAll = (e) => { if (e.target.checked) { const allCheckedSelection = new Set(getAbledItems(estimateContextState.itemList).map((item) => item.dispOrder)) setSelection(allCheckedSelection) } else { setSelection(new Set()) } } const isSelectedAll = () => { return selection.size === getAbledItems(estimateContextState.itemList).length } //row 체크박스 컨트롤 const onChangeSelect = (dispOrder) => { const newSelection = new Set(selection) if (newSelection.has(dispOrder)) { newSelection.delete(dispOrder) } else { newSelection.add(dispOrder) } setSelection(newSelection) } //주택PKG input 변경 const onChangePkgAsp = (value) => { if (estimateContextState.estimateType === 'YJSS') { let pkgAsp = Number(value.replaceAll(',', '')) if (isNaN(pkgAsp)) { pkgAsp = 0 } else { pkgAsp = pkgAsp.toLocaleString() } //현재 PKG용량값 가져오기 let totVolKw = estimateContextState.totVolKw * 1000 let pkgTotPrice = pkgAsp.replaceAll(',', '') * totVolKw * 1000 setEstimateContextState({ pkgAsp: pkgAsp, pkgTotPrice: pkgTotPrice.toFixed(3), }) //아이템들 중 조건에 맞는애들 뽑아서 상단 공급가액 부가세 총액 수정 setItemChangeYn(true) } } // 수량 변경 const onChangeAmount = (value, dispOrder, index) => { //itemChangeFlg = 1, partAdd = 0 셋팅 let amount = Number(value.replace(/[^0-9]/g, '').replaceAll(',', '')) if (isNaN(amount)) { amount = '0' } else { amount = amount.toLocaleString() } let updateList = [] let updates = {} updates.amount = amount updates.itemChangeFlg = '1' updates.partAdd = '0' updates.saleTotPrice = (Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].salePrice.replaceAll(',', '')).toLocaleString() updateList = estimateContextState.itemList.map((item) => { if (item.dispOrder === dispOrder) { return { ...item, ...updates } } else if (item.paDispOrder === dispOrder) { return { ...item, ...updates, amount: (item.bomAmount * amount?.replaceAll(',', '')).toLocaleString(), saleTotPrice: '0' } } else { return item } }) setEstimateContextState({ itemList: updateList, }) setItemChangeYn(true) } // 단가 변경 const onChangeSalePrice = (value, dispOrder, index) => { //itemChangeFlg, partAdd 받아온 그대로 let salePrice = Number(value.replace(/[^0-9]/g, '').replaceAll(',', '')) if (isNaN(salePrice)) { salePrice = 0 } else { salePrice = salePrice.toLocaleString() } let updateList = [] let updates = {} updates.salePrice = salePrice updates.saleTotPrice = (Number(salePrice.replaceAll(',', '')) * estimateContextState.itemList[index].amount.replaceAll(',', '')).toLocaleString() updateList = estimateContextState.itemList.map((item) => { if (item.dispOrder === dispOrder) { return { ...item, ...updates } } else { return item } }) setEstimateContextState({ itemList: updateList, }) setItemChangeYn(true) } // 아이템 자동완성 검색시 아이템 추가/변경시 const onChangeDisplayItem = (itemId, dispOrder, index) => { const param = { itemId: itemId, } const apiUrl = `/api/display-item/item-detail?${queryStringFormatter(param)}` let updateList = [] let updates = {} get({ url: apiUrl }).then((res) => { console.log('아이템디테일::::::::', res) updates.objectNo = objectNo updates.planNo = planNo updates.itemId = res.itemId updates.itemNo = res.itemNo updates.itemName = res.itemName updates.itemChangeFlg = '1' //무조건 1 updates.partAdd = '1' //무조건1 NEW updates.fileUploadFlg = res.fileUploadFlg updates.unit = res.unit updates.unitPrice = res.salePrice //unitPrice도 salePrice로 updates.moduleFlg = res.moduleFlg updates.pkgMaterialFlg = res.pkgMaterialFlg updates.pnowW = res.pnowW updates.salePrice = res.salePrice updates.specification = res.specification updates.unit = res.unit updates.specialNoteCd = res.spnAttrCds updates.itemGroup = res.itemGroup updates.delFlg = '0' // 삭제플래그 0 updates.saleTotPrice = (res.salePrice * estimateContextState.itemList[index].amount).toString() updates.amount = '' if (estimateContextState.estimateType === 'YJSS') { if (res.pkgMaterialFlg === '0') { //updates.showSalePrice = '0' //updates.showSaleTotPrice = '0' } } //104671 let bomList = res.itemBomList updateList = estimateContextState.itemList.map((item) => { if (item.dispOrder === dispOrder) { return { ...item, ...updates } } else if (item.paDispOrder === dispOrder) { //봄제품을 바꿨을떄 return { ...item, delFlg: '1' } } else { return item } }) //paDispOrder if (bomList) { bomList.map((bomItem, index) => { let maxItemDispOrder = Math.max(...estimateContextState.itemList.map((item) => item.dispOrder)) if (maxItemDispOrder == dispOrder) { bomItem.dispOrder = (index + 1 + maxItemDispOrder).toString() bomItem.paDispOrder = dispOrder bomItem.salePrice = '0' bomItem.saleTotPrice = '0' bomItem.unitPrice = '0' // bomItem.amount = null } else { bomItem.dispOrder = (index + 1 + Number(dispOrder)).toString() bomItem.paDispOrder = dispOrder bomItem.salePrice = '0' bomItem.saleTotPrice = '0' bomItem.unitPrice = '0' // bomItem.amount = null } bomItem.delFlg = '0' bomItem.objectNo = objectNo bomItem.planNo = planNo }) setEstimateContextState({ itemList: [...updateList, ...bomList], }) } else { setEstimateContextState({ itemList: updateList, }) } setItemChangeYn(true) }) } //제품 삭제 const removeItem = () => { const array = [...selection] let delList = [] estimateContextState.itemList.filter((row) => { array.map((row2) => { if (row2 === row.dispOrder) { delList.push({ ...row }) } if (row2 === row.paDispOrder) { delList.push({ ...row }) } }) }) const updateList = estimateContextState.itemList.map((item) => { const isDeleted = delList.some((row) => item.delFlg === '1' || item.dispOrder === row.dispOrder) return { ...item, delFlg: isDeleted ? '1' : '0', } }) let delCnt = 0 updateList.map((item) => { if (item.delFlg === '1') { delCnt++ } }) if (delCnt === updateList.length) { return alert(getMessage('estimate.detail.save.requiredItem')) } setEstimateContextState({ itemList: updateList, }) setSelection(new Set()) setItemChangeYn(true) } useEffect(() => { if (itemChangeYn) { let totAmount = 0 let totVolKw = 0 let supplyPrice = 0 let vatPrice = 0 let totPrice = 0 let addSupplyPrice = 0 if (estimateContextState.estimateType === 'YJOD') { estimateContextState.itemList.sort((a, b) => { return a.dispOrder - b.dispOrder }) console.log('YJOD 토탈만들어주기::::::::::', estimateContextState.itemList) estimateContextState.itemList.map((item) => { //delete item.showSalePrice //delete item.showSaleTotPrice if (item.delFlg === '0') { let amount = Number(item?.amount?.replace(/[^0-9]/g, '').replaceAll(',', '')) if (isNaN(amount)) { amount = '0' } let price = Number(item?.saleTotPrice?.replaceAll(',', '')) if (isNaN(price)) { price = 0 } if (item.moduleFlg === '1') { //용량(Kw)은 모듈플래그 1만 합산 const volKw = (item.pnowW * amount) / 1000 // const volKw = item.pnowW * amount totVolKw += volKw } // const price totAmount += amount supplyPrice += price } }) vatPrice = supplyPrice * 0.1 totPrice = supplyPrice + vatPrice setEstimateContextState({ totAmount: totAmount, totVolKw: totVolKw.toFixed(3), supplyPrice: supplyPrice.toFixed(3), vatPrice: vatPrice.toFixed(3), totPrice: totPrice.toFixed(3), }) } else { //YJSS console.log('YJSS 토탈만들어주기::::::::::', estimateContextState.itemList) estimateContextState.itemList.sort((a, b) => { return a.dispOrder - b.dispOrder }) estimateContextState.itemList.map((item) => { if (item.delFlg === '0') { let amount = Number(item.amount?.replace(/[^0-9]/g, '').replaceAll(',', '')) let salePrice = Number(item.salePrice?.replaceAll(',', '')) let saleTotPrice = Number(item.saleTotPrice?.replaceAll(',', '')) if (isNaN(amount)) { amount = '0' } if (isNaN(saleTotPrice)) { saleTotPrice = 0 } if (isNaN(salePrice)) { salePrice = 0 } if (item.moduleFlg === '1') { //용량(Kw)은 모듈플래그 1만 합산 const volKw = (item.pnowW * amount) / 1000 // const volKw = item.pnowW * amount totVolKw += volKw } setEstimateContextState({ pkgTotPrice: estimateContextState.pkgAsp.replaceAll(',', '') * totVolKw * 1000, }) //pkgTotPrice // const saleTotPrice totAmount += amount if (item.pkgMaterialFlg === '1') { const pkgPrice = amount * salePrice //다시계산하기 //YJSS는 PKG제외상품들만(1) 모아서 수량 * 단가를 공급가액(supplyPrice)에 추가로 더해줌 addSupplyPrice += pkgPrice } if (!item.paDispOrder) { //paDispOrder if (item.pkgMaterialFlg === '0') { //item.showSalePrice = '0' //item.showSaleTotPrice = '0' } } } }) supplyPrice = addSupplyPrice + Number(estimateContextState.pkgTotPrice) vatPrice = supplyPrice * 0.1 totPrice = supplyPrice + vatPrice setEstimateContextState({ totAmount: totAmount, totVolKw: totVolKw.toFixed(3), supplyPrice: supplyPrice.toFixed(3), vatPrice: vatPrice.toFixed(3), totPrice: totPrice.toFixed(3), }) } setItemChangeYn(false) } }, [itemChangeYn, estimateContextState.itemList]) //안건명 인풋 변경 const handleBlurObjectName = (e) => { setEstimateContextState({ objectName: e.target.value }) } //담당자 인풋 변경 const handleBlurCharger = (e) => { setEstimateContextState({ charger: e.target.value }) } //비고 인풋 변경 const handleBlurRemarks = (e) => { setEstimateContextState({ remarks: e.target.value }) } return (
{/* 물건번호, 견적서번호, 등록일, 변경일시 시작 */}
{getMessage('estimate.detail.objectNo')}
{objectNo} (Plan No: {planNo})
{getMessage('estimate.detail.docNo')}
{estimateContextState.docNo}
{getMessage('estimate.detail.drawingEstimateCreateDate')}
{estimateContextState?.drawingEstimateCreateDate ? `${dayjs(estimateContextState.drawingEstimateCreateDate).format('YYYY.MM.DD')}` : ''}
{getMessage('estimate.detail.lastEditDatetime')}
{estimateContextState?.lastEditDatetime ? `${dayjs(estimateContextState.lastEditDatetime).format('YYYY.MM.DD HH:mm')}` : ''}
{/* 물건번호, 견적서번호, 등록일, 변경일시 끝 */} {/* 기본정보 시작 */}

{getMessage('estimate.detail.header.title')}

{/* 1차 판매점명 */} {/* 견적일 */} {/* 2차 판매점명 */} {/* 담당자 */} {/* 안건명 */} {/* 물건정보에서 입력한 메모 */} {/* 주문분류 */} {/* 지붕재・사양시공 최대4개*/} {/* 비고 */}
{getMessage('estimate.detail.saleStoreId')} {estimateContextState?.firstSaleStoreName} {getMessage('estimate.detail.estimateDate')} *
{getMessage('estimate.detail.otherSaleStoreId')} {estimateContextState?.agencySaleStoreName} {getMessage('estimate.detail.receiveUser')} *
{getMessage('estimate.detail.objectName')} *
{getMessage('estimate.detail.objectRemarks')} {estimateContextState?.objectRemarks}
{getMessage('estimate.detail.estimateType')} *
{ //주문분류 setHandlePricingFlag(true) setEstimateContextState({ estimateType: e.target.value }) }} />
{ setHandlePricingFlag(true) setEstimateContextState({ estimateType: e.target.value }) }} />
{getMessage('estimate.detail.roofCns')} {estimateContextState?.roofMaterialIdMulti?.split('、').map((row, index) => { //지붕재 let roofList = row let roofListLength = estimateContextState?.roofMaterialIdMulti?.split('、').length let style = 'mb5' if (roofListLength == index + 1) { style = '' } //사양시공 let constructSpecificationMulti = estimateContextState?.constructSpecificationMulti?.split('、') return ( <>
) })}
{getMessage('estimate.detail.remarks')}
{/* 파일첨부 시작 */}

{getMessage('estimate.detail.header.fileList1')}

{ setEstimateContextState({ fileFlg: e.target.checked ? '1' : '0', }) if (e.target.checked) { if (specialNoteList.length > 0) { specialNoteList.map((item) => { if (item.code === 'ATTR019') { item.check = true } }) } } else { if (specialNoteList.length > 0) { specialNoteList.map((item) => { if (item.code === 'ATTR019') { item.check = false } }) } } }} />
{getMessage('estimate.detail.header.fileList1')}
{/* 첨부파일 목록 시작 */}
{getMessage('estimate.detail.header.fileList2')}
    {originFiles.length > 0 && originFiles.map((originFile) => { return (
  • handleEstimateFileDownload(originFile)}> {originFile.faileName}
  • ) })}
{/* 첨부파일 목록 끝 */} {/* 파일첨부 끝 */} {/* 견적특이사항 시작 */}

{getMessage('estimate.detail.header.specialEstimate')}

{getMessage('estimate.detail.header.specialEstimateProductInfo')}
{/* 견적 특이사항 코드영역시작 */}
{/* SpecialNoteList반복문 */} {specialNoteList.length > 0 && specialNoteList.map((row) => { return (
{ settingShowContent(row.code, event) }} >
{ setSpecialNoteList((specialNote) => specialNote.map((temp) => (temp.code === row.code ? { ...temp, check: !temp.check } : temp)), ) settingShowContent(row.code, event) }} />
) })}
{/* 견적특이사항 선택한 내용 영역시작 */}
{specialNoteList.map((row) => { if (row.code === showContentCode) { return (
{row.codeNm}
{/*
*/}
) } })}
{/* 견적특이사항 선택한 내용 영역끝 */}
{/* 견적 특이사항 코드영역 끝 */} {/* 견적특이사항 영역끝 */} {/* 제품정보 시작 */}

{getMessage('estimate.detail.header.specialEstimateProductInfo')}

{getMessage('estimate.detail.sepcialEstimateProductInfo.totAmount')}
{convertNumberToPriceDecimal(estimateContextState?.totAmount)}
{getMessage('estimate.detail.sepcialEstimateProductInfo.totVolKw')}
{convertNumberToPriceDecimalToFixed(estimateContextState?.totVolKw, 2)}
{getMessage('estimate.detail.sepcialEstimateProductInfo.supplyPrice')}
{convertNumberToPriceDecimal(estimateContextState?.supplyPrice)}
{getMessage('estimate.detail.sepcialEstimateProductInfo.vatPrice')}
{convertNumberToPriceDecimal(estimateContextState?.vatPrice)}
{getMessage('estimate.detail.sepcialEstimateProductInfo.totPrice')}
{convertNumberToPriceDecimal(estimateContextState?.totPrice)}
{/* YJOD면 아래영역 숨김 */}
{getMessage('estimate.detail.sepcialEstimateProductInfo.pkgUnitPrice')} *
{ onChangePkgAsp(e.target.value) }} />
{getMessage('estimate.detail.sepcialEstimateProductInfo.pkgWeight')} {convertNumberToPriceDecimalToFixed(estimateContextState?.totVolKw, 3)} {getMessage('estimate.detail.sepcialEstimateProductInfo.pkgPrice')} {convertNumberToPriceDecimal(estimateContextState?.pkgTotPrice)}
{/* 제품정보 끝 */} {/* 가격표시영역시작 */}
{getMessage('estimate.detail.header.showPrice')}
{session?.storeLvl === '1' ? ( ) : ( )}
  • {getMessage('estimate.detail.showPrice.description1')}
  • {getMessage('estimate.detail.showPrice.description2')}
  • {getMessage('estimate.detail.showPrice.description3')}
  • {getMessage('estimate.detail.showPrice.description4')}
{/* 가격표시영역끝 */} {/* html테이블시작 */}
{estimateContextState?.itemList.length > 0 && estimateContextState.itemList.map((item, index) => { if (item.delFlg === '0') { return ( {/* {item?.showSaleTotPrice === '0' ? ( ) : ( )} */} ) } else { return null } })}
{/*
*/}
{getMessage('estimate.detail.itemTableHeader.dispOrder')} {getMessage('estimate.detail.itemTableHeader.itemId')} {getMessage('estimate.detail.itemTableHeader.itemNo')} {getMessage('estimate.detail.itemTableHeader.amount')} {getMessage('estimate.detail.itemTableHeader.unit')} {getMessage('estimate.detail.itemTableHeader.salePrice')} {getMessage('estimate.detail.itemTableHeader.saleTotPrice')}
onChangeSelect(item.dispOrder)} checked={!!selection.has(item.dispOrder)} />
{item?.dispOrder}
{item?.itemNo}
{item?.fileUploadFlg === '1' && } {item?.specialNoteCd && ( )}
{ onChangeAmount(e.target.value, item.dispOrder, index) }} maxLength={6} />
{item.unit}
{ onChangeSalePrice(e.target.value, item.dispOrder, index) }} maxLength={12} />
{/*
OPEN아이콘 처리
*/}
{convertNumberToPriceDecimal(item?.saleTotPrice?.replaceAll(',', ''))}{convertNumberToPriceDecimalToFixed(item?.saleTotPrice?.replaceAll(',', ''), 2)}
{/* html테이블끝 */}
{/* 기본정보끝 */}
{productFeaturesPopupOpen && ( )}
) }