Przeglądaj źródła

feat: 库存超限报警

maopixin 2 lat temu
rodzic
commit
29dbaf7866

+ 39 - 12
src/main/resources/static/app/layout/partials/navigation.tpl.html

@@ -304,7 +304,16 @@
304 304
                             </li>
305 305
                         </ul>
306 306
                     </li>
307
-
307
+					<li data-menu-collapse>
308
+                        <a has-func="" href="#">
309
+                            <i class="fa fa-fw fa-folder-open"></i>统计管理
310
+                        </a>
311
+                        <ul>
312
+                            <li has-func="">
313
+                                <a data-ui-sref="app.business.gxhttz">购销合同台账</a>
314
+                            </li>
315
+                        </ul>
316
+                    </li>
308 317
                     <li data-menu-collapse>
309 318
                         <a has-func="36" href="#">
310 319
                             <i class="fa fa-fw fa-folder-open"></i>业务进度查询
@@ -430,23 +439,41 @@
430 439
                             <li has-func="301">
431 440
                                 <a data-ui-sref="app.supervise.situation.temperature">温度报警</a>
432 441
                             </li>
442
+							<li>
443
+								<a data-ui-sref="app.supervise.situation.humidity">湿度报警</a>
444
+							</li>
445
+							<li>
446
+								<a data-ui-sref="app.supervise.situation.stock">库存超限报警</a>
447
+							</li>
433 448
                             <li has-func="302">
434 449
                                 <a data-ui-sref="app.numbermanage.numbermanage.emptyPoliceList">库存空仓报警</a>
435 450
                             </li>
436 451
                             <li has-func="" data-ui-sref-active="active">
437 452
                                 <a data-ui-sref="app.intelligent.grainDetection.AbnormalEquipment">设备异常报警信息</a>
438 453
                             </li>
439
-                            <li has-func="296" data-menu-collapse>
440
-                                <a href="#">
441
-                                    <i class="fa fa-lg fa-fw fa-folder-open"></i>轮换预警管理
442
-                                </a>
443
-                                <ul>
444
-                                    <li has-func="297" data-ui-sref-active="active"><a
445
-                                            data-ui-sref="app.business.plan-warning-time">预警时间</a></li>
446
-                                    <li has-func="298" data-ui-sref-active="active"><a
447
-                                            data-ui-sref="app.business.plan-warning-list">预警列表</a></li>
448
-                                </ul>
449
-                            </li>
454
+							<li data-menu-collapse>
455
+								<a href="#"><i class="fa fa-lg fa-fw fa-folder-open"></i>轮换预警管理</a>
456
+								<ul>
457
+									<li data-ui-sref-active="active">
458
+										<a data-ui-sref="app.business.plan-warning-time">预警时间</a>
459
+									</li>
460
+									<li data-ui-sref-active="active">
461
+										<a data-ui-sref="app.business.plan-warning-set">轮换预警设置</a>
462
+									</li>
463
+									<li data-ui-sref-active="active">
464
+										<a data-ui-sref="app.business.plan-warning-list">预警列表</a>
465
+									</li>
466
+								</ul>
467
+							</li>
468
+							<li>
469
+								<a data-ui-sref="app.supervise.situation.store">储存超限报警</a>
470
+							</li>
471
+							<li>
472
+								<a data-ui-sref="app.supervise.situation.internalControl">内控预警列表</a>
473
+							</li>
474
+							<li>
475
+								<a data-ui-sref="app.supervise.situation.violation">违规预警</a>
476
+							</li>
450 477
                         </ul>
451 478
                     </li>
452 479
 

+ 16 - 0
src/main/resources/static/app/supervise/controller/stockWarningThresholdCtrl.js

@@ -0,0 +1,16 @@
1
+"use strict";
2
+
3
+angular.module('app.supervise')
4
+	.controller("stockWarningThresholdCtrl", function ($scope, $rootScope, $state, overRunAlarmService, APP_CONFIG, alertService) {
5
+		// 默认分页
6
+		$scope.pageInfo = {pageNum: 1, pageSize: 10};
7
+		// 加载列表
8
+		$scope.loadData = function () {
9
+			overRunAlarmService.getKcPageInfo($scope.pageInfo.pageNum, $scope.pageInfo.pageSize).then(function (data) {
10
+				$scope.pageInfo = data.data;
11
+			}, function (data) {
12
+				// console.log(data);
13
+			});
14
+		};
15
+		$scope.loadData();
16
+	})

