2 Commits c6a58c5d51 ... 4c0b0e5759

Author SHA1 Message Date
  maopixin 4c0b0e5759 Merge branch 'master' of http://101.36.160.140:21044/depot-tianjin/depot-web-tianjin 2 years ago
  maopixin 4ef98b49e4 fix: 湿度预警 2 years ago

+ 24 - 1
src/main/resources/static/app/business/purchase/controller/purchaseAddCtrl.js

@@ -1,8 +1,10 @@
1
 "use strict";
1
 "use strict";
2
 
2
 
3
-angular.module('app.supervise').controller("purchaseAddCtrl", function ($scope, $rootScope, $state, purchaseService, APP_CONFIG, alertService, $stateParams, $filter ) {
3
+angular.module('app.supervise').controller("purchaseAddCtrl", function ($scope, $rootScope, $state, purchaseService, grainReservesContractService, APP_CONFIG, alertService, $stateParams, $filter ) {
4
 	// 表单数据
4
 	// 表单数据
5
 	$scope.form = {}
5
 	$scope.form = {}
6
+	// 合同列表
7
+	$scope.passList = []
6
 
8
 
7
 	// 返回
9
 	// 返回
8
     $scope.retList = function () {
10
     $scope.retList = function () {
@@ -22,6 +24,27 @@ angular.module('app.supervise').controller("purchaseAddCtrl", function ($scope,
22
 		
24
 		
23
 	}
25
 	}
24
 
26
 
27
+	// 获取合同列表
28
+	grainReservesContractService.getPassPageInfo(1, 100).then(function(data) {
29
+		$scope.passList = data.list
30
+	}, function(data) {
31
+		console.log(data);
32
+	})
33
+
34
+	// 选择合同时,带出付款金额
35
+	$scope.onPassSelect = function() {
36
+		if($scope.form.lhcklcxshtbh) {
37
+			for (var i = 0; i < $scope.passList.length; i++) {
38
+				var e = $scope.passList[i];
39
+				if($scope.form.lhcklcxshtbh == e.contractNumber) {
40
+					$scope.form.lhckskje = e.moneyQuantity
41
+				}
42
+			}
43
+		} else {
44
+			$scope.form.lhckskje = ''
45
+		}
46
+	}
47
+
25
 	var validator = $("#violation-form").validate();
48
 	var validator = $("#violation-form").validate();
26
 
49
 
27
 	$scope.save = function() {
50
 	$scope.save = function() {

+ 20 - 8
src/main/resources/static/app/business/purchase/views/add.html

@@ -57,6 +57,7 @@
57
 													id="lhjzrq"
57
 													id="lhjzrq"
58
                                                     onClick="WdatePicker({lang:'zh-cn'})"
58
                                                     onClick="WdatePicker({lang:'zh-cn'})"
59
 													ng-disabled="disabled"
59
 													ng-disabled="disabled"
60
+													placeholder="--请选择--"
60
 												/>
61
 												/>
61
                                             </label>
62
                                             </label>
62
                                         </section>
63
                                         </section>
@@ -95,7 +96,7 @@
95
 													id="lhckckjzrq"
96
 													id="lhckckjzrq"
96
                                                     onClick="WdatePicker({lang:'zh-cn'})"
97
                                                     onClick="WdatePicker({lang:'zh-cn'})"
97
 													ng-disabled="disabled"
98
 													ng-disabled="disabled"
98
-													
99
+													placeholder="--请选择--"
99
 												/>
100
 												/>
100
                                             </label>
101
                                             </label>
101
                                         </section>
102
                                         </section>
@@ -119,8 +120,16 @@
119
                                         </section>
120
                                         </section>
120
 										<section class="col col-3">
121
 										<section class="col col-3">
121
                                             <label class="label">轮出销售合同编号:</label> 
122
                                             <label class="label">轮出销售合同编号:</label> 
122
-                                            <label class="input"> 
123
-                                                <input class="form-control" type="text" ng-model="form.lhcklcxshtbh" name="lhcklcxshtbh" ng-disabled="disabled" >
123
+											<label class="select"> 
124
+												<select 
125
+													name="lhcklcxshtbh"
126
+													ng-model="form.lhcklcxshtbh"
127
+													ng-disabled="disabled"
128
+													ng-options="x.contractNumber as x.contractNumber for x  in passList"
129
+													ng-change="onPassSelect()"
130
+												>
131
+													<option value="">--请选择--</option>
132
+												</select>
124
                                             </label>
133
                                             </label>
125
                                         </section>
134
                                         </section>
126
 										<section class="col col-3">
135
 										<section class="col col-3">
@@ -146,14 +155,14 @@
146
 													id="lhckskrq"
155
 													id="lhckskrq"
147
                                                     onClick="WdatePicker({lang:'zh-cn'})"
156
                                                     onClick="WdatePicker({lang:'zh-cn'})"
148
 													ng-disabled="disabled"
157
 													ng-disabled="disabled"
149
-													
158
+													placeholder="--请选择--"
150
 												/>
159
 												/>
151
                                             </label>
160
                                             </label>
152
                                         </section>
161
                                         </section>
153
 										<section class="col col-3">
162
 										<section class="col col-3">
154
                                             <label class="label">收款金额:</label> 
163
                                             <label class="label">收款金额:</label> 
155
                                             <label class="input"> 
164
                                             <label class="input"> 
156
-                                                <input class="form-control" type="text" ng-model="form.lhckskje" name="lhckskje" ng-disabled="disabled" >
165
+                                                <input class="form-control" type="text" ng-model="form.lhckskje" name="lhckskje" ng-disabled="true" placeholder="请选择轮出销售合同编号">
157
                                             </label>
166
                                             </label>
158
                                         </section>
167
                                         </section>
159
 										<section class="col col-3">
168
 										<section class="col col-3">
@@ -167,7 +176,7 @@
167
 													id="lhcksjckksrq"
176
 													id="lhcksjckksrq"
168
                                                     onClick="WdatePicker({lang:'zh-cn'})"
177
                                                     onClick="WdatePicker({lang:'zh-cn'})"
169
 													ng-disabled="disabled"
178
 													ng-disabled="disabled"
170
-													
179
+													placeholder="--请选择--"
171
 												/>
180
 												/>
172
                                             </label>
181
                                             </label>
173
                                         </section>
182
                                         </section>
@@ -182,6 +191,7 @@
182
 													id="lhcksjckwcsj"
191
 													id="lhcksjckwcsj"
183
                                                     onClick="WdatePicker({lang:'zh-cn', dateFmt:'yyyy-MM-dd HH:mm:ss'})"
192
                                                     onClick="WdatePicker({lang:'zh-cn', dateFmt:'yyyy-MM-dd HH:mm:ss'})"
184
 													ng-disabled="disabled"
193
 													ng-disabled="disabled"
194
+													placeholder="--请选择--"
185
 												/>
195
 												/>
186
                                             </label>
196
                                             </label>
187
                                         </section>
197
                                         </section>
@@ -240,7 +250,7 @@
240
 													id="lhrkjzrq"
250
 													id="lhrkjzrq"
241
                                                     onClick="WdatePicker({lang:'zh-cn'})"
251
                                                     onClick="WdatePicker({lang:'zh-cn'})"
242
 													ng-disabled="disabled"
252
 													ng-disabled="disabled"
243
-													
253
+													placeholder="--请选择--"
244
 												/>
254
 												/>
245
 											</label>
255
 											</label>
246
 										</section>
256
 										</section>
@@ -291,6 +301,7 @@
291
 													id="lhrkfksj"
301
 													id="lhrkfksj"
292
                                                     onClick="WdatePicker({lang:'zh-cn', dateFmt:'yyyy-MM-dd HH:mm:ss'})"
302
                                                     onClick="WdatePicker({lang:'zh-cn', dateFmt:'yyyy-MM-dd HH:mm:ss'})"
293
 													ng-disabled="disabled"
303
 													ng-disabled="disabled"
304
+													placeholder="--请选择--"
294
 												/>
305
 												/>
295
 											</label>
306
 											</label>
296
 										</section>
307
 										</section>
@@ -311,7 +322,7 @@
311
 													id="lhrksjrkksrq"
322
 													id="lhrksjrkksrq"
312
                                                     onClick="WdatePicker({lang:'zh-cn'})"
323
                                                     onClick="WdatePicker({lang:'zh-cn'})"
313
 													ng-disabled="disabled"
324
 													ng-disabled="disabled"
314
-													
325
+													placeholder="--请选择--"
315
 												/>
326
 												/>
316
 											</label>
327
 											</label>
317
 										</section>
328
 										</section>
@@ -326,6 +337,7 @@
326
 													id="lhrksjrkjssj"
337
 													id="lhrksjrkjssj"
327
                                                     onClick="WdatePicker({lang:'zh-cn', dateFmt:'yyyy-MM-dd HH:mm:ss'})"
338
                                                     onClick="WdatePicker({lang:'zh-cn', dateFmt:'yyyy-MM-dd HH:mm:ss'})"
328
 													ng-disabled="disabled"
339
 													ng-disabled="disabled"
340
+													placeholder="--请选择--"
329
 												/>
341
 												/>
330
 											</label>
342
 											</label>
331
 										</section>
343
 										</section>

+ 12 - 0
src/main/resources/static/app/storage/foodstuffAnalysis/controller/monthDetailCtrl.js

@@ -140,4 +140,16 @@ angular.module('app.storage').controller("monthDetailCtrl", function ($scope, $r
140
     		}
140
     		}
141
     	}
141
     	}
142
 	}
142
 	}
143
+}).directive('stringToNumber', function() {
144
+    return {
145
+        require: 'ngModel',
146
+        link: function(scope, element, attrs, ngModel) {
147
+            ngModel.$parsers.push(function(value) {
148
+                return '' + value;
149
+            });
150
+            ngModel.$formatters.push(function(value) {
151
+                return parseInt(value);
152
+            });
153
+        }
154
+    };
143
 })
155
 })

