Browse Source

应收对账打印权限

wangmh 8 years ago
parent
commit
a170e3d210

+ 11 - 0
src/main/java/com/uas/platform/b2b/controller/SaleApCheckController.java

@@ -73,6 +73,17 @@ public class SaleApCheckController {
 
 	private final static UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
 
+	/**
+	 * 打印权限判断
+	 *
+	 * @return
+	 */
+	@RequestMapping(value = "/printCount/permission", method = RequestMethod.POST)
+	@ResponseBody
+	public ModelMap printPermission() {
+		return new ModelMap("success", true);
+	}
+
 	/**
 	 * 打印对账单,增加打印次数
 	 * 

+ 6 - 2
src/main/webapp/resources/js/index/app.js

@@ -9520,8 +9520,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
         //打印  对账单
         $scope.print = function (check) {
-            FaApCheck.printCount({id: check.id}, {});//增加打印此次
-            ReportService.print(check.custUu, 'PURCCHECK', 'where purc$apcheck.pa_id =' + check.id);
+            FaApCheck.printPermission({}, function () {
+                FaApCheck.printCount({id: check.id}, {});//增加打印此次
+                ReportService.print(check.custUu, 'PURCCHECK', 'where purc$apcheck.pa_id =' + check.id);
+            }, function (response) {
+                toaster.pop('error', '打印失败', response.data);
+            });
         };
 
         //状态

+ 4 - 0
src/main/webapp/resources/js/index/services/Fa.js

@@ -147,6 +147,10 @@ define([ 'ngResource'], function() {
 				url: 'sale/apCheck/printCount/:id',
 				method: 'POST'
 			},
+			printPermission: {
+				url: 'sale/apCheck/printCount/permission',
+				method: 'POST'
+			},
 //			getTodoApCheck: {
 //				url: 'sale/apCheck/',
 //				params: {