|
|
@ -55,6 +55,7 @@ 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);
|
|
|
|
partner.link = true;
|
|
|
|
partner.link = true;
|
|
|
@ -153,12 +154,19 @@ 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) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$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({
|
|
|
|
$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: partner
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).result.then(function () {
|
|
|
|
}).result.then(function () {
|
|
|
|
commonDialog.alert({
|
|
|
|
commonDialog.alert({
|
|
|
@ -168,6 +176,26 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
});
|
|
|
|
});
|
|
|
|
// $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});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*$uibModal.open({
|
|
|
|
|
|
|
|
templateUrl: '/static/payment/partner/templates/partner_application_pass.html',
|
|
|
|
|
|
|
|
controller: 'passApplicationCtrl',
|
|
|
|
|
|
|
|
resolve: {
|
|
|
|
|
|
|
|
partner: obj,
|
|
|
|
|
|
|
|
isPass:true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).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});
|
|
|
|
|
|
|
|
})*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.updateRemark = function () {
|
|
|
|
$scope.updateRemark = function () {
|
|
|
|
var obj = angular.copy($scope.partner);
|
|
|
|
var obj = angular.copy($scope.partner);
|
|
|
@ -177,6 +205,8 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
app.controller('passApplicationCtrl', ['$scope', '$http', '$state', 'partner', function ($scope, $http, $state, partner) {
|
|
|
|
app.controller('passApplicationCtrl', ['$scope', '$http', '$state', 'partner', function ($scope, $http, $state, partner) {
|
|
|
|
$scope.partner = angular.copy(partner);
|
|
|
|
$scope.partner = angular.copy(partner);
|
|
|
|
|
|
|
|
$scope.merchantCodeChecked = false;
|
|
|
|
|
|
|
|
$scope.merchantIsValid = false;
|
|
|
|
$scope.submit = function (form) {
|
|
|
|
$scope.submit = function (form) {
|
|
|
|
if (form.$invalid) {
|
|
|
|
if (form.$invalid) {
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
@ -198,6 +228,28 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
});
|
|
|
|
});
|
|
|
|
//$rootScope.partner_application = $scope.client;
|
|
|
|
//$rootScope.partner_application = $scope.client;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.initMerchantCode=function(){
|
|
|
|
|
|
|
|
$http.get('/sys/partners/init/merchant_code').then(function (response) {
|
|
|
|
|
|
|
|
$scope.partner.client_moniker = response.data.partner_code;
|
|
|
|
|
|
|
|
console.log('refresh',$scope.partner.client_moniker)
|
|
|
|
|
|
|
|
$scope.merchantCodeChecked = true;
|
|
|
|
|
|
|
|
$scope.merchantIsValid = true;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.checkMerchantCodeIsValid = function (code) {
|
|
|
|
|
|
|
|
if (code.length != 4) {
|
|
|
|
|
|
|
|
$scope.merchantCodeChecked = false;
|
|
|
|
|
|
|
|
$scope.merchantIsValid = false;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$http.get('/sys/partners/init/check_code_isvalid', {params: {clientMoniker: code}}).then(function (response) {
|
|
|
|
|
|
|
|
$scope.merchantIsValid = response.data;
|
|
|
|
|
|
|
|
$scope.merchantCodeChecked = true;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.link = function (form) {
|
|
|
|
$scope.link = function (form) {
|
|
|
|
if (form.$invalid) {
|
|
|
|
if (form.$invalid) {
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|