FAISP/src/main/resources/templates/counterIntelligence/activityCase/activityCaseEditModal.html

260 lines
15 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="activityCaseEditModalLabel">
<th:block th:if="${activityCaseInfo.caseType eq 'ACT001'}">
<th:block th:text="|착수보고서 ${activityCaseInfo.caseKey eq null?'작성':'수정'}|"></th:block>
</th:block>
<th:block th:if="${activityCaseInfo.caseType eq 'ACT002'}">
<th:block th:text="|진행보고서 ${activityCaseInfo.caseKey eq null?'작성':'수정'}|"></th:block>
</th:block>
<th:block th:if="${activityCaseInfo.caseType eq 'ACT003'}">
<th:block th:text="|결과보고서 ${activityCaseInfo.caseKey eq null?'작성':'수정'}|"></th:block>
</th:block>
</h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="activityCaseEditBody">
<form action="#" method="post" id="activityCaseEditForm">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<input type="hidden" name="receiptKey" th:value="${activityCase.receiptKey}">
<input type="hidden" name="wrtOrgan" th:value="${activityCase.wrtOrgan}">
<input type="hidden" name="wrtPart" th:value="${activityCase.wrtPart}">
<input type="hidden" name="wrtUserSeq" th:value="${activityCase.wrtUserSeq}">
<input type="hidden" name="wrtUserGrd" th:value="${activityCase.wrtUserGrd}">
<input type="hidden" name="wrtUserNm" th:value="${activityCase.wrtUserNm}">
<input type="hidden" name="caseKey" th:value="${activityCaseInfo.caseKey}">
<input type="hidden" name="status" id="status" th:value="${activityCaseInfo.status}">
<input type="hidden" id="caseType" name="caseType" th:value="${activityCaseInfo.caseType}">
<div class="row mb-1">
<label for="receiptNum" class="col-sm-1 col-form-label col-form-label-sm text-center">접수번호</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="receiptNum" name="receiptNum" th:value="${activityCase.receiptNum}" placeholder="저장시 생성" readonly>
</div>
<label for="caseNum" class="col-sm-1 col-form-label col-form-label-sm text-center">사건번호</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="caseNum" name="caseNum" th:value="${activityCaseInfo.caseNum}" placeholder="저장시 생성" readonly>
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
<div class="col-sm-2">
<th:block th:if="${activityCase.wrtUserGrd eq null}">
<input type="text" class="form-control form-control-sm" th:value="${activityCase.wrtUserNm}" readonly>
</th:block>
<th:block th:unless="${activityCase.wrtUserGrd eq null}">
<th:block th:each="code:${session.commonCode.get('JT')}">
<th:block th:if="${code.itemCd eq activityCase.wrtUserGrd}">
<input type="text" class="form-control form-control-sm" th:value="|${code.itemValue} ${activityCase.wrtUserNm}|" readonly>
</th:block>
</th:block>
</th:block>
</div>
<label for="wrtDt" class="col-sm-1 col-form-label 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(activityCaseInfo.wrtDt, 'yyyy-MM-dd HH:mm')}" placeholder="저장시 생성" readonly>
</div>
</div>
<div class="row mb-1">
<label for="title" class="col-sm-1 col-form-label col-form-label-sm text-center">제목</label>
<div th:class="${activityCaseInfo.caseType eq 'ACT003'?'col-sm-5':'col-sm-8'}">
<input type="text" class="form-control form-control-sm" id="title" name="title" th:value="${activityCaseInfo.title}">
</div>
<th:block th:if="${activityCaseInfo.caseType eq 'ACT003'}">
<label for="activityResult" class="col-sm-1 col-form-label col-form-label-sm text-center">결과</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" id="activityResult" name="activityResult">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('ACAT')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
</th:block>
<label for="reportDate" class="col-sm-1 col-form-label col-form-label-sm text-center">보고일자</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm dateSelector" id="reportDate" name="reportDate" autocomplete="off" th:value="${#temporals.format(activityCaseInfo.reportDate, 'yyyy-MM-dd')}">
</div>
</div>
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">
혐의자
<button type="button" class="border-0" id="suspectAddBtn">
<i class="bi bi-plus-square text-primary"></i>
</button>
</label>
<div class="col-sm-11">
<div class="border h-100">
<div class="row" id="suspectHome">
<th:block th:each="suspect:${activityCase.suspectList}">
<div class="col-sm-12 suspectDiv">
<div class="row mx-2 my-1">
<div class="col-12 mb-1">
<div class="row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">분류</label>
<div class="col-sm-2">
<select class="form-select form-select-sm suspectType">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('ACS')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq suspect.type}"></option>
</th:block>
</select>
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">성명</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm suspectName" th:value="${suspect.name}">
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">성별</label>
<div class="col-sm-2">
<select class="form-select form-select-sm suspectSex">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('SEX')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq suspect.sex}"></option>
</th:block>
</select>
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">생년월일</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm suspectBirthDate" placeholder="0000-00-00" th:value="${#temporals.format(suspect.birthDate, 'yyyy-MM-dd')}">
</div>
</div>
</div>
<div class="col-12 mb-1">
<div class="row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">핸드폰</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm suspectPhone" th:value="${suspect.phone}">
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">직업</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm suspectJob" th:value="${suspect.job}">
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">등록기준지</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm suspectArea" th:value="${suspect.area}">
</div>
</div>
</div>
<div class="col-12 mb-1">
<div class="row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">주소</label>
<div class="col-sm-11">
<input type="text" class="form-control form-control-sm suspectAddr" th:value="${suspect.address}">
</div>
</div>
</div>
<div class="col-12 mb-1">
<div class="row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">비고</label>
<div class="col-sm-10">
<input type="text" class="form-control form-control-sm suspectEtc" th:value="${suspect.etc}">
</div>
<div class="col-1">
<button type="button" class="btn btn-sm btn-outline-danger rowDeleteBtn"><i class="bi bi-x"></i></button>
</div>
</div>
</div>
</div>
<hr class="my-1 mx-2">
</div>
</th:block>
</div>
</div>
</div>
</div>
<div class="row mb-1">
<label for="editor" class="col-sm-1 col-form-label col-form-label-sm text-center">외사활동사항</label>
<div class="col-sm-11">
<div id="editor"></div>
<textarea id="content" class="d-none" th:utext="${activityCaseInfo.content}"></textarea>
</div>
</div>
<div class="row mb-1">
<label for="description" class="col-sm-1 col-form-label col-form-label-sm text-center">
비고
</label>
<div class="col-sm-11">
<textarea class="form-control form-control-sm" id="description" name="description" th:value="${activityCaseInfo.description}"></textarea>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">
결재자
<button type="button" class="border-0" id="apprvAddBtn">
<i class="bi bi-plus-square text-primary"></i>
</button>
</label>
<div class="col-sm-11">
<div class="border h-100">
<div class="row" id="apprvHome">
<th:block th:each="user:${activityCaseInfo.apprvList}">
<div class="col-sm-12 apprvDiv">
<input type="hidden" class="userSeq" th:value="${user.userSeq}">
<input type="hidden" class="ogCd" th:value="${user.ogCd}">
<input type="hidden" class="ofcCd" th:value="${user.ofcCd}">
<input type="hidden" class="titleCd" th:value="${user.titleCd}">
<input type="hidden" class="userNm" th:value="${user.userNm}">
<div class="row mx-2 my-1">
<div class="col-12 mb-1">
<div class="row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">경로</label>
<label class="col-sm-3 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('OG')}">
<th:block th:if="${code.itemCd eq user.ogCd}" th:text="${code.itemValue}"></th:block>
</th:block>
<th:block th:each="code:${session.commonCode.get(user.ogCd)}">
<th:block th:if="${code.itemCd eq user.ofcCd}" th:text="${code.itemValue}"></th:block>
</th:block>
<th:block th:each="code:${session.commonCode.get('JT')}">
<th:block th:if="${code.itemCd eq user.titleCd}" th:text="${code.itemValue}"></th:block>
</th:block>
<th:block th:text="${user.userNm}"></th:block>
</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">구분</label>
<div class="col-2">
<select class="form-select form-select-sm apprvType">
<option value="">선택</option>
<th:block th:each="code:${session.commonCode.get('ACAT')}">
<option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
</th:block>
</select>
</div>
<div class="col-1">
<button type="button" class="btn btn-sm btn-outline-danger rowDeleteBtn"><i class="bi bi-x"></i></button>
</div>
</div>
</div>
</div>
<hr class="my-1 mx-2">
</div>
</th:block>
</div>
</div>
</div>
</div>
<div class="row mb-3">
<label for="fileInputer" class="col-sm-1 col-form-label col-form-label-sm text-center">첨부파일</label>
<div class="col-sm-11" style="min-height: 70px;">
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
<th:block th:if="${#arrays.isEmpty(activityCaseInfo.fileList)}">
<br>클릭 & 드레그로 파일을 업로드 해주세요.
</th:block>
<th:block th:unless="${#arrays.isEmpty(activityCaseInfo.fileList)}">
<div class='row-col-6' th:each="file:${activityCaseInfo.fileList}">
<span th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn} ${file.fileSize}|"></span>
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
</div>
</th:block>
</div>
</div>
<input type="file" class="d-none" id="fileInputer" multiple>
</div>
</form>
</div>
<div class="modal-footer bg-light">
<th:block th:if="${activityCaseInfo.caseKey ne null and accessAuth eq 'ACC003'}">
<button type="button" class="btn btn-danger" id="deleteActivityCaseBtn" th:data-casekey="${activityCaseInfo.caseKey}">삭제</button>
</th:block>
<button type="button" class="btn btn-warning saveBtn" data-status="DST001">임시저장</button>
<button type="button" class="btn btn-primary saveBtn" data-status="DST007">저장</button>
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
</div>