Pārlūkot izejas kodu

第三方公司增删改查

seimin 3 gadi atpakaļ
vecāks
revīzija
021bd48704

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

@@ -184,6 +184,7 @@ app.constant('JS_REQUIRES', {
184 184
         'requestermgrCtrl': 'assets/js/controllers/system/user/adminrequesterCtrl.js',
185 185
         'usermgrCtrl': 'assets/js/controllers/system/user/adminUserCtrl.js',
186 186
         'rolemgrCtrl': 'assets/js/controllers/system/user/adminRoleCtrl.js',
187
+        'thirdPartyCompanyCtrl': 'assets/js/controllers/system/thirdPartyCompanyCtrl.js',
187 188
         // 自定义报表
188 189
         'selfDefinedReportCtrl': 'assets/js/controllers/system/selfDefinedReport/selfDefinedReportCtrl.js',
189 190
         //user end

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

@@ -1773,6 +1773,14 @@ app.config(['$authProvider', '$httpProvider', '$stateProvider', '$urlRouterProvi
1773 1773
                 ncyBreadcrumb: {
1774 1774
                     label: 'User List Manager'
1775 1775
                 }
1776
+            }).state('app.system.thirdPartyCompany', {
1777
+                url: '/thirdPartyCompany',
1778
+                templateUrl: "assets/views/system/thirdPartyCompany.html",
1779
+                title: 'User List Manager',
1780
+                resolve: loadSequence('jquery-sparkline', 'spin', 'ladda', 'angular-ladda', 'ui.select', 'angularBootstrapNavTree', 'multi.select.tree', 'ui.grid', 'thirdPartyCompanyCtrl'),
1781
+                ncyBreadcrumb: {
1782
+                    label: 'User List Manager'
1783
+                }
1776 1784
             }).state('app.system.user.role', {
1777 1785
                 url: '/roles',
1778 1786
                 templateUrl: "assets/views/system/user/role.html",

+ 23 - 3
assets/js/controllers/customform/customformCtrl.js

@@ -11274,6 +11274,7 @@ appFormly.config(function config(formlyConfigProvider) {
11274 11274
       return {
11275 11275
         templateOptions: {
11276 11276
           refreshData: function (search, options, model, that) {
11277
+            console.log(search, options, model, that)
11277 11278
             var process = options.templateOptions.ApiService.all("");
11278 11279
             if (search) {
11279 11280
             } else {
@@ -11297,13 +11298,32 @@ appFormly.config(function config(formlyConfigProvider) {
11297 11298
                 // }
11298 11299
                 // 过滤下拉列表已选择的值
11299 11300
                 var modelVal = $scope.model[$scope.options.key];
11301
+                var ides = [];
11302
+                var rList = result.list || result;
11303
+                if($scope.options.key == "serviceTypeIds"){
11304
+                  modelVal = modelVal.map(function(v){
11305
+                    if(typeof v !== 'object'){
11306
+                      return {id:v};
11307
+                    }else{
11308
+                      return v;
11309
+                    }
11310
+                  })
11311
+                }
11300 11312
                 for (var i = 0; i < modelVal.length; i++) {
11301
-                  for (var j = 0; j < result.list.length; j++) {
11302
-                    if (result.list[j].id == modelVal[i].id) {
11303
-                      result.list.splice(j, 1);
11313
+                  for (var j = 0; j < rList.length; j++) {
11314
+                    if (rList[j].id == modelVal[i].id) {
11315
+                      ides.push(rList[j].id);
11304 11316
                     }
11305 11317
                   }
11306 11318
                 }
11319
+                ides.forEach(function(v1){
11320
+                  rList.forEach(function(v2,i2){
11321
+                    if(v1 == v2.id){
11322
+                      rList.splice(i2,i);
11323
+                    }
11324
+                  })
11325
+                })
11326
+                
11307 11327
                 if (options.templateOptions.optionsDataKey) {
11308 11328
                   options.templateOptions.options =
11309 11329
                     result[options.templateOptions.optionsDataKey];

+ 48 - 4
assets/js/controllers/system/systemFormCtrl.js

@@ -44,6 +44,23 @@ sysFormly.controller('SystemformCtrl', ['$rootScope', '$scope', '$parse', '$filt
44 44
             modelWatch.model.repairType = $scope.repairMain.valueconfig;
45 45
             console.log(modelWatch, 'repairType')
46 46
             // console.log("modelWatch:"+ JSON.stringify(modelWatch));
47
+            if(modelWatch.model.company && modelWatch.model.company.serviceTypeIds && modelWatch.model.company.serviceTypeNames){
48
+                //如果是第三方公司管理
49
+                modelWatch.model.company.serviceTypeIds = modelWatch.model.company.serviceTypeIds.split(',').map(v=>v-0);
50
+                modelWatch.model.company.xxx = angular.copy(modelWatch.model.company.serviceTypeIds).map(v=>Number(v));
51
+                modelWatch.model.company.serviceTypeNames = modelWatch.model.company.serviceTypeNames.split(',');
52
+                modelWatch.model.company.serviceTypeIds = modelWatch.model.company.serviceTypeIds.map(function(v,i){
53
+                    return {id:v,name:modelWatch.model.company.serviceTypeNames[i]}
54
+                })
55
+                
56
+                console.log(modelWatch.model.company.serviceTypeIds)
57
+            }
58
+            if(modelWatch.model.company && modelWatch.model.company.categoryTypeIds){
59
+                modelWatch.model.company.categoryTypeIds = modelWatch.model.company.categoryTypeIds.split(',').map(v=>v-0);
60
+                modelWatch.model.company.categoryTypeIds = modelWatch.model.company.categoryTypeIds.map(function(v,i){
61
+                    return {id:v}
62
+                })
63
+            }
47 64
         }
48 65
         if (angular.isDefined($stateParams.fields) && $stateParams.fields != "") {
49 66
             fieldsWatch = JSON.parse($stateParams.fields);
@@ -625,7 +642,7 @@ sysFormly.controller('SystemformCtrl', ['$rootScope', '$scope', '$parse', '$filt
625 642
             $timeout(function () {
626 643
                 $scope.fabuDisplay = false;
627 644
             }, 2000);
628
-            if ($stateParams.formKey == "system_edit" || $stateParams.formKey == "system_edit_requester" || $stateParams.formKey == "system_add_menu" || $stateParams.formKey == "system_add_service" || $stateParams.formKey == "noticeEditor" || $stateParams.formKey == "noticeEdi" || $stateParams.formKey == "serviceGuideForm" || $stateParams.formKey == "serviceGuideEdi") {
645
+            if ($stateParams.formKey == "company_edit" ||$stateParams.formKey == "system_edit" || $stateParams.formKey == "system_edit_requester" || $stateParams.formKey == "system_add_menu" || $stateParams.formKey == "system_add_service" || $stateParams.formKey == "noticeEditor" || $stateParams.formKey == "noticeEdi" || $stateParams.formKey == "serviceGuideForm" || $stateParams.formKey == "serviceGuideEdi") {
629 646
                 // console.log("roleid="+$scope.roleid);
630 647
                 if (vm.form.$valid) {
631 648
                     if ($scope.formData.name == "system_edit" && vm.model.user && vm.model.user.role.length == 0) {
@@ -642,6 +659,13 @@ sysFormly.controller('SystemformCtrl', ['$rootScope', '$scope', '$parse', '$filt
642 659
                             type: "error",
643 660
                             confirmButtonColor: "#DD6B55"
644 661
                         });
662
+                    } else if ($scope.formData.name == "company_edit" && !vm.model.company.serviceTypeIds.length) {
663
+                        SweetAlert.swal({
664
+                            title: "公司服务种类未填",
665
+                            text: "请填写此项!",
666
+                            type: "error",
667
+                            confirmButtonColor: "#DD6B55"
668
+                        });
645 669
                     } else {
646 670
                         vm.options.updateInitialValue();
647 671
                         $scope.ldloading[style.replace('-', '_')] = true;
@@ -838,6 +862,26 @@ sysFormly.controller('SystemformCtrl', ['$rootScope', '$scope', '$parse', '$filt
838 862
                                             delete vm.model.user.dept.children;
839 863
                                         }
840 864
                                     }
865
+                                    if ($scope.formData.name == "company_edit") {
866
+                                        if(vm.model.company.serviceTypeIds && typeof vm.model.company.serviceTypeIds !== 'string'){
867
+                                            vm.model.company.serviceTypeIds = vm.model.company.serviceTypeIds.map(function(v){
868
+                                                return (v.id || v)-0;
869
+                                            }).toString(); 
870
+                                        }
871
+                                        if(vm.model.company.categoryTypeIds && typeof vm.model.company.categoryTypeIds !== 'string'){
872
+                                            vm.model.company.categoryTypeIds = vm.model.company.categoryTypeIds.map(function(v){
873
+                                                return (v.id || v)-0;
874
+                                            }).toString(); 
875
+                                        }
876
+                                        delete vm.model.incident;
877
+                                        delete vm.model.loginUser;
878
+                                        delete vm.model.repairType;
879
+                                        delete vm.model.company.serviceTypeNames;
880
+                                        // delete vm.model.company.xxx;
881
+                                        if(vm.model.company.id){
882
+                                            vm.model.company.deleteFlag = 0;
883
+                                        }
884
+                                    }
841 885
                                     console.log($scope);
842 886
                                     if ($scope.formData.name == "noticeEditor") {
843 887
                                         if (vm.model.notice.status) {
@@ -863,7 +907,7 @@ sysFormly.controller('SystemformCtrl', ['$rootScope', '$scope', '$parse', '$filt
863 907
                                     serviceWatch.addData($scope.formData.modelName, vm.model).then(function (response) {
864 908
                                         if (response) {
865 909
                                             var resData = Restangular.stripRestangular(response);
866
-                                            if (resData && resData.status == 200) {
910
+                                            if ((resData && resData.status == 200) || (resData.data&&resData.data.id&&!resData.status)) {
867 911
                                                 if ($scope.formData.name == "system_edit") {
868 912
                                                     if (!response.data.account) {
869 913
                                                         SweetAlert.swal({
@@ -931,8 +975,8 @@ sysFormly.controller('SystemformCtrl', ['$rootScope', '$scope', '$parse', '$filt
931 975
                                                 }
932 976
                                             } else {
933 977
                                                 SweetAlert.swal({
934
-                                                    title: "系统错误",
935
-                                                    text: "系统错误,请稍后重试!",
978
+                                                    title: resData.msg||"系统错误",
979
+                                                    text: resData.msg||"系统错误,请稍后重试!",
936 980
                                                     type: "error",
937 981
                                                     confirmButtonColor: "#DD6B55"
938 982
                                                 });

+ 374 - 0
assets/js/controllers/system/thirdPartyCompanyCtrl.js

@@ -0,0 +1,374 @@
1
+'use strict';
2
+/** 
3
+ * controller for User Profile Example
4
+ */
5
+app.controller('thirdPartyCompanyCtrl', ["$rootScope", "$scope", "$state", "$timeout", "$interval", "$modal", "SweetAlert", "i18nService", "uiGridConstants", "uiGridGroupingConstants", "Restangular", "api_user_data", "api_login",'api_wechatfile', function ($rootScope, $scope, $state, $timeout, $interval, $modal, SweetAlert, i18nService, uiGridConstants, uiGridGroupingConstants, Restangular, api_user_data, api_login,api_wechatfile) {
6
+    $scope.langs = i18nService.getAllLangs();
7
+    $scope.lang = 'zh-cn';
8
+
9
+    i18nService.setCurrentLang($scope.lang);
10
+
11
+    var loginUser = $rootScope.user;
12
+    $scope.xinzeng = false;
13
+    $scope.shanchu = false;
14
+    $scope.bianji = false;
15
+    $scope.chongzhimima = false;
16
+    for (var i = 0; i < loginUser.menu.length; i++) {
17
+        if (loginUser.menu[i].link == "renyuanguanli_xinzeng") {
18
+            $scope.xinzeng = true
19
+        }
20
+        if (loginUser.menu[i].link == "renyuanguanli_shanchu") {
21
+            $scope.shanchu = true
22
+        }
23
+        if (loginUser.menu[i].link == "renyuanguanli_bianji") {
24
+            $scope.bianji = true
25
+        }
26
+        if (loginUser.menu[i].link == "renyuanguanli_chongzhimima") {
27
+            $scope.chongzhimima = true
28
+        }
29
+    }
30
+    $scope.gridOptions = {};
31
+    $scope.gridOptions.data = 'myData';
32
+    $scope.gridOptions.enableColumnResizing = true;
33
+    $scope.gridOptions.enableFiltering = true;
34
+    $scope.gridOptions.enableGridMenu = true;
35
+    $scope.gridOptions.enableRowSelection = true;
36
+    $scope.gridOptions.showGridFooter = true;
37
+    $scope.gridOptions.showColumnFooter = false;
38
+    $scope.gridOptions.fastWatch = true;
39
+    $scope.gridOptions.useExternalFiltering = true;
40
+    $scope.gridOptions.useExternalPagination = true;
41
+    $scope.gridOptions.paginationPageSizes = [10];
42
+    $scope.gridOptions.paginationPageSize = 10;
43
+    $scope.gridOptions.multiSelect = false;
44
+
45
+    $scope.gridOptions.rowIdentity = function (row) {
46
+        return row.id;
47
+    };
48
+    $scope.gridOptions.getRowIdentity = function (row) {
49
+        return row.id;
50
+    };
51
+    //remote data
52
+
53
+    $scope.gridOptions.columnDefs = [{
54
+            name: 'item',
55
+            displayName: '序号',
56
+            width: '5%',
57
+            minWidth: '70',
58
+            enableFiltering: false,
59
+            cellTemplate: '<div>' +
60
+                '<div class="ui-grid-cell-contents">{{row.entity.item}}</div>' +
61
+                '</div>'
62
+        },
63
+        {
64
+            name: 'name',
65
+            displayName: '公司名称',
66
+            width: '20%',
67
+            minWidth: '100',
68
+            enableFiltering: false
69
+        },
70
+        {
71
+            name: 'contacts',
72
+            displayName: '公司联系人',
73
+            width: '20%',
74
+            minWidth: '100',
75
+            enableFiltering: false
76
+        },
77
+        {
78
+            name: 'mphone',
79
+            displayName: '联系人电话',
80
+            width: '20%',
81
+            minWidth: '120',
82
+            enableFiltering: false
83
+        },
84
+        {
85
+            name: 'serviceTypeNames',
86
+            displayName: '公司服务种类',
87
+            width: '20%',
88
+            minWidth: '120',
89
+            enableFiltering: false,
90
+            // cellTemplate: '<div>' +
91
+            //     '<div class="ui-grid-cell-contents">{{row.entity.userType.value == 2 ?row.entity.company.name:row.entity.userType.name}}</div>' +
92
+            //     '</div>'
93
+        },
94
+        {
95
+            name: '操作',
96
+            width: '10%',
97
+            minWidth: '100',
98
+            cellTemplate: '<div><div class="cl-effect-1 ui-grid-cell-contents pull-left">' +
99
+                '<a ng-click="grid.appScope.saveData(row.entity)" ng-show="grid.appScope.bianji" class="bianjifont">编辑</a>' +
100
+                '</div></div>',
101
+            enableFiltering: false
102
+        }
103
+    ];
104
+    $scope.groupdata = {};
105
+    $scope.my_data = [];
106
+
107
+    $scope.select_treedata = [];
108
+    $scope.propTypeOptions = [];
109
+
110
+    $scope.saveData = function (data) {
111
+        var modelData = {
112
+            model: {
113
+                company: data
114
+            }
115
+        };
116
+        modelData.model.company = {
117
+            categoryTypeIds: data.categoryTypeIds,//事件分类
118
+            contacts: data.contacts,//联系人
119
+            id: data.id,//id
120
+            mphone: data.mphone,//联系电话
121
+            name: data.name,//公司名称
122
+            startTime: data.startTime,//开始时间
123
+            endTime: data.endTime,//结束时间
124
+            serviceTypeIds: data.serviceTypeIds,//服务分类ids
125
+            serviceTypeNames: data.serviceTypeNames//服务分类名称s
126
+        }
127
+        console.log(modelData)
128
+        $state.go('app.system.form', {
129
+            formKey: 'company_edit',
130
+            service: 'api_user_data',
131
+            model: JSON.stringify(modelData)
132
+        });
133
+    };
134
+    $scope.addData = function () {
135
+        var modelData = {
136
+            model: {
137
+                user: {}
138
+            }
139
+        };
140
+        $state.go('app.system.form', {
141
+            formKey: 'company_edit',
142
+            service: 'api_user_data',
143
+            model: JSON.stringify(modelData)
144
+        });
145
+    }
146
+
147
+
148
+
149
+    $scope.removeData = function () {
150
+        var modalInstance = $modal.open({
151
+            templateUrl: 'assets/views/delete.html',
152
+            controller: function ($scope, scope, $modalInstance, api_bpm_data) {
153
+                var rmvList = [];
154
+                $scope.title = '第三方公司删除';
155
+                $scope.connect = '确定要删除此第三方公司?';
156
+                angular.forEach(scope.selected.items, function (item) {
157
+                    rmvList.push(item.id);
158
+                });
159
+                $scope.ok = function () {
160
+                    $modalInstance.close(rmvList);
161
+                };
162
+                $scope.cancel = function () {
163
+                    $modalInstance.dismiss('cancel');
164
+                };
165
+            },
166
+            size: 'sm',
167
+            resolve: {
168
+                scope: function () {
169
+                    return $scope;
170
+                }
171
+            }
172
+        });
173
+        modalInstance.result.then(function (selectedItem) {
174
+            if (selectedItem) {
175
+                if (selectedItem.length > 0) {
176
+                    api_user_data.rmvData('company', selectedItem).then(function (response) {
177
+                        if (response.data[0].deleteFlag != 0) {
178
+                            SweetAlert.swal({
179
+                                title: "删除成功!",
180
+                                type: "success",
181
+                                confirmButtonColor: "#007AFF"
182
+                            }, function () {
183
+                                $scope.myData = _.reject($scope.myData, function (o) {
184
+                                    return _.includes(selectedItem, o.id);
185
+                                });
186
+                                $scope.selected = {
187
+                                    items: []
188
+                                };
189
+                                $scope.gridOptions.totalItems = $scope.gridOptions.totalItems - selectedItem.length;
190
+                                $scope.gridApi.grid.selection.selectedCount = 0;
191
+                            });
192
+
193
+                        } else {
194
+                            SweetAlert.swal({
195
+                                title: "无法删除!",
196
+                                text: "【"+response.data[0].name+"】已经绑定了用户!",
197
+                                type: "error"
198
+                            });
199
+                        }
200
+                    })
201
+                }
202
+            }
203
+        })
204
+    }
205
+    //获取公司服务种类
206
+    $scope.company_service_type = [];
207
+    $scope.getCompanyServiceTypes = function(){
208
+        api_wechatfile.getDictionary({
209
+            key: "company_service_type",
210
+            type: "list"
211
+        }).then(function (res) {
212
+            $scope.company_service_type = res;
213
+            $scope.refreshData('expand-right', $scope.fileData);
214
+            $scope.timer = $interval(function () {
215
+                $scope.refreshData('expand-right', $scope.fileData);
216
+            }, $rootScope.refreshTime);
217
+        })
218
+    }
219
+    $scope.getCompanyServiceTypes();
220
+
221
+    $scope.selected = {
222
+        items: []
223
+    }
224
+
225
+    $scope.editted = {
226
+        items: []
227
+    }
228
+
229
+    $scope.gridOptions.onRegisterApi = function (gridApi) {
230
+        $scope.gridApi = gridApi;
231
+        gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
232
+            var filtersData = $scope.memoryfilterData;
233
+            filtersData.idx = newPage - 1;
234
+            filtersData.sum = pageSize;
235
+            $scope.fileData.idx = newPage - 1;
236
+            $scope.fileData.sum = pageSize;
237
+            defaultFilterData = filtersData;
238
+            $scope.refreshData('expand-right', $scope.fileData);
239
+        });
240
+
241
+        gridApi.selection.on.rowSelectionChanged($scope, function (scope) {
242
+            var j = 0;
243
+            for (var i = 0; i <= scope.grid.appScope.selected.items.length; i++) {
244
+                if (scope.grid.appScope.selected.items[i] == scope.entity) {
245
+                    j++;
246
+                    break;
247
+                }
248
+            }
249
+            if (j == 1) {
250
+                scope.grid.appScope.selected.items.splice(i, 1);
251
+            } else {
252
+                scope.grid.appScope.selected.items.push(scope.entity)
253
+            }
254
+        });
255
+        gridApi.core.on.filterChanged($scope, function () {
256
+            var grid = this.grid;
257
+            var filtersData = $scope.memoryfilterData;
258
+            angular.forEach(grid.columns, function (item) {
259
+                if (item.enableFiltering) {
260
+                    if (angular.isDefined(item.filters[0].term) && item.filters[0].term != '') {
261
+                        if (angular.isUndefined(filtersData['company'])) {
262
+                            filtersData['company'] = {};
263
+                            filtersData['company']['flag'] = -1;
264
+                            filtersData['company'][item.field] = item.filters[0].term;
265
+                        } else {
266
+                            filtersData.company.flag = -1;
267
+                            filtersData.company[item.field] = item.filters[0].term;
268
+                        }
269
+                    }
270
+                }
271
+            });
272
+            $scope.memoryfilterData = filtersData;
273
+            $scope.refreshData('expand-right', $scope.fileData);
274
+        });
275
+    };
276
+
277
+
278
+    var defaultFilterData = {
279
+        "idx": 0,
280
+        "sum": 10
281
+    };
282
+
283
+    $scope.memoryfilterData = {
284
+        "idx": 0,
285
+        "sum": 10
286
+    }
287
+
288
+    $scope.ldloading = {};
289
+    $scope.fileData = {
290
+        "idx": 0,
291
+        "sum": 10,
292
+        "company": {}
293
+    }
294
+    $scope.treeItem = "";
295
+    $scope.onFilterCallback = function (item) {
296
+        $scope.treeItem = item
297
+    }
298
+    // 搜索
299
+    $scope.searchData = function () {
300
+        if ($scope.treeItem) {
301
+            $scope.fileData.company.groupdata = $scope.treeItem
302
+        }
303
+        if($scope.fileData.company.name){
304
+            $scope.fileData.company.selectType= "pinyin_qs"
305
+        }
306
+        $scope.refreshData('expand-right', $scope.fileData);
307
+    }
308
+    // 清空
309
+    $scope.clean = function () {
310
+        delete $scope.fileData.company.account;
311
+        delete $scope.fileData.company.name;
312
+        delete $scope.fileData.company.groupdata;
313
+        $scope.treeItem = "";
314
+        $scope.refreshData('expand-right', $scope.fileData);
315
+    }
316
+    //刷新
317
+    $scope.refresh = function (style, filterData) {
318
+        $scope.selected = {
319
+            items: []
320
+        };
321
+        if ($scope.gridApi) {
322
+            $scope.gridApi.grid.selection.selectedCount = 0;
323
+        }
324
+        $scope.refreshData('expand-right', $scope.fileData);
325
+    }
326
+    //获取列表数据
327
+    $scope.refreshData = function (style, filterData) {
328
+        console.log(filterData)
329
+        $scope.ldloading[style.replace('-', '_')] = true;
330
+        if (angular.isUndefined(filterData)) {
331
+            filterData = defaultFilterData;
332
+        }
333
+        if (angular.isDefined($scope.searchTypes)) {
334
+            filterData['searchType'] = $scope.searchTypes;
335
+        }
336
+        $scope.myData = [];
337
+        filterData['flag'] = -1;
338
+        console.log("filterData=" + JSON.stringify(filterData))
339
+        api_user_data.fetchDataList('company', filterData).then(function (data) {
340
+            var myData = Restangular.stripRestangular(data);
341
+            $scope.gridOptions.totalItems = myData.totalNum;
342
+            //数据转换start
343
+            myData.list.forEach(function(v){
344
+                if(v.serviceTypeIds){
345
+                    var sArr = v.serviceTypeIds.split(',');
346
+                    var sNameArr = [];
347
+                    $scope.company_service_type.forEach(function(v1){
348
+                        sArr.forEach(function(v2){
349
+                            if(v1.id == v2){
350
+                                sNameArr.push(v1.name);
351
+                            }
352
+                        })
353
+                    })
354
+                    v.serviceTypeNames = sNameArr.join(',');//公司服务种类名称
355
+                }
356
+            })
357
+            console.log(myData.list);
358
+            //数据转换end
359
+            $scope.myData = myData.list;
360
+            for (var i = 0; i < $scope.myData.length; i++) {
361
+                $scope.myData[i]['item'] = i + 1 + filterData.idx * filterData.sum
362
+            }
363
+            $scope.ldloading[style.replace('-', '_')] = false;
364
+        }, function () {
365
+            $scope.ldloading[style.replace('-', '_')] = false;
366
+        });
367
+
368
+    };
369
+
370
+    
371
+    $scope.$on('$destroy', function () {
372
+        $interval.cancel($scope.timer)
373
+    });
374
+}]);

+ 1 - 1
assets/views/customform/tpl/ui-multiselectplus.html

@@ -1,4 +1,4 @@
1
-<ui-select ng-model="model[options.key]" theme="bootstrap" ng-required="{{to.required}}" ng-change="to['onChange'](model[options.key], options, this, $event ,model);" ng-disabled="{{to.disabled}}" reset-search-input="false" multiple>
1
+<ui-select ng-click="to.refreshData($select.search, options, model, this)" ng-model="model[options.key]" theme="bootstrap" ng-required="{{to.required}}" ng-change="to['onChange'](model[options.key], options, this, $event ,model);" ng-disabled="{{to.disabled}}" reset-search-input="false" multiple>
2 2
     <ui-select-match placeholder="{{to.placeholder}}">
3 3
         {{$item[to.labelProp || 'name']}}
4 4
     </ui-select-match>

+ 77 - 0
assets/views/system/thirdPartyCompany.html

@@ -0,0 +1,77 @@
1
+<style>
2
+    .inspectlistsearch{
3
+        width: 30%!important;
4
+        margin-right: 16px
5
+    }
6
+    .iptSize{
7
+        width: 60%!important;
8
+        height: 28px!important;
9
+    }
10
+    .tree-control .tree-input{
11
+        min-height:28px!important
12
+    }
13
+    .btn{
14
+        margin-bottom: 4px
15
+    }
16
+    .clean{
17
+        border: 1px rgb(0,83,149) solid!important;
18
+        color: rgb(0,83,149)!important;
19
+        background-color: rgb(230,238,244)!important;
20
+        height: 28px!important;
21
+        width: 80px
22
+    }
23
+    .searchBtnBox{
24
+        padding-top: 10px;
25
+    }
26
+    .searchBtnBox>.btn {
27
+        margin: 0 8px 10px 0;
28
+    }
29
+</style>
30
+<section id="page-title">
31
+    <div class="row">
32
+        <div class="col-sm-8">
33
+            <h1 class="mainTitle">第三方公司管理<i tooltip='第三方公司列表,点击操作处理数据' tooltip-placement="right" class="fa  ti-help-alt margin-left-10 fontcolor-five pointfont"></i></h1>
34
+        </div>
35
+    </div>
36
+</section>
37
+<div ng-controller="thirdPartyCompanyCtrl">
38
+    <div class="schuback" id="searchid">
39
+        <div class="row" style="padding-right: 0px !important;">
40
+            <div class="col-xs-9">
41
+                <!-- <form class="form-inline incidentsearchsize col-xs-12">
42
+                    <div class="form-group inspectlistsearch">
43
+                        <div class="control-label pull-left" style="padding-top:4px">账号:</div>
44
+                        <input class="form-control pull-right inputcolor iptSize" style="border-color: #dedede;color: #93989e;" type="text" ng-model="fileData.user.account" placeholder="" />
45
+                    </div>
46
+                    <div class="form-group inspectlistsearch">
47
+                        <div class="control-label pull-left" style="padding-top:4px">姓名:</div>
48
+                        <input class="form-control pull-right inputcolor iptSize" style="border-color: #dedede;color: #93989e;" type="text" ng-model="fileData.user.name" placeholder="" />
49
+                    </div>
50
+                    <div class="form-group inspectlistsearch">
51
+                        <div class="control-label pull-left" style="padding-top:4px">工作组:</div>
52
+                        <div class="pull-right iptSize" style="display:inline">
53
+                            <div>
54
+                                <multi-select-tree ng-model="group.id" data-input-model="select_treedata" data-output-model="cifilter_classics" theme="bootstrap" multi-select="false" data-default-label="工作组选择..." data-callback="onFilterCallback(item)" data-select-only-leafs="true" reset-search-input="false"
55
+                                    data-trans-label="groupName" data-switch-view="false"></multi-select-tree>
56
+                            </div>
57
+                        </div>
58
+                    </div>
59
+                </form> -->
60
+            </div>
61
+            <div class="col-xs-3">
62
+                <div class="pull-right margin-right-20">
63
+                    <!-- <div class="centerdiv-one"></div> -->
64
+                    <div class="pull-left searchBtnBox">
65
+                        <!-- <div class="btn btn_search" ng-click="searchData()">搜索</div> -->
66
+                        <!-- <div class="btn btn_clean" ng-click="clean()">重置</div> -->
67
+                        <div type="button" class="btn btn_search" ng-click="addData()" ng-show="xinzeng"><span translate="list.button.CREATE">Add Data</span></div>
68
+                        <div type="button" class="btn btn_remove" ng-click="removeData()" ng-show="shanchu" ng-disabled="selected.items.length==0" ng-class="isMousedown?'btn_removeMousedown':''" ng-mousedown="changeRemoveClass()"><span translate="list.button.REMOVE">Remove First Row</span></div>
69
+                    </div>
70
+                </div>
71
+            </div>
72
+        </div>
73
+    </div>
74
+    <div class="tableList" ui-i18n="{{lang}}">
75
+        <div id="grid1" ui-grid="gridOptions" ui-grid-pagination external-scopes="$scope" ui-grid-resize-columns ui-grid-selection class="grid"></div>
76
+    </div>
77
+</div>

+ 2 - 0
bower_components/angular-multi-select-tree/dist/angular-multi-select-tree-0.1.0.css

@@ -2,6 +2,8 @@
2 2
 
3 3
 .tree-control .tree-input {
4 4
     /* height: 100%; */
5
+    height: auto;
6
+    overflow: auto;
5 7
     padding-top: 3px;
6 8
     min-height: 30px!important;
7 9
     position: relative;

+ 6 - 4
bower_components/angular-multi-select-tree/dist/angular-multi-select-tree-0.1.0.js

@@ -234,10 +234,12 @@
234 234
              */
235 235
             $scope.deselectItem = function (item, $event) {
236 236
                 $event.stopPropagation();
237
-                if ($scope.itemSelected) {
238
-                    $scope.itemSelected({
239
-                        item: item
240
-                    });
237
+                if(!$scope.multiSelect){
238
+                    if ($scope.itemSelected) {
239
+                        $scope.itemSelected({
240
+                            item: item
241
+                        });
242
+                    }
241 243
                 }
242 244
                 $scope.selectedItems.splice($scope.selectedItems.indexOf(item), 1);
243 245
                 item.selected = false;

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
bower_components/angular-ui-select/dist/select.min.css