Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba56426947 | ||
|
|
1e650a72ba | ||
|
|
2c6327bc3a | ||
|
|
9973b35802 | ||
|
|
9bdf01e7f3 | ||
|
|
cb83b7f92b | ||
|
|
8653335aa9 | ||
|
|
59e3dbbe97 | ||
|
|
75bafd5a34 | ||
|
|
8ac807a550 | ||
|
|
9d2511c6ea | ||
|
|
8eea3c75aa | ||
|
|
cb0f316023 | ||
|
|
d23f928ddb | ||
|
|
6808430c9a |
@@ -376,87 +376,116 @@ export default function CoMatRvw() {
|
||||
<div className="col-span-12 w-full">
|
||||
<h1 className={formH1Class}>요구수질</h1>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grssClfg"
|
||||
render={({ field }) => (
|
||||
<FormUi label="총대장균군수 (개/100ml)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
step="0.1"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<FormUi label={"총대장균군수(개/mg)"}>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="relative flex-1 min-w-0">
|
||||
<Input
|
||||
type="text"
|
||||
className="w-full pr-16 border py-2 text-right rounded-md"
|
||||
placeholder=""
|
||||
value={
|
||||
field.value != -1
|
||||
? `${field.value}`
|
||||
: "불검출"
|
||||
}
|
||||
readOnly
|
||||
/>
|
||||
{/* TODO: 총대장균군수 확인 필요*/}
|
||||
{field.value != -1 ? (
|
||||
<span className="text-xl absolute inset-y-0 right-3 flex items-center text-gray-500 pointer-events-none">
|
||||
이하
|
||||
</span>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="combResdch"
|
||||
render={({ field }) => (
|
||||
<FormUi label="결합잔류염소(mg/L)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
step="0.1"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<FormUi label={"결합잔류염소(mg/L)"}>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="relative flex-1 min-w-0">
|
||||
<Input
|
||||
type="text"
|
||||
className="w-full pr-16 border py-2 text-right rounded-md"
|
||||
placeholder=""
|
||||
value={field.value ?? ""}
|
||||
readOnly
|
||||
/>
|
||||
<span className="text-xl absolute inset-y-0 right-3 flex items-center text-gray-500 pointer-events-none">
|
||||
이상
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="trbt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="탁도(NTU)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
step="0.1"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="relative flex-1 min-w-0">
|
||||
<Input
|
||||
placeholder=""
|
||||
className="w-full pr-16 border py-2 text-right rounded-md"
|
||||
type="text"
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<span className=" text-xl absolute inset-y-0 right-3 flex items-center text-gray-500 pointer-events-none">
|
||||
이하
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="blgcOxygDmndQnt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="생물학적 산소요구량(BOD)(mg/L)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
step="0.1"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="relative flex-1 min-w-0">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="text"
|
||||
className="w-full pr-16 border py-2 text-right rounded-md"
|
||||
step="0.1"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? ""}
|
||||
readOnly
|
||||
/>
|
||||
<span className="text-xl absolute inset-y-0 right-3 flex items-center text-gray-500 pointer-events-none">
|
||||
이하
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="smll"
|
||||
@@ -464,138 +493,172 @@ export default function CoMatRvw() {
|
||||
<FormUi label="냄새">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
step="0.1"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
type="text"
|
||||
value={field.value ?? ""}
|
||||
readOnly
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="crmty"
|
||||
render={({ field }) => (
|
||||
<FormUi label="색도(도)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
step="0.1"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="relative flex-1 min-w-0">
|
||||
<Input
|
||||
placeholder=""
|
||||
className="w-full pr-16 border py-2 text-right rounded-md"
|
||||
type="text"
|
||||
step="0.1"
|
||||
value={field.value ?? ""}
|
||||
readOnly
|
||||
/>
|
||||
<span className="text-xl absolute inset-y-0 right-3 flex items-center text-gray-500 pointer-events-none">
|
||||
이하
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="tn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="총질소 (T-N)(mg/L)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
step="0.1"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<FormUi label="총질소(T-N)(mg/L)">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="relative flex-1 min-w-0">
|
||||
<Input
|
||||
placeholder=""
|
||||
className="w-full pr-16 border py-2 text-right rounded-md"
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<span className="text-xl absolute inset-y-0 right-3 flex items-center text-gray-500 pointer-events-none">
|
||||
이하
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="tph"
|
||||
render={({ field }) => (
|
||||
<FormUi label="총인(T-P)(mg/L)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
step="0.1"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="relative flex-1 min-w-0">
|
||||
<Input
|
||||
placeholder=""
|
||||
className="w-full pr-16 border py-2 text-right rounded-md"
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<span className="text-xl absolute inset-y-0 right-3 flex items-center text-gray-500 pointer-events-none">
|
||||
이하
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="ph"
|
||||
render={({ field }) => (
|
||||
<FormUi label="수소이온농도(pH)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
step="0.1"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<FormUi label="수소이온농도(PH)">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="relative flex-1 min-w-0">
|
||||
<Input
|
||||
placeholder=""
|
||||
className="w-full pr-16 border py-2 text-right rounded-md"
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="clIonQnt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="염화물(mgCL/L)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
step="0.1"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="relative flex-1 min-w-0">
|
||||
<Input
|
||||
placeholder=""
|
||||
className="w-full pr-16 border py-2 text-right rounded-md"
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<span className="text-xl absolute inset-y-0 right-3 flex items-center text-gray-500 pointer-events-none">
|
||||
이하
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="cdtnv"
|
||||
render={({ field }) => (
|
||||
<FormUi label="전기전도도(㎲/cm)">
|
||||
<Input
|
||||
placeholder=""
|
||||
type="number"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="relative flex-1 min-w-0">
|
||||
<Input
|
||||
placeholder=""
|
||||
className="w-full pr-16 border py-2 text-right rounded-md"
|
||||
type="text"
|
||||
onChange={(e) => {
|
||||
field.onChange(Number(e.target.value));
|
||||
}}
|
||||
value={field.value ?? 0}
|
||||
readOnly
|
||||
/>
|
||||
<span className="text-xl absolute inset-y-0 right-3 flex items-center text-gray-500 pointer-events-none">
|
||||
이하
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="rmrk"
|
||||
@@ -648,7 +711,7 @@ export default function CoMatRvw() {
|
||||
form={form}
|
||||
type={"mat"}
|
||||
selectionVersion={selectionVersion}
|
||||
readonly={regAuthrtYn ==="N"}
|
||||
readonly={regAuthrtYn === "N"}
|
||||
/>
|
||||
</ListDiv>
|
||||
{/* </ScrollArea> */}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { btnClass } from "@/app/store/common/code";
|
||||
import { excelCoSttnParsing } from "@/app/store/matDmd/coSttn/excel";
|
||||
import { fetchType, getFetch } from "@/components/lib/api";
|
||||
import {
|
||||
confirmToast,
|
||||
excelDownload,
|
||||
formatPhoneNumber,
|
||||
getCity,
|
||||
@@ -30,6 +31,7 @@ import { Button } from "@common/components/ui";
|
||||
import moment from "moment";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function CoSttn() {
|
||||
const {
|
||||
@@ -43,6 +45,7 @@ export default function CoSttn() {
|
||||
updateDemandCompany,
|
||||
coSttnTxtSearch,
|
||||
demandCompList,
|
||||
coSttnPwInit,
|
||||
} = useWrStore((state) => state);
|
||||
const { regAuthrtYn, mdfcnAuthrtYn } = auth;
|
||||
|
||||
@@ -103,9 +106,8 @@ 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)
|
||||
dmdInfoId: `${item.dmdInfoId.slice(0, 3)}-${item.dmdInfoId.slice(3, 5)}-${item.dmdInfoId.slice(5, 10)}-${item.dmdInfoId.slice(10)}`
|
||||
}));
|
||||
// .filter((item: any) => item !== undefined);
|
||||
setBdstTable(chData);
|
||||
} else if (coSttnRes?.length == 0) {
|
||||
@@ -127,7 +129,7 @@ export default function CoSttn() {
|
||||
coExcel as [],
|
||||
"수요처 관리",
|
||||
"sample_coSttn.xlsx",
|
||||
"A1:H1",
|
||||
"A1:G1",
|
||||
2
|
||||
);
|
||||
}
|
||||
@@ -156,6 +158,19 @@ export default function CoSttn() {
|
||||
}
|
||||
}
|
||||
};
|
||||
const { t } = useTranslation('base');
|
||||
const initPassword = () => {
|
||||
if (upadateData) {
|
||||
const dmdInfoId = upadateData.dmdInfoId;
|
||||
const dmdInfoSliceId = `${dmdInfoId.slice(0, 3)}-${dmdInfoId.slice(3, 5)}-${dmdInfoId.slice(5, 10)}-${dmdInfoId.slice(10)}`
|
||||
const handleConfirm = () => {
|
||||
coSttnPwInit(dmdInfoId);
|
||||
};
|
||||
confirmToast( t('isInitPw', { dmdInfoId: dmdInfoSliceId }), handleConfirm, 'text-2xl');
|
||||
} else {
|
||||
toast.error("비밀번호 초기화를 원하는 행을 선택해주세요.")
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -167,7 +182,7 @@ export default function CoSttn() {
|
||||
<SearchFormLeft>
|
||||
<div className="col-span-10 flex flex-row">
|
||||
<SelectBox
|
||||
className="col-span-2 w-1/6 h-full text-2xl"
|
||||
className="col-span-3 w-1/6 h-full text-2xl"
|
||||
label="시도"
|
||||
selectClass={""}
|
||||
selectArray={code.cityCd || []}
|
||||
@@ -178,7 +193,7 @@ export default function CoSttn() {
|
||||
value={objSearch.city}
|
||||
/>
|
||||
<SelectBox
|
||||
className="col-span-2 w-1/6 h-full text-2xl"
|
||||
className="col-span-3 w-1/6 h-full text-2xl ml-4"
|
||||
label="시군구"
|
||||
selectClass={""}
|
||||
selectArray={selectSgg || []}
|
||||
@@ -186,7 +201,7 @@ export default function CoSttn() {
|
||||
value={objSearch.sgg}
|
||||
/>
|
||||
<SearchInput
|
||||
className={"!text-3xl"}
|
||||
className={"!text-3xl ml-4"}
|
||||
label="회사명"
|
||||
textValue={seartchTxt ?? ""}
|
||||
setText={(e) => {
|
||||
@@ -195,7 +210,7 @@ export default function CoSttn() {
|
||||
/>
|
||||
</div>
|
||||
</SearchFormLeft>
|
||||
<SearchFormRight className="w-2/12 mx-5 flex flex-col items-center justify-center space-x-2 ">
|
||||
<SearchFormRight className="w-3/12 mx-5 flex flex-col items-center justify-center space-x-2 ">
|
||||
<div className="flex flex-row space-x-2">
|
||||
<Button className="mt-2" size={"sm"} onClick={searchClick}>
|
||||
조회
|
||||
@@ -236,6 +251,13 @@ export default function CoSttn() {
|
||||
>
|
||||
다운로드
|
||||
</Button>
|
||||
<Button
|
||||
size={"sm"}
|
||||
className={`${btnClass}`}
|
||||
onClick={(initPassword)}
|
||||
>
|
||||
비밀번호 초기화
|
||||
</Button>
|
||||
</div>
|
||||
</SearchFormRight>
|
||||
</SearchDiv>
|
||||
@@ -267,7 +289,7 @@ export default function CoSttn() {
|
||||
</div>
|
||||
<UiModal
|
||||
bodyClass={
|
||||
"w-[40vw] max-w-none h-[80vh] " // +upadateData?.dmdInfoId?'h-[60vh]':'h-[90vh]'
|
||||
"w-[40vw] max-w-none h-[83vh] " // +upadateData?.dmdInfoId?'h-[60vh]':'h-[90vh]'
|
||||
}
|
||||
open={isDmdModal.isMoal}
|
||||
onOpenChange={() => {
|
||||
@@ -286,9 +308,7 @@ export default function CoSttn() {
|
||||
objSearch.sgg && objSearch.sgg !== "0"
|
||||
? objSearch.sgg
|
||||
: objSearch.city;
|
||||
console.log("data ", data);
|
||||
if (upadateData?.dmdInfoId) {
|
||||
console.log("data ", data);
|
||||
await updateDemandCompany(data as DemandCompType);
|
||||
coSttnInit("1", "13", String(con));
|
||||
setIsDmdModal({
|
||||
|
||||
@@ -21,6 +21,8 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function PbnstSttn() {
|
||||
const {
|
||||
@@ -46,10 +48,11 @@ export default function PbnstSttn() {
|
||||
isModal: boolean;
|
||||
data: customPbnst;
|
||||
}>({ isModal: false, data: {} as customPbnst });
|
||||
|
||||
const isDownloadTriggered = useRef(false);
|
||||
const [pbnRuseNm, setPbnRuseNm] = useState<string>("");
|
||||
|
||||
const { t } = useTranslation('base');
|
||||
const excelClick = useCallback(() => {
|
||||
isDownloadTriggered.current = true;
|
||||
pbnstSttnSearch(
|
||||
true,
|
||||
String(1),
|
||||
@@ -77,9 +80,9 @@ export default function PbnstSttn() {
|
||||
}, [pbnstSttn.isInit]);
|
||||
useEffect(() => {
|
||||
|
||||
pbnSttnInit("1", "15", ref.current, searchYear, fclts);
|
||||
pbnSttnInit("1", "15", ref.current, searchYear, fclts);
|
||||
}, [fclts]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (pbnstSttnRes && pbnstSttnRes.length > 0) {
|
||||
setBdstTable(pbnstSttnRes);
|
||||
@@ -90,7 +93,10 @@ export default function PbnstSttn() {
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (pbnstSttn.excelList.length >= 0) {
|
||||
if (!isDownloadTriggered.current) {
|
||||
return;
|
||||
}
|
||||
if (pbnstSttn.excelList.length > 0) {
|
||||
excelDownload(
|
||||
pbnstSttn.excelList,
|
||||
"하수재이용시설 현황",
|
||||
@@ -98,7 +104,10 @@ export default function PbnstSttn() {
|
||||
"A1:U2",
|
||||
3
|
||||
);
|
||||
} else {
|
||||
toast.error(t('excelDownErrMsg'));
|
||||
}
|
||||
isDownloadTriggered.current = false;
|
||||
}, [pbnstSttn.excelList]);
|
||||
|
||||
|
||||
@@ -162,8 +171,8 @@ export default function PbnstSttn() {
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
queryClick={ ()=> {
|
||||
// pbnSearch(returnType);
|
||||
queryClick={() => {
|
||||
// pbnSearch(returnType);
|
||||
|
||||
//setTableIndex(0)
|
||||
setIsReset(true);
|
||||
@@ -202,7 +211,7 @@ export default function PbnstSttn() {
|
||||
);
|
||||
setIsReset(false);
|
||||
}}
|
||||
|
||||
|
||||
resetPageNo={isReset}
|
||||
>
|
||||
<HeadMakeColSpan upHeadList={pbnstSttn.pbnstSttNodeList} />
|
||||
@@ -242,6 +251,7 @@ export default function PbnstSttn() {
|
||||
}}
|
||||
/>
|
||||
</ContentsDiv>
|
||||
<Toaster position="top-center" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -118,13 +118,33 @@ export default function Page() {
|
||||
const rainPageChange = (pageNo: number) => {
|
||||
if (pageNo > 0) {
|
||||
setRainPageNation(pageNo);
|
||||
rainChkInit(pageNo, rainPageSize, searchYear, commonCd);
|
||||
if (fcltNm) {
|
||||
rainChkNmSearch(
|
||||
pageNo,
|
||||
rainPageSize,
|
||||
searchYear,
|
||||
commonCd,
|
||||
fcltNm
|
||||
);
|
||||
} else {
|
||||
rainChkInit(pageNo, rainPageSize, searchYear, commonCd);
|
||||
}
|
||||
}
|
||||
};
|
||||
const rswtPageChange = (pageNo: number) => {
|
||||
if (pageNo > 0) {
|
||||
setRswtPageNation(pageNo);
|
||||
rswtChkgdnInit(pageNo, rswtPageSize, searchYear, commonCd);
|
||||
if (fcltNm) {
|
||||
rswtChkNmSearch(
|
||||
pageNo,
|
||||
rainPageSize,
|
||||
searchYear,
|
||||
commonCd,
|
||||
fcltNm
|
||||
);
|
||||
} else {
|
||||
rswtChkgdnInit(pageNo, rswtPageSize, searchYear, commonCd);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -83,14 +83,34 @@ export default function Page() {
|
||||
const rainPageChange = (pageNo: number) => {
|
||||
if (pageNo > 0) {
|
||||
setRainPageNation(pageNo);
|
||||
rainChkSttnInit(pageNo, rainPageSize, searchYear, commonCd);
|
||||
if (fcltNm) {
|
||||
rainChkSttnNmSearch(
|
||||
pageNo,
|
||||
rainPageSize,
|
||||
searchYear,
|
||||
commonCd,
|
||||
fcltNm
|
||||
);
|
||||
} else {
|
||||
rainChkSttnInit(pageNo, rainPageSize, searchYear, commonCd);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const rswtPageChange = (pageNo: number) => {
|
||||
if (pageNo > 0) {
|
||||
setRswtPageNation(pageNo);
|
||||
rswtChkSttnInit(pageNo, rswtPageSize, searchYear, commonCd);
|
||||
if (fcltNm) {
|
||||
rswtChkNmSttnSearch(
|
||||
pageNo,
|
||||
rainPageSize,
|
||||
searchYear,
|
||||
commonCd,
|
||||
fcltNm
|
||||
);
|
||||
} else {
|
||||
rswtChkSttnInit(pageNo, rswtPageSize, searchYear, commonCd);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { CommonTableProps } from "@/app/store/common/type/header";
|
||||
import { fetchType, getFetchWithCount } from "@/components/lib/api";
|
||||
import { fetchType, getFetchWithCount, putFectch } from "@/components/lib/api";
|
||||
import type { DemandCompType } from "@common/business_components/ui/sdmInsertForm/form";
|
||||
import { coSttHeadListExport, coSttNodeListExport } from "./headList";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
// 테이블 헤드 리스트
|
||||
const coSttNodeList = coSttNodeListExport;
|
||||
@@ -21,9 +22,10 @@ export type coSttnState = {
|
||||
};
|
||||
|
||||
type coSttnActions = {
|
||||
coSttnInit:(pageNo:string, pageCnt:string, con: string) => void;
|
||||
coSttnSearch: (pageNo:string, pageCnt:string, con: string) => void;
|
||||
coSttnTxtSearch:(pageNo:string, pageCnt:string, con: string,txt:string) => void;
|
||||
coSttnInit: (pageNo: string, pageCnt: string, con: string) => void;
|
||||
coSttnSearch: (pageNo: string, pageCnt: string, con: string) => void;
|
||||
coSttnTxtSearch: (pageNo: string, pageCnt: string, con: string, txt: string) => void;
|
||||
coSttnPwInit: (dmdInfoId: string) => void;
|
||||
};
|
||||
|
||||
export type coSttnType = coSttnState & coSttnActions;
|
||||
@@ -44,7 +46,7 @@ export const coSttnActionsExport: (set: any) => coSttnActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
coSttnInit: async (pageNo:string, pageCnt:string, con: string) => {
|
||||
coSttnInit: async (pageNo: string, pageCnt: string, con: string) => {
|
||||
try {
|
||||
|
||||
const coSttnRes = await getFetchWithCount(
|
||||
@@ -67,56 +69,81 @@ export const coSttnActionsExport: (set: any) => coSttnActions = (
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
coSttnSearch: async (pageNo:string, pageCnt:string, con: string) => {
|
||||
try {
|
||||
const coSttnRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/reuseFc/request/${pageNo}/${pageCnt}/${con}`
|
||||
);
|
||||
if (Number(pageCnt) >= 10000) {
|
||||
set((state: coSttnState) => {
|
||||
return {
|
||||
...state,
|
||||
coSttn: {
|
||||
...state.coSttn,
|
||||
excelList: coSttnRes.data,
|
||||
//isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
} else
|
||||
set((state: coSttnState) => {
|
||||
return {
|
||||
...state,
|
||||
coSttn: {
|
||||
...state.coSttn,
|
||||
coSttnRes: coSttnRes.data,
|
||||
isInit: false,
|
||||
coSttnResCount : coSttnRes.count,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (erTxt) {
|
||||
console.log("error", erTxt);
|
||||
}
|
||||
},
|
||||
coSttnTxtSearch: async (pageNo:string, pageCnt:string, con: string, txt: string) => {
|
||||
try {
|
||||
const coSttnRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/reuseFc/request/${pageNo}/${pageCnt}/${con}/${txt}`)
|
||||
set((state: coSttnState) => {
|
||||
return {
|
||||
...state,
|
||||
coSttn: {
|
||||
...state.coSttn,
|
||||
coSttnRes: coSttnRes.data,
|
||||
coSttnResCount: coSttnRes.count,
|
||||
isInit: false,
|
||||
}}})
|
||||
} catch (erTxt) {
|
||||
console.log("error", erTxt);
|
||||
coSttnSearch: async (pageNo: string, pageCnt: string, con: string) => {
|
||||
try {
|
||||
const coSttnRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/reuseFc/request/${pageNo}/${pageCnt}/${con}`
|
||||
);
|
||||
if (Number(pageCnt) >= 10000) {
|
||||
set((state: coSttnState) => {
|
||||
return {
|
||||
...state,
|
||||
coSttn: {
|
||||
...state.coSttn,
|
||||
excelList: coSttnRes.data,
|
||||
//isInit: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
} else
|
||||
set((state: coSttnState) => {
|
||||
return {
|
||||
...state,
|
||||
coSttn: {
|
||||
...state.coSttn,
|
||||
coSttnRes: coSttnRes.data,
|
||||
isInit: false,
|
||||
coSttnResCount: coSttnRes.count,
|
||||
},
|
||||
};
|
||||
});
|
||||
} catch (erTxt) {
|
||||
console.log("error", erTxt);
|
||||
}
|
||||
},
|
||||
coSttnTxtSearch: async (pageNo: string, pageCnt: string, con: string, txt: string) => {
|
||||
try {
|
||||
const coSttnRes = await getFetchWithCount(
|
||||
fetchType.WR,
|
||||
`/reuseFc/request/${pageNo}/${pageCnt}/${con}/${txt}`)
|
||||
set((state: coSttnState) => {
|
||||
return {
|
||||
...state,
|
||||
coSttn: {
|
||||
...state.coSttn,
|
||||
coSttnRes: coSttnRes.data,
|
||||
coSttnResCount: coSttnRes.count,
|
||||
isInit: false,
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (erTxt) {
|
||||
console.log("error", erTxt);
|
||||
}
|
||||
},
|
||||
coSttnPwInit: async (dmdInfoId: string) => {
|
||||
try {
|
||||
const response = await putFectch(`/reuseFc/request/chgPassword/${dmdInfoId}`,[])
|
||||
if (response.status === 200) {
|
||||
toast.success('비밀번호가 초기화 되었습니다.')
|
||||
} else {
|
||||
toast.error('비밀번호 초기화에 실패하였습니다')
|
||||
}
|
||||
set((state: coSttnState) => {
|
||||
return {
|
||||
...state,
|
||||
coSttn: {
|
||||
...state.coSttn,
|
||||
isInit: false,
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
toast.error('비밀번호 초기화에 실패하였습니다.')
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,20 +132,20 @@ export const excelToRainChkData = (excelData: any, year: string) => {
|
||||
bdstNm: item["시설명"] ?? "",
|
||||
bdstRuseFcltSn: Number(item["NO"]),
|
||||
chckYmd: checkYmd,
|
||||
spwtPositn: item["유량측정방법"] ?? "",
|
||||
rgtr: TEST_UUID,
|
||||
oilqMeasMthd: item["운영관리형태"] ?? "",
|
||||
operMngCd: item["운영관리형태"] ?? "",
|
||||
anlOperCst: parseRawValue(item["연간운영비(원/년)"]),
|
||||
operMngCd: item["유량측정방법"] ?? "",
|
||||
oilqMeasMthd: item["유량측정방법"] ?? "",
|
||||
guideDetails: makeGuidDetail,
|
||||
rainyDetails: [
|
||||
{
|
||||
ph: item["PH"],
|
||||
utztnUsgCd: item["이용용도"],
|
||||
trbt: parseRawValue(item["탁도"]),
|
||||
grssClfg: parseRawValue(item["총대장균군수"]),
|
||||
etc: item["기타"] || "", // 필드 누락 방지
|
||||
vltnDt: vltnDt || "-",
|
||||
vltnMttr: item["위반사항"] || "-",
|
||||
vltnDt: vltnDt || "",
|
||||
vltnMttr: item["위반사항"] || "",
|
||||
levyAmt: parseRawValue(item["과태료부과금액(천원)"]),
|
||||
rgtr: TEST_UUID,
|
||||
},
|
||||
@@ -177,12 +177,6 @@ console.log("rainChkgdData", rainChkgdData);
|
||||
defaultMessage + `유량측정방법: 위탁 혹은 자체 만 허용) /입력값:${rain.oilqMeasMthd}`
|
||||
);
|
||||
}
|
||||
if (rain.spwtPositn.length > 1 && !chkSpwtPositnType.includes(rain.spwtPositn)) {
|
||||
issues.push(
|
||||
defaultMessage + `측정위치: 유량계, 수위계, 펌프적산전력계, 기타 중 하나만 허용) /입력값:${rain.spwtPositn}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
rain.rainyDetails?.forEach((key) => {
|
||||
if (key.ph?.length > 1 && isInvalidNumber(key.ph)) {
|
||||
|
||||
@@ -63,7 +63,7 @@ export const rainChkZod = z.object({
|
||||
z.object({
|
||||
chkgdnSn: z.number().nullable(),
|
||||
utztnUsgCd: z.string(),
|
||||
ph: z.number().nullable(),
|
||||
ph:z.string().nullish(),
|
||||
trbt: z.number().nullable(),
|
||||
grssClfg: z.number().nullable(),
|
||||
etc: z.string().nullable(),
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
import type { SelectDataType } from "@common/business_components/ui";
|
||||
import {
|
||||
chkMngType,
|
||||
chkSpwtPositnType,
|
||||
useTypes,
|
||||
type Buildingtype,
|
||||
} from "../rainChkgdn/excel";
|
||||
import { TEST_UUID } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import type { rswtChkZodType } from ".";
|
||||
import {
|
||||
isInvalidDate,
|
||||
isInvalidNumber,
|
||||
parseRawValue,
|
||||
} from "@/components/lib/func/excelFunc";
|
||||
import type { SelectDataType } from "@common/business_components/ui";
|
||||
import type { rswtChkZodType } from ".";
|
||||
import {
|
||||
chkSpwtPositnType,
|
||||
useTypes,
|
||||
type Buildingtype
|
||||
} from "../rainChkgdn/excel";
|
||||
|
||||
export const rswtMakeExcelSample = (
|
||||
buildings: Buildingtype[],
|
||||
@@ -284,15 +283,6 @@ const rswtExcelDataCheck = (
|
||||
defaultMessage + ` 처리용량(m³): 숫자 형식 아님 (${rswt.prcsCpct})`
|
||||
);
|
||||
}
|
||||
if (
|
||||
rswt.oilqMeasMthd.length > 1 &&
|
||||
!chkMngType.includes(rswt.oilqMeasMthd)
|
||||
) {
|
||||
issues.push(
|
||||
defaultMessage +
|
||||
`유량측정방법: 위탁 혹은 자체 만 허용) /입력값:${rswt.oilqMeasMthd}`
|
||||
);
|
||||
}
|
||||
if (
|
||||
rswt.spwtPositn.length > 1 &&
|
||||
!chkSpwtPositnType.includes(rswt.spwtPositn)
|
||||
|
||||
@@ -163,11 +163,11 @@ export const rswtChkHeadListExport: TableUpperProps[] = [
|
||||
},
|
||||
{ id: "trbt", title: "탁도(NTU)", upName: "useQuilty", upSequnce: 3 ,type: "number"},
|
||||
{ id: "bod", title: "BOD(mg/L)", upName: "useQuilty", upSequnce: 4 ,type: "number"},
|
||||
{ id: "smll", title: "냄새", upName: "useQuilty", upSequnce: 5 ,type: "number"},
|
||||
{ id: "smll", title: "냄새", upName: "useQuilty", upSequnce: 5 ,type: "text"},
|
||||
{ id: "crmty", title: "색도(도)", upName: "useQuilty", upSequnce: 6 ,type: "number"},
|
||||
{ id: "tn", title: "총질소(T-N)(mg/L)", upName: "useQuilty", upSequnce: 7 ,type: "number"},
|
||||
{ id: "tph", title: "총인(T-P)(mg/L)", upName: "useQuilty", upSequnce: 8 ,type: "number"},
|
||||
{ id: "ph", title: "수소이온농도(PH)", upName: "useQuilty", upSequnce: 9,type: "number" },
|
||||
{ id: "ph", title: "수소이온농도(PH)", upName: "useQuilty", upSequnce: 9,type: "text" },
|
||||
{ id: "clIonQnt", title: "염화물(mg/L)", upName: "useQuilty", upSequnce: 10 ,type: "number"},
|
||||
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ export const rswtChkSttnHeadListExport: TableUpperProps[] = [
|
||||
title: "냄새",
|
||||
upName: "useQuilty",
|
||||
upSequnce: 5,
|
||||
type: "number",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
id: "crmty",
|
||||
@@ -64,7 +64,7 @@ export const rswtChkSttnHeadListExport: TableUpperProps[] = [
|
||||
upSequnce: 8,
|
||||
type: "number",
|
||||
},
|
||||
{ id: "ph", title: "수소이온농도(PH)", upName: "useQuilty", upSequnce: 9, type: "number" },
|
||||
{ id: "ph", title: "수소이온농도(PH)", upName: "useQuilty", upSequnce: 9, type: "text" },
|
||||
{
|
||||
id: "clIonQnt",
|
||||
title: "염화물(mg/L)",
|
||||
|
||||
@@ -2,8 +2,18 @@ import { numSize } from "@/app/store/common/code/basicCode";
|
||||
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, handleCommaNumberChange } from "./commom";
|
||||
import {
|
||||
Checkbox,
|
||||
Input,
|
||||
TableCell,
|
||||
TableRow,
|
||||
} from "@common/components/ui";
|
||||
import moment from "moment";
|
||||
import {
|
||||
formatCommaNumber,
|
||||
formatYyyymmdd,
|
||||
handleCommaNumberChange
|
||||
} from "./commom";
|
||||
|
||||
export const rainChkTableData = (chkData: rainChkZodType[]) => {
|
||||
// 1. chkgdnSn + utztnUsgCd 기준 누계 정보 만들기
|
||||
@@ -57,9 +67,7 @@ export const rswtChkTableData = (chkData: rswtChkZodType[]) => {
|
||||
// 1. chkgdnSn + utztnUsgCd 기준 누계 정보 만들기
|
||||
const makeRswtData: any[] = [];
|
||||
|
||||
|
||||
if (chkData && chkData.length > 0) {
|
||||
|
||||
chkData?.forEach((root) => {
|
||||
root.rswtrDetails.forEach((detail) => {
|
||||
let flatRswtChk = {};
|
||||
@@ -96,20 +104,19 @@ export const chRowspanTable = (
|
||||
toggleSelection: (pk: number, checked: boolean) => void,
|
||||
selectedIds: number[],
|
||||
handleCellClick: (index: number, headId: string) => void,
|
||||
disable? : boolean
|
||||
disable?: boolean
|
||||
) => {
|
||||
let order = 0
|
||||
let order = 0;
|
||||
// rowspan된 셀 렌더링 여부 추적용
|
||||
const renderedMap = new Map<string, Set<number>>();
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* {makeTableData.map((row, rowIndex) => ( */}
|
||||
{makeTableData && makeTableData.length > 0 ? (makeTableData.map((row, rowIndex) => (
|
||||
<TableRow key={rowIndex}>
|
||||
{headList
|
||||
.map((head) => {
|
||||
|
||||
{makeTableData && makeTableData.length > 0 ? (
|
||||
makeTableData.map((row, rowIndex) => (
|
||||
<TableRow key={rowIndex}>
|
||||
{headList.map((head) => {
|
||||
const key = head.id;
|
||||
const isMerged = head.mergeCell;
|
||||
const value = row[key];
|
||||
@@ -118,7 +125,6 @@ export const chRowspanTable = (
|
||||
if (isMerged) {
|
||||
const renderedSet = renderedMap.get(key) ?? new Set<number>();
|
||||
if (renderedSet.has(rowIndex)) {
|
||||
|
||||
return null; // 이미 렌더링된 셀은 skip
|
||||
}
|
||||
|
||||
@@ -143,14 +149,17 @@ export const chRowspanTable = (
|
||||
></Checkbox>
|
||||
) : key === "order" ? (
|
||||
++order
|
||||
) : (
|
||||
// value
|
||||
(["anlOperCst", "dtfcltCpct", "prcsCpct"].includes(head.id)) ? (
|
||||
) : // value
|
||||
["anlOperCst", "dtfcltCpct", "prcsCpct"].includes(
|
||||
head.id
|
||||
) ? (
|
||||
formatCommaNumber(value)
|
||||
) : (
|
||||
<>{value}</>
|
||||
)
|
||||
)}
|
||||
) : key === "chckYmd" ? (
|
||||
<>{formatYyyymmdd(value)}</>
|
||||
) :
|
||||
(
|
||||
<>{value}</>
|
||||
)}
|
||||
</TableCell>
|
||||
);
|
||||
}
|
||||
@@ -163,23 +172,48 @@ export const chRowspanTable = (
|
||||
onClick={() => handleCellClick(rowIndex, head.id)}
|
||||
>
|
||||
{head.edit === true ? (
|
||||
(["levyAmt", "anlOperCst", "dtfcltCpct", "prcsCpct"].includes(head.id)) ? (
|
||||
[
|
||||
"levyAmt",
|
||||
"anlOperCst",
|
||||
"dtfcltCpct",
|
||||
"prcsCpct",
|
||||
].includes(head.id) ? (
|
||||
<Input
|
||||
className={`${head.type === "number" ? "text-right" : "text-center"} !text-xl`}
|
||||
type={head.type}
|
||||
onChange={(e) => {
|
||||
handleCommaNumberChange(e, val =>
|
||||
handleChange(rowIndex, head.id, val))
|
||||
handleCommaNumberChange(e, (val) =>
|
||||
handleChange(rowIndex, head.id, val)
|
||||
);
|
||||
}}
|
||||
value={formatCommaNumber(value) || ""}
|
||||
disabled={!selectedIds.includes(row.chkgdnSn)}
|
||||
maxLength={numSize}
|
||||
onInput={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (head.type === 'number' && e.target.value.length > numSize) {
|
||||
if (
|
||||
head.type === "number" &&
|
||||
e.target.value.length > numSize
|
||||
) {
|
||||
e.target.value = e.target.value.slice(0, numSize);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
) : ["vltnDt"].includes(head.id) ? (
|
||||
<Input
|
||||
type="date"
|
||||
onChange={(e) => {
|
||||
// 브라우저에서 선택한 값은 "YYYY-MM-DD"
|
||||
const rawDate = e.target.value; // e.g. "2025-06-01"
|
||||
const yyyymmdd = moment(rawDate).format("YYYYMMDD");
|
||||
handleChange(rowIndex, head.id, yyyymmdd);
|
||||
}}
|
||||
value={
|
||||
value
|
||||
? moment(value, "YYYYMMDD").format("YYYY-MM-DD")
|
||||
: ""
|
||||
}
|
||||
disabled={!selectedIds.includes(row.chkgdnSn)}
|
||||
/>
|
||||
) : (
|
||||
<Input
|
||||
className={`${head.type === "number" ? "text-right" : "text-center"} !text-xl`}
|
||||
@@ -191,28 +225,52 @@ export const chRowspanTable = (
|
||||
disabled={!selectedIds.includes(row.chkgdnSn)}
|
||||
maxLength={numSize}
|
||||
onInput={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (head.type === 'number' && e.target.value.length > numSize) {
|
||||
if (
|
||||
head.type === "number" &&
|
||||
e.target.value.length > numSize
|
||||
) {
|
||||
e.target.value = e.target.value.slice(0, numSize);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)
|
||||
) : ["smll", "ph"].includes(head.id) && head.type === "text" ? (
|
||||
<>-</>
|
||||
) : [
|
||||
"totalSplyUswtrUtztnQnt",
|
||||
"totalRuseFcltUtztnQnt",
|
||||
"splyUswtrUtztnQnt",
|
||||
"ruseFcltUtztnQnt",
|
||||
"levyAmt",
|
||||
].includes(head.id) ? (
|
||||
<span
|
||||
className={
|
||||
[
|
||||
"totalSplyUswtrUtztnQnt",
|
||||
"totalRuseFcltUtztnQnt",
|
||||
"splyUswtrUtztnQnt",
|
||||
"ruseFcltUtztnQnt",
|
||||
].includes(head.id)
|
||||
? "underline text-blue-600 cursor-pointer"
|
||||
: ""
|
||||
}
|
||||
>
|
||||
{formatCommaNumber(value)}
|
||||
</span>
|
||||
) : (
|
||||
(["totalSplyUswtrUtztnQnt", "totalRuseFcltUtztnQnt", "splyUswtrUtztnQnt", "ruseFcltUtztnQnt", "levyAmt"].includes(head.id)) ? (
|
||||
<span className={["totalSplyUswtrUtztnQnt", "totalRuseFcltUtztnQnt", "splyUswtrUtztnQnt", "ruseFcltUtztnQnt"].includes(head.id) ? "underline text-blue-600 cursor-pointer" : ""}>
|
||||
{formatCommaNumber(value)}
|
||||
</span>
|
||||
) : (
|
||||
<>{value}</>
|
||||
)
|
||||
<>{value}</>
|
||||
)}
|
||||
</TableCell>
|
||||
);
|
||||
})}
|
||||
</TableRow>
|
||||
))) : (
|
||||
</TableRow>
|
||||
))
|
||||
) : (
|
||||
<TableRow>
|
||||
<TableCell colSpan={headList.length} className="h-24 text-center text-gray-500">
|
||||
<TableCell
|
||||
colSpan={headList.length}
|
||||
className="h-24 text-center text-gray-500"
|
||||
>
|
||||
조회된 결과가 없습니다.
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
@@ -221,16 +279,17 @@ export const chRowspanTable = (
|
||||
);
|
||||
};
|
||||
|
||||
export const headVisibleChange = (headList: TableUpperProps[], isEdit: boolean) => {
|
||||
export const headVisibleChange = (
|
||||
headList: TableUpperProps[],
|
||||
isEdit: boolean
|
||||
) => {
|
||||
return headList.forEach((head) => {
|
||||
if (head.edit !== undefined)
|
||||
head.edit = isEdit;
|
||||
if (head.id === 'checkBox') {
|
||||
head.visible = false
|
||||
if (head.edit !== undefined) head.edit = isEdit;
|
||||
if (head.id === "checkBox") {
|
||||
head.visible = false;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const handleChange = (
|
||||
rowIndex: number,
|
||||
@@ -253,8 +312,6 @@ const handleChange = (
|
||||
})
|
||||
);
|
||||
};
|
||||
;
|
||||
|
||||
export const InputTableBody = (
|
||||
chgRes: any[] | [],
|
||||
headList: TableUpperProps[],
|
||||
@@ -289,8 +346,21 @@ export const InputTableBody = (
|
||||
return (
|
||||
<TableRow key={dataIndex + "row"}>
|
||||
{headList.map((head, headIndex) => {
|
||||
const isTextColumn = head.id === '구분' || head.id === '용수명';
|
||||
const textAlignClass = isTextColumn ? 'text-center' : 'text-right';
|
||||
//냄새, ph면 계산 못하게 - 로 수정
|
||||
if (["smll", "ph"].includes(head.id)) {
|
||||
return (
|
||||
<TableCell
|
||||
key={head.id + headIndex}
|
||||
className={`w-36 ${bgClass} text-center !text-xl`}
|
||||
>
|
||||
<span>-</span>
|
||||
</TableCell>
|
||||
);
|
||||
}
|
||||
const isTextColumn = head.id === "구분" || head.id === "용수명";
|
||||
const textAlignClass = isTextColumn
|
||||
? "text-center"
|
||||
: "text-right";
|
||||
|
||||
// 총합계 행이면 "구분"에서 colSpan=2로 병합
|
||||
if (
|
||||
@@ -318,8 +388,13 @@ export const InputTableBody = (
|
||||
// 총합계 행의 나머지 셀에도 색상 적용
|
||||
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
|
||||
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>
|
||||
);
|
||||
}
|
||||
@@ -328,21 +403,35 @@ export const InputTableBody = (
|
||||
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}`}>
|
||||
{Number(data[head.id]) ? formatCommaNumber(data[head.id as keyof any]) : data[head.id as keyof any] ?? ""}
|
||||
<TableCell
|
||||
key={head.id + headIndex}
|
||||
rowSpan={rowSpan}
|
||||
className={`w-36 align-middle text-center whitespace-nowrap ${bgClass}`}
|
||||
>
|
||||
{Number(data[head.id])
|
||||
? formatCommaNumber(data[head.id as keyof any])
|
||||
: (data[head.id as keyof any] ?? "")}
|
||||
</TableCell>
|
||||
);
|
||||
}
|
||||
// 기본 셀
|
||||
// return head.edit === true && data.edit !== false ? (
|
||||
return isEditable && head.edit === true && data.edit !== false ? (
|
||||
<TableCell key={head.id + headIndex} className={`w-36 ${bgClass}`}>
|
||||
<TableCell
|
||||
key={head.id + headIndex}
|
||||
className={`w-36 ${bgClass}`}
|
||||
>
|
||||
<Input
|
||||
// className={`${head.id !== "utztnUsgCd" ? "text-right" : "text-center"} !text-xl h-10 w-full`}
|
||||
className={`${textAlignClass} !text-xl h-10 w-full`}
|
||||
onChange={(e) =>
|
||||
handleCommaNumberChange(e, val =>
|
||||
handleChange(dataIndex, head.id, String(val), setInputData)
|
||||
handleCommaNumberChange(e, (val) =>
|
||||
handleChange(
|
||||
dataIndex,
|
||||
head.id,
|
||||
String(val),
|
||||
setInputData
|
||||
)
|
||||
)
|
||||
}
|
||||
value={formatCommaNumber(data[head.id as keyof any]) ?? ""}
|
||||
@@ -350,15 +439,20 @@ export const InputTableBody = (
|
||||
/>
|
||||
</TableCell>
|
||||
) : (
|
||||
<TableCell key={head.id + headIndex} className={`w-36 ${bgClass}`}>
|
||||
<TableCell
|
||||
key={head.id + headIndex}
|
||||
className={`w-36 ${bgClass}`}
|
||||
>
|
||||
<div
|
||||
// className={`
|
||||
// ${head.id !== "utztnUsgCd" ? "text-right" : "text-center"}
|
||||
// !text-xl w-full h-10
|
||||
// ${head.id !== "utztnUsgCd" ? "text-right" : "text-center"}
|
||||
// !text-xl w-full h-10
|
||||
// `}
|
||||
className={`${textAlignClass} !text-xl w-full h-10`}
|
||||
>
|
||||
{Number(data[head.id]) ? formatCommaNumber(data[head.id as keyof any]) : 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>
|
||||
);
|
||||
@@ -368,11 +462,14 @@ export const InputTableBody = (
|
||||
})}
|
||||
{chgRes.length === 0 && (
|
||||
<TableRow>
|
||||
<TableCell colSpan={headList.length} className="h-24 text-center text-gray-500">
|
||||
<TableCell
|
||||
colSpan={headList.length}
|
||||
className="h-24 text-center text-gray-500"
|
||||
>
|
||||
조회된 결과가 없습니다.
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
type SheetParameter,
|
||||
} from "@common/business_components/ui";
|
||||
import { Button } from "@common/components/ui";
|
||||
import moment from "moment";
|
||||
import type { RefObject } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
@@ -150,6 +151,15 @@ export const formatCommaNumber = (
|
||||
return num.toLocaleString();
|
||||
};
|
||||
|
||||
//내가 쓰는 값이 숫자이냐 아니냐
|
||||
export const isNumeric =(value: string) => {
|
||||
if(value&&value.length>0){
|
||||
return value?.trim() !== "" && !isNaN(Number(value));
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
export const getCityOrSgg = (ref: RefObject<ReturnType>) => {
|
||||
let con;
|
||||
if (ref.current != null)
|
||||
@@ -163,6 +173,7 @@ export const getCityOrSgg = (ref: RefObject<ReturnType>) => {
|
||||
|
||||
export const safeDate = (value: any): Date | undefined => {
|
||||
const date = new Date(value);
|
||||
console.log(' date ', date)
|
||||
return isNaN(date.getTime()) ? undefined : date;
|
||||
};
|
||||
|
||||
@@ -201,11 +212,11 @@ export const formatPhoneNumber = (tel: string) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const confirmToast = (content: string, saveFunc: () => void) => {
|
||||
export const confirmToast = (content: string, saveFunc: () => void, contentClass?:string) => {
|
||||
toast(
|
||||
(t) => (
|
||||
<span className="flex flex-col items-center">
|
||||
<div className="mb-6">{content}</div>
|
||||
<div className={`mb-6 ${contentClass}`} >{content}</div>
|
||||
<div className="flex flex-row space-x-2">
|
||||
<Button
|
||||
size={"sm"}
|
||||
@@ -253,3 +264,13 @@ export const showConfirmToast = (message: string) => {
|
||||
{ duration: Infinity }
|
||||
); // 수동 닫기
|
||||
};
|
||||
|
||||
// yyyy-mm-dd 형태로 포맷
|
||||
export const formatYyyymmdd = (val: string | undefined) => {
|
||||
if (!val) return "";
|
||||
if (/^\d{8}$/.test(val)) {
|
||||
return moment(val, "YYYYMMDD").format("YYYY-MM-DD");
|
||||
}
|
||||
const m = moment(val);
|
||||
return m.isValid() ? m.format("YYYY-MM-DD") : val;
|
||||
};
|
||||
@@ -24,10 +24,11 @@ import { SelectBox } from "@common/business_components";
|
||||
import { DatePicker, FormUi, UiModal } from "@common/business_components/ui";
|
||||
import { Form, FormField } from "@common/business_components/ui/form";
|
||||
import { Button, Input, Label } from "@common/components";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useFieldArray, type UseFormReturn } from "react-hook-form";
|
||||
import MngRegFormDetail from "../mngReg/mngRegFormDetail/mngRegFormDetail";
|
||||
import {
|
||||
//confirmToast,
|
||||
formatCommaNumber,
|
||||
handleCommaNumberChange,
|
||||
safeDate,
|
||||
@@ -38,6 +39,9 @@ import type { DemandCompType } from "@common/business_components/ui/sdmInsertFor
|
||||
import RuseMngTableForm from "@/components/ui/table/pbnstReg/ruseMngTableForm/ruseMngTableForm";
|
||||
import type { SelectDataType } from "@common/business_components";
|
||||
import { BuseWaterQulity } from "./buseWaterQulity/buseWaterQulity";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
//import { useTranslation } from "react-i18next";
|
||||
|
||||
export function PbnstBuseForm({
|
||||
indexMng = 0,
|
||||
@@ -54,6 +58,8 @@ export function PbnstBuseForm({
|
||||
setIndexBiz: (index: number) => void;
|
||||
readonly?: boolean;
|
||||
}) {
|
||||
const { t } = useTranslation("base");
|
||||
|
||||
const {
|
||||
code,
|
||||
pbnst,
|
||||
@@ -157,22 +163,25 @@ export function PbnstBuseForm({
|
||||
}
|
||||
}, [fcBizs, indexBiz, setIndexBiz]);
|
||||
// 2. Define a submit handler.
|
||||
function addRuseFcltObj() {
|
||||
const addRuseFcltObj = useCallback(async () => {
|
||||
|
||||
const formRuse = form.getValues(`items.${indexMng}`);
|
||||
const formBizs = form.getValues(`items.${indexMng}.fcBizs`);
|
||||
const pbnstBizCycle = formBizs.length;
|
||||
|
||||
// 🧩 새로운 fcBizs 기본 객체 생성 (필수값만 채우고 나머지는 default로)
|
||||
const newItem = fcBizSchema.parse({
|
||||
cycl: pbnstBizCycle + 1,
|
||||
pbnstRuseFcltId: formRuse.pbnstRuseFcltId,
|
||||
fcOrgwts: undefined,
|
||||
pplInstls: undefined,
|
||||
fcDemands: undefined,
|
||||
});
|
||||
appendBiz(newItem);
|
||||
setIndexBiz(pbnstBizCycle); // 새로 추가된 차수로 포커스 이동
|
||||
}
|
||||
const newItem = fcBizSchema.parse({
|
||||
cycl: pbnstBizCycle + 1,
|
||||
pbnstRuseFcltId: formRuse.pbnstRuseFcltId,
|
||||
fcOrgwts: [],
|
||||
|
||||
pplInstls: [],
|
||||
fcDemands: [],
|
||||
});
|
||||
await appendBiz(newItem);
|
||||
toast.success(t('insertRuseBiz',{cycle: pbnstBizCycle + 1}))
|
||||
setIndexBiz(pbnstBizCycle);
|
||||
}, [form, indexMng, indexBiz, appendBiz, setIndexBiz]);
|
||||
|
||||
const { fields: fcDemands, append: appendDemand } = useFieldArray({
|
||||
control: form.control,
|
||||
name: `items.${indexMng}.fcBizs.${indexBiz}.fcDemands`,
|
||||
@@ -206,7 +215,7 @@ export function PbnstBuseForm({
|
||||
}
|
||||
}, [ppiYn, indexMng, indexBiz]);
|
||||
|
||||
const plusHist = () => {
|
||||
const plusHist = useCallback(() => {
|
||||
if (
|
||||
form.getValues(`items.${indexMng}.fcBizs.${indexBiz}.pbnstRuseFcltBizSn`)
|
||||
) {
|
||||
@@ -227,9 +236,9 @@ export function PbnstBuseForm({
|
||||
cpct: 0,
|
||||
});
|
||||
}
|
||||
};
|
||||
}, [indexMng, indexBiz, appendPpl, form]);
|
||||
|
||||
const plusArray = () => {
|
||||
const plusArray = useCallback(() => {
|
||||
appendDemand({
|
||||
dmdCoNm: "",
|
||||
daddr: "",
|
||||
@@ -248,7 +257,7 @@ export function PbnstBuseForm({
|
||||
dmdInfoId: "",
|
||||
//telno: "",
|
||||
});
|
||||
};
|
||||
}, [indexMng, indexBiz, appendDemand, form]);
|
||||
|
||||
const removeSelected = () => {
|
||||
const nowPPl = form.getValues(
|
||||
@@ -293,7 +302,7 @@ export function PbnstBuseForm({
|
||||
}, [form.formState, indexMng, indexBiz]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("form.formState ", form.formState);
|
||||
//console.log("form.formState ", form.formState);
|
||||
}, [form.formState]);
|
||||
|
||||
const pbnstBiz = form.watch(`items.${indexMng}.fcBizs`);
|
||||
@@ -489,17 +498,16 @@ export function PbnstBuseForm({
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
<BuseWaterQulity
|
||||
h1Title={`하수처리수 재이용시설 보증수질 `}
|
||||
subTitle="※재처리시설이 있는 경우만 작성"
|
||||
form={form}
|
||||
moClass="grid grid-cols-12 gap-4"
|
||||
sonClass="col-span-4"
|
||||
indexMng={indexMng}
|
||||
indexBiz={indexBiz}
|
||||
readonly={readonly}
|
||||
/>
|
||||
<BuseWaterQulity
|
||||
h1Title={`하수처리수 재이용시설 보증수질 `}
|
||||
subTitle="※재처리시설이 있는 경우만 작성"
|
||||
form={form}
|
||||
moClass="grid grid-cols-12 gap-4"
|
||||
sonClass="col-span-4"
|
||||
indexMng={indexMng}
|
||||
indexBiz={indexBiz}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div key={"hasu"}>
|
||||
@@ -533,7 +541,10 @@ export function PbnstBuseForm({
|
||||
수요처 신규등록
|
||||
</Button>
|
||||
</div>
|
||||
<div ref={demandsContainerRef}>
|
||||
<div
|
||||
key={`fcDemands-${indexMng}-${indexBiz}`}
|
||||
ref={demandsContainerRef}
|
||||
>
|
||||
{fcDemands.map((field, index) => (
|
||||
<div
|
||||
key={field.id} // useFieldArray의 고유 id를 key로 사용
|
||||
|
||||
-1
@@ -39,7 +39,6 @@ export function BuseWaterQulity({
|
||||
form.getValues(`items.${indexMng}.pbnstRuseFcltId`) +
|
||||
String(form.getValues(`items.${indexMng}.fcBizs.${indexBiz}.cycl`));
|
||||
|
||||
console.log("checkPkAndCycle ", checkPkAndCycle);
|
||||
if (chekcPk !== checkPkAndCycle) {
|
||||
if (watchPH && watchPH !== undefined) {
|
||||
const [frontPH, backPH] = watchPH.split("~");
|
||||
|
||||
@@ -158,7 +158,7 @@ export default function RswtrRegForm({
|
||||
</h1>
|
||||
<div className="grid grid-cols-12 flex items-center card-header">
|
||||
<h1 className="text-2xl font-medium text-label col-span-10">
|
||||
건축물 운영정보
|
||||
건축물 정보
|
||||
</h1>
|
||||
{!readonly && (
|
||||
<Button
|
||||
|
||||
@@ -48,22 +48,21 @@ export default function CoDetailModal({
|
||||
|
||||
return (
|
||||
<div>
|
||||
<ScrollArea className="h-[85vh] mx-8">
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onFormSubmit)}>
|
||||
<div className="grid grid-cols-12 items-center card-header">
|
||||
<h1 className="text-2xl font-medium text-label col-span-10">
|
||||
잠재수요처 상세정보
|
||||
</h1>
|
||||
<Button type="submit"
|
||||
className="col-start-12 col-span-1"
|
||||
size={"sm"}
|
||||
disabled={readonly}
|
||||
>
|
||||
저장
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onFormSubmit)}>
|
||||
<div className="grid grid-cols-12 items-center card-header">
|
||||
<h1 className="text-2xl font-medium text-label col-span-10">
|
||||
잠재수요처 상세정보
|
||||
</h1>
|
||||
<Button type="submit"
|
||||
className="col-start-12 col-span-1"
|
||||
size={"sm"}
|
||||
disabled={readonly}
|
||||
>
|
||||
저장
|
||||
</Button>
|
||||
</div>
|
||||
<ScrollArea className="h-[79vh] mx-8">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="fctryMngSn"
|
||||
@@ -865,9 +864,9 @@ export default function CoDetailModal({
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</ScrollArea>
|
||||
</ScrollArea>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -78,16 +78,26 @@ export default function RainChkgdTable({
|
||||
useEffect(() => {
|
||||
setSelectedIds([])// 셀렉트 초기화를 위한 작업
|
||||
if (rainChkData && rainChkData.length > 0) {
|
||||
|
||||
const rainChg = rainChkData?.map((item: any) => {
|
||||
const bud = tableData([item.building], { code });
|
||||
const rainyDetails= item.rainyDetails.map((detail)=>{
|
||||
return(
|
||||
{
|
||||
...detail,
|
||||
// 일단 테이블에서 사용하기 위해 넘버 전환
|
||||
ph: detail.ph&& !isNaN(detail.ph)?Number(detail.ph):detail.ph
|
||||
}
|
||||
)
|
||||
})
|
||||
return {
|
||||
...item,
|
||||
...bud[0],
|
||||
rainyDetails:rainyDetails,
|
||||
rowspan: item.rainyDetails?.length,
|
||||
};
|
||||
});
|
||||
|
||||
console.log('rainChg ', rainChg)
|
||||
setMakeTableData(rainChkTableData(rainChg));
|
||||
} else {
|
||||
setMakeTableData([]);
|
||||
@@ -116,7 +126,8 @@ export default function RainChkgdTable({
|
||||
if (findRain != undefined) {
|
||||
return {
|
||||
...rd,
|
||||
ph: Number(findRain.ph),
|
||||
// 조드 타입과 맞추기위해 스트링
|
||||
ph: String(findRain.ph),
|
||||
trbt: Number(findRain.trbt),
|
||||
grssClfg: Number(findRain.grssClfg),
|
||||
etc: findRain.etc,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"deleteMsg" : "{{name}}가 삭제되었습니다.",
|
||||
"deleteMsg": "{{name}}가 삭제되었습니다.",
|
||||
"insertMsg": "{{name}}가 저장되었습니다.",
|
||||
"updateMsg": "{{name}}가 수정되었습니다.",
|
||||
"errorMsg": "{{name}} 중 오류가 발생했습니다.",
|
||||
"errorMsg": "{{name}} 중 오류가 발생했습니다.",
|
||||
"fileErrMsg": "빈 파일 또는 파일 오류입니다.",
|
||||
"selectErrMsg": "{{name}}을(를) 선택해주세요.",
|
||||
"selectErrMsg": "{{name}}을(를) 선택해주세요.",
|
||||
"noChangedErrMsg": "변경사항이 없습니다.",
|
||||
"dateErrMsg": "시작년도를 종료년도 이후로 설정할 수 없습니다.",
|
||||
"fileDateErrMsg": "파일업로드 이전에 등록년도를 작성해주세요.",
|
||||
@@ -12,19 +12,16 @@
|
||||
"isUpdateMsg": "수정한 정보를 저장하시겠습니까?",
|
||||
"isInsertMsg": "등록하시겠습니까?",
|
||||
"isUpdatetMsg": "수정하시겠습니까?",
|
||||
"matchFinishMsg" : "{{name}}이(가) 완료되었습니다.",
|
||||
"matchFinishMsg": "{{name}}이(가) 완료되었습니다.",
|
||||
"excelDownErrMsg": "다운로드할 데이터가 없습니다.",
|
||||
"isMatchFinishMsg":" 매칭완료를 진행하시겠습니까?",
|
||||
"isNotMatchFinishMsg":"검토완료중 매칭완료 여부를 체크한 항목이 없습니다.",
|
||||
"canNotChangeMatStateMsg":"매칭완료된 항목은 상태를 변경할 수 없습니다.",
|
||||
|
||||
|
||||
|
||||
"isMatchFinishMsg": " 매칭완료를 진행하시겠습니까?",
|
||||
"isNotMatchFinishMsg": "검토완료중 매칭완료 여부를 체크한 항목이 없습니다.",
|
||||
"canNotChangeMatStateMsg": "매칭완료된 항목은 상태를 변경할 수 없습니다.",
|
||||
"isInitPw":"사업자번호 {{dmdInfoId}} 의 비밀번호를 초기화하시겠습니까? (초기화비밀번호는 해당 사업자의 사업자 번호입니다)",
|
||||
"alreadyInsertedErrMsg": "사업자번호 {{num}}(은)는 이미 등록되었습니다. 다시 등록해주세요.",
|
||||
"saveRowErrMsg": "수정을 원하는 행을 선택하고 저장버튼을 눌러주세요.",
|
||||
"costCalcErrMsg":"공사비 계산 진행 후 저장을 눌러주세요",
|
||||
"costCalcErrMsg": "공사비 계산 진행 후 저장을 눌러주세요",
|
||||
"maxYearErrMsg": "최대 {{year}}년까지 선택가능합니다.",
|
||||
"checkQtyMsg": "요구수량(m³/일)을 확인해주세요 계산할 수 없습니다."
|
||||
|
||||
}
|
||||
|
||||
"checkQtyMsg": "요구수량(m³/일)을 확인해주세요 계산할 수 없습니다.",
|
||||
"insertRuseBiz": "{{cycle}}차 사업이 추가되었습니다."
|
||||
}
|
||||
@@ -78,6 +78,10 @@ export function UiTable({
|
||||
}
|
||||
}, [tableData, headlist]);
|
||||
|
||||
useEffect(() => {
|
||||
setIdx(index);
|
||||
}, [index])
|
||||
|
||||
const handlePageChange = (page: number) => {
|
||||
setCur(page);
|
||||
onPageChange(page);
|
||||
@@ -120,10 +124,10 @@ export function UiTable({
|
||||
(boldArray.includes(index) ? (
|
||||
<TableCell
|
||||
className={`${head.align === "right" ? "text-right" : head.align === "center" ? "text-center" : "text-center"} ${cellClick && idx === index
|
||||
? "cursor-pointer !font-[1000]"
|
||||
: cellClick
|
||||
? "cursor-pointer"
|
||||
: ""
|
||||
? "cursor-pointer !font-[1000]"
|
||||
: cellClick
|
||||
? "cursor-pointer"
|
||||
: ""
|
||||
} sticky top-20 z-40 bg-secondary !font-bold`}
|
||||
style={{ top: `${headerHeight + index * 32 - 4}px` }}
|
||||
onClick={() => handleCellClick(index, head.id)}
|
||||
@@ -151,10 +155,10 @@ export function UiTable({
|
||||
) : (
|
||||
<TableCell
|
||||
className={`${head.align === "right" ? "text-right" : head.align === "center" ? "text-center" : "text-center"} ${cellClick && idx === index
|
||||
? "cursor-pointer !font-[1000]"
|
||||
: cellClick
|
||||
? "cursor-pointer"
|
||||
: ""
|
||||
? "cursor-pointer !font-[1000]"
|
||||
: cellClick
|
||||
? "cursor-pointer"
|
||||
: ""
|
||||
} mt-[${boldArray.length * 40}px]`}
|
||||
onClick={() => handleCellClick(index, head.id)}
|
||||
key={`cell-${head.id}-${index}`}
|
||||
|
||||
Reference in New Issue
Block a user