Browse Source

物料详情增加单个匹配,单个更新

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@9172 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 8 years ago
parent
commit
566fa5e1a4

+ 3 - 3
src/main/webapp/resources/js/index/app.js

@@ -15651,7 +15651,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 			}
 		};
 		var getService = function() {
-			return ProductAll;
+			return Products.matchResult;
 		};
 		
 		$scope.tableParams = new ngTableParams({
@@ -15667,7 +15667,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 				var pageParams = params.url();
 				pageParams.keyword = $scope.keyword;
 				pageParams.searchFilter = $scope.searchFilter;
-				getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function(page){
+				getService().call(null, BaseService.parseParams(pageParams), function(page){
 					$scope.loading = false;
 					if(page) {
 						params.total(page.totalElement);
@@ -16124,7 +16124,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 	/**
 	 * 物料详情(采购)
 	 */
-	app.controller('PurcProdDetailCtrl', ['$scope', 'GetProductInfo', '$upload', 'ngTableParams', '$stateParams', 'toaster', 'AuthenticationService', '$filter', 'BaseService', '$modal', function($scope, GetProductInfo, $upload, ngTableParams, $stateParams, toaster, AuthenticationService, $filter, BaseService, $modal) {
+	app.controller('PurcProdDetailCtrl', ['$scope', 'GetProductInfo', '$upload', 'ngTableParams', '$stateParams', 'toaster', 'AuthenticationService', '$filter', 'BaseService', '$modal', 'Products', function($scope, GetProductInfo, $upload, ngTableParams, $stateParams, toaster, AuthenticationService, $filter, BaseService, $modal, Products) {
 		BaseService.scrollBackToTop();
 		// 录入人
 		AuthenticationService.getAuthentication().success(function(data) {

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

@@ -60,6 +60,10 @@ define([ 'ngResource'], function() {
 			updateone: {
 				url: 'product/refreshproduct/:id',
 				method: 'POST'
+			},
+			matchResult: {
+				url: 'product/matchResult',
+				method: 'GET'
 			}
 		});
 	}]).factory('PurcProduct', ['$resource', function($resource) {