Commit 93edd535 authored by sherlock's avatar sherlock

bug:19445

parent 615e097c
...@@ -36,7 +36,7 @@ controller('AreaSelectorController', ['$scope', 'areaService','$translate', ...@@ -36,7 +36,7 @@ controller('AreaSelectorController', ['$scope', 'areaService','$translate',
$scope.selectArea = function (area) { $scope.selectArea = function (area) {
$scope.selectedAreaName = area.name; $scope.selectedAreaName = area.name;
$scope.selectedAreaId = area.id; $scope.selectedAreaId = area.ID;
$scope.componentSelectedArea = area; $scope.componentSelectedArea = area;
$('.dropdown').removeClass('open'); $('.dropdown').removeClass('open');
// $scope.onChange(); // $scope.onChange();
......
...@@ -45,6 +45,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -45,6 +45,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$scope.selectProvince = null; $scope.selectProvince = null;
$scope.selectRegionID = null; $scope.selectRegionID = null;
$scope.componentSelectedArea = null;
$scope.selectRegion = defaultSelcectRegion; $scope.selectRegion = defaultSelcectRegion;
$scope.selectProjectIndustry = null; $scope.selectProjectIndustry = null;
$scope.selectBusinessUnit = null; $scope.selectBusinessUnit = null;
...@@ -53,7 +54,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -53,7 +54,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 默认事业部 // 默认事业部
if ($scope.newOrganization.businessUnitID) { if ($scope.newOrganization.businessUnitID) {
$scope.selectBusinessUnit = _.find($scope.businessUnitList, function (num) { $scope.selectBusinessUnit = _.find($scope.businessUnitList, function (num) {
return num.id === $scope.newOrganization.businessUnitID; return num.ID === $scope.newOrganization.businessUnitID;
}); });
} }
...@@ -158,8 +159,8 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -158,8 +159,8 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
editModel.businessUnitID = $scope.selectBusinessUnit.ID; editModel.businessUnitID = $scope.selectBusinessUnit.ID;
} }
//区域 //区域
if ($scope.selectedArea) { if ($scope.componentSelectedArea) {
editModel.areaID = $scope.selectedArea.ID; editModel.areaID = $scope.selectedAreaId;
} }
//账套 //账套
...@@ -375,7 +376,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -375,7 +376,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
//设置事业部 //设置事业部
var businessUnitList = $scope.businessUnitList; var businessUnitList = $scope.businessUnitList;
$scope.selectBusinessUnit = _.find(businessUnitList, function (num) { $scope.selectBusinessUnit = _.find(businessUnitList, function (num) {
return num.id === orgData.businessUnitID; return num.ID === orgData.businessUnitID;
}); });
if ($scope.selectBusinessUnit === undefined) { if ($scope.selectBusinessUnit === undefined) {
...@@ -384,6 +385,8 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -384,6 +385,8 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// $('#selectBusinessUnit').append('<option disabled selected="selected">' + orgData.businessUnitName + '</option>'); // $('#selectBusinessUnit').append('<option disabled selected="selected">' + orgData.businessUnitName + '</option>');
} }
$scope.orgAccountList = []; $scope.orgAccountList = [];
$scope.serviceList = []; $scope.serviceList = [];
$scope.OrgAccountRowIndex = 1; $scope.OrgAccountRowIndex = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment