잠재수요처 퍼블 수정, 상세현황 모달 추가, 엑셀등록 모달 추가
This commit is contained in:
@@ -1,84 +0,0 @@
|
||||
"use client";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import * as z from "zod";
|
||||
import {
|
||||
Form,
|
||||
FormField,
|
||||
FormUi,
|
||||
ScrollArea,
|
||||
SelectBox,
|
||||
} from "@common/business_components/ui";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { CoRegForm } from "@/components/ui/form/matDmd/coRegForm/component";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { ToastFormUi } from "@/components/ui/toast/toastFromUi";
|
||||
|
||||
const formSchema = z.object({
|
||||
ctpv: z.string(),
|
||||
sgg: z.string(),
|
||||
coNm: z.string().min(1).max(20),
|
||||
bznmNo: z.string().min(1).min(9).max(12),
|
||||
addr: z.string().min(1).min(6).max(20),
|
||||
telNo: z.string().min(8).max(12),
|
||||
|
||||
});
|
||||
|
||||
export default function MyForm() {
|
||||
|
||||
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
coNm:'',
|
||||
bznmNo:'',
|
||||
addr:'',
|
||||
telNo:'',
|
||||
},
|
||||
});
|
||||
|
||||
function onSubmit(values: z.infer<typeof formSchema>) {
|
||||
try {
|
||||
toast.dismiss();
|
||||
//ToastFormUi("수요신청 화면으로 이동하시겠습니까?", "수요처 등록 완료", "./dmdReg", "이동")
|
||||
|
||||
} catch (error) {
|
||||
console.error("Form submission error", error);
|
||||
toast.error("수요처 등록이 실패하였습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="grid h-40 grid-cols-3 place-content-center">
|
||||
<h1 className=" col-start-2 col-span-1 text-4xl underline">
|
||||
수요처 정보입력
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-5 gap-4 overflow-hidden">
|
||||
<div className="col-span-1 "/>
|
||||
<div className="col-span-3 ">
|
||||
<div>
|
||||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="space-y-8 max-w-3xl mx-auto"
|
||||
>
|
||||
<CoRegForm>{form}</CoRegForm>
|
||||
|
||||
|
||||
<Button type="submit">수요처등록</Button>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-span-1 " >
|
||||
<Toaster position="top-center" />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ import { useWrStore } from "@/app/store";
|
||||
import { btnClass } from "@/app/store/common/code";
|
||||
import type { customCoSttnBdst } from "@/app/store/matDmd/coSttn";
|
||||
import { drgtHeadListExport } from "@/app/store/matDmd/drgtSttn/headList";
|
||||
import { getCity } from "@/components/lib/func/commom";
|
||||
import { excelDownload, getCity } from "@/components/lib/func/commom";
|
||||
import type { objSearchType } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal";
|
||||
import { ContentsDiv, SearchDiv, SearchFormLeft, SearchFormRight, SelectBox, Title, UiTable, type SelectDataType } from "@common/business_components/ui";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button, DatePicker, Label } from "@common/components/ui";
|
||||
import { useState } from "react";
|
||||
import { useCallback, useState } from "react";
|
||||
|
||||
export default function drgtSttn() {
|
||||
export default function DrgtSttn() {
|
||||
const { code, } = useWrStore((state) => state);
|
||||
const [fromDate, setFromDate] = useState<Date>(new Date());
|
||||
const [toDate, setToDate] = useState<Date>(new Date());
|
||||
@@ -28,6 +28,15 @@ export default function drgtSttn() {
|
||||
console.log(val);
|
||||
setObjSearch({ ...objSearch, sgg: String(val) })
|
||||
};
|
||||
|
||||
const excelClick = useCallback(() => {
|
||||
excelDownload(
|
||||
[[]],
|
||||
"우리동네가뭄",
|
||||
"sample_drgtSttn.xlsx",
|
||||
"A1:H1"
|
||||
);
|
||||
}, []);
|
||||
return (
|
||||
<>
|
||||
<ContentsDiv>
|
||||
@@ -86,9 +95,7 @@ export default function drgtSttn() {
|
||||
<Button
|
||||
size={"sm"}
|
||||
className={`${btnClass} green`}
|
||||
onClick={() => {
|
||||
/* 저장 로직 */
|
||||
}}
|
||||
onClick={excelClick}
|
||||
>
|
||||
다운로드
|
||||
</Button>
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { btnClass } from "@/app/store/common/code";
|
||||
import type { customCoBdst } from "@/app/store/matDmd/coReg";
|
||||
import type { customLdrmntBdst } from "@/app/store/matDmd/ldrmntCoSttn";
|
||||
import { ldrmntNodeListExport } from "@/app/store/matDmd/ldrmntCoSttn/headList";
|
||||
import {
|
||||
excelDownload,
|
||||
getCity,
|
||||
tableData,
|
||||
getCity
|
||||
} from "@/components/lib/func/commom";
|
||||
import CoRegExcel from "@/components/ui/modal/coReg/coRegExcel/coRegExcel";
|
||||
import type { objSearchType } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal";
|
||||
import LdrmntExcelModal from "@/components/ui/modal/ldrmntSttn/ldrmntExcelModal";
|
||||
import CoDetailModal from "@/components/ui/modal/sttn/sttnDetailModal/coDatailModal";
|
||||
import {
|
||||
ContentsDiv,
|
||||
SearchBaseForm,
|
||||
SearchDiv,
|
||||
SearchFormLeft,
|
||||
SearchFormRight,
|
||||
@@ -23,40 +23,45 @@ import {
|
||||
UiModal,
|
||||
UiTable,
|
||||
type ReturnType,
|
||||
type SelectDataType,
|
||||
type SelectDataType
|
||||
} from "@common/business_components/ui";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button, DatePicker, Label } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { useCallback, useRef, useState } from "react";
|
||||
|
||||
export default function LdrmntCoSttn() {
|
||||
const { code, ldrmntCoSttn } = useWrStore(
|
||||
const { code, ldrmnt } = useWrStore(
|
||||
(state) => state
|
||||
);
|
||||
const { ldrmntCoSttnRes } = ldrmntCoSttn;
|
||||
const [bdstTable, setBdstTable] = useState<customCoBdst[]>();
|
||||
const [detailModal, setDetailModal] = useState<{ isOpen: boolean, data: customCoBdst | undefined }>({ data: undefined, isOpen: false })
|
||||
const { ldrmntCoList } = ldrmnt;
|
||||
const [detailModal, setDetailModal] = useState<{ isOpen: boolean, data: customLdrmntBdst | undefined }>({ data: undefined, isOpen: false })
|
||||
const [pageNation, setPageNation] = useState(1);
|
||||
const [isRegExcel, setIsRegExcel] = useState(false);
|
||||
const [selectSgg, setSelectSgg] = useState<SelectDataType[] | []>()
|
||||
const [objSearch, setObjSearch] = useState<objSearchType>({ sgg: "", city: "" });
|
||||
|
||||
const [bdstTable, setBdstTable] = useState<customLdrmntBdst[]>();
|
||||
const ref = useRef<ReturnType>({} as ReturnType);
|
||||
|
||||
const excelClick = useCallback(() => {
|
||||
excelDownload(
|
||||
[[]],
|
||||
"잠재수요처 관리",
|
||||
"sample_ldrmntCoSttn.xlsx",
|
||||
"sample_ldrmnt.xlsx",
|
||||
"A1:AL1",
|
||||
2
|
||||
);
|
||||
}, []);
|
||||
|
||||
const [isExcelOpen, setIsExcelOPen] = useState<{
|
||||
isModal: boolean;
|
||||
}>({ isModal: false});
|
||||
|
||||
const cellClick = (index: number | undefined, headId: string) => {
|
||||
if (index !== undefined && bdstTable !== undefined) {
|
||||
setDetailModal({ isOpen: true, data: bdstTable[index] })
|
||||
if (index !== undefined) {
|
||||
setDetailModal({ isOpen: true, data: ldrmntCoList[index] });
|
||||
}
|
||||
console.log("detailModal", detailModal);
|
||||
|
||||
}
|
||||
|
||||
const getSelCity = (val: string | number) => {
|
||||
@@ -71,21 +76,6 @@ export default function LdrmntCoSttn() {
|
||||
setObjSearch({ ...objSearch, sgg: String(val) })
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (ldrmntCoSttnRes.length > 0 && code.cityCd.length > 0) {
|
||||
const data = tableData(ldrmntCoSttnRes, { code });
|
||||
console.log("data", data);
|
||||
const chData = data
|
||||
.map((item: any) => ({
|
||||
...item
|
||||
|
||||
}))
|
||||
.filter((item: any) => item !== undefined);
|
||||
|
||||
setBdstTable(chData);
|
||||
}
|
||||
}, [code, ldrmntCoSttnRes, ldrmntCoSttn.ldrmntCoSttHeadList]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ContentsDiv>
|
||||
@@ -130,7 +120,9 @@ export default function LdrmntCoSttn() {
|
||||
<Button
|
||||
size={"sm"}
|
||||
className={btnClass}
|
||||
onClick={() => { }}
|
||||
onClick={() => {
|
||||
setIsExcelOPen({ ...isExcelOpen, isModal: true });
|
||||
}}
|
||||
>
|
||||
엑셀등록
|
||||
</Button>
|
||||
@@ -157,17 +149,19 @@ export default function LdrmntCoSttn() {
|
||||
</div>
|
||||
<div className="grid grid-cols-6 gap-4 ">
|
||||
<div className="col-span-6">
|
||||
<ListDiv>
|
||||
<UiTable
|
||||
headName={[]}
|
||||
tableData={bdstTable || []}
|
||||
headlist={ldrmntCoSttn.ldrmntCoSttHeadList}
|
||||
pageSize={20}
|
||||
total={10000}
|
||||
cellClick={(index: number | undefined, headId: string) => { cellClick(index ?? undefined, headId) }}
|
||||
onPageChange={setPageNation}
|
||||
></UiTable>
|
||||
</ListDiv>
|
||||
<div className="overflow-x-auto">
|
||||
<ListDiv className="min-w-max">
|
||||
<UiTable
|
||||
headName={[]}
|
||||
tableData={ldrmntCoList || []}
|
||||
headlist={ldrmntNodeListExport}
|
||||
pageSize={20}
|
||||
total={10000}
|
||||
cellClick={(index: number | undefined, headId: string) => { cellClick(index ?? undefined, headId) }}
|
||||
onPageChange={setPageNation}
|
||||
/>
|
||||
</ListDiv>
|
||||
</div>
|
||||
</div>
|
||||
<UiModal
|
||||
open={detailModal.isOpen}
|
||||
@@ -175,7 +169,8 @@ export default function LdrmntCoSttn() {
|
||||
setDetailModal({ ...detailModal, isOpen: !detailModal.isOpen })
|
||||
}}
|
||||
bodyClass={"w-[40vw] max-w-none max-h-[calc(100%-70px)]"}
|
||||
body={<CoDetailModal formObj={detailModal.data} />} />
|
||||
body={<CoDetailModal formObj={detailModal.data} />}
|
||||
/>
|
||||
|
||||
<UiModal
|
||||
bodyClass={"w-[40vw] max-w-none"}
|
||||
@@ -183,6 +178,14 @@ export default function LdrmntCoSttn() {
|
||||
body={<CoRegExcel></CoRegExcel>}
|
||||
onOpenChange={setIsRegExcel}
|
||||
/>
|
||||
<UiModal
|
||||
bodyClass={""}
|
||||
body={<LdrmntExcelModal data={isExcelOpen.data}></LdrmntExcelModal>}
|
||||
open={isExcelOpen.isModal}
|
||||
onOpenChange={() => {
|
||||
setIsExcelOPen({ isModal: false, });
|
||||
}}
|
||||
></UiModal>
|
||||
</div>
|
||||
|
||||
</ContentsDiv>
|
||||
|
||||
@@ -65,4 +65,38 @@ export const drgtHeadListExport: CommonTableProps[] = [
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
];
|
||||
];
|
||||
|
||||
export const drgtDetailHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "year",
|
||||
title: "년",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "month",
|
||||
title: "월",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},{
|
||||
id: "day",
|
||||
title: "일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "state",
|
||||
title: "가뭄상태",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
]
|
||||
@@ -0,0 +1,359 @@
|
||||
import type { CommonTableProps } from "../../common/type/header";
|
||||
|
||||
export const ldrmntHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpvCd",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sggCd",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa1",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa33",
|
||||
title: "공장주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa35",
|
||||
title: "공장관리번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa11",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
]
|
||||
|
||||
export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpvCd",
|
||||
title: "시도",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "sggCd",
|
||||
title: "시군구",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa",
|
||||
title: "관리기관",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa1",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa2",
|
||||
title: "공장구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa3",
|
||||
title: "단지명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa4",
|
||||
title: "설립구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa5",
|
||||
title: "입주형태",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa6",
|
||||
title: "보유구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa7",
|
||||
title: "최초승인일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa8",
|
||||
title: "최초등록일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa9",
|
||||
title: "등록구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa10",
|
||||
title: "등록일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa11",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa12",
|
||||
title: "남자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa13",
|
||||
title: "여자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa14",
|
||||
title: "외국인남자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa15",
|
||||
title: "외국인여자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa16",
|
||||
title: "종업원합계",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa17",
|
||||
title: "생산품",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa18",
|
||||
title: "원자재",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa19",
|
||||
title: "공장규모",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa20",
|
||||
title: "용도지역",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa21",
|
||||
title: "지목",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa22",
|
||||
title: "용지면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa23",
|
||||
title: "제조시설면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa24",
|
||||
title: "부대시설면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa25",
|
||||
title: "건축면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa26",
|
||||
title: "지식산업센터명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa27",
|
||||
title: "대표업종",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa28",
|
||||
title: "업종명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa29",
|
||||
title: "업종코드",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa30",
|
||||
title: "차수",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa31",
|
||||
title: "법인주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa32",
|
||||
title: "필지수",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa33",
|
||||
title: "공장주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa34",
|
||||
title: "공장주소_지번",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa35",
|
||||
title: "공장관리번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
colSpan: 1,
|
||||
},
|
||||
];
|
||||
@@ -1,67 +1,201 @@
|
||||
import type { CommonTableProps } from "@/app/store/common/type/header";
|
||||
import { coSttHeadListExport, coSttNodeListExport } from "../coSttn/headList";
|
||||
import type { customCoSttnBdst } from "../coSttn";
|
||||
import { z } from "zod";
|
||||
import { ldrmntHeadListExport, ldrmntNodeListExport } from "./headList";
|
||||
import { deleteFectch, fetchType, getFetch, postFectch } from "@/components/lib/api";
|
||||
|
||||
export const ldrmntZod = z.object({
|
||||
ctpvCd: z.number().default(0),
|
||||
sggCd: z.number().default(0),
|
||||
aaaaaa: z.string().default(''),
|
||||
aaaaaa1: z.string().default(''),
|
||||
aaaaaa2: z.string().default(''),
|
||||
aaaaaa3: z.string().default(''),
|
||||
aaaaaa4: z.string().default(''),
|
||||
aaaaaa5: z.string().default(''),
|
||||
aaaaaa6: z.string().default(''),
|
||||
aaaaaa7: z.date().default(() => new Date()),
|
||||
aaaaaa8: z.date().default(() => new Date()),
|
||||
aaaaaa9: z.string().default(''),
|
||||
aaaaaa10: z.date().default(() => new Date()),
|
||||
aaaaaa11: z.string().default(''),
|
||||
aaaaaa12: z.string().default(''),
|
||||
aaaaaa13: z.string().default(''),
|
||||
aaaaaa14: z.string().default(''),
|
||||
aaaaaa15: z.string().default(''),
|
||||
aaaaaa16: z.string().default(''),
|
||||
aaaaaa17: z.string().default(''),
|
||||
aaaaaa18: z.string().default(''),
|
||||
aaaaaa19: z.string().default(''),
|
||||
aaaaaa20: z.string().default(''),
|
||||
aaaaaa21: z.string().default(''),
|
||||
aaaaaa22: z.string().default(''),
|
||||
aaaaaa23: z.string().default(''),
|
||||
aaaaaa24: z.string().default(''),
|
||||
aaaaaa25: z.string().default(''),
|
||||
aaaaaa26: z.string().default(''),
|
||||
aaaaaa27: z.string().default(''),
|
||||
aaaaaa28: z.string().default(''),
|
||||
aaaaaa29: z.string().default(''),
|
||||
aaaaaa30: z.string().default(''),
|
||||
aaaaaa31: z.string().default(''),
|
||||
aaaaaa32: z.string().default(''),
|
||||
aaaaaa33: z.string().default(''),
|
||||
aaaaaa34: z.string().default(''),
|
||||
aaaaaa35: z.string().default(''),
|
||||
})
|
||||
|
||||
// 테이블 헤드 리스트
|
||||
const coSttNodeList = coSttNodeListExport;
|
||||
const coSttHeadList = coSttHeadListExport;
|
||||
|
||||
const ldrmntCoSttnRes: customCoSttnBdst[] = [];
|
||||
const ldrmntHeadList = ldrmntHeadListExport;
|
||||
const ldrmntNodeList = ldrmntNodeListExport;
|
||||
|
||||
const ldrmntCoList = [{
|
||||
ctpvCd: "이거머임",
|
||||
sggCd: "01",
|
||||
dmdCoNm: "회사요",
|
||||
bznmNo: "abc123",
|
||||
dmdInfoPk: "1111",
|
||||
daddr: "서울 강남구",
|
||||
telno: "010-1234-5678"
|
||||
ctpvCd: "서울특별시",
|
||||
sggCd: "종로구",
|
||||
aaaaaa: "서울특별시 종로구",
|
||||
aaaaaa1: "남일문화 (주)",
|
||||
aaaaaa2: "개별입지",
|
||||
aaaaaa3: "",
|
||||
aaaaaa4: "일반",
|
||||
aaaaaa5: "해당없음",
|
||||
aaaaaa6: "임대",
|
||||
aaaaaa7: "19980101",
|
||||
aaaaaa8: "20050202",
|
||||
aaaaaa9: "등록변경",
|
||||
aaaaaa10: "20221207",
|
||||
aaaaaa11: "02-720-1511",
|
||||
aaaaaa12: "0",
|
||||
aaaaaa13: "2",
|
||||
aaaaaa14: "0",
|
||||
aaaaaa15: "0",
|
||||
aaaaaa16: "2",
|
||||
aaaaaa17: "인쇄물",
|
||||
aaaaaa18: "문구, 차드",
|
||||
aaaaaa19: "소기업",
|
||||
aaaaaa20: "도시지역 / 주거지역 / 제2종일반주거지역",
|
||||
aaaaaa21: "대",
|
||||
aaaaaa22: "238",
|
||||
aaaaaa23: "57.12",
|
||||
aaaaaa24: "69.44",
|
||||
aaaaaa25: "126.56",
|
||||
aaaaaa26: "",
|
||||
aaaaaa27: "18111",
|
||||
aaaaaa28: "경 인쇄업 외 2 종",
|
||||
aaaaaa29: "18111, 18113, 18119",
|
||||
aaaaaa30: "10",
|
||||
aaaaaa31: "",
|
||||
aaaaaa32: "1",
|
||||
aaaaaa33: "서울특별시 종로구 자하문로16길 8 (창성동)",
|
||||
aaaaaa34: "서울특별시 종로구 창성동 87-1번지",
|
||||
aaaaaa35: "111102005091210",
|
||||
}]
|
||||
export type ldrmntCoSttnState = {
|
||||
ldrmntCoSttn: {
|
||||
ldrmntCoSttnRes: customCoSttnBdst[];
|
||||
ldrmntCoSttHeadList: CommonTableProps[];
|
||||
ldrmntCoSttNodeList: CommonTableProps[];
|
||||
|
||||
export type customLdrmntBdst = z.infer<typeof ldrmntZod>;
|
||||
|
||||
const ldrmntRes: customLdrmntBdst[] = [];
|
||||
|
||||
export type ldrmntState = {
|
||||
ldrmnt: {
|
||||
ldrmntHeadList: CommonTableProps[];
|
||||
ldrmntNodeList: CommonTableProps[];
|
||||
excelList: [];
|
||||
isInit: boolean;
|
||||
ldrmntCoList: typeof ldrmntCoList;
|
||||
ldrmntRes: customLdrmntBdst[];
|
||||
};
|
||||
};
|
||||
|
||||
type ldrmntCoSttnActions = {
|
||||
type ldrmntActions = {
|
||||
};
|
||||
|
||||
export type ldrmntCoSttnType = ldrmntCoSttnState & ldrmntCoSttnActions;
|
||||
export type ldrmntType = ldrmntState & ldrmntActions;
|
||||
|
||||
export const ldrmntCoSttnStateExport: ldrmntCoSttnState = {
|
||||
ldrmntCoSttn: {
|
||||
ldrmntCoSttHeadList: coSttHeadList,
|
||||
ldrmntCoSttNodeList: coSttNodeList,
|
||||
ldrmntCoSttnRes: ldrmntCoList,
|
||||
export const ldrmntStateExport: ldrmntState = {
|
||||
ldrmnt: {
|
||||
ldrmntHeadList: ldrmntHeadList,
|
||||
ldrmntNodeList: ldrmntNodeList,
|
||||
excelList: [],
|
||||
isInit: false,
|
||||
ldrmntCoList: ldrmntCoList,
|
||||
ldrmntRes: ldrmntRes,
|
||||
},
|
||||
};
|
||||
|
||||
export const ldrmntCoSttnActionsExport: (set: any) => ldrmntCoSttnActions = (
|
||||
export const ldrmntActionsExport: (set: any) => ldrmntActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
ldrmntCoSttnInit: async (code: string | number) => {
|
||||
try{
|
||||
|
||||
set((state: ldrmntCoSttnState) => {
|
||||
return {
|
||||
...state,
|
||||
ldrmntCoSttn: {
|
||||
...state.ldrmntCoSttn,
|
||||
ldrmntCoSttnRes: ldrmntCoSttnRes,
|
||||
isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
ldrmntInit: async (code: string | number) => {
|
||||
try {
|
||||
|
||||
set((state: ldrmntState) => {
|
||||
return {
|
||||
...state,
|
||||
ldrmnt: {
|
||||
...state.ldrmnt,
|
||||
isInit: false,
|
||||
ldrmntCoList: ldrmntCoList,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
ldrmntInsert: async (ldrmntRes: []) => {
|
||||
try {
|
||||
|
||||
const response = await postFectch(
|
||||
`/reuseFc/request`,
|
||||
[]
|
||||
// JSON.stringify(writeRgtrAndMdfr([ldrmntRes]))
|
||||
);
|
||||
|
||||
return set((state: ldrmntState) => ({
|
||||
...state,
|
||||
ldrmnt: {
|
||||
...state.ldrmnt,
|
||||
ldrmntRes: response.data,
|
||||
isInit: false,
|
||||
},
|
||||
}));
|
||||
} catch (error) {
|
||||
console.error("Error updating ldrmnt:", error);
|
||||
}
|
||||
},
|
||||
fileDelete: async (atflCd: string) => {
|
||||
try {
|
||||
const response = await deleteFectch(
|
||||
`/attach-service/api/v1/atfl/attachments/atflCd//${atflCd}`,
|
||||
undefined,
|
||||
fetchType.CS
|
||||
);
|
||||
|
||||
console.log("File deleted successfully:", response);
|
||||
return set((state: ldrmntState) => ({
|
||||
...state,
|
||||
ldrmnt: {
|
||||
...state.ldrmnt,
|
||||
isInit: false,
|
||||
},
|
||||
}));
|
||||
} catch (error) {
|
||||
console.error("Error deleting file:", error);
|
||||
}
|
||||
},
|
||||
fileDownLoad: async (atflCd: string) => {
|
||||
try {
|
||||
const response = await getFetch(
|
||||
fetchType.CS,
|
||||
`/attach-service/api/v1/atflcd/download/${atflCd}`
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Error downloading file: ${response.statusText}`);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error downloading file:", error);
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,6 @@ import {
|
||||
import { rswtChkStateExport, rswtChkSttnActionsExport, type rswtChkSttnState, type rswtChkSttnType } from "./prfmncSttn/chkgdnSttn/rswtChkgdnSttn";
|
||||
import { pbnstSttnActionsExport, pbnstSttnStateExport, type pbnstSttnState, type pbnstSttnType } from "./ruseFcltMng/fcltSttn/pbnstSttn";
|
||||
import { coSttnActionsExport, coSttnStateExport, type coSttnState, type coSttnType } from "./matDmd/coSttn"; // 옮겨야함
|
||||
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";
|
||||
@@ -97,6 +96,7 @@ import { ruseCaseActionsExport, ruseCaseStateExport, type ruseCaseType, type rus
|
||||
import { rainStatActionsExport, rainStatExport, type rainStatState, type rainStatType } from "./stats/rainStat";
|
||||
import { type rswtStatType, type rswtStatState, rswtStatExport, rswtStatActionsExport } from "./stats/rswtStat";
|
||||
import { matStatActionsExport, matStatExport, type matStatState, type matStatType } from "./stats/matStat";
|
||||
import { ldrmntActionsExport, ldrmntStateExport, type ldrmntState, type ldrmntType } from "./matDmd/ldrmntCoSttn";
|
||||
|
||||
export type WrStore = comCodeType &
|
||||
pubFacType &
|
||||
@@ -115,7 +115,7 @@ export type WrStore = comCodeType &
|
||||
pbnstSttnType&
|
||||
comFcltActions&comFcltState&
|
||||
coSttnType& // 옮겨야함
|
||||
ldrmntCoSttnType& // 옮겨야함
|
||||
ldrmntType& // 옮겨야함
|
||||
pbnstPrfmncType&
|
||||
coRvwType&
|
||||
ruseHstryType&
|
||||
@@ -144,7 +144,7 @@ export const StoreZus = (
|
||||
rswtChkSttnState &
|
||||
pbnstSttnState&
|
||||
coSttnState& // 옮겨야함
|
||||
ldrmntCoSttnState& // 옮겨야함
|
||||
ldrmntState& // 옮겨야함
|
||||
pbnstPrfmncState&
|
||||
coRvwState&
|
||||
ruseHstryState&
|
||||
@@ -171,7 +171,7 @@ export const StoreZus = (
|
||||
...rswtChkStateExport,
|
||||
...pbnstSttnStateExport,
|
||||
...coSttnStateExport, // 옮겨야함
|
||||
...ldrmntCoSttnStateExport, // 옮겨야함
|
||||
...ldrmntStateExport, // 옮겨야함
|
||||
...pbnstPrfmncStateExport,
|
||||
...coRvwStateExport,
|
||||
...ruseHstryStateExport,
|
||||
@@ -209,7 +209,7 @@ export const StoreZus = (
|
||||
...rswtChkSttnActionsExport(set),
|
||||
...pbnstSttnActionsExport(set),
|
||||
...coSttnActionsExport(set), // 옮겨야함
|
||||
...ldrmntCoSttnActionsExport(set), // 옮겨야함
|
||||
...ldrmntActionsExport(set), // 옮겨야함
|
||||
...pbnstPrfmncActionsExport(set),
|
||||
...coRvwActionsExport(set),
|
||||
...ruseHstryActionsExport(set),
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
"use client"
|
||||
|
||||
import { btnClass } from "@/app/store/common/code"
|
||||
import { drgtDetailHeadListExport } from "@/app/store/matDmd/drgtSttn/headList"
|
||||
import { ContentsDiv, Title, UiTable } from "@common/business_components/ui"
|
||||
import ListDiv from "@common/business_components/ui/list_div"
|
||||
import { Button } from "@common/components/ui"
|
||||
|
||||
export default function DrgtDetailModal() {
|
||||
return (
|
||||
<>
|
||||
<ContentsDiv>
|
||||
<div className="grid grid-cols-4 gap-4 ">
|
||||
<div className="col-span-4">
|
||||
<Title title={"우리동네가뭄 상세내용"} />
|
||||
<div className="w-2/12 mx-5 flex flex-col items-center justify-center space-x-2 ">
|
||||
<div className="flex flex-row space-x-2">
|
||||
<Button
|
||||
size={"sm"}
|
||||
className={`${btnClass} green`}
|
||||
onClick={() => { }}
|
||||
>
|
||||
다운로드
|
||||
</Button>
|
||||
</div>
|
||||
<div className="grid grid-cols-6 gap-4 ">
|
||||
<div className="col-span-6">
|
||||
<ListDiv>
|
||||
<UiTable
|
||||
headName={[]}
|
||||
tableData={[]}
|
||||
headlist={drgtDetailHeadListExport}
|
||||
pageSize={10}
|
||||
total={10000}
|
||||
cellClick={(index: number | undefined, headId: string) => { }}
|
||||
onPageChange={() => { }}
|
||||
></UiTable>
|
||||
</ListDiv>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentsDiv>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -94,7 +94,6 @@ export function BdstReg<T extends MoType>({ moType }: BdstRegProps<T>) {
|
||||
useEffect(()=>{
|
||||
setbdstTable([]) // 초기화 작업
|
||||
},[])
|
||||
const nodeList = headMakeColSpan(bdst.moUpHeadList);
|
||||
return (
|
||||
<>
|
||||
<div className="grid grid-cols-12 gap-4 mt-4 items-center">
|
||||
@@ -135,7 +134,6 @@ export function BdstReg<T extends MoType>({ moType }: BdstRegProps<T>) {
|
||||
onPageChange={function (page: number): void {
|
||||
throw new Error("Function not implemented.");
|
||||
}}>
|
||||
{nodeList}
|
||||
</UiTable>
|
||||
</div>
|
||||
</ScrollArea>
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { pbnPrfRegExcelZod } from "@/app/store/prfmncReg/pbnstPrfmncReg/headList";
|
||||
import type { FcPrfType, PrfType } from "@/app/store/prfmncReg/pbnstPrfmncReg/type";
|
||||
import { yearOptions } from "@/components/lib/func/commom";
|
||||
import { FileUpload, Form, FormField, FormUi, SelectBox, Title } from "@common/business_components/ui";
|
||||
import { Button, Input } from "@common/components/ui";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import type { z } from "zod";
|
||||
|
||||
export default function LdrmntExcelModal({ data }: { data: FcPrfType }) {
|
||||
const { prfmnRegData } = useWrStore((state) => state);
|
||||
const [excelData, setExcelData] = useState<PrfType[]>();
|
||||
const form = useForm<z.infer<typeof pbnPrfRegExcelZod>>({
|
||||
resolver: zodResolver(pbnPrfRegExcelZod),
|
||||
defaultValues: {
|
||||
ym: String(new Date().getFullYear()),
|
||||
},
|
||||
});
|
||||
const onSubmit = (values: z.infer<typeof pbnPrfRegExcelZod>) => {
|
||||
if (excelData) {
|
||||
prfmnRegData(excelData as unknown as PrfType);
|
||||
}
|
||||
};
|
||||
const [files, setFiles] = useState<File[] | null>(null);
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)}>
|
||||
<div>
|
||||
<Title title={"잠재수요처 등록"}></Title>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<h3 className="text-2xl font-bold text-gray-900 mt-1 ml-7">
|
||||
{"잠재수요처 파일"}
|
||||
</h3>
|
||||
|
||||
<Button className="" type="submit" size={"sm"}>
|
||||
저장
|
||||
</Button>
|
||||
</div>
|
||||
<div className="mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="file"
|
||||
render={({ field }) => (
|
||||
<FormUi label="">
|
||||
<FileUpload
|
||||
files={files || []}
|
||||
setFiles={(files: File[] | null) => {
|
||||
if (files) setFiles(files);
|
||||
}}
|
||||
fileTypes="xlsx"
|
||||
></FileUpload>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
}
|
||||
@@ -1,30 +1,824 @@
|
||||
"use client";
|
||||
import { useWrStore } from "@/app/store";
|
||||
import type { CommonTableProps } from "@/app/store/common/type/header";
|
||||
import { Title } from "@common/business_components/ui";
|
||||
import { ldrmntZod, type customLdrmntBdst } from "@/app/store/matDmd/ldrmntCoSttn";
|
||||
import { rainZod, selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import { handleCommaNumberChange, formatCommaNumber } from "@/components/lib/func/commom";
|
||||
import { DatePicker, Form, FormField, FormUi, ScrollArea, Title, UiTable } from "@common/business_components/ui";
|
||||
import { Button, Input } from "@common/components/ui";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import type { z } from "zod";
|
||||
|
||||
export default function SttnDetailModal(
|
||||
{formObj,}: {formObj: any;}) {
|
||||
const { code, rainSttn, rswtSttn, rainSttnChkSearch } = useWrStore(
|
||||
(state) => state
|
||||
);
|
||||
const [detailData, setDetailData] = useState({
|
||||
head: [] as CommonTableProps[],
|
||||
node:[] as CommonTableProps[],
|
||||
data: {} as any,
|
||||
export default function SttnDetailModal({
|
||||
formObj,
|
||||
}: {
|
||||
formObj: any;
|
||||
}) {
|
||||
const defaultValues: z.infer<typeof ldrmntZod> = ldrmntZod.parse({});
|
||||
const form = useForm<z.infer<typeof ldrmntZod>>({
|
||||
resolver: zodResolver(ldrmntZod),
|
||||
defaultValues: defaultValues,
|
||||
});
|
||||
|
||||
useEffect(() =>{
|
||||
setDetailData({data:[] , head:[], node:[]})
|
||||
const onSubmit = (values: z.infer<typeof ldrmntZod>) => {
|
||||
|
||||
},[])
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (ldrmntZod) form.reset(formObj);
|
||||
|
||||
console.log("이거", formObj)
|
||||
}, [formObj]);
|
||||
|
||||
return (
|
||||
|
||||
<div>
|
||||
<Title title="잠재수요처 상세정보"></Title>
|
||||
|
||||
<ScrollArea className="h-[85vh]">
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)}>
|
||||
<div className="grid grid-cols-12 flex items-center card-header">
|
||||
<h1 className="text-2xl font-medium text-label col-span-10">
|
||||
잠재수요처 상세정보
|
||||
</h1>
|
||||
<Button type="submit" className="col-start-12 col-span-1" size={"sm"}>
|
||||
저장
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-4 gap-2 mt-4">
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa1"
|
||||
render={({ field }) => (
|
||||
<FormUi label="회사명">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="ctpvCd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="시도">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-4 gap-2 mt-4">
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="sggCd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="시군구">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa"
|
||||
render={({ field }) => (
|
||||
<FormUi label="관리기관">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-4 gap-2 mt-4">
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa2"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공장구분">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa3"
|
||||
render={({ field }) => (
|
||||
<FormUi label="단지명">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa4"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설립구분">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa5"
|
||||
render={({ field }) => (
|
||||
<FormUi label="입주형태">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa6"
|
||||
render={({ field }) => (
|
||||
<FormUi label="보유구분">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-4 gap-2 mt-4">
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa7"
|
||||
render={({ field }) => (
|
||||
<FormUi label="최초승인일">
|
||||
<DatePicker
|
||||
mode="single"
|
||||
field={{
|
||||
value:
|
||||
field.value && !isNaN(new Date(field.value).getTime())
|
||||
? new Date(field.value)
|
||||
: new Date(), // Provide a default Date value
|
||||
onChange: (date) => field.onChange(date),
|
||||
}}
|
||||
selectClass={"w-full"}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa8"
|
||||
render={({ field }) => (
|
||||
<FormUi label="최초등록일">
|
||||
<DatePicker
|
||||
mode="single"
|
||||
field={{
|
||||
value:
|
||||
field.value && !isNaN(new Date(field.value).getTime())
|
||||
? new Date(field.value)
|
||||
: new Date(), // Provide a default Date value
|
||||
onChange: (date) => field.onChange(date),
|
||||
}}
|
||||
selectClass={"w-full"}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa9"
|
||||
render={({ field }) => (
|
||||
<FormUi label="등록구분">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa10"
|
||||
render={({ field }) => (
|
||||
<FormUi label="등록일">
|
||||
<DatePicker
|
||||
mode="single"
|
||||
field={{
|
||||
value:
|
||||
field.value && !isNaN(new Date(field.value).getTime())
|
||||
? new Date(field.value)
|
||||
: new Date(), // Provide a default Date value
|
||||
onChange: (date) => field.onChange(date),
|
||||
}}
|
||||
selectClass={"w-full"}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa11"
|
||||
render={({ field }) => (
|
||||
<FormUi label="전화번호">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="grid grid-cols-5 gap-2 mt-4">
|
||||
<div className="col-span-1">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa12"
|
||||
render={({ field }) => (
|
||||
<FormUi label="남자종업원">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-1">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa13"
|
||||
render={({ field }) => (
|
||||
<FormUi label="여자종업원">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-1">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa14"
|
||||
render={({ field }) => (
|
||||
<FormUi label="외국인남자종업원">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-1">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa15"
|
||||
render={({ field }) => (
|
||||
<FormUi label="외국인여자종업원">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-1">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa16"
|
||||
render={({ field }) => (
|
||||
<FormUi label="종업원합계">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa17"
|
||||
render={({ field }) => (
|
||||
<FormUi label="생산품">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa18"
|
||||
render={({ field }) => (
|
||||
<FormUi label="원자재">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa19"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공장규모">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa20"
|
||||
render={({ field }) => (
|
||||
<FormUi label="용도지역">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa21"
|
||||
render={({ field }) => (
|
||||
<FormUi label="지목">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa22"
|
||||
render={({ field }) => (
|
||||
<FormUi label="용지면적">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa23"
|
||||
render={({ field }) => (
|
||||
<FormUi label="제조시설면적">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa24"
|
||||
render={({ field }) => (
|
||||
<FormUi label="부대시설면적">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa25"
|
||||
render={({ field }) => (
|
||||
<FormUi label="건축면적">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa26"
|
||||
render={({ field }) => (
|
||||
<FormUi label="지식산업센터명">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa27"
|
||||
render={({ field }) => (
|
||||
<FormUi label="대표업종">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa28"
|
||||
render={({ field }) => (
|
||||
<FormUi label="업종명">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa29"
|
||||
render={({ field }) => (
|
||||
<FormUi label="업종코드">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa30"
|
||||
render={({ field }) => (
|
||||
<FormUi label="차수">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa31"
|
||||
render={({ field }) => (
|
||||
<FormUi label="법인주소">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-4 gap-2 mt-4">
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa32"
|
||||
render={({ field }) => (
|
||||
<FormUi label="필지수">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa35"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공장관리번호">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-4 gap-2 mt-4">
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa33"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공장주소">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa34"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공장주소_지번">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
}}
|
||||
value={field.value}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</Form>
|
||||
</ScrollArea>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user