refactor : 샘플 파일 제거

main
이범준 2 years ago
parent 0a801f2c75
commit 8e16d979ef

@ -1,14 +0,0 @@
package kr.xit.fims.biz.cjm.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import egovframework.rte.psl.dataaccess.mapper.Mapper;
@Mapper
public interface ICjmSampleMapper {
List<Map<String, Object>> selectSamples(final Map<String, Object> paraMap, final RowBounds rowBounds);
}

@ -1,23 +0,0 @@
package kr.xit.fims.biz.cjm.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.cjm.mapper.ICjmSampleMapper;
import lombok.RequiredArgsConstructor;
@Service
@RequiredArgsConstructor
public class CjmSampleService implements ICjmSampleService {
private final ICjmSampleMapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findCjmSamples(final Map<String, Object> paraMap, final RowBounds pagingInfo) {
return mapper.selectSamples(paraMap, pagingInfo);
}
}

@ -1,12 +0,0 @@
package kr.xit.fims.biz.cjm.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
public interface ICjmSampleService {
List<Map<String, Object>> findCjmSamples(final Map<String, Object> paraMap, final RowBounds pagingInfo);
}

@ -1,33 +0,0 @@
package kr.xit.fims.biz.cjm.web;
import java.util.Map;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import kr.xit.fims.biz.cjm.service.ICjmSampleService;
import kr.xit.framework.core.dto.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Controller
@RequestMapping(value = "/fims/biz/cjm")
public class CjmSampleController {
private final ICjmSampleService service;
@GetMapping(value = "/cjmSampleForm")
public void cjmSampleForm(){
}
@GetMapping(value = "/findCjmSamples")
public ModelAndView findCjmSamples(@RequestParam final Map<String,Object> paraMap){
return ResultResponse.of(service.findCjmSamples(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
}

@ -1,15 +0,0 @@
package kr.xit.fims.biz.sample.mapper;
import egovframework.rte.psl.dataaccess.mapper.Mapper;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
import java.util.Map;
@Mapper
public interface ISample2Mapper {
List<Map<String, Object>> selectSampleList(Map<String, Object> paraMap, RowBounds rowBounds);
}

@ -1,15 +0,0 @@
package kr.xit.fims.biz.sample.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import egovframework.rte.psl.dataaccess.mapper.Mapper;
@Mapper
public interface ISampleMapper {
List<Map<String, Object>> selectSampleList(Map<String, Object> paraMap, RowBounds rowBounds);
Map<String, Object> selectSample();
}

@ -1,11 +0,0 @@
package kr.xit.fims.biz.sample.service;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
import java.util.Map;
public interface ISample2Service {
List<Map<String, Object>> findSampleList(Map<String, Object> paraMap, RowBounds pagingInfo);
}

@ -1,11 +0,0 @@
package kr.xit.fims.biz.sample.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
public interface ISampleService {
List<Map<String, Object>> findSampleList(Map<String, Object> paraMap, RowBounds pagingInfo);
Map<String, Object> findSample();
}

@ -1,25 +0,0 @@
package kr.xit.fims.biz.sample.service;
import kr.xit.fims.biz.sample.mapper.ISample2Mapper;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
@RequiredArgsConstructor
@Service
public class Sample2Service implements ISample2Service{
private final ISample2Mapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findSampleList(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectSampleList(paraMap, rowBounds);
}
}

@ -1,32 +0,0 @@
package kr.xit.fims.biz.sample.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import kr.xit.fims.biz.sample.mapper.ISampleMapper;
import kr.xit.fims.biz.sample.service.ISampleService;
import kr.xit.fims.biz.sample.service.SampleService;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Service
public class SampleService implements ISampleService {
private final ISampleMapper mapper;
@Override
@Transactional(readOnly = true)
public List<Map<String, Object>> findSampleList(Map<String, Object> paraMap, RowBounds rowBounds) {
return mapper.selectSampleList(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public Map<String, Object> findSample() {
return mapper.selectSample();
}
}

@ -1,32 +0,0 @@
package kr.xit.fims.biz.sample.web;
import kr.xit.fims.biz.sample.service.ISample2Service;
import kr.xit.framework.core.dto.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import java.util.Map;
@AllArgsConstructor
@Controller
@RequestMapping(value = "/fims/biz/sample")
public class Sample2Controller {
private final ISample2Service sample2Service;
@GetMapping(value = "/sampleForm2")
public void sampleForm(){
}
@GetMapping(value = "/findSampleList")
public ModelAndView findSampleList(@RequestParam Map<String,Object> paraMap){
return ResultResponse.of(sample2Service.findSampleList(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
}

@ -1,45 +0,0 @@
package kr.xit.fims.biz.sample.web;
import java.util.Map;
import kr.xit.fims.biz.sample.service.ISampleService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import kr.xit.framework.core.dto.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils;
import lombok.AllArgsConstructor;
@AllArgsConstructor
@Controller
@RequestMapping(value = "/fims/biz/sample")
public class SampleController {
private final ISampleService sampleService;
@GetMapping(value = "/sampleForm")
public void sampleForm(){
}
@GetMapping(value = "/findRt0100List")
public ModelAndView findSampleList(@RequestParam Map<String,Object> paraMap){
return ResultResponse.of(sampleService.findSampleList(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@GetMapping(value = "/findRt0100")
public ModelAndView findSample(){
return ResultResponse.of(sampleService.findSample());
}
@RequestMapping("/hello")
public ModelAndView hello(){
String message = "프리마커";
ModelAndView mv = new ModelAndView();
mv.setViewName("hello");
mv.addObject("message", message);
return mv;
}
}

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.fims.biz.cjm.mapper.ICjmSampleMapper">
<select id="selectSamples" parameterType="map" resultType="caseMap">
/* cjm-mysql-mapper|selectSamples-샘플 목록 조회|cjm */
SELECT idx_no
, col_nm
, col_no1
, col_no2
, col_no3
, col_no4
FROM tb_sample
<where>
<if test = "sch_word != null and sch_word != ''">
AND col_nm = #{sch_word}
</if>
</where>
</select>
<select id="selectRt0100" parameterType="string" resultType="string">
/* sample2-mysql-mapper|selectRt0100-|cjm */
</select>
</mapper>

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.fims.biz.sample.mapper.ISample2Mapper">
<select id="selectSampleList" parameterType="map" resultType="caseMap">
/* sample2-mysql-mapper|selectRt0100List-|cjm */
select
idx_no
, col_nm
, col_no1
, col_no2
, col_no3
, col_no4
from tb_sample
where 1=1
<if test = "sch_word != null and sch_word != ''">
and col_nm = #{sch_word}
</if>
</select>
<select id="selectRt0100" parameterType="string" resultType="string">
/* sample2-mysql-mapper|selectRt0100-|cjm */
</select>
</mapper>

@ -1,297 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
<form id="frmSearch" name="frmSearch" method="get">
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
<input type="hidden" id="sch_tab_id" name="sch_tab_id" value="0"/>
<div class="container-search">
<div class="row">
<div class="col-12">
<label class="form-label fw-bold form-search-title">조회일자 :</label>
<select id="sch_date_opt" name="sch_date_opt" class="form-select">
<option value="1">위반일자</option>
<option value="2">등록일자</option>
</select>
<code:select id="sch_date_opt1" name="sch_date_opt1" codeId="ENS003" title="시작날자선택" defaultSelect="99" cls="form-select" alt="selectBox tag"/>
<code:radio id="sch_date_opt2" name="sch_date_opt2" codeId="ENS003" defaultSelect="02" alt="radio tag"/>
</div>
<div class="col-12">
<span class="form-search-linebox">
<input id="sch_date_from" class="form-control form-date" 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" name="sch_date_to" type="text" title="종료 날짜 선택" placeholder="날짜를 선택하세요">
<button type="button" class="bx bx-calendar bg-white"></button>
</span>
</div>
<div class="col-12">
<label class="form-label fw-bold form-search-title">상태 : </label>
<select id="sch_opt" name="sch_opt" class="form-select">
<option value="1">차량번호</option>
<option value="2">소유자명</option>
</select>
<input type="text" id="sch_word" name="sch_word" value="">
<button type="button" class="btn btn-search" id="btnSearch" name="btnSearch">검색</button>
</div>
</div>
</div>
</form>
<div class="contents">
<div class="topBtnArea">
<ul class="btnList">
<li>
<button type="button" id="btnExcel"><i class="ico far fa-file-excel"></i> 엑셀</button>
</li>
</ul>
<div class="clearfix" id="totCnt">전체 ㅣ <span></span></div>
</div>
</div>
<div id="grid"></div>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
var callbackSearch = () => fnBiz.search(); // 데이터 조회 : popup에서 사용
let GRID = null;
/* *******************************
* Biz function
******************************* */
const fnBiz = {
search: () => {
GRID.reloadData();
}
,pagePopup: function(flag, params){
let url = fimsApiUrl.POPUP_CRACKDOWN_TOTAL;
let popTitle;
let popOption = {width: 1300, height:900}
switch (flag) {
case "add": //등록
popTitle = "프로그램 등록";
break;
case "detail": //상세
popTitle = "프로그램 상세";
break;
default:
break;
}
$.blockUI({message: '' ,css: {width: '100%', height: '100%'}
//모달창 외부 클릭시 닫기
,onOverlayClick: () => {
$.unblockUI();
popup?.self?.close();
}
});
popup = CmmPopup.open(url, params, popOption, popTitle);
}
,clickRegBtn: function(props){
const rowData = props.grid.getRow(props);
fnBiz.pagePopup('detail', {selectedId: rowData.reglt_id});
}
,bsAdd: function(props){
const rowData = GRID.getRow(props.rowKey);
GRID_BS.appendRow(rowData);
GRID_BS.refreshLayout();
}
,bsDel: function(props){
const rowData = GRID.getRow(props.rowKey);
GRID_BS.removeRow(rowData);
GRID_BS.refreshLayout();
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$('#btnSearch').on('click', () => {
fnBiz.search();
});
$('#btnRegist').on('click', () => {
fnBiz.pagePopup('add', null);
});
$('#bsClose').on('click', ()=> {
$('#bs').hide(500);
$('#bsOpen').show(500);
});
$('#bsOpen').on('click', ()=> {
$('#bs').show(500);
$('#bsOpen').hide(500);
});
});
/* *******************************
* Grid
******************************* */
const initGrid = () => {
/* ******************************
* Grid start
****************************** */
const gridColumns = [ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
header: '인덱스',
name: 'idx_no',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '컬럼이름',
name: 'col_nm',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '컬럼1',
name: 'col_no1',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '컬럼2',
name: 'col_no2',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '컬럼3',
name: 'col_no3',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '컬럼4',
name: 'col_no4',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: 'reglt_id',
name: 'reglt_id',
minWidth: 200,
sortable: false,
align: 'left'
}
];
const gridDatasource = { //DataSource
/* -----------------------
* DataSource API Setting
----------------------- */
initialRequest: false, // 화면 load시 조회 안함 - default
api: {
readData: {
url: '<c:url value="/fims/biz/cjm/cjmSelect.do"/>'
,serializer: (params) => fnAddPageInfo(document.frmSearch, params)
}
}
}
const gridOptions = {
el: 'grid',
rowHeaders: ['rowNum'],
columns: gridColumns,
contextMenu: ({ rowKey, columnName }) => (
[
[
{
name: 'bsAdd',
label: '바텀시트에 추가',
action: function() {
$('#bs').show(500);
var props = {};
props['rowKey'] = rowKey;
props['grid'] = columnName;
fnBiz.bsAdd(props);
},
classNames: ['']
},
],
]
),
};
const BSgridOptions = {
el: 'grid_bs',
rowHeaders: ['rowNum'],
columns: gridColumns,
bodyHeight: 250, //[선택]Grid 높이 (number(단위: px)|'auto'|'fitToParent')
minBodyHeight: 200, //[선택]Grid 최소 높이 (단위: px)
pageOptions: {
type: 'scroll',
perPage: 50
},
contextMenu: ({ rowKey, columnName }) => (
[
[
{
name: 'bsDel',
label: '바텀시트에서 제거',
action: function() {
var props = {};
props['rowKey'] = rowKey;
props['grid'] = columnName;
fnBiz.bsDel(props);
},
classNames: ['']
},
],
]
),
};
const onDblClickEventSet = function () {
GRID.on('dblclick', function (ev){
var props = {};
props['rowKey'] = ev.rowKey;
props['grid'] = ev.instance;
fnBiz.clickRegBtn(props);
})
};
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
onDblClickEventSet();
});
GRID_BS = TuiGrid.of(BSgridOptions, (res) => {
});
};
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function(){
initGrid();
});
</script>

@ -1,365 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
<form id="frmSearch" name="frmSearch" method="get">
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
<input type="hidden" id="sch_tab_id" name="sch_tab_id" value="0"/>
<div class="container-search">
<div class="row">
<div class="col-12">
<label class="form-label fw-bold form-search-title">조회일자 :</label>
<select id="sch_date_opt" name="sch_date_opt" class="form-select">
<option value="1">위반일자</option>
<option value="2">등록일자</option>
</select>
<!-- tag lib sample -->
<code:select id="sch_date_opt1" name="sch_date_opt1" codeId="ENS003" title="시작날자선택" defaultSelect="99" cls="form-select" alt="selectBox tag"/>
<code:radio id="sch_date_opt2" name="sch_date_opt2" codeId="ENS003" defaultSelect="02" cls="" alt="radio tag"/>
</div>
<div class="col-12">
<span class="form-search-linebox">
<input id="sch_date_from" class="form-control form-date" 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" name="sch_date_to" type="text" title="종료 날짜 선택" placeholder="날짜를 선택하세요">
<button type="button" class="bx bx-calendar bg-white"></button>
</span>
</div>
<div class="col-12">
<label class="form-label fw-bold form-search-title">상태 : </label>
<select id="sch_opt" name="sch_opt" class="form-select">
<option value="1">차량번호</option>
<option value="2">소유자명</option>
</select>
<input type="text" id="sch_word" name="sch_word" value="">
<button type="button" class="btn btn-search" id="btnSearch" name="btnSearch">검색</button>
</div>
</div>
</div>
</form>
<div class="contents">
<div class="topBtnArea">
<ul class="btnList">
<li>
<button type="button" id="btnExcel"><i class="ico far fa-file-excel"></i> 엑셀</button>
</li>
</ul>
<div class="clearfix" id="totCnt">전체 ㅣ <span></span></div>
</div>
<!-- //버튼 및 페이지정보 -->
<div>
<div id="tabs">
<ul>
<li><a href="#tabs_0" id="0">전체<span id="t0"></span></a></li>
<li><a href="#tabs_1" id="1">차적미조회<span id="t1"></span></a></li>
<li><a href="#tabs_2" id="2">차적조회<span id="t2"></span></a></li>
</ul>
<div id="tabs_0">
<div id="grid_t0"></div>
</div>
<div id="tabs_1">
<div id="grid_t1"></div>
</div>
<div id="tabs_2">
<div id="grid_t2"></div>
</div>
</div>
<!-- //tabs -->
</div>
<!-- </div> -->
</div>
<div id = "somthing" style="display: none; padding:50px; border:1px solid red;">
내기 셍긱단거
</div>
<%-- <!-- 다이얼로그 팝업 예시(sampleBox) -->
<div class="modal-wrap">
<div class="modal-cell">
<!-- cont-box는 ID를 추가하여 여러개의 내용을 넣어주세요.
팝업 오픈시 해당 ID의 팝업만 노출 되도록 만들었습니다. -->
<div class="cont-box" id="sampleBox">
<p>
단순 팝업 입니다.<br>
내용이 많으면 더 쓰셔도 됩니다.
</p>
<div class="btn-box">
<button data-modal-close class="btnDark">확인</button>
<button data-modal-close class="btnDark">취소</button>
</div>
<button data-modal-close class="fas btn-close"></button>
</div>
</div>
</div>--%>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
const ARR_INSTANCE = [null,null,null];
const ARR_TOTCNT = [0,0,0];
let CUR_TAB_SEQ = 0;
/* *******************************
* Grid
******************************* */
const initGrid = () => {
const tab0Columns = [ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
header: '차량번호',
name: 'vhcle_no',
minWidth: 120,
sortable: false,
align: 'center'
},
{
header: '소유자명',
name: 'owner_nm',
minWidth: 120,
sortable: false,
align: 'center'
},
{
header: '위반장소',
name: 'violt_place',
width: 120,
sortable: false,
align: 'center'
},
{
header: '위반횟수',
name: 'violt_co',
width: 110,
sortable: false,
align: 'center'
},
{
header: '수납금액',
name: 'rciv_amount',
width: 150,
sortable: false,
align: 'center'
},
{
header: '등록일시',
name: 'regist_dt',
width: 110,
sortable: false,
align: 'center',
formatter({value}) {
return setDateFmt(value); //
}
},
{
header: '최종처리일시',
name: 'last_process_dt',
width: 120,
sortable: false,
align: 'center',
formatter({value}) {
return setDateTimeFmt(value);
}
}
];
//DataSource
let tab0Datasource = {
//initialRequest: false, // 화면 load시 조회 안함 - default
api: {
readData: {
url: '<c:url value="/fims/biz/rt/findRt0200List.do"/>'
, serializer: (params) => fnAddPageInfo(document.frmSearch, params)
}
}
};
const tab0Options = {
el: 'grid_t0',
rowHeaders: ['rowNum'],
columns: tab0Columns,
columnOptions: {
frozenCount: 1 //고정컬럼 갯수
, minWidth: 80 //최소 사이즈
},
};
const tab1Options = $.extend(true, {}, tab0Options, {
el: 'grid_t1'
});
const tab2Options = $.extend(true, {}, tab0Options, {
el: 'grid_t2'
});
const onDblClickEventSet = function (tabSeq) {
ARR_INSTANCE[tabSeq].on('dblclick', function (ev) {
var props = {};
props['rowKey'] = ev.rowKey;
props['grid'] = ev.instance;
fnRt0200Sel.clickRegBtn(props);
//Rt0200_main.clickRegBtn(ev.instance.getRow(ev.rowKey), tabSeq);
});
};
ARR_INSTANCE[0] = TuiGrid.of(tab0Options, tab0Datasource, (res) => {
ARR_TOTCNT[0] = res.data.pagination.totalCount;
onDblClickEventSet(0);
});
ARR_INSTANCE[1] = TuiGrid.of(tab1Options, tab0Datasource, (res) => {
ARR_TOTCNT[1] = res.data.pagination.totalCount;
onDblClickEventSet(1);
});
ARR_INSTANCE[2] = TuiGrid.of(tab2Options, tab0Datasource, (res) => {
ARR_TOTCNT[2] = res.data.pagination.totalCount;
onDblClickEventSet(2);
});
}
/* *******************************
* function
******************************* */
const fnRt0200Sel = {
search: () => {
const sch_date_opt = $('select[name=sch_date_opt]').val();
const sch_date_from = $('#sch_date_from').val();
const sch_date_to = $('#sch_date_to').val();
/*sch_date_from = sch_date_from.replace(/\./g, '');*/
if (sch_date_from != "" || sch_date_to != "") {
if (sch_date_opt == "" || sch_date_from == "" || sch_date_to == "") {
alert("조회기준 또는 일시를 선택하세요");
return false;
}
}
ARR_INSTANCE[CUR_TAB_SEQ].reloadData();
}
,add: function(){
cmmAjax({
url: '<c:url value="/adm/send/rqst/mng/proc.do"/>'
,data: $("#frmSearch").serialize()
,success: () => {
}
});
}
,modify: function(){
cmmAjax({
url: '<c:url value="/adm/send/rqst/mng/proc.do"/>'
,data: $("#frmSearch").serialize()
,success: () => {
}
});
}
,remove: function(){
cmmAjax({
url: '<c:url value="/adm/send/rqst/mng/proc.do"/>'
,data: $("#frmSearch").serialize()
,success: () => {
}
});
}
,pagePopup: function(flag, url, params){
let popTitle;
let popOption;
switch (flag) {
case "insert": //등록
popTitle = "";
popOption = {width: 760, height:890}
break;
case "detail": //상세
popTitle = "단속자료 상세보기";
popOption = {width: 1500, height:900}
break;
default:
break;
}
CmmPopup.open(url, params, popOption, popTitle);
}
,clickRegBtn: function(props){
const rowData = props.grid.getRow(props.rowKey);
$('#somthing').show();
$('#somthing').focus();
}
,validate: function(flag){
switch(flag){
case 'insert' :
break;
case 'update' :
break;
case 'delete' :
break;
}
return true;
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$("#tabs").on("click", "li", function () {
CUR_TAB_SEQ = parseInt($("#tabs .ui-tabs-active a").attr("id"));
$('#totCnt span').text(ARR_TOTCNT[CUR_TAB_SEQ]);
let tabId = CUR_TAB_SEQ
$('#sch_tab_id').val(tabId);
if(ARR_INSTANCE[tabId]) ARR_INSTANCE[tabId].refreshLayout();
});
$('#btnSearch').on('click', () => {
fnRt0200Sel.search();
});
$('#btnExcel').on('click', () => {
//document.frmSearch.searchAt.value = "N";
//document.frmSearch.action = "<c:out value='/adm/send/rqst/mng/excel.do'/>";
//document.frmSearch.submit();
/** 2022.04.22 최정민
* 엑셀저장기능 서버호출에서 그리드 엑셀저장 호출로 변경
*/
TuiGrid.exportExcel(ARR_INSTANCE[CUR_TAB_SEQ], DateUtil.getDate().date, 'rowNum');
}
);
$('#btnExportPdf').on('click', () => {
});
$('#btnRegist').on('click', () => {
});
// 수정 버튼 Event 설정
$('#btnModify').on('click', () => {
});
//삭제 버튼 Event 설정
$('#btnRemove').on('click', () => {
});
})
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function() {
$('#sch_date_from').datepicker('setDate', DateUtil.getDateDay(-364).date);
$('#sch_date_to').datepicker('setDate', new Date());
$('#totCnt span').text(ARR_TOTCNT[CUR_TAB_SEQ]);
$("#tabs").tabs({active : CUR_TAB_SEQ});
initGrid();
});
</script>

@ -1,306 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
<form id="frmSearch" name="frmSearch" method="get">
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
<input type="hidden" id="sch_tab_id" name="sch_tab_id" value="0"/>
<div class="container-search">
<div class="row">
<div class="col-12">
<label class="form-label fw-bold form-search-title">조회일자 :</label>
<select id="sch_date_opt" name="sch_date_opt" class="form-select">
<option value="1">위반일자</option>
<option value="2">등록일자</option>
</select>
<!-- tag lib sample -->
<code:select id="sch_date_opt1" name="sch_date_opt1" codeId="ENS003" title="시작날자선택" defaultSelect="99" cls="form-select" alt="selectBox tag"/>
<code:radio id="sch_date_opt2" name="sch_date_opt2" codeId="ENS003" defaultSelect="02" cls="" alt="radio tag"/>
</div>
<div class="col-12">
<span class="form-search-linebox">
<input id="sch_date_from" class="form-control form-date" 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" name="sch_date_to" type="text" title="종료 날짜 선택" placeholder="날짜를 선택하세요">
<button type="button" class="bx bx-calendar bg-white"></button>
</span>
</div>
<div class="col-12">
<label class="form-label fw-bold form-search-title">상태 : </label>
<select id="sch_opt" name="sch_opt" class="form-select">
<option value="1">차량번호</option>
<option value="2">소유자명</option>
</select>
<input type="text" id="sch_word" name="sch_word" value="">
<button type="button" class="btn btn-search" id="btnSearch" name="btnSearch">검색</button>
</div>
</div>
</div>
</form>
<div class="contents">
<div class="topBtnArea">
<ul class="btnList">
<li>
<button type="button" id="btnExcel"><i class="ico far fa-file-excel"></i> 엑셀</button>
</li>
</ul>
<div class="clearfix" id="totCnt">전체 ㅣ <span></span></div>
</div>
</div>
<div id="grid"></div>
<!-- <iframe id="iframe" width="1024" height="500" src="fims/biz/sample/sampleForm2.jsp"></iframe> -->
<div id="bs" style="border:1px solid red; bottom: 0; width:1330px; position: fixed; bottom: 0; z-index: 999; background-color: #cccccc; display: none" >
<div id="bsHeader" style="height: 50px">bottom sheet<button id="bsClose" style="float: right;">close</button></div>
<div style="display: flex; ">
<div style=" border:1px solid red; height: 300px; width: 80%">
<div id="grid_bs"></div>
</div>
<div style=" border:1px solid red; height: 300px; width: 20%">
<button>일괄삭제</button>
<button>자료묶음</button>
<button>제거</button>
</div>
</div>
</div>
<div id="bsOpen" style="border:1px solid red; bottom: 0; width:80px; height: 15px; position: fixed; bottom: 0; z-index: 999; background-color: #cccccc; display: none" >
open
</div>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
var callbackSearch = () => fnBiz.search(); // 데이터 조회 : popup에서 사용
let GRID = null;
/* *******************************
* Biz function
******************************* */
const fnBiz = {
search: () => {
GRID.reloadData();
}
,pagePopup: function(flag, params){
let url = fimsApiUrl.POPUP_CRACKDOWN_TOTAL;
let popTitle;
let popOption = {width: 1300, height:900}
switch (flag) {
case "add": //등록
popTitle = "프로그램 등록";
break;
case "detail": //상세
popTitle = "프로그램 상세";
break;
default:
break;
}
CmmPopup.open(url, params, popOption, popTitle);
}
,clickRegBtn: function(props){
const rowData = props.grid.getRow(props);
fnBiz.pagePopup('detail', {selectedId: rowData.reglt_id});
}
,bsAdd: function(props){
const rowData = GRID.getRow(props.rowKey);
GRID_BS.appendRow(rowData);
GRID_BS.refreshLayout();
}
,bsDel: function(props){
const rowData = GRID.getRow(props.rowKey);
GRID_BS.removeRow(rowData);
GRID_BS.refreshLayout();
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$('#btnSearch').on('click', () => {
fnBiz.search();
});
$('#btnRegist').on('click', () => {
fnBiz.pagePopup('add', null);
});
$('#bsClose').on('click', ()=> {
$('#bs').hide(500);
$('#bsOpen').show(500);
});
$('#bsOpen').on('click', ()=> {
$('#bs').show(500, ()=> GRID_BS.refreshLayout());
$('#bsOpen').hide(500);
});
});
/* *******************************
* Grid
******************************* */
const initGrid = () => {
/* ******************************
* Grid start
****************************** */
const gridColumns = [ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
header: '인덱스',
name: 'idx_no',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '컬럼이름',
name: 'col_nm',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '컬럼1',
name: 'col_no1',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '컬럼2',
name: 'col_no2',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '컬럼3',
name: 'col_no3',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '컬럼4',
name: 'col_no4',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: 'reglt_id',
name: 'reglt_id',
minWidth: 200,
sortable: false,
align: 'left'
}
];
const gridDatasource = { //DataSource
/* -----------------------
* DataSource API Setting
----------------------- */
initialRequest: true, // 화면 load시 조회 안함 - default
api: {
readData: {
url: '<c:url value="/fims/biz/sample/findSampleList.do"/>'
,serializer: (params) => fnAddPageInfo(document.frmSearch, params)
}
}
}
const gridOptions = {
el: 'grid',
rowHeaders: ['rowNum'],
columns: gridColumns,
contextMenu: ({ rowKey, columnName }) => (
[
[
{
name: 'bsAdd',
label: '바텀시트에 추가',
action: function() {
$('#bs').show(500);
var props = {};
props['rowKey'] = rowKey;
props['grid'] = columnName;
fnBiz.bsAdd(props);
},
classNames: ['']
},
],
]
),
};
const BSgridOptions = {
el: 'grid_bs',
rowHeaders: ['rowNum'],
columns: gridColumns,
bodyHeight: 250, //[선택]Grid 높이 (number(단위: px)|'auto'|'fitToParent')
minBodyHeight: 200, //[선택]Grid 최소 높이 (단위: px)
pageOptions: {
type: 'scroll',
perPage: 50
},
contextMenu: ({ rowKey, columnName }) => (
[
[
{
name: 'bsDel',
label: '바텀시트에서 제거',
action: function() {
var props = {};
props['rowKey'] = rowKey;
props['grid'] = columnName;
fnBiz.bsDel(props);
},
classNames: ['']
},
],
]
),
};
const onDblClickEventSet = function () {
GRID.on('dblclick', function (ev){
var props = {};
props['rowKey'] = ev.rowKey;
props['grid'] = ev.instance;
fnBiz.clickRegBtn(props);
})
};
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
onDblClickEventSet();
});
GRID_BS = TuiGrid.of(BSgridOptions, (res) => {
});
};
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function(){
initGrid();
console(cmmbs);
});
</script>
Loading…
Cancel
Save