|
|
@@ -525,10 +525,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
url : '/invitation',
|
|
|
templateUrl : "static/tpl/index/baseInfo/invitation.html",
|
|
|
controller : 'InvitationCtrl'
|
|
|
- }).state('baseInfo.invitationforEn', {
|
|
|
- url : '/invitationforEn',
|
|
|
- templateUrl : "static/tpl/index/baseInfo/invitation.html",
|
|
|
- controller : 'InvitationByEnCtrl'
|
|
|
+ // }).state('baseInfo.invitationforEn', {
|
|
|
+ // url : '/invitationforEn',
|
|
|
+ // templateUrl : "static/tpl/index/baseInfo/invitation.html",
|
|
|
+ // controller : 'InvitationByEnCtrl'
|
|
|
}).state('qc', {
|
|
|
url : "/qc",
|
|
|
views : {
|
|
|
@@ -1085,7 +1085,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
*/
|
|
|
$scope.view = function(name) {
|
|
|
$rootScope.vendName = name;
|
|
|
- window.location.hash = "#/baseInfo/myRquest";
|
|
|
+ window.location.hash = "#/baseInfo/newPartner";
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
@@ -1106,6 +1106,30 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$modalInstance.dismiss();
|
|
|
}
|
|
|
}]);
|
|
|
+
|
|
|
+
|
|
|
+ app.controller('ReInviteCtrl', ['$scope', 'toaster', '$modalInstance', 'id', 'InvitationRecord', function($scope, toaster, $modalInstance, id, InvitationRecord) {
|
|
|
+
|
|
|
+
|
|
|
+ var loadData = function (id) {
|
|
|
+ InvitationRecord.getRecordById({id: id}, {}, function(data) {
|
|
|
+ $scope.enter = data;
|
|
|
+ });
|
|
|
+ };
|
|
|
+ loadData(id);
|
|
|
+
|
|
|
+ $scope.save = function(enter) {
|
|
|
+ if(!enter.vendusertel && !enter.venduseremail) {
|
|
|
+ toaster.pop('info', '提示', '手机号或邮箱至少填写一个才能通知到客户');
|
|
|
+ } else {
|
|
|
+ $modalInstance.close(enter);
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ $scope.cancel = function() {
|
|
|
+ $modalInstance.dismiss();
|
|
|
+ }
|
|
|
+ }]);
|
|
|
|
|
|
/**
|
|
|
* 邀请记录(个人)--现在包括个人和企业
|
|
|
@@ -1171,78 +1195,89 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
resolve: {name: function() {return name}}
|
|
|
}).result.then(function(data){
|
|
|
});
|
|
|
- }
|
|
|
-
|
|
|
- // 再次邀请
|
|
|
- $scope.reInvite = function(id) {
|
|
|
- InvitationRecord.reInvite({id: id}, {}, function(data) {
|
|
|
- if(data.success) {
|
|
|
- toaster.pop('success', '提示', data.success);
|
|
|
- $scope.tableParams.page(1);
|
|
|
- $scope.tableParams.reload();
|
|
|
- }
|
|
|
- }, function(response) {
|
|
|
- toaster.pop('error', '提示', response.data);
|
|
|
- });
|
|
|
- }
|
|
|
- }]);
|
|
|
-
|
|
|
- /**
|
|
|
- * 邀请记录(企业)--弃用
|
|
|
- */
|
|
|
- app.controller('InvitationByEnCtrl', ['$scope', 'toaster', 'InvitationRecord', 'BaseService', 'ngTableParams', function($scope, toaster, InvitationRecord, BaseService, ngTableParams) {
|
|
|
- BaseService.scrollBackToTop();
|
|
|
- $scope.status = "invitationTeam";
|
|
|
- var getService = function() {
|
|
|
- return InvitationRecord.getRecordsByEn;
|
|
|
};
|
|
|
|
|
|
- $scope.tableParams = new ngTableParams({ // ng-Table参数
|
|
|
- page : 1,
|
|
|
- count : 10,
|
|
|
- sorting: {
|
|
|
- }
|
|
|
- }, {
|
|
|
- total : 0,
|
|
|
- counts: [],
|
|
|
- getData : function($defer, params) { // 获取数据的方法
|
|
|
- $scope.loading = true;
|
|
|
- var pageParams = params.url();
|
|
|
- pageParams.keyword = $scope.keyword;
|
|
|
- $scope.tip = $scope.keyword;
|
|
|
- getService().call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
- $scope.loading = false;
|
|
|
- if(page) {
|
|
|
- params.total(page.totalElement);
|
|
|
- $defer.resolve(page.content);
|
|
|
- }
|
|
|
- }, function(response){
|
|
|
- $scope.loading = false;
|
|
|
- toaster.pop('error', '数据加载失败', response.data);
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- $scope.onSearch = function(keyword){
|
|
|
- $scope.tableParams.page(1);
|
|
|
- $scope.tableParams.reload();
|
|
|
- $scope.tip = keyword;
|
|
|
- }
|
|
|
-
|
|
|
// 再次邀请
|
|
|
$scope.reInvite = function(id) {
|
|
|
- InvitationRecord.reInvite({id: id}, {}, function(data) {
|
|
|
- if(data.success) {
|
|
|
- toaster.pop('success', '提示', data.success);
|
|
|
- $scope.tableParams.page(1);
|
|
|
- $scope.tableParams.reload();
|
|
|
- }
|
|
|
- }, function(response) {
|
|
|
- toaster.pop('error', '提示', response.data);
|
|
|
- });
|
|
|
+ var modalInstance = $modal.open({
|
|
|
+ animation: true,
|
|
|
+ templateUrl: 'static/tpl/index/search/enterpirseInfo.html',
|
|
|
+ controller: 'ReInviteCtrl',
|
|
|
+ resolve: {
|
|
|
+ id: function(){return id}
|
|
|
+ }
|
|
|
+ });
|
|
|
+ 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);
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
+ // /**
|
|
|
+ // * 邀请记录(企业)--弃用
|
|
|
+ // */
|
|
|
+ // app.controller('InvitationByEnCtrl', ['$scope', 'toaster', 'InvitationRecord', 'BaseService', 'ngTableParams', function($scope, toaster, InvitationRecord, BaseService, ngTableParams) {
|
|
|
+ // BaseService.scrollBackToTop();
|
|
|
+ // $scope.status = "invitationTeam";
|
|
|
+ // var getService = function() {
|
|
|
+ // return InvitationRecord.getRecordsByEn;
|
|
|
+ // };
|
|
|
+ //
|
|
|
+ // $scope.tableParams = new ngTableParams({ // ng-Table参数
|
|
|
+ // page : 1,
|
|
|
+ // count : 10,
|
|
|
+ // sorting: {
|
|
|
+ // }
|
|
|
+ // }, {
|
|
|
+ // total : 0,
|
|
|
+ // counts: [],
|
|
|
+ // getData : function($defer, params) { // 获取数据的方法
|
|
|
+ // $scope.loading = true;
|
|
|
+ // var pageParams = params.url();
|
|
|
+ // pageParams.keyword = $scope.keyword;
|
|
|
+ // $scope.tip = $scope.keyword;
|
|
|
+ // getService().call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
+ // $scope.loading = false;
|
|
|
+ // if(page) {
|
|
|
+ // params.total(page.totalElement);
|
|
|
+ // $defer.resolve(page.content);
|
|
|
+ // }
|
|
|
+ // }, function(response){
|
|
|
+ // $scope.loading = false;
|
|
|
+ // toaster.pop('error', '数据加载失败', response.data);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ //
|
|
|
+ // $scope.onSearch = function(keyword){
|
|
|
+ // $scope.tableParams.page(1);
|
|
|
+ // $scope.tableParams.reload();
|
|
|
+ // $scope.tip = keyword;
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // // 再次邀请
|
|
|
+ // $scope.reInvite = function(id) {
|
|
|
+ // InvitationRecord.reInvite({id: id}, {}, function(data) {
|
|
|
+ // if(data.success) {
|
|
|
+ // toaster.pop('success', '提示', data.success);
|
|
|
+ // $scope.tableParams.page(1);
|
|
|
+ // $scope.tableParams.reload();
|
|
|
+ // }
|
|
|
+ // }, function(response) {
|
|
|
+ // toaster.pop('error', '提示', response.data);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }]);
|
|
|
+
|
|
|
/**
|
|
|
* 模糊查询相似的企业名称
|
|
|
*/
|
|
|
@@ -11877,7 +11912,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
}
|
|
|
- $scope.tableParams.page(1);
|
|
|
+ // $scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -11890,7 +11925,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
}
|
|
|
- $scope.tableParams.page(1);
|
|
|
+ // $scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -11903,7 +11938,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
}
|
|
|
- $scope.tableParams.page(1);
|
|
|
+ // $scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -11916,7 +11951,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
}
|
|
|
- $scope.tableParams.page(1);
|
|
|
+ // $scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
}, function(response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -15426,7 +15461,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
*/
|
|
|
$scope.view = function(name) {
|
|
|
$rootScope.vendName = name;
|
|
|
- window.location.hash = "#/baseInfo/myRquest";
|
|
|
+ window.location.hash = "#/baseInfo/newPartner";
|
|
|
}
|
|
|
}]);
|
|
|
|