fix: dashboard fix

main
minuk926 2 years ago
parent 49ebc290d2
commit b3a7fe76d4

@ -44,6 +44,15 @@ const ProcessJudge = (props) => {
}; };
const handleSave = () => { const handleSave = () => {
console.log('~~~');
if (!selectedResult || selectedResult === '0') {
showAlert.show('심의결정[미부과/부과]을 선택해 주세요');
return;
}
if (!reason || reason.trim().length === 0) {
showAlert.show('결정사유는 필수 입력해야 합니다.');
return;
}
saveJudgeResult({ msuCode: curDataRef.current.msuCode, msuResult: selectedResult, msuReason: reason }).then((res) => { saveJudgeResult({ msuCode: curDataRef.current.msuCode, msuResult: selectedResult, msuReason: reason }).then((res) => {
if (res?.success) { if (res?.success) {
curDataRef.current.msuResult = selectedResult; curDataRef.current.msuResult = selectedResult;
@ -82,17 +91,17 @@ const ProcessJudge = (props) => {
<Grid item xs={6.5}> <Grid item xs={6.5}>
<ImageList cols={4}> <ImageList cols={4}>
{frecadImgs?.map((img, idx) => ( {frecadImgs?.map((img, idx) => (
<ImgItem idx={idx} title={`진술서${idx + 1}`} imgInfo={img} onViewImage={viewImage} /> <ImgItem key={idx} idx={idx} title={`진술서${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))} ))}
</ImageList> </ImageList>
<ImageList cols={4}> <ImageList cols={4}>
{contadImgs?.map((img, idx) => ( {contadImgs?.map((img, idx) => (
<ImgItem idx={idx} title={`첨부파일${idx + 1}`} imgInfo={img} onViewImage={viewImage} /> <ImgItem key={idx} idx={idx} title={`첨부파일${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))} ))}
</ImageList> </ImageList>
<ImageList cols={4}> <ImageList cols={4}>
{picadImgs?.map((img, idx) => ( {picadImgs?.map((img, idx) => (
<ImgItem idx={idx} title={`단속사진${idx + 1}`} imgInfo={img} onViewImage={viewImage} /> <ImgItem key={idx} idx={idx} title={`단속사진${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))} ))}
</ImageList> </ImageList>
</Grid> </Grid>
@ -149,10 +158,10 @@ const ProcessJudge = (props) => {
심의전 심의전
</MenuItem> </MenuItem>
<MenuItem key="1" value="1"> <MenuItem key="1" value="1">
수용 미부과
</MenuItem> </MenuItem>
<MenuItem key="2" value="2"> <MenuItem key="2" value="2">
미수용 부과
</MenuItem> </MenuItem>
</Select> </Select>
</FormControl> </FormControl>

@ -44,6 +44,14 @@ const ProcessParkingJudge = (props) => {
}; };
const handleSave = () => { const handleSave = () => {
if (!selectedResult || selectedResult === '0') {
showAlert.show('심의결정[미부과/부과]을 선택해 주세요');
return;
}
if (!reason || reason.trim().length === 0) {
showAlert.show('결정사유는 필수 입력해야 합니다.');
return;
}
saveJudgeResult({ msuCode: curDataRef.current.msuCode, msuResult: selectedResult, msuReason: reason }).then((res) => { saveJudgeResult({ msuCode: curDataRef.current.msuCode, msuResult: selectedResult, msuReason: reason }).then((res) => {
if (res?.success) { if (res?.success) {
curDataRef.current.msuResult = selectedResult; curDataRef.current.msuResult = selectedResult;
@ -149,10 +157,10 @@ const ProcessParkingJudge = (props) => {
심의전 심의전
</MenuItem> </MenuItem>
<MenuItem key="1" value="1"> <MenuItem key="1" value="1">
수용 미부과
</MenuItem> </MenuItem>
<MenuItem key="2" value="2"> <MenuItem key="2" value="2">
미수용 부과
</MenuItem> </MenuItem>
</Select> </Select>
</FormControl> </FormControl>

Loading…
Cancel
Save