fix: 검색조건에 따른 처리 fix

main
minuk926 2 years ago
parent 05525926d6
commit 9ead480855

@ -28,15 +28,11 @@
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(sbscrbSttus)">
AND xui.user_sttus_code = #{sbscrbSttus}
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(searchKeyword)">
<choose>
<when test="searchCondition eq 'userId'">
AND INSTR(xui.user_id, #{searchKeyword}) > 0
</when>
<when test="searchCondition eq 'userNm'">
AND INSTR(xui.user_nm, #{searchKeyword}) > 0
</when>
</choose>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(userId)">
AND INSTR(xui.user_id, #{userId}) > 0
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(userNm)">
AND INSTR(xui.user_nm, #{userNm}) > 0
</if>
</where>
ORDER BY sbscrb_de DESC

@ -16,7 +16,7 @@
</colgroup>
<tbody>
<tr>
<td style="">
<td>
<label for="clCode">분류코드</label>
<input name="clCode" title="분류코드" type="text" size="15" maxlength="15" id="clCode">
</td>

@ -175,9 +175,8 @@
readData: {
url: '<c:url value="/framework/biz/mng/code/findZipCodes.do"/>'
,serializer: (params) => {
const schVal = $('#searchKeyword').val();
const schKey = $('#searchCondition').val();
if(schVal && schKey) return getPageParam({[schKey]: schVal}, params);
if(schKey) return getPageParam({[schKey]: $('#searchKeyword').val()}, params);
return getPageParam(null, params);
}
}

@ -2,13 +2,13 @@
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
<form name="frmSearch" id="frmSearch" method="post">
<div class="search">
<div class="search r2">
<table>
<caption>검색조건</caption>
<colgroup>
<col style="width: 8%;"/>
<col style="width: 30%;"/>
<col style="width: 400px;"/>
<col/>
<col/>
<col/>
<col/>
@ -17,16 +17,16 @@
</colgroup>
<tbody>
<tr>
<td colspan="6">
<td>
<code:select id="sbscrbSttus" name="sbscrbSttus" codeId="XIT013" title="사용자상태" cls="selectBox" alt="selectBox tag"/>
<select name="searchCondition" id="searchCondition" title="검색구분" class="selectBox">
<option value="userId">사용자ID</option>
<option value="userNm">이름</option>
</select>
<input name="searchKeyword" title="검색어" type="text"/>
<input name="searchKeyword" id="searchKeyword" title="검색어" type="text"/>
</td>
<td>
<input type="button" id="btnSearch" class="btnSearch" title="검색" value="검색"/>
<td colspan="6">
<input type="button" id="btnSearch" class="btn_search" title="검색" value="검색"/>
</td>
</tr>
</tbody>
@ -185,7 +185,11 @@
api: {
readData: {
url: '<c:url value="/framework/biz/mng/usr/findUsers.do"/>'
,serializer: (params) => fnAddPageInfo(document.frmSearch, params)
,serializer: (params) => {
const schKey = $('#searchCondition').val();
if(schKey) return getPageParam({[schKey]: $('#searchKeyword').val(), sbscrbSttus: $('#sbscrbSttus').val()}, params);
return getPageParam({sbscrbSttus: $('#sbscrbSttus').val()}, params);
}
}
}
};

Loading…
Cancel
Save