|
|
@@ -65,6 +65,8 @@ angular.module('app.business')
|
|
65
|
65
|
})
|
|
66
|
66
|
|
|
67
|
67
|
.controller("addFacilityGetCtrl", function($scope, $filter,$http,$state,$rootScope, FacilityGetService, equipmentEquipmentPoolService,enumService,$stateParams, APP_CONFIG) {
|
|
|
68
|
+ // 初始化
|
|
|
69
|
+ $scope.repairInfo = {};
|
|
68
|
70
|
//树形下拉框获取设施分类
|
|
69
|
71
|
// $scope.getDeviceName = function(deviceName, deviceType) {
|
|
70
|
72
|
// //$scope.deviceType=angular.fromJson($scope.device.deviceType);
|
|
|
@@ -87,8 +89,14 @@ angular.module('app.business')
|
|
87
|
89
|
var receiveFacility = angular.fromJson($stateParams.facility);
|
|
88
|
90
|
$scope.repairInfo = receiveFacility;
|
|
89
|
91
|
}
|
|
|
92
|
+ if($stateParams.isNotEdit != null) {
|
|
|
93
|
+ if ($stateParams.isNotEdit == "false") {
|
|
|
94
|
+ // 修改
|
|
|
95
|
+ $scope.repairInfo.commitPeople = $rootScope.userInfo.realName; // 提交人
|
|
|
96
|
+ $scope.repairInfo.commitTime = $filter('date')(new Date(), "yyyy-MM-dd HH:mm:ss");// 提交时间
|
|
|
97
|
+ }
|
|
|
98
|
+ }
|
|
90
|
99
|
}, 1000);
|
|
91
|
|
-
|
|
92
|
100
|
}, function(data){
|
|
93
|
101
|
console.log(data);
|
|
94
|
102
|
});
|
|
|
@@ -113,6 +121,9 @@ angular.module('app.business')
|
|
113
|
121
|
if($stateParams.isNotEdit != null){
|
|
114
|
122
|
if ($stateParams.isNotEdit == "false") {
|
|
115
|
123
|
$scope.isNotEdit = false;
|
|
|
124
|
+ // 保存/修改
|
|
|
125
|
+ $scope.repairInfo.commitPeople = $rootScope.userInfo.realName; // 提交人
|
|
|
126
|
+ $scope.repairInfo.commitTime = $filter('date')(new Date(), "yyyy-MM-dd HH:mm:ss");// 提交时间
|
|
116
|
127
|
} else if ($stateParams.isNotEdit == "true") {
|
|
117
|
128
|
$scope.isNotEdit = true;
|
|
118
|
129
|
}
|