revert 商户自助进件补充材料js

master
luoyang 5 years ago
parent 263fbf42f4
commit 43bc5f83c8

@ -584,6 +584,27 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}
}
};
$scope.agreeIsImage = true;
if ($scope.file.file_agreement_info && $scope.file.file_agreement_info.endsWith('pdf')) {
$scope.agreeIsImage = false;
}
$scope.bankIsImage = true;
if ($scope.file.file_bank_info && $scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
}
$scope.companyIsImage = true;
if ($scope.file.file_company_info && $scope.file.file_company_info.endsWith('pdf')) {
$scope.companyIsImage = false;
}
$scope.applyIsImage = true;
if ($scope.file.file_apply_info && $scope.file.file_apply_info.endsWith('pdf')) {
$scope.applyIsImage = false;
}
$scope.idIsImage = true;
if ($scope.file.file_id_info && $scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
}
$scope.uploadCompanyFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
@ -699,11 +720,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}
};
/* $scope.downloadAsZip = function () {
var url = '/sys/partners/' + $scope.partner.client_moniker + '/download/complianceAsZIP';
return url;
};
*/
/* $scope.downloadAsZip = function () {
var url = '/sys/partners/' + $scope.partner.client_moniker + '/download/complianceAsZIP';
return url;
};
*/
$scope.updateFile = function () {
$http.put('/client/partner_info/update/file', $scope.file).then(function () {
commonDialog.alert({
@ -724,50 +745,6 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
type: 'error'
});
};
$scope.clientComplianceViewCommit= function () {
if(!$scope.file.client_agree_file)
{
commonDialog.alert({title: 'Error', content: '请提交* Agreement', type: 'error'});
return;
}else if(!$scope.file.client_id_file)
{
commonDialog.alert({title: 'Error', content:'请提交* ID', type: 'error'});
return;
}else if(!$scope.file.client_bank_file)
{
commonDialog.alert({title: 'Error', content: '请提交* bank statement', type: 'error'});
return;
}
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'});
})
};
$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();
})
};
$scope.commitPartner = function () {
if ($scope.file) {
if ($scope.file.file_bank_info != null && $scope.file.file_company_info != null && $scope.file.file_id_info != null && $scope.file_apply_info != null) {
@ -956,7 +933,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
};
*/
$scope.updateFile = function () {
$http.put('/client/partner_info/update/file', $scope.file).then(function () {
$http.put('/client/partner_info/update/wait_compliance_file', $scope.file).then(function () {
commonDialog.alert({
title: 'Success',
content: 'Upload Successful',

Loading…
Cancel
Save