견적서 objectNo , 팝업창 닫는 순서
This commit is contained in:
parent
7c355d6cc4
commit
e8078177f4
@ -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({}) {
|
||||
<div className="estimate-tit">{getMessage('estimate.detail.objectNo')}</div>
|
||||
<div className="estimate-name">
|
||||
{/* {objectNo} (Plan No: {estimateContextState.planNo}) */}
|
||||
{objectNo} (Plan No: {planNo})
|
||||
{currentObjectNo} (Plan No: {planNo})
|
||||
</div>
|
||||
</div>
|
||||
<div className="estimate-box">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user