FAISP/src/main/resources/templates/igActivities/fpiMgt/affair/affairViewModal.html

245 lines
16 KiB
HTML

<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" id="affairViewModalLabel">견문 열람</h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="hidden" name="affairKey" id="viewModalAffairKey" th:value="${affair.affairKey}">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="boardTab" data-bs-toggle="tab" data-bs-target="#boardTabPanel" type="button" role="tab" aria-controls="boardTabPanel" aria-selected="true">본문</button>
</li>
<li class="nav-item" role="presentation" th:if="${#lists.size(affair.fileList)>0}">
<button class="nav-link" id="fileTab" data-bs-toggle="tab" data-bs-target="#fileTabPanel" type="button" role="tab" aria-controls="fileTabPanel" aria-selected="false" th:text="${#strings.concat('첨부파일(', #lists.size(affair.fileList), ')')}"></button>
</li>
</ul>
<div class="tab-content bg-white border border-top-0 p-2">
<div class="tab-pane fade p-2 show active" id="boardTabPanel" role="tabpanel" tabindex="0">
<div class="row border border-secondary">
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">문서번호</label>
<label class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start" th:text="|해양경찰청외사-${affair.affairKey}|"></label>
</div>
<div class="row border border-top-0 border-secondary">
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">작성자</label>
<label class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('JT')}">
<th:block th:if="${code.itemCd eq affair.wrtUserGrd}" th:text="${code.itemValue}"></th:block>
</th:block>
<th:block th:text="${affair.wrtUserNm}"></th:block>
</label>
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">보고일자</label>
<label class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${#temporals.format(affair.reportDt, 'yyyy-MM-dd')}"></label>
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">공개여부</label>
<th:block th:each="code:${session.commonCode.get('AVS')}">
<th:block th:if="${code.itemCd eq affair.viewStatus}">
<label class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${code.itemValue}"></label>
</th:block>
</th:block>
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">상태</label>
<th:block th:each="code:${session.commonCode.get('DST')}">
<th:block th:if="${code.itemCd eq affair.affairStatus}">
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${code.itemValue}"></label>
</th:block>
</th:block>
</div>
<hr>
<div class="row border border-secondary">
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">제목</label>
<label class="col-sm-11 border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${affair.title}"></label>
</div>
<div class="row border border-top-0 border-secondary">
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">분야1</label>
<th:block th:each="code:${session.commonCode.get('DC01')}">
<th:block th:if="${code.itemCd eq affair.affairType1}">
<label class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${code.itemValue}"></label>
</th:block>
</th:block>
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">분야2</label>
<th:block th:each="code:${session.commonCode.get('DC02')}">
<th:block th:if="${code.itemCd eq affair.affairType2}">
<label class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${code.itemValue}"></label>
</th:block>
</th:block>
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">분야3</label>
<th:block th:each="code:${session.commonCode.get('DC03')}">
<th:block th:if="${code.itemCd eq affair.affairType3}">
<label class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${code.itemValue}"></label>
</th:block>
</th:block>
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">분야4</label>
<th:block th:each="code:${session.commonCode.get('DC04')}">
<th:block th:if="${code.itemCd eq affair.affairType4}">
<label class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${code.itemValue}"></label>
</th:block>
</th:block>
</div>
<hr>
<div class="row border border-top-0 border-secondary">
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">내용</label>
<div class="col-sm-11 form-control-sm" id="contentDiv">
<div th:utext="${affair.content}"></div>
</div>
</div>
<hr>
<div class="row border border-top-0 border-secondary">
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">해시태그</label>
<label class="col-sm-11 border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${affair.hashTags}"></label>
</div>
<div class="row border border-top-0 border-secondary">
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">비고</label>
<label class="col-sm-11 border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${affair.etc}"></label>
</div>
</div>
<div class="tab-pane fade p-2" id="fileTabPanel" role="tabpanel" tabindex="0">
<table class="table">
<thead>
<tr>
<th>파일명</th>
<th>사이즈</th>
</tr>
</thead>
<tbody>
<th:block th:if="${#lists.isEmpty(affair.fileList)}">
<tr>
<td colspan="2">파일이 없습니다.</td>
</tr>
</th:block>
<th:block th:unless="${#lists.isEmpty(affair.fileList)}">
<th:block th:each="file:${affair.fileList}">
<tr class="fileInfoTr">
<td><a href="#" class="fileDownLink" data-board="affair"
th:data-parentkey="${file.affairKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
<td th:text="${file.fileSize}"></td>
</tr>
</th:block>
</th:block>
</tbody>
</table>
</div>
<div class="row border border-top-0 border-secondary">
<div class="col-12" th:unless="${#lists.isEmpty(affair.rateList)}">
<hr>
<th:block th:each="rate:${affair.rateList}">
<div class="row border border-top-0 border-secondary py-1">
<label class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">
<th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${code.itemCd eq rate.ratingOrgan}" th:text="${code.itemValue}"></th:block>
</th:block>
</label>
<div class="col-auto">
<div class="row border border-top-0 border-secondary" th:if="${rate.sectionApprv eq null}">
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-center">결재정보가 없습니다.</label>
</div>
<div class="row border border-top-0 border-secondary" th:if="${rate.sectionApprv ne null}">
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">결재결과: </label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('DST')}">
<th:block th:if="${code.itemCd eq rate.sectionApprv}" th:text="${code.itemValue}"></th:block>
</th:block>
</label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">결재자: </label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${rate.sectionNm}"></label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">결재일시: </label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${#temporals.format(rate.sectionApprvDt, 'yyyy-MM-dd HH:mm:ss')}"></label>
</div>
<div class="row border border-top-0 border-secondary" th:if="${rate.sectionApprv ne null and !#strings.isEmpty(rate.sectionEtc)}">
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">기타의견: </label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${rate.sectionEtc}"></label>
</div>
<div class="row border border-top-0 border-secondary" th:if="${rate.headApprv ne null}">
<th:block th:if="${rate.headApprv eq 'DST006'}">
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">견문평가: </label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('AAR')}">
<th:block th:if="${code.itemCd eq rate.affairRate}" th:text="|${code.itemValue}${rate.organUp eq 'T'?'(상보)':''}|"></th:block>
</th:block>
</label>
</th:block>
<th:block th:if="${rate.headApprv eq 'DST005'}">
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">결재결과: </label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('DST')}">
<th:block th:if="${code.itemCd eq rate.headApprv}" th:text="${code.itemValue}"></th:block>
</th:block>
</label>
</th:block>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">결재자: </label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${rate.headNm}"></label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">결재일시: </label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${#temporals.format(rate.headApprvDt, 'yyyy-MM-dd HH:mm:ss')}"></label>
</div>
<div class="row border border-top-0 border-secondary" th:if="${rate.headApprv ne null and !#strings.isEmpty(rate.headEtc)}">
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-center fw-bold">기타의견: </label>
<label class="col-sm-auto border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${rate.headEtc}"></label>
</div>
</div>
</div>
</th:block>
</div>
<div class="col-12" th:if="${apprvAuth ne null}">
<form action="#" method="post" id="apprvForm">
<input type="hidden" name="affairKey" th:value="${affair.affairKey}">
<th:block th:if="${(apprvAuth eq 'APC003' or apprvAuth eq 'APC004') and affair.affairStatus eq 'DST002' and affair.rateList.get(0).ratingOrgan eq userOrgan}">
<input type="hidden" name="sectionApprv" id="sectionApprv">
<div class="row border border-top-0 border-secondary">
<div class="col-10">
<input type="text" class="form-control form-control-sm etc" name="sectionEtc" placeholder="추가의견, 반려사유 기입">
<input type="text" class="d-none" id="submitPrevention">
</div>
<div class="col-auto">
<input type="button" class="btn btn-sm btn-success apprvBtn" data-apprvtype="section" data-affairstate="DST004" value="승인">
</div>
<div class="col-auto">
<input type="button" class="btn btn-sm btn-danger apprvBtn" data-apprvtype="section" data-affairstate="DST003" value="반려">
</div>
</div>
</th:block>
<th:block th:if="${(apprvAuth eq 'APC001' or apprvAuth eq 'APC002') and affair.affairStatus eq 'DST004' and affair.rateList.get(0).ratingOrgan eq userOrgan}">
<input type="hidden" name="headApprv" id="headApprv">
<div class="row border border-top-0 border-secondary">
<div class="col-8">
<input type="text" class="form-control form-control-sm etc" name="headEtc" placeholder="추가의견, 반려사유 기입">
<input type="text" class="d-none" id="submitPrevention">
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="affairRate" id="affairRate">
<option value="">견문평가</option>
<th:block th:each="ratingCode:${ratingCodeList}">
<option th:value="${ratingCode.itemCd}" th:text="${ratingCode.itemValue}"></option>
</th:block>
</select>
</div>
<div class="col-auto" th:unless="${userOrgan eq 'OG001'}">
<label for="organUp" class="form-check-label">상보여부</label>
<input type="checkbox" id="organUp" name="organUp" value="T">
</div>
<div class="col-auto">
<input type="button" class="btn btn-sm btn-success apprvBtn" data-apprvtype="head" data-affairstate="DST006" value="승인">
</div>
<div class="col-auto">
<input type="button" class="btn btn-sm btn-danger apprvBtn" data-apprvtype="head" data-affairstate="DST005" value="반려">
</div>
</div>
</th:block>
</form>
</div>
</div>
</div>
</div>
<div class="modal-footer bg-light">
<th:block th:unless="${affair.affairStatus eq 'DST004' or affair.affairStatus eq 'DST006'}">
<!--승인 상태일때는 수정 불가-->
<th:block th:if="${userSeq eq affair.wrtUserSeq or accessAuth eq 'ACC003'}">
<!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
<button type="button" class="btn btn-warning" id="editAffairBtn">수정</button>
</th:block>
</th:block>
<th:block th:if="${affair.affairStatus eq 'DST004' or affair.affairStatus eq 'DST006'}">
<!--승인 상태일때 본청 관리자 수정 허용-->
<th:block th:if="${userOrgan eq 'OG001' and accessAuth eq 'ACC003'}">
<button type="button" class="btn btn-warning" id="editAffairBtn">수정</button>
</th:block>
</th:block>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div>