Merge branch 'self-application' into develop

master
PeiYY 4 years ago
commit eaf091228d

@ -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,14 +55,9 @@ 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.client_moniker = response.data.partner_code;
console.log('partner.client_moniker',partner.client_moniker)
console.log('partner',partner)
$scope.merchantCodeChecked = true;
$scope.merchantIsValid = true;
partner.link = true; partner.link = true;
$uibModal.open({ $uibModal.open({
templateUrl: '/static/payment/partner/templates/partner_application_pass.html', templateUrl: '/static/payment/partner/templates/partner_application_pass.html',
@ -77,7 +70,6 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
$state.reload(); $state.reload();
// $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.loadPartners(1); $scope.loadPartners(1);
@ -162,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({
@ -177,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);

@ -10,7 +10,11 @@
<label class="control-label col-sm-4" for="short-id-input">* Partner Code(4 Letters or <label class="control-label col-sm-4" for="short-id-input">* Partner Code(4 Letters or
Numbers)</label> Numbers)</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input class="form-control text-uppercase" <input ng-if="!partner.link" class="form-control text-uppercase" ng-model="partner.client_moniker"
type="text"
name="client_moniker"
id="short-id-pass-input" required maxlength="4" ng-pattern="/^[a-zA-Z0-9]+$/">
<input ng-if="partner.link" class="form-control text-uppercase"
ng-model="partner.client_moniker" ng-model="partner.client_moniker"
type="text" type="text"
name="client_moniker" name="client_moniker"
@ -26,8 +30,8 @@
Numbers are allowed</p> Numbers are allowed</p>
</div> </div>
</div> </div>
<a style="display: inline-block" role="button" ng-click="initMerchantCode(partner)"><i class="fa fa-refresh" title="Refreshes the partner code"></i></a> <a ng-if="!partner.link" style="display: inline-block" role="button" ng-click="initMerchantCode(partner)"><i class="fa fa-refresh" title="Refreshes the partner code"></i></a>
<span ng-if="merchantCodeChecked"> <span ng-if="!partner.link&&merchantCodeChecked">
<i ng-if="merchantIsValid" class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none;padding-left: 20px"></i> <i ng-if="merchantIsValid" class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none;padding-left: 20px"></i>
<i ng-if="!merchantIsValid" class="text-danger fa fa-close" style="float: none;padding-left: 20px"></i> <i ng-if="!merchantIsValid" class="text-danger fa fa-close" style="float: none;padding-left: 20px"></i>
</span> </span>

Loading…
Cancel
Save