@@ -119,7 +119,7 @@ export default function CoMatRvw() {
|
||||
}, [useUsgCdWatch, form,selectionVersion]);
|
||||
|
||||
useEffect(() => {
|
||||
if (coMatRvwRes.length > 0) {
|
||||
if (coMatRvwRes&&coMatRvwRes.length > 0) {
|
||||
const data = coMatRvwRes?.map((item, index) => {
|
||||
let flag = "";
|
||||
|
||||
@@ -190,7 +190,7 @@ export default function CoMatRvw() {
|
||||
<div className="col-span-7 w-full">
|
||||
<div className="flex flex-row items-center">
|
||||
<Label className="text-xl text-gray-600 mx-6">
|
||||
하수 재이용년도
|
||||
수요신청년도
|
||||
</Label>
|
||||
<SelectBox
|
||||
className="h-full w-32 text-2xl"
|
||||
|
||||
@@ -5,6 +5,7 @@ import { btnClass } from "@/app/store/common/code";
|
||||
import { fetchType, getFetch } from "@/components/lib/api";
|
||||
import {
|
||||
excelDownload,
|
||||
formatPhoneNumber,
|
||||
getCity,
|
||||
tableData
|
||||
} from "@/components/lib/func/commom";
|
||||
@@ -26,6 +27,7 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
import SdmInsertForm from "@common/business_components/ui/sdmInsertForm";
|
||||
import type { DemandCompType } from "@common/business_components/ui/sdmInsertForm/form";
|
||||
import { Button } from "@common/components/ui";
|
||||
import moment from "moment";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
|
||||
@@ -83,6 +85,9 @@ export default function CoSttn() {
|
||||
const data = tableData(coSttnRes, { code });
|
||||
const chData = data.map((item: any) => ({
|
||||
...item,
|
||||
telno:formatPhoneNumber(item.telno||undefined),
|
||||
regDt: moment(item.regDt).format("YYYY-MM-DD")
|
||||
|
||||
}));
|
||||
// .filter((item: any) => item !== undefined);
|
||||
setBdstTable(chData);
|
||||
@@ -162,7 +167,7 @@ export default function CoSttn() {
|
||||
</SearchFormLeft>
|
||||
<SearchFormRight className="w-2/12 mx-5 flex flex-col items-center justify-center space-x-2 ">
|
||||
<div className="flex flex-row space-x-2">
|
||||
<Button size={"sm"} onClick={searchClick}>
|
||||
<Button className="mt-2" size={"sm"} onClick={searchClick}>
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
@@ -182,7 +187,7 @@ export default function CoSttn() {
|
||||
onClick={() => {
|
||||
/* 저장 로직 */
|
||||
if (!upadateData) {
|
||||
<ToastFormUi body={"수요처 변경을 원하는 행을 선택해주세요"} title={"수요처관리"}></ToastFormUi>;
|
||||
toast.error("수요처 변경을 원하는 행을 선택해주세요")
|
||||
}else{
|
||||
setIsDmdModal({
|
||||
...isDmdModal,
|
||||
@@ -190,7 +195,7 @@ export default function CoSttn() {
|
||||
}
|
||||
}}
|
||||
>
|
||||
저장
|
||||
수정
|
||||
</Button>
|
||||
<Button
|
||||
size={"sm"}
|
||||
|
||||
@@ -53,10 +53,11 @@ export default function prfmncPrfmncReg() {
|
||||
const [inputData, setInputData] = useState<any[]>();
|
||||
const [pbnstRuseFcltPk, setPbnstRuseFcltPk] = useState<string>();
|
||||
const [pageNation, setPageNation] = useState<number>(1);
|
||||
const [cellNum, setCellNum] = useState<number>();
|
||||
const [cellNum, setCellNum] = useState<number>(1);
|
||||
const [searchYear, setSearchYear] = useState<string>(
|
||||
String(new Date().getFullYear())
|
||||
);
|
||||
|
||||
const excelClick = useCallback(() => {
|
||||
excelDownload(
|
||||
[[]],
|
||||
@@ -66,21 +67,22 @@ export default function prfmncPrfmncReg() {
|
||||
);
|
||||
}, [prfmnc.excelList]);
|
||||
|
||||
const onSave = useCallback(() => {
|
||||
const onSave = useCallback(
|
||||
async() => {
|
||||
if (pbnstRuseFcltPk) {
|
||||
prfmnRegData(
|
||||
await prfmnRegData(pageNation,'41',
|
||||
excelToPbnPrfData(
|
||||
inputData as unknown as JSON[],
|
||||
searchYear,
|
||||
pbnstRuseFcltPk
|
||||
) as unknown as PrfType
|
||||
);
|
||||
prfmncHasuInit(String(pageNation), "41");
|
||||
// cellClick(cellNum)
|
||||
}
|
||||
}, [inputData, searchYear, pbnstRuseFcltPk, prfmncHasuInit, pageNation]);
|
||||
}, [inputData, searchYear, pbnstRuseFcltPk, pageNation,cellNum]);
|
||||
|
||||
const cellClick = useCallback(
|
||||
(index: number | undefined, headId: string) => {
|
||||
(index: number | undefined) => {
|
||||
if (index !== undefined) {
|
||||
setIsExcelOPen({
|
||||
isModal: false,
|
||||
@@ -152,7 +154,6 @@ export default function prfmncPrfmncReg() {
|
||||
}
|
||||
const tableData = [...inUsageData, ...outUsageData, usageTotalObj];
|
||||
setPbnstRuseFcltPk(prfmncRes[index].pbnstRuseFcltPk);
|
||||
|
||||
setInputData(tableData);
|
||||
} else {
|
||||
setInputData([]);
|
||||
@@ -164,12 +165,17 @@ export default function prfmncPrfmncReg() {
|
||||
|
||||
useEffect(() => {
|
||||
if (!prfmnc.isInit) {
|
||||
prfmncHasuInit("1", "41");
|
||||
prfmncHasuInit(1, "41");
|
||||
}
|
||||
}, [prfmnc.isInit, prfmncHasuInit]);
|
||||
useEffect(() => {
|
||||
setbdstTable(prfmncRes);
|
||||
}, [prfmncRes]);
|
||||
|
||||
// cellNum이 0일 경우(첫 번째 행)도 유효한 인덱스이므로 undefined 여부만 체크합니다.
|
||||
if (cellNum !== undefined) {
|
||||
cellClick(cellNum);
|
||||
}
|
||||
}, [prfmncRes, cellNum, cellClick]);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -250,13 +256,14 @@ export default function prfmncPrfmncReg() {
|
||||
<ListDiv className="min-h-0">
|
||||
<ScrollArea className="h-[60vh]">
|
||||
<UiTable
|
||||
key={'leftTable'}
|
||||
tableData={bdstTable || []}
|
||||
headlist={pbnstPrfmncHeadList}
|
||||
pageSize={10}
|
||||
total={10000}
|
||||
headName={"하수재이용시설 목록"}
|
||||
cellClick={(index: number | undefined, headId: string) => {
|
||||
cellClick(index, headId);
|
||||
cellClick(index);
|
||||
setCellNum(index ?? 0);
|
||||
}}
|
||||
onPageChange={setPageNation}
|
||||
@@ -277,7 +284,7 @@ export default function prfmncPrfmncReg() {
|
||||
<TableHeader className="font-bold">
|
||||
{headMakeprfmnc(monthHeadList, [])}
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
<TableBody key={prfmnc.pageKey+'pageKey'}>
|
||||
{InputTableBody(inputData ?? [], monthHeadList, setInputData)}
|
||||
</TableBody>
|
||||
</Table>
|
||||
@@ -292,7 +299,15 @@ export default function prfmncPrfmncReg() {
|
||||
data={isExcelOpen.data}
|
||||
setIsExcelOPen={(open) => {
|
||||
setIsExcelOPen({ ...isExcelOpen, isModal: open })
|
||||
|
||||
}}
|
||||
setModalExcelData={ async(excelData ) =>{
|
||||
await prfmnRegData(pageNation,'41',
|
||||
excelData,
|
||||
);
|
||||
// 데이터 저장 후 UI 업데이트는 useEffect가 감지하여 처리하므로 여기서는 호출하지 않습니다.
|
||||
}
|
||||
}
|
||||
></PbnPrfExcelModal>
|
||||
}
|
||||
open={isExcelOpen.isModal}
|
||||
|
||||
@@ -29,12 +29,12 @@ export const coRvwHeadListExport: CommonTableProps[]= [
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "dmndTmng", //바꾸기
|
||||
id: "dmndTmng",
|
||||
title: "신청일자",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "splyFcltFlg", //바꾸기
|
||||
id: "splyFcltFlg",
|
||||
title: "진행상태",
|
||||
visible: true,
|
||||
},
|
||||
|
||||
@@ -102,7 +102,9 @@ export const coRvwActionsExport: (set: any) => coRvwActions = (set: any) => {
|
||||
`/reuseFc/request/cst/${splyCd}/${dmdCd}`,
|
||||
data
|
||||
);
|
||||
|
||||
if(isUpdate){
|
||||
toast.error("수요 매칭 검토 검토로 저장되었습니다.");
|
||||
}
|
||||
const coMatRvwRes = coMatInit(
|
||||
1,
|
||||
10,
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
import { z } from "zod";
|
||||
|
||||
const DemandInfoSchema = z.object({
|
||||
dmdInfoSn: z.number(),
|
||||
dmdInfoFk: z.string(),
|
||||
dmndTmng: z.coerce.date(),
|
||||
dmndQty: z.number(),
|
||||
wntUntprc: z.number(),
|
||||
grssClfg: z.number(),
|
||||
combResdch: z.number(),
|
||||
trbt: z.number(),
|
||||
dmdInfoSn: z.number().nullish(),
|
||||
dmdInfoFk: z.string().nullish(),
|
||||
dmndTmng: z.coerce.date().nullish(),
|
||||
dmndQty: z.number().nullish(),
|
||||
wntUntprc: z.number().nullish(),
|
||||
grssClfg: z.number().nullish(),
|
||||
combResdch: z.number().nullish(),
|
||||
trbt: z.number().nullish(),
|
||||
blgcOxygDmndQnt: z.number(),
|
||||
smll: z.number(),
|
||||
smll: z.number().nullish(),
|
||||
crmty: z.number().nullish(),
|
||||
tn: z.number(),
|
||||
tph: z.number(),
|
||||
tn: z.number().nullish(),
|
||||
tph: z.number().nullish(),
|
||||
ph: z.number(),
|
||||
clIonQnt: z.number(),
|
||||
cdtnv: z.number(),
|
||||
rmrk: z.string(),
|
||||
useUsgCd: z.string(),
|
||||
clIonQnt: z.number().nullish(),
|
||||
cdtnv: z.number().nullish(),
|
||||
rmrk: z.string().nullish(),
|
||||
useUsgCd: z.string().nullish(),
|
||||
mtchnCmptnYmd: z.string().nullish(),
|
||||
rvwCmptnYmd: z.string().nullish()
|
||||
});
|
||||
@@ -38,28 +38,28 @@ import { z } from "zod";
|
||||
});
|
||||
|
||||
const DemandCoSchema = z.object({
|
||||
dmdInfoPk: z.string(),
|
||||
dmdCoNm: z.string(),
|
||||
ctpvCd: z.string(),
|
||||
sggCd: z.string(),
|
||||
daddr: z.string(),
|
||||
splyBgngDay: z.coerce.date(),
|
||||
splyEndDay: z.coerce.date(),
|
||||
splyCpct: z.number(),
|
||||
dmdInfoPk: z.string().nullish(),
|
||||
dmdCoNm: z.string().nullish(),
|
||||
ctpvCd: z.string().nullish(),
|
||||
sggCd: z.string().nullish(),
|
||||
daddr: z.string().nullish(),
|
||||
splyBgngDay: z.coerce.date().nullish(),
|
||||
splyEndDay: z.coerce.date().nullish(),
|
||||
splyCpct: z.number().nullish(),
|
||||
splyFmYn: z.string().nullish(),
|
||||
telno: z.string(),
|
||||
telno: z.string().nullish(),
|
||||
useUsgCd: z.string().nullish(),
|
||||
regDt: z.coerce.date().nullish(),
|
||||
rgtr: z.string().nullish(),
|
||||
mdfcnDt: z.coerce.date().nullish(),
|
||||
mdfr: z.string().nullish(),
|
||||
dmdAplyPswd: z.string(),
|
||||
dmdAplyPswd: z.string().nullish(),
|
||||
demandInfo: z.array(DemandInfoSchema.nullish()).nullish(), // 안쓰는 거임
|
||||
demandMatchings: z.array(DemandMatchingSchema.nullish()).nullish()// 안쓰는 거임
|
||||
});
|
||||
|
||||
const DemandCstSchema = z.object({
|
||||
dmdInfoSn: z.number(),
|
||||
dmdInfoSn: z.number().nullish(),
|
||||
usgPrcsProcs: z.string().nullish(),
|
||||
cstrnCst: z.number(),
|
||||
fcltSbsdCstrnCst: z.number(),
|
||||
@@ -69,9 +69,9 @@ import { z } from "zod";
|
||||
export const DmdCoReqSchema = z.object({
|
||||
cityText:z.string().nullish(),
|
||||
sggText:z.string().nullish(),
|
||||
dmdInfoSn: z.number(),
|
||||
dmdInfoFk: z.string(),
|
||||
dmndTmng: z.coerce.date(),
|
||||
dmdInfoSn: z.number().nullish(),
|
||||
dmdInfoFk: z.string().nullish(),
|
||||
dmndTmng: z.coerce.date().nullish(),
|
||||
dmndQty: z.number(),
|
||||
wntUntprc: z.number().nullish(),
|
||||
grssClfg: z.number().nullish(),
|
||||
@@ -139,23 +139,7 @@ export type RvwHistTableType = {
|
||||
|
||||
}
|
||||
|
||||
export type RvwHistTableType = {
|
||||
cityText:string,
|
||||
sggText:string,
|
||||
dmdCoNm:string,
|
||||
daddr:string,
|
||||
telno:string,
|
||||
regDt:string,
|
||||
rvwCmptnYmd:string,
|
||||
mtchnCmptnYmd:string,
|
||||
ruseUtztnFcltNm:string,
|
||||
dmndQty:string,
|
||||
useUsgCd:string,
|
||||
splyFcltFlg:string
|
||||
completeYn:boolean
|
||||
dmdInfoSn :string
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -44,6 +44,11 @@ export const coSttHeadListExport: z.infer<typeof sttnHeadListType> = [
|
||||
title: "전화번호",
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
id: "regDt",
|
||||
title: "등록일자",
|
||||
visible: true,
|
||||
},
|
||||
];
|
||||
|
||||
export const coSttNodeListExport: CommonTableProps[] = [
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { CommonTableProps } from "@/app/store/common/type/header";
|
||||
import { fetchType, getFetch, getFetchWithCount } from "@/components/lib/api";
|
||||
import { coSttHeadListExport, coSttNodeListExport } from "./headList";
|
||||
import { excelCoSttnParsing } from "./excel";
|
||||
import type { DemandCompType } from "@common/business_components/ui";
|
||||
import type { DemandCompType } from "@common/business_components/ui/sdmInsertForm/form";
|
||||
|
||||
// 테이블 헤드 리스트
|
||||
const coSttNodeList = coSttNodeListExport;
|
||||
|
||||
@@ -16,6 +16,7 @@ export type pbnstPrfmncState = {
|
||||
monthHeadList: TableUpperProps[];
|
||||
prfmncRes: FcPrfType[];
|
||||
excelList: Number[];
|
||||
pageKey:number
|
||||
};
|
||||
};
|
||||
|
||||
@@ -26,21 +27,22 @@ export const pbnstPrfmncStateExport: pbnstPrfmncState = {
|
||||
monthHeadList: monthHeadList,
|
||||
prfmncRes: [],
|
||||
excelList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
||||
pageKey:1
|
||||
},
|
||||
};
|
||||
|
||||
export type pbnstPrfmncType = pbnstPrfmncState & pbnstPrfmncActions;
|
||||
|
||||
type pbnstPrfmncActions = {
|
||||
prfmncHasuInit: (page: string, sggOrCity: string) => void;
|
||||
prfmnRegData: (data: PrfType) => void;
|
||||
prfmncHasuInit: (page: number, sggOrCity: string) => void;
|
||||
prfmnRegData: (page:number,sggOrCity:string, data: PrfType) => void;
|
||||
};
|
||||
|
||||
const checkWrRegList = async () => {
|
||||
const wrRegList = await getFetch("wr", `/reuseFc/pubDetailList`);
|
||||
return wrRegList;
|
||||
};
|
||||
const hasuListFetch = async (page: string, sggOrCity: string) => {
|
||||
const hasuListFetch = async (page: number, sggOrCity: string) => {
|
||||
const checkWrRegListRes = await checkWrRegList();
|
||||
const rainRes = await postFectch(
|
||||
`/prcsFclt/ruseInfo/${page ? page : 1}/10/A/${sggOrCity ? sggOrCity : "11"}/0/1/SW`,
|
||||
@@ -74,7 +76,7 @@ export const pbnstPrfmncActionsExport: (set: any) => pbnstPrfmncActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
prfmncHasuInit: async (page: string, sggOrCity: string) => {
|
||||
prfmncHasuInit: async (page: number, sggOrCity: string) => {
|
||||
try {
|
||||
const prfmncRes = await hasuListFetch(page, sggOrCity);
|
||||
return set((state: pbnstPrfmncState) => ({
|
||||
@@ -89,7 +91,7 @@ export const pbnstPrfmncActionsExport: (set: any) => pbnstPrfmncActions = (
|
||||
console.log(errorHasu);
|
||||
}
|
||||
},
|
||||
prfmnRegData: async (data: PrfType) => {
|
||||
prfmnRegData: async (page:number,sggOrCity:string,data: PrfType) => {
|
||||
try {
|
||||
const ressponse = await postFectch(
|
||||
"/reuseFc/pubFcPrf",
|
||||
@@ -100,6 +102,17 @@ export const pbnstPrfmncActionsExport: (set: any) => pbnstPrfmncActions = (
|
||||
|
||||
if (ressponse.status === 200) {
|
||||
toast.success("하수재이용 시설 실적 등록이 완료되었습니다.");
|
||||
const prfmncRes = await hasuListFetch(page, sggOrCity);
|
||||
return set((state: pbnstPrfmncState) => ({
|
||||
...state,
|
||||
prfmnc: {
|
||||
...state.prfmnc,
|
||||
prfmncRes: prfmncRes,
|
||||
isInit: false,
|
||||
pageKey: state.prfmnc.pageKey + 1
|
||||
},
|
||||
}));
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import type { rainChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
|
||||
import type { rswtChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn";
|
||||
import { Checkbox, Input, TableCell, TableRow } from "@common/components/ui";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export const rainChkTableData = (chkData: rainChkZodType[]) => {
|
||||
// 1. chkgdnFk + utztnUsgCd 기준 누계 정보 만들기
|
||||
@@ -54,27 +55,32 @@ export const rainChkTableData = (chkData: rainChkZodType[]) => {
|
||||
export const rswtChkTableData = (chkData: rswtChkZodType[]) => {
|
||||
// 1. chkgdnFk + utztnUsgCd 기준 누계 정보 만들기
|
||||
const makeRswtData: any[] = [];
|
||||
chkData?.forEach((root) => {
|
||||
root.rswtrDetails.forEach((detail) => {
|
||||
let flatRswtChk = {};
|
||||
const findGuide = root.guideDetails.find(
|
||||
(guide) => guide.utztnUsgCd === detail.utztnUsgCd
|
||||
);
|
||||
const findPoluttion = root.rswtrPollutions.find(
|
||||
(polution) => polution.utztnUsgCd === detail.utztnUsgCd
|
||||
);
|
||||
const operMngCd = root?.reuseBuilding.operMngCd;
|
||||
flatRswtChk = {
|
||||
...root,
|
||||
...detail,
|
||||
...findGuide,
|
||||
...findPoluttion,
|
||||
...flatRswtChk,
|
||||
operMngCd: operMngCd,
|
||||
};
|
||||
makeRswtData.push(flatRswtChk);
|
||||
|
||||
|
||||
if(chkData&&chkData.length>0){
|
||||
|
||||
chkData?.forEach((root) => {
|
||||
root.rswtrDetails.forEach((detail) => {
|
||||
let flatRswtChk = {};
|
||||
const findGuide = root.guideDetails.find(
|
||||
(guide) => guide.utztnUsgCd === detail.utztnUsgCd
|
||||
);
|
||||
const findPoluttion = root.rswtrPollutions.find(
|
||||
(polution) => polution.utztnUsgCd === detail.utztnUsgCd
|
||||
);
|
||||
const operMngCd = root?.reuseBuilding.operMngCd;
|
||||
flatRswtChk = {
|
||||
...root,
|
||||
...detail,
|
||||
...findGuide,
|
||||
...findPoluttion,
|
||||
...flatRswtChk,
|
||||
operMngCd: operMngCd,
|
||||
};
|
||||
makeRswtData.push(flatRswtChk);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
return makeRswtData;
|
||||
};
|
||||
|
||||
@@ -93,6 +99,7 @@ export const chRowspanTable = (
|
||||
let order = 0
|
||||
// rowspan된 셀 렌더링 여부 추적용
|
||||
const renderedMap = new Map<string, Set<number>>();
|
||||
|
||||
return (
|
||||
<>
|
||||
{makeTableData.map((row, rowIndex) => (
|
||||
@@ -228,7 +235,6 @@ export const InputTableBody = (
|
||||
}
|
||||
return span;
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{chgRes.map((data, dataIndex) => {
|
||||
|
||||
@@ -138,7 +138,7 @@ export default function ConCostForm({
|
||||
if (type === "mat") {
|
||||
const data: DedMatUpdateType = {
|
||||
dmdInfoSn: form.getValues("dmdInfoSn"),
|
||||
usgPrcsProcs: form.getValues("demandCst.usgPrcsProcs"),
|
||||
usgPrcsProcs: form.getValues("demandCst.usgPrcsProcs")|| "",
|
||||
cstrnCst: form.getValues("demandCst.cstrnCst"),
|
||||
fcltSbsdCstrnCst: form.getValues("demandCst.fcltSbsdCstrnCst"),
|
||||
prcsFcltCpctCstrnCst: form.getValues("demandCst.prcsFcltCpctCstrnCst"),
|
||||
@@ -294,7 +294,9 @@ export default function ConCostForm({
|
||||
<div className="col-span-12 w-full">
|
||||
<h1 className={formH1Class}>공사비 입력사항</h1>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
|
||||
|
||||
<div className="col-span-2 mt-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<PopoverUi
|
||||
childrenTriger={
|
||||
@@ -333,7 +335,7 @@ export default function ConCostForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<PopoverUi
|
||||
childrenTriger={
|
||||
@@ -372,12 +374,12 @@ export default function ConCostForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
<div className="col-span-2 mt-4">
|
||||
<PopoverUi
|
||||
childrenTriger={
|
||||
<>
|
||||
<Label className="underline">
|
||||
총사업비 (백만원) <i className="diveicon di-search" />
|
||||
처리시설 총사업비(백만원) <i className="diveicon di-search" />
|
||||
</Label>
|
||||
</>
|
||||
}
|
||||
@@ -414,7 +416,7 @@ export default function ConCostForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 mt-4">
|
||||
{/* <div className="col-span-3 mt-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<Label>공급처 선정</Label>
|
||||
<Button size={"sm"} onClick={(e) => {}} className="bg-none">
|
||||
@@ -437,8 +439,8 @@ export default function ConCostForm({
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4 mt-4">
|
||||
</div> */}
|
||||
<div className="col-span-3 mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="demandCst.cstrnCst"
|
||||
@@ -457,7 +459,7 @@ export default function ConCostForm({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4 mt-4 mb-3">
|
||||
<div className="col-span-3 mt-4 mb-3">
|
||||
<Label className="text-xl">
|
||||
처리시설 + 공급관로 총사업비(백만원)
|
||||
</Label>
|
||||
|
||||
@@ -21,7 +21,7 @@ import { useForm } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
import type { z } from "zod";
|
||||
|
||||
export default function PbnPrfExcelModal({ data ,setIsExcelOPen }: { data: FcPrfType ,setIsExcelOPen:(open:boolean )=>void }) {
|
||||
export default function PbnPrfExcelModal({ data ,setIsExcelOPen ,setModalExcelData}: { data: FcPrfType ,setIsExcelOPen:(open:boolean )=>void,setModalExcelData:(excelData :PrfType)=>void }) {
|
||||
const { prfmnRegData } = useWrStore((state) => state);
|
||||
|
||||
const [file, setFile] = useState<File | null>(null);
|
||||
@@ -42,7 +42,9 @@ export default function PbnPrfExcelModal({ data ,setIsExcelOPen }: { data: FcPrf
|
||||
const onSubmit = (values: z.infer<typeof pbnPrfRegExcelZod>) => {
|
||||
|
||||
if (excelData) {
|
||||
prfmnRegData(excelData as unknown as PrfType);
|
||||
// prfmnRegData(1,'41', excelData as unknown as PrfType);
|
||||
|
||||
setModalExcelData(excelData as unknown as PrfType)
|
||||
setIsExcelOPen(false)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user