+ 12 - 0
src/main/resources/static/app/storage/foodstuffAnalysis/controller/quarterDetailCtrl.js

@@ -140,4 +140,16 @@ angular.module('app.storage').controller("quarterDetailCtrl", function ($scope,
140
     		}
140
     		}
141
     	}
141
     	}
142
 	}
142
 	}
143
+}).directive('stringToNumber', function() {
144
+    return {
145
+        require: 'ngModel',
146
+        link: function(scope, element, attrs, ngModel) {
147
+            ngModel.$parsers.push(function(value) {
148
+                return '' + value;
149
+            });
150
+            ngModel.$formatters.push(function(value) {
151
+                return parseInt(value);
152
+            });
153
+        }
154
+    };
143
 })
155
 })

+ 12 - 0
src/main/resources/static/app/storage/foodstuffAnalysis/controller/weekDetailCtrl.js

@@ -130,4 +130,16 @@ angular.module('app.storage').controller("weekDetailCtrl", function ($scope, $ro
130
     		}
130
     		}
131
     	}
131
     	}
132
 	}
132
 	}
133
+}).directive('stringToNumber', function() {
134
+    return {
135
+        require: 'ngModel',
136
+        link: function(scope, element, attrs, ngModel) {
137
+            ngModel.$parsers.push(function(value) {
138
+                return '' + value;
139
+            });
140
+            ngModel.$formatters.push(function(value) {
141
+                return parseInt(value);
142
+            });
143
+        }
144
+    };
133
 })
