|
|
|
@ -917,7 +917,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.updateMerchantLocation = function () {
|
|
|
|
|
var params = window.frames['merchant_detail'].merchant_location
|
|
|
|
|
if (params) {
|
|
|
|
|
$http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () {})
|
|
|
|
|
$http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -1614,7 +1615,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$http.delete('/sys/partners/' + $scope.partner.client_moniker).then(
|
|
|
|
|
function () {
|
|
|
|
|
$state.go('^')
|
|
|
|
|
commonDialog.alert({ title: 'Delete', content: 'Partner Already Disabled', type: 'error' })
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Delete',
|
|
|
|
|
content: 'Partner Already Disabled',
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
@ -1632,7 +1637,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/revert').then(
|
|
|
|
|
function () {
|
|
|
|
|
$state.go('^')
|
|
|
|
|
commonDialog.alert({ title: 'Revert', content: 'Partner Already Revert', type: 'success' })
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Revert',
|
|
|
|
|
content: 'Partner Already Revert',
|
|
|
|
|
type: 'success'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
@ -1929,7 +1938,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_compliance_permission', {allow: $scope.partner.wechat_compliance}).then(
|
|
|
|
|
function () {},
|
|
|
|
|
function () {
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'failed to change wechat_compliance permission status',
|
|
|
|
@ -1952,7 +1962,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/local_merchant_permission', {allow: $scope.partner.local_merchant}).then(
|
|
|
|
|
function () {},
|
|
|
|
|
function () {
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'failed to change local_merchant permission status',
|
|
|
|
@ -2282,7 +2293,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
commonDialog.alert({title: 'Success', content: 'Alipay进件成功', type: 'success'})
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({ title: 'Error', content: '进件失败:' + resp.data.message, type: 'error' })
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Error',
|
|
|
|
|
content: '进件失败:' + resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
@ -2310,10 +2325,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
.then(function () {
|
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms').then(
|
|
|
|
|
function () {
|
|
|
|
|
commonDialog.alert({ title: 'Success', content: '提示:AlipayOnline进件成功', type: 'success' })
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success',
|
|
|
|
|
content: '提示:AlipayOnline进件成功',
|
|
|
|
|
type: 'success'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({ title: 'Error', content: '进件失败:' + resp.data.message, type: 'error' })
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Error',
|
|
|
|
|
content: '进件失败:' + resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
@ -2430,6 +2453,29 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$scope.switchAlipayCn = function (clientId, apsConfigId, alipayCn) {
|
|
|
|
|
if (!$scope.paymentInfo.enable_alipayaps) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'ERROR',
|
|
|
|
|
content: "AlipayCN channel can be switched only after Alipay+(APS) is enabled",
|
|
|
|
|
type: 'error',
|
|
|
|
|
})
|
|
|
|
|
$scope.loadPartnerPaymentInfo()
|
|
|
|
|
} else {
|
|
|
|
|
$http.put('/sys/partners/aps/' + clientId, {id: apsConfigId, alipayCnSwitch: alipayCn}).then(
|
|
|
|
|
function () {
|
|
|
|
|
$scope.loadPartnerPaymentInfo()
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Failed to change alipayCN channel permission status',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$scope.toggleChannel = function (channel) {
|
|
|
|
|
if (!channel) {
|
|
|
|
|
return
|
|
|
|
@ -2441,6 +2487,15 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
// $scope.init.channel[channel] = true
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
if($scope.paymentInfo.alipay_cn_switch){
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'ERROR',
|
|
|
|
|
content: "Please switch AlipayCN to Alipay channel, and then close Alipay+(APS) channel",
|
|
|
|
|
type: 'error',
|
|
|
|
|
})
|
|
|
|
|
$scope.loadPartnerPaymentInfo()
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$scope.getComplianceInfo()
|
|
|
|
|
if ($scope.paymentInfo['enable_wechat'] && channel == 'wechat' && $scope.paymentInfo.open_status == 5 && info.length > 0) {
|
|
|
|
|
commonDialog
|
|
|
|
@ -3253,7 +3308,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.init.allow_surcharge_credit = true
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/allow_surcharge_credit', { allow_surcharge_credit: allowSurchargeCredit }).then(function (resp) {})
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/allow_surcharge_credit', {allow_surcharge_credit: allowSurchargeCredit}).then(function (resp) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
$scope.taxInSurcharge = function (taxInSurcharge) {
|
|
|
|
|
if (!$scope.init.tax_in_surcharge) {
|
|
|
|
@ -3727,7 +3783,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
$scope.updateAccountRole = function (account) {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/accounts/' + account.account_id + '/role', {role: account.role}).then(
|
|
|
|
|
function () {},
|
|
|
|
|
function () {
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
}
|
|
|
|
@ -4276,7 +4333,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.updateMerchantLocation = function () {
|
|
|
|
|
var params = window.frames['merchant_detail'].merchant_location
|
|
|
|
|
if (params) {
|
|
|
|
|
$http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () {})
|
|
|
|
|
$http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -4575,7 +4633,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.listDevices()
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({ title: 'Update remark failed', content: resp.data.message, type: 'error' })
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Update remark failed',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
@ -4586,7 +4648,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.listDevices()
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({ title: 'Failed to disable device', content: resp.data.message, type: 'error' })
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Failed to disable device',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
@ -4596,7 +4662,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.listDevices()
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({ title: 'Failed to enable device', content: resp.data.message, type: 'error' })
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Failed to enable device',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
@ -5230,6 +5300,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
type: 'error',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.complianceCheck = function () {
|
|
|
|
|
if (!$rootScope.complianceCheck) {
|
|
|
|
|
$rootScope.complianceCheck = {}
|
|
|
|
@ -5643,6 +5714,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
type: 'error',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.complianceCheck = function () {
|
|
|
|
|
if (!$rootScope.complianceCheck) {
|
|
|
|
|
$rootScope.complianceCheck = {}
|
|
|
|
@ -5875,6 +5947,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
type: 'error',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.complianceCheck = function () {
|
|
|
|
|
if (!$rootScope.complianceCheck) {
|
|
|
|
|
$rootScope.complianceCheck = {}
|
|
|
|
@ -6385,67 +6458,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.loadSubMerchantInfos()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$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 Sub Merchant Id
|
|
|
|
|
$scope.queryWechatSubMerchantIdStatus = function () {
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids/' + $scope.partnerInfo.sub_merchant_id + '/status').then(
|
|
|
|
@ -6572,7 +6584,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.loadPartnerInfo()
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({ title: 'Error', content: '进件失败:' + resp.data.message, type: 'error' })
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Error',
|
|
|
|
|
content: '进件失败:' + resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
@ -6591,11 +6607,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
.then(function () {
|
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms').then(
|
|
|
|
|
function () {
|
|
|
|
|
commonDialog.alert({ title: 'Success', content: '提示:AlipayOnline进件成功', type: 'success' })
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success',
|
|
|
|
|
content: '提示:AlipayOnline进件成功',
|
|
|
|
|
type: 'success'
|
|
|
|
|
})
|
|
|
|
|
$scope.loadPartnerInfo()
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({ title: 'Error', content: '进件失败:' + resp.data.message, type: 'error' })
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Error',
|
|
|
|
|
content: '进件失败:' + resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
@ -7034,133 +7058,6 @@ 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('updateApplyWxSubMerchantIdCtrl', [
|
|
|
|
|
'$scope',
|
|
|
|
|
'$http',
|
|
|
|
@ -7467,7 +7364,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.businessLicence = resp.data.path
|
|
|
|
|
merchantInfo['business_licence'] = resp.data.path
|
|
|
|
|
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) {
|
|
|
|
|
delete $scope.businessLicenceProgress
|
|
|
|
@ -7621,7 +7522,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.directorPassport = resp.data.path
|
|
|
|
|
$scope.directors.filePath = resp.data.path
|
|
|
|
|
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) {
|
|
|
|
|
delete $scope.directorPassportProgress
|
|
|
|
@ -7650,7 +7555,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.executivePassport = resp.data.path
|
|
|
|
|
$scope.executives.filePath = resp.data.path
|
|
|
|
|
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) {
|
|
|
|
|
delete $scope.executivePassportProgress
|
|
|
|
@ -7870,7 +7779,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.businessLicence = resp.data.path
|
|
|
|
|
merchantInfo['business_licence'] = resp.data.path
|
|
|
|
|
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) {
|
|
|
|
|
delete $scope.businessLicenceProgress
|
|
|
|
@ -8024,7 +7937,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.directorPassport = resp.data.path
|
|
|
|
|
$scope.directors.filePath = resp.data.path
|
|
|
|
|
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) {
|
|
|
|
|
delete $scope.directorPassportProgress
|
|
|
|
@ -8053,7 +7970,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.executivePassport = resp.data.path
|
|
|
|
|
$scope.executives.filePath = resp.data.path
|
|
|
|
|
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) {
|
|
|
|
|
delete $scope.executivePassportProgress
|
|
|
|
@ -8145,7 +8066,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.clientPermission.isValid = permission.is_valid
|
|
|
|
|
var params = angular.copy($scope.clientPermission)
|
|
|
|
|
$http.post('/sys/permission/' + permission.id, params).then(
|
|
|
|
|
function (resp) {},
|
|
|
|
|
function (resp) {
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
}
|
|
|
|
@ -8155,7 +8077,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.init = function () {
|
|
|
|
|
var params = {client_moniker: $scope.partner.client_moniker}
|
|
|
|
|
$http.post('/sys/permission/init', params).then(
|
|
|
|
|
function (resp) {},
|
|
|
|
|
function (resp) {
|
|
|
|
|
},
|
|
|
|
|
function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
}
|
|
|
|
|