| | |
| | | } |
| | | |
| | | // 업종(대분류) 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("parentSectorEvent", function (event, result) { |
| | | 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 = ""; |
| | |
| | | parentSectorId : $scope.vm.form.parentSectorId, |
| | | childSectorId : $scope.vm.form.childSectorId, |
| | | regionId : $scope.vm.form.regionId, |
| | | statusId : $scope.vm.form.statusId |
| | | statusId : $scope.vm.form.statusId, |
| | | statusName : $scope.vm.form.status |
| | | }); |
| | | } |
| | | |