ソースを参照

fix: file rename

lufeng 2 年 前
コミット
eecaaddc15

+ 0 - 203
src/main/resources/static/app/business/facility/controller/del_facilityScrapListCtrl.js

@@ -1,203 +0,0 @@
1
-"use strict";
2
-//器材信息
3
-angular.module('app.business')
4
-    .controller("facilityScrapListCtrl", function($scope, $http,$state,$rootScope,facilityListService,enumService,orgService,$stateParams, APP_CONFIG) {
5
-    	
6
-    // 获取列表数据
7
-    	
8
-    	//分页、查询条件
9
-	     $scope.pageInfo = {pageNum : 1, pageSize : 10};
10
-	     $scope.device = {deviceType:"",deviceName:""};
11
-		 
12
-
13
-		 
14
-	 $scope.loadData = function() {
15
-		 
16
-			 if($scope.device.deviceName != undefined && $scope.device.deviceName != ""){
17
-				 
18
-				 if($scope.pageInfo.pageNum!=1||$scope.pageInfo.pageSize!=10){
19
-					 $scope.device.deviceName=$scope.device.deviceName;
20
-				 }else{
21
-					 $scope.device.deviceName = $scope.device.deviceName[0].id;
22
-				 }
23
-		   	 }
24
-		
25
-            facilityListService.getPageInfoFacility($scope.pageInfo.pageNum, $scope.pageInfo.pageSize,$scope.device.deviceName,$scope.device.deviceType,$rootScope.orgInfo.orgName).then(function(data){
26
-				 $scope.pageInfo = data; 
27
-		     },function(data){
28
-		         console.log(data);
29
-		     });
30
-		 
31
-	 }
32
-	 $scope.loadData();
33
-	 //新增
34
-	 $scope.showAddInput = function () {
35
-		 $state.go('app.business.facility.addFacilityScrap',{id:0,isNotEdit:false});
36
-	 }
37
-
38
-
39
-    // 翻页
40
-    $scope.goPage = function(pageNum) {
41
-        $scope.pageInfo.pageNum = pageNum;
42
-        $scope.loadData();
43
-    }
44
-    
45
-    // 根据id删除信息
46
-    $scope.remove = function(id) {
47
-    	deviceInputService.removeById(id).then(function (data) {
48
-            if(data.msg == "success"){
49
-                alert("删除成功");
50
-                $scope.loadData();
51
-            }else{
52
-                alert("删除失败");
53
-            }
54
-        });
55
-    }
56
-    
57
-	
58
-	// 查看页面
59
-    $scope.showViewInput = function(id) {
60
-    	$state.go('app.business.device.inputEdit',{id:id,isNotEdit:true});
61
-    }
62
-    
63
-    //修改页面
64
-    $scope.showEditInput = function(id) {
65
-    	$state.go('app.business.device.inputEdit',{id:id,isNotEdit:false});
66
-    }
67
-
68
-    //树形下拉框获取器材设备名称
69
-    $scope.getDeviceName = function() {
70
-    	$scope.deviceType=angular.fromJson($scope.device.deviceType);
71
-        enumService.getTreeListByTypeId($scope.device.deviceName,$scope.deviceType).then(function(data) {
72
-            $scope.deviceNameTreeData = data;
73
-        },function(data) {
74
-            console.log(data);
75
-        })
76
-    };
77
-    
78
-    
79
-    
80
-})
81
-
82
-    .controller("addFacilityScrapCtrl", function($scope, $filter,$http,$state,$rootScope, facilityListService,equipmentEquipmentPoolService,enumService,$stateParams, APP_CONFIG) {
83
-    	  //根据id获取数据
84
-       /*$scope.loadDataById = function(id) {
85
-                deviceInputService.loadDataById(id).then(function(data){
86
-                	$scope.device = data;
87
-                	$scope.device.inputTime = $filter('date')($scope.device.inputTime, "yyyy-MM-dd");
88
-                	$scope.device.produceTime = $filter('date')($scope.device.produceTime, "yyyy-MM-dd");
89
-                	$scope.device.position=parseInt(data.position);
90
-                	$scope.device.storageRack=parseInt(data.storageRack);
91
-                	$scope.device.storageRackCell=parseInt(data.storageRackCell);
92
-                	$scope.device.deviceManager = parseInt($scope.device.deviceManager);
93
-                	
94
-                	$scope.getDeviceName();
95
-                },function(data){
96
-                    // console.log(data);
97
-                });
98
-            };
99
-            
100
-          //查看修改调用此方法
101
-         if ($stateParams.id != 0) {
102
-        	 $scope.loadDataById($stateParams.id);
103
-         }*/
104
-    	
105
-    	//树形下拉框获取器材设备名称
106
-        $scope.getDeviceName = function(deviceType,deviceName) {
107
-        	//$scope.deviceType=angular.fromJson($scope.device.deviceType);
108
-        	//$scope.device.deviceName=angular.fromJson($scope.device.deviceName);
109
-        	if(deviceType==undefined  ){
110
-        		deviceType=angular.fromJson($scope.device.deviceType);
111
-        	}
112
-            enumService.getTreeListByTypeId(deviceName,deviceType).then(function(data) {
113
-                $scope.deviceNameTreeData = data;
114
-            },function(data) {
115
-                console.log(data);
116
-            })
117
-        };
118
-        
119
-    	$scope.loadDataByParam = function(deviceType,deviceName,model) {
120
-    		$scope.device = {deviceType:null,deviceName:null,model:null};
121
-    		$scope.device.deviceType = parseInt(deviceType);
122
-    		//$scope.device.deviceName = deviceName;
123
-    		$scope.device.model = model;
124
-    		$scope.getDeviceName($scope.device.deviceType,deviceName);
125
-        };
126
-    	if($stateParams.deviceType!=null,$stateParams.deviceName!=null,$stateParams.model!=null){
127
-    		$scope.loadDataByParam($stateParams.deviceType,$stateParams.deviceName,$stateParams.model);
128
-    	}
129
-         //判断可否修改
130
-         var disabled = false;
131
-    	 $("#deviceInput-form input").attr("disabled",disabled);
132
-         $("#deviceInput-form select").attr("disabled",disabled);
133
-         
134
-        if($stateParams.isNotEdit != null){
135
-    	    if ($stateParams.isNotEdit == "false") {
136
-                $scope.isNotEdit = false;
137
-            } else if ($stateParams.isNotEdit == "true") {
138
-                $scope.isNotEdit = true;
139
-            }
140
-        }else{
141
-            $scope.isNotEdit = false;
142
-        }
143
-        
144
-        
145
-        
146
-         // 存放位置
147
-         $scope.loadData = function() {
148
-         	equipmentEquipmentPoolService.getPageInfo(null, null,null).then(function(data){
149
-         		$scope.equipmentEquipmentPool = data.list;
150
-             },function(data){
151
-                 console.log(data);
152
-             });
153
-         }
154
-         $scope.loadData();
155
-         
156
-         // 提交表单
157
-         var validator = $("#deviceInput-form").validate();
158
-         $scope.saveData = function() {
159
-     		if (validator.form()) {
160
-     			//粮库名称
161
-     			//$scope.device.storehouse=$rootScope.depotInfo.orgName;
162
-     			
163
-     			$scope.deviceName=angular.fromJson($scope.device.deviceName);
164
-     			$scope.device.deviceName=$scope.deviceName[0].id;
165
-     			//入库的原始数量
166
-     			//$scope.device.deviceManager = $scope.device.useCount+"";
167
-     			$scope.device.useCount = parseInt($scope.device.deviceManager);
168
-     			 if ($scope.device.deviceName == '' || $scope.device.deviceName == null) {
169
-     	            $("#devicename-error").text("必须填写");
170
-     	        } else {
171
-     	            $("#devicename-error").text("");
172
-     	        }
173
-     			
174
-     			$scope.device.orgId=$rootScope.userInfo.orgId;
175
-     			
176
-     		   $http({
177
-   				method: 'POST',
178
-   				url: APP_CONFIG.deviceUrl + '/deviceInput/save',
179
-   				data: {
180
-   					deviceInputJson : angular.toJson($scope.device)
181
-   				}
182
-   			}).then(function successCallback(response) {
183
-   				if(response.data.status == "success"){
184
-   					alert("保存成功!");
185
-   					$state.go('app.business.device.deviceInputList');
186
-   				}else{
187
-   					alert(response.data.msg);
188
-   					$scope.saveFlag = false;
189
-   				}
190
-   				
191
-   			}, function errorCallback(response) {
192
-   				// 请求失败执行代码
193
-   			});
194
-     		   
195
-     		   
196
-     		   
197
-     		    
198
-     		}
199
-     	}
200
-        
201
-    	
202
-         
203
-    })

