|
|
@ -542,6 +542,36 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
$scope.orderTypes = orderTypesMap;
|
|
|
|
$scope.orderTypes = orderTypesMap;
|
|
|
|
$scope.royapayOrderTypes = royalpayOrderTypesMap;
|
|
|
|
$scope.royapayOrderTypes = royalpayOrderTypesMap;
|
|
|
|
$scope.warningOrderTypes = warningOrderTypesMap;
|
|
|
|
$scope.warningOrderTypes = warningOrderTypesMap;
|
|
|
|
|
|
|
|
$scope.materials = [{key: 0, value: ""}];
|
|
|
|
|
|
|
|
$scope.canMinus = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.increase = function($index) {
|
|
|
|
|
|
|
|
$scope.materials.splice($index + 1, 0,
|
|
|
|
|
|
|
|
{key: new Date().getTime(), value: ""}); // 用时间戳作为每个item的key
|
|
|
|
|
|
|
|
// 增加新的input后允许删除
|
|
|
|
|
|
|
|
$scope.canMinus = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.decrease = function($index) {
|
|
|
|
|
|
|
|
// 如果input大于1,删除
|
|
|
|
|
|
|
|
if ($scope.materials.length > 1) {
|
|
|
|
|
|
|
|
$scope.materials.splice($index, 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 如果回复数为1,不允许删除
|
|
|
|
|
|
|
|
if ($scope.materials.length == 1) {
|
|
|
|
|
|
|
|
$scope.canMinus = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var array=new Array();
|
|
|
|
|
|
|
|
$scope.combineMaterials = function() {
|
|
|
|
|
|
|
|
for (var i = 0; i < $scope.materials.length; i++) {
|
|
|
|
|
|
|
|
var cr = {};
|
|
|
|
|
|
|
|
cr['question'+(i+1)] = $scope.materials[i].value;
|
|
|
|
|
|
|
|
array[i] = cr;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(JSON.stringify(array));
|
|
|
|
|
|
|
|
return JSON.stringify(array);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$scope.save = function(form) {
|
|
|
|
$scope.save = function(form) {
|
|
|
|
if (form.$invalid) {
|
|
|
|
if (form.$invalid) {
|
|
|
@ -565,6 +595,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
|
|
|
|
|
|
|
|
|
|
|
|
$scope.riskEvent.receive_email_date = $filter('date')($scope.riskEvent.receive_email_date, 'yyyy-MM-dd');
|
|
|
|
$scope.riskEvent.receive_email_date = $filter('date')($scope.riskEvent.receive_email_date, 'yyyy-MM-dd');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.riskEvent.alipay_materials = $scope.combineMaterials();
|
|
|
|
|
|
|
|
|
|
|
|
$http.post('/risk/business/events', $scope.riskEvent).then(function (resp) {
|
|
|
|
$http.post('/risk/business/events', $scope.riskEvent).then(function (resp) {
|
|
|
|
commonDialog.alert({
|
|
|
|
commonDialog.alert({
|
|
|
|
title: 'Success',
|
|
|
|
title: 'Success',
|
|
|
|