외사수사 > 사건보고서 작업완료
parent
6f74a1131e
commit
30dbb3cb03
|
|
@ -65,6 +65,7 @@ public class IvsgtController {
|
||||||
@GetMapping("/ivsgtViewModal")
|
@GetMapping("/ivsgtViewModal")
|
||||||
public ModelAndView ivsgtViewModal(@AuthenticationPrincipal UserInfo loginUser, InvestigationBoard investigationBoard){
|
public ModelAndView ivsgtViewModal(@AuthenticationPrincipal UserInfo loginUser, InvestigationBoard investigationBoard){
|
||||||
ModelAndView mav = new ModelAndView("ivsgt/ivsgtViewModal");
|
ModelAndView mav = new ModelAndView("ivsgt/ivsgtViewModal");
|
||||||
|
mav.addObject("modalType", investigationBoard.getModalType());
|
||||||
investigationBoard = ivsgtService.selectBoardInvestigation(investigationBoard.getIvsgtKey());
|
investigationBoard = ivsgtService.selectBoardInvestigation(investigationBoard.getIvsgtKey());
|
||||||
mav.addObject("investigation", investigationBoard);
|
mav.addObject("investigation", investigationBoard);
|
||||||
mav.addObject("userSeq",loginUser.getUserSeq());
|
mav.addObject("userSeq",loginUser.getUserSeq());
|
||||||
|
|
@ -88,6 +89,7 @@ public class IvsgtController {
|
||||||
public ModelAndView searchViewModal(@AuthenticationPrincipal UserInfo loginUser, InvestigationBoard investigationBoard){
|
public ModelAndView searchViewModal(@AuthenticationPrincipal UserInfo loginUser, InvestigationBoard investigationBoard){
|
||||||
ModelAndView mav = new ModelAndView("ivsgt/searchViewModal");
|
ModelAndView mav = new ModelAndView("ivsgt/searchViewModal");
|
||||||
mav.addObject("userSeq",loginUser.getUserSeq());
|
mav.addObject("userSeq",loginUser.getUserSeq());
|
||||||
|
investigationBoard.setRowCnt(10);
|
||||||
investigationBoard.setFirstIndex(0);
|
investigationBoard.setFirstIndex(0);
|
||||||
investigationBoard.setQueryInfo();
|
investigationBoard.setQueryInfo();
|
||||||
investigationBoard.setWrtUserSeq(loginUser.getUserSeq());
|
investigationBoard.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,11 @@ $(document).on('click', '.saveBtn', function (){
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.tr', 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 (){
|
$(document).on('click', '.ivsgtTab', function (){
|
||||||
location.href = "/ivsgt/arrestReport?ivsgtType="+ $(this).data("ivsgttype");
|
location.href = "/ivsgt/arrestReport?ivsgtType="+ $(this).data("ivsgttype");
|
||||||
});
|
});
|
||||||
|
|
@ -67,15 +69,20 @@ $(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function getIvsgtViewModal(ivsgtKey){
|
function getIvsgtViewModal(ivsgtKey, modalType){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/ivsgt/ivsgtViewModal',
|
url: '/ivsgt/ivsgtViewModal',
|
||||||
data: {ivsgtKey: ivsgtKey},
|
data: {ivsgtKey: ivsgtKey, modalType: modalType},
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType:"html",
|
dataType:"html",
|
||||||
success: function(html){
|
success: function(html){
|
||||||
$("#ivsgtViewBody").empty().append(html)
|
if(modalType !== 'viewOnly'){
|
||||||
$("#ivsgtViewModal").modal('show');
|
$("#ivsgtViewBody").empty().append(html)
|
||||||
|
$("#ivsgtViewModal").modal('show');
|
||||||
|
}else{
|
||||||
|
$("#relatedReportBody").empty().append(html)
|
||||||
|
$("#relatedReportModal").modal('show');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error:function(e){
|
error:function(e){
|
||||||
ajaxErrorAction(e);
|
ajaxErrorAction(e);
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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 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-dialog modal-lg modal-dialog-scrollable">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,27 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="relatedReportTbody">
|
<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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<!--<div class="row justify-content-start">
|
<!--<div class="row justify-content-start">
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,9 @@
|
||||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title text-white" id="ivsgtViewModalLabel">
|
<h5 class="modal-title text-white" id="ivsgtViewModalLabel">
|
||||||
<th:block th:if="${investigation.ivsgtType eq 'arrest'}">
|
<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>
|
</th:block>
|
||||||
<th:block th:if="${investigation.ivsgtType eq 'proceeding'}">
|
|
||||||
진행보고서
|
|
||||||
</th:block>
|
|
||||||
<th:block th:if="${investigation.ivsgtType eq 'result'}">
|
|
||||||
결과보고서
|
|
||||||
</th:block>
|
|
||||||
</h5>
|
</h5>
|
||||||
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -109,7 +103,7 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="relatedReportTbody">
|
<tbody id="relatedReportTbody">
|
||||||
<tr class="relatedReportTr" th:each="relatedReport:${investigation.relatedReportsList}">
|
<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>
|
<td>
|
||||||
<th:block th:each="code:${session.commonCode.get('IVT')}">
|
<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 th:if="${code.itemCd eq relatedReport.ivsgtType}" th:text="${code.itemValue}"></th:block>
|
||||||
|
|
@ -136,10 +130,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<th:block th:if="${modalType ne 'viewOnly'}">
|
||||||
<div class="modal-footer bg-light">
|
<div class="modal-footer bg-light">
|
||||||
<th:block th:if="${userSeq eq investigation.wrtUserSeq or accessAuth eq 'ACC003'}"><!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
|
<th:block th:if="${userSeq eq investigation.wrtUserSeq or accessAuth eq 'ACC003'}"><!--작성자일 경우 수정 허용--><!--관리자일 경우 수정 허용-->
|
||||||
<button type="button" class="btn btn-warning" id="ivsgtEditBtn">수정</button>
|
<button type="button" class="btn btn-warning" id="ivsgtEditBtn">수정</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
|
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
|
||||||
</div>
|
</div>
|
||||||
|
</th:block>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue