From 0507a8e66a27784e550d6f7318b7c75c23f21cb8 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Tue, 10 Jun 2025 13:27:58 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=BC=EC=9E=AC=EC=9D=B4=EC=9A=A9=EC=82=AC?= =?UTF-8?q?=EB=A1=80=EA=B4=80=EB=A6=AC=20=ED=8D=BC=EB=B8=94=EB=A6=AC?= =?UTF-8?q?=EC=8B=B1=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/matMng/matDmd/dmdReg/page.tsx | 106 ------ .../wr/app/matMng/matDmd/ruseCaseMng/page.tsx | 25 +- .../app/store/matDmd/ruseCaseMng/headList.tsx | 357 ++++++++++++++++-- .../wr/app/store/matDmd/ruseCaseMng/index.tsx | 24 ++ apps/wr/app/store/store.tsx | 13 +- .../ui/form/matDmd/coRegForm/component.tsx | 91 ----- .../ui/form/matDmd/dmdRegform/component.tsx | 316 ---------------- 7 files changed, 377 insertions(+), 555 deletions(-) delete mode 100644 apps/wr/app/matMng/matDmd/dmdReg/page.tsx create mode 100644 apps/wr/app/store/matDmd/ruseCaseMng/index.tsx delete mode 100644 apps/wr/components/ui/form/matDmd/coRegForm/component.tsx delete mode 100644 apps/wr/components/ui/form/matDmd/dmdRegform/component.tsx diff --git a/apps/wr/app/matMng/matDmd/dmdReg/page.tsx b/apps/wr/app/matMng/matDmd/dmdReg/page.tsx deleted file mode 100644 index 75918d021..000000000 --- a/apps/wr/app/matMng/matDmd/dmdReg/page.tsx +++ /dev/null @@ -1,106 +0,0 @@ -"use client"; -import { useForm } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; -import * as z from "zod"; -import { Form } from "@common/business_components/ui"; -import { Button } from "@common/components/ui"; -import { DmdRegForm } from "@/components/ui/form/matDmd/dmdRegform/component"; -import toast, { Toaster } from "react-hot-toast"; -import { useRouter } from "next/navigation"; - -const formSchema = z.object({ - dmdSel: z.string().min(1), - dmdTmng: z.coerce.date(), - dmdWq: z.string().min(1).optional(), - useUsgCd: z.string(), - wntUntprc: z.string().min(1), - grssClfg: z.string().min(1), - tn: z.string().min(1).optional(), - combResdch: z.string().min(1).optional(), - tp: z.string().min(1).optional(), - trbt: z.string().min(1).optional(), - ph: z.string().min(1).optional(), - bod: z.string().min(1).optional(), - clIonQnt: z.string().min(1).optional(), - smll: z.string().min(1).optional(), - cdtnv: z.string().min(1).optional(), - crmty: z.string().min(1).optional(), - rmrk: z.string().min(1).optional(), - sply1: z.string().min(1).optional(), - sply2: z.string().min(1).optional(), - sply3: z.string().min(1).optional(), - password: z.string().min(1), -}); - -export default function MyForm() { - const form = useForm>({ - resolver: zodResolver(formSchema), - defaultValues: { - dmdSel:'', - dmdTmng: new Date(), - dmdWq: "", - useUsgCd: "", - wntUntprc: "", - grssClfg: "", - tn: "", - combResdch: "", - tp: "", - trbt: "", - ph: "", - bod: "", - clIonQnt: "", - smll: "", - cdtnv: "", - crmty: "", - rmrk: "", - sply1: "", - sply2: "", - sply3: "", - password: "", - }, - }); - - const router = useRouter(); - - async function onSubmit(values: z.infer) { - try { - - toast.success("✅ 수요신청이 완료되었습니다."); - await new Promise((resolve) => setTimeout(resolve, 3000)); - router.push("../../") - } catch (error) { - toast.error("수요신청을 다시입력해주시길 바랍니다."); - } - } - - return ( - <> -
-

- 수요 신청정보입력 -

-
- -
-
-
-
-
- - {form} - - -
- -
-
-
- -
-
- - ); -} diff --git a/apps/wr/app/matMng/matDmd/ruseCaseMng/page.tsx b/apps/wr/app/matMng/matDmd/ruseCaseMng/page.tsx index 6b0d73fd2..4950ab0da 100644 --- a/apps/wr/app/matMng/matDmd/ruseCaseMng/page.tsx +++ b/apps/wr/app/matMng/matDmd/ruseCaseMng/page.tsx @@ -1,5 +1,6 @@ "use client"; import { useWrStore } from "@/app/store"; +import { ruseUtzType } from "@/app/store/matDmd/ruseCaseMng/headList"; import { getCity } from "@/components/lib/func/commom"; import type { objSearchType } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal"; import { ContentsDiv, SearchDiv, SearchFormLeft, SearchFormRight, SearchInput, SelectBox, Title, UiTable, type SelectDataType } from "@common/business_components/ui"; @@ -8,9 +9,11 @@ import { Button } from "@common/components/ui"; import { useState } from "react"; export default function RuseCaseMng() { - const { code, } = useWrStore((state) => state); + const { code,ruseCase} = useWrStore((state) => state); const [selectSgg, setSelectSgg] = useState() const [objSearch, setObjSearch] = useState({ sgg: "", city: "" }); + const [selectUtz, setSelectUtz] = useState() + const [searchTxt, setSearchTxt] = useState() const getSelCity = (val: string | number) => { const cityValue = String(val); @@ -20,7 +23,6 @@ export default function RuseCaseMng() { }; const getSgg = (val: string | number) => { - console.log(val); setObjSearch({ ...objSearch, sgg: String(val) }) }; return ( @@ -50,21 +52,18 @@ export default function RuseCaseMng() { className="col-span-2 w-1/3 h-full text-2xl" label="용도" selectClass={""} - selectArray={[]} - onSelectValue={() => { }} - /> - { }} + selectArray={ruseUtzType} + onSelectValue={(val) => { + if(val) + setSelectUtz([String(val)])}} /> + { + setSearchTxt(e) }} />
@@ -111,7 +110,7 @@ export default function RuseCaseMng() { headName={"물재이용사례 현황"} tableData={[]} children={undefined} - headlist={[]} + headlist={ruseCase.ruseHeadList} pageSize={20} total={100000} cellClick={(index: number | undefined, headId: string) => { diff --git a/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx b/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx index 643e61fc5..f9ad1bcef 100644 --- a/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx +++ b/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx @@ -1,48 +1,355 @@ -import { z } from "zod"; - -export const sttnHeadListType = z.array( - z.object({ - id: z.string(), - title: z.string(), - visible: z.boolean(), - }) -); +import type { SelectDataType } from "@common/business_components/ui"; +import type { TableUpperProps } from "../../common/type/header"; //★☆★☆ 여기서부터 수정하기 ★☆★☆ -export const coRvwHeadListExport: z.infer = [ +export const ruseCaseHeadListExport: TableUpperProps[] = [ { - id: "ctpv", - title: "시도", + id: "a", + title: "사업명", visible: true, + row: 0, + rowSpan: 2, }, { - id: "sgg", - title: "시군구", + id: "b", + title: "사업기간", visible: true, + row: 0, + rowSpan: 2, }, { - id: "coNm", - title: "회사명", + id: "c", + title: "공급처", visible: true, + row: 0, + colSpan: 3, }, { - id: "addr", - title: "공장주소", + id: "d", + title: "시설종류", visible: true, + row: 1, }, { - id: "telNo", - title: "전화번호", + id: "e", + title: "공급처명", visible: true, + row: 1, }, { - id: "regDt", //바꾸기 - title: "신청일자", + id: "f", + title: "시설용량(m³/일)", visible: true, + row: 1, }, { - id: "state", //바꾸기 - title: "진행상태", + id: "g", + title: "수요처", visible: true, + row: 0, + colSpan: 2, }, -]; \ No newline at end of file + { + id: "h", + title: "수요처명", + visible: true, + row: 1, + }, + { + id: "i", + title: "주소", + visible: true, + row: 1, + }, + { + id: "q", + title: "재이용시설", + visible: true, + row: 0, + colSpan: 5, + }, + { + id: "q2", + title: "시설용량(m³/일)", + visible: true, + row: 1, + }, + { + id: "q3", + title: "관로(km)", + visible: true, + row: 1, + }, + { + id: "q4", + title: "용도", + visible: true, + row: 1, + }, + { + id: "q5", + title: "공급량(m³/일)", + visible: true, + row: 1, + }, + { + id: "q6", + title: "처리공법", + visible: true, + row: 1, + }, + { + id: "k", + title: "보증수질", + visible: true, + row: 0, + colSpan: 13, + }, + { + id: "k1", + title: "용도별", + visible: true, + row: 1, + }, + { + id: "k2", + title: "총대장균군수​(개/100ml)", + visible: true, + row: 1, + }, + { + id: "k3", + title: "결합잔류염소(mg/L)", + visible: true, + row: 1, + }, + { + id: "k4", + title: "탁도(NTU)", + visible: true, + row: 1, + }, + { + id: "k5", + title: "생물학적​산소요구량(BOD)(mg/L)​", + visible: true, + row: 1, + }, + { + id: "k6", + title: "냄새​", + visible: true, + row: 1, + }, + { + id: "k7", + title: "색도​", + visible: true, + row: 1, + }, + { + id: "k8", + title: "총질소(T-N)(mg/L)​", + visible: true, + row: 1, + }, + { + id: "k9", + title: "총인(T-P)(mg/L)", + visible: true, + row: 1, + }, + { + id: "k10", + title: "수소이온농도(PH)​", + visible: true, + row: 1, + }, + { + id: "k11", + title: "수소이온농도(PH)​", + visible: true, + row: 1, + }, + { + id: "k12", + title: "전기전도도​(㎲/cm", + visible: true, + row: 1, + }, + { + id: "k13", + title: "비고​", + visible: true, + row: 1, + }, + { + id: "h", + title: "소요사업비(백만원)", + visible: true, + row: 0, + colSpan: 14, + }, + { + id: "h1", + title: "총", + visible: true, + row: 1, + }, + { + id: "h2", + title: "토목재이용시설", + visible: true, + row: 1, + }, + { + id: "h3", + title: "토목관로", + visible: true, + row: 1, + }, + { + id: "h4", + title: "건축", + visible: true, + row: 1, + }, + { + id: "h5", + title: "기계", + visible: true, + row: 1, + }, + { + id: "h6", + title: "전기・계측", + visible: true, + row: 1, + }, + { + id: "h7", + title: "GIS・DB", + visible: true, + row: 1, + }, + { + id: "h8", + title: "CCTV", + visible: true, + row: 1, + }, + { + id: "h9", + title: "시공및준공", + visible: true, + row: 1, + }, + { + id: "h10", + title: "페기물", + visible: true, + row: 1, + }, + { + id: "h11", + title: "설계비", + visible: true, + row: 1, + }, + { + id: "h12", + title: "감리비", + visible: true, + row: 1, + }, + { + id: "h13", + title: "시설부대비", + visible: true, + row: 1, + }, + { + id: "h14", + title: "기타", + visible: true, + row: 1, + }, + { + id: "i", + title: "자원조달계획(백만원)", + visible: true, + row: 0, + colSpan: 4, + }, + { + id: "i1", + title: "총", + visible: true, + row: 1, + }, + { + id: "i2", + title: "국비", + visible: true, + row: 1, + }, + { + id: "i3", + title: "지방비", + visible: true, + row: 1, + }, + { + id: "i4", + title: "원인자부담", + visible: true, + row: 1, + }, + { + id: "j", + title: "사업비정산(백만원)", + visible: true, + row: 0, + colSpan: 5, + }, + { + id: "j1", + title: "총", + visible: true, + row: 1, + }, + { + id: "j2", + title: "국비", + visible: true, + row: 1, + }, + { + id: "j3", + title: "지방비", + visible: true, + row: 1, + }, + { + id: "j4", + title: "원인자부담", + visible: true, + row: 1, + }, + { + id: "j5", + title: "국고비율", + visible: true, + row: 1, + }, +]; + +export const ruseUtzType: SelectDataType[] = [ + { text: "조경용수", val: "조경용수" }, + { text: "청소화장실용수", val: "청소화장실용수" }, + { text: "세척살수용수", val: "세척살수용수" }, + { text: "농업용수", val: "농업용수" }, + { text: "공업용수", val: "공업용수" }, + { text: "친수용수", val: "친수용수" }, + { text: "기타", val: "기타" }, +]; diff --git a/apps/wr/app/store/matDmd/ruseCaseMng/index.tsx b/apps/wr/app/store/matDmd/ruseCaseMng/index.tsx new file mode 100644 index 000000000..c54b0db1a --- /dev/null +++ b/apps/wr/app/store/matDmd/ruseCaseMng/index.tsx @@ -0,0 +1,24 @@ +import type { TableUpperProps } from "../../common/type/header"; +import { ruseCaseHeadListExport } from "./headList"; + +export type ruseCaseState = { + ruseCase: { + ruseHeadList:TableUpperProps[]; + }; + }; +type ruseCaseActions = { +}; +export type ruseCaseType = ruseCaseState & ruseCaseActions; + +export const ruseCaseStateExport: ruseCaseState = { + ruseCase: { + ruseHeadList:ruseCaseHeadListExport, + }, +}; +export const ruseCaseActionsExport: (set: any) => ruseCaseActions = ( + set: any +) => { + return { + + }; +}; diff --git a/apps/wr/app/store/store.tsx b/apps/wr/app/store/store.tsx index dda146e98..64b05ab34 100644 --- a/apps/wr/app/store/store.tsx +++ b/apps/wr/app/store/store.tsx @@ -92,6 +92,7 @@ import { pbnstPrfmncActionsExport, pbnstPrfmncStateExport, type pbnstPrfmncState import { coRvwActionsExport, coRvwStateExport, type coRvwState, type coRvwType } from "./matDmd/coMatRvw"; import { ruseHstryActionsExport, ruseHstryStateExport, type ruseHstryState, type ruseHstryType } from "./matDmd/ruseRvwHstry"; import { pbnstPrfmncSttnActionsExport, pbnstPrfmncSttnExport, type pbnstPrfmncSttnState, type pbnstPrfmncSttnType } from "./prfmncSttn/pbnstPrfmncSttn"; +import { ruseCaseActionsExport, ruseCaseStateExport, type ruseCaseType, type ruseCaseState } from "./matDmd/ruseCaseMng"; export type WrStore = comCodeType & pubFacType & @@ -114,7 +115,8 @@ export type WrStore = comCodeType & pbnstPrfmncType& coRvwType& ruseHstryType& - pbnstPrfmncSttnType + pbnstPrfmncSttnType& + ruseCaseType ; export const StoreZus = ( @@ -138,7 +140,8 @@ export const StoreZus = ( pbnstPrfmncState& coRvwState& ruseHstryState& - pbnstPrfmncSttnState + pbnstPrfmncSttnState& + ruseCaseState = { ...comCodeStateExport, ...pubFacStateExport, @@ -160,7 +163,8 @@ export const StoreZus = ( ...pbnstPrfmncStateExport, ...coRvwStateExport, ...ruseHstryStateExport, - ...pbnstPrfmncSttnExport + ...pbnstPrfmncSttnExport, + ...ruseCaseStateExport } ) => { return createStore()((set) => { @@ -193,7 +197,8 @@ export const StoreZus = ( ...pbnstPrfmncActionsExport(set), ...coRvwActionsExport(set), ...ruseHstryActionsExport(set), - ...pbnstPrfmncSttnActionsExport(set) + ...pbnstPrfmncSttnActionsExport(set), + ...ruseCaseActionsExport(set) }; }); }; diff --git a/apps/wr/components/ui/form/matDmd/coRegForm/component.tsx b/apps/wr/components/ui/form/matDmd/coRegForm/component.tsx deleted file mode 100644 index 57fd9239e..000000000 --- a/apps/wr/components/ui/form/matDmd/coRegForm/component.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { useWrStore } from "@/app/store"; -import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; -import { DatePicker, FormField, FormItem, FormLabel, FormUi, SelectBox } from "@common/business_components"; -import { Button, Input } from "@common/components"; -import { useState } from "react"; - -export function CoRegForm(form:any){ - - const { dmd } = useWrStore((state) => state); - - return( - - <> - ( - - - - - )} - /> - - ( - - - - - )} - /> - - ( - - - - )} - /> - - ( - - - - )} - /> - - ( - - - - )} - /> - - ( - - - - - )} - /> - - - - ) -} \ No newline at end of file diff --git a/apps/wr/components/ui/form/matDmd/dmdRegform/component.tsx b/apps/wr/components/ui/form/matDmd/dmdRegform/component.tsx deleted file mode 100644 index efd3eb4ee..000000000 --- a/apps/wr/components/ui/form/matDmd/dmdRegform/component.tsx +++ /dev/null @@ -1,316 +0,0 @@ -import { useWrStore } from "@/app/store"; -import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; -import { DatePicker, FormField, FormItem, FormLabel, FormUi, SelectBox } from "@common/business_components"; -import { Button, Input } from "@common/components"; -import { useState } from "react"; - -export function DmdRegForm(form: any) { - const { dmd } = useWrStore((state) => state); - - const [dmdDate, setDmdDate] = useState(new Date()) - - - const onChangeDate = (val: Date|undefined) => { - if(val)setDmdDate(val) - } - - return ( - <> - ( - - - - )} - /> - - ( - - 요구시기 - - - )} - /> - - ( - - - - - )} - /> - - ( - - - - - )} - /> - - ( - - - - - )} - /> - -
-

- 요구수질 -

-
-
- -
- ( - - - - )} - /> -
- -
- ( - - - - )} - /> -
-
- -
-
- ( - - - - )} - /> -
- -
- ( - - - - )} - /> -
-
- -
-
- ( - - - - )} - /> -
- -
- ( - - - - )} - /> -
-
- -
-
- ( - - - - )} - /> -
- -
- ( - - - - )} - /> -
-
- -
-
- ( - - - - )} - /> -
- -
- ( - - - - )} - /> -
-
- -
-
- ( - - - - )} - /> -
- -
- ( - - - - )} - /> -
-
-
-

- 공급후보지 선택 -

-
- -
-
- -
- -
-
-
- ( - - - - )} - /> -
-
- ( - - - - )} - /> -
-
- ( - - - - )} - /> -
-
-
-

- 수요신청 비밀번호 -

- -
- ( - - - - )} - /> -
-
- - ); -}