Browse Source

出入库跳转日志添加

fanxw 5 years ago
parent
commit
daf9a54875

+ 2 - 1
src/main/resources/static/app/home/controller/headerCtrl.js

@@ -1,7 +1,7 @@
1 1
 "use strict";
2 2
 
3 3
 angular.module('app.system').controller("headerCtrl", 
4
-		function($scope, $rootScope, $uibModal, userService, selectService, $state) {
4
+		function($scope, $rootScope, $uibModal, userService, selectService, systemLogService, $state) {
5 5
 	$rootScope.isIndexPage = true;
6 6
 
7 7
 	//判断是否是应急
@@ -84,6 +84,7 @@ angular.module('app.system').controller("headerCtrl",
84 84
 		var sheight = screen.height-70;  
85 85
 		var swidth = screen.width-10;   
86 86
 		var winoption ="dialogHeight:"+sheight+"px;dialogWidth:"+ swidth +"px;status:no;scroll:no;resizable:yes;center:no;minimize:yes;maximize:yes;location:no";
87
+		systemLogService.save();//保存跳转出入库日志
87 88
 		try {
88 89
 			window.showModalDialog(url,window,winoption); 
89 90
 		}catch(e){

+ 23 - 0
src/main/resources/static/app/system/service/systemLogService.js

@@ -24,5 +24,28 @@ angular.module('app.system').service("systemLogService", function($http, $q, APP
24 24
 		});
25 25
 		return d.promise;
26 26
 	}
27
+	
28
+	/**
29
+	 * 保存日志
30
+	 */
31
+	this.save = function() {
32
+		
33
+		var d = $q.defer();
34
+    	$http({
35
+            method: 'POST',
36
+            url : APP_CONFIG.systemUrl + '/systemLog/save',
37
+//            data: {
38
+//           	    enumJson : angular.toJson(basicEnum)
39
+//            }
40
+        }).then(function successCallback(response) {
41
+            // 请求成功执行代码
42
+            d.resolve(response.data);
43
+        }, function errorCallback(response) {
44
+        	// 请求失败执行代码
45
+    		d.reject("error");
46
+        });
47
+        
48
+        return d.promise;
49
+	}
27 50
 })
28 51