diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx
index 38ff2289..a44af878 100644
--- a/src/components/estimate/Estimate.jsx
+++ b/src/components/estimate/Estimate.jsx
@@ -480,10 +480,6 @@ export default function Estimate({}) {
//Pricing 버튼
const handlePricing = async (showPriceCd) => {
- //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요
- if (estimateContextState.estimateType === 'YJSS') {
- return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
- }
const param = {
saleStoreId: session.storeId,
sapSalesStoreCd: session.custCd,
@@ -699,14 +695,10 @@ export default function Estimate({}) {
/* 케이블 select 변경시 */
const onChangeDisplayCableItem = (value, itemList) => {
- //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요
- if (estimateContextState.estimateType === 'YJSS') {
- return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
- }
itemList.map((item, index) => {
if (item.dispCableFlg === '1') {
if (value !== '') {
- onChangeDisplayItem(value, item.dispOrder, index)
+ onChangeDisplayItem(value, item.dispOrder, index, true)
}
}
})
@@ -714,11 +706,7 @@ export default function Estimate({}) {
}
// 아이템 자동완성 검색시 아이템 추가/변경시
- const onChangeDisplayItem = (itemId, dispOrder, index) => {
- //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요
- if (estimateContextState.estimateType === 'YJSS') {
- return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
- }
+ const onChangeDisplayItem = (itemId, dispOrder, index, flag) => {
const param = {
itemId: itemId,
coldZoneFlg: estimateContextState?.coldRegionFlg,
@@ -748,7 +736,7 @@ export default function Estimate({}) {
updates.itemGroup = res.itemGroup
updates.delFlg = '0' // 삭제플래그 0
updates.saleTotPrice = (res.salePrice * estimateContextState.itemList[index].amount).toString()
- updates.amount = ''
+ updates.amount = flag ? estimateContextState.itemList[index].amount : ''
updates.openFlg = res.openFlg
if (estimateContextState.estimateType === 'YJSS') {
@@ -1032,7 +1020,6 @@ export default function Estimate({}) {
})
let dispCableFlgCnt = 0
estimateContextState.itemList.forEach((item) => {
- // console.log('YJSS::::::::', item)
if (item.delFlg === '0') {
let amount = Number(item.amount?.replace(/[^0-9]/g, '').replaceAll(',', '')) || 0
let salePrice
@@ -1068,7 +1055,6 @@ export default function Estimate({}) {
}
if (item.dispCableFlg === '1') {
- // console.log('YJSS22222::::::::', item)
dispCableFlgCnt++
setCableItem(item.itemId)
}
@@ -1356,7 +1342,7 @@ export default function Estimate({}) {
- {/* //todo: 추후 YJSS가 다시 나타날 경우 주석 풀기 */}
{/* YJOD면 아래영역 숨김 */}
- {/*
+
@@ -1714,7 +1698,7 @@ export default function Estimate({}) {
- */}
+
{/* 제품정보 끝 */}
{/* 가격표시영역시작 */}
@@ -1871,7 +1855,7 @@ export default function Estimate({}) {
options={originDisplayItemList}
onChange={(e) => {
if (isObjectNotEmpty(e)) {
- onChangeDisplayItem(e.itemId, item.dispOrder, index)
+ onChangeDisplayItem(e.itemId, item.dispOrder, index, false)
}
}}
menuPlacement={'auto'}
@@ -1895,11 +1879,6 @@ export default function Estimate({}) {
classNamePrefix="custom"
placeholder="Select"
options={cableItemList}
- onChange={(e) => {
- if (isObjectNotEmpty(e)) {
- onChangeDisplayItem(e.clRefChr1, item.dispOrder, index)
- }
- }}
menuPlacement={'auto'}
getOptionLabel={(x) => x.clRefChr3}
getOptionValue={(x) => x.clRefChr1}
diff --git a/src/components/floor-plan/CanvasMenu.jsx b/src/components/floor-plan/CanvasMenu.jsx
index 66dbf43a..e10d9ebc 100644
--- a/src/components/floor-plan/CanvasMenu.jsx
+++ b/src/components/floor-plan/CanvasMenu.jsx
@@ -365,11 +365,6 @@ export default function CanvasMenu(props) {
// 견적서 초기화 버튼
const handleEstimateReset = () => {
- //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요
- if (estimateRecoilState.estimateType === 'YJSS') {
- return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
- }
-
swalFire({
text: getMessage('estimate.detail.reset.confirmMsg'),
type: 'confirm',
diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx
index b3e73597..b5020d5b 100644
--- a/src/components/management/StuffDetail.jsx
+++ b/src/components/management/StuffDetail.jsx
@@ -371,6 +371,7 @@ export default function StuffDetail() {
swalFire({
text: getMessage('stuff.detail.header.notExistObjectNo'),
type: 'alert',
+ icon: 'error',
confirmFn: () => {
router.push('/management/stuff', { scroll: false })
},
@@ -388,6 +389,7 @@ export default function StuffDetail() {
swalFire({
text: getMessage('stuff.detail.header.notExistObjectNo'),
type: 'alert',
+ icon: 'error',
confirmFn: () => {
router.push('/management/stuff', { scroll: false })
},
diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js
index 1b957e0a..c326a964 100644
--- a/src/hooks/floorPlan/estimate/useEstimateController.js
+++ b/src/hooks/floorPlan/estimate/useEstimateController.js
@@ -166,11 +166,6 @@ export const useEstimateController = (planNo, flag) => {
//견적서 저장
const handleEstimateSubmit = async () => {
- //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요
- if (estimateData.estimateType === 'YJSS') {
- return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
- }
-
//0. 필수체크
let flag = true
let originFileFlg = false
@@ -300,6 +295,19 @@ export const useEstimateController = (planNo, flag) => {
}
}
} else {
+ //견적서를 복사하면 API에서 봄컴포넌트는 salePrice, unitPrice를 0으로 내려옴..front에서 처리
+ if (item.salePrice === null) {
+ item.salePrice = '0'
+ } else if (isNaN(item.salePrice)) {
+ item.salePrice = '0'
+ }
+
+ if (item.unitPrice === null) {
+ item.unitPrice = '0'
+ } else if (isNaN(item.unitPrice)) {
+ item.unitPrice = '0'
+ }
+
//봄 컴포넌트 제품은 0으로
item.openFlg = '0'
}
@@ -386,6 +394,7 @@ export const useEstimateController = (planNo, flag) => {
estimateData.estimateOption = estimateOptions
// console.log('최종아이템:::', estimateData.itemList)
+
if (fileList?.length > 0) {
estimateData.fileList = fileList
} else {
@@ -413,7 +422,7 @@ export const useEstimateController = (planNo, flag) => {
})
} catch (e) {
setIsGlobalLoading(false)
- console.log('error::::::::::::', e.response.data.message)
+ console.error('error::::::::::::', e.response.data.message)
}
}
@@ -423,10 +432,6 @@ export const useEstimateController = (planNo, flag) => {
* T01관리자 계정 및 1차판매점에게만 제공
*/
const handleEstimateCopy = async (sendPlanNo, copyReceiveUser, saleStoreId, otherSaleStoreId, setEstimateCopyPopupOpen) => {
- //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요
- if (estimateData.estimateType === 'YJSS') {
- return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
- }
if (saleStoreId === '') {
return swalFire({
text: getMessage('estimate.detail.productFeaturesPopup.requiredStoreId'),
|