|
|
@ -8,6 +8,7 @@ import { IconSearch } from '@tabler/icons';
|
|
|
|
import Button from '@mui/material/Button';
|
|
|
|
import Button from '@mui/material/Button';
|
|
|
|
import combo from 'commons/combo_data';
|
|
|
|
import combo from 'commons/combo_data';
|
|
|
|
import { useState } from 'react';
|
|
|
|
import { useState } from 'react';
|
|
|
|
|
|
|
|
import { saveJudgeStds, saveJudgeTargets } from '../../../../apis/judge';
|
|
|
|
|
|
|
|
|
|
|
|
const style = {
|
|
|
|
const style = {
|
|
|
|
position: 'relative',
|
|
|
|
position: 'relative',
|
|
|
@ -22,15 +23,31 @@ const style = {
|
|
|
|
p: 3
|
|
|
|
p: 3
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const CmmModal = ({ isBackdrop = false, open, setOpen, title, judgeData = () => {} }) => {
|
|
|
|
const CmmModal = ({ isBackdrop = false, open, setOpen, title, judgeData = () => {}, dataGb, showAlert }) => {
|
|
|
|
const [judgeStd, setJudgeStd] = useState('1');
|
|
|
|
const [judgeStd, setJudgeStd] = useState('1');
|
|
|
|
const handleClose = () => {
|
|
|
|
const handleClose = () => {
|
|
|
|
setOpen(false);
|
|
|
|
setOpen(false);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const handleJudge = () => {
|
|
|
|
const handleJudge = () => {
|
|
|
|
alert(`[${JSON.stringify(judgeData)}]==>>심사기준::${judgeStd}명`);
|
|
|
|
if (window.confirm(`부과판정 ${judgeStd}명 기준으로 ${judgeData.length}건 심사 처리 하시겠습니까?`)) {
|
|
|
|
|
|
|
|
const param = {
|
|
|
|
|
|
|
|
dataGb,
|
|
|
|
|
|
|
|
judgeStdCnt: judgeStd,
|
|
|
|
|
|
|
|
judgeDataKeys: judgeData
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
saveJudgeStds(param).then((res) => {
|
|
|
|
|
|
|
|
if (res?.success) {
|
|
|
|
|
|
|
|
showAlert.show(`${judgeData.length}건 처리되었습니다`);
|
|
|
|
|
|
|
|
setOpen(false);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
showAlert.show(`${res?.data.message}`);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="modalGroup">
|
|
|
|
<div className="modalGroup">
|
|
|
|
{/* <Button onClick={handleOpen}>Grid Modal(List)</Button> */}
|
|
|
|
{/* <Button onClick={handleOpen}>Grid Modal(List)</Button> */}
|
|
|
@ -80,7 +97,9 @@ CmmModal.propTypes = {
|
|
|
|
open: PropTypes.bool,
|
|
|
|
open: PropTypes.bool,
|
|
|
|
title: PropTypes.string,
|
|
|
|
title: PropTypes.string,
|
|
|
|
setOpen: PropTypes.func,
|
|
|
|
setOpen: PropTypes.func,
|
|
|
|
judgeData: PropTypes.array
|
|
|
|
judgeData: PropTypes.array,
|
|
|
|
|
|
|
|
dataGb: PropTypes.string,
|
|
|
|
|
|
|
|
showAlert: PropTypes.object
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default CmmModal;
|
|
|
|
export default CmmModal;
|