Merge commit '2471b8df64d9b42a8718648443e6a6879e6b2e05' into iipbs/wr/hasuReg
This commit is contained in:
@@ -2,15 +2,15 @@
|
||||
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { btnClass } from "@/app/store/common/code";
|
||||
import type { customLdrmntBdst } from "@/app/store/matDmd/ldrmntCoSttn";
|
||||
import { type customLdrmntBdst } from "@/app/store/matDmd/ldrmntCoSttn";
|
||||
import { ldrmntNodeListExport } from "@/app/store/matDmd/ldrmntCoSttn/headList";
|
||||
import {
|
||||
excelDownload,
|
||||
getCity
|
||||
getCity,
|
||||
tableData
|
||||
} from "@/components/lib/func/commom";
|
||||
import CoRegExcel from "@/components/ui/modal/coReg/coRegExcel/coRegExcel";
|
||||
import CoRegExcel from "@/components/ui/modal/coReg/coRegExcel/coRegExcelModal";
|
||||
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,
|
||||
@@ -27,21 +27,25 @@ import {
|
||||
} from "@common/business_components/ui";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { useCallback, useRef, useState } from "react";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
|
||||
export default function LdrmntCoSttn() {
|
||||
const { code, ldrmnt } = useWrStore(
|
||||
const { code, ldrmnt, ldrmntInit, ldrmntSearch, } = useWrStore(
|
||||
(state) => state
|
||||
);
|
||||
const { ldrmntCoList } = ldrmnt;
|
||||
const { ldrmntRes } = 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 [bdstTable, setBdstTable] = useState<customLdrmntBdst[]>();
|
||||
const [codeData, setCodeData] = useState<string>();
|
||||
const [searchTxt, setSearchTxt] = useState<string>();
|
||||
const [bdstChgProps, setBdstChgProps] = useState<{
|
||||
isOpen: boolean;
|
||||
data: customLdrmntBdst[];
|
||||
}>({ isOpen: false, data: [] });
|
||||
const excelClick = useCallback(() => {
|
||||
excelDownload(
|
||||
[[]],
|
||||
@@ -52,15 +56,14 @@ export default function LdrmntCoSttn() {
|
||||
);
|
||||
}, []);
|
||||
|
||||
const [isExcelOpen, setIsExcelOPen] = useState<{
|
||||
isModal: boolean;
|
||||
}>({ isModal: false});
|
||||
const [isExcelOpen, setIsExcelOpen] = useState<{
|
||||
isModal: boolean;
|
||||
}>({ isModal: false });
|
||||
|
||||
const cellClick = (index: number | undefined, headId: string) => {
|
||||
if (index !== undefined) {
|
||||
setDetailModal({ isOpen: true, data: ldrmntCoList[index] });
|
||||
setDetailModal({ isOpen: true, data: ldrmntRes[index] });
|
||||
}
|
||||
console.log("detailModal", detailModal);
|
||||
|
||||
}
|
||||
|
||||
@@ -72,10 +75,28 @@ export default function LdrmntCoSttn() {
|
||||
};
|
||||
|
||||
const getSgg = (val: string | number) => {
|
||||
console.log(val);
|
||||
setObjSearch({ ...objSearch, sgg: String(val) })
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!ldrmnt.isInit) {
|
||||
ldrmntInit();
|
||||
}
|
||||
}, [ldrmnt.isInit, ldrmntInit]);
|
||||
|
||||
useEffect(() => {
|
||||
const data = tableData(ldrmntRes, { code });
|
||||
const tbData = Array.isArray(data)
|
||||
? data.map((item: customLdrmntBdst) => ({
|
||||
...item,
|
||||
ctpvCd: item.fctryAddr.split(" ")[0] || "",
|
||||
sggCd: item.fctryAddr.split(" ")[1] || ""
|
||||
}))
|
||||
: [];
|
||||
|
||||
setBdstTable(tbData);
|
||||
}, [ldrmntRes, code]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ContentsDiv>
|
||||
@@ -89,7 +110,7 @@ export default function LdrmntCoSttn() {
|
||||
className="col-span-2 w-1/6 h-full text-2xl"
|
||||
label="시도"
|
||||
selectClass={""}
|
||||
selectArray={code.cityCd || []}
|
||||
selectArray={code.cityCd}
|
||||
onSelectValue={getSelCity}
|
||||
/>
|
||||
<SelectBox
|
||||
@@ -102,8 +123,9 @@ export default function LdrmntCoSttn() {
|
||||
<SearchInput
|
||||
className={"text-2xl ml-4"}
|
||||
label="회사명"
|
||||
textValue={""}
|
||||
textValue={searchTxt || ""}
|
||||
setText={(e) => {
|
||||
setSearchTxt(e);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
@@ -113,15 +135,41 @@ export default function LdrmntCoSttn() {
|
||||
<div className="flex flex-row space-x-2">
|
||||
<Button
|
||||
size={"sm"}
|
||||
onClick={(e) => { }}
|
||||
onClick={(e) => {
|
||||
|
||||
let cityTxt = ''
|
||||
let sggTxt = ''
|
||||
|
||||
if (objSearch?.city.toString().length > 0) {
|
||||
cityTxt = code.cityCd.find((item) => item.val === objSearch?.city)?.text ?? '';
|
||||
}
|
||||
|
||||
if (objSearch?.sgg.toString().length > 1) {
|
||||
sggTxt = code.sggCd.find((item) => item.val === objSearch?.sgg)?.text ?? '';
|
||||
}
|
||||
|
||||
let url = ""
|
||||
|
||||
if (sggTxt !== "0") {
|
||||
url = cityTxt + " " + sggTxt
|
||||
} else {
|
||||
url = cityTxt
|
||||
}
|
||||
|
||||
|
||||
if (url) {
|
||||
if(cityTxt === '') url = "0";
|
||||
ldrmntSearch(url, searchTxt || "");
|
||||
}
|
||||
}}
|
||||
>
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
size={"sm"}
|
||||
className={btnClass}
|
||||
onClick={() => {
|
||||
setIsExcelOPen({ ...isExcelOpen, isModal: true });
|
||||
onClick={() => {
|
||||
setIsExcelOpen({ isModal: true });
|
||||
}}
|
||||
>
|
||||
엑셀등록
|
||||
@@ -153,7 +201,7 @@ export default function LdrmntCoSttn() {
|
||||
<ListDiv className="min-w-max">
|
||||
<UiTable
|
||||
headName={[]}
|
||||
tableData={ldrmntCoList || []}
|
||||
tableData={bdstTable || []}
|
||||
headlist={ldrmntNodeListExport}
|
||||
pageSize={20}
|
||||
total={10000}
|
||||
@@ -173,19 +221,14 @@ export default function LdrmntCoSttn() {
|
||||
/>
|
||||
|
||||
<UiModal
|
||||
bodyClass={"w-[40vw] max-w-none"}
|
||||
open={isRegExcel}
|
||||
body={<CoRegExcel></CoRegExcel>}
|
||||
onOpenChange={setIsRegExcel}
|
||||
/>
|
||||
<UiModal
|
||||
bodyClass={""}
|
||||
body={<LdrmntExcelModal data={isExcelOpen.data}></LdrmntExcelModal>}
|
||||
open={isExcelOpen.isModal}
|
||||
onOpenChange={() => {
|
||||
setIsExcelOPen({ isModal: false, });
|
||||
setIsExcelOpen({ isModal: !isExcelOpen.isModal })
|
||||
}}
|
||||
></UiModal>
|
||||
bodyClass={"w-[40vw] max-w-none"}
|
||||
body={<CoRegExcel />}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentsDiv>
|
||||
|
||||
@@ -632,13 +632,13 @@ export default function PbnstPrfmncSttn() {
|
||||
|
||||
<div className="flex">
|
||||
<div className="w-1/3">
|
||||
<MainChart chartConfig={chartConfig} chartData={chartData} chartTitle={"장내·외 용수 총 실적"} chartForm={"daughnut"} />
|
||||
<MainChart chartConfig={chartConfig} chartData={chartData} chartTitle={"장내·외 용수 총 실적"} chartForm={CHART_FORM.DN} />
|
||||
</div>
|
||||
<div className="w-1/3">
|
||||
<MainChart chartConfig={dnInChartConfig} chartData={dnInUsage} chartTitle={"장내용수 실적"} chartForm={"daughnut"} />
|
||||
<MainChart chartConfig={dnInChartConfig} chartData={dnInUsage} chartTitle={"장내용수 실적"} chartForm={CHART_FORM.DN} />
|
||||
</div>
|
||||
<div className="w-1/3">
|
||||
<MainChart chartConfig={dnOutChartConfig} chartData={dnOutUsage} chartTitle={"장외용수 실적"} chartForm={"daughnut"} />
|
||||
<MainChart chartConfig={dnOutChartConfig} chartData={dnOutUsage} chartTitle={"장외용수 실적"} chartForm={CHART_FORM.DN} />
|
||||
</div>
|
||||
</div>
|
||||
<h1 className="">장내·외 월별 하수재이용실적 현황</h1>
|
||||
|
||||
@@ -10,7 +10,7 @@ export const sttnHeadListType = z.array(
|
||||
);
|
||||
|
||||
export const coRegExcel = z.object({
|
||||
file: z.instanceof(File)
|
||||
file: z.any()
|
||||
});
|
||||
|
||||
export const coSttHeadListExport: z.infer<typeof sttnHeadListType> = [
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
import { TEST_UUID } from "../../ruseFcltMng/fcltReg/rainReg";
|
||||
|
||||
type nameMap = {
|
||||
[key: string]: string;
|
||||
}
|
||||
|
||||
export const names: nameMap = {
|
||||
"시도": "ctpvCd",
|
||||
"시군구명": "sggCd",
|
||||
"관리기관": "mngInst",
|
||||
"회사명": "dmdCoNm",
|
||||
"공장구분": "fctrySe",
|
||||
"단지명": "cmpxNm",
|
||||
"설립구분": "fndnSe",
|
||||
"입주형태": "mvnShp",
|
||||
"보유구분": "hldSe",
|
||||
"최초승인일": "frstAprvYmd",
|
||||
"최초등록일": "frstRegYmd",
|
||||
"등록구분": "regSe",
|
||||
"등록일": "regYmd",
|
||||
"전화번호": "telno",
|
||||
"남자종업원": "maleEmpCnt",
|
||||
"여자종업원": "fmaleEmpCnt",
|
||||
"외국인남자종업원": "frgnrMaleEmpCnt",
|
||||
"외국인여자종업원": "frgnrFmaleEmpCnt",
|
||||
"종업원합계": "totalEmpCnt",
|
||||
"생산품": "prdctnItem",
|
||||
"원자재": "splyMtrl",
|
||||
"공장규모": "fctryScl",
|
||||
"용도지역": "usgRgn",
|
||||
"지목": "ldcg",
|
||||
"용지면적": "usgRgnArea",
|
||||
"제조시설면적": "mnftrFcltArea",
|
||||
"부대시설면적": "sbsdFcltArea",
|
||||
"건축면적": "archArea",
|
||||
"지식산업센터명": "knwlIndstCntrNm",
|
||||
"대표업종": "rprsTpbiz",
|
||||
"업종명": "tpbizNm",
|
||||
"업종코드": "tpbizCd",
|
||||
"차수": "cycl",
|
||||
"법인주소": "corpAddr",
|
||||
"필지수": "esntlIdx",
|
||||
"공장주소": "fctryAddr",
|
||||
"공장주소_지번": "fctryLotnoAddr",
|
||||
"공장관리번호": "fctryMngNo",
|
||||
}
|
||||
|
||||
|
||||
export const excelToLdrmntData = (excelData: File[],) => {
|
||||
|
||||
const ldrmntData = Object.values(excelData);
|
||||
const data = ldrmntData.map((item) => {
|
||||
|
||||
return ({
|
||||
...(item as object),
|
||||
rgtr: TEST_UUID,
|
||||
mdfr: TEST_UUID,
|
||||
})
|
||||
})
|
||||
return data;
|
||||
};
|
||||
@@ -1,5 +1,47 @@
|
||||
import { z } from "zod";
|
||||
import type { CommonTableProps } from "../../common/type/header";
|
||||
|
||||
export const ldrmntZod = z.object({
|
||||
ctpvCd: z.string().default(''),
|
||||
sggCd: z.string().default(''),
|
||||
mngInst: z.string().default('').nullish(),
|
||||
dmdCoNm: z.string().default(''),
|
||||
fctrySe: z.string().default(''),
|
||||
cmpxNm: z.string().default(''),
|
||||
fndnSe: z.string().default(''),
|
||||
mvnShp: z.string().default(''),
|
||||
hldSe: z.string().default(''),
|
||||
frstAprvYmd: z.string().default(''),
|
||||
frstRegYmd: z.string().default(''),
|
||||
regSe: z.string().default(''),
|
||||
regYmd: z.string().default(''),
|
||||
telno: z.string().default(''),
|
||||
maleEmpCnt: z.number().default(0),
|
||||
fmaleEmpCnt: z.number().default(0),
|
||||
frgnrMaleEmpCnt: z.number().default(0),
|
||||
frgnrFmaleEmpCnt: z.number().default(0),
|
||||
totalEmpCnt: z.number().default(0),
|
||||
prdctnItem: z.string().default(''),
|
||||
splyMtrl: z.string().default(''),
|
||||
fctryScl: z.string().default(''),
|
||||
usgRgn: z.string().default(''),
|
||||
ldcg: z.string().default(''),
|
||||
usgRgnArea: z.number().default(0),
|
||||
mnftrFcltArea: z.number().default(0),
|
||||
sbsdFcltArea: z.number().default(0),
|
||||
archArea: z.number().default(0),
|
||||
knwlIndstCntrNm: z.string().default(''),
|
||||
rprsTpbiz: z.string().default(''),
|
||||
tpbizNm: z.string().default(''),
|
||||
tpbizCd: z.string().default(''),
|
||||
cycl: z.number().default(0),
|
||||
corpAddr: z.string().default(''),
|
||||
esntlIdx: z.number().default(0),
|
||||
fctryAddr: z.string().default(''),
|
||||
fctryLotnoAddr: z.string().default(''),
|
||||
fctryMngNo: z.string().default(''),
|
||||
})
|
||||
|
||||
export const ldrmntHeadListExport: CommonTableProps[] = [
|
||||
{
|
||||
id: "ctpvCd",
|
||||
@@ -18,7 +60,7 @@ export const ldrmntHeadListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa1",
|
||||
id: "dmdCoNm",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -26,7 +68,7 @@ export const ldrmntHeadListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa33",
|
||||
id: "fctryAddr",
|
||||
title: "공장주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -34,7 +76,7 @@ export const ldrmntHeadListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa35",
|
||||
id: "fctryMngNo",
|
||||
title: "공장관리번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -42,7 +84,7 @@ export const ldrmntHeadListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa11",
|
||||
id: "telno",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -69,7 +111,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa",
|
||||
id: "mngInst",
|
||||
title: "관리기관",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -77,7 +119,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa1",
|
||||
id: "dmdCoNm",
|
||||
title: "회사명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -85,7 +127,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa2",
|
||||
id: "fctrySe",
|
||||
title: "공장구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -93,7 +135,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa3",
|
||||
id: "cmpxNm",
|
||||
title: "단지명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -101,7 +143,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa4",
|
||||
id: "fndnSe",
|
||||
title: "설립구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -109,7 +151,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa5",
|
||||
id: "mvnShp",
|
||||
title: "입주형태",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -117,7 +159,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa6",
|
||||
id: "hldSe",
|
||||
title: "보유구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -125,7 +167,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa7",
|
||||
id: "frstAprvYmd",
|
||||
title: "최초승인일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -133,7 +175,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa8",
|
||||
id: "frstRegYmd",
|
||||
title: "최초등록일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -141,7 +183,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa9",
|
||||
id: "regSe",
|
||||
title: "등록구분",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -149,7 +191,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa10",
|
||||
id: "regYmd",
|
||||
title: "등록일",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -157,7 +199,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa11",
|
||||
id: "telno",
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -165,7 +207,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa12",
|
||||
id: "maleEmpCnt",
|
||||
title: "남자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -173,7 +215,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa13",
|
||||
id: "fmaleEmpCnt",
|
||||
title: "여자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -181,7 +223,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa14",
|
||||
id: "frgnrMaleEmpCnt",
|
||||
title: "외국인남자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -189,7 +231,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa15",
|
||||
id: "frgnrFmaleEmpCnt",
|
||||
title: "외국인여자종업원",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -197,7 +239,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa16",
|
||||
id: "totalEmpCnt",
|
||||
title: "종업원합계",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -205,7 +247,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa17",
|
||||
id: "prdctnItem",
|
||||
title: "생산품",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -213,7 +255,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa18",
|
||||
id: "splyMtrl",
|
||||
title: "원자재",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -221,7 +263,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa19",
|
||||
id: "fctryScl",
|
||||
title: "공장규모",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -229,7 +271,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa20",
|
||||
id: "usgRgn",
|
||||
title: "용도지역",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -237,7 +279,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa21",
|
||||
id: "ldcg",
|
||||
title: "지목",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -245,7 +287,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa22",
|
||||
id: "usgRgnArea",
|
||||
title: "용지면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -253,7 +295,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa23",
|
||||
id: "mnftrFcltArea",
|
||||
title: "제조시설면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -261,7 +303,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa24",
|
||||
id: "sbsdFcltArea",
|
||||
title: "부대시설면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -269,7 +311,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa25",
|
||||
id: "archArea",
|
||||
title: "건축면적",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -277,7 +319,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa26",
|
||||
id: "knwlIndstCntrNm",
|
||||
title: "지식산업센터명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -285,7 +327,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa27",
|
||||
id: "rprsTpbiz",
|
||||
title: "대표업종",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -293,7 +335,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa28",
|
||||
id: "tpbizNm",
|
||||
title: "업종명",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -301,7 +343,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa29",
|
||||
id: "tpbizCd",
|
||||
title: "업종코드",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -309,7 +351,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa30",
|
||||
id: "cycl",
|
||||
title: "차수",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -317,7 +359,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa31",
|
||||
id: "corpAddr",
|
||||
title: "법인주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -325,7 +367,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa32",
|
||||
id: "esntlIdx",
|
||||
title: "필지수",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -333,7 +375,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa33",
|
||||
id: "fctryAddr",
|
||||
title: "공장주소",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -341,7 +383,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa34",
|
||||
id: "fctryLotnoAddr",
|
||||
title: "공장주소_지번",
|
||||
visible: true,
|
||||
row: 1,
|
||||
@@ -349,7 +391,7 @@ export const ldrmntNodeListExport: CommonTableProps[] = [
|
||||
colSpan: 1,
|
||||
},
|
||||
{
|
||||
id: "aaaaaa35",
|
||||
id: "fctryMngNo",
|
||||
title: "공장관리번호",
|
||||
visible: true,
|
||||
row: 1,
|
||||
|
||||
@@ -1,94 +1,15 @@
|
||||
import type { CommonTableProps } from "@/app/store/common/type/header";
|
||||
import { fetchType, getFetch, postFectch } from "@/components/lib/api";
|
||||
import { ToastFormUi } from "@/components/ui/toast/toastFromUi";
|
||||
import { z } from "zod";
|
||||
import { ldrmntHeadListExport, ldrmntNodeListExport } from "./headList";
|
||||
import { deleteFectch, fetchType, getFetch, postFectch } from "@/components/lib/api";
|
||||
import { ldrmntHeadListExport, ldrmntNodeListExport, ldrmntZod } from "./headList";
|
||||
|
||||
|
||||
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 ldrmntHeadList = ldrmntHeadListExport;
|
||||
const ldrmntNodeList = ldrmntNodeListExport;
|
||||
|
||||
const ldrmntCoList = [{
|
||||
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 customLdrmntBdst = z.infer<typeof ldrmntZod>;
|
||||
|
||||
const ldrmntRes: customLdrmntBdst[] = [];
|
||||
@@ -99,12 +20,14 @@ export type ldrmntState = {
|
||||
ldrmntNodeList: CommonTableProps[];
|
||||
excelList: [];
|
||||
isInit: boolean;
|
||||
ldrmntCoList: typeof ldrmntCoList;
|
||||
ldrmntRes: customLdrmntBdst[];
|
||||
};
|
||||
};
|
||||
|
||||
type ldrmntActions = {
|
||||
ldrmntRegData: (data: any[]) => void,
|
||||
ldrmntInit: () => void;
|
||||
ldrmntSearch: (sggCd: string, coNm: string) => void;
|
||||
};
|
||||
|
||||
export type ldrmntType = ldrmntState & ldrmntActions;
|
||||
@@ -115,7 +38,6 @@ export const ldrmntStateExport: ldrmntState = {
|
||||
ldrmntNodeList: ldrmntNodeList,
|
||||
excelList: [],
|
||||
isInit: false,
|
||||
ldrmntCoList: ldrmntCoList,
|
||||
ldrmntRes: ldrmntRes,
|
||||
},
|
||||
};
|
||||
@@ -124,78 +46,83 @@ export const ldrmntActionsExport: (set: any) => ldrmntActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
ldrmntInit: async (code: string | number) => {
|
||||
ldrmntInit: async () => {
|
||||
try {
|
||||
const ldrmntRes = await getFetch(
|
||||
fetchType.WR,
|
||||
`/reuseFc/request/temp/1/20/0`
|
||||
);
|
||||
return set((state: ldrmntState) => ({
|
||||
...state,
|
||||
rain: {
|
||||
...state.ldrmnt,
|
||||
ldrmntRes: ldrmntRes,
|
||||
isInit: false,
|
||||
},
|
||||
}));
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
ldrmntRegData: async (data) => {
|
||||
try {
|
||||
|
||||
const response = await postFectch(
|
||||
"/reuseFc/request/temp",
|
||||
data,
|
||||
fetchType.WR
|
||||
);
|
||||
|
||||
console.log('response ', response)
|
||||
|
||||
if (response.status === 200) {
|
||||
ToastFormUi({
|
||||
body: "잠재수요처 등록이 완료되었습니다. ",
|
||||
title: "잠재수요처 등록",
|
||||
});
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
ToastFormUi({
|
||||
body: "잠재수요처 등록이 실패하였습니다. ",
|
||||
title: "잠재수요처 등록",
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
ldrmntSearch: async (sggCd: string, coNm: string) => {
|
||||
let searchUrl = "";
|
||||
console.log("인덱스", sggCd)
|
||||
|
||||
if (sggCd !== "") {
|
||||
if (coNm !== "") {
|
||||
searchUrl = `/reuseFc/request/temp/1/20/${sggCd}/${coNm}`;
|
||||
} else {
|
||||
searchUrl = `/reuseFc/request/temp/1/20/${sggCd}`;
|
||||
}
|
||||
}
|
||||
console.log("searchUrl", searchUrl)
|
||||
|
||||
|
||||
try {
|
||||
const ldrmntRes = await getFetch(
|
||||
fetchType.WR,
|
||||
searchUrl
|
||||
);
|
||||
console.log("search", ldrmntRes)
|
||||
set((state: ldrmntState) => {
|
||||
return {
|
||||
...state,
|
||||
ldrmnt: {
|
||||
...state.ldrmnt,
|
||||
isInit: false,
|
||||
ldrmntCoList: ldrmntCoList,
|
||||
ldrmntRes: ldrmntRes,
|
||||
},
|
||||
};
|
||||
});
|
||||
}
|
||||
})
|
||||
} 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);
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ export const getCity = (val: string, sggCd: SelectDataType[]) => {
|
||||
val: item.val,
|
||||
text: item.text, // 한국어 텍스트
|
||||
}));
|
||||
data.unshift({val:'0',text:'전체'})
|
||||
return data;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { useForm, FormProvider } from "react-hook-form";
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { type customCoBdst } from "@/app/store/matDmd/coReg";
|
||||
import { ToastFormUi } from "@/components/ui/toast/toastFromUi";
|
||||
import { filePicked, FileUpload, FormUi, Title } from "@common/business_components/ui";
|
||||
import { Button } from "@common/components/ui";
|
||||
import type { z } from "zod";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { coRegExcel } from "@/app/store/matDmd/coSttn/headList";
|
||||
|
||||
export default function CoRegExcel() {
|
||||
const [excelData, setExcelData] = useState<customCoBdst[]>();
|
||||
|
||||
|
||||
const [files, setFiles] = useState<File[] | null>(null);
|
||||
const form = useForm<z.infer<typeof coRegExcel>>({
|
||||
resolver: zodResolver(coRegExcel),
|
||||
defaultValues: { file: undefined },
|
||||
});
|
||||
useEffect(() => {
|
||||
if (!files || files.length === 0) return;
|
||||
const file = files[0];
|
||||
if (!file) return;
|
||||
filePicked(file, 0).then((res) => {
|
||||
if (res) {
|
||||
|
||||
}
|
||||
});
|
||||
}, [files]);
|
||||
|
||||
const onSubmit = (values: z.infer<typeof coRegExcel>) => {
|
||||
if (!excelData || excelData.length === 0) {
|
||||
ToastFormUi({
|
||||
title: "잠재수요처 등록",
|
||||
body: "빈 파일 및 파일 오류 입니다.",
|
||||
});
|
||||
return;
|
||||
}
|
||||
// rainChkExcelDataUPload(excelData);
|
||||
};
|
||||
|
||||
return (
|
||||
<FormProvider {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)}>
|
||||
<Title title="잠재수요처 등록" />
|
||||
|
||||
<div className="flex justify-between items-center mb-4">
|
||||
<h3 className="text-2xl font-bold text-gray-900">○ 잠재수요처</h3>
|
||||
<Button type="submit">등록</Button>
|
||||
</div>
|
||||
|
||||
<FormUi label="잠재수요처 파일">
|
||||
<FileUpload
|
||||
files={files || []}
|
||||
setFiles={(files: File[] | null) => {if (files) setFiles(files);}}
|
||||
fileTypes="xlsx"
|
||||
></FileUpload>
|
||||
</FormUi>
|
||||
</form>
|
||||
</FormProvider>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { coRegExcel } from "@/app/store/matDmd/coSttn/headList";
|
||||
import type { customLdrmntBdst } from "@/app/store/matDmd/ldrmntCoSttn";
|
||||
import { excelToLdrmntData, names } from "@/app/store/matDmd/ldrmntCoSttn/excel";
|
||||
import { filePicked, FileUpload, FormUi, Title } from "@common/business_components/ui";
|
||||
import { Form, FormField } from "@common/business_components/ui/form";
|
||||
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 CoRegExcel() {
|
||||
|
||||
|
||||
const form = useForm<z.infer<typeof coRegExcel>>({
|
||||
resolver: zodResolver(coRegExcel),
|
||||
});
|
||||
const { ldrmntRegData } = useWrStore((state) => state);
|
||||
const [excelData, setExcelData] = useState<customLdrmntBdst[]>();
|
||||
|
||||
|
||||
const [file, setFiles] = useState<File | undefined>();
|
||||
|
||||
const onSubmit = (values: z.infer<typeof coRegExcel>) => {
|
||||
if (file) {
|
||||
filePicked(file, 0).then((res) => {
|
||||
try {
|
||||
console.log("res", res)
|
||||
let array: { [key: string]: string | number }[] = []
|
||||
if (Array.isArray(res))
|
||||
res.forEach((item, index) => {
|
||||
let object: { [key: string]: string | number } = {}
|
||||
Object.keys(names).forEach((key) => {
|
||||
if (item && names[key] !== undefined) {
|
||||
if (key === "공장관리번호")
|
||||
item[key] = String(item[key])
|
||||
object[names[key] as string] = item[key];
|
||||
}
|
||||
|
||||
})
|
||||
array.push(object)
|
||||
|
||||
if (index != 0 && index % 5000 == 0) {
|
||||
ldrmntRegData(array);
|
||||
console.log("array", array)
|
||||
array = []
|
||||
array.length = 0;
|
||||
// throw new Error("error")
|
||||
}
|
||||
})
|
||||
ldrmntRegData(array);
|
||||
console.log("array22", array)
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
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>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="file"
|
||||
render={({ field }) => (
|
||||
<FormUi label="">
|
||||
<FileUpload
|
||||
files={file ? [file] : []}
|
||||
setFiles={(files: File[] | null) => {
|
||||
console.log("files", files)
|
||||
if (files && files?.length === 1) setFiles(files[0]);
|
||||
}}
|
||||
fileTypes=""
|
||||
maxFiles={1}
|
||||
></FileUpload>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
"use client";
|
||||
import { useWrStore } from "@/app/store";
|
||||
import type { CommonTableProps } from "@/app/store/common/type/header";
|
||||
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 { ldrmntZod } from "@/app/store/matDmd/ldrmntCoSttn/headList";
|
||||
import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import { handleCommaNumberChange } from "@/components/lib/func/commom";
|
||||
import { DatePicker, Form, FormField, FormUi, ScrollArea } from "@common/business_components/ui";
|
||||
import { Button, Input } from "@common/components/ui";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import type { z } from "zod";
|
||||
|
||||
@@ -23,13 +21,12 @@ export default function SttnDetailModal({
|
||||
});
|
||||
|
||||
const onSubmit = (values: z.infer<typeof ldrmntZod>) => {
|
||||
|
||||
console.log("values", values)
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (ldrmntZod) form.reset(formObj);
|
||||
|
||||
console.log("이거", formObj)
|
||||
}, [formObj]);
|
||||
|
||||
return (
|
||||
@@ -50,7 +47,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa1"
|
||||
name="dmdCoNm"
|
||||
render={({ field }) => (
|
||||
<FormUi label="회사명">
|
||||
<Input
|
||||
@@ -58,9 +55,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? "" ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -69,47 +66,7 @@ export default function SttnDetailModal({
|
||||
<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"
|
||||
name="mngInst"
|
||||
render={({ field }) => (
|
||||
<FormUi label="관리기관">
|
||||
<Input
|
||||
@@ -117,20 +74,21 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
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"
|
||||
name="fctrySe"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공장구분">
|
||||
<Input
|
||||
@@ -138,9 +96,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? "" ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -149,7 +107,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa3"
|
||||
name="cmpxNm"
|
||||
render={({ field }) => (
|
||||
<FormUi label="단지명">
|
||||
<Input
|
||||
@@ -157,9 +115,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? "" ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -170,7 +128,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa4"
|
||||
name="fndnSe"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설립구분">
|
||||
<Input
|
||||
@@ -178,9 +136,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? "" ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -189,7 +147,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa5"
|
||||
name="mvnShp"
|
||||
render={({ field }) => (
|
||||
<FormUi label="입주형태">
|
||||
<Input
|
||||
@@ -197,9 +155,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? "" ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -208,7 +166,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa6"
|
||||
name="hldSe"
|
||||
render={({ field }) => (
|
||||
<FormUi label="보유구분">
|
||||
<Input
|
||||
@@ -216,9 +174,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? "" ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -229,19 +187,17 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa7"
|
||||
name="frstAprvYmd"
|
||||
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),
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
selectClass={"w-full"}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -251,19 +207,17 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa8"
|
||||
name="frstRegYmd"
|
||||
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),
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
selectClass={"w-full"}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -274,7 +228,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa9"
|
||||
name="regSe"
|
||||
render={({ field }) => (
|
||||
<FormUi label="등록구분">
|
||||
<Input
|
||||
@@ -282,9 +236,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -293,19 +247,17 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa10"
|
||||
name="regYmd"
|
||||
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),
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
selectClass={"w-full"}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -314,7 +266,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa11"
|
||||
name="telno"
|
||||
render={({ field }) => (
|
||||
<FormUi label="전화번호">
|
||||
<Input
|
||||
@@ -322,9 +274,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -337,7 +289,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-1">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa12"
|
||||
name="maleEmpCnt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="남자종업원">
|
||||
<Input
|
||||
@@ -345,9 +297,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -356,7 +308,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-1">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa13"
|
||||
name="fmaleEmpCnt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="여자종업원">
|
||||
<Input
|
||||
@@ -364,9 +316,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -375,7 +327,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-1">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa14"
|
||||
name="frgnrMaleEmpCnt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="외국인남자종업원">
|
||||
<Input
|
||||
@@ -383,9 +335,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -394,7 +346,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-1">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa15"
|
||||
name="frgnrFmaleEmpCnt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="외국인여자종업원">
|
||||
<Input
|
||||
@@ -402,9 +354,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -413,7 +365,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-1">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa16"
|
||||
name="totalEmpCnt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="종업원합계">
|
||||
<Input
|
||||
@@ -421,9 +373,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -435,7 +387,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa17"
|
||||
name="prdctnItem"
|
||||
render={({ field }) => (
|
||||
<FormUi label="생산품">
|
||||
<Input
|
||||
@@ -443,9 +395,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -454,7 +406,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa18"
|
||||
name="splyMtrl"
|
||||
render={({ field }) => (
|
||||
<FormUi label="원자재">
|
||||
<Input
|
||||
@@ -462,9 +414,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -473,7 +425,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa19"
|
||||
name="fctryScl"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공장규모">
|
||||
<Input
|
||||
@@ -481,9 +433,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -495,7 +447,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa20"
|
||||
name="usgRgn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="용도지역">
|
||||
<Input
|
||||
@@ -503,9 +455,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -514,7 +466,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa21"
|
||||
name="ldcg"
|
||||
render={({ field }) => (
|
||||
<FormUi label="지목">
|
||||
<Input
|
||||
@@ -522,9 +474,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -533,7 +485,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa22"
|
||||
name="usgRgnArea"
|
||||
render={({ field }) => (
|
||||
<FormUi label="용지면적">
|
||||
<Input
|
||||
@@ -541,9 +493,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -556,7 +508,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa23"
|
||||
name="mnftrFcltArea"
|
||||
render={({ field }) => (
|
||||
<FormUi label="제조시설면적">
|
||||
<Input
|
||||
@@ -564,9 +516,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -575,7 +527,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa24"
|
||||
name="sbsdFcltArea"
|
||||
render={({ field }) => (
|
||||
<FormUi label="부대시설면적">
|
||||
<Input
|
||||
@@ -583,9 +535,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -594,7 +546,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa25"
|
||||
name="archArea"
|
||||
render={({ field }) => (
|
||||
<FormUi label="건축면적">
|
||||
<Input
|
||||
@@ -602,9 +554,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -617,7 +569,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa26"
|
||||
name="knwlIndstCntrNm"
|
||||
render={({ field }) => (
|
||||
<FormUi label="지식산업센터명">
|
||||
<Input
|
||||
@@ -625,9 +577,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -636,7 +588,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa27"
|
||||
name="rprsTpbiz"
|
||||
render={({ field }) => (
|
||||
<FormUi label="대표업종">
|
||||
<Input
|
||||
@@ -644,9 +596,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -655,7 +607,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa28"
|
||||
name="tpbizNm"
|
||||
render={({ field }) => (
|
||||
<FormUi label="업종명">
|
||||
<Input
|
||||
@@ -663,9 +615,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -677,7 +629,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa29"
|
||||
name="tpbizCd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="업종코드">
|
||||
<Input
|
||||
@@ -685,9 +637,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -696,7 +648,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa30"
|
||||
name="cycl"
|
||||
render={({ field }) => (
|
||||
<FormUi label="차수">
|
||||
<Input
|
||||
@@ -704,9 +656,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -715,7 +667,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa31"
|
||||
name="corpAddr"
|
||||
render={({ field }) => (
|
||||
<FormUi label="법인주소">
|
||||
<Input
|
||||
@@ -723,9 +675,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -736,7 +688,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa32"
|
||||
name="esntlIdx"
|
||||
render={({ field }) => (
|
||||
<FormUi label="필지수">
|
||||
<Input
|
||||
@@ -744,9 +696,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -755,7 +707,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa35"
|
||||
name="fctryMngNo"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공장관리번호">
|
||||
<Input
|
||||
@@ -763,9 +715,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -777,7 +729,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa33"
|
||||
name="fctryAddr"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공장주소">
|
||||
<Input
|
||||
@@ -785,9 +737,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -796,7 +748,7 @@ export default function SttnDetailModal({
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="aaaaaa34"
|
||||
name="fctryLotnoAddr"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공장주소_지번">
|
||||
<Input
|
||||
@@ -804,9 +756,9 @@ export default function SttnDetailModal({
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value);
|
||||
}}
|
||||
value={field.value}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user