부서코드 관리방식 변경에 의한 검색조건 소스 수정

master
강석 최 2023-02-23 10:29:31 +09:00
parent c9b7f6131d
commit ef5c022d8b
5 changed files with 30 additions and 17 deletions

View File

@ -42,7 +42,16 @@ $(document).on('click', '.alarmTr', function (){
"alarmKey="+$(this).find(".alarmKey").val()+ "alarmKey="+$(this).find(".alarmKey").val()+
"&userSeq="+$(this).find(".userSeq").val(); "&userSeq="+$(this).find(".userSeq").val();
}) })
$(document).on('change', '#ogCdSearch', function (){
const ofcCdSearch = $("#ofcCdSearch")
ofcCdSearch.val("");
if(this.value === ""){
ofcCdSearch.find('.ofcCdOption').show();
}else{
ofcCdSearch.find('.ofcCdOption').hide();
ofcCdSearch.find('.'+this.value).show();
}
})
$(document).on('click', '.allChk', function (){ $(document).on('click', '.allChk', function (){
$(this).parents('table').find('[type="checkbox"]').prop("checked", this.checked); $(this).parents('table').find('[type="checkbox"]').prop("checked", this.checked);
}) })

View File

@ -29,7 +29,7 @@
<div class="col-auto"> <div class="col-auto">
<div class="row justify-content-end"> <div class="row justify-content-end">
<div class="col-auto"> <div class="col-auto">
<select class="form-select form-select-sm" name="ogCd"> <select class="form-select form-select-sm" name="ogCd" id="ogCdSearch">
<option value="">관서 선택</option> <option value="">관서 선택</option>
<th:block th:each="code:${session.commonCode.get('OG')}"> <th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${code.useChk eq 'T' and #lists.contains(mgtOrganList, code.itemCd)}"> <th:block th:if="${code.useChk eq 'T' and #lists.contains(mgtOrganList, code.itemCd)}">
@ -39,11 +39,12 @@
</select> </select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select class="form-select form-select-sm" name="ofcCd"> <select class="form-select form-select-sm" name="ofcCd" id="ofcCdSearch">
<option value="">부서 선택</option> <option value="">부서 선택</option>
<th:block th:each="parentCode:${session.commonCode.get('OG')}"> <th:block th:each="parentCode:${session.commonCode.get('OG')}">
<th:block th:each="code:${session.commonCode.get(parentCode.itemCd)}"> <th:block th:each="code:${session.commonCode.get(parentCode.itemCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.ofcCd eq code.itemCd}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.ofcCd eq code.itemCd}"
class="ofcCdOption" th:classappend="${parentCode.itemCd}" th:style="${#strings.isEmpty(searchParams.ogCd)?'':(searchParams.ogCd eq parentCode.itemCd?'':'display: none')}"></option>
</th:block> </th:block>
</th:block> </th:block>
</select> </select>

View File

@ -29,7 +29,7 @@
<div class="col-auto"> <div class="col-auto">
<div class="row justify-content-end"> <div class="row justify-content-end">
<div class="col-auto"> <div class="col-auto">
<select class="form-select form-select-sm" name="ogCd"> <select class="form-select form-select-sm" name="ogCd" id="ogCdSearch">
<option value="">관서 선택</option> <option value="">관서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}"> <th:block th:each="commonCode:${session.commonCode.get('OG')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd==commonCode.itemCd}"></option> <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd==commonCode.itemCd}"></option>
@ -37,11 +37,12 @@
</select> </select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select class="form-select form-select-sm" name="ofcCd"> <select class="form-select form-select-sm" name="ofcCd" id="ofcCdSearch">
<option value="">부서 선택</option> <option value="">부서 선택</option>
<th:block th:each="parentCode:${session.commonCode.get('OG')}"> <th:block th:each="parentCode:${session.commonCode.get('OG')}">
<th:block th:each="code:${session.commonCode.get(parentCode.itemCd)}"> <th:block th:each="code:${session.commonCode.get(parentCode.itemCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.ofcCd eq code.itemCd}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.ofcCd eq code.itemCd}"
class="ofcCdOption" th:classappend="${parentCode.itemCd}" th:style="${#strings.isEmpty(searchParams.ogCd)?'':(searchParams.ogCd eq parentCode.itemCd?'':'display: none')}"></option>
</th:block> </th:block>
</th:block> </th:block>
</select> </select>

