Sfoglia il codice sorgente

仓房检查记录-提交人,时间

hanqingsong 1 anno fa
parent
commit
bea1e37f60

+ 11 - 5
src/main/resources/static/app/storage/controller/storagehouseCtrl.js

@@ -53,9 +53,9 @@ angular.module('app.storage')
53 53
         }
54 54
         //修改编辑页面
55 55
         $scope.showEditHck= function (id) {
56
-            $state.go('app.storage.storehouse.hckadd', {id:id,isNotEdit:true});
56
+            $state.go('app.storage.storehouse.hckadd', {id:id,isNotEdit:false});
57 57
         }
58
-        //修改编辑页面
58
+        //查看页面
59 59
         $scope.showHckView= function (id) {
60 60
             $state.go('app.storage.storehouse.hckadd', {id:id,isNotEdit:true});
61 61
         }
@@ -81,9 +81,9 @@ angular.module('app.storage')
81 81
     .controller("housecheckSaveCtrl", function($scope, $http,$state,$stateParams,$rootScope,StorehouseService, $filter,storagehouseService, APP_CONFIG) {
82 82
         //控制禁用和启用
83 83
         if($stateParams.isNotEdit != null){
84
-            if ($stateParams.isNotEdit == "false") {
84
+            if ($stateParams.isNotEdit == "false") {// 新增
85 85
                 $scope.isNotEdit = false;
86
-            } else if ($stateParams.isNotEdit == "true") {
86
+            } else if ($stateParams.isNotEdit == "true") {// 查看
87 87
                 $scope.isNotEdit = true;
88 88
             }
89 89
         }else{
@@ -98,7 +98,13 @@ angular.module('app.storage')
98 98
                 $scope.houserepair.repairEndDate = $filter('date')($scope.houserepair.repairEndDate, "yyyy-MM-dd");
99 99
                 //设置登录人为登记人
100 100
                 $scope.houserepair.checkPerson=$rootScope.userInfo.realName;
101
-
101
+                // 修改
102
+                if($stateParams.isNotEdit != null) {
103
+                    if ($stateParams.isNotEdit == "false") {
104
+                        $scope.houserepair.commitPeople = $rootScope.userInfo.realName; // 提交人
105
+                        $scope.houserepair.commitTime = $filter('date')(new Date(), "yyyy-MM-dd HH:mm:ss");// 提交时间
106
+                    }
107
+                }
102 108
             },function(data){
103 109
                 // console.log(data);
104 110
             });

+ 19 - 5
src/main/resources/static/app/storage/views/storehouse/storehouse-housecheck-edit.html

@@ -28,14 +28,14 @@
28 28
 											<label class="label">检查日期:<span style="color: red;">*</span></label>
29 29
 											<label class="input">
30 30
 												<input type="text" ng-model="houserepair.checkDate" name="checkDate" onClick="WdatePicker({lang:'zh-cn'})"
31
-													   placeholder="检查日期" required>
31
+													   placeholder="检查日期" ng-disabled="isNotEdit" required>
32 32
 											</label>
33 33
 										</section>
34 34
 										<section class="col col-3">
35 35
 											<label class="input">
36 36
 												<label class="label">检查项目:<span style="color: red;">*</span></label>
37 37
 												<input type="text" ng-model="houserepair.project" name="project"
38
-													   placeholder="检查项目" required>
38
+													   placeholder="检查项目" ng-readonly="isNotEdit" required>
39 39
 											</label>
40 40
 										</section>
41 41
 									</div>
@@ -50,7 +50,7 @@
50 50
 										<section class="col col-3">
51 51
 											<label class="label">是否存在问题:<span style="color: red;">*</span></label>
52 52
 											<label class="select">
53
-												<select name="problemExist" ng-model="houserepair.problemExist"  required>
53
+												<select name="problemExist" ng-model="houserepair.problemExist" ng-disabled="isNotEdit"  required>
54 54
 													<option value="?" selected="" disabled="">请选择</option>
55 55
 													<option value="0">是</option>
56 56
 													<option value="1">否</option>
@@ -67,7 +67,7 @@
67 67
 											<section class="col col-10">
68 68
 												<label class="label">存在问题:</label>
69 69
 												<label class="textarea textarea-resizable">
70
-													<textarea rows="3" class="custom-scroll"  ng-model="houserepair.problem" name="problem"></textarea>
70
+													<textarea rows="3" class="custom-scroll"  ng-model="houserepair.problem" name="problem" ng-readonly="isNotEdit"></textarea>
71 71
 												</label>
72 72
 											</section>
73 73
 										</div>
@@ -75,7 +75,21 @@
75 75
 											<section class="col col-10">
76 76
 												<label class="label">处理意见:</label>
77 77
 												<label class="textarea textarea-resizable">
78
-													<textarea rows="3" class="custom-scroll"  ng-model="houserepair.opinion" name="opinion"></textarea>
78
+													<textarea rows="3" class="custom-scroll"  ng-model="houserepair.opinion" name="opinion" ng-readonly="isNotEdit"></textarea>
79
+												</label>
80
+											</section>
81
+										</div>
82
+										<div class="row">
83
+											<section class="col col-3">
84
+												<label class="label">提交人:</label>
85
+												<label class="input">
86
+													<input type="text" ng-model="houserepair.commitPeople" name="commitPeople" ng-readonly="true" required>
87
+												</label>
88
+											</section>
89
+											<section class="col col-3">
90
+												<label class="label">提交时间:</label>
91
+												<label class="input">
92
+													<input type="text" ng-model="houserepair.commitTime" name="commitTime" ng-readonly="true" required>
79 93
 												</label>
80 94
 											</section>
81 95
 										</div>