Explorar o código

调整ERP非标物料申请前端代码

wangyc %!s(int64=8) %!d(string=hai) anos
pai
achega
bd7c2420c9

+ 10 - 11
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -1144,7 +1144,16 @@ define([ 'app/app' ], function(app) {
 				$scope.submitProduct.attach = $scope.attachName;
 				$scope.submitProduct.attach = $scope.attachName;
 			}
 			}
 
 
-			console.log($scope.submitProduct);
+			Material.submitProduct({}, $scope.submitProduct, function (data) {
+				if (data.data == '已存在此器件') {
+					toaster.pop('info',  '已存在此器件');
+				} else {
+					toaster.pop('info', data.data);
+				}
+			}, function (response) {
+				toaster.pop('error', response.data);
+			})
+
 		};
 		};
 
 
 		$scope.attachName = '';
 		$scope.attachName = '';
@@ -1156,16 +1165,6 @@ define([ 'app/app' ], function(app) {
 			$scope.attachName = '';
 			$scope.attachName = '';
 		};
 		};
 
 
-		Material.submitProduct({}, $scope.submitProduct, function (data) {
-			if (data.data == '已存在此器件') {
-				toaster.pop('info',  '已存在此器件');
-			} else {
-				toaster.pop('info', data.data);
-			}
-		}, function (response) {
-			toaster.pop('error', response.data);
-		})
-
 	}]);
 	}]);
 
 
 	//类目选择模态框
 	//类目选择模态框