Procházet zdrojové kódy

擅自动用或置换预警-列表

hanqingsong před 1 rokem
rodič
revize
f9709734b6

+ 9 - 118
src/main/resources/static/app/warnAndAlarm/unauthorizedOperation/controller/unauthorizedOperationListCtrl.js

@@ -1,129 +1,19 @@
1 1
 "use strict";
2
-angular.module('app.warnAndAlarm').controller('unauthorizedOperationListCtrl', function ($scope, $rootScope) {
2
+angular.module('app.warnAndAlarm').controller('unauthorizedOperationListCtrl', function ($scope, $rootScope, unauthorizedOperationService) {
3 3
 
4 4
     // 获取列表数据
5 5
     $scope.pageInfo = {pageNum: 1, pageSize: 10};
6 6
     // 初始化查询条件
7
-    $scope.search = {houseId: null, thresholdType: null};
7
+    $scope.search = {kqmc: null, yjsj: null};
8 8
     $scope.loadData = function () {
9
-        // 测试
10
-        $scope.pageInfo = {
11
-            "lastPage": 1,
12
-            "navigatepageNums": [
13
-                1
14
-            ],
15
-            "startRow": 1,
16
-            "hasNextPage": false,
17
-            "prePage": 0,
18
-            "nextPage": 0,
19
-            "endRow": 4,
20
-            "pageSize": 10,
21
-            "list": [
22
-                {
23
-                    "ssjhh": "销2305-387",
24
-                    "pzbm": "1112001",
25
-                    "tzdid": "TZ202305251053182324907",
26
-                    "sskddm": "91120223104141086Y001",
27
-                    "jhsl": 1.0,
28
-                    "cfbh": "91120223104141086Y001109",
29
-                    "sskdmc": "天津利达粮油储运有限公司",
30
-                    "kssj": "2023-05-18",
31
-                    "clzt": 1,
32
-                    "clsj": "2023-07-30",
33
-                    "jssj": "2023-06-20",
34
-                    "bjsj": "2023-07-28",
35
-                    "pzmc": "澳大利亚标准白小麦",
36
-                    "clyj": "经系统检测,该报警内容已恢复正常",
37
-                    "cfmc": "107号仓",
38
-                    "clfs": 1,
39
-                    "bjlx": 3,
40
-                    "clrmc": "自动",
41
-                    "id": "b3106a875b7e4d3281fdfb846ddb2f72"
42
-                },
43
-                {
44
-                    "ssjhh": "销2305-387",
45
-                    "pzbm": "1112001",
46
-                    "tzdid": "TZ202305251053182324907",
47
-                    "sskddm": "91120223104141086Y001",
48
-                    "jhsl": 1.0,
49
-                    "cfbh": "91120223104141086Y001109",
50
-                    "sskdmc": "天津利达粮油储运有限公司",
51
-                    "kssj": "2023-05-18",
52
-                    "clzt": 1,
53
-                    "clsj": "2023-07-28",
54
-                    "jssj": "2023-06-20",
55
-                    "bjsj": "2023-07-27",
56
-                    "pzmc": "澳大利亚标准白小麦",
57
-                    "clyj": "test",
58
-                    "cfmc": "107号仓",
59
-                    "clfs": 0,
60
-                    "bjlx": 3,
61
-                    "clrmc": "储备粮11",
62
-                    "id": "4e2697d5d0784da3872e6e681882aa45"
63
-                },
64
-                {
65
-                    "ssjhh": "销2305-387",
66
-                    "pzbm": "1112001",
67
-                    "tzdid": "TZ202305251053182324907",
68
-                    "sskddm": "91120223104141086Y001",
69
-                    "jhsl": 1.0,
70
-                    "cfbh": "91120223104141086Y001109",
71
-                    "sskdmc": "天津利达粮油储运有限公司",
72
-                    "kssj": "2023-05-18",
73
-                    "clzt": 1,
74
-                    "clsj": "2023-07-30",
75
-                    "jssj": "2023-06-20",
76
-                    "bjsj": "2023-06-05",
77
-                    "pzmc": "澳大利亚标准白小麦",
78
-                    "clyj": "经系统检测,该报警内容已恢复正常",
79
-                    "cfmc": "107号仓",
80
-                    "clfs": 1,
81
-                    "bjlx": 1,
82
-                    "clrmc": "自动",
83
-                    "id": "8ae33c4f545347ea8f2762cf9deadd97"
84
-                },
85
-                {
86
-                    "ssjhh": "销2305-387",
87
-                    "pzbm": "1112001",
88
-                    "tzdid": "TZ202305251053182324907",
89
-                    "sskddm": "91120223104141086Y001",
90
-                    "jhsl": 1.0,
91
-                    "cfbh": "91120223104141086Y001109",
92
-                    "sskdmc": "天津利达粮油储运有限公司",
93
-                    "kssj": "2023-05-18",
94
-                    "clzt": 1,
95
-                    "clsj": "2023-07-30",
96
-                    "jssj": "2023-06-20",
97
-                    "bjsj": "2023-06-13",
98
-                    "pzmc": "澳大利亚标准白小麦",
99
-                    "clyj": "经系统检测,该报警内容已恢复正常",
100
-                    "cfmc": "107号仓",
101
-                    "clfs": 1,
102
-                    "bjlx": 2,
103
-                    "clrmc": "自动",
104
-                    "id": "ebf92d2fa5b24ca29d192352f74d9153"
105
-                }
106
-            ],
107
-            "pageNum": 1,
108
-            "navigatePages": 8,
109
-            "navigateFirstPage": 1,
110
-            "total": 4,
111
-            "pages": 1,
112
-            "firstPage": 1,
113
-            "size": 4,
114
-            "isLastPage": true,
115
-            "hasPreviousPage": false,
116
-            "navigateLastPage": 1,
117
-            "isFirstPage": true
118
-        };
9
+        unauthorizedOperationService.getPageList($scope.pageInfo.pageNum, $scope.pageInfo.pageSize, $scope.search).then(function (data) {
10
+            $scope.pageInfo = data.data;
11
+        }, function (data) {
12
+            console.log(data);
13
+        });
119 14
     };
120 15
     $scope.loadData();
121 16
 
122
-    // 处理记录
123
-    $scope.showProcessDetectionList = function (id) {
124
-        console.log(id);
125
-    };
126
-
127 17
     // 翻页
128 18
     $scope.goPage = function (pageNum) {
129 19
         $scope.pageInfo.pageNum = pageNum;
@@ -132,7 +22,8 @@ angular.module('app.warnAndAlarm').controller('unauthorizedOperationListCtrl', f
132 22
 
133 23
     // 清空
134 24
     $scope.emptyTime = function () {
135
-        $scope.search.houseId = null;
25
+        $scope.search.kqmc = null;
26
+        $scope.search.yjsj = null;
136 27
         $scope.loadData();
137 28
     };
138 29
 });

+ 21 - 1
src/main/resources/static/app/warnAndAlarm/unauthorizedOperation/service/unauthorizedOperationService.js

@@ -1,4 +1,24 @@
1 1
 "use strict";
2 2
 angular.module('app.warnAndAlarm').service("unauthorizedOperationService", function ($http, $q, APP_CONFIG, $rootScope) {
3
-
3
+    this.getPageList = function(pageNum, pageSize, search) {
4
+        var d = $q.defer();
5
+        $http({
6
+            method : 'GET',
7
+            url : APP_CONFIG.depotStorageUrl + '/replacementAlarm/getPageList',
8
+            params : {
9
+                pageNum : pageNum,
10
+                pageSize : pageSize,
11
+                kqbm : $rootScope.orgInfo.kqbm,
12
+                kqmc: search.kqmc,
13
+                yjsj: search.yjsj
14
+            }
15
+        }).then(function successCallback(response) {
16
+            // 请求成功执行代码
17
+            d.resolve(response.data);
18
+        }, function errorCallback(response) {
19
+            // 请求失败执行代码
20
+            d.reject("error");
21
+        });
22
+        return d.promise;
23
+    };
4 24
 });

+ 6 - 6
src/main/resources/static/app/warnAndAlarm/unauthorizedOperation/views/unauthorizedOperation-list.html

@@ -17,10 +17,10 @@
17 17
                                 <div class="dt-toolbar">
18 18
                                     <div class="col-xs-12 col-sm-10">
19 19
                                         <label>承储企业:
20
-                                            <input class="form-control" type="text" ng-model="cfmc" name="cfmc" />&emsp;
20
+                                            <input class="form-control" type="text" ng-model="search.cfmc" name="cfmc" />&emsp;
21 21
                                         </label>
22 22
                                         <label>报警日期:
23
-                                            <input style="width: 100px;" class="form-control" type="text" ng-model="search.searchStartDate" name="searchStartDate" data-smart-datepicker>
23
+                                            <input style="width: 100px;" class="form-control" type="text" ng-model="search.yjsj" name="yjsj" data-smart-datepicker>
24 24
                                         </label>
25 25
                                         <a class="btn btn-default btn-sm" ng-click="loadData()">
26 26
                                             <i class="fa fa-search"></i>&nbsp;查&nbsp;询
@@ -55,11 +55,11 @@
55 55
                                         <tbody>
56 56
                                         <tr ng-repeat="warning in pageInfo.list">
57 57
                                             <td style="text-align:center;">{{ $index + 1 }}</td>
58
-                                            <td style="text-align:center;">{{ warning.ssjhh }}</td>
58
+                                            <td style="text-align:center;">{{ warning.kqmc }}</td>
59 59
                                             <td style="text-align:center;">{{ warning.cfmc }}</td>
60
-                                            <td style="text-align:center;">{{ warning.ssjhh }}</td>
61
-                                            <td style="text-align:center;">{{ warning.jhsl }}</td>
62
-                                            <td style="text-align:center;">{{ warning.clfs }}</td>
60
+                                            <td style="text-align:center;">{{ warning.yjxx }}</td>
61
+                                            <td style="text-align:center;">{{ warning.yjsj }}</td>
62
+                                            <td style="text-align:center;">{{ warning.czr }}</td>
63 63
                                         </tr>
64 64
                                         </tbody>
65 65
                                     </table>