Merge remote-tracking branch 'origin/develop' into develop

master
yixian 4 years ago
commit 3c00929fc2

@ -212,15 +212,15 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
params.startAmount = sectionArray[0]; params.startAmount = sectionArray[0];
params.endAmount = sectionArray[1]; params.endAmount = sectionArray[1];
} }
$http.get('/risk/business/events', {params: params}).then(function (resp) { $http.get('/risk/business/events', { params: params }).then(function (resp) {
$scope.riskEvents = resp.data.data; $scope.riskEvents = resp.data.data;
$scope.pagination = resp.data.pagination; $scope.pagination = resp.data.pagination;
}); });
$http.get('/risk/business/events/analysis/industry', {params: params}).then(function (resp) { $http.get('/risk/business/events/analysis/industry', { params: params }).then(function (resp) {
$scope.riskEventsByIndustry = resp.data; $scope.riskEventsByIndustry = resp.data;
$scope.risk_industry_chart = chartParser.parse(industryAmount(industries), $scope.riskEventsByIndustry); $scope.risk_industry_chart = chartParser.parse(industryAmount(industries), $scope.riskEventsByIndustry);
}); });
$http.get('/risk/business/events/analysis/amount', {params: params}).then(function (resp) { $http.get('/risk/business/events/analysis/amount', { params: params }).then(function (resp) {
$scope.riskEventsByAmount = resp.data; $scope.riskEventsByAmount = resp.data;
$scope.risk_amount_chart = chartParser.parse(intervalsAmount(), $scope.riskEventsByAmount); $scope.risk_amount_chart = chartParser.parse(intervalsAmount(), $scope.riskEventsByAmount);
}); });
@ -265,7 +265,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
} }
} }
}, },
column: {key: 'amount', name: 'industry'} column: { key: 'amount', name: 'industry' }
}] }]
} }
}; };
@ -309,7 +309,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
} }
} }
}, },
column: {key: 'amount', name: 'intervals'} column: { key: 'amount', name: 'intervals' }
}] }]
} }
}; };
@ -332,10 +332,10 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.riskEvent = riskEvent.data; $scope.riskEvent = riskEvent.data;
$scope.saveRemark = function () { $scope.saveRemark = function () {
$http.put('/risk/business/' + $scope.riskEvent.risk_id + '/remark', {remark: $scope.riskEvent.remark}).then(function (resp) { $http.put('/risk/business/' + $scope.riskEvent.risk_id + '/remark', { remark: $scope.riskEvent.remark }).then(function (resp) {
$scope.ctrl.editRemark = false; $scope.ctrl.editRemark = false;
}, function (resp) { }, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' });
}) })
}; };
@ -389,7 +389,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
type: 'error' type: 'error'
}); });
}, function (resp) { }, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' });
}) })
}) })
}; };
@ -405,21 +405,21 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}).then(function () { }).then(function () {
$http.put('/risk/business/commitWaitRiskStatus/' + $scope.riskEvent.risk_id + '/' + codeKey).then(function () { $http.put('/risk/business/commitWaitRiskStatus/' + $scope.riskEvent.risk_id + '/' + codeKey).then(function () {
$state.go('analysis_monitoring.risk_business'); $state.go('analysis_monitoring.risk_business');
commonDialog.alert({title: 'Success', content: '风控状态已修改为等待风控审核状态', type: 'success'}); commonDialog.alert({ title: 'Success', content: '风控状态已修改为等待风控审核状态', type: 'success' });
}, function (resp) { }, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' });
}); });
}) })
}; };
$scope.commitChargebackStatus = function (std) { $scope.commitChargebackStatus = function (std) {
commonDialog.confirm({title: '确认操作', content: '当前操作不可逆,并会将风控项标记为办结状态,确认操作?'}).then(function () { commonDialog.confirm({ title: '确认操作', content: '当前操作不可逆,并会将风控项标记为办结状态,确认操作?' }).then(function () {
$http.put('/risk/business/chargebacks/' + $scope.riskEvent.risk_id + '/mark_status', {status: std}).then(function () { $http.put('/risk/business/chargebacks/' + $scope.riskEvent.risk_id + '/mark_status', { status: std }).then(function () {
$state.reload(); $state.reload();
commonDialog.alert({title: 'Success', content: '修改成功', type: success}) commonDialog.alert({ title: 'Success', content: '修改成功', type: success })
}, function (res) { }, function (res) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' })
}) })
}) })
@ -543,7 +543,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$http.put('/risk/business/partner/' + isValid, $scope.riskEvent).then(function () { $http.put('/risk/business/partner/' + isValid, $scope.riskEvent).then(function () {
$state.reload('analysis_monitoring.risk_business.riskEvent_detail'); $state.reload('analysis_monitoring.risk_business.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' });
}) })
}) })
}; };
@ -560,7 +560,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$http.put(url).then(function () { $http.put(url).then(function () {
$state.reload(); $state.reload();
}, function (resp) { }, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' });
}) })
}) })
}; };
@ -581,7 +581,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
let file = files[i]; let file = files[i];
Upload.upload({ Upload.upload({
url: '/attachment/riskFiles', url: '/attachment/riskFiles',
data: {file: file} data: { file: file }
}).then(function (resp) { }).then(function (resp) {
urls.push(resp.data.url); urls.push(resp.data.url);
}, function (resp) { }, function (resp) {
@ -672,6 +672,17 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$http.get('/risk/business/' + $scope.riskEvent.risk_id + '/all_material_info').then(function (resp) { $http.get('/risk/business/' + $scope.riskEvent.risk_id + '/all_material_info').then(function (resp) {
$scope.riskMaterial = resp.data; $scope.riskMaterial = resp.data;
const reg = /\.(png|jpg|gif|jpeg|bmp)$/
console.log()
$scope.riskMaterial.material.forEach(element => {
if (element.file) {
element.file.forEach((item, index) => {
const fileType = item.substring(item.lastIndexOf('.')).toLowerCase()
const flag = reg.test(item.substring(item.lastIndexOf('.')).toLowerCase())
element.file[index] = { isImg: flag, type: fileType, src: item }
})
}
})
}); });
}; };
$scope.loadRiskMaterial(); $scope.loadRiskMaterial();
@ -684,14 +695,18 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
if (files && files.length) { if (files && files.length) {
let urls = []; let urls = [];
let value = 0; let value = 0;
const reg = /\.(png|jpg|gif|jpeg|bmp)$/
$scope.riskMaterial.material[index].fileProgressValue = 0; $scope.riskMaterial.material[index].fileProgressValue = 0;
for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) {
let file = files[i]; let file = files[i];
Upload.upload({ Upload.upload({
url: '/attachment/riskFiles', url: '/attachment/riskFiles',
data: {file: file} data: { file: file }
}).then(function (resp) { }).then(function (resp) {
urls.push(resp.data.url); const fileType = resp.data.url.substring(resp.data.url.lastIndexOf('.')).toLowerCase()
const flag = reg.test(resp.data.url.substring(resp.data.url.lastIndexOf('.')).toLowerCase())
urls.push({ isImg: flag, type: fileType, src: resp.data.url })
// urls.push(resp.data.url);
delete $scope.riskMaterial.material[index].fileProgressValue; delete $scope.riskMaterial.material[index].fileProgressValue;
}, function (resp) { }, function (resp) {
delete $scope.riskMaterial.material[index].fileProgressValue; delete $scope.riskMaterial.material[index].fileProgressValue;
@ -745,8 +760,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}).then(function () { }).then(function () {
// $scope.riskEvent.result_type = auditType; // $scope.riskEvent.result_type = auditType;
$http.put(url, $scope.riskEvent).then(function (resp) { $http.put(url, $scope.riskEvent).then(function (resp) {
commonDialog.alert({title: 'Success', content: "材料已通过!"}); commonDialog.alert({ title: 'Success', content: "材料已通过!" });
$state.go('^', {}, {reload: true}); $state.go('^', {}, { reload: true });
}, function (resp) { }, function (resp) {
commonDialog.alert({ commonDialog.alert({
title: 'Error', title: 'Error',
@ -758,11 +773,11 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
} else if (auditType === 4) { } else if (auditType === 4) {
url = '/risk/business/' + $scope.riskEvent.risk_id + '/refuse'; url = '/risk/business/' + $scope.riskEvent.risk_id + '/refuse';
//warningMessageHTML = '是否确定<span style="color: red; font-weight: bolder; font-size: 20px;">拒绝</span>该材料?' //warningMessageHTML = '是否确定<span style="color: red; font-weight: bolder; font-size: 20px;">拒绝</span>该材料?'
commonDialog.inputText({title: 'Input Refuse Description', size: 'lg'}).then(function (text) { commonDialog.inputText({ title: 'Input Refuse Description', size: 'lg' }).then(function (text) {
$scope.riskEvent.refuse_description = text; $scope.riskEvent.refuse_description = text;
$http.put(url, $scope.riskEvent).then(function () { $http.put(url, $scope.riskEvent).then(function () {
commonDialog.alert({title: 'Success', content: "材料已拒绝!"}); commonDialog.alert({ title: 'Success', content: "材料已拒绝!" });
$state.go('^', {}, {reload: true}); $state.go('^', {}, { reload: true });
}, function (resp) { }, function (resp) {
commonDialog.alert({ commonDialog.alert({
title: 'Error', title: 'Error',
@ -785,16 +800,16 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.mailTemplate = mailTemplate; $scope.mailTemplate = mailTemplate;
$scope.royapayOrderTypes = royalpayOrderTypesMap; $scope.royapayOrderTypes = royalpayOrderTypesMap;
$scope.warningOrderTypes = warningOrderTypesMap; $scope.warningOrderTypes = warningOrderTypesMap;
$scope.materials = [{key: 0, value: ""}]; $scope.materials = [{ key: 0, value: "" }];
$scope.canMinus = false; $scope.canMinus = false;
$scope.riskEvent = {}; $scope.riskEvent = {};
$scope.searchForChargeback = function () { $scope.searchForChargeback = function () {
$scope.riskEvent.order_ids = null; $scope.riskEvent.order_ids = null;
let channelOrderId = $scope.riskEvent.channel_order_id; let channelOrderId = $scope.riskEvent.channel_order_id;
$http.get('/risk/business/chargeback_orders', {params: {channel_order_id: channelOrderId}}).then(function (res) { $http.get('/risk/business/chargeback_orders', { params: { channel_order_id: channelOrderId } }).then(function (res) {
$scope.channel_orders = res.data; $scope.channel_orders = res.data;
}, function (res) { }, function (res) {
commonDialog.alert({type: 'error', title: 'Error', content: res.data.message}) commonDialog.alert({ type: 'error', title: 'Error', content: res.data.message })
}); });
}; };
$scope.chooseOrderForChargeback = function (chargebackOrder) { $scope.chooseOrderForChargeback = function (chargebackOrder) {
@ -821,7 +836,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.increase = function ($index) { $scope.increase = function ($index) {
$scope.materials.splice($index + 1, 0, $scope.materials.splice($index + 1, 0,
{key: new Date().getTime(), value: ""}); // 用时间戳作为每个item的key { key: new Date().getTime(), value: "" }); // 用时间戳作为每个item的key
// 增加新的input后允许删除 // 增加新的input后允许删除
$scope.canMinus = true; $scope.canMinus = true;
}; };
@ -899,7 +914,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
content: 'Register new riskEvent successfully', content: 'Register new riskEvent successfully',
type: 'success' type: 'success'
}); });
$state.go('^', {}, {reload: true}); $state.go('^', {}, { reload: true });
}, function (resp) { }, function (resp) {
saveRiskBtn.innerHTML = saveRiskBtnInnerHtmlBak; saveRiskBtn.innerHTML = saveRiskBtnInnerHtmlBak;
saveRiskBtn.disabled = false; saveRiskBtn.disabled = false;
@ -913,7 +928,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.partnerParam = {}; $scope.partnerParam = {};
$scope.loadParnters = function () { $scope.loadParnters = function () {
$scope.partnerParam.sub_merchant_id = $scope.riskEvent.sub_merchant_id; $scope.partnerParam.sub_merchant_id = $scope.riskEvent.sub_merchant_id;
$http.get('/risk/business/partners', {params: $scope.partnerParam}).then(function (resp) { $http.get('/risk/business/partners', { params: $scope.partnerParam }).then(function (resp) {
$scope.partners = resp.data; $scope.partners = resp.data;
if ($scope.partners != null && $scope.partners.length > 0) { if ($scope.partners != null && $scope.partners.length > 0) {
// 由于通用号调单可能无法提供商户client_moniker,所以后台无法查询到订单 // 由于通用号调单可能无法提供商户client_moniker,所以后台无法查询到订单

@ -9,18 +9,15 @@
</style> </style>
<div class="panel panel-default" ng-if="fileLength != 0"> <div class="panel panel-default" ng-if="fileLength != 0">
<div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp; <div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp;
<a class="btn-group btn btn-success" <a class="btn-group btn btn-success" ng-href="{{downloadAsZip()}}" target="_blank">
ng-href="{{downloadAsZip()}}"
target="_blank">
<i class="fa fa-cloud-download">一键下载</i> <i class="fa fa-cloud-download">一键下载</i>
</a> </a>
<a class="btn-group btn btn-success pull-right" <a class="btn-group btn btn-success pull-right"
ng-if="(riskEvent.result_type == 2 || riskEvent.result_type == 1) && ('10000000000'|withRole)" ng-if="(riskEvent.result_type == 2 || riskEvent.result_type == 1) && ('10000000000'|withRole)"
ng-click="auditMaterial(3)">通过 ng-click="auditMaterial(3)">通过
</a> </a>
<a class="btn-group btn btn-warning pull-right" <a class="btn-group btn btn-warning pull-right" ng-if="riskEvent.result_type == 2 && ('10000000000'|withRole)"
ng-if="riskEvent.result_type == 2 && ('10000000000'|withRole)" ng-click="auditMaterial(4)" style="margin: 0 10px">打回
ng-click="auditMaterial(4)" style="margin: 0 10px">打回
</a> </a>
</div> </div>
<div class="panel-body"> <div class="panel-body">
@ -42,27 +39,28 @@
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
<div class="col-xs-12"> <div class="col-xs-12">
<button class="btn btn-primary" <button class="btn btn-primary" type="button"
type="button" ng-if="uploadShowFlag && ('10000000000'|withRole)"
ng-if="uploadShowFlag && ('10000000000'|withRole)" ngf-select="uploadFile($files, $index)" ngf-multiple="true">
ngf-select="uploadFile($files, $index)"
ngf-multiple="true">
<i class="fa fa-upload"></i> Upload <i class="fa fa-upload"></i> Upload
</button> </button>
</div> </div>
&nbsp;&nbsp;<br> &nbsp;&nbsp;<br>
<div class="col-xs-12"> <div class="col-xs-12">
<uib-progressbar value="item.fileProgressValue" <uib-progressbar value="item.fileProgressValue" type="success" animate="true"
type="success" ng-if="item.fileProgressValue" max="100" ng-if="uploadShowFlag">
animate="true" {{item.fileProgressValue}}%</uib-progressbar>
ng-if="item.fileProgressValue"
max="100"
ng-if="uploadShowFlag"
>{{item.fileProgressValue}}%</uib-progressbar>
<img class="col-xs-3 logo-width" <div ng-repeat="file in (item.file) track by $index">
ng-repeat="url in (item.file) track by $index" <img ng-if="file.isImg" class="col-xs-3 logo-width" ng-src="{{file.src}}">
ng-src="{{url}}"> <a ng-if="!file.isImg" href="{{file.src}}">
<i ng-if="file.type === '.zip'" class="fa fa-file-archive-o" aria-hidden="true"></i>
<i ng-if="file.type === '.pdf'" class="fa fa-file-pdf-o" aria-hidden="true"></i>
<i ng-if="file.type !== '.pdf' && file.type !== '.zip'" class="fa fa-file-text"
aria-hidden="true"></i>
<span style="font-size: 12px">download</span>
</a>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -70,12 +68,9 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Description</label> <label class="control-label col-sm-2">Description</label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea class="form-control" required <textarea class="form-control" required ng-model="riskMaterial.description"
ng-model="riskMaterial.description" placeholder="No more than 500" name="description" ng-disabled="!uploadShowFlag"
placeholder="No more than 500" maxlength="500"></textarea>
name="description"
ng-disabled="!uploadShowFlag"
maxlength="500"></textarea>
</div> </div>
</div> </div>
@ -83,15 +78,10 @@
</form> </form>
</div> </div>
<div class="panel-footer"> <div class="panel-footer">
<a role="button" id="test-btn" <a role="button" id="test-btn" ui-sref="^.^" class="btn btn-info">返回
ui-sref="^.^"
class="btn btn-info">返回
</a> </a>
<button <button class="btn btn-success" ng-disabled="!uploadShowFlag || (!riskMaterial.description)"
class="btn btn-success" ng-if="uploadShowFlag && ('10000000000'|withRole)" ng-click="submit(uploadForm);">Submit</button>
ng-disabled="!uploadShowFlag || (!riskMaterial.description)"
ng-if="uploadShowFlag && ('10000000000'|withRole)"
ng-click="submit(uploadForm);">Submit</button>
</div> </div>
</div> </div>
Loading…
Cancel
Save