소스 정리

main
이범준 1 year ago
parent cce5d52bba
commit 864468eca2

@ -9,7 +9,7 @@
<div class="row g-1"> <div class="row g-1">
<div class="col-md-12" slot="edit"> <div class="col-md-12" slot="edit">
<template class="pvs bpv"> <template class="pvs bpv">
<slot name="edit"> <slot>
<label for="crdnSeCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">단속구분</label> <label for="crdnSeCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">단속구분</label>
<select id="crdnSeCd--${pageName}" name="crdnSeCd" data-map="CRDN_SE_CD" class="form-select"> <select id="crdnSeCd--${pageName}" name="crdnSeCd" data-map="CRDN_SE_CD" class="form-select">
<c:forEach items="${FIM002List}" var="item"> <c:forEach items="${FIM002List}" var="item">
@ -64,14 +64,14 @@
</div> </div>
<div class="col-md-8" slot="edit"> <div class="col-md-8" slot="edit">
<template class="bpv"> <template class="bpv">
<slot name="edit"> <slot>
<label for="dtlCrdnPlc--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">상세위반장소</label> <label for="dtlCrdnPlc--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">상세위반장소</label>
<input type="text" id="dtlCrdnPlc--${pageName}" name="dtlCrdnPlc" data-map="DTL_CRDN_PLC" class="form-control" <input type="text" id="dtlCrdnPlc--${pageName}" name="dtlCrdnPlc" data-map="DTL_CRDN_PLC" class="form-control"
data-maxlenghb="200" /> data-maxlenghb="200" />
</slot> </slot>
</template> </template>
<template class="pvs"> <template class="pvs">
<slot name="edit"> <slot>
<label for="crdnSpareaCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">특별구역</label> <label for="crdnSpareaCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">특별구역</label>
<select id="crdnSpareaCd--${pageName}" name="crdnSpareaCd" data-map="CRDN_SPAREA_CD" class="form-select"> <select id="crdnSpareaCd--${pageName}" name="crdnSpareaCd" data-map="CRDN_SPAREA_CD" class="form-select">
<c:forEach items="${FIM007List}" var="item"> <c:forEach items="${FIM007List}" var="item">
@ -130,14 +130,14 @@
</div> </div>
<div class="col-md-4" slot="edit"> <div class="col-md-4" slot="edit">
<template class="pvs bpv"> <template class="pvs bpv">
<slot name="edit"> <slot>
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차량구분</label> <label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차량구분</label>
</slot> </slot>
</template> </template>
</div> </div>
<div class="col-md-4" slot="edit"> <div class="col-md-4" slot="edit">
<template class="pvs bpv"> <template class="pvs bpv">
<slot name="edit"> <slot>
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차종</label> <label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차종</label>
</slot> </slot>
</template> </template>
@ -163,7 +163,7 @@
</div> </div>
<div class="col-md-4" slot="edit"> <div class="col-md-4" slot="edit">
<template class="dpv eca pvs"> <template class="dpv eca pvs">
<slot name="edit"> <slot>
<label for="towngYn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">견인지시</label> <label for="towngYn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">견인지시</label>
<select id="towngYn--${pageName}" name="towngYn" class="form-select" data-map="TOWNG_YN"> <select id="towngYn--${pageName}" name="towngYn" class="form-select" data-map="TOWNG_YN">
<c:forEach items="${FIM053List}" var="item"> <c:forEach items="${FIM053List}" var="item">
@ -175,7 +175,7 @@
</div> </div>
<div class="col-md-4" slot="edit"> <div class="col-md-4" slot="edit">
<template class="dpv eca pvs"> <template class="dpv eca pvs">
<slot name="edit"> <slot>
<label for="crdnSn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">스티커번호</label> <label for="crdnSn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">스티커번호</label>
<input type="text" id="crdnSn--${pageName}" name="crdnSn" data-map="CRDN_SN" class="form-control" <input type="text" id="crdnSn--${pageName}" name="crdnSn" data-map="CRDN_SN" class="form-control"
maxlength="20" data-maxlengthb="20" /> maxlength="20" data-maxlengthb="20" />
@ -184,7 +184,7 @@
</div> </div>
<div class="col-md-4" slot="edit"> <div class="col-md-4" slot="edit">
<template class="dpv"> <template class="dpv">
<slot name="edit"> <slot>
<label for="parkngPsbltyRsltCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">장애차량확인</label> <label for="parkngPsbltyRsltCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">장애차량확인</label>
<select id="parkngPsbltyRsltCd--${pageName}" name="parkngPsbltyRsltCd" data-map="PARKNG_PSBLTY_RSLT_CD" class="form-select"> <select id="parkngPsbltyRsltCd--${pageName}" name="parkngPsbltyRsltCd" data-map="PARKNG_PSBLTY_RSLT_CD" class="form-select">
<c:forEach items="${FIM034List}" var="item"> <c:forEach items="${FIM034List}" var="item">
@ -198,7 +198,7 @@
</div> </div>
<div class="col-md-12" slot="edit"> <div class="col-md-12" slot="edit">
<template class="pvs bpv"> <template class="pvs bpv">
<slot name="edit"> <slot>
<label for="teamNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">단속조</label> <label for="teamNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">단속조</label>
<select id="teamNm--${pageName}" name="teamNm" data-map="TEAM_NM" class="form-select"> <select id="teamNm--${pageName}" name="teamNm" data-map="TEAM_NM" class="form-select">
</select> </select>
@ -207,7 +207,7 @@
</div> </div>
<div class="col-md-12" slot="edit"> <div class="col-md-12" slot="edit">
<template class="pvs bpv"> <template class="pvs bpv">
<slot name="edit"> <slot>
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">단속원</label> <label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">단속원</label>
<input type="text" id="teamer1--${pageName}" name="teamer1" data-map="TEAMER_1" class="form-control" /> <input type="text" id="teamer1--${pageName}" name="teamer1" data-map="TEAMER_1" class="form-control" />
<input type="text" id="teamer2--${pageName}" name="teamer2" data-map="TEAMER_2" class="form-control" /> <input type="text" id="teamer2--${pageName}" name="teamer2" data-map="TEAMER_2" class="form-control" />
@ -404,7 +404,7 @@ $(document).ready(function(){
var clsForTask = $("#taskSeCd--${pageName}").val().toLowerCase(); var clsForTask = $("#taskSeCd--${pageName}").val().toLowerCase();
//업무별 입력 항목 //업무별 입력 항목
var editSlotAreas = $("#frmEdit--${pageName}").find("div[slot='edit']"); var editSlotAreas = $("#frmEdit--${pageName}").find("[slot='edit']");
editSlotAreas.each(function(){ editSlotAreas.each(function(){
var tempHtml = ""; var tempHtml = "";
@ -413,18 +413,13 @@ $(document).ready(function(){
}); });
var taskTemplate = $(this).find("template."+clsForTask); var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){ if(taskTemplate.length < 1){
this.innerHTML = tempHtml; this.innerHTML = tempHtml;
} else { return;
var editContent = taskTemplate[0].content;
var taskItem = $(editContent).find("slot[name='edit']");
if(taskItem.length > 0){
this.innerHTML = tempHtml + taskItem[0].innerHTML;
} else {
this.innerHTML = tempHtml;
}
} }
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
}); });

@ -101,18 +101,16 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="slot-search" data-slot-index="0"></div> <div slot="search" class="col-6">
</div> <template class="pvs dpv eca">
</div> <slot>
</form>
<template id="taskSearchOption--${pageName}">
<div class="pvs dpv eca col-6 slot-search" data-slot-index="0">
<label class="form-label fw-bold form-search-title">견인</label> <label class="form-label fw-bold form-search-title">견인</label>
<input type="radio" name="temp1" value="Y" />예 <input type="radio" name="temp1" value="Y" />예
<input type="radio" name="temp1" value="N" />아니오 <input type="radio" name="temp1" value="N" />아니오
</div> </slot>
<div class="bpv col-6 slot-search" data-slot-index="0"> </template>
<template class="bpv">
<slot>
<label class="form-label fw-bold form-search-title">전용차로구분</label> <label class="form-label fw-bold form-search-title">전용차로구분</label>
<select name="temp2" class="form-select"> <select name="temp2" class="form-select">
<option value="">전체</option> <option value="">전체</option>
@ -120,8 +118,12 @@
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
</select> </select>
</div> </slot>
</template> </template>
</div>
</div>
</div>
</form>
<div> <div>
<div class="container-page-btn"> <div class="container-page-btn">
@ -300,17 +302,22 @@ $(document).ready(function(){
var clsForTask = taskSeCd.toLowerCase(); var clsForTask = taskSeCd.toLowerCase();
//업무별 조회조건 //업무별 조회조건
var searchOptionContent = document.getElementById("taskSearchOption--${pageName}").content; var searchSlotAreas = $("#frmSearch--${pageName}").find("[slot='search']");
var searchOptions = $(searchOptionContent).find("."+clsForTask);
var searchSlotAreas = $("#frmSearch--${pageName}").find(".slot-search");
searchSlotAreas.each(function(){ searchSlotAreas.each(function(){
var searchOption = searchOptions.filter("[data-slot-index='"+this.dataset.slotIndex+"']");
if(searchOption.length > 0){ var tempHtml = "";
this.replaceWith(searchOption[0].cloneNode(true)); $(this).find("template").each(function(){
} else { tempHtml += this.cloneNode(true).outerHTML;
this.classList.remove("pvs","bpv","dpv","eca"); });
this.innerHTML = "";
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
} }
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
}); });
//업무별 그리드 //업무별 그리드

@ -78,8 +78,15 @@
<input type="checkbox" name="schOnlyUnpay" class="form-check-input" /> <input type="checkbox" name="schOnlyUnpay" class="form-check-input" />
미납만조회 미납만조회
</label> </label>
<span class="slot-search" data-slot-index="0"> <span slot="search">
<template class="pvs">
<slot>
<label class="area-photoinspection">
<input type="checkbox" name="schExclTimeout" class="form-check-input" />
2시간초과제외
</label>
</slot>
</template>
</span> </span>
<span class="flr"> <span class="flr">
<button type="button" class="btn btn-open-detail" <button type="button" class="btn btn-open-detail"
@ -125,16 +132,6 @@
</div> </div>
</div> </div>
</form> </form>
<!-- 업무별 조회조건 -->
<template id="taskSearchOption--${pageName}">
<span class="pvs slot-search" data-slot-index="0">
<label class="area-photoinspection">
<input type="checkbox" name="schExclTimeout" class="form-check-input" />
2시간초과제외
</label>
</span>
</template>
<div id="gridbuttonArea--${pageName}" class="container-page-btn"> <div id="gridbuttonArea--${pageName}" class="container-page-btn">
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
@ -151,21 +148,16 @@
</div> </div>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button class="btn btn-primary" id="btnInstLevyExcl--${pageName}" title="비부과 등록">비부과 등록</button> <button class="btn btn-primary" id="btnInstLevyExcl--${pageName}" title="비부과 등록">비부과 등록</button>
<%-- <a href="#" id="btnInstLevyExcl--${pageName}" class="btn btn-blue" title="비부과 등록">비부과 등록</a> --%> <span slot="button">
<span class="slot-button" data-slot-index="0"> <template class="pvs">
<slot>
<button class="btn btn-primary" id="btnInstTimeout--${pageName}" title="2시간초과 등록">2시간초과 등록</button>
</slot>
</template>
</span> </span>
</span> </span>
</div> </div>
<!-- 업무별 버튼 -->
<template id="taskButton--${pageName}">
<span class="pvs slot-button" data-slot-index="0">
<a href="#" id="btnInstTimeout--${pageName}" class="btn btn-blue" title="2시간초과 등록"
onclick="">2시간초과 등록</a>
</span>
</template>
<div class="card-datatable text-nowrap area-photoinspection"> <div class="card-datatable text-nowrap area-photoinspection">
<div id="photoInspection_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer"> <div id="photoInspection_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="photoInspection-responsive--${pageName}" class="table-responsive" <div id="photoInspection-responsive--${pageName}" class="table-responsive"
@ -445,31 +437,41 @@ $(document).ready(function(){
var clsForTask = taskSeCd.toLowerCase(); var clsForTask = taskSeCd.toLowerCase();
//업무별 조회조건 //업무별 조회조건
var searchOptionContent = document.getElementById("taskSearchOption--${pageName}").content; var searchSlotAreas = $("#frmSearch--${pageName}").find("[slot='search']");
var searchOptions = $(searchOptionContent).find("."+clsForTask);
var searchSlotAreas = $("#frmSearch--${pageName}").find(".slot-search");
searchSlotAreas.each(function(){ searchSlotAreas.each(function(){
var searchOption = searchOptions.filter("[data-slot-index='"+this.dataset.slotIndex+"']");
if(searchOption.length > 0){ var tempHtml = "";
this.replaceWith(searchOption[0].cloneNode(true)); $(this).find("template").each(function(){
} else { tempHtml += this.cloneNode(true).outerHTML;
this.classList.remove("pvs","bpv","dpv","eca"); });
this.innerHTML = "";
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
} }
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
}); });
//업무별 버튼 //업무별 버튼
var buttonContent = document.getElementById("taskButton--${pageName}").content var buttonSlotAreas = $("#gridbuttonArea--${pageName}").find("[slot='button']");
var buttons = $(buttonContent).find("."+clsForTask);
var buttonSlotAreas = $("#gridbuttonArea--${pageName}").find(".slot-button");
buttonSlotAreas.each(function(){ buttonSlotAreas.each(function(){
var button = buttons.filter("[data-slot-index='"+this.dataset.slotIndex+"']");
if(button.length > 0){ var tempHtml = "";
this.replaceWith(button[0].cloneNode(true)); $(this).find("template").each(function(){
} else { tempHtml += this.cloneNode(true).outerHTML;
this.className = "slot-button"; });
this.innerHTML = "";
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
} }
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
}); });
$('#btnPhotoInspection--${pageName}').trigger("click"); $('#btnPhotoInspection--${pageName}').trigger("click");

Loading…
Cancel
Save