Quellcode durchsuchen

出库通知单提示

fanxw vor 1 Jahr
Ursprung
Commit
96e3a19b0a

+ 68 - 4
src/main/resources/static/app/business/deliveryStorageNotice/controller/grainDeliveryStorageNoticeSaveCtrl.js

@@ -1,7 +1,7 @@
1 1
 angular.module('app.business').controller("grainDeliveryStorageNoticeSaveCtrl",
2 2
     function($scope, $http, $filter, $stateParams, $state, $uibModal, $rootScope,agentDepotService,
3 3
              deliveryStorageNoticeService, deliveryStorageNoticeAuditService, commonUtilService, 
4
-             storeWareDetailService, enumService, codeRuleService,planService, customerService, contractReceiveService, userRoleService, qualitycheckService, $location, APP_CONFIG) {
4
+             storeWareDetailService, enumService, codeRuleService,planService, customerService, contractReceiveService, userRoleService, qualitycheckService, warehouseService, $location, APP_CONFIG) {
5 5
 
6 6
         $scope.deliveryStorageNotice = {};
7 7
         $scope.billNumber = {};
@@ -1256,20 +1256,84 @@ angular.module('app.business').controller("grainDeliveryStorageNoticeSaveCtrl",
1256 1256
                                 	$scope.deliveryStorageNotice.shipingCount = detailSumAmountAnother;
1257 1257
                                 }
1258 1258
                                 
1259
+//                                if(titles != ""){
1260
+//                                    var msg = confirm(titles);
1261
+//                                    if(msg == true){
1262
+//                                        $scope.savePlanData(variable);
1263
+//                                    }else{
1264
+//                                        $scope.saveFlag = false;
1265
+//                                    }
1266
+//                                }else{
1267
+//                                    $scope.savePlanData(variable);
1268
+//                                }
1259 1269
 
1260 1270
                                 if(titles != ""){
1261 1271
                                     var msg = confirm(titles);
1262 1272
                                     if(msg == true){
1263
-                                        $scope.savePlanData(variable);
1273
+                                    	//当选择出库通知单时,平台校验是否该企业存在状态为“入库中”的仓房,
1274
+                                    	//如果有,则在库级屏幕中央显示提示弹窗“预计出现同时出入库作业情况,请提前报送报备手续至市粮食储备有限公司”。
1275
+                                    	//要求显示20秒后自动关闭提示弹窗。
1276
+                                    	if (variable == "1") {
1277
+                                    		warehouseService.getCrkStatusList(0, 2, $rootScope.orgInfo.orgId).then(function(data){
1278
+                                    			if (data.length > 0) {
1279
+                                    				var showConfim=document.getElementById("crkStatusAlert");
1280
+                                    				showConfim.style.display="block";
1281
+                                    				var seconds = 20;
1282
+                                    				// 设置定时器,每秒钟增加秒数,并输出到控制台
1283
+                                    				setInterval(() => {
1284
+                                    					seconds--;
1285
+                                    					$('#crkStatusAlert_button').text(seconds+"秒后自动关闭");
1286
+                                    					if (seconds == 0) {
1287
+                                    						showConfim.style.display="none";
1288
+                                    						$scope.savePlanData(variable);
1289
+                                    					}
1290
+                                    				}, 1000);
1291
+                                    				//给市平台推送出库通知单提示消息
1292
+                           					        deliveryStorageNoticeService.pushCktzdts($rootScope.userInfo.userId, $rootScope.orgInfo.orgName);
1293
+                                    			} else {
1294
+                                    				$scope.savePlanData(variable);
1295
+                                    			}
1296
+                                    		},function(data){
1297
+                                    			console.log(data);
1298
+                                    		});
1299
+                                    	} else {
1300
+                                    		$scope.savePlanData(variable);
1301
+                                    	}
1264 1302
                                     }else{
1265 1303
                                         $scope.saveFlag = false;
1266 1304
                                     }
1267 1305
                                 }else{
1268
-                                    $scope.savePlanData(variable);
1306
+                                	if (variable == "1") {
1307
+                                		warehouseService.getCrkStatusList(0, 2, $rootScope.orgInfo.orgId).then(function(data){
1308
+                                            if (data.length > 0) {
1309
+                                            	var showConfim=document.getElementById("crkStatusAlert");
1310
+                       						    showConfim.style.display="block";
1311
+                       						    var seconds = 20;
1312
+                       						 
1313
+                       					        // 设置定时器,每秒钟增加秒数,并输出到控制台
1314
+                       					        setInterval(() => {
1315
+                       					            seconds--;
1316
+                       					            $('#crkStatusAlert_button').text(seconds+"秒后自动关闭");
1317
+                       					            if (seconds == 0) {
1318
+                       					            	showConfim.style.display="none";
1319
+                       					            	$scope.savePlanData(variable);
1320
+                       					            }
1321
+                       					        }, 1000);
1322
+                       					        //给市平台推送出库通知单提示消息
1323
+                       					        deliveryStorageNoticeService.pushCktzdts($rootScope.userInfo.userId, $rootScope.orgInfo.orgName);
1324
+                                            } else {
1325
+                                            	$scope.savePlanData(variable);
1326
+                                            }
1327
+                                        },function(data){
1328
+                                        	console.log(data);
1329
+                                        });
1330
+                                	} else {
1331
+                                		$scope.savePlanData(variable);
1332
+                                	}
1333
+                                    
1269 1334
                                 }
1270 1335
 
1271 1336
                         }
1272
-                    //});
1273 1337
                 });
