면제차량 수정 화면 추가
parent
afc95a70dc
commit
a75f78c24a
@ -0,0 +1,173 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||||
|
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<form id="frmEdit--${pageName}">
|
||||||
|
<input type="hidden" id="exmptnVhclId--${pageName}" name="exmptnVhclId" data-map="EXMPTN_VHCL_ID" />
|
||||||
|
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" />
|
||||||
|
|
||||||
|
<div class="row g-1">
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<label for="vhrno--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end required">
|
||||||
|
차량번호
|
||||||
|
</label>
|
||||||
|
<input type="text" id="vhrno--${pageName}" name="vhrno" data-map="VHRNO" class="form-control"
|
||||||
|
data-maxlengthb="30" required />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<label class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
|
||||||
|
면제기간
|
||||||
|
</label>
|
||||||
|
<input type="text" id="exmptnBgngYmd--${pageName}" name="exmptnBgngYmd" data-map="EXMPTN_BGNG_YMD"
|
||||||
|
class="form-control form-date" data-fmt-type="day" title="시작 날짜 선택" />
|
||||||
|
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
||||||
|
~
|
||||||
|
<input type="text" id="exmptnEndYmd--${pageName}" name="exmptnEndYmd" data-map="EXMPTN_END_YMD"
|
||||||
|
class="form-control form-date" data-fmt-type="day" title="종료 날짜 선택">
|
||||||
|
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<label for="exmptnRsn--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
|
||||||
|
면제 사유
|
||||||
|
</label>
|
||||||
|
<input type="text" id="exmptnRsn--${pageName}" name="exmptnRsn" data-map="EXMPTN_RSN"
|
||||||
|
class="form-control w-px-300" data-maxlengthb="1000" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<label for="docNo--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
|
||||||
|
공문번호
|
||||||
|
</label>
|
||||||
|
<input type="text" id="docNo--${pageName}" name="docNo" data-map="DOC_NO"
|
||||||
|
class="form-control w-px-300" data-maxlengthb="100" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<label for="ownrNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">
|
||||||
|
소유주명
|
||||||
|
</label>
|
||||||
|
<input type="text" id="ownrNm--${pageName}" name="ownrNm" data-map="OWNR_NM"
|
||||||
|
class="form-control w-px-300" data-maxlengthb="200" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mt-4 justify-content-end mb-3">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="row justify-content-end">
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<button type="button" id="btnSave--${pageName}" class="btn btn-primary">저장</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**************************************************************************
|
||||||
|
* Global Variable
|
||||||
|
**************************************************************************/
|
||||||
|
|
||||||
|
pageObject["${pageName}"] = {};
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
var $P = pageObject["${pageName}"];
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DatasetControl, Dataset, FormFields
|
||||||
|
**************************************************************************/
|
||||||
|
$P.formFields = new FimsFormFields("#frmEdit--${pageName}");
|
||||||
|
|
||||||
|
$P.exmptnVhclControl = new DatasetControl({
|
||||||
|
urls : {
|
||||||
|
load : "",
|
||||||
|
create : wctx.url("/BPV/crdn/crdn08/020/create.do"),
|
||||||
|
update : wctx.url("/BPV/crdn/crdn08/020/update.do")
|
||||||
|
},
|
||||||
|
keymapper : info => info ? info.EXMPTN_VHCL_ID : "",
|
||||||
|
dataGetter : obj => obj.exmptnVhclInfo,
|
||||||
|
formats : {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$P.exmptnVhclControl.setInfo = (item) => {
|
||||||
|
$P.formFields.set(item);
|
||||||
|
|
||||||
|
var create = isEmpty(item.EXMPTN_VHCL_ID);
|
||||||
|
$("#vhrno--${pageName}").prop("readonly", !create);
|
||||||
|
}
|
||||||
|
|
||||||
|
$P.exmptnVhclControl.save = (info) => {
|
||||||
|
if (!info) return;
|
||||||
|
var item = $P.exmptnVhclControl.getCurrent("item"),
|
||||||
|
create = "added" == item.state;
|
||||||
|
|
||||||
|
ajax.post({
|
||||||
|
url : !create ? $P.exmptnVhclControl.urls.update : $P.exmptnVhclControl.urls.create,
|
||||||
|
data : info,
|
||||||
|
success : resp => $P.exmptnVhclControl.onSave(resp)
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DatasetControl.on, Dataset.on
|
||||||
|
**************************************************************************/
|
||||||
|
|
||||||
|
$P.exmptnVhclControl.onSave = (resp) => {
|
||||||
|
if (resp.saved) {
|
||||||
|
dialog.alert("저장됐습니다.");
|
||||||
|
dialog.close("exmptnvhcldialog");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/**************************************************************************
|
||||||
|
* pageObject.function
|
||||||
|
**************************************************************************/
|
||||||
|
|
||||||
|
$P.fnSave = () => {
|
||||||
|
|
||||||
|
if(!customValidate($("#frmEdit--${pageName} input"))) return;
|
||||||
|
|
||||||
|
if(confirm("면제 차량 정보를 저장하시겠습니까?")){
|
||||||
|
$P.exmptnVhclControl.save($P.formFields.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* element.on
|
||||||
|
**************************************************************************/
|
||||||
|
$("#btnSave--${pageName}").on('click', () => $P.fnSave());
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* 초기화
|
||||||
|
**************************************************************************/
|
||||||
|
initDatepicker("frmEdit--${pageName}"); //달력 초기화
|
||||||
|
|
||||||
|
$("#frmEdit--${pageName}").find(".form-date").each(function(){
|
||||||
|
$(this).on("input",function(){
|
||||||
|
var 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//보안모드
|
||||||
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
||||||
|
|
||||||
|
var exmptnVhclInfo = ${exmptnVhclInfo};
|
||||||
|
$P.exmptnVhclControl.setInfo(exmptnVhclInfo);
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Reference in New Issue