From 51fdf932c1600bcf6d93e8537eeb50a87b874311 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Fri, 27 Apr 2018 14:59:36 +0800 Subject: [PATCH] tmp --- src/main/ui/static/risk/risk.js | 63 +++---- src/main/ui/static/risk/templates/risk.html | 3 + .../ui/static/risk/templates/risk_deit.html | 170 ++++++++++++++++++ .../ui/static/risk/templates/risk_detail.html | 5 - 4 files changed, 195 insertions(+), 46 deletions(-) create mode 100644 src/main/ui/static/risk/templates/risk_deit.html diff --git a/src/main/ui/static/risk/risk.js b/src/main/ui/static/risk/risk.js index 4b5e918ce..c81b3d92c 100644 --- a/src/main/ui/static/risk/risk.js +++ b/src/main/ui/static/risk/risk.js @@ -37,6 +37,25 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS }); }; $scope.loadRecords(1); + $scope.edit = function () { + $uibModal.open({ + templateUrl: '/static/payment/partner/templates/partner_new_rate.html', + controller: 'RiskRecordEditCtrl', + resolve: { + rate: function () { + return {rate_name: name, clean_days: 3}; + }, + sys_common_rate: function () { + return $http.get('/sys/partners/sys_rates'); + }, + clientMoniker: function () { + return $scope.partner.client_moniker; + } + } + }).result.then(function () { + $scope.getRates(); + }); + }; $scope.jumpDetail = function (record_id,client_moniker) { var param = {}; param.client_moniker = client_moniker; @@ -55,49 +74,11 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS }; $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('RiskRecordEditCtrl', ['$scope', '$http', function ($scope, $http) { + }]); - 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 index 01c25d054..f8cf7dfce 100644 --- a/src/main/ui/static/risk/templates/risk.html +++ b/src/main/ui/static/risk/templates/risk.html @@ -32,6 +32,9 @@ + + + diff --git a/src/main/ui/static/risk/templates/risk_deit.html b/src/main/ui/static/risk/templates/risk_deit.html new file mode 100644 index 000000000..1692b6e20 --- /dev/null +++ b/src/main/ui/static/risk/templates/risk_deit.html @@ -0,0 +1,170 @@ + + + \ 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 index 07b092be1..89b79572b 100644 --- a/src/main/ui/static/risk/templates/risk_detail.html +++ b/src/main/ui/static/risk/templates/risk_detail.html @@ -26,11 +26,6 @@ {{order.amount}} {{order.channel}} {{order.risk_types}} - - - - -