다이얼로그 관련 소스정리

main
이범준 3 months ago
parent 895a662982
commit 8f37ef29db

@ -469,8 +469,6 @@ $(document).ready(function(){
return; return;
} }
var dialogId = "cvlcptInitialDataEditDialog--${pageName}";
ajax.get({ ajax.get({
url : $P.ctrl.urls.getInfo, url : $P.ctrl.urls.getInfo,
data : { data : {
@ -478,6 +476,10 @@ $(document).ready(function(){
"openerPageName" : "${pageName}" "openerPageName" : "${pageName}"
}, },
success : (resp) => { success : (resp) => {
let dialogName = "cvlcptInitialDataEditDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : dialogId, id : dialogId,
title : "민원접수 초기자료 편집", title : "민원접수 초기자료 편집",
@ -485,6 +487,9 @@ $(document).ready(function(){
size : "xxl", size : "xxl",
init : () => { init : () => {
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
var parentRes = new Object(); var parentRes = new Object();
var childReq = pageObject.childReq.pop(); var childReq = pageObject.childReq.pop();
@ -498,8 +503,8 @@ $(document).ready(function(){
pageObject.parentRes.push(parentRes); pageObject.parentRes.push(parentRes);
if($("#"+dialogId).find("div[class='parentGrid']").length > 0){ if($("#"+$P.refDlgId(dialogName)).find("div[class='parentGrid']").length > 0){
$("#"+dialogId).find("div[class='parentGrid']")[0].parentGrid = $P.find("table-responsive"); $("#"+$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 taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val();
var dialogId = "cvlcptOrgnlDialog--${pageName}";
ajax.get({ ajax.get({
url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"), url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"),
data : { crdnId : cur["CRDN_ID"] }, data : { crdnId : cur["CRDN_ID"] },
success : (resp) => { success : (resp) => {
let dialogName = "cvlcptOrgnlDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : dialogId, id : dialogId,
title : "민원내역 원본", title : "민원내역 원본",
content : resp, content : resp,
size : "xl", size : "xl",
init : () => { init : () => {
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
var parentRes = new Object(); var parentRes = new Object();
var childReq = pageObject.childReq.pop(); var childReq = pageObject.childReq.pop();

@ -486,13 +486,18 @@ $(document).ready(function(){
data : params, data : params,
success : (resp) => { success : (resp) => {
let dialogName = "levyExclDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : "levyExclDialog--${pageName}", id : dialogId,
title : "부과제외 정보", title : "부과제외 정보",
content : resp, content : resp,
size : "md", size : "md",
init : () => { init : () => {
setDialogZindex(); setDialogZindex();
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
}, },
onClose : () => {} onClose : () => {}
}); });
@ -542,8 +547,8 @@ $(document).ready(function(){
} }
}); });
if($("#levyExclDialog--${pageName}").length > 0){ if($P.refDlgId("levyExclDialog") != ""){
dialog.close("levyExclDialog--${pageName}"); dialog.close($P.refDlgId("levyExclDialog"));
} }
var crdnId = $P.$find("crdnId").val(); var crdnId = $P.$find("crdnId").val();
@ -642,12 +647,14 @@ $(document).ready(function(){
$P.fnOpenCvlcptOrgnl = () => { $P.fnOpenCvlcptOrgnl = () => {
var crdnId = $P.$find("crdnId").val(); var crdnId = $P.$find("crdnId").val();
var dialogId = "cvlcptOrgnlDialog--${pageName}";
ajax.get({ ajax.get({
url : wctx.url("/${taskSeCd}/cvlc/cvlc01/050/info.do"), url : wctx.url("/${taskSeCd}/cvlc/cvlc01/050/info.do"),
data : { crdnId : crdnId }, data : { crdnId : crdnId },
success : (resp) => { success : (resp) => {
let dialogName = "cvlcptOrgnlDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : dialogId, id : dialogId,
title : "민원내역 원본", title : "민원내역 원본",
@ -655,6 +662,8 @@ $(document).ready(function(){
size : "xl", size : "xl",
init : () => { init : () => {
setDialogZindex(); setDialogZindex();
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
} }
}); });
} }
@ -1074,18 +1083,26 @@ $(document).ready(function(){
vhrno : $P.$find("vhrno").val() vhrno : $P.$find("vhrno").val()
}, },
success: function(resp) { success: function(resp) {
let dialogName = "crdnListDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : "crdnListDialog--${pageName}", id : dialogId,
title : "동일차량 단속 내역", title : "동일차량 단속 내역",
content : resp, content : resp,
size : "xxl", size : "xxl",
init : () => { init : () => {
setDialogZindex(); setDialogZindex();
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
$(document).find("div.modal").last().on('shown.bs.modal', function () { $(document).find("div.modal").last().on('shown.bs.modal', function () {
$("#crdnListDialog--${pageName}").find("[name='schCrdnYmdFrom']").set("");
$("#crdnListDialog--${pageName}").find("[name='schCrdnYmdTo']").set(""); $("#"+$P.refDlgId("crdnListDialog")).find("[name='schCrdnYmdFrom']").set("");
$("#crdnListDialog--${pageName}").find("[name='vhrno']").set($P.$find("vhrno").val()); $("#"+$P.refDlgId("crdnListDialog")).find("[name='schCrdnYmdTo']").set("");
$("#crdnListDialog--${pageName}").find(".btn-search").eq(0).click(); $("#"+$P.refDlgId("crdnListDialog")).find("[name='vhrno']").set($P.$find("vhrno").val());
$("#"+$P.refDlgId("crdnListDialog")).find(".btn-search").eq(0).click();
}); });
}, },
onClose : () => {} onClose : () => {}
@ -1104,18 +1121,26 @@ $(document).ready(function(){
vhrno : $P.$find("vhrno").val() vhrno : $P.$find("vhrno").val()
}, },
success: function(resp) { success: function(resp) {
let dialogName = "cvlcptDscsnListDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : "cvlcptDscsnListDialog--${pageName}", id : dialogId,
title : "민원상담 내역", title : "민원상담 내역",
content : resp, content : resp,
size : "xxl", size : "xxl",
init : () => { init : () => {
setDialogZindex(); setDialogZindex();
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
$(document).find("div.modal").last().on('shown.bs.modal', function () { $(document).find("div.modal").last().on('shown.bs.modal', function () {
$("#cvlcptDscsnListDialog--${pageName}").find("[name='schDscsnYmdFrom']").set("");
$("#cvlcptDscsnListDialog--${pageName}").find("[name='schDscsnYmdTo']").set(""); $("#"+$P.refDlgId("cvlcptDscsnListDialog")).find("[name='schDscsnYmdFrom']").set("");
$("#cvlcptDscsnListDialog--${pageName}").find("[name='schVhrno']").set($P.$find("vhrno").val()); $("#"+$P.refDlgId("cvlcptDscsnListDialog")).find("[name='schDscsnYmdTo']").set("");
$("#cvlcptDscsnListDialog--${pageName}").find(".btn-search").eq(0).click(); $("#"+$P.refDlgId("cvlcptDscsnListDialog")).find("[name='schVhrno']").set($P.$find("vhrno").val());
$("#"+$P.refDlgId("cvlcptDscsnListDialog")).find(".btn-search").eq(0).click();
}); });
}, },
onClose : () => {} onClose : () => {}

@ -460,17 +460,23 @@ $(document).ready(function(){
var taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val(); var taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val();
var dialogId = "cvlcptOrgnlDialog--${pageName}";
ajax.get({ ajax.get({
url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"), url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"),
data : { crdnId : cur["CRDN_ID"] }, data : { crdnId : cur["CRDN_ID"] },
success : (resp) => { success : (resp) => {
let dialogName = "cvlcptOrgnlDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : dialogId, id : dialogId,
title : "민원내역 원본", title : "민원내역 원본",
content : resp, content : resp,
size : "xl", size : "xl",
init : () => { init : () => {
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
var parentRes = new Object(); var parentRes = new Object();
var childReq = pageObject.childReq.pop(); var childReq = pageObject.childReq.pop();
@ -497,17 +503,23 @@ $(document).ready(function(){
var taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val(); var taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val();
var dialogId = "answerPreviewDialog--${pageName}";
ajax.get({ ajax.get({
url : wctx.url("/"+taskSeCd+"/cvlc/cvlc02/060/info.do"), url : wctx.url("/"+taskSeCd+"/cvlc/cvlc02/060/info.do"),
data : { crdnId : cur["CRDN_ID"] }, data : { crdnId : cur["CRDN_ID"] },
success : (resp) => { success : (resp) => {
let dialogName = "answerPreviewDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : dialogId, id : dialogId,
title : "답변내용 미리보기", title : "답변내용 미리보기",
content : resp, content : resp,
size : "xl", size : "xl",
init : () => { init : () => {
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
var parentRes = new Object(); var parentRes = new Object();
var childReq = pageObject.childReq.pop(); var childReq = pageObject.childReq.pop();

@ -472,17 +472,23 @@ $(document).ready(function(){
var taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val(); var taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val();
var dialogId = "cvlcptOrgnlDialog--${pageName}";
ajax.get({ ajax.get({
url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"), url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"),
data : { crdnId : cur["CRDN_ID"] }, data : { crdnId : cur["CRDN_ID"] },
success : (resp) => { success : (resp) => {
let dialogName = "cvlcptOrgnlDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : dialogId, id : dialogId,
title : "민원내역 원본", title : "민원내역 원본",
content : resp, content : resp,
size : "xl", size : "xl",
init : () => { init : () => {
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
var parentRes = new Object(); var parentRes = new Object();
var childReq = pageObject.childReq.pop(); var childReq = pageObject.childReq.pop();

@ -395,15 +395,22 @@ $(document).ready(function(){
//요청 등록 팝업 호출 //요청 등록 팝업 호출
$P.fnOpenDmndPop = () => { $P.fnOpenDmndPop = () => {
let dialogName = "seallDmndDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : "seallDmndDialog--${pageName}", id : dialogId,
title : "새올 접수 요청", title : "새올 접수 요청",
content : $P.find("seallDmndDialogTemplate").innerHTML, content : $P.find("seallDmndDialogTemplate").innerHTML,
size : "lg", size : "lg",
init : () => { init : () => {
initDatepicker(document.getElementById("seallDmndDialog--${pageName}")); $("#"+dialogId).attr("name", dialogName);
$("#seallDmndDialog--${pageName}").find("[name='rcptYmd']").datepicker('setDate', TODAY()); $("#"+dialogId).attr("data-ref-doctx","${pageName}");
$("#seallDmndDialog--${pageName}").find("[name='btnCreate']").on("click", () => $P.fnCreateDmnd());
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 : () => {} onClose : () => {}
}); });
@ -412,9 +419,11 @@ $(document).ready(function(){
//요청 등록 //요청 등록
$P.fnCreateDmnd = () => { $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(); info.taskSeCd = $P.$find("frmSearch").find("input[name='taskSeCd']:checked").val();
ajax.get({ ajax.get({
@ -422,7 +431,7 @@ $(document).ready(function(){
data : info, data : info,
success : (resp) => { success : (resp) => {
if(resp.saved){ if(resp.saved){
dialog.close("seallDmndDialog--${pageName}"); dialog.close($P.refDlgId("seallDmndDialog"));
$P.$find("toastText").html("등록 되었습니다."); $P.$find("toastText").html("등록 되었습니다.");
$P.toast.show(); $P.toast.show();

@ -649,15 +649,21 @@ $(document).ready(function(){
"${currentUserName}" "${currentUserName}"
); );
let dialogName = "previewDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : "previewDialog--${pageName}", id : dialogId,
title : "답변 내용 미리보기", title : "답변 내용 미리보기",
content : $P.find("previewDialogTemplate").innerHTML, content : $P.find("previewDialogTemplate").innerHTML,
size : "lg", size : "lg",
init : () => { init : () => {
$("#previewDialog--${pageName}").find("[name='preview']").val(result); $("#"+dialogId).attr("name", dialogName);
$("#previewDialog--${pageName}").find("[name='btnClose']").on("click", $("#"+dialogId).attr("data-ref-doctx","${pageName}");
() => dialog.close("previewDialog--${pageName}"));
$("#"+$P.refDlgId("previewDialog")).find("[name='preview']").val(result);
$("#"+$P.refDlgId("previewDialog")).find("[name='btnClose']").on("click",
() => dialog.close($P.refDlgId("previewDialog"));
}, },
onOk : () => {}, onOk : () => {},
onClose : () => {} onClose : () => {}

@ -217,24 +217,30 @@ $(document).ready(function(){
data : { type : "dept" }, data : { type : "dept" },
success : (resp) => { success : (resp) => {
var checkActnoDialogId = "checkActnoDialog--${pageName}"; let dialogName = "checkActnoDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({ dialog.open({
id : checkActnoDialogId, id : dialogId,
title : "계좌번호 확인", title : "계좌번호 확인",
content : $P.find("checkActnoTemplate").innerHTML, content : $P.find("checkActnoTemplate").innerHTML,
size : "md", size : "md",
init : () => { init : () => {
$("#"+checkActnoDialogId).find("[name='btnChangeActno']").on("click", function(){ $("#"+dialogId).attr("name", dialogName);
$P.checkActnoCallback(true,checkActnoDialogId); $("#"+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(){ $ $("#"+refDlgId).find("[name='btnConfirmActno']").on("click", function(){ $
P.checkActnoCallback(false,checkActnoDialogId); $P.checkActnoCallback(false,refDlgId);
}); });
if(resp.stngInfo != null){ if(resp.stngInfo != null){
$("#"+checkActnoDialogId).find("[name='dtbnBankNm']").val(resp.stngInfo.DTBN_BANK_NM); $("#"+refDlgId).find("[name='dtbnBankNm']").val(resp.stngInfo.DTBN_BANK_NM);
$("#"+checkActnoDialogId).find("[name='dtbnActno']").val(resp.stngInfo.DTBN_ACTNO); $("#"+refDlgId).find("[name='dtbnActno']").val(resp.stngInfo.DTBN_ACTNO);
} }
}, },
onClose : () => {} onClose : () => {}
@ -245,7 +251,7 @@ $(document).ready(function(){
} }
//계좌번호확인callback //계좌번호확인callback
$P.checkActnoCallback = (change, checkActnoDialogId) => { $P.checkActnoCallback = (change, callbackDialogId) => {
var url = wctx.url("/sprt/sprt01/120/makeRequestForDeliveryFileFromHwpFormat.do"); var url = wctx.url("/sprt/sprt01/120/makeRequestForDeliveryFileFromHwpFormat.do");
var formFields = new FimsFormFields($P.selector("frmEdit")); var formFields = new FimsFormFields($P.selector("frmEdit"));
@ -254,8 +260,8 @@ $(document).ready(function(){
var changed = false; var changed = false;
if(change){ if(change){
var dtbnBankNm = $("#"+checkActnoDialogId).find("[name='dtbnBankNm']").val(); var dtbnBankNm = $("#"+callbackDialogId).find("[name='dtbnBankNm']").val();
var dtbnActno = $("#"+checkActnoDialogId).find("[name='dtbnActno']").val(); var dtbnActno = $("#"+callbackDialogId).find("[name='dtbnActno']").val();
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
@ -275,7 +281,7 @@ $(document).ready(function(){
} }
if(!change || changed){ if(!change || changed){
dialog.close(checkActnoDialogId); dialog.close(callbackDialogId);
$P.fnMakeFile(url, globalVariable); $P.fnMakeFile(url, globalVariable);
} }

Loading…
Cancel
Save