From 5068c2e10f42c254642cfd9ea727da2043df65d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Thu, 1 Dec 2022 15:15:55 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B6=88=EB=B2=95=EC=A1=B0=EC=97=85=20?= =?UTF-8?q?=EC=99=B8=EA=B5=AD=EC=96=B4=EC=84=A0=20=ED=95=98=EC=9C=84=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EA=B2=8C=EC=8B=9C=ED=8C=90=20?= =?UTF-8?q?=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=9E=91=EC=97=85=20=EB=B0=8F=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=EC=A1=B0=EA=B1=B4=20=EC=A0=95=EB=A6=AC.=20?= =?UTF-8?q?=EA=B3=B5=ED=86=B5=EC=BD=94=EB=93=9C=20=EC=A0=80=EC=9E=A5?= =?UTF-8?q?=EC=8B=9C=20=EC=98=A4=EB=A5=98=EC=82=AC=ED=95=AD=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.=20datepicker=20autoclose=20=EB=AF=B8=EC=A0=81?= =?UTF-8?q?=EC=9A=A9=20=ED=95=AD=EB=AA=A9=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codeMgt/repository/CodeMgtRepository.java | 1 + .../main/codeMgt/service/CodeMgtService.java | 8 +- src/main/resources/static/css/common.css | 4 +- src/main/resources/static/js/equip/equip.js | 14 +- src/main/resources/static/js/equip/use.js | 13 +- .../static/js/faStatistics/crackdownStatus.js | 741 ++++++------ .../static/js/faStatistics/fishingBoatMgt.js | 22 + .../faStatistics/internationalCrimeArrest.js | 30 +- .../static/js/faStatistics/processResult.js | 75 +- .../static/js/faStatistics/sailor.js | 10 +- .../resources/static/js/fipTarget/partInfo.js | 3 +- .../resources/static/js/fipTarget/partWork.js | 10 +- src/main/resources/static/js/ivsgt/ivsgt.js | 5 +- src/main/resources/static/js/police/edu.js | 10 +- .../static/js/translator/translator.js | 26 +- .../resources/templates/faRpt/faRptBoard.html | 2 +- .../crackdownStatus/crackdownStatus.html | 1003 ++++++++--------- .../fishingBoat/fishingBoatEditModal.html | 4 +- .../fishingBoat/fishingBoatMgt.html | 440 ++++---- .../processResult/processResult.html | 287 ++--- .../templates/faStatistics/sailor/sailor.html | 660 +++++------ .../resources/templates/sri/sriBoard.html | 2 +- src/main/resources/templates/user/myInfo.html | 2 +- 23 files changed, 1731 insertions(+), 1641 deletions(-) diff --git a/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeMgtRepository.java b/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeMgtRepository.java index bfdb0ea1..203edcab 100644 --- a/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeMgtRepository.java +++ b/src/main/java/com/dbnt/faisp/main/codeMgt/repository/CodeMgtRepository.java @@ -14,4 +14,5 @@ public interface CodeMgtRepository extends JpaRepository findByCategoryCdAndItemValue(String categoryCd, String itemValue); List findByUseChkOrderByItemCdAsc(String useChk); List findByOrderByOrderNumAsc(); + Optional findByCategoryCdOrderByItemCdDesc(String categoryCd); } diff --git a/src/main/java/com/dbnt/faisp/main/codeMgt/service/CodeMgtService.java b/src/main/java/com/dbnt/faisp/main/codeMgt/service/CodeMgtService.java index 6cfe37a6..7314725c 100644 --- a/src/main/java/com/dbnt/faisp/main/codeMgt/service/CodeMgtService.java +++ b/src/main/java/com/dbnt/faisp/main/codeMgt/service/CodeMgtService.java @@ -39,7 +39,13 @@ public class CodeMgtService{ HashMap map = new HashMap<>(); for(CodeMgt code: codeList){ if(code.getItemCd().isEmpty()){ - map.put(code.getCategoryCd(), 1); + CodeMgt lastCode = codeMgtRepository.findByCategoryCdOrderByItemCdDesc(code.getCategoryCd()).orElse(null); + if(lastCode==null){ + String lastCodeSeq = lastCode.getItemCd().replace(lastCode.getCategoryCd(), ""); + map.put(code.getCategoryCd(), Integer.parseInt(lastCodeSeq)+1); + }else{ + map.put(code.getCategoryCd(), 1); + } } } for(CodeMgt code: codeList){ diff --git a/src/main/resources/static/css/common.css b/src/main/resources/static/css/common.css index 98c03ba1..d0367261 100644 --- a/src/main/resources/static/css/common.css +++ b/src/main/resources/static/css/common.css @@ -104,8 +104,8 @@ .w-100p{ width: 100px; } -#subModalBody{ - white-space: nowrap; +.min-width-300{ + min-width: 300px!important; } .statusInput::-webkit-outer-spin-button, .statusInput::-webkit-inner-spin-button{ diff --git a/src/main/resources/static/js/equip/equip.js b/src/main/resources/static/js/equip/equip.js index 36c30aff..a16247df 100644 --- a/src/main/resources/static/js/equip/equip.js +++ b/src/main/resources/static/js/equip/equip.js @@ -20,9 +20,10 @@ $(document).on('click', '#addEquip', function (){ $("#equipEditModalContent").empty().append(html); $("#equipEditModal").modal('show'); $(".storedYear").datepicker({ - minViewMode: 'years', - format: "yyyy", - language: "ko" + minViewMode: 'years', + format: "yyyy", + language: "ko", + autoclose: true }) }, error:function(){ @@ -120,9 +121,10 @@ function showUpdateModal(equKey){ $("#equipEditModalContent").empty().append(html) $("#equipModifyModal").modal('show'); $(".mStoredYear").datepicker({ - minViewMode: 'years', - format: "yyyy", - language: "ko" + minViewMode: 'years', + format: "yyyy", + language: "ko", + autoclose: true }) }, error:function(){ diff --git a/src/main/resources/static/js/equip/use.js b/src/main/resources/static/js/equip/use.js index 5d5993fa..416ce622 100644 --- a/src/main/resources/static/js/equip/use.js +++ b/src/main/resources/static/js/equip/use.js @@ -1,7 +1,8 @@ $(function(){ $("#dateSelectorDiv").datepicker({ format: "yyyy-mm-dd", - language: "ko" + language: "ko", + autoclose: true }); }) @@ -25,8 +26,9 @@ function showEditModal(useType){ $("#useEditModalContent").empty().append(html); $("#useEditModal").modal('show'); $("#useDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $('#detailSelf').hide(); }, @@ -96,8 +98,9 @@ function showMdifyModal(useNo,useType,mgtOrgan){ $("#useEditModalContent").empty().append(html); $("#useEditModal").modal('show'); $("#mUseDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); if($('#mDetailType').val() != 'PVREUSE007' && $('#mDetailType').val() != 'QIRUSE006'){ $('#mDetailSelf').hide(); diff --git a/src/main/resources/static/js/faStatistics/crackdownStatus.js b/src/main/resources/static/js/faStatistics/crackdownStatus.js index df61168c..04b6dfe4 100644 --- a/src/main/resources/static/js/faStatistics/crackdownStatus.js +++ b/src/main/resources/static/js/faStatistics/crackdownStatus.js @@ -1,471 +1,468 @@ $(function(){ - $("#napoDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#paymentPaymentDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#consignmentStartDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#consignmentEndDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#confiscationDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#boatDisposalDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#directHandoverDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#fieldIvsgtNapoDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#fieldIvsgtReleaseDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#pressurizedStartDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#pressurizedEndDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); + const searchFormBoat = $("#searchFormBoat") + if(searchFormBoat.val()!==""){ + searchFormBoat.find("."+$("#searchFormPolice").val()).show(); + searchFormBoat.removeAttr("disabled"); + } + $("#dateSelectorDiv").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); }); +$(document).on('change', '#searchFormPolice', function (){ + const searchFormBoat = $("#searchFormBoat") + searchFormBoat.find("option").hide() + if(this.value !== ""){ + searchFormBoat.removeAttr("disabled") + searchFormBoat.find("."+this.value).show(); + }else{ + searchFormBoat.attr("disabled", "disabled") + } +}) +$(document).on('click', '#searchFormBtn', function (){ + const btn = $(this) + if(btn.attr("data-state")==="hide"){ + $(".subSearchParam").show(); + btn.attr("data-state", "show"); + btn.empty().append("조건
숨기기"); + }else{ + $(".subSearchParam").hide(); + btn.attr("data-state", "hide"); + btn.empty().append("조건
펼치기"); + } +}) $(document).on('click', '#crackdownStatusAddBtn', function () { - getCrackdownStatusEditModal(null); + getCrackdownStatusEditModal(null); }); $(document).on('click', '#cdsEditBtn', function () { - $("#crackdownStatusViewModal").modal('hide'); - getCrackdownStatusEditModal(Number($("#crackdownStatusViewBody").find("[name='cdsKey']").val())); + $("#crackdownStatusViewModal").modal('hide'); + getCrackdownStatusEditModal(Number($("#crackdownStatusViewBody").find("[name='cdsKey']").val())); }); $(document).on('click', '#saveCrackdownStatusBtn', function (){ - saveCrackdownStatus('N') + saveCrackdownStatus('N') }); $(document).on('click', '#saveTempBtn', function (){ - saveCrackdownStatus('Y') + saveCrackdownStatus('Y') }); $(document).on('click', '.tr', function (){ - getCrackdownStatusViewModal($(this).data('key')); + getCrackdownStatusViewModal($(this).data('key')); }); $(document).on('click', '#history-tab', function (){ - getCrackdownStatusHistoryViewModal($('#cdsEditForm').find('input[name="cdsKey"]').val()); + getCrackdownStatusHistoryViewModal($('#cdsEditForm').find('input[name="cdsKey"]').val()); }); $(document).on('click', '#crackdownStatus-tab', function (){ - getCrackdownStatusViewModal($('#cdsEditForm').find('input[name="cdsKey"]').val()); + getCrackdownStatusViewModal($('#cdsEditForm').find('input[name="cdsKey"]').val()); }); $(document).on('click', '.version-tr', function (){ - $(this).find('input[name="versionNo"]').prop('checked', true); - const versionNo = $(this).find('input[name="versionNo"]').val(); - const cdsKey = $('#cdsEditForm').find('input[name="cdsKey"]').val(); - getCrackdownStatusHistoryDetail(versionNo, cdsKey); + $(this).find('input[name="versionNo"]').prop('checked', true); + const versionNo = $(this).find('input[name="versionNo"]').val(); + const cdsKey = $('#cdsEditForm').find('input[name="cdsKey"]').val(); + getCrackdownStatusHistoryDetail(versionNo, cdsKey); }); $(document).on('change', 'select[name="crackdownPolice"]', function (){ - dynamicOption('select[name="crackdownBoat"]', $(this).val()); + dynamicOption('select[name="crackdownBoat"]', $(this).val()); }); $(document).on('click', '#sailorAddBtn', function (e){ - e.preventDefault(); - $('#sailorDiv').append( - '
' - + '' - + '
' - + '' - + '
' - + '
' - + '' - + '
' - + '' - + '
' - ) + e.preventDefault(); + $('#sailorDiv').append( + '
' + + '' + + '
' + + '' + + '
' + + '
' + + '' + + '
' + + '' + + '
' + ) }); $(document).on('click', '#violationAddBtn', function (e){ - e.preventDefault() - let violation = ''; - commonCode.VT.forEach(function (item){ - violation += ''; - }) + e.preventDefault() + let violation = ''; + commonCode.VT.forEach(function (item){ + violation += ''; + }) - $('#violationDiv').append( - '
' - + '' - + '' - + '
' - ) + $('#violationDiv').append( + '
' + + '' + + '' + + '
' + ) }); $(document).on('click', '#sailorRemoveBtn', function (e){ - e.preventDefault(); - $(this).parent().remove(); - let deleteKey = $(this).parent().children("input[name='sailorKey']").val(); - $("#cdsEditForm").append(''); + e.preventDefault(); + $(this).parent().remove(); + let deleteKey = $(this).parent().children("input[name='sailorKey']").val(); + $("#cdsEditForm").append(''); }); $(document).on('click', '#violationRemoveBtn', function (e){ - e.preventDefault() - $(this).parent().remove(); - let deleteKey = $(this).parent().children("input[name='violationKey']").val(); - $("#cdsEditForm").append(''); + e.preventDefault() + $(this).parent().remove(); + let deleteKey = $(this).parent().children("input[name='violationKey']").val(); + $("#cdsEditForm").append(''); }); $(document).on('change', '.violation', function (){ - if ($(this).val() == 'etc') { - $(this).after( - '
' - + '' - + '
' - ); - } else { - $(this).next('.etcDiv').remove(); - } + if ($(this).val() == 'etc') { + $(this).after( + '
' + + '' + + '
' + ); + } else { + $(this).next('.etcDiv').remove(); + } }); $(document).on('change', '#fisheryType', function (){ - if ($(this).val() == 'etc') { - $(this).after( - '
' - + '' - + '
' - ); - } else { - $(this).next().remove(); - } + if ($(this).val() == 'etc') { + $(this).after( + '
' + + '' + + '
' + ); + } else { + $(this).next().remove(); + } }); $(document).on('change', '#crackdownPolice', function (){ - if ($(this).val() == 'etc') { - $(this).after( - '
' - + '' - + '
' - ); - } else { - $(this).next().remove(); - } + if ($(this).val() == 'etc') { + $(this).after( + '
' + + '' + + '
' + ); + } else { + $(this).next().remove(); + } }); $(document).on('change', '#crackdownBoat', function (){ - if ($(this).val() == 'etc') { - $(this).after( - '
' - + '' - + '
' - ); - } else { - $(this).next().remove(); - } + if ($(this).val() == 'etc') { + $(this).after( + '
' + + '' + + '
' + ); + } else { + $(this).next().remove(); + } }); $(document).on('change', '#boatMaterial', function (){ - if ($(this).val() == 'etc') { - $(this).after( - '
' - + '' - + '
' - ); - } else { - $(this).next().remove(); - } + if ($(this).val() == 'etc') { + $(this).after( + '
' + + '' + + '
' + ); + } else { + $(this).next().remove(); + } }); $(document).on('change', '#processStatus', function (){ - if ($(this).val() == 'etc') { - $(this).after( - '
' - + '' - + '
' - ); - } else { - $(this).next().remove(); - } + if ($(this).val() == 'etc') { + $(this).after( + '
' + + '' + + '
' + ); + } else { + $(this).next().remove(); + } }); $(document).on('click', '#cdsDownExcel', function (){ - exportExcel('불법조업 불법어선 단속현황', 'cdsTable'); + exportExcel('불법조업 불법어선 단속현황', 'cdsTable'); }); function getCrackdownStatusHistoryDetail(versionNo, cdsKey){ - $.ajax({ - url: '/faStatistics/crackdownStatus/crackdownStatusHistoryDetail', - data: { - versionNo : versionNo, - cdsKey : cdsKey - }, - type: 'GET', - dataType:"html", - success: function(html){ - $("#historyDetailDiv").empty().append(html); - }, - error:function(){ + $.ajax({ + url: '/faStatistics/crackdownStatus/crackdownStatusHistoryDetail', + data: { + versionNo : versionNo, + cdsKey : cdsKey + }, + type: 'GET', + dataType:"html", + success: function(html){ + $("#historyDetailDiv").empty().append(html); + }, + error:function(){ - } - }); + } + }); } function getCrackdownStatusViewModal(cdsKey){ - $.ajax({ - url: '/faStatistics/crackdownStatus/crackdownStatusViewModal', - data: {cdsKey: cdsKey}, - type: 'GET', - dataType:"html", - success: function(html){ - $("#cdsEditBody").empty(); - $("#crackdownStatusViewBody").empty().append(html) - $("#crackdownStatusViewModal").modal('show'); - }, - error:function(){ + $.ajax({ + url: '/faStatistics/crackdownStatus/crackdownStatusViewModal', + data: {cdsKey: cdsKey}, + type: 'GET', + dataType:"html", + success: function(html){ + $("#cdsEditBody").empty(); + $("#crackdownStatusViewBody").empty().append(html) + $("#crackdownStatusViewModal").modal('show'); + }, + error:function(){ - } - }); + } + }); } function getCrackdownStatusHistoryViewModal(cdsKey){ - $.ajax({ - url: '/faStatistics/crackdownStatus/crackdownStatusHistoryViewModal', - data: {cdsKey: cdsKey}, - type: 'GET', - dataType:"html", - success: function(html){ - $("#crackdownStatusViewBody").empty().append(html) - $("#crackdownStatusViewModal").modal('show'); - }, - error:function(){ + $.ajax({ + url: '/faStatistics/crackdownStatus/crackdownStatusHistoryViewModal', + data: {cdsKey: cdsKey}, + type: 'GET', + dataType:"html", + success: function(html){ + $("#crackdownStatusViewBody").empty().append(html) + $("#crackdownStatusViewModal").modal('show'); + }, + error:function(){ - } - }); + } + }); } function getCrackdownStatusEditModal(cdsKey){ - $.ajax({ - url: '/faStatistics/crackdownStatus/crackdownStatusEditModal', - data: { - cdsKey: cdsKey - }, - type: 'GET', - dataType:"html", - success: function(html){ - $("#crackdownStatusViewBody").empty(); - $("#crackdownStatusEditModalContent").empty().append(html); - $("#crackdownStatusEditModal").modal('show'); + $.ajax({ + url: '/faStatistics/crackdownStatus/crackdownStatusEditModal', + data: { + cdsKey: cdsKey + }, + type: 'GET', + dataType:"html", + success: function(html){ + $("#crackdownStatusViewBody").empty(); + $("#crackdownStatusEditModalContent").empty().append(html); + $("#crackdownStatusEditModal").modal('show'); - $("#napoDt").datetimepicker({ - format:'Y-m-d H:i', - lang:'kr' - }); - $("#birthdate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#paymentPaymentDt").datetimepicker({ - format:'Y-m-d H:i', - lang:'kr' - }); - $("#consignmentStartDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#consignmentEndDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#evictionDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#returnDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#confiscationDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#boatDisposalDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#directHandoverDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#fieldIvsgtNapoDt").datetimepicker({ - format:'Y-m-d H:i', - lang:'kr' - }); - $("#fieldIvsgtReleaseDt").datetimepicker({ - format:'Y-m-d H:i', - lang:'kr' - }); - $("#pressurizedStartDt").datetimepicker({ - format:'Y-m-d H:i', - lang:'kr' - }); - $("#pressurizedEndDt").datetimepicker({ - format:'Y-m-d H:i', - lang:'kr' - }); - }, - error:function(){ + $("#napoDt").datetimepicker({ + format:'Y-m-d H:i', + lang:'kr', + autoclose: true + }); + $("#birthdate").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); + $("#paymentPaymentDt").datetimepicker({ + format:'Y-m-d H:i', + lang:'kr' + }); + $("#consignmentStartDt").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); + $("#consignmentEndDt").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); + $("#evictionDt").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); + $("#returnDt").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); + $("#confiscationDt").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); + $("#boatDisposalDt").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); + $("#directHandoverDt").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); + $("#fieldIvsgtNapoDt").datetimepicker({ + format:'Y-m-d H:i', + lang:'kr' + }); + $("#fieldIvsgtReleaseDt").datetimepicker({ + format:'Y-m-d H:i', + lang:'kr' + }); + $("#pressurizedStartDt").datetimepicker({ + format:'Y-m-d H:i', + lang:'kr' + }); + $("#pressurizedEndDt").datetimepicker({ + format:'Y-m-d H:i', + lang:'kr' + }); + }, + error:function(){ - } - }); + } + }); } function saveCrackdownStatus(saveYn){ - $('input[name="fieldIvsgtTimeTaken"]').val(dateTimeCalc($("#fieldIvsgtNapoDt").val(), $("#fieldIvsgtReleaseDt").val())); - $('input[name="pressurizedTimeTaken"]').val(dateTimeCalc($("#pressurizedStartDt").val(), $("#pressurizedEndDt").val())); + $('input[name="fieldIvsgtTimeTaken"]').val(dateTimeCalc($("#fieldIvsgtNapoDt").val(), $("#fieldIvsgtReleaseDt").val())); + $('input[name="pressurizedTimeTaken"]').val(dateTimeCalc($("#pressurizedStartDt").val(), $("#pressurizedEndDt").val())); - if(contentCheck()){ - if(confirm("저장하시겠습니까?")){ - $("#saveYn").val(saveYn); - contentFade("in"); - const formData = new FormData($("#cdsEditForm")[0]); + if(contentCheck()){ + if(confirm("저장하시겠습니까?")){ + $("#saveYn").val(saveYn); + contentFade("in"); + const formData = new FormData($("#cdsEditForm")[0]); - let violationList = []; - let sailorList = []; + let violationList = []; + let sailorList = []; - sailorList.push( - { - sailorKey: $("#cdsEditForm").find('input[name="captinSailorKey"]').val() != '' && $("#cdsEditForm").find('input[name="captinSailorKey"]').val() != 'false' ? Number($("#cdsEditForm").find('input[name="captinSailorKey"]').val()) : null, - position: 'POS001', - sailorNameKr: $("#cdsEditForm").find('input[name="sailorNameKr"]').val() != '' ? $("#cdsEditForm").find('input[name="sailorNameKr"]').val() : null, - isRestriction: $("#cdsEditForm").find('select[name="captin"]').val() != '' ? $("#cdsEditForm").find('select[name="captin"]').val() : null, - birthdate: $("#cdsEditForm").find('input[name="birthdate"]').val() != '' ? $("#cdsEditForm").find('input[name="birthdate"]').val() : null - }, - { - sailorKey: $("#cdsEditForm").find('input[name="mateSailorKey"]').val() != '' && $("#cdsEditForm").find('input[name="mateSailorKey"]').val() != 'false' ? Number($("#cdsEditForm").find('input[name="mateSailorKey"]').val()) : null, - position: 'POS002', - sailorNameKr: null, - isRestriction: $("#cdsEditForm").find('select[name="mate"]').val() != '' ? $("#cdsEditForm").find('select[name="mate"]').val() : null - }, - { - sailorKey: $("#cdsEditForm").find('input[name="wardenSailorKey"]').val() != '' && $("#cdsEditForm").find('input[name="wardenSailorKey"]').val() != 'false' ? Number($("#cdsEditForm").find('input[name="wardenSailorKey"]').val()) : null, - position: 'POS003', - sailorNameKr: null, - isRestriction: $("#cdsEditForm").find('select[name="warden"]').val() != '' ? $("#cdsEditForm").find('select[name="warden"]').val() : null - } - ); + sailorList.push( + { + sailorKey: $("#cdsEditForm").find('input[name="captinSailorKey"]').val() != '' && $("#cdsEditForm").find('input[name="captinSailorKey"]').val() != 'false' ? Number($("#cdsEditForm").find('input[name="captinSailorKey"]').val()) : null, + position: 'POS001', + sailorNameKr: $("#cdsEditForm").find('input[name="sailorNameKr"]').val() != '' ? $("#cdsEditForm").find('input[name="sailorNameKr"]').val() : null, + isRestriction: $("#cdsEditForm").find('select[name="captin"]').val() != '' ? $("#cdsEditForm").find('select[name="captin"]').val() : null, + birthdate: $("#cdsEditForm").find('input[name="birthdate"]').val() != '' ? $("#cdsEditForm").find('input[name="birthdate"]').val() : null + }, + { + sailorKey: $("#cdsEditForm").find('input[name="mateSailorKey"]').val() != '' && $("#cdsEditForm").find('input[name="mateSailorKey"]').val() != 'false' ? Number($("#cdsEditForm").find('input[name="mateSailorKey"]').val()) : null, + position: 'POS002', + sailorNameKr: null, + isRestriction: $("#cdsEditForm").find('select[name="mate"]').val() != '' ? $("#cdsEditForm").find('select[name="mate"]').val() : null + }, + { + sailorKey: $("#cdsEditForm").find('input[name="wardenSailorKey"]').val() != '' && $("#cdsEditForm").find('input[name="wardenSailorKey"]').val() != 'false' ? Number($("#cdsEditForm").find('input[name="wardenSailorKey"]').val()) : null, + position: 'POS003', + sailorNameKr: null, + isRestriction: $("#cdsEditForm").find('select[name="warden"]').val() != '' ? $("#cdsEditForm").find('select[name="warden"]').val() : null + } + ); - $("select[name='sailor']").each(function (){ - sailorList.push({ - sailorKey: $(this).parent().parent().find('input[name="sailorKey"]').val() != undefined ? Number($(this).parent().parent().find('input[name="sailorKey"]').val()) : null, - sailorNameKr: $(this).parent().parent().find('input[name="sailorNameKr"]').val(), - position: 'POS006', - isRestriction: $(this).val() != undefined ? $(this).val() : null - }); - }); + $("select[name='sailor']").each(function (){ + sailorList.push({ + sailorKey: $(this).parent().parent().find('input[name="sailorKey"]').val() != undefined ? Number($(this).parent().parent().find('input[name="sailorKey"]').val()) : null, + sailorNameKr: $(this).parent().parent().find('input[name="sailorNameKr"]').val(), + position: 'POS006', + isRestriction: $(this).val() != undefined ? $(this).val() : null + }); + }); - for (let i=0; i < sailorList.length; i++) { - if (sailorList[i].sailorKey != null) { - formData.append(`sailorList[${i}].sailorKey`, sailorList[i].sailorKey); - } - if (sailorList[i].sailorNameKr != null) { - formData.append(`sailorList[${i}].sailorNameKr`, sailorList[i].sailorNameKr); - } - formData.append(`sailorList[${i}].position`, sailorList[i].position); - if (sailorList[i].isRestriction != null) { - formData.append(`sailorList[${i}].isRestriction`, sailorList[i].isRestriction); - } - if (sailorList[i].birthdate != null) { - formData.append(`sailorList[${i}].birthdate`, sailorList[i].birthdate); - } - } - - $(".violation").each(function (){ - violationList.push({ - violationKey: $(this).parent().find('input[name="violationKey"]').val() != undefined ? Number($(this).parent().find('input[name="violationKey"]').val()) : null, - fbKey: $("#cdsEditForm").find('input[name="fbKey"]').val() != undefined ? Number($("#cdsEditForm").find('input[name="fbKey"]').val()) : null, - violation: $(this).val() != '' ? $(this).val() : null, - violationEtc: $(this).parent().find('input[name="violationEtc"]').val() != undefined ? $(this).parent().find('input[name="violationEtc"]').val() : null - }); - }); - - for (let i=0; i < violationList.length; i++) { - if (violationList[i].violationKey != null) { - formData.append(`violationList[${i}].violationKey`, violationList[i].violationKey); - } - if (violationList[i].fbKey != null) { - formData.append(`violationList[${i}].fbKey`, violationList[i].fbKey); - } - if (violationList[i].violation != null) { - formData.append(`violationList[${i}].violation`, violationList[i].violation); - } - if (violationList[i].violationEtc != null) { - formData.append(`violationList[${i}].violationEtc`, violationList[i].violationEtc); - } - } - - $.ajax({ - type : 'POST', - data : formData, - url : "/faStatistics/crackdownStatus/saveCrackdownStatus", - processData: false, - contentType: false, - success : function(result) { - alert("저장되었습니다."); - contentFade("out"); - $("#crackdownStatusEditModal").modal('hide'); - }, - error : function(xhr, status) { - alert("저장에 실패하였습니다.") - contentFade("out"); - } - }) + for (let i=0; i < sailorList.length; i++) { + if (sailorList[i].sailorKey != null) { + formData.append(`sailorList[${i}].sailorKey`, sailorList[i].sailorKey); } + if (sailorList[i].sailorNameKr != null) { + formData.append(`sailorList[${i}].sailorNameKr`, sailorList[i].sailorNameKr); + } + formData.append(`sailorList[${i}].position`, sailorList[i].position); + if (sailorList[i].isRestriction != null) { + formData.append(`sailorList[${i}].isRestriction`, sailorList[i].isRestriction); + } + if (sailorList[i].birthdate != null) { + formData.append(`sailorList[${i}].birthdate`, sailorList[i].birthdate); + } + } + + $(".violation").each(function (){ + violationList.push({ + violationKey: $(this).parent().find('input[name="violationKey"]').val() != undefined ? Number($(this).parent().find('input[name="violationKey"]').val()) : null, + fbKey: $("#cdsEditForm").find('input[name="fbKey"]').val() != undefined ? Number($("#cdsEditForm").find('input[name="fbKey"]').val()) : null, + violation: $(this).val() != '' ? $(this).val() : null, + violationEtc: $(this).parent().find('input[name="violationEtc"]').val() != undefined ? $(this).parent().find('input[name="violationEtc"]').val() : null + }); + }); + + for (let i=0; i < violationList.length; i++) { + if (violationList[i].violationKey != null) { + formData.append(`violationList[${i}].violationKey`, violationList[i].violationKey); + } + if (violationList[i].fbKey != null) { + formData.append(`violationList[${i}].fbKey`, violationList[i].fbKey); + } + if (violationList[i].violation != null) { + formData.append(`violationList[${i}].violation`, violationList[i].violation); + } + if (violationList[i].violationEtc != null) { + formData.append(`violationList[${i}].violationEtc`, violationList[i].violationEtc); + } + } + + $.ajax({ + type : 'POST', + data : formData, + url : "/faStatistics/crackdownStatus/saveCrackdownStatus", + processData: false, + contentType: false, + success : function(result) { + alert("저장되었습니다."); + contentFade("out"); + $("#crackdownStatusEditModal").modal('hide'); + }, + error : function(xhr, status) { + alert("저장에 실패하였습니다.") + contentFade("out"); + } + }) } + } } function contentCheck(){ - let flag = true; + let flag = true; - if(!$('#cdsEditForm').find($('input[name="boatNameKr"]').val())) { - alert('선명을 입력해주세요.'); - $('input[name="boatNameKr"]').focus(); - return false; - } + if(!$('#cdsEditForm').find($('input[name="boatNameKr"]').val())) { + alert('선명을 입력해주세요.'); + $('input[name="boatNameKr"]').focus(); + return false; + } - if(!$('#cdsEditForm').find($('select[name="processStatus"]').val())) { - alert('처리현황을 선택해주세요.'); - $('select[name="processStatus"]').focus(); - return false; - } + if(!$('#cdsEditForm').find($('select[name="processStatus"]').val())) { + alert('처리현황을 선택해주세요.'); + $('select[name="processStatus"]').focus(); + return false; + } - return flag; + return flag; } diff --git a/src/main/resources/static/js/faStatistics/fishingBoatMgt.js b/src/main/resources/static/js/faStatistics/fishingBoatMgt.js index e5489297..e9afa3ef 100644 --- a/src/main/resources/static/js/faStatistics/fishingBoatMgt.js +++ b/src/main/resources/static/js/faStatistics/fishingBoatMgt.js @@ -1,5 +1,27 @@ let selectedList = []; let fileList = []; +$(function (){ + const searchFormBoat = $("#searchFormBoat") + if(searchFormBoat.val()!==""){ + searchFormBoat.find("."+$("#searchFormPolice").val()).show(); + searchFormBoat.removeAttr("disabled"); + } + $("#dateSelectorDiv").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); +}) +$(document).on('change', '#searchFormPolice', function (){ + const searchFormBoat = $("#searchFormBoat") + searchFormBoat.find("option").hide() + if(this.value !== ""){ + searchFormBoat.removeAttr("disabled") + searchFormBoat.find("."+this.value).show(); + }else{ + searchFormBoat.attr("disabled", "disabled") + } +}) $(document).on('click', '#getFishingBoatEditModalBtn', function (){ getFishingBoatEditModal(null); }) diff --git a/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js b/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js index 1bff000a..a34aa989 100644 --- a/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js +++ b/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js @@ -1,11 +1,13 @@ $(function(){ $("#dateSelectorDiv").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $(".dateSelector").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); }); @@ -265,8 +267,9 @@ $(document).on('change', '#purpose', function (){ $(function(){ $("#datePickerDiv").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); }); @@ -298,8 +301,9 @@ function makeSpiInfoDiv(name) { + '' ); $("#stayQualificationDiv").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); } @@ -432,12 +436,14 @@ function getIcaEditModal(icaKey){ $("#icaEditModalContent").empty().append(html); $("#icaEditModal").modal('show'); $("#crimeAwarenessDtDiv").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("#caseSentDtDiv").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("[name='caseOverview']").summernote({ lang:'ko-KR', diff --git a/src/main/resources/static/js/faStatistics/processResult.js b/src/main/resources/static/js/faStatistics/processResult.js index 6cccd67d..39fbfc9f 100644 --- a/src/main/resources/static/js/faStatistics/processResult.js +++ b/src/main/resources/static/js/faStatistics/processResult.js @@ -1,24 +1,9 @@ $(function(){ - $("#consignmentStartDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#consignmentEndDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#returnDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#confiscationDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); - $("#boatDisposalDate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); + $("#dateSelectorDiv").datepicker({ + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); }); $(document).on('click', '#processResultAddBtn', function () { getProcessResultAddModal(null); @@ -201,24 +186,29 @@ function getProcessResultAddModal(){ $("#processResultAddModal").modal('show'); $("#consignmentStartDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("#consignmentEndDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("#returnDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("#confiscationDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("#boatDisposalDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); }, error:function(){ @@ -241,24 +231,29 @@ function getProcessResultEditModal(prKey){ $("#processResultEditModal").modal('show'); $("#consignmentStartDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("#consignmentEndDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("#returnDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("#confiscationDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("#boatDisposalDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); }, error:function(){ diff --git a/src/main/resources/static/js/faStatistics/sailor.js b/src/main/resources/static/js/faStatistics/sailor.js index 891bac12..5681c8c3 100644 --- a/src/main/resources/static/js/faStatistics/sailor.js +++ b/src/main/resources/static/js/faStatistics/sailor.js @@ -162,8 +162,9 @@ function getSailorEditModal(sailorKey){ $("#sailorEditModal").modal('show'); $("#birthdate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); }, error:function(){ @@ -182,8 +183,9 @@ function getSailorAddModal(){ $("#sailorAddModal").modal('show'); $("#birthdate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); }, error:function(){ diff --git a/src/main/resources/static/js/fipTarget/partInfo.js b/src/main/resources/static/js/fipTarget/partInfo.js index c8c0101b..e26b84eb 100644 --- a/src/main/resources/static/js/fipTarget/partInfo.js +++ b/src/main/resources/static/js/fipTarget/partInfo.js @@ -191,7 +191,8 @@ function showModal(piSeq){ $(function(){ $("#startDate").datepicker({ format: "yyyy-mm-dd", - language: "ko" + language: "ko", + autoclose: true }); }) diff --git a/src/main/resources/static/js/fipTarget/partWork.js b/src/main/resources/static/js/fipTarget/partWork.js index 5903d660..27a912d8 100644 --- a/src/main/resources/static/js/fipTarget/partWork.js +++ b/src/main/resources/static/js/fipTarget/partWork.js @@ -9,8 +9,9 @@ $(document).on('click', '#addPartWork', function (){ $("#partWorkEditModal").modal('show'); setUploadDiv(); $("#workDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("#workInfo").summernote({ lang:'ko-KR', @@ -109,8 +110,9 @@ function showModal(pwSeq,piSeq){ $("#partWorkEditModal").modal('show'); setUploadDiv(); $("#mWorkDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $("#mWorkInfo").summernote({ lang:'ko-KR', diff --git a/src/main/resources/static/js/ivsgt/ivsgt.js b/src/main/resources/static/js/ivsgt/ivsgt.js index 581752bd..3b951e8e 100644 --- a/src/main/resources/static/js/ivsgt/ivsgt.js +++ b/src/main/resources/static/js/ivsgt/ivsgt.js @@ -65,8 +65,9 @@ $(document).on('change', '#searchArrestCd', function (){ $(function(){ $("#dateSelectorDiv").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); }); diff --git a/src/main/resources/static/js/police/edu.js b/src/main/resources/static/js/police/edu.js index 2a908f31..539c9c34 100644 --- a/src/main/resources/static/js/police/edu.js +++ b/src/main/resources/static/js/police/edu.js @@ -74,12 +74,14 @@ $(document).on('click', '#eduAddBtn', function (){ '' ) $(".eduSdate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); $(".eduEdate").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); eduList.push({userSeq:userSeq, eduName:"",eduSdate:"",eduEdate:"",eduRa:""}); }) diff --git a/src/main/resources/static/js/translator/translator.js b/src/main/resources/static/js/translator/translator.js index d464deb4..8c0dd734 100644 --- a/src/main/resources/static/js/translator/translator.js +++ b/src/main/resources/static/js/translator/translator.js @@ -172,13 +172,15 @@ $(document).on('click', '.historyInfoTr', function (){ }) $(document).ready( function() { $("#aptDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); $(".tcDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); }); $(document).on('click', '#approvalTab', function (){ @@ -212,8 +214,9 @@ function revisionHistory(trKey,verNo,url){ $("#configInfo").empty().append(html) $("#translatorEditModal").modal('show'); $("#viewAptDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" + format: "yyyy-mm-dd", + language: "ko", + autoclose: true }); }, error:function(){ @@ -264,9 +267,10 @@ $(document).on('click', '#crrAddBtn', function (){ '' ) $(".tcDt").datepicker({ - format: "yyyy-mm-dd", - language: "ko" - }); + format: "yyyy-mm-dd", + language: "ko", + autoclose: true + }); trCarrerList.push({translatorKey:trKey, hisGubun:"",tcDt:"",contents:"",remark:""}); }) diff --git a/src/main/resources/templates/faRpt/faRptBoard.html b/src/main/resources/templates/faRpt/faRptBoard.html index 298013cd..073b70c0 100644 --- a/src/main/resources/templates/faRpt/faRptBoard.html +++ b/src/main/resources/templates/faRpt/faRptBoard.html @@ -184,7 +184,7 @@ -