|
|
@@ -64,9 +64,9 @@ angular.module('app.system').controller("orgCtrl", function($scope, $rootScope,
|
|
64
|
64
|
'click #add': function (e, value, row, index) {
|
|
65
|
65
|
$state.go("app.system.org.edit", {parentId:row.orgId});
|
|
66
|
66
|
},
|
|
67
|
|
- 'click #addDepart': function (e, value, row, index) {
|
|
68
|
|
- $scope.editDepartment(null, row.orgId);
|
|
69
|
|
- },
|
|
|
67
|
+// 'click #addDepart': function (e, value, row, index) {
|
|
|
68
|
+// $scope.editDepartment(null, row.orgId);
|
|
|
69
|
+// },
|
|
70
|
70
|
'click #edit': function (e, value, row, index) {
|
|
71
|
71
|
if (row.orgClassId==5527) {
|
|
72
|
72
|
$scope.editDepartment(row.orgId, row.parentId);
|
|
|
@@ -104,9 +104,9 @@ angular.module('app.system').controller("orgCtrl", function($scope, $rootScope,
|
|
104
|
104
|
btns.push('<a href="javascript:void(0)" id="add"><i class="fa fa-plus"></i> 下级组织</a>');
|
|
105
|
105
|
}
|
|
106
|
106
|
}
|
|
107
|
|
- if (permissions.hasPermission(58)) {
|
|
108
|
|
- btns.push('<a href="javascript:void(0)" id="addDepart"><i class="fa fa-plus"></i> 部门</a> ');
|
|
109
|
|
- }
|
|
|
107
|
+// if (permissions.hasPermission(58)) {
|
|
|
108
|
+// btns.push('<a href="javascript:void(0)" id="addDepart"><i class="fa fa-plus"></i> 部门</a> ');
|
|
|
109
|
+// }
|
|
110
|
110
|
if (permissions.hasPermission(183)) {
|
|
111
|
111
|
btns.push('<a href="javascript:void(0)" id="edit"><i class="fa fa-edit"></i> 修改</a> ');
|
|
112
|
112
|
}
|
|
|
@@ -146,7 +146,6 @@ function($scope, $rootScope, $state, $stateParams, $filter, orgService, enumServ
|
|
146
|
146
|
$scope.loadOrg = function() {
|
|
147
|
147
|
orgService.editOrg($stateParams.orgId).then(function(data) {
|
|
148
|
148
|
$scope.orgInfo = {};
|
|
149
|
|
- $scope.initBasic(319);
|
|
150
|
149
|
if ($stateParams.orgId == "") {
|
|
151
|
150
|
$scope.orgInfo.parentId = $stateParams.parentId;
|
|
152
|
151
|
//$scope.orgInfo.registDate = new Date();
|
|
|
@@ -160,6 +159,7 @@ function($scope, $rootScope, $state, $stateParams, $filter, orgService, enumServ
|
|
160
|
159
|
$scope.orgInfo.useDate = $filter('date')($scope.orgInfo.useDate, "yyyy-MM-dd");
|
|
161
|
160
|
$scope.orgInfo.depotProperty = $scope.orgInfo.depotProperty == null ? "1":$scope.orgInfo.depotProperty;
|
|
162
|
161
|
}
|
|
|
162
|
+ $scope.initBasic(319);
|
|
163
|
163
|
}, function(data) {
|
|
164
|
164
|
console.log(data);
|
|
165
|
165
|
});
|
|
|
@@ -178,7 +178,7 @@ function($scope, $rootScope, $state, $stateParams, $filter, orgService, enumServ
|
|
178
|
178
|
|
|
179
|
179
|
//获取组织类型
|
|
180
|
180
|
$scope.initBasic = function (deviceTypeId) {
|
|
181
|
|
- enumService.getTreeListByTypeId($scope.orgInfo.depotClass, deviceTypeId).then(function(data) {
|
|
|
181
|
+ enumService.findConditionEnum($scope.orgInfo.depotClass, deviceTypeId).then(function(data) {
|
|
182
|
182
|
var data_new = $scope.data_add(data);
|
|
183
|
183
|
$scope.grainAttributeTreeData = data_new;
|
|
184
|
184
|
},function(data) {
|