Browse Source

工时管理

seimin 2 years ago
parent
commit
2ec26dfcdc

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

@@ -90,6 +90,7 @@ app.constant('JS_REQUIRES', {
90 90
         'jry_sysformCtrl': 'assets/js/controllers/system/jry_systemFormCtrl.js', //告警详情页
91 91
         'incidentSetUpCtrl':'assets/js/controllers/system/processdesign/incidentplan/incidentSetUpCtrl.js', //事件设置
92 92
         'faultSymptomsCtrl':'assets/js/controllers/businessConfiguration/faultSymptomsCtrl.js', //事件设置
93
+        'workHourManagementCtrl':'assets/js/controllers/businessConfiguration/workHourManagementCtrl.js', //工时管理
93 94
         'informationCtrl':'assets/js/controllers/system/informationCtrl.js',//服务指南
94 95
         'processNodeCtrl':'assets/js/controllers/system/processNodeCtrl.js',//流程节点
95 96
         'informationCateCtrl':'assets/js/controllers/system/informationCateCtrl.js',//服务指南分类

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

@@ -1695,6 +1695,14 @@ app.config(['$authProvider', '$httpProvider', '$stateProvider', '$urlRouterProvi
1695 1695
                 ncyBreadcrumb: {
1696 1696
                     label: 'User Manager'
1697 1697
                 }
1698
+            }).state('app.businessConfiguration.workHourManagement', {
1699
+                url: '/workHourManagement',
1700
+                templateUrl: "assets/views/businessConfiguration/workHourManagement.html",
1701
+                resolve: loadSequence('ui.select', 'multi.select.tree', 'angularBootstrapNavTree', 'spin', 'ladda', 'angular-ladda', 'workHourManagementCtrl'),
1702
+                title: 'Nav Manager',
1703
+                ncyBreadcrumb: {
1704
+                    label: 'User Manager'
1705
+                }
1698 1706
             }).state('app.businessConfiguration.deptBindUser', {
1699 1707
                 url: '/deptBindUser',
1700 1708
                 templateUrl: "assets/views/businessConfiguration/deptBindUser.html",

+ 370 - 0
assets/js/controllers/businessConfiguration/workHourManagementCtrl.js

@@ -0,0 +1,370 @@
1
+app.controller('workHourManagement', ["$rootScope", "$scope", "$state", "$timeout", "$interval", "SweetAlert", "$modal", "Restangular", "api_bpm_data", "api_solution", "api_user_data","api_wechatfile","api_sysinfo","api_statistic","api_bpm","jry_api_bpm", function($rootScope, $scope, $state, $timeout, $interval, SweetAlert, $modal, Restangular, api_bpm_data, api_solution, api_user_data,api_wechatfile,api_sysinfo,api_statistic,api_bpm,jry_api_bpm) {
2
+    var loginUser = $rootScope.user;
3
+   $scope.xinzeng=false;
4
+   $scope.shanchu=false;
5
+   $scope.bianji=false;
6
+   for(var i=0;i<loginUser.menu.length;i++){
7
+        if(loginUser.menu[i].link=="workHourManagement_add"){
8
+            $scope.xinzeng=true
9
+        }
10
+        if(loginUser.menu[i].link=="workHourManagement_del"){
11
+            $scope.shanchu=true
12
+        }
13
+        if(loginUser.menu[i].link=="workHourManagement_edit"){
14
+            $scope.bianji=true
15
+        }
16
+   }
17
+    $scope.listData=[
18
+        {"name":"工时管理"},
19
+    ]
20
+
21
+    // 工时管理开始
22
+    /* ----- tree----- */
23
+    var i = 0;
24
+    $scope.out = [];
25
+    $scope.outdata = [];
26
+    $scope.subdata={};
27
+    $scope.addcate = false;
28
+    $scope.changecate = false;
29
+    $scope.filterTree = function (data,id) {
30
+        data = angular.copy(data);
31
+        var newTree = data.filter(x => x.id !== id)
32
+        newTree.forEach(x => x.children && (x.children = $scope.filterTree(x.children,id)))
33
+        return newTree
34
+    }
35
+    $scope.thisParent={};//当前点击节点的父节点
36
+    $scope.dataSave = [];//储存$scope.tree_data
37
+    $scope.my_tree_handler = function(branch) {
38
+        console.log($scope.dataSave)
39
+        if($scope.dataSave.length === 0){
40
+            $scope.dataSave = angular.copy($scope.tree_data);
41
+        }
42
+        console.log(branch)
43
+        if(branch.parent){
44
+            $scope.tree_data = $scope.filterTree($scope.dataSave,branch.id);
45
+            console.log($scope.tree_data,'过滤后');
46
+        }
47
+
48
+        $scope.changecate = true;
49
+        $scope.addcate = false;
50
+        filterData.treeIds = branch.id;
51
+        $scope.output = branch;
52
+        $scope.thisParent=branch.parent||null;
53
+        if($scope.thisParent){
54
+             $scope.thisParent.label=$scope.thisParent.workName;
55
+             $scope.thisParent.isExpanded=true;
56
+             $scope.thisParent.selected=true;
57
+             $scope.subdata['parent']=$scope.thisParent
58
+        };
59
+        
60
+        convertchildToTree(branch,'工时管理');
61
+        console.log(branch)
62
+        $scope.subdata.workName=branch.label;
63
+        $scope.subdata.wage=branch.wage;
64
+        $scope.subdata.workHourNum=branch.workHourNum;
65
+        $scope.subdata.duty=branch.duty;
66
+        var eqflag = false;
67
+        angular.forEach($scope.outdata, function(item) {
68
+            if (item.id == $scope.output.id) eqflag = true;
69
+        });
70
+        if (eqflag) {
71
+
72
+        } else {
73
+            $scope.outdata.push({
74
+                'name': $scope.output.label,
75
+                'id': $scope.output.id
76
+            });
77
+        }        
78
+
79
+    };
80
+    $scope.thisParent={};//当前点击节点的父节点
81
+    $scope.addType = function(element) {
82
+        $scope.adddata = {};
83
+        $scope.tree_data = $scope.dataSave.length?angular.copy($scope.dataSave):$scope.tree_data;
84
+        $scope.addcate = true
85
+        $scope.changecate = false
86
+    }
87
+    /* -----start remove incidet category----- */
88
+    $scope.remove = function(element) {
89
+        var modalInstance = $modal.open({
90
+            templateUrl: 'assets/views/delete.html',
91
+            controller: function($scope, scope, $modalInstance, api_bpm_data) {
92
+                $scope.title = "工时删除?";
93
+                $scope.connect = "确定要删除此工时?";
94
+                $scope.ok = function() {
95
+                    $modalInstance.close(element);
96
+                };
97
+                $scope.cancel = function() {
98
+                    $modalInstance.dismiss('cancel');
99
+                };
100
+            },
101
+            size: 'sm',
102
+            resolve: {
103
+                scope: function() {
104
+                    return $scope;
105
+                }
106
+            }
107
+        });
108
+        modalInstance.result.then(function(selectedItem) {
109
+            if (selectedItem) {
110
+                var rmvList = [];
111
+                rmvList.push(selectedItem.id);
112
+                if (selectedItem.children.length > 0) {
113
+                    SweetAlert.swal({
114
+                        title: "删除失败!",
115
+                        text: "请先删除选中的分类的子级",
116
+                        type: "error"
117
+                    })
118
+                } else {
119
+                    api_bpm_data.rmvData('workHourManagement', rmvList).then(function(response) {
120
+                        if (response.data) {
121
+                            SweetAlert.swal({
122
+                                title: "删除成功!",
123
+                                type: "success",
124
+                                confirmButtonColor: "#007AFF"
125
+                            }, function() {
126
+                                $scope.try_async_load();
127
+                                $scope.$apply($scope.my_data);
128
+                                $scope.changecate = false;
129
+                            });
130
+
131
+                        } else {
132
+                            SweetAlert.swal({
133
+                                title: "操作异常!",
134
+                                text: "系统异常,请稍后重试,或者联系管理员!",
135
+                                type: "error"
136
+                            });
137
+                        }
138
+                    })
139
+                }
140
+            }
141
+        })
142
+    }
143
+    /* -----end remove incidet category----- */
144
+
145
+    function convertchildToTree(datum,type) {
146
+        if(type === '工时管理'){
147
+            $scope.subdata = {};
148
+            if (datum.parent) {
149
+                $scope.subdata = { 'id': datum.id, 'workName': datum.label, 'duty': datum.duty, 'wage': datum.wage, 'workHourNum': datum.workHourNum, 'parent': datum.parent }
150
+            } else {
151
+                $scope.subdata = { 'id': datum.id, 'workName': datum.label, 'duty': datum.duty, 'wage': datum.wage, 'workHourNum': datum.workHourNum }
152
+            }
153
+        }
154
+    }
155
+
156
+
157
+    function convertListToTree(data, treeMap) {
158
+        var idToNodeMap = {}; //Keeps track of nodes using id as key, for fast lookup
159
+        var root = null; //Initially set our loop to null
160
+        //loop over data
161
+        for (var i = 0; i < data.length; i++) {
162
+            var datum = data[i];
163
+            //each node will have children, so let's give it a "children" poperty
164
+            datum.children = [];
165
+
166
+            //add an entry for this node to the map so that any future children can
167
+            //lookup the parent
168
+            idToNodeMap[datum.id] = datum;
169
+
170
+            //Does this node have a parent?
171
+            // console.log("datum="+JSON.stringify(datum))
172
+
173
+            if (typeof datum.parent === "undefined") {
174
+
175
+                //Doesn't look like it, so this node is the root of the tree
176
+                root = datum;
177
+                treeMap[datum.id] = root;
178
+
179
+            } else {
180
+
181
+                //This node has a parent, so let's look it up using the id
182
+                parentNode = idToNodeMap[datum.parent.id];
183
+
184
+                //We don't need this property, so let's delete it.
185
+                // delete datum.parent;
186
+
187
+                //Let's add the current node as a child of the parent node.
188
+                parentNode.children.push(datum);
189
+
190
+            }
191
+        }
192
+        return root;
193
+    }
194
+
195
+    function convertParentToChildList(data) {
196
+        var treeMap = {};
197
+        var list = [];
198
+        convertListToTree(data, treeMap);
199
+        angular.forEach(treeMap, function(item) {
200
+            list.push(item);
201
+        });
202
+        return list;
203
+    }
204
+
205
+    $scope.onFilterCallback = function(item){
206
+        $scope.selectedChangeCategory=item;
207
+        console.log(item)
208
+    }
209
+
210
+    $scope.try_async_load = function() {
211
+        $scope.my_data = [];
212
+        
213
+        $scope.doing_async = true;
214
+        api_bpm_data.fetchDataList('workHourManagement', { "idx": 0, "sum": 1000 }).then(function(response) {
215
+            var data = response.list;
216
+            var objects = [];
217
+            for (var i = 0; i < data.length; i++) {
218
+                var object = {};
219
+                object.id = data[i].id;
220
+                if (angular.isDefined(data[i].parent)) {
221
+                    object.parent = data[i].parent;
222
+                }
223
+                if (angular.isDefined(data[i].duty)) {
224
+                    object.duty = data[i].duty;
225
+                }
226
+                if (angular.isDefined(data[i].wage)) {
227
+                    object.wage = data[i].wage;
228
+                }
229
+                if (angular.isDefined(data[i].workHourNum)) {
230
+                    object.workHourNum = data[i].workHourNum;
231
+                }
232
+                if (angular.isDefined(data[i].workName)) {
233
+                    object.workName = data[i].workName;
234
+                }
235
+                
236
+                object.label = data[i].workName;
237
+                object.state = {
238
+                    "opened": true
239
+                };
240
+                object.typeName = "type";
241
+                objects.push(object);
242
+            }
243
+            $scope.my_data = convertParentToChildList(objects);
244
+            $scope.tree_data = angular.copy($scope.my_data);
245
+            $scope.dataSave = $scope.tree_data;
246
+            $scope.doing_async = false;
247
+        });
248
+    };
249
+    $scope.closethis = function(formdata) {
250
+        formdata.workName = "";
251
+        formdata.parent.workName = "";
252
+    };
253
+
254
+    /* -----start submit incidet category----- */
255
+    // 修改
256
+    $scope.submitchange = function(formdata1) {
257
+        var formdata = angular.copy(formdata1);
258
+        if(formdata.duty === undefined || formdata.wage === undefined || formdata.workHourNum === undefined || formdata.workName === undefined){
259
+            SweetAlert.swal({
260
+                title: "请填写必填项!",
261
+                type: "warning"
262
+            })
263
+            return;
264
+        }
265
+        if($scope.selectedChangeCategory){
266
+            formdata['parent'] ={'id':$scope.selectedChangeCategory.id};
267
+        }else if($scope.thisParent){
268
+            formdata['parent'] ={'id':$scope.thisParent.id};
269
+        }
270
+
271
+        var filedata = { "workHourManagement": formdata }
272
+        console.log(filedata);
273
+        // return;
274
+        api_bpm_data.updData('workHourManagement', filedata).then(function(response) {
275
+            if (response) {
276
+                if (response.status == 200) {
277
+                    $scope.try_async_load()
278
+                    SweetAlert.swal({
279
+                        title: "修改成功!",
280
+                        type: "success"
281
+                    }, function() {
282
+                        $scope.$apply($scope.my_data);
283
+                    })
284
+                } else {
285
+                    SweetAlert.swal({
286
+                        title: "修改失败!",
287
+                        type: "error"
288
+                    })
289
+                }
290
+            }
291
+        });
292
+    };
293
+    $scope.adddata = {};
294
+    $scope.addparent = false;
295
+    // 新增保存提交
296
+    $scope.submitadd = function(formdata1) {
297
+        var formdata = angular.copy(formdata1);
298
+        console.log(formdata);
299
+        if(formdata.duty === undefined || formdata.wage === undefined || formdata.workHourNum === undefined || formdata.workName === undefined){
300
+            SweetAlert.swal({
301
+                title: "请填写必填项!",
302
+                type: "warning"
303
+            })
304
+            return;
305
+        }
306
+        var filedata = { "workHourManagement": formdata }
307
+        // return;
308
+        api_bpm_data.addData('workHourManagement', filedata).then(function(response) {
309
+            if (response) {
310
+                if (response.status == 200) {
311
+                    $scope.userdata = [];
312
+                    $scope.outdata = [];
313
+                    $scope.try_async_load();
314
+                    SweetAlert.swal({
315
+                        title: "增加成功!",
316
+                        type: "success"
317
+                    })
318
+                } else if (response.status == 408) {
319
+                    SweetAlert.swal({
320
+                        title: "增加失败!",
321
+                        text: response.error,
322
+                        type: "error"
323
+                    })
324
+                } else {
325
+                    SweetAlert.swal({
326
+                        title: "增加失败!",
327
+                        type: "error"
328
+                    })
329
+                }
330
+            }
331
+        });
332
+    };
333
+    /* -----end submit incidet category----- */
334
+    $scope.try_async_load();
335
+    var filterData = {
336
+        key: 'null',
337
+        status: 0,
338
+        pageIndex: 0,
339
+        pageSum: 10,
340
+        userId: loginUser.id
341
+    }
342
+    // 工时管理结束
343
+
344
+    // 获取责任科室列表
345
+    $scope.getDutyList=function(dept){
346
+        var postData={
347
+            idx: 0, 
348
+            sum: 10, 
349
+            dutyDepartment: {
350
+                dept: dept||'', 
351
+                selectType: "pinyin_qs",
352
+            }
353
+        }
354
+        api_user_data.fetchDataList('dutyDepartment',postData).then(res=>{
355
+            $scope.dutyList=res.list;
356
+        })
357
+    }
358
+    $scope.getDutyList()
359
+
360
+
361
+    // 修改消耗工时数量
362
+    $scope.changeNum = function(value, type){
363
+        var reg = /(^[0-9]*\.([0-9]{1}\d*)$)|(^[0-9]*$)/;
364
+        if(reg.test(value)){
365
+            $scope.adddata[type] = parseFloat(value);
366
+        }else{
367
+            $scope.adddata[type] = '';
368
+        }
369
+    }
370
+}]);

+ 21 - 7
assets/js/controllers/system/organizationdesign/responsibilityDeptCtrl.js

@@ -126,13 +126,18 @@ app.controller("responsibilityDeptlistCtrl", [
126 126
       var modalInstance = $modal.open({
127 127
         templateUrl: "assets/views/system/tpl/responsibilityDeptchange.html",
128 128
         controller: function ($scope, scope, $modalInstance, api_user_data) {
129
+          $scope.summaryOrderList = [
130
+            {id: 1, name: '是', value: 1},
131
+            {id: 2, name: '否', value: 0}
132
+          ]
129 133
           $scope.deptdata = {
130 134
             uuid:selectdata.uuid,
131 135
             id: selectdata.id,
132 136
             dept: selectdata.dept,
133 137
             phone: selectdata.phone,
134 138
             branch: { id: selectdata.branch, hosName: selectdata.branchName },
135
-            parent:selectdata.parent
139
+            parent:selectdata.parent,
140
+            addSummary: $scope.summaryOrderList.find(v => v.value == selectdata.addSummary) || $scope.summaryOrderList.find(v => v.value == 0)
136 141
           };
137 142
           $scope.branchList = [];
138 143
           $scope.title = "责任科室修改";
@@ -162,7 +167,8 @@ app.controller("responsibilityDeptlistCtrl", [
162 167
               deptdata &&
163 168
               deptdata.dept &&
164 169
               deptdata.phone &&
165
-              deptdata.branch
170
+              deptdata.branch &&
171
+              deptdata.addSummary
166 172
             ) {
167 173
               var fildata = {
168 174
                 dutyDepartment: {
@@ -172,7 +178,8 @@ app.controller("responsibilityDeptlistCtrl", [
172 178
                   phone: deptdata.phone,
173 179
                   dept: deptdata.dept,
174 180
                   branch: deptdata.branch.id,
175
-                  parent:deptdata.parent
181
+                  parent:deptdata.parent,
182
+                  addSummary: deptdata.addSummary.value
176 183
                 },
177 184
               };
178 185
               api_user_data
@@ -249,11 +256,16 @@ app.controller("responsibilityDeptlistCtrl", [
249 256
       var modalInstance = $modal.open({
250 257
         templateUrl: "assets/views/system/tpl/responsibilityDeptchange.html",
251 258
         controller: function ($scope, $modalInstance, api_user_data) {
259
+          $scope.summaryOrderList = [
260
+            {id: 1, name: '是', value: 1},
261
+            {id: 2, name: '否', value: 0}
262
+          ]
252 263
           $scope.deptdata = {
253 264
             dept: "",
254 265
             phone: "",
255 266
             branch: "",
256
-            parent:''
267
+            parent:'',
268
+            addSummary: $scope.summaryOrderList.find(v => v.value == 0)
257 269
           };
258 270
           $scope.title = "责任科室新增";
259 271
           $scope.parentList = [];
@@ -278,7 +290,8 @@ app.controller("responsibilityDeptlistCtrl", [
278 290
               deptdata &&
279 291
               deptdata.dept &&
280 292
               deptdata.phone &&
281
-              deptdata.branch
293
+              deptdata.branch &&
294
+              deptdata.addSummary
282 295
             ) {
283 296
               $modalInstance.close(deptdata);
284 297
             } else {
@@ -296,13 +309,14 @@ app.controller("responsibilityDeptlistCtrl", [
296 309
         },
297 310
       });
298 311
       modalInstance.result.then(function (selectedItem) {
299
-        if (selectedItem.dept && selectedItem.phone && selectedItem.branch) {
312
+        if (selectedItem.dept && selectedItem.phone && selectedItem.branch && selectedItem.addSummary) {
300 313
           var fildata = {
301 314
             dutyDepartment: {
302 315
               phone: selectedItem.phone,
303 316
               dept: selectedItem.dept,
304 317
               branch: selectedItem.branch.id,
305
-              parent:selectedItem.parent?selectedItem.parent:undefined
318
+              parent:selectedItem.parent?selectedItem.parent:undefined,
319
+              addSummary: selectedItem.addSummary.value
306 320
             },
307 321
           };
308 322
           api_user_data

+ 631 - 0
assets/views/businessConfiguration/workHourManagement.html

@@ -0,0 +1,631 @@
1
+<style>
2
+   .bigBoxBg{
3
+       background-color: rgb(249,249,249);
4
+       padding: 8px 0
5
+   }
6
+   .leftBox{
7
+       border: 1px rgb(234,234,234) solid;
8
+       background-color: white;
9
+       padding: 11px;
10
+       margin-top: 7px;
11
+       height: 565px;
12
+   }
13
+   .leftBox i{
14
+       font-size: 14px;
15
+       color: rgb(121,163,196)
16
+   }
17
+   .leftBox .list{
18
+       height: 30px;
19
+       line-height: 30px;
20
+       padding: 0 4px
21
+   }
22
+   .leftBox .listCliI{
23
+       color:rgb(0,83,149)
24
+   }
25
+   .leftBox .listCli{
26
+       background-color: rgb(230,238,244);
27
+   }
28
+   .leftBox .list span{
29
+       font-size: 14px;
30
+       display: inline-block;
31
+       margin-left: 4px
32
+   }
33
+   .rightBox{
34
+        border: 1px rgb(234,234,234) solid;
35
+       background-color: white;
36
+       padding: 11px;
37
+       margin-top: 7px;
38
+       /* height: 565px; */
39
+   }
40
+   .btn_box{
41
+       margin-top: 8px;
42
+       width: 100%;
43
+       display: flex;
44
+       justify-content:center
45
+   }
46
+   .btnAdd{
47
+       width: 60px!important;
48
+       height: 34px!important;
49
+       background-color: rgb(0,83,149)!important;
50
+       border:1px rgb(0,83,149) solid;
51
+       color: white;
52
+       font-size: 14px;
53
+       margin-top: 8px
54
+   }
55
+   .btnReturn{
56
+       width: 100px!important;
57
+       height: 34px!important;
58
+       background-color: white!important;
59
+       border:1px #666666 solid;
60
+       color: #666666;
61
+       font-size: 14px;
62
+       margin-top: 8px;
63
+       margin-left: 8px
64
+   }
65
+   .emergencyIptSize{
66
+        width: 100%;
67
+        margin-top: 8px
68
+    }
69
+    .guanbiIco{
70
+        display: inline-block;
71
+        color: #999999;
72
+        margin-top: 10px;
73
+        margin-left: 9px;
74
+        font-size: 16px!important;
75
+        cursor: pointer;
76
+    }
77
+    .contentName{
78
+        text-align: center
79
+    }
80
+    .fonsize{
81
+        font-size: 14px
82
+    }
83
+   /* 故障现象开始 */
84
+   /* 公共css,需要复用 */
85
+    
86
+   .iconfont {
87
+        font-size: 14px;
88
+    }
89
+    
90
+    .nav-pills>li>a {
91
+        border-radius: 0px;
92
+    }
93
+    
94
+    .nav-pills>li.active>a,
95
+    .nav-pills>li.active>a:hover,
96
+    .nav-pills>li.active>a:focus {
97
+        background-color: #006bbf;
98
+        color: white !important;
99
+    }
100
+    
101
+    .panel-tabs,
102
+    .tabbable {
103
+        /* padding: 14px; */
104
+        background-color: white;
105
+    }
106
+    
107
+    .tab-content>.tab-pane,
108
+    .pill-content>.pill-pane {
109
+        padding: 14px;
110
+        border-bottom: 1px solid #eeeeee;
111
+        border-left: 1px solid #eeeeee;
112
+        border-right: 1px solid #eeeeee;
113
+        border-radius: 0px 0px 8px 8px;
114
+    }
115
+    
116
+    .nav-tabs>li.active a,
117
+    .nav-tabs>li.active a:hover,
118
+    .nav-tabs>li.active a:focus {
119
+        background-color: #006bc0;
120
+        color: white;
121
+    }
122
+    
123
+    .nav-tabs {
124
+        border-top: 1px solid #eeeeee;
125
+        border-bottom: 1px solid #eeeeee;
126
+        border-left: 1px solid #eeeeee;
127
+        border-right: 1px solid #eeeeee;
128
+        border-radius: 8px 8px 0 0;
129
+        height: 47px;
130
+    }
131
+    
132
+    .nav-tabs>li {
133
+        border-right: 1px solid #eeeeee;
134
+    }
135
+    
136
+    .nav-tabs>li:last-child {
137
+        border-right: none;
138
+    }
139
+    /* 独立css */
140
+    
141
+    .mainDiv {
142
+        /* background: red; */
143
+        /* padding: 14px; */
144
+        /* height: 50px; */
145
+        overflow: hidden;
146
+        /* zoom: 1; */
147
+    }
148
+    
149
+    .mainDivLeft {
150
+        border-radius: 8px;
151
+        border: 1px solid #eeeeee;
152
+        width: 288px;
153
+        float: left;
154
+    }
155
+    
156
+    .mainDivRight {
157
+        margin-left: 302px;
158
+        border-radius: 8px;
159
+        border: 1px solid #eeeeee;
160
+    }
161
+    
162
+    .mainDiv-head {
163
+        height: 47px;
164
+        line-height: 47px;
165
+        background: #f5f5f5;
166
+        font-size: 16px;
167
+        color: #606367;
168
+        border-radius: 8px 8px 0 0;
169
+        padding-left: 10px;
170
+        padding-right: 4px;
171
+    }
172
+    
173
+    .mainDivLeft-span {
174
+        border: 1px solid;
175
+        /* padding: 15px 0px 15px 0px; */
176
+        padding-left: 15px;
177
+        padding-right: 15px;
178
+        padding-top: 4px;
179
+        padding-bottom: 4px;
180
+        height: 28px;
181
+        line-height: 28px;
182
+        border-radius: 4px;
183
+        margin-right: 10px;
184
+        font-size: 14px;
185
+    }
186
+    
187
+    .mainDiv-head-right {
188
+        display: inline-block;
189
+        float: right;
190
+    }
191
+    
192
+    .edit-left {
193
+        display: inline-block;
194
+        /* float: left; */
195
+        margin-left: 10px;
196
+    }
197
+    
198
+    .span-1 {
199
+        border-color: #006bc0;
200
+        color: #006bc0;
201
+    }
202
+    
203
+    .span-2 {
204
+        border: none;
205
+        color: white;
206
+        background-color: #006bc0;
207
+    }
208
+    
209
+    .span-3 {
210
+        border: none;
211
+        color: white;
212
+        background-color: #fc4c58;
213
+    }
214
+    
215
+    .mainDiv-body {
216
+        border-radius: 8px;
217
+        border: 1px solid #eeeeee;
218
+        margin: 14px;
219
+        padding-top: 14px;
220
+        padding-bottom: 140px;
221
+        /* height: 402px; */
222
+        overflow: auto;
223
+    }
224
+    
225
+    .mainDiv-body-1 {
226
+        height: 50px;
227
+        line-height: 50px;
228
+        font-size: 16px;
229
+        color: #606367;
230
+        padding: 0px 14px;
231
+        border-bottom: 1px solid #eeeeee;
232
+    }
233
+    
234
+    .mainDiv-body-2 {
235
+        height: 70px;
236
+        line-height: 70px;
237
+        font-size: 14px;
238
+        color: #606367;
239
+        padding: 0px 30px;
240
+        border-bottom: 1px solid #eeeeee;
241
+    }
242
+    
243
+    .mainDiv-body-2:last-child {
244
+        border-bottom: none;
245
+    }
246
+    
247
+    .fixHeight {
248
+        /* height: 450px; */
249
+        overflow: auto;
250
+    }
251
+    
252
+    .mainDiv-body-3 {
253
+        height: 50px;
254
+        line-height: 50px;
255
+        font-size: 14px;
256
+        color: #606367;
257
+        padding: 0px 30px;
258
+        border-bottom: 1px solid #eeeeee;
259
+    }
260
+    
261
+    .mainDiv-body-3:last-child {
262
+        border-bottom: none;
263
+    }
264
+    .btn{
265
+        margin-left: 5px
266
+    }
267
+    .mainDiv-body-img {
268
+        height: 90px;
269
+        border-radius: 4px;
270
+        margin: 14px;
271
+        margin-bottom: 0px;
272
+        overflow: hidden;
273
+    }
274
+    
275
+    .mainDiv-body-noList {
276
+        height: 110px;
277
+        margin: 50px 0;
278
+        text-align: center;
279
+    }
280
+    
281
+    .form-control {
282
+        display: inline-block;
283
+    }
284
+    
285
+    .mainDivLeft-span-1 {
286
+        border: 1px solid;
287
+        padding-left: 15px;
288
+        padding-right: 15px;
289
+        /* padding-top: 4px; */
290
+        /* padding-bottom: 4px; */
291
+        height: 28px;
292
+        line-height: 28px;
293
+        border-radius: 4px;
294
+        margin-right: 10px;
295
+        font-size: 14px;
296
+        display: inline-block;
297
+    }
298
+    
299
+    .mainDivLeft-span-2 {
300
+        border: 1px solid;
301
+        padding-left: 15px;
302
+        padding-right: 15px;
303
+        /* padding-top: 4px; */
304
+        /* padding-bottom: 4px; */
305
+        height: 28px;
306
+        line-height: 28px;
307
+        border-radius: 4px;
308
+        margin-right: 10px;
309
+        font-size: 14px;
310
+        display: inline-block;
311
+    }
312
+    
313
+    .mainDivLeft-span-edit-1 {
314
+        border: 1px solid;
315
+        padding-left: 8px;
316
+        padding-right: 8px;
317
+        /* padding-top: 4px; */
318
+        /* padding-bottom: 4px; */
319
+        height: 22px;
320
+        line-height: 22px;
321
+        border-radius: 2px;
322
+        margin-right: 10px;
323
+        font-size: 12px;
324
+        display: inline-block;
325
+    }
326
+    
327
+    .mainDivLeft-span-edit-2 {
328
+        border: 1px solid;
329
+        padding-left: 8px;
330
+        padding-right: 8px;
331
+        /* padding-top: 4px; */
332
+        /* padding-bottom: 4px; */
333
+        height: 22px;
334
+        line-height: 22px;
335
+        border-radius: 2px;
336
+        margin-right: 10px;
337
+        font-size: 12px;
338
+        display: inline-block;
339
+    }
340
+    /* tab内容css */
341
+    
342
+    .tab-mainDiv {
343
+        border: 1px solid #eeeeee;
344
+        border-radius: 8px;
345
+        /* min-height: 360px; */
346
+    }
347
+    
348
+    .tab-mainDiv-head {
349
+        text-align: center;
350
+        border-bottom: 1px solid #eeeeee;
351
+        height: 34px;
352
+        line-height: 34px;
353
+        font-size: 14px;
354
+        color: #93989e;
355
+    }
356
+    
357
+    .tab-mainDiv-body {
358
+        padding: 14px;
359
+        min-height: 280px;
360
+        max-height: 320px;
361
+        overflow: auto;
362
+        /* padding-top: 14px; */
363
+        /* padding-bottom: 14px; */
364
+    }
365
+    
366
+    .tab-mainDiv-body-lineDiv-50 {
367
+        /* display: inline-block; */
368
+        font-size: 14px;
369
+        color: #93989e;
370
+        margin-right: 14px;
371
+        width: 47%;
372
+        padding-left: 14px;
373
+    }
374
+    
375
+    .tab-mainDiv-body-lineDiv-100 {
376
+        /* display: inline-block; */
377
+        font-size: 14px;
378
+        color: #93989e;
379
+        margin-right: 14px;
380
+        width: 96%;
381
+        padding-left: 14px;
382
+    }
383
+    
384
+    .tab-mainDiv-body-lable {
385
+        padding-bottom: 10px;
386
+        /* width: 370px; */
387
+    }
388
+    
389
+    .tab-mainDiv-body-content {
390
+        padding-bottom: 10px;
391
+        /* width: 370px; */
392
+    }
393
+    
394
+    .tab-mainDiv-body-content>textarea {
395
+        min-height: 68px;
396
+        width: 100%;
397
+    }
398
+    
399
+    .tab-mainDiv-foot {
400
+        /* margin: 14px auto; */
401
+        border-top: 1px solid #eeeeee;
402
+        text-align: center;
403
+        padding: 7px;
404
+    }
405
+    
406
+    .tab-mainDiv-body-button-1 {
407
+        display: inline-block;
408
+        width: 80px;
409
+        height: 34px;
410
+        line-height: 34px;
411
+        font-size: 14px;
412
+        color: white;
413
+        text-align: center;
414
+        background-color: #006bc0;
415
+        border-radius: 4px;
416
+        margin-right: 14px;
417
+    }
418
+    
419
+    .tab-mainDiv-body-button-2 {
420
+        display: inline-block;
421
+        width: 80px;
422
+        height: 34px;
423
+        line-height: 34px;
424
+        font-size: 14px;
425
+        color: #93989e;
426
+        text-align: center;
427
+        background-color: #f5f5f5;
428
+        border-radius: 4px;
429
+        box-sizing: border-box;
430
+        border: 1px solid #eeeeee;
431
+    }
432
+    
433
+    .abn-tree {}
434
+    
435
+    .tree-control .tree-view {
436
+        width: inherit;
437
+        z-index: 9999;
438
+    }
439
+    .userGroupType label:nth-child(2){
440
+        margin-left: 26px;
441
+        margin-bottom: 20px;
442
+    }
443
+    .userGroupType label input{
444
+        margin-right: 5px;
445
+    }
446
+    /* 故障现象结束 */
447
+</style>
448
+
449
+<section id="page-title">
450
+    <div class="row">
451
+        <div class="col-sm-8">
452
+            <h1 class="mainTitle">工时管理
453
+                <i tooltip='工时管理' tooltip-placement="right" class="fa ti-help-alt margin-left-10 fontcolor-five pointfont"></i>
454
+            </h1>
455
+        </div>
456
+    </div>
457
+</section>
458
+<div ng-controller="workHourManagement">
459
+    <div class="col-xs-12 bigBoxBg">
460
+        <div class="col-xs-12">
461
+            <div class="fonsize">工时管理</div>
462
+            <div class="rightBox">
463
+                <!-- 工时管理开始 -->
464
+                <div>
465
+                    <div class="mainDiv">
466
+                        <!-- 谁固定谁在前 -->
467
+                        <div class="mainDivLeft">
468
+                            <div class="mainDiv-head">
469
+                                <span>工时目录</span>
470
+                                <div class="mainDiv-head-right">
471
+                                    <div class="btn btn_search" ng-click="addType(output)" ng-show="xinzeng">新增</div>
472
+                                    <div class="btn btn_remove" ng-class="isMousedown?'btn_removeMousedown':''" ng-mousedown="changeRemoveClass()" ng-click="remove(output)" ng-show="shanchu">删除</div>
473
+                                </div>
474
+                            </div>
475
+                            <div class="mainDiv-body fixHeight">
476
+                                <div class="box-tree">
477
+                                    <span ng-if="doing_async">...加载中...</span>
478
+                                    <abn-tree tree-data="my_data" tree-control="my_tree" on-select="my_tree_handler(branch)" expand-level="2" icon-leaf="iconfont icon-fenlei" icon-expand="ti-plus" icon-collapse="ti-minus"></abn-tree>
479
+                                </div>
480
+                
481
+                            </div>
482
+                        </div>
483
+                
484
+                        <div class="mainDivRight" ng-if="changecate">
485
+                            <div class="mainDiv-head">
486
+                                <span>工时目录修改</span>
487
+                            </div>
488
+                            <div class="mainDiv-body">
489
+                                <div class="tab-mainDiv-body-lineDiv-50">
490
+                                    <div class="tab-mainDiv-body-lable">
491
+                                        <span class="red">*</span>工时名称:
492
+                                    </div>
493
+                                    <div class="tab-mainDiv-body-content">
494
+                                        <input class="form-control" ng-model="subdata.workName" placeholder="工时名称..." />
495
+                                    </div>
496
+                                </div>
497
+                                <div class="tab-mainDiv-body-lineDiv-50" ng-if="thisParent">
498
+                                    <div class="tab-mainDiv-body-lable">
499
+                                        父类:
500
+                                    </div>
501
+                                    <div class="tab-mainDiv-body-content">
502
+                                        <multi-select-tree ng-model="subdata.parent" data-input-model="tree_data" data-output-model="subdata.parent" theme="bootstrap" multi-select="false" data-default-label="{{thisParent.workName}}" data-callback="onFilterCallback(item)" data-select-only-leafs="false" data-trans-label="label"
503
+                                            data-switch-view="false"></multi-select-tree>
504
+                                    </div>
505
+                                </div>
506
+                                <div class="tab-mainDiv-body-lineDiv-50">
507
+                                    <div class="tab-mainDiv-body-lable">
508
+                                        <span class="red">*</span>工价:
509
+                                    </div>
510
+                                    <div class="tab-mainDiv-body-content">
511
+                                        <input class="form-control" ng-model="subdata.wage" ng-blur="changeNum(subdata.wage, 'wage')" placeholder="当前工时名称的价格,请输入数字..." />
512
+                                    </div>
513
+                                </div>
514
+                                <div class="tab-mainDiv-body-lineDiv-50">
515
+                                    <div class="tab-mainDiv-body-lable">
516
+                                        <span class="red">*</span>消耗工时数量:
517
+                                    </div>
518
+                                    <div class="tab-mainDiv-body-content">
519
+                                        <input class="form-control" ng-model="subdata.workHourNum" ng-blur="changeNum(subdata.workHourNum, 'workHourNum')" placeholder="小时为单位,请输入数字..." />
520
+                                    </div>
521
+                                </div>
522
+                                <div class="tab-mainDiv-body-lineDiv-50">
523
+                                    <div class="tab-mainDiv-body-lable"><span class="red">*</span>所属责任科室:</div>
524
+                                    <ui-select class="tab-mainDiv-body-content" ng-model="subdata.duty"
525
+                                            theme="bootstrap">
526
+                                        <ui-select-match allow-clear placeholder="">
527
+                                            {{$select.selected.dept}}
528
+                                        </ui-select-match>
529
+                                        <ui-select-choices repeat="item in dutyList" refresh="getDutyList($select.search)">
530
+                                            <div ng-bind-html="item.dept | highlight: $select.search"></div>
531
+                                        </ui-select-choices>
532
+                                    </ui-select>
533
+                                </div>
534
+                            </div>
535
+                            <div class="tab-mainDiv-foot">
536
+                                <div class="btn btn_search" ng-click="submitchange(subdata)" ng-show="bianji">
537
+                                    确认
538
+                                </div>
539
+                                <!-- <div class="tab-mainDiv-body-button-2 pointfont" ng-click="cancel()">
540
+                                    取消
541
+                                </div> -->
542
+                            </div>
543
+                        </div>
544
+                
545
+                        <div class="mainDivRight" ng-if="addcate">
546
+                            <div class="mainDiv-head">
547
+                                <span>工时目录新增</span>
548
+                            </div>
549
+                            <div class="mainDiv-body">
550
+                                <div class="tab-mainDiv-body-lineDiv-50">
551
+                                    <div class="tab-mainDiv-body-lable">
552
+                                        <span class="red">*</span>工时名称:
553
+                                    </div>
554
+                                    <div class="tab-mainDiv-body-content">
555
+                                        <input class="form-control" ng-model="adddata.workName" placeholder="工时名称..." />
556
+                                    </div>
557
+                                </div>
558
+                                <div class="tab-mainDiv-body-lineDiv-50">
559
+                                    <div class="tab-mainDiv-body-lable">
560
+                                        是否有父类:
561
+                                    </div>
562
+                                    <div class="tab-mainDiv-body-content">
563
+                                        <switch ng-model="addparent" class="green"></switch>
564
+                                    </div>
565
+                                </div>
566
+                                <div class="tab-mainDiv-body-lineDiv-50" ng-if="addparent">
567
+                                    <div class="tab-mainDiv-body-lable">
568
+                                        父类:
569
+                                    </div>
570
+                                    <div class="tab-mainDiv-body-content">
571
+                                        <multi-select-tree ng-model="adddata.parent" data-input-model="tree_data" data-output-model="adddata.parent" theme="bootstrap" multi-select="false" data-default-label="工时目录" data-callback="onFilterCallback(item)" data-select-only-leafs="false" data-trans-label="label"
572
+                                            data-switch-view="false"></multi-select-tree>
573
+                                    </div>
574
+                                </div>
575
+                                <div class="tab-mainDiv-body-lineDiv-50">
576
+                                    <div class="tab-mainDiv-body-lable">
577
+                                        <span class="red">*</span>工价:
578
+                                    </div>
579
+                                    <div class="tab-mainDiv-body-content">
580
+                                        <input class="form-control" ng-model="adddata.wage" ng-blur="changeNum(adddata.wage, 'wage')" placeholder="当前工时名称的价格,请输入数字..." />
581
+                                    </div>
582
+                                </div>
583
+                                <div class="tab-mainDiv-body-lineDiv-50">
584
+                                    <div class="tab-mainDiv-body-lable">
585
+                                        <span class="red">*</span>消耗工时数量:
586
+                                    </div>
587
+                                    <div class="tab-mainDiv-body-content">
588
+                                        <input class="form-control" ng-model="adddata.workHourNum" ng-blur="changeNum(adddata.workHourNum, 'workHourNum')" placeholder="小时为单位,请输入数字..." />
589
+                                    </div>
590
+                                </div>
591
+                                <div class="tab-mainDiv-body-lineDiv-50">
592
+                                    <div class="tab-mainDiv-body-lable"><span class="red">*</span>所属责任科室:</div>
593
+                                    <ui-select class="tab-mainDiv-body-content" ng-model="adddata.duty"
594
+                                            theme="bootstrap">
595
+                                        <ui-select-match allow-clear placeholder="">
596
+                                            {{$select.selected.dept}}
597
+                                        </ui-select-match>
598
+                                        <ui-select-choices repeat="item in dutyList" refresh="getDutyList($select.search)">
599
+                                            <div ng-bind-html="item.dept | highlight: $select.search"></div>
600
+                                        </ui-select-choices>
601
+                                    </ui-select>
602
+                                </div>
603
+                            </div>
604
+                            <div class="tab-mainDiv-foot">
605
+                                <div class="btn btn_search" ng-click="submitadd(adddata)">
606
+                                    确认
607
+                                </div>
608
+                                <div class="btn btn_clean" ng-click="closethis(addcategory)">
609
+                                    取消
610
+                                </div>
611
+                            </div>
612
+                        </div>
613
+                
614
+                        <div class="mainDivRight" ng-if="addcate==''&&changecate==''">
615
+                            <div class="mainDiv-head">
616
+                                <span>操作提示</span>
617
+                            </div>
618
+                            <div class="mainDiv-body">
619
+                                <div class="mainDiv-body-noList">
620
+                                    <img src="./assets/images/place/icon_quesheng.png" alt="">
621
+                                    <p class="handlefont">请选择工时目录</p>
622
+                                </div>
623
+                            </div>
624
+                        </div>
625
+                    </div>   
626
+                </div>
627
+                <!-- 工时管理结束 -->
628
+            </div>
629
+        </div>
630
+    </div>
631
+</div>

+ 13 - 0
assets/views/system/tpl/responsibilityDeptchange.html

@@ -42,6 +42,19 @@
42 42
                     <input class="form-control" ng-model="deptdata.phone" placeholder="科室电话" />
43 43
                 </div>
44 44
             </div>
45
+            <div class="margin-bottom-15 anline">
46
+                <div class="pull-left openaddlable control-label fontcolor-two fontsizes-14">是否需要填写汇总单<span class="red">*</span>:</div>
47
+                <div class="pull-right openaddinput">
48
+                    <ui-select ng-model="deptdata.addSummary" theme="bootstrap">
49
+                        <ui-select-match placeholder="请选择">
50
+                            {{$select.selected.name}}
51
+                        </ui-select-match>
52
+                        <ui-select-choices repeat="item in summaryOrderList | filter: $select.search">
53
+                            <div ng-bind-html="item.name | highlight: $select.search"></div>
54
+                        </ui-select-choices>
55
+                    </ui-select>
56
+                </div>
57
+            </div>
45 58
         </div>
46 59
     </form>
47 60
 </div>