diff --git a/src/views/biz/admin/judge/JudgeDataDetailForm.jsx b/src/views/biz/admin/judge/JudgeDataDetailForm.jsx index 2348aa7..c48315d 100644 --- a/src/views/biz/admin/judge/JudgeDataDetailForm.jsx +++ b/src/views/biz/admin/judge/JudgeDataDetailForm.jsx @@ -23,7 +23,11 @@ const ModifyJudgeDataForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav }; const onRemove = () => { - handleModalSave('DELETE', { scCode: rowData.scCode }); + if (window.confirm('삭제 하시겠습니까?')) { + handleModalSave('DELETE', { scCode: rowData.scCode }); + } else { + window.close(); + } }; const viewImg = (methodName) => { diff --git a/src/views/biz/admin/judge/JudgeDataModifyForm.jsx b/src/views/biz/admin/judge/JudgeDataModifyForm.jsx index 0ff1f52..961c689 100644 --- a/src/views/biz/admin/judge/JudgeDataModifyForm.jsx +++ b/src/views/biz/admin/judge/JudgeDataModifyForm.jsx @@ -93,6 +93,40 @@ const JudgeDataModifyForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSav // console.log(pair[0], pair[1]); // } + // 필수항목 빈값 체크 + if (scCarnum.length < 1) { + alert.show('차량번호는 필수입니다.'); + return; + } + if (scName.length < 1) { + alert.show('성명은 필수입니다.'); + return; + } + if (scDong.length < 1) { + alert.show('동명은(는) 필수입니다.'); + return; + } + if (scCdate.length < 1) { + alert.show('접수일자는 필수입니다.'); + return; + } + if (scWdate.length < 1) { + alert.show('위반일자는 필수입니다.'); + return; + } + if (scJbtime.length < 1) { + alert.show('위반시간은 필수입니다.'); + return; + } + if (zipcode1.length < 1) { + alert.show('우편번호는 필수입니다.'); + return; + } + if (rowData.scPicad1.length < 1 || rowData.scFrecad1.length < 1 || rowData.scContad1.length < 1) { + alert.show('단속사진,진술서,첨부자료는 하나씩 업로드 되야합니다.'); + return; + } + handleModalSave('SAVE', formData); }; diff --git a/src/views/biz/admin/judge/JudgeDataNewForm.jsx b/src/views/biz/admin/judge/JudgeDataNewForm.jsx index 71d9d6d..1f488dd 100644 --- a/src/views/biz/admin/judge/JudgeDataNewForm.jsx +++ b/src/views/biz/admin/judge/JudgeDataNewForm.jsx @@ -65,6 +65,47 @@ const JudgeDataNewForm = ({ scDatagb, contDocs, ingbs, handleModalSave }) => { Object.values(contads).forEach((v) => { formData.append('contadFiles', v); }); + + // console.log(Object.values(picads)[0]); + + // 필수항목 빈값 체크 + if (scCarnum.length < 1) { + alert.show('차량번호는 필수입니다.'); + return; + } + if (scName.length < 1) { + alert.show('성명은 필수입니다.'); + return; + } + if (scDong.length < 1) { + alert.show('동명은(는) 필수입니다.'); + return; + } + if (scCdate.length < 1) { + alert.show('접수일자는 필수입니다.'); + return; + } + if (scWdate === null || scWdate === '') { + alert.show('위반일자는 필수입니다.'); + return; + } + if (scJbtime === null || scJbtime === '') { + alert.show('위반시간은 필수입니다.'); + return; + } + if (scPos.length < 1) { + alert.show('위반장소는 필수입니다.'); + return; + } + if (zipcode1 === null || zipcode1 === '') { + alert.show('우편번호는 필수입니다.'); + return; + } + if (Object.values(picads)[0] === undefined) { + alert.show('단속사진은 하나이상 업로드 해야 합니다.'); + return; + } + handleModalSave('SAVE', formData); }; diff --git a/src/views/biz/admin/judge/JudgeDataReview.jsx b/src/views/biz/admin/judge/JudgeDataReview.jsx index 71aeb64..00e928d 100644 --- a/src/views/biz/admin/judge/JudgeDataReview.jsx +++ b/src/views/biz/admin/judge/JudgeDataReview.jsx @@ -128,17 +128,21 @@ const JudgeDataReview = ({ scDatagb, menuName }) => { const handleSaveResident = (type, payload) => { switch (type) { case 'SAVE': - saveJudgeData(payload).then((res) => { - if (res?.success) { - setCreate(false); - setModify(false); - setDetail(false); - setOpen(false); - search(); - } else { - showAlert.show(`${res?.data.message}`); - } - }); + if (window.confirm('저장 하시겠습니까?')) { + saveJudgeData(payload).then((res) => { + if (res?.success) { + setCreate(false); + setModify(false); + setDetail(false); + setOpen(false); + search(); + } else { + showAlert.show(`${res?.data.message}`); + } + }); + } else { + window.close(); + } break; case 'DELETE': removeJudgeData(payload).then((res) => { diff --git a/src/views/biz/admin/judge/JudgeRegistReview.jsx b/src/views/biz/admin/judge/JudgeRegistReview.jsx index 0453381..daf3441 100644 --- a/src/views/biz/admin/judge/JudgeRegistReview.jsx +++ b/src/views/biz/admin/judge/JudgeRegistReview.jsx @@ -75,12 +75,16 @@ const JudgeRegistReview = ({ scDatagb, menuName }) => { }; const handleSave = () => { - if (selectionModel.length === 0) { - xitCmm.alertParam(`처리할 데이타가 없습니다`); + if (window.confirm('저장 하시겠습니까?')) { + if (selectionModel.length === 0) { + xitCmm.alertParam(`처리할 데이타가 없습니다`); + } else { + setTitle(`${menuName} 의견진술 심의목록 저장`); + setOpen(true); + // alert(`저장할 데이타 => ${selectRows}`); + } } else { - setTitle(`${menuName} 의견진술 심의목록 저장`); - setOpen(true); - // alert(`저장할 데이타 => ${selectRows}`); + window.close(); } }; diff --git a/src/views/biz/admin/judge/JudgeReview.jsx b/src/views/biz/admin/judge/JudgeReview.jsx index c558399..2008579 100644 --- a/src/views/biz/admin/judge/JudgeReview.jsx +++ b/src/views/biz/admin/judge/JudgeReview.jsx @@ -67,17 +67,21 @@ const JudgeReview = ({ msDatagb, menuName }) => { const deleteJudge = useCallback( (row) => () => { - removeJudge(row).then((response) => { - if (response && response.success) { - setRowsState({ - ...rowsState, - page: 0 - }); - search(); - } else { - alert.show(response.message); - } - }); + if (window.confirm('삭제 하시겠습니까?')) { + removeJudge(row).then((response) => { + if (response && response.success) { + setRowsState({ + ...rowsState, + page: 0 + }); + search(); + } else { + alert.show(response.message); + } + }); + } else { + window.close(); + } }, [] ); diff --git a/src/views/biz/admin/parking/ParkingRegister.jsx b/src/views/biz/admin/parking/ParkingRegister.jsx index 0237aa2..9bb2a1e 100644 --- a/src/views/biz/admin/parking/ParkingRegister.jsx +++ b/src/views/biz/admin/parking/ParkingRegister.jsx @@ -68,11 +68,15 @@ const ParkingRegister = () => { }; const handleSave = () => { - if (selectionModel.length === 0) { - xitCmm.alertParam(`처리할 데이타가 없습니다`); + if (window.confirm('저장 하시겠습니까?')) { + if (selectionModel.length === 0) { + xitCmm.alertParam(`처리할 데이타가 없습니다`); + } else { + setOpen(true); + // alert(`저장할 데이타 => ${selectRows}`); + } } else { - setOpen(true); - // alert(`저장할 데이타 => ${selectRows}`); + window.close(); } }; diff --git a/src/views/biz/admin/parking/ParkingReview.jsx b/src/views/biz/admin/parking/ParkingReview.jsx index ef1fa43..aafff45 100644 --- a/src/views/biz/admin/parking/ParkingReview.jsx +++ b/src/views/biz/admin/parking/ParkingReview.jsx @@ -68,17 +68,21 @@ const ParkingReview = () => { const removeJudge = useCallback( (row) => () => { - removeParkingJudge(row).then((response) => { - if (response && response.success) { - setRowsState({ - ...rowsState, - page: 0 - }); - search(); - } else { - alert.show(response.message); - } - }); + if (window.confirm('삭제 하시겠습니까?')) { + removeParkingJudge(row).then((response) => { + if (response && response.success) { + setRowsState({ + ...rowsState, + page: 0 + }); + search(); + } else { + alert.show(response.message); + } + }); + } else { + window.close(); + } }, [] ); diff --git a/src/views/biz/board/Board.jsx b/src/views/biz/board/Board.jsx index a6e8370..8952cd5 100644 --- a/src/views/biz/board/Board.jsx +++ b/src/views/biz/board/Board.jsx @@ -119,24 +119,32 @@ const Board = () => { const submitBoard = (type, payload) => { switch (type) { case 'SAVE': - saveBoard(payload).then((res) => { - if (res?.success) { - search(); - setOpen(false); - } else { - alert.show(`${res?.data.message}`); - } - }); // .then((res) => { + if (window.confirm('저장 하시겠습니까?')) { + saveBoard(payload).then((res) => { + if (res?.success) { + search(); + setOpen(false); + } else { + alert.show(`${res?.data.message}`); + } + }); // .then((res) => { + } else { + window.close(); + } break; case 'DELETE': - removeBoard(payload).then((res) => { - if (res?.success) { - search(); - setOpen(false); - } else { - alert.show(`${res?.data.message}`); - } - }); // .then((res) => { + if (window.confirm('삭제 하시겠습니까?')) { + removeBoard(payload).then((res) => { + if (res?.success) { + search(); + setOpen(false); + } else { + alert.show(`${res?.data.message}`); + } + }); // .then((res) => { + } else { + window.close(); + } break; default: } diff --git a/src/views/biz/board/ModifyBoardForm.jsx b/src/views/biz/board/ModifyBoardForm.jsx index eb389ac..e2d1146 100644 --- a/src/views/biz/board/ModifyBoardForm.jsx +++ b/src/views/biz/board/ModifyBoardForm.jsx @@ -32,6 +32,20 @@ const ModifyBoardForm = (props) => { ciPass: pass }; + const replaceContents = contents.replace('