수요매칭검토 페이지 만드는중
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
"use client";
|
||||
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { ContentsDiv, ScrollArea, SearchDiv, SearchFormLeft, SearchFormRight, SearchInput, Title, UiTable } from "@common/business_components/ui";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
|
||||
|
||||
export default function coMatRvw() {
|
||||
const { code, coRvw, } = useWrStore((state) => state);
|
||||
const { coRvwHeadList, } = coRvw;
|
||||
return (
|
||||
<>
|
||||
<ContentsDiv>
|
||||
<div className="grid grid-cols-4 gap-4">
|
||||
<div className="col-span-4">
|
||||
<Title title={"수요매칭검토"} />
|
||||
<SearchDiv>
|
||||
<SearchFormLeft>
|
||||
|
||||
<div className="col-span-2 flex flex-row space-x-2">
|
||||
<Label className="w-28 mt-2 text-xl text-gray-600">{'시설명'}</Label>
|
||||
<SearchInput
|
||||
className={"w-full text-2xl"}
|
||||
label=""
|
||||
textValue={""}
|
||||
setText={(e) => {
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</SearchFormLeft>
|
||||
<SearchFormRight
|
||||
className="w-2/12 mx-5 flex flex-col items-center justify-center space-x-2 ">
|
||||
<div className="space-y">
|
||||
<div className="flex flex-row space-x-2">
|
||||
<Button
|
||||
size={"sm"}
|
||||
onClick={(e) => { }}
|
||||
>
|
||||
조회
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</SearchFormRight>
|
||||
</SearchDiv>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-6 gap-4 ">
|
||||
<div className="col-span-6">
|
||||
<ListDiv>
|
||||
<UiTable
|
||||
headName={[]}
|
||||
tableData={[]}
|
||||
children={undefined}
|
||||
headlist={coRvwHeadList}
|
||||
pageSize={20}
|
||||
total={100000}
|
||||
cellClick={(index: number | undefined, headId: string) => {
|
||||
}}
|
||||
onPageChange={() => { }}
|
||||
></UiTable>
|
||||
</ListDiv>
|
||||
</div>
|
||||
</div>
|
||||
</ContentsDiv>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -119,6 +119,18 @@ export default function Home() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 수요처 매칭 */}
|
||||
<div>
|
||||
<h2 className="text-xl font-semibold mb-4">수요처 매칭</h2>
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-2">
|
||||
<Button className="w-full">
|
||||
<Link href="matMng/matDmd/coMatRvw">수요처 매칭 검토</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -2,34 +2,45 @@
|
||||
|
||||
import { useWrStore } from "@/app/store";
|
||||
import type { pubHasuType } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
|
||||
import { yearOptions } from "@/components/lib/func/commom";
|
||||
import { excelDownload, yearOptions } from "@/components/lib/func/commom";
|
||||
import { ContentsDiv, Title, SearchDiv, SearchFormLeft, SelectBox, SearchInput, SearchFormRight, ScrollArea, UiTable } from "@common/business_components/ui";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
|
||||
export default function prfmncPrfmncReg() {
|
||||
const { code, prfmnc, prfmncHasuInit, searchFclts, } = useWrStore((state) => state);
|
||||
const { pbnstPrfmncHeadList, monthHeadList,prfmncRes } = prfmnc;
|
||||
const { pbnstPrfmncHeadList, monthHeadList, prfmncRes } = prfmnc;
|
||||
const [bdstTable, setbdstTable] = useState<pubHasuType[]>();
|
||||
const [searchTxt, setSearchTxt] = useState<string>();
|
||||
|
||||
const [searchYear, setSearchYear] = useState<string>(String(new Date().getFullYear()));
|
||||
const excelClick = useCallback(() => {
|
||||
console.log("dd")
|
||||
excelDownload(
|
||||
prfmnc.excelList,
|
||||
"하수재이용실적",
|
||||
"sample_pbnstPrfmncReg.xlsx",
|
||||
"A1:O1"
|
||||
);
|
||||
}, [prfmnc.excelList])
|
||||
|
||||
useEffect(() => {
|
||||
if (!prfmnc.isInit) {
|
||||
prfmncHasuInit("1", "11");
|
||||
}
|
||||
}, [prfmnc.isInit, prfmncHasuInit]);
|
||||
useEffect(() => {
|
||||
setbdstTable(prfmncRes)
|
||||
console.log("prfmnc.prfmncRes", prfmncRes)
|
||||
},[prfmncRes]);
|
||||
}, [prfmncRes]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ContentsDiv>
|
||||
<div className="grid grid-cols-4 gap-4">
|
||||
<div className="col-span-4">
|
||||
<Title title={"하수재이용 시설 등록"} />
|
||||
<Title title={"하수재이용실적 등록"} />
|
||||
<SearchDiv>
|
||||
<SearchFormLeft>
|
||||
<div className="col-span-2 flex flex-row space-x-2">
|
||||
@@ -79,7 +90,7 @@ export default function prfmncPrfmncReg() {
|
||||
>
|
||||
파일등록
|
||||
</Button>
|
||||
<Button color="green" size={"sm"} onClick={() => { }}>
|
||||
<Button color="green" size={"sm"} onClick={excelClick}>
|
||||
양식받기
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
import { z } from "zod";
|
||||
import type { CommonTableProps } from "../../common/type/headder";
|
||||
|
||||
export const sttnHeadListType = z.array(
|
||||
z.object({
|
||||
id: z.string(),
|
||||
title: z.string(),
|
||||
visible: z.boolean(),
|
||||
})
|
||||
);
|
||||
|
||||
export const coRvwHeadListExport: z.infer<typeof sttnHeadListType> = [
|
||||
{
|
||||
id: "ctpv",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "sgg",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "coNm",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "addr",
|
||||
title: "공장주소",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "telNo",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "regDt", //바꾸기
|
||||
title: "신청일자",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "state", //바꾸기
|
||||
title: "진행상태",
|
||||
visible: true,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
// id는 다확인해야함
|
||||
export const coRvwNodeListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpv",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sgg",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "coNm",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "addr",
|
||||
title: "공장주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},{
|
||||
id: "telNo",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "regDt", //바꾸기
|
||||
title: "신청일자",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "state", //바꾸기
|
||||
title: "진행상태",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
|
||||
];
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { z } from "zod";
|
||||
import type { sttnHeadListType } from "../coSttn/headList";
|
||||
import { coRvwHeadListExport, coRvwNodeListExport } from "./headList";
|
||||
import type { CommonTableProps } from "../../common/type/headder";
|
||||
|
||||
const coRvwHeadList = coRvwHeadListExport;
|
||||
const coRvwNodeList = coRvwNodeListExport;
|
||||
|
||||
export type coRvwState = {
|
||||
coRvw: {
|
||||
isInit: boolean;
|
||||
coRvwHeadList: z.infer<typeof sttnHeadListType>;
|
||||
coRvwNodeList: CommonTableProps[];
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
export const coRvwStateExport: coRvwState = {
|
||||
coRvw: {
|
||||
isInit: false,
|
||||
coRvwHeadList: coRvwHeadList,
|
||||
coRvwNodeList: coRvwNodeList,
|
||||
}
|
||||
}
|
||||
|
||||
export type coRvwType = coRvwState & coRvwActions;
|
||||
|
||||
type coRvwActions = {
|
||||
};
|
||||
|
||||
export const coRvwActionsExport: (set: any) => coRvwActions = (set: any) => {
|
||||
return {
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ export type pbnstPrfmncState = {
|
||||
pbnstPrfmncHeadList: TableUpperProps[];
|
||||
monthHeadList: TableUpperProps[];
|
||||
prfmncRes: pubHasuType[];
|
||||
excelList: Number[];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +25,7 @@ export const pbnstPrfmncStateExport: pbnstPrfmncState = {
|
||||
pbnstPrfmncHeadList: pbnstPrfmncHeadList,
|
||||
monthHeadList: monthHeadList,
|
||||
prfmncRes: [],
|
||||
excelList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +62,7 @@ export const pbnstPrfmncActionsExport: (set: any) => pbnstPrfmncActions = (set:
|
||||
prfmncHasuInit: async (page: string, sggOrCity: string) => {
|
||||
try {
|
||||
const prfmncRes = await hasuListFetch(page, sggOrCity);
|
||||
console.log("prfmncRes", prfmncRes)
|
||||
console.log("prfmncRes", prfmncRes)
|
||||
return set((state: pbnstPrfmncState) => ({
|
||||
...state,
|
||||
prfmnc: {
|
||||
|
||||
@@ -89,6 +89,7 @@ import { coSttnActionsExport, coSttnStateExport, type coSttnState, type coSttnTy
|
||||
import { ldrmntCoSttnActionsExport, ldrmntCoSttnStateExport, type ldrmntCoSttnState, type ldrmntCoSttnType } from "./matDmd/ldrmntCoSttn"; // 옮겨야함
|
||||
import { searchActions, type comFcltActions, type comFcltState } from "./common/searchCode";
|
||||
import { pbnstPrfmncActionsExport, pbnstPrfmncStateExport, type pbnstPrfmncState, type pbnstPrfmncType } from "./prfmncReg/pbnstPrfmncReg";
|
||||
import { coRvwActionsExport, coRvwStateExport, type coRvwState, type coRvwType } from "./matDmd/coMatRvw";
|
||||
|
||||
export type WrStore = comCodeType &
|
||||
pubFacType &
|
||||
@@ -108,7 +109,8 @@ export type WrStore = comCodeType &
|
||||
comFcltActions&comFcltState&
|
||||
coSttnType& // 옮겨야함
|
||||
ldrmntCoSttnType& // 옮겨야함
|
||||
pbnstPrfmncType
|
||||
pbnstPrfmncType&
|
||||
coRvwType
|
||||
;
|
||||
|
||||
export const StoreZus = (
|
||||
@@ -129,7 +131,8 @@ export const StoreZus = (
|
||||
pbnstSttnState&
|
||||
coSttnState& // 옮겨야함
|
||||
ldrmntCoSttnState& // 옮겨야함
|
||||
pbnstPrfmncState
|
||||
pbnstPrfmncState&
|
||||
coRvwState
|
||||
= {
|
||||
...comCodeStateExport,
|
||||
...pubFacStateExport,
|
||||
@@ -149,6 +152,7 @@ export const StoreZus = (
|
||||
...coSttnStateExport, // 옮겨야함
|
||||
...ldrmntCoSttnStateExport, // 옮겨야함
|
||||
...pbnstPrfmncStateExport,
|
||||
...coRvwStateExport,
|
||||
}
|
||||
) => {
|
||||
return createStore<WrStore>()((set) => {
|
||||
@@ -179,6 +183,7 @@ export const StoreZus = (
|
||||
...coSttnActionsExport(set), // 옮겨야함
|
||||
...ldrmntCoSttnActionsExport(set), // 옮겨야함
|
||||
...pbnstPrfmncActionsExport(set),
|
||||
...coRvwActionsExport(set)
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user