+ 27 - 0
src/main/resources/static/app/supervise/service/overRunAlarmService.js

@@ -0,0 +1,27 @@
1
+"use strict";
2
+
3
+angular.module('app.supervise').service("overRunAlarmService", function($http, $q, APP_CONFIG, $rootScope) {
4
+	console.log(APP_CONFIG, 9889);
5
+    /**
6
+     * 查询库存超限报警列表
7
+     */
8
+    this.getKcPageInfo = function(pageNum, pageSize) {
9
+        var d = $q.defer();
10
+        $http({
11
+            method : 'GET',
12
+            url : APP_CONFIG.sharedUrl + '/overRunAlarm/getOverRunAlarmList',
13
+            params : {
14
+                pageNum : pageNum,
15
+                pageSize : pageSize,
16
+				orgId: 68,
17
+            }
18
+        }).then(function successCallback(response) {
19
+            // 请求成功执行代码
20
+            d.resolve(response.data);
21
+        }, function errorCallback(response) {
22
+            // 请求失败执行代码
23
+            d.reject("error");
24
+        });
25
+        return d.promise;
26
+    };
27
+});

+ 62 - 0
src/main/resources/static/app/supervise/views/stockWarningThreshold.html

@@ -0,0 +1,62 @@
1
+<!-- MAIN CONTENT -->
2
+<div id="content">
3
+	<!-- widget grid -->
4
+	<section widget-grid id="widget-grid">
5
+		<div class="row">
6
+			<article class="col-sm-12">
7
+				<div jarvis-widget id="standard-datatable-widget" data-widget-color="darken" data-widget-editbutton="true">
8
+					<header>
9
+						<span class="widget-icon"> <i class="fa fa-table"></i> </span>
10
+						<h2>库存超限报警</h2>
11
+					</header>
12
+					<div>
13
+						<div class="widget-body no-padding">
14
+							<div id="DataTables_Table_1_wrapper" class="dataTables_wrapper form-inline no-footer">
15
+								<div class="dt-toolbar">
16
+									<div class="col-xs-12 col-sm-10">
17
+										
18
+									</div>
19
+									<div class="col-sm-2 col-xs-2 hidden-xs">
20
+										<div class="dataTables_length">
21
+											<label>每页显示 <select ng-model="pageInfo.pageSize" ng-change="loadData()" ng-options="num as num for num in [10,25,50,100]" class="form-control input-sm"></select> 条
22
+											</label>
23
+										</div>
24
+									</div>
25
+								</div>
26
+								<div id="print">
27
+									<table class="table table-striped table-bordered table-hover" width="100%"
28
+										border="1" style="border-collapse:collapse;border:none;">
29
+										<thead>
30
+											<tr>
31
+												<th data-class="expand" style="text-align:center;">序号</th>
32
+												<th data-class="expand" style="text-align:center;">仓房名称</th>
33
+												<th data-class="expand" style="text-align:center;">粮油性质</th>
34
+												<th data-class="expand" style="text-align:center;">粮油名称</th>
35
+												<th data-class="expand" style="text-align:center;">等级</th>
36
+												<th data-class="expand" style="text-align:center;">设计仓容(公斤)</th>
37
+												<th data-class="expand" style="text-align:center;">库存数量(公斤)</th>
38
+											</tr>
39
+										</thead>
40
+
41
+										<tbody>
42
+											<tr ng-repeat="warning in pageInfo.list">
43
+												<td style="text-align:center;">{{ $index + 1 }}</td>
44
+												<td style="text-align:center;">{{ warning.storeHouseName }}</td>
45
+												<td style="text-align:center;">{{ warning.grainOilQuality }}</td>
46
+												<td style="text-align:center;">{{ warning.grainOilName }}</td>
47
+												<td style="text-align:center;">{{ warning.level }}</td>
48
+												<td style="text-align:center;">{{ warning.designCapacity }}</td>
49
+												<td style="text-align:center;">{{ warning.inventoryQuantity }}</td>
50
+											</tr>
51
+										</tbody>
52
+									</table>
53
+								</div>
54
+								<div smart-include="app/layout/partials/page.tpl.html"></div>
55
+							</div>
56
+						</div>
57
+					</div>
58
+				</div>
59
+			</article>
60
+		</div>
61
+	</section>
62
+</div>