Переглянути джерело

Merge branch 'master' of http://101.36.160.140:21044/depot-tianjin/depot-web-tianjin

maopixin 2 роки тому
батько
коміт
e3365faedc

+ 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
-    })

+ 12 - 9
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();
@@ -78,14 +78,14 @@ angular.module('app.business')
78 78
         //         console.log(data);
79 79
         //     })
80 80
         // };
81
+		
81 82
         $scope.loadfacilityList = function() {
82 83
             FacilityGetService.getFacilityList().then(function(data){
83 84
 				 $scope.facilityList = data; 
84 85
                  setTimeout(function () {
85 86
                     if($stateParams.facility) {
86 87
                         var receiveFacility = angular.fromJson($stateParams.facility);
87
-                        $scope.repairInfo = receiveFacility;
88
-                        $scope.repairInfo.ssmc = +receiveFacility.ssmc;
88
+						$scope.repairInfo = receiveFacility;
89 89
                     }
90 90
                  }, 1000);
91 91
                  
@@ -126,15 +126,15 @@ angular.module('app.business')
126 126
                 ssmc: '',
127 127
                 ssfl: '',
128 128
                 wxfzr: '',
129
-                orgId: $rootScope.userInfo.orgId,
130 129
                 bz: '',
131 130
             };
132 131
         }
133
-        $scope.useKeepChange = function(e) {
132
+        $scope.useFacilityChange = function(e) {
134 133
             $scope.facility = $scope.facilityList.find(function(v) {
135
-                return v.id === $scope.repairInfo.basicsId;
134
+                return v.id == $scope.repairInfo.basicsId;
136 135
             });
137
-			
136
+			$scope.repairInfo.ssfl = $scope.facility.ssfl;
137
+			$scope.repairInfo.ssmc = $scope.facility.ssmc;
138 138
         };
139 139
          // 存放位置
140 140
         //  $scope.loadData = function() {
@@ -166,10 +166,13 @@ angular.module('app.business')
166 166
      	        // }
167 167
                 
168 168
                 var params = angular.copy($scope.repairInfo);
169
-            	params.ssfl = $scope.facility.ssfl;
170
-                params.ssmc = $scope.facility.ssmc;
171 169
                 params.wxksrq = $("#repairInfo_wxksrq").val();
172 170
                 params.wxjsrq = $("#repairInfo_wxjsrq").val();
171
+                params.gzrq = $("#repairInfo_gzrq").val();
172
+				// params.ssfl = $scope.facility.ssfl;
173
+                // params.ssmc = $scope.facility.ssmc;
174
+                params.orgId = $rootScope.userInfo.orgId;
175
+				
173 176
                 FacilityGetService.savaFacility({dFacilitiesRepairJson : angular.toJson(params)}).then(function (response) {
174 177
                     if(response.status == "success"){
175 178
                         alert("保存成功!");

+ 7 - 7
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();
@@ -85,7 +85,6 @@ angular.module('app.business')
85 85
                     if($stateParams.facility) {
86 86
                         var receiveFacility = angular.fromJson($stateParams.facility);
87 87
                         $scope.keepInfo = receiveFacility;
88
-                        $scope.keepInfo.ssmc = +receiveFacility.ssmc;
89 88
                     }
90 89
                  }, 1000);
91 90
                  
@@ -126,14 +125,15 @@ angular.module('app.business')
126 125
                 ssmc: '',
127 126
                 ssfl: '',
128 127
                 byfzr: '',
129
-                orgId: $rootScope.userInfo.orgId,
130 128
                 bz: '',
131 129
             };
132 130
         }
133
-        $scope.useKeepChange = function(e) {
131
+        $scope.useFacilityChange = function(e) {
134 132
             $scope.facility = $scope.facilityList.find(function(v) {
135
-                return v.id === $scope.keepInfo.basicsId;
133
+                return v.id == $scope.keepInfo.basicsId;
136 134
             });
135
+            $scope.keepInfo.ssfl = $scope.facility.ssfl;
136
+			$scope.keepInfo.ssmc = $scope.facility.ssmc;
137 137
         };
138 138
          // 存放位置
139 139
         //  $scope.loadData = function() {
@@ -165,10 +165,10 @@ angular.module('app.business')
165 165
      	        // }
166 166
                 
167 167
                 var params = angular.copy($scope.keepInfo);
168
-                params.ssfl = $scope.facility.ssfl;
169
-                params.ssmc = $scope.facility.ssmc;
170 168
                 params.byksrq = $("#keepInfo_byksrq").val();
171 169
                 params.byjsrq = $("#keepInfo_byjsrq").val();
170
+                params.orgId = $rootScope.userInfo.orgId;
171
+
172 172
                 facilityKeepService.savaFacility({dFacilitiesMaintainJson : angular.toJson(params)}).then(function (response) {
173 173
                     if(response.status == "success"){
174 174
                         alert("保存成功!");

+ 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
         }) 

+ 5 - 3
src/main/resources/static/app/intelligent/grainDetection/views/insectPestDetection-edit.html

@@ -87,9 +87,11 @@
87 87
 											</th>
88 88
 											<th>
89 89
 												<section>
90
-													<label class="input">
91
-														<input class="form-control" type="text" ng-model="insectPests.cldjpd"
92
-															   name="cldjpd" validFrequency="true" required>
90
+													<label class="select">
91
+														<select ng-model="insectPests.cldjpd" name="cldjpd"
92
+																ng-options="enum.enumid as enum.enumname for enum in dicDataList[5281]" required>
93
+															<option value="">--请选择--</option>
94
+														</select><i></i>
93 95
 													</label>
94 96
 												</section>
95 97
 											</th>

+ 6 - 3
src/main/resources/static/app/storage/views/safeproduce/safeRiskLevelCtrl-edit.html

@@ -25,13 +25,13 @@
25 25
                                       <section class="col col-3">
26 26
                                           <label class="label">识别人<span style="color: red;">*</span></label>
27 27
                                           <label class="input">
28
-                                              <input type="text" ng-model="insertRisk.identifyPerson" name="operationTime" required>
28
+                                              <input type="text" ng-model="insertRisk.identifyPerson" name="operationTime" required ng-disabled="isNotEdit">
29 29
                                           </label>
30 30
                                       </section>
31 31
                                       <section class="col col-3">
32 32
                                           <label class="label">环节部位<span style="color: red;">*</span></label>
33 33
                                           <label class="input">
34
-                                              <input type="text" ng-model="insertRisk.linkPart" name="linkPart">
34
+                                              <input type="text" ng-model="insertRisk.linkPart" name="linkPart" required ng-disabled="isNotEdit">
35 35
                                           </label>
36 36
                                       </section>
37 37
                                       <section class="col col-3">
@@ -39,6 +39,7 @@
39 39
                                           <label class="select">
40 40
                                             <select 
41 41
                                                 ng-model="insertRisk.riskClassification"
42
+                                                ng-disabled="isNotEdit"
42 43
                                                 name="riskClassification" class="form-control input-sm"
43 44
                                                 ng-options="item.id as item.value for item in fxfjList"
44 45
                                                     ng-change="loadWare(houseId)" required>
@@ -53,6 +54,7 @@
53 54
                                           <label class="select">
54 55
                                             <select 
55 56
                                                 ng-model="insertRisk.riskTypeName"
57
+                                                ng-disabled="isNotEdit"
56 58
                                                 name="riskTypeName" class="form-control input-sm"
57 59
                                                 ng-options="item.id as item.value for item in fxlxList"
58 60
                                                     ng-change="loadWare(houseId)" required>
@@ -65,7 +67,8 @@
65 67
                                         <section class="col col-12" style="width: 100%;">
66 68
                                             <label class="label">风险识别</label>
67 69
                                             <label class="textarea textarea-resizable">
68
-                                                <textarea rows="5" class="custom-scroll"  ng-model="insertRisk.riskIdentification"  ng-disabled="isNotEdit" name="riskIdentification"></textarea>
70
+                                                <textarea rows="5" class="custom-scroll"  ng-model="insertRisk.riskIdentification"  
71
+                                                ng-disabled="isNotEdit" name="riskIdentification"></textarea>
69 72
                                             </label>
70 73
                                         </section>
71 74
                                     </div>