145
 })

+ 2 - 2
src/main/resources/static/app/storage/foodstuffAnalysis/views/monthDetail.html

@@ -255,12 +255,12 @@
255
 												</th>
255
 												</th>
256
 												<th>
256
 												<th>
257
 													<label class="input" style="margin-top: 9px;text-align: center;">
257
 													<label class="input" style="margin-top: 9px;text-align: center;">
258
-														<input type="number" ng-model="item.ycqklw" name="ycqklw" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
258
+														<input type="number" string-to-number ng-model="item.ycqklw" name="ycqklw" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
259
 													</label>
259
 													</label>
260
 												</th>
260
 												</th>
261
 												<th>
261
 												<th>
262
 													<label class="input" style="margin-top: 9px;text-align: center;">
262
 													<label class="input" style="margin-top: 9px;text-align: center;">
263
-														<input type="number" ng-model="item.ycqksf" name="ycqksf" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
263
+														<input type="number" string-to-number ng-model="item.ycqksf" name="ycqksf" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
264
 													</label>
264
 													</label>
265
 												</th>
265
 												</th>
266
 												<th>
266
 												<th>

+ 2 - 2
src/main/resources/static/app/storage/foodstuffAnalysis/views/quarterDetail.html

@@ -255,12 +255,12 @@
255
 												</th>
255
 												</th>
256
 												<th>
256
 												<th>
257
 													<label class="input" style="margin-top: 9px;text-align: center;">
257
 													<label class="input" style="margin-top: 9px;text-align: center;">
258
-														<input type="number" ng-model="item.ycqklw" name="ycqklw" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
258
+														<input type="number" string-to-number ng-model="item.ycqklw" name="ycqklw" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
259
 													</label>
259
 													</label>
260
 												</th>
260
 												</th>
