From 9d05ef1d1ccfb84c3c64f38e2b6468c72cd7151c Mon Sep 17 00:00:00 2001 From: minuk926 Date: Mon, 18 Jul 2022 13:19:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B0=95=EB=82=A8=EC=8B=AC=EC=82=AC=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/admin/judge/JudgeRegistReview.jsx | 4 ++-- .../biz/admin/parking/ParkingRegister.jsx | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) 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,