Merge commit '5976b35c902b1fb1da1fdc637e620a0d0d3e9ede' into iipbs/wr/dev
This commit is contained in:
@@ -316,7 +316,7 @@ export default function CoMatRvw() {
|
||||
control={form.control}
|
||||
name="dmndQty"
|
||||
render={({ field }) => (
|
||||
<FormUi label="요구수량(M3/d)">
|
||||
<FormUi label="요구수량(m³/일)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
|
||||
@@ -101,7 +101,9 @@ export default function CoSttn() {
|
||||
...item,
|
||||
telno: formatPhoneNumber(item.telno || undefined),
|
||||
regDt: moment(item.regDt).format("YYYY-MM-DD"),
|
||||
}));
|
||||
dmdInfoId: `${item.dmdInfoId.slice(0, 3)}-${item.dmdInfoId.slice(3, 5)}-${item.dmdInfoId.slice(5,10)}-${item.dmdInfoId.slice(10)}`
|
||||
}));
|
||||
console.log("chData:", chData)
|
||||
// .filter((item: any) => item !== undefined);
|
||||
setBdstTable(chData);
|
||||
} else if (coSttnRes?.length == 0) {
|
||||
|
||||
@@ -43,8 +43,9 @@ export default function LdrmntCoSttn() {
|
||||
const [objSearch, setObjSearch] = useState<objSearchType>({ sgg: "", city: "" });
|
||||
const [bdstTable, setBdstTable] = useState<customLdrmnt[]>();
|
||||
const [searchTxt, setSearchTxt] = useState<string>();
|
||||
const [excelData, setExcelData] = useState<any[]>();
|
||||
const [excelData, setExcelData] = useState<any[] | undefined>()
|
||||
const [resetPage, isResetPage] = useState(false);
|
||||
const [isDownloadClicked, setIsDownloadClicked] = useState(false);
|
||||
const { t } = useTranslation('base');
|
||||
|
||||
const excelClick = useCallback(() => {
|
||||
@@ -79,10 +80,31 @@ export default function LdrmntCoSttn() {
|
||||
|
||||
const excelDownloadClick = useCallback(() => {
|
||||
const cityNm = computeCityNm();
|
||||
setExcelData(undefined);
|
||||
setIsDownloadClicked(true);
|
||||
ldrmntSearch(true, 1, String(ldrmntResCount), cityNm, searchTxt || "");
|
||||
}, [objSearch, searchTxt, code, ldrmntSearch, computeCityNm, ldrmntResCount]);
|
||||
|
||||
useEffect(() => {
|
||||
const transData = Array.isArray(excelList) ? excelList : [excelList];
|
||||
const exData = tableData(transData, { code });
|
||||
const data = Array.isArray(exData)
|
||||
? exData.map((item: customLdrmnt) => {
|
||||
return {
|
||||
"시도": item.fctryAddr?.split(" ")[0] || "",
|
||||
"시군구": item.fctryAddr?.split(" ")[1] || "",
|
||||
"회사명": item.dmdCoNm,
|
||||
"공장주소": item.fctryAddr,
|
||||
"공장관리번호": item.fctryMngNo,
|
||||
"전화번호": item.telno
|
||||
}
|
||||
}) : [];
|
||||
setExcelData(data)
|
||||
}, [excelList])
|
||||
|
||||
useEffect(() => {
|
||||
if (!isDownloadClicked) return;
|
||||
if (excelData === undefined) return;
|
||||
if (excelData && excelData.length > 0) {
|
||||
downloadExcel({
|
||||
data: excelData,
|
||||
@@ -93,7 +115,8 @@ export default function LdrmntCoSttn() {
|
||||
} else {
|
||||
toast.error(t('excelDownErrMsg'));
|
||||
}
|
||||
}, [excelData]);
|
||||
setIsDownloadClicked(false);
|
||||
}, [excelData, isDownloadClicked]);
|
||||
|
||||
const [isExcelOpen, setIsExcelOpen] = useState<{
|
||||
isModal: boolean;
|
||||
@@ -125,7 +148,7 @@ export default function LdrmntCoSttn() {
|
||||
|
||||
useEffect(() => {
|
||||
if (!ldrmnt.isInit) {
|
||||
ldrmntInit("0");
|
||||
ldrmntInit(false, "0");
|
||||
}
|
||||
}, [ldrmnt.isInit, ldrmntInit]);
|
||||
|
||||
@@ -144,23 +167,6 @@ export default function LdrmntCoSttn() {
|
||||
setBdstTable(tbData);
|
||||
}, [ldrmntRes, code]);
|
||||
|
||||
useEffect(() => {
|
||||
const transData = Array.isArray(excelList) ? excelList : [excelList];
|
||||
const exData = tableData(transData, { code });
|
||||
const data = Array.isArray(exData)
|
||||
? exData.map((item: customLdrmnt) => {
|
||||
return {
|
||||
"시도": item.fctryAddr?.split(" ")[0] || "",
|
||||
"시군구": item.fctryAddr?.split(" ")[1] || "",
|
||||
"회사명": item.dmdCoNm,
|
||||
"공장주소": item.fctryAddr,
|
||||
"공장관리번호": item.fctryMngNo,
|
||||
"전화번호": item.telno
|
||||
}
|
||||
}) : [];
|
||||
setExcelData(data)
|
||||
}, [excelList])
|
||||
|
||||
useEffect(() => {
|
||||
ldrmntSearch(false, pageNation, '20', computeCityNm(), searchTxt || "");
|
||||
isResetPage(false)
|
||||
@@ -264,10 +270,6 @@ export default function LdrmntCoSttn() {
|
||||
}}
|
||||
bodyClass={"w-[40vw] max-w-none max-h-[calc(100%-70px)]"}
|
||||
body={<CoDetailModal formObj={detailModal.data} onFormSubmit={async (value) => {
|
||||
// confirmToast(t('isUpdateMsg'), await ldrmntUpdate(value))
|
||||
// // await ldrmntUpdate(value)
|
||||
// setDetailModal({ ...detailModal, isOpen: false })
|
||||
// ldrmntSearch(false, pageNation, '20', computeCityNm(), searchTxt || "");
|
||||
const handleConfirm = async () => {
|
||||
await ldrmntUpdate(value);
|
||||
setDetailModal({ ...detailModal, isOpen: false });
|
||||
@@ -286,12 +288,8 @@ export default function LdrmntCoSttn() {
|
||||
body={<CoRegExcel isModal={(isOpen) => setIsExcelOpen({ isModal: isOpen })} />}
|
||||
/>
|
||||
<Toaster position="top-center"></Toaster>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentsDiv>
|
||||
</>
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import { useWrStore } from "@/app/store";
|
||||
import {
|
||||
type customRainBdst,
|
||||
} from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import { tableData } from "@/components/lib/func/commom";
|
||||
import { formatCommaNumber, tableData } from "@/components/lib/func/commom";
|
||||
import RainRegForm from "@/components/ui/form/fcltReg/rainReg/rainRegForm";
|
||||
import { BdstReg } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal";
|
||||
import {
|
||||
@@ -52,7 +52,7 @@ export default function Home() {
|
||||
: "확인불가";
|
||||
return {
|
||||
...item,
|
||||
archArea: archArea,
|
||||
archArea: formatCommaNumber(archArea),
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -166,8 +166,8 @@ export default function HtdflSttn() {
|
||||
value={objSearch.sgg} // value props 추가
|
||||
onSelectValue={getSgg}
|
||||
/>
|
||||
<div className="col-span-2 flex flex-row space-x-2">
|
||||
<Label className="w-28 mt-2 text-xl text-gray-600">
|
||||
<div className="col-span-2 flex flex-row space-x-2 ml-3 mt-2">
|
||||
<Label className="w-28 mt-2 text-xl">
|
||||
{"시설명"}
|
||||
</Label>
|
||||
<SearchInput
|
||||
|
||||
@@ -124,8 +124,13 @@ export default function RainSttn() {
|
||||
item.reuseBuilding[0].rainyObj.filtrTrtmfctCpct === -1
|
||||
? "확인불가"
|
||||
: item.reuseBuilding[0].rainyObj.filtrTrtmfctCpct,
|
||||
archArea:
|
||||
Math.floor(item.archArea) === -1 ? "확인불가" : item.archArea,
|
||||
// archArea:
|
||||
// Math.floor(item.archArea) === -1 ? "확인불가" : Math.trunc(item.archArea) ? item.archArea,
|
||||
archArea: isNaN(Number(item.archArea))
|
||||
? item.archArea
|
||||
: Math.floor(Number(item.archArea)) === -1
|
||||
? '확인불가'
|
||||
: Math.trunc(Number(item.archArea))
|
||||
};
|
||||
})
|
||||
.filter((item: any) => item.rainyObj !== undefined);
|
||||
@@ -206,12 +211,12 @@ export default function RainSttn() {
|
||||
value={objSearch.sgg} // value props 추가
|
||||
onSelectValue={getSgg}
|
||||
/>
|
||||
<div className="col-span-2 flex flex-row space-x-2">
|
||||
<Label className="w-28 mt-2 text-xl text-gray-600">
|
||||
<div className="col-span-2 flex flex-row space-x-2 ml-3 mt-2">
|
||||
<Label className="w-28 mt-2 text-xl">
|
||||
{"시설명"}
|
||||
</Label>
|
||||
<SearchInput
|
||||
className={"w-full h-full text-2xl"}
|
||||
className={"w-full text-2xl"}
|
||||
label={""}
|
||||
textValue={fcltNm || ""}
|
||||
setText={setFcltNm}
|
||||
|
||||
@@ -164,8 +164,8 @@ export default function RswtSttn() {
|
||||
getSgg
|
||||
}
|
||||
/>
|
||||
<div className="col-span-2 flex flex-row space-x-2">
|
||||
<Label className="w-28 mt-2 text-xl text-gray-600">
|
||||
<div className="col-span-2 flex flex-row space-x-2 ml-3 mt-2">
|
||||
<Label className="w-28 mt-2 text-xl">
|
||||
{"시설명"}
|
||||
</Label>
|
||||
<SearchInput
|
||||
|
||||
@@ -20,7 +20,7 @@ export const coRvwHeadListExport: CommonTableProps[]= [
|
||||
},
|
||||
{
|
||||
id: "daddr",
|
||||
title: "공장주소",
|
||||
title: "주소",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -29,11 +29,11 @@ type ExcelType = {
|
||||
[key: string]: string | number | undefined;
|
||||
};
|
||||
|
||||
const excelDownList: ExcelType[] = [];
|
||||
// const excelDownList: ExcelType[] = [];
|
||||
|
||||
type ldrmntActions = {
|
||||
ldrmntRegData: (data: any[]) => void,
|
||||
ldrmntInit: (con: string) => void
|
||||
ldrmntInit: (isExcel: boolean, con: string) => void
|
||||
ldrmntSearch: (isExcel: boolean, page: number, sggCd: string, total: string, coNm: string) => void;
|
||||
ldrmntUpdate: (ldrmntRes: customLdrmnt) => void;
|
||||
ldrmntDelete: () => void;
|
||||
@@ -58,25 +58,47 @@ export const ldrmntActionsExport: (set: any) => ldrmntActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
ldrmntInit: async (con: string) => {
|
||||
ldrmntInit: async (isExcel: boolean,con: string) => {
|
||||
try {
|
||||
const ldrmntRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/reuseFc/request/temp/1/20/${con}`
|
||||
);
|
||||
|
||||
set((state: ldrmntState) => {
|
||||
return {
|
||||
...state,
|
||||
ldrmnt: {
|
||||
...state.ldrmnt,
|
||||
ldrmntRes: ldrmntRes.data,
|
||||
ldrmntResCount: ldrmntRes.count,
|
||||
isInit: false,
|
||||
excelList: excelDownList,
|
||||
},
|
||||
}
|
||||
});
|
||||
if (isExcel) {
|
||||
const excelDownList: ExcelType[] = [];
|
||||
ldrmntRes.data.forEach((item: customLdrmnt) => {
|
||||
excelDownList.push({
|
||||
ctpvCd: item.ctpvCd,
|
||||
sggCd: item.sggCd,
|
||||
dmdCoNm: item.dmdCoNm,
|
||||
fctryAddr: item.fctryAddr,
|
||||
fctryMngNo: item.fctryMngNo,
|
||||
telno: item.telno,
|
||||
})
|
||||
})
|
||||
set((state: ldrmntState) => {
|
||||
return {
|
||||
...state,
|
||||
ldrmnt: {
|
||||
...state.ldrmnt,
|
||||
excelList: excelDownList,
|
||||
ldrmntResCount: ldrmntRes.count,
|
||||
},
|
||||
};
|
||||
});
|
||||
} else {
|
||||
set((state: ldrmntState) => {
|
||||
return {
|
||||
...state,
|
||||
ldrmnt: {
|
||||
...state.ldrmnt,
|
||||
ldrmntRes: ldrmntRes.data,
|
||||
ldrmntResCount: ldrmntRes.count,
|
||||
isInit: false,
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
@@ -96,6 +118,7 @@ export const ldrmntActionsExport: (set: any) => ldrmntActions = (
|
||||
await deleteFectch(
|
||||
`/reuseFc/request/temp`,
|
||||
);
|
||||
console.log("deleteFectch", deleteFectch)
|
||||
|
||||
const response = await postFectch(
|
||||
"/reuseFc/request/temp",
|
||||
@@ -121,7 +144,6 @@ export const ldrmntActionsExport: (set: any) => ldrmntActions = (
|
||||
fetchType.WR,
|
||||
searchUrl
|
||||
);
|
||||
console.log("알이에스", ldrmntRes)
|
||||
if (isExcel) {
|
||||
const excelDownList: ExcelType[] = [];
|
||||
ldrmntRes.data.forEach((item: customLdrmnt) => {
|
||||
@@ -144,7 +166,6 @@ export const ldrmntActionsExport: (set: any) => ldrmntActions = (
|
||||
},
|
||||
};
|
||||
});
|
||||
return excelDownList;
|
||||
} else
|
||||
set((state: ldrmntState) => {
|
||||
return {
|
||||
@@ -157,27 +178,26 @@ export const ldrmntActionsExport: (set: any) => ldrmntActions = (
|
||||
},
|
||||
};
|
||||
});
|
||||
return ldrmntRes;
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
ldrmntUpdate: async (ldrmntRes: customLdrmnt) => {
|
||||
if(ldrmntRes)
|
||||
try {
|
||||
ldrmntRes.rgtr = TEST_UUID;
|
||||
const res = await putFectch(
|
||||
`/reuseFc/request/temp`,
|
||||
ldrmntRes
|
||||
);
|
||||
if (ldrmntRes)
|
||||
try {
|
||||
ldrmntRes.rgtr = TEST_UUID;
|
||||
const res = await putFectch(
|
||||
`/reuseFc/request/temp`,
|
||||
ldrmntRes
|
||||
);
|
||||
|
||||
if (res.ok) {
|
||||
toast.success("잠재수요처 상세정보가 수정되었습니다.",)
|
||||
if (res.ok) {
|
||||
toast.success("잠재수요처 상세정보가 수정되었습니다.",)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error ldrmntUpdate:", error);
|
||||
toast.error("잠재수요처 상세정보 수정에 실패하였습니다.")
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error ldrmntUpdate:", error);
|
||||
toast.error("잠재수요처 상세정보 수정에 실패하였습니다.")
|
||||
}
|
||||
},
|
||||
ldrmntDelete: async () => {
|
||||
try {
|
||||
@@ -193,7 +213,6 @@ export const ldrmntActionsExport: (set: any) => ldrmntActions = (
|
||||
await deleteFectch(
|
||||
`/reuseFc/request/temp`,
|
||||
);
|
||||
|
||||
} catch (error) {
|
||||
console.log("error", error)
|
||||
set((state: ldrmntState) => {
|
||||
|
||||
@@ -19,7 +19,7 @@ export const ruseHstryHeadListExport:TableUpperProps[]= [
|
||||
},
|
||||
{
|
||||
id: "daddr",
|
||||
title: "공장주소",
|
||||
title: "주소",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
@@ -49,7 +49,7 @@ export const ruseHstryHeadListExport:TableUpperProps[]= [
|
||||
},
|
||||
{
|
||||
id: "dmndQty", //바꾸기
|
||||
title: "요구수량(M3/d)",
|
||||
title: "요구수량(m³/일)",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ export const pbnstDemandHeadListExport: TableUpperProps[] = [
|
||||
|
||||
export const pbnstOrgwtHeadListRxport: TableUpperProps[] = [
|
||||
{ id: "ruseUtztnFcltNm", title: "하수처리장명" },
|
||||
{ id: "orgwtWtritQnt", title: "원수취수량", type: "number" },
|
||||
{ id: "orgwtWtritQnt", title: "원수취수량(m³/일)", type: "number" },
|
||||
{ id: "tmsYn", title: "하수처리량TMS 전후" },
|
||||
{ id: "dschgFmYn", title: "하수처리장 방류 유량계 전·후" },
|
||||
{ id: "dtlPstnExpln", title: "상세위치", edit: true },
|
||||
|
||||
@@ -141,7 +141,7 @@ export const pbnstSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "fctCpc",
|
||||
title: "시설용량(톤/일)",
|
||||
title: "시설용량(m³/일)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 2,
|
||||
@@ -157,7 +157,7 @@ export const pbnstSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "rusSup",
|
||||
title: "재이용수공급가능량",
|
||||
title: "재이용수공급가능량(m³/일)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 1,
|
||||
@@ -226,7 +226,7 @@ export const pbnstSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "fcltCpct",
|
||||
title: "시설용량(m³/일)",
|
||||
title: "시설용량",
|
||||
upName: "rusSup",
|
||||
visible: true,
|
||||
row: 2,
|
||||
@@ -235,7 +235,7 @@ export const pbnstSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "splyExtraCpct",
|
||||
title: "하수처리량(m³/일)",
|
||||
title: "하수처리량",
|
||||
upName: "rusSup",
|
||||
visible: true,
|
||||
row: 2,
|
||||
@@ -244,7 +244,7 @@ export const pbnstSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "ruseCpct",
|
||||
title: "재이용량(m³/일)",
|
||||
title: "재이용량",
|
||||
upName: "rusSup",
|
||||
visible: true,
|
||||
row: 2,
|
||||
@@ -337,7 +337,7 @@ export const ruseFcltNodeListExport: TableUpperProps[] = [
|
||||
},
|
||||
{
|
||||
id: "mainSplyPumpCpct",
|
||||
title: "메인공급펌프용량",
|
||||
title: "메인공급펌프용량(m³/일)",
|
||||
visible: true,
|
||||
row: 1,
|
||||
rowSpan: 3,
|
||||
@@ -345,7 +345,7 @@ export const ruseFcltNodeListExport: TableUpperProps[] = [
|
||||
},
|
||||
{
|
||||
id: "buziFee",
|
||||
title: "사업비(백만원)",
|
||||
title: "사업비(원)",
|
||||
visible: true,
|
||||
row: 2,
|
||||
rowSpan: 1,
|
||||
@@ -418,7 +418,7 @@ export const ruseFcltNodeListExport: TableUpperProps[] = [
|
||||
},
|
||||
{
|
||||
id: "cusrAlotm",
|
||||
title: "민간투자비",
|
||||
title: "민간투자비",
|
||||
visible: true,
|
||||
row: 3,
|
||||
rowSpan: 1,
|
||||
@@ -438,7 +438,7 @@ export const ruseFcltNodeListExport: TableUpperProps[] = [
|
||||
|
||||
export const ruseSplyHeadListExport: TableUpperProps[] = [
|
||||
{ id: "cycl", title: "차수", visible: true },
|
||||
{ id: "orgwtWtritQnt", title: "원수취수량", visible: true },
|
||||
{ id: "orgwtWtritQnt", title: "원수취수량(m³/일)", visible: true },
|
||||
{ id: "tmsYn", title: "하수처리량TMS 전후", visible: true },
|
||||
{ id: "dschgFmYn", title: "하수처리장 방류 유량계 전·후", visible: true },
|
||||
{ id: "dtlPstnExpln", title: "상세위치 설명", visible: true },
|
||||
@@ -447,8 +447,8 @@ export const ruseSplyHeadListExport: TableUpperProps[] = [
|
||||
export const rusePplHeadListExport: TableUpperProps[] = [
|
||||
{ id: "cycl", title: "차수", visible: true },
|
||||
{ id: "ppMqlt", title: "관재질", type: "select", visible: true },
|
||||
{ id: "pdmt", title: "관경", type: "select", visible: true },
|
||||
{ id: "cpct", title: "연장", edit: true, visible: true },
|
||||
{ id: "pdmt", title: "관경(mm)", type: "select", visible: true },
|
||||
{ id: "cpct", title: "연장(m)", edit: true, visible: true },
|
||||
];
|
||||
|
||||
export const ruseGuranteeHeadListExport: TableUpperProps[] = [
|
||||
@@ -458,10 +458,10 @@ export const ruseGuranteeHeadListExport: TableUpperProps[] = [
|
||||
{ id: "combResdch", title: "결합잔류염소(mh/L)", visible: true },
|
||||
{ id: "trbt", title: "탁도(NTU)", visible: true },
|
||||
{ id: "smll", title: "냄새", visible: true },
|
||||
{ id: "crmty", title: "색도", visible: true },
|
||||
{ id: "crmty", title: "색도(도)", visible: true },
|
||||
{ id: "tn", title: "총질소(mg/L)", visible: true },
|
||||
{ id: "tph", title: "총인(mg/L)", visible: true },
|
||||
{ id: "ph", title: "수소이온농도", visible: true },
|
||||
{ id: "ph", title: "수소이온농도(PH)", visible: true },
|
||||
{ id: "clIonQnt", title: "염화물(mg/L)", visible: true },
|
||||
{ id: "cdtnv", title: "전기전도도(μs/cm)", visible: true },
|
||||
];
|
||||
|
||||
@@ -228,7 +228,7 @@ export const rainSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "archArea",
|
||||
title: "건축면적",
|
||||
title: "건축면적(m³)",
|
||||
upName: "bdnstInfo",
|
||||
visible: true,
|
||||
row: 2,
|
||||
@@ -265,7 +265,7 @@ export const rainSttNodeListExport: CommonTableProps[] = [
|
||||
|
||||
{
|
||||
id: "instlCst",
|
||||
title: "설치비용",
|
||||
title: "설치비용(원)",
|
||||
upName: "rainFcltInfo",
|
||||
visible: true,
|
||||
row: 2,
|
||||
@@ -285,7 +285,7 @@ export const rainSttNodeListExport: CommonTableProps[] = [
|
||||
|
||||
{
|
||||
id: "pntfColKnd",
|
||||
title: "집수지점종류",
|
||||
title: "종류",
|
||||
upName: "pntfCol",
|
||||
visible: true,
|
||||
row: 3,
|
||||
@@ -294,7 +294,7 @@ export const rainSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "pntfColArea",
|
||||
title: "집수지점면적",
|
||||
title: "면적(m²)",
|
||||
upName: "pntfCol",
|
||||
visible: true,
|
||||
row: 3,
|
||||
@@ -304,7 +304,7 @@ export const rainSttNodeListExport: CommonTableProps[] = [
|
||||
|
||||
{
|
||||
id: "dtfcltCpct",
|
||||
title: "저류조용량",
|
||||
title: "저류조용량(m³)",
|
||||
upName: "rainFcltInfo",
|
||||
visible: true,
|
||||
row: 2,
|
||||
@@ -322,7 +322,7 @@ export const rainSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "filtrTrtmfctCpct",
|
||||
title: "여과처리시설용량",
|
||||
title: "여과처리시설용량(m³)",
|
||||
upName: "filtrTrtmfct",
|
||||
visible: true,
|
||||
row: 3,
|
||||
@@ -359,7 +359,7 @@ export const rainSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "instlCstSprtAmt",
|
||||
title: "설치지원비용",
|
||||
title: "설치지원비용(원)",
|
||||
upName: "instlCstSprt",
|
||||
visible: true,
|
||||
row: 3,
|
||||
@@ -379,7 +379,7 @@ export const rainSttNodeListExport: CommonTableProps[] = [
|
||||
|
||||
{
|
||||
id: "grntchBdstCertYn",
|
||||
title: "녹색건축물인증여부",
|
||||
title: "인증여부",
|
||||
upName: "grntchBdstCert",
|
||||
visible: true,
|
||||
row: 3,
|
||||
@@ -388,7 +388,7 @@ export const rainSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "grntchBdstCertYr",
|
||||
title: "녹색건축물인증년도",
|
||||
title: "인증년도",
|
||||
upName: "grntchBdstCert",
|
||||
visible: true,
|
||||
row: 3,
|
||||
@@ -397,7 +397,7 @@ export const rainSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "grntchBdstCertNo",
|
||||
title: "녹색건축물인증번호",
|
||||
title: "인증번호",
|
||||
upName: "grntchBdstCert",
|
||||
visible: true,
|
||||
row: 3,
|
||||
@@ -406,7 +406,7 @@ export const rainSttNodeListExport: CommonTableProps[] = [
|
||||
},
|
||||
{
|
||||
id: "grntchBdstCertGrd",
|
||||
title: "녹색건축물인증등급",
|
||||
title: "인증등급",
|
||||
upName: "grntchBdstCert",
|
||||
visible: true,
|
||||
row: 3,
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import type { rainChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
|
||||
import type { rswtChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn";
|
||||
import { Checkbox, Input, TableCell, TableRow } from "@common/components/ui";
|
||||
import { formatCommaNumber } from "./commom";
|
||||
|
||||
export const rainChkTableData = (chkData: rainChkZodType[]) => {
|
||||
// 1. chkgdnSn + utztnUsgCd 기준 누계 정보 만들기
|
||||
@@ -210,20 +211,18 @@ export const headVisibleChange = (headList: TableUpperProps[], isEdit: boolean)
|
||||
const handleChange = (
|
||||
rowIndex: number,
|
||||
field: any,
|
||||
value: string | number,
|
||||
value: string,
|
||||
setInputData: (data: any) => void
|
||||
) => {
|
||||
if (Number(value) < 0 || !Number(value)) {
|
||||
value = 0;
|
||||
} else {
|
||||
value = Number(value);
|
||||
value = "0";
|
||||
}
|
||||
setInputData((prevData: any) =>
|
||||
prevData?.map((row: any, index: number) => {
|
||||
if (index === rowIndex) {
|
||||
return {
|
||||
...row,
|
||||
[field]: value,
|
||||
[field]: Number(value.replace(/,/g, "")),
|
||||
};
|
||||
}
|
||||
return row;
|
||||
@@ -271,7 +270,7 @@ export const InputTableBody = (
|
||||
|
||||
// 총합계 행이면 "구분"에서 colSpan=2로 병합
|
||||
if (
|
||||
data["구분"] === 0 &&
|
||||
(data["구분"] === 0 || data["용수명"] === 0) &&
|
||||
head.id === "구분"
|
||||
) {
|
||||
return (
|
||||
@@ -286,18 +285,27 @@ export const InputTableBody = (
|
||||
}
|
||||
// 총합계(합계) 행이면 "용수명" 컬럼은 렌더링하지 않음
|
||||
if (
|
||||
data["구분"] === 0 &&
|
||||
(data["구분"] === 0 || data["용수명"] === 0) &&
|
||||
head.id === "용수명"
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 총합계 행의 나머지 셀에도 색상 적용
|
||||
if (data["구분"] === 0 || data["용수명"] === 0) {
|
||||
return (
|
||||
<TableCell key={head.id + headIndex} className="bg-[#d5e1eb] font-bold text-right">
|
||||
{Number(data[head.id]) ? formatCommaNumber(data[head.id as keyof any]) : data[head.id as keyof any] ?? ""}
|
||||
</TableCell>
|
||||
);
|
||||
}
|
||||
// mergeCell 처리
|
||||
if (head.mergeCell) {
|
||||
const rowSpan = getRowSpan(chgRes, head.id, dataIndex);
|
||||
if (rowSpan === 0) return null;
|
||||
return (
|
||||
<TableCell key={head.id + headIndex} rowSpan={rowSpan} className={`w-36 align-middle text-center whitespace-nowrap ${bgClass}`}>
|
||||
{data[head.id as keyof any] ?? ""}
|
||||
{Number(data[head.id]) ? formatCommaNumber(data[head.id as keyof any]) : data[head.id as keyof any] ?? ""}
|
||||
</TableCell>
|
||||
);
|
||||
}
|
||||
@@ -311,7 +319,7 @@ export const InputTableBody = (
|
||||
onChange={(e) =>
|
||||
handleChange(dataIndex, head.id, e.target.value, setInputData)
|
||||
}
|
||||
value={data[head.id as keyof any] ?? ""}
|
||||
value={formatCommaNumber(data[head.id as keyof any]) ?? ""}
|
||||
maxLength={numSize}
|
||||
/>
|
||||
</TableCell>
|
||||
@@ -324,7 +332,7 @@ export const InputTableBody = (
|
||||
// `}
|
||||
className={`${textAlignClass} !text-xl w-full h-10`}
|
||||
>
|
||||
{data[head.id as keyof any] ?? ""}
|
||||
{Number(data[head.id]) ? formatCommaNumber(data[head.id as keyof any]) : data[head.id as keyof any] ?? ""}
|
||||
</div>
|
||||
</TableCell>
|
||||
);
|
||||
|
||||
@@ -85,7 +85,7 @@ export default function ConCostForm({
|
||||
const calculateConstCost = useCallback(() => {
|
||||
const usgPrcsProcs = usgPrcsProcsWatch;
|
||||
if (!dmndQtyWatch) {
|
||||
toast.error("요구수량(M3/d)을 확인해주세요 계산할수 없습니다. ");
|
||||
toast.error("요구수량(m³/일)을 확인해주세요 계산할수 없습니다. ");
|
||||
return;
|
||||
}
|
||||
if (usgPrcsProcs === null || usgPrcsProcs === undefined) {
|
||||
@@ -278,7 +278,7 @@ export default function ConCostForm({
|
||||
control={form.control}
|
||||
name="dmndQty"
|
||||
render={({ field }) => (
|
||||
<FormUi label="요구수량(M3/d)">
|
||||
<FormUi label="요구수량(m³/일)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
@@ -315,7 +315,7 @@ export default function ConCostForm({
|
||||
]}
|
||||
pageSize={0}
|
||||
total={0}
|
||||
cellClick={() => {}}
|
||||
cellClick={undefined}
|
||||
onPageChange={() => {}}
|
||||
/>
|
||||
</>
|
||||
@@ -344,7 +344,7 @@ export default function ConCostForm({
|
||||
control={form.control}
|
||||
name="dmndQty"
|
||||
render={({ field }) => (
|
||||
<FormUi label="처리시설 용량(요구수량 * 365일)">
|
||||
<FormUi label="처리시설용량(m³/일)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
|
||||
@@ -2,15 +2,14 @@ import { useWrStore } from "@/app/store";
|
||||
import { numSize, txtSize } from "@/app/store/common/code/basicCode";
|
||||
import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import { formH1Class } from "@/components/lib/class/comClass";
|
||||
import { handleCommaNumberChange } from "@/components/lib/func/commom";
|
||||
import {
|
||||
DatePicker,
|
||||
FormField,
|
||||
FormUi,
|
||||
DatePicker,
|
||||
SelectBox,
|
||||
type SelectDataType,
|
||||
} from "@common/business_components";
|
||||
import { Input } from "@common/components";
|
||||
import { Input } from "@common/components";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export default function BdstReg({ form, type }: { form: any; type?: string }) {
|
||||
@@ -18,39 +17,39 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
|
||||
return state;
|
||||
});
|
||||
|
||||
const {userSiSggCd } =code
|
||||
const { userSiSggCd } = code
|
||||
const [useCityCd, setUserCityCd] = useState<SelectDataType[]>([])
|
||||
const [useSggCd, setUserSggCd] = useState<SelectDataType[]>([])
|
||||
|
||||
|
||||
// const [selectSgg, setSelectSgg] = useState<SelectDataType[] | undefined>();
|
||||
// const [objSearch, setObjSearch] = useState<objSearchType>({
|
||||
// sgg: "",
|
||||
// city: "",
|
||||
// });
|
||||
|
||||
useEffect(() =>{
|
||||
if(userSiSggCd.length===2 && code.cityCd.length>0){
|
||||
useEffect(() => {
|
||||
if (userSiSggCd.length === 2 && code.cityCd.length > 0) {
|
||||
const city = code.cityCd.filter((item) => item.val === userSiSggCd)
|
||||
const sgg = code.sggCd.filter((item) => item.val.slice(0,2) === userSiSggCd )
|
||||
sgg.unshift({text:'전체' , val:'0'})
|
||||
const sgg = code.sggCd.filter((item) => item.val.slice(0, 2) === userSiSggCd)
|
||||
sgg.unshift({ text: '전체', val: '0' })
|
||||
setUserCityCd(city) // Fix: Ensure city is of type SelectDataType[]
|
||||
setUserSggCd(sgg)
|
||||
if (city[0]?.val) {
|
||||
// 여기 중요
|
||||
queueMicrotask(() => {
|
||||
form.setValue("ctpvCd", Number(city[0]?.val), { shouldDirty: true, shouldTouch: true, shouldValidate: true });
|
||||
});
|
||||
// 여기 중요
|
||||
queueMicrotask(() => {
|
||||
form.setValue("ctpvCd", Number(city[0]?.val), { shouldDirty: true, shouldTouch: true, shouldValidate: true });
|
||||
});
|
||||
}
|
||||
}else if(userSiSggCd.length===5 && code.cityCd.length>0 && code.sggCd.length>0) {
|
||||
const city = code.cityCd.filter((item) => item.val === userSiSggCd.slice(0,2))
|
||||
} else if (userSiSggCd.length === 5 && code.cityCd.length > 0 && code.sggCd.length > 0) {
|
||||
const city = code.cityCd.filter((item) => item.val === userSiSggCd.slice(0, 2))
|
||||
const sgg = code.sggCd.filter((item) => item.val === userSiSggCd)
|
||||
setUserSggCd(sgg)
|
||||
setUserCityCd(city)
|
||||
form.setValue('ctpvCd',Number(city[0]?.val) )
|
||||
form.setValue('sggCd',Number(sgg[0]?.val) )
|
||||
form.setValue('ctpvCd', Number(city[0]?.val))
|
||||
form.setValue('sggCd', Number(sgg[0]?.val))
|
||||
|
||||
}
|
||||
},[form, userSiSggCd, code.cityCd, code.sggCd])
|
||||
}, [form, userSiSggCd, code.cityCd, code.sggCd])
|
||||
|
||||
|
||||
|
||||
@@ -70,15 +69,13 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
|
||||
|
||||
|
||||
|
||||
useEffect(() =>{
|
||||
|
||||
console.log('form.formState ', form.watch())
|
||||
|
||||
},[form.formState])
|
||||
useEffect(() => {
|
||||
console.log('form.formState ', form.watch("archArea"))
|
||||
}, [form.formState])
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1 className={formH1Class}> { type !== "HTB"?"건축물 기본 정보": '시설 기본 정보'}</h1>
|
||||
<h1 className={formH1Class}> {type !== "HTB" ? "건축물 기본 정보" : '시설 기본 정보'}</h1>
|
||||
<div className="grid grid-cols-6 gap-2 mt-4">
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
@@ -127,16 +124,16 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
|
||||
control={form.control}
|
||||
name="bdstNm"
|
||||
render={({ field }) => (
|
||||
<FormUi label={ type !== "HTB"?"건축물명": '시설명'}>
|
||||
<FormUi label={type !== "HTB" ? "건축물명" : '시설명'}>
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder= {type !== "HTB"?"건축물 명 입력하세요":'시설명 입력하세요' }
|
||||
placeholder={type !== "HTB" ? "건축물 명 입력하세요" : '시설명 입력하세요'}
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
field.onChange(e.target.value)
|
||||
}}
|
||||
value={field.value||''}
|
||||
maxLength={txtSize}
|
||||
onChange={(e) => {
|
||||
field.onChange(e.target.value)
|
||||
}}
|
||||
value={field.value || ''}
|
||||
maxLength={txtSize}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -147,16 +144,16 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
|
||||
control={form.control}
|
||||
name="daddr"
|
||||
render={({ field }) => (
|
||||
<FormUi label= { type !== "HTB"?"건축물 주소": '시설 주소'} >
|
||||
<FormUi label={type !== "HTB" ? "건축물 주소" : '시설 주소'} >
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder="위치를 입력해주세요"
|
||||
type="search"
|
||||
onChange={(e) => {
|
||||
field.onChange(e.target.value)
|
||||
}}
|
||||
value={field.value||''}
|
||||
maxLength={50}
|
||||
}}
|
||||
value={field.value || ''}
|
||||
maxLength={50}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
@@ -168,7 +165,7 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
|
||||
control={form.control}
|
||||
name="frstArchPrmsnDt"
|
||||
render={({ field }) => (
|
||||
<FormUi label= { type !== "HTB"?"최초건축허가일": '준공년도'} >
|
||||
<FormUi label={type !== "HTB" ? "최초건축허가일" : '준공년도'} >
|
||||
<DatePicker
|
||||
mode={"single"}
|
||||
field={{
|
||||
@@ -221,9 +218,9 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
|
||||
placeholder="면적을 입력하세요"
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, field.onChange);
|
||||
field.onChange(e.target.value)
|
||||
}}
|
||||
value={field.value||''}
|
||||
value={field.value || ''}
|
||||
maxLength={numSize}
|
||||
/>
|
||||
</FormUi>
|
||||
@@ -251,7 +248,7 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
</>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
|
||||
@@ -257,7 +257,7 @@ export default function HtdflRegForm({
|
||||
{/* <div className="flex justify-between items-center mx-3"> */}
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold text-gray-900 mt-3 ml-1">
|
||||
{readonly && `(${htdflForm?.bdstNm})`}
|
||||
{readonly && `(시설명 : ${htdflForm?.bdstNm})`}
|
||||
</h1>
|
||||
<div className="grid grid-cols-12 flex items-center card-header">
|
||||
<h1 className="text-2xl font-medium text-label col-span-10">
|
||||
@@ -360,8 +360,9 @@ export default function HtdflRegForm({
|
||||
<h1 className={formH1Class}>온배수 시설 운영현황</h1>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-10 gap-1 mt-4">
|
||||
<div className="col-span-5">
|
||||
{/* <div className="grid grid-cols-10 gap-1 mt-4"> */}
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="reuseBuilding.0.htdflObj.orgwtWtritSpt"
|
||||
@@ -382,7 +383,7 @@ export default function HtdflRegForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="reuseBuilding.0.htdflObj.orgwtOcrnProcs"
|
||||
@@ -403,7 +404,7 @@ export default function HtdflRegForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="reuseBuilding.0.htdflObj.wtritEntrcTp"
|
||||
@@ -425,7 +426,7 @@ export default function HtdflRegForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="reuseBuilding.0.htdflObj.emsnExitTp"
|
||||
@@ -447,12 +448,12 @@ export default function HtdflRegForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="reuseBuilding.0.htdflObj.amtgnr"
|
||||
render={({ field }) => (
|
||||
<FormUi label="발생량(m³/년)">
|
||||
<FormUi label="발생량(m³/일)">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder="1,000,000"
|
||||
@@ -469,7 +470,7 @@ export default function HtdflRegForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="reuseBuilding.0.htdflObj.prcsProcsYn"
|
||||
@@ -488,7 +489,7 @@ export default function HtdflRegForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="reuseBuilding.0.htdflObj.prcsFcltCpct"
|
||||
@@ -510,7 +511,7 @@ export default function HtdflRegForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="reuseBuilding.0.htdflObj.fmYn"
|
||||
@@ -529,12 +530,12 @@ export default function HtdflRegForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="reuseBuilding.0.htdflObj.utztnCpct"
|
||||
render={({ field }) => (
|
||||
<FormUi label="이용량(m³/년)">
|
||||
<FormUi label="이용량(m³/일)">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder="1,000,000"
|
||||
@@ -551,7 +552,7 @@ export default function HtdflRegForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="reuseBuilding.0.htdflObj.utztnUsg"
|
||||
|
||||
@@ -286,7 +286,7 @@ export function PbnstMngForm({
|
||||
render={({ field }) => (
|
||||
<FormUi label="">
|
||||
<Input
|
||||
className="!text-2xl"
|
||||
className="!text-2xl ml-4 mt-1"
|
||||
placeholder=""
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
|
||||
@@ -159,7 +159,7 @@ export default function RainRegForm({
|
||||
<form onSubmit={form.handleSubmit(onSubmit)}>
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold text-gray-900 mt-3 ml-1">
|
||||
{readonly && `(${rainForm?.bdstNm})`}
|
||||
{readonly && `(시설명 : ${rainForm?.bdstNm})`}
|
||||
</h1>
|
||||
<div className="grid grid-cols-12 flex items-center card-header">
|
||||
<h1 className="text-2xl font-medium text-label col-span-10">
|
||||
@@ -315,8 +315,8 @@ export default function RainRegForm({
|
||||
const value = field.value;
|
||||
const isUnknown = value === null || value === -1; // 또는 Number(value) === -1
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
<FormUi label="집수면 용량(m³)">
|
||||
// <div className="flex items-center gap-2">
|
||||
<FormUi label="집수면 면적(m²)">
|
||||
<Input
|
||||
className={selectClass}
|
||||
placeholder="1,000,000"
|
||||
@@ -338,7 +338,7 @@ export default function RainRegForm({
|
||||
maxLength={numSize}
|
||||
/>
|
||||
</FormUi>
|
||||
</div>
|
||||
// </div>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
@@ -413,7 +413,7 @@ export default function RainRegForm({
|
||||
// const isUnknown = value === null || value === "-"; // 또는 Number(value) === -1
|
||||
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
// <div className="flex items-center gap-2">
|
||||
<FormUi label="처리공정">
|
||||
<Input
|
||||
className={" h-full !text-xl col-span-4"}
|
||||
@@ -426,7 +426,7 @@ export default function RainRegForm({
|
||||
maxLength={txtSize}
|
||||
/>
|
||||
</FormUi>
|
||||
</div>
|
||||
// </div>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -5,21 +5,17 @@ import type {
|
||||
conCostFeeType,
|
||||
ContCostMap,
|
||||
} from "@/app/store/common/searchCode/type";
|
||||
import { yearOptions } from "@/components/lib/func/commom";
|
||||
|
||||
import { SelectBox, UiTable } from "@common/business_components/ui";
|
||||
import { UiTable } from "@common/business_components/ui";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Label, } from "@common/components/ui";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
export function ConstCostFeeTable() {
|
||||
const { coRvw, constCostRes } = useWrStore((state) => state);
|
||||
const [year, setYear] = useState<string>(String(new Date().getFullYear()));
|
||||
|
||||
const [constCostData, setConstCostData] = useState<ContCostMap[]>([]);
|
||||
|
||||
|
||||
const getFctDescription = (fctCd: string) => {
|
||||
const getFctDescription = (fctCd: string) => {
|
||||
const fctMap: { [key: string]: string } = {
|
||||
"001": "총인처리시설",
|
||||
"002": "염소소독",
|
||||
@@ -73,26 +69,19 @@ export function ConstCostFeeTable() {
|
||||
공사비 산정표 보기
|
||||
</h3>
|
||||
<hr />
|
||||
<div className="flex items-center">
|
||||
<Label className="text-xl text-gray-600">기준년도</Label>
|
||||
<SelectBox
|
||||
className="h-full text-2xl"
|
||||
label=""
|
||||
selectClass={"ml-4"}
|
||||
selectArray={yearOptions}
|
||||
value={year}
|
||||
onSelectValue={(val: string | number) => setYear(String(val))}
|
||||
/>
|
||||
<div className="col-span-5 flex items-center">
|
||||
<Label className="ml-2 mr-1 text-xl text-gray-600">기준년도</Label>
|
||||
<span>{new Date().getFullYear() || ""}</span>
|
||||
</div>
|
||||
<UiTable
|
||||
headName={""}
|
||||
tableData={constCostData || []}
|
||||
headlist={coRvw.constCostHeadList}
|
||||
pageSize={0}
|
||||
total={0}
|
||||
cellClick={() => {}}
|
||||
onPageChange={() => {}}
|
||||
/>
|
||||
<UiTable
|
||||
headName={""}
|
||||
tableData={constCostData || []}
|
||||
headlist={coRvw.constCostHeadList}
|
||||
pageSize={0}
|
||||
total={0}
|
||||
cellClick={undefined}
|
||||
onPageChange={() => { }}
|
||||
/>
|
||||
</ListDiv>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -80,7 +80,7 @@ export function RateFeeTableModal() {
|
||||
<hr className="col-span-6 border-gray-300" />
|
||||
|
||||
<div className="col-span-5 flex items-center">
|
||||
<Label className=" text-xl text-gray-600">기준년도</Label>
|
||||
<Label className="mr-1 text-xl text-gray-600">기준년도</Label>
|
||||
<span>{new Date().getFullYear() || ""}</span>
|
||||
</div>
|
||||
<div className="col-span-6 pr-6">
|
||||
|
||||
@@ -89,7 +89,7 @@ export default function CoRegExcel({
|
||||
<h3 className="text-2xl font-bold text-gray-900 mt-1 ml-7">
|
||||
{"잠재수요처 파일"}
|
||||
</h3>
|
||||
<Button className="" type="submit" size={"sm"} onClick={onSubmit}>
|
||||
<Button className="" type="submit" size={"sm"}>
|
||||
저장
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"saveRowErrMsg": "수정을 원하는 행을 선택하고 저장버튼을 눌러주세요.",
|
||||
"costCalcErrMsg":"공사비 계산 진행 후 저장을 눌러주세요",
|
||||
"maxYearErrMsg": "최대 {{year}}년까지 선택가능합니다.",
|
||||
"checkQtyMsg": "요구수량(M3/d)을 확인해주세요 계산할 수 없습니다."
|
||||
"checkQtyMsg": "요구수량(m³/일)을 확인해주세요 계산할 수 없습니다."
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ const customStyles = {
|
||||
fontWeight: "normal",
|
||||
marginTop: "16px",
|
||||
marginBottom: "8px",
|
||||
minHeight: "32px", // 범례 영역 높이 통일
|
||||
minHeight: "60px", // 범례 영역 높이 통일
|
||||
} as CSSProperties,
|
||||
};
|
||||
const renderCustomizedLabel = ({
|
||||
|
||||
Reference in New Issue
Block a user