diff --git a/src/apis/disabled.js b/src/apis/disabled.js
new file mode 100644
index 0000000..da0c818
--- /dev/null
+++ b/src/apis/disabled.js
@@ -0,0 +1,43 @@
+//----------------------------------------------------------------------------
+// Parking : 주정차의견진술관리
+//----------------------------------------------------------------------------
+
+import axios from 'utils/axios';
+import { GET_DISABLED, GET_DISABLED_DATA_LIST, GET_DISABLED_LIST, SAVE_DISABLED_DATA } from 'commons/ApiUrl';
+import { setRowId } from './common';
+
+// eslint-disable-next-line no-return-await
+export async function findDisabledDatas(params) {
+ const res = await axios.get(GET_DISABLED_DATA_LIST, { params });
+ if (res.success) {
+ res.data = res.data.map((d, idx) => ({ ...d, rowId: setRowId(params, idx) }));
+ return res;
+ }
+ return res;
+}
+
+export async function saveDisabledData(formData) {
+ // eslint-disable-next-line no-return-await
+ return await axios(SAVE_DISABLED_DATA, {
+ method: 'post',
+ data: formData,
+ headers: { 'Content-Type': 'multipart/form-data' } // , Authorization: localStorage.getItem('access_token') }
+ });
+}
+
+export async function findDisabled(scCode) {
+ const res = await axios.get(GET_DISABLED + scCode);
+ if (res.success) {
+ return res;
+ }
+ return res;
+}
+
+export async function findDisableds(params) {
+ const res = await axios.get(GET_DISABLED_LIST, { params });
+ if (res.success) {
+ res.data = res.data.map((d, idx) => ({ ...d, rowId: setRowId(params, idx) }));
+ return res;
+ }
+ return res;
+}
diff --git a/src/commons/ApiUrl.js b/src/commons/ApiUrl.js
index b84f98e..6bf0ec9 100644
--- a/src/commons/ApiUrl.js
+++ b/src/commons/ApiUrl.js
@@ -28,6 +28,12 @@ export const GET_RESIDENT_LIST = '/api/v1/ctgy/resident';
export const GET_RESIDENT_JUDGE_TARGET_LIST = '/api/v1/ctgy/resident/target';
export const SAVE_RESIDENT_JUDGE_TARGET_LIST = '/api/v1/ctgy/resident/target';
+// 장애인 의견 진술
+export const GET_DISABLED_DATA_LIST = '/api/v1/ctgy/resident/data';
+export const SAVE_DISABLED_DATA = '/api/v1/ctgy/resident/data';
+export const GET_DISABLED = '/api/v1/ctgy/resident/';
+export const GET_DISABLED_LIST = '/api/v1/ctgy/resident';
+
// 사용자 관리
export const GET_USER_BOARD_LIST = '/api/v1/ctgy/pboard/';
export const SAVE_USER_BOARD = '/api/v1/ctgy/file/pboard';
diff --git a/src/routes/MainRoutes.js b/src/routes/MainRoutes.js
index a7f477a..37045a6 100755
--- a/src/routes/MainRoutes.js
+++ b/src/routes/MainRoutes.js
@@ -24,6 +24,11 @@ const ResidentDataReview = Loadable(lazy(() => import('views/biz/resident/Reside
const ResidentRegister = Loadable(lazy(() => import('views/biz/resident/ResidentRegist')));
const ResidentReview = Loadable(lazy(() => import('views/biz/resident/ResidentReview')));
+// disabled
+const DisabledDataReview = Loadable(lazy(() => import('views/biz/disabled/DisabledDataReview')));
+const DisabledRegister = Loadable(lazy(() => import('views/biz/disabled/DisabledRegist')));
+const DisabledReview = Loadable(lazy(() => import('views/biz/disabled/DisabledReview')));
+
// user
const UserManager = Loadable(lazy(() => import('views/biz/user/UserManager')));
const Juror = Loadable(lazy(() => import('views/biz/user/Juror')));
@@ -80,15 +85,15 @@ const MainRoutes = {
/* 장애인 */
{
path: '/disabled/data',
- element:
+ element:
},
{
path: '/disabled/review',
- element:
+ element:
},
{
path: '/disabled/register',
- element:
+ element:
},
/* 사용자 */
{
diff --git a/src/views/biz/disabled/DisabledDataReview.jsx b/src/views/biz/disabled/DisabledDataReview.jsx
new file mode 100644
index 0000000..a2e75b8
--- /dev/null
+++ b/src/views/biz/disabled/DisabledDataReview.jsx
@@ -0,0 +1,131 @@
+import { useCallback, useEffect, useState } from 'react';
+
+import { Button, Divider, Grid, Link } from '@mui/material';
+
+// berry ui
+import MainCard from 'ui-component/cards/MainCard';
+
+// project imports
+import MuiDataGrid from 'views/form/MuiDataGrid';
+import CmmModal from 'views/form/Modal/CmmModal';
+import { findDisabled, findDisabledDatas, saveDisabledData } from 'apis/disabled';
+import NewDisabledDataForm from './NewDisabledDataForm';
+import ModifyDisabledDataForm from './ModifyDisabledDataForm';
+
+const DisabledDataReview = () => {
+ const [open, setOpen] = useState(false);
+ const [create, setCreate] = useState(false);
+ // const [selectedRow, setSelectedRow] = useState({});
+ const [title, setTitle] = useState();
+ const [rowData, setRowData] = useState({});
+
+ const [totalCount, setTotalCount] = useState(0);
+ const [rowsState, setRowsState] = useState({
+ page: 0,
+ pageSize: 20,
+ rows: []
+ // loading: false
+ });
+
+ const columns = [
+ { headerName: 'No.', headerAlign: 'center', field: 'rowId', align: 'center', width: 70 },
+ { headerName: '심사코드?', field: 'scCode', hide: true },
+ {
+ headerName: '접수번호',
+ headerAlign: 'center',
+ field: 'scSeq',
+ renderCell: (params) => (
+
+ {params.value}
+
+ )
+ },
+ { headerName: '동명', headerAlign: 'center', field: 'scDong' },
+ { headerName: '차량번호', headerAlign: 'center', field: 'scCarnum' },
+ { headerName: '성명', headerAlign: 'center', field: 'scName' },
+ { headerName: '진술유형', headerAlign: 'center', field: 'scContDocNm' },
+ {
+ headerName: '접수일자',
+ headerAlign: 'center',
+ field: 'scCdate'
+ // type: 'date',
+ // valueGetter: ({ value }) => value && new Date(value)
+ },
+ { headerName: '접수방법', headerAlign: 'center', field: 'scIngbNm' }
+ ];
+
+ const search = useCallback(() => {
+ const params = {
+ page: rowsState.page,
+ size: rowsState.pageSize
+ };
+
+ findDisabledDatas(params).then((response) => {
+ console.log(response);
+ if (response && response.data) {
+ setTotalCount(response.count);
+ setRowsState((prevState) => ({ ...prevState, rows: response.data }));
+ // apiRef.current.forceUpdate(); // .updateRowData([]);
+ // apiRef.current.updateRowData([]);
+ }
+ });
+ }, [rowsState.page, rowsState.pageSize]);
+
+ useEffect(() => {
+ search();
+ }, [search]); // search, rowsState.page, rowsState.pageSize]);
+
+ const handleCreate = () => {
+ setTitle('장애인 의견진술 자료 신규 등록');
+ setCreate(true);
+ setOpen(true);
+ };
+
+ const handleOnCellClick = (e) => {
+ if (e?.field === 'scSeq') {
+ findDisabled(e.row?.scCode).then((res) => {
+ setRowData(res.data);
+ setCreate(false);
+ setTitle('장애인 의견진술 자료 변경');
+ setOpen(true);
+ });
+ }
+ };
+
+ const handleSaveResident = (payload) => {
+ saveDisabledData(payload).then(() => {
+ search();
+ setOpen(false);
+ });
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {create && }
+ {!create && }
+
+
+ );
+};
+export default DisabledDataReview;
diff --git a/src/views/biz/disabled/DisabledRegist.jsx b/src/views/biz/disabled/DisabledRegist.jsx
new file mode 100644
index 0000000..89acb47
--- /dev/null
+++ b/src/views/biz/disabled/DisabledRegist.jsx
@@ -0,0 +1,208 @@
+import { useState } from 'react';
+
+// material-ui
+import { Button, Divider, FormControl, FormControlLabel, FormLabel, Grid, Radio, RadioGroup, TextField } from '@mui/material';
+
+// 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 MuiDataGrid from 'views/form/MuiDataGrid';
+
+import xitCmm from 'commons/XitCmm';
+import CmmModal from 'views/form/Modal/CmmModal';
+import SaveDisabledTargetForm from './SaveDisabledTargetForm';
+import NumberFormat from 'react-number-format';
+import ExcelDownload from 'views/form/ExcelDownload';
+import { findParkingJudgeTargets, saveParkingJudgeTargets } from 'apis/parking';
+
+const DisabledRegister = () => {
+ const [rcIrTransfer, setRcIrTransfer] = useState('1');
+ const [rcSeq1, setRcSeq1] = useState('2022200801');
+ const [rcSeq2, setRcSeq2] = useState('2022200899');
+ const [selectionModel, setSelectionModel] = useState([]);
+ const [totalCount, setTotalCount] = useState(0);
+ const [rowsStatus, setRowsStatus] = useState({
+ page: 0,
+ pageSize: 100,
+ rows: []
+ });
+ const [open, setOpen] = useState(false);
+
+ const columns = [
+ { 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: 'rcContDocNm', minWidth: 130 },
+ {
+ headerName: '접수일자',
+ headerAlign: 'center',
+ field: 'rcDate',
+ align: 'center',
+ format: '####-##-##'
+ // valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}`
+ },
+ { headerName: '접수방법', headerAlign: 'center', field: 'rcIngbNm', align: 'center' }
+ ];
+
+ const search = () => {
+ const params = {
+ rcIrTransfer,
+ rcSeq1,
+ rcSeq2
+ };
+
+ findParkingJudgeTargets(params).then((response) => {
+ if (response && response.data) {
+ setSelectionModel([]);
+ setTotalCount(response.count);
+ setRowsStatus((prevRows) => ({ ...prevRows, rows: response.data }));
+ }
+ });
+ };
+
+ const handleSave = () => {
+ if (selectionModel.length === 0) {
+ xitCmm.alertParam(`처리할 데이타가 없습니다`);
+ } else {
+ setOpen(true);
+ // alert(`저장할 데이타 => ${selectRows}`);
+ }
+ };
+
+ const submitDisabledTargets = (params) => {
+ const param = {
+ ...params,
+ rcIrTransfer,
+ rcSeq1,
+ rcSeq2,
+ rcCodes: selectionModel.map((d) => rowsStatus.rows[d - 1].rcCode)
+ };
+ setOpen(false);
+ // return false;
+
+ saveParkingJudgeTargets(param).then(() => {
+ setSelectionModel([]);
+ search();
+ });
+ };
+
+ const handleSearch = () => {
+ if (rcSeq1 && rcSeq2) {
+ search();
+ }
+ };
+
+ const handleOnKeyDown = (event) => {
+ if (event.type === 'keydown' && event.key === 'Enter' && rcSeq1 && rcSeq2) {
+ search();
+ }
+ };
+
+ const handleSelection = (newSelection) => {
+ setSelectionModel(newSelection);
+ };
+
+ return (
+
+
+
+
+
+
+
+ 자료등록여부
+
+ setRcIrTransfer(e.target.value)}
+ >
+ } label="미등록" />
+ } label="등록" />
+
+
+
+
+ setRcSeq1(e.target.value.replace(/-/g, ''))}
+ placeholder="yyyy-MM-9999"
+ onKeyDown={handleOnKeyDown}
+ label="접수번호(시작)"
+ format="####-######"
+ />
+ -
+ setRcSeq2(e.target.value.replace(/-/g, ''))}
+ placeholder="yyyy-MM-9999"
+ onKeyDown={handleOnKeyDown}
+ label="접수번호(종료)"
+ format="####-######"
+ />
+
+
+ } onClick={handleSearch}>
+ 검색
+
+
+
+ }
+ onClick={handleSave}
+ >
+ 저장
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+export default DisabledRegister;
diff --git a/src/views/biz/disabled/DisabledReview.jsx b/src/views/biz/disabled/DisabledReview.jsx
new file mode 100644
index 0000000..1090be1
--- /dev/null
+++ b/src/views/biz/disabled/DisabledReview.jsx
@@ -0,0 +1,198 @@
+import { useCallback, useEffect, useRef, useState } from 'react';
+
+import _ from 'lodash';
+import getYear from 'date-fns/getYear';
+
+// material-ui
+import { GridActionsCellItem } from '@mui/x-data-grid';
+import { Divider, FormControl, Grid, InputAdornment, Link, MenuItem, OutlinedInput, Select } from '@mui/material';
+import DeleteIcon from '@mui/icons-material/Delete';
+import { IconSearch } from '@tabler/icons';
+
+// berry ui
+import MainCard from 'ui-component/cards/MainCard';
+
+// project imports
+import MuiDataGrid from 'views/form/MuiDataGrid';
+import xitCmm from 'commons/XitCmm';
+import InputLabel from 'ui-component/extended/Form/InputLabel';
+import { findDisableds } from 'apis/disabled';
+
+const DisabledReview = () => {
+ const isInit = useRef(true);
+ const year = getYear(new Date());
+ console.log(typeof year);
+ const years = _.range(year, year - 14, -1);
+
+ const [selectedYear, setSelectedYear] = useState(year);
+ const [searchTxt, setSearchTxt] = useState('');
+
+ const [totalCount, setTotalCount] = useState(0);
+ const [rowsState, setRowsState] = useState({
+ page: 0,
+ pageSize: 20,
+ rows: []
+ // loading: false
+ });
+ const removeSimsa = useCallback(
+ (row) => () => {
+ // setTimeout(() => {
+ // setRowsState((prevRows) => prevRows.filter((row) => row.rowId !== rowId));
+ // });
+ xitCmm.alertParam(`삭제대상
${JSON.stringify(row)}`);
+ console.log(row);
+ },
+ []
+ );
+
+ const openModalDetails = () => {};
+
+ /*
+ ms_maincode : '민원코드'
+ ms_seq : '접수번호'
+ ms_carnum : '차량번호'
+ ms_year : '년도'
+ ms_chasu : '차수'
+ ms_sdate : '심사시작일시'
+ ms_startsi : '심사시작시간'
+ ms_edate : '심사종료일시'
+ ms_cdate : '심사마감일시'
+ ms_closesi : '심사마감시간'
+ ms_wdate : '단속일자'
+ ms_pos : '단속장소'
+ ms_result : '결과코드'
+ ms_jbtime : '단속시간'
+ */
+ const columns = [
+ // { headerName: 'rowId', field: 'rowId' },
+ { headerName: '심의차수', headerAlign: 'center', field: 'msChasu' },
+ { headerName: '심사건수', headerAlign: 'center', field: 'cnt' },
+ {
+ headerName: '심사기간',
+ headerAlign: 'center',
+ field: 'msDate',
+ minWidth: 180,
+ description: '심사기간',
+ valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}`,
+ renderCell: (params) => (
+ //
+ navigate(`/parking/details?msChasu=${params.msChasu}&msSdate=${params.msSdate}&msEdate=${params.msEdate}`)}
+ onClick={openModalDetails}
+ data-target="modalDetails"
+ rel="noopener"
+ >
+ {/* }> */}
+ {/* }> */}
+ {params.value}
+
+ //
+ )
+ },
+ {
+ headerName: '심사마감일시',
+ headerAlign: 'center',
+ field: 'msCdate',
+ type: 'dateTime',
+ minWidth: 125,
+ valueGetter: (params) => `${params.row.msCdate} ${params.row.msClosesi}`
+ },
+ { headerName: '상태', field: 'msResult', renderCell: (params) => <>{params.row.msResult === '1' ? '진행중' : '심사완료'}> },
+ {
+ headerName: '삭제',
+ headerAlign: 'center',
+ field: 'actions',
+ type: 'actions',
+ width: 80,
+ getActions: (params) => [} label="Delete" onClick={removeSimsa(params.row)} />]
+ }
+ ];
+
+ const search = useCallback(() => {
+ const params = {
+ page: rowsState.page,
+ size: rowsState.pageSize
+ };
+
+ findDisableds({ ...params, msYear: selectedYear, msChasu: searchTxt }).then((response) => {
+ if (response && response.data) {
+ setTotalCount(response.count);
+ setRowsState((prevState) => ({ ...prevState, rows: response.data }));
+ // apiRef.current.forceUpdate(); // .updateRowData([]);
+ // apiRef.current.updateRowData([]);
+ }
+ });
+ }, [rowsState.page, rowsState.pageSize, selectedYear, searchTxt]);
+
+ const handleSearch = async (event) => {
+ if (!selectedYear) return;
+
+ if (event.type === 'keydown' && event.key === 'Enter') {
+ const newString = event?.target.value;
+ setSearchTxt(newString);
+ search();
+ }
+ };
+
+ useEffect(() => {
+ if (isInit.current) {
+ isInit.current = false;
+ return;
+ }
+ search();
+ // }, [rowsState.page, rowsState.pageSize, selectedYear, searchTxt]);
+ }, [search]);
+
+ return (
+
+
+
+
+
+
+ 심의 년도
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+export default DisabledReview;
diff --git a/src/views/biz/disabled/ModifyDisabledDataForm.jsx b/src/views/biz/disabled/ModifyDisabledDataForm.jsx
new file mode 100644
index 0000000..bd98b51
--- /dev/null
+++ b/src/views/biz/disabled/ModifyDisabledDataForm.jsx
@@ -0,0 +1,454 @@
+import { useEffect, useState } from 'react';
+
+import PropTypes from 'prop-types';
+import NumberFormat from 'react-number-format';
+import { useAlert } from 'react-alert';
+// import format from 'date-fns/format';
+
+import { Grid, TextField, MenuItem, Select, FormControl, InputLabel, InputAdornment } from '@mui/material';
+import Button from '@mui/material/Button';
+import { IconSearch } from '@tabler/icons';
+
+import { getComboCodeList } from 'apis/common';
+import FileInputForms from 'views/form/FileInputForms';
+
+// const toDate = new Date();
+
+const ModifyDisabledDataForm = ({ rowData, handleModalSave }) => {
+ const alert = useAlert();
+
+ const [scCarnum, setScCarnum] = useState(rowData.scCarnum);
+ const [scName, setScName] = useState(rowData.scName);
+ const [scDong, setScDong] = useState(rowData.scDong);
+ const [scContDoc, setScContDoc] = useState();
+ const [selectedContDoc, setSelectedContDoc] = useState(rowData.scContDoc);
+ const [scIngb, setScIngb] = useState();
+ const [selectedIngb, setSelectedIngb] = useState(rowData.scIngb);
+ const [zippost1, setZippost1] = useState(`${rowData.zippost1}${rowData.zippost2}`);
+ const [scJuso, setScJuso] = useState(rowData.scJuso);
+ const [scBunji, setScBunji] = useState(rowData.scBunji);
+ const [scWdate, setScWdate] = useState(rowData.scWdate);
+ const [scCdate, setScCdate] = useState(rowData.scCdate);
+ const [scJbtime, setScJbtime] = useState(rowData.scJbtime);
+ const [scPos, setScPos] = useState('');
+
+ const [picads, setPicads] = useState({});
+ const [frecads, setFrecads] = useState({});
+ const [contads, setContads] = useState({});
+
+ const onSave = () => {
+ // TODO : validation check 추가
+ const formData = new FormData();
+ formData.append('scCarnum', scCarnum);
+ formData.append('scName', scName);
+ formData.append('scDong', scDong);
+ formData.append('scContDoc', selectedContDoc);
+ formData.append('scCdate', scCdate);
+ formData.append('scIngb', selectedIngb);
+ formData.append('scWdate', scWdate);
+ formData.append('scJbtime', scJbtime);
+ formData.append('scPos', scPos);
+ formData.append('zippost1', zippost1);
+ formData.append('scJuso', scJuso);
+ formData.append('scBunji', scBunji);
+
+ Object.values(picads).forEach((v) => {
+ formData.append('picadFiles', v);
+ });
+
+ Object.values(frecads).forEach((v) => {
+ formData.append('frecadFiles', v);
+ });
+
+ Object.values(contads).forEach((v) => {
+ formData.append('contadFiles', v);
+ });
+
+ handleModalSave(formData);
+ };
+
+ useEffect(() => {
+ // setSelectedContDoc('11');
+ setScContDoc([]);
+ getComboCodeList({ codeMcd: 'SC_CONT_DOC' }).then((res) => {
+ console.log(res);
+ setScContDoc(res.data);
+ });
+ getComboCodeList({ codeMcd: 'RC_INGB' }).then((res) => {
+ console.log(res);
+ setScIngb(res.data);
+ });
+ }, []);
+
+ const handleChangeFile = (e) => {
+ const fileKey = e.target.name;
+ const fileArrKey = fileKey + e.target.dataset.index;
+
+ if (fileKey === 'scPicad') {
+ setPicads((picads) => {
+ const updated = { ...picads };
+ updated[fileArrKey] = e.target.files[0];
+ return updated;
+ });
+ } else if (fileKey === 'scFrecad') {
+ setFrecads((frecads) => {
+ const updated = { ...frecads };
+ updated[fileArrKey] = e.target.files[0];
+ return updated;
+ });
+ } else if (fileKey === 'scContad') {
+ setContads((contads) => {
+ const updated = { ...contads };
+ updated[fileArrKey] = e.target.files[0];
+ return updated;
+ });
+ }
+ };
+
+ return (
+ <>
+
+
+
+ setScCarnum(e?.target?.value)}
+ autoFocus
+ />
+
+
+ setScName(e?.target?.value)} />
+
+
+ setScDong(e?.target?.value)} />
+
+
+
+ 진술유형
+
+
+
+
+
+
+ setScCdate(e?.target?.value)}
+ />
+
+
+
+ 접수방법
+
+
+
+
+ setScWdate(e?.target?.value)}
+ />
+
+
+ setScJbtime(e?.target?.value)}
+ />
+
+
+
+
+ setScPos(e?.target?.value)}
+ />
+
+
+
+
+ setZippost1(e?.target?.value)}
+ InputProps={{
+ display: 'none',
+ readOnly: true,
+ endAdornment: (
+
+
+
+ )
+ }}
+ />
+
+
+ setScJuso(e?.target?.value)}
+ InputProps={{ readOnly: true }}
+ />
+
+
+ setScBunji(e?.target?.value)} />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/* } onClick={onSave}> */}
+
+
+ >
+ );
+};
+ModifyDisabledDataForm.propTypes = {
+ rowData: PropTypes.object.isRequired,
+ handleModalSave: PropTypes.func.isRequired
+};
+export default ModifyDisabledDataForm;
diff --git a/src/views/biz/disabled/NewDisabledDataForm.jsx b/src/views/biz/disabled/NewDisabledDataForm.jsx
new file mode 100644
index 0000000..a31f7f5
--- /dev/null
+++ b/src/views/biz/disabled/NewDisabledDataForm.jsx
@@ -0,0 +1,438 @@
+import { useEffect, useState } from 'react';
+
+import PropTypes from 'prop-types';
+import NumberFormat from 'react-number-format';
+import { useAlert } from 'react-alert';
+import format from 'date-fns/format';
+
+import { Grid, TextField, MenuItem, Select, FormControl, InputLabel, InputAdornment } from '@mui/material';
+import Button from '@mui/material/Button';
+import { IconSearch } from '@tabler/icons';
+
+import { getComboCodeList } from 'apis/common';
+import FileInputForms from 'views/form/FileInputForms';
+
+const toDate = new Date();
+
+const NewDisabledDataForm = ({ handleModalSave }) => {
+ const alert = useAlert();
+
+ const [scCarnum, setScCarnum] = useState('');
+ const [scName, setScName] = useState('');
+ const [scDong, setScDong] = useState('');
+ const [scContDoc, setScContDoc] = useState();
+ const [selectedContDoc, setSelectedContDoc] = useState('11');
+ const [scIngb, setScIngb] = useState();
+ const [selectedIngb, setSelectedIngb] = useState('1');
+ const [zippost1, setZippost1] = useState(null);
+ const [scJuso, setScJuso] = useState('');
+ const [scBunji, setScBunji] = useState('');
+ const [scWdate, setScWdate] = useState(null);
+ const [scCdate, setScCdate] = useState(format(toDate, 'yyyyMMdd'));
+ const [scJbtime, setScJbtime] = useState(null);
+ const [scPos, setScPos] = useState('');
+
+ const [picads, setPicads] = useState({});
+ const [frecads, setFrecads] = useState({});
+ const [contads, setContads] = useState({});
+
+ const onSave = () => {
+ // TODO : validation check 추가
+ const formData = new FormData();
+ formData.append('scCarnum', scCarnum);
+ formData.append('scName', scName);
+ formData.append('scDong', scDong);
+ formData.append('scContDoc', selectedContDoc);
+ formData.append('scCdate', scCdate);
+ formData.append('scIngb', selectedIngb);
+ formData.append('scWdate', scWdate);
+ formData.append('scJbtime', scJbtime);
+ formData.append('scPos', scPos);
+ formData.append('zippost1', zippost1);
+ formData.append('scJuso', scJuso);
+ formData.append('scBunji', scBunji);
+
+ Object.values(picads).forEach((v) => {
+ formData.append('picadFiles', v);
+ });
+
+ Object.values(frecads).forEach((v) => {
+ formData.append('frecadFiles', v);
+ });
+
+ Object.values(contads).forEach((v) => {
+ formData.append('contadFiles', v);
+ });
+
+ handleModalSave(formData);
+ };
+
+ useEffect(() => {
+ // setSelectedContDoc('11');
+ setScContDoc([]);
+ getComboCodeList({ codeMcd: 'SC_CONT_DOC' }).then((res) => {
+ console.log(res);
+ setScContDoc(res.data);
+ });
+ getComboCodeList({ codeMcd: 'RC_INGB' }).then((res) => {
+ console.log(res);
+ setScIngb(res.data);
+ });
+ }, []);
+
+ const handleChangeFile = (e) => {
+ const fileKey = e.target.name;
+ const fileArrKey = fileKey + e.target.dataset.index;
+
+ if (fileKey === 'scPicad') {
+ setPicads((picads) => {
+ const updated = { ...picads };
+ updated[fileArrKey] = e.target.files[0];
+ return updated;
+ });
+ } else if (fileKey === 'scFrecad') {
+ setFrecads((frecads) => {
+ const updated = { ...frecads };
+ updated[fileArrKey] = e.target.files[0];
+ return updated;
+ });
+ } else if (fileKey === 'scContad') {
+ setContads((contads) => {
+ const updated = { ...contads };
+ updated[fileArrKey] = e.target.files[0];
+ return updated;
+ });
+ }
+ };
+
+ return (
+ <>
+
+
+
+ setScCarnum(e?.target?.value)}
+ autoFocus
+ />
+
+
+ setScName(e?.target?.value)} />
+
+
+ setScDong(e?.target?.value)} />
+
+
+
+ 진술유형
+
+
+
+
+
+
+ setScCdate(e?.target?.value)}
+ />
+
+
+
+ 접수방법
+
+
+
+
+ setScWdate(e?.target?.value)}
+ />
+
+
+ setScJbtime(e?.target?.value)}
+ />
+
+
+
+
+ setScPos(e?.target?.value)} />
+
+
+
+
+ setZippost1(e?.target?.value)}
+ InputProps={{
+ display: 'none',
+ readOnly: true,
+ endAdornment: (
+
+
+
+ )
+ }}
+ />
+
+
+ setScJuso(e?.target?.value)}
+ InputProps={{ readOnly: true }}
+ />
+
+
+ setScBunji(e?.target?.value)} />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/* } onClick={onSave}> */}
+
+
+ >
+ );
+};
+NewDisabledDataForm.propTypes = {
+ handleModalSave: PropTypes.func.isRequired
+};
+export default NewDisabledDataForm;
diff --git a/src/views/biz/disabled/SaveDisabledTargetForm.jsx b/src/views/biz/disabled/SaveDisabledTargetForm.jsx
new file mode 100644
index 0000000..46ea271
--- /dev/null
+++ b/src/views/biz/disabled/SaveDisabledTargetForm.jsx
@@ -0,0 +1,172 @@
+import { useState } from 'react';
+
+import NumberFormat from 'react-number-format';
+import format from 'date-fns/format';
+import getHours from 'date-fns/getHours';
+import koLocale from 'date-fns/locale/ko';
+
+import { Grid, TextField, MenuItem, Select, FormControl, InputLabel } from '@mui/material';
+import DateAdapter from '@mui/lab/AdapterDateFns';
+import LocalizationProvider from '@mui/lab/LocalizationProvider';
+import { DatePicker, TimePicker } from '@mui/lab';
+import Button from '@mui/material/Button';
+import PropTypes from 'prop-types';
+import { IconFileExport } from '@tabler/icons';
+
+import combo from 'commons/combo_data';
+
+const toDate = new Date();
+
+const SaveDisabledTargetForm = ({ handleModalSave }) => {
+ const [msuTeam, setMsuTeam] = useState(combo.teams[0].code);
+ const [msSdate, setMsSdate] = useState(format(toDate, 'yyyy-MM-dd'));
+ const [msStartsi, setMsStartsi] = useState(getHours(toDate));
+ const [msEdate, setMsEdate] = useState(format(toDate, 'yyyy-MM-dd'));
+ const [msChasu, setMsChasu] = useState(99);
+ const [msCdate, setMsCdate] = useState(format(toDate, 'yyyy-MM-dd'));
+ const [msClosesi, setMsClosesi] = useState(getHours(toDate));
+
+ const onSave = () => {
+ // TODO : validation check 추가
+ handleModalSave({
+ msuTeam,
+ msSdate,
+ msStartsi,
+ msEdate,
+ msChasu,
+ msCdate,
+ msClosesi
+ });
+ };
+
+ return (
+ <>
+
+
+
+ }
+ label="심의시작일"
+ value={msSdate}
+ inputFormat="yyyy-MM-dd"
+ mask="____-__-__"
+ onChange={(newValue) => {
+ setMsSdate(format(newValue, 'yyyy-MM-dd'));
+ }}
+ />
+
+ {/* */}
+
+
+
+ }
+ label="심의시작시간"
+ value={msStartsi}
+ inputFormat="HH"
+ mask="__"
+ onChange={(newValue) => {
+ // setMsStartsi(format(newValue, 'HH'));
+ setMsStartsi(getHours(newValue));
+ }}
+ />
+
+ {/* */}
+
+
+
+ }
+ label="심의종료일"
+ value={msEdate}
+ inputFormat="yyyy-MM-dd"
+ mask="____-__-__"
+ onChange={(newValue) => {
+ setMsEdate(format(newValue, 'yyyy-MM-dd'));
+ }}
+ />
+
+
+
+
+ 팀
+
+
+
+
+ setMsChasu(values.value)}
+ />
+
+
+
+ }
+ label="심의마감일"
+ value={msCdate}
+ inputFormat="yyyy-MM-dd"
+ mask="____-__-__"
+ onChange={(newValue) => {
+ setMsCdate(format(newValue, 'yyyy-MM-dd'));
+ }}
+ />
+
+
+ {/* setMsCdate(format(e.target.value), 'yyyy-MM-dd')} */}
+ {/* /> */}
+
+
+
+ }
+ renderInput={(props) => }
+ label="심의마감시간"
+ value={msClosesi}
+ inputFormat="HH"
+ mask="__"
+ onChange={(newValue) => {
+ setMsClosesi(getHours(newValue));
+ }}
+ />
+
+
+
+
+ } onClick={onSave}>
+ 저장
+
+
+ >
+ );
+};
+SaveDisabledTargetForm.propTypes = {
+ handleModalSave: PropTypes.func.isRequired
+ // isDisabled: PropTypes.bool.isRequired
+};
+export default SaveDisabledTargetForm;