Merge branch 'iipbs/st/dev' of https://www.onasys.co.kr:3000/ONAANDALL/frontend into iipbs/st/dev

This commit is contained in:
2026-03-05 14:10:21 +09:00
19 changed files with 197 additions and 175 deletions
@@ -0,0 +1,16 @@
import { Button } from "@common/components";
interface CancelSubmitButtonProps {
cnacelSubmitFunc: () => void;
}
const CancelSubmitButton = ({ cnacelSubmitFunc }: CancelSubmitButtonProps) => {
return (
<Button className="h-[3.2rem] w-[96px]" color="red" onClick={cnacelSubmitFunc}>
<i className="ri-arrow-reset"></i>
<span>제출 취소</span>
</Button>
);
};
export default CancelSubmitButton;
+9 -9
View File
@@ -1039,21 +1039,21 @@ const DataGrid = ({
{statusInfo &&
<div className="data-grid-status-bubble flex flex-wrap items-center gap-x-4 gap-y-1">
<span>진행상황: {
statusInfo.locgStatus === null || statusInfo.locgStatus === '0' ?
statusInfo.laeSbmsnSttsCd === null || statusInfo.laeSbmsnSttsCd === '0' ?
'미작성'
:
statusInfo.locgStatus === '1' ? '작성중' : statusInfo.locgStatus === '2' ? '제출'
statusInfo.laeSbmsnSttsCd === '1' ? '작성중' : statusInfo.laeSbmsnSttsCd === '2' ? '제출'
:
statusInfo.locgStatus === '3' ? '승인' : '반려'
statusInfo.laeSbmsnSttsCd === '3' ? '승인' : '반려'
}
</span>
<span>제출일: {statusInfo.locgDt
? (statusInfo.locgDt.length === 8 && /^\d{8}$/.test(statusInfo.locgDt)
? `${statusInfo.locgDt.slice(0, 4)}-${statusInfo.locgDt.slice(4, 6)}-${statusInfo.locgDt.slice(6, 8)}`
: statusInfo.locgDt)
<span>제출일: {statusInfo.laeSbmsnYmd
? (statusInfo.laeSbmsnYmd.length === 8 && /^\d{8}$/.test(statusInfo.laeSbmsnYmd)
? `${statusInfo.laeSbmsnYmd.slice(0, 4)}-${statusInfo.laeSbmsnYmd.slice(4, 6)}-${statusInfo.laeSbmsnYmd.slice(6, 8)}`
: statusInfo.laeSbmsnYmd)
: '미제출'}</span>
<span>담당자: {statusInfo.locgCharger ? statusInfo.locgCharger : '-'}</span>
<span>연락처: {statusInfo.locgCttpc ? statusInfo.locgCttpc : '-'}</span>
<span>담당자: {statusInfo.laePicNm ? statusInfo.laePicNm : '-'}</span>
<span>연락처: {statusInfo.laePicTelNo ? statusInfo.laePicTelNo : '-'}</span>
</div>
}
{isExcelImport && (
+2 -2
View File
@@ -67,9 +67,9 @@ const SearchForm = (props: SearchFormProps = {}) => {
bsnmCd: props.defaultValues?.bsnmCd || '',
});
// isStatusMenu면 bsnmCd가 doList에 있을 때만 시군구 조회. 선택 후 옵션 유지를 위해 마지막 목록 ref 사용
const sggKey: [string, string] | null =
values.sido && values.sido !== "ALL" && (!mergedProps.isStatusMenu || doList.includes(values.bsnmCd ?? ""))
// values.sido && values.sido !== "ALL" && doList.includes(values.bsnmCd ?? "")
values.sido && values.sido !== "ALL"
? ["sgg-list", values.sido]
: null;
const { data: sggList } = useSWR<ApiResponse<Sgg[]>>(
@@ -7,6 +7,7 @@ import SubmitButton from "@/components/button/SumitButton";
import SaveButton from "@/components/button/SaveButton";
import LastYearDataButton from "@/components/button/LastYearDataButton";
import SubmitExceptionButton from "@/components/button/SubmitExceptionButton";
import CancelSubmitButton from "@/components/button/CancelSubmitButton";
import { LoadingWithAnimation } from "@common/components";
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
import SubmitDailog from "./SubmitDailog";
@@ -123,16 +124,16 @@ const SeweragePenetrationRateInp = () => {
setFooterFromApi(
commonInfo
? {
totalPopl: commonInfo.sewerBzmnTotalPopl,
poplSm: commonInfo.sewerBzmnPoplSm,
frgnrPoplSm: commonInfo.sewerBzmnFrgnrPoplSm,
totalPopl: commonInfo.sewerBzmnWholPpltnCnt,
poplSm: commonInfo.sewerBzmnDomplWholPpltnCnt,
frgnrPoplSm: commonInfo.sewerBzmnFrgnrWholPpltnCnt,
refArea: commonInfo.sewerBzmnArea,
}
: null
);
if (statusInfo && statusInfo.locgStatus) {
if (['2', '3'].includes(statusInfo.locgStatus)) {
if (statusInfo && statusInfo.laeSbmsnSttsCd) {
if (['2', '3'].includes(statusInfo.laeSbmsnSttsCd)) {
setIsEnterable(false);
} else {
setIsEnterable(isEnterable);
@@ -267,15 +268,15 @@ const SeweragePenetrationRateInp = () => {
statsYr: searchValues?.year ?? '',
userId: userInfo.userUnqId,
submitList: convertedData,
sewerBzmnFrgnrPoplSm: footerFromApi?.frgnrPoplSm,
locgCharger: submitInfo.locgCharger,
locgJob: submitInfo.locgJob,
locgDept: submitInfo.locgDept,
locgCttpc: submitInfo.locgCttpc,
locgCnfirmNm: submitInfo.locgCnfirmNm,
locgCnfirmJob: submitInfo.locgCnfirmJob,
locgCnfirmDept: submitInfo.locgCnfirmDept,
locgCnfirmPh: submitInfo.locgCnfirmPh,
sewerBzmnFrgnrWholPpltnCnt: footerFromApi?.frgnrPoplSm,
laePicNm: submitInfo.laePicNm,
laeKbrdrJbgdNm: submitInfo.laeKbrdrJbgdNm,
laeKbrdrDeptNm: submitInfo.laeKbrdrDeptNm,
laePicTelNo: submitInfo.laePicTelNo,
laeIdfrNm: submitInfo.laeIdfrNm,
laeIdfrJbgdNm: submitInfo.laeIdfrJbgdNm,
laeIdfrDeptNm: submitInfo.laeIdfrDeptNm,
laeIdfrTelNo: submitInfo.laeIdfrTelNo,
};
const response = await StatisticsInputSewSupplyRateApi.submitSewerageSupplyRate(requestData);
@@ -369,7 +370,7 @@ const SeweragePenetrationRateInp = () => {
statsYr: searchValues?.year ?? '', // 통계 연도
userId: userInfo.userUnqId, // 사용자
saveList: convertedData, // 저장 데이터
sewerBzmnFrgnrPoplSm: footerFromApi?.frgnrPoplSm // 행정참고자료 외국인 합계
sewerBzmnFrgnrWholPpltnCnt: footerFromApi?.frgnrPoplSm // 행정참고자료 외국인 합계
};
if (isAdminInfo) {
@@ -406,8 +407,10 @@ const SeweragePenetrationRateInp = () => {
<SubmitExceptionButton SubmitExceptionFunc={SubmitExceptionFunc} />
<LastYearDataButton getLastYearDataFunc={() => getLastYearDataFunc(searchValues ?? {})} />
<SubmitButton submitFunc={submitFunc} />
</>
)}
{statusInfo?.laeSbmsnSttsCd === '2' && <CancelSubmitButton cnacelSubmitFunc={() => console.log('test')} />}
{(isEnterable && (doList.includes(lastSearchedValues?.bsnmCd || '') ? Boolean(lastSearchedValues?.gugun && lastSearchedValues.gugun !== 'ALL') : true) || isAdminInfo) && <SaveButton saveFunc={saveFunc} />}
</div>
</div>
@@ -66,7 +66,7 @@ const StatsInputStatusInp = () => {
return (
<>
<div className="relative">
<SearchForm onSubmit={handleSearch} onReset={handleReset} isStatusMenu={true} />
<SearchForm onSubmit={handleSearch} onReset={handleReset} />
<div className="card !py-0">
<div className="flex justify-end items-center gap-[0.6rem] m-[0.6rem]">
<RejectButton rejectFunc={rejectFunc} />
@@ -37,7 +37,7 @@ function formatPhoneWithHyphen(value: string): string {
return `${digits.slice(0, 3)}-${digits.slice(3, 6)}-${digits.slice(6, 10)}`;
}
const PHONE_FIELDS: (keyof StatisticsInputSubmitInfoFormData)[] = ["locgCttpc", "locgCnfirmPh"];
const PHONE_FIELDS: (keyof StatisticsInputSubmitInfoFormData)[] = ["laePicTelNo", "laeIdfrTelNo"];
interface SubmitDialogProps {
open: boolean;
@@ -48,26 +48,26 @@ interface SubmitDialogProps {
}
const defaultValues: StatisticsInputSubmitInfoFormData = {
locgCharger: "",
locgJob: "",
locgDept: "",
locgCttpc: "",
locgCnfirmNm: "",
locgCnfirmJob: "",
locgCnfirmDept: "",
locgCnfirmPh: "",
laePicNm: "",
laeKbrdrJbgdNm: "",
laeKbrdrDeptNm: "",
laePicTelNo: "",
laeIdfrNm: "",
laeIdfrJbgdNm: "",
laeIdfrDeptNm: "",
laeIdfrTelNo: "",
};
function statusInfoToFormData(info: SewerageSupplyRateStatusInfo): StatisticsInputSubmitInfoFormData {
return {
locgCharger: info.locgCharger ?? "",
locgJob: info.locgJob ?? "",
locgDept: info.locgDept ?? "",
locgCttpc: info.locgCttpc ?? "",
locgCnfirmNm: info.locgCnfirmNm ?? "",
locgCnfirmJob: info.locgCnfirmJob ?? "",
locgCnfirmDept: info.locgCnfirmDept ?? "",
locgCnfirmPh: info.locgCnfirmPh ?? "",
laePicNm: info.laePicNm ?? "",
laeKbrdrJbgdNm: info.laeKbrdrJbgdNm ?? "",
laeKbrdrDeptNm: info.laeKbrdrDeptNm ?? "",
laePicTelNo: info.laePicTelNo ?? "",
laeIdfrNm: info.laeIdfrNm ?? "",
laeIdfrJbgdNm: info.laeIdfrJbgdNm ?? "",
laeIdfrDeptNm: info.laeIdfrDeptNm ?? "",
laeIdfrTelNo: info.laeIdfrTelNo ?? "",
};
}
@@ -95,14 +95,14 @@ const SubmitDailog = ({ open, onOpenChange, statusInfo, onConfirm }: SubmitDialo
}
const rows: { name: keyof StatisticsInputSubmitInfoFormData; label: string; placeholder: string }[] = [
{ name: "locgCharger", label: "작성자 명", placeholder: "작성자 명 입력" },
{ name: "locgJob", label: "작성자 직제", placeholder: "작성자 직제 입력" },
{ name: "locgDept", label: "작성자 부서", placeholder: "작성자 부서 입력" },
{ name: "locgCttpc", label: "작성자 연락처", placeholder: "작성자 연락처 입력" },
{ name: "locgCnfirmNm", label: "승인자명", placeholder: "승인자명 입력" },
{ name: "locgCnfirmJob", label: "승인자 직제", placeholder: "승인자 직제 입력" },
{ name: "locgCnfirmDept", label: "승인자 부서", placeholder: "승인자 부서 입력" },
{ name: "locgCnfirmPh", label: "승인자 연락처", placeholder: "승인자 연락처" },
{ name: "laePicNm", label: "작성자 명", placeholder: "작성자 명 입력" },
{ name: "laeKbrdrJbgdNm", label: "작성자 직제", placeholder: "작성자 직제 입력" },
{ name: "laeKbrdrDeptNm", label: "작성자 부서", placeholder: "작성자 부서 입력" },
{ name: "laePicTelNo", label: "작성자 연락처", placeholder: "작성자 연락처 입력" },
{ name: "laeIdfrNm", label: "승인자명", placeholder: "승인자명 입력" },
{ name: "laeIdfrJbgdNm", label: "승인자 직제", placeholder: "승인자 직제 입력" },
{ name: "laeIdfrDeptNm", label: "승인자 부서", placeholder: "승인자 부서 입력" },
{ name: "laeIdfrTelNo", label: "승인자 연락처", placeholder: "승인자 연락처" },
];
return (
@@ -0,0 +1,7 @@
const LogHistory = () => {
return (
<></>
);
};
export default LogHistory;
@@ -18,7 +18,6 @@ export type SearchFormProps = {
onReset?: () => void;
onValuesChange?: (values: SearchFormValues) => void;
defaultValues?: SearchFormValues;
isStatusMenu?: boolean;
};
export const defaultSearchFormProps: Required<Omit<SearchFormProps, 'onSubmit' | 'onReset' | 'onValuesChange' | 'defaultValues'>> = {
@@ -28,5 +27,4 @@ export const defaultSearchFormProps: Required<Omit<SearchFormProps, 'onSubmit' |
order: false,
fctName: false,
userMenual: false,
isStatusMenu: false,
};
@@ -1,4 +1,4 @@
import { ValueType } from "realgrid";
// import { ValueType } from "realgrid";
/**
* 하수도 통계 관리 > 00. 통계 입력 현황
@@ -10,15 +10,15 @@ export const StatsInputStatusInpColumn = {
{ name: 'gugun', fieldName: 'gugun', header: { text: '시군구' }, editable: false },
{ name: 'menuCd', fieldName: 'menuCd', header: { text: '메뉴코드' }, visible: false, editable: false },
{ name: 'menuNm', fieldName: 'menuNm', header: { text: '구분' }, editable: false, width: 220 },
{ name: 'locgStatusNm', fieldName: 'locgStatusNm', header: { text: '진행상황' }, editable: false },
{ name: 'inputRate', fieldName: 'inputRate', header: { text: '작성률' }, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
{ name: 'locgCharger', fieldName: 'locgCharger', header: { text: '작성자' }, editable: false },
{ name: 'locgCttpc', fieldName: 'locgCttpc', header: { text: '작성자연락처' }, editable: false },
{ name: 'locgDept', fieldName: 'locgDept', header: { text: '부서' }, editable: false },
{ name: 'locgJob', fieldName: 'locgJob', header: { text: '직제' }, editable: false },
{ name: 'locgCnfirmNm', fieldName: 'locgCnfirmNm', header: { text: '승인자' }, editable: false },
{ name: 'locgCnfirmDept', fieldName: 'locgCnfirmDept', header: { text: '부서' }, editable: false },
{ name: 'locgCnfirmJob', fieldName: 'locgCnfirmJob', header: { text: '직제' }, editable: false },
{ name: 'laeSbmsnSttsCdNm', fieldName: 'laeSbmsnSttsCdNm', header: { text: '진행상황' }, editable: false },
// { name: 'inputRate', fieldName: 'inputRate', header: { text: '작성률' }, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
{ name: 'laePicNm', fieldName: 'laePicNm', header: { text: '작성자' }, editable: false },
{ name: 'laePicTelNo', fieldName: 'laePicTelNo', header: { text: '작성자연락처' }, editable: false },
{ name: 'laeKbrdrDeptNm', fieldName: 'laeKbrdrDeptNm', header: { text: '부서' }, editable: false },
{ name: 'laeKbrdrJbgdNm', fieldName: 'laeKbrdrJbgdNm', header: { text: '직제' }, editable: false },
{ name: 'laeIdfrNm', fieldName: 'laeIdfrNm', header: { text: '승인자' }, editable: false },
{ name: 'laeIdfrDeptNm', fieldName: 'laeIdfrDeptNm', header: { text: '부서' }, editable: false },
{ name: 'laeIdfrJbgdNm', fieldName: 'laeIdfrJbgdNm', header: { text: '직제' }, editable: false },
{ name: 'returnOpinionSm', fieldName: 'returnOpinionSm', header: { text: '반려사유' }, editable: false },
],
@@ -32,15 +32,15 @@ export const StatsInputStatusInpColumn = {
hideChildHeaders: false,
header: { text: '하수도사업자' },
items: [
'locgStatusNm',
'inputRate',
'locgCharger',
'locgCttpc',
'locgDept',
'locgJob',
'locgCnfirmNm',
'locgCnfirmDept',
'locgCnfirmJob',
'laeSbmsnSttsCdNm',
// 'inputRate',
'laePicNm',
'laePicTelNo',
'laeKbrdrDeptNm',
'laeKbrdrJbgdNm',
'laeIdfrNm',
'laeIdfrDeptNm',
'laeIdfrJbgdNm',
'returnOpinionSm'
],
},