From 2aaea7972122ed109129c86a7bc9c9498f7024c7 Mon Sep 17 00:00:00 2001 From: JoJH Date: Thu, 14 Nov 2024 14:53:00 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=A0=84=ED=86=B5=EC=A7=80=20?= =?UTF-8?q?=EB=B0=9C=EC=86=A1=EB=8C=80=EC=83=81=20=EC=83=81=EC=84=B8?= =?UTF-8?q?=ED=99=94=EB=A9=B4=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/sndb/sndb01020-info.jsp | 16 +- .../WEB-INF/jsp/fims/sndb/sndb01060-info.jsp | 755 ++++++++---------- .../WEB-INF/jsp/fims/sprt/sprt02020-info.jsp | 2 +- .../resources/js/fims/sndb/sndb01060.js | 101 +++ 4 files changed, 444 insertions(+), 430 deletions(-) create mode 100644 src/main/webapp/resources/js/fims/sndb/sndb01060.js diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01020-info.jsp index 9ed7c5bf..35b21add 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01020-info.jsp @@ -40,7 +40,6 @@ -
@@ -224,7 +223,17 @@ // DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트 $P.scrollDataList = () => { - $P.ctrl.load($P.ctrl.query.pageNum + 1); + // 페이지 + $P.ctrl.query.pageNum += 1; + + ajax.get({ + url: $P.ctrl.urls.load + , headers: { Accept: "application/json; charset=utf-8" } // json + , data: $P.ctrl.query + , success: (resp) => { + $P.ctrl.addData(resp); + } + }); } /************************************************************************** @@ -295,7 +304,7 @@ $P.fnReset = () => { // 초기화 $P.findn("frmEdit").reset(); // 화면 초기화 - AppSupport.initDatepicker($P.findn("frmSearch")); // 달력 초기화 + AppSupport.initDatepicker($P.findn("frmEdit")); // 달력 초기화 // 기본 데이터 설정 $P.$findn("sggCd").val("${sggCd}"); // 시군구 코드 @@ -305,6 +314,7 @@ $P.$findn("sndngEndYmd").datepicker("setDate", TODAY()); // 납기 일자 // 업무 구분에 따른 URL 설정 + $P.ctrl.urls.load = wctx.url("/" + "${taskSeCd}" + $P.prefixUrl + "/020/info.do"); // 조회 $P.ctrl.urls.create = wctx.url("/" + "${taskSeCd}" + $P.prefixUrl + "/020/createList.do"); // 등록 } diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01060-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01060-info.jsp index 970652f6..77234aa7 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01060-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01060-info.jsp @@ -3,434 +3,337 @@ 사전통지 발송 대상 상세 정보 - -
- -
- - -
- -
-
- -
- - - -
- -
- - -
- -
- - - -
- -
- - - -
- -
- - -
- -
- - -
-
-
- - - -
- - - - - - -
- - -
- -
-
- - -
- + +
+ +
+
+ +
+ + + + +
+
+ + + +
+
+ + +
+
+ + + +
+
+ + + +
+
+ + +
+
+ + +
+
+
+ + + +
+ + +
+ +
    +
+
+ + + + +
+
+ + +
+ +
+
+ +
+
- + diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp index 20933428..0ddbdd07 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp @@ -938,10 +938,10 @@ let crdnPayerInfo = $P.ctrlCrdn.getCurrent(); let existVideo = false; + // 동영상 캡쳐 if (crdnPayerInfo.VIDEO_EXIST_YN == "Y") { existVideo = true; } - // 사진 버튼 visible let showBtn = true; if (pageObject["${pageNameMain}"].callPurpose == "view") { diff --git a/src/main/webapp/resources/js/fims/sndb/sndb01060.js b/src/main/webapp/resources/js/fims/sndb/sndb01060.js new file mode 100644 index 00000000..ed19fc40 --- /dev/null +++ b/src/main/webapp/resources/js/fims/sndb/sndb01060.js @@ -0,0 +1,101 @@ +function newSndb01060Control(pageName, doctx="[data-doctx='sndb01060']") { + let ctrl = new DatasetControl({ + doctx: doctx + , prefix: "advntceTrgt" + , prefixName: "사전통지 발송 대상" + , dataGetter: obj => obj["List"] + , keys: ["CRDN_ID"] + , appendData: true + , urls: { + load: "/list.do" + , create: "/create.do" + } + , formats: { + TNOCS: numberFormat + , GRAMT: numberFormat + , CVLCPT_RCPT_YMD: dateFormat + , CRDN_YMD_TM: datetimeFormat + , FFNLG_AMT: numberFormat + , ADVNTCE_AMT: numberFormat + , REG_DT: datetimeFormat + , MDFCN_DT: datetimeFormat + } + }); + + // 검색 조건 + ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인 + // paging + ctrl.pagingSupport = new FimsPagingSupport({ + ctrl: ctrl // DatasetControl + , ignoreCtrlPrefix: true // ctrl.prefix 가 있더라도 무시 + , linkContainer: "[name='dataPaging']" //
    + }); + + /************************************************************************** + * DatasetControl Events + **************************************************************************/ + ctrl.onDatasetChange = (obj, option) => { + // 데이터 셋 + let dataList = ctrl.dataset; + let empty = dataList.empty; + + let replacer = (str, dataItem) => str + .replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');") + .replace(/{ondblclick}/gi, "pageObject['" + pageName + "'].dataTableDblClick('{data-index}');"); + + let trs = empty ? + [ctrl.find("[name='tmpltNotFound']").innerHTML] + : dataList.inStrings(ctrl.find("[name='tmpltRows']").innerHTML, replacer); + + let noMore = (dataList.length >= obj["Paging"]?.totalSize); // 전체 건수 + let initScroll = (ctrl.query.pageNum < 2); + + if (option != null && option.reloaded) { + initScroll = false; + } + + // dataTables(그리드)에 자료 표시 td + ctrl.find("[name='tableRspns']").changeContent(trs.join(), initScroll, noMore); + + // dataTables(그리드)에 페이지 표시 pagingInfo + ctrl.pagingSupport.setPagingInfo(obj); + + // 보안모드 + fn_securityModeToggle($("#securityMode--top").is(":checked")); + }; + + // 현재 선택 자료 변경 이벤트 + ctrl.onCurrentChange = (item) => { + Apply.fromDataset.currentRow(ctrl.dataset, item, ctrl.find("[name='tbodyList']")); + }; + + // 저장 callback + ctrl.onSave = (params, resp) => { + let modalId = $(document.querySelector(doctx)).parents(".modal")[0].id; + let dialogTitle = $("#" + modalId).find("h5.modal-title").html(); + let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle); + + // 메시지 출력 + dialog.alert({ + content: showMessage + , init: () => { AppSupport.setDialogZindex(); } + , onOK: () => { } + , onClose: () => { + if (resp.saved) { dialog.close(modalId); } + } + }); + } + + // 저장 + ctrl.save = (params) => { + if (!params) return; + + ajax.post({ + url: ctrl.urls.create + , data: params || {} + , success: (resp) => { ctrl.onSave(params, resp); } + }); + } + + return ctrl; +}