|
|
@ -647,7 +647,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.showFile();
|
|
|
|
$scope.showFile();
|
|
|
|
$scope.passClient = function () {
|
|
|
|
$scope.passClient = function () {
|
|
|
|
if(!$scope.partner.wechat_institution_merchant_id){
|
|
|
|
if(!$scope.partner.wechat_institution_merchant_id){
|
|
|
|
commonDialog.alert({title: 'info', content: 'Wechat Institution Merchant Id not Refresh', type: 'info'});
|
|
|
|
commonDialog.alert({title: 'info', content: 'HF Institution Merchant Id not Refresh', type: 'info'});
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($scope.partner.enable_hf) {
|
|
|
|
if ($scope.partner.enable_hf) {
|
|
|
@ -1297,7 +1297,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', '$sce', function ($scope, $http, $state, commonDialog,$uibModal, $sce) {
|
|
|
|
app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', '$sce', function ($scope, $http, $state, commonDialog,$uibModal, $sce) {
|
|
|
|
$scope.refresh = false;
|
|
|
|
|
|
|
|
$scope.copyHfLink = function() {
|
|
|
|
$scope.copyHfLink = function() {
|
|
|
|
var e=document.getElementById("cpbt");
|
|
|
|
var e=document.getElementById("cpbt");
|
|
|
|
e.select();
|
|
|
|
e.select();
|
|
|
@ -1452,23 +1451,26 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.ctrl = {};
|
|
|
|
$scope.ctrl = {};
|
|
|
|
$scope.saveSubMerchantId = function () {
|
|
|
|
$scope.saveSubMerchantId = function () {
|
|
|
|
if(!$scope.refresh){
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'info', content: 'Wechat Institution Merchant Id not Refresh', type: 'info'});
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', {sub_merchant_id: $scope.paymentInfo.sub_merchant_id}).then(function (resp) {
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', {sub_merchant_id: $scope.paymentInfo.sub_merchant_id}).then(function (resp) {
|
|
|
|
|
|
|
|
$scope.refreshInstitutionAfterSaveMerchantId();
|
|
|
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.refreshInstitutionAfterSaveMerchantId = function () {
|
|
|
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_institution_merchant_id', {wechat_institution_merchant_id: $scope.paymentInfo.wechat_institution_merchant_id}).then(function (resp) {
|
|
|
|
commonDialog.alert({
|
|
|
|
commonDialog.alert({
|
|
|
|
title: 'Success',
|
|
|
|
title: 'Success',
|
|
|
|
content: 'Modify Wechat Sub Merchant ID successfully',
|
|
|
|
content: 'Modify Wechat Sub Merchant ID And Refresh Wechat Institution Merchant Id successfully',
|
|
|
|
type: 'success'
|
|
|
|
type: 'success'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$scope.refresh = false;
|
|
|
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.refreshWechatInstitutionMerchantId = function () {
|
|
|
|
$scope.refreshWechatInstitutionMerchantId = function () {
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_institution_merchant_id', {wechat_institution_merchant_id: $scope.paymentInfo.wechat_institution_merchant_id}).then(function (resp) {
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_institution_merchant_id', {wechat_institution_merchant_id: $scope.paymentInfo.wechat_institution_merchant_id}).then(function (resp) {
|
|
|
|
commonDialog.alert({
|
|
|
|
commonDialog.alert({
|
|
|
@ -1476,7 +1478,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
content: 'Refresh Wechat Institution Merchant Id successfully',
|
|
|
|
content: 'Refresh Wechat Institution Merchant Id successfully',
|
|
|
|
type: 'success'
|
|
|
|
type: 'success'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$scope.refresh = true;
|
|
|
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
@ -3401,6 +3402,22 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.loadSubMerchantInfos();
|
|
|
|
$scope.loadSubMerchantInfos();
|
|
|
|
})
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.updateYeepaySubMerchantId = function (sub_merchant_id) {
|
|
|
|
|
|
|
|
$uibModal.open({
|
|
|
|
|
|
|
|
templateUrl: '/static/payment/partner/templates/update_yeepay_sub_merchant_id.html',
|
|
|
|
|
|
|
|
controller: 'updateYeepaySubMerchantIdCtrl',
|
|
|
|
|
|
|
|
resolve: {
|
|
|
|
|
|
|
|
subMerchantInfo: function () {
|
|
|
|
|
|
|
|
return $scope.partner;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
subMerchantId: function () {
|
|
|
|
|
|
|
|
return sub_merchant_id;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).result.then(function () {
|
|
|
|
|
|
|
|
$scope.loadSubMerchantInfos();
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
};
|
|
|
|
$scope.loadSubMerchantInfos();
|
|
|
|
$scope.loadSubMerchantInfos();
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
app.controller('applyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog) {
|
|
|
|
app.controller('applyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog) {
|
|
|
@ -3504,58 +3521,64 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
|
|
|
|
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
|
|
|
|
var vouchers={};
|
|
|
|
var vouchers={};
|
|
|
|
|
|
|
|
|
|
|
|
var merchantId = '';
|
|
|
|
$scope.directors={};
|
|
|
|
|
|
|
|
$scope.executives={};
|
|
|
|
|
|
|
|
$scope.industry = '';
|
|
|
|
|
|
|
|
$scope.business_content = '';
|
|
|
|
|
|
|
|
var merchantInfo = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var merchantId = '';
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadLegalIDcardFront = function (file) {
|
|
|
|
|
|
|
|
if (file != null) {
|
|
|
|
|
|
|
|
if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$scope.legalIDcardFrontProgress = {value: 0};
|
|
|
|
|
|
|
|
Upload.upload({
|
|
|
|
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
data: {file: file}
|
|
|
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
|
|
|
delete $scope.legalIDcardFrontProgress;
|
|
|
|
|
|
|
|
$scope.legalIDcardFront = resp.data.path;
|
|
|
|
|
|
|
|
vouchers['legalIDcardFront'] = resp.data.path;
|
|
|
|
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
|
|
|
delete $scope.legalIDcardFrontProgress;
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
|
|
|
$scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadLegalIDcardBack = function (file) {
|
|
|
|
// $scope.uploadLegalIDcardFront = 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.legalIDcardBackProgress = {value: 0};
|
|
|
|
// $scope.legalIDcardFrontProgress = {value: 0};
|
|
|
|
Upload.upload({
|
|
|
|
// Upload.upload({
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
data: {file: file}
|
|
|
|
// data: {file: file}
|
|
|
|
}).then(function (resp) {
|
|
|
|
// }).then(function (resp) {
|
|
|
|
delete $scope.legalIDcardBackProgress;
|
|
|
|
// delete $scope.legalIDcardFrontProgress;
|
|
|
|
$scope.legalIDcardBack = resp.data.path;
|
|
|
|
// $scope.legalIDcardFront = resp.data.path;
|
|
|
|
vouchers['legalIDcardBack'] = resp.data.path;
|
|
|
|
// vouchers['legalIDcardFront'] = resp.data.path;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
}, function (resp) {
|
|
|
|
// }, function (resp) {
|
|
|
|
delete $scope.legalIDcardBackProgress;
|
|
|
|
// delete $scope.legalIDcardFrontProgress;
|
|
|
|
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.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
// $scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
};
|
|
|
|
// };
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// $scope.uploadLegalIDcardBack = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.legalIDcardBackProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.legalIDcardBackProgress;
|
|
|
|
|
|
|
|
// $scope.legalIDcardBack = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['legalIDcardBack'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.legalIDcardBackProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadBusinessLicence = function (file) {
|
|
|
|
$scope.uploadBusinessLicence = function (file) {
|
|
|
|
if (file != null) {
|
|
|
|
if (file != null) {
|
|
|
@ -3569,7 +3592,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}).then(function (resp) {
|
|
|
|
}).then(function (resp) {
|
|
|
|
delete $scope.businessLicenceProgress;
|
|
|
|
delete $scope.businessLicenceProgress;
|
|
|
|
$scope.businessLicence = resp.data.path;
|
|
|
|
$scope.businessLicence = resp.data.path;
|
|
|
|
vouchers['businessLicence'] = resp.data.path;
|
|
|
|
merchantInfo['business_licence'] = resp.data.path;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
@ -3582,133 +3605,492 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadTaxLevel = function (file) {
|
|
|
|
// $scope.uploadTaxLevel = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.taxLevelProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.taxLevelProgress;
|
|
|
|
|
|
|
|
// $scope.taxLevel = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['taxLevel'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.taxLevelProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $scope.uploadBankAccountOpen = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.bankAccountOpenProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.bankAccountOpenProgress;
|
|
|
|
|
|
|
|
// $scope.bankAccountOpen = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['bankAccountOpen'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.bankAccountOpenProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $scope.uploadOrgCode = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.orgCodeProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.orgCodeProgress;
|
|
|
|
|
|
|
|
// $scope.orgCode = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['orgCode'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.orgCodeProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// $scope.uploadNonStanProtocol = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.nonStanProtocolProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.nonStanProtocolProgress;
|
|
|
|
|
|
|
|
// $scope.nonStanProtocol = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['nonStanProtocol'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.nonStanProtocolProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// $scope.uploadZipPath = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.zipPathProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.zipPathProgress;
|
|
|
|
|
|
|
|
// $scope.zipPath = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['zipPath'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.zipPathProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadDirectorPassport = 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.taxLevelProgress = {value: 0};
|
|
|
|
$scope.directorPassportProgress = {value: 0};
|
|
|
|
Upload.upload({
|
|
|
|
Upload.upload({
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
data: {file: file}
|
|
|
|
data: {file: file}
|
|
|
|
}).then(function (resp) {
|
|
|
|
}).then(function (resp) {
|
|
|
|
delete $scope.taxLevelProgress;
|
|
|
|
delete $scope.directorPassportProgress;
|
|
|
|
$scope.taxLevel = resp.data.path;
|
|
|
|
$scope.directorPassport = resp.data.path;
|
|
|
|
vouchers['taxLevel'] = resp.data.path;
|
|
|
|
$scope.directors.filePath = resp.data.path;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
delete $scope.taxLevelProgress;
|
|
|
|
delete $scope.directorPassportProgress;
|
|
|
|
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.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
$scope.directorPassportProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadBankAccountOpen = function (file) {
|
|
|
|
$scope.uploadExecutivePassport = 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.bankAccountOpenProgress = {value: 0};
|
|
|
|
$scope.executivePassportProgress = {value: 0};
|
|
|
|
Upload.upload({
|
|
|
|
Upload.upload({
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
data: {file: file}
|
|
|
|
data: {file: file}
|
|
|
|
}).then(function (resp) {
|
|
|
|
}).then(function (resp) {
|
|
|
|
delete $scope.bankAccountOpenProgress;
|
|
|
|
delete $scope.executivePassportProgress;
|
|
|
|
$scope.bankAccountOpen = resp.data.path;
|
|
|
|
$scope.executivePassport = resp.data.path;
|
|
|
|
vouchers['bankAccountOpen'] = resp.data.path;
|
|
|
|
$scope.executives.filePath = resp.data.path;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
delete $scope.bankAccountOpenProgress;
|
|
|
|
delete $scope.executivePassportProgress;
|
|
|
|
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.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
$scope.executivePassportProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadOrgCode = function (file) {
|
|
|
|
$scope.saveYeepayApply = function (form) {
|
|
|
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
|
|
|
|
if (form.$invalid) {
|
|
|
|
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
|
|
|
|
if (key.indexOf('$') < 0) {
|
|
|
|
|
|
|
|
item.$dirty = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// angular.forEach(form, function (item, key) {
|
|
|
|
|
|
|
|
// if(item !=null) {
|
|
|
|
|
|
|
|
// if(item.$name !=null) {
|
|
|
|
|
|
|
|
// merchantInfo[key] = item.$modelValue;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
merchantInfo['company_website'] = $scope.subMerchantInfo.company_website;
|
|
|
|
|
|
|
|
merchantInfo['abn'] = $scope.subMerchantInfo.abn;
|
|
|
|
|
|
|
|
merchantInfo['executives'] = $scope.executives;
|
|
|
|
|
|
|
|
merchantInfo['directors'] = $scope.directors;
|
|
|
|
|
|
|
|
merchantInfo['business_content'] = $scope.business_content;
|
|
|
|
|
|
|
|
merchantInfo['industry'] = $scope.industry;
|
|
|
|
|
|
|
|
merchantInfo['merchantId'] = merchantId;
|
|
|
|
|
|
|
|
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registYeepaySubMerchantId', merchantInfo).then(function (resp) {
|
|
|
|
|
|
|
|
$scope.apply_sub_merchant_id = resp.data;
|
|
|
|
|
|
|
|
$scope.$close();
|
|
|
|
|
|
|
|
if (subMerchantInfo.yeepay_sub_merchant_id != null) {
|
|
|
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
|
|
|
title: 'Success',
|
|
|
|
|
|
|
|
content: 'Modify Yeepay Sub Merchant ID successfully',
|
|
|
|
|
|
|
|
type: 'success'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$state.reload();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
|
|
|
title: 'Error',
|
|
|
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
|
|
|
type: 'error'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.controller('updateYeepaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state','subMerchantInfo','yeepayIndustryMap','yeepayBusinessContentMap','$filter', 'commonDialog','Upload','subMerchantId', function ($scope, $http, $uibModal, $state,subMerchantInfo,yeepayIndustryMap,yeepayBusinessContentMap,$filter, commonDialog,Upload,subMerchantId) {
|
|
|
|
|
|
|
|
$scope.yeepay_industries = yeepayIndustryMap.configs();
|
|
|
|
|
|
|
|
$scope.yeepay_business_contents = yeepayBusinessContentMap.configs();
|
|
|
|
|
|
|
|
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
|
|
|
|
|
|
|
|
var vouchers={};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.directors={};
|
|
|
|
|
|
|
|
$scope.executives={};
|
|
|
|
|
|
|
|
$scope.industry = '';
|
|
|
|
|
|
|
|
$scope.business_content = '';
|
|
|
|
|
|
|
|
var merchantInfo = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var merchantId = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $scope.uploadLegalIDcardFront = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.legalIDcardFrontProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.legalIDcardFrontProgress;
|
|
|
|
|
|
|
|
// $scope.legalIDcardFront = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['legalIDcardFront'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.legalIDcardFrontProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// $scope.uploadLegalIDcardBack = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.legalIDcardBackProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.legalIDcardBackProgress;
|
|
|
|
|
|
|
|
// $scope.legalIDcardBack = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['legalIDcardBack'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.legalIDcardBackProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadBusinessLicence = 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.orgCodeProgress = {value: 0};
|
|
|
|
$scope.businessLicenceProgress = {value: 0};
|
|
|
|
Upload.upload({
|
|
|
|
Upload.upload({
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
data: {file: file}
|
|
|
|
data: {file: file}
|
|
|
|
}).then(function (resp) {
|
|
|
|
}).then(function (resp) {
|
|
|
|
delete $scope.orgCodeProgress;
|
|
|
|
delete $scope.businessLicenceProgress;
|
|
|
|
$scope.orgCode = resp.data.path;
|
|
|
|
$scope.businessLicence = resp.data.path;
|
|
|
|
vouchers['orgCode'] = resp.data.path;
|
|
|
|
merchantInfo['business_licence'] = resp.data.path;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
delete $scope.orgCodeProgress;
|
|
|
|
delete $scope.businessLicenceProgress;
|
|
|
|
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.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
$scope.businessLicenceProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadNonStanProtocol = function (file) {
|
|
|
|
// $scope.uploadTaxLevel = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.taxLevelProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.taxLevelProgress;
|
|
|
|
|
|
|
|
// $scope.taxLevel = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['taxLevel'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.taxLevelProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $scope.uploadBankAccountOpen = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.bankAccountOpenProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.bankAccountOpenProgress;
|
|
|
|
|
|
|
|
// $scope.bankAccountOpen = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['bankAccountOpen'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.bankAccountOpenProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $scope.uploadOrgCode = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.orgCodeProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.orgCodeProgress;
|
|
|
|
|
|
|
|
// $scope.orgCode = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['orgCode'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.orgCodeProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// $scope.uploadNonStanProtocol = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.nonStanProtocolProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.nonStanProtocolProgress;
|
|
|
|
|
|
|
|
// $scope.nonStanProtocol = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['nonStanProtocol'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.nonStanProtocolProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// $scope.uploadZipPath = function (file) {
|
|
|
|
|
|
|
|
// if (file != null) {
|
|
|
|
|
|
|
|
// if (file.size > 3 * 1024 * 1024) {
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'})
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $scope.zipPathProgress = {value: 0};
|
|
|
|
|
|
|
|
// Upload.upload({
|
|
|
|
|
|
|
|
// url: '/attachment/yeepayFiles',
|
|
|
|
|
|
|
|
// data: {file: file}
|
|
|
|
|
|
|
|
// }).then(function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.zipPathProgress;
|
|
|
|
|
|
|
|
// $scope.zipPath = resp.data.path;
|
|
|
|
|
|
|
|
// vouchers['zipPath'] = resp.data.path;
|
|
|
|
|
|
|
|
// merchantId = resp.data.merchantId;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// delete $scope.zipPathProgress;
|
|
|
|
|
|
|
|
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
// }, function (evt) {
|
|
|
|
|
|
|
|
// $scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadDirectorPassport = 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.nonStanProtocolProgress = {value: 0};
|
|
|
|
$scope.directorPassportProgress = {value: 0};
|
|
|
|
Upload.upload({
|
|
|
|
Upload.upload({
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
data: {file: file}
|
|
|
|
data: {file: file}
|
|
|
|
}).then(function (resp) {
|
|
|
|
}).then(function (resp) {
|
|
|
|
delete $scope.nonStanProtocolProgress;
|
|
|
|
delete $scope.directorPassportProgress;
|
|
|
|
$scope.nonStanProtocol = resp.data.path;
|
|
|
|
$scope.directorPassport = resp.data.path;
|
|
|
|
vouchers['nonStanProtocol'] = resp.data.path;
|
|
|
|
$scope.directors.filePath = resp.data.path;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
delete $scope.nonStanProtocolProgress;
|
|
|
|
delete $scope.directorPassportProgress;
|
|
|
|
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.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
$scope.directorPassportProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadZipPath = function (file) {
|
|
|
|
$scope.uploadExecutivePassport = 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.zipPathProgress = {value: 0};
|
|
|
|
$scope.executivePassportProgress = {value: 0};
|
|
|
|
Upload.upload({
|
|
|
|
Upload.upload({
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
url: '/attachment/yeepayFiles',
|
|
|
|
data: {file: file}
|
|
|
|
data: {file: file}
|
|
|
|
}).then(function (resp) {
|
|
|
|
}).then(function (resp) {
|
|
|
|
delete $scope.zipPathProgress;
|
|
|
|
delete $scope.executivePassportProgress;
|
|
|
|
$scope.zipPath = resp.data.path;
|
|
|
|
$scope.executivePassport = resp.data.path;
|
|
|
|
vouchers['zipPath'] = resp.data.path;
|
|
|
|
$scope.executives.filePath = resp.data.path;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
merchantId = resp.data.merchantId;
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
delete $scope.zipPathProgress;
|
|
|
|
delete $scope.executivePassportProgress;
|
|
|
|
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.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
$scope.executivePassportProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.saveYeepayApply = function (form) {
|
|
|
|
$scope.updateYeepayApply = function (form) {
|
|
|
|
var merchantInfo = {};
|
|
|
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
$scope.errmsg = null;
|
|
|
|
if (form.$invalid) {
|
|
|
|
if (form.$invalid) {
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
@ -3718,22 +4100,28 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
// angular.forEach(form, function (item, key) {
|
|
|
|
if(item !=null) {
|
|
|
|
// if(item !=null) {
|
|
|
|
if(item.$name !=null) {
|
|
|
|
// if(item.$name !=null) {
|
|
|
|
merchantInfo[key] = item.$modelValue;
|
|
|
|
// merchantInfo[key] = item.$modelValue;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
merchantInfo['vouchers'] = vouchers;
|
|
|
|
merchantInfo['company_website'] = $scope.subMerchantInfo.company_website;
|
|
|
|
|
|
|
|
merchantInfo['abn'] = $scope.subMerchantInfo.abn;
|
|
|
|
|
|
|
|
merchantInfo['executives'] = $scope.executives;
|
|
|
|
|
|
|
|
merchantInfo['subMerchantId'] = angular.copy(subMerchantId);
|
|
|
|
|
|
|
|
merchantInfo['directors'] = $scope.directors;
|
|
|
|
|
|
|
|
merchantInfo['business_content'] = $scope.business_content;
|
|
|
|
|
|
|
|
merchantInfo['industry'] = $scope.industry;
|
|
|
|
merchantInfo['merchantId'] = merchantId;
|
|
|
|
merchantInfo['merchantId'] = merchantId;
|
|
|
|
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registYeepaySubMerchantId', merchantInfo).then(function (resp) {
|
|
|
|
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/updateYeepaySubMerchantId', merchantInfo).then(function (resp) {
|
|
|
|
$scope.apply_sub_merchant_id = resp.data;
|
|
|
|
$scope.apply_sub_merchant_id = resp.data;
|
|
|
|
$scope.$close();
|
|
|
|
$scope.$close();
|
|
|
|
if (subMerchantInfo.yeepay_sub_merchant_id != null) {
|
|
|
|
if (subMerchantInfo.yeepay_sub_merchant_id != null) {
|
|
|
|
commonDialog.alert({
|
|
|
|
commonDialog.alert({
|
|
|
|
title: 'Success',
|
|
|
|
title: 'Success',
|
|
|
|
content: 'Modify Yeepay Sub Merchant ID successfully',
|
|
|
|
content: 'Update Successfully,Please Wait For Review!',
|
|
|
|
type: 'success'
|
|
|
|
type: 'success'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$state.reload();
|
|
|
|
$state.reload();
|
|
|
@ -3748,6 +4136,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.controller('permissionClientCtrl', ['$scope', '$http', '$uibModal', '$state', '$filter', 'commonDialog', function ($scope, $http, $uibModal, $state, $filter, commonDialog) {
|
|
|
|
app.controller('permissionClientCtrl', ['$scope', '$http', '$uibModal', '$state', '$filter', 'commonDialog', function ($scope, $http, $uibModal, $state, $filter, commonDialog) {
|
|
|
|
$scope.clientPermission = {client_moniker:$scope.partner.client_moniker};
|
|
|
|
$scope.clientPermission = {client_moniker:$scope.partner.client_moniker};
|
|
|
|
$scope.loadPermissionList = function () {
|
|
|
|
$scope.loadPermissionList = function () {
|
|
|
|