Bladeren bron

企业圈新的合作伙伴数据异常问题的处理

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@8392 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 jaren geleden
bovenliggende
commit
e821c6667d

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

@@ -10381,7 +10381,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 	app.controller('AddPartnerRequestCtrl', ['$scope', 'AddPartnerMyRequest', 'toaster', 'BaseService', 'ngTableParams', 'AddPartner', '$timeout', function($scope, AddPartnerMyRequest, toaster, BaseService, ngTableParams, AddPartner, $timeout) {
 	app.controller('AddPartnerRequestCtrl', ['$scope', 'AddPartnerMyRequest', 'toaster', 'BaseService', 'ngTableParams', 'AddPartner', '$timeout', function($scope, AddPartnerMyRequest, toaster, BaseService, ngTableParams, AddPartner, $timeout) {
 		BaseService.scrollBackToTop();
 		BaseService.scrollBackToTop();
 		$scope.status = "partner";
 		$scope.status = "partner";
-		$scope.active = 'todo';
+		$scope.active = 'all';
 		
 		
 		var getRequestStatus = function(active) {
 		var getRequestStatus = function(active) {
   			var fn = 'getAllRequest';
   			var fn = 'getAllRequest';
@@ -11567,6 +11567,17 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 			})
 			})
 		}
 		}
 		
 		
+		// 删除明细
+		$scope.del = function(index, id) {
+			DeputyOrder.deleteProdById({id: id}, {}, function(data) {
+				if(data.success) {
+					toaster.pop('success', '提示', response.data);
+				}
+			}, function(response) {
+				toaster.pop('error', '提示', response.data);
+			});
+		}
+
 		var getService = function() {
 		var getService = function() {
 			return DeputyOrder.getProdList;
 			return DeputyOrder.getProdList;
 		};
 		};
@@ -13563,7 +13574,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 	}]);
 	}]);
     
     
     // 企业圈搜索结果
     // 企业圈搜索结果
-    app.controller('EnterpriseSearchCtrl', ['$scope', 'getAccountUserSpace', 'ngTableParams', '$filter', 'BaseService', 'toaster', 'AddPartner', '$rootScope', function($scope, getAccountUserSpace, ngTableParams, $filter, BaseService, toaster, AddPartner, $rootScope) {
+    app.controller('EnterpriseSearchCtrl', ['$scope', 'getAccountUserSpace', 'ngTableParams', '$filter', 'BaseService', 'toaster', 'AddPartner', '$rootScope', '$modal', function($scope, getAccountUserSpace, ngTableParams, $filter, BaseService, toaster, AddPartner, $rootScope, $modal) {
     	$scope.status = 'add';
     	$scope.status = 'add';
     	BaseService.scrollBackToTop();
     	BaseService.scrollBackToTop();
 		$scope.active = 'all';
 		$scope.active = 'all';
@@ -13644,6 +13655,32 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 			});
 			});
 		}
 		}
 		
 		
+		/**
+		 * 邀请注册商务平台
+		 */
+		$scope.invite = function(name) {
+			var modalInstance = $modal.open({
+				animation: true,
+				templateUrl: 'static/tpl/index/search/enterpirseInfo.html',
+				controller: 'InviteCtrl',
+				resolve: {
+					enname: function(){return name}
+				}
+			});
+			modalInstance.result.then(function(data) {
+				InvitationRecord.invite({formStore: data}, {}, function(data) {
+					if(data.success) {
+						toaster.pop('success', '提示', data.success);
+					}
+					if(data.error) {
+						toaster.pop('error', '提示', data.error);
+					}
+				}, function(response) {
+					toaster.pop('error', '提示', response.data);
+				});
+			});
+		}
+		
 	}]);
 	}]);
     
     
     // 平台新增的询价单(指定一个供应商)
     // 平台新增的询价单(指定一个供应商)

+ 5 - 0
src/main/webapp/resources/js/index/services/DeputyOrder.js

@@ -62,6 +62,11 @@ define(['ngResource'], function() {
                     _state: 'todo'
                     _state: 'todo'
                 }
                 }
             },
             },
+            getDone: {
+            	params: {
+            		_state: 'done'
+            	}
+            }
 		})
 		})
 	}]);
 	}]);
 })
 })