261
 												<th>
261
 												<th>
262
 													<label class="input" style="margin-top: 9px;text-align: center;">
262
 													<label class="input" style="margin-top: 9px;text-align: center;">
263
-														<input type="number" ng-model="item.ycqksf" name="ycqksf" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
263
+														<input type="number" string-to-number ng-model="item.ycqksf" name="ycqksf" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
264
 													</label>
264
 													</label>
265
 												</th>
265
 												</th>
266
 												<th>
266
 												<th>

+ 2 - 2
src/main/resources/static/app/storage/foodstuffAnalysis/views/weekDetail.html

@@ -271,12 +271,12 @@
271
 												</th>
271
 												</th>
272
 												<th>
272
 												<th>
273
 													<label class="input" style="margin-top: 9px;text-align: center;">
273
 													<label class="input" style="margin-top: 9px;text-align: center;">
274
-														<input type="number" ng-model="item.ycqklw" name="ycqklw" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
274
+														<input type="number" string-to-number ng-model="item.ycqklw" name="ycqklw" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
275
 													</label>
275
 													</label>
276
 												</th>
276
 												</th>
277
 												<th>
277
 												<th>
278
 													<label class="input" style="margin-top: 9px;text-align: center;">
278
 													<label class="input" style="margin-top: 9px;text-align: center;">
279
-														<input type="number" ng-model="item.ycqksf" name="ycqksf" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
279
+														<input type="number" string-to-number ng-model="item.ycqksf" name="ycqksf" class="form-control ng-pristine ng-untouched ng-valid" oninput="if(value.length>5) value=value.slice(0,5)" ng-disabled="disabled" >
280
 													</label>
280
 													</label>
281
 												</th>
281
 												</th>
282
 												<th>
282
 												<th>

+ 8 - 2
src/main/resources/static/app/supervise/controller/humidityWarningThresholdCtrl.js

@@ -1,12 +1,18 @@
1
 "use strict";
1
 "use strict";
2
 
2
 
3
 angular.module('app.supervise')
3
 angular.module('app.supervise')
