|
|
@ -568,7 +568,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]);*/
|
|
|
|
}]);*/
|
|
|
|
|
|
|
|
|
|
|
|
app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser', function ($scope, $http, $filter, $uibModal,$timeout, chartParser) {
|
|
|
|
app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser','clearingDetailService', function ($scope, $http, $filter, $uibModal,$timeout, chartParser,clearingDetailService) {
|
|
|
|
$scope.scales = [
|
|
|
|
$scope.scales = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
key: 'today',
|
|
|
|
key: 'today',
|
|
|
@ -598,61 +598,71 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
params: function () {
|
|
|
|
params: function () {
|
|
|
|
var date = new Date();
|
|
|
|
var date = new Date();
|
|
|
|
var end = $filter('date')(date, 'yyyyMMdd');
|
|
|
|
var end = $filter('date')(date, 'yyyyMMdd');
|
|
|
|
date = date.setDate(date.getDate() - 6);
|
|
|
|
date = date.setDate(date.getDate() - 7);
|
|
|
|
return {
|
|
|
|
|
|
|
|
begin: $filter('date')(date, 'yyyyMMdd'),
|
|
|
|
|
|
|
|
end: end
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
key: 'month',
|
|
|
|
|
|
|
|
label: '本月',
|
|
|
|
|
|
|
|
params: function () {
|
|
|
|
|
|
|
|
var date = new Date();
|
|
|
|
|
|
|
|
var end = $filter('date')(date, 'yyyyMMdd');
|
|
|
|
|
|
|
|
date = date.setDate(1);
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
begin: $filter('date')(date, 'yyyyMMdd'),
|
|
|
|
begin: $filter('date')(date, 'yyyyMMdd'),
|
|
|
|
end: end
|
|
|
|
end: end
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
|
|
|
|
key: 'lastmonth',
|
|
|
|
|
|
|
|
label: '上月',
|
|
|
|
|
|
|
|
params: function () {
|
|
|
|
|
|
|
|
var date = new Date();
|
|
|
|
|
|
|
|
date = date.setDate(1);
|
|
|
|
|
|
|
|
var oneDay=1000*60*60*24;
|
|
|
|
|
|
|
|
var end = $filter('date')(date-oneDay, 'yyyyMMdd');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var date2 = new Date();
|
|
|
|
|
|
|
|
date2.setMonth(date2.getMonth() - 1);
|
|
|
|
|
|
|
|
date2 = date2.setDate(1);
|
|
|
|
|
|
|
|
var begin = $filter('date')(date2, 'yyyyMMdd');
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
begin: begin,
|
|
|
|
|
|
|
|
end: end
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
];
|
|
|
|
];
|
|
|
|
$scope.params = {};
|
|
|
|
$scope.params = {};
|
|
|
|
$scope.pagination = {};
|
|
|
|
$scope.pagination = {};
|
|
|
|
$scope.clientMoniker = $scope.currentUser.client_moniker;
|
|
|
|
$scope.clientMoniker = $scope.currentUser.client_moniker;
|
|
|
|
|
|
|
|
$scope.chooseShow = 'All';
|
|
|
|
|
|
|
|
$scope.clients = [$scope.currentUser.client];
|
|
|
|
|
|
|
|
if ($scope.currentUser.client.has_children) {
|
|
|
|
|
|
|
|
$scope.params.client_ids = [];
|
|
|
|
|
|
|
|
$http.get('/client/partner_info/sub_partners',$scope.req).then(function (resp) {
|
|
|
|
|
|
|
|
var clientList = resp.data;
|
|
|
|
|
|
|
|
clientList.forEach(function (client) {
|
|
|
|
|
|
|
|
$scope.clients.push(client);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$scope.clients.forEach(function (client) {
|
|
|
|
|
|
|
|
$scope.params.client_ids.push(client.client_id);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$scope.loadDashboard();
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.chooseClient = function (sub) {
|
|
|
|
|
|
|
|
$scope.params.client_ids = [];
|
|
|
|
|
|
|
|
if (sub == 'All') {
|
|
|
|
|
|
|
|
$scope.chooseShow = 'All';
|
|
|
|
|
|
|
|
$scope.clients.forEach(function (client) {
|
|
|
|
|
|
|
|
$scope.params.client_ids.push(client.client_id);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$scope.params.client_ids = [sub.client_id];
|
|
|
|
|
|
|
|
$scope.chooseShow = sub.short_name;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.loadDashboard();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.loadSettlementLogs = function (page) {
|
|
|
|
|
|
|
|
var params = {limit:10};
|
|
|
|
|
|
|
|
$http.get('/client/trans_flow/settlement/log', {params: angular.merge(params,$scope.params)}).then(function (resp) {
|
|
|
|
|
|
|
|
$scope.settlementLogs = resp.data.data;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
$scope.loadDashboard = function () {
|
|
|
|
$scope.loadDashboard = function () {
|
|
|
|
loadTransCommon();
|
|
|
|
loadTransCommon();
|
|
|
|
getExchangeRate();
|
|
|
|
getExchangeRate();
|
|
|
|
|
|
|
|
loadTradeAmountInTypes(angular.merge($scope.scales[2].params(),angular.copy($scope.params)));
|
|
|
|
|
|
|
|
loadFeeAnalysis(angular.merge($scope.scales[2].params(),angular.copy($scope.params)));
|
|
|
|
|
|
|
|
getOrderCustomerChartAnalysis(angular.merge($scope.scales[2].params(),angular.copy($scope.params)));
|
|
|
|
|
|
|
|
$scope.loadSettlementLogs(1);
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!$scope.currentUser.client.has_children){
|
|
|
|
$scope.loadDashboard();
|
|
|
|
$scope.loadDashboard();
|
|
|
|
|
|
|
|
}
|
|
|
|
function loadTransCommon() {
|
|
|
|
function loadTransCommon() {
|
|
|
|
var params = {begin: $filter('date')(new Date(), 'yyyyMMdd'), end: $filter('date')(new Date(), 'yyyyMMdd')};
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
|
|
|
|
params = angular.merge(params, $scope.scales[0].params());
|
|
|
|
$http.get('/dashboard/partner/common_analysis',{params:params}).then(function (resp) {
|
|
|
|
$http.get('/dashboard/partner/common_analysis',{params:params}).then(function (resp) {
|
|
|
|
$scope.transcommon = resp.data;
|
|
|
|
$scope.transcommon = resp.data;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getExchangeRate() {
|
|
|
|
function getExchangeRate() {
|
|
|
|
$http.get('/dashboard/system/exchange_rates', {params: $scope.scales[0].params()}).then(function (resp) {
|
|
|
|
$http.get('/dashboard/system/exchange_rates', {params: $scope.scales[0].params()}).then(function (resp) {
|
|
|
|
if (resp.data && resp.data.length > 0) {
|
|
|
|
if (resp.data && resp.data.length > 0) {
|
|
|
@ -714,7 +724,6 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
$scope.trade_type_chart = chartParser.parse(tradeInTypeConfig, resp.data);
|
|
|
|
$scope.trade_type_chart = chartParser.parse(tradeInTypeConfig, resp.data);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
loadTradeAmountInTypes($scope.scales[2].params());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function loadFeeAnalysis(params) {
|
|
|
|
function loadFeeAnalysis(params) {
|
|
|
@ -732,7 +741,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
icon: 'path://M3.59-4.07L32.38-4.07L32.38 0.04Q22.25 25.11 17.19 46.34L10.65 46.34Q16.14 26.94 26.19 1.41L3.59 1.41L3.59-4.07Z',
|
|
|
|
icon: 'path://M3.59-4.07L32.38-4.07L32.38 0.04Q22.25 25.11 17.19 46.34L10.65 46.34Q16.14 26.94 26.19 1.41L3.59 1.41L3.59-4.07Z',
|
|
|
|
onclick: function () {
|
|
|
|
onclick: function () {
|
|
|
|
loadFeeAnalysis($scope.scales[2].params());
|
|
|
|
loadFeeAnalysis(angular.merge($scope.scales[2].params(),$scope.params));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
myThirty: {
|
|
|
|
myThirty: {
|
|
|
@ -745,7 +754,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
params.end = $filter('date')(dt, 'yyyyMMdd');
|
|
|
|
params.end = $filter('date')(dt, 'yyyyMMdd');
|
|
|
|
dt.setDate(dt.getDate() - 29);
|
|
|
|
dt.setDate(dt.getDate() - 29);
|
|
|
|
params.begin = $filter('date')(dt, 'yyyyMMdd');
|
|
|
|
params.begin = $filter('date')(dt, 'yyyyMMdd');
|
|
|
|
loadFeeAnalysis(params);
|
|
|
|
loadFeeAnalysis(angular.merge(params,$scope.params));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -774,20 +783,20 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
$scope.trade_line = chartParser.parse(analysisConfig, resp.data);
|
|
|
|
$scope.trade_line = chartParser.parse(analysisConfig, resp.data);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
loadFeeAnalysis($scope.scales[2].params());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getOrderCustomerChartAnalysis(params) {
|
|
|
|
function getOrderCustomerChartAnalysis(params) {
|
|
|
|
$http.get('/dashboard/partner/avg_order_customer',{params:params}).then(function (resp) {
|
|
|
|
$http.get('/dashboard/partner/avg_order_customer',{params:params}).then(function (resp) {
|
|
|
|
$scope.avgOrderAndCustomer = resp.data;
|
|
|
|
$scope.avgOrderAndCustomer = resp.data;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$http.get('/dashboard/partner/customers',{params:params}).then(function (resp) {
|
|
|
|
$http.get('/dashboard/partner/fee_analysis',{params:angular.merge(params,$scope.params)}).then(function (resp) {
|
|
|
|
var dates = [];
|
|
|
|
var dates = [];
|
|
|
|
var new_customers = [];
|
|
|
|
var new_customers = [];
|
|
|
|
var old_customers = [];
|
|
|
|
var old_customers = [];
|
|
|
|
var total_amounts = [];
|
|
|
|
var total_amounts = [];
|
|
|
|
var orders = [];
|
|
|
|
var orders = [];
|
|
|
|
resp.data.reverse().forEach(function (e) {
|
|
|
|
resp.data.forEach(function (e) {
|
|
|
|
dates.push(e.trade_date);
|
|
|
|
dates.push(e.date);
|
|
|
|
new_customers.push(e.new_customers);
|
|
|
|
new_customers.push(e.new_customers);
|
|
|
|
old_customers.push(e.old_customers);
|
|
|
|
old_customers.push(e.old_customers);
|
|
|
|
orders.push(e.orders);
|
|
|
|
orders.push(e.orders);
|
|
|
@ -796,7 +805,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
$scope.customersHistory = customersHistoryConfig(dates, old_customers, new_customers, orders);
|
|
|
|
$scope.customersHistory = customersHistoryConfig(dates, old_customers, new_customers, orders);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
getOrderCustomerChartAnalysis($scope.scales[2].params());
|
|
|
|
|
|
|
|
var customersHistoryConfig = function (date, old_customers, new_customers, orders) {
|
|
|
|
var customersHistoryConfig = function (date, old_customers, new_customers, orders) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
color: colors,
|
|
|
|
color: colors,
|
|
|
@ -815,7 +824,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
icon: 'path://M3.59-4.07L32.38-4.07L32.38 0.04Q22.25 25.11 17.19 46.34L10.65 46.34Q16.14 26.94 26.19 1.41L3.59 1.41L3.59-4.07Z',
|
|
|
|
icon: 'path://M3.59-4.07L32.38-4.07L32.38 0.04Q22.25 25.11 17.19 46.34L10.65 46.34Q16.14 26.94 26.19 1.41L3.59 1.41L3.59-4.07Z',
|
|
|
|
onclick: function () {
|
|
|
|
onclick: function () {
|
|
|
|
$scope.time_range = "Last a week";
|
|
|
|
$scope.time_range = "Last a week";
|
|
|
|
getOrderCustomerChartAnalysis($scope.scales[2].params())
|
|
|
|
getOrderCustomerChartAnalysis(angular.merge($scope.scales[2].params(),$scope.params))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
myThirty: {
|
|
|
|
myThirty: {
|
|
|
@ -829,7 +838,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
dt.setDate(dt.getDate() - 29);
|
|
|
|
dt.setDate(dt.getDate() - 29);
|
|
|
|
params.begin = $filter('date')(dt, 'yyyyMMdd');
|
|
|
|
params.begin = $filter('date')(dt, 'yyyyMMdd');
|
|
|
|
$scope.time_range = "Last a month";
|
|
|
|
$scope.time_range = "Last a month";
|
|
|
|
getOrderCustomerChartAnalysis(params)
|
|
|
|
getOrderCustomerChartAnalysis(angular.merge(params,$scope.params))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -881,184 +890,6 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*function loadTradeTimeAnalysis(params) {
|
|
|
|
|
|
|
|
var timeAnalysis = {
|
|
|
|
|
|
|
|
chart: {
|
|
|
|
|
|
|
|
tooltip: {
|
|
|
|
|
|
|
|
trigger: 'axis'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
toolbox: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
feature: {
|
|
|
|
|
|
|
|
mySeven: {
|
|
|
|
|
|
|
|
title: '最近7天',
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
icon: 'path://M3.59-4.07L32.38-4.07L32.38 0.04Q22.25 25.11 17.19 46.34L10.65 46.34Q16.14 26.94 26.19 1.41L3.59 1.41L3.59-4.07Z',
|
|
|
|
|
|
|
|
onclick: function () {
|
|
|
|
|
|
|
|
loadTradeTimeAnalysis($scope.scales[2].params());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
myThirty: {
|
|
|
|
|
|
|
|
title: '最近30天',
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
icon: 'path://M12.52 17.02L16.10 17.02Q20.71 17.02 22.43 15.72Q25.66 13.23 25.66 8.23Q25.66-0.63 17.61-0.63Q10.93-0.63 9.42 6.93L3.73 6.93Q4.50 2.19 7.03-0.91Q10.90-5.51 17.61-5.51Q23.24-5.51 26.89-2.28Q31.22 1.52 31.22 8.02Q31.22 16.78 23.38 19.48Q32.84 23.14 32.84 32.81Q32.84 39.00 29.32 42.97Q25.10 47.79 17.72 47.79Q10.79 47.79 6.68 43.04Q3.66 39.56 3.02 33.44L8.93 33.44Q9.67 42.83 17.72 42.83Q21.45 42.83 23.98 40.72Q27.14 38.01 27.14 32.81Q27.14 21.63 16.10 21.63L12.52 21.63L12.52 17.02ZM54-5.51Q67.99-5.51 67.99 21.14Q67.99 47.79 54 47.79Q40.04 47.79 40.04 21.14Q40.04-5.51 54-5.51M46.97 33.65L59.84 4.30Q57.80-0.55 53.93-0.55Q45.95-0.55 45.95 21.14Q45.95 28.52 46.97 33.65M48.16 37.91Q50.13 42.83 54 42.83Q62.09 42.83 62.09 21.07Q62.09 13.86 61.07 8.66L48.16 37.91Z',
|
|
|
|
|
|
|
|
onclick: function () {
|
|
|
|
|
|
|
|
var params = {};
|
|
|
|
|
|
|
|
var dt = new Date();
|
|
|
|
|
|
|
|
params.end = $filter('date')(dt, 'yyyyMMdd');
|
|
|
|
|
|
|
|
dt.setDate(dt.getDate() - 29);
|
|
|
|
|
|
|
|
params.begin = $filter('date')(dt, 'yyyyMMdd');
|
|
|
|
|
|
|
|
loadTradeTimeAnalysis(params)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
legend: {
|
|
|
|
|
|
|
|
data: ['Total Amount', 'Total Count', 'Retail In-Store Amount', 'Retail In-Store Count', 'Retail API Amount', 'Retail API Count',
|
|
|
|
|
|
|
|
'QR Code Amount', 'QR Code Count',
|
|
|
|
|
|
|
|
'Online API Amount', 'Online API Count', 'WeChat HTML5 Amount', 'WeChat HTML5 Count'],
|
|
|
|
|
|
|
|
bottom: 0,
|
|
|
|
|
|
|
|
height: '15%',
|
|
|
|
|
|
|
|
width: '80%',
|
|
|
|
|
|
|
|
left: '10%'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
grid: {
|
|
|
|
|
|
|
|
top: 10,
|
|
|
|
|
|
|
|
bottom: '15%',
|
|
|
|
|
|
|
|
containLabel: true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
yAxis: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: 'Avg Amount(AUD)',
|
|
|
|
|
|
|
|
type: 'value'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: 'Avg Count(Records)',
|
|
|
|
|
|
|
|
type: 'value'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
color: colors
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
xAxis: {
|
|
|
|
|
|
|
|
basic: {type: 'category', boundaryGap: false, formatter: '{value}:00'},
|
|
|
|
|
|
|
|
key: 'hour'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
series: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'Total Amount',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
symbol: 'triangle',
|
|
|
|
|
|
|
|
areaStyle: {normal: {}},
|
|
|
|
|
|
|
|
yAxisIndex: 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'total_fee'}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'Total Count',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
yAxisIndex: 1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'total_count'}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'Retail In-Store Amount',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
symbol: 'triangle',
|
|
|
|
|
|
|
|
areaStyle: {normal: {}},
|
|
|
|
|
|
|
|
yAxisIndex: 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'offline_fee'}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'Retail In-Store Count',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
yAxisIndex: 1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'offline_count'}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'Retail API Amount',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
symbol: 'triangle',
|
|
|
|
|
|
|
|
areaStyle: {normal: {}},
|
|
|
|
|
|
|
|
yAxisIndex: 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'offline_api_fee'}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'Retail API Count',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
yAxisIndex: 1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'offline_api_count'}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'QR Code Amount',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
symbol: 'triangle',
|
|
|
|
|
|
|
|
areaStyle: {normal: {}},
|
|
|
|
|
|
|
|
yAxisIndex: 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'client_code_fee'}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'QR Code Count',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
yAxisIndex: 1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'client_code_count'}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'Online API Amount',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
symbol: 'triangle',
|
|
|
|
|
|
|
|
areaStyle: {normal: {}},
|
|
|
|
|
|
|
|
yAxisIndex: 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'gateway_qrcode_fee'}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'Online API Count',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
yAxisIndex: 1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'gateway_qrcode_count'}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'WeChat HTML5 Amount',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
symbol: 'triangle',
|
|
|
|
|
|
|
|
areaStyle: {normal: {}},
|
|
|
|
|
|
|
|
yAxisIndex: 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'gateway_jsapi_fee'}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basic: {
|
|
|
|
|
|
|
|
name: 'WeChat HTML5 Count',
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
yAxisIndex: 1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
column: {key: 'gateway_jsapi_count'}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$http.get('/dashboard/partner/trade_in_hours', {params: params}).then(function (resp) {
|
|
|
|
|
|
|
|
$scope.trade_time = chartParser.parse(timeAnalysis, resp.data);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
loadTradeTimeAnalysis($scope.scales[4].params());*/
|
|
|
|
|
|
|
|
$scope.displayExchangeRateHistory = function () {
|
|
|
|
$scope.displayExchangeRateHistory = function () {
|
|
|
|
$uibModal.open({
|
|
|
|
$uibModal.open({
|
|
|
|
templateUrl: '/static/dashboard/templates/exchange_rate_history_dialog.html',
|
|
|
|
templateUrl: '/static/dashboard/templates/exchange_rate_history_dialog.html',
|
|
|
@ -1079,29 +910,10 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
|
|
|
|
controller: 'unSettledAmountHistoryDialogCtrl'
|
|
|
|
controller: 'unSettledAmountHistoryDialogCtrl'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.loadSettlementLogs = function (page) {
|
|
|
|
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
|
|
|
|
params.page = page || $scope.pagination.page || 1;
|
|
|
|
|
|
|
|
params.limit = 10;
|
|
|
|
|
|
|
|
$http.get('/dashboard/partner/' + $scope.clientMoniker + '/settlement_logs', {params: params}).then(function (resp) {
|
|
|
|
|
|
|
|
$scope.settlementLogs = resp.data.data;
|
|
|
|
|
|
|
|
$scope.pagination = resp.data.pagination;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.getClearingTransactions = function (client_id,detail_id) {
|
|
|
|
|
|
|
|
$uibModal.open({
|
|
|
|
|
|
|
|
templateUrl: '/static/analysis/templates/settlement_transactions.html',
|
|
|
|
|
|
|
|
controller: 'managerClearingDetailCtrl',
|
|
|
|
|
|
|
|
resolve: {
|
|
|
|
|
|
|
|
detail: ['$http', '$stateParams', function ($http) {
|
|
|
|
|
|
|
|
return $http.get('/dashboard/partner/' + client_id+'/settlement_logs/'+detail_id);
|
|
|
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
size: 'lg'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.loadSettlementLogs(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.getClearingTransactions = function (client_id, detailId) {
|
|
|
|
|
|
|
|
clearingDetailService.clientClearingDetail(client_id, detailId, true)
|
|
|
|
|
|
|
|
};
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
|
|
app.controller('exchangeRateHistoryDialogCtrl', ['$scope', '$http', '$filter', 'chartParser', function ($scope, $http, $filter, chartParser) {
|
|
|
|
app.controller('exchangeRateHistoryDialogCtrl', ['$scope', '$http', '$filter', 'chartParser', function ($scope, $http, $filter, chartParser) {
|
|
|
|