|
|
@ -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,18 @@ 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 }
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
console.log($scope.riskMaterial)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.loadRiskMaterial();
|
|
|
|
$scope.loadRiskMaterial();
|
|
|
@ -684,14 +696,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 +761,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 +774,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 +801,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 +837,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 +915,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 +929,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,所以后台无法查询到订单
|
|
|
|