|
|
|
@ -1,14 +1,15 @@
|
|
|
|
|
<%@ 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>
|
|
|
|
|
|
|
|
|
|
<!-- inner page html -->
|
|
|
|
|
<div class="content-wrapper">
|
|
|
|
|
<!-- Content -->
|
|
|
|
|
<div class="container-xxl flex-grow-1 px-0">
|
|
|
|
|
<c:set var="prefixName" scope="request">단속자료 수정</c:set>
|
|
|
|
|
|
|
|
|
|
<!-- Page Body -->
|
|
|
|
|
<div class="card">
|
|
|
|
|
|
|
|
|
|
<!-- 입력 영역 -->
|
|
|
|
|
<form id="frmEdit--${pageName}" name="frmEdit">
|
|
|
|
|
<!-- hidden -->
|
|
|
|
@ -60,7 +61,7 @@
|
|
|
|
|
법정동
|
|
|
|
|
</label>
|
|
|
|
|
<input type="text" id="crdnStdgNm--${pageName}" name="crdnStdgNm"
|
|
|
|
|
class="form-control w-50" data-map="CRDN_STDG_NM" list="stdgNmList--${pageName}" />
|
|
|
|
|
class="form-control w-40" data-map="CRDN_STDG_NM" list="stdgNmList--${pageName}" />
|
|
|
|
|
<datalist id="stdgNmList--${pageName}">
|
|
|
|
|
<c:forEach items="${stdgNmList}" var="item">
|
|
|
|
|
<option value="${item}"></option>
|
|
|
|
@ -74,7 +75,7 @@
|
|
|
|
|
도로명
|
|
|
|
|
</label>
|
|
|
|
|
<input type="text" id="crdnRoadNm--${pageName}" name="crdnRoadNm"
|
|
|
|
|
class="form-control w-50" data-map="CRDN_ROAD_NM" />
|
|
|
|
|
class="form-control w-40" data-map="CRDN_ROAD_NM" />
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 단속 장소 -->
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
@ -117,11 +118,12 @@
|
|
|
|
|
<div class="col-md-6" slot="edit">
|
|
|
|
|
<template class="pvs">
|
|
|
|
|
<slot>
|
|
|
|
|
<label for="towngYnNm--${pageName}">
|
|
|
|
|
<input type="checkbox" id="towngYnNm--${pageName}" name="towngYnNm"
|
|
|
|
|
class="form-check-input" data-map="TOWNG_YN_NM" />
|
|
|
|
|
견인여부
|
|
|
|
|
</label>
|
|
|
|
|
<label for="ovtimeYn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">2시간초과</label>
|
|
|
|
|
<select class="form-select" id="ovtimeYn--${pageName}" name="ovtimeYn" data-map="OVTIME_YN" required>
|
|
|
|
|
<c:forEach items="${CMN006List}" var="item">
|
|
|
|
|
<option value="${item.code}">${item.value}</option>
|
|
|
|
|
</c:forEach>
|
|
|
|
|
</select>
|
|
|
|
|
</slot>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
@ -161,7 +163,7 @@
|
|
|
|
|
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">
|
|
|
|
|
차종
|
|
|
|
|
</label>
|
|
|
|
|
<select id="ffnlgCarmdlCd--${pageName}" name ="ffnlgCarmdlCd"
|
|
|
|
|
<select id="ffnlgCarmdlCd--${pageName}" name="ffnlgCarmdlCd"
|
|
|
|
|
class="form-select" data-map="FFNLG_CARMDL_CD">
|
|
|
|
|
<option value=""></option>
|
|
|
|
|
<c:forEach items="${FIM009List}" var="item">
|
|
|
|
@ -232,39 +234,6 @@
|
|
|
|
|
</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 id="teamId--${pageName}" name="teamId" class="form-select" 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" id="teamer1--${pageName}" name="teamer1"
|
|
|
|
|
class="form-control" data-map="TEAMER_1" />
|
|
|
|
|
<input type="text" id="teamer2--${pageName}" name="teamer2"
|
|
|
|
|
class="form-control" data-map="TEAMER_2" />
|
|
|
|
|
<input type="text" id="teamer3--${pageName}" name="teamer3"
|
|
|
|
|
class="form-control" data-map="TEAMER_3" />
|
|
|
|
|
<input type="text" id="teamer4--${pageName}" name="teamer4"
|
|
|
|
|
class="form-control" data-map="TEAMER_4" />
|
|
|
|
|
</slot>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<!-- /입력 영역 -->
|
|
|
|
@ -298,10 +267,8 @@
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
// pageObject
|
|
|
|
|
var $P = pageObject["${pageName}"];
|
|
|
|
|
let $P = pageObject["${pageName}"];
|
|
|
|
|
|
|
|
|
|
// URL
|
|
|
|
|
$P.PrefixUrl = "/crdn/crdn06";
|
|
|
|
|
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
|
|
|
|
|
$P.callPurpose = "${callPurpose}";
|
|
|
|
|
// FormFields
|
|
|
|
@ -311,43 +278,43 @@
|
|
|
|
|
* DatasetControl
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.control = new DatasetControl({
|
|
|
|
|
prefix : "crdn"
|
|
|
|
|
, prefixName : "단속"
|
|
|
|
|
, keymapper : info => info ? info.CRDN_ID : ""
|
|
|
|
|
, dataGetter : obj => obj.crdnInfo
|
|
|
|
|
prefix: "crdn"
|
|
|
|
|
, prefixName: "단속"
|
|
|
|
|
, keymapper: info => info ? info.CRDN_ID : ""
|
|
|
|
|
, dataGetter: obj => obj.crdnInfo
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl 이벤트
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.control.onCurrentChange = (DI) => {
|
|
|
|
|
if (!DI) return;
|
|
|
|
|
$P.control.onCurrentChange = (item) => {
|
|
|
|
|
if (!item) return;
|
|
|
|
|
|
|
|
|
|
// Dataset 셋팅
|
|
|
|
|
$P.formFields.set($P.control,DI);
|
|
|
|
|
// 1. 업무별 입력 항목
|
|
|
|
|
$P.fnRenderTask(item.data.TASK_SE_CD);
|
|
|
|
|
|
|
|
|
|
// 업무별 입력 항목
|
|
|
|
|
$P.renderTask(DI.data.TASK_SE_CD);
|
|
|
|
|
// 2. Dataset 셋팅
|
|
|
|
|
$P.formFields.set($P.control, item);
|
|
|
|
|
|
|
|
|
|
// 업무구분에 따른 URL 변경
|
|
|
|
|
$P.setURL(DI.data.TASK_SE_CD);
|
|
|
|
|
// 3. 업무구분에 따른 URL 변경
|
|
|
|
|
$P.fnSetURL(item.data.TASK_SE_CD);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 저장 callback
|
|
|
|
|
$P.control.onSave = (resp) => {
|
|
|
|
|
let dialogTitle = $("#" + $P.control.prefix + "Dialog").find("h5.modal-title").html();
|
|
|
|
|
let dialogTitle = $("#" + $P.control.prefix + "Dialog--${openerPageName}").find("h5.modal-title").html();
|
|
|
|
|
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
|
|
|
|
|
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : showMessage,
|
|
|
|
|
init : function(){
|
|
|
|
|
content: showMessage
|
|
|
|
|
, init: function() {
|
|
|
|
|
setDialogZindex();
|
|
|
|
|
focusClose();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (resp.saved) {
|
|
|
|
|
dialog.close($P.control.prefix + "Dialog");
|
|
|
|
|
dialog.close($P.control.prefix + "Dialog--${openerPageName}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -356,9 +323,9 @@
|
|
|
|
|
if (!info) return;
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url : $P.control.urls.update
|
|
|
|
|
, data : info
|
|
|
|
|
, success : resp => $P.control.onSave(resp)
|
|
|
|
|
url: $P.control.urls.update
|
|
|
|
|
, data: info || {}
|
|
|
|
|
, success: resp => $P.control.onSave(resp)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -366,24 +333,27 @@
|
|
|
|
|
* 사용자 함수(function)
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 업무별 입력 항목
|
|
|
|
|
$P.renderTask = (taskSeCd) => {
|
|
|
|
|
$P.fnRenderTask = (taskSeCd) => {
|
|
|
|
|
if (taskSeCd == undefined || taskSeCd == null || taskSeCd == "") {
|
|
|
|
|
taskSeCd = $("#taskSeCd--${pageName}").val().toLowerCase();
|
|
|
|
|
} else {
|
|
|
|
|
taskSeCd = taskSeCd.toLowerCase();
|
|
|
|
|
taskSeCd = $("#taskSeCd--${pageName}").val();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
renderForTask("frmEdit--${pageName}", taskSeCd);
|
|
|
|
|
renderForTask("frmEdit--${pageName}", taskSeCd.toLowerCase());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 업무구분에 따른 URL 설정
|
|
|
|
|
$P.fnSetURL = (taskSeCd) => {
|
|
|
|
|
$P.control.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/020/update.do"); // 수정
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 차적 조회
|
|
|
|
|
$P.getVehicle = (params) => {
|
|
|
|
|
$P.fnGetVehicle = (params) => {
|
|
|
|
|
if (!params) return;
|
|
|
|
|
|
|
|
|
|
json.post({
|
|
|
|
|
url : wctx.url("/payer/vehicle.do")
|
|
|
|
|
, data : params || {}
|
|
|
|
|
, success : resp => {
|
|
|
|
|
url: wctx.url("/payer/vehicle.do")
|
|
|
|
|
, data: params || {}
|
|
|
|
|
, success: resp => {
|
|
|
|
|
// 항목 초기화
|
|
|
|
|
$("#vin--${pageName}").val("");
|
|
|
|
|
$("#vhclNm--${pageName}").val("");
|
|
|
|
@ -393,8 +363,8 @@
|
|
|
|
|
|
|
|
|
|
if (!resp.found) {
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : "차량 정보가 없습니다.",
|
|
|
|
|
init : function(){
|
|
|
|
|
content: "차량 정보가 없습니다.",
|
|
|
|
|
init: function() {
|
|
|
|
|
setDialogZindex();
|
|
|
|
|
focusClose();
|
|
|
|
|
}
|
|
|
|
@ -432,9 +402,6 @@
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 버튼 clickEvent
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 차적 조회
|
|
|
|
|
$P.fnVehicle = (title) => {
|
|
|
|
|
let crdnYmd = $("#crdnYmd--${pageName}").val().replaceAll("-", "");
|
|
|
|
@ -443,42 +410,43 @@
|
|
|
|
|
// 단속일자
|
|
|
|
|
if (crdnYmd == "") {
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : "단속일자를 입력하세요.",
|
|
|
|
|
init : function(){
|
|
|
|
|
content: "단속일자를 입력하세요.",
|
|
|
|
|
init: function() {
|
|
|
|
|
setDialogZindex();
|
|
|
|
|
focusClose();
|
|
|
|
|
},
|
|
|
|
|
onClose : function() { $("#crdnYmd--${pageName}").focus(); }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// 차량번호
|
|
|
|
|
if (vhrno == "") {
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : "차량번호를 입력하세요.",
|
|
|
|
|
init : function(){
|
|
|
|
|
content: "차량번호를 입력하세요.",
|
|
|
|
|
init: function() {
|
|
|
|
|
setDialogZindex();
|
|
|
|
|
focusClose();
|
|
|
|
|
},
|
|
|
|
|
onClose : function() { $("#vhrno--${pageName}").focus(); }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let params = {
|
|
|
|
|
inqire_se_code : "3"
|
|
|
|
|
, sggCd : $("#sggCd--${pageName}").val()
|
|
|
|
|
, levy_stdde : crdnYmd
|
|
|
|
|
, vhrno : vhrno
|
|
|
|
|
, sggCd: $("#sggCd--${pageName}").val()
|
|
|
|
|
, levy_stdde: crdnYmd
|
|
|
|
|
, vhrno: vhrno
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.getVehicle(params);
|
|
|
|
|
$P.fnGetVehicle(params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 버튼 clickEvent
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 저장
|
|
|
|
|
$P.fnSave = (title) => {
|
|
|
|
|
$P.fnSave = () => {
|
|
|
|
|
// validate 확인
|
|
|
|
|
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
|
|
|
|
|
|
|
|
|
@ -488,17 +456,12 @@
|
|
|
|
|
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
|
|
|
|
|
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?",
|
|
|
|
|
init : function(){
|
|
|
|
|
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
|
|
|
|
|
, init: function() {
|
|
|
|
|
setDialogZindex();
|
|
|
|
|
focusOK();
|
|
|
|
|
},
|
|
|
|
|
onOK : () => {
|
|
|
|
|
// 파리미터 설정
|
|
|
|
|
let params = $P.formFields.get(); // formFields
|
|
|
|
|
params.title = title; // 타이틀
|
|
|
|
|
|
|
|
|
|
$P.control.save(params);
|
|
|
|
|
}, onOK: () => {
|
|
|
|
|
$P.control.save($P.formFields.get()); // formFields
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -539,31 +502,22 @@
|
|
|
|
|
$P.fnVehicle("차적 조회");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// 차량번호 조회 버튼 이벤트
|
|
|
|
|
$("#btnVehicle--${pageName}").on("click", function() {
|
|
|
|
|
$P.fnVehicle($(this).attr("title"));
|
|
|
|
|
});
|
|
|
|
|
// 저장 버튼 이벤트
|
|
|
|
|
$("#btnSave--${pageName}").on("click", function() {
|
|
|
|
|
$P.fnSave($(this).attr("title"));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 버튼 이벤트
|
|
|
|
|
$("#btnVehicle--${pageName}").on("click", () => $P.fnVehicle()); // 차량번호 조회
|
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 초기 화면 설정
|
|
|
|
|
$P.initForm = () => {
|
|
|
|
|
// Dialog 마우스로 드래그 할 수 있도록 설정.
|
|
|
|
|
fnMakeDraggableDialog(document.getElementById($P.control.prefix + "Dialog"));
|
|
|
|
|
fnMakeDraggableDialog(document.getElementById($P.control.prefix + "Dialog--${openerPageName}"));
|
|
|
|
|
|
|
|
|
|
// 달력 초기화
|
|
|
|
|
initDatepicker("frmEdit--${pageName}");
|
|
|
|
|
$("#crdnYmd--${pageName}").datepicker("setDate", TODAY());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 업무구분에 따른 URL 설정
|
|
|
|
|
$P.setURL = (taskSeCd) => {
|
|
|
|
|
$P.control.urls.update = wctx.url("/" + taskSeCd + $P.PrefixUrl + "/020/update.do"); // 수정
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 최초 실행 함수
|
|
|
|
|
**************************************************************************/
|
|
|
|
|