Ver código fonte

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

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@9165 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 8 anos atrás
pai
commit
cc8e38d043
1 arquivos alterados com 18 adições e 0 exclusões
  1. 18 0
      src/main/webapp/resources/js/index/app.js

+ 18 - 0
src/main/webapp/resources/js/index/app.js

@@ -16152,12 +16152,30 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 					})
 					})
 				}
 				}
 				$scope.prodInfo = data;
 				$scope.prodInfo = data;
+				if($scope.prodInfo.standard != 1 ) {// 非标准的先进行匹配
+					Products.matchone({id: $scope.prodInfo.id}, {}, function(data) {
+						$scope.matchresults = data;
+					}, function(response) {
+						toaster.pop('error', '提示', response.data);
+					});
+				}
 				$scope.prodInfo.$editing = false;
 				$scope.prodInfo.$editing = false;
 				$scope.loading = false;
 				$scope.loading = false;
 			});
 			});
 		};
 		};
 		loadData();
 		loadData();
 
 
+		//更新为标准器件
+		$scope.updateone = function(id) {
+			Products.updateone({id: id}, {}, function(data) {
+				if(data.success) {
+					toaster.pop('success', '提示', data.success);
+				}
+			}, function(response) {
+				toaster.pop('error', '提示', response.data);
+			});
+		}
+		
 		// 选择类目
 		// 选择类目
 	    $scope.selectKind = function(cmpcode) {
 	    $scope.selectKind = function(cmpcode) {
 	    	if(cmpcode == null) {
 	    	if(cmpcode == null) {