Browse Source

汇总单

seimin 2 years ago
parent
commit
c9b0f0e28a

+ 2 - 0
assets/js/config.constant.js

@@ -119,6 +119,8 @@ app.constant('JS_REQUIRES', {
119
         //*** inspect 
119
         //*** inspect 
120
         'integralCtrl': 'assets/js/controllers/inspect/integralCtrl.js',
120
         'integralCtrl': 'assets/js/controllers/inspect/integralCtrl.js',
121
         'inspectPlanCtrl': 'assets/js/controllers/inspect/inspectPlanCtrl.js',
121
         'inspectPlanCtrl': 'assets/js/controllers/inspect/inspectPlanCtrl.js',
122
+        'summaryCtrl': 'assets/js/controllers/inspect/summaryCtrl.js',
123
+        'summaryDetailCtrl': 'assets/js/controllers/inspect/summaryDetailCtrl.js',
122
         'inspectReportCtrl': 'assets/js/controllers/inspect/inspectReportCtrl.js',
124
         'inspectReportCtrl': 'assets/js/controllers/inspect/inspectReportCtrl.js',
123
         'inspectListCtrl': 'assets/js/controllers/inspect/inspectListCtrl.js',
125
         'inspectListCtrl': 'assets/js/controllers/inspect/inspectListCtrl.js',
124
         'inspectForm': 'assets/js/controllers/inspect/inspectForm.js',
126
         'inspectForm': 'assets/js/controllers/inspect/inspectForm.js',

+ 24 - 0
assets/js/config.router.js

@@ -1411,6 +1411,30 @@ app.config(['$authProvider', '$httpProvider', '$stateProvider', '$urlRouterProvi
1411
                 }
1411
                 }
1412
             })
1412
             })
1413
 
1413
 
1414
+            //管理事件>维修汇总单
1415
+            .state('app.incident.summary', {
1416
+                url: '/summary',
1417
+                templateUrl: "assets/views/inspect/summary.html",
1418
+                resolve: loadSequence('jquery-nestable-plugin', 'ng-nestable', 'ui.select', 'angularBootstrapNavTree', 'multi.select.tree', 'ckeditor-plugin', 'ckeditor', 'angularFileUpload', 'spin', 'ladda', 'angular-ladda', 'ui.grid', 'summaryCtrl'),
1419
+                title: 'inspection.LIST',
1420
+                icon: 'ti-list',
1421
+                ncyBreadcrumb: {
1422
+                    label: 'inspection list'
1423
+                }
1424
+            })
1425
+
1426
+            //管理事件>维修汇总单
1427
+            .state('app.incident.summaryDetail', {
1428
+                url: '/summaryDetail/{incidentId}',
1429
+                templateUrl: "assets/views/inspect/summaryDetail.html",
1430
+                resolve: loadSequence('jquery-nestable-plugin', 'ng-nestable', 'ui.select', 'angularBootstrapNavTree', 'multi.select.tree', 'ckeditor-plugin', 'ckeditor', 'angularFileUpload', 'spin', 'ladda', 'angular-ladda', 'ui.grid', 'summaryDetailCtrl'),
1431
+                title: 'inspection.LIST',
1432
+                icon: 'ti-list',
1433
+                ncyBreadcrumb: {
1434
+                    label: 'inspection list'
1435
+                }
1436
+            })
1437
+
1414
             //管理事件>积分管理
1438
             //管理事件>积分管理
