Compare commits
21
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2298549a73 | ||
|
|
c0eb6b94cc | ||
|
|
c29d191a5e | ||
|
|
3a37192782 | ||
|
|
f3ca55d183 | ||
|
|
506eb78a80 | ||
|
|
42795e517b | ||
|
|
e9bfaa865a | ||
|
|
8a2ed7df58 | ||
|
|
00d6ff90c6 | ||
|
|
c5f4f6ddd0 | ||
|
|
f332d64aa6 | ||
|
|
bb4d7b9d56 | ||
|
|
32b16055fb | ||
|
|
1daa925019 | ||
|
|
543fbb70cc | ||
|
|
bcdefaa828 | ||
|
|
0d48a0b579 | ||
|
|
fc3ef2c59e | ||
|
|
accc3e0ef1 | ||
|
|
e30a7d184b |
@@ -456,7 +456,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({
|
|||||||
if (isPrcsFclt) {
|
if (isPrcsFclt) {
|
||||||
if (viewMode == 'list') {
|
if (viewMode == 'list') {
|
||||||
return (
|
return (
|
||||||
<>
|
<div style={{overflowY:'auto'}}>
|
||||||
<div className="flex justify-between items-center mb-4">
|
<div className="flex justify-between items-center mb-4">
|
||||||
<Title title="하수처리시설 현황" />
|
<Title title="하수처리시설 현황" />
|
||||||
</div>
|
</div>
|
||||||
@@ -470,11 +470,11 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({
|
|||||||
cellClick={hasuCellClick}
|
cellClick={hasuCellClick}
|
||||||
onPageChange={setHasuPage}
|
onPageChange={setHasuPage}
|
||||||
/>
|
/>
|
||||||
</>
|
</div>
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<>
|
<div style={{overflowX:'hidden'}}>
|
||||||
<div className="flex justify-between items-center mb-4">
|
<div className="flex justify-between items-center mb-4">
|
||||||
<Title title="하수처리시설 상세정보" />
|
<Title title="하수처리시설 상세정보" />
|
||||||
</div>
|
</div>
|
||||||
@@ -497,7 +497,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({
|
|||||||
cellClick={() => { }}
|
cellClick={() => { }}
|
||||||
onPageChange={() => { }}
|
onPageChange={() => { }}
|
||||||
/>
|
/>
|
||||||
</>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -528,7 +528,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({
|
|||||||
} else {
|
} else {
|
||||||
// 재이용시설 목록
|
// 재이용시설 목록
|
||||||
return (
|
return (
|
||||||
<>
|
<div style={{overflowY:'auto'}}>
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<Title title="하수재이용시설 현황" />
|
<Title title="하수재이용시설 현황" />
|
||||||
{/* <div className="flex gap-2 mt-8">
|
{/* <div className="flex gap-2 mt-8">
|
||||||
@@ -550,7 +550,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({
|
|||||||
>
|
>
|
||||||
<HeadMakeColSpan upHeadList={pbnstSttn.pbnstSttNodeList} />
|
<HeadMakeColSpan upHeadList={pbnstSttn.pbnstSttNodeList} />
|
||||||
</UiTable>
|
</UiTable>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -600,7 +600,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({
|
|||||||
} else {
|
} else {
|
||||||
// 중수도시설 목록
|
// 중수도시설 목록
|
||||||
return (
|
return (
|
||||||
<>
|
<div style={{overflowY:'auto'}}>
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<Title title="중수도시설 현황" />
|
<Title title="중수도시설 현황" />
|
||||||
{/* <div className="flex gap-2 mt-8">
|
{/* <div className="flex gap-2 mt-8">
|
||||||
@@ -622,7 +622,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({
|
|||||||
>
|
>
|
||||||
<HeadMakeColSpan upHeadList={rswtSttn.rswtSttNodeList} />
|
<HeadMakeColSpan upHeadList={rswtSttn.rswtSttNodeList} />
|
||||||
</UiTable>
|
</UiTable>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -636,7 +636,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({
|
|||||||
} else {
|
} else {
|
||||||
// 온배수시설 목록
|
// 온배수시설 목록
|
||||||
return (
|
return (
|
||||||
<>
|
<div style={{overflowY:'auto'}}>
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<Title title="온배수시설 현황" />
|
<Title title="온배수시설 현황" />
|
||||||
{/* <div className="flex gap-2 mt-8">
|
{/* <div className="flex gap-2 mt-8">
|
||||||
@@ -658,7 +658,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({
|
|||||||
>
|
>
|
||||||
<HeadMakeColSpan upHeadList={htdflSttn.htdflSttNodeList} />
|
<HeadMakeColSpan upHeadList={htdflSttn.htdflSttNodeList} />
|
||||||
</UiTable>
|
</UiTable>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -668,7 +668,13 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
viewMode == 'nothing' ? <></> :
|
viewMode == 'nothing' ? <></> :
|
||||||
<NewWindowPortal onClose={memoizedOnClose} title="시설 상세 정보">
|
<NewWindowPortal
|
||||||
|
onClose={memoizedOnClose}
|
||||||
|
title="시설 상세 정보"
|
||||||
|
width={viewMode == 'list' ? window.screen.availWidth : 1100}
|
||||||
|
height={viewMode == 'list' ? window.screen.availHeight : layerId == '하수처리시설' && viewMode == 'detail' ? 450 : 900}
|
||||||
|
scrollbars='yes'
|
||||||
|
resizable='no'>
|
||||||
{/* 체크된 레이어에 따른 조건부 렌더링 */}
|
{/* 체크된 레이어에 따른 조건부 렌더링 */}
|
||||||
{renderConditionalContent()}
|
{renderConditionalContent()}
|
||||||
</NewWindowPortal>
|
</NewWindowPortal>
|
||||||
|
|||||||
@@ -27,9 +27,13 @@ interface NewWindowPortalProps {
|
|||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
title?: string;
|
title?: string;
|
||||||
|
width?: number;
|
||||||
|
height?: number;
|
||||||
|
resizable?: string;
|
||||||
|
scrollbars?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const NewWindowPortal: React.FC<NewWindowPortalProps> = ({ children, onClose, title = "Detail" }) => {
|
const NewWindowPortal: React.FC<NewWindowPortalProps> = ({ children, onClose, title = "", width = 900, height = 800, resizable = "yes", scrollbars = "yes" }) => {
|
||||||
const [container, setContainer] = useState<HTMLElement | null>(null);
|
const [container, setContainer] = useState<HTMLElement | null>(null);
|
||||||
const newWindowRef = useRef<Window | null>(null);
|
const newWindowRef = useRef<Window | null>(null);
|
||||||
const onCloseRef = useRef(onClose);
|
const onCloseRef = useRef(onClose);
|
||||||
@@ -46,13 +50,23 @@ const NewWindowPortal: React.FC<NewWindowPortalProps> = ({ children, onClose, ti
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// 이미 창이 열려있으면 새로 열지 않음
|
// 이미 창이 열려있으면 새로 열지 않음
|
||||||
if (newWindowRef.current && !newWindowRef.current.closed) return;
|
if (newWindowRef.current && !newWindowRef.current.closed) return;
|
||||||
|
// 브라우저 화면 정보
|
||||||
|
const screenLeft = window.screenLeft ?? window.screenX;
|
||||||
|
const screenTop = window.screenTop ?? window.screenY;
|
||||||
|
const screenWidth = window.innerWidth ?? document.documentElement.clientWidth;
|
||||||
|
const screenHeight = window.innerHeight ?? document.documentElement.clientHeight;
|
||||||
|
|
||||||
|
// 중앙 위치 계산
|
||||||
|
const left = screenLeft + (screenWidth - width) / 2;
|
||||||
|
const top = screenTop + (screenHeight - height) / 2;
|
||||||
|
|
||||||
// 1. 새 창을 열고 참조를 저장합니다.
|
// 1. 새 창을 열고 참조를 저장합니다.
|
||||||
newWindowRef.current = window.open('', title, 'width=900,height=800,resizable=yes,scrollbars=yes');
|
const popupOptions = `width=${width},height=${height},left=${left}, top=${top}, resizable=${resizable},scrollbars=${scrollbars}`;
|
||||||
|
newWindowRef.current = window.open('', title, popupOptions);
|
||||||
|
|
||||||
if (newWindowRef.current) {
|
if (newWindowRef.current) {
|
||||||
newWindowRef.current.document.title = title;
|
newWindowRef.current.document.title = title;
|
||||||
|
|
||||||
// 2. React 컴포넌트를 마운트할 컨테이너 div를 생성하여 새 창의 body에 추가합니다.
|
// 2. React 컴포넌트를 마운트할 컨테이너 div를 생성하여 새 창의 body에 추가합니다.
|
||||||
const div = newWindowRef.current.document.createElement('div');
|
const div = newWindowRef.current.document.createElement('div');
|
||||||
newWindowRef.current.document.body.appendChild(div);
|
newWindowRef.current.document.body.appendChild(div);
|
||||||
@@ -60,7 +74,6 @@ const NewWindowPortal: React.FC<NewWindowPortalProps> = ({ children, onClose, ti
|
|||||||
|
|
||||||
// 3. 메인 창의 스타일을 새 창으로 복사합니다. (매우 중요)
|
// 3. 메인 창의 스타일을 새 창으로 복사합니다. (매우 중요)
|
||||||
copyStyles(document, newWindowRef.current.document);
|
copyStyles(document, newWindowRef.current.document);
|
||||||
|
|
||||||
// 4. 사용자가 창을 닫을 때 부모에게 알리기 위한 이벤트 리스너를 설정합니다.
|
// 4. 사용자가 창을 닫을 때 부모에게 알리기 위한 이벤트 리스너를 설정합니다.
|
||||||
// const handleUnload = () => {
|
// const handleUnload = () => {
|
||||||
// onClose();
|
// onClose();
|
||||||
|
|||||||
@@ -0,0 +1,158 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import Gis from "@common/business_components/ui/map/Gis";
|
||||||
|
import { useEffect, useRef, useState, useCallback } from "react";
|
||||||
|
import { mapService } from "../service";
|
||||||
|
import NewWindowPopup from "../newWindowPopup";
|
||||||
|
import GisApp from "@common/business_components/ui/map/lib/gis.core";
|
||||||
|
|
||||||
|
const Map = () => {
|
||||||
|
const [treeData, setTreeData] = useState([]); // 초기값을 객체 또는 null로 설정
|
||||||
|
const gisMaps = useRef<any | null>(null);
|
||||||
|
const [isOpen, setIsOpen] = useState(false); // 팝업 열기/닫기 상태
|
||||||
|
const [isSearchModalOpen, setIsSearchModalOpen] = useState(true); // SearchModal 열림 상태
|
||||||
|
const [featureData, setFeatureData] = useState(null); // 선택된 피쳐 데이터
|
||||||
|
const [checkedLayers, setCheckedLayers] = useState<string[]>([]);
|
||||||
|
const [checkedLayersData, setCheckedLayersData] = useState<any[]>([]);
|
||||||
|
|
||||||
|
const fetchData = async () => {
|
||||||
|
try {
|
||||||
|
const response = await mapService.getLyrStngs();
|
||||||
|
setTreeData(response); // API 응답 저장
|
||||||
|
} catch (error) {
|
||||||
|
console.error("데이터 불러오기 실패:", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 팝업 닫기 핸들러를 useCallback으로 메모이제이션
|
||||||
|
const handlePopupClose = useCallback(() => {
|
||||||
|
setIsOpen(false);
|
||||||
|
setFeatureData(null);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// 컴포넌트 마운트 시 1회 실행
|
||||||
|
useEffect(() => {
|
||||||
|
fetchData();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// 체크된 레이어 정보를 받는 핸들러
|
||||||
|
const handleCheckedLayersChange = (checkedIds: string[], checkedNodesData: any[]) => {
|
||||||
|
setCheckedLayers(checkedIds);
|
||||||
|
setCheckedLayersData(checkedNodesData);
|
||||||
|
};
|
||||||
|
|
||||||
|
// SearchModal, GisContent 등에서 호출
|
||||||
|
const onFeatureSelect = (data: any) => {
|
||||||
|
const map = gisMaps.current;
|
||||||
|
if (!map) {
|
||||||
|
console.warn("지도가 초기화되지 않았습니다.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 항상 같은 select 객체 사용
|
||||||
|
const select = GisApp.Module.select as any;
|
||||||
|
if (!select) return;
|
||||||
|
|
||||||
|
// 1. 기존 선택 초기화
|
||||||
|
select.resetSelectedFeature();
|
||||||
|
|
||||||
|
// 2. data가 OpenLayers Feature 인스턴스인지 확인
|
||||||
|
let foundFeature: any = null;
|
||||||
|
if (
|
||||||
|
data &&
|
||||||
|
typeof data.getGeometry === "function" &&
|
||||||
|
typeof data.setStyle === "function"
|
||||||
|
) {
|
||||||
|
// 이미 Feature 인스턴스라면 그대로 사용
|
||||||
|
foundFeature = data;
|
||||||
|
} else {
|
||||||
|
// 아니면 featureId로 맵에서 Feature 인스턴스를 찾아서 사용
|
||||||
|
const featureId = data.fid || data.ftrIdn || data.id;
|
||||||
|
map
|
||||||
|
.getLayers()
|
||||||
|
.getArray()
|
||||||
|
.forEach((layer: any) => {
|
||||||
|
const source = layer.getSource?.();
|
||||||
|
if (source?.getFeatureById) {
|
||||||
|
const feature = source.getFeatureById(String(featureId).trim());
|
||||||
|
if (feature) foundFeature = feature;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 피처 선택
|
||||||
|
if (foundFeature) {
|
||||||
|
const geometry = foundFeature.getGeometry();
|
||||||
|
if (geometry) {
|
||||||
|
const extent = geometry.getExtent();
|
||||||
|
|
||||||
|
map.getView().fit(extent, {
|
||||||
|
duration: 300,
|
||||||
|
padding: [50, 50, 50, 50],
|
||||||
|
maxZoom: 16,
|
||||||
|
constrainResolution: true,
|
||||||
|
nearest: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
select.selectFeature(foundFeature, true);
|
||||||
|
} else {
|
||||||
|
console.warn("OpenLayers Feature를 찾을 수 없습니다:", data);
|
||||||
|
}
|
||||||
|
|
||||||
|
setFeatureData(data);
|
||||||
|
setIsOpen(true);
|
||||||
|
setIsSearchModalOpen(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
// MapSearchBar 래퍼 컴포넌트
|
||||||
|
// const CustomMapSearchBar = (props: any) => {
|
||||||
|
// return (
|
||||||
|
// <MapSearchBar
|
||||||
|
// {...props}
|
||||||
|
// searchType="공급처 후보지 조회"
|
||||||
|
// showApplyButton={false}
|
||||||
|
// />
|
||||||
|
// );
|
||||||
|
// };
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="bg-container">
|
||||||
|
<Gis
|
||||||
|
treeData={treeData}
|
||||||
|
isSearch={false}
|
||||||
|
gisMaps={gisMaps}
|
||||||
|
isMiniMap={false}
|
||||||
|
searchView={undefined}
|
||||||
|
// searchView={(props: any) => (
|
||||||
|
// <MapSearchBar
|
||||||
|
// searchType="공급처 후보지 조회"
|
||||||
|
// showApplyButton={false}
|
||||||
|
// checkedLayers={checkedLayers}
|
||||||
|
// checkedLayersData={checkedLayersData}
|
||||||
|
// {...props}
|
||||||
|
// />
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
detailView={(props: any) =>(
|
||||||
|
<NewWindowPopup
|
||||||
|
onClose={handlePopupClose} // 메모이제이션된 함수 사용
|
||||||
|
checkedLayers={checkedLayers}
|
||||||
|
checkedLayersData={checkedLayersData}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
onFeatureSelect={onFeatureSelect}
|
||||||
|
setIsOpen={setIsOpen}
|
||||||
|
setFeatureData={setFeatureData}
|
||||||
|
featureData={featureData}
|
||||||
|
setIsSearchModalOpen={setIsSearchModalOpen}
|
||||||
|
isOpen={isOpen}
|
||||||
|
isSearchModalOpen={isSearchModalOpen}
|
||||||
|
onCheckedLayersChange={handleCheckedLayersChange}
|
||||||
|
imgVisble={true}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Map;
|
||||||
@@ -41,9 +41,11 @@ import toast, { Toaster } from "react-hot-toast";
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export default function CoMatRvw() {
|
export default function CoMatRvw() {
|
||||||
const { code, coRvw, coMatRvwInit, coMatRvwSearch, coMatRvwInqua } =
|
const { auth, code, coRvw, coMatRvwInit, coMatRvwSearch, coMatRvwInqua } =
|
||||||
useWrStore((state) => state);
|
useWrStore((state) => state);
|
||||||
const { coMatRvwRes,coMatRvwCount } = coRvw;
|
const { coMatRvwRes, coMatRvwCount } = coRvw;
|
||||||
|
const { regAuthrtYn } = auth;
|
||||||
|
|
||||||
//init, sub, match
|
//init, sub, match
|
||||||
const initRef = useRef<boolean>(false);
|
const initRef = useRef<boolean>(false);
|
||||||
const { coRvwHeadList } = coRvw;
|
const { coRvwHeadList } = coRvw;
|
||||||
@@ -91,10 +93,9 @@ export default function CoMatRvw() {
|
|||||||
const form = useForm<z.infer<typeof DmdCoReqSchema>>({
|
const form = useForm<z.infer<typeof DmdCoReqSchema>>({
|
||||||
resolver: zodResolver(DmdCoReqSchema),
|
resolver: zodResolver(DmdCoReqSchema),
|
||||||
shouldUnregister: false,
|
shouldUnregister: false,
|
||||||
// defaultValues: DmdCoReqSchema.parse({})
|
// defaultValues: DmdCoReqSchema.parse({})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const TableCellClick = (index: number) => {
|
const TableCellClick = (index: number) => {
|
||||||
if (coMatRvwRes && coMatRvwRes[index]) {
|
if (coMatRvwRes && coMatRvwRes[index]) {
|
||||||
setSelectData(coMatRvwRes[index]);
|
setSelectData(coMatRvwRes[index]);
|
||||||
@@ -103,23 +104,21 @@ export default function CoMatRvw() {
|
|||||||
};
|
};
|
||||||
const useUsgCdWatch = useWatch({ control: form.control, name: "useUsgCd" });
|
const useUsgCdWatch = useWatch({ control: form.control, name: "useUsgCd" });
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
if (useUsgCdWatch) {
|
if (useUsgCdWatch) {
|
||||||
form.setValue(
|
form.setValue(
|
||||||
"demandCst.usgPrcsProcs",
|
"demandCst.usgPrcsProcs",
|
||||||
usageProcData?.find(
|
usageProcData?.find((item) => item.usage === useUsgCdWatch)?.process ??
|
||||||
(item) => item.usage === useUsgCdWatch
|
""
|
||||||
)?.process ?? ""
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [useUsgCdWatch, form,selectionVersion]);
|
}, [useUsgCdWatch, form, selectionVersion]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (coMatRvwRes&&coMatRvwRes.length > 0) {
|
if (coMatRvwRes && coMatRvwRes.length > 0) {
|
||||||
const data = coMatRvwRes?.map((item) => {
|
const data = coMatRvwRes?.map((item) => {
|
||||||
let flag = "";
|
let flag = "";
|
||||||
|
|
||||||
flag = getdmdMatFlag(item?.demandMatching?.splyFcltFlg ||undefined);
|
flag = getdmdMatFlag(item?.demandMatching?.splyFcltFlg || undefined);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
@@ -127,7 +126,7 @@ export default function CoMatRvw() {
|
|||||||
sggCd: item.demandCo?.sggCd,
|
sggCd: item.demandCo?.sggCd,
|
||||||
dmdCoNm: item.demandCo?.dmdCoNm,
|
dmdCoNm: item.demandCo?.dmdCoNm,
|
||||||
daddr: item.demandCo?.daddr,
|
daddr: item.demandCo?.daddr,
|
||||||
telno: formatPhoneNumber(item?.demandCo?.telno||''),
|
telno: formatPhoneNumber(item?.demandCo?.telno || ""),
|
||||||
dmndTmng: item?.dmndTmng,
|
dmndTmng: item?.dmndTmng,
|
||||||
splyFcltFlg: flag,
|
splyFcltFlg: flag,
|
||||||
};
|
};
|
||||||
@@ -156,7 +155,6 @@ export default function CoMatRvw() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (selectData) {
|
if (selectData) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
DmdCoReqSchema.parse(selectData);
|
DmdCoReqSchema.parse(selectData);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -164,15 +162,14 @@ export default function CoMatRvw() {
|
|||||||
console.log(e.flatten());
|
console.log(e.flatten());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
form.reset( selectData);
|
form.reset(selectData);
|
||||||
setSelectionVersion((v) => v + 1); // 강제로 바뀌었다고 알리기
|
setSelectionVersion((v) => v + 1); // 강제로 바뀌었다고 알리기
|
||||||
}
|
}
|
||||||
}, [selectData, form]);
|
}, [selectData, form]);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ContentsDiv>
|
<ContentsDiv>
|
||||||
<div className="grid grid-cols-4 gap-4">
|
<div className="grid grid-cols-4 gap-4">
|
||||||
|
|
||||||
<div className="col-span-4">
|
<div className="col-span-4">
|
||||||
<Title title={"수요매칭검토"} />
|
<Title title={"수요매칭검토"} />
|
||||||
<SearchDiv>
|
<SearchDiv>
|
||||||
@@ -195,7 +192,7 @@ export default function CoMatRvw() {
|
|||||||
<div className="col-span-7 w-full">
|
<div className="col-span-7 w-full">
|
||||||
<div className="flex flex-row items-center">
|
<div className="flex flex-row items-center">
|
||||||
<Label className="text-xl text-gray-600 mx-6">
|
<Label className="text-xl text-gray-600 mx-6">
|
||||||
수요신청년도
|
수요신청년도
|
||||||
</Label>
|
</Label>
|
||||||
<SelectBox
|
<SelectBox
|
||||||
className="h-full w-32 text-2xl"
|
className="h-full w-32 text-2xl"
|
||||||
@@ -248,7 +245,10 @@ export default function CoMatRvw() {
|
|||||||
if (String(objSearch.city).length > 0) {
|
if (String(objSearch.city).length > 0) {
|
||||||
con = String(objSearch.city);
|
con = String(objSearch.city);
|
||||||
}
|
}
|
||||||
if (String(objSearch.sgg).length > 0 && String(objSearch.sgg) !== "0") {
|
if (
|
||||||
|
String(objSearch.sgg).length > 0 &&
|
||||||
|
String(objSearch.sgg) !== "0"
|
||||||
|
) {
|
||||||
con = String(objSearch.sgg);
|
con = String(objSearch.sgg);
|
||||||
}
|
}
|
||||||
getSearch(fromNum, toNum, con, dmdCoNm);
|
getSearch(fromNum, toNum, con, dmdCoNm);
|
||||||
@@ -279,403 +279,410 @@ export default function CoMatRvw() {
|
|||||||
TableCellClick(index);
|
TableCellClick(index);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onPageChange={(val) => {setPageNatiion(val)}}
|
onPageChange={(val) => {
|
||||||
|
setPageNatiion(val);
|
||||||
|
}}
|
||||||
></UiTable>
|
></UiTable>
|
||||||
</ListDiv>
|
</ListDiv>
|
||||||
<hr />
|
<hr />
|
||||||
{/* <ScrollArea className="h-[49vh]"> */}
|
{/* <ScrollArea className="h-[49vh]"> */}
|
||||||
<ListDiv>
|
<ListDiv>
|
||||||
<h3 className="mt-4 ml-2 text-2xl font-medium text-label">
|
<h3 className="mt-4 ml-2 text-2xl font-medium text-label">
|
||||||
수요신청 상세현황
|
수요신청 상세현황
|
||||||
</h3>
|
</h3>
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
<div className="grid grid-cols-12 gap-4 ml-4 mr-4">
|
<div className="grid grid-cols-12 gap-4 ml-4 mr-4">
|
||||||
<div className="col-span-3 mt-4">
|
<div className="col-span-3 mt-4">
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="dmndTmng"
|
name="dmndTmng"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormUi label="요구시기">
|
<FormUi label="요구시기">
|
||||||
<Input
|
<Input
|
||||||
placeholder=""
|
placeholder=""
|
||||||
type="text"
|
type="text"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
field.onChange(String(e.target.value));
|
field.onChange(String(e.target.value));
|
||||||
}}
|
}}
|
||||||
value={
|
value={
|
||||||
moment(field.value).format("YYYY-MM-DD") ?? ""
|
moment(field.value).format("YYYY-MM-DD") ?? ""
|
||||||
}
|
}
|
||||||
readOnly
|
readOnly
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
<div className="col-span-3 mt-4">
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="dmndQty"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormUi label="요구수량(m³/일)">
|
|
||||||
<Input
|
|
||||||
placeholder=""
|
|
||||||
type="number"
|
|
||||||
step="0.1"
|
|
||||||
onChange={(e) => {
|
|
||||||
field.onChange(Number(e.target.value));
|
|
||||||
}}
|
|
||||||
value={field.value ?? 0}
|
|
||||||
readOnly
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 mt-4">
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="useUsgCd"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormUi label="사용용도">
|
|
||||||
<Input
|
|
||||||
placeholder=""
|
|
||||||
type="text"
|
|
||||||
step="0.1"
|
|
||||||
onChange={(e) => {
|
|
||||||
field.onChange(e.target.value);
|
|
||||||
}}
|
|
||||||
value={field.value ?? ""}
|
|
||||||
readOnly
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 mt-4">
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="wntUntprc"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormUi label="희망단가(원/m3)">
|
|
||||||
<Input
|
|
||||||
placeholder=""
|
|
||||||
type="number"
|
|
||||||
step="0.1"
|
|
||||||
onChange={(e) => {
|
|
||||||
field.onChange(Number(e.target.value));
|
|
||||||
}}
|
|
||||||
value={field.value ?? 0}
|
|
||||||
readOnly
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-12 w-full">
|
|
||||||
<h1 className={formH1Class}>요구수질</h1>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 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>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 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>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 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
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 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
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 mt-4">
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="smll"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormUi label="냄새">
|
|
||||||
<Input
|
|
||||||
placeholder=""
|
|
||||||
type="number"
|
|
||||||
step="0.1"
|
|
||||||
onChange={(e) => {
|
|
||||||
field.onChange(Number(e.target.value));
|
|
||||||
}}
|
|
||||||
value={field.value ?? 0}
|
|
||||||
readOnly
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 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
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 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>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 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
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 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>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 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
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 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
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-3 mt-4">
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="rmrk"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormUi label="비고">
|
|
||||||
<Input
|
|
||||||
placeholder=""
|
|
||||||
type="text"
|
|
||||||
onChange={(e) => {
|
|
||||||
field.onChange(e.target.value);
|
|
||||||
}}
|
|
||||||
value={field.value ?? ""}
|
|
||||||
readOnly
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-12 w-full">
|
|
||||||
<h1 className={formH1Class}>공급처 후보지</h1>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-4 mt-4">
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name={`demandMatching.splyCndtList.${0}`}
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormUi label="후보지1">
|
|
||||||
<Input
|
|
||||||
placeholder=""
|
|
||||||
type="text"
|
|
||||||
onChange={(e) => {
|
|
||||||
field.onChange(String(e.target.value));
|
|
||||||
}}
|
|
||||||
value={field.value ?? ""}
|
|
||||||
readOnly
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-4 mt-4">
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name={`demandMatching.splyCndtList.${1}`}
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormUi label="후보지2">
|
|
||||||
<Input
|
|
||||||
placeholder=""
|
|
||||||
type="text"
|
|
||||||
onChange={(e) => {
|
|
||||||
field.onChange(e.target.value);
|
|
||||||
}}
|
|
||||||
value={field.value ?? ""}
|
|
||||||
readOnly
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="col-span-4 mt-4">
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name={`demandMatching.splyCndtList.${2}`}
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormUi label="후보지3">
|
|
||||||
<Input
|
|
||||||
placeholder=""
|
|
||||||
type="text"
|
|
||||||
onChange={(e) => {
|
|
||||||
field.onChange(e.target.value);
|
|
||||||
}}
|
|
||||||
value={field.value ?? ""}
|
|
||||||
readOnly
|
|
||||||
/>
|
|
||||||
</FormUi>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
<div className="col-span-3 mt-4">
|
||||||
<ConCostForm form={form} type={"mat"} selectionVersion={selectionVersion} />
|
<FormField
|
||||||
</ListDiv>
|
control={form.control}
|
||||||
|
name="dmndQty"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormUi label="요구수량(m³/일)">
|
||||||
|
<Input
|
||||||
|
placeholder=""
|
||||||
|
type="number"
|
||||||
|
step="0.1"
|
||||||
|
onChange={(e) => {
|
||||||
|
field.onChange(Number(e.target.value));
|
||||||
|
}}
|
||||||
|
value={field.value ?? 0}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 mt-4">
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="useUsgCd"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormUi label="사용용도">
|
||||||
|
<Input
|
||||||
|
placeholder=""
|
||||||
|
type="text"
|
||||||
|
step="0.1"
|
||||||
|
onChange={(e) => {
|
||||||
|
field.onChange(e.target.value);
|
||||||
|
}}
|
||||||
|
value={field.value ?? ""}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 mt-4">
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="wntUntprc"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormUi label="희망단가(원/m3)">
|
||||||
|
<Input
|
||||||
|
placeholder=""
|
||||||
|
type="number"
|
||||||
|
step="0.1"
|
||||||
|
onChange={(e) => {
|
||||||
|
field.onChange(Number(e.target.value));
|
||||||
|
}}
|
||||||
|
value={field.value ?? 0}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-12 w-full">
|
||||||
|
<h1 className={formH1Class}>요구수질</h1>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 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>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 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>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 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
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 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
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 mt-4">
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="smll"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormUi label="냄새">
|
||||||
|
<Input
|
||||||
|
placeholder=""
|
||||||
|
type="number"
|
||||||
|
step="0.1"
|
||||||
|
onChange={(e) => {
|
||||||
|
field.onChange(Number(e.target.value));
|
||||||
|
}}
|
||||||
|
value={field.value ?? 0}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 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
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 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>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 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
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 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>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 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
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 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
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-3 mt-4">
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="rmrk"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormUi label="비고">
|
||||||
|
<Input
|
||||||
|
placeholder=""
|
||||||
|
type="text"
|
||||||
|
onChange={(e) => {
|
||||||
|
field.onChange(e.target.value);
|
||||||
|
}}
|
||||||
|
value={field.value ?? ""}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-12 w-full">
|
||||||
|
<h1 className={formH1Class}>공급처 후보지</h1>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-4 mt-4">
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name={`demandMatching.splyCndtList.${0}`}
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormUi label="후보지1">
|
||||||
|
<Input
|
||||||
|
placeholder=""
|
||||||
|
type="text"
|
||||||
|
onChange={(e) => {
|
||||||
|
field.onChange(String(e.target.value));
|
||||||
|
}}
|
||||||
|
value={field.value ?? ""}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-4 mt-4">
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name={`demandMatching.splyCndtList.${1}`}
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormUi label="후보지2">
|
||||||
|
<Input
|
||||||
|
placeholder=""
|
||||||
|
type="text"
|
||||||
|
onChange={(e) => {
|
||||||
|
field.onChange(e.target.value);
|
||||||
|
}}
|
||||||
|
value={field.value ?? ""}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="col-span-4 mt-4">
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name={`demandMatching.splyCndtList.${2}`}
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormUi label="후보지3">
|
||||||
|
<Input
|
||||||
|
placeholder=""
|
||||||
|
type="text"
|
||||||
|
onChange={(e) => {
|
||||||
|
field.onChange(e.target.value);
|
||||||
|
}}
|
||||||
|
value={field.value ?? ""}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
</FormUi>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Form>
|
||||||
|
<ConCostForm
|
||||||
|
form={form}
|
||||||
|
type={"mat"}
|
||||||
|
selectionVersion={selectionVersion}
|
||||||
|
readonly={regAuthrtYn ==="N"}
|
||||||
|
/>
|
||||||
|
</ListDiv>
|
||||||
{/* </ScrollArea> */}
|
{/* </ScrollArea> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import toast, { Toaster } from "react-hot-toast";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
export default function RuseRvwHstry() {
|
export default function RuseRvwHstry() {
|
||||||
const {
|
const {
|
||||||
|
auth,
|
||||||
code,
|
code,
|
||||||
ruseHist,
|
ruseHist,
|
||||||
ruseRvwHistInit,
|
ruseRvwHistInit,
|
||||||
@@ -38,6 +39,8 @@ export default function RuseRvwHstry() {
|
|||||||
ruseRvwComplete,
|
ruseRvwComplete,
|
||||||
} = useWrStore((state) => state);
|
} = useWrStore((state) => state);
|
||||||
const { rvwHistRes, ruseHistHeadList, rvwHistCount } = ruseHist;
|
const { rvwHistRes, ruseHistHeadList, rvwHistCount } = ruseHist;
|
||||||
|
const { regAuthrtYn } = auth;
|
||||||
|
|
||||||
const [pageNation, setPageNatiion] = useState<number>(1);
|
const [pageNation, setPageNatiion] = useState<number>(1);
|
||||||
|
|
||||||
const [dmdCoNm, setDmdCoNm] = useState<string>("");
|
const [dmdCoNm, setDmdCoNm] = useState<string>("");
|
||||||
@@ -305,7 +308,7 @@ export default function RuseRvwHstry() {
|
|||||||
>
|
>
|
||||||
조회
|
조회
|
||||||
</Button>
|
</Button>
|
||||||
<Button size={"sm"} onClick={confrirmToast}>
|
<Button size={"sm"} onClick={confrirmToast} disabled={regAuthrtYn==='N'}>
|
||||||
저장
|
저장
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import toast, { Toaster } from "react-hot-toast";
|
|||||||
|
|
||||||
export default function CoSttn() {
|
export default function CoSttn() {
|
||||||
const {
|
const {
|
||||||
|
auth,
|
||||||
code,
|
code,
|
||||||
coSttn,
|
coSttn,
|
||||||
coSttnInit,
|
coSttnInit,
|
||||||
@@ -43,6 +44,7 @@ export default function CoSttn() {
|
|||||||
coSttnTxtSearch,
|
coSttnTxtSearch,
|
||||||
demandCompList,
|
demandCompList,
|
||||||
} = useWrStore((state) => state);
|
} = useWrStore((state) => state);
|
||||||
|
const { regAuthrtYn, mdfcnAuthrtYn } = auth;
|
||||||
|
|
||||||
const [bdstTable, setBdstTable] = useState<DemandCompType[]>();
|
const [bdstTable, setBdstTable] = useState<DemandCompType[]>();
|
||||||
const [pageNation, setPageNation] = useState(1);
|
const [pageNation, setPageNation] = useState(1);
|
||||||
@@ -205,6 +207,7 @@ export default function CoSttn() {
|
|||||||
setUpdateData(undefined);
|
setUpdateData(undefined);
|
||||||
setIsDmdModal({ ...isDmdModal, isMoal: true });
|
setIsDmdModal({ ...isDmdModal, isMoal: true });
|
||||||
}}
|
}}
|
||||||
|
disabled={regAuthrtYn === "N"}
|
||||||
>
|
>
|
||||||
등록
|
등록
|
||||||
</Button>
|
</Button>
|
||||||
@@ -222,6 +225,7 @@ export default function CoSttn() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
disabled={mdfcnAuthrtYn === "N"}
|
||||||
>
|
>
|
||||||
수정
|
수정
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ import { toast, Toaster } from "react-hot-toast";
|
|||||||
export default function DrgtSttn() {
|
export default function DrgtSttn() {
|
||||||
const { code, drgt, drgtSearch, drgtModalSearch, drgtInit } = useWrStore((state) => state);
|
const { code, drgt, drgtSearch, drgtModalSearch, drgtInit } = useWrStore((state) => state);
|
||||||
const { drgtRes, drgtMoRes } = drgt;
|
const { drgtRes, drgtMoRes } = drgt;
|
||||||
const [fromDate, setFromDate] = useState<string>();
|
const [fromDate, setFromDate] = useState<string>('202506');
|
||||||
const [toDate, setToDate] = useState<string>();
|
const [toDate, setToDate] = useState<string>('202506');
|
||||||
const [selectSgg, setSelectSgg] = useState<SelectDataType[] | []>();
|
const [selectSgg, setSelectSgg] = useState<SelectDataType[]>([{ val: '0', text: '전체' }]);
|
||||||
const [objSearch, setObjSearch] = useState<objSearchType>({ sgg: "", city: "" });
|
const [objSearch, setObjSearch] = useState<objSearchType>({ sgg: "", city: "" });
|
||||||
const [tableData, setTableData] = useState<customDrgt[]>();
|
const [tableData, setTableData] = useState<customDrgt[]>();
|
||||||
const [selectedSgg, setSelectedSgg] = useState<string>('');
|
const [selectedSgg, setSelectedSgg] = useState<string>('');
|
||||||
@@ -93,9 +93,9 @@ export default function DrgtSttn() {
|
|||||||
const cityValue = String(val);
|
const cityValue = String(val);
|
||||||
|
|
||||||
if (cityValue === "0") {
|
if (cityValue === "0") {
|
||||||
setSelectSgg([]);
|
setSelectSgg([{ val: '0', text: '전체' }]);
|
||||||
setSelectedSgg('');
|
setSelectedSgg('0');
|
||||||
setObjSearch({ city: cityValue, sgg: '' });
|
setObjSearch({ city: cityValue, sgg: '0' });
|
||||||
} else {
|
} else {
|
||||||
const data = getCity(cityValue, code.sggCd);
|
const data = getCity(cityValue, code.sggCd);
|
||||||
setSelectSgg(data);
|
setSelectSgg(data);
|
||||||
@@ -136,14 +136,15 @@ export default function DrgtSttn() {
|
|||||||
selectClass={""}
|
selectClass={""}
|
||||||
selectArray={code.cityCd || []}
|
selectArray={code.cityCd || []}
|
||||||
onSelectValue={getSelCity}
|
onSelectValue={getSelCity}
|
||||||
|
value={objSearch?.city ||code.cityCd[0]?.val ||""}
|
||||||
/>
|
/>
|
||||||
<SelectBox
|
<SelectBox
|
||||||
className="col-span-2 w-1/6 h-full text-2xl ml-8"
|
className="col-span-2 w-1/6 h-full text-2xl ml-8"
|
||||||
label="시군구"
|
label="시군구"
|
||||||
selectClass={""}
|
selectClass={""}
|
||||||
selectArray={selectSgg || []}
|
selectArray={selectSgg || [{ val: '0', text: '전체' }]}
|
||||||
onSelectValue={getSgg}
|
onSelectValue={getSgg}
|
||||||
value={selectedSgg}
|
value={selectedSgg ||'0'}
|
||||||
/>
|
/>
|
||||||
<div className="col-span-5 w-auto">
|
<div className="col-span-5 w-auto">
|
||||||
<div className="flex flex-row items-center">
|
<div className="flex flex-row items-center">
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import toast, { Toaster } from "react-hot-toast";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function LdrmntCoSttn() {
|
export default function LdrmntCoSttn() {
|
||||||
const { code, ldrmnt, ldrmntInit, ldrmntSearch, ldrmntUpdate } = useWrStore(
|
const { auth, code, ldrmnt, ldrmntInit, ldrmntSearch, ldrmntUpdate } = useWrStore(
|
||||||
(state) => state
|
(state) => state
|
||||||
);
|
);
|
||||||
const { ldrmntRes, excelList, ldrmntResCount } = ldrmnt;
|
const { ldrmntRes, excelList, ldrmntResCount } = ldrmnt;
|
||||||
@@ -47,6 +47,7 @@ export default function LdrmntCoSttn() {
|
|||||||
const [resetPage, isResetPage] = useState(false);
|
const [resetPage, isResetPage] = useState(false);
|
||||||
const [isDownloadClicked, setIsDownloadClicked] = useState(false);
|
const [isDownloadClicked, setIsDownloadClicked] = useState(false);
|
||||||
const { t } = useTranslation('base');
|
const { t } = useTranslation('base');
|
||||||
|
const { regAuthrtYn, mdfcnAuthrtYn } = auth;
|
||||||
|
|
||||||
const excelClick = useCallback(() => {
|
const excelClick = useCallback(() => {
|
||||||
excelDownload(
|
excelDownload(
|
||||||
@@ -224,6 +225,7 @@ export default function LdrmntCoSttn() {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
setIsExcelOpen({ isModal: true });
|
setIsExcelOpen({ isModal: true });
|
||||||
}}
|
}}
|
||||||
|
disabled={regAuthrtYn === 'N'}
|
||||||
>
|
>
|
||||||
엑셀등록
|
엑셀등록
|
||||||
</Button>
|
</Button>
|
||||||
@@ -269,14 +271,16 @@ export default function LdrmntCoSttn() {
|
|||||||
setDetailModal({ ...detailModal, isOpen: !detailModal.isOpen })
|
setDetailModal({ ...detailModal, isOpen: !detailModal.isOpen })
|
||||||
}}
|
}}
|
||||||
bodyClass={"w-[40vw] max-w-none max-h-[calc(100%-70px)]"}
|
bodyClass={"w-[40vw] max-w-none max-h-[calc(100%-70px)]"}
|
||||||
body={<CoDetailModal formObj={detailModal.data} onFormSubmit={async (value) => {
|
body={<CoDetailModal formObj={detailModal.data}
|
||||||
const handleConfirm = async () => {
|
readonly={mdfcnAuthrtYn === 'N'}
|
||||||
await ldrmntUpdate(value);
|
onFormSubmit={async (value) => {
|
||||||
setDetailModal({ ...detailModal, isOpen: false });
|
const handleConfirm = async () => {
|
||||||
ldrmntSearch(false, pageNation, '20', computeCityNm(), searchTxt || "");
|
await ldrmntUpdate(value);
|
||||||
};
|
setDetailModal({ ...detailModal, isOpen: false });
|
||||||
confirmToast(t('isUpdateMsg'), handleConfirm);
|
ldrmntSearch(false, pageNation, '20', computeCityNm(), searchTxt || "");
|
||||||
}} />}
|
};
|
||||||
|
confirmToast(t('isUpdateMsg'), handleConfirm);
|
||||||
|
}} />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<UiModal
|
<UiModal
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { useEffect, useState } from "react";
|
|||||||
import { Toaster } from "react-hot-toast";
|
import { Toaster } from "react-hot-toast";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const { code, htdfl, initHtdflReg, getHtdflBdstData, htdflNmSearch } =
|
const { auth,code, htdfl, initHtdflReg, getHtdflBdstData, htdflNmSearch } =
|
||||||
useWrStore((state) => state);
|
useWrStore((state) => state);
|
||||||
const [searchTxt, setSearchTxt] = useState("");
|
const [searchTxt, setSearchTxt] = useState("");
|
||||||
const [pageNation, setPageNation] = useState(1);
|
const [pageNation, setPageNation] = useState(1);
|
||||||
@@ -30,12 +30,9 @@ export default function Home() {
|
|||||||
const [bdstTable, setbdstTable] = useState<customHtdflBdst[]>();
|
const [bdstTable, setbdstTable] = useState<customHtdflBdst[]>();
|
||||||
const [issNewReg, setIsNewReg] = useState<boolean>(false);
|
const [issNewReg, setIsNewReg] = useState<boolean>(false);
|
||||||
|
|
||||||
// const [bdstChgProps, setBdstChgProps] = useState<{
|
|
||||||
// isOpen: boolean;
|
|
||||||
// chgBuilding: chgBuilding[];
|
|
||||||
// }>({ isOpen: false, chgBuilding: [] });
|
|
||||||
|
|
||||||
const { htdflRes ,htdflResCount} = htdfl;
|
const { htdflRes ,htdflResCount} = htdfl;
|
||||||
|
const { regAuthrtYn, mdfcnAuthrtYn } = auth;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!htdfl.isInit) {
|
if (!htdfl.isInit) {
|
||||||
@@ -116,7 +113,10 @@ export default function Home() {
|
|||||||
>
|
>
|
||||||
조회
|
조회
|
||||||
</Button>
|
</Button>
|
||||||
<Button size={"sm"} onClick={() => setIsNewReg(!issNewReg)}>
|
<Button size={"sm"}
|
||||||
|
onClick={() => setIsNewReg(!issNewReg)}
|
||||||
|
disabled={regAuthrtYn === "N"}
|
||||||
|
>
|
||||||
신규등록
|
신규등록
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -149,6 +149,7 @@ export default function Home() {
|
|||||||
<HtdflRegForm
|
<HtdflRegForm
|
||||||
htdflForm={htdflForm ?? ({} as customHtdflBdst)}
|
htdflForm={htdflForm ?? ({} as customHtdflBdst)}
|
||||||
isModal={false}
|
isModal={false}
|
||||||
|
readonly={mdfcnAuthrtYn === "N"}
|
||||||
/>
|
/>
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</ListDiv>
|
</ListDiv>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
|
|
||||||
export default function PublicReuseFaciltyInsert() {
|
export default function PublicReuseFaciltyInsert() {
|
||||||
const {
|
const {
|
||||||
|
auth,
|
||||||
code,
|
code,
|
||||||
pbnst,
|
pbnst,
|
||||||
pubHasuInit,
|
pubHasuInit,
|
||||||
@@ -47,8 +48,10 @@ export default function PublicReuseFaciltyInsert() {
|
|||||||
pubHasuSearch,
|
pubHasuSearch,
|
||||||
pbnstRuseBizUpdate,
|
pbnstRuseBizUpdate,
|
||||||
} = useWrStore((state) => state);
|
} = useWrStore((state) => state);
|
||||||
|
|
||||||
const { t } = useTranslation("base");
|
const { t } = useTranslation("base");
|
||||||
const { pubFacHeadList, pbnstHasuResCount, pbnstHasuRes, pbnstRes } = pbnst;
|
const { pubFacHeadList, pbnstHasuResCount, pbnstHasuRes, pbnstRes } = pbnst;
|
||||||
|
const { regAuthrtYn, mdfcnAuthrtYn } = auth;
|
||||||
const [, setCurrentTab] = useState<string>("mng");
|
const [, setCurrentTab] = useState<string>("mng");
|
||||||
const [isRuseReg, setIsRuseReg] = useState<{
|
const [isRuseReg, setIsRuseReg] = useState<{
|
||||||
isModal: boolean;
|
isModal: boolean;
|
||||||
@@ -290,6 +293,7 @@ export default function PublicReuseFaciltyInsert() {
|
|||||||
}
|
}
|
||||||
isResetPage(true);
|
isResetPage(true);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
>
|
>
|
||||||
조회
|
조회
|
||||||
</Button>
|
</Button>
|
||||||
@@ -307,6 +311,7 @@ export default function PublicReuseFaciltyInsert() {
|
|||||||
appendPbnstRuseFclt();
|
appendPbnstRuseFclt();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
disabled={regAuthrtYn === "N"}
|
||||||
>
|
>
|
||||||
신규등록
|
신규등록
|
||||||
</Button>
|
</Button>
|
||||||
@@ -319,19 +324,17 @@ export default function PublicReuseFaciltyInsert() {
|
|||||||
<div className="grid grid-cols-8 gap-4">
|
<div className="grid grid-cols-8 gap-4">
|
||||||
<div className="col-span-5 h-full min-h-0">
|
<div className="col-span-5 h-full min-h-0">
|
||||||
<ListDiv className="min-h-0">
|
<ListDiv className="min-h-0">
|
||||||
{/* <ScrollArea className="h-[60vh]"> */}
|
{/* <ScrollArea className="h-[60vh]"> */} {/* 높이 조정 */}
|
||||||
{" "}
|
<UiTable
|
||||||
{/* 높이 조정 */}
|
tableData={bdstTable || []}
|
||||||
<UiTable
|
headlist={pubFacHeadList}
|
||||||
tableData={bdstTable || []}
|
pageSize={10}
|
||||||
headlist={pubFacHeadList}
|
total={pbnstHasuResCount || 20}
|
||||||
pageSize={10}
|
headName={"공공 하수처리시설 목록"}
|
||||||
total={pbnstHasuResCount || 20}
|
cellClick={cellClick}
|
||||||
headName={"공공 하수처리시설 목록"}
|
onPageChange={setPageNation}
|
||||||
cellClick={cellClick}
|
resetPageNo={resetPage}
|
||||||
onPageChange={setPageNation}
|
/>
|
||||||
resetPageNo={resetPage}
|
|
||||||
/>
|
|
||||||
{/* </ScrollArea> */}
|
{/* </ScrollArea> */}
|
||||||
</ListDiv>
|
</ListDiv>
|
||||||
</div>
|
</div>
|
||||||
@@ -351,6 +354,7 @@ export default function PublicReuseFaciltyInsert() {
|
|||||||
size={"sm"}
|
size={"sm"}
|
||||||
onClick={form.handleSubmit(onSubmit, onInvalid)}
|
onClick={form.handleSubmit(onSubmit, onInvalid)}
|
||||||
className="mr-5 mt-2"
|
className="mr-5 mt-2"
|
||||||
|
disabled={mdfcnAuthrtYn === "N"}
|
||||||
>
|
>
|
||||||
저장
|
저장
|
||||||
</Button>
|
</Button>
|
||||||
@@ -364,7 +368,7 @@ export default function PublicReuseFaciltyInsert() {
|
|||||||
setIndexMng(index);
|
setIndexMng(index);
|
||||||
}}
|
}}
|
||||||
indexMng={indexMng}
|
indexMng={indexMng}
|
||||||
readonly={false}
|
readonly={mdfcnAuthrtYn === "N"}
|
||||||
/>
|
/>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent className="max-h-full" value="buse">
|
<TabsContent className="max-h-full" value="buse">
|
||||||
@@ -376,9 +380,9 @@ export default function PublicReuseFaciltyInsert() {
|
|||||||
}}
|
}}
|
||||||
indexMng={indexMng}
|
indexMng={indexMng}
|
||||||
indexBiz={indexBiz}
|
indexBiz={indexBiz}
|
||||||
|
readonly={mdfcnAuthrtYn === "N"}
|
||||||
/>
|
/>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
|
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { useWrStore } from "@/app/store";
|
import { useWrStore } from "@/app/store";
|
||||||
import {
|
import { type customRainBdst } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||||
type customRainBdst,
|
|
||||||
} from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
|
||||||
import { formatCommaNumber, tableData } from "@/components/lib/func/commom";
|
import { formatCommaNumber, tableData } from "@/components/lib/func/commom";
|
||||||
import RainRegForm from "@/components/ui/form/fcltReg/rainReg/rainRegForm";
|
import RainRegForm from "@/components/ui/form/fcltReg/rainReg/rainRegForm";
|
||||||
import { BdstReg } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal";
|
import { BdstReg } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal";
|
||||||
@@ -19,14 +17,19 @@ import {
|
|||||||
import ListDiv from "@common/business_components/ui/list_div";
|
import ListDiv from "@common/business_components/ui/list_div";
|
||||||
import { Button } from "@common/components";
|
import { Button } from "@common/components";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Toaster } from "react-hot-toast";
|
import { Toaster } from "react-hot-toast";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const { rain, code, initRain, rainSearch, getRainData } = useWrStore(
|
const { auth, rain, code, initRain, rainSearch, getRainData } = useWrStore(
|
||||||
(state) => {
|
(state) => {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const { regAuthrtYn, mdfcnAuthrtYn } = auth;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const { rainRes, rainResCount } = rain;
|
const { rainRes, rainResCount } = rain;
|
||||||
const [rainForm, setRainForm] = useState<customRainBdst>();
|
const [rainForm, setRainForm] = useState<customRainBdst>();
|
||||||
const [issNewReg, setIsNewReg] = useState<boolean>(false);
|
const [issNewReg, setIsNewReg] = useState<boolean>(false);
|
||||||
@@ -53,7 +56,7 @@ export default function Home() {
|
|||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
archArea: formatCommaNumber(archArea),
|
archArea: formatCommaNumber(archArea),
|
||||||
|
bdstChgYn: item.chgBuilding[0]?.bdstChgNm != null ? "Y" : "N",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -64,13 +67,10 @@ export default function Home() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [code, rainRes]);
|
}, [code, rainRes]);
|
||||||
const cellClick: (val: number | undefined) => void = (
|
const cellClick: (val: number | undefined) => void = (val) => {
|
||||||
val
|
|
||||||
) => {
|
|
||||||
if (val !== undefined) {
|
if (val !== undefined) {
|
||||||
setRainForm(rainRes[val]);
|
setRainForm(rainRes[val]);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -99,7 +99,7 @@ export default function Home() {
|
|||||||
size={"sm"}
|
size={"sm"}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
rainSearch(searchTxt || "", 1, "41");
|
rainSearch(searchTxt || "", 1, "41");
|
||||||
//rainSearch(searchTxt || "", pageNation, "41");
|
//rainSearch(searchTxt || "", pageNation, "41");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
조회
|
조회
|
||||||
@@ -107,7 +107,10 @@ export default function Home() {
|
|||||||
<Button
|
<Button
|
||||||
size={"sm"}
|
size={"sm"}
|
||||||
className=""
|
className=""
|
||||||
onClick={() => setIsNewReg(!issNewReg)}
|
onClick={() => {
|
||||||
|
setIsNewReg(!issNewReg);
|
||||||
|
}}
|
||||||
|
disabled={regAuthrtYn === "N"}
|
||||||
>
|
>
|
||||||
신규등록
|
신규등록
|
||||||
</Button>
|
</Button>
|
||||||
@@ -143,6 +146,7 @@ export default function Home() {
|
|||||||
<RainRegForm
|
<RainRegForm
|
||||||
rainForm={rainForm ?? ({} as customRainBdst)}
|
rainForm={rainForm ?? ({} as customRainBdst)}
|
||||||
isModal={false}
|
isModal={false}
|
||||||
|
readonly={mdfcnAuthrtYn !== "Y"}
|
||||||
></RainRegForm>
|
></RainRegForm>
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</ListDiv>
|
</ListDiv>
|
||||||
|
|||||||
@@ -20,9 +20,11 @@ import { useEffect, useState } from "react";
|
|||||||
import { Toaster } from "react-hot-toast";
|
import { Toaster } from "react-hot-toast";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const { code, rswt, initRswt, rswtBdstSearch, getRswtBdstData } = useWrStore(
|
const { auth,code, rswt, initRswt, rswtBdstSearch, getRswtBdstData } = useWrStore(
|
||||||
(state) => state
|
(state) => state
|
||||||
);
|
);
|
||||||
|
const { regAuthrtYn, mdfcnAuthrtYn } = auth;
|
||||||
|
|
||||||
const [rswtForm, setRswtForm] = useState<customRswtBdst>();
|
const [rswtForm, setRswtForm] = useState<customRswtBdst>();
|
||||||
const [searchTxt, setSearchTxt] = useState<string>();
|
const [searchTxt, setSearchTxt] = useState<string>();
|
||||||
const [issNewReg, setIsNewReg] = useState<boolean>(false);
|
const [issNewReg, setIsNewReg] = useState<boolean>(false);
|
||||||
@@ -114,6 +116,7 @@ export default function Home() {
|
|||||||
size={"sm"}
|
size={"sm"}
|
||||||
className="mr-4"
|
className="mr-4"
|
||||||
onClick={() => setIsNewReg(!issNewReg)}
|
onClick={() => setIsNewReg(!issNewReg)}
|
||||||
|
disabled={regAuthrtYn === "N"}
|
||||||
>
|
>
|
||||||
신규등록
|
신규등록
|
||||||
</Button>
|
</Button>
|
||||||
@@ -146,6 +149,7 @@ export default function Home() {
|
|||||||
<RswtrRegForm
|
<RswtrRegForm
|
||||||
rswtForm={rswtForm ?? ({} as customRswtBdst)}
|
rswtForm={rswtForm ?? ({} as customRswtBdst)}
|
||||||
isModal={false}
|
isModal={false}
|
||||||
|
readonly={mdfcnAuthrtYn === "N"}
|
||||||
/>
|
/>
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</ListDiv>
|
</ListDiv>
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { useWrStore } from "@/app/store";
|
import { useWrStore } from "@/app/store";
|
||||||
import { btnClass } from "@/app/store/common/code";
|
import { btnClass } from "@/app/store/common/code";
|
||||||
|
import type { customPbnst } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
|
||||||
|
import type { WaterReuseFacility } from "@/app/store/ruseFcltMng/fcltSttn/pbnstSttn/type";
|
||||||
|
import { excelDownload, yearOptions } from "@/components/lib/func/commom";
|
||||||
|
import HeadChModal from "@/components/ui/modal/sttn/headChModal/headChModal";
|
||||||
|
import { PbnstSttnModal } from "@/components/ui/modal/sttn/pbnstSttnModal/pbnstSttnModal";
|
||||||
import {
|
import {
|
||||||
ContentsDiv,
|
ContentsDiv,
|
||||||
SearchBaseForm,
|
SearchBaseForm,
|
||||||
@@ -12,14 +17,9 @@ import {
|
|||||||
type ReturnType,
|
type ReturnType,
|
||||||
} from "@common/business_components/ui";
|
} from "@common/business_components/ui";
|
||||||
import ListDiv from "@common/business_components/ui/list_div";
|
import ListDiv from "@common/business_components/ui/list_div";
|
||||||
import { Button, Label } from "@common/components/ui";
|
|
||||||
import HeadChModal from "@/components/ui/modal/sttn/headChModal/headChModal";
|
|
||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
|
||||||
import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan";
|
import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan";
|
||||||
import type { customPbnst } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
|
import { Button, Label } from "@common/components/ui";
|
||||||
import { excelDownload, yearOptions } from "@/components/lib/func/commom";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import type { WaterReuseFacility } from "@/app/store/ruseFcltMng/fcltSttn/pbnstSttn/type";
|
|
||||||
import { PbnstSttnModal } from "@/components/ui/modal/sttn/pbnstSttnModal/pbnstSttnModal";
|
|
||||||
|
|
||||||
export default function PbnstSttn() {
|
export default function PbnstSttn() {
|
||||||
const {
|
const {
|
||||||
@@ -29,6 +29,7 @@ export default function PbnstSttn() {
|
|||||||
pbnSttnInit,
|
pbnSttnInit,
|
||||||
getPbnStnDetail,
|
getPbnStnDetail,
|
||||||
getFlcts,
|
getFlcts,
|
||||||
|
resetPbnstDetail
|
||||||
} = useWrStore((state) => state);
|
} = useWrStore((state) => state);
|
||||||
|
|
||||||
const { pbnstSttnRes, fclts, pbnstSttnResCount } = pbnstSttn;
|
const { pbnstSttnRes, fclts, pbnstSttnResCount } = pbnstSttn;
|
||||||
@@ -103,9 +104,6 @@ export default function PbnstSttn() {
|
|||||||
});
|
});
|
||||||
}, [pbnstSttn.pbnstDetail]);
|
}, [pbnstSttn.pbnstDetail]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
console.log("pbnDetaileData.isModal ", pbnDetaileData.isModal);
|
|
||||||
}, [pbnDetaileData.isModal]);
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ContentsDiv>
|
<ContentsDiv>
|
||||||
@@ -233,8 +231,9 @@ export default function PbnstSttn() {
|
|||||||
open={pbnDetaileData.isModal}
|
open={pbnDetaileData.isModal}
|
||||||
onOpenChange={(open) => {
|
onOpenChange={(open) => {
|
||||||
//TODO:OPEN 상태 확인필요
|
//TODO:OPEN 상태 확인필요
|
||||||
if(!open)
|
if (!open)
|
||||||
setPbnDetaileData({ data: {} as customPbnst, isModal: open });
|
setPbnDetaileData({ data: {} as customPbnst, isModal: open });
|
||||||
|
resetPbnstDetail();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</ContentsDiv>
|
</ContentsDiv>
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
const {
|
const {
|
||||||
|
auth,
|
||||||
code,
|
code,
|
||||||
rainChkgdn,
|
rainChkgdn,
|
||||||
rswtChkgdn,
|
rswtChkgdn,
|
||||||
@@ -64,6 +65,7 @@ export default function Page() {
|
|||||||
} = useWrStore((state) => {
|
} = useWrStore((state) => {
|
||||||
return state;
|
return state;
|
||||||
});
|
});
|
||||||
|
const { regAuthrtYn, mdfcnAuthrtYn, delAuthrtYn } = auth;
|
||||||
const [isRegExcel, setIsRegExcel] = useState(false);
|
const [isRegExcel, setIsRegExcel] = useState(false);
|
||||||
const [updateRainDetail, setUpdateRainDetail] = useState<rainChkZodType[]>(
|
const [updateRainDetail, setUpdateRainDetail] = useState<rainChkZodType[]>(
|
||||||
[]
|
[]
|
||||||
@@ -301,6 +303,7 @@ export default function Page() {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
clickDelete(deleteIdx, selFcltDiv);
|
clickDelete(deleteIdx, selFcltDiv);
|
||||||
}}
|
}}
|
||||||
|
disabled={delAuthrtYn === 'N'}
|
||||||
>
|
>
|
||||||
삭제
|
삭제
|
||||||
</Button>
|
</Button>
|
||||||
@@ -313,6 +316,7 @@ export default function Page() {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
chkUpdateTable(selFcltDiv);
|
chkUpdateTable(selFcltDiv);
|
||||||
}}
|
}}
|
||||||
|
disabled={mdfcnAuthrtYn === 'N'}
|
||||||
>
|
>
|
||||||
저장
|
저장
|
||||||
</Button>
|
</Button>
|
||||||
@@ -330,6 +334,7 @@ export default function Page() {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
setIsRegExcel(!isRegExcel);
|
setIsRegExcel(!isRegExcel);
|
||||||
}}
|
}}
|
||||||
|
disabled={regAuthrtYn === 'N'}
|
||||||
>
|
>
|
||||||
결과등록
|
결과등록
|
||||||
</Button>
|
</Button>
|
||||||
@@ -354,6 +359,7 @@ export default function Page() {
|
|||||||
pageNation={rainPageNation}
|
pageNation={rainPageNation}
|
||||||
onPageChange={rainPageChange}
|
onPageChange={rainPageChange}
|
||||||
pageCount={rainChkgdn.rainChkCount}
|
pageCount={rainChkgdn.rainChkCount}
|
||||||
|
readonly={mdfcnAuthrtYn === 'N'}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<RswtChkgdTable
|
<RswtChkgdTable
|
||||||
@@ -364,6 +370,7 @@ export default function Page() {
|
|||||||
pageNation={rswtPageNation}
|
pageNation={rswtPageNation}
|
||||||
onPageChange={rswtPageChange}
|
onPageChange={rswtPageChange}
|
||||||
pageCount={rswtChkgdn.rswtChkCount}
|
pageCount={rswtChkgdn.rswtChkCount}
|
||||||
|
readonly={mdfcnAuthrtYn === 'N'}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</ListDiv>
|
</ListDiv>
|
||||||
@@ -380,6 +387,7 @@ export default function Page() {
|
|||||||
type={selFcltDiv}
|
type={selFcltDiv}
|
||||||
obj={isModal.data}
|
obj={isModal.data}
|
||||||
setIsModal={(open) => setIsModal((prev) => ({ ...prev, open }))}
|
setIsModal={(open) => setIsModal((prev) => ({ ...prev, open }))}
|
||||||
|
readonly={mdfcnAuthrtYn === 'N' ? false : true}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
></UiModal>
|
></UiModal>
|
||||||
|
|||||||
@@ -38,10 +38,11 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { headMakeprfmnc } from "../chkgdnReg/TableHead";
|
import { headMakeprfmnc } from "../chkgdnReg/TableHead";
|
||||||
|
|
||||||
export default function PrfmncPrfmncReg() {
|
export default function PrfmncPrfmncReg() {
|
||||||
const { prfmnc, prfmncHasuInit, prfmnRegData, prfmncHasuNmSearch } = useWrStore(
|
const { auth, prfmnc, prfmncHasuInit, prfmnRegData, prfmncHasuNmSearch } = useWrStore(
|
||||||
(state) => state
|
(state) => state
|
||||||
);
|
);
|
||||||
const { pbnstPrfmncHeadList, monthHeadList, prfmncRes, prfmncResCount } = prfmnc;
|
const { pbnstPrfmncHeadList, monthHeadList, prfmncRes, prfmncResCount } = prfmnc;
|
||||||
|
const { regAuthrtYn, mdfcnAuthrtYn } = auth;
|
||||||
const [bdstTable, setbdstTable] = useState<FcPrfType[]>();
|
const [bdstTable, setbdstTable] = useState<FcPrfType[]>();
|
||||||
const [searchTxt, setSearchTxt] = useState<string>();
|
const [searchTxt, setSearchTxt] = useState<string>();
|
||||||
const [isExcelOpen, setIsExcelOPen] = useState<{
|
const [isExcelOpen, setIsExcelOPen] = useState<{
|
||||||
@@ -92,7 +93,7 @@ export default function PrfmncPrfmncReg() {
|
|||||||
searchYear,
|
searchYear,
|
||||||
pbnstRuseFcltId
|
pbnstRuseFcltId
|
||||||
) as unknown as PrfType
|
) as unknown as PrfType
|
||||||
,searchYear
|
, searchYear
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -259,6 +260,7 @@ export default function PrfmncPrfmncReg() {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
onSave();
|
onSave();
|
||||||
}}
|
}}
|
||||||
|
disabled={mdfcnAuthrtYn === 'N'}
|
||||||
>
|
>
|
||||||
저장
|
저장
|
||||||
</Button>
|
</Button>
|
||||||
@@ -272,6 +274,7 @@ export default function PrfmncPrfmncReg() {
|
|||||||
setIsExcelOPen({ ...isExcelOpen, isModal: true });
|
setIsExcelOPen({ ...isExcelOpen, isModal: true });
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
disabled={regAuthrtYn === 'N'}
|
||||||
>
|
>
|
||||||
파일등록
|
파일등록
|
||||||
</Button>
|
</Button>
|
||||||
@@ -321,7 +324,7 @@ export default function PrfmncPrfmncReg() {
|
|||||||
{headMakeprfmnc(monthHeadList, [])}
|
{headMakeprfmnc(monthHeadList, [])}
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<TableBody key={prfmnc.pageKey + 'pageKey'}>
|
<TableBody key={prfmnc.pageKey + 'pageKey'}>
|
||||||
{InputTableBody(inputData ?? [], monthHeadList, setInputData)}
|
{InputTableBody(inputData ?? [], monthHeadList, setInputData, mdfcnAuthrtYn === 'N' ? false : true)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</Table>
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
@@ -348,7 +351,7 @@ export default function PrfmncPrfmncReg() {
|
|||||||
}
|
}
|
||||||
open={isExcelOpen.isModal}
|
open={isExcelOpen.isModal}
|
||||||
onOpenChange={() => {
|
onOpenChange={() => {
|
||||||
setIsExcelOPen({ isModal: false, data: {} as FcPrfType });
|
setIsExcelOPen({ ...isExcelOpen, isModal: false });
|
||||||
}}
|
}}
|
||||||
></UiModal>
|
></UiModal>
|
||||||
<Toaster position="top-center" />
|
<Toaster position="top-center" />
|
||||||
|
|||||||
@@ -99,7 +99,9 @@ export default function Page() {
|
|||||||
isRainSttn(true)
|
isRainSttn(true)
|
||||||
rainChkSttnInit(1, rainPageSize, new Date().getFullYear().toString(), commonCd);
|
rainChkSttnInit(1, rainPageSize, new Date().getFullYear().toString(), commonCd);
|
||||||
setIsModal({ data: {}, open: false });
|
setIsModal({ data: {}, open: false });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, [rainChkSttn.isInit, rainChkSttnInit, rainPageSize]);
|
}, [rainChkSttn.isInit, rainChkSttnInit, rainPageSize]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -226,6 +228,7 @@ export default function Page() {
|
|||||||
pageNation={rainPageNation}
|
pageNation={rainPageNation}
|
||||||
onPageChange={rainPageChange}
|
onPageChange={rainPageChange}
|
||||||
pageCount={rainChkSttn.rainChkCount}
|
pageCount={rainChkSttn.rainChkCount}
|
||||||
|
readonly={true}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<RswtChkgdTable
|
<RswtChkgdTable
|
||||||
@@ -236,6 +239,7 @@ export default function Page() {
|
|||||||
pageNation={rswtPageNation}
|
pageNation={rswtPageNation}
|
||||||
onPageChange={rswtPageChange}
|
onPageChange={rswtPageChange}
|
||||||
pageCount={rswtChkSttn.rswtChkCount}
|
pageCount={rswtChkSttn.rswtChkCount}
|
||||||
|
readonly={true}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</ListDiv>
|
</ListDiv>
|
||||||
@@ -247,7 +251,7 @@ export default function Page() {
|
|||||||
setIsModal({ open: !open, data: {} });
|
setIsModal({ open: !open, data: {} });
|
||||||
}}
|
}}
|
||||||
bodyClass={"w-[80vw] max-w-none"}
|
bodyClass={"w-[80vw] max-w-none"}
|
||||||
body={<ChkgdModal type={selFcltDiv} obj={isModal.data} setIsModal={() => { }} />}
|
body={<ChkgdModal readonly={true} type={selFcltDiv} obj={isModal.data} setIsModal={() => { }} />}
|
||||||
></UiModal>
|
></UiModal>
|
||||||
<Toaster position="top-center" />
|
<Toaster position="top-center" />
|
||||||
</ContentsDiv>
|
</ContentsDiv>
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ export default function RainStat() {
|
|||||||
const excelData = [...sidoTotalSummary, ...sidoSummaryList, ...summaryExcelData];
|
const excelData = [...sidoTotalSummary, ...sidoSummaryList, ...summaryExcelData];
|
||||||
|
|
||||||
|
|
||||||
console.log(' excelData ', excelData)
|
|
||||||
excelDownload(
|
excelDownload(
|
||||||
excelData as unknown as [][],
|
excelData as unknown as [][],
|
||||||
"빗물이용시설 통계",
|
"빗물이용시설 통계",
|
||||||
|
|||||||
@@ -1,21 +1,6 @@
|
|||||||
import { getFetch, getFetchWithCount } from "@/components/lib/api";
|
import { getFetchWithCount } from "@/components/lib/api";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
|
|
||||||
export const getMenuAuthrts = async (menuCd: number) => {
|
|
||||||
const response = await getFetch(
|
|
||||||
"LOCAL",
|
|
||||||
`/cms-service/api/v1/menu-authrts/pageinfo/${menuCd}`
|
|
||||||
);
|
|
||||||
|
|
||||||
authStateExport.auth = {
|
|
||||||
mngAuthrtYn: response[0].mngAuthrtYn,
|
|
||||||
inqAuthrtYn: response[0].mngAuthrtYn,
|
|
||||||
regAuthrtYn: response[0].mngAuthrtYn,
|
|
||||||
mdfcnAuthrtYn: response[0].mngAuthrtYn,
|
|
||||||
delAuthrtYn: response[0].mngAuthrtYn,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export type authState = {
|
export type authState = {
|
||||||
auth: {
|
auth: {
|
||||||
mngAuthrtYn: string;
|
mngAuthrtYn: string;
|
||||||
|
|||||||
@@ -98,9 +98,10 @@ export const drgtActionsExport: (set: any) => drgtActions = (
|
|||||||
const year = today.getFullYear();
|
const year = today.getFullYear();
|
||||||
const month = String(today.getMonth() + 1).padStart(2, '0');
|
const month = String(today.getMonth() + 1).padStart(2, '0');
|
||||||
const formatted = `${year}${month}`;
|
const formatted = `${year}${month}`;
|
||||||
const fromDate = formatted;
|
let fromDate = formatted;
|
||||||
const toDate = formatted;
|
let toDate = formatted;
|
||||||
|
fromDate='202506'
|
||||||
|
toDate='202506'
|
||||||
const drgtRes = await initFetch(fromDate, toDate, []);
|
const drgtRes = await initFetch(fromDate, toDate, []);
|
||||||
set((state: drgtState) => {
|
set((state: drgtState) => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ export type pbnstSttnState = {
|
|||||||
ruseGuranteeHeadList: TableUpperProps[]
|
ruseGuranteeHeadList: TableUpperProps[]
|
||||||
ruseDmdHeadList: TableUpperProps[]
|
ruseDmdHeadList: TableUpperProps[]
|
||||||
ruseFcltHeadList: TableUpperProps[]
|
ruseFcltHeadList: TableUpperProps[]
|
||||||
pbnstSttnResCount:number;
|
pbnstSttnResCount: number;
|
||||||
excelList: [];
|
excelList: [];
|
||||||
fclts:string[]
|
fclts: string[]
|
||||||
isInit: boolean;
|
isInit: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -43,15 +43,15 @@ type pbnstSttnActions = {
|
|||||||
reurnValue: ReturnType,
|
reurnValue: ReturnType,
|
||||||
searchNm: string | undefined,
|
searchNm: string | undefined,
|
||||||
year: string,
|
year: string,
|
||||||
fclts:string[]
|
fclts: string[]
|
||||||
) => void;
|
) => void;
|
||||||
getFlcts:()=>void;
|
getFlcts: () => void;
|
||||||
pbnSttnInit: (
|
pbnSttnInit: (
|
||||||
page: string,
|
page: string,
|
||||||
total: string,
|
total: string,
|
||||||
reurnValue: ReturnType,
|
reurnValue: ReturnType,
|
||||||
year: string,
|
year: string,
|
||||||
flcts:string[]
|
flcts: string[]
|
||||||
) => void;
|
) => void;
|
||||||
getPbnStnDetail: (pbnstRuseFcltId: string) => void;
|
getPbnStnDetail: (pbnstRuseFcltId: string) => void;
|
||||||
pbnNmSearch: (
|
pbnNmSearch: (
|
||||||
@@ -60,8 +60,9 @@ type pbnstSttnActions = {
|
|||||||
reurnValue: ReturnType,
|
reurnValue: ReturnType,
|
||||||
searchNm: string | undefined,
|
searchNm: string | undefined,
|
||||||
year: string,
|
year: string,
|
||||||
flcts:string[]
|
flcts: string[]
|
||||||
) => void;
|
) => void;
|
||||||
|
resetPbnstDetail: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type pbnstSttnType = pbnstSttnState & pbnstSttnActions;
|
export type pbnstSttnType = pbnstSttnState & pbnstSttnActions;
|
||||||
@@ -77,11 +78,11 @@ export const pbnstSttnStateExport: pbnstSttnState = {
|
|||||||
ruseDmdHeadList: ruseDmdHeadListExport,
|
ruseDmdHeadList: ruseDmdHeadListExport,
|
||||||
ruseFcltHeadList: ruseFcltHeadListExport,
|
ruseFcltHeadList: ruseFcltHeadListExport,
|
||||||
pbnstSttnRes: [],
|
pbnstSttnRes: [],
|
||||||
pbnstSttnResCount:1,
|
pbnstSttnResCount: 1,
|
||||||
pbnstDetail: {} as customPbnst,
|
pbnstDetail: {} as customPbnst,
|
||||||
pbnstSearchData: [],
|
pbnstSearchData: [],
|
||||||
excelList: [],
|
excelList: [],
|
||||||
fclts:[],
|
fclts: [],
|
||||||
isInit: false,
|
isInit: false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -92,12 +93,12 @@ const hasuListFetch = async (
|
|||||||
reurnValue: ReturnType,
|
reurnValue: ReturnType,
|
||||||
searchNm: string | undefined,
|
searchNm: string | undefined,
|
||||||
year: string,
|
year: string,
|
||||||
flcts:string[]
|
flcts: string[]
|
||||||
) => {
|
) => {
|
||||||
let url = `/prcsFclt/ruseInfo/`;
|
let url = `/prcsFclt/ruseInfo/`;
|
||||||
|
|
||||||
if (reurnValue.partValue === "A") {
|
if (reurnValue.partValue === "A") {
|
||||||
url+=`${page}/${total}/${reurnValue.partValue}/${
|
url += `${page}/${total}/${reurnValue.partValue}/${
|
||||||
// reurnValue.sidoValue ? reurnValue.sidoValue : reurnValue.sigunValue
|
// reurnValue.sidoValue ? reurnValue.sidoValue : reurnValue.sigunValue
|
||||||
reurnValue.sigunValue !== '0' ? reurnValue.sigunValue : reurnValue.sidoValue
|
reurnValue.sigunValue !== '0' ? reurnValue.sigunValue : reurnValue.sidoValue
|
||||||
}/0/1/SW`
|
}/0/1/SW`
|
||||||
@@ -108,12 +109,12 @@ const hasuListFetch = async (
|
|||||||
? reurnValue.unitWaterShedValue
|
? reurnValue.unitWaterShedValue
|
||||||
: reurnValue.middleRegionValue
|
: reurnValue.middleRegionValue
|
||||||
}/0/1/SW`
|
}/0/1/SW`
|
||||||
} else if( reurnValue.partValue === 'G'){
|
} else if (reurnValue.partValue === 'G') {
|
||||||
|
|
||||||
|
|
||||||
url += `${page}/${total}/${reurnValue.envPartValue}/${reurnValue.sigunValue !== '0' ? reurnValue.sigunValue : reurnValue.sidoValue}/0/1/SW`
|
url += `${page}/${total}/${reurnValue.envPartValue}/${reurnValue.sigunValue !== '0' ? reurnValue.sigunValue : reurnValue.sidoValue}/0/1/SW`
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
url += `1/2/A/0/0/1/SW`
|
url += `1/2/A/0/0/1/SW`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,8 +122,7 @@ const hasuListFetch = async (
|
|||||||
url += "/" + searchNm
|
url += "/" + searchNm
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(' flcts ' ,flcts)
|
const pbnList = await postFectch(url, flcts, fetchType.COMMON);
|
||||||
const pbnList = await postFectch(url, flcts,fetchType.COMMON);
|
|
||||||
const getRuseList = await postFectch(
|
const getRuseList = await postFectch(
|
||||||
`/reuseFc/pubDetailList/${year}`,
|
`/reuseFc/pubDetailList/${year}`,
|
||||||
flcts,
|
flcts,
|
||||||
@@ -139,7 +139,7 @@ const hasuListFetch = async (
|
|||||||
fclt.bscFctCd === item.pbnstRuseFcltId.substring(0, 11)
|
fclt.bscFctCd === item.pbnstRuseFcltId.substring(0, 11)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(findData){
|
if (findData) {
|
||||||
|
|
||||||
const usage = item.prfList.reduce(
|
const usage = item.prfList.reduce(
|
||||||
(acc, cur) => {
|
(acc, cur) => {
|
||||||
@@ -161,48 +161,42 @@ const hasuListFetch = async (
|
|||||||
cur.rvrKeepUswtr +
|
cur.rvrKeepUswtr +
|
||||||
cur.indstUswtr;
|
cur.indstUswtr;
|
||||||
acc.total = acc.inUsage + acc.outUsage;
|
acc.total = acc.inUsage + acc.outUsage;
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
},
|
},
|
||||||
{ total: 0, inUsage: 0, outUsage: 0 }
|
{ total: 0, inUsage: 0, outUsage: 0 }
|
||||||
);
|
);
|
||||||
console.log('findData ', findData)
|
|
||||||
return {
|
return {
|
||||||
rvbsn: findData?.rvbsn ||'-',
|
rvbsn: findData?.rvbsn || '-',
|
||||||
lgbsn: findData?.lgbsn||'-',
|
lgbsn: findData?.lgbsn || '-',
|
||||||
mdmbsn: findData?.mdmbsn||'-',
|
mdmbsn: findData?.mdmbsn || '-',
|
||||||
rgnNm: findData?.rgnNm||'-',
|
rgnNm: findData?.rgnNm || '-',
|
||||||
sido: findData?.sido||'-',
|
sido: findData?.sido || '-',
|
||||||
gugun: findData?.gugun||'-',
|
gugun: findData?.gugun || '-',
|
||||||
bscFctNm: findData?.bscFctNm||'-',
|
bscFctNm: findData?.bscFctNm || '-',
|
||||||
efflWqltStndrdNm: findData?.efflWqltStndrdNm||'-',
|
efflWqltStndrdNm: findData?.efflWqltStndrdNm || '-',
|
||||||
fctCpc: Number(findData?.fctCpc)||0,
|
fctCpc: Number(findData?.fctCpc) || 0,
|
||||||
tel: findData?.tel ?? "-",
|
tel: findData?.tel ?? "-",
|
||||||
ruseUtztnFcltNm: item?.ruseUtztnFcltNm||'-',
|
ruseUtztnFcltNm: item?.ruseUtztnFcltNm || '-',
|
||||||
fcltCpct: item?.fcltCpct||'-',
|
fcltCpct: item?.fcltCpct || '-',
|
||||||
splyExtraCpct: item?.splyExtraCpct||'-',
|
splyExtraCpct: item?.splyExtraCpct || '-',
|
||||||
ruseCpct: item?.ruseCpct||'-',
|
ruseCpct: item?.ruseCpct || '-',
|
||||||
pbnstRuseFcltId: item.pbnstRuseFcltId||'-',
|
pbnstRuseFcltId: item.pbnstRuseFcltId || '-',
|
||||||
usageTotal: usage?.total,
|
usageTotal: usage?.total,
|
||||||
inUsage: usage?.inUsage,
|
inUsage: usage?.inUsage,
|
||||||
outUsage: usage?.outUsage,
|
outUsage: usage?.outUsage,
|
||||||
operMthd: item.operList[0]?.operMthd||'-',
|
operMthd: item.operList[0]?.operMthd || '-',
|
||||||
rprtvBzenty: item.operList[0]?.rprtvBzenty,
|
rprtvBzenty: item.operList[0]?.rprtvBzenty,
|
||||||
bgngDt: moment(item.operList[0]?.bgngDt).format("YYYY-MM-DD") ?? "",
|
bgngDt: moment(item.operList[0]?.bgngDt).format("YYYY-MM-DD") ?? "",
|
||||||
endDt: moment(item.operList[0]?.endDt).format("YYYY-MM-DD") ?? "",
|
endDt: moment(item.operList[0]?.endDt).format("YYYY-MM-DD") ?? "",
|
||||||
searchNm: findData?.bscFctNm||'-',
|
searchNm: findData?.bscFctNm || '-',
|
||||||
searchPk: findData?.bscFctCd||'-',
|
searchPk: findData?.bscFctCd || '-',
|
||||||
prfList: item?.prfList ?? []
|
prfList: item?.prfList ?? []
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
).filter(Boolean);
|
).filter(Boolean);
|
||||||
|
|
||||||
|
|
||||||
console.log( ' checkWrRegListRes ', getRuseList.data)
|
|
||||||
console.log( ' data ', data)
|
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -210,12 +204,12 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
|
|||||||
set: any
|
set: any
|
||||||
) => {
|
) => {
|
||||||
return {
|
return {
|
||||||
getFlcts:async ()=>{
|
getFlcts: async () => {
|
||||||
const fclts= await getFetch(fetchType.WR,'/reuseFc/pubFc')
|
const fclts = await getFetch(fetchType.WR, '/reuseFc/pubFc')
|
||||||
return set((state: pbnstSttnState) => ({
|
return set((state: pbnstSttnState) => ({
|
||||||
pbnstSttn: {
|
pbnstSttn: {
|
||||||
...state.pbnstSttn,
|
...state.pbnstSttn,
|
||||||
fclts:fclts
|
fclts: fclts
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
@@ -239,11 +233,11 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
|
|||||||
reurnValue: ReturnType,
|
reurnValue: ReturnType,
|
||||||
searchNm: string | undefined,
|
searchNm: string | undefined,
|
||||||
year: string,
|
year: string,
|
||||||
fclts:string[]
|
fclts: string[]
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
const pbnstSttnRes = await hasuListFetch(
|
const pbnstSttnRes = await hasuListFetch(
|
||||||
page,
|
page,
|
||||||
total,
|
total,
|
||||||
@@ -265,7 +259,7 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} else{
|
} else {
|
||||||
|
|
||||||
set((state: pbnstSttnState) => {
|
set((state: pbnstSttnState) => {
|
||||||
return {
|
return {
|
||||||
@@ -273,8 +267,8 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
|
|||||||
pbnstSttn: {
|
pbnstSttn: {
|
||||||
...state.pbnstSttn,
|
...state.pbnstSttn,
|
||||||
pbnstSttnRes: pbnstSttnRes,
|
pbnstSttnRes: pbnstSttnRes,
|
||||||
pbnstSttnResCount:pbnstSttnRes.length
|
pbnstSttnResCount: pbnstSttnRes.length
|
||||||
// isInit: false,
|
// isInit: false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -283,31 +277,31 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
|
|||||||
console.log("error", erTxt);
|
console.log("error", erTxt);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pbnSttnInit: async(
|
pbnSttnInit: async (
|
||||||
page: string,
|
page: string,
|
||||||
total: string,
|
total: string,
|
||||||
reurnValue: ReturnType,
|
reurnValue: ReturnType,
|
||||||
year: string,
|
year: string,
|
||||||
fclts:string[]
|
fclts: string[]
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
const pbnstSttnRes = await hasuListFetch(
|
const pbnstSttnRes = await hasuListFetch(
|
||||||
page,
|
page,
|
||||||
total,
|
total,
|
||||||
reurnValue,
|
reurnValue,
|
||||||
undefined,
|
undefined,
|
||||||
year,
|
year,
|
||||||
fclts
|
fclts
|
||||||
);
|
);
|
||||||
console.log('pbnstSttnRes ' , pbnstSttnRes)
|
set((state: pbnstSttnState) => {
|
||||||
set( (state: pbnstSttnState) => {
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
pbnstSttn: {
|
pbnstSttn: {
|
||||||
...state.pbnstSttn,
|
...state.pbnstSttn,
|
||||||
pbnstSttnRes: pbnstSttnRes,
|
pbnstSttnRes: pbnstSttnRes,
|
||||||
pbnstSttnResCount:pbnstSttnRes.length,
|
pbnstSttnResCount: pbnstSttnRes.length,
|
||||||
isInit: false,
|
isInit: false,
|
||||||
|
pbnstDetail: {} as customPbnst
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -315,6 +309,17 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
|
|||||||
console.log("error", erTxt);
|
console.log("error", erTxt);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
resetPbnstDetail: async () => {
|
||||||
|
set((state: pbnstSttnState) => {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
pbnstSttn: {
|
||||||
|
...state.pbnstSttn,
|
||||||
|
pbnstDetail: {} as customPbnst
|
||||||
|
},
|
||||||
|
};
|
||||||
|
})
|
||||||
|
},
|
||||||
getPbnStnDetail: async (pbnstRuseFcltId: string) => {
|
getPbnStnDetail: async (pbnstRuseFcltId: string) => {
|
||||||
try {
|
try {
|
||||||
let pbnstDetail = await getFetch("wr", `/reuseFc/pubFc/${pbnstRuseFcltId}`);
|
let pbnstDetail = await getFetch("wr", `/reuseFc/pubFc/${pbnstRuseFcltId}`);
|
||||||
@@ -340,7 +345,7 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
|
|||||||
reurnValue: ReturnType,
|
reurnValue: ReturnType,
|
||||||
searchNm: string | undefined,
|
searchNm: string | undefined,
|
||||||
year: string,
|
year: string,
|
||||||
flcts:string[]
|
flcts: string[]
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
@@ -359,7 +364,7 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
|
|||||||
pbnstSttn: {
|
pbnstSttn: {
|
||||||
...state.pbnstSttn,
|
...state.pbnstSttn,
|
||||||
pbnstSearchData: pbnstSttnRes,
|
pbnstSearchData: pbnstSttnRes,
|
||||||
pbnstSttnResCount:pbnstSttnRes.length,
|
pbnstSttnResCount: pbnstSttnRes.length,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import type { SelectDataType } from "@common/business_components/ui";
|
import type { SelectDataType } from "@common/business_components/ui";
|
||||||
import type { customRainBdst } from "../../fcltReg/rainReg";
|
import type { customRainBdst } from "../../fcltReg/rainReg";
|
||||||
|
import { bdstUsgCd } from "@/app/store/common/code/basicCode";
|
||||||
|
//TODO: 공통코드시 삭제되니 수정 해야됨
|
||||||
export const excelRainSttnParsing = (
|
export const excelRainSttnParsing = (
|
||||||
excel: { data: customRainBdst[] },
|
excel: { data: customRainBdst[] },
|
||||||
sidoCode: SelectDataType[],
|
sidoCode: SelectDataType[],
|
||||||
@@ -9,14 +10,15 @@ export const excelRainSttnParsing = (
|
|||||||
const excelExportData: string[][] = [];
|
const excelExportData: string[][] = [];
|
||||||
|
|
||||||
excel.data.forEach((item) => {
|
excel.data.forEach((item) => {
|
||||||
|
console.log("item", item)
|
||||||
excelExportData.push([
|
excelExportData.push([
|
||||||
sidoCode.find((sido) => sido.val === item.ctpvCd?.toString())?.text ?? "",
|
sidoCode.find((sido) => sido.val === item.ctpvCd?.toString())?.text ?? "",
|
||||||
sggCode.find((sgg) => sgg.val === item.sggCd?.toString())?.text ?? "",
|
sggCode.find((sgg) => sgg.val === item.sggCd?.toString())?.text ?? "",
|
||||||
item.bdstNm ?? "",
|
item.bdstNm ?? "",
|
||||||
item.daddr ?? "",
|
item.daddr ?? "",
|
||||||
String(item.bdstInfoSn ?? ""),
|
bdstUsgCd.find((cd) => cd.val === item.reuseBuilding?.[0]?.bdstUsgCd.toString())?.text ?? "", //건축물용도
|
||||||
String(item.frstArchPrmsnDt ?? ""),
|
String(item.frstArchPrmsnDt ?? ""),
|
||||||
String(item.archArea ?? ""),
|
String(item.archArea.split('.')[0] === '-1' ? '확인불가' : item.archArea.split('.')[0]),
|
||||||
String(item.chgBuilding.length > 0 ? "Y" : "N"),
|
String(item.chgBuilding.length > 0 ? "Y" : "N"),
|
||||||
String(item.reuseBuilding?.[0]?.lawTrgtYn ?? ""),
|
String(item.reuseBuilding?.[0]?.lawTrgtYn ?? ""),
|
||||||
String(item.reuseBuilding?.[0]?.instlCmptnDt ?? ""),
|
String(item.reuseBuilding?.[0]?.instlCmptnDt ?? ""),
|
||||||
@@ -28,7 +30,7 @@ export const excelRainSttnParsing = (
|
|||||||
String(item.reuseBuilding?.[0]?.rainyObj?.filtrTrtmfctPrs ?? ""),
|
String(item.reuseBuilding?.[0]?.rainyObj?.filtrTrtmfctPrs ?? ""),
|
||||||
String(item.reuseBuilding?.[0]?.rainyObj?.dtfcltCpct ?? ""),
|
String(item.reuseBuilding?.[0]?.rainyObj?.dtfcltCpct ?? ""),
|
||||||
String(item.reuseBuilding?.[0]?.instlCstSprtYn ?? ""),
|
String(item.reuseBuilding?.[0]?.instlCstSprtYn ?? ""),
|
||||||
String(item.reuseBuilding?.[0]?.instlCstSprtAmt ?? ""),
|
String(item.reuseBuilding?.[0]?.instlCstSprtAmt === -1 ? "확인불가" : String(item.reuseBuilding?.[0]?.instlCstSprtAmt) ?? ""),
|
||||||
String(item.reuseBuilding?.[0]?.grntchBdstCertYn ?? ""),
|
String(item.reuseBuilding?.[0]?.grntchBdstCertYn ?? ""),
|
||||||
String(item.reuseBuilding?.[0]?.grntchBdstCertYr ?? ""),
|
String(item.reuseBuilding?.[0]?.grntchBdstCertYr ?? ""),
|
||||||
String(item.reuseBuilding?.[0]?.grntchBdstCertNo ?? ""),
|
String(item.reuseBuilding?.[0]?.grntchBdstCertNo ?? ""),
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ export const rainStatActionsExport = (
|
|||||||
tmp: 0,
|
tmp: 0,
|
||||||
instlCst: 0, //설치비
|
instlCst: 0, //설치비
|
||||||
dtfcltCpct: 0, //저류조용량
|
dtfcltCpct: 0, //저류조용량
|
||||||
bdstUsgCd: 0, //연간사용량
|
wtrUsqty: 0, //연간사용량
|
||||||
lndwtr: 0, //조경용수
|
lndwtr: 0, //조경용수
|
||||||
cleanToilUswtr: 0, //청소화장실용수
|
cleanToilUswtr: 0, //청소화장실용수
|
||||||
resn: 0, //세척살수용수
|
resn: 0, //세척살수용수
|
||||||
@@ -153,8 +153,8 @@ export const rainStatActionsExport = (
|
|||||||
totalObj.dtfcltCpct += !isNaN(Number(item.dtfcltCpct))
|
totalObj.dtfcltCpct += !isNaN(Number(item.dtfcltCpct))
|
||||||
? Number(item.dtfcltCpct)
|
? Number(item.dtfcltCpct)
|
||||||
: 0;
|
: 0;
|
||||||
totalObj.bdstUsgCd += !isNaN(Number(item.bdstUsgCd))
|
totalObj.wtrUsqty += !isNaN(Number(item.wtrUsqty))
|
||||||
? Number(item.bdstUsgCd)
|
? Number(item.wtrUsqty)
|
||||||
: 0;
|
: 0;
|
||||||
totalObj.lndwtr += !isNaN(Number(item.lndwtr))
|
totalObj.lndwtr += !isNaN(Number(item.lndwtr))
|
||||||
? Number(item.lndwtr)
|
? Number(item.lndwtr)
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export const StoreZus = (
|
|||||||
getMiddleRegionCd(set);
|
getMiddleRegionCd(set);
|
||||||
getUnitWaterShedCd(set);
|
getUnitWaterShedCd(set);
|
||||||
getEnvPartCd(set);
|
getEnvPartCd(set);
|
||||||
LoginApi.login({userId: "tuser10003", password: "test1234!"})
|
LoginApi.login({userId: "admin1gmail", password: "test1234!"})
|
||||||
return {
|
return {
|
||||||
...initState,
|
...initState,
|
||||||
...comFcltSearchAction(set),
|
...comFcltSearchAction(set),
|
||||||
|
|||||||
@@ -95,7 +95,8 @@ export const chRowspanTable = (
|
|||||||
) => void,
|
) => void,
|
||||||
toggleSelection: (pk: number, checked: boolean) => void,
|
toggleSelection: (pk: number, checked: boolean) => void,
|
||||||
selectedIds: number[],
|
selectedIds: number[],
|
||||||
handleCellClick: (index: number, headId: string) => void
|
handleCellClick: (index: number, headId: string) => void,
|
||||||
|
disable? : boolean
|
||||||
) => {
|
) => {
|
||||||
let order = 0
|
let order = 0
|
||||||
// rowspan된 셀 렌더링 여부 추적용
|
// rowspan된 셀 렌더링 여부 추적용
|
||||||
@@ -138,6 +139,7 @@ export const chRowspanTable = (
|
|||||||
onCheckedChange={(checked) =>
|
onCheckedChange={(checked) =>
|
||||||
toggleSelection(row.chkgdnSn, checked === true)
|
toggleSelection(row.chkgdnSn, checked === true)
|
||||||
}
|
}
|
||||||
|
disabled={disable}
|
||||||
></Checkbox>
|
></Checkbox>
|
||||||
) : key === "order" ? (
|
) : key === "order" ? (
|
||||||
++order
|
++order
|
||||||
@@ -339,7 +341,9 @@ export const InputTableBody = (
|
|||||||
// className={`${head.id !== "utztnUsgCd" ? "text-right" : "text-center"} !text-xl h-10 w-full`}
|
// className={`${head.id !== "utztnUsgCd" ? "text-right" : "text-center"} !text-xl h-10 w-full`}
|
||||||
className={`${textAlignClass} !text-xl h-10 w-full`}
|
className={`${textAlignClass} !text-xl h-10 w-full`}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
handleChange(dataIndex, head.id, e.target.value, setInputData)
|
handleCommaNumberChange(e, val =>
|
||||||
|
handleChange(dataIndex, head.id, String(val), setInputData)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
value={formatCommaNumber(data[head.id as keyof any]) ?? ""}
|
value={formatCommaNumber(data[head.id as keyof any]) ?? ""}
|
||||||
maxLength={numSize}
|
maxLength={numSize}
|
||||||
|
|||||||
@@ -31,10 +31,12 @@ export default function ConCostForm({
|
|||||||
form,
|
form,
|
||||||
type,
|
type,
|
||||||
selectionVersion,
|
selectionVersion,
|
||||||
|
readonly = false,
|
||||||
}: {
|
}: {
|
||||||
form: UseFormReturn<DmdCoReqType>;
|
form: UseFormReturn<DmdCoReqType>;
|
||||||
type: string;
|
type: string;
|
||||||
selectionVersion: number;
|
selectionVersion: number;
|
||||||
|
readonly: boolean;
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
constCostRes,
|
constCostRes,
|
||||||
@@ -58,14 +60,11 @@ export default function ConCostForm({
|
|||||||
}
|
}
|
||||||
}, [ref, getConstCostFee, getRateFee]);
|
}, [ref, getConstCostFee, getRateFee]);
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// 다른 행을 선택하면(selectionVersion 변경) 체크박스 상태를 초기화합니다.
|
// 다른 행을 선택하면(selectionVersion 변경) 체크박스 상태를 초기화합니다.
|
||||||
setCheckFinish(false);
|
setCheckFinish(false);
|
||||||
}, [selectionVersion]);
|
}, [selectionVersion]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const zipDowonLoad = () => {
|
const zipDowonLoad = () => {
|
||||||
fetch(`/2024_constarctFeeProgram.zip`, {}).then(async (response) => {
|
fetch(`/2024_constarctFeeProgram.zip`, {}).then(async (response) => {
|
||||||
const blobRet = await response.blob();
|
const blobRet = await response.blob();
|
||||||
@@ -95,7 +94,7 @@ export default function ConCostForm({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const dmndQtyYear = dmndQtyWatch * 365;
|
const dmndQtyYear = dmndQtyWatch;
|
||||||
if (usgPrcsProcs && usgPrcsProcs?.length > 0) {
|
if (usgPrcsProcs && usgPrcsProcs?.length > 0) {
|
||||||
const firstProc =
|
const firstProc =
|
||||||
getConstFctCode(usgPrcsProcs?.split("+")[0] || "") || "";
|
getConstFctCode(usgPrcsProcs?.split("+")[0] || "") || "";
|
||||||
@@ -165,29 +164,32 @@ export default function ConCostForm({
|
|||||||
cstrnCst: value.demandCst.cstrnCst || 0,
|
cstrnCst: value.demandCst.cstrnCst || 0,
|
||||||
fcltSbsdCstrnCst: value.demandCst.fcltSbsdCstrnCst || 0,
|
fcltSbsdCstrnCst: value.demandCst.fcltSbsdCstrnCst || 0,
|
||||||
prcsFcltCpctCstrnCst: value.demandCst.prcsFcltCpctCstrnCst || 0,
|
prcsFcltCpctCstrnCst: value.demandCst.prcsFcltCpctCstrnCst || 0,
|
||||||
flg: checkFinish?'Checked':'Sub',
|
flg: checkFinish ? "Checked" : "Sub",
|
||||||
rgtr: TEST_UUID,
|
rgtr: TEST_UUID,
|
||||||
};
|
};
|
||||||
if (checkFinish) {
|
if (checkFinish) {
|
||||||
toast((t) => (
|
toast((t) => (
|
||||||
<span className="flex flex-col items-center text-2xl" >
|
<span className="flex flex-col items-center text-2xl">
|
||||||
검토완료 변경시 공사비는 변경할수 없습니다.
|
검토완료 변경시 공사비는 변경할수 없습니다.
|
||||||
<br />
|
<br />
|
||||||
진행하시겠습니까?
|
진행하시겠습니까?
|
||||||
<div className="flex gap-2 mt-2">
|
<div className="flex gap-2 mt-2">
|
||||||
<Button
|
<Button
|
||||||
size='sm'
|
size="sm"
|
||||||
|
onClick={() => {
|
||||||
onClick={() => {
|
toast.dismiss(t.id);
|
||||||
toast.dismiss(t.id);
|
coMatRvwUpdate(
|
||||||
coMatRvwUpdate("11000SW001R1", form.getValues("dmdInfoId"), data);
|
"11000SW001R1",
|
||||||
}}
|
form.getValues("dmdInfoId"),
|
||||||
>
|
data
|
||||||
확인
|
);
|
||||||
</Button>
|
}}
|
||||||
<Button
|
>
|
||||||
size='sm'
|
확인
|
||||||
onClick={() => toast.dismiss(t.id)}>취소</Button>
|
</Button>
|
||||||
|
<Button size="sm" onClick={() => toast.dismiss(t.id)}>
|
||||||
|
취소
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
));
|
));
|
||||||
@@ -229,6 +231,7 @@ export default function ConCostForm({
|
|||||||
className="mr-3"
|
className="mr-3"
|
||||||
size={"sm"}
|
size={"sm"}
|
||||||
onClick={form.handleSubmit(onSubmit)}
|
onClick={form.handleSubmit(onSubmit)}
|
||||||
|
disabled={readonly}
|
||||||
>
|
>
|
||||||
저장
|
저장
|
||||||
</Button>
|
</Button>
|
||||||
@@ -236,9 +239,14 @@ export default function ConCostForm({
|
|||||||
<Checkbox
|
<Checkbox
|
||||||
className="ml-3 mr-6"
|
className="ml-3 mr-6"
|
||||||
checked={checkFinish}
|
checked={checkFinish}
|
||||||
onCheckedChange={(checked) =>
|
onCheckedChange={
|
||||||
|
(checked) => {
|
||||||
|
if (readonly) return;
|
||||||
|
setCheckFinish(checked === true);
|
||||||
|
}
|
||||||
|
|
||||||
// 'indeterminate' 상태를 무시하고 순수 boolean 값으로만 상태를 업데이트합니다.
|
// 'indeterminate' 상태를 무시하고 순수 boolean 값으로만 상태를 업데이트합니다.
|
||||||
setCheckFinish(checked === true)}
|
}
|
||||||
></Checkbox>
|
></Checkbox>
|
||||||
<Label>관로 표준공사비 산정 프로그램</Label>
|
<Label>관로 표준공사비 산정 프로그램</Label>
|
||||||
<Button
|
<Button
|
||||||
@@ -350,10 +358,11 @@ export default function ConCostForm({
|
|||||||
type="number"
|
type="number"
|
||||||
step="0.001"
|
step="0.001"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
console.log('dmndQty ', e)
|
console.log("dmndQty ", e);
|
||||||
//field.onChange(Number(e.target.value) * 365 );
|
//field.onChange(Number(e.target.value) * 365 );
|
||||||
}}
|
}}
|
||||||
value={Number(field.value) * 365 || 0}
|
// value={Number(field.value) * 365 || 0}
|
||||||
|
value={Number(field.value) || 0}
|
||||||
readOnly
|
readOnly
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
@@ -377,7 +386,7 @@ export default function ConCostForm({
|
|||||||
}
|
}
|
||||||
childrenBody={
|
childrenBody={
|
||||||
<>
|
<>
|
||||||
<ConstCostFeeTable/>
|
<ConstCostFeeTable />
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
bodyClassName={"w-[40vw] h-full"}
|
bodyClassName={"w-[40vw] h-full"}
|
||||||
@@ -414,8 +423,7 @@ export default function ConCostForm({
|
|||||||
}
|
}
|
||||||
childrenBody={
|
childrenBody={
|
||||||
<>
|
<>
|
||||||
<RateFeeTableModal/>
|
<RateFeeTableModal />
|
||||||
|
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
bodyClassName={"w-[22vw]"}
|
bodyClassName={"w-[22vw]"}
|
||||||
@@ -476,8 +484,7 @@ export default function ConCostForm({
|
|||||||
type="number"
|
type="number"
|
||||||
step="0.01"
|
step="0.01"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
console.log('totalConstCost ', e)
|
console.log("totalConstCost ", e);
|
||||||
|
|
||||||
}}
|
}}
|
||||||
value={field.value ?? 0}
|
value={field.value ?? 0}
|
||||||
readOnly
|
readOnly
|
||||||
@@ -521,6 +528,9 @@ export default function ConCostForm({
|
|||||||
type="number"
|
type="number"
|
||||||
step="0.01"
|
step="0.01"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|
||||||
|
if(readonly) return;
|
||||||
|
|
||||||
field.onChange(Number(e.target.value));
|
field.onChange(Number(e.target.value));
|
||||||
}}
|
}}
|
||||||
value={field.value ?? 0}
|
value={field.value ?? 0}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ export function PbnstBuseForm({
|
|||||||
indexBiz = 0,
|
indexBiz = 0,
|
||||||
setIndexBiz,
|
setIndexBiz,
|
||||||
form,
|
form,
|
||||||
|
readonly = false,
|
||||||
}: {
|
}: {
|
||||||
formType: string;
|
formType: string;
|
||||||
firstBizData?: fcBizType[];
|
firstBizData?: fcBizType[];
|
||||||
@@ -51,6 +52,7 @@ export function PbnstBuseForm({
|
|||||||
indexMng: number;
|
indexMng: number;
|
||||||
indexBiz: number;
|
indexBiz: number;
|
||||||
setIndexBiz: (index: number) => void;
|
setIndexBiz: (index: number) => void;
|
||||||
|
readonly?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
code,
|
code,
|
||||||
@@ -329,6 +331,7 @@ export function PbnstBuseForm({
|
|||||||
onClick={addRuseFcltObj}
|
onClick={addRuseFcltObj}
|
||||||
type="button"
|
type="button"
|
||||||
size={commonButonSize}
|
size={commonButonSize}
|
||||||
|
disabled={readonly}
|
||||||
>
|
>
|
||||||
추가
|
추가
|
||||||
</Button>
|
</Button>
|
||||||
@@ -343,6 +346,7 @@ export function PbnstBuseForm({
|
|||||||
sonClass="col-span-4"
|
sonClass="col-span-4"
|
||||||
indexMng={indexMng}
|
indexMng={indexMng}
|
||||||
indexBiz={indexBiz}
|
indexBiz={indexBiz}
|
||||||
|
readonly={readonly}
|
||||||
/>
|
/>
|
||||||
<MngRegFormDetail
|
<MngRegFormDetail
|
||||||
key={`buziMoney-${indexMng}-${indexBiz}`}
|
key={`buziMoney-${indexMng}-${indexBiz}`}
|
||||||
@@ -353,6 +357,7 @@ export function PbnstBuseForm({
|
|||||||
sonClass="col-span-4"
|
sonClass="col-span-4"
|
||||||
indexMng={indexMng}
|
indexMng={indexMng}
|
||||||
indexBiz={indexBiz}
|
indexBiz={indexBiz}
|
||||||
|
readonly={readonly}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<MngRegFormDetail
|
<MngRegFormDetail
|
||||||
@@ -364,6 +369,7 @@ export function PbnstBuseForm({
|
|||||||
sonClass="col-span-4"
|
sonClass="col-span-4"
|
||||||
indexMng={indexMng}
|
indexMng={indexMng}
|
||||||
indexBiz={indexBiz}
|
indexBiz={indexBiz}
|
||||||
|
readonly={readonly}
|
||||||
/>
|
/>
|
||||||
<MngRegFormDetail
|
<MngRegFormDetail
|
||||||
key={`concertedWater-${indexMng}-${indexBiz}`}
|
key={`concertedWater-${indexMng}-${indexBiz}`}
|
||||||
@@ -374,6 +380,7 @@ export function PbnstBuseForm({
|
|||||||
sonClass="col-span-4"
|
sonClass="col-span-4"
|
||||||
indexMng={indexMng}
|
indexMng={indexMng}
|
||||||
indexBiz={indexBiz}
|
indexBiz={indexBiz}
|
||||||
|
readonly={readonly}
|
||||||
/>
|
/>
|
||||||
<MngRegFormDetail
|
<MngRegFormDetail
|
||||||
key={`wasteFcltinfo-${indexMng}-${indexBiz}`}
|
key={`wasteFcltinfo-${indexMng}-${indexBiz}`}
|
||||||
@@ -384,6 +391,7 @@ export function PbnstBuseForm({
|
|||||||
sonClass="col-span-4"
|
sonClass="col-span-4"
|
||||||
indexMng={indexMng}
|
indexMng={indexMng}
|
||||||
indexBiz={indexBiz}
|
indexBiz={indexBiz}
|
||||||
|
readonly={readonly}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<h1 className={formH1Class}>재이용 원수취수 현황</h1>
|
<h1 className={formH1Class}>재이용 원수취수 현황</h1>
|
||||||
@@ -394,6 +402,7 @@ export function PbnstBuseForm({
|
|||||||
onClick={() => setIsFcOrgwts(true)}
|
onClick={() => setIsFcOrgwts(true)}
|
||||||
size={commonButonSize}
|
size={commonButonSize}
|
||||||
className=""
|
className=""
|
||||||
|
disabled={readonly}
|
||||||
>
|
>
|
||||||
추가등록
|
추가등록
|
||||||
</Button>
|
</Button>
|
||||||
@@ -412,6 +421,7 @@ export function PbnstBuseForm({
|
|||||||
indexMng={indexMng}
|
indexMng={indexMng}
|
||||||
formNm={"fcOrgwts"}
|
formNm={"fcOrgwts"}
|
||||||
indexBiz={indexBiz}
|
indexBiz={indexBiz}
|
||||||
|
readonly={readonly}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<h1 className={formH1Class}>재이용 공급관로 설치 현황</h1>
|
<h1 className={formH1Class}>재이용 공급관로 설치 현황</h1>
|
||||||
@@ -424,6 +434,7 @@ export function PbnstBuseForm({
|
|||||||
className="w-32"
|
className="w-32"
|
||||||
selectClass="w-full"
|
selectClass="w-full"
|
||||||
onSelectValue={(val) => setPpiYn(String(val))}
|
onSelectValue={(val) => setPpiYn(String(val))}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
<Label className="text-right">합계</Label>
|
<Label className="text-right">합계</Label>
|
||||||
<Input
|
<Input
|
||||||
@@ -439,6 +450,7 @@ export function PbnstBuseForm({
|
|||||||
size={commonButonSize}
|
size={commonButonSize}
|
||||||
className="!text-xl"
|
className="!text-xl"
|
||||||
onClick={plusHist}
|
onClick={plusHist}
|
||||||
|
disabled={readonly}
|
||||||
>
|
>
|
||||||
추가등록
|
추가등록
|
||||||
</Button>
|
</Button>
|
||||||
@@ -447,6 +459,7 @@ export function PbnstBuseForm({
|
|||||||
size={commonButonSize}
|
size={commonButonSize}
|
||||||
className="!text-xl !bg-red-500 !text-white ml-1"
|
className="!text-xl !bg-red-500 !text-white ml-1"
|
||||||
onClick={removeSelected}
|
onClick={removeSelected}
|
||||||
|
disabled={readonly}
|
||||||
>
|
>
|
||||||
삭제
|
삭제
|
||||||
</Button>
|
</Button>
|
||||||
@@ -471,6 +484,7 @@ export function PbnstBuseForm({
|
|||||||
form={form}
|
form={form}
|
||||||
formNm={"pplInstls"}
|
formNm={"pplInstls"}
|
||||||
upHeadList={[]}
|
upHeadList={[]}
|
||||||
|
readonly={readonly}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -494,7 +508,7 @@ export function PbnstBuseForm({
|
|||||||
sonClass="col-span-4"
|
sonClass="col-span-4"
|
||||||
indexMng={indexMng}
|
indexMng={indexMng}
|
||||||
indexBiz={indexBiz}
|
indexBiz={indexBiz}
|
||||||
readonly={false}
|
readonly={readonly}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -510,6 +524,7 @@ export function PbnstBuseForm({
|
|||||||
}}
|
}}
|
||||||
size={commonButonSize}
|
size={commonButonSize}
|
||||||
className="mt-6 mr-3"
|
className="mt-6 mr-3"
|
||||||
|
disabled={readonly}
|
||||||
>
|
>
|
||||||
수요처 추가
|
수요처 추가
|
||||||
</Button>
|
</Button>
|
||||||
@@ -523,6 +538,7 @@ export function PbnstBuseForm({
|
|||||||
}}
|
}}
|
||||||
size={commonButonSize}
|
size={commonButonSize}
|
||||||
className="mt-6"
|
className="mt-6"
|
||||||
|
disabled={readonly}
|
||||||
>
|
>
|
||||||
수요처 신규등록
|
수요처 신규등록
|
||||||
</Button>
|
</Button>
|
||||||
@@ -575,6 +591,7 @@ export function PbnstBuseForm({
|
|||||||
searchPk: item.dmdInfoId,
|
searchPk: item.dmdInfoId,
|
||||||
};
|
};
|
||||||
})}
|
})}
|
||||||
|
readonly={readonly}
|
||||||
></SearchInputText>
|
></SearchInputText>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -611,6 +628,7 @@ export function PbnstBuseForm({
|
|||||||
selectArray={code.dmdUszCd}
|
selectArray={code.dmdUszCd}
|
||||||
onSelectValue={f.onChange}
|
onSelectValue={f.onChange}
|
||||||
value={f.value ?? code.dmdUszCd[0]?.val}
|
value={f.value ?? code.dmdUszCd[0]?.val}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -630,6 +648,7 @@ export function PbnstBuseForm({
|
|||||||
f.onChange(date),
|
f.onChange(date),
|
||||||
}}
|
}}
|
||||||
selectClass={"rounded-lg !w-full"}
|
selectClass={"rounded-lg !w-full"}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -652,6 +671,7 @@ export function PbnstBuseForm({
|
|||||||
f.onChange(date),
|
f.onChange(date),
|
||||||
}}
|
}}
|
||||||
selectClass={"rounded-lg !w-full"}
|
selectClass={"rounded-lg !w-full"}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -670,6 +690,7 @@ export function PbnstBuseForm({
|
|||||||
handleCommaNumberChange(e, f.onChange);
|
handleCommaNumberChange(e, f.onChange);
|
||||||
}}
|
}}
|
||||||
value={formatCommaNumber(f.value)}
|
value={formatCommaNumber(f.value)}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -690,6 +711,7 @@ export function PbnstBuseForm({
|
|||||||
f.onChange(val)
|
f.onChange(val)
|
||||||
}
|
}
|
||||||
value={f.value ?? code.yn[0]?.val}
|
value={f.value ?? code.yn[0]?.val}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -41,13 +41,13 @@ export function PbnstMngForm({
|
|||||||
formType,
|
formType,
|
||||||
indexMng,
|
indexMng,
|
||||||
setIndexMng,
|
setIndexMng,
|
||||||
readonly
|
readonly,
|
||||||
}: {
|
}: {
|
||||||
form: UseFormReturn<{ items: PbnstRegArrrayType }>;
|
form: UseFormReturn<{ items: PbnstRegArrrayType }>;
|
||||||
formType: string;
|
formType: string;
|
||||||
indexMng: number;
|
indexMng: number;
|
||||||
setIndexMng: (index: number) => void;
|
setIndexMng: (index: number) => void;
|
||||||
readonly:boolean
|
readonly: boolean;
|
||||||
}) {
|
}) {
|
||||||
const { code, pbnst, fileDelete, fileDownLoad } = useWrStore(
|
const { code, pbnst, fileDelete, fileDownLoad } = useWrStore(
|
||||||
(state) => state
|
(state) => state
|
||||||
@@ -60,6 +60,7 @@ export function PbnstMngForm({
|
|||||||
const [mngMtdCode, setMngMtdCode] =
|
const [mngMtdCode, setMngMtdCode] =
|
||||||
useState<{ name: string; val: SelectDataType[] }[]>();
|
useState<{ name: string; val: SelectDataType[] }[]>();
|
||||||
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
fields: fcOpersField,
|
fields: fcOpersField,
|
||||||
prepend,
|
prepend,
|
||||||
@@ -87,7 +88,6 @@ export function PbnstMngForm({
|
|||||||
endDt: new Date(),
|
endDt: new Date(),
|
||||||
});
|
});
|
||||||
//trigger(`items.${indexMng}.fcOpers`);
|
//trigger(`items.${indexMng}.fcOpers`);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const removeSelected = () => {
|
const removeSelected = () => {
|
||||||
@@ -318,6 +318,7 @@ export function PbnstMngForm({
|
|||||||
size={commonButonSize}
|
size={commonButonSize}
|
||||||
className="!text-xl"
|
className="!text-xl"
|
||||||
onClick={plusHist}
|
onClick={plusHist}
|
||||||
|
disabled={readonly}
|
||||||
>
|
>
|
||||||
추가등록
|
추가등록
|
||||||
</Button>
|
</Button>
|
||||||
@@ -326,6 +327,7 @@ export function PbnstMngForm({
|
|||||||
size={commonButonSize}
|
size={commonButonSize}
|
||||||
className="!text-xl !bg-red-500 !text-white ml-1"
|
className="!text-xl !bg-red-500 !text-white ml-1"
|
||||||
onClick={removeSelected}
|
onClick={removeSelected}
|
||||||
|
disabled={readonly}
|
||||||
>
|
>
|
||||||
삭제
|
삭제
|
||||||
</Button>
|
</Button>
|
||||||
@@ -335,20 +337,11 @@ export function PbnstMngForm({
|
|||||||
<div className="h-[200px] overflow-y-auto">
|
<div className="h-[200px] overflow-y-auto">
|
||||||
<RuseMngTableForm
|
<RuseMngTableForm
|
||||||
key={`ruse-table-${indexMng}-${fcOpersField.length}`} // 🔥 length까지 넣어야 동기화됨
|
key={`ruse-table-${indexMng}-${fcOpersField.length}`} // 🔥 length까지 넣어야 동기화됨
|
||||||
tableData={form.getValues(`items.${indexMng}.fcOpers`) ||[]}
|
tableData={form.getValues(`items.${indexMng}.fcOpers`) || []}
|
||||||
headList={
|
headList={pbnst.pbnstMngUpHeadList}
|
||||||
formType === "sttn"
|
|
||||||
? pbnst.pbnstMngUpHeadList.map((item) => {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
readonly: true,
|
|
||||||
};
|
|
||||||
})
|
|
||||||
: pbnst.pbnstMngUpHeadList
|
|
||||||
}
|
|
||||||
upHeadList={pbnst.pbnstMngNm}
|
upHeadList={pbnst.pbnstMngNm}
|
||||||
code={mngMtdCode || []}
|
code={mngMtdCode || []}
|
||||||
|
readonly={readonly}
|
||||||
indexMng={indexMng}
|
indexMng={indexMng}
|
||||||
form={form}
|
form={form}
|
||||||
formNm={"fcOpers"}
|
formNm={"fcOpers"}
|
||||||
@@ -372,7 +365,6 @@ export function PbnstMngForm({
|
|||||||
maxLength={numSize} //입력제한
|
maxLength={numSize} //입력제한
|
||||||
type="text"
|
type="text"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
if (formType !== "sttn")
|
|
||||||
handleCommaNumberChange(e, field.onChange);
|
handleCommaNumberChange(e, field.onChange);
|
||||||
}}
|
}}
|
||||||
value={formatCommaNumber(field.value)}
|
value={formatCommaNumber(field.value)}
|
||||||
@@ -396,7 +388,6 @@ export function PbnstMngForm({
|
|||||||
maxLength={numSize} //입력제한
|
maxLength={numSize} //입력제한
|
||||||
type="text"
|
type="text"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
if (formType !== "sttn")
|
|
||||||
handleCommaNumberChange(e, field.onChange);
|
handleCommaNumberChange(e, field.onChange);
|
||||||
}}
|
}}
|
||||||
value={formatCommaNumber(field.value)}
|
value={formatCommaNumber(field.value)}
|
||||||
@@ -419,7 +410,6 @@ export function PbnstMngForm({
|
|||||||
maxLength={numSize} //입력제한
|
maxLength={numSize} //입력제한
|
||||||
type="text"
|
type="text"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
if (formType !== "sttn")
|
|
||||||
handleCommaNumberChange(e, field.onChange);
|
handleCommaNumberChange(e, field.onChange);
|
||||||
}}
|
}}
|
||||||
value={formatCommaNumber(field.value)}
|
value={formatCommaNumber(field.value)}
|
||||||
@@ -435,7 +425,7 @@ export function PbnstMngForm({
|
|||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-12 gap-4 my-4">
|
<div className="grid grid-cols-12 gap-4 my-4">
|
||||||
<div className="col-span-6">
|
<div className="col-span-6">
|
||||||
{formType === "sttn" ? (
|
{readonly ? (
|
||||||
relationfiles && relationfiles?.length > 0 ? (
|
relationfiles && relationfiles?.length > 0 ? (
|
||||||
<>
|
<>
|
||||||
<Label className="text-3xl">계통도</Label>
|
<Label className="text-3xl">계통도</Label>
|
||||||
@@ -472,7 +462,7 @@ export function PbnstMngForm({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-span-6">
|
<div className="col-span-6">
|
||||||
{formType === "sttn" ? (
|
{readonly ? (
|
||||||
planFiles && planFiles?.length > 0 ? (
|
planFiles && planFiles?.length > 0 ? (
|
||||||
<>
|
<>
|
||||||
<Label className="text-3xl">평면도</Label>
|
<Label className="text-3xl">평면도</Label>
|
||||||
|
|||||||
+15
-4
@@ -21,6 +21,7 @@ export default function MngRegFormDetail({
|
|||||||
sonClass,
|
sonClass,
|
||||||
indexBiz,
|
indexBiz,
|
||||||
indexMng,
|
indexMng,
|
||||||
|
readonly
|
||||||
}: {
|
}: {
|
||||||
formList: formDetailType[];
|
formList: formDetailType[];
|
||||||
h1Title?: string;
|
h1Title?: string;
|
||||||
@@ -30,6 +31,7 @@ export default function MngRegFormDetail({
|
|||||||
indexBiz?: number;
|
indexBiz?: number;
|
||||||
indexMng?: number;
|
indexMng?: number;
|
||||||
sonClass?: string;
|
sonClass?: string;
|
||||||
|
readonly?:boolean
|
||||||
}) {
|
}) {
|
||||||
const { code } = useWrStore((state) => state);
|
const { code } = useWrStore((state) => state);
|
||||||
|
|
||||||
@@ -67,7 +69,10 @@ export default function MngRegFormDetail({
|
|||||||
field.onChange(date),
|
field.onChange(date),
|
||||||
}}
|
}}
|
||||||
selectClass={"w-full"}
|
selectClass={"w-full"}
|
||||||
disabled={formHead.option === "disabled" ? true : false}
|
readOnly={readonly
|
||||||
|
//|| formHead.option === "disabled" ? true : false
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
) : formHead.type === "number" ? (
|
) : formHead.type === "number" ? (
|
||||||
@@ -81,7 +86,9 @@ export default function MngRegFormDetail({
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
value={formatCommaNumber(field.value)}
|
value={formatCommaNumber(field.value)}
|
||||||
readOnly={formHead.option === "readOnly" ? true : false}
|
readOnly={readonly
|
||||||
|
// || formHead.option === "readOnly" ? true : false
|
||||||
|
}
|
||||||
disabled={formHead.option === "disabled" ? true : false}
|
disabled={formHead.option === "disabled" ? true : false}
|
||||||
maxLength={numSize}
|
maxLength={numSize}
|
||||||
/>
|
/>
|
||||||
@@ -103,7 +110,9 @@ export default function MngRegFormDetail({
|
|||||||
}
|
}
|
||||||
onSelectValue={field.onChange}
|
onSelectValue={field.onChange}
|
||||||
value={field.value?.trim() ?? (Array.isArray(potentialOptions) && potentialOptions[0]?.val)}
|
value={field.value?.trim() ?? (Array.isArray(potentialOptions) && potentialOptions[0]?.val)}
|
||||||
readOnly={formHead.option === "readOnly"}
|
readOnly={readonly
|
||||||
|
// || formHead.option === "readOnly"
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
})()
|
})()
|
||||||
@@ -113,7 +122,9 @@ export default function MngRegFormDetail({
|
|||||||
type="text"
|
type="text"
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
onChange={field.onChange}
|
onChange={field.onChange}
|
||||||
readOnly={formHead.option === "readOnly" ? true : false}
|
readOnly={readonly
|
||||||
|
// || formHead.option === "readOnly" ? true : false
|
||||||
|
}
|
||||||
disabled={formHead.option === "disabled" ? true : false}
|
disabled={formHead.option === "disabled" ? true : false}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -511,6 +511,7 @@ export default function RainRegForm({
|
|||||||
selectArray={code.bdstIncenYn}
|
selectArray={code.bdstIncenYn}
|
||||||
onSelectValue={readonly ? () => { } : field.onChange}
|
onSelectValue={readonly ? () => { } : field.onChange}
|
||||||
value={field.value ?? code.yn[0]?.val}
|
value={field.value ?? code.yn[0]?.val}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { Button } from "@common/components/ui";
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import type { z } from "zod";
|
import type { z } from "zod";
|
||||||
|
|
||||||
export default function ChkgdModal({ type, obj, setIsModal }: { type: string; obj: any, setIsModal: (open: boolean) => void }) {
|
export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: string; obj: any, setIsModal: (open: boolean) => void, readonly: boolean }) {
|
||||||
const {
|
const {
|
||||||
rainChkgdn,
|
rainChkgdn,
|
||||||
rswtChkgdn,
|
rswtChkgdn,
|
||||||
@@ -247,7 +247,7 @@ export default function ChkgdModal({ type, obj, setIsModal }: { type: string; ob
|
|||||||
}
|
}
|
||||||
></Title>
|
></Title>
|
||||||
{!rainChkSttn.isSttn ? (
|
{!rainChkSttn.isSttn ? (
|
||||||
<Button className="mt-8 mr-7" onClick={allDataUpdate}>
|
<Button className="mt-8 mr-7" onClick={allDataUpdate} disabled={!readonly}>
|
||||||
저장
|
저장
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
@@ -274,6 +274,7 @@ export default function ChkgdModal({ type, obj, setIsModal }: { type: string; ob
|
|||||||
setChGuidData={(data) => {
|
setChGuidData={(data) => {
|
||||||
setChGuidData(data);
|
setChGuidData(data);
|
||||||
}}
|
}}
|
||||||
|
readonly={readonly}
|
||||||
/>
|
/>
|
||||||
<div className="card-header">
|
<div className="card-header">
|
||||||
<h3 className="text-2xl font-medium text-label">
|
<h3 className="text-2xl font-medium text-label">
|
||||||
@@ -288,6 +289,7 @@ export default function ChkgdModal({ type, obj, setIsModal }: { type: string; ob
|
|||||||
setChGuidData={(data) => {
|
setChGuidData={(data) => {
|
||||||
setChGuidData(data);
|
setChGuidData(data);
|
||||||
}}
|
}}
|
||||||
|
readonly={readonly}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{type !== "RNB" && polutionData !== undefined ? (
|
{type !== "RNB" && polutionData !== undefined ? (
|
||||||
@@ -310,6 +312,7 @@ export default function ChkgdModal({ type, obj, setIsModal }: { type: string; ob
|
|||||||
setChGuidData={(data) => {
|
setChGuidData={(data) => {
|
||||||
getPolutionData(data);
|
getPolutionData(data);
|
||||||
}}
|
}}
|
||||||
|
readonly={readonly}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ export function PbnstSttnModal({ data, titleVisible }: { data: customPbnst; titl
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log(tableData);
|
|
||||||
if (tableData && tableData.length > 0) {
|
if (tableData && tableData.length > 0) {
|
||||||
setRuseTableData(tableData as any[]);
|
setRuseTableData(tableData as any[]);
|
||||||
}
|
}
|
||||||
@@ -216,9 +215,6 @@ export function PbnstSttnModal({ data, titleVisible }: { data: customPbnst; titl
|
|||||||
(usageTotalObj as any)[key] = val;
|
(usageTotalObj as any)[key] = val;
|
||||||
}
|
}
|
||||||
const tableData = [...inUsageData, ...outUsageData, usageTotalObj];
|
const tableData = [...inUsageData, ...outUsageData, usageTotalObj];
|
||||||
console.log("inusageData", inUsageData)
|
|
||||||
console.log("outUsageData", outUsageData)
|
|
||||||
console.log("tableData", tableData)
|
|
||||||
setPrfData({
|
setPrfData({
|
||||||
inPrf: inUsageData,
|
inPrf: inUsageData,
|
||||||
outPrf: outUsageData,
|
outPrf: outUsageData,
|
||||||
@@ -248,10 +244,6 @@ export function PbnstSttnModal({ data, titleVisible }: { data: customPbnst; titl
|
|||||||
|
|
||||||
}, [data, form])
|
}, [data, form])
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
console.log("prfData", prfData);
|
|
||||||
}, [prfData])
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -12,10 +12,13 @@ import { useForm } from "react-hook-form";
|
|||||||
import type { z } from "zod";
|
import type { z } from "zod";
|
||||||
|
|
||||||
export default function CoDetailModal({
|
export default function CoDetailModal({
|
||||||
formObj,onFormSubmit
|
formObj,
|
||||||
|
onFormSubmit,
|
||||||
|
readonly
|
||||||
}: {
|
}: {
|
||||||
formObj: any;
|
formObj: any;
|
||||||
onFormSubmit:(values:customLdrmnt)=>void;
|
onFormSubmit: (values: customLdrmnt) => void;
|
||||||
|
readonly?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const defaultValues: z.infer<typeof ldrmntZod> = ldrmntZod.parse({});
|
const defaultValues: z.infer<typeof ldrmntZod> = ldrmntZod.parse({});
|
||||||
const form = useForm<z.infer<typeof ldrmntZod>>({
|
const form = useForm<z.infer<typeof ldrmntZod>>({
|
||||||
@@ -52,7 +55,11 @@ export default function CoDetailModal({
|
|||||||
<h1 className="text-2xl font-medium text-label col-span-10">
|
<h1 className="text-2xl font-medium text-label col-span-10">
|
||||||
잠재수요처 상세정보
|
잠재수요처 상세정보
|
||||||
</h1>
|
</h1>
|
||||||
<Button type="submit" className="col-start-12 col-span-1" size={"sm"}>
|
<Button type="submit"
|
||||||
|
className="col-start-12 col-span-1"
|
||||||
|
size={"sm"}
|
||||||
|
disabled={readonly}
|
||||||
|
>
|
||||||
저장
|
저장
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -71,7 +78,6 @@ export default function CoDetailModal({
|
|||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="grid grid-cols-4 gap-2 mt-4">
|
<div className="grid grid-cols-4 gap-2 mt-4">
|
||||||
<div className="col-span-2">
|
<div className="col-span-2">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -86,8 +92,9 @@ export default function CoDetailModal({
|
|||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
field.onChange(e.target.value);
|
field.onChange(e.target.value);
|
||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -108,13 +115,13 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-4 gap-2 mt-4">
|
<div className="grid grid-cols-4 gap-2 mt-4">
|
||||||
<div className="col-span-2">
|
<div className="col-span-2">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -131,6 +138,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -151,6 +159,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -173,6 +182,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -193,6 +203,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -213,6 +224,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -235,12 +247,12 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="col-span-2">
|
<div className="col-span-2">
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
@@ -256,6 +268,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -278,6 +291,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -298,6 +312,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -318,14 +333,13 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={13}
|
maxLength={13}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className="grid grid-cols-5 gap-2 mt-4">
|
<div className="grid grid-cols-5 gap-2 mt-4">
|
||||||
<div className="col-span-1">
|
<div className="col-span-1">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -344,6 +358,7 @@ export default function CoDetailModal({
|
|||||||
value={formatCommaNumber(field.value)}
|
value={formatCommaNumber(field.value)}
|
||||||
min={0}
|
min={0}
|
||||||
maxLength={8}
|
maxLength={8}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -365,6 +380,7 @@ export default function CoDetailModal({
|
|||||||
value={formatCommaNumber(field.value)}
|
value={formatCommaNumber(field.value)}
|
||||||
min={0}
|
min={0}
|
||||||
maxLength={8}
|
maxLength={8}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -386,6 +402,7 @@ export default function CoDetailModal({
|
|||||||
value={formatCommaNumber(field.value)}
|
value={formatCommaNumber(field.value)}
|
||||||
min={0}
|
min={0}
|
||||||
maxLength={8}
|
maxLength={8}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -407,6 +424,7 @@ export default function CoDetailModal({
|
|||||||
value={formatCommaNumber(field.value)}
|
value={formatCommaNumber(field.value)}
|
||||||
min={0}
|
min={0}
|
||||||
maxLength={8}
|
maxLength={8}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -434,7 +452,6 @@ export default function CoDetailModal({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||||
<div className="col-span-4">
|
<div className="col-span-4">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -451,6 +468,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -471,6 +489,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -491,13 +510,13 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||||
<div className="col-span-4">
|
<div className="col-span-4">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -514,6 +533,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -534,6 +554,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -554,14 +575,13 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||||
<div className="col-span-4">
|
<div className="col-span-4">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -578,6 +598,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -598,6 +619,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -618,14 +640,13 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||||
<div className="col-span-4">
|
<div className="col-span-4">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -642,6 +663,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -662,6 +684,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -682,13 +705,13 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||||
<div className="col-span-4">
|
<div className="col-span-4">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -705,6 +728,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -725,6 +749,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -745,6 +770,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -767,6 +793,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -787,13 +814,13 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={txtSize}
|
maxLength={txtSize}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-4 gap-2 mt-4">
|
<div className="grid grid-cols-4 gap-2 mt-4">
|
||||||
<div className="col-span-2">
|
<div className="col-span-2">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -810,6 +837,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={50}
|
maxLength={50}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
@@ -830,6 +858,7 @@ export default function CoDetailModal({
|
|||||||
}}
|
}}
|
||||||
value={field.value ?? ""}
|
value={field.value ?? ""}
|
||||||
maxLength={50}
|
maxLength={50}
|
||||||
|
readOnly={readonly}
|
||||||
/>
|
/>
|
||||||
</FormUi>
|
</FormUi>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { Input } from "@common/components/ui";
|
||||||
import React, { useCallback, useEffect, useRef, useState } from "react";
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
||||||
|
|
||||||
type SearchType = {
|
type SearchType = {
|
||||||
@@ -10,6 +11,7 @@ type thisProps = {
|
|||||||
setValue: (searchNm?: string) => void;
|
setValue: (searchNm?: string) => void;
|
||||||
setRtnData: (rtnData: any) => void;
|
setRtnData: (rtnData: any) => void;
|
||||||
searchList?: any[];
|
searchList?: any[];
|
||||||
|
readonly?:boolean
|
||||||
};
|
};
|
||||||
export default function SearchInputText({
|
export default function SearchInputText({
|
||||||
label = undefined,
|
label = undefined,
|
||||||
@@ -17,6 +19,7 @@ export default function SearchInputText({
|
|||||||
setValue = () => {},
|
setValue = () => {},
|
||||||
setRtnData = () => {},
|
setRtnData = () => {},
|
||||||
searchList = undefined,
|
searchList = undefined,
|
||||||
|
readonly = false, // 추가: readonly prop
|
||||||
}: thisProps) {
|
}: thisProps) {
|
||||||
|
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
@@ -65,13 +68,14 @@ export default function SearchInputText({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={wrapperRef}>
|
<div ref={wrapperRef}>
|
||||||
<input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
value={textValue}
|
value={textValue}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
/* onFocus={() => setIsOpen(true)} */
|
/* onFocus={() => setIsOpen(true)} */
|
||||||
className="w-full h-[3.2rem] !text-xl pl-3 text-gray-600 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
|
className="w-full h-[3.2rem] !text-xl pl-3 text-gray-600 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
placeholder={`${label}을(를) 입력하세요`}
|
placeholder={`${label}을(를) 입력하세요`}
|
||||||
|
readOnly={readonly} // readonly 상태 적용
|
||||||
/>
|
/>
|
||||||
{isOpen && (
|
{isOpen && (
|
||||||
<div className=" z-1 w-full mt-2 bg-white border border-gray-300 rounded-md shadow-lg h-90 overflow-auto">
|
<div className=" z-1 w-full mt-2 bg-white border border-gray-300 rounded-md shadow-lg h-90 overflow-auto">
|
||||||
|
|||||||
@@ -17,12 +17,14 @@ export function GuideDetailsTable({
|
|||||||
headList,
|
headList,
|
||||||
upheadList,
|
upheadList,
|
||||||
setChGuidData,
|
setChGuidData,
|
||||||
|
readonly
|
||||||
}: {
|
}: {
|
||||||
chgRes: any[];
|
chgRes: any[];
|
||||||
headList: TableUpperProps[];
|
headList: TableUpperProps[];
|
||||||
upheadList: chHeadType[];
|
upheadList: chHeadType[];
|
||||||
type: string;
|
type: string;
|
||||||
setChGuidData: (chgRes: any[]) => void;
|
setChGuidData: (chgRes: any[]) => void;
|
||||||
|
readonly?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const [inputData, setInputData] = useState<any[]>();
|
const [inputData, setInputData] = useState<any[]>();
|
||||||
|
|
||||||
@@ -30,7 +32,6 @@ export function GuideDetailsTable({
|
|||||||
setInputData(chgRes);
|
setInputData(chgRes);
|
||||||
}, [chgRes]);
|
}, [chgRes]);
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setChGuidData(inputData ?? []);
|
setChGuidData(inputData ?? []);
|
||||||
|
|
||||||
@@ -43,7 +44,7 @@ export function GuideDetailsTable({
|
|||||||
<Table variant="secondary">
|
<Table variant="secondary">
|
||||||
<TableHeader className="font-bold">{headMakeprfmnc(headList, upheadList)}</TableHeader>
|
<TableHeader className="font-bold">{headMakeprfmnc(headList, upheadList)}</TableHeader>
|
||||||
<TableBody >
|
<TableBody >
|
||||||
{InputTableBody(inputData ?? [], headList, setInputData)}
|
{InputTableBody(inputData ?? [], headList, setInputData, readonly)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</Table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export default function RainChkgdTable({
|
|||||||
pageNation,
|
pageNation,
|
||||||
onPageChange,
|
onPageChange,
|
||||||
pageCount,
|
pageCount,
|
||||||
|
readonly,
|
||||||
}: {
|
}: {
|
||||||
detailUp: (data: rainChkZodType[]) => void;
|
detailUp: (data: rainChkZodType[]) => void;
|
||||||
handleClick?: (data: any) => void;
|
handleClick?: (data: any) => void;
|
||||||
@@ -33,6 +34,7 @@ export default function RainChkgdTable({
|
|||||||
pageNation: number;
|
pageNation: number;
|
||||||
onPageChange: (page: number) => void;
|
onPageChange: (page: number) => void;
|
||||||
pageCount: number;
|
pageCount: number;
|
||||||
|
readonly: boolean;
|
||||||
}) {
|
}) {
|
||||||
const { code, rainChkgdn, rainChkSttn, getRainSttnExcel } = useWrStore((state) => state);
|
const { code, rainChkgdn, rainChkSttn, getRainSttnExcel } = useWrStore((state) => state);
|
||||||
const [makeTableData, setMakeTableData] = useState<any[]>([]);
|
const [makeTableData, setMakeTableData] = useState<any[]>([]);
|
||||||
@@ -191,7 +193,8 @@ export default function RainChkgdTable({
|
|||||||
handleChange,
|
handleChange,
|
||||||
toggleSelection,
|
toggleSelection,
|
||||||
selectedIds,
|
selectedIds,
|
||||||
handleCellClick
|
handleCellClick,
|
||||||
|
readonly
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</Table>
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export default function RswtChkgdTable({
|
|||||||
pageNation,
|
pageNation,
|
||||||
onPageChange,
|
onPageChange,
|
||||||
pageCount,
|
pageCount,
|
||||||
|
readonly = false,
|
||||||
}: {
|
}: {
|
||||||
detaiRswtlUpdate: (data: rswtrChkDetailsZodType[]) => void;
|
detaiRswtlUpdate: (data: rswtrChkDetailsZodType[]) => void;
|
||||||
handleRswtClick?: (data: any) => void;
|
handleRswtClick?: (data: any) => void;
|
||||||
@@ -34,6 +35,7 @@ export default function RswtChkgdTable({
|
|||||||
pageNation: number;
|
pageNation: number;
|
||||||
onPageChange: (page: number) => void;
|
onPageChange: (page: number) => void;
|
||||||
pageCount: number;
|
pageCount: number;
|
||||||
|
readonly:boolean
|
||||||
}) {
|
}) {
|
||||||
const { code, rswtChkgdn, rswtChkSttn, rswtChkPolAndGuide, getRswtSttnExcel } = useWrStore(
|
const { code, rswtChkgdn, rswtChkSttn, rswtChkPolAndGuide, getRswtSttnExcel } = useWrStore(
|
||||||
(state) => state
|
(state) => state
|
||||||
@@ -149,7 +151,8 @@ export default function RswtChkgdTable({
|
|||||||
handleChange,
|
handleChange,
|
||||||
toggleSelection,
|
toggleSelection,
|
||||||
selectedIds,
|
selectedIds,
|
||||||
handleCellClick
|
handleCellClick,
|
||||||
|
readonly
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</Table>
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ type RuseMngTableProps = {
|
|||||||
indexBiz?: number;
|
indexBiz?: number;
|
||||||
form?: any;
|
form?: any;
|
||||||
formNm?: string;
|
formNm?: string;
|
||||||
|
readonly?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const RuseMngTableForm = React.forwardRef<any, RuseMngTableProps>(
|
const RuseMngTableForm = React.forwardRef<any, RuseMngTableProps>(
|
||||||
@@ -48,6 +49,7 @@ const RuseMngTableForm = React.forwardRef<any, RuseMngTableProps>(
|
|||||||
form,
|
form,
|
||||||
formNm,
|
formNm,
|
||||||
indexBiz,
|
indexBiz,
|
||||||
|
readonly= false
|
||||||
},
|
},
|
||||||
ref
|
ref
|
||||||
) => {
|
) => {
|
||||||
@@ -111,7 +113,7 @@ const RuseMngTableForm = React.forwardRef<any, RuseMngTableProps>(
|
|||||||
? formatCommaNumber(field.value)
|
? formatCommaNumber(field.value)
|
||||||
: field.value || ""
|
: field.value || ""
|
||||||
}
|
}
|
||||||
readOnly={head.readonly ? true : false}
|
readOnly={readonly|| head.readonly ? true : false}
|
||||||
maxLength={head.maxLength?head.maxLength:15}
|
maxLength={head.maxLength?head.maxLength:15}
|
||||||
/>
|
/>
|
||||||
) : head.type === "select" ? (
|
) : head.type === "select" ? (
|
||||||
@@ -132,7 +134,7 @@ const RuseMngTableForm = React.forwardRef<any, RuseMngTableProps>(
|
|||||||
field.onChange(val);
|
field.onChange(val);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
readOnly={head.readonly ? true : false}
|
readOnly={ readonly||head.readonly ? true : false}
|
||||||
// Disabled prop removed as SelectBox does not support it
|
// Disabled prop removed as SelectBox does not support it
|
||||||
></SelectBox>
|
></SelectBox>
|
||||||
) : head.type === "date" ? (
|
) : head.type === "date" ? (
|
||||||
@@ -149,14 +151,18 @@ const RuseMngTableForm = React.forwardRef<any, RuseMngTableProps>(
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
selectClass={"w-full"}
|
selectClass={"w-full"}
|
||||||
readOnly={head.readonly ? true : false}
|
readOnly={readonly||head.readonly ? true : false}
|
||||||
/>
|
/>
|
||||||
) : head.type === "checkbox" ? (
|
) : head.type === "checkbox" ? (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
className=""
|
className=""
|
||||||
checked={field.value || false}
|
checked={field.value || false}
|
||||||
onCheckedChange={(checked) => {
|
onCheckedChange={(checked) => {
|
||||||
field.onChange(checked);
|
if(readonly || head.readonly) {
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
field.onChange(checked);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
></Checkbox>
|
></Checkbox>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -418,7 +418,6 @@ function Gis({
|
|||||||
onFeatureSelect={handleFeatureSelect}
|
onFeatureSelect={handleFeatureSelect}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<GisLonLat />
|
|
||||||
<GisToolBar />
|
<GisToolBar />
|
||||||
<GisMapToggle />
|
<GisMapToggle />
|
||||||
<GisSelect onFeatureSelect={handleFeatureSelect} />
|
<GisSelect onFeatureSelect={handleFeatureSelect} />
|
||||||
|
|||||||
Reference in New Issue
Block a user