diff --git a/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java index 1ba04d1aa..14eec238e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java @@ -84,6 +84,8 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati @Resource private ClientFilesMapper clientFilesMapper; @Resource + private ClientComplianceCompanyMapper clientComplianceCompanyMapper; + @Resource private SmsSender smsSender; private final String RESET_CLIENT_ACCOUNT_PREFIX = "RESET_CLIENT_ACCOUNT"; private final String RESET_MANAGER_ACCOUNT_PREFIX = "RESET_MANAGER_ACCOUNT"; @@ -694,7 +696,12 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati } } result.put("client_less_file", clientFilesIsLess); - result.put("client_refuse_reason", "测试驳回!!!"); + if (clientFilesIsLess) { + JSONObject authFileCompliance = clientComplianceCompanyMapper.findFileByClientId(client.getIntValue("client_id")); + if (authFileCompliance != null && StringUtils.isNotBlank(authFileCompliance.getString("description"))) { + result.put("client_refuse_reason", authFileCompliance.getString("description")); + } + } } } return result; diff --git a/src/main/ui/static/boot/indexMainApp.js b/src/main/ui/static/boot/indexMainApp.js index b9a45284e..23d53d9d3 100644 --- a/src/main/ui/static/boot/indexMainApp.js +++ b/src/main/ui/static/boot/indexMainApp.js @@ -19,6 +19,7 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo var stompClient = null; var newPartnerGuide_counts = 0; var pwdcount = 0; + var complianceNoticeCount = 0; $scope.loadCurrentUser = function () { $http.get('/global/userstatus/current_partner').then(function (resp) { $rootScope.currentUser = resp.data; @@ -35,7 +36,6 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo }*/ if ($rootScope.currentUser.is_password_expired && pwdcount == 0) { - commonDialog.confirm({ title: 'Change Password!', content: 'Your password has been expired,click OK to set a new password' @@ -47,12 +47,13 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo $scope.ComplianceToperfect = function () { $uibModal.open({ templateUrl: '/static/payment/partner/templates/compliance_files_advice.html', - backdrop: false + size: 'lg' }) }; - if($scope.currentUser.client.client_less_file) + if($scope.currentUser.client.client_less_file && complianceNoticeCount==0) { $scope.ComplianceToperfect(); + complianceNoticeCount++; } connectWebSocket(); if ($scope.currentUser.role == 1 || $scope.currentUser.role == 2) { diff --git a/src/main/ui/static/payment/partner/partner.js b/src/main/ui/static/payment/partner/partner.js index c0c941be3..544ad72d7 100644 --- a/src/main/ui/static/payment/partner/partner.js +++ b/src/main/ui/static/payment/partner/partner.js @@ -963,43 +963,58 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot $scope.clientComplianceViewCommit= function () { - if(!$scope.file.client_files.client_agree_file) + if(!$scope.file.client_agree_file) { commonDialog.alert({title: 'Error', content: '请提交* Agreement', type: 'error'}); return; - }else if(!$scope.file.client_files.client_id_file) + }else if(!$scope.file.client_id_file) { commonDialog.alert({title: 'Error', content:'请提交* ID', type: 'error'}); return; - }else if(!$scope.file.client_files.client_bank_file) + }else if(!$scope.file.client_bank_file) { commonDialog.alert({title: 'Error', content: '请提交* bank statement', type: 'error'}); return; } - else if(!$scope.file.client_files.client_company_file) + else if(!$scope.file.client_company_file) { commonDialog.alert({title: 'Error', content: '请提交* Certificate of Registration', type: 'error'}); return; }; - - $http.post('/client/partner_info/clientCompliance/' + $scope.partner.client_moniker + '/viewCommit', $scope.file).then(function () { - commonDialog.alert({ - title: 'Success', - content: 'Upload Successful', - type: 'success' - }); - $state.reload(); - }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + commonDialog.confirm({ + title: 'Warning', + content: 'Are you sure commit for compliance audit?' + }).then(function () { + $http.post('/client/partner_info/clientCompliance/' + $scope.partner.client_moniker + '/viewCommit', $scope.file).then(function () { + commonDialog.alert({ + title: 'Success', + content: 'Commit Successful', + type: 'success' + }); + $state.reload(); + }, function (resp) { + commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + }) }) + }; $scope.deleteComplianceFiles = function (file_id) { $scope.file_id = file_id; - - /*$http.put('/sys/partners/' + $scope.partner.client_moniker + '/saveAdditional_content', {additional_content: $scope.partner.additional_content}).then(function (resp) {*/ - $http.put('/client/partner_info/auth_file/' + $scope.file_id + '/delete').then(function (resp) { - $state.reload(); + commonDialog.confirm({ + title: 'Warning', + content: 'This operation will delete the file, Are you sure?' + }).then(function () { + $http.put('/client/partner_info/auth_file/' + $scope.file_id + '/delete').then(function (resp) { + commonDialog.alert({ + title: 'Success', + content: 'Delete Successful', + type: 'success' + }); + $state.reload(); + }, function (resp) { + commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + }) }) }; diff --git a/src/main/ui/static/payment/partner/templates/client_partner_detail.html b/src/main/ui/static/payment/partner/templates/client_partner_detail.html index 7b93e6b11..3cf12aa42 100644 --- a/src/main/ui/static/payment/partner/templates/client_partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/client_partner_detail.html @@ -54,8 +54,7 @@
  • - Compliance to perfect -

    (资料审核中)

    + Compliance Files
  • diff --git a/src/main/ui/static/payment/partner/templates/compliance_files_advice.html b/src/main/ui/static/payment/partner/templates/compliance_files_advice.html index 840bdcc96..dba75b1be 100644 --- a/src/main/ui/static/payment/partner/templates/compliance_files_advice.html +++ b/src/main/ui/static/payment/partner/templates/compliance_files_advice.html @@ -1,11 +1,88 @@ -