엔터키 이벤트 처리 수정

main
이범준 10 months ago
parent 64b1d45cd7
commit 864b2b543b

@ -549,102 +549,102 @@ $(document).ready(function(){
$P.fnDisplay(); $P.fnDisplay();
}); });
$("#vhrno--${pageName}").on("keyup",function(e){ $("#vhrno--${pageName}").onEnterPress(function(){
var alertDialogId = "alertDialog"; var alertDialogId = "alertDialog";
if(e.key == "Enter"){ var crdnYmd = $("#crdnYmd--${pageName}").val().replaceAll("-", "");
var crdnYmd = $("#crdnYmd--${pageName}").val().replaceAll("-", ""); var vhrnoEl = event.target;
var vhrno = this.value; var vhrno = vhrnoEl.value;
if(crdnYmd == ""){ if(crdnYmd == ""){
dialog.alert({ dialog.alert({
content : "단속일자를 입력하세요.", content : "단속일자를 입력하세요.",
init : function(){ focusClose(); }, init : function(){ focusClose(); },
onClose : function(){ $("#crdnYmd--${pageName}").focus(); } onClose : function(){ $("#crdnYmd--${pageName}").focus(); }
}); });
return;
}
if(vhrno == ""){
dialog.alert({
content:"차량번호를 입력하세요.",
init : function(){ focusClose(); },
onClose:function(){ $("#vhrno--${pageName}").focus(); }
});
return;
}
json.post({ return;
url: wctx.url("/payer/vehicle.do"), }
data: { if(vhrno == ""){
sggCd : $("#sggCd--${pageName}").val(), dialog.alert({
vhrno : vhrno, content:"차량번호를 입력하세요.",
levy_stdde : crdnYmd init : function(){ focusClose(); },
}, onClose:function(){ $(vhrnoEl).focus(); }
success:resp => { });
if(!resp.found){ return;
dialog.alert({ }
content : "차량정보가 없습니다.",
init : function(){ focusClose(); } json.post({
}); url: wctx.url("/payer/vehicle.do"),
$("#rtpyrId--${pageName}").val(""); data: {
$("#rtpyrNm--${pageName}").val(""); sggCd : $("#sggCd--${pageName}").val(),
$("#rtpyrSeCd--${pageName}").val(""); vhrno : vhrno,
$("#rtpyrNo--${pageName}").val(""); levy_stdde : crdnYmd
$("#vin--${pageName}").val(""); },
$("#vhclNm--${pageName}").val(""); success:resp => {
$("#vhclColor--${pageName}").val(""); if(!resp.found){
$("#useFuelCd--${pageName}").val(""); dialog.alert({
$("#ffnlgCarmdlCd--${pageName}").val(""); content : "차량정보가 없습니다.",
$("#zip--${pageName}").val(""); init : function(){ focusClose(); }
$("#addr--${pageName}").val(""); });
$("#dtlAddr--${pageName}").val(""); $("#rtpyrId--${pageName}").val("");
return; $("#rtpyrNm--${pageName}").val("");
} $("#rtpyrSeCd--${pageName}").val("");
$("#rtpyrNo--${pageName}").val("");
$("#rtpyrId--${pageName}").val(resp.rtpyrId); $("#vin--${pageName}").val("");
$("#vhclNm--${pageName}").val("");
var vehicle = resp.vehicle; $("#vhclColor--${pageName}").val("");
$("#useFuelCd--${pageName}").val("");
$("#rtpyrNm--${pageName}").val(vehicle.mber_nm); $("#ffnlgCarmdlCd--${pageName}").val("");
$("#zip--${pageName}").val("");
var pyrSeCd = ""; $("#addr--${pageName}").val("");
switch(vehicle.mber_se_code){ $("#dtlAddr--${pageName}").val("");
case "11" : pyrSeCd = "01"; break; return;
case "12" : pyrSeCd = "02"; break; }
case "13" : pyrSeCd = "03"; break;
case "14" : pyrSeCd = "04"; break; $("#rtpyrId--${pageName}").val(resp.rtpyrId);
case "15" : pyrSeCd = "05"; break;
} var vehicle = resp.vehicle;
$("#rtpyrSeCd--${pageName}").val(pyrSeCd);
$("#rtpyrNm--${pageName}").val(vehicle.mber_nm);
var pyrSeCd = "";
switch(vehicle.mber_se_code){
case "11" : pyrSeCd = "01"; break;
case "12" : pyrSeCd = "02"; break;
case "13" : pyrSeCd = "03"; break;
case "14" : pyrSeCd = "04"; break;
case "15" : pyrSeCd = "05"; break;
}
$("#rtpyrSeCd--${pageName}").val(pyrSeCd);
$("#rtpyrNo--${pageName}").val(vehicle.mber_se_no); $("#rtpyrNo--${pageName}").val(vehicle.mber_se_no);
$("#vin--${pageName}").val(vehicle.vin); $("#vin--${pageName}").val(vehicle.vin);
$("#vhclNm--${pageName}").val(vehicle.cnm); $("#vhclNm--${pageName}").val(vehicle.cnm);
$("#vhclColor--${pageName}").val(vehicle.color_nm); $("#vhclColor--${pageName}").val(vehicle.color_nm);
$("#useFuelCd--${pageName}").val(vehicle.use_fuel_code); $("#useFuelCd--${pageName}").val(vehicle.use_fuel_code);
if(vehicle.vhcty_asort_code == "1"){ //승용 if(vehicle.vhcty_asort_code == "1"){ //승용
$("#ffnlgCarmdlCd--${pageName}").val("11"); $("#ffnlgCarmdlCd--${pageName}").val("11");
} else if(vehicle.vhcty_asort_code == "2"){ //승합 } else if(vehicle.vhcty_asort_code == "2"){ //승합
$("#ffnlgCarmdlCd--${pageName}").val("12"); $("#ffnlgCarmdlCd--${pageName}").val("12");
} else if(vehicle.vhcty_asort_code == "3"){ //화물 } else if(vehicle.vhcty_asort_code == "3"){ //화물
if(vehicle.mxmm_ldg <= 4000){ if(vehicle.mxmm_ldg <= 4000){
$("#ffnlgCarmdlCd--${pageName}").val("13"); $("#ffnlgCarmdlCd--${pageName}").val("13");
} else {
$("#ffnlgCarmdlCd--${pageName}").val("14");
}
} else if(vehicle.vhcty_asort_code == "4"){ //특수
$("#ffnlgCarmdlCd--${pageName}").val("15");
} else { } else {
$("#ffnlgCarmdlCd--${pageName}").val(""); $("#ffnlgCarmdlCd--${pageName}").val("14");
} }
} else if(vehicle.vhcty_asort_code == "4"){ //특수
$("#zip--${pageName}").val(vehicle.zip_code); //우편번호 $("#ffnlgCarmdlCd--${pageName}").val("15");
$("#addr--${pageName}").val(vehicle.road_nm_adres); //주소 } else {
$("#dtlAddr--${pageName}").val(vehicle.use_strnghld_adres_nm); //상세주소 $("#ffnlgCarmdlCd--${pageName}").val("");
} }
});
} $("#zip--${pageName}").val(vehicle.zip_code); //우편번호
$("#addr--${pageName}").val(vehicle.road_nm_adres); //주소
$("#dtlAddr--${pageName}").val(vehicle.use_strnghld_adres_nm); //상세주소
}
});
}); });

