| | |
| | | tel : "", //전화번호 |
| | | email : "", //이메일 |
| | | url : "", // url |
| | | ipStart : "", //ip시작주소 |
| | | ipEnd : "", //ip종료주소 |
| | | memo : "", //비고 |
| | | companyTypeId : "", |
| | | companyType : "", //기업구분 |
| | |
| | | } |
| | | |
| | | // 업종(대분류) autocomplete page 업데이트 |
| | | function getParentSectorListCallBack(result) { |
| | | function getParentSectorListCallBack(result, value) { |
| | | if (value === "") { |
| | | $scope.vm.form.parentSectorId = ""; |
| | | if ($rootScope.isDefined($scope.vm.form.parentSectors) && $rootScope.isDefined($scope.vm.form.parentSectors[0])) { |
| | | $scope.vm.form.parentSectors[0].id = ""; |
| | | } |
| | | $scope.vm.form.childSectorId = ""; |
| | | $scope.vm.form.childSector = ""; |
| | | $scope.vm.form.childSectors = []; |
| | | } |
| | | $scope.vm.autoCompletePage.parentSector.totalPage = result.data.page.totalPage; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | $scope.$on("ispFieldEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.ispId = result[0].id; |
| | | } |
| | | }); |
| | | |
| | | $scope.$on("hostingFieldEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.hostingId = result[0].id; |
| | | } |
| | | }); |
| | | |
| | | $scope.$on("companyTypeEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.companyTypeId = result[0].id; |
| | | } |
| | | }); |
| | | $scope.$on("parentSectorEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.parentSectorId = result[0].id; |
| | | } else { |
| | | $scope.vm.form.parentSectorId = ""; |
| | | if ($rootScope.isDefined($scope.vm.form.parentSectors) && $rootScope.isDefined($scope.vm.form.parentSectors[0])) { |
| | | $scope.vm.form.parentSectors[0].id = ""; |
| | | } |
| | | } |
| | | $scope.vm.form.childSectorId = ""; |
| | | $scope.vm.form.childSector = ""; |
| | | $scope.vm.form.childSectors = []; |
| | | }); |
| | | $scope.$on("childSectorEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.childSectorId = result[0].id; |
| | | } |
| | | }); |
| | | $scope.$on("regionEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.regionId = result[0].id; |
| | | } |
| | | }); |
| | | $scope.$on("statusEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.statusId = result[0].id; |
| | | } |
| | | }); |
| | |
| | | var content = { |
| | | name : $rootScope.preventXss($scope.vm.form.name), // 업체명 |
| | | ispId : (function () { // ISP 아이디 |
| | | var ispId = -1; |
| | | var ispId = null; |
| | | if ($scope.vm.form.issueIspFields != null) { |
| | | ispId = $scope.vm.form.ispId; |
| | | } |
| | | return ispId; |
| | | })(), |
| | | hostingId : (function () { // Hosting 아이디 |
| | | var hostingId = -1; |
| | | var hostingId = null; |
| | | if ($scope.vm.form.issueHostingFields != null) { |
| | | hostingId = $scope.vm.form.hostingId; |
| | | } |
| | |
| | | } |
| | | return emailList; |
| | | })(), |
| | | url : $scope.vm.form.url, // url |
| | | url : (function () { |
| | | // 모든 공백 제거 |
| | | var regex = / /gi; |
| | | let url = $scope.vm.form.url; |
| | | if ($rootScope.isDefined(url) && url.indexOf(" ") !== -1) { |
| | | url = url.replace(regex, ""); |
| | | } |
| | | return url; |
| | | })(), |
| | | ipStart : $scope.vm.form.ipStart, // ip시작주소 |
| | | ipEnd : $scope.vm.form.ipEnd, // ip종료주소 |
| | | memo : $scope.vm.form.memo, //비고 |
| | | companyTypeId : (function () { |
| | | var companyTypeId = -1; |
| | | var companyTypeId = null; |
| | | if ($scope.vm.form.companyTypes != null && $scope.vm.form.companyTypes.length > 0) { |
| | | companyTypeId = $scope.vm.form.companyTypes[0].id; |
| | | } |
| | | return companyTypeId; |
| | | })(), |
| | | parentSectorId : (function () { |
| | | var parentSectorId = -1; |
| | | var parentSectorId = null; |
| | | if ($scope.vm.form.parentSectors != null && $scope.vm.form.parentSectors.length > 0) { |
| | | parentSectorId = $scope.vm.form.parentSectors[0].id; |
| | | } |
| | | return parentSectorId; |
| | | })(), |
| | | childSectorId : (function () { |
| | | var childSectorId = -1; |
| | | var childSectorId = null; |
| | | if ($scope.vm.form.childSectors != null && $scope.vm.form.childSectors.length > 0) { |
| | | childSectorId = $scope.vm.form.childSectors[0].id; |
| | | } |
| | | return childSectorId; |
| | | })(), |
| | | regionId : (function () { |
| | | var regionId = -1; |
| | | var regionId = null; |
| | | if ($scope.vm.form.regions != null && $scope.vm.form.regions.length > 0) { |
| | | regionId = $scope.vm.form.regions[0].id; |
| | | } |
| | | return regionId; |
| | | })(), |
| | | statusId : (function () { |
| | | var statusId = -1; |
| | | var statusId = null; |
| | | if ($scope.vm.form.statuses != null && $scope.vm.form.statuses.length > 0) { |
| | | statusId = $scope.vm.form.statuses[0].id; |
| | | } else if ($scope.vm.form.status !== ""){ |