diff --git a/src/main/ui/static/analysis/monitoring/templates/analysis_monitoring.html b/src/main/ui/static/analysis/monitoring/templates/analysis_monitoring.html
index 84efe7cf9..c4dabdde7 100644
--- a/src/main/ui/static/analysis/monitoring/templates/analysis_monitoring.html
+++ b/src/main/ui/static/analysis/monitoring/templates/analysis_monitoring.html
@@ -19,6 +19,10 @@
欠款|Pre Refund
+
+ 风控记录|Risk Records
+
+
diff --git a/src/main/ui/static/risk/risk.js b/src/main/ui/static/risk/risk.js
new file mode 100644
index 000000000..ebdf4ac39
--- /dev/null
+++ b/src/main/ui/static/risk/risk.js
@@ -0,0 +1,102 @@
+define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], function (angular) {
+ 'use strict';
+ var app = angular.module('RiskManagement', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload']);
+ app.config(['$stateProvider', function ($stateProvider) {
+ $stateProvider.state('analysis_monitoring.risk_manager', {
+ url: '/risk/manage',
+ templateUrl: '/static/risk/templates/risk.html',
+ controller: 'RiskManageCtrl',
+ }).state('analysis_monitoring.risk_detail', {
+ url: '/detail',
+ templateUrl: '/static/risk/templates/risk_detail.html',
+ controller: 'RiskDetailCtrl',
+ params : {
+ param:null
+ }
+ }).state('vipcustomers.detail', {
+ url: '/{vip_code}/detail',
+ templateUrl: '/static/payment/vipcustomer/templates/vipcustomer_detail.html',
+ controller: 'vipCustomerDetailCtrl',
+ }).state('vipcustomers.edit', {
+ url: '/{vip_code}/edit',
+ templateUrl: '/static/payment/vipcustomer/templates/vipcustomer_edit.html',
+ controller: 'vipCustomerEditCtrl',
+ resolve: {
+ vipcustomer: ['$http', '$stateParams', function ($http, $stateParams) {
+ return $http.get('/partner/vip/' + $stateParams.vip_code);
+ }]
+ }
+ })
+ }]);
+ app.controller('RiskManageCtrl', ['$scope', '$http','$state', function ($scope, $http,$state){
+ $scope.params = {};
+ $scope.loadRecords = function () {
+ var params = angular.copy($scope.params);
+ $http.get('/sys/risk/records', {params: params}).then(function (resp) {
+ $scope.records = resp.data;
+ });
+ };
+ $scope.loadRecords(1);
+ $scope.jumpDetail = function (record_id,client_moniker) {
+ var param = {};
+ param.client_moniker = client_moniker;
+ param.record_id = record_id;
+ $state.go('analysis_monitoring.risk_detail',{param:param});
+ }
+ }]);
+ app.controller('RiskDetailCtrl', ['$scope', '$http', '$stateParams','Upload', 'commonDialog', function ($scope, $http,$stateParams, Upload, commonDialog) {
+ $scope.params = {};
+ $scope.loadOrders = function () {
+
+ $http.get('/sys/risk/orders/' + $stateParams.param.record_id).then(function (resp) {
+ $scope.orders = resp.data;
+ });
+ };
+ $scope.loadOrders(1);
+
+ $scope.edit = function () {
+
+ }
+ }]);
+ app.controller('vipCustomerDetailCtrl', ['$scope', '$http','$filter','$state', '$uibModal', 'commonDialog', 'vipcustomer', function ($scope, $http,$filter, $state, $uibModal, commonDialog, vipcustomer) {
+ $scope.vipcustomer = vipcustomer.data;
+ $scope.params = {vip_customer_id:$scope.vipcustomer.vip_customer_id};
+ $scope.loadVipOrders = function () {
+ var params = angular.copy($scope.params);
+ $http.get('/partner/vip/payment/orders', {params: params}).then(function (resp) {
+ $scope.vip_orders = resp.data.data;
+ $scope.pagination = resp.data.pagination;
+ });
+ };
+ $scope.loadVipOrders();
+
+ }]);
+ app.controller('vipCustomerEditCtrl', ['$scope', '$http', '$state', 'Upload', 'commonDialog', 'vipcustomer',
+ function ($scope, $http, $state, Upload, commonDialog, vipcustomer) {
+ $scope.vipcustomer = vipcustomer.data;
+ $scope.updateVipCustomer = function (form) {
+ if (form.$invalid) {
+ angular.forEach(form, function (item, key) {
+ if (key.indexOf('$') < 0) {
+ item.$dirty = true;
+ }
+ });
+ return;
+ }
+ $http.put('/partner/vip/' + $scope.vipcustomer.vip_code, $scope.vipcustomer).then(function () {
+ commonDialog.alert({
+ title: 'Success',
+ content: 'Update vip customer information successfully',
+ type: 'success'
+ });
+ $scope.loadVipCustomers();
+ $state.go('^.detail', {vip_code: $scope.vipcustomer.vip_code}, {reload: true});
+ }, function (resp) {
+ commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
+ });
+ };
+
+ }]);
+
+ return app;
+});
\ No newline at end of file
diff --git a/src/main/ui/static/risk/templates/risk.html b/src/main/ui/static/risk/templates/risk.html
new file mode 100644
index 000000000..9c760cf3a
--- /dev/null
+++ b/src/main/ui/static/risk/templates/risk.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+ Client Moniker |
+ Create Time |
+ Expiy Time |
+ Risk Types |
+ Risk Counts |
+ Operation |
+
+
+
+
+ {{record.client_moniker}} |
+ {{record.create_time}} |
+ {{record.expiry_date}} |
+ {{record.risk_types}} |
+ {{record.risk_counts}} |
+
+
+
+
+ |
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/ui/static/risk/templates/risk_detail.html b/src/main/ui/static/risk/templates/risk_detail.html
new file mode 100644
index 000000000..3297b35d6
--- /dev/null
+++ b/src/main/ui/static/risk/templates/risk_detail.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+ Order Id |
+ Amount |
+ Channel |
+ Risk Types |
+
+
+
+
+ {{order.order_id}} |
+ {{order.amount}} |
+ {{order.channel}} |
+ {{order.risk_types}} |
+
+
+
+
+ |
+
+
+
+
+
+
+
\ No newline at end of file