lufeng il y a 2 ans
Parent
commit
94730342e5

+ 8 - 5
src/main/resources/static/app/business/facility/views/add-facility-get.html

@@ -24,13 +24,14 @@
24 24
                                                     ng-disabled="isNotEdit" 
25 25
                                                     ng-readonly="isNotEdit"
26 26
                                                     ng-change="useKeepChange()"
27
+													required
27 28
                                                 >
28 29
 													<option value="">--请选择--</option>
29 30
                                                 </select> 
30 31
                                             </label>
31 32
                                         </section>
32 33
                                         <section class="col col-3">
33
-											<label class="label">设施分类:<span style="color: red;">*</span></label>
34
+											<label class="label">设施分类:</label>
34 35
 											<!-- <multi-select-tree  data-input-model="data2" data-default-label="请选择" name="name"  
35 36
 													multi-select="false" data-output-model="deviceName" select-only-leafs="true"
36 37
 													disabled-tree="isNotEdit" data-callback="selectOnly1Or2(item, selectedItems)">
@@ -52,7 +53,7 @@
52 53
 									</div>
53 54
 									<div class="row">
54 55
 										<section class="col col-3">
55
-											<label class="label">故障日期:</label>
56
+											<label class="label">故障日期:<span style="color: red;">*</span></label>
56 57
 											<label class="input">
57 58
 												<input 
58 59
                                                     id="repairInfo_gzrq" 
@@ -62,11 +63,12 @@
62 63
                                                     ng-disabled="isNotEdit" 
63 64
                                                     onClick="WdatePicker({lang:'zh-cn'})" 
64 65
                                                     placeholder="故障日期:"
66
+													required
65 67
                                                 >
66 68
 											</label>
67 69
 										</section>
68 70
                                         <section class="col col-3">
69
-											<label class="label">维修开始日期:</label>
71
+											<label class="label">维修开始日期:<span style="color: red;">*</span></label>
70 72
 											<label class="input">
71 73
 												<input 
72 74
                                                     id="repairInfo_wxksrq" 
@@ -76,6 +78,7 @@
76 78
                                                     ng-disabled="isNotEdit" 
77 79
                                                     onClick="WdatePicker({lang:'zh-cn'})" 
78 80
                                                     placeholder="维修开始日期"
81
+													required
79 82
                                                 >
80 83
 											</label>
81 84
 										</section>
@@ -94,9 +97,9 @@
94 97
 											</label>
95 98
 										</section>
96 99
 										<section class="col col-3">
97
-											<label class="label">维修负责人: </label>
100
+											<label class="label">维修负责人: <span style="color: red;">*</span></label>
98 101
 											<label class="input">
99
-												<input type="text" ng-model="repairInfo.wxfzr" name="wxfzr" ng-disabled="isNotEdit" ng-readonly="isNotEdit" placeholder="维修负责人">
102
+												<input required type="text" ng-model="repairInfo.wxfzr" name="wxfzr" ng-disabled="isNotEdit" ng-readonly="isNotEdit" placeholder="维修负责人">
100 103
 											</label>
101 104
 										</section>
102 105
                                     </div>

+ 8 - 5
src/main/resources/static/app/business/facility/views/add-facility-keep.html

@@ -24,13 +24,14 @@
24 24
                                                     ng-disabled="isNotEdit" 
25 25
                                                     ng-readonly="isNotEdit"
26 26
                                                     ng-change="useKeepChange()"
27
+                                                    required
27 28
                                                 >
28 29
 													<option value="">--请选择--</option>
29 30
                                                 </select> 
30 31
                                             </label>
31 32
                                         </section>
32 33
                                         <section class="col col-3">
33
-											<label class="label">设施分类:<span style="color: red;">*</span></label>
34
+											<label class="label">设施分类:</label>
34 35
 											<!-- <multi-select-tree  data-input-model="data2" data-default-label="请选择" name="name"  
35 36
 													multi-select="false" data-output-model="deviceName" select-only-leafs="true"
36 37
 													disabled-tree="isNotEdit" data-callback="selectOnly1Or2(item, selectedItems)">
