|
|
@ -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) {
|
|
|
|
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.id_info_form = {edit: false};
|
|
|
|
$scope.file = file.data || {};
|
|
|
|
$scope.file = file.data || {};
|
|
|
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
$scope.file.upay_risk_level = $scope.partner.upay_risk_level;
|
|
|
|
$scope.file.upay_risk_level = $scope.partner.upay_risk_level;
|
|
|
|
$scope.file.upay_risk_remark = $scope.partner.upay_risk_remark;
|
|
|
|
$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 != null) {
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
@ -3670,10 +3714,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
url: '/attachment/files',
|
|
|
|
url: '/attachment/files',
|
|
|
|
data: {file: file}
|
|
|
|
data: {file: file}
|
|
|
|
}).then(function (resp) {
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
delete $scope.bankFileProgress;
|
|
|
|
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();
|
|
|
|
$scope.updateFile();
|
|
|
|
if ($scope.file.upay_application_form.endsWith('pdf')) {
|
|
|
|
if ($scope.file.client_bank_file.endsWith('pdf')) {
|
|
|
|
$scope.bankIsImage = false;
|
|
|
|
$scope.bankIsImage = false;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$scope.bankIsImage = true;
|
|
|
|
$scope.bankIsImage = true;
|
|
|
@ -3687,136 +3733,268 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.agreeIsImage = true;
|
|
|
|
$scope.uploadASICFile = function (file) {
|
|
|
|
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.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.uploadAgreementFile = function (file) {
|
|
|
|
|
|
|
|
if (file != null) {
|
|
|
|
if (file != null) {
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$scope.companyFileProgress = {value: 0};
|
|
|
|
$scope.ASICProgress = {value: 0};
|
|
|
|
Upload.upload({
|
|
|
|
Upload.upload({
|
|
|
|
url: '/attachment/files',
|
|
|
|
url: '/attachment/files',
|
|
|
|
data: {file: file}
|
|
|
|
data: {file: file}
|
|
|
|
}).then(function (resp) {
|
|
|
|
}).then(function (resp) {
|
|
|
|
delete $scope.companyFileProgress;
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
$scope.file.upay_agreement_file = resp.data.url;
|
|
|
|
delete $scope.ASICProgress;
|
|
|
|
|
|
|
|
$scope.file.client_company_file = resp.data.url;
|
|
|
|
|
|
|
|
$scope.uploadFile.client_company_file = resp.data.url;
|
|
|
|
$scope.updateFile();
|
|
|
|
$scope.updateFile();
|
|
|
|
if ($scope.file.upay_agreement_file.endsWith('pdf')) {
|
|
|
|
if ($scope.file.client_company_file.endsWith('pdf')) {
|
|
|
|
$scope.companyIsImage = false;
|
|
|
|
$scope.bankIsImage = false;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$scope.companyIsImage = true;
|
|
|
|
$scope.bankIsImage = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
delete $scope.companyFileProgress;
|
|
|
|
delete $scope.ASICProgress;
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
}, function (evt) {
|
|
|
|
}, function (evt) {
|
|
|
|
$scope.companyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
$scope.ASICProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.uploadOfferFile = function (file) {
|
|
|
|
$scope.uploadIdFile = function (file) {
|
|
|
|
if (file != null) {
|
|
|
|
if (file != null) {
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$scope.idFileProgress = {value: 0};
|
|
|
|
$scope.idProgress = {value: 0};
|
|
|
|
Upload.upload({
|
|
|
|
Upload.upload({
|
|
|
|
url: '/attachment/files',
|
|
|
|
url: '/attachment/files',
|
|
|
|
data: {file: file}
|
|
|
|
data: {file: file}
|
|
|
|
}).then(function (resp) {
|
|
|
|
}).then(function (resp) {
|
|
|
|
delete $scope.idFileProgress;
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
$scope.file.upay_offer_letter = resp.data.url;
|
|
|
|
delete $scope.idProgress;
|
|
|
|
|
|
|
|
$scope.file.upay_driver_license = resp.data.url;
|
|
|
|
|
|
|
|
$scope.uploadFile.upay_driver_license = resp.data.url;
|
|
|
|
$scope.updateFile();
|
|
|
|
$scope.updateFile();
|
|
|
|
if ($scope.file.upay_offer_letter.endsWith('pdf')) {
|
|
|
|
if ($scope.file.upay_driver_license.endsWith('pdf')) {
|
|
|
|
$scope.idIsImage = false;
|
|
|
|
$scope.idIsImage = false;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$scope.idIsImage = true;
|
|
|
|
$scope.idIsImage = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
delete $scope.idFileProgress;
|
|
|
|
delete $scope.idProgress;
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
}, function (evt) {
|
|
|
|
}, function (evt) {
|
|
|
|
$scope.idFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
$scope.idProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.uploadDriverFile = function (file) {
|
|
|
|
$scope.uploadResidenceFile = function (file) {
|
|
|
|
if (file != null) {
|
|
|
|
if (file != null) {
|
|
|
|
if (file.size > 10 * 1024 * 1024) {
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过10MB,请压缩后重试', type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$scope.agreementFileProgress = {value: 0};
|
|
|
|
$scope.residenceFileProgress = {value: 0};
|
|
|
|
Upload.upload({
|
|
|
|
Upload.upload({
|
|
|
|
url: '/attachment/files',
|
|
|
|
url: '/attachment/files',
|
|
|
|
data: {file: file}
|
|
|
|
data: {file: file}
|
|
|
|
}).then(function (resp) {
|
|
|
|
}).then(function (resp) {
|
|
|
|
delete $scope.agreementFileProgress;
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
$scope.file.upay_driver_license = resp.data.url;
|
|
|
|
delete $scope.residenceFileProgress;
|
|
|
|
|
|
|
|
$scope.file.kyc_utility_bill_file = resp.data.url;
|
|
|
|
|
|
|
|
$scope.uploadFile.kyc_utility_bill_file = resp.data.url;
|
|
|
|
$scope.updateFile();
|
|
|
|
$scope.updateFile();
|
|
|
|
if ($scope.file.upay_driver_license.endsWith('pdf')) {
|
|
|
|
if ($scope.file.kyc_utility_bill_file.endsWith('pdf')) {
|
|
|
|
$scope.agreeIsImage = false;
|
|
|
|
$scope.utilityIsImage = false;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$scope.agreeIsImage = true;
|
|
|
|
$scope.utilityIsImage = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
delete $scope.agreementFileProgress;
|
|
|
|
delete $scope.residenceFileProgress;
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
}, function (evt) {
|
|
|
|
}, function (evt) {
|
|
|
|
$scope.agreementFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
$scope.residenceFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.uploadResidenceFile = function (file) {
|
|
|
|
$scope.uploadRefundPolicyFile = function (file) {
|
|
|
|
if (file != null) {
|
|
|
|
if (file != null) {
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$scope.applyFileProgress = {value: 0};
|
|
|
|
$scope.refundPolicyFileProgress = {value: 0};
|
|
|
|
Upload.upload({
|
|
|
|
Upload.upload({
|
|
|
|
url: '/attachment/files',
|
|
|
|
url: '/attachment/files',
|
|
|
|
data: {file: file}
|
|
|
|
data: {file: file}
|
|
|
|
}).then(function (resp) {
|
|
|
|
}).then(function (resp) {
|
|
|
|
delete $scope.applyFileProgress;
|
|
|
|
$scope.uploadFile = {};
|
|
|
|
$scope.file.upay_residence_certificate = resp.data.url;
|
|
|
|
delete $scope.refundPolicyFileProgress;
|
|
|
|
|
|
|
|
$scope.file.refund_exchange_policy = resp.data.url;
|
|
|
|
|
|
|
|
$scope.uploadFile.refund_exchange_policy = resp.data.url;
|
|
|
|
$scope.updateFile();
|
|
|
|
$scope.updateFile();
|
|
|
|
if ($scope.file.upay_residence_certificate.endsWith('pdf')) {
|
|
|
|
if ($scope.file.refund_exchange_policy.endsWith('pdf')) {
|
|
|
|
$scope.applyIsImage = false;
|
|
|
|
$scope.utilityIsImage = false;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$scope.applyIsImage = true;
|
|
|
|
$scope.utilityIsImage = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
delete $scope.applyFileProgress;
|
|
|
|
delete $scope.refundPolicyFileProgress;
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
}, function (evt) {
|
|
|
|
}, function (evt) {
|
|
|
|
$scope.applyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
$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.letterIsImage = false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$scope.letterIsImage = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
|
|
|
delete $scope.letterFileProgress;
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
|
|
|
$scope.letterFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.uploadPromotionalFile = function (file) {
|
|
|
|
|
|
|
|
if (file != null) {
|
|
|
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$scope.promotionalFileProgress = {value: 0};
|
|
|
|
|
|
|
|
Upload.upload({
|
|
|
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
|
|
|
data: {file: file}
|
|
|
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
|
|
|
$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_promotional_offer.endsWith('pdf')) {
|
|
|
|
|
|
|
|
$scope.promotionalIsImage = false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$scope.promotionalIsImage = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
|
|
|
delete $scope.promotionalFileProgress;
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
|
|
|
$scope.promotionalFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.uploadTermsFile = function (file) {
|
|
|
|
|
|
|
|
if (file != null) {
|
|
|
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$scope.termsFileProgress = {value: 0};
|
|
|
|
|
|
|
|
Upload.upload({
|
|
|
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
|
|
|
data: {file: file}
|
|
|
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
|
|
|
$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_terms_conditions.endsWith('pdf')) {
|
|
|
|
|
|
|
|
$scope.termsIsImage = false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$scope.termsIsImage = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
|
|
|
delete $scope.termsFileProgress;
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
|
|
|
$scope.termsFileProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.saveIdInfo = function () {
|
|
|
|
$scope.saveIdInfo = function () {
|
|
|
|
if (!$scope.file.upay_risk_level) {
|
|
|
|
if (!$scope.file.upay_risk_level) {
|
|
|
|
commonDialog.alert({title: 'Error', content: '请选择商户风险等级', type: 'error'});
|
|
|
|
commonDialog.alert({title: 'Error', content: '请选择商户风险等级', type: 'error'});
|
|
|
@ -3844,34 +4022,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
return url;
|
|
|
|
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 () {
|
|
|
|
$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({
|
|
|
|
commonDialog.alert({
|
|
|
|
title: 'Success',
|
|
|
|
title: 'Success',
|
|
|
|
content: 'Upload Successful',
|
|
|
|
content: 'Upload Successful',
|
|
|
|
type: 'success'
|
|
|
|
type: 'success'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$state.reload();
|
|
|
|
$state.go('partners.detail.files.MW_files', {reload: true});
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
})
|
|
|
|
})
|
|
|
|