화면별 HTML태그 아이디 중복방지를 위해 pageSuffix 변수 추가

main
이범준 1 year ago
parent c2f3734029
commit e300f2f883

@ -26,6 +26,7 @@ public class CrdnController extends AbstractCrdnController {
public ModelAndView initDataMain() {
ModelAndView mav = new ModelAndView();
mav.setViewName("fims/crdn/initData-main");
mav.addObject("pageSuffix","initData-main");
return mav;
}

@ -11,13 +11,13 @@
<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="btnSingoRegist" title="시민신고개별등록">시민신고개별등록</button>
<button type="button" class="btn btn-darkgray" id="btnMenualRegist" title="위반자료수기등록">위반자료수기등록</button>
<button type="button" class="btn btn-darkgray" id="btnExtrRegist" title="외부연계파일처리">외부연계파일처리</button>
<button type="button" class="btn btn-darkgray" id="btnSingoRegist--${pageSuffix}" title="시민신고개별등록">시민신고개별등록</button>
<button type="button" class="btn btn-darkgray" id="btnMenualRegist--${pageSuffix}" title="위반자료수기등록">위반자료수기등록</button>
<button type="button" class="btn btn-darkgray" id="btnExtrRegist--${pageSuffix}" title="외부연계파일처리">외부연계파일처리</button>
</span>
</div>
<form id="frmSearch" name="frmSearch">
<form id="frmSearch--${pageSuffix}" name="frmSearch">
<div class="container-search">
<div class="row">
<div class="col-11">
@ -25,16 +25,16 @@
<div class="col-12">
<label class="form-label fw-bold form-search-title">시스템구분</label>
<span class="form-search-linebox">
<input type="radio" id="sysSeCd1" name="sysSeCd" value="PVS"
<input type="radio" id="sysSeCd1--${pageSuffix}" name="sysSeCd" value="PVS"
onchange="fnResetAndChangeBiz(this.value);" />
<label for="sysSeCd1">주정차</label>
<input type="radio" id="sysSeCd2" name="sysSeCd" value="BPV"
<input type="radio" id="sysSeCd2--${pageSuffix}" name="sysSeCd" value="BPV"
onchange="fnResetAndChangeBiz(this.value);" />
<label for="sysSeCd2">전용차로</label>
<input type="radio" id="sysSeCd3" name="sysSeCd" value="DPV"
<input type="radio" id="sysSeCd3--${pageSuffix}" name="sysSeCd" value="DPV"
onchange="fnResetAndChangeBiz(this.value);" />
<label for="sysSeCd3">장애인</label>
<input type="radio" id="sysSeCd4" name="sysSeCd" value="ECA"
<input type="radio" id="sysSeCd4--${pageSuffix}" name="sysSeCd" value="ECA"
onchange="fnResetAndChangeBiz(this.value);" />
<label for="sysSeCd4">전기차</label>
@ -51,15 +51,15 @@
</span>
</div>
<div class="col-12">
<select id="schDateOpt" name="schDateOpt" class="form-select">
<select id="schDateOpt--${pageSuffix}" name="schDateOpt" class="form-select">
<option value="crdnYmd">단속일자</option>
<option value="regDt">등록일자</option>
</select>
<span class="form-search-linebox">
<input id="schDateFrom" class="form-control form-date" data-fmt-type="day" name="schDateFrom" type="text" title="시작 날짜 선택">
<input id="schDateFrom--${pageSuffix}" class="form-control form-date" data-fmt-type="day" name="schDateFrom" type="text" title="시작 날짜 선택">
<button type="button" class="bx bx-calendar bg-white"></button>
~
<input id="schDateTo" class="form-control form-date" data-fmt-type="day" name="schDateTo" type="text" title="종료 날짜 선택">
<input id="schDateTo--${pageSuffix}" class="form-control form-date" data-fmt-type="day" name="schDateTo" type="text" title="종료 날짜 선택">
<button type="button" class="bx bx-calendar bg-white"></button>
</span>
@ -80,11 +80,11 @@
<code:select id="crdnSttsCd" name="crdnSttsCd"
grpId="FIM010" defaultSelect="01" title="단속처리상태" cls="form-select" alt="단속처리상태" disabled="false"/>
--%>
<select id="schOpt" name="schOpt" class="form-select">
<select id="schOpt--${pageSuffix}" name="schOpt" class="form-select">
<option value="schVhrno">차량번호</option>
</select>
<input type="text" id="schWord" name="schWord" class="form-control" value="" />
<input type="text" id="schWord--${pageSuffix}" name="schWord" class="form-control" value="" />
<span class="flr">
@ -97,7 +97,7 @@
</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>
<button type="button" class="btn btn-search btn-square h-px-75" id="btnSearch--${pageSuffix}" title="검색">검색</button>
</div>
</div>
</div>
@ -128,7 +128,7 @@
<div id="grid"></div>
<div class="d-flex flex-row p-3 justify-content-between">
<label id="crdnPagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
<ul id="crdnPaging" class="pagination pagination-primary"></ul>
<ul id="crdnPaging--${pageSuffix}" class="pagination pagination-primary"></ul>
</div>
</div>
</div>
@ -165,21 +165,6 @@ var GRID = {};
*/
var pageNav = {};
/**
* 부과대상 데이타 배열
* 단속ID, 접수번호
* @type {Array<{crdnId: string, cvlcptRcptNo: string}>}
*/
var IMPOSE_DATA;
/**
* 단속진행 상태
* 01 - 초기등록
* 10 - 부과대상
* @type {string[]}
*/
var ARR_PRC_STS_CODE = ['01', '10']
/**
* 팝업 객체
@ -216,7 +201,7 @@ crdnControl.onDatasetChange = obj => {
var prefix = obj.infoPrefix;
renderCrdnList(obj);
$("#crdnPaging").setPagingInfo({
$("#crdnPaging--${pageSuffix}").setPagingInfo({
list: crdnControl.dataset,
prefix: "crdn",
start: obj[prefix+"Start"],
@ -257,16 +242,17 @@ function renderCrdnList(data) {
*******************************/
var fnBiz = {
getParams: () => {
var form = $("#frmSearch--${pageSuffix}");
return {
[$('#schOpt').val()]: $('#schWord').val()
,schDateOpt: $('#schDateOpt').val()
,schDateFrom: $('#schDateFrom').val()
,schDateTo: $('#schDateTo').val()
,sysSeCd: $('input:radio[name=sysSeCd]:checked').val()
,crdnSeCd: $('input:radio[name=crdnSeCd]:checked').val()
,crdnSttsCd: $('#crdnSttsCd').val()
,ctznAnsYn: $('input:radio[name=ctznAnsYn]:checked').val()
sysSeCd: form.find("[name='sysSeCd']:checked").val()
,[form.find("[name='schOpt']").val()]: form.find("[name='schWord']").val()
,schDateOpt: form.find("[name='schDateOpt']").val()
,schDateFrom: form.find("[name='schDateFrom']").val()
,schDateTo: form.find("[name='schDateTo']").val()
,crdnSeCd: form.find("[name='crdnSeCd']:checked").val()
,crdnSttsCd: form.find("[name='crdnSttsCd']").val()
,ctznAnsYn: form.find("[name='ctznAnsYn']:checked").val()
,fetchSize: 20
}
}
@ -371,13 +357,13 @@ var fnBiz = {
$(() => {
$('#btnSearch').on('click', () => searchCrdnList());
$('#btnSearch--${pageSuffix}').on('click', () => searchCrdnList());
$('#btnMenualRegist').on('click', () => {
$('#btnMenualRegist--${pageSuffix}').on('click', () => {
//fnBiz.pagePopup('edit', {});
});
$('#btnExtrRegist').on('click', () => {
$('#btnExtrRegist--${pageSuffix}').on('click', () => {
//fnBiz.pagePopup('file');
});
@ -618,25 +604,25 @@ $(document).ready(function(){
fnBiz.resetBtn();
initGrid();
$("#schDateFrom").datepicker({
$("#schDateFrom--${pageSuffix}").datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true
});
$("#schDateTo").datepicker({
$("#schDateTo--${pageSuffix}").datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true
});
$('#schDateFrom').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schDateTo').datepicker('setDate', new Date());
$('#schDateFrom--${pageSuffix}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schDateTo--${pageSuffix}').datepicker('setDate', new Date());
$( "#frmSearch .form-date" ).next("button.bx-calendar").on("click", function() {
$( "#frmSearch--${pageSuffix} .form-date" ).next("button.bx-calendar").on("click", function() {
$(this).prev().focus();
});
var defaultBizValue = $("#layout-navbar input[name='sysSeCd']:checked").val();
$("#frmSearch input[name='sysSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$("#frmSearch--${pageSuffix} input[name='sysSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
fnResetAndChangeBiz(defaultBizValue);
});

Loading…
Cancel
Save