|
|
|
@ -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 = {}
|
|
|
|
@ -6511,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'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
@ -6530,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'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
@ -7279,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
|
|
|
|
@ -7433,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
|
|
|
|
@ -7462,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
|
|
|
|
@ -7682,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
|
|
|
|
@ -7836,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
|
|
|
|
@ -7865,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
|
|
|
|
@ -7957,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'})
|
|
|
|
|
}
|
|
|
|
@ -7967,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'})
|
|
|
|
|
}
|
|
|
|
|