|
|
|
@ -6435,6 +6435,67 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
//alipayplus aps 注册
|
|
|
|
|
$scope.applyAlipayPlusRetailMerchantId = function () {
|
|
|
|
|
$uibModal
|
|
|
|
|
.open({
|
|
|
|
|
templateUrl: '/static/payment/partner/templates/apply_alipayplus_sub_merchant_id.html',
|
|
|
|
|
controller: 'applyAlipayPlusSubMerchantIdCtrl',
|
|
|
|
|
resolve: {
|
|
|
|
|
subMerchantInfo: function () {
|
|
|
|
|
return $scope.partner
|
|
|
|
|
},
|
|
|
|
|
online: false,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
.result.then(function () {
|
|
|
|
|
$scope.loadSubMerchantInfos()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
$scope.applyAlipayPlusOnlineMerchantId = function () {
|
|
|
|
|
$uibModal
|
|
|
|
|
.open({
|
|
|
|
|
templateUrl: '/static/payment/partner/templates/apply_alipayplus_sub_merchant_id.html',
|
|
|
|
|
controller: 'applyAlipayPlusSubMerchantIdCtrl',
|
|
|
|
|
resolve: {
|
|
|
|
|
subMerchantInfo: function () {
|
|
|
|
|
return $scope.partner
|
|
|
|
|
},
|
|
|
|
|
online: true,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
.result.then(function () {
|
|
|
|
|
$scope.loadSubMerchantInfos()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
$scope.queryAlipayPlusApsOnline = function () {
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_aps_online').then(
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'AlipayPlus Online Apply Status',
|
|
|
|
|
content: resp.data.response_str,
|
|
|
|
|
type: 'info',
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({ title: 'Error', content: '查询失败:' + resp.data.message, type: 'error' })
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
};
|
|
|
|
|
$scope.queryAlipayPlusApsRetail = function () {
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_aps_retail').then(
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'AlipayPlus Retail Apply Status',
|
|
|
|
|
content: resp.data.response_str,
|
|
|
|
|
type: 'info',
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({ title: 'Error', content: '查询失败:' + resp.data.message, type: 'error' })
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
};
|
|
|
|
|
// Wechat-applay
|
|
|
|
|
$scope.applyWxSubMerchantId = function () {
|
|
|
|
|
$uibModal
|
|
|
|
@ -7212,6 +7273,131 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
])
|
|
|
|
|
/**
|
|
|
|
|
* 申请alipayplus
|
|
|
|
|
*/
|
|
|
|
|
app.controller('applyAlipayPlusSubMerchantIdCtrl', [
|
|
|
|
|
'$scope',
|
|
|
|
|
'$http',
|
|
|
|
|
'$uibModal',
|
|
|
|
|
'$state',
|
|
|
|
|
'subMerchantInfo',
|
|
|
|
|
'$filter',
|
|
|
|
|
'commonDialog',
|
|
|
|
|
'online',
|
|
|
|
|
function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, commonDialog,online) {
|
|
|
|
|
$scope.subMerchantInfo = angular.copy(subMerchantInfo)
|
|
|
|
|
$scope.subMerchantInfo.online=online;
|
|
|
|
|
$scope.subMerchantInfo.merchantDisplayName = $scope.subMerchantInfo.short_name;
|
|
|
|
|
$scope.subMerchantInfo.registrationAddress= $scope.subMerchantInfo.address;
|
|
|
|
|
|
|
|
|
|
// if ($scope.subMerchantInfo.client_pay_type) {
|
|
|
|
|
// if ($scope.subMerchantInfo.client_pay_type.indexOf('1') >= 0 && $scope.subMerchantInfo.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
// $scope.subMerchantInfo.payment_type_online = true;
|
|
|
|
|
// $scope.subMerchantInfo.business_type_offline = true;
|
|
|
|
|
// } else if ($scope.subMerchantInfo.client_pay_type.indexOf('1') >= 0) {
|
|
|
|
|
// $scope.subMerchantInfo.business_type_offline = true
|
|
|
|
|
// } else if ($scope.subMerchantInfo.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
// $scope.subMerchantInfo.business_type_agreement = true
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// $scope.subMerchantInfo.payment_type_online = true;
|
|
|
|
|
// $scope.subMerchantInfo.business_type_offline = true;
|
|
|
|
|
// }
|
|
|
|
|
if($scope.subMerchantInfo.online) {
|
|
|
|
|
$scope.title = "AlipayPlus-aps(Online)Registration";
|
|
|
|
|
}else{
|
|
|
|
|
$scope.title = "AlipayPlus-aps(Retail)Registration";
|
|
|
|
|
}
|
|
|
|
|
$scope.subMerchantInfo.websiteType = 'WEB';
|
|
|
|
|
$scope.subMerchantInfo.website= $scope.subMerchantInfo.company_website;
|
|
|
|
|
$scope.subMerchantInfo.legalName = $scope.subMerchantInfo.company_name;
|
|
|
|
|
$scope.subMerchantInfo.registrationType='OTHER_IDENTIFICATION_NO'
|
|
|
|
|
if ($scope.subMerchantInfo.business_structure) {
|
|
|
|
|
$scope.subMerchantInfo.businessType = $scope.subMerchantInfo.business_structure != 'Registered body(Sole Trader)' ? 'ENTERPRISE' : 'INDIVIDUAL'
|
|
|
|
|
}
|
|
|
|
|
$scope.subMerchantInfo.shareholderName= $scope.subMerchantInfo.representativeInfo.representative_person;
|
|
|
|
|
$scope.subMerchantInfo.representativeName= $scope.subMerchantInfo.representativeInfo.representative_person;
|
|
|
|
|
$scope.subMerchantInfo.storeAddress= $scope.subMerchantInfo.address;
|
|
|
|
|
$scope.subMerchantInfo.registrationNo= $scope. subMerchantInfo.acn ? $scope.subMerchantInfo.acn : $scope.subMerchantInfo.abn;
|
|
|
|
|
$scope.subMerchantInfo.storeMCC=$scope.subMerchantInfo.alipayindustry;
|
|
|
|
|
$scope.subMerchantInfo.storeName=$scope.subMerchantInfo.store_name;
|
|
|
|
|
|
|
|
|
|
$scope.alipayMccCategory = {}
|
|
|
|
|
$scope.loadAlipayCategory = function () {
|
|
|
|
|
$http.get('/static/data/alipayMcc.json').then(function (resp) {
|
|
|
|
|
$scope.alipayMccCategory = resp.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
$scope.loadAlipayCategory()
|
|
|
|
|
|
|
|
|
|
$scope.onAlipayMccSelect = function (selectedItem) {
|
|
|
|
|
$scope.subMerchantInfo.alipay_category = selectedItem.label
|
|
|
|
|
$scope.subMerchantInfo.alipayindustry = selectedItem.mccCode
|
|
|
|
|
}
|
|
|
|
|
$scope.onAlipayStoreMccSelect = function (selectedItem) {
|
|
|
|
|
$scope.subMerchantInfo.storeMCC_category = selectedItem.label
|
|
|
|
|
$scope.subMerchantInfo.storeMCC = selectedItem.mccCode
|
|
|
|
|
}
|
|
|
|
|
$scope.saveAlipayApply = function (form) {
|
|
|
|
|
$scope.errmsg = null
|
|
|
|
|
if (form.$invalid) {
|
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
|
if (key.indexOf('$') < 0) {
|
|
|
|
|
item.$dirty = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var params = {
|
|
|
|
|
websiteType: $scope.subMerchantInfo.websiteType,
|
|
|
|
|
merchantDisplayName: $scope.subMerchantInfo.merchantDisplayName,
|
|
|
|
|
merchantMCC: $scope.subMerchantInfo.alipayindustry,
|
|
|
|
|
legalName: $scope.subMerchantInfo.legalName,
|
|
|
|
|
registrationType: $scope.subMerchantInfo.registrationType,
|
|
|
|
|
registrationNo: $scope.subMerchantInfo.registrationNo,
|
|
|
|
|
businessType: $scope.subMerchantInfo.businessType,
|
|
|
|
|
shareholderName: $scope.subMerchantInfo.shareholderName,
|
|
|
|
|
shareholderId: $scope.subMerchantInfo.shareholderId,
|
|
|
|
|
representativeName: $scope.subMerchantInfo.representativeName,
|
|
|
|
|
representativeId: $scope.subMerchantInfo.representativeId,
|
|
|
|
|
storeName: $scope.subMerchantInfo.storeName,
|
|
|
|
|
storeMCC: $scope.subMerchantInfo.storeMCC,
|
|
|
|
|
storeAddress: $scope.subMerchantInfo.storeAddress,
|
|
|
|
|
registrationAddress: $scope.subMerchantInfo.registrationAddress,
|
|
|
|
|
}
|
|
|
|
|
params.productCodes=[];
|
|
|
|
|
if($scope.subMerchantInfo.online){
|
|
|
|
|
params.productCodes.push('CASHIER_PAYMENT');
|
|
|
|
|
}else{
|
|
|
|
|
params.productCodes.push('IN_STORE_PAYMENT');
|
|
|
|
|
}
|
|
|
|
|
params.websites=[]
|
|
|
|
|
if($scope.subMerchantInfo.online){
|
|
|
|
|
params.websites.push($scope.subMerchantInfo.website);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/apply_alipayplus', params).then(
|
|
|
|
|
function (resp) {
|
|
|
|
|
if(resp.data.success) {
|
|
|
|
|
commonDialog.alert({ title: 'Success', content: "注册成功!", type: 'success' })
|
|
|
|
|
}else{
|
|
|
|
|
commonDialog.alert({title: 'Error', content: "注册失败!", type: 'error'})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.$close()
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
$scope.flag = false
|
|
|
|
|
commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' })
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
app.controller('applyRpaySubMerchantIdCtrl', [
|
|
|
|
|
'$scope',
|
|
|
|
|