From fe7da0d84745daa8b90ea0e2a32168ffc8ac8ac4 Mon Sep 17 00:00:00 2001 From: jiHyung Date: Thu, 3 Nov 2022 12:35:59 +0900 Subject: [PATCH] =?UTF-8?q?select=EB=B0=95=EC=8A=A4=20=EB=8F=99=EC=A0=81?= =?UTF-8?q?=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../faStatistics/internationalCrimeArrest.js | 47 ++++++++++++++----- .../internationalCrimeArrest.html | 21 +++++---- .../internationalCrimeArrestEditModal.html | 23 ++++----- .../internationalCrimeArrestViewModal.html | 22 +++++---- 4 files changed, 73 insertions(+), 40 deletions(-) diff --git a/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js b/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js index 56fd62e8..00553ccd 100644 --- a/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js +++ b/src/main/resources/static/js/faStatistics/internationalCrimeArrest.js @@ -28,6 +28,30 @@ $(document).on('click', '.tr', function (){ getIcaViewModal($(this).data('key')); }); +$(document).on('change', 'select[name="organ"]', function (){ + $('select[name="department"]').empty(); + const parent_organ = $(this).val(); + let department = ''; + organConfigList.forEach(function (organConfig) { + if (organConfig.parentOrgan != null && organConfig.organType != 'OGC002' && organConfig.parentOrgan == parent_organ) { + department += ''; + } + }); + + $('select[name="department"]').append('' + department); +}); + +$(document).on('change', 'select[name="crimeType"]', function (){ + $('select[name="violationType"]').empty(); + let violationType = ''; + let code = $(this).val(); + commonCode[code].forEach(function (item) { + violationType += ''; + }); + + $('select[name="violationType"]').append('' + violationType); +}); + $(document).on('change', '#crimeForm', function (){ $('#crimeFormDiv').next().remove(); @@ -125,7 +149,7 @@ $(document).on('change', '#crimeType', function (){ smugglingAmount += ''; }) - if ($(this).val() == 'CTH002') { + if ($(this).val() == 'CTH2') { makeArrestAreaDiv('장소'); $('#smugglingAmountDiv').append( '' @@ -162,7 +186,7 @@ $(document).on('change', '#violationType', function (){ $('.entryVisa').remove(); $('#violationAmountDiv').remove(); - if ($(this).val() == 'VLT001') { + if ($(this).val() == 'CTH101') { makeSpiInfoDiv('피의자 정보'); makeArrestAreaDiv('지역'); makeSeaAreaDiv('밀입국'); @@ -171,7 +195,7 @@ $(document).on('change', '#violationType', function (){ makeDestinationDiv('밀입국 출발지(국가)'); } - if ($(this).val() == 'VLT002') { + if ($(this).val() == 'CTH102') { makeSpiInfoDiv('피의자 정보'); makeArrestAreaDiv('지역'); makeSeaAreaDiv('도외이탈'); @@ -179,7 +203,7 @@ $(document).on('change', '#violationType', function (){ makePurposeDiv('도외이탈'); } - if ($(this).val() == 'VLT003') { + if ($(this).val() == 'CTH103') { makeSpiInfoDiv('피의자 정보'); makeArrestAreaDiv('지역'); makeSeaAreaDiv('밀출국'); @@ -188,7 +212,7 @@ $(document).on('change', '#violationType', function (){ makeDestinationDiv('밀출국 행선지(도착예정지)'); } - if ($(this).val() == 'VLT004') { + if ($(this).val() == 'CTH104') { makeSpiInfoDiv('피의자 정보'); makeArrestAreaDiv('지역'); makeSeaAreaDiv('밀항'); @@ -197,15 +221,18 @@ $(document).on('change', '#violationType', function (){ makeDestinationDiv('밀항 행선지(도착예정지)'); } - if ($(this).val() == 'VLT005') { + if ($(this).val() == 'CTH105') { makeSpiInfoDiv('불법체류 및 취업'); makeEntryVisaDiv(); } - if ($(this).val() == 'VLT301') { + if ($(this).val() == 'CTH401') { makeViolationAmountDiv(); } + if ($(this).val() == 'CTH201' || $(this).val() == 'CTH202' || $(this).val() == 'CTH203' || $(this).val() == 'CTH204') { + makeArrestAreaDiv('장소'); + } }); $(document).on('change', '#smugglingAmount', function (){ @@ -321,7 +348,7 @@ function makeArrestAreaDiv(name) { function makeMeansDiv(name, code) { let means = ''; - if (code == 'VLT001') { + if (code == 'CTH101') { commonCode.MS1.forEach(function (item){ means += ''; }) @@ -500,10 +527,6 @@ function saveInternationalCrimeArrest(contentState){ function contentCheck(){ let flag = true; - if(!$('select[name="organ"]').val()){ - alert("지방청을 선택해주세요.") - flag = false; - } return flag; } diff --git a/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrest.html b/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrest.html index d54e5004..74df0917 100644 --- a/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrest.html +++ b/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrest.html @@ -7,6 +7,7 @@ @@ -44,7 +45,7 @@ -
+
- + + + + +
@@ -138,12 +141,14 @@ + + + + + - - - diff --git a/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestEditModal.html b/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestEditModal.html index 3c40c5d9..f9912f12 100644 --- a/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestEditModal.html +++ b/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestEditModal.html @@ -33,14 +33,14 @@
-
- + + + + + +
@@ -65,9 +65,10 @@
diff --git a/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestViewModal.html b/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestViewModal.html index 259a6a56..cdaf35b0 100644 --- a/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestViewModal.html +++ b/src/main/resources/templates/faStatistics/internationalCrimeArrest/internationalCrimeArrestViewModal.html @@ -33,11 +33,14 @@
- - -
+
@@ -52,7 +55,7 @@
- - - + + + + +