diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp index 1328073d..1656002f 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp @@ -469,8 +469,6 @@ $(document).ready(function(){ return; } - var dialogId = "cvlcptInitialDataEditDialog--${pageName}"; - ajax.get({ url : $P.ctrl.urls.getInfo, data : { @@ -478,6 +476,10 @@ $(document).ready(function(){ "openerPageName" : "${pageName}" }, success : (resp) => { + + let dialogName = "cvlcptInitialDataEditDialog"; + let dialogId = dialogName+"-"+uuid(); + dialog.open({ id : dialogId, title : "민원접수 초기자료 편집", @@ -485,6 +487,9 @@ $(document).ready(function(){ size : "xxl", init : () => { + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); + var parentRes = new Object(); var childReq = pageObject.childReq.pop(); @@ -498,8 +503,8 @@ $(document).ready(function(){ pageObject.parentRes.push(parentRes); - if($("#"+dialogId).find("div[class='parentGrid']").length > 0){ - $("#"+dialogId).find("div[class='parentGrid']")[0].parentGrid = $P.find("table-responsive"); + if($("#"+$P.refDlgId(dialogName)).find("div[class='parentGrid']").length > 0){ + $("#"+$P.refDlgId(dialogName)).find("div[class='parentGrid']")[0].parentGrid = $P.find("table-responsive"); } } @@ -602,17 +607,23 @@ $(document).ready(function(){ var taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val(); - var dialogId = "cvlcptOrgnlDialog--${pageName}"; ajax.get({ url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"), data : { crdnId : cur["CRDN_ID"] }, success : (resp) => { + + let dialogName = "cvlcptOrgnlDialog"; + let dialogId = dialogName+"-"+uuid(); + dialog.open({ id : dialogId, title : "민원내역 원본", content : resp, size : "xl", init : () => { + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); + var parentRes = new Object(); var childReq = pageObject.childReq.pop(); 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 496064a1..a863f308 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 @@ -486,13 +486,18 @@ $(document).ready(function(){ data : params, success : (resp) => { + let dialogName = "levyExclDialog"; + let dialogId = dialogName+"-"+uuid(); + dialog.open({ - id : "levyExclDialog--${pageName}", + id : dialogId, title : "부과제외 정보", content : resp, size : "md", init : () => { setDialogZindex(); + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); }, onClose : () => {} }); @@ -542,8 +547,8 @@ $(document).ready(function(){ } }); - if($("#levyExclDialog--${pageName}").length > 0){ - dialog.close("levyExclDialog--${pageName}"); + if($P.refDlgId("levyExclDialog") != ""){ + dialog.close($P.refDlgId("levyExclDialog")); } var crdnId = $P.$find("crdnId").val(); @@ -642,12 +647,14 @@ $(document).ready(function(){ $P.fnOpenCvlcptOrgnl = () => { var crdnId = $P.$find("crdnId").val(); - var dialogId = "cvlcptOrgnlDialog--${pageName}"; - ajax.get({ url : wctx.url("/${taskSeCd}/cvlc/cvlc01/050/info.do"), data : { crdnId : crdnId }, success : (resp) => { + + let dialogName = "cvlcptOrgnlDialog"; + let dialogId = dialogName+"-"+uuid(); + dialog.open({ id : dialogId, title : "민원내역 원본", @@ -655,6 +662,8 @@ $(document).ready(function(){ size : "xl", init : () => { setDialogZindex(); + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); } }); } @@ -1074,18 +1083,26 @@ $(document).ready(function(){ vhrno : $P.$find("vhrno").val() }, success: function(resp) { + + let dialogName = "crdnListDialog"; + let dialogId = dialogName+"-"+uuid(); + dialog.open({ - id : "crdnListDialog--${pageName}", + id : dialogId, title : "동일차량 단속 내역", content : resp, size : "xxl", init : () => { setDialogZindex(); + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); + $(document).find("div.modal").last().on('shown.bs.modal', function () { - $("#crdnListDialog--${pageName}").find("[name='schCrdnYmdFrom']").set(""); - $("#crdnListDialog--${pageName}").find("[name='schCrdnYmdTo']").set(""); - $("#crdnListDialog--${pageName}").find("[name='vhrno']").set($P.$find("vhrno").val()); - $("#crdnListDialog--${pageName}").find(".btn-search").eq(0).click(); + + $("#"+$P.refDlgId("crdnListDialog")).find("[name='schCrdnYmdFrom']").set(""); + $("#"+$P.refDlgId("crdnListDialog")).find("[name='schCrdnYmdTo']").set(""); + $("#"+$P.refDlgId("crdnListDialog")).find("[name='vhrno']").set($P.$find("vhrno").val()); + $("#"+$P.refDlgId("crdnListDialog")).find(".btn-search").eq(0).click(); }); }, onClose : () => {} @@ -1104,18 +1121,26 @@ $(document).ready(function(){ vhrno : $P.$find("vhrno").val() }, success: function(resp) { + + let dialogName = "cvlcptDscsnListDialog"; + let dialogId = dialogName+"-"+uuid(); + dialog.open({ - id : "cvlcptDscsnListDialog--${pageName}", + id : dialogId, title : "민원상담 내역", content : resp, size : "xxl", init : () => { setDialogZindex(); + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); + $(document).find("div.modal").last().on('shown.bs.modal', function () { - $("#cvlcptDscsnListDialog--${pageName}").find("[name='schDscsnYmdFrom']").set(""); - $("#cvlcptDscsnListDialog--${pageName}").find("[name='schDscsnYmdTo']").set(""); - $("#cvlcptDscsnListDialog--${pageName}").find("[name='schVhrno']").set($P.$find("vhrno").val()); - $("#cvlcptDscsnListDialog--${pageName}").find(".btn-search").eq(0).click(); + + $("#"+$P.refDlgId("cvlcptDscsnListDialog")).find("[name='schDscsnYmdFrom']").set(""); + $("#"+$P.refDlgId("cvlcptDscsnListDialog")).find("[name='schDscsnYmdTo']").set(""); + $("#"+$P.refDlgId("cvlcptDscsnListDialog")).find("[name='schVhrno']").set($P.$find("vhrno").val()); + $("#"+$P.refDlgId("cvlcptDscsnListDialog")).find(".btn-search").eq(0).click(); }); }, onClose : () => {} diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp index 7b12f89f..ebee92d2 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp @@ -460,17 +460,23 @@ $(document).ready(function(){ var taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val(); - var dialogId = "cvlcptOrgnlDialog--${pageName}"; ajax.get({ url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"), data : { crdnId : cur["CRDN_ID"] }, success : (resp) => { + + let dialogName = "cvlcptOrgnlDialog"; + let dialogId = dialogName+"-"+uuid(); + dialog.open({ id : dialogId, title : "민원내역 원본", content : resp, size : "xl", init : () => { + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); + var parentRes = new Object(); var childReq = pageObject.childReq.pop(); @@ -497,17 +503,23 @@ $(document).ready(function(){ var taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val(); - var dialogId = "answerPreviewDialog--${pageName}"; + ajax.get({ url : wctx.url("/"+taskSeCd+"/cvlc/cvlc02/060/info.do"), data : { crdnId : cur["CRDN_ID"] }, success : (resp) => { + let dialogName = "answerPreviewDialog"; + let dialogId = dialogName+"-"+uuid(); + dialog.open({ id : dialogId, title : "답변내용 미리보기", content : resp, size : "xl", init : () => { + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); + var parentRes = new Object(); var childReq = pageObject.childReq.pop(); diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp index 4d99687e..d84fa9c2 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp @@ -472,17 +472,23 @@ $(document).ready(function(){ var taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val(); - var dialogId = "cvlcptOrgnlDialog--${pageName}"; + ajax.get({ url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"), data : { crdnId : cur["CRDN_ID"] }, success : (resp) => { + let dialogName = "cvlcptOrgnlDialog"; + let dialogId = dialogName+"-"+uuid(); + dialog.open({ id : dialogId, title : "민원내역 원본", content : resp, size : "xl", init : () => { + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); + var parentRes = new Object(); var childReq = pageObject.childReq.pop(); diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp index 3721a809..8ce4b8b8 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp @@ -395,15 +395,22 @@ $(document).ready(function(){ //요청 등록 팝업 호출 $P.fnOpenDmndPop = () => { + + let dialogName = "seallDmndDialog"; + let dialogId = dialogName+"-"+uuid(); + dialog.open({ - id : "seallDmndDialog--${pageName}", + id : dialogId, title : "새올 접수 요청", content : $P.find("seallDmndDialogTemplate").innerHTML, size : "lg", init : () => { - initDatepicker(document.getElementById("seallDmndDialog--${pageName}")); - $("#seallDmndDialog--${pageName}").find("[name='rcptYmd']").datepicker('setDate', TODAY()); - $("#seallDmndDialog--${pageName}").find("[name='btnCreate']").on("click", () => $P.fnCreateDmnd()); + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); + + initDatepicker(document.getElementById($P.refDlgId("seallDmndDialog"))); + $("#"+$P.refDlgId("seallDmndDialog")).find("[name='rcptYmd']").datepicker('setDate', TODAY()); + $("#"+$P.refDlgId("seallDmndDialog")).find("[name='btnCreate']").on("click", () => $P.fnCreateDmnd()); }, onClose : () => {} }); @@ -412,9 +419,11 @@ $(document).ready(function(){ //요청 등록 $P.fnCreateDmnd = () => { - if(!customValidate($("#seallDmndDialog--${pageName}").find("[name='frmEdit']").find("input"))) return; + if(!customValidate($("#"+$P.refDlgId("seallDmndDialog")).find("[name='frmEdit']").find("input"))) return; - var info = (new FimsFormFields("#seallDmndDialog--${pageName} form[name='frmEdit']")).get(); + let selectorStr = "#"+$P.refDlgId("seallDmndDialog")+" "+"form[name='frmEdit']"; + let ff = new FimsFormFields(selectorStr); + var info = ff.get(); info.taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val(); ajax.get({ @@ -422,7 +431,7 @@ $(document).ready(function(){ data : info, success : (resp) => { if(resp.saved){ - dialog.close("seallDmndDialog--${pageName}"); + dialog.close($P.refDlgId("seallDmndDialog")); $P.$find("toastText").html("등록 되었습니다."); $P.toast.show(); diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp index a7664107..0b116f7a 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp @@ -649,15 +649,21 @@ $(document).ready(function(){ "${currentUserName}" ); + let dialogName = "previewDialog"; + let dialogId = dialogName+"-"+uuid(); + dialog.open({ - id : "previewDialog--${pageName}", + id : dialogId, title : "답변 내용 미리보기", content : $P.find("previewDialogTemplate").innerHTML, size : "lg", init : () => { - $("#previewDialog--${pageName}").find("[name='preview']").val(result); - $("#previewDialog--${pageName}").find("[name='btnClose']").on("click", - () => dialog.close("previewDialog--${pageName}")); + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); + + $("#"+$P.refDlgId("previewDialog")).find("[name='preview']").val(result); + $("#"+$P.refDlgId("previewDialog")).find("[name='btnClose']").on("click", + () => dialog.close($P.refDlgId("previewDialog")); }, onOk : () => {}, onClose : () => {} diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01120-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01120-info.jsp index 66b4449b..8a4f8cdb 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01120-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01120-info.jsp @@ -217,24 +217,30 @@ $(document).ready(function(){ data : { type : "dept" }, success : (resp) => { - var checkActnoDialogId = "checkActnoDialog--${pageName}"; + let dialogName = "checkActnoDialog"; + let dialogId = dialogName+"-"+uuid(); dialog.open({ - id : checkActnoDialogId, + id : dialogId, title : "계좌번호 확인", content : $P.find("checkActnoTemplate").innerHTML, size : "md", init : () => { - $("#"+checkActnoDialogId).find("[name='btnChangeActno']").on("click", function(){ - $P.checkActnoCallback(true,checkActnoDialogId); + $("#"+dialogId).attr("name", dialogName); + $("#"+dialogId).attr("data-ref-doctx","${pageName}"); + + let refDlgId = $P.refDlgId(dialogName); + + $("#"+refDlgId).find("[name='btnChangeActno']").on("click", function(){ + $P.checkActnoCallback(true,refDlgId); }); - $("#"+checkActnoDialogId).find("[name='btnConfirmActno']").on("click", function(){ $ - P.checkActnoCallback(false,checkActnoDialogId); + $("#"+refDlgId).find("[name='btnConfirmActno']").on("click", function(){ $ + $P.checkActnoCallback(false,refDlgId); }); if(resp.stngInfo != null){ - $("#"+checkActnoDialogId).find("[name='dtbnBankNm']").val(resp.stngInfo.DTBN_BANK_NM); - $("#"+checkActnoDialogId).find("[name='dtbnActno']").val(resp.stngInfo.DTBN_ACTNO); + $("#"+refDlgId).find("[name='dtbnBankNm']").val(resp.stngInfo.DTBN_BANK_NM); + $("#"+refDlgId).find("[name='dtbnActno']").val(resp.stngInfo.DTBN_ACTNO); } }, onClose : () => {} @@ -245,7 +251,7 @@ $(document).ready(function(){ } //계좌번호확인callback - $P.checkActnoCallback = (change, checkActnoDialogId) => { + $P.checkActnoCallback = (change, callbackDialogId) => { var url = wctx.url("/sprt/sprt01/120/makeRequestForDeliveryFileFromHwpFormat.do"); var formFields = new FimsFormFields($P.selector("frmEdit")); @@ -254,8 +260,8 @@ $(document).ready(function(){ var changed = false; if(change){ - var dtbnBankNm = $("#"+checkActnoDialogId).find("[name='dtbnBankNm']").val(); - var dtbnActno = $("#"+checkActnoDialogId).find("[name='dtbnActno']").val(); + var dtbnBankNm = $("#"+callbackDialogId).find("[name='dtbnBankNm']").val(); + var dtbnActno = $("#"+callbackDialogId).find("[name='dtbnActno']").val(); $.ajax({ type: 'GET', @@ -275,7 +281,7 @@ $(document).ready(function(){ } if(!change || changed){ - dialog.close(checkActnoDialogId); + dialog.close(callbackDialogId); $P.fnMakeFile(url, globalVariable); }