diff --git a/src/commons/XitCmm.js b/src/commons/XitCmm.js index 2b408eb..e533011 100644 --- a/src/commons/XitCmm.js +++ b/src/commons/XitCmm.js @@ -31,8 +31,12 @@ const XitCmm = { return false; }, - formatDate(dateStr, fmt) { - return format(dateStr, fmt); + formatDate(date, fmt) { + return format(date, fmt); + }, + + formatDateStr(dateStr, delimiter) { + return dateStr.substring(0, 4) + delimiter + dateStr.substring(4, 2) + delimiter + dateStr.substring(6); }, /** diff --git a/src/views/biz/board/PublicBoard.jsx b/src/views/biz/board/PublicBoard.jsx index 6f59b29..bbf516a 100644 --- a/src/views/biz/board/PublicBoard.jsx +++ b/src/views/biz/board/PublicBoard.jsx @@ -29,18 +29,19 @@ const PublicBoard = () => { const [title, setTitle] = useState(); const columns = [ - { headerName: 'No.', headerAlign: 'center', field: 'rowId', align: 'center', width: 70 }, + { headerName: 'No.', headerAlign: 'center', field: 'rowId', align: 'center', width: 80 }, { headerName: '업무구분', headerAlign: 'center', field: 'inDept', - align: 'center' + align: 'center', + width: 120 }, { headerName: '제목', headerAlign: 'center', field: 'inTitle', - minWidth: 200, + width: 400, renderCell: (params) => ( {params.value} @@ -52,13 +53,14 @@ const PublicBoard = () => { headerAlign: 'center', field: 'inFile', align: 'center', + width: 100, renderCell: (params) => ( // console.log(params.row.inFilename); <>{params.row.inFilename ? : ''} ) }, - { headerName: '작성일자', headerAlign: 'center', field: 'inNalja', align: 'center' }, - { headerName: '조회수', headerAlign: 'center', field: 'inHit', align: 'right' } + { headerName: '작성일자', headerAlign: 'center', field: 'inNalja', align: 'center', width: 130 }, + { headerName: '조회수', headerAlign: 'center', field: 'inHit', align: 'right', width: 100 } ]; const search = useCallback(() => { diff --git a/src/views/biz/judge/JudgeDataReview.jsx b/src/views/biz/judge/JudgeDataReview.jsx index 020b36b..ed1dfd6 100644 --- a/src/views/biz/judge/JudgeDataReview.jsx +++ b/src/views/biz/judge/JudgeDataReview.jsx @@ -12,6 +12,7 @@ import { findJudge, findJudgeDatas, saveJudgeData } from 'apis/judge'; import NewJudgeDataForm from 'views/biz/judge/NewJudgeDataForm'; import ModifyJudgeDataForm from 'views/biz/judge/ModifyJudgeDataForm'; import PropTypes from 'prop-types'; +import xitCmm from '../../../commons/XitCmm'; const JudgeDataReview = ({ scDatagb, menuName }) => { const [open, setOpen] = useState(false); @@ -35,24 +36,31 @@ const JudgeDataReview = ({ scDatagb, menuName }) => { headerName: '접수번호', headerAlign: 'center', field: 'scSeq', + align: 'center', + width: 120, 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: 'scDong', align: 'center', width: 120 }, + { headerName: '차량번호', headerAlign: 'center', field: 'scCarnum', align: 'center', width: 150 }, + { headerName: '성명', headerAlign: 'center', field: 'scName', align: 'center', width: 100 }, + { headerName: '진술유형', headerAlign: 'center', field: 'scContDocNm', align: 'center', width: 150 }, { headerName: '접수일자', headerAlign: 'center', - field: 'scCdate' - // type: 'date', - // valueGetter: ({ value }) => value && new Date(value) + field: 'scCdate', + align: 'center', + width: 120, + valueFormatter: (params) => { + if (params.value == null || params.value.length < 8) return params.value; + return xitCmm.formatDateStr(params.value, '-'); + } }, - { headerName: '접수방법', headerAlign: 'center', field: 'scIngbNm' } + { headerName: '접수방법', headerAlign: 'center', field: 'scIngbNm', align: 'center' }, + { headerName: '자료상태', headerAlign: 'center', field: 'scStateNm', align: 'center' } ]; const search = useCallback(() => { @@ -63,7 +71,6 @@ const JudgeDataReview = ({ scDatagb, menuName }) => { }; findJudgeDatas(params).then((response) => { - console.log(response); if (response && response.data) { setTotalCount(response.count); setRowsState((prevState) => ({ ...prevState, rows: response.data })); diff --git a/src/views/biz/judge/JudgeRegistReview.jsx b/src/views/biz/judge/JudgeRegistReview.jsx index fe7bfb6..47e3fb4 100644 --- a/src/views/biz/judge/JudgeRegistReview.jsx +++ b/src/views/biz/judge/JudgeRegistReview.jsx @@ -36,20 +36,23 @@ const JudgeRegistReview = ({ scDatagb, menuName }) => { const [title, setTitle] = useState(); const columns = [ - { headerName: 'No', headerAlign: 'center', field: 'rowId', align: 'center', width: 70 }, - { headerName: '접수번호', headerAlign: 'center', field: 'scSeq', align: 'center' }, - { headerName: '차량번호', headerAlign: 'center', field: 'scCarnum', align: 'center', minWidth: 110 }, - { headerName: '성명', headerAlign: 'center', field: 'scName', minWidth: 150 }, - { headerName: '진술유형', headerAlign: 'center', field: 'scContDocNm', minWidth: 130 }, + { headerName: 'No', headerAlign: 'center', field: 'rowId', align: 'center', width: 80 }, + { headerName: '접수번호', headerAlign: 'center', field: 'scSeq', align: 'center', width: 130 }, + { headerName: '차량번호', headerAlign: 'center', field: 'scCarnum', align: 'center', minWidth: 150 }, + { headerName: '성명', headerAlign: 'center', field: 'scName', align: 'center', minWidth: 150 }, + { headerName: '진술유형', headerAlign: 'center', field: 'scContDocNm', align: 'center', minWidth: 150 }, { headerName: '접수일자', headerAlign: 'center', field: 'scCdate', align: 'center', - format: '####-##-##' - // valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}` + width: 150, + valueFormatter: (params) => { + if (params.value == null || params.value.length < 8) return params.value; + return xitCmm.formatDateStr(params.value, '-'); + } }, - { headerName: '접수방법', headerAlign: 'center', field: 'scIngbNm', align: 'center' } + { headerName: '접수방법', headerAlign: 'center', field: 'scIngbNm', align: 'center', width: 120 } ]; const search = useCallback(() => { diff --git a/src/views/biz/judge/JudgeReview.jsx b/src/views/biz/judge/JudgeReview.jsx index da857ff..f9498a1 100644 --- a/src/views/biz/judge/JudgeReview.jsx +++ b/src/views/biz/judge/JudgeReview.jsx @@ -60,14 +60,15 @@ const JudgeReview = ({ msDatagb, menuName }) => { const columns = [ // { headerName: 'rowId', field: 'rowId' }, - { headerName: '심의차수', headerAlign: 'center', field: 'msChasu', align: 'center' }, - { headerName: '심사건수', headerAlign: 'center', field: 'cnt', align: 'center' }, + { headerName: '심의 차수', headerAlign: 'center', field: 'msChasu', align: 'center', width: 100 }, + { headerName: '심사 건수', headerAlign: 'center', field: 'cnt', align: 'center', width: 100 }, { - headerName: '심사기간', + headerName: '심사 기간', headerAlign: 'center', field: 'msDate', - minWidth: 180, - description: '심사기간', + minWidth: 200, + width: 250, + description: '심사 기간', valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}`, renderCell: (params) => ( @@ -77,11 +78,12 @@ const JudgeReview = ({ msDatagb, menuName }) => { align: 'center' }, { - headerName: '심사마감일시', + headerName: '심사 마감 일시', headerAlign: 'center', field: 'msCdate', type: 'dateTime', - minWidth: 125, + minWidth: 150, + width: 200, valueGetter: (params) => `${params.row.msCdate} ${params.row.msClosesi}`, align: 'center' }, @@ -89,6 +91,7 @@ const JudgeReview = ({ msDatagb, menuName }) => { headerName: '상태', headerAlign: 'center', field: 'msResult', + width: 150, renderCell: (params) => <>{params.row.msResult === '1' ? '진행중' : '심사완료'}, align: 'center' },