견적서
This commit is contained in:
parent
a9fc8b0f30
commit
74f64cce56
@ -146,7 +146,6 @@ export default function Estimate({ params }) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('최초::::::::', res)
|
|
||||||
setSpecialNoteList(res)
|
setSpecialNoteList(res)
|
||||||
|
|
||||||
setSpecialNoteFirstFlg(true)
|
setSpecialNoteFirstFlg(true)
|
||||||
@ -176,7 +175,6 @@ export default function Estimate({ params }) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//선택된 견적특이사항 setEstimateContextState
|
//선택된 견적특이사항 setEstimateContextState
|
||||||
if (isNotEmptyArray(specialNoteList)) {
|
if (isNotEmptyArray(specialNoteList)) {
|
||||||
console.log('specialNoteList::', specialNoteList)
|
|
||||||
const liveCheckedData = specialNoteList.filter((row) => row.check === true)
|
const liveCheckedData = specialNoteList.filter((row) => row.check === true)
|
||||||
|
|
||||||
const data = []
|
const data = []
|
||||||
@ -643,6 +641,51 @@ export default function Estimate({ params }) {
|
|||||||
})
|
})
|
||||||
console.log('YJOD 토탈만들어주기::::::::::', estimateContextState.itemList)
|
console.log('YJOD 토탈만들어주기::::::::::', estimateContextState.itemList)
|
||||||
|
|
||||||
|
let pushData = []
|
||||||
|
let uniquSet = new Set()
|
||||||
|
|
||||||
|
estimateContextState.itemList.forEach((item) => {
|
||||||
|
if (item.delFlg === '1') {
|
||||||
|
if (item.specialNoteCd) {
|
||||||
|
let splitData = item.specialNoteCd.split('、')
|
||||||
|
splitData.forEach((note) => {
|
||||||
|
if (!uniquSet.has(note)) {
|
||||||
|
uniquSet.add(note)
|
||||||
|
pushData.push(note)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
setSpecialNoteFirstFlg(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let estimateOption = estimateContextState?.estimateOption?.split('、')
|
||||||
|
estimateOption = estimateOption.filter((option) => !pushData.includes(option))
|
||||||
|
let estimateOptionString = estimateOption.join('、')
|
||||||
|
console.log('바꾼값:::::::', estimateOptionString)
|
||||||
|
|
||||||
|
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
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
|
||||||
estimateContextState.itemList.map((item) => {
|
estimateContextState.itemList.map((item) => {
|
||||||
delete item.showSalePrice
|
delete item.showSalePrice
|
||||||
delete item.showSaleTotPrice
|
delete item.showSaleTotPrice
|
||||||
@ -740,27 +783,6 @@ export default function Estimate({ params }) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//새로 추가한 아이템 견적 특이사항 체크..
|
|
||||||
console.log('specialNoteList::', 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
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
|
|
||||||
setItemChangeYn(false)
|
setItemChangeYn(false)
|
||||||
}
|
}
|
||||||
}, [itemChangeYn, estimateContextState.itemList])
|
}, [itemChangeYn, estimateContextState.itemList])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user