단속자료 입력시 차적조회 추가

main
이범준 1 year ago
parent bbc21392c4
commit e2ab14aa36

@ -97,13 +97,15 @@ public class Crdn05Controller extends ApplicationController {
switch(urlTaskSeCd) { switch(urlTaskSeCd) {
case "PVS" -> { case "PVS" -> {
commonCodes = getCodesOf("FIM002","FIM007"); commonCodes = getCodesOf("FIM002","FIM007","FIM009");
mav.addObject("FIM002List", commonCodes.get("FIM002")); mav.addObject("FIM002List", commonCodes.get("FIM002"));
mav.addObject("FIM007List", commonCodes.get("FIM007")); mav.addObject("FIM007List", commonCodes.get("FIM007"));
mav.addObject("FIM009List", commonCodes.get("FIM009"));
} }
case "BPV" -> { case "BPV" -> {
commonCodes = getCodesOf("FIM002"); commonCodes = getCodesOf("FIM002","FIM009");
mav.addObject("FIM002List", commonCodes.get("FIM002")); mav.addObject("FIM002List", commonCodes.get("FIM002"));
mav.addObject("FIM009List", commonCodes.get("FIM009"));
} }
case "DPV" -> { case "DPV" -> {
commonCodes = getCodesOf("FIM034"); commonCodes = getCodesOf("FIM034");

@ -156,20 +156,6 @@
<input type="text" id="vin--${pageName}" name="vin" data-map="VIN" class="form-control" readonly <input type="text" id="vin--${pageName}" name="vin" data-map="VIN" class="form-control" readonly
placeholder="입력항목이 아닙니다." /> placeholder="입력항목이 아닙니다." />
</div> </div>
<div class="col-md-4" slot="edit">
<template class="pvs bpv">
<slot>
<label class="w-px-130 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>
<label class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">차종</label>
</slot>
</template>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="vhclNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">차량명칭</label> <label for="vhclNm--${pageName}" class="w-px-130 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 <input type="text" id="vhclNm--${pageName}" name="vhclNm" data-map="VHCL_NM" class="form-control" readonly
@ -180,14 +166,31 @@
<input type="text" id="vhclColor--${pageName}" name="vhclColor" data-map="VHCL_COLOR" class="form-control" readonly <input type="text" id="vhclColor--${pageName}" name="vhclColor" data-map="VHCL_COLOR" class="form-control" readonly
placeholder="입력항목이 아닙니다." /> placeholder="입력항목이 아닙니다." />
</div> </div>
<div class="col-md-4"> <div class="col-md-12" slot="edit">
<template class="pvs bpv">
<slot>
<label for="ffnlgCarmdlCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차종</label>
<select id="ffnlgCarmdlCd--${pageName}" name ="ffnlgCarmdlCd" data-map="FFNLG_CARMDL_CD" class="form-select" disabled>
<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-130 bg-lighter pe-2 col-form-label text-sm-end">연료구분</label> <label for="useFuelCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">연료구분</label>
<select id="useFuelCd--${pageName}" name="useFuelCd" data-map="USE_FUEL_CD" class="form-select" disabled> <select id="useFuelCd--${pageName}" name="useFuelCd" data-map="USE_FUEL_CD" class="form-select" disabled>
<c:forEach items="${LVS005List}" var="item">
<option value=""></option> <option value=""></option>
<c:forEach items="${LVS005List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
</select> </select>
</slot>
</template>
</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">
@ -599,6 +602,102 @@ $(document).ready(function(){
$P.fnDisplay(false); $P.fnDisplay(false);
}); });
$("#vhrno--${pageName}").on("keyup",function(e){
if(e.key == "Enter"){
var crdnYmd = $("#crdnYmd--${pageName}").val().replaceAll("-", "");
var vhrno = this.value;
if(crdnYmd == ""){
dialog.alert({
content:"단속일자를 입력하세요.",
onClose:function(){ $("#crdnYmd--${pageName}").focus(); }
});
return;
}
if(vhrno == ""){
dialog.alert({
content:"차량번호를 입력하세요.",
onClose:function(){ $(this).focus(); }
});
return;
}
json.post({
url: wctx.url("/api/lvis/basicInfo.do"),
data: JSON.stringify({
vhrno : vhrno,
levy_stdde : crdnYmd
}),
success:resp => {
if(resp.basicInfo != null && resp.basicInfo.vhrno != null){
var basicInfo = resp.basicInfo;
$("#rtpyrNm--${pageName}").val(basicInfo.mber_nm);
if(basicInfo.mber_se_code == "11"){
$("#rtpyrSeCd--${pageName}").val("01");
} else if(basicInfo.mber_se_code == "12"){
$("#rtpyrSeCd--${pageName}").val("02");
} else if(basicInfo.mber_se_code == "13"){
$("#rtpyrSeCd--${pageName}").val("03");
} else if(basicInfo.mber_se_code == "14"){
$("#rtpyrSeCd--${pageName}").val("04");
} else if(basicInfo.mber_se_code == "15"){
$("#rtpyrSeCd--${pageName}").val("05");
} else {
$("#rtpyrSeCd--${pageName}").val("");
}
$("#rtpyrNo--${pageName}").val(basicInfo.mber_se_no);
$("#vin--${pageName}").val(basicInfo.vin);
$("#vhclNm--${pageName}").val(basicInfo.cnm);
$("#vhclColor--${pageName}").val(basicInfo.color_nm);
$("#useFuelCd--${pageName}").val(basicInfo.use_fuel_code);
if(basicInfo.vhcty_asort_code == "1"){ //승용
$("#ffnlgCarmdlCd--${pageName}").val("11");
} else if(basicInfo.vhcty_asort_code == "2"){ //승합
$("#ffnlgCarmdlCd--${pageName}").val("12");
} else if(basicInfo.vhcty_asort_code == "3"){ //화물
if(basicInfo.vhcle_tot_wt <= 4000){
$("#ffnlgCarmdlCd--${pageName}").val("13");
} else {
$("#ffnlgCarmdlCd--${pageName}").val("14");
}
} else if(basicInfo.vhcty_asort_code == "4"){ //특수
$("#ffnlgCarmdlCd--${pageName}").val("15");
} else {
//$("#ffnlgCarmdlCd--${pageName}").val("21"); //건설기계
//$("#ffnlgCarmdlCd--${pageName}").val("31"); //이륜차
}
//$("#--${pageName}").val(basicInfo.);
//$("#addr--${pageName}").val(basicInfo.); //주소
//$("#dtlAddr--${pageName}").val(basicInfo.); //상세주소
//$("#zip--${pageName}").val(basicInfo.); //우편번호
//"use_strnghld_legaldong_code" : "4136010300",
//"use_strnghld_adstrd_code" : "4136053000",
//"use_strnghld_mntn" : "",
//"use_strnghld_lnbr" : "",
//"use_strnghld_ho" : "",
//"use_strnghld_adres_nm" : "402호(금곡동, 힐하우스)",
//"use_strnghld_road_nm_code" : "413604391125",
//"usgsrhld_undgrnd_buld_se_code" : "0",
//"use_strnghld_buld_main_no" : "16",
//"use_strnghld_buld_sub_no" : "2",
}
}
});
}
});
/************************************************************************** /**************************************************************************
* 초기화 * 초기화
**************************************************************************/ **************************************************************************/

@ -128,20 +128,6 @@
<input type="text" id="vin--${pageName}" name="vin" data-map="VIN" class="form-control" readonly <input type="text" id="vin--${pageName}" name="vin" data-map="VIN" class="form-control" readonly
placeholder="입력항목이 아닙니다." /> placeholder="입력항목이 아닙니다." />
</div> </div>
<div class="col-md-4" slot="edit">
<template class="pvs bpv">
<slot>
<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>
<label class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차종</label>
</slot>
</template>
</div>
<div class="col-md-4"> <div class="col-md-4">
<label for="vhclNm--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차량명칭</label> <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 <input type="text" id="vhclNm--${pageName}" name="vhclNm" data-map="VHCL_NM" class="form-control" readonly
@ -152,14 +138,31 @@
<input type="text" id="vhclColor--${pageName}" name="vhclColor" data-map="VHCL_COLOR" class="form-control" readonly <input type="text" id="vhclColor--${pageName}" name="vhclColor" data-map="VHCL_COLOR" class="form-control" readonly
placeholder="입력항목이 아닙니다." /> placeholder="입력항목이 아닙니다." />
</div> </div>
<div class="col-md-4"> <div class="col-md-12" slot="edit">
<template class="pvs bpv">
<slot>
<label for="ffnlgCarmdlCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">차종</label>
<select id="ffnlgCarmdlCd--${pageName}" name ="ffnlgCarmdlCd" data-map="FFNLG_CARMDL_CD" class="form-select" disabled>
<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-150 bg-lighter pe-2 col-form-label text-sm-end">연료구분</label> <label for="useFuelCd--${pageName}" class="w-px-150 bg-lighter pe-2 col-form-label text-sm-end">연료구분</label>
<select id="useFuelCd--${pageName}" name="useFuelCd" data-map="USE_FUEL_CD" class="form-select" disabled> <select id="useFuelCd--${pageName}" name="useFuelCd" data-map="USE_FUEL_CD" class="form-select" disabled>
<c:forEach items="${LVS005List}" var="item">
<option value=""></option> <option value=""></option>
<c:forEach items="${LVS005List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
</select> </select>
</slot>
</template>
</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">
@ -436,6 +439,102 @@ $(document).ready(function(){
$P.fnDisplay(); $P.fnDisplay();
}); });
$("#vhrno--${pageName}").on("keyup",function(e){
if(e.key == "Enter"){
var crdnYmd = $("#crdnYmd--${pageName}").val().replaceAll("-", "");
var vhrno = this.value;
if(crdnYmd == ""){
dialog.alert({
content:"단속일자를 입력하세요.",
onClose:function(){ $("#crdnYmd--${pageName}").focus(); }
});
return;
}
if(vhrno == ""){
dialog.alert({
content:"차량번호를 입력하세요.",
onClose:function(){ $(this).focus(); }
});
return;
}
json.post({
url: wctx.url("/api/lvis/basicInfo.do"),
data: JSON.stringify({
vhrno : vhrno,
levy_stdde : crdnYmd
}),
success:resp => {
if(resp.basicInfo != null && resp.basicInfo.vhrno != null){
var basicInfo = resp.basicInfo;
$("#rtpyrNm--${pageName}").val(basicInfo.mber_nm);
if(basicInfo.mber_se_code == "11"){
$("#rtpyrSeCd--${pageName}").val("01");
} else if(basicInfo.mber_se_code == "12"){
$("#rtpyrSeCd--${pageName}").val("02");
} else if(basicInfo.mber_se_code == "13"){
$("#rtpyrSeCd--${pageName}").val("03");
} else if(basicInfo.mber_se_code == "14"){
$("#rtpyrSeCd--${pageName}").val("04");
} else if(basicInfo.mber_se_code == "15"){
$("#rtpyrSeCd--${pageName}").val("05");
} else {
$("#rtpyrSeCd--${pageName}").val("");
}
$("#rtpyrNo--${pageName}").val(basicInfo.mber_se_no);
$("#vin--${pageName}").val(basicInfo.vin);
$("#vhclNm--${pageName}").val(basicInfo.cnm);
$("#vhclColor--${pageName}").val(basicInfo.color_nm);
$("#useFuelCd--${pageName}").val(basicInfo.use_fuel_code);
if(basicInfo.vhcty_asort_code == "1"){ //승용
$("#ffnlgCarmdlCd--${pageName}").val("11");
} else if(basicInfo.vhcty_asort_code == "2"){ //승합
$("#ffnlgCarmdlCd--${pageName}").val("12");
} else if(basicInfo.vhcty_asort_code == "3"){ //화물
if(basicInfo.vhcle_tot_wt <= 4000){
$("#ffnlgCarmdlCd--${pageName}").val("13");
} else {
$("#ffnlgCarmdlCd--${pageName}").val("14");
}
} else if(basicInfo.vhcty_asort_code == "4"){ //특수
$("#ffnlgCarmdlCd--${pageName}").val("15");
} else {
//$("#ffnlgCarmdlCd--${pageName}").val("21"); //건설기계
//$("#ffnlgCarmdlCd--${pageName}").val("31"); //이륜차
}
//$("#--${pageName}").val(basicInfo.);
//$("#addr--${pageName}").val(basicInfo.); //주소
//$("#dtlAddr--${pageName}").val(basicInfo.); //상세주소
//$("#zip--${pageName}").val(basicInfo.); //우편번호
//"use_strnghld_legaldong_code" : "4136010300",
//"use_strnghld_adstrd_code" : "4136053000",
//"use_strnghld_mntn" : "",
//"use_strnghld_lnbr" : "",
//"use_strnghld_ho" : "",
//"use_strnghld_adres_nm" : "402호(금곡동, 힐하우스)",
//"use_strnghld_road_nm_code" : "413604391125",
//"usgsrhld_undgrnd_buld_se_code" : "0",
//"use_strnghld_buld_main_no" : "16",
//"use_strnghld_buld_sub_no" : "2",
}
}
});
}
});
/************************************************************************** /**************************************************************************
* 초기화 * 초기화
**************************************************************************/ **************************************************************************/

Loading…
Cancel
Save