4
-	.controller("humidityWarningThresholdCtrl", function ($scope, $rootScope, $state, StorehouseService, enumService, warningThresholdService, APP_CONFIG, alertService) {
4
+	.controller("humidityWarningThresholdCtrl", function ($scope, $rootScope, $state, humidityAlarmService, APP_CONFIG, alertService) {
5
+		// 筛选条件
6
+		$scope.search = {
7
+			storehouseName: '',
8
+			startDate: '',
9
+			endDate: '',
10
+		}
5
 		// 默认分页
11
 		// 默认分页
6
 		$scope.pageInfo = {pageNum: 1, pageSize: 10};
12
 		$scope.pageInfo = {pageNum: 1, pageSize: 10};
7
 		// 加载列表
13
 		// 加载列表
8
 		$scope.loadData = function () {
14
 		$scope.loadData = function () {
9
-			warningThresholdService.getInsectPestDetectionPageInfo($scope.pageInfo).then(function (data) {
15
+			humidityAlarmService.getAlarmList($scope.pageInfo.pageNum, $scope.pageInfo.pageSize, $rootScope.orgInfo.orgId, $scope.search).then(function (data) {
10
 				$scope.pageInfo = data.data;
16
 				$scope.pageInfo = data.data;
11
 			}, function (data) {
17
 			}, function (data) {
12
 				// console.log(data);
18
 				// console.log(data);

+ 32 - 0
src/main/resources/static/app/supervise/service/humidityAlarmService.js

@@ -0,0 +1,32 @@
1
+"use strict";
2
+
3
+angular.module('app.supervise').service("humidityAlarmService", function($http, $q, APP_CONFIG, $rootScope) {
4
+    /**
5
+     * 查询湿度报警列表,支持分页
6
+     */
7
+    this.getAlarmList = function(pageNum, pageSize, orgId, search ) {
8
+		if(!search) {
9
+			search = {}
10
+		}
11
+        var d = $q.defer();
12
+        $http({
13
+            method : 'GET',
14
+            url : APP_CONFIG.depotStorageUrl + '/humidityAlarm/getAlarmList',
15
+            params : {
16
+                pageNum : pageNum,
17
+                pageSize : pageSize,
18
+				orgId: orgId,
19
+				storehouseName: search.storehouseName || '',
20
+				startDate: search.startDate || '',
21
+				endDate: search.endDate || '',
22
+            }
23
+        }).then(function successCallback(response) {
24
+            // 请求成功执行代码
25
+            d.resolve(response.data);
26
+        }, function errorCallback(response) {
27
+            // 请求失败执行代码
28
+            d.reject("error");
29
+        });
30
+        return d.promise;
31
+    };
32
+});

+ 19 - 11
src/main/resources/static/app/supervise/views/humidityWarningThreshold.html

@@ -22,17 +22,17 @@
22
 											<span class="fa fa-print"></span>&nbsp;打&nbsp;印
22
 											<span class="fa fa-print"></span>&nbsp;打&nbsp;印
23
 										</a>&emsp;
23
 										</a>&emsp;
24
 										<label> 仓房名称:&emsp;
24
 										<label> 仓房名称:&emsp;
25
-											<select ng-model="search.vCfCode" class="form-control input-sm"
26
-												ng-options="store.storehouseCode as store.storehouseName for store in storelist">
25
+											<select ng-model="search.storehouseName" class="form-control input-sm"
26
+												ng-options="store.storehouseName as store.storehouseName for store in storelist">
27
 												<option value="">请选择</option>
27
 												<option value="">请选择</option>
28
 											</select>&emsp;
28
 											</select>&emsp;
29
 										</label>
29
 										</label>
30
 										<label>检查日期:<input style="width: 100px;" class="form-control" type="text"
30
 										<label>检查日期:<input style="width: 100px;" class="form-control" type="text"
31
-												ng-model="search.searchStartDate" name="searchStartDate" id="startDate"
31
+												ng-model="search.startDate" name="startDate" id="startDate"
32
 												onClick="WdatePicker({lang:'zh-cn',maxDate:'#F{$dp.$D(\'endDate\')}'})">
32
 												onClick="WdatePicker({lang:'zh-cn',maxDate:'#F{$dp.$D(\'endDate\')}'})">
33
 											--&nbsp;<input style="width: 100px;" class="form-control" type="text"
33
 											--&nbsp;<input style="width: 100px;" class="form-control" type="text"
34
-												ng-disabled="isArchive" ng-model="search.searchEndDate"
35
-												name="searchEndDate" id="endDate"
34
+												ng-disabled="isArchive" ng-model="search.endDate"
35
+												name="endDate" id="endDate"
36
 												onClick="WdatePicker({lang:'zh-cn',minDate:'#F{$dp.$D(\'startDate\')}'})">
36
 												onClick="WdatePicker({lang:'zh-cn',minDate:'#F{$dp.$D(\'startDate\')}'})">
37
 										</label>
37
 										</label>
38
 										<a class="btn btn-default btn-sm" ng-click="loadData()"> <i
38
 										<a class="btn btn-default btn-sm" ng-click="loadData()"> <i
@@ -70,14 +70,22 @@
70
 											<tr ng-repeat="warning in pageInfo.list">
70
 											<tr ng-repeat="warning in pageInfo.list">
71
 												<td style="text-align:center;">{{ $index + 1 }}</td>
71
 												<td style="text-align:center;">{{ $index + 1 }}</td>
72
 												<td style="text-align:center;">
72
 												<td style="text-align:center;">
73
-													{{ storeHouseCodeObj[warning.vCfCode].storehouseName }}
73
+													{{ warning.storehouseName }}
74
 												</td>
74
 												</td>
75
-												<td style="text-align:center;">{{ dicData[warning.wModule]}}</td>
76
-												<td style="text-align:center;">{{ dicData[warning.wName]}}</td>
77
-												<td style="text-align:center;">{{ warning.wThreshold }}</td>
78
-												<td style="text-align:center;">{{ warning.wRemark }}</td>
79
 												<td style="text-align:center;">
75
 												<td style="text-align:center;">
80
-													{{ warning.wTime | date:'yyyy-MM-dd HH:mm:ss' }}
76
+													{{ warning.moduleName }}
77
+												</td>
78
+												<td style="text-align:center;">
79
+													{{ warning.alarmName }}
80
+												</td>
81
+												<td style="text-align:center;">
82
+													{{ warning.warningValue }}
83
+												</td>
84
+												<td style="text-align:center;">
85
+													{{ warning.alarmContent }}
86
+												</td>
87
+												<td style="text-align:center;">
88
+													{{ warning.alarmDate | date:'yyyy-MM-dd HH:mm:ss' }}
81
 												</td>
89
 												</td>
82
 											</tr>
90
 											</tr>
83
 										</tbody>
91
 										</tbody>