master
wangning 7 years ago
commit 4a0b57c76f

@ -247,7 +247,6 @@
<p ng-if="mail_confirm">
<a class="text-primary">
<span ng-class="{'text-gray':mail_confirm,'text-primary':!mail_confirm}">&nbsp;Your email address <em class="text-info">{{currentUser.client.contact_email}}</em> has been verified</span>
<i class="fa fa-paper-plane-o"></i>
</a>
</p>

@ -167,28 +167,41 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
};
$scope.commitToCompliance = function () {
$http.get('/client/partner_info/compliance/files').then(function (resp) {
$scope.complianceFiles = resp.data;
if($scope.complianceFiles.client_id_file == null||$scope.complianceFiles.client_bank_file == null || $scope.complianceFiles.client_company_file == null){
commonDialog.alert({title: 'Message', content: '请前去完善合规资料,再进行提交!', type: 'info'});
return;
}
if($scope.partner.business_structure == null ||$scope.partner.logo_url == null || $scope.partner.description == null || (($scope.partner.store_photo == null || $scope.partner.company_photo == null) && $scope.currentUser.client.company_website == null)){
commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'});
return;
}
if(($scope.partner.business_structure == "Company" && $scope.partner.acn == null) || ($scope.partner.business_structure != "Company" && $scope.partner.abn == null)){
commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'});
return;
}
if(!$scope.partner.mail_confirm){
commonDialog.alert({title: 'Message', content: '请验证邮箱后,再进行提交!', type: 'info'});
return;
commonDialog.confirm({
title: 'Commit to Compliance',
content: 'Are you sure to commit ' + $scope.partner.company_name + ' to compliance',
choises: [
{label: 'Submit', className: 'btn-success', key: 1},
{label: 'Cancel', className: 'btn-warning', key: 0, dismiss: true}
]
}).then(function (choice) {
if (choice == 1) {
$http.get('/client/partner_info/compliance/files').then(function (resp) {
$scope.complianceFiles = resp.data;
if($scope.complianceFiles.client_id_file == null||$scope.complianceFiles.client_bank_file == null || $scope.complianceFiles.client_company_file == null){
commonDialog.alert({title: 'Message', content: '请前去完善合规资料,再进行提交!', type: 'info'});
return;
}
if($scope.partner.business_structure == null ||$scope.partner.logo_url == null || $scope.partner.description == null || (($scope.partner.store_photo == null || $scope.partner.company_photo == null) && $scope.currentUser.client.company_website == null)){
commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'});
return;
}
if(($scope.partner.business_structure == "Company" && $scope.partner.acn == null) || ($scope.partner.business_structure != "Company" && $scope.partner.abn == null)){
commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'});
return;
}
if(!$scope.partner.mail_confirm){
commonDialog.alert({title: 'Message', content: '请验证邮箱后,再进行提交!', type: 'info'});
return;
}
$http.post('/client/partner_info/compliance_audit').then(function (){
commonDialog.alert({title: 'Success', content: '已提交至合规,请耐心等待审核!', type: 'info'});
$state.reload();
});
});
}
$http.post('/client/partner_info/compliance_audit').then(
commonDialog.alert({title: 'Success', content: '已提交至合规,请耐心等待审核!', type: 'info'})
);
});
})
}
}]);
app.controller('clientComplianceFilesCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file) {

@ -21,9 +21,10 @@
<span ng-if="partner.approve_result==1">(自助申请)已开通</span>
<span ng-if="partner.approve_result==2">(自助申请)快速开通等待提交合规材料</span>
<span ng-if="partner.approve_result==3">(自助申请)待审核(材料已提交)</span>
<span ng-if="partner.approve_result==5">(自助申请)被打回</span>
</b>
</h3>
<div class="btn-group pull-right" role="group" aria-label="..." ng-show="partner.approve_result == 2">
<div class="btn-group pull-right" role="group" aria-label="..." ng-hide="partner.approve_result ==3 || partner.approve_result == 1">
<button type="button" class="btn btn-danger" ng-click="commitToCompliance()">Commit to Compliance
</button>
</div>
@ -48,7 +49,7 @@
</li>
</ul>
<div class="tab-content" ui-view>
<div ng-if="(partner.source == 4 && partner.approve_result !=2) || partner.source != 4">
<div ng-show="(partner.source == 4 && (partner.approve_result ==3 || partner.approve_result == 1) ) || partner.source != 4">
<div class="panel panel-default">
<div class="panel-heading">
Partner Basic Information
@ -264,7 +265,7 @@
</div>
</div>
</div>
<div class="panel panel-default" ng-if="partner.source == 4 && partner.approve_result ==2">
<div class="panel panel-default" ng-show="partner.source == 4 && (partner.approve_result !=3 && partner.approve_result !=1)">
<div class="panel-heading">Partner Basic Information</div>
<div class="panel-body">
<form class="form-horizontal" novalidate name="partnerForm">

Loading…
Cancel
Save