@@ -52,7 +53,7 @@
52 53
 									</div>
53 54
 									<div class="row">
54 55
                                         <section class="col col-3">
55
-											<label class="label">保养开始日期:</label>
56
+											<label class="label">保养开始日期:<span style="color: red;">*</span></label>
56 57
 											<label class="input">
57 58
 												<input 
58 59
                                                     id="keepInfo_byksrq" 
@@ -62,11 +63,12 @@
62 63
                                                     ng-disabled="isNotEdit" 
63 64
                                                     onClick="WdatePicker({lang:'zh-cn'})" 
64 65
                                                     placeholder="保养开始日期"
66
+                                                    required
65 67
                                                 >
66 68
 											</label>
67 69
 										</section>
68 70
 										<section class="col col-3">
69
-											<label class="label">保养结束日期:</label>
71
+											<label class="label">保养结束日期:<span style="color: red;">*</span></label>
70 72
 											<label class="input">
71 73
                                                 <input 
72 74
                                                     id="keepInfo_byjsrq" 
@@ -76,13 +78,14 @@
76 78
                                                     ng-disabled="isNotEdit" 
77 79
                                                     onClick="WdatePicker({lang:'zh-cn'})" 
78 80
                                                     placeholder="保养结束日期"
81
+                                                    required
79 82
                                                 >
80 83
 											</label>
81 84
 										</section>
82 85
 										<section class="col col-3">
83
-											<label class="label">保养负责人: </label>
86
+											<label class="label">保养负责人:<span style="color: red;">*</span> </label>
84 87
 											<label class="input">
85
-												<input type="text" ng-model="keepInfo.byfzr" name="byfzr" ng-disabled="isNotEdit" ng-readonly="isNotEdit" placeholder="保养负责人">
88
+												<input type="text" ng-model="keepInfo.byfzr" name="byfzr" ng-disabled="isNotEdit" ng-readonly="isNotEdit" placeholder="保养负责人" required>
86 89
 											</label>
87 90
 										</section>
88 91
                                     </div>

+ 5 - 5
src/main/resources/static/app/business/facility/views/add-facility-scrap.html

@@ -24,7 +24,7 @@
24 24
                                             </label>
25 25
                                         </section>
26 26
                                         <section class="col col-3">
27
-											<label class="label"  id="devicename-label">设施类型:<span style="color: red;">*</span></label>
27
+											<label class="label"  id="devicename-label">设施类型:</label>
28 28
 											<!-- <multi-select-tree  data-input-model="data2" data-default-label="请选择" name="name"  
29 29
 													multi-select="false" data-output-model="deviceName" select-only-leafs="true"
30 30
 													disabled-tree="isNotEdit" data-callback="selectOnly1Or2(item, selectedItems)">
@@ -37,7 +37,7 @@
37 37
 					                            data-default-label="请选择" name="deviceName" 
38 38
 					                            multi-select="false"
39 39
 					                            select-only-leafs="true"
40
-					                            data-callback="selectOnly1Or2(item, selectedItems)" required>
40
+					                            data-callback="selectOnly1Or2(item, selectedItems)">
41 41
 					                        </multi-select-tree>
42 42
 											 <em><span style="color: #D56161;margin-top:6px;padding:0 1px;font-style:normal;font-size:11px;line-height:15px;" id="devicename-error"></span></em>
43 43
 											</label>
@@ -45,7 +45,7 @@
45 45
 									</div>
46 46
 									<div class="row">
47 47
 										<section class="col col-3">
48
-											<label class="label">设施状态</label>
48
+											<label class="label">设施状态: <span style="color: red;">*</span></label>
49 49
 											<label class="input">
50 50
 												<select required name="unite" ng-model="device.unit" ng-disabled="isNotEdit" ng-readonly="isNotEdit">
51 51
                                                     <option value="">--请选择--</option>
@@ -55,9 +55,9 @@
55 55
 											</label>
56 56
 										</section>
57 57
                                         <section class="col col-3">
58
-											<label class="label">报废日期:</label>
58
+											<label class="label">报废日期:<span style="color: red;">*</span></label>
59 59
 											<label class="input">
