| | |
| | | sendEmails : (function () { |
| | | var sendEmails = []; |
| | | |
| | | angular.forEach($scope.vm.form.mailUsers, function (user) { |
| | | sendEmails.push($rootScope.encryption(user.account)); |
| | | }); |
| | | for(var i=0; i < $scope.vm.form.account[0].account.length; i++) { |
| | | sendEmails.push($rootScope.encryption($scope.vm.form.account[0].account[i])); |
| | | } |
| | | |
| | | return sendEmails; |
| | | })(), |
| | |
| | | var index = partners.length-1; |
| | | var id = partners[index].id; |
| | | var name = partners[index].name; |
| | | var account = partners[index].account.split(","); |
| | | var account = partners[index].account; |
| | | |
| | | for (var i = 0; i < account.length; i++) { |
| | | $scope.vm.form.account[0].id[index+i] = id; |
| | | $scope.vm.form.account[0].account[index+i] = account[i].trim(); |
| | | $scope.vm.form.account[0].name[index+i] = name; |
| | | if(account.indexOf(",") !== -1) { |
| | | account = partners[index].account.split(","); |
| | | for (var i = 0; i < account.length; i++) { |
| | | $scope.vm.form.account[0].account[index+i] = account[i].trim(); |
| | | $scope.vm.form.account[0].name[index+i] = name; |
| | | $scope.vm.form.account[0].id[index+i] = id; |
| | | } |
| | | } else { |
| | | $scope.vm.form.account[0].account[index] = account; |
| | | $scope.vm.form.account[0].name[index] = name; |
| | | $scope.vm.form.account[0].id[index] = id; |
| | | } |
| | | } else { |
| | | if (parameter.partners != null) { |
| | |
| | | var id = ""; |
| | | angular.forEach(parameter.partners, function (partner) { |
| | | id = partner.id; |
| | | account = partner.account.split(","); |
| | | account = partner.account; |
| | | if(account.indexOf(",") !== -1) { |
| | | account = partner.account.split(","); |
| | | } |
| | | name = partner.name; |
| | | }); |
| | | for (var i = 0; i < account.length; i++) { |
| | | $scope.vm.form.account[0].id[i] = id; |
| | | $scope.vm.form.account[0].account[i] = account[i].trim(); |
| | | if(account.size > 1) { |
| | | for (var i = 0; i < account.size; i++) { |
| | | $scope.vm.form.account[0].account[i] = account[i].trim(); |
| | | $scope.vm.form.account[0].name[i] = name; |
| | | $scope.vm.form.account[0].id[i] = id; |
| | | } |
| | | } else { |
| | | $scope.vm.form.account[0].account[i] = account; |
| | | $scope.vm.form.account[0].name[i] = name; |
| | | $scope.vm.form.account[0].id[i] = id; |
| | | } |
| | | } |
| | | } |