|
|
|
@ -21,69 +21,89 @@ import MuiTooltip from '@mui/material/Tooltip';
|
|
|
|
|
|
|
|
|
|
// assets
|
|
|
|
|
import { IconSearch } from '@tabler/icons';
|
|
|
|
|
import PersonAddTwoToneIcon from '@mui/icons-material/PersonAddTwoTone';
|
|
|
|
|
|
|
|
|
|
// berry ui
|
|
|
|
|
import MainCard from 'ui-component/cards/MainCard';
|
|
|
|
|
|
|
|
|
|
// project imports
|
|
|
|
|
import MuiGridList from 'views/form/MuiGridList';
|
|
|
|
|
import MuiGridPagination from 'views/form/MuiGridPagination';
|
|
|
|
|
import { useTheme } from '@mui/material/styles';
|
|
|
|
|
import AnimateButton from '../../../ui-component/extended/AnimateButton';
|
|
|
|
|
import InputLabel from '../../../ui-component/extended/Form/InputLabel';
|
|
|
|
|
import opstBizService from '../../../apis/OpstBizService';
|
|
|
|
|
|
|
|
|
|
import xitCmm from '../../../commons/XitCmm';
|
|
|
|
|
|
|
|
|
|
const ParkingRegister = () => {
|
|
|
|
|
const theme = useTheme();
|
|
|
|
|
|
|
|
|
|
const [category, setCategory] = useState('N');
|
|
|
|
|
const [searchTxt, setSearchTxt] = useState('');
|
|
|
|
|
|
|
|
|
|
const [rcIrTransfer, setRcIrTransfer] = useState('1');
|
|
|
|
|
const [rcSeq1, setRcSeq1] = useState('2022200801');
|
|
|
|
|
const [rcSeq2, setRcSeq2] = useState('2022200899');
|
|
|
|
|
const [selection, setSelection] = useState([]);
|
|
|
|
|
const [totalCount, setTotalCount] = useState(0);
|
|
|
|
|
const [rowsState, setRowsState] = useState({
|
|
|
|
|
const [rowsStatus, setRowsStatus] = useState({
|
|
|
|
|
page: 0,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
pageSize: 100,
|
|
|
|
|
rows: []
|
|
|
|
|
// loading: false
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const [spacing, setSpacing] = useState(2);
|
|
|
|
|
|
|
|
|
|
const columns = [
|
|
|
|
|
{ headerName: '심의차수', field: 'ciCode' },
|
|
|
|
|
{ headerName: '심사건수', field: 'ciContentno' },
|
|
|
|
|
{ headerName: '심사기간', field: 'ciTitle', editable: true },
|
|
|
|
|
{ headerName: '심사마감일시', field: 'ciId' },
|
|
|
|
|
{ headerName: '상태', field: 'ciPwd' },
|
|
|
|
|
{
|
|
|
|
|
headerName: '삭제하기',
|
|
|
|
|
field: 'ciEmail',
|
|
|
|
|
renderCell: (params) => (
|
|
|
|
|
<>
|
|
|
|
|
{params.value}
|
|
|
|
|
<Button
|
|
|
|
|
variant="contained"
|
|
|
|
|
color="primary"
|
|
|
|
|
size="small"
|
|
|
|
|
sx={{ background: theme.palette.error.main, '&:hover': { background: theme.palette.error.dark } }}
|
|
|
|
|
>
|
|
|
|
|
삭제
|
|
|
|
|
</Button>
|
|
|
|
|
</>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
{ headerName: 'No', headerAlign: 'center', field: 'rowId', align: 'center', width: 70 },
|
|
|
|
|
{ headerName: '접수번호', headerAlign: 'center', field: 'rcSeq', align: 'center' },
|
|
|
|
|
{ headerName: '최초차량번호', headerAlign: 'center', field: 'mmOcarno', align: 'center', minWidth: 110 },
|
|
|
|
|
{ headerName: '최종차량번호', headerAlign: 'center', field: 'mmNcarno', align: 'center', minWidth: 110 },
|
|
|
|
|
{ headerName: '성명', headerAlign: 'center', field: 'rcName', minWidth: 150 },
|
|
|
|
|
{ headerName: '진술유형', headerAlign: 'center', field: 'rcContDocStr', minWidth: 130 },
|
|
|
|
|
{ headerName: '접수일자', headerAlign: 'center', field: 'rcDate', align: 'center' },
|
|
|
|
|
{ headerName: '접수방법', headerAlign: 'center', field: 'rcIngbStr', align: 'center' }
|
|
|
|
|
];
|
|
|
|
|
const handleSearch = async (event) => {};
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
const search = () => {
|
|
|
|
|
const params = {
|
|
|
|
|
page: rowsState.page,
|
|
|
|
|
size: rowsState.pageSize
|
|
|
|
|
rcIrTransfer,
|
|
|
|
|
rcSeq1,
|
|
|
|
|
rcSeq2
|
|
|
|
|
};
|
|
|
|
|
}, [rowsState.page, rowsState.pageSize]); // rowsState.page, rowsState.pageSize, rowsState.rows]);
|
|
|
|
|
|
|
|
|
|
opstBizService.getSimsaTargetList(params).then((response) => {
|
|
|
|
|
if (response && response.data) {
|
|
|
|
|
setTotalCount(response.count);
|
|
|
|
|
setRowsStatus((prevRows) => ({ ...prevRows, rows: response.data }));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleSave = () => {
|
|
|
|
|
if (selection.length === 0) {
|
|
|
|
|
xitCmm.alertParam(`처리할 데이타가 없습니다`);
|
|
|
|
|
} else {
|
|
|
|
|
const selectRows = selection.map((d) => rowsStatus.rows[d - 1].rcSeq);
|
|
|
|
|
|
|
|
|
|
alert(`저장할 데이타 => ${selectRows}`);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleSearch = (event) => {
|
|
|
|
|
if (rcSeq1 && rcSeq2) {
|
|
|
|
|
search();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleOnKeyDown = (event) => {
|
|
|
|
|
if (event.type === 'keydown' && event.key === 'Enter' && rcSeq1 && rcSeq2) {
|
|
|
|
|
search();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleSelection = (newSelection) => {
|
|
|
|
|
setSelection(newSelection);
|
|
|
|
|
// alert(newSelection.selectionModel);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<MainCard>
|
|
|
|
|
<Grid container spacing={2} alignItems="center">
|
|
|
|
|
<Grid item xs={12} lg={6}>
|
|
|
|
|
<Grid item xs={12}>
|
|
|
|
|
<Grid container spacing={1}>
|
|
|
|
|
<Grid item>
|
|
|
|
|
<FormControl component="fieldset">
|
|
|
|
@ -94,26 +114,46 @@ const ParkingRegister = () => {
|
|
|
|
|
row
|
|
|
|
|
aria-label="category"
|
|
|
|
|
name="row-radio-buttons-group"
|
|
|
|
|
value={category}
|
|
|
|
|
onChange={(e) => setCategory(e.target.value)}
|
|
|
|
|
value={rcIrTransfer}
|
|
|
|
|
onChange={(e) => setRcIrTransfer(e.target.value)}
|
|
|
|
|
>
|
|
|
|
|
<FormControlLabel value="N" control={<Radio />} label="미등록" />
|
|
|
|
|
<FormControlLabel value="Y" control={<Radio />} label="등록" />
|
|
|
|
|
<FormControlLabel value="1" control={<Radio />} label="미등록" />
|
|
|
|
|
<FormControlLabel value="2" control={<Radio />} label="등록" />
|
|
|
|
|
</RadioGroup>
|
|
|
|
|
</FormControl>
|
|
|
|
|
</Grid>
|
|
|
|
|
<Grid item>
|
|
|
|
|
<OutlinedInput placeholder="접수번호" onKeyDown={handleSearch} size="small" autoFocus />
|
|
|
|
|
<OutlinedInput
|
|
|
|
|
required
|
|
|
|
|
value={rcSeq1}
|
|
|
|
|
onChange={(e) => setRcSeq1(e.target.value)}
|
|
|
|
|
placeholder="접수번호(10자리)-strat"
|
|
|
|
|
onKeyDown={handleOnKeyDown}
|
|
|
|
|
size="small"
|
|
|
|
|
autoFocus
|
|
|
|
|
inputProps={{ maxLength: 10 }}
|
|
|
|
|
/>
|
|
|
|
|
-
|
|
|
|
|
<OutlinedInput placeholder="접수번호" onKeyDown={handleSearch} size="small" />
|
|
|
|
|
<OutlinedInput
|
|
|
|
|
required
|
|
|
|
|
value={rcSeq2}
|
|
|
|
|
onChange={(e) => setRcSeq2(e.target.value)}
|
|
|
|
|
placeholder="접수번호(10자리)-end"
|
|
|
|
|
onKeyDown={handleOnKeyDown}
|
|
|
|
|
size="small"
|
|
|
|
|
inputProps={{ maxLength: 10 }}
|
|
|
|
|
/>
|
|
|
|
|
{/* <TextField fullWidth label="Last Name" defaultValue="Schorl" /> */}
|
|
|
|
|
</Grid>
|
|
|
|
|
<Grid item>
|
|
|
|
|
<AnimateButton>
|
|
|
|
|
<Button variant="contained" color="primary" size="small" onClick={handleSearch}>
|
|
|
|
|
검색
|
|
|
|
|
</Button>
|
|
|
|
|
</AnimateButton>
|
|
|
|
|
<Button variant="contained" color="primary" size="small" startIcon={<IconSearch />} onClick={handleSearch}>
|
|
|
|
|
검색
|
|
|
|
|
</Button>
|
|
|
|
|
</Grid>
|
|
|
|
|
<Grid item>
|
|
|
|
|
<Button variant="contained" color="primary" size="small" startIcon={<PersonAddTwoToneIcon />} onClick={handleSave}>
|
|
|
|
|
저장
|
|
|
|
|
</Button>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
@ -124,7 +164,15 @@ const ParkingRegister = () => {
|
|
|
|
|
<Grid item xs={12}>
|
|
|
|
|
<Divider />
|
|
|
|
|
</Grid>
|
|
|
|
|
<MuiGridList columns={columns} rowsState={rowsState} totalCount={totalCount} setRowsState={setRowsState} />
|
|
|
|
|
<MuiGridPagination
|
|
|
|
|
isCheckbox
|
|
|
|
|
isHidePagination
|
|
|
|
|
columns={columns}
|
|
|
|
|
rowsState={rowsStatus}
|
|
|
|
|
totalCount={totalCount}
|
|
|
|
|
setRowsStatus={setRowsStatus}
|
|
|
|
|
handleSelection={handleSelection}
|
|
|
|
|
/>
|
|
|
|
|
</MainCard>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|