From f8d3456a5b1e34f002a12d9c99a909f0776a651a Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 25 Jan 2024 14:29:59 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=BC=EC=9B=90=EC=83=81=EC=84=B8=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=ED=99=94=EB=A9=B4=20=EC=B0=A8=EC=A0=81=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp | 134 ++++++++---------- 1 file changed, 63 insertions(+), 71 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp index feeec74f..b522f769 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp @@ -863,7 +863,7 @@ $(document).ready(function(){ //차적조회 - $("#vhrno--${pageName}").onEnterPress(function(){ + $("#vhrno--${pageName}").onEnterPress(async function(){ var crdnYmd = $("#crdnYmd--${pageName}").val().replaceAll("-", ""); var vhrnoEl = event.target; @@ -890,84 +890,76 @@ $(document).ready(function(){ }); return; } - - json.post({ - url: wctx.url("/payer/vehicle.do"), - data: { - sggCd : $("#sggCd--${pageName}").val(), - vhrno : vhrno, - levy_stdde : crdnYmd - }, - success:resp => { - - if(!resp.found){ - dialog.alert({ - content : "차량 정보가 없습니다.", - init : function() { - setDialogZindex(); - focusClose(); - } - }); - - $("#rtpyrId--${pageName}").val(""); - $("#rtpyrNm--${pageName}").val(""); - $("#rtpyrSeCd--${pageName}").val(""); - $("#rtpyrNo--${pageName}").val(""); - $("#vin--${pageName}").val(""); - $("#vhclNm--${pageName}").val(""); - $("#vhclColor--${pageName}").val(""); - $("#useFuelCd--${pageName}").val(""); - $("#ffnlgCarmdlCd--${pageName}").val(""); - $("#zip--${pageName}").val(""); - $("#addr--${pageName}").val(""); - $("#dtlAddr--${pageName}").val(""); - return; + + var resp = await getVhclInfo($("#sggCd--${pageName}").val(), vhrno, crdnYmd); + + if(!resp.found){ + dialog.alert({ + content : "차량 정보가 없습니다.", + init : function() { + setDialogZindex(); + focusClose(); } + }); - $("#rtpyrId--${pageName}").val(resp.rtpyrId); + $("#rtpyrId--${pageName}").val(""); + $("#rtpyrNm--${pageName}").val(""); + $("#rtpyrSeCd--${pageName}").val(""); + $("#rtpyrNo--${pageName}").val(""); + $("#vin--${pageName}").val(""); + $("#vhclNm--${pageName}").val(""); + $("#vhclColor--${pageName}").val(""); + $("#useFuelCd--${pageName}").val(""); + $("#ffnlgCarmdlCd--${pageName}").val(""); + $("#zip--${pageName}").val(""); + $("#addr--${pageName}").val(""); + $("#dtlAddr--${pageName}").val(""); + return; + } - var vehicle = resp.vehicle; + $("#rtpyrId--${pageName}").val(resp.rtpyrId); - $("#rtpyrNm--${pageName}").val(vehicle.mber_nm); + var vehicle = resp.vehicle; - 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); + $("#rtpyrNm--${pageName}").val(vehicle.mber_nm); - $("#rtpyrNo--${pageName}").val(vehicle.mber_se_no); + 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); + + $("#vin--${pageName}").val(vehicle.vin); + $("#vhclNm--${pageName}").val(vehicle.cnm); + $("#vhclColor--${pageName}").val(vehicle.color_nm); + $("#useFuelCd--${pageName}").val(vehicle.use_fuel_code); + + if(vehicle.vhcty_asort_code == "1"){ //승용 + $("#ffnlgCarmdlCd--${pageName}").val("11"); + } else if(vehicle.vhcty_asort_code == "2"){ //승합 + $("#ffnlgCarmdlCd--${pageName}").val("12"); + } else if(vehicle.vhcty_asort_code == "3"){ //화물 + if(vehicle.mxmm_ldg <= 4000){ + $("#ffnlgCarmdlCd--${pageName}").val("13"); + } else { + $("#ffnlgCarmdlCd--${pageName}").val("14"); + } + } else if(vehicle.vhcty_asort_code == "4"){ //특수 + $("#ffnlgCarmdlCd--${pageName}").val("15"); + } else { + $("#ffnlgCarmdlCd--${pageName}").val(""); + } - $("#vin--${pageName}").val(vehicle.vin); - $("#vhclNm--${pageName}").val(vehicle.cnm); - $("#vhclColor--${pageName}").val(vehicle.color_nm); - $("#useFuelCd--${pageName}").val(vehicle.use_fuel_code); + $("#zip--${pageName}").val(vehicle.zip_code); //우편번호 + $("#addr--${pageName}").val(vehicle.road_nm_adres); //주소 + $("#dtlAddr--${pageName}").val(vehicle.use_strnghld_adres_nm); //상세주소 - if(vehicle.vhcty_asort_code == "1"){ //승용 - $("#ffnlgCarmdlCd--${pageName}").val("11"); - } else if(vehicle.vhcty_asort_code == "2"){ //승합 - $("#ffnlgCarmdlCd--${pageName}").val("12"); - } else if(vehicle.vhcty_asort_code == "3"){ //화물 - if(vehicle.mxmm_ldg <= 4000){ - $("#ffnlgCarmdlCd--${pageName}").val("13"); - } else { - $("#ffnlgCarmdlCd--${pageName}").val("14"); - } - } else if(vehicle.vhcty_asort_code == "4"){ //특수 - $("#ffnlgCarmdlCd--${pageName}").val("15"); - } else { - $("#ffnlgCarmdlCd--${pageName}").val(""); - } - - $("#zip--${pageName}").val(vehicle.zip_code); //우편번호 - $("#addr--${pageName}").val(vehicle.road_nm_adres); //주소 - $("#dtlAddr--${pageName}").val(vehicle.use_strnghld_adres_nm); //상세주소 - } - }); });