빠른 조회 추가

main
이범준 1 year ago
parent 0b4fb0b5f0
commit 860864fdb0

@ -46,7 +46,7 @@ public class Sprt01Controller extends ApplicationController {
* *
* @return /fims/sprt/sprt01010 * @return /fims/sprt/sprt01010
*/ */
public ModelAndView integrationSearchMain() { public ModelAndView integrationSearchMain(HttpServletRequest req) {
ModelAndView mav = new ModelAndView("fims/sprt/sprt01010-main"); ModelAndView mav = new ModelAndView("fims/sprt/sprt01010-main");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM003", "FIM010", "FIM026", "FIM054"); Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM003", "FIM010", "FIM026", "FIM054");
@ -59,9 +59,21 @@ public class Sprt01Controller extends ApplicationController {
addCodes(commonCodes, mav, "FIM003", "FIM010", "FIM026", "FIM054", "VLTN"); addCodes(commonCodes, mav, "FIM003", "FIM010", "FIM026", "FIM054", "VLTN");
return mav.addObject("pageName", "sprt01010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix mav.addObject("pageName", "sprt01010");// View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefix", "unityInq") // prefix
; 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;
} }
/** .<br /> /** .<br />

@ -310,8 +310,8 @@ public class CmnController {
*/ */
@Override @Override
@RequestMapping(name="통합조회 메인", value="/010/main.do") @RequestMapping(name="통합조회 메인", value="/010/main.do")
public ModelAndView integrationSearchMain() { public ModelAndView integrationSearchMain(HttpServletRequest req) {
return super.integrationSearchMain(); return super.integrationSearchMain(req);
} }
@Override @Override

@ -94,7 +94,7 @@
, L.INST_CD /* 기관 코드 */ , L.INST_CD /* 기관 코드 */
, L.DEPT_CD /* 부서 코드 */ , L.DEPT_CD /* 부서 코드 */
, L.FYR /* 회계 연도 */ , L.FYR /* 회계 연도 */
, L.ACNTG_SE /* 회계 구분 */ , L.ACNTG_SE_CD /* 회계 구분 */
, L.TXITM_CD /* 세목 코드 */ , L.TXITM_CD /* 세목 코드 */
, L.LEVY_NO /* 부과 번호 */ , L.LEVY_NO /* 부과 번호 */
, L.INSPY_SN /* 분납 순번 */ , L.INSPY_SN /* 분납 순번 */

@ -21,9 +21,10 @@
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
var fastSearch = ${fastSearch};
// 공통 코드
var FIM054 = new CommonCodes(${FIM054}, true); // 공통 코드
var FIM054 = new CommonCodes(${FIM054}, true);
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
@ -54,16 +55,16 @@ var integrationSearchControl = new DatasetControl({
**************************************************************************/ **************************************************************************/
// Dataset 변경 이벤트 // Dataset 변경 이벤트
integrationSearchControl.onDatasetChange = obj => { integrationSearchControl.onDatasetChange = obj => {
integrationSearch.renderList("up"); integrationSearch.renderList("up");
integrationSearch.renderList("down"); integrationSearch.renderList("down");
//$("#paging--${pageName}").setPagingInfo({ //$("#paging--${pageName}").setPagingInfo({
// list : integrationSearchControl.dataset // list : integrationSearchControl.dataset
// , prefix : "paging--${pageName}" // , prefix : "paging--${pageName}"
// , start : obj.${infoPrefix}Start // , start : obj.Start
// , totalSize : obj.${infoPrefix}Total // , totalSize : obj.Total
// , fetchSize : obj.${infoPrefix}Fetch // , fetchSize : obj.Fetch
// , func : "integrationSearchControl.load({index})" // , func : "integrationSearchControl.load({index})"
//}); //});
@ -327,6 +328,22 @@ $(document).ready(function() {
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
integrationSearch.fnReset(); 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();
}); });
</script> </script>

@ -188,11 +188,11 @@
<div class="col-6"> <div class="col-6">
<label class="form-label fw-bold form-search-title text-end">처리상태</label> <label class="form-label fw-bold form-search-title text-end">처리상태</label>
<select id="ischCrdnSttsCd--${pageName}" name="ischCrdnSttsCd" class="form-select"> <select id="ischCrdnSttsCd--${pageName}" name="ischCrdnSttsCd" class="form-select">
<option value="">전체</option> <option value="">전체</option>
<c:forEach items="${FIM010List}" var="item"> <c:forEach items="${FIM010List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 단속등록구분 --> <!-- 단속등록구분 -->
<div class="col-6"> <div class="col-6">
@ -200,8 +200,8 @@
<select id="ischCrdnRegSeCd--${pageName}" name="ischCrdnRegSeCd" class="form-select"> <select id="ischCrdnRegSeCd--${pageName}" name="ischCrdnRegSeCd" class="form-select">
<option value="">전체</option> <option value="">전체</option>
<c:forEach items="${FIM026List}" var="item"> <c:forEach items="${FIM026List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 단속입력구분 --> <!-- 단속입력구분 -->
@ -210,8 +210,8 @@
<select id="ischCrdnInptSeCd--${pageName}" name="ischCrdnInptSeCd" class="form-select"> <select id="ischCrdnInptSeCd--${pageName}" name="ischCrdnInptSeCd" class="form-select">
<option value="">전체</option> <option value="">전체</option>
<c:forEach items="${FIM003List}" var="item"> <c:forEach items="${FIM003List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<!-- 단속법정동 --> <!-- 단속법정동 -->

@ -21,13 +21,13 @@
</div> </div>
<!-- /Search --> <!-- /Search -->
<div class="ms-1 me-1" style="min-width: max-content;"> <div class="ms-1 me-1" style="min-width: max-content;">
<select id="by--top" class="form-select" title="검색구분"> <select id="fastBy--top" class="form-select" title="검색구분">
<option value="vhrno">차량번호</option> <option value="vhrno">차량번호</option>
<option value="rtpyrNm">납부자명</option> <option value="rtpyrNm">납부자명</option>
<option value="rtpyrNo">납부자번호</option> <option value="rtpyrNo">납부자번호</option>
<option value="cvlcptAplcntNm">신고인명</option> <option value="cvlcptAplcntNm">신고인명</option>
</select> </select>
<input type="text" id="term--top" class="form-control" title="검색어" /> <input type="text" id="fastTerm--top" class="form-control" title="검색어" />
<button type="button" id="btnFastSearch--top" class="btn btn-outline-dark bg-orange" title="통합조회"> <button type="button" id="btnFastSearch--top" class="btn btn-outline-dark bg-orange" title="통합조회">
<i class="bx bx-search"></i>통합조회 <i class="bx bx-search"></i>통합조회
</button> </button>
@ -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","통합조회");

@ -150,6 +150,9 @@ function closeTab(menuId) {
// click한 tab // click한 tab
const selIdx = id2Index("div#tabsForInnerPage","tab-"+menuId); const selIdx = id2Index("div#tabsForInnerPage","tab-"+menuId);
if(selIdx == -1){
return;
}
// active tab // active tab
let activeTab = $('div#tabsForInnerPage ul li button.nav-link').filter(".active"); let activeTab = $('div#tabsForInnerPage ul li button.nav-link').filter(".active");

Loading…
Cancel
Save