tod 2019/4/17

将开关(Sub Partners Manage)移动子商户页面
并加上注释:开启后,父商户具有帮子商户新建账户、退款等管理权限
master
todking 6 years ago
parent 51c05147ad
commit 4f197125db

@ -2115,6 +2115,34 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
$scope.loadSubClients();
$scope.loadPartnerPaymentInfo = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) {
$scope.paymentInfo = resp.data;
})
};
$scope.loadPartnerPaymentInfo();
$scope.switchSubManage = function () {
if (!$scope.paymentInfo) {
return;
}
if (!$scope.init.sub_manage) {
$scope.init.sub_manage = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/sub_manage', {allow: $scope.paymentInfo.sub_manage}).then(function () {
//$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'Failed to change Sub Partners Manage status',
content: resp.data.message,
type: 'error'
})
})
};
}]);
app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog','$sce', function ($scope, $rootScope, $http, $uibModal, commonDialog,$sce) {
$scope.bankCtrl = {edit: true, rate_name: 'Wechat'};

@ -184,12 +184,12 @@
</div>
</div>
</div>
<div class="form-group" ng-if="('10'|withRole) && partner.parent_client_id==null">
<label class="col-sm-3 control-label">Sub Partners Manage</label>
<div class="col-xs-9">
<input type="checkbox" ng-model="paymentInfo.sub_manage" bs-switch switch-change="switchSubManage()">
</div>
</div>
<!--<div class="form-group" ng-if="('10'|withRole) && partner.parent_client_id==null">-->
<!--<label class="col-sm-3 control-label">Sub Partners Manage</label>-->
<!--<div class="col-xs-9" title="开启后,父商户具有帮子商户新建账户、退款等管理权限">-->
<!--<input type="checkbox" ng-model="paymentInfo.sub_manage" bs-switch switch-change="switchSubManage()">-->
<!--</div>-->
<!--</div>-->
</div>
</div>
</div>

@ -1,9 +1,17 @@
<div class="panel panel-default" ng-if="'111'|withRole">
<div class="panel-body" ng-if="('10'|withRole) && partner.parent_client_id==null">
<div class="panel-body" title="开启后,父商户具有帮子商户新建账户、退款等管理权限">
Sub Partners Manage <input type="checkbox" ng-model="paymentInfo.sub_manage" bs-switch switch-change="switchSubManage()">
</div>
</div>
<div class="panel-body">
<button class="btn btn-primary" type="button" ng-click="newSubClient()">
<i class="fa fa-plus"></i> New Sub Partner
</button>
</div>
</div>
<div class="row">
<div class="col-sm-12 table-responsive">

Loading…
Cancel
Save