사진편집 화면에서 차적조회시 단속내역,민원상담내역, 장애인 표지까지 조회되도록 수정

main
이범준 10 months ago
parent 7a0657babc
commit 2edebc6ddc

@ -876,35 +876,55 @@ $(document).ready(function(){
//납부자 등록, 수정
$("#btnPopPayer--${pageName}").on("click", () => $P.fnPopPayer());
$("#vhrno--${pageName}").onEnterPress(function(){
$P.getVehicleTotalInfo(event.target);
});
//차적조회(단속내역,민원상담내역,차적기본조회,장애인표지조회)
$P.getVehicleTotalInfo = async function(vhrnoEl){
var otherWindow = false;
if(!vhrnoEl.id.endsWith("--${pageName}")){
otherWindow = true;
}
//차적조회
$("#vhrno--${pageName}").onEnterPress(async function(){
var taskSeCd = "${taskSeCd}";
var crdnYmd = $("#crdnYmd--${pageName}").val().replaceAll("-", "");
var vhrnoEl = event.target;
var vhrno = vhrnoEl.value;
if(crdnYmd == ""){
dialog.alert({
content:"단속일자를 입력하세요.",
init : function() {
setDialogZindex();
focusClose();
},
onClose:function(){ $("#crdnYmd--${pageName}").focus(); }
});
return;
if(!otherWindow){
dialog.alert({
content:"단속일자를 입력하세요.",
init : function() {
setDialogZindex();
focusClose();
},
onClose:function(){ $("#crdnYmd--${pageName}").focus(); }
});
return;
} else {
return {
msg : "단속일자를 입력하세요."
};
}
}
if(vhrno == ""){
dialog.alert({
content:"차량번호를 입력하세요.",
init : function() {
setDialogZindex();
focusClose();
},
onClose:function(){ $(vhrnoEl).focus(); }
});
return;
if(!otherWindow){
dialog.alert({
content:"차량번호를 입력하세요.",
init : function() {
setDialogZindex();
focusClose();
},
onClose:function(){ $(vhrnoEl).focus(); }
});
return;
} else {
return {
msg : "차량번호를 입력하세요."
};
}
}
var sggCd = $("#sggCd--${pageName}").val();
@ -931,14 +951,11 @@ $(document).ready(function(){
//
resp = await getVhclInfo(sggCd, vhrno, crdnYmd);
if(otherWindow){
$("#vhrno--${pageName}").val(vhrno);
}
if(!resp.found){
dialog.alert({
content : "차량 정보가 없습니다.",
init : function() {
setDialogZindex();
focusClose();
}
});
$("#rtpyrId--${pageName}").val("");
$("#rtpyrNm--${pageName}").val("");
@ -952,7 +969,23 @@ $(document).ready(function(){
$("#zip--${pageName}").val("");
$("#addr--${pageName}").val("");
$("#dtlAddr--${pageName}").val("");
return;
if(!otherWindow){
dialog.alert({
content : "차량 정보가 없습니다.",
init : function() {
setDialogZindex();
focusClose();
}
});
return;
} else {
return {
vhrno : "",
vhclNm : "",
vhclColor : ""
};
}
}
$("#rtpyrId--${pageName}").val(resp.rtpyrId);
@ -1009,7 +1042,16 @@ $(document).ready(function(){
}
});
if(otherWindow){
return {
vhrno : $("#vhrno--${pageName}").val(),
vhclNm : $("#vhclNm--${pageName}").val(),
vhclColor : $("#vhclColor--${pageName}").val()
};
} else {
return;
}
};
//단속내역 보기
$("#btnViewCrdnList--${pageName}").on("click", function(){
@ -1133,82 +1175,8 @@ $(document).ready(function(){
vhclColor : $("#vhclColor--${pageName}").val()
};
},
async function(vhrno){
var resp = await getVhclInfo($("#sggCd--${pageName}").val(), vhrno, $("#crdnYmd--${pageName}").val());
$("#vhrno--${pageName}").val(vhrno);
if(!resp.found){
$("#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 {
vhrno : "",
vhclNm : "",
vhclColor : ""
};
} else {
$("#rtpyrId--${pageName}").val(resp.rtpyrId);
var vehicle = resp.vehicle;
$("#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);
$("#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("");
}
$("#zip--${pageName}").val(vehicle.zip_code); //우편번호
$("#addr--${pageName}").val(vehicle.road_nm_adres); //주소
$("#dtlAddr--${pageName}").val(vehicle.use_strnghld_adres_nm); //상세주소
return {
vhrno : resp.vehicle.vhrno,
vhclNm : resp.vehicle.cnm,
vhclColor : resp.vehicle.color_nm
};
}
async function(vhrnoEl){
return await $P.getVehicleTotalInfo(vhrnoEl);
}
);

@ -112,8 +112,13 @@ function fnAfterImageSave(){
window.close();
};
async function fnCarLink(vhrno){
result = await window.opener.pageObject[openerPageName].carLinkFunc(vhrno);
async function fnCarLink(vhrnoEl){
result = await window.opener.pageObject[openerPageName].carLinkFunc(vhrnoEl);
if(result.msg != null && result.msg != ""){
alert(result.msg);
return;
}
if(result.vhrno == null || result.vhrno == ""){
$("input[name='vhclNm']").val("");
@ -149,7 +154,7 @@ $(document).ready(function(){
$("input[name='vhclColor']").val(vhclInfo.vhclColor);
$("input[name='vhrno']").onEnterPress(function(){
fnCarLink(event.target.value);
fnCarLink(event.target);
});
}
} else {

@ -79,9 +79,9 @@ let xhtml = `<div xmlns="http://www.w3.org/1999/xhtml">
<!--<li data-pwTool="eraser">Eraser</li>-->
<!-- <li data-pwCommand="imageClear">Clear image</li> -->
<li>
<label class="w-px-60 pe-2 text-sm-end">차량번호</label><input type='text' name='vhrno' class='form-control-sm my-1' /><br />
<label class="w-px-60 pe-2 text-sm-end">차량명</label><input type='text' name='vhclNm' class='form-control-sm my-1' disabled /><br />
<label class="w-px-60 pe-2 text-sm-end">색상</label><input type='text' name='vhclColor' class='form-control-sm my-1' disabled />
<label class="w-px-60 pe-2 text-sm-end">차량번호</label><input type='text' id='vhrno' name='vhrno' class='form-control-sm my-1' /><br />
<label class="w-px-60 pe-2 text-sm-end">차량명</label><input type='text' id='vhclNm' name='vhclNm' class='form-control-sm my-1' disabled /><br />
<label class="w-px-60 pe-2 text-sm-end">색상</label><input type='text' id='vhclColor' name='vhclColor' class='form-control-sm my-1' disabled />
</li>
<li class="paintweb_toolSeparator">&#160;</li>

Loading…
Cancel
Save