|
|
|
@ -3658,9 +3658,53 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
app.controller('partnerMWAuthFileCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file) {
|
|
|
|
|
$scope.id_info_form = {edit: false};
|
|
|
|
|
$scope.file = file.data || {};
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
|
$scope.file.upay_risk_level = $scope.partner.upay_risk_level;
|
|
|
|
|
$scope.file.upay_risk_remark = $scope.partner.upay_risk_remark;
|
|
|
|
|
$scope.uploadApplyFile = function (file) {
|
|
|
|
|
|
|
|
|
|
$scope.bankIsImage = true;
|
|
|
|
|
$scope.asicIsImage = true;
|
|
|
|
|
$scope.idIsImage = true;
|
|
|
|
|
$scope.utilityIsImage = true;
|
|
|
|
|
$scope.refundIsImage = true;
|
|
|
|
|
$scope.privacyIsImage = true;
|
|
|
|
|
$scope.cardIsImage = true;
|
|
|
|
|
$scope.letterIsImage = true;
|
|
|
|
|
$scope.promotionalIsImage = true;
|
|
|
|
|
$scope.termsIsImage = true;
|
|
|
|
|
if ($scope.file.client_bank_file && $scope.file.client_bank_file.endsWith('pdf')) {
|
|
|
|
|
$scope.bankIsImage = false;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.file.client_company_file && $scope.file.client_company_file.endsWith('pdf')) {
|
|
|
|
|
$scope.asicIsImage = false;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.file.upay_driver_license && $scope.file.upay_driver_license.endsWith('pdf')) {
|
|
|
|
|
$scope.idIsImage = false;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.file.kyc_utility_bill_file && $scope.file.kyc_utility_bill_file.endsWith('pdf')) {
|
|
|
|
|
$scope.utilityIsImage = false;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.file.refund_exchange_policy && $scope.file.refund_exchange_policy.endsWith('pdf')) {
|
|
|
|
|
$scope.refundIsImage = false;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.file.upay_privacy_policy && $scope.file.upay_privacy_policy.endsWith('pdf')) {
|
|
|
|
|
$scope.privacyIsImage = false;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.file.card_security_policy && $scope.file.card_security_policy.endsWith('pdf')) {
|
|
|
|
|
$scope.cardIsImage = false;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.file.upay_offer_letter && $scope.file.upay_offer_letter.endsWith('pdf')) {
|
|
|
|
|
$scope.letterIsImage = false;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.file.upay_promotional_offer && $scope.file.upay_promotional_offer.endsWith('pdf')) {
|
|
|
|
|
$scope.promotionalIsImage = false;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.file.upay_terms_conditions && $scope.file.upay_terms_conditions.endsWith('pdf')) {
|
|
|
|
|
$scope.termsIsImage = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadBankFile = function (file) {
|
|
|
|
|
if (file != null) {
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
@ -3670,10 +3714,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
data: {file: file}
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
|
delete $scope.bankFileProgress;
|
|
|
|
|
$scope.file.upay_application_form = resp.data.url;
|
|
|
|
|
$scope.file.client_bank_file = resp.data.url;
|
|
|
|
|
$scope.uploadFile.client_bank_file = resp.data.url;
|
|
|
|
|
$scope.updateFile();
|
|
|
|
|
if ($scope.file.upay_application_form.endsWith('pdf')) {
|
|
|
|
|
if ($scope.file.client_bank_file.endsWith('pdf')) {
|
|
|
|
|
$scope.bankIsImage = false;
|
|
|
|
|
} else {
|
|
|
|
|
$scope.bankIsImage = true;
|
|
|
|
@ -3687,136 +3733,268 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$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.upay_application_form && $scope.file.upay_application_form.endsWith('pdf')) {
|
|
|
|
|
$scope.uploadASICFile = function (file) {
|
|
|
|
|
if (file != null) {
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
} else {
|
|
|
|
|
$scope.ASICProgress = {value: 0};
|
|
|
|
|
Upload.upload({
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
data: {file: file}
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
|
delete $scope.ASICProgress;
|
|
|
|
|
$scope.file.client_company_file = resp.data.url;
|
|
|
|
|
$scope.uploadFile.client_company_file = resp.data.url;
|
|
|
|
|
$scope.updateFile();
|
|
|
|
|
if ($scope.file.client_company_file.endsWith('pdf')) {
|
|
|
|
|
$scope.bankIsImage = false;
|
|
|
|
|
} else {
|
|
|
|
|
$scope.bankIsImage = true;
|
|
|
|
|
}
|
|
|
|
|
$scope.companyIsImage = true;
|
|
|
|
|
if ($scope.file.file_company_info && $scope.file.file_company_info.endsWith('pdf')) {
|
|
|
|
|
$scope.companyIsImage = false;
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
delete $scope.ASICProgress;
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
$scope.ASICProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
$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.uploadIdFile = function (file) {
|
|
|
|
|
if (file != null) {
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
} else {
|
|
|
|
|
$scope.idProgress = {value: 0};
|
|
|
|
|
Upload.upload({
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
data: {file: file}
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
|
delete $scope.idProgress;
|
|
|
|
|
$scope.file.upay_driver_license = resp.data.url;
|
|
|
|
|
$scope.uploadFile.upay_driver_license = resp.data.url;
|
|
|
|
|
$scope.updateFile();
|
|
|
|
|
if ($scope.file.upay_driver_license.endsWith('pdf')) {
|
|
|
|
|
$scope.idIsImage = false;
|
|
|
|
|
} else {
|
|
|
|
|
$scope.idIsImage = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.uploadAgreementFile = function (file) {
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
delete $scope.idProgress;
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
$scope.idProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.uploadResidenceFile = function (file) {
|
|
|
|
|
if (file != null) {
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
} else {
|
|
|
|
|
$scope.companyFileProgress = {value: 0};
|
|
|
|
|
$scope.residenceFileProgress = {value: 0};
|
|
|
|
|
Upload.upload({
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
data: {file: file}
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
delete $scope.companyFileProgress;
|
|
|
|
|
$scope.file.upay_agreement_file = resp.data.url;
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
|
delete $scope.residenceFileProgress;
|
|
|
|
|
$scope.file.kyc_utility_bill_file = resp.data.url;
|
|
|
|
|
$scope.uploadFile.kyc_utility_bill_file = resp.data.url;
|
|
|
|
|
$scope.updateFile();
|
|
|
|
|
if ($scope.file.upay_agreement_file.endsWith('pdf')) {
|
|
|
|
|
$scope.companyIsImage = false;
|
|
|
|
|
if ($scope.file.kyc_utility_bill_file.endsWith('pdf')) {
|
|
|
|
|
$scope.utilityIsImage = false;
|
|
|
|
|
} else {
|
|
|
|
|
$scope.companyIsImage = true;
|
|
|
|
|
$scope.utilityIsImage = true;
|
|
|
|
|
}
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
delete $scope.companyFileProgress;
|
|
|
|
|
delete $scope.residenceFileProgress;
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
$scope.companyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
$scope.residenceFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.uploadOfferFile = function (file) {
|
|
|
|
|
$scope.uploadRefundPolicyFile = function (file) {
|
|
|
|
|
if (file != null) {
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
} else {
|
|
|
|
|
$scope.idFileProgress = {value: 0};
|
|
|
|
|
$scope.refundPolicyFileProgress = {value: 0};
|
|
|
|
|
Upload.upload({
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
data: {file: file}
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
delete $scope.idFileProgress;
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
|
delete $scope.refundPolicyFileProgress;
|
|
|
|
|
$scope.file.refund_exchange_policy = resp.data.url;
|
|
|
|
|
$scope.uploadFile.refund_exchange_policy = resp.data.url;
|
|
|
|
|
$scope.updateFile();
|
|
|
|
|
if ($scope.file.refund_exchange_policy.endsWith('pdf')) {
|
|
|
|
|
$scope.utilityIsImage = false;
|
|
|
|
|
} else {
|
|
|
|
|
$scope.utilityIsImage = true;
|
|
|
|
|
}
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
delete $scope.refundPolicyFileProgress;
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
$scope.refundPolicyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.uploadPrivacyPolicyFile = function (file) {
|
|
|
|
|
if (file != null) {
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
} else {
|
|
|
|
|
$scope.privacyFileProgress = {value: 0};
|
|
|
|
|
Upload.upload({
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
data: {file: file}
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
|
delete $scope.privacyFileProgress;
|
|
|
|
|
$scope.file.upay_privacy_policy = resp.data.url;
|
|
|
|
|
$scope.uploadFile.upay_privacy_policy = resp.data.url;
|
|
|
|
|
$scope.updateFile();
|
|
|
|
|
if ($scope.file.upay_privacy_policy.endsWith('pdf')) {
|
|
|
|
|
$scope.privacyIsImage = false;
|
|
|
|
|
} else {
|
|
|
|
|
$scope.privacyIsImage = true;
|
|
|
|
|
}
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
delete $scope.privacyFileProgress;
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
$scope.privacyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.uploadCardPolicyFile = function (file) {
|
|
|
|
|
if (file != null) {
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
} else {
|
|
|
|
|
$scope.cardFileProgress = {value: 0};
|
|
|
|
|
Upload.upload({
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
data: {file: file}
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
|
delete $scope.cardFileProgress;
|
|
|
|
|
$scope.file.card_security_policy = resp.data.url;
|
|
|
|
|
$scope.uploadFile.card_security_policy = resp.data.url;
|
|
|
|
|
$scope.updateFile();
|
|
|
|
|
if ($scope.file.card_security_policy.endsWith('pdf')) {
|
|
|
|
|
$scope.privacyIsImage = false;
|
|
|
|
|
} else {
|
|
|
|
|
$scope.privacyIsImage = true;
|
|
|
|
|
}
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
delete $scope.cardFileProgress;
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
$scope.cardFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.uploadLetterOfOfferFile = function (file) {
|
|
|
|
|
if (file != null) {
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
} else {
|
|
|
|
|
$scope.letterFileProgress = {value: 0};
|
|
|
|
|
Upload.upload({
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
data: {file: file}
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
|
delete $scope.letterFileProgress;
|
|
|
|
|
$scope.file.upay_offer_letter = resp.data.url;
|
|
|
|
|
$scope.uploadFile.upay_offer_letter = resp.data.url;
|
|
|
|
|
$scope.updateFile();
|
|
|
|
|
if ($scope.file.upay_offer_letter.endsWith('pdf')) {
|
|
|
|
|
$scope.idIsImage = false;
|
|
|
|
|
$scope.letterIsImage = false;
|
|
|
|
|
} else {
|
|
|
|
|
$scope.idIsImage = true;
|
|
|
|
|
$scope.letterIsImage = true;
|
|
|
|
|
}
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
delete $scope.idFileProgress;
|
|
|
|
|
delete $scope.letterFileProgress;
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
$scope.idFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
$scope.letterFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.uploadDriverFile = function (file) {
|
|
|
|
|
$scope.uploadPromotionalFile = function (file) {
|
|
|
|
|
if (file != null) {
|
|
|
|
|
if (file.size > 10 * 1024 * 1024) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过10MB,请压缩后重试', type: 'error'})
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
} else {
|
|
|
|
|
$scope.agreementFileProgress = {value: 0};
|
|
|
|
|
$scope.promotionalFileProgress = {value: 0};
|
|
|
|
|
Upload.upload({
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
data: {file: file}
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
delete $scope.agreementFileProgress;
|
|
|
|
|
$scope.file.upay_driver_license = resp.data.url;
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
|
delete $scope.promotionalFileProgress;
|
|
|
|
|
$scope.file.upay_promotional_offer = resp.data.url;
|
|
|
|
|
$scope.uploadFile.upay_promotional_offer = resp.data.url;
|
|
|
|
|
$scope.updateFile();
|
|
|
|
|
if ($scope.file.upay_driver_license.endsWith('pdf')) {
|
|
|
|
|
$scope.agreeIsImage = false;
|
|
|
|
|
if ($scope.file.upay_promotional_offer.endsWith('pdf')) {
|
|
|
|
|
$scope.promotionalIsImage = false;
|
|
|
|
|
} else {
|
|
|
|
|
$scope.agreeIsImage = true;
|
|
|
|
|
$scope.promotionalIsImage = true;
|
|
|
|
|
}
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
delete $scope.agreementFileProgress;
|
|
|
|
|
delete $scope.promotionalFileProgress;
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
$scope.agreementFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
$scope.promotionalFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.uploadResidenceFile = function (file) {
|
|
|
|
|
$scope.uploadTermsFile = function (file) {
|
|
|
|
|
if (file != null) {
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
} else {
|
|
|
|
|
$scope.applyFileProgress = {value: 0};
|
|
|
|
|
$scope.termsFileProgress = {value: 0};
|
|
|
|
|
Upload.upload({
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
data: {file: file}
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
delete $scope.applyFileProgress;
|
|
|
|
|
$scope.file.upay_residence_certificate = resp.data.url;
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
|
delete $scope.termsFileProgress;
|
|
|
|
|
$scope.file.upay_terms_conditions = resp.data.url;
|
|
|
|
|
$scope.uploadFile.upay_terms_conditions = resp.data.url;
|
|
|
|
|
$scope.updateFile();
|
|
|
|
|
if ($scope.file.upay_residence_certificate.endsWith('pdf')) {
|
|
|
|
|
$scope.applyIsImage = false;
|
|
|
|
|
if ($scope.file.upay_terms_conditions.endsWith('pdf')) {
|
|
|
|
|
$scope.termsIsImage = false;
|
|
|
|
|
} else {
|
|
|
|
|
$scope.applyIsImage = true;
|
|
|
|
|
$scope.termsIsImage = true;
|
|
|
|
|
}
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
delete $scope.applyFileProgress;
|
|
|
|
|
delete $scope.termsFileProgress;
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
$scope.applyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
$scope.termsFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.saveIdInfo = function () {
|
|
|
|
|
if (!$scope.file.upay_risk_level) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '请选择商户风险等级', type: 'error'});
|
|
|
|
@ -3844,34 +4022,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
return url;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.deleteComplianceFiles = function (file_id) {
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: 'This operation will delete the file, Are you sure?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/auth_file/' + 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'});
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.updateFile = function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/mw_file', $scope.file).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/mw_file', $scope.uploadFile).then(function () {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success',
|
|
|
|
|
content: 'Upload Successful',
|
|
|
|
|
type: 'success'
|
|
|
|
|
});
|
|
|
|
|
$state.reload();
|
|
|
|
|
$state.go('partners.detail.files.MW_files', {reload: true});
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
|
})
|
|
|
|
|