From 214bd9db4da008b9a6fd79d828dcc4713b898961 Mon Sep 17 00:00:00 2001 From: ljpark Date: Fri, 27 Mar 2026 14:31:40 +0900 Subject: [PATCH] =?UTF-8?q?wr:=20=ED=9B=84=EB=B3=B4=EC=A7=80=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=EC=A7=80=EB=8F=84=20=EC=84=A0=ED=83=9D=EB=90=9C=20?= =?UTF-8?q?=EC=8B=9C=EC=84=A4=EB=AA=A9=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../splyPopup/selectedFcltList.tsx | 97 ++++++++++--------- apps/wr/app/store/common/searchCode/index.ts | 3 +- .../ui/form/coMat/conCostForm/conCostForm.tsx | 38 +++++++- .../src/ui/map/lib/gis.style.js | 2 +- 4 files changed, 87 insertions(+), 53 deletions(-) diff --git a/apps/wr/app/(popUp-layout)/splyPopup/selectedFcltList.tsx b/apps/wr/app/(popUp-layout)/splyPopup/selectedFcltList.tsx index bdf4d7e2c..deb58b906 100644 --- a/apps/wr/app/(popUp-layout)/splyPopup/selectedFcltList.tsx +++ b/apps/wr/app/(popUp-layout)/splyPopup/selectedFcltList.tsx @@ -1,3 +1,6 @@ +/** + * 선택된 시설 + */ import React from "react"; type FcltItem = { @@ -20,52 +23,6 @@ export default function SelectedFcltList({ onRemove(updatedList); }; - const TableContent = ( - <> - - - 시설명 - - 하수처리량 -
- (㎥/일) - - - 재이용량 -
- (㎥/일) - - 삭제 - - - - {data.map((item) => ( - - {item.ruseUtztnFcltNm} - - {Number(item.splyExtraCpct || 0).toLocaleString()} - - - {Number(item.ruseCpct || 0).toLocaleString()} - - - - - - ))} - - - ); - - if (data.length === 0) return null; - return (

@@ -73,7 +30,53 @@ export default function SelectedFcltList({

- {TableContent} + + + + + + + + + + {data.length > 0 ? ( + data.map((item) => ( + + + + + + + )) + ) : ( + + + + )} +
시설명 + 하수처리량 +
+ (㎥/일) +
+ 재이용량 +
+ (㎥/일) +
삭제
{item.ruseUtztnFcltNm} + {Number(item.splyExtraCpct || 0).toLocaleString()} + + {Number(item.ruseCpct || 0).toLocaleString()} + + +
+ 선택된 시설이 없습니다. +
diff --git a/apps/wr/app/store/common/searchCode/index.ts b/apps/wr/app/store/common/searchCode/index.ts index a48225e12..276271d60 100644 --- a/apps/wr/app/store/common/searchCode/index.ts +++ b/apps/wr/app/store/common/searchCode/index.ts @@ -150,6 +150,7 @@ export const comFcltSearchAction: (set: any) => comFcltActions = (set: any) => { return "수요처 정보 변경 중 오류가 발생했습니다."; } }, + // 요율정보 조회 : ONSEMIRO_NEW.EM_STD_COST_INC_EXP_RT 설치관리표준사업비 부대경비요율 getRateFee: async (year: string) => { try { const url = `/prcsFclt/CstRt/${year}`; @@ -179,7 +180,7 @@ export const comFcltSearchAction: (set: any) => comFcltActions = (set: any) => { } }); - }catch (e) { + } catch (e) { console.log('getConstCostFee ', e) } diff --git a/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx index dc1799e30..ca75016cf 100644 --- a/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx +++ b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx @@ -49,7 +49,7 @@ export default function ConCostForm({ }) { const { constCostRes, // 표준사업비 - rateFeeRes, + rateFeeRes, // 부대경비요율 coMatRvwUpdate, ruseRvwCalUpdate, getRateFee, @@ -109,8 +109,16 @@ export default function ConCostForm({ const totalConstCost = form.watch("totalConstCost"); const cstrnCst = form.watch("demandCst.cstrnCst"); const splyList = form.watch("splyCndtList"); + + /** + * 표준공산비 산정 : "계산"버튼 click시 + */ const calculateConstCost = useCallback(() => { const usgPrcsProcs = usgPrcsProcsWatch; + if (selectionVersion == 0) { + alert("먼저 목록에서 수요신청 건을 선택하세요."); + return; + } if (!dmndQtyWatch) { alert("요구수량(m³/일)을 확인해주세요 계산할수 없습니다. "); return; @@ -121,6 +129,14 @@ export default function ConCostForm({ ); return; } + if (constCostRes?.length === 0) { + alert("표준공사비 데이터가 없습니다."); + return; + } + if (rateFeeRes?.length === 0) { + alert("표준공사비 데이터가 없습니다."); + return; + } const dmndQtyYear = dmndQtyWatch; if (usgPrcsProcs && usgPrcsProcs?.length > 0) { @@ -159,7 +175,7 @@ export default function ConCostForm({ const groupedBounds: { [key: string]: { lower?: any; upper?: any } } = {}; for (const code of groupCodes) { groupedBounds[code] = findBounds( - rateFeeRes, + rateFeeRes, // 부대경비요율 code, "incExpCd", "stdCost", @@ -176,8 +192,15 @@ export default function ConCostForm({ form.setValue("demandCst.prcsFcltCpctCstrnCst", Math.round(result)); form.setValue("demandCst.fcltSbsdCstrnCst", Math.round(fcltSbsdCstrnCst)); form.setValue("totalConstCost", Math.round(realResult)); + alert("표준공산비 산정이 완료되었습니다."); } }, [constCostRes, rateFeeRes, usgPrcsProcsWatch, dmndQtyWatch]); + + /** + * 저장 버튼 click 시 실행 + * @param value + * @returns + */ const onSubmit = async (value: DmdCoReqType) => { if (value.demandCst && !value.demandCst.prcsFcltCpctCstrnCst) { alert("공사비 계산 진행 후 저장을 눌러주새요"); @@ -189,7 +212,7 @@ export default function ConCostForm({ // ? splycd[0]?.ruseUtztnFcltCd // : "11000SW001R1"; - const pk =lastSub?.ruseUtztnFcltCd??null + const pk =lastSub?.ruseUtztnFcltCd??null; // 후보지 if (type === "mat") { if (value.demandCst) { @@ -296,10 +319,17 @@ export default function ConCostForm({ }, []); + /** + * 후보지 조회 + * @param e + */ const searchCandidate = (e: React.MouseEvent) => { e.preventDefault(); e.stopPropagation(); - + if (selectionVersion == 0) { + alert("먼저 목록에서 수요신청 건을 선택하세요."); + return; + } const dmdInfoId = form.getValues("dmdInfoId"); console.log(dmdInfoId) diff --git a/packages/common/business_components/src/ui/map/lib/gis.style.js b/packages/common/business_components/src/ui/map/lib/gis.style.js index f38853962..4ad75c386 100644 --- a/packages/common/business_components/src/ui/map/lib/gis.style.js +++ b/packages/common/business_components/src/ui/map/lib/gis.style.js @@ -206,7 +206,7 @@ GisOlStyle.prototype = { element: overlayContainer, positioning: 'bottom-center', stopEvent: false, - offset: overLayOffset ? overLayOffset : [80, 0], // 오프셋 설정 (위치 조정) + offset: overLayOffset ? overLayOffset : [65, 0], // 오프셋 설정 (위치 조정) }); this.overlays[overLayId] = overlay;