diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx
index d3edfbea..71affac4 100644
--- a/src/components/estimate/Estimate.jsx
+++ b/src/components/estimate/Estimate.jsx
@@ -127,6 +127,48 @@ export default function Estimate({}) {
//견적특이사항 API호출
//여러개 선택하면 구분자로 (、)
//체크용
+ if (estimateContextState.resetFlag === 'Y') {
+ let url = `/api/estimate/special-note-title-list`
+ get({ url: url }).then((res) => {
+ if (isNotEmptyArray(res)) {
+ 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
+ }
+ }
+ })
+ if (row.code === 'ATTR003') {
+ //row.check = true
+ }
+ if (row.code === 'ATTR007') {
+ //row.check = true
+ }
+
+ if (estimateContextState.estimateType === 'YJOD') {
+ if (row.code === 'ATTR002') {
+ row.check = true
+ }
+ }
+ })
+
+ setSpecialNoteList(res)
+
+ setSpecialNoteFirstFlg(true)
+ }
+ }
+ })
+ }
+
if (!specialNoteFirstFlg) {
let url = `/api/estimate/special-note-title-list`
get({ url: url }).then((res) => {
@@ -194,7 +236,6 @@ export default function Estimate({}) {
useEffect(() => {
//선택된 견적특이사항 setEstimateContextState
-
if (isNotEmptyArray(specialNoteList)) {
const liveCheckedData = specialNoteList.filter((row) => row.check === true)
@@ -365,7 +406,6 @@ export default function Estimate({}) {
}
}
})
-
setUniqueData(pushData)
specialNoteList.map((item) => {
if (item.pkgYn === '1') {
@@ -384,6 +424,7 @@ export default function Estimate({}) {
}
}
})
+
setEstimateContextState({
specialNoteList: specialNoteList,
uniqueData: uniqueData,
@@ -761,6 +802,9 @@ export default function Estimate({}) {
}
useEffect(() => {
+ if (estimateContextState.resetFlag === 'Y') {
+ makeUniqueSpecialNoteCd(estimateContextState.itemList)
+ }
if (itemChangeYn) {
let totals = {
totAmount: 0,
@@ -923,7 +967,7 @@ export default function Estimate({}) {
}
useEffect(() => {
- // console.log('리셋여부::', estimateContextState.resetFlag)
+ setSpecialNoteFirstFlg(false)
}, [estimateContextState.resetFlag])
return (
@@ -1006,7 +1050,14 @@ export default function Estimate({}) {
-
+ {/* */}
+
|
@@ -1018,7 +1069,14 @@ export default function Estimate({}) {
-
+ {/* */}
+
|