|
|
|
@ -14,8 +14,11 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
|
|
|
|
|
var resultTypesMap = {
|
|
|
|
|
"0": "未处理",
|
|
|
|
|
"1": "处理中",
|
|
|
|
|
"2": "已处理"
|
|
|
|
|
"1": "已发送邮件至BD",
|
|
|
|
|
"2": "BD已提交材料,等待审核",
|
|
|
|
|
"3": "材料审核通过",
|
|
|
|
|
"4": "材料审核不通过,已打回",
|
|
|
|
|
"5": "已处理()",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var emailStatusMap = {
|
|
|
|
@ -43,6 +46,10 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
url: '/new_riskEvent',
|
|
|
|
|
templateUrl: '/static/analysis/templates/new_riskEvent.html',
|
|
|
|
|
controller: 'newRiskEventCtrl'
|
|
|
|
|
}).state('analysis_monitoring.riskEvent_detail.audit_material', {
|
|
|
|
|
url: '/audit_material',
|
|
|
|
|
templateUrl: '/static/analysis/templates/audit_material.html',
|
|
|
|
|
controller: 'auditMaterialCtrl'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
@ -69,6 +76,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
app.controller('riskEventDetailCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'riskEvent',
|
|
|
|
|
function ($scope, $state, $http, $uibModal, $filter, commonDialog, riskEvent) {
|
|
|
|
|
|
|
|
|
|
$scope.orderTypes = orderTypesMap;
|
|
|
|
|
|
|
|
|
|
$scope.riskEvent = riskEvent.data;
|
|
|
|
|
|
|
|
|
|
// 编辑表格的数据保存对象,重新从源数据复制,从而取消保存操作时不会更新视图
|
|
|
|
@ -79,7 +88,9 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
|
|
|
|
|
// 调单信息
|
|
|
|
|
$scope.tradeLogs = $scope.riskEvent.tradeLogs;
|
|
|
|
|
$scope.orderTypes = orderTypesMap;
|
|
|
|
|
|
|
|
|
|
// 商户信息
|
|
|
|
|
$scope.clientInfo = $scope.riskEvent.clientInfo;
|
|
|
|
|
|
|
|
|
|
// 控制编辑表格的显示
|
|
|
|
|
$scope.editFlag = false;
|
|
|
|
@ -121,6 +132,56 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 关停渠道
|
|
|
|
|
$scope.updateChannel = function (orderType) {
|
|
|
|
|
var channel;
|
|
|
|
|
if (orderType == "1")
|
|
|
|
|
channel = 'wechat';
|
|
|
|
|
else if (orderType == "2")
|
|
|
|
|
channel = 'alipay';
|
|
|
|
|
$http.put('/sys/partners/' + $scope.riskEvent.client_moniker + '/channels/' + channel + '/permission', {allow: $scope.clientInfo['enable_' + channel]}).then(function () {
|
|
|
|
|
$state.reload('analysis_monitoring.riskEvent_detail');
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Failed to change ' + channel + ' channel permission status',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 关停商户
|
|
|
|
|
$scope.updateClient = function(isValid) {
|
|
|
|
|
if (isValid) {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.riskEvent.client_moniker + '/revert').then(function () {
|
|
|
|
|
$state.reload('analysis_monitoring.riskEvent_detail');
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
$http.delete('/sys/partners/' + $scope.riskEvent.client_moniker).then(function () {
|
|
|
|
|
$state.reload('analysis_monitoring.riskEvent_detail');
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 获取riskEvent详细信息
|
|
|
|
|
$scope.loadRiskEventDetail = function(riskId) {
|
|
|
|
|
$http.get('/risk/business/events/' + riskId)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
app.controller('auditMaterialCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog',
|
|
|
|
|
function ($scope, $state, $http, $uibModal, $filter, commonDialog) {
|
|
|
|
|
$scope.downloadAsZip = function () {
|
|
|
|
|
var url = '/risk/business/' + $scope.riskEvent.risk_id + '/download/materialsAsZIP';
|
|
|
|
|
return url;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|