|
|
@@ -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
|
}
|