|
|
@ -1,4 +1,4 @@
|
|
|
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
|
|
|
|
|
|
|
|
|
import _ from 'lodash';
|
|
|
|
import _ from 'lodash';
|
|
|
|
import format from 'date-fns/format';
|
|
|
|
import format from 'date-fns/format';
|
|
|
@ -6,7 +6,7 @@ import getYear from 'date-fns/getYear';
|
|
|
|
|
|
|
|
|
|
|
|
// material-ui
|
|
|
|
// material-ui
|
|
|
|
import { GridActionsCellItem } from '@mui/x-data-grid';
|
|
|
|
import { GridActionsCellItem } from '@mui/x-data-grid';
|
|
|
|
import { Divider, Grid, InputAdornment, MenuItem, OutlinedInput, Select } from '@mui/material';
|
|
|
|
import { Divider, Grid, InputAdornment, Link, MenuItem, OutlinedInput, Select } from '@mui/material';
|
|
|
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
|
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
|
|
import MuiTooltip from '@mui/material/Tooltip';
|
|
|
|
import MuiTooltip from '@mui/material/Tooltip';
|
|
|
|
|
|
|
|
|
|
|
@ -23,6 +23,8 @@ import { useTheme } from '@mui/material/styles';
|
|
|
|
import xitCmm from 'commons/XitCmm';
|
|
|
|
import xitCmm from 'commons/XitCmm';
|
|
|
|
|
|
|
|
|
|
|
|
const ParkingReview = () => {
|
|
|
|
const ParkingReview = () => {
|
|
|
|
|
|
|
|
const isInit = useRef(true);
|
|
|
|
|
|
|
|
|
|
|
|
const theme = useTheme();
|
|
|
|
const theme = useTheme();
|
|
|
|
const year = getYear(new Date());
|
|
|
|
const year = getYear(new Date());
|
|
|
|
console.log(typeof year);
|
|
|
|
console.log(typeof year);
|
|
|
@ -76,7 +78,12 @@ const ParkingReview = () => {
|
|
|
|
field: 'msDate',
|
|
|
|
field: 'msDate',
|
|
|
|
minWidth: 180,
|
|
|
|
minWidth: 180,
|
|
|
|
description: 'dddddd',
|
|
|
|
description: 'dddddd',
|
|
|
|
valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}`
|
|
|
|
valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}`,
|
|
|
|
|
|
|
|
renderCell: (params) => (
|
|
|
|
|
|
|
|
<Link underline="hover" href="/board" target="_blank">
|
|
|
|
|
|
|
|
{params.value}
|
|
|
|
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
headerName: '심사마감일시',
|
|
|
|
headerName: '심사마감일시',
|
|
|
@ -96,19 +103,12 @@ const ParkingReview = () => {
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
const search = () => {
|
|
|
|
const search = () => {
|
|
|
|
let params = {
|
|
|
|
const params = {
|
|
|
|
page: rowsState.page,
|
|
|
|
page: rowsState.page,
|
|
|
|
size: rowsState.pageSize
|
|
|
|
size: rowsState.pageSize
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (searchTxt) {
|
|
|
|
|
|
|
|
params = {
|
|
|
|
|
|
|
|
...params,
|
|
|
|
|
|
|
|
msYear: selectedYear,
|
|
|
|
|
|
|
|
msChasu: searchTxt
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
opstBizService.getSimsa680GroupList(params).then((response) => {
|
|
|
|
opstBizService.getSimsa680GroupList({ ...params, msYear: selectedYear, msChasu: searchTxt }).then((response) => {
|
|
|
|
console.log(response);
|
|
|
|
console.log(response);
|
|
|
|
if (response && response.data) {
|
|
|
|
if (response && response.data) {
|
|
|
|
setTotalCount(response.count);
|
|
|
|
setTotalCount(response.count);
|
|
|
@ -121,12 +121,20 @@ const ParkingReview = () => {
|
|
|
|
if (!selectedYear) return;
|
|
|
|
if (!selectedYear) return;
|
|
|
|
|
|
|
|
|
|
|
|
if (event.type === 'keydown' && event.key === 'Enter') {
|
|
|
|
if (event.type === 'keydown' && event.key === 'Enter') {
|
|
|
|
const newString = event?.target.value || selectedYear;
|
|
|
|
const newString = event?.target.value;
|
|
|
|
setSearchTxt(newString);
|
|
|
|
setSearchTxt(newString);
|
|
|
|
search();
|
|
|
|
search();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
|
|
|
if (isInit.current) {
|
|
|
|
|
|
|
|
isInit.current = false;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
search();
|
|
|
|
|
|
|
|
}, [rowsState.page, rowsState.pageSize, selectedYear, searchTxt]);
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<MainCard>
|
|
|
|
<MainCard>
|
|
|
|
<Grid container spacing={2} alignItems="center">
|
|
|
|
<Grid container spacing={2} alignItems="center">
|
|
|
|