From cceb84aa995d16d5a364aff4e932707956e453a4 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Sun, 10 Aug 2025 20:07:51 +0900 Subject: [PATCH] =?UTF-8?q?=ED=9B=84=EB=B3=B4=EC=A7=80=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EB=B6=80=EB=B6=84=20=EA=B8=B0=EB=8A=A5=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/(map-layout)/map/mainMap/page.tsx | 1 - .../(popUp-layout)/mapFeaturePopup/page.tsx | 93 ++++++++++++++++++- .../matMng/coMat/coMatRvw/page.tsx | 4 +- apps/wr/app/store/matDmd/coMatRvw/type.tsx | 4 +- .../ui/form/coMat/conCostForm/conCostForm.tsx | 66 +++++++------ 5 files changed, 133 insertions(+), 35 deletions(-) diff --git a/apps/wr/app/(map-layout)/map/mainMap/page.tsx b/apps/wr/app/(map-layout)/map/mainMap/page.tsx index 7451ae4b5..5722340e5 100644 --- a/apps/wr/app/(map-layout)/map/mainMap/page.tsx +++ b/apps/wr/app/(map-layout)/map/mainMap/page.tsx @@ -214,7 +214,6 @@ const Map = () => { const isFeature = props?.featureData; - console.log('isFeature 1', isFeature) if( typeof isFeature.getProperties === "function" ){ if ( diff --git a/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx b/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx index debea36c9..94c1411f3 100644 --- a/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx +++ b/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx @@ -7,6 +7,95 @@ import { Title, UiTable } from "@common/business_components/ui"; import { useSearchParams } from "next/navigation"; import { useEffect, useState } from "react"; + +export const htdflData ={ + "bdstInfoSn": 54, + "ctpvCd": 11, + "sggCd": 11110, + "daddr": "청라동 100-80", + "bdstNm": "한국중부발전(주)", + "frstArchPrmsnDt": "2013-01-01", + "archArea": "-1.000000000", + "ctpvNm": null, + "sggNm": null, + "lat": 37.57096, + "lot": 126.98143, + "regDt": "2025-04-16", + "rgtr": null, + "mdfcnDt": "2025-04-16", + "mdfr": null, + "reuseBuilding": [ + { + "bdstRuseFcltSn": 4881, + "bdstInfoSn": 54, + "instlCmptnDt": "2025-06-20", + "instlCst": 300, + "operMngCd": null, + "anlOperCst": 400, + "instlCstSprtYn": null, + "instlCstSprtAmt": 0, + "grntchBdstCertYn": null, + "grntchBdstCertYr": null, + "grntchBdstCertNo": "", + "grntchBdstCertGrd": "", + "crgRdctYn": null, + "crgRdctBss": null, + "crgRdctAmt": 0, + "ruseFcltFlg": "HTB", + "bdstUsgCd": 2, + "lawTrgtYn": "N", + "regDt": "2025-04-16", + "rgtr": null, + "mdfcnDt": "2025-04-16", + "mdfr": null, + "htdflObj": { + "bdstRuseFcltSn": 4881, + "etgtType": "", + "fclCpct": 400, + "plwtYn": "Y", + "orgwtWtritSpt": "공장내", + "orgwtOcrnProcs": "1", + "wtritEntrcTp": 3, + "amtgnr": 1, + "prcsProcsYn": "Y", + "prcsFcltCpct": 14, + "regDt": "2025-04-16", + "rgtr": null, + "mdfcnDt": "2025-04-16", + "mdfr": null, + "fmYn": "Y", + "utztnCpct": 1, + "utztnUsg": "1", + "grssClfg": 0, + "combResdch": 0, + "trbt": 4, + "bod": 4, + "smll": "불쾌하지않을것", + "crmty": 4, + "tn": 10, + "tph": 10, + "ph": '1~3', + "clIonQnt": 1, + "cdtnv": 0, + "emsnExitTp": 5 + } + } + ], + "chgBuilding": [ + { + "bdstInfoSn": 54, + "archChgPrmsnDt": null, + "archChgArea": null, + "bdstChgNm": null, + "regDt": "2025-04-16", + "rgtr": null, + "mdfcnDt": "2025-04-16", + "mdfr": null + } + ] +} + + export default function MapFeaturePopup() { const [isFeatureCd, setIsFeatureCd] = useState(null); const { @@ -61,7 +150,9 @@ export default function MapFeaturePopup() { }); } else if (layerNm === "온배수시설") { htdfMapDetile(isFeatureCd).then((res) => { - setIsDetail(res); +//가짜데이터로 하였음!!!!!!!!! 기능 수정시 res를 넣어야함 + console.log(res) + setIsDetail(htdflData); }); } else if (layerNm === "잠재수요처") { ldrmntMapDetile(isFeatureCd).then((res) => { diff --git a/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx b/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx index 996b624d8..b85a04d82 100644 --- a/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx +++ b/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx @@ -389,9 +389,9 @@ export default function CoMatRvw() { className="w-full pr-16 border py-2 text-right rounded-md" placeholder="" value={ - field.value != -1 + field.value != -1 ||field.value != undefined ? `${field.value}` - : "불검출" + : "불검출" } readOnly /> diff --git a/apps/wr/app/store/matDmd/coMatRvw/type.tsx b/apps/wr/app/store/matDmd/coMatRvw/type.tsx index 58d539538..ec0f0e09c 100644 --- a/apps/wr/app/store/matDmd/coMatRvw/type.tsx +++ b/apps/wr/app/store/matDmd/coMatRvw/type.tsx @@ -79,11 +79,11 @@ export const DmdCoReqSchema = z.object({ grssClfg: z.number().nullish(), combResdch: z.number().nullish(), trbt: z.number().nullish(), - smll: z.number().nullish(), + smll: z.string().nullish(), crmty: z.number().nullish(), tn: z.number().nullish(), tph: z.number().nullish(), - ph: z.number().nullish(), + ph: z.string().nullish(), clIonQnt: z.number().nullish(), cdtnv: z.number().nullish(), rmrk: z.string().nullish(), diff --git a/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx index 515121e4e..7f87fe1fd 100644 --- a/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx +++ b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx @@ -67,6 +67,7 @@ export default function ConCostForm({ useEffect(() => { // 다른 행을 선택하면(selectionVersion 변경) 체크박스 상태를 초기화합니다. setCheckFinish(false); + setLastSub(null) }, [selectionVersion]); //공급처 팝업 값 셋팅 @@ -173,12 +174,13 @@ export default function ConCostForm({ return; } - const splycd = form.getValues("splyCndtList"); - const pk = - splycd && splycd[0]?.ruseUtztnFcltCd - ? splycd[0]?.ruseUtztnFcltCd - : "11000SW001R1"; + // const pk = + // splycd && splycd[0]?.ruseUtztnFcltCd + // ? splycd[0]?.ruseUtztnFcltCd + // : "11000SW001R1"; + const pk =lastSub?.ruseUtztnFcltCd??null + if (type === "mat") { if (value.demandCst) { const data: DedMatUpdateType = { @@ -190,31 +192,37 @@ export default function ConCostForm({ flg: checkFinish ? "Checked" : "Sub", rgtr: TEST_UUID, }; - if (checkFinish) { - toast((t) => ( - - 검토완료 변경시 공사비는 변경할수 없습니다. -
- 진행하시겠습니까? -
- - -
-
- )); - } else { - coMatRvwUpdate(pk, form.getValues("dmdInfoId"), data); + if(pk !==null){ + + if (checkFinish) { + toast((t) => ( + + 검토완료 변경시 공사비는 변경할수 없습니다. +
+ 진행하시겠습니까? +
+ + +
+
+ )); + } else { + coMatRvwUpdate(pk, form.getValues("dmdInfoId"), data); + } + }else{ + toast.error('후보지를 먼저 선택해주세요') } } } else if (type === "hist") {