| | |
| | | } |
| | | |
| | | $scope.$on("companyTypeEvent", function (event, result) { |
| | | 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; |
| | | } |
| | | $scope.vm.form.childSectorId = ""; |
| | |
| | | $scope.vm.form.childSectors = []; |
| | | }); |
| | | $scope.$on("childSectorEvent", function (event, result) { |
| | | 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) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.regionId = result[0].id; |
| | | } |
| | | }); |
| | | $scope.$on("statusEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.statusId = result[0].id; |
| | | } |
| | | }); |
| | | |
| | | // 업체정보 결과 값 Event 처리(set) |
| | | $scope.$on("companyFieldEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | var ispFieldVo = result[0].ispFieldVo; |
| | | var hostingFieldVo = result[0].hostingFieldVo; |
| | | |
| | |
| | | $scope.vm.hostingUrl = hostingFieldVo.url; |
| | | $scope.vm.hostingMemo = hostingFieldVo.memo; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | // ISP정보 결과 값 Event 처리(set) |
| | | $scope.$on("ispFieldEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.ispId = result[0].id; |
| | | $scope.vm.ispName = result[0].name; |
| | | $scope.vm.ispCode = result[0].code; |
| | |
| | | |
| | | // 호스팅정보 결과 값 Event 처리(set) |
| | | $scope.$on("hostingFieldEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.hostingId = result[0].id; |
| | | $scope.vm.hostingName = result[0].name; |
| | | $scope.vm.hostingCode = result[0].code; |
| | |
| | | if ($scope.vm.form.issueCompanyFields != null && $scope.vm.form.issueCompanyFields.length > 0 ){ |
| | | |
| | | var companyField = $scope.vm.form.issueCompanyFields[0]; |
| | | if (companyField.name !== $scope.vm.companyName) { //사용자가 직접 업체 추가 할 경우 |
| | | //사용자가 직접 업체 추가 할 경우 |
| | | if ($rootScope.isDefined(companyField) && companyField.name !== $scope.vm.companyName) { |
| | | return issueCompanyFields; |
| | | } |
| | | |
| | |
| | | || $scope.vm.form.issueIspFields != null && $scope.vm.form.issueIspFields.length > 0 ){ |
| | | |
| | | var ispField = $scope.vm.form.issueIspFields[0]; |
| | | if (ispField.name !== $scope.vm.ispName) { //사용자가 직접 ISP 추가 할 경우 |
| | | //사용자가 직접 ISP 추가 할 경우 |
| | | if ($rootScope.isDefined(ispField) && ispField.name !== $scope.vm.ispName) { |
| | | return issueIspFields; |
| | | } |
| | | |
| | |
| | | || $scope.vm.form.issueHostingFields != null && $scope.vm.form.issueHostingFields.length > 0 ){ |
| | | |
| | | var hostingField = $scope.vm.form.issueHostingFields[0]; |
| | | if (hostingField.name !== $scope.vm.hostingName) { //사용자가 직접 호스팅 추가 할 경우 |
| | | //사용자가 직접 호스팅 추가 할 경우 |
| | | if ($rootScope.isDefined(hostingField) && hostingField.name !== $scope.vm.hostingName) { |
| | | return issueHostingFields; |
| | | } |
| | | |