+ 7 - 6
src/main/resources/static/app/business/facility/controller/facilityGetListCtrl.js

@@ -29,7 +29,7 @@ angular.module('app.business')
29 29
     
30 30
     // 根据id删除信息
31 31
     $scope.remove = function(id) {
32
-    	facilityListService.removeById(id).then(function (data) {
32
+    	FacilityGetService.removeById(id).then(function (data) {
33 33
             if(data.status == "success"){
34 34
                 alert("删除成功");
35 35
                 $scope.loadData();
@@ -130,11 +130,12 @@ angular.module('app.business')
130 130
                 bz: '',
131 131
             };
132 132
         }
133
-        $scope.useKeepChange = function(e) {
133
+        $scope.useFacilityChange = function(e) {
134 134
             $scope.facility = $scope.facilityList.find(function(v) {
135
-                return v.id === $scope.repairInfo.basicsId;
135
+                return v.id == $scope.repairInfo.basicsId;
136 136
             });
137
-			
137
+			$scope.repairInfo.ssfl = $scope.facility.ssfl;
138
+			$scope.repairInfo.ssmc = $scope.facility.ssmc;
138 139
         };
139 140
          // 存放位置
140 141
         //  $scope.loadData = function() {
@@ -166,10 +167,10 @@ angular.module('app.business')
166 167
      	        // }
167 168
                 
168 169
                 var params = angular.copy($scope.repairInfo);
169
-            	params.ssfl = $scope.facility.ssfl;
170
-                params.ssmc = $scope.facility.ssmc;
171 170
                 params.wxksrq = $("#repairInfo_wxksrq").val();
172 171
                 params.wxjsrq = $("#repairInfo_wxjsrq").val();
172
+                params.gzrq = $("#repairInfo_gzrq").val();
173
+				
173 174
                 FacilityGetService.savaFacility({dFacilitiesRepairJson : angular.toJson(params)}).then(function (response) {
174 175
                     if(response.status == "success"){
175 176
                         alert("保存成功!");

+ 5 - 5
src/main/resources/static/app/business/facility/controller/facilityKeepListCtrl.js

@@ -29,7 +29,7 @@ angular.module('app.business')
29 29
     
30 30
     // 根据id删除信息
31 31
     $scope.remove = function(id) {
32
-    	facilityListService.removeById(id).then(function (data) {
32
+    	facilityKeepService.removeById(id).then(function (data) {
33 33
             if(data.status == "success"){
34 34
                 alert("删除成功");
35 35
                 $scope.loadData();
@@ -130,10 +130,12 @@ angular.module('app.business')
130 130
                 bz: '',
131 131
             };
132 132
         }
133
-        $scope.useKeepChange = function(e) {
133
+        $scope.useFacilityChange = function(e) {
134 134
             $scope.facility = $scope.facilityList.find(function(v) {
135
-                return v.id === $scope.keepInfo.basicsId;
135
+                return v.id == $scope.keepInfo.basicsId;
136 136
             });
137
+            $scope.keepInfo.ssfl = $scope.facility.ssfl;
138
+			$scope.keepInfo.ssmc = $scope.facility.ssmc;
137 139
         };
138 140
          // 存放位置
139 141
         //  $scope.loadData = function() {
@@ -165,8 +167,6 @@ angular.module('app.business')
165 167
      	        // }
166 168
                 
167 169
                 var params = angular.copy($scope.keepInfo);
168
-                params.ssfl = $scope.facility.ssfl;
169
-                params.ssmc = $scope.facility.ssmc;
170 170
                 params.byksrq = $("#keepInfo_byksrq").val();
171 171
                 params.byjsrq = $("#keepInfo_byjsrq").val();
172 172
                 facilityKeepService.savaFacility({dFacilitiesMaintainJson : angular.toJson(params)}).then(function (response) {

+ 0 - 107
src/main/resources/static/app/business/facility/service/del_facilityScrapListService.js

@@ -1,107 +0,0 @@
1
-"use strict";
2
-
3
-angular.module('app.business').service("facilityScrapListService", function($http, $q,$rootScope, APP_CONFIG) {
4
-    //器材列表
5
-	this.getPageInfoFacility = function(pageNum, pageSize,deviceName,deviceType,orgName){
6
-		var d = $q.defer();
7
-		$http({
8
-			method : 'GET',
9
-			url : APP_CONFIG.deviceUrl + '/devicePutStorage/getPageInfoList',
10
-			params : {
11
-				pageNum : pageNum,
12
-				pageSize : pageSize,
13
-				deviceName:deviceName,
14
-				deviceType : deviceType,
15
-				orgName : orgName,
16
-                orgId : $rootScope.orgInfo.orgId
17
-			}
18
-		}).then(function successCallback(response) {
19
-			// 请求成功执行代码
20
-			d.resolve(response.data);
21
-		}, function errorCallback(response) {
22
-			// 请求失败执行代码
23
-			d.reject("error");
24
-		});
25
-		return d.promise;
26
-	}
27
-
28
-  //根据id移除数据
29
-    this.removeById = function(id){
30
-        if (!confirm("确定要删除吗?")) {
31
-            return;
32
-        }
33
-        var d = $q.defer();
34
-        $http({
35
-            method: 'POST',
36
-            url: APP_CONFIG.deviceUrl + '/deviceInput/remove',
37
-            data: {
38
-                id : id
39
-            }
40
-        }).then(function successCallback(response) {
41
-            d.resolve(response.data);
42
-        }, function errorCallback(response) {
43
-            //console.log(response);
44
-        });
45
-        return d.promise;
46
-    }
47
-  
48
-    
49
-   //根据id加载数据
50
-    this.loadDataById = function(id){
51
-        var d = $q.defer();
52
-        $http({
53
-        	method : 'GET',
54
-            url: APP_CONFIG.deviceUrl + '/deviceInput/loadDataById',
55
-            params: {
56
-                id : id
57
-            }
58
-        }).then(function successCallback(response) {
59
-            d.resolve(response.data);
60
-        }, function errorCallback(response) {
61
-            //console.log(response);
62
-        });
63
-        return d.promise;
64
-    }
65
-
66
-  /*//增加
67
-    this.save = function(device){
68
-        var d = $q.defer();
69
-        $http({
70
-            method: 'POST',
71
-            url: APP_CONFIG.deviceUrl + '/deviceInput/save',
72
-            data: {
73
-            	deviceInputJson : angular.toJson(device)
74
-            }
75
-        }).then(function successCallback(response) {
76
-            d.resolve(response.data);
77
-        }, function errorCallback(response) {
78
-            //console.log(response);
79
-        });
80
-        return d.promise;
81
-    }
82
-    */
83
-    
84
-    //设备管理台账
85
-	this.getDeviceAccount = function(pageNum, pageSize,ssfl){
86
-		var d = $q.defer();
87
-		$http({
88
-			method : 'GET',
89
-			url : APP_CONFIG.deviceUrl + '/devicePutStorage/getPageInfoList',
90
-			params : {
91
-				pageNum : pageNum,
92
-				pageSize : pageSize,
93
-                ssfl : ssfl,
94
-				orgName : $rootScope.orgInfo.orgName,
95
-                orgId : $rootScope.orgInfo.orgId
96
-			}
97
-		}).then(function successCallback(response) {
98
-			// 请求成功执行代码
99
-			d.resolve(response.data);
100
-		}, function errorCallback(response) {
101
-			// 请求失败执行代码
102
-			d.reject("error");
103
-		});
104
-		return d.promise;
105
-	}
106
-
107
-})

+ 2 - 2
src/main/resources/static/app/business/facility/views/add-facility-get.html

@@ -20,10 +20,10 @@
20 20
                                                 <select name="ssmc"
21 21
                                                     placeholder="设施名称"
22 22
                                                     ng-model="repairInfo.basicsId"
23
-                                                    ng-options="facility.id as facility.ssmc for facility in facilityList"
23
+                                                    ng-options="facility.id+'' as facility.ssmc for facility in facilityList"
24 24
                                                     ng-disabled="isNotEdit" 
25 25
                                                     ng-readonly="isNotEdit"
26
-                                                    ng-change="useKeepChange()"
26
+                                                    ng-change="useFacilityChange()"
27 27
 													required
28 28
                                                 >
29 29
 													<option value="">--请选择--</option>

+ 2 - 2
src/main/resources/static/app/business/facility/views/add-facility-keep.html

@@ -20,10 +20,10 @@
20 20
                                                 <select name="ssmc"
21 21
                                                     placeholder="设施名称"
22 22
                                                     ng-model="keepInfo.basicsId"
23
-                                                    ng-options="facility.id as facility.ssmc for facility in facilityList"
23
+                                                    ng-options="facility.id+'' as facility.ssmc for facility in facilityList"
24 24
                                                     ng-disabled="isNotEdit" 
25 25
                                                     ng-readonly="isNotEdit"
26
-                                                    ng-change="useKeepChange()"
26
+                                                    ng-change="useFacilityChange()"
27 27
                                                     required
28 28
                                                 >
29 29
 													<option value="">--请选择--</option>

+ 4 - 3
src/main/resources/static/app/business/facility/views/facility-getList.html

@@ -51,9 +51,10 @@
51 51
                                         <th align="center">{{$index + 1 + (pageInfo.pageNum-1) * pageInfo.pageSize}}</th>
52 52
                                         <td>{{facility.ssmc}}</td> 
53 53
                                         <td>{{facility.ssfl}}</td>
54
-                                        <td>{{facility.byksrq}}</td>
55
-                                        <td>{{facility.byjsrq}}</td>
56
-                                        <td>{{facility.byfzr}}</td>
54
+                                        <td>{{facility.gzrq}}</td>
55
+                                        <td>{{facility.wxksrq}}</td>
56
+                                        <td>{{facility.wxjsrq}}</td>
57
+                                        <td>{{facility.wxfzr}}</td>
57 58
                                         <td>
58 59
                                             <a href-void ng-click="viewFacility(facility)"><i class="fa fa-info-circle"></i>查看</a>
59 60
                                             <a href-void ng-click="editFacility(facility)"><i class="fa fa-edit"></i>修改</a>

+ 1 - 1
src/main/resources/static/app/business/module.js

@@ -3067,7 +3067,7 @@ angular.module('app.business')
3067 3067
             views: {
3068 3068
                 "content@app": {
3069 3069
                     controller: 'facilityGetListCtrl',
3070
-                    templateUrl: 'app/business/facility/views/facility-getlist.html'
3070
+                    templateUrl: 'app/business/facility/views/facility-get-list.html'
3071 3071
                 }
3072 3072
             }
3073 3073
         })