From 860864fdb0062e7fba4f76b5e68709060534130b Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Fri, 27 Oct 2023 16:01:44 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=A0=EB=A5=B8=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/sprt/web/Sprt01Controller.java | 20 +++++++++--- .../cokr/xit/fims/task/web/CmnController.java | 4 +-- .../fims/sprt/integrationSearch-mapper.xml | 2 +- .../WEB-INF/jsp/fims/sprt/sprt01010-main.jsp | 31 ++++++++++++++----- .../WEB-INF/jsp/fims/sprt/sprt01020-info.jsp | 18 +++++------ src/main/webapp/WEB-INF/jsp/include/top.jsp | 31 +++++++++++++++++-- .../resources/js/base/menu-support-fims.js | 3 ++ 7 files changed, 83 insertions(+), 26 deletions(-) diff --git a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java index 238cca07..2d229878 100644 --- a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java +++ b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java @@ -46,7 +46,7 @@ public class Sprt01Controller extends ApplicationController { * * @return /fims/sprt/sprt01010 */ - public ModelAndView integrationSearchMain() { + public ModelAndView integrationSearchMain(HttpServletRequest req) { ModelAndView mav = new ModelAndView("fims/sprt/sprt01010-main"); Map> commonCodes = getCodesOf("FIM003", "FIM010", "FIM026", "FIM054"); @@ -59,9 +59,21 @@ public class Sprt01Controller extends ApplicationController { addCodes(commonCodes, mav, "FIM003", "FIM010", "FIM026", "FIM054", "VLTN"); - return mav.addObject("pageName", "sprt01010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix - .addObject("infoPrefix", "unityInq") // prefix - ; + mav.addObject("pageName", "sprt01010");// View(jsp)에서 사용할 id 뒤에 붙일 suffix + + String fastBy = req.getParameter("fastBy"); + String fastTerm = req.getParameter("fastTerm"); + + if(!ifEmpty(fastBy, () -> "").equals("") && !ifEmpty(fastTerm, () -> "").equals("")) { + mav.addObject("fastSearch", toJson(Map.of( + "fastBy", fastBy, + "fastTerm", fastTerm + ))); + } else { + mav.addObject("fastSearch", "null"); + } + + return mav; } /**지정한 조건에 따라 통합 조회 자료 목록을 반환한다.
diff --git a/src/main/java/cokr/xit/fims/task/web/CmnController.java b/src/main/java/cokr/xit/fims/task/web/CmnController.java index 46c7aa29..d59d8d5e 100644 --- a/src/main/java/cokr/xit/fims/task/web/CmnController.java +++ b/src/main/java/cokr/xit/fims/task/web/CmnController.java @@ -310,8 +310,8 @@ public class CmnController { */ @Override @RequestMapping(name="통합조회 메인", value="/010/main.do") - public ModelAndView integrationSearchMain() { - return super.integrationSearchMain(); + public ModelAndView integrationSearchMain(HttpServletRequest req) { + return super.integrationSearchMain(req); } @Override diff --git a/src/main/resources/sql/mapper/fims/sprt/integrationSearch-mapper.xml b/src/main/resources/sql/mapper/fims/sprt/integrationSearch-mapper.xml index 20fc5400..497857e6 100644 --- a/src/main/resources/sql/mapper/fims/sprt/integrationSearch-mapper.xml +++ b/src/main/resources/sql/mapper/fims/sprt/integrationSearch-mapper.xml @@ -94,7 +94,7 @@ , L.INST_CD /* 기관 코드 */ , L.DEPT_CD /* 부서 코드 */ , L.FYR /* 회계 연도 */ - , L.ACNTG_SE /* 회계 구분 */ + , L.ACNTG_SE_CD /* 회계 구분 */ , L.TXITM_CD /* 세목 코드 */ , L.LEVY_NO /* 부과 번호 */ , L.INSPY_SN /* 분납 순번 */ 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 5833b952..bf8927e0 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 @@ -21,9 +21,10 @@ /************************************************************************** * Global Variable **************************************************************************/ - - // 공통 코드 - var FIM054 = new CommonCodes(${FIM054}, true); +var fastSearch = ${fastSearch}; + +// 공통 코드 +var FIM054 = new CommonCodes(${FIM054}, true); /************************************************************************** * DatasetControl @@ -54,16 +55,16 @@ var integrationSearchControl = new DatasetControl({ **************************************************************************/ // Dataset 변경 이벤트 integrationSearchControl.onDatasetChange = obj => { - + integrationSearch.renderList("up"); integrationSearch.renderList("down"); //$("#paging--${pageName}").setPagingInfo({ // list : integrationSearchControl.dataset // , prefix : "paging--${pageName}" - // , start : obj.${infoPrefix}Start - // , totalSize : obj.${infoPrefix}Total - // , fetchSize : obj.${infoPrefix}Fetch + // , start : obj.Start + // , totalSize : obj.Total + // , fetchSize : obj.Fetch // , func : "integrationSearchControl.load({index})" //}); @@ -327,6 +328,22 @@ $(document).ready(function() { fn_securityModeToggle($("#securityMode--top").is(":checked")); integrationSearch.fnReset(); + + if(fastSearch != null){ + if(fastSearch.fastBy == "vhrno"){ + $("#ischVhrno--${pageName}").val(fastSearch.fastTerm); + } else if(fastSearch.fastBy == "rtpyrNm"){ + $("#ischRtpyrNm--${pageName}").val(fastSearch.fastTerm); + } else if(fastSearch.fastBy == "rtpyrNo"){ + $("#ischRtpyrNo--${pageName}").val(fastSearch.fastTerm); + } else if(fastSearch.fastBy == "cvlcptAplcntNm"){ + $("#ischCvlcptAplcntNm--${pageName}").val(fastSearch.fastTerm); + } else { + return; + } + } + + $("#btnSearch--${pageName}").click(); }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01020-info.jsp index 59519ad1..c3695c49 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01020-info.jsp @@ -188,11 +188,11 @@
+ + + + +
@@ -200,8 +200,8 @@
@@ -210,8 +210,8 @@ diff --git a/src/main/webapp/WEB-INF/jsp/include/top.jsp b/src/main/webapp/WEB-INF/jsp/include/top.jsp index ffe277b3..b8be656c 100644 --- a/src/main/webapp/WEB-INF/jsp/include/top.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/top.jsp @@ -21,13 +21,13 @@
- - + @@ -221,7 +221,32 @@ function fn_securityModeToggle(flag, elementId){ } /*--------------------- 통합조회 버튼 클릭 이벤트 ---------------------*/ -mappingButtonAndMenu("btnFastSearch--top","통합조회"); +$("#btnFastSearch--top").on( "click", function() { + doFastSearch(); +}); + +$("#fastTerm--top").on("keyup", function(e){ + if(e.key == "Enter"){ + doFastSearch(); + } +}); + +function doFastSearch(){ + closeTab("17"); + + var itegrationSearchMenu = $("#menus").find("li[data-key='17'] a")[0]; + + if($("#fastTerm--top").val() != ""){ + var fastTerm = $("#fastTerm--top").val(); + var fastBy = $("#fastBy--top").val(); + + openMenu(itegrationSearchMenu, "?fastBy="+fastBy+"&fastTerm="+fastTerm); + } else { + openMenu(itegrationSearchMenu); + } +} + +//mappingButtonAndMenu("btnFastSearch--top","통합조회"); diff --git a/src/main/webapp/resources/js/base/menu-support-fims.js b/src/main/webapp/resources/js/base/menu-support-fims.js index fbe87305..9cb6f4bf 100644 --- a/src/main/webapp/resources/js/base/menu-support-fims.js +++ b/src/main/webapp/resources/js/base/menu-support-fims.js @@ -150,6 +150,9 @@ function closeTab(menuId) { // click한 tab const selIdx = id2Index("div#tabsForInnerPage","tab-"+menuId); + if(selIdx == -1){ + return; + } // active tab let activeTab = $('div#tabsForInnerPage ul li button.nav-link').filter(".active");