Przeglądaj źródła

设施维修-提交人,时间

hanqingsong 1 rok temu
rodzic
commit
b0650d29fa

+ 12 - 1
src/main/resources/static/app/business/facility/controller/facilityGetListCtrl.js

@@ -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
             }

+ 14 - 0
src/main/resources/static/app/business/facility/views/add-facility-get.html

@@ -113,6 +113,20 @@
113 113
                                                 </label>
114 114
                                         </section>
115 115
                                     </div>
116
+									<div class="row">
117
+										<section class="col col-3">
118
+											<label class="label">提交人:</label>
119
+											<label class="input">
120
+												<input type="text" ng-model="repairInfo.commitPeople" name="commitPeople" ng-readonly="true" required>
121
+											</label>
122
+										</section>
123
+										<section class="col col-3">
124
+											<label class="label">提交时间:</label>
125
+											<label class="input">
126
+												<input type="text" ng-model="repairInfo.commitTime" name="commitTime" ng-readonly="true" required>
127
+											</label>
128
+										</section>
129
+									</div>
116 130
 								</fieldset>
117 131
 								<footer>
118 132
 									<div class="row">