FAISP/src/main/resources/templates/equip/pvreUseList.html

156 lines
8.3 KiB
HTML

<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="script">
<script type="text/javascript" th:src="@{/js/equip/use.js}"></script>
</th:block>
<div layout:fragment="content">
<main>
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="row justify-content-between">
<div class="col-auto mb-2">
<div class="d-inline align-middle"><i class="bi bi-square-fill"></i></div>
<h5 class="d-inline align-middle"> 휴대용 영상녹화장비 사용대장</h5>
</div>
<div class="col-auto"><p class="mb-0 mt-2">외사장비 > 휴대용 영상녹화장비 사용대장</p></div>
</div>
<div class="row mx-0">
<div class="col-12 card bg-light text-center">
<div class="card-body">
<form id="searchFm" method="get" th:action="@{/equip/pvreUseList}">
<input type="hidden" name="excel">
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
<div class="row justify-content-between py-1">
<div class="col-auto">
<select class="form-select form-select-sm" name="rowCnt" id="rowCnt">
<th:block th:each="num : ${#numbers.sequence(1,5)}">
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt==num*10}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<button type="button" class="btn btn-sm btn-success" id="goExcel">엑셀다운</button>
</div>
</div>
<div class="row justify-content-end py-1">
<div class="col-1" th:if="${accessAuth eq 'ACC003'}">
<select class="form-select form-select-sm" name="mgtOrgan">
<option value="">경찰서</option>
<th:block th:each="organList:${organList}">
<option th:value="${organList.item_cd}" th:text="${organList.item_value}" th:selected="${organList.item_cd eq searchParams.mgtOrgan}"></option>
</th:block>
</select>
</div>
<div class="col-1">
<input type="text" class="form-control form-control-sm" placeholder="연번" name="useNo" th:value="${searchParams.useNo}">
</div>
<div class="col-1">
<select class="form-select form-select-sm" name="detailType">
<option value="">사용사유</option>
<th:block th:each="commonCode:${session.commonCode.get('PVREUSE')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.detailType}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<div class="input-group input-daterange" id="dateSelectorDiv">
<select class="form-select form-select-sm w-30" name="dateSelector">
<option value="">조건선택</option>
<option value="useDt" th:selected="${searchParams.dateSelector eq 'useDt'}">사용일</option>
<option value="wrtDt" th:selected="${searchParams.dateSelector eq 'wrtDt'}">최종수정일</option>
</select>
<input type="text" class="form-control form-control-sm w-35" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
<input type="text" class="form-control form-control-sm w-35" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
</div>
</div>
<div class="col-auto">
<input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색">
</div>
</div>
</form>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-12">
<table class="table table-sm table-hover table-bordered">
<thead>
<tr class="table-secondary">
<th> <input type="checkbox" id="chk-all" class="useCheckBox"></th>
<th>연번</th>
<th>경찰서</th>
<th>사용일시</th>
<th>사용사유</th>
<th>사용인원</th>
<th>비고</th>
<th>최종수정일</th>
</tr>
</thead>
<tbody class="table-group-divider">
<tr class="useTr" th:each="list:${useList}" th:data-useNo="${list.useNo}" th:data-mgtOrgan="${list.mgtOrgan}" th:data-useType="${list.useType}">
<td class="useChk"><input type="checkbox" name="useChk" class="useCheckBox"></td>
<td th:text="${list.useNo}"></td>
<td th:text="${list.sosok}"></td>
<td th:text="${list.useDt}"></td>
<td th:text="${list.detailTypeName}" th:if="${list.detailType != 'PVREUSE007'}"></td>
<td th:text="${list.detailSelf}" th:unless="${list.detailType != 'PVREUSE007'}"></td>
<td th:text="${list.peopleCnt}"></td>
<td th:text="${list.description}"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row justify-content-between">
<div class="col-auto">
<button type="button" class="btn btn-warning" id="historyBtn">수정이력</button>
<button type="button" class="btn btn-danger" id="deleteUse" th:if="${accessAuth eq 'ACC003'}">삭제</button>
</div>
<div class="col-auto">
<nav aria-label="Page navigation">
<ul class="pagination mb-0">
<th:block th:if="${searchParams.pageIndex>3}">
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)-3}">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
</th:block>
<th:block th:each="num : ${#numbers.sequence(searchParams.startNum, searchParams.endNum)}">
<li class="page-item" th:data-pageindex="${num}" th:classappend="${searchParams.pageIndex==num?'active':''}">
<a class="page-link" href="#" th:text="${num}"></a>
</li>
</th:block>
<th:block th:if="${searchParams.maxNum>searchParams.endNum+2}">
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)+3}">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
</th:block>
</ul>
</nav>
</div>
<div class="col-auto">
<button type="button" class="btn btn-primary" id="addPvre" th:unless="${accessAuth eq 'ACC001'}">등록</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<div class="modal fade" id="useEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content" id="useEditModalContent">
</div>
</div>
</div>
</div>
</html>