60
-												<input type="text" ng-model="device.inputTime" name="inputTime" data-smart-datepicker ng-disabled="isNotEdit"
60
+												<input required type="text" ng-model="device.inputTime" name="inputTime" data-smart-datepicker ng-disabled="isNotEdit"
61 61
 													   placeholder="报废日期">
62 62
 											</label>
63 63
 										</section>

+ 10 - 10
src/main/resources/static/app/business/facility/views/add-facility.html

@@ -20,7 +20,7 @@
20 20
                                             </label>
21 21
                                         </section>
22 22
                                         <section class="col col-3">
23
-											<label class="label"  id="devicename-label">设施分类:<span style="color: red;">*</span></label>
23
+											<label class="label"  id="devicename-label">设施分类:</label>
24 24
 											  <label class="select" id="deviceName-label">
25 25
 											 <multi-select-tree 
26 26
 					                            disabled-tree="isNotEdit"
@@ -29,7 +29,7 @@
29 29
 					                            data-default-label="请选择" name="ssfl" 
30 30
 					                            multi-select="false"
31 31
 					                            select-only-leafs="true"
32
-					                            data-callback="selectOnly1Or2(item, selectedItems)" required>
32
+					                            data-callback="selectOnly1Or2(item, selectedItems)">
33 33
 					                        </multi-select-tree>
34 34
 											 <em><span style="color: #D56161;margin-top:6px;padding:0 1px;font-style:normal;font-size:11px;line-height:15px;" id="devicename-error"></span></em>
35 35
 											</label>
@@ -49,31 +49,31 @@
49 49
 									</div>
50 50
 									<div class="row">
51 51
                                         <section class="col col-3">
52
-											<label class="label">竣工年份:</label>
52
+											<label class="label">竣工年份:<span style="color: red;">*</span></label>
53 53
 											<label class="input">
54 54
                                                 <input type="text" name="jgnf" id="facility_jgnf" ng-disabled="isNotEdit" ng-model="facilityInfo.jgnf"
55
-							                		class="form-control" onClick="WdatePicker({lang:'zh-cn', dateFmt: 'yyyy'})" ng-readonly="true">
55
+							                		class="form-control" onClick="WdatePicker({lang:'zh-cn', dateFmt: 'yyyy'})" ng-readonly="true" required>
56 56
 											</label>
57 57
 										</section>
58 58
 										<section class="col col-3">
59
-											<label class="label">安装时间:</label>
59
+											<label class="label">安装时间:<span style="color: red;">*</span></label>
60 60
 											<label class="input">
61 61
 												<input type="text" id="facility_azsj" name="azsj" ng-disabled="isNotEdit"  ng-model="facilityInfo.azsj"
62
-													   placeholder="安装时间" onClick="WdatePicker({lang:'zh-cn', dateFmt: 'yyyy-MM-dd HH:mm:ss'})">
62
+													   placeholder="安装时间" onClick="WdatePicker({lang:'zh-cn', dateFmt: 'yyyy-MM-dd HH:mm:ss'})" required>
63 63
 											</label>
64 64
 										</section>
65 65
 										<section class="col col-3">
66
-											<label class="label">调试时间: </label>
66
+											<label class="label">调试时间: <span style="color: red;">*</span></label>
67 67
 											<label class="input">
68 68
 												<input type="text" id="facility_tssj" name="tssj" ng-disabled="isNotEdit" ng-model="facilityInfo.tssj"
69
-													   placeholder="调试时间" onClick="WdatePicker({lang:'zh-cn', dateFmt: 'yyyy-MM-dd HH:mm:ss'})">
69
+													   placeholder="调试时间" onClick="WdatePicker({lang:'zh-cn', dateFmt: 'yyyy-MM-dd HH:mm:ss'})" required>
70 70
 											</label>
71 71
 										</section>
72 72
                                         <section class="col col-3">
73
-											<label class="label">验收时间:</label>
73
+											<label class="label">验收时间:<span style="color: red;">*</span></label>
74 74
 											<label class="input">
