감경 삭제, 부과제외 삭제시 삭제사유를 입력할 수 있도록 수정.

main
jjh 12 months ago
parent 1f007f3bcb
commit 6ba2a3adbe

@ -288,7 +288,7 @@
var ${pageName}Control = new DatasetControl({ var ${pageName}Control = new DatasetControl({
prefix : "levyExcl" prefix : "levyExcl"
, prefixName : "부과제외" , prefixName : "부과제외"
, infoSize : "lg" , infoSize : "md"
, keymapper : info => info ? info.LEVY_EXCL_ID : "" , keymapper : info => info ? info.LEVY_EXCL_ID : ""
, dataGetter : obj => obj.levyExclList , dataGetter : obj => obj.levyExclList
, appendData : true , appendData : true

@ -49,7 +49,7 @@
<!-- 기타 내용 --> <!-- 기타 내용 -->
<div class="col-md-12"> <div class="col-md-12">
<label for="etcCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">기타 내용</label> <label for="etcCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">기타 내용</label>
<textarea type="text" class="form-control w-80" id="etcCn--${pageName}" name="etcCn" data-map="ETC_CN" autocomplete="off" rows="3" data-maxlengthb="1000"></textarea> <textarea type="text" class="form-control w-70" id="etcCn--${pageName}" name="etcCn" data-map="ETC_CN" autocomplete="off" rows="3" data-maxlengthb="1000"></textarea>
</div> </div>
</div> </div>
</form> <!-- /입력 영역 --> </form> <!-- /입력 영역 -->

@ -31,13 +31,13 @@
<!-- 과태료 단속 금액 --> <!-- 과태료 단속 금액 -->
<div class="col-md-6"> <div class="col-md-6">
<label for="ffnlgCrdnAmt--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">단속금액</label> <label for="ffnlgCrdnAmt--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">단속금액</label>
<input type="text" class="form-control w-30 text-end" id="ffnlgCrdnAmt--${pageName}" name="ffnlgCrdnAmt" data-map="FFNLG_CRDN_AMT" readonly /> * <input type="text" class="form-control w-30 text-end" id="ffnlgCrdnAmt--${pageName}" name="ffnlgCrdnAmt" data-map="FFNLG_CRDN_AMT" data-fmt-type="number" readonly /> *
<input type="text" class="form-control w-15 text-end" id="wksnRductRt--${pageName}" name="wksnRductRt" data-map="WKSN_RDUCT_RT" readonly /> % <input type="text" class="form-control w-15 text-end" id="wksnRductRt--${pageName}" name="wksnRductRt" data-map="WKSN_RDUCT_RT" data-fmt-type="number" readonly /> %
</div> </div>
<!-- 감경 금액 --> <!-- 감경 금액 -->
<div class="col-md-6"> <div class="col-md-6">
<label for="rductAmt--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">감경금액</label> <label for="rductAmt--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">감경금액</label>
<input type="text" class="form-control w-30 text-end" id="rductAmt--${pageName}" name="rductAmt" data-map="RDUCT_AMT" readonly /> <input type="text" class="form-control w-30 text-end" id="rductAmt--${pageName}" name="rductAmt" data-map="RDUCT_AMT" data-fmt-type="number" readonly />
</div> </div>
<!-- 감경 일자 --> <!-- 감경 일자 -->
<div class="col-md-6"> <div class="col-md-6">
@ -95,13 +95,8 @@
, prefixName : "감경" , prefixName : "감경"
, keymapper : info => info ? info.RDUCT_ID : "" , keymapper : info => info ? info.RDUCT_ID : ""
, dataGetter : obj => obj.rductInfo , dataGetter : obj => obj.rductInfo
, urls : {
create : wctx.url(${pageName}PrefixUrl + "/020/create.do") // 등록
, update : wctx.url(${pageName}PrefixUrl + "/020/update.do") // 수정
}
, formats : { , formats : {
RDUCT_YMD : dateFormat // 감경 일자 FFNLG_CRDN_AMT : numberFormat // 과태료 단속 금액
, FFNLG_CRDN_AMT : numberFormat // 과태료 단속 금액
, WKSN_RDUCT_RT : numberFormat // 감경 율 , WKSN_RDUCT_RT : numberFormat // 감경 율
, RDUCT_AMT : numberFormat // 감경 금액 , RDUCT_AMT : numberFormat // 감경 금액
} }

@ -363,27 +363,6 @@
}); });
} }
// 삭제 callback
${pageName}${pageDataName1}Control.onRemove = (resp) => {
let btnTitle = $("#btnRemove--${pageName}${pageDataName1}").attr("title");
let showMessage = resp.retMessage.replace(/[S]|[F]/g, btnTitle);
dialog.alert(showMessage);
if (resp.saved) {
refreshDataInfo${pageName}(); // 자료 재조회
}
}
// 삭제
${pageName}${pageDataName1}Control.remove = (params) => {
ajax.post({
url : wctx.url(params.taskSeCd + ${pageName}${pageDataName1}PrefixUrl + "/010/remove.do")
, data : params || {}
, success : resp => ${pageName}${pageDataName1}Control.onRemove(resp) // 삭제 callback
});
}
// 부과제외 선택 자료 변경 이벤트 // 부과제외 선택 자료 변경 이벤트
${pageName}${pageDataName2}Control.onCurrentChange = item => { ${pageName}${pageDataName2}Control.onCurrentChange = item => {
${pageName}${pageDataName2}Fields.set(item); ${pageName}${pageDataName2}Fields.set(item);
@ -416,34 +395,13 @@
id : ${pageName}${pageDataName2}Control.prefixed("Dialog") id : ${pageName}${pageDataName2}Control.prefixed("Dialog")
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : "lg" , size : "md"
, onClose : () => { refreshDataInfo${pageName}(); } // callback 자료 재조회 , onClose : () => { refreshDataInfo${pageName}(); } // callback 자료 재조회
}); });
} }
}); });
} }
// 삭제 callback
${pageName}${pageDataName2}Control.onRemove = (resp) => {
let btnTitle = $("#btnRemove--${pageName}${pageDataName2}").attr("title");
let showMessage = resp.retMessage.replace(/[S]|[F]/g, btnTitle);
dialog.alert(showMessage);
if (resp.saved) {
refreshDataInfo${pageName}(); // 자료 재조회
}
}
// 삭제
${pageName}${pageDataName2}Control.remove = (params) => {
ajax.post({
url : wctx.url(params.taskSeCd + ${pageName}${pageDataName2}PrefixUrl + "/010/remove.do")
, data : params || {}
, success : resp => ${pageName}${pageDataName2}Control.onRemove(resp) // 삭제 callback
});
}
/************************************************************************** /**************************************************************************
* function * function
**************************************************************************/ **************************************************************************/
@ -534,6 +492,64 @@
}); });
} }
// 감경 삭제
callbackRemoveRduct${pageName} = (obj) => {
// 서버에 전송할 data(파라미터) 생성
let params = {
callPurpose : "remove"
, rductId : ${pageName}${pageDataName1}Control.dataset.getValue("RDUCT_ID") // 감경 ID
, delYn : "Y" // 삭제 여부
, delRsn : obj.reason // 삭제 사유
};
// 삭제 url
${pageName}${pageDataName1}Control.urls.remove = wctx.url(${pageName}${pageDataName1}Control.dataset.getValue("TASK_SE_CD") + ${pageName}${pageDataName1}PrefixUrl + "/010/remove.do")
ajax.post({
url : ${pageName}${pageDataName1}Control.urls.remove
, data : params
, success : resp => {
let btnTitle = $("#btnRemoveRduct--${pageName}").attr("title");
let showMessage = resp.retMessage.replace(/[S]|[F]/g, btnTitle);
dialog.alert(showMessage); // 메시지 출력
if (resp.saved) {
refreshDataInfo${pageName}(); // 자료 재조회
}
}
});
}
// 부과제외 삭제 callback
callbackRemoveLevyExcl${pageName} = (obj) => {
// 서버에 전송할 data(파라미터) 생성
let params = {
callPurpose : "remove"
, levyExclId : ${pageName}${pageDataName2}Control.dataset.getValue("LEVY_EXCL_ID") // 부과제외 ID
, delYn : "Y" // 삭제 여부
, delRsn : obj.reason // 삭제 사유
};
// 삭제 url
${pageName}${pageDataName2}Control.urls.remove = wctx.url(${pageName}${pageDataName2}Control.dataset.getValue("TASK_SE_CD") + ${pageName}${pageDataName2}PrefixUrl + "/010/remove.do");
ajax.post({
url : ${pageName}${pageDataName2}Control.urls.remove
, data : params
, success : resp => {
let btnTitle = $("#btnRemoveLevyExcl--${pageName}").attr("title");
let showMessage = resp.retMessage.replace(/[S]|[F]/g, btnTitle);
dialog.alert(showMessage); // 메시지 출력
if (resp.saved) {
refreshDataInfo${pageName}(); // 자료 재조회
}
}
});
}
/************************************************************************** /**************************************************************************
* 초기 셋팅 * 초기 셋팅
**************************************************************************/ **************************************************************************/
@ -612,25 +628,26 @@
// 감경 삭제 // 감경 삭제
fnRemoveRduct${pageName} = () => { fnRemoveRduct${pageName} = () => {
// 감경 ID
let rductId = ${pageName}${pageDataName1}Control.dataset.getValue("RDUCT_ID"); let rductId = ${pageName}${pageDataName1}Control.dataset.getValue("RDUCT_ID");
// 감경 ID 가 없다면.. return // 감경 ID 가 없다면.. return
if (typeof rductId == "undefined" || rductId == null || rductId == "") return; if (typeof rductId == "undefined" || rductId == null || rductId == "") return;
let params = { let callbackFuncName = "callbackRemoveRduct${pageName}";
callPurpose : "remove" let popupWidth = 640;
, crdnId : ${pageName}${pageDataName1}Control.dataset.getValue("CRDN_ID") let popupHeight = 360;
, sggCd : ${pageName}${pageDataName1}Control.dataset.getValue("SGG_CD") let popupX = (window.screen.width / 2) - (popupWidth / 2);
, taskSeCd : ${pageName}${pageDataName1}Control.dataset.getValue("TASK_SE_CD") let popupY= (window.screen.height / 2) - (popupHeight / 2);
, rductId : rductId
}; window.open(
wctx.url("/resources/html/inputRsnDialog.html"
dialog.alert({ + "?callbackFuncName=" + callbackFuncName
content : "선택한 " + ${pageName}${pageDataName1}Control.prefixName + " 내용을 삭제하시겠습니까?" + "&CALL_PURPOSE=" + "remove"
, onOK : () => { )
${pageName}${pageDataName1}Control.remove(params); , "inputDelRsnDialog"
} , 'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY
}); );
} }
// 계고 등록 // 계고 등록
@ -689,25 +706,26 @@
// 부과제외 삭제 // 부과제외 삭제
fnRemoveLevyExcl${pageName} = () => { fnRemoveLevyExcl${pageName} = () => {
// 부과제외 ID
let levyExclId = ${pageName}${pageDataName2}Control.dataset.getValue("LEVY_EXCL_ID"); let levyExclId = ${pageName}${pageDataName2}Control.dataset.getValue("LEVY_EXCL_ID");
// 부과제외 ID 가 없다면.. return // 부과제외 ID 가 없다면.. return
if (typeof levyExclId == "undefined" || levyExclId == null || levyExclId == "") return; if (typeof levyExclId == "undefined" || levyExclId == null || levyExclId == "") return;
let params = { let callbackFuncName = "callbackRemoveLevyExcl${pageName}";
callPurpose : "remove" let popupWidth = 640;
, crdnId : ${pageName}${pageDataName2}Control.dataset.getValue("CRDN_ID") let popupHeight = 360;
, sggCd : ${pageName}${pageDataName2}Control.dataset.getValue("SGG_CD") let popupX = (window.screen.width / 2) - (popupWidth / 2);
, taskSeCd : ${pageName}${pageDataName2}Control.dataset.getValue("TASK_SE_CD") let popupY= (window.screen.height / 2) - (popupHeight / 2);
, levyExclId : levyExclId
}; window.open(
wctx.url("/resources/html/inputRsnDialog.html"
dialog.alert({ + "?callbackFuncName=" + callbackFuncName
content : "선택한 " + ${pageName}${pageDataName2}Control.prefixName + " 내용을 삭제하시겠습니까?" + "&CALL_PURPOSE=" + "remove"
, onOK : () => { )
${pageName}${pageDataName2}Control.remove(params); , "inputDelRsnDialog"
} , 'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY
}); );
} }
/************************************************************************** /**************************************************************************

@ -407,7 +407,7 @@
} }
// 수기 수납 삭제 // 수기 수납 삭제
fnRemoveRcvmt${pageName} = () => { fnRemoveRcvmt${pageName} = (obj) => {
// 수납 ID // 수납 ID
let rcvmtId = ${pageName}Control.dataset.getValue("RCVMT_ID"); let rcvmtId = ${pageName}Control.dataset.getValue("RCVMT_ID");

@ -67,15 +67,14 @@
var callPurpose = location.search.split("&")[1].split("=")[1]; // remove 삭제 var callPurpose = location.search.split("&")[1].split("=")[1]; // remove 삭제
function fnOK() { function fnOK() {
let obj = {}; let obj = {
reason : $("#reason").val() // 사유
obj.reason = $("#reason").val(); // 사유 };
window.opener[callbackFuncName](obj); window.opener[callbackFuncName](obj);
window.close(); window.close();
} }
// 초기 설정
$(document).ready(function() { $(document).ready(function() {
}); });

Loading…
Cancel
Save