|
|
|
@ -45,6 +45,10 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
|
});
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
}).state('analysis_monitoring.attention', {
|
|
|
|
|
url: '/risk/attention',
|
|
|
|
|
templateUrl: '/static/risk/templates/attention_merchants.html',
|
|
|
|
|
controller: 'AttentionMerchantCtrl'
|
|
|
|
|
});
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('RiskManageCtrl', ['$scope', '$http', function ($scope, $http){
|
|
|
|
@ -218,6 +222,41 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('AttentionMerchantCtrl', ['$scope', '$http','commonDialog','$uibModal', function ($scope, $http,commonDialog,$uibModal){
|
|
|
|
|
$scope.params = {};
|
|
|
|
|
$scope.pagination = {};
|
|
|
|
|
$scope.ctrl = {};
|
|
|
|
|
$scope.loadAttentionMerchants = function (page) {
|
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
|
|
$http.get('/sys/risk/attention', {params: params}).then(function (resp) {
|
|
|
|
|
$scope.attentions = resp.data.data;
|
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
|
$scope.ctrl.addAttention = false;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$scope.loadAttentionMerchants(1);
|
|
|
|
|
$scope.disableAttention = function (client_moniker) {
|
|
|
|
|
commonDialog.confirm({title: 'Confirm', content: '确定删除这个商户?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.put('/sys/risk/attention/' + client_moniker).then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: 'disable successfully', type: 'success'});
|
|
|
|
|
$scope.loadAttentionMerchants(1);
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.addAttentionMerchants = function (client_moniker) {
|
|
|
|
|
$http.post('/sys/risk/attention/'+ client_moniker).then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: 'add successfully', type: 'success'});
|
|
|
|
|
$scope.loadAttentionMerchants(1);
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.filter('risk_type', function () {
|
|
|
|
|
return function (riskStr) {
|
|
|
|
|
angular.forEach(riskType,function (type) {
|
|
|
|
|