add copy upay profile api-ui

master
yixian 4 years ago
parent bd82a9f3c4
commit 273468c56b

@ -106,7 +106,7 @@ define(['../app', 'angular'], function (app, angular) {
} }
}, },
controller:['$scope','cfg',function ($scope, cfg) { controller:['$scope','cfg',function ($scope, cfg) {
$scope.title = cfg.title || 'Input Amount'; $scope.title = cfg.title || 'Input Text';
$scope.data = {}; $scope.data = {};
$scope.submit = function () { $scope.submit = function () {
$scope.$close($scope.data.text); $scope.$close($scope.data.text);

@ -5685,6 +5685,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}); });
}; };
$scope.copyMWProfile = function () {
commonDialog.inputText({title:'请输入复制来源商户编码'}).then(function (text) {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/copy_mw_config',{client_moniker: text}).then(function (resp) {
commonDialog.alert({
title: 'Success',
content: 'Modify successfully',
type: 'success'
});
$scope.loadPartnerInfo();
},function (resp) {
commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' });
})
});
};
// $scope.showMoreMerchantInfo = false; // $scope.showMoreMerchantInfo = false;
// $scope.hideMerchantInfo = function () { // $scope.hideMerchantInfo = function () {
// $scope.showMoreMerchantInfo = !$scope.showMoreMerchantInfo; // $scope.showMoreMerchantInfo = !$scope.showMoreMerchantInfo;

@ -281,6 +281,11 @@
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
Apply Apply
</button> </button>
<button role="button" class="btn btn-info" title="Copy From other merchant"
ng-click="copyMWProfile()" ng-if="'copy_mw_config'|withFunc">
<i class="fa fa-copy"></i>
Copy
</button>
</div> </div>
</div> </div>
<div class="panel-body"> <div class="panel-body">

Loading…
Cancel
Save