From fc0621ede05c27a7ed9a3622f1034f87879c18fe Mon Sep 17 00:00:00 2001 From: jiHyung Date: Fri, 11 Nov 2022 13:32:56 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=98=EB=A6=AC=ED=98=84=ED=99=A9,=20?= =?UTF-8?q?=EB=8B=A8=EC=86=8D=ED=98=84=ED=99=A9,=20=EC=84=A0=EC=9B=90?= =?UTF-8?q?=EC=84=B8=EB=B6=80=ED=98=84=ED=99=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/js/faStatistics/crackdownStatus.js | 30 +++++++++++----- .../static/js/faStatistics/processResult.js | 31 +++-------------- .../static/js/faStatistics/sailor.js | 34 ++++--------------- .../crackdownStatusEditModal.html | 14 +++++--- .../crackdownStatusHistoryViewModal.html | 2 +- .../processResult/processResultEditModal.html | 18 +++++----- .../processResultHistoryViewModal.html | 2 +- .../faStatistics/sailor/sailorEditModal.html | 18 +++++----- .../sailor/sailorHistoryViewModal.html | 2 +- 9 files changed, 61 insertions(+), 90 deletions(-) diff --git a/src/main/resources/static/js/faStatistics/crackdownStatus.js b/src/main/resources/static/js/faStatistics/crackdownStatus.js index d5ac8e2d..1bb1e109 100644 --- a/src/main/resources/static/js/faStatistics/crackdownStatus.js +++ b/src/main/resources/static/js/faStatistics/crackdownStatus.js @@ -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( '
' - + '' + + '' + '
' - + '' + + '' + '
' + '
' + '' + '
' - + '' + + '' + '
' ) }); -$(document).on('click', '#violationAddBtn', function (){ +$(document).on('click', '#violationAddBtn', function (e){ + e.preventDefault() let violation = ''; commonCode.VT.forEach(function (item){ violation += ''; @@ -118,19 +122,23 @@ $(document).on('click', '#violationAddBtn', function (){ + violation + '' + '' - + '' + + '' + '' ) }); -$(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(''); }); -$(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(''); @@ -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; } diff --git a/src/main/resources/static/js/faStatistics/processResult.js b/src/main/resources/static/js/faStatistics/processResult.js index a74e0358..426c8043 100644 --- a/src/main/resources/static/js/faStatistics/processResult.js +++ b/src/main/resources/static/js/faStatistics/processResult.js @@ -93,31 +93,6 @@ $(document).on('change', 'select[name="caseNum"]', function (){ }); }); -$(document).on('click', '#violationAddBtn', function (){ - let violation = ''; - commonCode.VT.forEach(function (item){ - violation += ''; - }) - - $('#violationDiv').append( - '
' - + '' - + '' - + '
' - ) -}); - - -$(document).on('click', '#violationRemoveBtn', function (){ - $(this).parent().remove(); - let deleteKey = $(this).parent().children("input[name='violationKey']").val(); - $("#processResultEditForm").append(''); -}); - $(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) { diff --git a/src/main/resources/static/js/faStatistics/sailor.js b/src/main/resources/static/js/faStatistics/sailor.js index 1f15eadc..1f4a12c3 100644 --- a/src/main/resources/static/js/faStatistics/sailor.js +++ b/src/main/resources/static/js/faStatistics/sailor.js @@ -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 += ''; - }) - - $('#violationDiv').append( - '
' - + '' - + '' - + '
' - ) -}); - - -$(document).on('click', '#violationRemoveBtn', function (){ - $(this).parent().remove(); - let deleteKey = $(this).parent().children("input[name='violationKey']").val(); - $("#sailorEditForm").append(''); -}); - $(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) { diff --git a/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatusEditModal.html b/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatusEditModal.html index ac290128..c960f52b 100644 --- a/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatusEditModal.html +++ b/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatusEditModal.html @@ -47,7 +47,9 @@
- +
@@ -80,7 +82,9 @@
- +
@@ -412,7 +416,7 @@
- +
@@ -429,7 +433,9 @@
- + diff --git a/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatusHistoryViewModal.html b/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatusHistoryViewModal.html index 4dbdc4e1..4ec5b466 100644 --- a/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatusHistoryViewModal.html +++ b/src/main/resources/templates/faStatistics/crackdownStatus/crackdownStatusHistoryViewModal.html @@ -45,7 +45,7 @@ - + diff --git a/src/main/resources/templates/faStatistics/processResult/processResultEditModal.html b/src/main/resources/templates/faStatistics/processResult/processResultEditModal.html index e049f695..e4385481 100644 --- a/src/main/resources/templates/faStatistics/processResult/processResultEditModal.html +++ b/src/main/resources/templates/faStatistics/processResult/processResultEditModal.html @@ -21,11 +21,11 @@
- +
-
-
- @@ -68,7 +67,7 @@
- -
diff --git a/src/main/resources/templates/faStatistics/processResult/processResultHistoryViewModal.html b/src/main/resources/templates/faStatistics/processResult/processResultHistoryViewModal.html index b042b868..61fc0f03 100644 --- a/src/main/resources/templates/faStatistics/processResult/processResultHistoryViewModal.html +++ b/src/main/resources/templates/faStatistics/processResult/processResultHistoryViewModal.html @@ -46,7 +46,7 @@ - +
diff --git a/src/main/resources/templates/faStatistics/sailor/sailorEditModal.html b/src/main/resources/templates/faStatistics/sailor/sailorEditModal.html index 78f1c5db..0c56dd3f 100644 --- a/src/main/resources/templates/faStatistics/sailor/sailorEditModal.html +++ b/src/main/resources/templates/faStatistics/sailor/sailorEditModal.html @@ -21,11 +21,11 @@
- +
-