|
|
@ -28,13 +28,14 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
"2": "BD已提交材料,等待审核",
|
|
|
|
"2": "BD已提交材料,等待审核",
|
|
|
|
"3": "材料审核通过",
|
|
|
|
"3": "材料审核通过",
|
|
|
|
"4": "材料审核不通过,已打回",
|
|
|
|
"4": "材料审核不通过,已打回",
|
|
|
|
"5": "已处理",
|
|
|
|
"5": "已处理"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var emailStatusMap = {
|
|
|
|
var emailStatusMap = {
|
|
|
|
"0": "未发送",
|
|
|
|
"0": "未发送",
|
|
|
|
"1": "已发送",
|
|
|
|
"1": "已发送",
|
|
|
|
"2": "打回并已发送"
|
|
|
|
"2": "打回并已发送",
|
|
|
|
|
|
|
|
"3": "已发送催促邮件"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var app = angular.module('riskBusinessApp', ['ui.router']);
|
|
|
|
var app = angular.module('riskBusinessApp', ['ui.router']);
|
|
|
@ -73,6 +74,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
$scope.pagination = {};
|
|
|
|
$scope.pagination = {};
|
|
|
|
$scope.params = {};
|
|
|
|
$scope.params = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 加载风险注册事件
|
|
|
|
$scope.loadRiskEvents = function (page) {
|
|
|
|
$scope.loadRiskEvents = function (page) {
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
@ -94,6 +96,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
$scope.orderTypes = orderTypesMap;
|
|
|
|
$scope.orderTypes = orderTypesMap;
|
|
|
|
|
|
|
|
|
|
|
|
$scope.riskEvent = riskEvent.data;
|
|
|
|
$scope.riskEvent = riskEvent.data;
|
|
|
|
|
|
|
|
// 获取数据库中对应的渠道字段
|
|
|
|
var orderChannel = 'enable_';
|
|
|
|
var orderChannel = 'enable_';
|
|
|
|
if ($scope.riskEvent.order_type == 1) {
|
|
|
|
if ($scope.riskEvent.order_type == 1) {
|
|
|
|
orderChannel += 'wechat';
|
|
|
|
orderChannel += 'wechat';
|
|
|
@ -164,27 +167,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
* 关停渠道
|
|
|
|
* 关停渠道
|
|
|
|
* @param orderType 调单类型
|
|
|
|
* @param orderType 调单类型
|
|
|
|
* @param channelFlag
|
|
|
|
* @param channelFlag
|
|
|
|
* @param temporaryFlag 是否临时关闭
|
|
|
|
* @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'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.updateChannel = function (orderType, channelFlag, temporaryFlag) {
|
|
|
|
$scope.updateChannel = function (orderType, channelFlag, temporaryFlag) {
|
|
|
|
var channel;
|
|
|
|
var channel;
|
|
|
|
if (orderType == "1")
|
|
|
|
if (orderType == "1")
|
|
|
@ -192,8 +176,11 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
else if (orderType == "2")
|
|
|
|
else if (orderType == "2")
|
|
|
|
channel = 'alipay';
|
|
|
|
channel = 'alipay';
|
|
|
|
$scope.riskEvent.temporary_close_channel = temporaryFlag;
|
|
|
|
$scope.riskEvent.temporary_close_channel = temporaryFlag;
|
|
|
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
|
|
|
content: 'Are you sure?'
|
|
|
|
|
|
|
|
}).then(function () {
|
|
|
|
$http.put('/risk/business/channel/' + channel + '/permission/' + channelFlag, $scope.riskEvent).then(function () {
|
|
|
|
$http.put('/risk/business/channel/' + channel + '/permission/' + channelFlag, $scope.riskEvent).then(function () {
|
|
|
|
|
|
|
|
|
|
|
|
$state.reload('analysis_monitoring.riskEvent_detail');
|
|
|
|
$state.reload('analysis_monitoring.riskEvent_detail');
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
commonDialog.alert({
|
|
|
|
commonDialog.alert({
|
|
|
@ -202,23 +189,24 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
type: 'error'
|
|
|
|
type: 'error'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 关停商户
|
|
|
|
// 关停商户
|
|
|
|
$scope.updateClient = function(isValid, temporaryFlag) {
|
|
|
|
$scope.updateClient = function(isValid, temporaryFlag) {
|
|
|
|
$scope.riskEvent.temporary_close_merchant = temporaryFlag;
|
|
|
|
$scope.riskEvent.temporary_close_merchant = temporaryFlag;
|
|
|
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
|
|
|
content: 'Are you sure?'
|
|
|
|
|
|
|
|
}).then(function () {
|
|
|
|
$http.put('/risk/business/partner/' + isValid, $scope.riskEvent).then(function () {
|
|
|
|
$http.put('/risk/business/partner/' + isValid, $scope.riskEvent).then(function () {
|
|
|
|
$state.reload('analysis_monitoring.riskEvent_detail');
|
|
|
|
$state.reload('analysis_monitoring.riskEvent_detail');
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 获取riskEvent详细信息
|
|
|
|
|
|
|
|
$scope.loadRiskEventDetail = function(riskId) {
|
|
|
|
|
|
|
|
$http.get('/risk/business/events/' + riskId)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.resendUploadEmail = function () {
|
|
|
|
$scope.resendUploadEmail = function () {
|
|
|
|
commonDialog.confirm({
|
|
|
|
commonDialog.confirm({
|
|
|
|
title: 'Warning',
|
|
|
|
title: 'Warning',
|
|
|
@ -242,8 +230,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
|
|
|
|
|
|
|
// 一键下载功能
|
|
|
|
// 一键下载功能
|
|
|
|
$scope.downloadAsZip = function () {
|
|
|
|
$scope.downloadAsZip = function () {
|
|
|
|
var url = '/risk/business/' + $scope.riskEvent.risk_id + '/download/materialsAsZIP';
|
|
|
|
return '/risk/business/' + $scope.riskEvent.risk_id + '/download/materialsAsZIP';
|
|
|
|
return url;
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 加载提交材料
|
|
|
|
// 加载提交材料
|
|
|
@ -264,20 +251,13 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
|
|
|
|
|
|
|
// 材料审核
|
|
|
|
// 材料审核
|
|
|
|
$scope.auditMaterial = function(auditType) {
|
|
|
|
$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;
|
|
|
|
$scope.riskEvent.result_type = auditType;
|
|
|
|
// 后面把url当做参数传递进去,删除重复的代码
|
|
|
|
$http.put(url, $scope.riskEvent).then(function (resp) {
|
|
|
|
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});
|
|
|
|
$state.go('^', {}, {reload: true});
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
commonDialog.alert({
|
|
|
|
commonDialog.alert({
|
|
|
@ -286,7 +266,6 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
type: 'error'
|
|
|
|
type: 'error'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|