|
|
@ -46,8 +46,6 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
$scope.states = stateMap.configs();
|
|
|
|
$scope.states = stateMap.configs();
|
|
|
|
$scope.countries = countryMap.configs();
|
|
|
|
$scope.countries = countryMap.configs();
|
|
|
|
$scope.params = {};
|
|
|
|
$scope.params = {};
|
|
|
|
$scope.merchantIsValid = false;
|
|
|
|
|
|
|
|
$scope.merchantCodeChecked = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.loadPartners = function (page) {
|
|
|
|
$scope.loadPartners = function (page) {
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
@ -57,27 +55,21 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.linkButton = function (obj) {
|
|
|
|
$scope.linkButton = function (obj) {
|
|
|
|
var partner = angular.copy(obj);
|
|
|
|
var partner = angular.copy(obj);
|
|
|
|
$http.get('/sys/partners/init/merchant_code').then(function (response) {
|
|
|
|
partner.link = true;
|
|
|
|
partner.client_moniker = response.data.partner_code;
|
|
|
|
$uibModal.open({
|
|
|
|
console.log('partner.client_moniker',partner.client_moniker)
|
|
|
|
templateUrl: '/static/payment/partner/templates/partner_application_pass.html',
|
|
|
|
console.log('partner',partner)
|
|
|
|
controller: 'passApplicationCtrl',
|
|
|
|
$scope.merchantCodeChecked = true;
|
|
|
|
resolve: {
|
|
|
|
$scope.merchantIsValid = true;
|
|
|
|
partner: partner
|
|
|
|
partner.link = true;
|
|
|
|
}
|
|
|
|
$uibModal.open({
|
|
|
|
}).result.then(function () {
|
|
|
|
templateUrl: '/static/payment/partner/templates/partner_application_pass.html',
|
|
|
|
commonDialog.alert({title: 'Success', content: '关联成功!', type: 'success'});
|
|
|
|
controller: 'passApplicationCtrl',
|
|
|
|
$state.reload();
|
|
|
|
resolve: {
|
|
|
|
// $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true});
|
|
|
|
partner: partner
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
}).result.then(function () {
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Success', content: '关联成功!', type: 'success'});
|
|
|
|
|
|
|
|
$state.reload();
|
|
|
|
|
|
|
|
// $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true});
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.loadPartners(1);
|
|
|
|
$scope.loadPartners(1);
|
|
|
@ -162,12 +154,36 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.pass = function (obj) {
|
|
|
|
$scope.pass = function (partner) {
|
|
|
|
$uibModal.open({
|
|
|
|
|
|
|
|
|
|
|
|
$http.get('/sys/partners/init/merchant_code').then(function (response) {
|
|
|
|
|
|
|
|
partner.client_moniker = response.data.partner_code;
|
|
|
|
|
|
|
|
console.log('partner.client_moniker',partner.client_moniker)
|
|
|
|
|
|
|
|
console.log('partner',partner)
|
|
|
|
|
|
|
|
$scope.merchantCodeChecked = true;
|
|
|
|
|
|
|
|
$scope.merchantIsValid = true;
|
|
|
|
|
|
|
|
$uibModal.open({
|
|
|
|
|
|
|
|
templateUrl: '/static/payment/partner/templates/partner_application_pass.html',
|
|
|
|
|
|
|
|
controller: 'passApplicationCtrl',
|
|
|
|
|
|
|
|
resolve: {
|
|
|
|
|
|
|
|
partner: partner
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).result.then(function () {
|
|
|
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
|
|
|
title: 'Success',
|
|
|
|
|
|
|
|
content: 'Pass Successfully ! 您成功建立了新的商户,请及时完善信息。',
|
|
|
|
|
|
|
|
type: 'success'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
// $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true});
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*$uibModal.open({
|
|
|
|
templateUrl: '/static/payment/partner/templates/partner_application_pass.html',
|
|
|
|
templateUrl: '/static/payment/partner/templates/partner_application_pass.html',
|
|
|
|
controller: 'passApplicationCtrl',
|
|
|
|
controller: 'passApplicationCtrl',
|
|
|
|
resolve: {
|
|
|
|
resolve: {
|
|
|
|
partner: obj
|
|
|
|
partner: obj,
|
|
|
|
|
|
|
|
isPass:true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).result.then(function () {
|
|
|
|
}).result.then(function () {
|
|
|
|
commonDialog.alert({
|
|
|
|
commonDialog.alert({
|
|
|
@ -176,7 +192,10 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
type: 'success'
|
|
|
|
type: 'success'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
// $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true});
|
|
|
|
// $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true});
|
|
|
|
})
|
|
|
|
})*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.updateRemark = function () {
|
|
|
|
$scope.updateRemark = function () {
|
|
|
|
var obj = angular.copy($scope.partner);
|
|
|
|
var obj = angular.copy($scope.partner);
|
|
|
|