|
|
|
@ -522,6 +522,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
};
|
|
|
|
|
$scope.showFile();
|
|
|
|
|
$scope.passClient = function () {
|
|
|
|
|
if(!$scope.partner.wechat_institution_merchant_id){
|
|
|
|
|
commonDialog.alert({title: 'info', content: 'Wechat Institution Merchant Id not Refresh', type: 'info'});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.enable_hf) {
|
|
|
|
|
if($scope.partner.hfindustry == null){
|
|
|
|
|
alert("已开启HF支付通道,HF行业不可为空!");
|
|
|
|
@ -570,6 +574,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$scope.pass2GreenChannel = function () {
|
|
|
|
|
if(!$scope.partner.wechat_institution_merchant_id){
|
|
|
|
|
commonDialog.alert({title: 'info', content: 'Wechat Institution Merchant Id not Refresh', type: 'info'});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Green Channel Audit Partner',
|
|
|
|
|
content: 'Are you sure to mark partner ' + $scope.partner.company_name + ' green channel audited ?'
|
|
|
|
@ -1108,6 +1116,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', function ($scope, $http, $state, commonDialog,$uibModal) {
|
|
|
|
|
$scope.refresh = false;
|
|
|
|
|
$scope.loadPartnerPaymentInfo = function () {
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) {
|
|
|
|
|
$scope.paymentInfo = resp.data;
|
|
|
|
@ -1232,12 +1241,30 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
};
|
|
|
|
|
$scope.ctrl = {};
|
|
|
|
|
$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) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success',
|
|
|
|
|
content: 'Modify Wechat Sub Merchant ID successfully',
|
|
|
|
|
type: 'success'
|
|
|
|
|
});
|
|
|
|
|
$scope.refresh = false;
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$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) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success',
|
|
|
|
|
content: 'Refresh Wechat Institution Merchant Id successfully',
|
|
|
|
|
type: 'success'
|
|
|
|
|
});
|
|
|
|
|
$scope.refresh = true;
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|