2 Комити c6a58c5d51 ... 4c0b0e5759

Аутор SHA1 Порука Датум
  maopixin 4c0b0e5759 Merge branch 'master' of http://101.36.160.140:21044/depot-tianjin/depot-web-tianjin пре 2 година
  maopixin 4ef98b49e4 fix: 湿度预警 пре 2 година

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

@@ -1,8 +1,10 @@
1 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 5
 	$scope.form = {}
6
+	// 合同列表
7
+	$scope.passList = []
6 8
 
7 9
 	// 返回
8 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 48
 	var validator = $("#violation-form").validate();
26 49
 
27 50
 	$scope.save = function() {

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

@@ -57,6 +57,7 @@
57 57
 													id="lhjzrq"
58 58
                                                     onClick="WdatePicker({lang:'zh-cn'})"
59 59
 													ng-disabled="disabled"
60
+													placeholder="--请选择--"
60 61
 												/>
61 62
                                             </label>
62 63
                                         </section>
@@ -95,7 +96,7 @@
95 96
 													id="lhckckjzrq"
96 97
                                                     onClick="WdatePicker({lang:'zh-cn'})"
97 98
 													ng-disabled="disabled"
98
-													
99
+													placeholder="--请选择--"
99 100
 												/>
100 101
                                             </label>
101 102
                                         </section>
@@ -119,8 +120,16 @@
119 120
                                         </section>
120 121
 										<section class="col col-3">
121 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 133
                                             </label>
125 134
                                         </section>
126 135
 										<section class="col col-3">
@@ -146,14 +155,14 @@
146 155
 													id="lhckskrq"
147 156
                                                     onClick="WdatePicker({lang:'zh-cn'})"
148 157
 													ng-disabled="disabled"
149
-													
158
+													placeholder="--请选择--"
150 159
 												/>
151 160
                                             </label>
152 161
                                         </section>
153 162
 										<section class="col col-3">
154 163
                                             <label class="label">收款金额:</label> 
155 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 166
                                             </label>
158 167
                                         </section>
159 168
 										<section class="col col-3">
@@ -167,7 +176,7 @@
167 176
 													id="lhcksjckksrq"
168 177
                                                     onClick="WdatePicker({lang:'zh-cn'})"
169 178
 													ng-disabled="disabled"
170
-													
179
+													placeholder="--请选择--"
171 180
 												/>
172 181
                                             </label>
173 182
                                         </section>
@@ -182,6 +191,7 @@
182 191
 													id="lhcksjckwcsj"
183 192
                                                     onClick="WdatePicker({lang:'zh-cn', dateFmt:'yyyy-MM-dd HH:mm:ss'})"
184 193
 													ng-disabled="disabled"
194
+													placeholder="--请选择--"
185 195
 												/>
186 196
                                             </label>
187 197
                                         </section>
@@ -240,7 +250,7 @@
240 250
 													id="lhrkjzrq"
241 251
                                                     onClick="WdatePicker({lang:'zh-cn'})"
242 252
 													ng-disabled="disabled"
243
-													
253
+													placeholder="--请选择--"
244 254
 												/>
245 255
 											</label>
246 256
 										</section>
@@ -291,6 +301,7 @@
291 301
 													id="lhrkfksj"
292 302
                                                     onClick="WdatePicker({lang:'zh-cn', dateFmt:'yyyy-MM-dd HH:mm:ss'})"
293 303
 													ng-disabled="disabled"
304
+													placeholder="--请选择--"
294 305
 												/>
295 306
 											</label>
296 307
 										</section>
@@ -311,7 +322,7 @@
311 322
 													id="lhrksjrkksrq"
312 323
                                                     onClick="WdatePicker({lang:'zh-cn'})"
313 324
 													ng-disabled="disabled"
314
-													
325
+													placeholder="--请选择--"
315 326
 												/>
316 327
 											</label>
317 328
 										</section>
@@ -326,6 +337,7 @@
326 337
 													id="lhrksjrkjssj"
327 338
                                                     onClick="WdatePicker({lang:'zh-cn', dateFmt:'yyyy-MM-dd HH:mm:ss'})"
328 339
 													ng-disabled="disabled"
340
+													placeholder="--请选择--"
329 341
 												/>
330 342
 											</label>
331 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 255
 												</th>
256 256
 												<th>
257 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 259
 													</label>
260 260
 												</th>
261 261
 												<th>
262 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 264
 													</label>
265 265
 												</th>
266 266
 												<th>

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

@@ -255,12 +255,12 @@
255 255
 												</th>
256 256
 												<th>
257 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 259
 													</label>
260 260
 												</th>
261 261
 												<th>
262 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 264
 													</label>
265 265
 												</th>
266 266
 												<th>

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

@@ -271,12 +271,12 @@
271 271
 												</th>
272 272
 												<th>
273 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 275
 													</label>
276 276
 												</th>
277 277
 												<th>
278 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 280
 													</label>
281 281
 												</th>
282 282
 												<th>

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

@@ -1,12 +1,18 @@
1 1
 "use strict";
2 2
 
3 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 12
 		$scope.pageInfo = {pageNum: 1, pageSize: 10};
7 13
 		// 加载列表
8 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 16
 				$scope.pageInfo = data.data;
11 17
 			}, function (data) {
12 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 22
 											<span class="fa fa-print"></span>&nbsp;打&nbsp;印
23 23
 										</a>&emsp;
24 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 27
 												<option value="">请选择</option>
28 28
 											</select>&emsp;
29 29
 										</label>
30 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 32
 												onClick="WdatePicker({lang:'zh-cn',maxDate:'#F{$dp.$D(\'endDate\')}'})">
33 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 36
 												onClick="WdatePicker({lang:'zh-cn',minDate:'#F{$dp.$D(\'startDate\')}'})">
37 37
 										</label>
38 38
 										<a class="btn btn-default btn-sm" ng-click="loadData()"> <i
@@ -70,14 +70,22 @@
70 70
 											<tr ng-repeat="warning in pageInfo.list">
71 71
 												<td style="text-align:center;">{{ $index + 1 }}</td>
72 72
 												<td style="text-align:center;">
73
-													{{ storeHouseCodeObj[warning.vCfCode].storehouseName }}
73
+													{{ warning.storehouseName }}
74 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 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 89
 												</td>
82 90
 											</tr>
83 91
 										</tbody>