feat : 단속초기자료 화면 추가

main
이범준 2 years ago
parent 9eba7e5d5e
commit d014af7785

@ -58,6 +58,10 @@ public class RtCrackdownMgtController {
public void rtCrackdownMgtMainForm(final RtDTO.Request dto){ public void rtCrackdownMgtMainForm(final RtDTO.Request dto){
} }
@RequestMapping(value = "/rtInitialDataForm")
public void rtInitialDataForm(final RtDTO.Request dto){
}
/** /**
* ?? * ??
* @param dto * @param dto

@ -0,0 +1,721 @@
<%--
================================================================================
File : /fims/biz/rt/rtInitialForm.jsp
Name : 단속 초기자료 - 단속관리 > 단속 초기자료
Auth : 이범준
Date : 2023-04-14
Desc : 단속 초기자료 메인 화면
================================================================================
Date Author Description
================================================================================
================================================================================
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
<%@ page import="kr.xit.fims.biz.FimsConst" %>
<c:set var="ctznTmplatId" value="<%= FimsConst.TmplatId.CTZN.getCode() %>"/>
<c:set var="ansSeCodeImpose" value="<%= FimsConst.AnswerSeCode.IMPOSE.getCode() %>"/>
<c:set var="ansSeCodeDisallow" value="<%= FimsConst.AnswerSeCode.DISALLOW.getCode() %>"/>
<c:set var="ansSeCodeEnlight" value="<%= FimsConst.AnswerSeCode.ENLIGHT.getCode() %>"/>
<div>
<div class="container-page-btn">
<button type="button" class="btn btn-outline-dark">초기화</button>
<span class="container-window-btn-right">
<button type="button" class="btn btn-darkgray" id="" title="등록 또는 불러오기">등록 또는 불러오기</button>
</span>
</div>
<!-- tab 공통 -->
<form id="frmSearch" name="frmSearch">
<div class="container-search">
<div class="row">
<div class="col-11">
<div class="row">
<div class="col-12">
<select id="sch_date_opt" name="sch_date_opt" class="form-select">
<option value="regltDe">단속일자</option>
<option value="registDt">등록일자</option>
</select>
<span class="form-search-linebox">
<input id="sch_date_from" class="form-control form-date" data-fmt-type="day" name="sch_date_from" type="text" title="시작 날짜 선택">
<button type="button" class="bx bx-calendar bg-white"></button>
~
<input id="sch_date_to" class="form-control form-date" data-fmt-type="day" name="sch_date_to" type="text" title="종료 날짜 선택">
<button type="button" class="bx bx-calendar bg-white"></button>
</span>
<code:select id="regltProcessSttusCode" name="regltProcessSttusCode"
codeId="FIM010" defaultSelect="01" title="단속처리상태" cls="form-select" alt="단속처리상태" disabled="false"/>
</div>
<div class="col-12">
<label class="form-label fw-bold form-search-title">시스템구분</label>
<span class="form-search-linebox">
<code:radio codeId="FIM001" id="sysCode" name="sysCode" defaultSelect='${sessionScope.XitLoginSession.orgnztId}'
onclick="fnBiz.search()" cls="form-check-input" alt="시스템구분"/>
</span>
</div>
<div class="col-12">
<label class="form-label fw-bold form-search-title">단속구분</label>
<span class="form-search-linebox">
<code:radio type="CMM_ETC2" id="regltSeCode" name="regltSeCode" codeId="FIM002"
onclick="fnBiz.search()" cls="form-check-input" alt="단속구분" />
</span>
</div>
<div class="col-12">
<select id="sch_opt" name="sch_opt" class="form-select">
<option value="vhcleNo">차량번호</option>
</select>
<input type="text" id="sch_word" name="sch_word" class="form-control" value="" />
<span class="flr">
<button type="button" class="btn btn-open-detail btn-sm" data-bs-toggle="collapse" data-bs-target="#searchDetail">
<i class="bx bx-chevron-down"></i>
상세조회조건
</button>
</span>
</div>
</div>
</div>
<div class="col-1 d-flex align-items-center justify-content-center">
<button type="button" class="btn btn-search btn-square h-px-75" id="btnSearch" title="검색">검색</button>
</div>
</div>
</div>
<div id="searchDetail" class="container-search container-search-detail collapse">
상세조회조건
</div>
</form>
<div>
<span class="container-page-btn">
<div id="totCnt">전체 ㅣ <span></span></div>
<span class="container-window-btn-right">
선택 | n건
<a href="#" class="btn btn-blue" id="" title="업무처리1">업무 처리1</a>
<a href="#" class="btn btn-blue" id="" title="업무처리2">업무 처리2</a>
</span>
</span>
</div>
<div class="container-search">
<div class="row">
<div class="col-12">
<span class="me-5">결과내재검색</span>
<label class="form-label fw-bold form-search-title">클릭한 항목</label>
<input type="text" id="" name="" class="form-control" value="" />
</div>
</div>
</div>
<div id="tabs" class="nav-align-top mt-3">
<ul class="nav nav-tabs">
<li class="nav-item">
<button id="0" type="button" class="nav-link active" data-bs-toggle="tab" data-bs-target="#tabContent0">전체</button>
</li>
<li class="nav-item">
<button id="1" type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#tabContent0">부분1</button>
</li>
<li class="nav-item">
<button id="2" type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#tabContent0">부분2</button>
</li>
<li class="nav-item">
<button id="3" type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#tabContent0">부분3</button>
</li>
</ul>
</div>
<div class="tab-content">
<div id="tabContent0" style="flex-direction: column" class="tab-pane fade show active">
<div id="tabs_t0">
<div id="grid"></div>
</div>
</div>
<div id="tabContent1" class="tab-pane fade">
<div id="tabs_t1">
<div id="grid_t1"></div>
</div>
</div>
<div id="tabContent2" class="tab-pane fade">
<div id="tabs_t2">
<div id="grid_t2"></div>
</div>
</div>
</div>
</div>
<script defer type="text/javascript" src="${pageContext.request.contextPath}/resources/biz/common/js/popupPageNavigation.js"></script>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
/**
* tab index : 0 부터 시작
* @type {number}
*/
var CUR_TAB_IDX = 0;
/**
* tui-grid array
* @type {*[]}
*/
var ARR_GRID = [];
/**
* PageNavigation
* @type {*[]}
*/
var ARR_NAV = [];
/**
* 부과대상 데이타 배열
* 단속ID, 접수번호
* @type {Array<{regltId: string, cvplRceptNo: string}>}
*/
var IMPOSE_DATA;
/**
* 그리드 목록 총 건수
* @type {number[]}
*/
let ARR_TOTCNT = [0, 0, 0];
/**
* 단속진행 상태
* 01 - 초기등록
* 10 - 부과대상
* @type {string[]}
*/
let ARR_PRC_STS_CODE = ['01', '10']
/**
* 팝업 객체
* @type {null}
*/
popup = null;
/**
*
*/
let popupDiv;
/**
*
*/
var callbackSearch = () => fnBiz.search();
/*******************************
* Biz function
*******************************/
// tab 전체
const fnBiz = {
search: () => {
//TODO:: 검색버튼 클릭시 1st page 검색 이동
ARR_GRID[CUR_TAB_IDX].resetData([]);
//ARR_GRID[CUR_TAB_IDX].getPagination().movePageTo(1);
ARR_GRID[CUR_TAB_IDX].reloadData();
//ARR_GRID[CUR_TAB_IDX].refreshLayout()
}
,tabChangReload: () => {
ARR_GRID[CUR_TAB_IDX].refreshLayout()
}
,getParams: () => {
return {
sch_date_opt: $('#sch_date_opt').val()
,sch_date_from: $('#sch_date_from').val()
,sch_date_to: $('#sch_date_to').val()
,[$('#sch_opt').val()]: $('#sch_word').val()
,sysCode: $('input:radio[name=sysCode]:checked').val()
,regltSeCode: CUR_TAB_IDX === 2 ? '09' : $('input:radio[name=regltSeCode]:checked').val()
,regltProcessSttusCode: CUR_TAB_IDX === 2 ? 'NON-INIT' : $('#regltProcessSttusCode').val()
,ctznAnsYn: $('input:radio[name=ctznAnsYn]:checked').val()
}
}
,pagePopup: function(flag, params){
let url;
let popTitle;
let popOption;
switch (flag) {
case "total":
url = fimsApiUrl.POPUP_CRACKDOWN_TOTAL;
popOption = {width: 1200, height:900};
popTitle = "개별총정보";
break;
case "edit":
url = fimsApiUrl.POPUP_CRACKDOWN_EDIT;
popOption = {width: 1200, height:900};
popTitle = "정보 변경";
break;
case "file":
url = fimsApiUrl.POPUP_EXTR_CRACKDOWN_FILE_SEL;
popOption = {width: 900, height:750};
popTitle = "외부연계 데이타 선택";
break;
case "impose":
url = fimsApiUrl.POPUP_IMPOSE;
popOption = {width: 500, height: 400};
popTitle = "과태료 시스템 등록";
break;
case "answerPreview":
url = fimsApiUrl.POPUP_CTZN_ANS_PREVIEW;
popOption = {width: 600, height: 620};
popTitle = "답변 내용 미리 보기";
break;
default:
break;
}
popup = CmmPopup.open(url, params, popOption, popTitle);
}
,onClickGrid: function(props){
const selColumn = props.columnInfo.name;
switch (selColumn){
case 'cvplRceptNo':
popupDiv = 'edit';
const rowDatas = ARR_GRID[CUR_TAB_IDX].store.data.rawData.map(d => {
return {regltSeCode: d.regltSeCode, regltId: d.regltId, regltProcessSttusCode: d.regltProcessSttusCode}
})
ARR_NAV[CUR_TAB_IDX] = new PageNavigation(ARR_GRID[CUR_TAB_IDX], rowDatas, props.rowKey);
fnBiz.pagePopup(popupDiv, ARR_NAV[CUR_TAB_IDX].gridInfo.curRowData);
break;
default:
break;
}
}
,resetBtn: function() {
switch(CUR_TAB_IDX){
case 0:
$('#btnExtrRegist').show();
$('#divImpose').hide();
$('#divAnswer').hide();
$('#ansDiv').hide();
$('#regltProcessSttusCode').show();
$('#fldRegltSeCode').show();
break;
case 1:
$('#btnExtrRegist').hide();
$('#divImpose').show();
$('#divAnswer').hide();
$('#ansDiv').hide();
$('#regltProcessSttusCode').show();
$('#fldRegltSeCode').show();
break;
case 2:
$('#btnExtrRegist').hide();
$('#divImpose').hide();
$('#divAnswer').show();
$('#ansDiv').show();
$('#regltProcessSttusCode').show();
$('#fldRegltSeCode').hide();
break;
}
}
,setDblClickEvent: function (idx) {
ARR_GRID[idx].on('dblclick', function (props) {
popupDiv = 'total';
const rowDatas = ARR_GRID[idx].store.data.rawData.map(d => {
return {regltSeCode: d.regltSeCode, regltId: d.regltId, regltProcessSttusCode: d.regltProcessSttusCode}
})
ARR_NAV[idx] = new PageNavigation(ARR_GRID[idx], rowDatas, props.rowKey);
fnBiz.pagePopup(popupDiv, ARR_NAV[idx].gridInfo.curRowData);
});
}
,getAnswerSeCode: (stsCode) => {
/*
,{value: '10', text: '부과대상'}
,{value: '11', text: '서손'}
,{value: '12', text: '계도'}
,{value: '20', text: '부과'}
*/
let answerSeCode;
switch(stsCode){
// 부과
case '10':
case '20':
answerSeCode = '${ansSeCodeImpose}';
break;
// 서손
case '11':
answerSeCode = '${ansSeCodeDisallow}';
break;
// 계도
case '12':
answerSeCode = '${ansSeCodeEnlight}';
break;
}
return answerSeCode;
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$("#tabs").on("click", "li", function () {
CUR_TAB_IDX = parseInt($("#tabs .nav-link.active").attr("id"));
$('#totCnt span').text(ARR_TOTCNT[CUR_TAB_IDX]);
//$('#regltProcessSttusCode').val(ARR_PRC_STS_CODE[CUR_TAB_IDX]).prop('selected', true);
if(ARR_GRID[CUR_TAB_IDX]) ARR_GRID[CUR_TAB_IDX].refreshLayout();
fnBiz.resetBtn();
});
$('#btnSearch').on('click', () => fnBiz.search());
$('#btnExtrRegist').on('click', () => {
fnBiz.pagePopup('file');
});
$('#btnImpose').on('click', () => {
const arrChecks = ARR_GRID[CUR_TAB_IDX].getCheckedRows();
if(arrChecks.length === 0){
alert('부과 처리 대상을 먼저 선택해 주세요');
return false;
}
IMPOSE_DATA = arrChecks.map((row) => {
const extnlInterfaceId = row.regltSeCode === '09' ? row.interfaceSeqN + row.ctznSttemntDetailSn : row.extrlRegltCntcId
return {
regltId: row.regltId
,regltSeCode: row.regltSeCode
,extnlInterfaceId
,vhcleNo: row.vhcleNo
,cvplRceptNo: row.cvplRceptNo
}
})
fnBiz.pagePopup('impose');
});
$('#btnAnswerPreview').on('click', () => {
if(ARR_GRID[CUR_TAB_IDX].store.data.rawData.length == 0){
alert('대상 데이타가 존재하지 않습니다.');
return false;
}
const arrChecks = ARR_GRID[CUR_TAB_IDX].getCheckedRows();
let rowKey;
if(arrChecks.length > 0){
rowKey = arrChecks[0].rowKey;
} else {
rowKey = ARR_GRID[CUR_TAB_IDX].store.data.rawData[0]?.rowKey;
}
const rowDatas = ARR_GRID[CUR_TAB_IDX].store.data.rawData.map(d => {
return {tmplatId: '${ctznTmplatId}', answerSeCode: fnBiz.getAnswerSeCode(d.regltProcessSttusCode), resnCode: d.erppSeCode, interfaceSeqN: d.interfaceSeqN, vhcleNo: d.vhcleNo}
})
popupDiv = 'answerPreview';
ARR_NAV[CUR_TAB_IDX] = new PageNavigation(ARR_GRID[CUR_TAB_IDX], rowDatas, rowKey);
fnBiz.pagePopup(popupDiv, ARR_NAV[CUR_TAB_IDX].gridInfo.curRowData);
});
$('#btnAnswer').on('click', () => {
const arrChecks = ARR_GRID[CUR_TAB_IDX].getCheckedRows();
if(arrChecks.length === 0){
alert('답변 처리할 대상을 먼저 선택해 주세요');
return false;
}
const arrData = arrChecks.map((row) => {
return {
interfaceSeqN: row.interfaceSeqN
}
})
// 중복제거
const datas = arrData.reduce(function(acc, current) {
if (acc.findIndex(({ interfaceSeqN }) => interfaceSeqN === current.interfaceSeqN) === -1) {
acc.push(current.interfaceSeqN);
}
return acc;
}, []);
cmmAjax({
url: fimsApiUrl.ADD_CTZN_ANS_LIST
,contentType: 'application/json'
,data: JSON.stringify(datas)
,success: (res) => {
}
});
});
});
/* *******************************
* Grid
******************************* */
const gridColumns = [
{
header: '등록구분',
name: 'registSeCode',
minWidth: 50,
sortable: false,
align: 'center',
formatter: 'listItemText',
disabled: true,
editor: {
type: "select",
options: {
listItems: ComboCodeData.registSeCode
}
},
},
{
header: '접수번호',
name: 'cvplRceptNo',
minWidth: 130,
sortable: false,
align: 'center',
renderer: {
type: CustomButtonRenderer,
options: {
formatter: (props)=>{
const rowData = props.grid.getRow(props.rowKey);
return {
formatter: rowData.regltSeCode === '09' ? rowData.cvplRceptNo : rowData.extrlRegltCntcId
,element: "text"
,dataAttrs : {
bsToggle: "tooltip",
bsOffset: "0,4",
bsPlacement: "top",
bsHtml: "true"
}
,attrs : {
title : "<i class='bx bx-window bx-xs'></i> <span>단속현황 정보</span>"
}
}
}
,eventFunction: fnBiz.onClickGrid
,eventType: "click"
}
}
},
{
header: '차량번호',
name: 'vhcleNo',
minWidth: 80,
sortable: false,
align: 'center',
// renderer: {
// type: CustomButtonRenderer,
// options: {
// formatter: (props)=>{
// return {
// formatter: props.grid.getRow(props.rowKey).vhcleNo
// ,element: "text"
// }
// }
// ,eventFunction: fnBiz.onClickGrid
// ,eventType: "dblclick"
// }
// }
},
{
header: '신고자',
name: 'cvplApplcntNm',
minWidth: 80,
sortable: false,
align: 'center'
},
{
header: '신고방법',
name: 'regltSeCode',
minWidth: 100,
sortable: false,
align: 'center',
formatter: 'listItemText',
disabled: true,
editor: {
type: "select",
options: {
listItems: [...ComboCodeData.regltSeCode]
}
},
},
{
header: '위반내용',
name: 'violtDtlsNm',
minWidth: 120,
sortable: false,
align: 'center',
},
{
header: '담당자',
name: 'dutyIdV',
minWidth: 80,
sortable: false,
align: 'center'
},
{
header: '전화번호',
name: 'pcdTelV',
minWidth: 80,
sortable: false,
align: 'center'
},
{
header: '접수일자',
name: 'cvplRceptDt',
minWidth: 80,
sortable: false,
align: 'center',
formatter({value}) {
return setDateFmt(value); //
}
},
{
header: '처리기한',
name: 'cvplProcessPd',
minWidth: 80,
sortable: false,
align: 'center',
formatter({value}) {
return setDateFmt(value); //
}
},
{
header: '위반일시',
name: 'regltDeTime',
minWidth: 120,
sortable: false,
align: 'center',
formatter({value}) {
return setDateTimeFmt(value); //
}
},
{
header: '첨부',
name: 'imageSeCode',
minWidth: 40,
sortable: false,
align: 'center',
formatter: 'listItemText',
disabled: true,
editor: {
type: "select",
options: {
listItems: ComboCodeData.imageSeCode
}
},
},
{
header: '사진',
name: 'imageNmrs',
minWidth: 40,
sortable: false,
align: 'center',
},
{
header: '특기사항',
name: 'spcmntMatter',
width: 80,
sortable: false,
align: 'center',
},
{
header: '서손사유',
name: 'erppResnDetail', //erppSeCode
width: 80,
sortable: false,
align: 'center',
},
{
header: '',
name: 'regltProcessSttusCode',
hidden: true
},
{
header: '서손ID',
name: 'erppId',
hidden: true,
},
{
header: '소유자ID',
name: 'payerId',
hidden: true,
},
{
header: '서손사유코드',
name: 'erppSeCode',
hidden: true,
},
{
header: 'interfaceSeqN',
name: 'interfaceSeqN',
hidden: true,
}
];
const gridOptions = {
el: 'grid',
rowHeaders: ['rowNum'],
columns: gridColumns,
columnOptions: {
frozenCount: 6
}
,pageOptions: {
type: 'scroll'
,perPage: 100,
}
};
const gridDatasource = {
//initialRequest: true, // 화면 load시 조회 안함 - default
api: {
readData: {
url: fimsApiUrl.FIND_CRACKDOWNS
,serializer: (params) => {
return getPageParam(fnBiz.getParams(), params);
}
}
}
};
const gridResponseReset = (res, idx) => {
// FIXME:: scroll type 사용시
ARR_GRID[idx].resetData([]);
ARR_GRID[idx].refreshLayout();
// FIXME:: scroll type 사용시
ARR_TOTCNT[idx] = res.data.pagination.totalCount;
$('#totCnt span').text(ARR_TOTCNT[idx]);
const gridInfo = ARR_NAV[idx]?.gridInfo;
if(gridInfo && gridInfo?.pageMove) {
let datas;
if(popupDiv === 'answerPreview'){
datas = res.data?.contents.map(d => {
return {tmplatId: '${ctznTmplatId}', answerSeCode: fnBiz.getAnswerSeCode(d.regltProcessSttusCode), resnCode: d.erppSeCode, interfaceSeqN: d.interfaceSeqN, vhcleNo: d.vhcleNo}
})
}else {
datas = res.data?.contents.map(d => {
return {regltId: d.regltId, regltSeCode: d.regltSeCode, regltProcessSttusCode: d.regltProcessSttusCode}
});
}
ARR_NAV[idx].resetGrid(res, datas, (pagiNavigation)=>{
ARR_NAV[idx] = pagiNavigation;
fnBiz.pagePopup(popupDiv, ARR_NAV[idx].gridInfo.curRowData);
})
}
fnBiz.setDblClickEvent(idx);
}
const initGrid = () => {
ARR_GRID[0] = TuiGrid.of(gridOptions, gridDatasource, (res) => gridResponseReset(res, 0));
const options = $.extend(gridOptions, gridOptions.columns[1].renderer = null, true);
//const options = {...gridOptions}
//options.columns[1].renderer = null;
ARR_GRID[1] = TuiGrid.of({...options, el: 'grid_t1', rowHeaders: ['checkbox','rowNum']}, gridDatasource, (res) => gridResponseReset(res, 1));
ARR_GRID[2] = TuiGrid.of({...options, el: 'grid_t2', rowHeaders: ['checkbox','rowNum']}, gridDatasource, (res) => gridResponseReset(res, 2));
};
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function(){
$('#sch_date_from').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#sch_date_to').datepicker('setDate', new Date());
CUR_TAB_IDX = 0;
fnBiz.resetBtn();
initGrid();
});
</script>

@ -10970,6 +10970,14 @@ button.list-group-item-gray.active {
height: 50px !important; height: 50px !important;
} }
.h-px-60 {
height: 60px !important;
}
.h-px-70 {
height: 70px !important;
}
.h-px-75 { .h-px-75 {
height: 75px !important; height: 75px !important;
} }

Loading…
Cancel
Save