개별총정보 - 단속자료 수정 추가.
parent
0deac61623
commit
e1fbe82357
@ -0,0 +1,329 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||
|
||||
<c:set var="prefixName" scope="request">단속자료 수정</c:set>
|
||||
|
||||
<!-- Page Body -->
|
||||
<div class="card">
|
||||
<!-- 입력 영역 -->
|
||||
<form id="frmEdit--${pageName}" name="frmEdit">
|
||||
<!-- hidden -->
|
||||
<input type="hidden" id="crdnId--${pageName}" name="crdnId" data-map="CRDN_ID" />
|
||||
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" />
|
||||
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" data-map="TASK_SE_CD" />
|
||||
|
||||
<div class="row g-1">
|
||||
<!-- 단속 일자 -->
|
||||
<div class="col-md-6">
|
||||
<label for="crdnYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">단속일자</label>
|
||||
<input type="text" class="form-control form-date" id="crdnYmd--${pageName}" name="crdnYmd" data-map="CRDN_YMD" data-fmt-type="day" maxlength="10" required />
|
||||
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
||||
</div>
|
||||
<!-- 단속 시간 -->
|
||||
<div class="col-md-6">
|
||||
<label for="crdnTm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">단속시간</label>
|
||||
<input type="text" class="form-control form-time" id="crdnTm--${pageName}" name="crdnTm" data-map="CRDN_TM" data-fmt-type="time" maxlength="8" required placeholder="시:분:초" />
|
||||
</div>
|
||||
<!-- 차량번호 -->
|
||||
<div class="col-md-6">
|
||||
<label for="vhrno--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차량번호</label>
|
||||
<input type="text" class="form-control w-30" id="vhrno--${pageName}" name="vhrno" data-map="VHRNO" readonly />
|
||||
</div>
|
||||
<!-- 위반 내용 -->
|
||||
<div class="col-md-6">
|
||||
<label for="vltnCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">위반내용</label>
|
||||
<select id="vltnCd--${pageName}" class="form-select" name="vltnCd" data-map="VLTN_CD">
|
||||
<c:forEach items="${VLTNList}" var="item">
|
||||
<option value="${item.code}">${item.value}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<!-- 법정동 -->
|
||||
<div class="col-md-6 select2-primary">
|
||||
<label for="crdnStdgNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">법정동</label>
|
||||
<input type="text" class="form-control w-px-150" id="crdnStdgNm--${pageName}" name="crdnStdgNm" data-map="CRDN_STDG_NM" list="stdgNmList--${pageName}" />
|
||||
<datalist id="stdgNmList--${pageName}">
|
||||
<c:forEach items="${stdgNmList}" var="item">
|
||||
<option value="${item}"></option>
|
||||
</c:forEach>
|
||||
</datalist>
|
||||
</div>
|
||||
<!-- 도로명 -->
|
||||
<div class="col-md-6 select2-primary">
|
||||
<label for="crdnRoadNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">도로명</label>
|
||||
<input type="text" class="form-control" id="crdnRoadNm--${pageName}" name="crdnRoadNm" data-map="CRDN_ROAD_NM" />
|
||||
</div>
|
||||
<!-- 단속 장소 -->
|
||||
<div class="col-md-12">
|
||||
<label for="crdnPlc--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">단속장소</label>
|
||||
<input type="text" class="form-control w-80" id="crdnPlc--${pageName}" name="crdnPlc" data-map="CRDN_PLC" data-maxlengthb="200" />
|
||||
</div>
|
||||
<!-- 상세 단속 장소 -->
|
||||
<div class="col-md-12" slot="edit">
|
||||
<template class="bpv">
|
||||
<slot>
|
||||
<label for="dtlCrdnPlc--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">상세단속장소</label>
|
||||
<input type="text" class="form-control w-80" id="dtlCrdnPlc--${pageName}" name="dtlCrdnPlc" data-map="DTL_CRDN_PLC" data-maxlenghb="200" />
|
||||
</slot>
|
||||
</template>
|
||||
</div>
|
||||
<div class="col-md-6" slot="edit">
|
||||
<template class="pvs">
|
||||
<slot>
|
||||
<label for="crdnSpareaCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">특별구역</label>
|
||||
<select class="form-select" id="crdnSpareaCd--${pageName}" name="crdnSpareaCd" data-map="CRDN_SPAREA_CD">
|
||||
<c:forEach items="${FIM007List}" var="item">
|
||||
<option value="${item.code}">${item.value}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</slot>
|
||||
</template>
|
||||
</div>
|
||||
<div class="col-md-6" slot="edit">
|
||||
<template class="pvs">
|
||||
<slot>
|
||||
<label for="towngYnNm--${pageName}">
|
||||
<input type="checkbox" class="form-check-input" id="towngYnNm--${pageName}" name="towngYnNm" data-map="TOWNG_YN_NM" />견인여부
|
||||
</label>
|
||||
</slot>
|
||||
</template>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label for="etcCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">특기사항</label>
|
||||
<input type="text" class="form-control w-80" id="etcCn--${pageName}" name="etcCn" data-map="ETC_CN" data-maxlengthb="1000" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="vin--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차대번호</label>
|
||||
<input type="text" class="form-control" id="vin--${pageName}" name="vin" data-map="VIN" readonly placeholder="입력항목이 아닙니다." />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="vhclNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차량명칭</label>
|
||||
<input type="text" class="form-control" id="vhclNm--${pageName}" name="vhclNm" data-map="VHCL_NM" readonly placeholder="입력항목이 아닙니다." />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="vhclColor--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차량색상</label>
|
||||
<input type="text" class="form-control" id="vhclColor--${pageName}" name="vhclColor" data-map="VHCL_COLOR" readonly placeholder="입력항목이 아닙니다." />
|
||||
</div>
|
||||
<div class="col-md-12" slot="edit">
|
||||
<template class="pvs bpv">
|
||||
<slot>
|
||||
<label for="ffnlgCarmdlCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">차종</label>
|
||||
<select class="form-select" id="ffnlgCarmdlCd--${pageName}" name ="ffnlgCarmdlCd" data-map="FFNLG_CARMDL_CD">
|
||||
<option value=""></option>
|
||||
<c:forEach items="${FIM009List}" var="item">
|
||||
<option value="${item.code}">${item.value}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</slot>
|
||||
</template>
|
||||
</div>
|
||||
<div class="col-md-12" slot="edit">
|
||||
<template class="eca">
|
||||
<slot>
|
||||
<label for="useFuelCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">연료구분</label>
|
||||
<select id="useFuelCd--${pageName}" class="form-select" name="useFuelCd" data-map="USE_FUEL_CD" disabled>
|
||||
<option value=""></option>
|
||||
<c:forEach items="${LVS005List}" 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>
|
||||
<label for="towngYn--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">견인지시</label>
|
||||
<select class="form-select" id="towngYn--${pageName}" name="towngYn" 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>
|
||||
<label for="crdnSn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">스티커번호</label>
|
||||
<input type="text" class="form-control" id="crdnSn--${pageName}" name="crdnSn" data-map="CRDN_SN" maxlength="20" data-maxlengthb="20" />
|
||||
</slot>
|
||||
</template>
|
||||
</div>
|
||||
<div class="col-md-4" slot="edit">
|
||||
<template class="dpv">
|
||||
<slot>
|
||||
<label for="parkngPsbltyRsltCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">장애차량확인</label>
|
||||
<select class="form-select" id="parkngPsbltyRsltCd--${pageName}" name="parkngPsbltyRsltCd" data-map="PARKNG_PSBLTY_RSLT_CD">
|
||||
<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>
|
||||
<label for="teamId--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">단속조</label>
|
||||
<select class="form-select" id="teamId--${pageName}" name="teamId" data-map="TEAM_ID">
|
||||
<option value=""></option>
|
||||
<c:forEach items="${TeamList}" var="item">
|
||||
<option value="${item.TEAM_ID}">${item.TEAM_NM}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</slot>
|
||||
</template>
|
||||
</div>
|
||||
<div class="col-md-12" slot="edit">
|
||||
<template class="pvs bpv">
|
||||
<slot>
|
||||
<label class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">단속원</label>
|
||||
<input type="text" class="form-control" id="teamer1--${pageName}" name="teamer1" data-map="TEAMER_1" />
|
||||
<input type="text" class="form-control" id="teamer2--${pageName}" name="teamer2" data-map="TEAMER_2" />
|
||||
<input type="text" class="form-control" id="teamer3--${pageName}" name="teamer3" data-map="TEAMER_3" />
|
||||
<input type="text" class="form-control" id="teamer4--${pageName}" name="teamer4" data-map="TEAMER_4" />
|
||||
</slot>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- /입력 영역 -->
|
||||
</div>
|
||||
<!-- <div class="card"> -->
|
||||
|
||||
<!-- 업무 버튼 표시 -->
|
||||
<div>
|
||||
<span class="container-page-btn">
|
||||
<span class="container-window-btn-right">
|
||||
<!-- 업무 버튼 -->
|
||||
<button type="button" class="btn btn-primary" id="btnSave--${pageName}" title="저장" onclick="fnSave${pageName}()">저장</button>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- / 업무 버튼 표시 -->
|
||||
|
||||
<script>
|
||||
/**************************************************************************
|
||||
* Global Variable
|
||||
**************************************************************************/
|
||||
// URL
|
||||
var ${pageName}PrefixUrl = "/crdn/crdn06";
|
||||
// FormFields
|
||||
var ${pageName}Fields = new FormFields("#frmEdit--${pageName}");
|
||||
|
||||
/**************************************************************************
|
||||
* DatasetControl
|
||||
**************************************************************************/
|
||||
var ${pageName}Control = new DatasetControl({
|
||||
prefix : "crdn"
|
||||
, prefixName : "단속"
|
||||
, keymapper : info => info ? info.CRDN_ID : ""
|
||||
, dataGetter : obj => obj.crdnInfo
|
||||
, urls : {
|
||||
update : wctx.url(${pageName}PrefixUrl + "/020/update.do") // 수정
|
||||
}
|
||||
, formats : {
|
||||
CRDN_YMD : dateFormat
|
||||
, CRDN_TM : timeFormat
|
||||
}
|
||||
});
|
||||
|
||||
${pageName}Control.onCurrentChange = item => {
|
||||
// Dataset 셋팅
|
||||
${pageName}Fields.set(item);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* DatasetControl 이벤트
|
||||
**************************************************************************/
|
||||
// 저장 callback
|
||||
${pageName}Control.onSave = (resp) => {
|
||||
let dialogTitle = $("#" + ${pageName}Control.prefix + "Dialog").find("h5.modal-title").html();
|
||||
let showMessage = resp.retMessage.replace(/[S]|[F]/g, dialogTitle);
|
||||
|
||||
dialog.alert(showMessage);
|
||||
|
||||
if (resp.saved) {
|
||||
// 폼을 리셋해서 uploadFiles에 출력된 선택 파일을 초기화시킨다.
|
||||
document.getElementById("frmFile--${pageName}").reset();
|
||||
|
||||
dialog.close(${pageName}Control.prefix + "Dialog");
|
||||
}
|
||||
}
|
||||
|
||||
// 저장
|
||||
${pageName}Control.save = (info) => {
|
||||
if (!info) return;
|
||||
|
||||
ajax.post({
|
||||
url : !create ? ${pageName}Control.urls.update : ${pageName}Control.urls.create
|
||||
, data : formData
|
||||
, contentType : false
|
||||
, processData : false
|
||||
, success : resp => ${pageName}Control.onSave(resp)
|
||||
});
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* 초기 셋팅
|
||||
**************************************************************************/
|
||||
// 검색조건 초기값 셋팅
|
||||
function initForm${pageName}() {
|
||||
// 달력 초기화
|
||||
initDatepicker("frmEdit--${pageName}");
|
||||
$("#rcptYmd--${pageName}").datepicker("setDate", new Date());
|
||||
}
|
||||
|
||||
// 이벤트 설정
|
||||
function setEvent${pageName}() {
|
||||
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
|
||||
$("#frmEdit--${pageName}").find(".form-date").each(function() {
|
||||
$(this).on("input",function() {
|
||||
let value = this.value.replaceAll("-", "");
|
||||
|
||||
if (value.length > 7) {
|
||||
this.value = value.substring(0,4) + "-" + value.substring(4,6) + "-" + value.substring(6);
|
||||
} else if(value.length > 5) {
|
||||
this.value = value.substring(0,4) + "-" + value.substring(4);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#btnAddFile--${pageName}").on('click', () => { $("#uploadFiles--${pageName}").trigger("click"); });
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* function
|
||||
**************************************************************************/
|
||||
// 저장
|
||||
function fnSave${pageName}() {
|
||||
// validate 확인
|
||||
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
|
||||
|
||||
dialog.alert({
|
||||
content : "현재 " + ${pageName}Control.prefixName + " 정보를 저장하시겠습니까?"
|
||||
, onOK : () => {
|
||||
${pageName}Control.save(${pageName}Fields.get());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* script 진입
|
||||
**************************************************************************/
|
||||
$(document).ready(function() {
|
||||
// 이벤트 설정
|
||||
setEvent${pageName}();
|
||||
|
||||
// 화면 초기 설정
|
||||
initForm${pageName}();
|
||||
|
||||
// Dataset 셋팅 - 단건일 경우 setData
|
||||
${pageName}Control.setData([${crdnInfo}]);
|
||||
});
|
||||
|
||||
// #sourceURL=excl01020-info.jsp
|
||||
</script>
|
Loading…
Reference in New Issue