OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2022-01-13 3be5bcca558d065e2a758e52fcbb8f0e03efed28
src/main/webapp/scripts/app/companyField/companyFieldModify.controller.js
@@ -151,6 +151,10 @@
                    $scope.vm.form.hostingId = result[0].id;
                });
                $scope.$on("parentSectorEvent", function (event, result) {
                    $scope.vm.form.childSector = "";
                });
                //  폼 전송
                function formSubmit() {
                    $rootScope.spinner = true;
@@ -216,46 +220,46 @@
                        memo : $rootScope.preventXss($scope.vm.form.memo),
                        companyTypeId : (function () {
                            var companyTypeId = -1;
                            if ($scope.vm.form.companyType !== "" && $scope.vm.form.companyTypeId !== "" && $scope.vm.form.companyTypeId !== -1) {
                                companyTypeId = $scope.vm.form.companyTypeId;
                            }else if ($scope.vm.form.companyTypes != null) {
                            if ($scope.vm.form.companyTypes != null) {
                                companyTypeId = $scope.vm.form.companyTypes[0].id;
                            } else {
                                companyTypeId = $scope.vm.form.companyTypeId;
                            }
                            return companyTypeId;
                        })(),
                        parentSectorId : (function () {
                            var parentSectorId = -1;
                            if ($scope.vm.form.parentSector !== "" && $scope.vm.form.parentSectorId !== "" && $scope.vm.form.parentSectorId !== -1) {
                                parentSectorId = $scope.vm.form.parentSectorId;
                            }else if ($scope.vm.form.parentSectors != null) {
                            if ($scope.vm.form.parentSectors != null) {
                                parentSectorId = $scope.vm.form.parentSectors[0].id;
                            } else {
                                parentSectorId = $scope.vm.form.parentSectorId;
                            }
                            return parentSectorId;
                        })(),
                        childSectorId : (function () {
                            var childSectorId = -1;
                            if ($scope.vm.form.childSector !== "" && $scope.vm.form.childSectorId !== "" && $scope.vm.form.childSectorId !== -1) {
                                childSectorId = $scope.vm.form.childSectorId;
                            }else if ($scope.vm.form.childSectors != null) {
                            if ($scope.vm.form.childSectors != null) {
                                childSectorId = $scope.vm.form.childSectors[0].id;
                            } else {
                                childSectorId = $scope.vm.form.childSectorId;
                            }
                            return childSectorId;
                        })(),
                        regionId : (function () {
                            var regionId = -1;
                            if ($scope.vm.form.region !== "" && $scope.vm.form.regionId !== "" && $scope.vm.form.regionId !== -1) {
                                regionId = $scope.vm.form.regionId;
                            }else if ($scope.vm.form.regions != null) {
                            if ($scope.vm.form.regions != null) {
                                regionId = $scope.vm.form.regions[0].id;
                            } else {
                                regionId = $scope.vm.form.regionId;
                            }
                            return regionId;
                        })(),
                        statusId : (function () {
                            var statusId = -1;
                            if ($scope.vm.form.status !== "" && $scope.vm.form.statusId !== "" && $scope.vm.form.statusId !== -1) {
                                statusId = $scope.vm.form.statusId;
                            }else if ($scope.vm.form.statuses != null) {
                            if ($scope.vm.form.statuses != null) {
                                statusId = $scope.vm.form.statuses[0].id;
                            } else {
                                statusId = $scope.vm.form.statusId;
                            }
                            return statusId;
                        })(),
@@ -354,10 +358,14 @@
                                if (result.data.content.tel != null) {
                                    var inputTels = $scope.vm.form.inputTels;
                                    var tels = result.data.content.tel.substr(1, result.data.content.tel.indexOf("]")-1);
                                    var telArr = tels.split(", ");
                                    var tels = result.data.content.tel;
                                    if (result.data.content.tel.indexOf("[") !== -1){
                                        tels = result.data.content.tel.substr(1, result.data.content.tel.indexOf("]")-1);
                                    }
                                    var telArr = tels.split(",");
                                    angular.forEach(telArr, function (tel) {
                                        inputTels.push(tel);
                                        var tell = tel.trim();
                                        inputTels.push(tell);
                                    });
                                    inputTels  = inputTels.filter(function(item) {
                                        return item !== null && item !== undefined && item !== '';
@@ -371,10 +379,14 @@
                                if (result.data.content.email != null) {
                                    var inputMails = $scope.vm.form.inputMails;
                                    var emails = result.data.content.email.substr(1, result.data.content.email.indexOf("]")-1);
                                    var emailArr = emails.split(", ");
                                    var emails = result.data.content.email
                                    if (result.data.content.email.indexOf("[") !== -1){
                                        emails = result.data.content.email.substr(1, result.data.content.email.indexOf("]")-1);
                                    }
                                    var emailArr = emails.split(",");
                                    angular.forEach(emailArr, function (email) {
                                        inputMails.push(email);
                                        var mail = email.trim();
                                        inputMails.push(mail);
                                    });
                                    inputMails  = inputMails.filter(function(item) {
                                        return item !== null && item !== undefined && item !== '';