|
|
|
@ -18,13 +18,14 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
"2": "BD已提交材料,等待审核",
|
|
|
|
|
"3": "材料审核通过",
|
|
|
|
|
"4": "材料审核不通过,已打回",
|
|
|
|
|
"5": "已处理",
|
|
|
|
|
"5": "已处理"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var emailStatusMap = {
|
|
|
|
|
"0": "未发送",
|
|
|
|
|
"1": "已发送",
|
|
|
|
|
"2": "打回并已发送"
|
|
|
|
|
"2": "打回并已发送",
|
|
|
|
|
"3": "已发送催促邮件"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var app = angular.module('riskBusinessApp', ['ui.router']);
|
|
|
|
@ -63,6 +64,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
$scope.pagination = {};
|
|
|
|
|
$scope.params = {};
|
|
|
|
|
|
|
|
|
|
// 加载风险注册事件
|
|
|
|
|
$scope.loadRiskEvents = function (page) {
|
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
|
@ -84,6 +86,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
$scope.orderTypes = orderTypesMap;
|
|
|
|
|
|
|
|
|
|
$scope.riskEvent = riskEvent.data;
|
|
|
|
|
// 获取数据库中对应的渠道字段
|
|
|
|
|
var orderChannel = 'enable_';
|
|
|
|
|
if ($scope.riskEvent.order_type == 1) {
|
|
|
|
|
orderChannel += 'wechat';
|
|
|
|
@ -154,27 +157,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
* 关停渠道
|
|
|
|
|
* @param orderType 调单类型
|
|
|
|
|
* @param channelFlag
|
|
|
|
|
* @param temporaryFlag 是否临时关闭
|
|
|
|
|
|
|
|
|
|
$scope.updateChannel = function (orderType, channelFlag, temporaryFlag) {
|
|
|
|
|
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: channelFlag}).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'
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
};*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* @param temporaryFlag 是否临时关停
|
|
|
|
|
*/
|
|
|
|
|
$scope.updateChannel = function (orderType, channelFlag, temporaryFlag) {
|
|
|
|
|
var channel;
|
|
|
|
|
if (orderType == "1")
|
|
|
|
@ -182,33 +166,37 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
else if (orderType == "2")
|
|
|
|
|
channel = 'alipay';
|
|
|
|
|
$scope.riskEvent.temporary_close_channel = temporaryFlag;
|
|
|
|
|
$http.put('/risk/business/channel/' + channel + '/permission/' + channelFlag, $scope.riskEvent).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'
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: 'Are you sure?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.put('/risk/business/channel/' + channel + '/permission/' + channelFlag, $scope.riskEvent).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, temporaryFlag) {
|
|
|
|
|
$scope.riskEvent.temporary_close_merchant = temporaryFlag;
|
|
|
|
|
$http.put('/risk/business/partner/' + isValid, $scope.riskEvent).then(function () {
|
|
|
|
|
$state.reload('analysis_monitoring.riskEvent_detail');
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: 'Are you sure?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.put('/risk/business/partner/' + isValid, $scope.riskEvent).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)
|
|
|
|
|
}
|
|
|
|
|
$scope.resendUploadEmail = function () {
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
@ -232,8 +220,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
|
|
|
|
|
// 一键下载功能
|
|
|
|
|
$scope.downloadAsZip = function () {
|
|
|
|
|
var url = '/risk/business/' + $scope.riskEvent.risk_id + '/download/materialsAsZIP';
|
|
|
|
|
return url;
|
|
|
|
|
return '/risk/business/' + $scope.riskEvent.risk_id + '/download/materialsAsZIP';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 加载提交材料
|
|
|
|
@ -254,29 +241,21 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
|
|
|
|
|
// 材料审核
|
|
|
|
|
$scope.auditMaterial = function(auditType) {
|
|
|
|
|
|
|
|
|
|
var url = '/risk/business/events';
|
|
|
|
|
if (auditType == 4) {
|
|
|
|
|
url = '/risk/business/' + $scope.riskEvent.risk_id + '/refuse'
|
|
|
|
|
}
|
|
|
|
|
$scope.riskEvent.result_type = auditType;
|
|
|
|
|
// 后面把url当做参数传递进去,删除重复的代码
|
|
|
|
|
if (auditType == 3) {
|
|
|
|
|
$http.put('/risk/business/events', $scope.riskEvent).then(function (resp) {
|
|
|
|
|
$state.go('^', {}, {reload: true});
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Error',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
} else if (auditType == 4) {
|
|
|
|
|
$http.put('/risk/business/' + $scope.riskEvent.risk_id + '/refuse').then(function(resp) {
|
|
|
|
|
$state.go('^', {}, {reload: true});
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Error',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
});
|
|
|
|
|
$http.put(url, $scope.riskEvent).then(function (resp) {
|
|
|
|
|
$state.go('^', {}, {reload: true});
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Error',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|