修复运营后台处理自助申请通过时无法编辑商户号的问题

master
PeiYY 4 years ago
parent 7562cbcfb3
commit 31a43b02bb

@ -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);

@ -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,11 +30,11 @@
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>
</div> </div>
</form> </form>
</div> </div>

Loading…
Cancel
Save