From cbd7fa8719ee8ae132b46b96a9d0eb765ae6811a Mon Sep 17 00:00:00 2001 From: leebj Date: Wed, 16 Oct 2024 11:28:24 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=B8=EC=9E=90=EC=A0=84=EC=86=A1=20?= =?UTF-8?q?=ED=98=84=ED=99=A9=20=EB=A9=94=EB=89=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/mngt/mngt03010-main.jsp | 212 ++++++++++++++++++ .../resources/js/fims/mngt/mngt03010.js | 63 ++++++ 2 files changed, 275 insertions(+) create mode 100644 src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03010-main.jsp create mode 100644 src/main/webapp/resources/js/fims/mngt/mngt03010.js diff --git a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03010-main.jsp new file mode 100644 index 00000000..b6f87b6d --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03010-main.jsp @@ -0,0 +1,212 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> + +문자전송 현황 + + +
+ +
+
+ +
+ + + + +
+ + + +
+ + + + + +
+ + + +
+
+ +
+ +
    +
+
+ +
+
+ + + +
+ +
+ +
+
+ + +
+
+ + + diff --git a/src/main/webapp/resources/js/fims/mngt/mngt03010.js b/src/main/webapp/resources/js/fims/mngt/mngt03010.js new file mode 100644 index 00000000..acd794ea --- /dev/null +++ b/src/main/webapp/resources/js/fims/mngt/mngt03010.js @@ -0,0 +1,63 @@ +function newMngt03010Control(pageName, doctx="[data-doctx='mngt03010']") { + let ctrl = new DatasetControl({ + doctx: doctx + , prefix: "msgMngt" + , prefixName: "문자전송관리" + , dataGetter: obj => obj["List"] + , keys: ["MSG_KEY"] + , appendData: true + , infoSize: "xl" + , urls: { + load: wctx.url("/mngt/mngt03/010/list.do") + } + , formats: { + REG_DT: datetimeFormat + } + }); + + // 검색 조건 + ctrl.query = { pageNum: 1, fetchSize: DEFAULT_FETCH_SIZE }; // 1 페이지당 자료 건수 index.jsp에서 확인 + + /************************************************************************** + * DatasetControl Events + **************************************************************************/ + // Dataset 변경 이벤트 + ctrl.onDatasetChange = (obj, option) => { + // 데이터 셋 + let dataList = ctrl.dataset; + let empty = dataList.empty; + + // 업무별 dataTables(그리드) tr, td + let foundContent = ctrl.find("[name='tmpltRows']").content; + let foundTr = $(foundContent).find("tr")[0].cloneNode(false); + + let replacer = (str, dataItem) => str + .replace(/{onclick}/gi, "pageObject['" + pageName + "'].dataTableClick('{data-index}');") + .replace(/{ondblclick}/gi, ""); + + let trs = empty ? + [ctrl.find("[name='tmpltNotFound']").content.querySelector(".cmn").outerHTML] + : dataList.inStrings(foundTr.outerHTML, 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 + pageObject[pageName].pagingSupport.setPagingInfo(obj); + }; + + // 현재 선택 자료 변경 이벤트 + ctrl.onCurrentChange = (item) => { + Apply.fromDataset.currentRow(ctrl.dataset, item, ctrl.find("[name='tbodyList']")); + }; + + + return ctrl; +}