diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByBsshStatistics-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByBsshStatistics-main.jsp index 9f3445f..81c1b0f 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByBsshStatistics-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByBsshStatistics-main.jsp @@ -146,7 +146,6 @@ * script 진입 **************************************************************************/ $(document).ready(function() { - let totalDs = null; // pageObject let $P = pageObject["${pageName}"]; @@ -163,18 +162,7 @@ , prefix: "dsuseMgtDsuseQyByBsshStatistics" , prefixName: "제품별 폐기 현황" , keymapper: info => info ? info.dept_cd : "" - , dataGetter: obj => { - let list = obj.${infoPrefix}List; - - // TOTAL 데이터 - totalDs = new Dataset({ - keymapper: info => info? info.bssh_cd : '' - , dataGetter: obj => obj - }); - totalDs.setData(list.filter(d => d.dept_cd === 'TOTAL')); - - return list.filter(d => d.dept_cd !== 'TOTAL'); - } + , dataGetter: obj => obj.${infoPrefix}List , appendData: true , infoSize: "xl" }); @@ -191,11 +179,12 @@ $P.control.onDatasetChange = (obj) => { $P.renderList(obj.${infoPrefix}Total); $("#${infoPrefix}Paging--${pageName}").setPagingInfo({ - list: $P.control.dataset - , prefix: "${infoPrefix}Paging--${pageName}" + //list: $P.control.dataset + prefix: "${infoPrefix}Paging--${pageName}" , start: obj.${infoPrefix}Start - , totalSize: $P.control.dataset.length + , totalSize: $P.control.dataset.length - 1 , fetchSize: obj.${infoPrefix}Fetch + , dataLength: $P.control.dataset.length - 1 , func: "pageObject['${pageName}'].control.load({index})" }); }; @@ -230,26 +219,18 @@ let replacer = (str, dataItem) => { str = str.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("bssh_cd") + "');") - str = str.replace(/{fw-bold-if-total}/gi, ""); + if(dataItem.getValue("dept_cd") === "TOTAL"){ + str = str.replace(/{fw-bold-if-total}/gi, "fw-bold"); + str = str.replace(/{ROW_NUM}/gi, "") + } else { + str = str.replace(/{fw-bold-if-total}/gi, ""); + } return str; } - let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML] : ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer); - $("#tbody--${pageName}").html(trs.join()); - - // TOTAL 데이터 추가 - let replacer2 = (str, dataItem) => { - str = str.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("prduct_cd") + "');") - str = str.replace(/{fw-bold-if-total}/gi, "fw-bold"); - str = str.replace(/{ROW_NUM}/gi, ""); - return str; - } - - let tr = totalDs.inStrings(foundTr.outerHTML, replacer2); - $("#tbody--${pageName}").append(tr); } $P.control.getBsshInfo = (gdccId) => { diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByIndutyStatistics-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByIndutyStatistics-main.jsp index 6bc5846..b82ba6d 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByIndutyStatistics-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByIndutyStatistics-main.jsp @@ -173,6 +173,14 @@ // Dataset 변경 이벤트 $P.control.onDatasetChange = (obj) => { $P.renderList(obj.${infoPrefix}Total); + $("#${infoPrefix}Paging--${pageName}").setPagingInfo({ + prefix: "${infoPrefix}Paging--${pageName}" + , start: obj.${infoPrefix}Start + , totalSize: $P.control.dataset.length - 1 + , fetchSize: obj.${infoPrefix}Fetch + , dataLength: $P.control.dataset.length - 1 + , func: "pageObject['${pageName}'].control.load({index})" + }); }; // 현재 선택 자료 변경 이벤트 diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByPrdStatistics-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByPrdStatistics-main.jsp index 7bb3420..80a905a 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByPrdStatistics-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtDsuseQyByPrdStatistics-main.jsp @@ -145,7 +145,6 @@ * script 진입 **************************************************************************/ $(document).ready(function() { - let totalDs = null; // pageObject let $P = pageObject["${pageName}"]; @@ -162,18 +161,7 @@ , prefix: "dsuseMgtDsuseQyByPrdStatistics" , prefixName: "제품별 폐기 현황" , keymapper: info => info ? info.prduct_cd : "" - , dataGetter: obj => { - let list = obj.${infoPrefix}List; - - // TOTAL 데이터 - totalDs = new Dataset({ - keymapper: info => info? info.dept_cd : '' - , dataGetter: obj => obj - }); - totalDs.setData(list.filter(d => d.dept_cd === 'TOTAL')); - - return list.filter(d => d.dept_cd !== 'TOTAL'); - } + , dataGetter: obj => obj.${infoPrefix}List , appendData: true , infoSize: "xl" }); @@ -190,11 +178,12 @@ $P.control.onDatasetChange = (obj) => { $P.renderList(obj.${infoPrefix}Total); $("#${infoPrefix}Paging--${pageName}").setPagingInfo({ - list: $P.control.dataset - , prefix: "${infoPrefix}Paging--${pageName}" + //list: $P.control.dataset + prefix: "${infoPrefix}Paging--${pageName}" , start: obj.${infoPrefix}Start - , totalSize: $P.control.dataset.length + , totalSize: $P.control.dataset.length - 1 , fetchSize: obj.${infoPrefix}Fetch + , dataLength: $P.control.dataset.length - 1 , func: "pageObject['${pageName}'].control.load({index})" }); }; @@ -229,28 +218,21 @@ let replacer = (str, dataItem) => { str = str.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("prduct_cd") + "');") - str = str.replace(/{fw-bold-if-total}/gi, ""); - return str; + if(dataItem.getValue("dept_cd") === "TOTAL"){ + str = str.replace(/{fw-bold-if-total}/gi, "fw-bold"); + str = str.replace(/{ROW_NUM}/gi, "") + } else { + str = str.replace(/{fw-bold-if-total}/gi, ""); + } + return str; } let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML] : ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer); $("#tbody--${pageName}").html(trs.join()); - - // TOTAL 데이터 추가 - let replacer2 = (str, dataItem) => { - str = str.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("prduct_cd") + "');") - str = str.replace(/{fw-bold-if-total}/gi, "fw-bold"); - str = str.replace(/{ROW_NUM}/gi, ""); - return str; - } - - let tr = totalDs.inStrings(foundTr.outerHTML, replacer2); - $("#tbody--${pageName}").append(tr); } - $P.control.getBsshInfo = (gdccId) => { let dialogTitle = "마약류 취급업체 조회"; let params = {openPage : "frmSearch--${pageName}"}; diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtNcrdAndPrtmStatistics-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtNcrdAndPrtmStatistics-main.jsp index 91981bd..0a124b1 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtNcrdAndPrtmStatistics-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtNcrdAndPrtmStatistics-main.jsp @@ -184,6 +184,14 @@ // Dataset 변경 이벤트 $P.control.onDatasetChange = (obj) => { $P.renderList(); + $("#${infoPrefix}Paging--${pageName}").setPagingInfo({ + prefix: "${infoPrefix}Paging--${pageName}" + , start: obj.${infoPrefix}Start + , totalSize: $P.control.dataset.length - 1 + , fetchSize: obj.${infoPrefix}Fetch + , dataLength: $P.control.dataset.length - 1 + , func: "pageObject['${pageName}'].control.load({index})" + }); }; // 현재 선택 자료 변경 이벤트