1415
             .state('app.incident.integral', {
1439
             .state('app.incident.integral', {
1416
                 url: '/integral',
1440
                 url: '/integral',

File diff suppressed because it is too large
+ 633 - 0
assets/js/controllers/inspect/summaryCtrl.js


+ 97 - 0
assets/js/controllers/inspect/summaryDetailCtrl.js

@@ -0,0 +1,97 @@
1
+"use strict";
2
+/**
3
+ * controller for User Profile Example
4
+ */
5
+app.controller("summaryDetailCtrl", [
6
+  "$rootScope",
7
+  "$scope",
8
+  "$state",
9
+  "$stateParams",
10
+  "$timeout",
11
+  "$interval",
12
+  "$modal",
13
+  "SweetAlert",
14
+  "i18nService",
15
+  "uiGridConstants",
16
+  "uiGridGroupingConstants",
17
+  "Restangular",
18
+  "api_bpm_schedule",
19
+  "api_bpm_data",
20
+  "api_wechatfile",
21
+  "api_configure_data",
22
+  "moment",
23
+  function (
24
+    $rootScope,
25
+    $scope,
26
+    $state,
27
+    $stateParams,
28
+    $timeout,
29
+    $interval,
30
+    $modal,
31
+    SweetAlert,
32
+    i18nService,
33
+    uiGridConstants,
34
+    uiGridGroupingConstants,
35
+    Restangular,
36
+    api_bpm_schedule,
37
+    api_bpm_data,
38
+    api_wechatfile,
39
+    api_configure_data,
40
+    moment
41
+  ) {
42
+    $scope.langs = i18nService.getAllLangs();
43
+    $scope.lang = "zh-cn";
44
+
45
+    i18nService.setCurrentLang($scope.lang);
46
+
47
+    // 获取信息
48
+    $scope.consumableList = [];
49
+    $scope.incidentDTO = {};
50
+    $scope.workHourManagementList = [];
51
+    $scope.totalPriceConsumable = 0;
52
+    $scope.totalPriceWorkHourManagement = 0;
53
+    $scope.getInfo = function(){
54
+      console.log($stateParams.incidentId);
55
+      $rootScope.isMask = true;
56
+      api_bpm_data.querySummaryDoc({"incidentId":$stateParams.incidentId}).then(
57
+        function (data) {
58
+          $rootScope.isMask = false;
59
+          $scope.consumableList = data.consumableList || [];
60
+          $scope.incidentDTO = data.incidentDTO || {};
61
+          $scope.workHourManagementList = data.workHourManagementList || [];
62
+          $scope.totalPriceConsumable = $scope.consumableList.reduce((pre,current) => {
63
+            return pre + current.consumableEndPrice * current.consumablesNum;
64
+          },0)
65
+          $scope.totalPriceWorkHourManagement = $scope.workHourManagementList.reduce((pre,current) => {
66
+            return pre + current.wage;
67
+          },0)
68
+        },
69
+        function () {
70
+          $rootScope.isMask = false;
71
+        }
72
+      );
73
+    }
74
+    $scope.getInfo();
75
+    //返回列表
76
+    $scope.goToList = function(){
77
+      $state.go("app.incident.summary");
78
+    }
79
+    $scope.transferTime = function (time) {
80
+      if(time){
81
+        return moment(time).format('YYYY-MM-DD HH:mm');
82
+      }else{
83
+        return '';
84
+      }
85
+    }
86
+    //查看事件
87
+    $scope.goToIncident = function(){
88
+      $state.go('app.incident.detail', {
89
+        formKey: 'incident_back',
90
+        pdKey: 'incident',
91
+        dataId: $scope.incidentDTO.id,
92
+        taskId: $scope.incidentDTO.taskId,
93
+        processInstanceId: $scope.incidentDTO.processInstanceId
94
+      });
95
+    }
96
+  },
97
+]);

+ 8 - 0
assets/js/main.js

@@ -1017,6 +1017,14 @@ app.factory('api_bpm_data', ['BpmRestangular', function (BpmRestangular) {
1017
     var inspectionProcessActual = BpmRestangular.all("InspectionProcessActual");
1017
     var inspectionProcessActual = BpmRestangular.all("InspectionProcessActual");
1018
     var solutionService = BpmRestangular.all("solution");
1018
     var solutionService = BpmRestangular.all("solution");
1019
     return {
1019
     return {
1020
+        // 汇总单审核通过
1021
+        approved: function (data) {
1022
+            return dataService.customPOST(data, 'approved');
1023
+        },
1024
+        // 获取汇总单信息
1025
+        querySummaryDoc: function (data) {
1026
+            return dataService.customPOST(data, 'querySummaryDoc');
1027
+        },
1020
         // 获取首页今日上班清空
1028
         // 获取首页今日上班清空
1021
         getManagerIndexInfo: function (data) {
1029
         getManagerIndexInfo: function (data) {
1022
             return dataService.customPOST(data, 'getManagerIndexInfo');
1030
             return dataService.customPOST(data, 'getManagerIndexInfo');

+ 54 - 0
assets/views/inspect/summary.html

@@ -0,0 +1,54 @@
1
+<style type="text/css">
2
+    .incidentsearch {
3
+        width: 30% !important;
4
+        margin-right: 16px
5
+    }
6
+
7
+    .iptSize {
8
+        width: 60% !important;
9
+        height: 28px !important;
10
+    }
11
+
12
+    .tree-control .tree-input {
13
+        min-height: 28px !important
14
+    }
15
+
16
+    .searchBtnBox>.btn{
17
+        margin: 0 8px 10px 0;
18
+    }
19
+</style>
20
+<div ng-controller="summaryCtrl">
21
+    <section id="page-title">
22
+        <div class="row">
23
+            <div class="col-sm-8">
24
+                <h1 class="mainTitle">维修汇总单<i tooltip='维修汇总单列表,可对巡检进行修改,新增,删除' tooltip-placement="right"
25
+                        class="fa  ti-help-alt margin-left-10 fontcolor-five pointfont"></i></h1>
26
+            </div>
27
+        </div>
28
+    </section>
29
+    <div class="schuback" id="searchid">
30
+        <div class="row " style="padding-right: 0px !important;">
31
+            <div class="col-xs-12">
32
+                <div class="col-xs-10" style="padding-right: 0px !important;"></div>
33
+                <div class="col-xs-2">
34
+                    <div>
35
+                        <div class="pull-left margin-top-10 searchBtnBox">
36
+                            <div class="btn btn_search" ng-click="searchinspe(inspectdata)"><span>搜索</span></div>
37
+                            <div class="btn btn_remove" ng-click="removeData()"
38
+                                ng-class="isMousedown?'btn_removeMousedown':''" ng-mousedown="changeRemoveClass()"
39
+                                ng-show="shanchu" ng-disabled="selected.items.length==0"><span
40
+                                    translate="list.button.REMOVE">Remove First Row</span></div>
41
+                        </div>
42
+                    </div>
43
+                </div>
44
+            </div>
45
+        </div>
46
+    </div>
47
+    <div class="tableList" ui-i18n="{{lang}}">
48
+        <div class=" ">
49
+            <div id="grid1 " ui-grid="gridOptions " ui-grid-pagination external-scopes="$scope " ui-grid-resize-columns
50
+                ui-grid-selection ui-grid-auto-resize class="grid ">
51
+            </div>
52
+        </div>
53
+    </div>
54
+</div>

+ 345 - 0
assets/views/inspect/summaryDetail.html

@@ -0,0 +1,345 @@
1
+<style type="text/css">
2
+    .totalPrice{
3
+        height: 50px;
4
+        line-height: 50px;
5
+        border-bottom: 1px solid #eeeeee;
6
+        text-align: center;
7
+    }
8
+    .btnWrap{
9
+        display: flex;
10
+        justify-content: center;
11
+        align-items: center;
12
+    }
13
+    .incidentsearch {
14
+        width: 30% !important;
15
+        margin-right: 16px
16
+    }
17
+
18
+    .iptSize {
19
+        width: 60% !important;
20
+        height: 28px !important;
21
+    }
22
+
23
+    .tree-control .tree-input {
24
+        min-height: 28px !important
25
+    }
26
+
27
+    .searchBtnBox>.btn{
28
+        margin: 0 8px 10px 0;
29
+    }
30
+    .header_item{
31
+        font-size: 16px;
32
+        color: #606367;
33
+        padding: 8px 15px;
34
+    }
35
+    .header_item span{
36
+        margin-right: 24px;
37
+    }
38
+    #importTplIpt {
39
+        position: absolute;
40
+        top: 0;
41
+        right: 0;
42
+        left: 0;
43
+        bottom: 0;
44
+        opacity: 0;
45
+    }
46
+
47
+    .mainDiv {
48
+        /* background: red; */
49
+        /* padding: 14px; */
50
+        /* height: 50px; */
51
+        overflow: hidden;
52
+        /* zoom: 1; */
53
+    }
54
+
55
+    .mainDivLeft {
56
+        /* display: inline-block; */
57
+        border-radius: 8px;
58
+        margin-right: 52%;
59
+        border: 1px solid #eeeeee;
60
+    }
61
+
62
+    .mainDivRight {
63
+        /* display: inline-block; */
64
+        width: 48%;
65
+        border-radius: 8px;
66
+        float: right;
67
+        border: 1px solid #eeeeee;
68
+    }
69
+
70
+    .mainDiv-head {
71
+        height: 47px;
72
+        line-height: 47px;
73
+        background: #f5f5f5;
74
+        font-size: 16px;
75
+        color: #606367;
76
+        border-radius: 8px 8px 0 0;
77
+        padding-left: 10px;
78
+        padding-right: 4px;
79
+    }
80
+
81
+    .mainDivLeft-span {
82
+        border: 1px solid;
83
+        /* padding: 15px 0px 15px 0px; */
84
+        padding-left: 15px;
85
+        padding-right: 15px;
86
+        padding-top: 4px;
87
+        padding-bottom: 4px;
88
+        height: 28px;
89
+        line-height: 28px;
90
+        border-radius: 4px;
91
+        margin-right: 10px;
92
+        font-size: 14px;
93
+        position: relative;
94
+    }
95
+
96
+    .mainDiv-head-right {
97
+        float: right;
98
+    }
99
+
100
+    .mainDiv-head-right.hc {
101
+        display: flex;
102
+        justify-content: space-between;
103
+        align-items: center;
104
+    }
105
+
106
+    .mainDiv-head-right .hc_left {
107
+        flex: 1;
108
+    }
109
+
110
+    .mainDiv-head-right .hc_right {
111
+        text-align: right;
112
+        flex-shrink: 0;
113
+        width: 100px;
114
+    }
115
+
116
+    .edit-left {
117
+        display: inline-block;
118
+        /* float: left; */
119
+        margin-left: 10px;
120
+    }
121
+
122
+    .span-1 {
123
+        border-color: #006bc0;
124
+        color: #006bc0;
125
+    }
126
+
127
+    .span-2 {
128
+        border: none;
129
+        color: white;
130
+        background-color: #2edbb8;
131
+    }
132
+
133
+    .span-3 {
134
+        border: none;
135
+        color: white;
136
+        background-color: #006bc0;
137
+    }
138
+
139
+    .mainDiv-body {
140
+        /* height: 500px; */
141
+        border-radius: 8px;
142
+        border: 1px solid #eeeeee;
143
+        margin: 14px;
144
+        overflow-y: auto;
145
+    }
146
+
147
+    .mainDiv-body-1 {
148
+        height: 50px;
149
+        line-height: 50px;
150
+        font-size: 16px;
151
+        color: #606367;
152
+        padding: 0px 14px;
153
+        border-bottom: 1px solid #eeeeee;
154
+    }
155
+
156
+    .mainDiv-body-2 {
157
+        /* height: 70px; */
158
+        line-height: 2;
159
+        font-size: 14px;
160
+        color: #606367;
161
+        padding: 10px 30px;
162
+        border-bottom: 1px solid #eeeeee;
163
+    }
164
+
165
+    /* .mainDiv-body-2:last-child {
166
+        border-bottom: none;
167
+    } */
168
+
169
+    .fixHeight {
170
+        /* height: 500px; */
171
+        overflow: auto;
172
+    }
173
+
174
+    .mainDiv-body-3 {
175
+        height: 50px;
176
+        line-height: 50px;
177
+        font-size: 14px;
178
+        color: #606367;
179
+        padding: 0px 30px;
180
+        border-bottom: 1px solid #eeeeee;
181
+    }
182
+
183
+    .mainDiv-body-3:last-child {
184
+        border-bottom: none;
185
+    }
186
+
187
+    .mainDiv-body-img {
188
+        height: 90px;
189
+        border-radius: 4px;
190
+        margin: 14px;
191
+        margin-bottom: 0px;
192
+        overflow: hidden;
193
+    }
194
+
195
+    .mainDiv-body-noList {
196
+        height: 110px;
197
+        margin: 50px 0;
198
+        text-align: center;
199
+    }
200
+
201
+    .form-control {
202
+        display: inline-block;
203
+    }
204
+
205
+    .mainDivLeft-span-1 {
206
+        border: 1px solid;
207
+        padding-left: 15px;
208
+        padding-right: 15px;
209
+        /* padding-top: 4px; */
210
+        /* padding-bottom: 4px; */
211
+        height: 28px;
212
+        line-height: 28px;
213
+        border-radius: 4px;
214
+        margin-right: 10px;
215
+        font-size: 14px;
216
+        display: inline-block;
217
+    }
218
+
219
+    .mainDivLeft-span-2 {
220
+        border: 1px solid;
221
+        padding-left: 15px;
222
+        padding-right: 15px;
223
+        /* padding-top: 4px; */
224
+        /* padding-bottom: 4px; */
225
+        height: 28px;
226
+        line-height: 28px;
227
+        border-radius: 4px;
228
+        margin-right: 10px;
229
+        font-size: 14px;
230
+        display: inline-block;
231
+    }
232
+
233
+    .mainDivLeft-span-edit-1 {
234
+        border: 1px solid;
235
+        padding-left: 8px;
236
+        padding-right: 8px;
237
+        /* padding-top: 4px; */
238
+        /* padding-bottom: 4px; */
239
+        height: 22px;
240
+        line-height: 22px;
241
+        border-radius: 2px;
242
+        margin-right: 10px;
243
+        font-size: 12px;
244
+        display: inline-block;
245
+    }
246
+
247
+    .mainDivLeft-span-edit-2 {
248
+        border: 1px solid;
249
+        padding-left: 8px;
250
+        padding-right: 8px;
251
+        /* padding-top: 4px; */
252
+        /* padding-bottom: 4px; */
253
+        height: 22px;
254
+        line-height: 22px;
255
+        border-radius: 2px;
256
+        margin-right: 10px;
257
+        font-size: 12px;
258
+        display: inline-block;
259
+    }
260
+</style>
261
+<div ng-controller="summaryDetailCtrl">
262
+    <section id="page-title">
263
+        <div class="row">
264
+            <div class="col-sm-8">
265
+                <h1 class="mainTitle">维修汇总单详情<i tooltip='维修汇总单详情' tooltip-placement="right"
266
+                        class="fa  ti-help-alt margin-left-10 fontcolor-five pointfont"></i></h1>
267
+            </div>
268
+        </div>
269
+    </section>
270
+    <div class="schuback" id="searchid">
271
+        <div class="row " style="padding-right: 0px !important;">
272
+            <div class="col-xs-12">
273
+                <div class="header_item">
274
+                    <span>事件单号:{{ incidentDTO.incidentsign }}</span>
275
+                    <span>报修科室:{{ incidentDTO.department ? incidentDTO.department.dept : '' }}</span>
276
+                    <span>登记时间:{{ transferTime(incidentDTO.acceptDate) }}</span>
277
+                    <span>处理人/组:{{ incidentDTO.groupORHandlerUser }}</span>
278
+                </div>
279
+                <div class="header_item">
280
+                    <span>事件描述:{{ incidentDTO.description }}</span>
281
+                </div>
282
+            </div>
283
+        </div>
284
+    </div>
285
+    <div class="tableList">
286
+        <div class="tableList_wrap">
287
+            <div class="mainDiv">
288
+                <!-- 谁固定谁在前 -->
289
+                <div class="mainDivRight">
290
+                    <div class="mainDiv-head">
291
+                        <i style="font-size: 18px !important;" class="icon iconfont icon-quyu bluefont"></i>
292
+                        <span>工时清单</span>
293
+                        <div class="mainDiv-head-right"></div>
294
+                    </div>
295
+                    <div class="mainDiv-body fixHeight">
296
+                        <div class="mainDiv-body-2" style="cursor: pointer;" ng-repeat="workHourManagement in workHourManagementList">
297
+                            <div>
298
+                                <span>{{workHourManagement.workName}}</span>
299
+                                <div class="mainDiv-head-right">
300
+                                    <span></span>
301
+                                </div>
302
+                            </div>
303
+                            <div>
304
+                                <span>&emsp;</span>
305
+                                <div class="mainDiv-head-right hc">
306
+                                    <strong class="hc_left"></strong><strong class="hc_right">单次:{{workHourManagement.wage}}元</strong>
307
+                                </div>
308
+                            </div>
309
+                        </div>
310
+                        <div class="totalPrice">总价:{{totalPriceWorkHourManagement}}元</div>
311
+                    </div>
312
+                </div>
313
+                <div class="mainDivLeft">
314
+                    <div class="mainDiv-head">
315
+                        <i style="font-size: 18px !important;" class="icon iconfont icon-quyu bluefont"></i>
316
+                        <span style="cursor: pointer;" ng-click="clear()">耗材清单</span>
317
+                        <div class="mainDiv-head-right"></div>
318
+                    </div>
319
+                    <div class="mainDiv-body">
320
+                        <div class="mainDiv-body-2" style="cursor: pointer;" ng-repeat="consumable in consumableList">
321
+                            <div>
322
+                                <span>{{consumable.consumableName}}</span>
323
+                                <div class="mainDiv-head-right">
324
+                                    <span>单价:<strong>{{consumable.consumableEndPrice}}元</strong></span>
325
+                                </div>
326
+                            </div>
327
+                            <div>
328
+                                <span>&emsp;</span>
329
+                                <div class="mainDiv-head-right hc">
330
+                                    <strong class="hc_left">x{{consumable.consumablesNum}}</strong><strong class="hc_right">总价:{{consumable.consumableEndPrice * consumable.consumablesNum}}元</strong>
331
+                                </div>
332
+                            </div>
333
+                        </div>
334
+                        <div class="totalPrice">总价:{{totalPriceConsumable}}元</div>
335
+                    </div>
336
+                </div>
337
+            </div>
338
+            <div class="totalPrice">汇总单总价:{{ totalPriceWorkHourManagement + totalPriceConsumable }}元</div>
339
+            <div class="btnWrap">
340
+                <div class="btn btn_search" ng-click="goToIncident()"><span>查看事件</span></div>
341
+                <div class="btn btn_search" style="margin-left: 8px;" ng-click="goToList()"><span>返回列表</span></div>
342
+            </div>
343
+        </div>
344
+    </div>
345
+</div>