diff --git a/apps/wr/app/matMng/matDmd/coMatRvw/page.tsx b/apps/wr/app/matMng/matDmd/coMatRvw/page.tsx
new file mode 100644
index 000000000..4b2dfcef8
--- /dev/null
+++ b/apps/wr/app/matMng/matDmd/coMatRvw/page.tsx
@@ -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 (
+ <>
+
+
+
+
+
+
+
+
+
+ {
+ }}
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ }}
+ onPageChange={() => { }}
+ >
+
+
+
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/apps/wr/app/page.tsx b/apps/wr/app/page.tsx
index a4955b36a..a6f5856c3 100644
--- a/apps/wr/app/page.tsx
+++ b/apps/wr/app/page.tsx
@@ -119,6 +119,18 @@ export default function Home() {
+
+ {/* 수요처 매칭 */}
+
>
);
diff --git a/apps/wr/app/ruseFcltMng/prfmncReg/pbnstPrfmncReg/page.tsx b/apps/wr/app/ruseFcltMng/prfmncReg/pbnstPrfmncReg/page.tsx
index e3f3e9fe9..2d29672b3 100644
--- a/apps/wr/app/ruseFcltMng/prfmncReg/pbnstPrfmncReg/page.tsx
+++ b/apps/wr/app/ruseFcltMng/prfmncReg/pbnstPrfmncReg/page.tsx
@@ -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();
const [searchTxt, setSearchTxt] = useState();
const [searchYear, setSearchYear] = useState(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 (
<>
-
+
@@ -79,7 +90,7 @@ export default function prfmncPrfmncReg() {
>
파일등록
-
diff --git a/apps/wr/app/store/matDmd/coMatRvw/headList.tsx b/apps/wr/app/store/matDmd/coMatRvw/headList.tsx
new file mode 100644
index 000000000..906c97047
--- /dev/null
+++ b/apps/wr/app/store/matDmd/coMatRvw/headList.tsx
@@ -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 = [
+ {
+ 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,
+ },
+
+];
\ No newline at end of file
diff --git a/apps/wr/app/store/matDmd/coMatRvw/index.tsx b/apps/wr/app/store/matDmd/coMatRvw/index.tsx
new file mode 100644
index 000000000..6e62da829
--- /dev/null
+++ b/apps/wr/app/store/matDmd/coMatRvw/index.tsx
@@ -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;
+ 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 {
+ }
+}
\ No newline at end of file
diff --git a/apps/wr/app/store/prfmncReg/pbnstPrfmncReg/index.tsx b/apps/wr/app/store/prfmncReg/pbnstPrfmncReg/index.tsx
index a726aa463..282c277ec 100644
--- a/apps/wr/app/store/prfmncReg/pbnstPrfmncReg/index.tsx
+++ b/apps/wr/app/store/prfmncReg/pbnstPrfmncReg/index.tsx
@@ -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: {
diff --git a/apps/wr/app/store/store.tsx b/apps/wr/app/store/store.tsx
index 4bc699604..aa3d19851 100644
--- a/apps/wr/app/store/store.tsx
+++ b/apps/wr/app/store/store.tsx
@@ -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()((set) => {
@@ -179,6 +183,7 @@ export const StoreZus = (
...coSttnActionsExport(set), // 옮겨야함
...ldrmntCoSttnActionsExport(set), // 옮겨야함
...pbnstPrfmncActionsExport(set),
+ ...coRvwActionsExport(set)
};
});
};
diff --git a/apps/wr/public/sample_pbnstPrfmncReg.xlsx b/apps/wr/public/sample_pbnstPrfmncReg.xlsx
new file mode 100644
index 000000000..67f0d559e
Binary files /dev/null and b/apps/wr/public/sample_pbnstPrfmncReg.xlsx differ