From 93b5c97b617cc86d7f416b94850ccaf2cf3f97cf Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 18 Dec 2023 10:32:41 +0900 Subject: [PATCH] =?UTF-8?q?=ED=86=B5=ED=95=A9=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=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/sprt/sprt01010-main.jsp | 43 +++++++++++++++++++ .../WEB-INF/jsp/fims/sprt/sprt01012-info.jsp | 12 ++++-- .../WEB-INF/jsp/fims/sprt/sprt01013-info.jsp | 18 +++++--- .../webapp/resources/js/base/base-fims.js | 6 ++- 4 files changed, 68 insertions(+), 11 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp index 047a5f29..0167b7da 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01010-main.jsp @@ -267,8 +267,10 @@ integrationSearch.renderList = (updown, tabGroup) => { var empty = ds.empty; if(empty){ trs = notFound; + integrationSearch.setTotalData(updown, []); } else if(tabGroup == "전체"){ trs = ds.inStrings(found, replacer); + integrationSearch.setTotalData(updown, ds._items); } else { var temp = ds._items; @@ -277,6 +279,8 @@ integrationSearch.renderList = (updown, tabGroup) => { filtered = temp.filter(item => item.data.TAB_GROUP == tabGroup); + integrationSearch.setTotalData(updown, filtered); + if(filtered.lenth < 1){ trs = notFound; } else { @@ -295,6 +299,45 @@ integrationSearch.renderList = (updown, tabGroup) => { } + +//합계 표시 +integrationSearch.setTotalData = (updown, list) => { + + if(updown == "up"){ + + $("#minapCnt--${pageName}").set(list.length); + var minapAmt = list.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0); + $("#minapAmt--${pageName}").set(minapAmt); + + var listForSgg = list.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD); + $("#minapCntForSgg--${pageName}").set(listForSgg.length); + var minapAmtForSgg = listForSgg.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0); + $("#minapAmtForSgg--${pageName}").set(minapAmtForSgg); + + } else { + + var sunapList = list.filter(item => item.data.TAB_GROUP == '수납'); + var sonList = list.filter(item => item.data.TAB_GROUP == '결손'); + + $("#sunapCnt--${pageName}").set(sunapList.length); + var sunapAmt = sunapList.reduce((a, b) => a + ifEmpty(b.data.RCVMT_AMT,0), 0); + $("#sunapAmt--${pageName}").set(sunapAmt); + + var sunapListForSgg = sunapList.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD); + $("#sunapCntForSgg--${pageName}").set(sunapListForSgg.length); + var sunapAmtForSgg = sunapListForSgg.reduce((a, b) => a + ifEmpty(b.data.RCVMT_AMT,0), 0); + $("#sunapAmtForSgg--${pageName}").set(sunapAmtForSgg); + + var sonListForSgg = sonList.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD); + $("#sonCntForSgg--${pageName}").set(sonListForSgg.length); + var sonAmtForSgg = sonListForSgg.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0); + $("#sonAmtForSgg--${pageName}").set(sonAmtForSgg); + + } + +}; + + // 엑셀 integrationSearch.fnExcel = (updown) => { var headerInfo; diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp index 092b3a65..f4d8302b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01012-info.jsp @@ -9,19 +9,23 @@ - + - + - + - + diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01013-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01013-info.jsp index d3a000ad..feffc87e 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01013-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01013-info.jsp @@ -9,27 +9,33 @@ - + - + - + - + - + - + diff --git a/src/main/webapp/resources/js/base/base-fims.js b/src/main/webapp/resources/js/base/base-fims.js index 966ea275..e23ba5d3 100644 --- a/src/main/webapp/resources/js/base/base-fims.js +++ b/src/main/webapp/resources/js/base/base-fims.js @@ -19,7 +19,11 @@ $.fn.set = function(value) { $(this).prop("checked", false); } } else { - $(this).val(value); + if(this.dataset.fmtType == "number"){ + $(this).val(numberFormat.format(value)); + } else { + $(this).val(value); + } } }); }