처리현황, 단속현황, 선원세부현황 수정

jiHyung 2022-11-11 13:32:56 +09:00
parent f47caa199b
commit fc0621ede0
9 changed files with 61 additions and 90 deletions

View File

@ -85,12 +85,13 @@ $(document).on('change', 'select[name="crackdownPolice"]', function (){
dynamicOption('select[name="crackdownBoat"]', $(this).val());
});
$(document).on('click', '#sailorAddBtn', function (){
$(document).on('click', '#sailorAddBtn', function (e){
e.preventDefault();
$('#sailorDiv').append(
'<div class="row">'
+ '<label class="col-sm-1 col-form-label text-center">선원이름</label>'
+ '<label class="col-sm-1 col-form-label col-form-label-sm text-center">선원이름</label>'
+ '<div class="col-sm-2">'
+ '<input class="form-control" name="sailorNameKr">'
+ '<input class="form-control form-control-sm" name="sailorNameKr">'
+ '</div>'
+ '<div class="col-sm-2">'
+ '<select class="form-select form-select-sm" name="sailor">'
@ -99,13 +100,16 @@ $(document).on('click', '#sailorAddBtn', function (){
+ '<option value="N">불구속</option>'
+ '</select>'
+ '</div>'
+ '<button type="button" class="btn btn-primary col-auto" id="sailorRemoveBtn">-</button>'
+ '<button type="button" class="btn btn-sm btn-outline-secondary w-auto opacity-75" id="sailorRemoveBtn">'
+ '<i class="bi bi-dash-square text-danger"></i>'
+ '</button>'
+ '</div>'
)
});
$(document).on('click', '#violationAddBtn', function (){
$(document).on('click', '#violationAddBtn', function (e){
e.preventDefault()
let violation = '';
commonCode.VT.forEach(function (item){
violation += '<option value="'+ item.itemCd +'">' + item.itemValue +'</option>';
@ -118,19 +122,23 @@ $(document).on('click', '#violationAddBtn', function (){
+ violation
+ '<option value="etc">직접입력</option>'
+ '</select>'
+ '<button type="button" class="btn btn-primary col-auto" id="violationRemoveBtn">-</button>'
+ '<button type="button" class="btn btn-sm btn-outline-secondary w-auto opacity-75" id="violationRemoveBtn">'
+ '<i class="bi bi-dash-square text-danger"></i>'
+ '</button>'
+ '</div>'
)
});
$(document).on('click', '#sailorRemoveBtn', function (){
$(document).on('click', '#sailorRemoveBtn', function (e){
e.preventDefault();
$(this).parent().remove();
let deleteKey = $(this).parent().children("input[name='sailorKey']").val();
$("#cdsEditForm").append('<input type="hidden" name="sailorDeleteKeyList" value="' + deleteKey + '">');
});
$(document).on('click', '#violationRemoveBtn', function (){
$(document).on('click', '#violationRemoveBtn', function (e){
e.preventDefault()
$(this).parent().remove();
let deleteKey = $(this).parent().children("input[name='violationKey']").val();
$("#cdsEditForm").append('<input type="hidden" name="violationDeleteKeyList" value="' + deleteKey + '">');
@ -500,7 +508,11 @@ function s2ab(s) {
return buf;
}
function getToday() {
function getToday(){
var date = new Date();
var year = date.getFullYear();
var month = ("0" + (1 + date.getMonth())).slice(-2);
var day = ("0" + date.getDate()).slice(-2);
return year + "-" + month + "-" + day;
}

View File

@ -93,31 +93,6 @@ $(document).on('change', 'select[name="caseNum"]', function (){
});
});
$(document).on('click', '#violationAddBtn', function (){
let violation = '';
commonCode.VT.forEach(function (item){
violation += '<option value="'+ item.itemCd +'">' + item.itemValue +'</option>';
})
$('#violationDiv').append(
'<div class="row">'
+ '<select class="form-select form-select-sm violation" name="violation" style="max-width: 90% !important;">'
+ '<option value="">선택</option>'
+ violation
+ '<option value="etc">직접입력</option>'
+ '</select>'
+ '<button type="button" class="btn btn-primary col-auto" id="violationRemoveBtn">-</button>'
+ '</div>'
)
});
$(document).on('click', '#violationRemoveBtn', function (){
$(this).parent().remove();
let deleteKey = $(this).parent().children("input[name='violationKey']").val();
$("#processResultEditForm").append('<input type="hidden" name="violationDeleteKeyList" value="' + deleteKey + '">');
});
$(document).on('change', '.violation', function (){
if ($(this).val() == 'etc') {
$(this).after(
@ -391,9 +366,13 @@ function s2ab(s) {
return buf;
}
function getToday() {
function getToday(){
var date = new Date();
var year = date.getFullYear();
var month = ("0" + (1 + date.getMonth())).slice(-2);
var day = ("0" + date.getDate()).slice(-2);
return year + "-" + month + "-" + day;
}
function dateTimeCalc(startDateTime, endDateTime) {

View File

@ -39,32 +39,6 @@ $(document).on('click', '.version-tr', function (){
getSailorHistoryDetail(versionNo, sailorKey, cdsKey, fbKey);
});
$(document).on('click', '#violationAddBtn', function (){
let violation = '';
commonCode.VT.forEach(function (item){
violation += '<option value="'+ item.itemCd +'">' + item.itemValue +'</option>';
})
$('#violationDiv').append(
'<div class="row">'
+ '<select class="form-select form-select-sm violation" name="violation" style="max-width: 90% !important;">'
+ '<option value="">선택</option>'
+ violation
+ '<option value="etc">직접입력</option>'
+ '</select>'
+ '<button type="button" class="btn btn-primary col-auto" id="violationRemoveBtn">-</button>'
+ '</div>'
)
});
$(document).on('click', '#violationRemoveBtn', function (){
$(this).parent().remove();
let deleteKey = $(this).parent().children("input[name='violationKey']").val();
$("#sailorEditForm").append('<input type="hidden" name="violationDeleteKeyList" value="' + deleteKey + '">');
});
$(document).on('change', '.violation', function (){
if ($(this).val() == 'etc') {
$(this).after(
@ -112,7 +86,7 @@ $(document).on('change', 'select[name="boatNameKr"]', function (){
$(document).on('click', '#sailorDownExcel', function (){
exportExcel('불법조업 불법어선 처리현황');
exportExcel('불법조업 불법어선 선원세부현황');
});
function getSailorHistoryDetail(versionNo, sailorKey, cdsKey, fbKey){
@ -317,9 +291,13 @@ function s2ab(s) {
return buf;
}
function getToday() {
function getToday(){
var date = new Date();
var year = date.getFullYear();
var month = ("0" + (1 + date.getMonth())).slice(-2);
var day = ("0" + date.getDate()).slice(-2);
return year + "-" + month + "-" + day;
}
function dateTimeCalc(startDateTime, endDateTime) {

View File

@ -47,7 +47,9 @@
<div class="mb-3 row">
<div class="col-sm-1">
<label class="col-form-label col-form-label-sm text-center">위반내용</label>
<button type="button" class="btn btn-primary col-auto" id="violationAddBtn">+</button>
<button class="border-0" id="violationAddBtn">
<i class="bi bi-plus-square text-primary"></i>
</button>
</div>
<div class="col-auto">
<div class="col-auto" id="violationDiv">
@ -80,7 +82,9 @@
</div>
</th:block>
<th:block th:if="${i.index > 0}">
<button type="button" class="btn btn-primary col-auto" id="violationRemoveBtn">-</button>
<button type="button" class="btn btn-sm btn-outline-secondary w-auto opacity-75" id="violationRemoveBtn">
<i class="bi bi-dash-square text-danger"></i>
</button>
<input type="hidden" name="violationKey" th:value="${violation.violationKey}">
</th:block>
</div>
@ -412,7 +416,7 @@
<option value="N" th:selected="${crackdownStatus.sailorList ne null && #aggregates.sum(crackdownStatus.sailorList.?[position == 'POS003' && isRestriction == 'N'].![1]) != null}">불구속</option>
</select>
</div>
<button type="button" class="btn btn-primary col-auto" id="sailorAddBtn">선원 추가</button>
<button type="button" class="btn btn-sm btn-primary col-auto" id="sailorAddBtn">선원 추가</button>
</div>
<div class="mb-3 row" id="sailorDiv">
<th:block th:each="sailor:${crackdownStatus.sailorList}" th:if="${#strings.contains(sailor.position, 'POS005') || #strings.contains(sailor.position, 'POS006')}">
@ -429,7 +433,9 @@
<option value="N" th:selected="${sailor.isRestriction == 'N'}">불구속</option>
</select>
</div>
<button type="button" class="btn btn-primary col-auto" id="sailorRemoveBtn">-</button>
<button type="button" class="btn btn-sm btn-outline-secondary w-auto opacity-75" id="sailorRemoveBtn">
<i class="bi bi-dash-square text-danger"></i>
</button>
<input type="hidden" name="sailorKey" th:value="${sailor.sailorKey}">
</div>
</th:block>

View File

@ -45,7 +45,7 @@
<input type="radio" name="versionNo" th:value="${crackdownStatusVersion.versionNo}">
</td>
<td th:text="${crackdownStatusVersion.wrtUserNm}"></td>
<td th:text="${crackdownStatusVersion.wrtDt}"></td>
<td th:text="${#temporals.format(crackdownStatusVersion.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</th:block>
</tbody>

View File

@ -21,11 +21,11 @@
<div class="mb-3 row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">사건번호</label>
<div class="col-sm-2">
<input class="form-control form-control-sm" name="caseNum" id="caseNum" th:value="${processResult.crackdownStatus.caseNum}">
<input class="form-control form-control-sm" name="caseNum" id="caseNum" th:value="${processResult.crackdownStatus.caseNum}" readonly>
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">사건담당<br>경찰서</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" name="crackdownPolice" id="crackdownPolice">
<select class="form-select form-select-sm" name="crackdownPolice" id="crackdownPolice" disabled>
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('CPO')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
@ -38,24 +38,23 @@
<div class="mb-3 row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">피의자<br>(선박명)</label>
<div class="col-sm-2">
<input class="form-control form-control-sm" name="boatNameKr" id="boatNameKr" th:value="${processResult.boatNameKr}">
<input class="form-control form-control-sm" name="boatNameKr" id="boatNameKr" th:value="${processResult.boatNameKr}" readonly>
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">위반장소</label>
<div class="col-sm-6">
<input class="form-control form-control-sm" name="napoSeaPointLon" id="napoSeaPointLon" th:value="${processResult.crackdownStatus.napoSeaPointLon}">
<input class="form-control form-control-sm" name="napoSeaPointLat" id="napoSeaPointLat" th:value="${processResult.crackdownStatus.napoSeaPointLat}">
<input class="form-control form-control-sm" name="napoSeaPointDetail" id="napoSeaPointDetail" th:value="${processResult.crackdownStatus.napoSeaPointDetail}">
<input class="form-control form-control-sm" name="napoSeaPointLon" id="napoSeaPointLon" th:value="${processResult.crackdownStatus.napoSeaPointLon}" readonly>
<input class="form-control form-control-sm" name="napoSeaPointLat" id="napoSeaPointLat" th:value="${processResult.crackdownStatus.napoSeaPointLat}" readonly>
<input class="form-control form-control-sm" name="napoSeaPointDetail" id="napoSeaPointDetail" th:value="${processResult.crackdownStatus.napoSeaPointDetail}" readonly>
</div>
</div>
<div class="mb-3 row">
<div class="col-sm-1">
<label class="col-form-label col-form-label-sm text-center">위반내용</label>
<button type="button" class="btn btn-primary col-auto" id="violationAddBtn">+</button>
</div>
<div class="col-auto" id="violationDiv">
<th:block th:if="${#lists.isEmpty(processResult.violationList)}">
<div class="row">
<select class="form-select form-select-sm violation" name="violation" style="max-width: 90% !important;">
<select class="form-select form-select-sm violation" name="violation" style="max-width: 90% !important;" disabled>
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('VT')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
@ -68,7 +67,7 @@
<th:block th:each="violation, i : ${processResult.violationList}">
<div class="row">
<input type="hidden" name="violationKey" th:value="${violation.violationKey}">
<select class="form-select form-select-sm violation" name="violation" style="max-width: 90% !important;">
<select class="form-select form-select-sm violation" name="violation" style="max-width: 90% !important;" disabled>
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('VT')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
@ -82,7 +81,6 @@
</div>
</th:block>
<th:block th:if="${i.index > 0}">
<button type="button" class="btn btn-primary col-auto" id="violationRemoveBtn">-</button>
<input type="hidden" name="violationKey" th:value="${violation.violationKey}">
</th:block>
</div>

View File

@ -46,7 +46,7 @@
<input type="radio" name="versionNo" th:value="${processReulstVersion.versionNo}">
</td>
<td th:text="${processReulstVersion.wrtUserNm}"></td>
<td th:text="${processReulstVersion.wrtDt}"></td>
<td th:text="${#temporals.format(processReulstVersion.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</th:block>
</tbody>

View File

@ -21,11 +21,11 @@
<div class="mb-3 row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">선박명</label>
<div class="col-sm-2">
<input class="form-control form-control-sm" name="boatNameKr" id="boatNameKr" th:value="${sailor.fishingBoat.boatNameKr}">
<input class="form-control form-control-sm" name="boatNameKr" id="boatNameKr" th:value="${sailor.fishingBoat.boatNameKr}" readonly>
</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" name="crackdownPolice" id="crackdownPolice">
<select class="form-select form-select-sm" name="crackdownPolice" id="crackdownPolice" disabled>
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('CPO')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
@ -36,7 +36,7 @@
</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" name="crackdownBoat" id="crackdownBoat">
<select class="form-select form-select-sm" name="crackdownBoat" id="crackdownBoat" disabled>
<option value="">선택</option>
<th:block th:each="num : ${#numbers.sequence(1,#lists.size(session.commonCode.get('CPO')))}">
<th:block th:if="${'CPO'+num == sailor.crackdownStatus.crackdownPolice}" th:each="commonCode:${session.commonCode.get('CPO'+num)}">
@ -51,20 +51,19 @@
<div class="mb-3 row">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">위반장소</label>
<div class="col-sm-6">
<input class="form-control form-control-sm" placeholder="위도" name="napoSeaPointLat" th:value="${sailor.crackdownStatus.napoSeaPointLat}">
<input class="form-control form-control-sm" placeholder="경도" name="napoSeaPointLon" th:value="${sailor.crackdownStatus.napoSeaPointLon}">
<input class="form-control form-control-sm" placeholder="상세내용" name="napoSeaPointDetail" th:value="${sailor.crackdownStatus.napoSeaPointDetail}">
<input class="form-control form-control-sm" placeholder="위도" name="napoSeaPointLat" th:value="${sailor.crackdownStatus.napoSeaPointLat}" readonly>
<input class="form-control form-control-sm" placeholder="경도" name="napoSeaPointLon" th:value="${sailor.crackdownStatus.napoSeaPointLon}" readonly>
<input class="form-control form-control-sm" placeholder="상세내용" name="napoSeaPointDetail" th:value="${sailor.crackdownStatus.napoSeaPointDetail}" readonly>
</div>
</div>
<div class="mb-3 row">
<div class="col-sm-1">
<label class="col-form-label col-form-label-sm text-center">위반내용</label>
<button type="button" class="btn btn-primary col-auto" id="violationAddBtn">+</button>
</div>
<div class="col-auto" id="violationDiv">
<th:block th:if="${#lists.isEmpty(sailor.violationList)}">
<div class="row">
<select class="form-select form-select-sm violation" name="violation" style="max-width: 90% !important;">
<select class="form-select form-select-sm violation" name="violation" style="max-width: 90% !important;" disabled>
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('VT')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
@ -77,7 +76,7 @@
<th:block th:each="violation, i : ${sailor.violationList}">
<div class="row">
<input type="hidden" name="violationKey" th:value="${violation.violationKey}">
<select class="form-select form-select-sm violation" name="violation" style="max-width: 90% !important;">
<select class="form-select form-select-sm violation" name="violation" style="max-width: 90% !important;" disabled>
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('VT')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
@ -91,7 +90,6 @@
</div>
</th:block>
<th:block th:if="${i.index > 0}">
<button type="button" class="btn btn-primary col-auto" id="violationRemoveBtn">-</button>
<input type="hidden" name="violationKey" th:value="${violation.violationKey}">
</th:block>
</div>

View File

@ -52,7 +52,7 @@
<input type="radio" name="versionNo" th:value="${sailorVersion.versionNo}">
</td>
<td th:text="${sailorVersion.wrtUserNm}"></td>
<td th:text="${sailorVersion.wrtDt}"></td>
<td th:text="${#temporals.format(sailorVersion.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</th:block>
</tbody>