수기등록 화면 수정

main
이범준 1 year ago
parent 84b1a0e5c7
commit cce5d52bba

@ -7,7 +7,18 @@
<input name="crdnId" type="hidden" data-map="CRDN_ID" />
<input id="taskSeCd--${pageName}" name="taskSeCd" type="hidden" value="${taskSeCd}" />
<div class="row g-1">
<div class="col-md-12 slot-edit" data-slot-index="0"></div>
<div class="col-md-12" slot="edit">
<template class="pvs bpv">
<slot name="edit">
<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">
<c:forEach items="${FIM002List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</slot>
</template>
</div>
<div class="col-md-4">
<label for="crdnYmd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end required">
위반일자
@ -51,8 +62,24 @@
<input type="text" id="crdnPlc--${pageName}" name="crdnPlc" data-map="CRDN_PLC" class="form-control"
data-maxlengthb="200" />
</div>
<div class="col-md-8 slot-edit" data-slot-index="1">
<div class="col-md-8" slot="edit">
<template class="bpv">
<slot name="edit">
<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"
data-maxlenghb="200" />
</slot>
</template>
<template class="pvs">
<slot name="edit">
<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">
<c:forEach items="${FIM007List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</slot>
</template>
</div>
<div class="col-md-12">
<label for="etcCn--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">특기사항</label>
@ -101,8 +128,20 @@
<input type="text" id="vin--${pageName}" name="vin" data-map="VIN" class="form-control" readonly
placeholder="입력항목이 아닙니다." />
</div>
<div class="col-md-4 slot-edit" data-slot-index="2"></div>
<div class="col-md-4 slot-edit" data-slot-index="3"></div>
<div class="col-md-4" slot="edit">
<template class="pvs bpv">
<slot name="edit">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차량구분</label>
</slot>
</template>
</div>
<div class="col-md-4" slot="edit">
<template class="pvs bpv">
<slot name="edit">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차종</label>
</slot>
</template>
</div>
<div class="col-md-4">
<label for="vhclNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차량명칭</label>
<input type="text" id="vhclNm--${pageName}" name="vhclNm" data-map="VHCL_NM" class="form-control" readonly
@ -122,11 +161,61 @@
</c:forEach>
</select>
</div>
<div class="col-md-4 slot-edit" data-slot-index="4"></div>
<div class="col-md-4 slot-edit" data-slot-index="5"></div>
<div class="col-md-4 slot-edit" data-slot-index="6"></div>
<div class="col-md-4 slot-edit" data-slot-index="7"></div>
<div class="col-md-4 slot-edit" data-slot-index="8"></div>
<div class="col-md-4" slot="edit">
<template class="dpv eca pvs">
<slot name="edit">
<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">
<c:forEach items="${FIM053List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</slot>
</template>
</div>
<div class="col-md-4" slot="edit">
<template class="dpv eca pvs">
<slot name="edit">
<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"
maxlength="20" data-maxlengthb="20" />
</slot>
</template>
</div>
<div class="col-md-4" slot="edit">
<template class="dpv">
<slot name="edit">
<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">
<c:forEach items="${FIM034List}" var="item">
<c:if test="${item.code == '0' or item.code == '1'}">
<option value="${item.code}">${item.value}</option>
</c:if>
</c:forEach>
</select>
</slot>
</template>
</div>
<div class="col-md-12" slot="edit">
<template class="pvs bpv">
<slot name="edit">
<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>
</slot>
</template>
</div>
<div class="col-md-12" slot="edit">
<template class="pvs bpv">
<slot name="edit">
<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="teamer2--${pageName}" name="teamer2" data-map="TEAMER_2" class="form-control" />
<input type="text" id="teamer3--${pageName}" name="teamer3" data-map="TEAMER_3" class="form-control" />
<input type="text" id="teamer4--${pageName}" name="teamer4" data-map="TEAMER_4" class="form-control" />
</slot>
</template>
</div>
<div class="col-md-6">
<label for="doGuidance--${pageName}">
<input type="checkbox" id="doGuidance--${pageName}" name="doGuidance" class="form-check-input" />계도처리
@ -164,77 +253,6 @@
</div>
</div>
<template id="taskItem--${pageName}">
<div class="col-md-12 pvs bpv slot-edit" data-slot-index="0">
<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">
<c:forEach items="${FIM002List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<div class="col-md-8 bpv slot-edit" data-slot-index="1">
<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"
data-maxlenghb="200" />
</div>
<div class="col-md-8 pvs slot-edit" data-slot-index="1">
<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">
<c:forEach items="${FIM007List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<div class="col-md-4 pvs bpv slot-edit" data-slot-index="2">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차량구분</label>
</div>
<div class="col-md-4 pvs bpv slot-edit" data-slot-index="3">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차종</label>
</div>
<div class="col-md-4 dpv eca pvs slot-edit" data-slot-index="4">
<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">
<c:forEach items="${FIM053List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<div class="col-md-4 dpv eca pvs slot-edit" data-slot-index="5">
<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"
maxlength="20" data-maxlengthb="20" />
</div>
<div class="col-md-4 dpv slot-edit" data-slot-index="6">
<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">
<c:forEach items="${FIM034List}" var="item">
<c:if test="${item.code == '0' or item.code == '1'}">
<option value="${item.code}">${item.value}</option>
</c:if>
</c:forEach>
</select>
</div>
<div class="col-md-12 pvs bpv slot-edit" data-slot-index="7">
<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>
</div>
<div class="col-md-12 pvs bpv slot-edit" data-slot-index="8">
<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="teamer2--${pageName}" name="teamer2" data-map="TEAMER_2" class="form-control" />
<input type="text" id="teamer3--${pageName}" name="teamer3" data-map="TEAMER_3" class="form-control" />
<input type="text" id="teamer4--${pageName}" name="teamer4" data-map="TEAMER_4" class="form-control" />
</div>
<div class="col-md-12 dpv eca">
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">
단속자,신고자
</label>
(보류)
</div>
</template>
</div>
<script>
@ -386,16 +404,26 @@ $(document).ready(function(){
var clsForTask = $("#taskSeCd--${pageName}").val().toLowerCase();
//업무별 입력 항목
var editContent = document.getElementById("taskItem--${pageName}").content;
var taskItems = $(editContent).find("."+clsForTask);
var editSlotAreas = $("#frmEdit--${pageName}").find(".slot-edit");
var editSlotAreas = $("#frmEdit--${pageName}").find("div[slot='edit']");
editSlotAreas.each(function(){
var taskItem = taskItems.filter("[data-slot-index='"+this.dataset.slotIndex+"']");
if(taskItem.length > 0){
this.replaceWith(taskItem[0].cloneNode(true));
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
} else {
this.classList.remove("pvs","bpv","dpv","eca");
this.innerHTML = "";
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;
}
}
});

Loading…
Cancel
Save