|
|
|
@ -378,7 +378,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('partnerDetailCtrl', ['$scope', '$http', '$state', '$uibModal', '$rootScope', 'Upload', 'commonDialog', 'partner', function ($scope, $http, $state, $uibModal, $rootScope, Upload, commonDialog, partner) {
|
|
|
|
|
$scope.init = {wechatcompliance: false};
|
|
|
|
|
$scope.init = {wechat_compliance: false,local_merchant:false};
|
|
|
|
|
$scope.partner = partner.data;
|
|
|
|
|
$scope.showDBUsers = function () {
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/bd_user').then(function (resp) {
|
|
|
|
@ -730,6 +730,24 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.changeLocalMerchant = function () {
|
|
|
|
|
if (!$scope.partner) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!$scope.init.local_merchant) {
|
|
|
|
|
$scope.init.local_merchant = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/local_merchant_permission', {allow: $scope.partner.local_merchant}).then(function () {
|
|
|
|
|
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'failed to change local_merchant permission status',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('partnerEditCtrl', ['$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'partner',
|
|
|
|
|
function ($scope, $http, $state, Upload, commonDialog, timezone, partner) {
|
|
|
|
|