매칭관리 폴더구조 변경, 수요처 매칭 검토 및 재이용 검토이력 팝업 추가

This commit is contained in:
jyha00
2025-06-11 13:46:45 +09:00
parent 57351b671b
commit bcbcca9900
12 changed files with 348 additions and 38 deletions
@@ -3,10 +3,13 @@
import { useWrStore } from "@/app/store";
import { formH1Class, formTableName } from "@/components/lib/class/comClass";
import { getCity } from "@/components/lib/func/commom";
import { CmpttnModal } from "@/components/ui/modal/coMat/cmpttnModal";
import { CoMatModal } from "@/components/ui/modal/coMat/coMatModal";
import type { objSearchType } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal";
import { ContentsDiv, Form, FormField, FormUi, ScrollArea, SearchDiv, SearchFormLeft, SearchFormRight, SearchInput, SelectBox, Title, UiModal, UiTable, type SelectDataType } from "@common/business_components/ui";
import ListDiv from "@common/business_components/ui/list_div";
import { Button, DatePicker, Input, Label } from "@common/components/ui";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@common/components/ui/tooltip";
import { zodResolver } from "@hookform/resolvers/zod";
import { useEffect, useState } from "react";
import { useFieldArray, useForm } from "react-hook-form";
@@ -23,6 +26,12 @@ export default function CoMatRvw() {
const [isPrcsMo, setIsPrcsMo] = useState<{
isModal: boolean;
}>({ isModal: false });
const [isTrfMo, setIsTrfMo] = useState<{
isModal: boolean;
}>({ isModal: false, });
const [isCmpttnMo, setIsCmpttnMo] = useState<{
isModal: boolean;
}>({ isModal: false, });
const schema = z.object({
@@ -48,15 +57,6 @@ export default function CoMatRvw() {
setObjSearch({ ...objSearch, sgg: String(val) })
};
const {
fields: [],
append,
remove,
} = useFieldArray({
control: form.control,
name: "",
});
useEffect(() => {
if (fromDate > toDate) {
const newFromDate = new Date(toDate);
@@ -613,7 +613,7 @@ export default function CoMatRvw() {
<Label>처리시설용량에 따른 공사비(백만원)</Label>
<Button
size={"sm"}
onClick={(e) => { }}
onClick={(e) => setIsCmpttnMo({ isModal: true })}
className="bg-none"
>
공사비 산정표 보기
@@ -642,7 +642,7 @@ export default function CoMatRvw() {
<Label>시설부대경비 요율(%)</Label>
<Button
size={"sm"}
onClick={(e) => { }}
onClick={(e) => setIsTrfMo({ isModal: true })}
>
요율표 보기
</Button>
@@ -667,7 +667,19 @@ export default function CoMatRvw() {
</div>
<div className="col-span-3 mt-4">
<Label>총사업비 (백만원)<i className="diveicon di-search" /></Label>
<Label>총사업비 (백만원)
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<i className="diveicon di-search" />
</TooltipTrigger>
<TooltipContent>
<div className="font-bold mb-1 text-xl">총사업비 계산방법</div>
<div className="text-lg">하수처리수 재이용시설 총 사업비 = 공사비+시설부대경비 </div>
</TooltipContent>
</Tooltip>
</TooltipProvider>
</Label>
<FormField
control={form.control}
name=""
@@ -808,6 +820,26 @@ export default function CoMatRvw() {
setIsPrcsMo({ isModal: open });
}}
/>
<UiModal
body={
<CoMatModal data={[]}></CoMatModal>
}
bodyClass="w-[40vw] max-w-none h-[70vh]"
open={isTrfMo.isModal}
onOpenChange={(open) => {
setIsTrfMo({ isModal: open });
}}
/>
<UiModal
body={
<CmpttnModal data={[]}></CmpttnModal>
}
bodyClass="w-[70vw] max-w-none h-[50vh]"
open={isCmpttnMo.isModal}
onOpenChange={(open) => {
setIsCmpttnMo({ isModal: open });
}}
/>
</div>
</ContentsDiv >
</>
@@ -3,10 +3,13 @@
import { useWrStore } from "@/app/store";
import { formTableName } from "@/components/lib/class/comClass";
import { getCity } from "@/components/lib/func/commom";
import { CmpttnModal } from "@/components/ui/modal/coMat/cmpttnModal";
import { CoMatModal } from "@/components/ui/modal/coMat/coMatModal";
import type { objSearchType } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal";
import { ContentsDiv, Form, FormField, FormUi, ScrollArea, SearchDiv, SearchFormLeft, SearchFormRight, SearchInput, SelectBox, Title, UiTable, type SelectDataType } from "@common/business_components/ui";
import { ContentsDiv, Form, FormField, FormUi, ScrollArea, SearchDiv, SearchFormLeft, SearchFormRight, SearchInput, SelectBox, Title, UiModal, UiTable, type SelectDataType } from "@common/business_components/ui";
import ListDiv from "@common/business_components/ui/list_div";
import { Button, DatePicker, Input, Label } from "@common/components/ui";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@common/components/ui/tooltip";
import { zodResolver } from "@hookform/resolvers/zod";
import { useEffect, useState } from "react";
import { useFieldArray, useForm } from "react-hook-form";
@@ -40,18 +43,17 @@ export default function RuseRvwHstry() {
fcltCpct: 0,
}
});
const [isPrcsMo, setIsPrcsMo] = useState<{
isModal: boolean;
}>({ isModal: false });
const [isTrfMo, setIsTrfMo] = useState<{
isModal: boolean;
}>({ isModal: false, });
const [isCmpttnMo, setIsCmpttnMo] = useState<{
isModal: boolean;
}>({ isModal: false, });
const {
fields: [],
append,
remove,
} = useFieldArray({
control: form.control,
name: "",
});
return (
<>
return (
<ContentsDiv>
<div className="grid grid-cols-4 gap-4">
<div className="col-span-4">
@@ -204,7 +206,7 @@ return (
/>
</div>
<div className="col-span-3 mt-4">
<Label className="">용도에 따른 처리공정<i className="diveicon di-search" /></Label>
<Label className="">용도에 따른 처리공정<i className="diveicon di-search" onClick={(e) => setIsPrcsMo({ isModal: true })} /></Label>
<FormField
control={form.control}
@@ -248,7 +250,7 @@ return (
<Label>처리시설용량에 따른 공사비(백만원)</Label>
<Button
size={"sm"}
onClick={(e) => { }}
onClick={(e) => setIsCmpttnMo({ isModal: true })}
className="bg-none"
>
공사비 산정표 보기
@@ -277,7 +279,7 @@ return (
<Label>시설부대경비 요율(%)</Label>
<Button
size={"sm"}
onClick={(e) => { }}
onClick={(e) => setIsTrfMo({ isModal: true })}
>
요율표 보기
</Button>
@@ -302,7 +304,19 @@ return (
</div>
<div className="col-span-3 mt-4">
<Label>총사업비 (백만원)<i className="diveicon di-search" /></Label>
<Label>총사업비 (백만원)
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<i className="diveicon di-search" />
</TooltipTrigger>
<TooltipContent>
<div className="font-bold mb-1 text-xl">총사업비 계산방법</div>
<div className="text-lg">하수처리수 재이용시설 총 사업비 = 공사비+시설부대경비 </div>
</TooltipContent>
</Tooltip>
</TooltipProvider>
</Label>
<FormField
control={form.control}
name=""
@@ -360,8 +374,61 @@ return (
</Form>
</ListDiv>
</div>
<UiModal
body={
<>
<UiTable
headName={"용도에 따른 처리공정"}
tableData={[
{ usage: "청소", process: "총인처리시설 + 염소소독" },
{ usage: "화장실용수", process: "총인처리시설 + 염소소독" },
{ usage: "세척", process: "총인처리시설 + UV소독" },
{ usage: "살수", process: "총인처리시설 + UV소독" },
{ usage: "조경", process: "총인처리시설 + UV소독" },
{ usage: "농업", process: "총인처리시설 + UV소독" },
{ usage: "하천", process: "총인처리시설 + UV소독" },
{ usage: "지하수", process: "전처리시설 + RO" },
{ usage: "공업용수", process: "전처리시설 + RO" },
]}
headlist={[
{ id: "usage", title: "용도" },
{ id: "process", title: "단위공정" }
]}
pageSize={0}
total={0}
cellClick={() => { }}
onPageChange={() => { }}
/>
</>
}
bodyClass="w-[25vw] max-w-none h-[60vh]"
open={isPrcsMo.isModal}
onOpenChange={(open) => {
setIsPrcsMo({ isModal: open });
}}
/>
<UiModal
body={
<CoMatModal data={[]}></CoMatModal>
}
bodyClass="w-[40vw] max-w-none h-[70vh]"
open={isTrfMo.isModal}
onOpenChange={(open) => {
setIsTrfMo({ isModal: open });
}}
/>
<UiModal
body={
<CmpttnModal data={[]}></CmpttnModal>
}
bodyClass="w-[70vw] max-w-none h-[50vh]"
open={isCmpttnMo.isModal}
onOpenChange={(open) => {
setIsCmpttnMo({ isModal: open });
}}
/>
</div>
</ContentsDiv >
</>
)
)
}
+7 -7
View File
@@ -111,22 +111,22 @@ export default function Home() {
<div className="grid grid-cols-12 gap-4">
<div className="col-span-2">
<Button className="w-full">
<Link href="matMng/matDmd/coReg">수요처 등록</Link>
<Link href="matMng/coMng/coReg">수요처 등록</Link>
</Button>
</div>
<div className="col-span-2">
<Button className="w-full">
<Link href="matMng/matDmd/coSttn">수요처 관리</Link>
<Link href="matMng/coMng/coSttn">수요처 관리</Link>
</Button>
</div>
<div className="col-span-2">
<Button className="w-full">
<Link href="matMng/matDmd/ldrmntCoSttn">잠재수요처 관리</Link>
<Link href="matMng/coMng/ldrmntCoSttn">잠재수요처 관리</Link>
</Button>
</div>
<div className="col-span-2">
<Button className="w-full">
<Link href="matMng/matDmd/drgtSttn">우리동네가뭄</Link>
<Link href="matMng/coMng/drgtSttn">우리동네가뭄</Link>
</Button>
</div>
</div>
@@ -138,17 +138,17 @@ export default function Home() {
<div className="grid grid-cols-12 gap-4">
<div className="col-span-2">
<Button className="w-full">
<Link href="matMng/matDmd/coMatRvw">수요처 매칭 검토</Link>
<Link href="matMng/coMat/coMatRvw">수요처 매칭 검토</Link>
</Button>
</div>
<div className="col-span-2">
<Button className="w-full">
<Link href="matMng/matDmd/ruseRvwHstry">재이용검토이력</Link>
<Link href="matMng/coMat/ruseRvwHstry">재이용검토이력</Link>
</Button>
</div>
<div className="col-span-2">
<Button className="w-full">
<Link href="matMng/matDmd/ruseCaseMng">물재이용사례 관리</Link>
<Link href="matMng/coMat/ruseCaseMng">물재이용사례 관리</Link>
</Button>
</div>
</div>
+144 -1
View File
@@ -106,4 +106,147 @@ export const coRvwNodeListExport: CommonTableProps[] = [
colSpan: 1,
},
];
];
export const cmpttnHeadListExport: CommonTableProps[] = [
{
id: "ctpv",
title: "구분",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "sgg",
title: "처리시설 용량(m³)",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "500",
title: "500",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "1000",
title: "1,000",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},{
id: "2000",
title: "2,000",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "3000", //바꾸기
title: "3,000",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "5000", //바꾸기
title: "5,000",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "10000", //바꾸기
title: "10,000",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "20000", //바꾸기
title: "20,000",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "30000", //바꾸기
title: "30,000",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "50000", //바꾸기
title: "50,000",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "100000", //바꾸기
title: "100,000",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
];
export const coModalHeadListExport: CommonTableProps[] = [
{
id: "gubun",
title: "공사비/구분",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "a",
title: "기본조사설계비",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "aa",
title: "실시설계비",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "aaa",
title: "공사감리비",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
{
id: "aaaa",
title: "시설부대비",
visible: true,
row: 1,
rowSpan: 1,
colSpan: 1,
},
]
@@ -0,0 +1,36 @@
"use client"
import { cmpttnHeadListExport } from "@/app/store/matDmd/coMatRvw/headList";
import { yearOptions } from "@/components/lib/func/commom"
import { SelectBox, UiTable } from "@common/business_components/ui"
import { Label } from "@common/components/ui"
import { useState } from "react";
export function CmpttnModal({ data }: { data: [] }) {
const [year, setYear] = useState<string>(String(new Date().getFullYear()));
return (
<>
<h3 className="mt-4 ml-2 text-2xl font-medium text-label">공사비 산정표 보기</h3>
<hr/>
<div className="flex items-center">
<Label className="text-xl text-gray-600">기준년도</Label>
<SelectBox
className="h-full text-2xl"
label=""
selectClass={"ml-4"}
selectArray={yearOptions}
value={year}
onSelectValue={(val: string | number) => setYear(String(val))} />
</div>
<UiTable
headName={""}
tableData={[]}
headlist={cmpttnHeadListExport}
pageSize={0}
total={0}
cellClick={() => { }}
onPageChange={() => { }}
/>
</>
)
}
@@ -0,0 +1,32 @@
"use client"
import { coModalHeadListExport } from "@/app/store/matDmd/coMatRvw/headList";
import { yearOptions } from "@/components/lib/func/commom"
import { SelectBox, UiTable } from "@common/business_components/ui"
import { Label } from "@common/components/ui"
import { useState } from "react";
export function CoMatModal({ data }: { data: [] }) {
const [year, setYear] = useState<string>(String(new Date().getFullYear()));
return (
<>
<h3 className="mt-4 ml-2 text-2xl font-medium text-label">요율표 보기</h3>
<hr/>
<div className="flex items-center">
<Label className="text-xl text-gray-600">기준년도</Label>
<SelectBox
className="h-full text-2xl"
label=""
selectClass={"ml-4"}
selectArray={yearOptions}
value={year}
onSelectValue={(val: string | number) => setYear(String(val))} />
</div>
<UiTable
headName={""}
tableData={[]}
headlist={coModalHeadListExport}
onPageChange={() => { }} pageSize={0} total={0} cellClick={undefined} />
</>
)
}