|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
/**
|
|
|
|
|
* Created by yishuqian on 24/05/2017.
|
|
|
|
|
*/
|
|
|
|
|
define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angular) {
|
|
|
|
|
define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','echarts'], function (angular,echarts) {
|
|
|
|
|
'use strict';
|
|
|
|
|
var colors = ['#00c0ef', '#00a65a', '#ff851b', '#f39c12', '#d81b60', '#605ca8', '#dd4b39', '#008080', '#8B008B', '#D2691E', '#708090'];
|
|
|
|
|
var app = angular.module('analysisTransaction', ['ui.bootstrap', 'ui.router', 'ngEcharts']);
|
|
|
|
@ -445,12 +445,13 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angul
|
|
|
|
|
$scope.params = {industry: 0};
|
|
|
|
|
$scope.today = new Date();
|
|
|
|
|
$scope.pagination = {limit:20};
|
|
|
|
|
$scope.royalpay_label = '全部';
|
|
|
|
|
|
|
|
|
|
$scope.loadRoyalpayindustry = function () {
|
|
|
|
|
$http.get('/static/data/royalpayindustry.json').then(function (resp) {
|
|
|
|
|
$scope.royalpayindustry = resp.data;
|
|
|
|
|
var selectAll = {
|
|
|
|
|
"label": "All",
|
|
|
|
|
"label": "全部",
|
|
|
|
|
"mccCode": "0",
|
|
|
|
|
"children":{}
|
|
|
|
|
};
|
|
|
|
@ -462,6 +463,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angul
|
|
|
|
|
|
|
|
|
|
$scope.onRoyalPayIndustrySelect = function (selectedItem) {
|
|
|
|
|
$scope.params.royalpay_label = selectedItem.label;
|
|
|
|
|
$scope.royalpay_label = selectedItem.label;
|
|
|
|
|
$scope.params.industry = selectedItem.mccCode;
|
|
|
|
|
$scope.doAnalysis();
|
|
|
|
|
};
|
|
|
|
@ -500,55 +502,248 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angul
|
|
|
|
|
$scope.params.from = monthBegin;
|
|
|
|
|
$scope.doAnalysis();
|
|
|
|
|
};
|
|
|
|
|
var amountAnalysis = {
|
|
|
|
|
var orderOption = {
|
|
|
|
|
chart: {
|
|
|
|
|
yAxis: {
|
|
|
|
|
splitLine: {show: true},
|
|
|
|
|
axisLine: {
|
|
|
|
|
lineStyle: {
|
|
|
|
|
color: '#000'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: '#fff',
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
formatter: '{b}:AUD {c}'
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'value',
|
|
|
|
|
name: '交易金额(AUD)'
|
|
|
|
|
axisPointer: {
|
|
|
|
|
type: 'shadow'
|
|
|
|
|
},
|
|
|
|
|
formatter: '总订单数 : {c0}<br />' +
|
|
|
|
|
'行业订单数 : {c1}<br /> ' +
|
|
|
|
|
'占比 : {c4}%'
|
|
|
|
|
},
|
|
|
|
|
color: colors
|
|
|
|
|
legend: {
|
|
|
|
|
data: ['当日总订单数', '行业订单数'],
|
|
|
|
|
textStyle: {
|
|
|
|
|
color: '#000'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
basic: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
boundaryGap: false
|
|
|
|
|
axisLine: {
|
|
|
|
|
lineStyle: {
|
|
|
|
|
color: '#000'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
key: 'trans_date'
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
series: [{
|
|
|
|
|
basic: {
|
|
|
|
|
label:{
|
|
|
|
|
normal: {
|
|
|
|
|
show: true,
|
|
|
|
|
position: 'outside',
|
|
|
|
|
offset: [0, 0],
|
|
|
|
|
textStyle: {
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
fontFamily: 'Arial'
|
|
|
|
|
}
|
|
|
|
|
}},
|
|
|
|
|
name: '当日总订单数',
|
|
|
|
|
type: 'line',
|
|
|
|
|
smooth: true,
|
|
|
|
|
showAllSymbol: true,
|
|
|
|
|
symbol: 'emptyCircle',
|
|
|
|
|
symbolSize: 5
|
|
|
|
|
},
|
|
|
|
|
column: {key: 'orders'}
|
|
|
|
|
}, {
|
|
|
|
|
basic: {
|
|
|
|
|
label:{
|
|
|
|
|
normal: {
|
|
|
|
|
show: true,
|
|
|
|
|
position: 'right',
|
|
|
|
|
offset: [0, 0],
|
|
|
|
|
textStyle: {
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
fontFamily: 'Arial'
|
|
|
|
|
}
|
|
|
|
|
}},
|
|
|
|
|
name: '行业订单数',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
barWidth: 10,
|
|
|
|
|
itemStyle: {
|
|
|
|
|
barBorderRadius: 5,
|
|
|
|
|
color: '#14c8d4'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
column: {key: 'industry_orders'}
|
|
|
|
|
}, {
|
|
|
|
|
basic: {
|
|
|
|
|
name: '当日总订单数',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
barGap: '-100%',
|
|
|
|
|
barWidth: 10,
|
|
|
|
|
z: -12,
|
|
|
|
|
itemStyle: {
|
|
|
|
|
color: '#fff'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
column: {key: 'orders'}
|
|
|
|
|
}, {
|
|
|
|
|
basic: {
|
|
|
|
|
name: '当日总订单数',
|
|
|
|
|
type: 'pictorialBar',
|
|
|
|
|
symbol: 'rect',
|
|
|
|
|
itemStyle: {
|
|
|
|
|
color: '#0f375f'
|
|
|
|
|
},
|
|
|
|
|
symbolRepeat: true,
|
|
|
|
|
symbolSize: [12, 4],
|
|
|
|
|
symbolMargin: 1,
|
|
|
|
|
z: -10
|
|
|
|
|
},
|
|
|
|
|
column: {key: 'orders'}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
basic: {type: 'line', label: {normal: {show: true}}, showAllSymbols: true},
|
|
|
|
|
column: {key: 'total_amount'}
|
|
|
|
|
basic: {
|
|
|
|
|
name: 'pcent',
|
|
|
|
|
type: 'pictorialBar',
|
|
|
|
|
symbol: 'rect',
|
|
|
|
|
itemStyle: {
|
|
|
|
|
color: '#fff'
|
|
|
|
|
},
|
|
|
|
|
symbolRepeat: true,
|
|
|
|
|
symbolSize: [12, 4],
|
|
|
|
|
symbolMargin: 1,
|
|
|
|
|
z: -10
|
|
|
|
|
},
|
|
|
|
|
column: {key: 'order_pcent'}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
var ordersAnalysis = {
|
|
|
|
|
|
|
|
|
|
var amountOption = {
|
|
|
|
|
chart: {
|
|
|
|
|
yAxis: {
|
|
|
|
|
splitLine: {show: true},
|
|
|
|
|
axisLine: {
|
|
|
|
|
lineStyle: {
|
|
|
|
|
color: '#000'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: '#fff',
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
formatter: '{b}:AUD {c}'
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'value',
|
|
|
|
|
name: '订单数'
|
|
|
|
|
axisPointer: {
|
|
|
|
|
type: 'shadow'
|
|
|
|
|
},
|
|
|
|
|
formatter: '总交易额 : AUD {c0}<br />' +
|
|
|
|
|
'行业交易额 : AUD {c1}<br /> ' +
|
|
|
|
|
'占比 : {c4}%'
|
|
|
|
|
},
|
|
|
|
|
color: colors
|
|
|
|
|
legend: {
|
|
|
|
|
data: ['当日总交易额', '行业交易额'],
|
|
|
|
|
textStyle: {
|
|
|
|
|
color: '#000'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
basic: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
boundaryGap: false
|
|
|
|
|
axisLine: {
|
|
|
|
|
lineStyle: {
|
|
|
|
|
color: '#000'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
key: 'trans_date'
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
series: [{
|
|
|
|
|
basic: {
|
|
|
|
|
label:{
|
|
|
|
|
normal: {
|
|
|
|
|
show: true,
|
|
|
|
|
position: 'outside',
|
|
|
|
|
offset: [0, 0],
|
|
|
|
|
textStyle: {
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
fontFamily: 'Arial'
|
|
|
|
|
}
|
|
|
|
|
}},
|
|
|
|
|
name: '当日总交易额',
|
|
|
|
|
type: 'line',
|
|
|
|
|
smooth: true,
|
|
|
|
|
showAllSymbol: true,
|
|
|
|
|
symbol: 'emptyCircle',
|
|
|
|
|
symbolSize: 5
|
|
|
|
|
},
|
|
|
|
|
column: {key: 'total_amount'}
|
|
|
|
|
}, {
|
|
|
|
|
basic: {
|
|
|
|
|
label:{
|
|
|
|
|
normal: {
|
|
|
|
|
show: true,
|
|
|
|
|
position: 'right',
|
|
|
|
|
offset: [0, 0],
|
|
|
|
|
textStyle: {
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontFamily: 'Arial'
|
|
|
|
|
}
|
|
|
|
|
}},
|
|
|
|
|
name: '行业交易额',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
barWidth: 10,
|
|
|
|
|
itemStyle: {
|
|
|
|
|
barBorderRadius: 5,
|
|
|
|
|
color: '#14c8d4'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
column: {key: 'industry_total_amount'}
|
|
|
|
|
}, {
|
|
|
|
|
basic: {
|
|
|
|
|
name: '当日总交易额',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
barGap: '-100%',
|
|
|
|
|
barWidth: 10,
|
|
|
|
|
z: -12,
|
|
|
|
|
itemStyle: {
|
|
|
|
|
color: '#fff'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
column: {key: 'total_amount'}
|
|
|
|
|
}, {
|
|
|
|
|
basic: {
|
|
|
|
|
name: '当日总交易额',
|
|
|
|
|
type: 'pictorialBar',
|
|
|
|
|
symbol: 'rect',
|
|
|
|
|
itemStyle: {
|
|
|
|
|
color: '#0f375f'
|
|
|
|
|
},
|
|
|
|
|
symbolRepeat: true,
|
|
|
|
|
symbolSize: [12, 4],
|
|
|
|
|
symbolMargin: 1,
|
|
|
|
|
z: -10
|
|
|
|
|
},
|
|
|
|
|
column: {key: 'total_amount'}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
basic: {type: 'line', label: {normal: {show: true}}, showAllSymbols: true},
|
|
|
|
|
column: {key: 'orders'}
|
|
|
|
|
basic: {
|
|
|
|
|
name: 'pcent',
|
|
|
|
|
type: 'pictorialBar',
|
|
|
|
|
symbol: 'rect',
|
|
|
|
|
itemStyle: {
|
|
|
|
|
color: '#fff'
|
|
|
|
|
},
|
|
|
|
|
symbolRepeat: true,
|
|
|
|
|
symbolSize: [12, 4],
|
|
|
|
|
symbolMargin: 1,
|
|
|
|
|
z: -10
|
|
|
|
|
},
|
|
|
|
|
column: {key: 'amount_pcent'}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
@ -565,8 +760,8 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angul
|
|
|
|
|
delete params.royalpay_label;
|
|
|
|
|
$http.get('/analysis/rp_industry/echarts', {params: params}).then(function (resp) {
|
|
|
|
|
$scope.analysisData = resp.data;
|
|
|
|
|
$scope.amountAnalysis = chartParser.parse(amountAnalysis, resp.data);
|
|
|
|
|
$scope.ordersAnalysis = chartParser.parse(ordersAnalysis, resp.data);
|
|
|
|
|
$scope.amountAnalysis = chartParser.parse(amountOption, resp.data);
|
|
|
|
|
$scope.ordersAnalysis = chartParser.parse(orderOption, resp.data);
|
|
|
|
|
$scope.future_loading = false;
|
|
|
|
|
$scope.chooseDay = $filter('date')($scope.params.from, 'yyyy-MM-dd');
|
|
|
|
|
$scope.loadTopTransPartners(1);
|
|
|
|
|