1274 1338
 
1275 1339
                 }

+ 25 - 2
src/main/resources/static/app/business/deliveryStorageNotice/controller/grainReservesNoticeCtrl.js

@@ -1,5 +1,5 @@
1 1
 angular.module('app.business').controller("grainReservesNoticeCtrl", function($scope, $http, $state, $uibModal,
2
-		$rootScope,$stateParams,deliveryStorageNoticeService,deliveryStorageNoticeAuditService, APP_CONFIG) {
2
+		$rootScope,$stateParams,deliveryStorageNoticeService,deliveryStorageNoticeAuditService, warehouseService, APP_CONFIG) {
3 3
 	
4 4
 	 $scope.pageInfo = {pageNum : 1, pageSize : 10};
5 5
 	   
@@ -136,8 +136,31 @@ angular.module('app.business').controller("grainReservesNoticeCtrl", function($s
136 136
 				if (result.returnType == "cancel") {
137 137
 					// 不做操作.
138 138
 				} else if (result.returnType == "submit") {
139
+					warehouseService.getCrkStatusList(0, 2, $rootScope.orgInfo.orgId).then(function(data){
140
+                        if (data.length > 0) {
141
+                        	var showConfim=document.getElementById("crkStatusAlert");
142
+   						    showConfim.style.display="block";
143
+   						    var seconds = 20;
144
+   						 
145
+   					        // 设置定时器,每秒钟增加秒数,并输出到控制台
146
+   					        setInterval(() => {
147
+   					            seconds--;
148
+   					            $('#crkStatusAlert_button').text(seconds+"秒后自动关闭");
149
+   					            if (seconds == 0) {
150
+   					            	showConfim.style.display="none";
151
+   					            	$scope.submit(result.assignee);
152
+   					            }
153
+   					        }, 1000);
154
+   					        //给市平台推送出库通知单提示消息
155
+   					        deliveryStorageNoticeService.pushCktzdts($rootScope.userInfo.userId, $rootScope.orgInfo.orgName);
156
+                        } else {
157
+                        	$scope.submit(result.assignee);
158
+                        }
159
+                    },function(data){
160
+                    	console.log(data);
161
+                    });
139 162
 					// 审批人.
140
-					$scope.submit(result.assignee);
163
+					//$scope.submit(result.assignee);
141 164
 				} 
142 165
 			}, function (reason) {
143 166
 				console.log(reason);

+ 17 - 0
src/main/resources/static/app/business/deliveryStorageNotice/service/deliveryStorageNoticeService.js

@@ -163,4 +163,21 @@ angular.module('app.business').service("deliveryStorageNoticeService", function(
163 163
     	});
164 164
     	return d.promise;
165 165
     }
166
+    
167
+    //给市平台推送出库通知单提示消息
168
+    this.pushCktzdts = function(fsr, fsdw) {
169
+    	var d = $q.defer();
170
+    	$http({
171
+    		method: 'GET',
172
+    		url: APP_CONFIG.businessUrl + '/depot/business/grainNotice/pushCktzdts',
173
+    		params: {
174
+    			fsr : fsr,
175
+    			fsdw : fsdw
176
+    		}
177
+    	}).then(function successCallback(response) {
178
+    		d.resolve(response.data);
179
+    	}, function errorCallback(response) {
180
+    	});
181
+    	return d.promise;
182
+    }
166 183
 })

+ 11 - 0
src/main/resources/static/app/business/deliveryStorageNotice/views/grainDeliveryNotice-edit.html

@@ -375,4 +375,15 @@
375 375
            <button ng-click="cancel()" style="margin-right:10px;">取消</button>
376 376
         </div>
377 377
     </div>
378
+    <div  id="crkStatusAlert" style="display: none;
379
+	   position: fixed;opacity: 0.8;
380
+	   left: 0;top: 0;width: 100%;height: 100%;
381
+	   background: #000;z-index: 1002;">
382
+		<div style="position: fixed; 
383
+		    top: 50%;left: 50%;transform: translate(-50%, -50%);background-color: white;padding: 20px;border: 1px solid #ccc;z-index: 1200;">
384
+			<h3 style="margin-top:18px">系统提示:</h3>
385
+			<p style="font-size:15px">预计出现同时出入库作业情况,请提前报送报备手续至市粮食储备有限公司!</p >
386
+			<div id="crkStatusAlert_button" style="margin-top:20px;text-align: center;"></div>
387
+		</div>
388
+	</div>
378 389
 </div>

+ 11 - 0
src/main/resources/static/app/business/deliveryStorageNotice/views/grainReservesNotice-list.html

@@ -124,4 +124,15 @@
124 124
             </article>
125 125
         </div>
126 126
     </section>
127
+    <div  id="crkStatusAlert" style="display: none;
128
+	   position: fixed;opacity: 0.8;
129
+	   left: 0;top: 0;width: 100%;height: 100%;
130
+	   background: #000;z-index: 1002;">
131
+		<div style="position: fixed; 
132
+		    top: 50%;left: 50%;transform: translate(-50%, -50%);background-color: white;padding: 20px;border: 1px solid #ccc;z-index: 1200;">
133
+			<h3 style="margin-top:18px">系统提示:</h3>
134
+			<p style="font-size:15px">预计出现同时出入库作业情况,请提前报送报备手续至市粮食储备有限公司!</p >
135
+			<div id="crkStatusAlert_button" style="margin-top:20px;text-align: center;"></div>
136
+		</div>
137
+	</div>
127 138
 </div>