View File

@ -39,19 +39,20 @@
<div class="col-auto"> <div class="col-auto">
<div class="row justify-content-end"> <div class="row justify-content-end">
<div class="col-auto"> <div class="col-auto">
<select class="form-select form-select-sm" name="ogCd"> <select class="form-select form-select-sm" name="ogCd" id="ogCdSearch">
<option value="">관서 선택</option> <option value="">관서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}"> <th:block th:each="code:${session.commonCode.get('OG')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd==commonCode.itemCd}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.ogCd eq code.itemCd}"></option>
</th:block> </th:block>
</select> </select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<select class="form-select form-select-sm" name="ofcCd"> <select class="form-select form-select-sm" name="ofcCd" id="ofcCdSearch">
<option value="">부서 선택</option> <option value="">부서 선택</option>
<th:block th:each="parentCode:${session.commonCode.get('OG')}"> <th:block th:each="parentCode:${session.commonCode.get('OG')}">
<th:block th:each="code:${session.commonCode.get(parentCode.itemCd)}"> <th:block th:each="code:${session.commonCode.get(parentCode.itemCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.ofcCd eq code.itemCd}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.ofcCd eq code.itemCd}"
class="ofcCdOption" th:classappend="${parentCode.itemCd}" th:style="${#strings.isEmpty(searchParams.ogCd)?'':(searchParams.ogCd eq parentCode.itemCd?'':'display: none')}"></option>
</th:block> </th:block>
</th:block> </th:block>
</select> </select>
@ -59,8 +60,8 @@
<div class="col-auto"> <div class="col-auto">
<select class="form-select form-select-sm" name="titleCd"> <select class="form-select form-select-sm" name="titleCd">
<option value="">계급 선택</option> <option value="">계급 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('JT')}"> <th:block th:each="code:${session.commonCode.get('JT')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.titleCd==commonCode.itemCd}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.titleCd eq code.itemCd}"></option>
</th:block> </th:block>
</select> </select>
</div> </div>

View File

@ -52,7 +52,7 @@
<div class="row"> <div class="row">
<div class="col-4"></div> <div class="col-4"></div>
<div class="col-2"> <div class="col-2">
<select class="form-select form-select-sm" name="ogCd"> <select class="form-select form-select-sm" name="ogCd" id="ogCdSearch">
<option value="">관서 선택</option> <option value="">관서 선택</option>
<th:block th:each="code:${session.commonCode.get('OG')}"> <th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(mgtOrganList, code.itemCd)}"> <th:block th:if="${#lists.contains(mgtOrganList, code.itemCd)}">
@ -62,11 +62,12 @@
</select> </select>
</div> </div>
<div class="col-2"> <div class="col-2">
<select class="form-select form-select-sm" name="ofcCd"> <select class="form-select form-select-sm" name="ofcCd" id="ofcCdSearch">
<option value="">부서 선택</option> <option value="">부서 선택</option>
<th:block th:each="parentCode:${session.commonCode.get('OG')}"> <th:block th:each="parentCode:${session.commonCode.get('OG')}">
<th:block th:each="code:${session.commonCode.get(parentCode.itemCd)}"> <th:block th:each="code:${session.commonCode.get(parentCode.itemCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.ofcCd eq code.itemCd}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${searchParams.ofcCd eq code.itemCd}"
class="ofcCdOption" th:classappend="${parentCode.itemCd}" th:style="${#strings.isEmpty(searchParams.ogCd)?'':(searchParams.ogCd eq parentCode.itemCd?'':'display: none')}"></option>
</th:block> </th:block>
</th:block> </th:block>
</select> </select>