Преглед на файлове

汇总单里的耗材和工时增删改查

seimin преди 10 месеца
родител
ревизия
6372113541

+ 1 - 1
assets/js/config.router.js

@@ -1432,7 +1432,7 @@ app.config(['$authProvider', '$httpProvider', '$stateProvider', '$urlRouterProvi
1432 1432
 
1433 1433
             //管理事件>维修汇总单
1434 1434
             .state('app.incident.summaryDetail', {
1435
-                url: '/summaryDetail/{id}/{incidentId}',
1435
+                url: '/summaryDetail/{id}/{incidentId}/{dutyId}/{categoryId}',
1436 1436
                 templateUrl: "assets/views/inspect/summaryDetail.html",
1437 1437
                 resolve: loadSequence('jquery-nestable-plugin', 'ng-nestable', 'ui.select', 'angularBootstrapNavTree', 'multi.select.tree', 'ckeditor-plugin', 'ckeditor', 'angularFileUpload', 'spin', 'ladda', 'angular-ladda', 'ui.grid', 'summaryDetailCtrl'),
1438 1438
                 title: 'inspection.LIST',

+ 2 - 0
assets/js/controllers/businessConfiguration/faultConsumablesCtrl.js

@@ -290,6 +290,8 @@ app.controller("faultConsumablesCtrl", [
290 290
                   }
291 291
                   selectItem(selectdata.category,$scope.select_treedata);
292 292
                   $scope.deptdata.category = selectdata.category;
293
+                  console.log($scope.deptdata, selectdata.category)
294
+                  console.log($scope.select_treedata)
293 295
                 } else {
294 296
                   SweetAlert.swal({
295 297
                     title: "系统错误!",

+ 78 - 2
assets/js/controllers/inspect/summaryCtrl.js

@@ -48,6 +48,7 @@ app.controller("summaryCtrl", [
48 48
     $scope.chakan = false;
49 49
     $scope.shanchu = false;
50 50
     $scope.shenhe = false;
51
+    $scope.summary_recalculate = false;
51 52
     for (var i = 0; i < loginUser.menu.length; i++) {
52 53
       if (loginUser.menu[i].link == "summary_chakan") {
53 54
         $scope.chakan = true;
@@ -58,6 +59,9 @@ app.controller("summaryCtrl", [
58 59
       if (loginUser.menu[i].link == "summary_shenhe") {
59 60
         $scope.shenhe = true;
60 61
       }
62
+      if (loginUser.menu[i].link == "summary_recalculate") {
63
+        $scope.summary_recalculate = true;
64
+      }
61 65
     }
62 66
     var defaultFilterData = {
63 67
       idx: 0,
@@ -220,6 +224,7 @@ app.controller("summaryCtrl", [
220 224
           '<a ng-click="grid.appScope.seeFunction(row.entity)" ng-if="grid.appScope.chakan" class="bianjifont">查看</a>' +
221 225
           '<a ng-click="grid.appScope.removeData(row.entity)" ng-if="grid.appScope.shanchu" class="bianjifont">删除</a>' +
222 226
           '<a ng-click="grid.appScope.runFunction(row.entity)" ng-if="grid.appScope.shenhe && row.entity.state == 2" class="bianjifont">审核通过</a>' +
227
+          '<a ng-click="grid.appScope.recalculate(row.entity)" ng-if="grid.appScope.summary_recalculate && (row.entity.state == 1 || row.entity.state == 2)" class="bianjifont">重算</a>' +
223 228
           "</div>",
224 229
       },
225 230
       // { name: 'planTime2', displayName: '截止时间', width: 160, enableFiltering: false },
@@ -237,7 +242,9 @@ app.controller("summaryCtrl", [
237 242
     $scope.seeFunction = function (data) {
238 243
       console.log(data)
239 244
       $state.go("app.incident.summaryDetail", {
240
-        incidentId: data.incidentId,
245
+        incidentId: data.incidentId || '',
246
+        categoryId: data.incidentCategoryId || '',
247
+        dutyId: data.incidentDutyId || '',
241 248
         id: data.id,
242 249
       });
243 250
     };
@@ -274,7 +281,76 @@ app.controller("summaryCtrl", [
274 281
             function (response) {
275 282
               var myData = Restangular.stripRestangular(response);
276 283
               if (myData.status == 200) {
277
-                $scope.refreshData("expand-right", $scope.fileData);
284
+                SweetAlert.swal({
285
+                  title: "操作成功!",
286
+                  type: "success"
287
+                }, function() {
288
+                  $scope.refreshData("expand-right", $scope.fileData);
289
+                })
290
+              }else{
291
+                SweetAlert.swal({
292
+                  title: "操作失败!",
293
+                  text: myData.msg || '请求数据失败!',
294
+                  type: "error"
295
+                }, function() {
296
+                  $scope.refreshData("expand-right", $scope.fileData);
297
+                })
298
+              }
299
+            },
300
+            function () {
301
+              // $scope.ldloading[style.replace('-', '_')] = false;
302
+            }
303
+          );
304
+        }
305
+      });
306
+    };
307
+
308
+    //重算
309
+    $scope.recalculate = function (data) {
310
+      var modalInstance = $modal.open({
311
+        // templateUrl: 'assets/views/inspect/changRun.html',
312
+        templateUrl: "assets/views/delete.html",
313
+        // size: "sm",
314
+        controller: function ($scope, $modalInstance) {
315
+          $scope.isRunFunction = true;
316
+          var status = "";
317
+          $scope.title = "重算";
318
+          $scope.connect = "确定要重算?";
319
+
320
+          $scope.ok = function () {
321
+            $modalInstance.close(data);
322
+          };
323
+
324
+          $scope.cancel = function () {
325
+            $modalInstance.dismiss("cancel");
326
+          };
327
+        },
328
+        size: "sm",
329
+      });
330
+
331
+      modalInstance.result.then(function (result) {
332
+        if (result) {
333
+          var toData = {
334
+            repairSummary: { id: result.id },
335
+          };
336
+          api_bpm_data.updData("repairSummary", toData).then(
337
+            function (response) {
338
+              var myData = Restangular.stripRestangular(response);
339
+              if (myData.status == 200) {
340
+                SweetAlert.swal({
341
+                  title: "操作成功!",
342
+                  type: "success"
343
+                }, function() {
344
+                  $scope.refreshData("expand-right", $scope.fileData);
345
+                })
346
+              }else{
347
+                SweetAlert.swal({
348
+                  title: "操作失败!",
349
+                  text: myData.msg || '请求数据失败!',
350
+                  type: "error"
351
+                }, function() {
352
+                  $scope.refreshData("expand-right", $scope.fileData);
353
+                })
278 354
               }
279 355
             },
280 356
             function () {

+ 773 - 2
assets/js/controllers/inspect/summaryDetailCtrl.js

@@ -44,6 +44,36 @@ app.controller("summaryDetailCtrl", [
44 44
 
45 45
     i18nService.setCurrentLang($scope.lang);
46 46
 
47
+    var loginUser = $rootScope.user;
48
+    $scope.summary_hc_add = false;
49
+    $scope.summary_hc_remove = false;
50
+    $scope.summary_hc_edit = false;
51
+
52
+    $scope.summary_gs_add = false;
53
+    $scope.summary_gs_remove = false;
54
+    $scope.summary_gs_edit = false;
55
+    for (var i = 0; i < loginUser.menu.length; i++) {
56
+      if (loginUser.menu[i].link == "summary_hc_add") {
57
+        $scope.summary_hc_add = true;
58
+      }
59
+      if (loginUser.menu[i].link == "summary_hc_remove") {
60
+        $scope.summary_hc_remove = true;
61
+      }
62
+      if (loginUser.menu[i].link == "summary_hc_edit") {
63
+        $scope.summary_hc_edit = true;
64
+      }
65
+
66
+      if (loginUser.menu[i].link == "summary_gs_add") {
67
+        $scope.summary_gs_add = true;
68
+      }
69
+      if (loginUser.menu[i].link == "summary_gs_remove") {
70
+        $scope.summary_gs_remove = true;
71
+      }
72
+      if (loginUser.menu[i].link == "summary_gs_edit") {
73
+        $scope.summary_gs_edit = true;
74
+      }
75
+    }
76
+
47 77
     // 获取信息
48 78
     $scope.consumableList = [];
49 79
     $scope.incidentDTO = {};
@@ -120,9 +150,356 @@ app.controller("summaryDetailCtrl", [
120 150
                 }
121 151
               ]
122 152
             }).then(
123
-              function (data) {
153
+              function (response) {
154
+                $rootScope.isMask = false;
155
+                if(response.status == 200){
156
+                  SweetAlert.swal({
157
+                    title: "撤销成功!",
158
+                    type: "success"
159
+                  }, function() {
160
+                      $scope.getInfo()
161
+                  })
162
+                } else {
163
+                  SweetAlert.swal({
164
+                      title: "撤销失败!",
165
+                      text: response.msg || '请求数据失败!',
166
+                      type: "error"
167
+                  }, function() {
168
+                      $scope.getInfo()
169
+                  })
170
+                }
171
+              },
172
+              function () {
173
+                $rootScope.isMask = false;
174
+              }
175
+            );
176
+          }
177
+        },
178
+        function () {}
179
+      );
180
+    }
181
+
182
+    const uniqBy = (arr, predicate) => {
183
+      const cb = typeof predicate === 'function' ? predicate : (o) => o[predicate];
184
+
185
+      return [...arr.reduce((map, item) => {
186
+        const key = (item === null || item === undefined) ?
187
+          item : cb(item);
188
+
189
+        map.has(key) || map.set(key, item);
190
+
191
+        return map;
192
+      }, new Map()).values()];
193
+    };
194
+
195
+    // 修改耗材
196
+    $scope.updateHc = function(consumable){
197
+      console.log(consumable)
198
+      var modalInstance = $modal.open({
199
+        templateUrl: 'assets/views/system/tpl/hcChange.html',
200
+        controller: function($scope, scope, $modalInstance, api_user_data, api_bpm) {
201
+            $scope.title = '耗材修改';
202
+            $scope.isAdd = false;
203
+            $scope.dataInfo = {
204
+              num: consumable.consumablesNum,
205
+              consumable: {id: consumable.consumableId, name: consumable.consumableName},
206
+            }
207
+
208
+            $scope.getHcList=function(keyword = ''){
209
+              // 查询故障耗材列表
210
+              var postData = {
211
+                  "idx": 0,
212
+                  "sum": 20,
213
+                  incidentCategoryConsumable: {
214
+                    duty: $stateParams.dutyId,
215
+                    category: { id: $stateParams.categoryId },
216
+                  }
217
+              };
218
+              api_user_data.fetchDataList('incidentCategoryConsumable',postData).then(function(res){
219
+                if(res.status == 200){
220
+                  let list = res.list || [];
221
+                  if(list.length){
222
+                    let arr = list.map(v => v.consumableDTOS).flat();
223
+                    $scope.hcList = uniqBy(arr, 'id');
224
+                  }else{
225
+                    // 查询耗材列表
226
+                    var postData = {
227
+                      "idx": 0,
228
+                      "sum": 20,
229
+                      consumable: {
230
+                        keyWord: keyword,
231
+                        dutyDTO: { id: $stateParams.dutyId },
232
+                        showZero: true,
233
+                      }
234
+                    };
235
+
236
+                    api_user_data.fetchDataList('consumable',postData).then(function(res){
237
+                      if(res.status == 200){
238
+                        $scope.hcList = res.list || [];
239
+                      }else{
240
+                        uni.showToast({
241
+                          icon: 'none',
242
+                          title: res.msg || '请求数据失败!'
243
+                        });
244
+                      }
245
+                    })
246
+                  }
247
+                }else{
248
+                  uni.showToast({
249
+                    icon: 'none',
250
+                    title: res.msg || '请求数据失败!'
251
+                  });
252
+                }
253
+              })
254
+            }
255
+            $scope.getHcList();
256
+            $scope.changeNum = function(val){
257
+              $scope.dataInfo.num = val?Math.abs(parseFloat(val.toFixed(2), 10)):val;
258
+            }
259
+            $scope.cancel = function() {
260
+                $modalInstance.dismiss('cancel');
261
+            };
262
+            $scope.savercode = function() {
263
+                if ($scope.dataInfo.num && $scope.dataInfo.consumable && $scope.dataInfo.consumable.id){
264
+                  $rootScope.isMask = true;
265
+                  let postData = {
266
+                    "consumableList": [
267
+                      {
268
+                        "consumablesId": $scope.dataInfo.consumable ? $scope.dataInfo.consumable.id : undefined,
269
+                        "consumablesNum": $scope.dataInfo.num
270
+                      }
271
+                    ],
272
+                    modifyNum: "edit",
273
+                    "summaryId": $stateParams.id,
274
+                  };
275
+                    api_bpm.addSummaryDoc(postData).then(function(response) {
276
+                        if (response) {
277
+                            if (response.status == 200) {
278
+                                SweetAlert.swal({
279
+                                    title: "修改成功!",
280
+                                    type: "success"
281
+                                }, function() {
282
+                                    scope.getInfo()
283
+                                })
284
+                            } else {
285
+                                SweetAlert.swal({
286
+                                    title: "修改失败!",
287
+                                    text: response.msg || '请求数据失败!',
288
+                                    type: "error"
289
+                                }, function() {
290
+                                    scope.getInfo()
291
+                                })
292
+                            }
293
+                            $modalInstance.close();
294
+                        }else{
295
+                            SweetAlert.swal({
296
+                                title: "修改失败!",
297
+                                text: response.msg || '请求数据失败!',
298
+                                type: "error"
299
+                            }, function() {
300
+                                scope.getInfo()
301
+                            })
302
+                        }
303
+                    })
304
+
305
+                }else{
306
+                    SweetAlert.swal({
307
+                        title: "新增失败!",
308
+                        text: "请填写必填项!",
309
+                        type: "error",
310
+                        confirmButtonColor: "#DD6B55"
311
+                    }, function () {
312
+
313
+                    });
314
+                }
315
+            }
316
+        },
317
+        resolve: {
318
+            scope: function() {
319
+                return $scope;
320
+            }
321
+        }
322
+      });
323
+    }
324
+
325
+    // 新增耗材
326
+    $scope.addHc = function(){
327
+      var modalInstance = $modal.open({
328
+        templateUrl: 'assets/views/system/tpl/hcChange.html',
329
+        controller: function($scope, scope, $modalInstance, api_user_data, api_bpm) {
330
+            $scope.title = '耗材新增';
331
+            $scope.isAdd = true;
332
+            $scope.dataInfo = {
333
+              num: 1,
334
+              consumable: null,
335
+            }
336
+
337
+            $scope.getHcList=function(keyword = ''){
338
+              // 查询故障耗材列表
339
+              var postData = {
340
+                  "idx": 0,
341
+                  "sum": 20,
342
+                  incidentCategoryConsumable: {
343
+                    duty: $stateParams.dutyId,
344
+                    category: { id: $stateParams.categoryId },
345
+                  }
346
+              };
347
+              api_user_data.fetchDataList('incidentCategoryConsumable',postData).then(function(res){
348
+                if(res.status == 200){
349
+                  let list = res.list || [];
350
+                  if(list.length){
351
+                    let arr = list.map(v => v.consumableDTOS).flat();
352
+                    $scope.hcList = uniqBy(arr, 'id');
353
+                  }else{
354
+                    // 查询耗材列表
355
+                    var postData = {
356
+                      "idx": 0,
357
+                      "sum": 20,
358
+                      consumable: {
359
+                        keyWord: keyword,
360
+                        dutyDTO: { id: $stateParams.dutyId },
361
+                        showZero: true,
362
+                      }
363
+                    };
364
+
365
+                    api_user_data.fetchDataList('consumable',postData).then(function(res){
366
+                      if(res.status == 200){
367
+                        $scope.hcList = res.list || [];
368
+                      }else{
369
+                        uni.showToast({
370
+                          icon: 'none',
371
+                          title: res.msg || '请求数据失败!'
372
+                        });
373
+                      }
374
+                    })
375
+                  }
376
+                }else{
377
+                  uni.showToast({
378
+                    icon: 'none',
379
+                    title: res.msg || '请求数据失败!'
380
+                  });
381
+                }
382
+              })
383
+            }
384
+            $scope.getHcList();
385
+            $scope.changeNum = function(val){
386
+              $scope.dataInfo.num = val?Math.abs(parseFloat(val.toFixed(2), 10)):val;
387
+            }
388
+            $scope.cancel = function() {
389
+                $modalInstance.dismiss('cancel');
390
+            };
391
+            $scope.savercode = function() {
392
+                if ($scope.dataInfo.num && $scope.dataInfo.consumable && $scope.dataInfo.consumable.id){
393
+                  $rootScope.isMask = true;
394
+                  let postData = {
395
+                    "consumableList": [
396
+                      {
397
+                        "consumablesId": $scope.dataInfo.consumable ? $scope.dataInfo.consumable.id : undefined,
398
+                        "consumablesNum": $scope.dataInfo.num
399
+                      }
400
+                    ],
401
+                    "summaryId": $stateParams.id,
402
+                  };
403
+                    api_bpm.addSummaryDoc(postData).then(function(response) {
404
+                        if (response) {
405
+                            if (response.status == 200) {
406
+                                SweetAlert.swal({
407
+                                    title: "新增成功!",
408
+                                    type: "success"
409
+                                }, function() {
410
+                                    scope.getInfo()
411
+                                })
412
+                            } else {
413
+                                SweetAlert.swal({
414
+                                    title: "新增失败!",
415
+                                    text: response.msg || '请求数据失败!',
416
+                                    type: "error"
417
+                                }, function() {
418
+                                    scope.getInfo()
419
+                                })
420
+                            }
421
+                            $modalInstance.close();
422
+                        }else{
423
+                            SweetAlert.swal({
424
+                                title: "新增失败!",
425
+                                text: response.msg || '请求数据失败!',
426
+                                type: "error"
427
+                            }, function() {
428
+                                scope.getInfo()
429
+                            })
430
+                        }
431
+                    })
432
+
433
+                }else{
434
+                    SweetAlert.swal({
435
+                        title: "新增失败!",
436
+                        text: "请填写必填项!",
437
+                        type: "error",
438
+                        confirmButtonColor: "#DD6B55"
439
+                    }, function () {
440
+
441
+                    });
442
+                }
443
+            }
444
+        },
445
+        resolve: {
446
+            scope: function() {
447
+                return $scope;
448
+            }
449
+        }
450
+      });
451
+    }
452
+
453
+    // 撤销工时
454
+    $scope.removeGs = function(workHourManagement){
455
+      var modalInstance = $modal.open({
456
+        templateUrl: "assets/views/delete.html",
457
+        controller: function ($scope, $modalInstance) {
458
+          $scope.title = "撤销";
459
+          $scope.connect = "您确认要撤销此条工时("+ workHourManagement.workName + "【"+ workHourManagement.workHourNum2 +"】" +")的使用吗?";
460
+          $scope.ok = function () {
461
+            $modalInstance.close("start");
462
+          };
463
+
464
+          $scope.cancel = function () {
465
+            $modalInstance.dismiss("cancel");
466
+          };
467
+        },
468
+        size: "sm",
469
+      });
470
+
471
+      modalInstance.result.then(
472
+        function (result) {
473
+          if(result == 'start'){
474
+            $rootScope.isMask = true;
475
+            api_bpm_data.removeHc({
476
+              summaryId: +$stateParams.id,
477
+              remove: 'remove',
478
+              workHourManagementList: [
479
+                {
480
+                  workHourId: workHourManagement.id,
481
+                  workHourNum: workHourManagement.workHourNum,
482
+                }
483
+              ]
484
+            }).then(
485
+              function (response) {
124 486
                 $rootScope.isMask = false;
125
-                $scope.getInfo();
487
+                if(response.status == 200){
488
+                  SweetAlert.swal({
489
+                    title: "撤销成功!",
490
+                    type: "success"
491
+                  }, function() {
492
+                      $scope.getInfo()
493
+                  })
494
+                } else {
495
+                  SweetAlert.swal({
496
+                      title: "撤销失败!",
497
+                      text: response.msg || '请求数据失败!',
498
+                      type: "error"
499
+                  }, function() {
500
+                      $scope.getInfo()
501
+                  })
502
+                }
126 503
               },
127 504
               function () {
128 505
                 $rootScope.isMask = false;
@@ -133,5 +510,399 @@ app.controller("summaryDetailCtrl", [
133 510
         function () {}
134 511
       );
135 512
     }
513
+
514
+    // 修改工时
515
+    $scope.updateGs = function(workHourManagement){
516
+      console.log(workHourManagement)
517
+      var modalInstance = $modal.open({
518
+        templateUrl: 'assets/views/system/tpl/gsChange.html',
519
+        controller: function($scope, scope, $modalInstance, api_user_data, api_bpm) {
520
+            $scope.title = '工时修改';
521
+            $scope.isAdd = false;
522
+            $scope.dataInfo = {
523
+              num: workHourManagement.workHourNum2,
524
+              workHourManagement: [{id: workHourManagement.id, name: workHourManagement.workName}],
525
+            }
526
+
527
+            // --------------------
528
+            $scope.select_treedata = [];
529
+            $rootScope.bala1 = $scope.getGsList = function (s, fn) {
530
+              if (s) {
531
+                var filterKeyword = s.filterKeyword;
532
+              }
533
+              var postData = {
534
+                idx: 0,
535
+                sum: 9999,
536
+              };
537
+              $scope.my_data = [];
538
+              $scope.doing_async = true;
539
+              api_bpm_data
540
+                .fetchDataList("workHourManagement", postData)
541
+                .then(function (response) {
542
+                  if (response.status == 200) {
543
+                    var data = response.list;
544
+                    if (filterKeyword) {
545
+                      data.forEach((e) => {
546
+                        e.isExpanded = true;
547
+                      });
548
+                      var li = transform(data).children;
549
+                      console.log(li);
550
+                      fn(li);
551
+                      return;
552
+                    } else {
553
+                      var objects = [];
554
+                      for (var i = 0; i < data.length; i++) {
555
+                        var object = {};
556
+                        object.id = data[i].id;
557
+                        object.parent = data[i].parent;
558
+                        object.workName = data[i].workName;
559
+                        object.isExpanded = true;
560
+                        objects.push(object);
561
+                      }
562
+                      $scope.my_data = convertParentToChildList(objects);
563
+                      $scope.select_treedata = angular.copy($scope.my_data);
564
+                      console.log($scope.select_treedata)
565
+                    }
566
+                    if ($scope.my_data.length > 0) {
567
+                      $scope.doing_async = false;
568
+                    }
569
+                    selectItem(workHourManagement,$scope.select_treedata);
570
+                    $scope.dataInfo.workHourManagement = workHourManagement;
571
+                  } else {
572
+                    SweetAlert.swal({
573
+                      title: "系统错误!",
574
+                      text: "请刷新重试!",
575
+                      type: "error",
576
+                    });
577
+                  }
578
+                });
579
+            };
580
+            $scope.getGsList();
581
+            // --------------------
582
+            $scope.changeNum = function(val){
583
+              $scope.dataInfo.num = val?Math.abs(parseFloat(val.toFixed(2), 10)):val;
584
+            }
585
+            $scope.cancel = function() {
586
+                $modalInstance.dismiss('cancel');
587
+            };
588
+            $scope.savercode = function() {
589
+                if ($scope.dataInfo.num && $scope.dataInfo.workHourManagement.length){
590
+                  $rootScope.isMask = true;
591
+                  let postData = {
592
+                    "workHourManagementList": $scope.dataInfo.workHourManagement.map(v => ({ workHourId: v.id, workHourNum: $scope.dataInfo.num })),
593
+                    "summaryId": $stateParams.id,
594
+                    modifyNum: "edit"
595
+                  };
596
+                    api_bpm.addSummaryDoc(postData).then(function(response) {
597
+                        if (response) {
598
+                            if (response.status == 200) {
599
+                                SweetAlert.swal({
600
+                                    title: "修改成功!",
601
+                                    type: "success"
602
+                                }, function() {
603
+                                    scope.getInfo()
604
+                                })
605
+                            } else {
606
+                                SweetAlert.swal({
607
+                                    title: "修改失败!",
608
+                                    text: response.msg || '请求数据失败!',
609
+                                    type: "error"
610
+                                }, function() {
611
+                                    scope.getInfo()
612
+                                })
613
+                            }
614
+                            $modalInstance.close();
615
+                        }else{
616
+                            SweetAlert.swal({
617
+                                title: "修改失败!",
618
+                                text: response.msg || '请求数据失败!',
619
+                                type: "error"
620
+                            }, function() {
621
+                                scope.getInfo()
622
+                            })
623
+                        }
624
+                    })
625
+
626
+                }else{
627
+                    SweetAlert.swal({
628
+                        title: "新增失败!",
629
+                        text: "请填写必填项!",
630
+                        type: "error",
631
+                        confirmButtonColor: "#DD6B55"
632
+                    }, function () {
633
+
634
+                    });
635
+                }
636
+            }
637
+        },
638
+        resolve: {
639
+            scope: function() {
640
+                return $scope;
641
+            }
642
+        }
643
+      });
644
+    }
645
+
646
+    // 新增工时
647
+    $scope.addGs = function(){
648
+      var modalInstance = $modal.open({
649
+        templateUrl: 'assets/views/system/tpl/gsChange.html',
650
+        controller: function($scope, scope, $modalInstance, api_user_data, api_bpm) {
651
+            $scope.title = '工时新增';
652
+            $scope.isAdd = true;
653
+            $scope.dataInfo = {
654
+              // num: 1,
655
+              workHourManagement: [],
656
+            }
657
+            // --------------------
658
+            $scope.select_treedata = [];
659
+            $rootScope.bala1 = $scope.getGsList = function (s, fn) {
660
+              if (s) {
661
+                var filterKeyword = s.filterKeyword;
662
+              }
663
+              var postData = {
664
+                idx: 0,
665
+                sum: 9999,
666
+              };
667
+              $scope.my_data = [];
668
+              $scope.doing_async = true;
669
+              api_bpm_data
670
+                .fetchDataList("workHourManagement", postData)
671
+                .then(function (response) {
672
+                  if (response.status == 200) {
673
+                    var data = response.list;
674
+                    if (filterKeyword) {
675
+                      data.forEach((e) => {
676
+                        e.isExpanded = true;
677
+                      });
678
+                      var li = transform(data).children;
679
+                      console.log(li);
680
+                      fn(li);
681
+                      return;
682
+                    } else {
683
+                      var objects = [];
684
+                      for (var i = 0; i < data.length; i++) {
685
+                        var object = {};
686
+                        object.id = data[i].id;
687
+                        object.parent = data[i].parent;
688
+                        object.workName = data[i].workName;
689
+                        object.isExpanded = true;
690
+                        objects.push(object);
691
+                      }
692
+                      $scope.my_data = convertParentToChildList(objects);
693
+                      $scope.select_treedata = angular.copy($scope.my_data);
694
+                      console.log($scope.select_treedata)
695
+                    }
696
+                    if ($scope.my_data.length > 0) {
697
+                      $scope.doing_async = false;
698
+                    }
699
+                    // selectItem(selectdata.workName,$scope.select_treedata);
700
+                    // $scope.deptdata.workName = selectdata.workName;
701
+                  } else {
702
+                    SweetAlert.swal({
703
+                      title: "系统错误!",
704
+                      text: "请刷新重试!",
705
+                      type: "error",
706
+                    });
707
+                  }
708
+                });
709
+            };
710
+            $scope.getGsList();
711
+            // --------------------
712
+            $scope.changeNum = function(val){
713
+              $scope.dataInfo.num = val?Math.abs(parseFloat(val.toFixed(2), 10)):val;
714
+            }
715
+            $scope.cancel = function() {
716
+                $modalInstance.dismiss('cancel');
717
+            };
718
+            $scope.savercode = function() {
719
+                console.log($scope.dataInfo);
720
+                // if ($scope.dataInfo.num && $scope.dataInfo.workHourManagement.length){
721
+                if ($scope.dataInfo.workHourManagement.length){
722
+                  $rootScope.isMask = true;
723
+                  let workHourManagementList = scope.workHourManagementList || []
724
+                  let postData = {
725
+                    "workHourManagementList": $scope.dataInfo.workHourManagement.concat(workHourManagementList).map(v => ({ workHourId: v.id, workHourNum: v.workHourNum2 || 1 })),
726
+                    "summaryId": $stateParams.id,
727
+                  };
728
+                    api_bpm.addSummaryDoc(postData).then(function(response) {
729
+                        if (response) {
730
+                            if (response.status == 200) {
731
+                                SweetAlert.swal({
732
+                                    title: "新增成功!",
733
+                                    type: "success"
734
+                                }, function() {
735
+                                    scope.getInfo()
736
+                                })
737
+                            } else {
738
+                                SweetAlert.swal({
739
+                                    title: "新增失败!",
740
+                                    text: response.msg || '请求数据失败!',
741
+                                    type: "error"
742
+                                }, function() {
743
+                                    scope.getInfo()
744
+                                })
745
+                            }
746
+                            $modalInstance.close();
747
+                        }else{
748
+                            SweetAlert.swal({
749
+                                title: "新增失败!",
750
+                                text: response.msg || '请求数据失败!',
751
+                                type: "error"
752
+                            }, function() {
753
+                                scope.getInfo()
754
+                            })
755
+                        }
756
+                    })
757
+
758
+                }else{
759
+                    SweetAlert.swal({
760
+                        title: "新增失败!",
761
+                        text: "请填写必填项!",
762
+                        type: "error",
763
+                        confirmButtonColor: "#DD6B55"
764
+                    }, function () {
765
+
766
+                    });
767
+                }
768
+            }
769
+        },
770
+        resolve: {
771
+            scope: function() {
772
+                return $scope;
773
+            }
774
+        }
775
+      });
776
+    }
777
+
778
+    function selectItem(pmodel, childrens) {
779
+      if (angular.isArray(pmodel)) {
780
+        angular.forEach(pmodel, function (index) {
781
+          if (index && index.id) {
782
+            angular.forEach(childrens, function (item) {
783
+              if (item.id == index.id) {
784
+                item.selected = true;
785
+              }
786
+              if (item && item.children) {
787
+                selectItem(pmodel, item.children);
788
+              }
789
+            });
790
+          }
791
+        });
792
+      } else {
793
+        if (pmodel && pmodel.id) {
794
+          angular.forEach(childrens, function (item, index) {
795
+            if (item.id == pmodel.id) {
796
+              item.selected = true;
797
+            }
798
+            if (item && item.children) {
799
+              selectItem(pmodel, item.children);
800
+            }
801
+          });
802
+        }
803
+      }
804
+    }
805
+
806
+    function convertParentToChildList(data) {
807
+      var treeMap = {};
808
+      var list = [];
809
+      convertListToTree(data, treeMap);
810
+      angular.forEach(treeMap, function (item) {
811
+          list.push(item);
812
+      });
813
+      return list;
814
+    }
815
+
816
+    function convertListToTree(data, treeMap) {
817
+      var idToNodeMap = {}; //Keeps track of nodes using id as key, for fast lookup
818
+      var root = null; //Initially set our loop to null
819
+      var parentNode = null;
820
+      //loop over data
821
+      for (var i = 0; i < data.length; i++) {
822
+          var datum = data[i];
823
+          //each node will have children, so let's give it a "children" poperty
824
+          datum.children = [];
825
+
826
+          //add an entry for this node to the map so that any future children can
827
+          //lookup the parent
828
+          idToNodeMap[datum.id] = datum;
829
+
830
+          //Does this node have a parent?
831
+          if (typeof datum.parent === "undefined" || datum.parent == null) {
832
+              //Doesn't look like it, so this node is the root of the tree
833
+              root = datum;
834
+              treeMap[datum.id] = root;
835
+          } else {
836
+              //This node has a parent, so let's look it up using the id
837
+              parentNode = idToNodeMap[datum.parent.id];
838
+
839
+              //We don't need this property, so let's delete it.
840
+              delete datum.parent;
841
+
842
+              //Let's add the current node as a child of the parent node.
843
+              parentNode.children.push(datum);
844
+          }
845
+      }
846
+      return root;
847
+    }
848
+
849
+    //树形图
850
+    // 将故障现象搜索结果返回的数据整理成children模式
851
+    function transform(nodes) {
852
+      var treeConverter = {
853
+          result: null, //转化后的结果,是根节点,所有节点都是从根节点长出来的
854
+          attributeName: 'id', //节点唯一标识符
855
+          needFind: true, //是否查询节点在result中已经存在,为了优化效率
856
+          transform: function (node) { //转化递归函数,参数:一个待插入节点
857
+
858
+              if (node.parent != null) { //该节点有父节点
859
+                  var newNode = this.transform(node.parent); //递归进入,返回值为一个节点,用作父节点,该父节点必然存在于result中,这点由下面的算法可以控制
860
+                  if (this.needFind) {
861
+                      for (var i = 0; i < newNode.children.length; i++) { //查找要插入的node子节点是否在newNode这个父节点中存在
862
+                          if (newNode.children[i][this.attributeName] === node[this.attributeName]) {
863
+                              return newNode.children[i]; //存在的话直接返回newNode父节点内的该子节点,该子节点必然存在于result中,作为返回值它将被用作上级递归的newNode,因此newNode必然存在于result中
864
+                          }
865
+                      }
866
+                  }
867
+                  this.needFind = false; //不存在的话,关闭之后递归的循环判断,因为待插入node节点不存在于result中,故而它的子节点一定不存在于result中,不用再循环判断
868
+                  //   delete node.parent; //删除该节点的parent属性,如果有的话
869
+                  node.children = []; //因为确定是要新插入的节点,没有children:[]属性,故给该节点增加children:[]属性
870
+
871
+                  newNode.children.push(node); //将该node节点push进newNode的子节点数组中
872
+                  return node; //return该新插入节点,作为递归返回值给上层,用作newNode父节点,node存在于result中故newNode存在于result中
873
+              } else if (node.parent == null) { //该叶节点没有父节点,即为根节点
874
+                  //   delete node.parent; //删除该节点的parent属性,如果有的话
875
+                  if (this.result == null) { //根节点不存在
876
+                      node.children = []; //给该节点增加children:[]属性
877
+                      return this.result = node; //该节点赋给result,并return根节点,作为返回值它将被用作上级递归的newNode,因此newNode必然存在于result中
878
+                  } else {
879
+                      node.children = [];
880
+                      // 顶级去重
881
+                      for (var i = 0; i < this.result.children.length; i++) {
882
+                          if (this.result.children[i][this.attributeName] === node[this.attributeName]) {
883
+                              return this.result.children[i];
884
+                          }
885
+                      }
886
+                      this.result.children.push(node)
887
+                      return node // 直接return根节点,作为返回值它将被用作上级递归的newNode,因此newNode必然存在于result中
888
+                  }
889
+              }
890
+          },
891
+          getWhole: function (nodes, attributeName) { //传入整个叶子节点数组,attributeName作为节点唯一标识符属性,返回整个转化结果
892
+              var _node = {};
893
+              _node.children = [];
894
+              this.result = _node; //重置根节点
895
+              this.attributeName = attributeName == null ? 'id' : attributeName; //唯一标识符默认为“id”
896
+              nodes = JSON.parse(JSON.stringify(nodes)); //复制出一个新的节点对象作为参数,保证不改变原有数据
897
+              nodes.forEach(item => { //循环调用转化方法
898
+                  this.needFind = true; //重置开启节点是否已存在判断,保证不插入重复节点
899
+                  this.transform(item);
900
+              })
901
+              return this.result; //返回根节点
902
+          }
903
+      }
904
+      var result = treeConverter.getWhole(nodes); //调用
905
+      return result;
906
+    }
136 907
   },
137 908
 ]);

+ 4 - 0
assets/js/main.js

@@ -815,6 +815,10 @@ app.factory('api_bpm', ['BpmRestangular', function (BpmRestangular) {
815 815
     var InspectionProcessActual = BpmRestangular.all('InspectionProcessActual');
816 816
     return {
817 817
         //巡检列表批量指派
818
+        addSummaryDoc: function (data) {
819
+            return getData.customPOST(data, 'addSummaryDoc', {});
820
+        },
821
+        //巡检列表批量指派
818 822
         assign: function (data) {
819 823
             return InspectionProcessActual.customPOST(data, 'batchAssign', {});
820 824
         },

+ 2 - 2
assets/views/change/list.html

@@ -9,7 +9,7 @@
9 9
         <div class="col-xs-12">
10 10
             <div style="float:left;display:inline;min-width:200px;">
11 11
                 <select ng-model="searchTypes" class="cs-select cs-skin-slide">
12
-		  		<option value="">请选择...</option>				
12
+		  		<option value="">请选择...</option>
13 13
 				<option value="todo" ng-attr-class="{searchTypes=='todo'?'cs-selected':''}">待我处理的变更</option>
14 14
 				<option value="create" ng-attr-class="{searchTypes=='create'?'cs-selected':''}">我创建的变更</option>
15 15
 				<option value="done" ng-attr-class="{searchTypes=='done'?'cs-selected':''}">我处理过的变更</option>
@@ -72,7 +72,7 @@
72 72
     }
73 73
 
74 74
     .ui-grid-row:nth-child(even) .ui-grid-cell {
75
-        background: #fafafa !important;
75
+        background: #fafafa;
76 76
     }
77 77
     div.ui-grid-row.ng-scope:hover{
78 78
         cursor:pointer;

+ 1 - 1
assets/views/desk/chart.html

@@ -50,7 +50,7 @@
50 50
     border-bottom: none;
51 51
   }
52 52
   .ui-grid-row:nth-child(even) .ui-grid-cell {
53
-        background: #fafafa !important;
53
+        background: #fafafa;
54 54
         display: flex;
55 55
         justify-content: center;
56 56
         align-items: center;

+ 2 - 2
assets/views/desk/jry_emergency.html

@@ -31,9 +31,9 @@
31 31
     }
32 32
 
33 33
     .ui-grid-row:nth-child(even) .ui-grid-cell {
34
-        background: #fafafa !important;
34
+        background: #fafafa;
35 35
     }
36
-    
36
+
37 37
     .wtBtn {
38 38
         width: 100px!important;
39 39
         height: 34px!important;

+ 1 - 1
assets/views/incident/list.html

@@ -338,7 +338,7 @@
338 338
     }
339 339
 
340 340
     .ui-grid-row:nth-child(even) .ui-grid-cell {
341
-        background: #fafafa !important;
341
+        background: #fafafa;
342 342
         display: flex;
343 343
         justify-content: center;
344 344
         align-items: center;

+ 1 - 1
assets/views/inspect/summary.html

@@ -153,7 +153,7 @@
153 153
     }
154 154
 
155 155
     .ui-grid-row:nth-child(even) .ui-grid-cell {
156
-        background: #fafafa !important;
156
+        background: #fafafa;
157 157
         display: flex;
158 158
         justify-content: center;
159 159
         align-items: center;

+ 9 - 6
assets/views/inspect/summaryDetail.html

@@ -75,8 +75,8 @@
75 75
         font-size: 16px;
76 76
         color: #606367;
77 77
         border-radius: 8px 8px 0 0;
78
-        padding-left: 10px;
79
-        padding-right: 4px;
78
+        padding-left: 14px;
79
+        padding-right: 14px;
80 80
     }
81 81
 
82 82
     .mainDivLeft-span {
@@ -292,7 +292,7 @@
292 292
                     <div class="mainDiv-head">
293 293
                         <i style="font-size: 18px !important;" class="icon iconfont icon-quyu bluefont"></i>
294 294
                         <b>工时清单</b>
295
-                        <div class="mainDiv-head-right"></div>
295
+                        <div class="mainDiv-head-right"><div class="btn btn_search" style="margin-top: 0;" ng-click="addGs()" ng-if="summary_gs_add"><span>新增</span></div></div>
296 296
                     </div>
297 297
                     <div class="mainDiv-body fixHeight">
298 298
                         <div class="mainDiv-body-2" style="cursor: pointer;" ng-repeat="workHourManagement in workHourManagementList">
@@ -300,6 +300,8 @@
300 300
                                 <span>工时名称:{{workHourManagement.workName}}</span>
301 301
                                 <div class="mainDiv-head-right">
302 302
                                     <span>单价:<strong>{{workHourManagement.wage}}元</strong></span>
303
+                                    <div class="btn btn_search" style="margin-top: 0;margin-left: 8px;" ng-click="updateGs(workHourManagement)" ng-if="summary_gs_edit"><span>修改</span></div>
304
+                                    <div class="btn btn_search" style="margin-top: 0;margin-left: 8px;" ng-click="removeGs(workHourManagement)" ng-if="summary_gs_remove"><span>撤销</span></div>
303 305
                                 </div>
304 306
                             </div>
305 307
                             <div>
@@ -316,16 +318,17 @@
316 318
                     <div class="mainDiv-head">
317 319
                         <i style="font-size: 18px !important;" class="icon iconfont icon-quyu bluefont"></i>
318 320
                         <b style="cursor: pointer;" ng-click="clear()">耗材清单</b>
319
-                        <div class="mainDiv-head-right"></div>
321
+                        <div class="mainDiv-head-right"><div class="btn btn_search" style="margin-top: 0;" ng-click="addHc()" ng-if="summary_hc_add"><span>新增</span></div></div>
320 322
                     </div>
321 323
                     <div class="mainDiv-body">
322 324
                         <div class="mainDiv-body-2" style="cursor: pointer;" ng-repeat="consumable in consumableList">
323 325
                             <div>
324 326
                                 <div>
325
-                                    <span>耗材名称:{{consumable.consumableName}}{{consumable.consumableBrandModel}}</span>
327
+                                    <span>耗材名称:{{consumable.consumableName}}{{consumable.consumableBrandModel}}</span>
326 328
                                     <div class="mainDiv-head-right">
327 329
                                         <span>单价:<strong>{{consumable.consumableEndPrice}}元</strong></span>
328
-                                        <div class="btn btn_search" style="margin-top: 0;margin-left: 8px;" ng-click="removeHc(consumable)"><span>撤销</span></div>
330
+                                        <div class="btn btn_search" style="margin-top: 0;margin-left: 8px;" ng-click="updateHc(consumable)" ng-if="summary_hc_edit"><span>修改</span></div>
331
+                                        <div class="btn btn_search" style="margin-top: 0;margin-left: 8px;" ng-click="removeHc(consumable)" ng-if="summary_hc_remove"><span>撤销</span></div>
329 332
                                     </div>
330 333
                                 </div>
331 334
                                 <div>

+ 28 - 28
assets/views/means/cmdbauditlist.html

@@ -167,34 +167,34 @@
167 167
     .selectzise {
168 168
         width: 160px;
169 169
     }
170
-    
170
+
171 171
     .wt_width {
172 172
         width: 17%;
173 173
         /* margin-right: 16px; */
174 174
     }
175
-    
175
+
176 176
     .wt_width1 {
177 177
         width: 160px;
178 178
     }
179
-    
179
+
180 180
     .wt_margin-top {
181 181
         margin-top: 35px !important;
182 182
     }
183
-    
183
+
184 184
     .form-inline .form-control {
185 185
         border-radius: 2px;
186 186
     }
187
-    
187
+
188 188
     .wt_width3 {
189 189
         width: 130px;
190 190
         height: 28px!important;
191 191
         border-radius: 2px !important;
192 192
     }
193
-    
193
+
194 194
     .wt_width4 {
195 195
         width: 20%;
196 196
     }
197
-    
197
+
198 198
     .wt_width5 {
199 199
         width: 160px;
200 200
         border-color: #dedede;
@@ -202,7 +202,7 @@
202 202
         height: 28px;
203 203
         border-radius: 2px !important;
204 204
     }
205
-    
205
+
206 206
     .wt_width6 {
207 207
         display: inline-block;
208 208
         padding-top: 0px;
@@ -212,36 +212,36 @@
212 212
         /* width: 8.2%; */
213 213
         text-align: center;
214 214
     }
215
-    
215
+
216 216
     .ui-select-bootstrap .ui-select-toggle {
217 217
         height: 28px;
218 218
         padding: 3px 4px;
219 219
     }
220
-    /* 
220
+    /*
221 221
         .wt_width {
222 222
             width: 20%;
223 223
             margin-right: 1%;
224 224
             padding: 0px;
225 225
         }
226
-    
226
+
227 227
         .wt_width1 {
228 228
             width: 100% !important;
229 229
             padding: 0px;
230 230
         } */
231
-    
231
+
232 232
     .wt_width2 {
233 233
         width: 50% !important;
234 234
     }
235
-    
235
+
236 236
     .wt_pad {
237 237
         padding: 0px;
238 238
     }
239
-    
239
+
240 240
     .wt_btns {
241 241
         display: inline-block;
242 242
         margin-right: 8px;
243 243
     }
244
-    
244
+
245 245
     .wt_btn1 {
246 246
         width: 80px;
247 247
         height: 28px !important;
@@ -251,62 +251,62 @@
251 251
         padding: 0px!important;
252 252
         font-size: 14px!important;
253 253
     }
254
-    
254
+
255 255
     .btn.steelbutton.wt_btn1 {
256 256
         padding: 0px!important;
257 257
     }
258
-    
258
+
259 259
     .wt_btnColor {
260 260
         background: #4A90E2 !important;
261 261
     }
262 262
     /* .btn{
263 263
             padding: 0px!important;
264 264
         } */
265
-    
265
+
266 266
     .wt_btnColor:hover {
267 267
         background: #fff !important;
268 268
         color: #2B5EB8 !important;
269 269
         border: 1px solid #2B5EB8;
270 270
     }
271
-    
271
+
272 272
     .wt_btnColor2:hover {
273 273
         background: #fff !important;
274 274
         color: #2B5EB8 !important;
275 275
         border: 1px solid #2B5EB8;
276 276
     }
277
-    
277
+
278 278
     .wt_btn2 {
279 279
         width: 100px;
280 280
         height: 34px!important;
281 281
         border-radius: 2px !important;
282 282
     }
283
-    
283
+
284 284
     .wt_list {
285 285
         padding: 15px;
286 286
         background: #F9F9F9;
287 287
     }
288
-    
288
+
289 289
     .ui-grid-render-container:hover {
290 290
         background: #fff !important;
291 291
     }
292
-    
292
+
293 293
     .wt_btnColor1 {
294 294
         background: #fff !important;
295 295
         color: #2B5EB8 !important;
296 296
         border: 1px solid #2B5EB8;
297 297
     }
298
-    
298
+
299 299
     .wt_btnColor1:hover {
300 300
         background: #4A90E2 !important;
301 301
         color: #fff !important;
302 302
         border: 1px solid #4A90E2 !important;
303 303
     }
304
-    
304
+
305 305
     div.ui-grid-row.ng-scope:hover {
306 306
         cursor: pointer;
307 307
         background: #fff !important;
308 308
     }
309
-    
309
+
310 310
     .wt_searchlistback {
311 311
         margin-top: 1px;
312 312
         margin-bottom: 8px;
@@ -316,9 +316,9 @@
316 316
         border-bottom-left-radius: 8px !important;
317 317
         border-bottom-right-radius: 8px !important;
318 318
     }
319
-    
319
+
320 320
     .ui-grid-row:nth-child(even) .ui-grid-cell {
321
-        background: #fafafa !important;
321
+        background: #fafafa;
322 322
     }
323 323
     .searchBtnBox{
324 324
         padding-top: 14px;

+ 10 - 10
assets/views/release/list.html

@@ -23,7 +23,7 @@
23 23
         background-color: #f9fbff!important;
24 24
         position: relative;
25 25
     }
26
-    
26
+
27 27
     .searchlistback .tit {
28 28
         font-size: 14px;
29 29
         font-weight: bold;
@@ -31,7 +31,7 @@
31 31
         margin-bottom: 7px
32 32
     }
33 33
     /* 左边搜索条件盒子 */
34
-    
34
+
35 35
     .searchlistback .left {
36 36
         float: left;
37 37
         /* width: 600px; */
@@ -39,7 +39,7 @@
39 39
         margin-top: 10px
40 40
     }
41 41
     /* 资产分类下拉框 */
42
-    
42
+
43 43
     .left .tree-control .tree-input {
44 44
         padding-left: 4px;
45 45
         font-size: 12px;
@@ -47,7 +47,7 @@
47 47
         color: rgb(198, 198, 200)!important;
48 48
     }
49 49
     /* 搜索按钮 */
50
-    
50
+
51 51
     #jry_searchBtn {
52 52
         width: 60px;
53 53
         height: 34px!important;
@@ -55,12 +55,12 @@
55 55
         background-color: #005395;
56 56
         padding: 6px 0px!important
57 57
     }
58
-    
58
+
59 59
     #jry_searchBtn:hover {
60 60
         background-color: #004279!important
61 61
     }
62 62
     /* 重置按钮 */
63
-    
63
+
64 64
     .jry_reset {
65 65
         width: 60px;
66 66
         height: 34px;
@@ -70,18 +70,18 @@
70 70
         border-radius: 2px!important;
71 71
         padding: 0 6px!important;
72 72
     }
73
-    
73
+
74 74
     .jry_reset:hover {
75 75
         border: 1px #999999 solid;
76 76
         background-color: #ffffff!important;
77 77
         color: #999999!important;
78 78
     }
79 79
     /* tab点击颜色 */
80
-    
80
+
81 81
     .statecolor {
82 82
         background-color: #005395!important
83 83
     }
84
-    
84
+
85 85
     .jry_bj {
86 86
         display: inline-block;
87 87
         margin-top: 5px
@@ -105,7 +105,7 @@
105 105
     }
106 106
 
107 107
     .ui-grid-row:nth-child(even) .ui-grid-cell {
108
-        background: #fafafa !important;
108
+        background: #fafafa;
109 109
     }
110 110
     div.ui-grid-row.ng-scope:hover{
111 111
         cursor:pointer;

+ 137 - 0
assets/views/system/tpl/gsChange.html

@@ -0,0 +1,137 @@
1
+<style>
2
+    .btn-plus-div{
3
+        text-align: left;
4
+        margin-top: 15px;
5
+    }
6
+    .btn-plus-div .btn-plus{
7
+        line-height: 1.5;
8
+        position: relative;
9
+        display: inline-block;
10
+        font-weight: 400;
11
+        white-space: nowrap;
12
+        text-align: center;
13
+        background-image: none;
14
+        border: 1px dashed #d9d9d9;
15
+        -webkit-box-shadow: 0 2px 0 rgba(0,0,0,.015);
16
+        box-shadow: 0 2px 0 rgba(0,0,0,.015);
17
+        -webkit-transition: .3s cubic-bezier(.645,.045,.355,1);
18
+        transition: all .3s cubic-bezier(.645,.045,.355,1);
19
+        -webkit-user-select: none;
20
+        -moz-user-select: none;
21
+        -ms-user-select: none;
22
+        user-select: none;
23
+        -ms-touch-action: manipulation;
24
+        touch-action: manipulation;
25
+        height: 32px;
26
+        padding: 0 15px;
27
+        font-size: 14px;
28
+        border-radius: 4px;
29
+        cursor: pointer;
30
+        color: rgba(0,0,0,.65);
31
+        background-color: #fff;
32
+    }
33
+    .btn-plus-div .btn-plus .icon-tianjia{
34
+        font-size: 12px;
35
+        margin-right: 8px;
36
+    }
37
+    .btn-plus-div .btn-plus{
38
+        line-height: 1.5;
39
+        position: relative;
40
+        display: inline-block;
41
+        font-weight: 400;
42
+        white-space: nowrap;
43
+        text-align: center;
44
+        background-image: none;
45
+        border: 1px dashed #d9d9d9;
46
+        -webkit-box-shadow: 0 2px 0 rgba(0,0,0,.015);
47
+        box-shadow: 0 2px 0 rgba(0,0,0,.015);
48
+        -webkit-transition: .3s cubic-bezier(.645,.045,.355,1);
49
+        transition: all .3s cubic-bezier(.645,.045,.355,1);
50
+        -webkit-user-select: none;
51
+        -moz-user-select: none;
52
+        -ms-user-select: none;
53
+        user-select: none;
54
+        -ms-touch-action: manipulation;
55
+        touch-action: manipulation;
56
+        height: 32px;
57
+        padding: 0 15px;
58
+        font-size: 14px;
59
+        border-radius: 4px;
60
+        cursor: pointer;
61
+        color: rgba(0,0,0,.65);
62
+        background-color: #fff;
63
+    }
64
+    .btn-plus-div .btn-plus[disabled]{
65
+        color: rgba(0,0,0,.25);
66
+        background-color: #f5f5f5;
67
+        border-color: #d9d9d9;
68
+        text-shadow: none;
69
+        -webkit-box-shadow: none;
70
+        box-shadow: none;
71
+        background: #f5f5f5;
72
+        cursor: not-allowed;
73
+        border: 1px solid rgba(0,0,0,.25);
74
+    }
75
+    .btn-plus-div .btn-plus[disabled] .icon-tianjia{
76
+        color: inherit;
77
+    }
78
+    .btn-plus-input{
79
+        text-align: left;
80
+        display: flex;
81
+        align-items: center;
82
+        margin-bottom: 16px;
83
+    }
84
+    .btn-plus-input .form-control{
85
+        width: 90%;
86
+    }
87
+    .btn-plus-input .icon-shanchu3{
88
+        cursor: pointer;
89
+        margin-left: 8px;
90
+        font-size: 18px;
91
+    }
92
+    .fault .muti-com {
93
+        text-align: left;
94
+    }
95
+    .fault .muti-com .tree-view {
96
+        width: 338px;
97
+    }
98
+</style>
99
+<div class="modal-header">
100
+    <div class="modal-title fontcolor-two fontsizes-14">{{title}}<button type="button" class="close pull-right" ng-click="cancel()">×</button></div>
101
+</div>
102
+<div class="modal-body margin-top-15 margin-left-15 margin-bottom-15 margin-right-15 addrequster">
103
+    <form role="form" class="row">
104
+        <div class="margin-left-30 margin-right-30 margin-top-20">
105
+            <div class="margin-bottom-15 anline">
106
+                <div class="pull-left openaddlable control-label fontcolor-two fontsizes-14">工时:</div>
107
+                <div class="pull-right openaddinput fault">
108
+                    <multi-select-tree
109
+                        data-default-label="请选择工时"
110
+                        class="muti-com"
111
+                        ng-model="cifilter_classic"
112
+                        data-input-model="select_treedata"
113
+                        data-output-model="dataInfo.workHourManagement"
114
+                        theme="bootstrap"
115
+                        multi-select="true"
116
+                        data-callback="onFilterCallback(item)"
117
+                        data-select-only-leafs="true"
118
+                        reset-search-input="false"
119
+                        data-trans-label="workName"
120
+                        data-switch-view="false"
121
+                    >
122
+                    </multi-select-tree>
123
+                </div>
124
+            </div>
125
+            <div class="margin-bottom-15 anline" ng-show="!isAdd">
126
+                <div class="pull-left openaddlable control-label fontcolor-two fontsizes-14"><span class="red">*</span>数量:</div>
127
+                <div class="pull-right openaddinput">
128
+                    <input style="width: 100%;" type="number" ng-model="dataInfo.num" ng-change="changeNum(dataInfo.num)" step="1" min="1">
129
+                </div>
130
+            </div>
131
+        </div>
132
+    </form>
133
+</div>
134
+<div class="modal-footer">
135
+    <a ng-click="savercode()" data-dismiss="modal" class="btn btn-primary">保存</a>
136
+    <button class="btn btn-primary btn-o" ng-click="cancel()" translate="modal.button.CANCEL">取消</button>
137
+</div>

+ 124 - 0
assets/views/system/tpl/hcChange.html

@@ -0,0 +1,124 @@
1
+<style>
2
+    .btn-plus-div{
3
+        text-align: left;
4
+        margin-top: 15px;
5
+    }
6
+    .btn-plus-div .btn-plus{
7
+        line-height: 1.5;
8
+        position: relative;
9
+        display: inline-block;
10
+        font-weight: 400;
11
+        white-space: nowrap;
12
+        text-align: center;
13
+        background-image: none;
14
+        border: 1px dashed #d9d9d9;
15
+        -webkit-box-shadow: 0 2px 0 rgba(0,0,0,.015);
16
+        box-shadow: 0 2px 0 rgba(0,0,0,.015);
17
+        -webkit-transition: .3s cubic-bezier(.645,.045,.355,1);
18
+        transition: all .3s cubic-bezier(.645,.045,.355,1);
19
+        -webkit-user-select: none;
20
+        -moz-user-select: none;
21
+        -ms-user-select: none;
22
+        user-select: none;
23
+        -ms-touch-action: manipulation;
24
+        touch-action: manipulation;
25
+        height: 32px;
26
+        padding: 0 15px;
27
+        font-size: 14px;
28
+        border-radius: 4px;
29
+        cursor: pointer;
30
+        color: rgba(0,0,0,.65);
31
+        background-color: #fff;
32
+    }
33
+    .btn-plus-div .btn-plus .icon-tianjia{
34
+        font-size: 12px;
35
+        margin-right: 8px;
36
+    }
37
+    .btn-plus-div .btn-plus{
38
+        line-height: 1.5;
39
+        position: relative;
40
+        display: inline-block;
41
+        font-weight: 400;
42
+        white-space: nowrap;
43
+        text-align: center;
44
+        background-image: none;
45
+        border: 1px dashed #d9d9d9;
46
+        -webkit-box-shadow: 0 2px 0 rgba(0,0,0,.015);
47
+        box-shadow: 0 2px 0 rgba(0,0,0,.015);
48
+        -webkit-transition: .3s cubic-bezier(.645,.045,.355,1);
49
+        transition: all .3s cubic-bezier(.645,.045,.355,1);
50
+        -webkit-user-select: none;
51
+        -moz-user-select: none;
52
+        -ms-user-select: none;
53
+        user-select: none;
54
+        -ms-touch-action: manipulation;
55
+        touch-action: manipulation;
56
+        height: 32px;
57
+        padding: 0 15px;
58
+        font-size: 14px;
59
+        border-radius: 4px;
60
+        cursor: pointer;
61
+        color: rgba(0,0,0,.65);
62
+        background-color: #fff;
63
+    }
64
+    .btn-plus-div .btn-plus[disabled]{
65
+        color: rgba(0,0,0,.25);
66
+        background-color: #f5f5f5;
67
+        border-color: #d9d9d9;
68
+        text-shadow: none;
69
+        -webkit-box-shadow: none;
70
+        box-shadow: none;
71
+        background: #f5f5f5;
72
+        cursor: not-allowed;
73
+        border: 1px solid rgba(0,0,0,.25);
74
+    }
75
+    .btn-plus-div .btn-plus[disabled] .icon-tianjia{
76
+        color: inherit;
77
+    }
78
+    .btn-plus-input{
79
+        text-align: left;
80
+        display: flex;
81
+        align-items: center;
82
+        margin-bottom: 16px;
83
+    }
84
+    .btn-plus-input .form-control{
85
+        width: 90%;
86
+    }
87
+    .btn-plus-input .icon-shanchu3{
88
+        cursor: pointer;
89
+        margin-left: 8px;
90
+        font-size: 18px;
91
+    }
92
+</style>
93
+<div class="modal-header">
94
+    <div class="modal-title fontcolor-two fontsizes-14">{{title}}<button type="button" class="close pull-right" ng-click="cancel()">×</button></div>
95
+</div>
96
+<div class="modal-body margin-top-15 margin-left-15 margin-bottom-15 margin-right-15 addrequster">
97
+    <form role="form" class="row">
98
+        <div class="margin-left-30 margin-right-30 margin-top-20">
99
+            <div class="margin-bottom-15 anline">
100
+                <div class="pull-left openaddlable control-label fontcolor-two fontsizes-14">耗材:</div>
101
+                <div class="pull-right openaddinput">
102
+                    <ui-select ng-model="dataInfo.consumable" theme="bootstrap" ng-disabled={{!isAdd}}>
103
+                        <ui-select-match placeholder="请选择耗材">
104
+                            {{$select.selected.name}}
105
+                        </ui-select-match>
106
+                        <ui-select-choices repeat="item in hcList" refresh="getHcList($select.search)">
107
+                            <div ng-bind-html="item.name + '('+ item.brandModel +')' + '('+ item.unit +')' | highlight: $select.search"></div>
108
+                        </ui-select-choices>
109
+                    </ui-select>
110
+                </div>
111
+            </div>
112
+            <div class="margin-bottom-15 anline">
113
+                <div class="pull-left openaddlable control-label fontcolor-two fontsizes-14"><span class="red">*</span>数量:</div>
114
+                <div class="pull-right openaddinput">
115
+                    <input style="width: 100%;" type="number" ng-model="dataInfo.num" ng-change="changeNum(dataInfo.num)" step="1" min="1">
116
+                </div>
117
+            </div>
118
+        </div>
119
+    </form>
120
+</div>
121
+<div class="modal-footer">
122
+    <a ng-click="savercode()" data-dismiss="modal" class="btn btn-primary">保存</a>
123
+    <button class="btn btn-primary btn-o" ng-click="cancel()" translate="modal.button.CANCEL">取消</button>
124
+</div>

+ 2 - 2
assets/views/working/list.html

@@ -145,7 +145,7 @@
145 145
     height: 28px;
146 146
   }
147 147
 
148
-  /* 
148
+  /*
149 149
     .wt_width {
150 150
         width: 20%;
151 151
         margin-right: 1%;
@@ -247,7 +247,7 @@
247 247
   }
248 248
 
249 249
   .ui-grid-row:nth-child(even) .ui-grid-cell {
250
-    background: #fafafa !important;
250
+    background: #fafafa;
251 251
   }
252 252
 
253 253
   .searchBtnBox>.wt_btns {