|
|
@ -39,7 +39,7 @@ const StyledTableRow = styled(TableRow)(({ theme }) => ({
|
|
|
|
|
|
|
|
|
|
|
|
const totLabel = ['부과', '서손', '미부과', '계'];
|
|
|
|
const totLabel = ['부과', '서손', '미부과', '계'];
|
|
|
|
|
|
|
|
|
|
|
|
const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUserData, selectedRow, judgeTeam }) => {
|
|
|
|
const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUserData, selectedRow, judgeTeam, judgeData }) => {
|
|
|
|
const alert = useAlert();
|
|
|
|
const alert = useAlert();
|
|
|
|
const [judgeResult, setJudgeResult] = useState({
|
|
|
|
const [judgeResult, setJudgeResult] = useState({
|
|
|
|
totJudgeUsers,
|
|
|
|
totJudgeUsers,
|
|
|
@ -47,10 +47,10 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
judgeCars,
|
|
|
|
judgeCars,
|
|
|
|
judgeUserData
|
|
|
|
judgeUserData
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
const [judgeDatas, setJudgeDatas] = useState(judgeData ?? []);
|
|
|
|
const [msuTeam, setMsuTeam] = useState(judgeTeam ?? '001');
|
|
|
|
const [msuTeam, setMsuTeam] = useState(judgeTeam ?? '001');
|
|
|
|
|
|
|
|
|
|
|
|
const onSearch = async () => {
|
|
|
|
const onSearch = async () => {
|
|
|
|
// setAlertOpen(false);
|
|
|
|
|
|
|
|
if (msuTeam) {
|
|
|
|
if (msuTeam) {
|
|
|
|
const params = {
|
|
|
|
const params = {
|
|
|
|
msDatagb: selectedRow.msDatagb ?? '',
|
|
|
|
msDatagb: selectedRow.msDatagb ?? '',
|
|
|
@ -60,8 +60,17 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
msuTeam
|
|
|
|
msuTeam
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const res = await findJudgeResults(params, params.msDatagb === '');
|
|
|
|
const res = await findJudgeResults(params, params.msDatagb === '');
|
|
|
|
|
|
|
|
const arrJudgeData = [];
|
|
|
|
if (res && res?.success) {
|
|
|
|
if (res && res?.success) {
|
|
|
|
|
|
|
|
// eslint-disable-next-line no-plusplus
|
|
|
|
|
|
|
|
for (let idx = 0; idx < res.data.judgeCars.length; idx++) {
|
|
|
|
|
|
|
|
console.log(idx);
|
|
|
|
|
|
|
|
if (res.data.judgeUserData[idx].msResult === '0') {
|
|
|
|
|
|
|
|
arrJudgeData.push({ msMaincode: res.data.judgeUserData[idx].msMaincode, msSeq: res.data.judgeUserData[idx].msSeq });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
setJudgeDatas(arrJudgeData);
|
|
|
|
|
|
|
|
|
|
|
|
setJudgeResult({
|
|
|
|
setJudgeResult({
|
|
|
|
...judgeResult,
|
|
|
|
...judgeResult,
|
|
|
|
totJudgeUsers: res.data?.totJudgeUsers,
|
|
|
|
totJudgeUsers: res.data?.totJudgeUsers,
|
|
|
@ -93,29 +102,41 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Grid container spacing={1} alignItems="center" mb={1}>
|
|
|
|
<Grid container spacing={1} alignItems="center" mb={1}>
|
|
|
|
<Grid item xs={12}>
|
|
|
|
|
|
|
|
<Grid container spacing={1}>
|
|
|
|
<Grid container spacing={1}>
|
|
|
|
<Grid item sm={5}>
|
|
|
|
<Grid item xs={7}>
|
|
|
|
<Typography variant="subtitle1">
|
|
|
|
<Typography variant="subtitle1">
|
|
|
|
심의차수: {selectedRow.msChasu}차 ㅣ 심의기간: {selectedRow.msSdate} ~ {selectedRow.msEdate}
|
|
|
|
심의차수: {selectedRow.msChasu}차 ㅣ 심의기간: {selectedRow.msSdate} ~ {selectedRow.msEdate}
|
|
|
|
</Typography>
|
|
|
|
</Typography>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
<Grid item sm={2}>
|
|
|
|
<Grid item xs={5}>
|
|
|
|
|
|
|
|
<Grid container spacing={0.5} alignItems="center" mb={1}>
|
|
|
|
|
|
|
|
<Grid item xs={6} style={{ marginLeft: 'auto' }}>
|
|
|
|
<FormControl fullWidth>
|
|
|
|
<FormControl fullWidth>
|
|
|
|
<InputLabel required>팀</InputLabel>
|
|
|
|
<InputLabel required>팀</InputLabel>
|
|
|
|
<Select defaultValue={msuTeam} value={msuTeam} onChange={(e) => setMsuTeam(e.target.value)}>
|
|
|
|
<Select defaultValue={msuTeam} value={msuTeam} onChange={(e) => setMsuTeam(e.target.value)}>
|
|
|
|
{combo.teams.map((team) => (
|
|
|
|
{combo.teams.map((team, idx) => (
|
|
|
|
<MenuItem key={team.code} value={team.code}>
|
|
|
|
<MenuItem key={idx} value={team.code}>
|
|
|
|
{team.value}
|
|
|
|
{team.value}
|
|
|
|
</MenuItem>
|
|
|
|
</MenuItem>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
</Select>
|
|
|
|
</Select>
|
|
|
|
</FormControl>
|
|
|
|
</FormControl>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
<Grid item sm={2} sx={{ marginTop: 1 }}>
|
|
|
|
<Grid item xs={6} sx={{ marginTop: 1 }}>
|
|
|
|
<Button variant="contained" color="primary" size="small" startIcon={<IconSearch />} onClick={onSearch}>
|
|
|
|
<Button variant="contained" color="primary" size="small" startIcon={<IconSearch />} onClick={onSearch}>
|
|
|
|
조회
|
|
|
|
조회
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
disabled={judgeDatas.length === 0}
|
|
|
|
|
|
|
|
variant="contained"
|
|
|
|
|
|
|
|
color="primary"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
startIcon={<IconSearch />}
|
|
|
|
|
|
|
|
onClick={onSearch}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
일괄처리
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
@ -134,14 +155,17 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
<StyledTableCell align="center" style={{ width: 130 }}>
|
|
|
|
<StyledTableCell align="center" style={{ width: 130 }}>
|
|
|
|
차량번호
|
|
|
|
차량번호
|
|
|
|
</StyledTableCell>
|
|
|
|
</StyledTableCell>
|
|
|
|
{judgeResult?.totJudgeUsers.map((u) => (
|
|
|
|
{judgeResult?.totJudgeUsers.map((u, idx) => (
|
|
|
|
<StyledTableCell align="center" key={u.NAME} style={{ width: 80 }}>
|
|
|
|
<StyledTableCell align="center" key={idx} style={{ width: 80 }}>
|
|
|
|
{u.NAME}
|
|
|
|
{u.NAME}
|
|
|
|
</StyledTableCell>
|
|
|
|
</StyledTableCell>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
<StyledTableCell align="center" style={{ width: 80 }}>
|
|
|
|
<StyledTableCell align="center" style={{ width: 80 }}>
|
|
|
|
결과
|
|
|
|
결과
|
|
|
|
</StyledTableCell>
|
|
|
|
</StyledTableCell>
|
|
|
|
|
|
|
|
<StyledTableCell align="center" style={{ width: 80 }}>
|
|
|
|
|
|
|
|
처리
|
|
|
|
|
|
|
|
</StyledTableCell>
|
|
|
|
</TableRow>
|
|
|
|
</TableRow>
|
|
|
|
</TableHead>
|
|
|
|
</TableHead>
|
|
|
|
<TableBody>
|
|
|
|
<TableBody>
|
|
|
@ -152,11 +176,12 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
{totLabel[idx]}
|
|
|
|
{totLabel[idx]}
|
|
|
|
</StyledTableCell>
|
|
|
|
</StyledTableCell>
|
|
|
|
<StyledTableCell align="center" style={{ width: 130 }} />
|
|
|
|
<StyledTableCell align="center" style={{ width: 130 }} />
|
|
|
|
{totData.map((data) => (
|
|
|
|
{totData.map((data, totIdx) => (
|
|
|
|
<StyledTableCell align="center" style={{ width: 80 }}>
|
|
|
|
<StyledTableCell key={`${idx}${totIdx}`} align="center" style={{ width: 80 }}>
|
|
|
|
{data}
|
|
|
|
{data}
|
|
|
|
</StyledTableCell>
|
|
|
|
</StyledTableCell>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
|
|
|
|
<StyledTableCell />
|
|
|
|
</StyledTableRow>
|
|
|
|
</StyledTableRow>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
</TableBody>
|
|
|
|
</TableBody>
|
|
|
@ -177,14 +202,17 @@ const ModalJudgeResult = ({ totJudgeUsers, totJudgeUserData, judgeCars, judgeUse
|
|
|
|
|
|
|
|
|
|
|
|
{/* /!* 심사위원별 심사결과 *!/ */}
|
|
|
|
{/* /!* 심사위원별 심사결과 *!/ */}
|
|
|
|
{_.range(carIdx, judgeResult.judgeUserData.length, judgeResult.judgeCars.length).map((userIdx) => (
|
|
|
|
{_.range(carIdx, judgeResult.judgeUserData.length, judgeResult.judgeCars.length).map((userIdx) => (
|
|
|
|
<StyledTableCell align="center" key={carIdx + userIdx} style={{ width: 80 }}>
|
|
|
|
<StyledTableCell align="center" key={userIdx} style={{ width: 80 }}>
|
|
|
|
{judgeResult.judgeUserData[userIdx].msuResult}
|
|
|
|
{judgeResult.judgeUserData[userIdx].msuResult}
|
|
|
|
</StyledTableCell>
|
|
|
|
</StyledTableCell>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
|
|
|
|
|
|
|
|
{/* 최종심사결과 */}
|
|
|
|
{/* 최종심사결과 */}
|
|
|
|
<StyledTableCell align="center" style={{ width: 80 }}>
|
|
|
|
<StyledTableCell align="center" style={{ width: 80 }}>
|
|
|
|
{judgeResult.judgeUserData[carIdx].msResult}
|
|
|
|
{judgeResult.judgeUserData[carIdx].msResultNm}
|
|
|
|
|
|
|
|
</StyledTableCell>
|
|
|
|
|
|
|
|
<StyledTableCell align="center" style={{ width: 80 }}>
|
|
|
|
|
|
|
|
{judgeResult.judgeUserData[carIdx].msResult === '0' ? '처리' : ''}
|
|
|
|
</StyledTableCell>
|
|
|
|
</StyledTableCell>
|
|
|
|
</StyledTableRow>
|
|
|
|
</StyledTableRow>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|