외사수사 > 사건보고서 작업완료

master
강석 최 2023-03-28 10:53:03 +09:00
parent 6f74a1131e
commit 30dbb3cb03
5 changed files with 49 additions and 16 deletions

View File

@ -65,6 +65,7 @@ public class IvsgtController {
@GetMapping("/ivsgtViewModal")
public ModelAndView ivsgtViewModal(@AuthenticationPrincipal UserInfo loginUser, InvestigationBoard investigationBoard){
ModelAndView mav = new ModelAndView("ivsgt/ivsgtViewModal");
mav.addObject("modalType", investigationBoard.getModalType());
investigationBoard = ivsgtService.selectBoardInvestigation(investigationBoard.getIvsgtKey());
mav.addObject("investigation", investigationBoard);
mav.addObject("userSeq",loginUser.getUserSeq());
@ -88,6 +89,7 @@ public class IvsgtController {
public ModelAndView searchViewModal(@AuthenticationPrincipal UserInfo loginUser, InvestigationBoard investigationBoard){
ModelAndView mav = new ModelAndView("ivsgt/searchViewModal");
mav.addObject("userSeq",loginUser.getUserSeq());
investigationBoard.setRowCnt(10);
investigationBoard.setFirstIndex(0);
investigationBoard.setQueryInfo();
investigationBoard.setWrtUserSeq(loginUser.getUserSeq());

View File

@ -16,9 +16,11 @@ $(document).on('click', '.saveBtn', function (){
});
$(document).on('click', '.tr', function (){
getIvsgtViewModal($(this).data('key'));
getIvsgtViewModal($(this).data('key'), null);
});
$(document).on('click', '.relatedReportTr', function (){
getIvsgtViewModal($(this).find('.ivsgtKey').val(), 'viewOnly')
})
$(document).on('click', '.ivsgtTab', function (){
location.href = "/ivsgt/arrestReport?ivsgtType="+ $(this).data("ivsgttype");
});
@ -67,15 +69,20 @@ $(function(){
});
function getIvsgtViewModal(ivsgtKey){
function getIvsgtViewModal(ivsgtKey, modalType){
$.ajax({
url: '/ivsgt/ivsgtViewModal',
data: {ivsgtKey: ivsgtKey},
data: {ivsgtKey: ivsgtKey, modalType: modalType},
type: 'GET',
dataType:"html",
success: function(html){
$("#ivsgtViewBody").empty().append(html)
$("#ivsgtViewModal").modal('show');
if(modalType !== 'viewOnly'){
$("#ivsgtViewBody").empty().append(html)
$("#ivsgtViewModal").modal('show');
}else{
$("#relatedReportBody").empty().append(html)
$("#relatedReportModal").modal('show');
}
},
error:function(e){
ajaxErrorAction(e);

View File

@ -208,6 +208,13 @@
</div>
</div>
</div>
<div class="modal fade" id="relatedReportModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="ivsgtViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="relatedReportBody">
</div>
</div>
</div>
<div class="modal fade" id="searchViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="searchViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content">

View File

@ -137,6 +137,27 @@
</tr>
</thead>
<tbody id="relatedReportTbody">
<tr class="relatedReportTr" th:each="relatedReport:${investigation.relatedReportsList}">
<input type="hidden" class="ivsgtKey" th:value="${relatedReport.relatedReportKey}">
<td>
<th:block th:each="code:${session.commonCode.get('IVT')}">
<th:block th:if="${code.itemCd eq relatedReport.ivsgtType}" th:text="${code.itemValue}"></th:block>
</th:block>
</td>
<td class="title" th:text="${relatedReport.title}"></td>
<td class="arrestCd">
<th:block th:each="code:${session.commonCode.get('CTH')}">
<th:block th:if="${code.itemCd eq relatedReport.arrestCd}" th:text="${code.itemValue}"></th:block>
</th:block>
</td>
<td class="arrestCd2">
<th:block th:each="code:${session.commonCode.get(relatedReport.arrestCd)}">
<th:block th:if="${code.itemCd eq relatedReport.arrestCd2}" th:text="${code.itemValue}"></th:block>
</th:block>
</td>
<td class="wrtDt" th:text="${#temporals.format(relatedReport.wrtDt, 'yyyy-MM-dd')}"></td>
<td><button type="button" class="btn btn-sm btn-primary deleteRelationBtn" ><i class="bi-x"></i></button></td>
</tr>
</tbody>
</table>
<!--<div class="row justify-content-start">

View File

@ -2,15 +2,9 @@
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" id="ivsgtViewModalLabel">
<th:block th:if="${investigation.ivsgtType eq 'arrest'}">
검거보고서
</th:block>
<th:block th:if="${investigation.ivsgtType eq 'proceeding'}">
진행보고서
</th:block>
<th:block th:if="${investigation.ivsgtType eq 'result'}">
결과보고서
</th:block>
<th:block th:each="code:${session.commonCode.get('IVT')}">
<th:block th:if="${code.itemCd eq investigation.ivsgtType}" th:text="${code.itemValue}"></th:block>
</th:block>
</h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
@ -109,7 +103,7 @@
</thead>
<tbody id="relatedReportTbody">
<tr class="relatedReportTr" th:each="relatedReport:${investigation.relatedReportsList}">
<input type="hidden" class="reportChk" th:value="${relatedReport.relatedReportKey}">
<input type="hidden" class="ivsgtKey" th:value="${relatedReport.relatedReportKey}">
<td>
<th:block th:each="code:${session.commonCode.get('IVT')}">
<th:block th:if="${code.itemCd eq relatedReport.ivsgtType}" th:text="${code.itemValue}"></th:block>
@ -136,10 +130,12 @@
</div>
</div>
<th:block th:if="${modalType ne 'viewOnly'}">
<div class="modal-footer bg-light">
<th:block th:if="${userSeq eq investigation.wrtUserSeq or accessAuth eq 'ACC003'}"><!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
<button type="button" class="btn btn-warning" id="ivsgtEditBtn">수정</button>
</th:block>
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
</div>
</th:block>
</html>