FAISP/src/main/resources/templates/igActivities/fpiMgt/affairPlan/planViewModal.html

176 lines
8.9 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="planViewModalLabel">월간 계획 열람</h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-12">
<input type="hidden" name="planKey" id="viewModalPlanKey" th:value="${plan.planKey}">
<input type="hidden" name="wrtOrgan" th:value="${plan.wrtOrgan}">
<input type="hidden" name="planState" id="planState" th:value="${plan.planState}">
<div class="row mb-1">
<label for="wrtUserNm" class="col-sm-1 col-form-label-sm text-center">작성자</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="wrtUserNm" name="wrtUserNm" th:value="${plan.wrtUserNm}"
readonly>
</div>
<label for="wrtDt" class="col-sm-1 col-form-label-sm text-center">작성일시</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="wrtDt" name="wrtDt"
th:value="${#temporals.format(plan.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
</div>
<label for="planDt" class="col-sm-1 col-form-label-sm text-center">시행일자</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="planDt" name="planDt"
th:value="${#temporals.format(plan.planDt, 'yyyy-MM-dd')}" readonly>
</div>
<label for="planState" class="col-sm-1 col-form-label-sm text-center">상태</label>
<div class="col-sm-2">
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
<input type="text" class="form-control form-control-sm" th:if="${commonCode.itemCd eq plan.planState}"
th:value="${commonCode.itemValue}" readonly>
</th:block>
</div>
</div>
<hr>
<div class="row">
<div class="col-8">
<div class="row mb-1">
<label for="contentTitle" class="col-sm-2 col-form-label-sm text-center">제목</label>
<div class="col-sm-10 form-control-sm">
<input type="text" class="form-control-sm border-0" id="contentTitle" name="contentTitle" th:value="${plan.contentTitle}" readonly>
</div>
</div>
<hr>
<div class="row mb-1">
<label for="planDiv" class="col-sm-2 col-form-label-sm text-center">주요 사업계획</label>
<div class="col-sm-10 form-control-sm" id="planDiv">
<th:block th:each="infoList:${plan.mainInfoList}">
<th:block th:if="${infoList.planType eq 'S'}">
<div th:text="${infoList.planInfo}"></div>
</th:block>
</th:block>
</div>
</div>
<hr>
<div class="row mb-1">
<label for="detailPlanDiv" class="col-sm-2 col-form-label-sm text-center px-0">사업개요 및 추진계획</label>
<div class="col-sm-10 form-control-sm" id="detailPlanDiv">
<th:block th:each="infoList:${plan.mainInfoList}">
<th:block th:if="${infoList.planType eq 'D'}">
<div th:utext="${#strings.replace(infoList.planInfo, lineSeparator, '<br>')}"></div>
</th:block>
</th:block>
</div>
</div>
</div>
<div class="col-4">
<table class="table">
<thead>
<tr>
<th>파일명</th>
<th>사이즈</th>
</tr>
</thead>
<tbody>
<th:block th:if="${#lists.isEmpty(plan.fileList)}">
<tr>
<td colspan="2">파일이 없습니다.</td>
</tr>
</th:block>
<th:block th:unless="${#lists.isEmpty(plan.fileList)}">
<th:block th:each="file:${plan.fileList}">
<tr class="fileInfoTr">
<td><a href="#" class="fileDownLink" data-board="affairPlan"
th:data-parentkey="${file.planKey}" 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>
<th:block th:unless="${#lists.isEmpty(plan.apprvList)}">
<hr>
<th:block th:each="apprv,cnt:${plan.apprvList}">
<div >
<!-- <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-12 text-center row border-top-0 border-secondary">
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
<span class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center"
th:if="${commonCode.itemCd eq apprv.state}">결재결과:</span>
<span class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-start"
th:if="${commonCode.itemCd eq apprv.state}" th:text="${commonCode.itemValue}"></span>
</th:block>
<span class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center">결재자:</span>
<span class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start"
th:text="${apprv.userNm}"></span>
<span class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center">결재일시:</span>
<span class="col-sm-2 border-end border-secondary col-form-label col-form-label-sm text-start"
th:text="${#temporals.format(apprv.saveDt, 'yyyy-MM-dd HH:mm:ss')}"></span>
<div class="col-12 text-center row border-top-0 border-secondary">
<span class="col-sm-1 border-end border-secondary col-form-label col-form-label-sm text-center" >기타의견:</span>
<span class="col-sm-7 border-end border-secondary col-form-label col-form-label-sm text-start" th:text="${apprv.etc}"></span>
</div>
</div>
</div>
</th:block>
</th:block>
</div>
<div class="col-12" th:unless="${apprvAuth eq null}">
<th:block th:if="${(#strings.contains(apprvAuth, 'APC003') or #strings.contains(apprvAuth, 'APC004')) and plan.planState eq 'DST002'
or (#strings.contains(apprvAuth, 'APC001') or #strings.contains(apprvAuth, 'APC002')) and plan.planState eq 'DST004'}">
<form action="#" method="post" id="apprvForm">
<div class="row">
<div class="col-10">
<input type="hidden" name="planKey" id="apprvFormPlanKey">
<input type="hidden" name="state" id="viewModalApprvValue">
<input type="text" class="form-control form-control-sm" name="etc" placeholder="추가의견, 반려사유 기입">
<input type="text" class="d-none" id="submitPrevention">
</div>
<div class="col-auto">
<input type="button" class="btn btn-sm btn-success apprvBtn"
th:data-planstate="${(#strings.contains(apprvAuth, 'APC003') or #strings.contains(apprvAuth, 'APC004'))
and plan.planState eq 'DST002'?'DST004':'DST006'}" value="승인">
</div>
<div class="col-auto">
<input type="button" class="btn btn-sm btn-danger apprvBtn"
th:data-planstate="${(#strings.contains(apprvAuth, 'APC003') or #strings.contains(apprvAuth, 'APC004'))
and plan.planState eq 'DST002'?'DST003':'DST005'}" value="반려">
</div>
</div>
</form>
</th:block>
</div>
</div>
</div>
<div class="modal-footer bg-light">
<th:block th:if="${plan.planState eq 'DST006'}">
<button type="button" class="btn btn-secondary" id="printBtn" th:data-plankey="${plan.planKey}">인쇄</button>
</th:block>
<th:block th:unless="${plan.planState eq 'DST004' or plan.planState eq 'DST006'}"><!--승인 상태일때는 수정 불가-->
<th:block th:if="${userSeq eq plan.wrtUserSeq or accessAuth eq 'ACC003'}"><!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
<button type="button" class="btn btn-warning" id="editPlanBtn">수정</button>
</th:block>
</th:block>
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
</div>