75 75
 												<input type="text" id="facility_yssj" name="yssj" ng-disabled="isNotEdit" ng-model="facilityInfo.yssj"
76
-													   placeholder="验收时间" onClick="WdatePicker({lang:'zh-cn', dateFmt: 'yyyy-MM-dd HH:mm:ss'})">
76
+													   placeholder="验收时间" onClick="WdatePicker({lang:'zh-cn', dateFmt: 'yyyy-MM-dd HH:mm:ss'})" required>
77 77
 											</label>
78 78
 										</section>
79 79
                                     </div>

+ 1 - 1
src/main/resources/static/app/storage/controller/keepAccount/houseKeepAccountCtrl.js

@@ -301,7 +301,7 @@ angular.module('app.storage').controller("houseKeepAccountCtrl",
301 301
 	$scope.loadWare();
302 302
 
303 303
 
304
-	// $scope.butType = $stateParams.butType;
304
+	$scope.butType = $stateParams.butType;
305 305
 	$scope.edit = function() {
306 306
 		$scope.fcbgz = angular.fromJson($stateParams.account);
307 307
 		var rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM-dd");

+ 1 - 1
src/main/resources/static/app/storage/controller/keepAccount/keepTotalAccountCtrl.js

@@ -125,7 +125,7 @@ angular.module('app.storage').controller("keepTotalAccountCtrl",
125 125
 })
126 126
 .controller("keepTotalAccountEditCtrl", 
127 127
 		function($scope, $rootScope, $state, $stateParams, $filter, keepAccountService, StorehouseService, warehouseService, APP_CONFIG) {
128
-
128
+	$scope.butType = $stateParams.butType;
129 129
 	// 获取列表日数据
130 130
 	$scope.edit = function() {
131 131
 		$scope.fcbgz = angular.fromJson($stateParams.account);

+ 0 - 209
src/main/resources/static/app/storage/controller/keepAccount/keepVoucherCtrl.js

@@ -1,209 +0,0 @@
1
-"use strict";
2
-
3
-//保管总账
4
-angular.module('app.storage').controller("keepVoucherCtrl", 
5
-		function($scope, $rootScope, $state, $stateParams, $filter, enumService, keepAccountService, StorehouseService, warehouseService, APP_CONFIG) {
6
-
7
-	// 获取列表数据
8
-	$scope.pageInfo = {pageNum : 1, pageSize : 10};
9
-	$scope.search = {lspz:"", lsxz:"", startDate:"", endDate:""};
10
-	$scope.loadData = function() {
11
-		if($scope.search.lsxz != undefined && $scope.search.lsxz != ""){
12
-			$scope.search.lsxz = $scope.search.lsxz[0].id;
13
-   	 	}
14
-		keepAccountService.getSumAccountPageInfo($scope.pageInfo.pageNum, $scope.pageInfo.pageSize, $scope.search).then(function(data){
15
-	        $scope.pageInfo = data;
16
-	        $scope.deptName = $rootScope.depotInfo.orgName;
17
-	        //获取记账人和审核人
18
-	        //$scope.getAccountRecord($scope.pageInfo.list);
19
-	    },function(data){
20
-	        console.log(data);
21
-	    });
22
-		//加载打印区域的数据
23
-		keepAccountService.getSumAccountPageInfo(null, null, $scope.search).then(function(data){
24
-	        $scope.pageInfos = data;
25
-	        $scope.printList = data.list;
26
-	        //获取记账人和审核人
27
-	        //$scope.getAccountRecord($scope.printList);
28
-	    },function(data){
29
-	        console.log(data);
30
-	    });
31
-		// 树形下拉框(粮食性质)
32
-        enumService.getTreeListByTypeId($scope.search.lsxz, 1032).then(function(data) {
33
-        	var data_new = $scope.data_add(data);
34
-            $scope.grainAttributeTreeData = data_new;
35
-        },function(data) {
36
-            console.log(data);
37
-        });
38
-	}
39
-	$scope.loadData();
40
-
41
-	$scope.data_add = function(data) {
42
-    	//var data_new = $scope.data_add(data);
43
-		var e = [];
44
-    	if (data.length != 0) {
45
-    		//要插入的json对象串
46
-    		var a = {"id":null,"name":"请选择","children":[]};
47
-    		//将返回的json对象和要插入的json对象串转换为字符串格式
48
-    		var f = angular.toJson(a);
49
-    		var b = angular.toJson(data);
50
-    		//把要插入的json对象串插入返回数据的最前面
51
-    		var c = b.substring(0,1);
52
-    		var d = b.substring(1,b.length);
53
-    		e = c + f + "," + d;
54
-    	}
55
-    	//最后在转换为json对象返回去
56
-    	return angular.fromJson(e);
57
-	}
58
-
59
-	$scope.getAccountRecord = function (pageInfo) {
60
-		if (pageInfo != null || pageInfo.length != 0) {
61
-			var obj;
62
-			var rq;
63
-			for (var i = 0; i < pageInfo.length; i++) {
64
-				obj = pageInfo[0];
65
-				rq = $filter('date')(obj.rq, "yyyy-MM");
66
-				keepAccountService.accountingRecord(obj.ch, obj.hwh, obj.lspz, obj.hwxz, rq, obj.wjh, obj.remark, 1).then(function(data){
67
-					$scope.account = data.obj;
68
-					obj.accountingPerson = $scope.account.accountingPerson;//记账人
69
-					obj.auditor = $scope.account.auditor;//审核人
70
-				},function(data){
71
-					console.log(data);
72
-				});
73
-			}
74
-		}
75
-	}
76
-
77
-	// 翻页
78
-	$scope.goPage = function(pageNum) {
79
-		$scope.pageInfo.pageNum = pageNum;
80
-		$scope.loadData();
81
-	}
82
-
83
-    //页面跳转
84
-    $scope.edit = function(account, butType) {
85
-		var obj_str = angular.toJson(account);
86
-		$scope.fcbgz = angular.fromJson(obj_str);
87
-		var rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM");
88
-		if (butType != 3) { //记账、审核、查看
89
-			keepAccountService.accountingRecord(null, null, $scope.fcbgz.lspz, $scope.fcbgz.hwxz, rq, $scope.fcbgz.wjh, $scope.fcbgz.remark, 1).then(function(data){
90
-				$scope.account = data.obj;
91
-				if (butType == 0) { //记账
92
-					if (data.obj.id != null || data.obj.id != undefined) {
93
-						alert("当前记录已记账!");
94
-						return;
95
-					}
96
-				} else if (butType == 1) { //审核
97
-					if (data.obj.id == null || data.obj.id == undefined) {
98
-						alert("当前记录还尚未记账,请先记账!");
99
-						return;
100
-					} else {
101
-						if (data.obj.auditor != null || data.obj.auditor != undefined) {
102
-							alert("当前记录已审核!");
103
-							return;
104
-						}
105
-					}
106
-				} else if (butType == 2) { //查看
107
-					if (data.obj.id == null || data.obj.id == undefined) {
108
-						alert("当前记录还尚未记账,请先记账!");
109
-						return;
110
-					}
111
-				}
112
-				$state.go('app.storage.account.keepTotalAccount.keepTotalAccountEdit',{account:angular.toJson(account), butType:butType});
113
-			},function(data){
114
-		        console.log(data);
115
-		    });
116
-		} else { //分仓账
117
-			$state.go('app.storage.account.houseKeepAccount',{account:angular.toJson(account), type:butType});
118
-		}
119
-	}
120
-	//打印
121
-	$scope.print = function() {
122
-		$("#print").printArea();
123
-	}
124
-	
125
-})
126
-.controller("keepTotalAccountEditCtrl", 
127
-		function($scope, $rootScope, $state, $stateParams, $filter, keepAccountService, StorehouseService, warehouseService, APP_CONFIG) {
128
-
129
-	// 获取列表日数据
130
-	$scope.edit = function() {
131
-		$scope.fcbgz = angular.fromJson($stateParams.account);
132
-		$scope.fcbgz.lcmc = $rootScope.depotInfo.orgName;
133
-		var rq = $filter('date')($scope.fcbgz.rq, "yyyy-MM");
134
-		keepAccountService.accountingRecord($scope.fcbgz.ch, $scope.fcbgz.hwh, $scope.fcbgz.lspz, $scope.fcbgz.hwxz, rq, $scope.fcbgz.wjh, $scope.fcbgz.remark, 1).then(function(data){
135
-			$scope.account = data.obj;
136
-
137
-			if ($stateParams.butType == 0) { //记账
138
-				//初始化数据记账表对象数据
139
-				$scope.account.lspz = $scope.fcbgz.lspz;
140
-				$scope.account.hwxz = $scope.fcbgz.hwxz;
141
-				$scope.account.rq = rq;
142
-				$scope.account.srsl = $scope.fcbgz.srsl;
143
-				$scope.account.zcsl = $scope.fcbgz.zcsl;
144
-				$scope.account.kcsl = $scope.fcbgz.kcsl;
145
-				$scope.account.accountingPerson = $rootScope.userInfo.realName; //记账人
146
-				$scope.account.accountingDate = $filter('date')(new Date(), "yyyy-MM-dd"); //记账时间
147
-				$scope.account.remark = $scope.fcbgz.remark; //摘要
148
-				$scope.account.wjh = $scope.fcbgz.wjh; //文件号
149
-				//设置状态为记账
150
-				//$scope.accountType = 0;
151
-
152
-				//影藏审核信息
153
-				$scope.auditor_th = true;
154
-			} else if ($stateParams.butType == 1) { //审核
155
-				//设置记账时间格式化和不可编辑
156
-				$scope.account.accountingDate = $filter('date')($scope.account.accountingDate, "yyyy-MM-dd");
157
-				$scope.accounting_isNotEdit = true;
158
-				//显示审核信息
159
-				$scope.auditor_th = false;
160
-				//设置审核人为当前用户,审核时间为当前时间
161
-				$scope.account.auditor = $rootScope.userInfo.realName;
162
-				$scope.account.auditorDate = $filter('date')(new Date(), "yyyy-MM-dd");
163
-			} else if ($stateParams.butType == 2) { //查看
164
-				//设置记账时间格式化和不可编辑
165
-				$scope.account.accountingDate = $filter('date')($scope.account.accountingDate, "yyyy-MM-dd");
166
-				$scope.accounting_isNotEdit = true;
167
-				//显示审核信息
168
-				$scope.auditor_th = false;
169
-				//审核信息设置不可编辑
170
-				$scope.account.auditorDate = $filter('date')($scope.account.auditorDate, "yyyy-MM-dd");
171
-				$scope.auditor_isNotEdit = true;
172
-				//提交按钮影藏
173
-				$scope.isNotEdit = true;
174
-			}
175
-			//初始分仓保管账表对象数据
176
-			$scope.fcbgz.hwxz = $rootScope.dicData[$scope.fcbgz.hwxz];
177
-			$scope.fcbgz.lspz = $rootScope.dicData[$scope.fcbgz.lspz];
178
-			$scope.fcbgz.dj = $rootScope.dicData[$scope.fcbgz.dj];
179
-			$scope.fcbgz.rq = rq;
180
-		},function(data){
181
-	        console.log(data);
182
-	    });
183
-
184
-	}
185
-	$scope.edit();
186
-	
187
-	//提交
188
-	$scope.submit = function() {
189
-		keepAccountService.submit($scope.account, 1, $rootScope.orgInfo.orgId).then(function(data){
190
-			if (data.status = 'success') {
191
-				alert(data.msg);
192
-			} else {
193
-				alert("保存失败!");
194
-			}
195
-			$scope.retList();
196
-		},function(data){
197
-			alert("保存失败!");
198
-	    });
199
-	}
200
-	
201
-	//返回
202
-    $scope.retList = function () {
203
-		if ($rootScope.previousState_name != '') {
204
-        	$rootScope.back();
205
-        } else {
206
-        	$state.go('app.storage.account.keepTotalAccount');
207
-        }
208
-    }
209
-});