|
@@ -1098,7 +1098,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
/**
|
|
|
* 邀请记录(个人)
|
|
* 邀请记录(个人)
|
|
|
*/
|
|
*/
|
|
|
- app.controller('InvitationCtrl', ['$scope', 'toaster', 'InvitationRecord', 'BaseService', 'ngTableParams', function($scope, toaster, InvitationRecord, BaseService, ngTableParams) {
|
|
|
|
|
|
|
+ app.controller('InvitationCtrl', ['$scope', 'toaster', 'InvitationRecord', 'BaseService', 'ngTableParams', '$modal', function($scope, toaster, InvitationRecord, BaseService, ngTableParams, $modal) {
|
|
|
BaseService.scrollBackToTop();
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.status = "invitation";
|
|
$scope.status = "invitation";
|
|
|
var getService = function() {
|
|
var getService = function() {
|
|
@@ -1136,10 +1136,19 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.tableParams.reload();
|
|
$scope.tableParams.reload();
|
|
|
$scope.tip = keyword;
|
|
$scope.tip = keyword;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ $scope.search = function(name) {
|
|
|
|
|
+ $modal.open({
|
|
|
|
|
+ templateUrl: 'static/tpl/index/baseInfo/modal/fuzzysearch_enterprise_modal.html',
|
|
|
|
|
+ controller: 'FuzzySearchCtrl',
|
|
|
|
|
+ resolve: {name: function() {return name}}
|
|
|
|
|
+ }).result.then(function(data){
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}]);
|
|
}]);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 邀请记录(个人)
|
|
|
|
|
|
|
+ * 邀请记录(企业)
|
|
|
*/
|
|
*/
|
|
|
app.controller('InvitationByEnCtrl', ['$scope', 'toaster', 'InvitationRecord', 'BaseService', 'ngTableParams', function($scope, toaster, InvitationRecord, BaseService, ngTableParams) {
|
|
app.controller('InvitationByEnCtrl', ['$scope', 'toaster', 'InvitationRecord', 'BaseService', 'ngTableParams', function($scope, toaster, InvitationRecord, BaseService, ngTableParams) {
|
|
|
BaseService.scrollBackToTop();
|
|
BaseService.scrollBackToTop();
|
|
@@ -1181,6 +1190,20 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
}
|
|
|
}]);
|
|
}]);
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 模糊查询相似的企业名称
|
|
|
|
|
+ */
|
|
|
|
|
+ app.controller('FuzzySearchCtrl', ['$scope', 'name', 'InvitationRecord', 'toaster', 'BaseService', function($scope, name, InvitationRecord, toaster, BaseService) {
|
|
|
|
|
+ $scope.name = name;
|
|
|
|
|
+ if($scope.name != null) {
|
|
|
|
|
+ InvitationRecord.enterpriseList({name: $scope.name}, {}, function(data) {
|
|
|
|
|
+ $scope.enterprises = data;
|
|
|
|
|
+ }, function(response) {
|
|
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }]);
|
|
|
|
|
+
|
|
|
app.controller('AuthCtrl', ['$scope', '$window', 'AuthenticationService', 'toaster', 'BaseService', '$modal', function($scope, $window, AuthenticationService, toaster, BaseService, $modal) {
|
|
app.controller('AuthCtrl', ['$scope', '$window', 'AuthenticationService', 'toaster', 'BaseService', '$modal', function($scope, $window, AuthenticationService, toaster, BaseService, $modal) {
|
|
|
$scope.isAuthed = AuthenticationService.isAuthed(); //AuthenticationService模块在common/下
|
|
$scope.isAuthed = AuthenticationService.isAuthed(); //AuthenticationService模块在common/下
|
|
|
|
|
|
|
@@ -15769,8 +15792,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.updateAll = function() {
|
|
$scope.updateAll = function() {
|
|
|
angular.forEach($scope.tableParams.data, function(product) {
|
|
angular.forEach($scope.tableParams.data, function(product) {
|
|
|
if(product.checked) {
|
|
if(product.checked) {
|
|
|
- ids.push(product.matchresults[0].id);
|
|
|
|
|
- console.log(ids);
|
|
|
|
|
|
|
+ angular.forEach(product.matchresults, function(item) {
|
|
|
|
|
+ if(item.checked) {
|
|
|
|
|
+ ids.push(item.id);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
Products.updateall( {}, ids, function(data) {
|
|
Products.updateall( {}, ids, function(data) {
|
|
|
if(data.success) {
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
toaster.pop('success', '提示', data.success);
|