From 90eb5f3b044f8d6589a772c0d195ea95db831f8c Mon Sep 17 00:00:00 2001 From: jsyang Date: Tue, 31 Mar 2026 16:12:25 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=9A=94=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=ED=9B=84=EB=B3=B4=EC=A7=80=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=A0=9C=EC=99=B8=20=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/(with-layout)/apply/register/page.tsx | 81 ++++++++++++++++++- apps/dm_new/app/store/sdmMng/index.tsx | 1 - 2 files changed, 78 insertions(+), 4 deletions(-) diff --git a/apps/dm_new/app/(with-layout)/apply/register/page.tsx b/apps/dm_new/app/(with-layout)/apply/register/page.tsx index 24f2e5918..482c19468 100644 --- a/apps/dm_new/app/(with-layout)/apply/register/page.tsx +++ b/apps/dm_new/app/(with-layout)/apply/register/page.tsx @@ -66,7 +66,7 @@ export default function DemandRegisterPage() { // 유사사례 const similarCaseList = useDmStore((state) => state.Sdm.similarCaseList); const getSimilarCaseList = useDmStore((state) => state.getSimilarCaseList); - + const [farmText, setFarmText] = useState("이하"); const insertSdmInfoData = useDmStore( (state) => state.insertSdmInfoData @@ -267,6 +267,81 @@ export default function DemandRegisterPage() { setOpenSimilar(true); }; + const initQualityForm = () => { + setColiform(""); + setNoDetect(false); + setTn(""); + setResidualCl(""); + setTp(""); + setTurbidity(""); + setPh({ min: "", max: "" }); + setBod(""); + setChloride(""); + setOdor("불쾌하지 않을 것"); + setEc(""); + setColor(""); + setRemark(""); + setFarmText("이하"); + } + + const fncSetOptionValue = (e: React.ChangeEvent) => { + const value = e.target.value; + initQualityForm(); + + switch (value) { + // 청소화장실용도 + case '01': + setTp('0.2'); + setTurbidity('2'); + setPh({min:'5.8', max:'8.5'}); + setBod('5'); + setColor('20'); + break; + // 세척살수용도 + case '02': + setTp('0.2'); + setTurbidity('2'); + setPh({min:'5.8', max:'8.5'}); + setBod('5'); + break; + // 조경용도 + case '03': + setTp('0.2'); + setTurbidity('2'); + setPh({min:'5.8', max:'8.5'}); + setBod('5'); + setChloride('250'); + break; + // 지하수 + case '05': + break; + // 농업용도 + case '06' : + setTurbidity('5'); + setPh({min:'5.8', max:'8.5'}); + setBod('8'); + setEc('2000'); + setFarmText("이하 (** 간접:2000,직접:700 )"); + break; + // 하천 등 유지보수 + case '07' : + setColiform('1000'); + setTn('10'); + setTp('0.5'); + setPh({min:'5.8', max:'8.5'}); + setBod('5'); + break; + // 공업 + case '08': + setPh({min:'5.8', max:'8.5'}); + break; + default: + console.log('잘못된 선택입니다.'); + } + + setUsePurpose(value); + } + return ( <> @@ -302,7 +377,7 @@ export default function DemandRegisterPage() { } rightLabel="전기전도도(µs/cm)" - rightControl={} + rightControl={} /> diff --git a/apps/dm_new/app/store/sdmMng/index.tsx b/apps/dm_new/app/store/sdmMng/index.tsx index 539bcd629..6504d4df8 100644 --- a/apps/dm_new/app/store/sdmMng/index.tsx +++ b/apps/dm_new/app/store/sdmMng/index.tsx @@ -709,7 +709,6 @@ export const SdmReducer = (set: any): SdmActions => { ruseBizNm: maskedBizNm, }; }); - console.log(similarCaseList); if (similarCaseList && similarCaseList.length !== 0) { set((state: SdmType) => ({