diff --git a/src/views/biz/admin/judge/JudgeRegistReview.jsx b/src/views/biz/admin/judge/JudgeRegistReview.jsx index 8a65898..c790298 100644 --- a/src/views/biz/admin/judge/JudgeRegistReview.jsx +++ b/src/views/biz/admin/judge/JudgeRegistReview.jsx @@ -28,8 +28,8 @@ const year = getYear(new Date()).toString(); const JudgeRegistReview = ({ scDatagb, menuName }) => { const showAlert = useAlert(); const [scTransfer, setScTransfer] = useState('1'); - const [scSeq1, setScSeq1] = useState(year); - const [scSeq2, setScSeq2] = useState(year); + const [scSeq1, setScSeq1] = useState(`${year}000001`); + const [scSeq2, setScSeq2] = useState(`${year}999999`); const [selectionModel, setSelectionModel] = useState([]); const [totalCount, setTotalCount] = useState(0); const [rowsState, setRowsState] = useState({ diff --git a/src/views/biz/admin/parking/ParkingRegister.jsx b/src/views/biz/admin/parking/ParkingRegister.jsx index 3e7b135..d747e0c 100644 --- a/src/views/biz/admin/parking/ParkingRegister.jsx +++ b/src/views/biz/admin/parking/ParkingRegister.jsx @@ -19,11 +19,16 @@ import SaveParkingTargetForm from './SaveParkingTargetForm'; import NumberFormat from 'react-number-format'; import ExcelDownload from 'views/cmm/file-ctl/ExcelDownload'; import { findParkingJudgeTargets, saveParkingJudgeTargets } from 'apis/parking'; +import getYear from 'date-fns/getYear'; +import { useAlert } from 'react-alert'; + +const year = getYear(new Date()).toString(); const ParkingRegister = () => { + const showAlert = useAlert(); const [rcIrTransfer, setRcIrTransfer] = useState('1'); - const [rcSeq1, setRcSeq1] = useState('2022200801'); - const [rcSeq2, setRcSeq2] = useState('2022200899'); + const [rcSeq1, setRcSeq1] = useState(`${year}000001`); + const [rcSeq2, setRcSeq2] = useState(`${year}999999`); const [selectionModel, setSelectionModel] = useState([]); const [totalCount, setTotalCount] = useState(0); const [rowsState, setRowsState] = useState({ @@ -55,6 +60,15 @@ const ParkingRegister = () => { ]; const search = () => { + if (rcSeq1.length < 10 || rcSeq2.length < 10) { + showAlert.show('접수번호를 10자리로 입력해 주세요[ex:2022000001]'); + return; + } + if (rcSeq1 > rcSeq2) { + showAlert.show('접수번호 조건을 확인해 주세요'); + return; + } + const params = { rcIrTransfer, rcSeq1,