@ -445,12 +445,7 @@
}); });
}); });
$("#vhrno--${pageName}").on("keyup", function(e) { $("#vhrno--${pageName}").onEnterPress(getVehicle${pageName});
if (e.key == "Enter") {
// 차적 조회
getVehicle${pageName}();
}
});
} }
/************************************************************************** /**************************************************************************

@ -847,102 +847,103 @@ $(document).ready(function(){
//차적조회 //차적조회
$("#vhrno--${pageName}").on("keyup",function(e){ $("#vhrno--${pageName}").onEnterPress(function(){
if(e.key == "Enter"){
var crdnYmd = $("#crdnYmd--${pageName}").val().replaceAll("-", "");
var vhrno = this.value;
if(crdnYmd == ""){
dialog.alert({
content:"단속일자를 입력하세요.",
init : function() { focusClose(); },
onClose:function(){ $("#crdnYmd--${pageName}").focus(); }
});
return;
}
if(vhrno == ""){
dialog.alert({
content:"차량번호를 입력하세요.",
init : function() { focusClose(); },
onClose:function(){ $(this).focus(); }
});
return;
}
json.post({ var crdnYmd = $("#crdnYmd--${pageName}").val().replaceAll("-", "");
url: wctx.url("/payer/vehicle.do"), var vhrnoEl = event.target;
data: { var vhrno = vhrnoEl.value;
sggCd : $("#sggCd--${pageName}").val(), if(crdnYmd == ""){
vhrno : vhrno, dialog.alert({
levy_stdde : crdnYmd content:"단속일자를 입력하세요.",
}, init : function() { focusClose(); },
success:resp => { onClose:function(){ $("#crdnYmd--${pageName}").focus(); }
});
return;
}
if(vhrno == ""){
dialog.alert({
content:"차량번호를 입력하세요.",
init : function() { focusClose(); },
onClose:function(){ $(vhrnoEl).focus(); }
});
return;
}
if(!resp.found){ json.post({
dialog.alert({ url: wctx.url("/payer/vehicle.do"),
content : "차량 정보가 없습니다.", data: {
init : function() { focusClose(); } sggCd : $("#sggCd--${pageName}").val(),
}); vhrno : vhrno,
levy_stdde : crdnYmd
},
success:resp => {
$("#rtpyrId--${pageName}").val(""); if(!resp.found){
$("#rtpyrNm--${pageName}").val(""); dialog.alert({
$("#rtpyrSeCd--${pageName}").val(""); content : "차량 정보가 없습니다.",
$("#rtpyrNo--${pageName}").val(""); init : function() { focusClose(); }
$("#vin--${pageName}").val(""); });
$("#vhclNm--${pageName}").val("");
$("#vhclColor--${pageName}").val(""); $("#rtpyrId--${pageName}").val("");
$("#useFuelCd--${pageName}").val(""); $("#rtpyrNm--${pageName}").val("");
$("#ffnlgCarmdlCd--${pageName}").val(""); $("#rtpyrSeCd--${pageName}").val("");
$("#zip--${pageName}").val(""); $("#rtpyrNo--${pageName}").val("");
$("#addr--${pageName}").val(""); $("#vin--${pageName}").val("");
$("#dtlAddr--${pageName}").val(""); $("#vhclNm--${pageName}").val("");
return; $("#vhclColor--${pageName}").val("");
} $("#useFuelCd--${pageName}").val("");
$("#ffnlgCarmdlCd--${pageName}").val("");
$("#zip--${pageName}").val("");
$("#addr--${pageName}").val("");
$("#dtlAddr--${pageName}").val("");
return;
}
$("#rtpyrId--${pageName}").val(resp.rtpyrId); $("#rtpyrId--${pageName}").val(resp.rtpyrId);
var vehicle = resp.vehicle; var vehicle = resp.vehicle;
$("#rtpyrNm--${pageName}").val(vehicle.mber_nm); $("#rtpyrNm--${pageName}").val(vehicle.mber_nm);
var pyrSeCd = ""; var pyrSeCd = "";
switch(vehicle.mber_se_code){ switch(vehicle.mber_se_code){
case "11" : pyrSeCd = "01"; break; case "11" : pyrSeCd = "01"; break;
case "12" : pyrSeCd = "02"; break; case "12" : pyrSeCd = "02"; break;
case "13" : pyrSeCd = "03"; break; case "13" : pyrSeCd = "03"; break;
case "14" : pyrSeCd = "04"; break; case "14" : pyrSeCd = "04"; break;
case "15" : pyrSeCd = "05"; break; case "15" : pyrSeCd = "05"; break;
} }
$("#rtpyrSeCd--${pageName}").val(pyrSeCd); $("#rtpyrSeCd--${pageName}").val(pyrSeCd);
$("#rtpyrNo--${pageName}").val(vehicle.mber_se_no); $("#rtpyrNo--${pageName}").val(vehicle.mber_se_no);
$("#vin--${pageName}").val(vehicle.vin); $("#vin--${pageName}").val(vehicle.vin);
$("#vhclNm--${pageName}").val(vehicle.cnm); $("#vhclNm--${pageName}").val(vehicle.cnm);
$("#vhclColor--${pageName}").val(vehicle.color_nm); $("#vhclColor--${pageName}").val(vehicle.color_nm);
$("#useFuelCd--${pageName}").val(vehicle.use_fuel_code); $("#useFuelCd--${pageName}").val(vehicle.use_fuel_code);
if(vehicle.vhcty_asort_code == "1"){ //승용 if(vehicle.vhcty_asort_code == "1"){ //승용
$("#ffnlgCarmdlCd--${pageName}").val("11"); $("#ffnlgCarmdlCd--${pageName}").val("11");
} else if(vehicle.vhcty_asort_code == "2"){ //승합 } else if(vehicle.vhcty_asort_code == "2"){ //승합
$("#ffnlgCarmdlCd--${pageName}").val("12"); $("#ffnlgCarmdlCd--${pageName}").val("12");
} else if(vehicle.vhcty_asort_code == "3"){ //화물 } else if(vehicle.vhcty_asort_code == "3"){ //화물
if(vehicle.mxmm_ldg <= 4000){ if(vehicle.mxmm_ldg <= 4000){
$("#ffnlgCarmdlCd--${pageName}").val("13"); $("#ffnlgCarmdlCd--${pageName}").val("13");
} else {
$("#ffnlgCarmdlCd--${pageName}").val("14");
}
} else if(vehicle.vhcty_asort_code == "4"){ //특수
$("#ffnlgCarmdlCd--${pageName}").val("15");
} else { } else {
$("#ffnlgCarmdlCd--${pageName}").val(""); $("#ffnlgCarmdlCd--${pageName}").val("14");
} }
} else if(vehicle.vhcty_asort_code == "4"){ //특수
$("#zip--${pageName}").val(vehicle.zip_code); //우편번호 $("#ffnlgCarmdlCd--${pageName}").val("15");
$("#addr--${pageName}").val(vehicle.road_nm_adres); //주소 } else {
$("#dtlAddr--${pageName}").val(vehicle.use_strnghld_adres_nm); //상세주소 $("#ffnlgCarmdlCd--${pageName}").val("");
} }
});
} $("#zip--${pageName}").val(vehicle.zip_code); //우편번호
$("#addr--${pageName}").val(vehicle.road_nm_adres); //주소
$("#dtlAddr--${pageName}").val(vehicle.use_strnghld_adres_nm); //상세주소
}
});
}); });
if("${taskSeCd}" == "DPV"){ if("${taskSeCd}" == "DPV"){

@ -47,18 +47,19 @@
<script src="<c:url value="/resources/3rd-party/sneat/js/helpers.js?${ver}"/>"></script> <script src="<c:url value="/resources/3rd-party/sneat/js/helpers.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/libs/jquery/jquery.js?${ver}"/>"></script> <script src="<c:url value="/resources/3rd-party/sneat/js/config.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/libs/popper/popper.js?${ver}"/>"></script> <script src="<c:url value="/resources/3rd-party/sneat/libs/popper/popper.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/js/bootstrap.js?${ver}"/>"></script> <script src="<c:url value="/resources/3rd-party/sneat/js/bootstrap.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/libs/jquery/jquery.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/libs/perfect-scrollbar/perfect-scrollbar.js?${ver}"/>"></script> <script src="<c:url value="/resources/3rd-party/sneat/libs/perfect-scrollbar/perfect-scrollbar.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/js/menu.js?${ver}"/>"></script> <script src="<c:url value="/resources/3rd-party/sneat/js/menu.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/libs/jstree/jstree.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/jstree/jstree-support.js?${ver}"/>"></script> <!-- Core JS for base -->
<script src="<c:url value="/resources/3rd-party/sneat/js/config.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/libs/chartjs/chartjs.js?${ver}"/>"></script>
<script src="<c:url value="/resources/lib/fims/framework/jquery-ui/1.13.2/jquery-ui.js?${ver}"/>"></script> <script src="<c:url value="/resources/lib/fims/framework/jquery-ui/1.13.2/jquery-ui.js?${ver}"/>"></script>
<!-- base -->
<script src="<c:url value="/resources/js/base/base.js?${ver}"/>"></script>
<!-- json, xhtml --> <!-- json, xhtml -->
<script src="<c:url value="/resources/lib/fims/biz/paintweb/korean.js?${ver}"/>"></script> <script src="<c:url value="/resources/lib/fims/biz/paintweb/korean.js?${ver}"/>"></script>
<script src="<c:url value="/resources/lib/fims/biz/paintweb/paintweb-config.js?${ver}"/>"></script> <script src="<c:url value="/resources/lib/fims/biz/paintweb/paintweb-config.js?${ver}"/>"></script>
@ -147,10 +148,8 @@ $(document).ready(function(){
$("input[name='vhclNm']").val(vhclInfo.vhclNm); $("input[name='vhclNm']").val(vhclInfo.vhclNm);
$("input[name='vhclColor']").val(vhclInfo.vhclColor); $("input[name='vhclColor']").val(vhclInfo.vhclColor);
$("input[name='vhrno']").on("keyup", function(e){ $("input[name='vhrno']").onEnterPress(function(){
if(e.key == "Enter"){ fnCarLink(event.target.value);
fnCarLink(this.value);
}
}); });
} }
} else { } else {

@ -12,9 +12,11 @@
<script src="<c:url value="/resources/3rd-party/sneat/libs/jquery/jquery.js?${ver}"/>"></script> <script src="<c:url value="/resources/3rd-party/sneat/libs/jquery/jquery.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/libs/perfect-scrollbar/perfect-scrollbar.js?${ver}"/>"></script> <script src="<c:url value="/resources/3rd-party/sneat/libs/perfect-scrollbar/perfect-scrollbar.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/js/menu.js?${ver}"/>"></script> <script src="<c:url value="/resources/3rd-party/sneat/js/menu.js?${ver}"/>"></script>
<!-- Core JS for base -->
<script src="<c:url value="/resources/lib/fims/framework/jquery-ui/1.13.2/jquery-ui.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/sneat/libs/jstree/jstree.js?${ver}"/>"></script> <script src="<c:url value="/resources/3rd-party/sneat/libs/jstree/jstree.js?${ver}"/>"></script>
<script src="<c:url value="/resources/3rd-party/jstree/jstree-support.js?${ver}"/>"></script> <script src="<c:url value="/resources/3rd-party/jstree/jstree-support.js?${ver}"/>"></script>
<script src="<c:url value="/resources/lib/fims/framework/jquery-ui/1.13.2/jquery-ui.js?${ver}"/>"></script>
<!-- base --> <!-- base -->
<script src="<c:url value="/resources/js/base/base.js?${ver}"/>"></script> <script src="<c:url value="/resources/js/base/base.js?${ver}"/>"></script>

@ -338,11 +338,7 @@ $("#btnFastSearch--top").on( "click", function() {
doFastSearch(); doFastSearch();
}); });
$("#fastTerm--top").on("keyup", function(e){ $("#fastTerm--top").onEnterPress(doFastSearch);
if(e.key == "Enter"){
doFastSearch();
}
});
function doFastSearch(){ function doFastSearch(){
closeTab("17"); closeTab("17");

Loading…
Cancel
Save