交易数据渠道汇总数据

master
yangkai 6 years ago
parent 7e61e0ee0b
commit edf1da46ae

@ -315,27 +315,39 @@
<![CDATA[
select ifnull(sum(CASE WHEN s.channel = 'Alipay' THEN s.total ELSE 0 END),0) alipayamount,
ifnull(sum(CASE WHEN s.channel = 'Alipay' THEN s.orders ELSE 0 END),0) alipay_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'Alipay',TRUE,NULL)),0) alipay_client_count,
ifnull(sum(CASE WHEN s.channel = 'Bestpay' THEN s.total ELSE 0 END),0) bestpayamount,
ifnull(sum(CASE WHEN s.channel = 'Bestpay' THEN s.orders ELSE 0 END),0) bestpay_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'Bestpay',TRUE,NULL)),0) bestpay_client_count,
ifnull(sum(CASE WHEN s.channel = 'Wechat' THEN s.total ELSE 0 END),0) wechatamount,
ifnull(sum(CASE WHEN s.channel = 'Wechat' THEN s.orders ELSE 0 END),0) wechat_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'Wechat',TRUE,NULL)),0) wechat_client_count,
ifnull(sum(CASE WHEN s.channel = 'jd' THEN s.total ELSE 0 END),0) jdamount,
ifnull(sum(CASE WHEN s.channel = 'jd' THEN s.orders ELSE 0 END),0) jd_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'jd',TRUE,NULL)),0) jd_client_count,
ifnull(sum(CASE WHEN s.channel = 'AlipayOnline' THEN s.total ELSE 0 END),0) alipayonlineamount,
ifnull(sum(CASE WHEN s.channel = 'AlipayOnline' THEN s.orders ELSE 0 END),0) alipayonline_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'AlipayOnline',TRUE,NULL)),0) alipayonline_client_count,
ifnull(sum(CASE WHEN s.channel = 'hf' THEN s.total ELSE 0 END),0) hfamount,
ifnull(sum(CASE WHEN s.channel = 'hf' THEN s.orders ELSE 0 END),0) hf_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'hf',TRUE,NULL)),0) hf_client_count,
ifnull(sum(CASE WHEN s.channel = 'Rpay' THEN s.total ELSE 0 END),0) rpayamount,
ifnull(sum(CASE WHEN s.channel = 'Rpay' THEN s.orders ELSE 0 END),0) rpay_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'Rpay',TRUE,NULL)),0) rpay_client_count,
ifnull(sum(CASE WHEN s.channel = 'Yeepay' THEN s.total ELSE 0 END),0) yeepayamount,
ifnull(sum(CASE WHEN s.channel = 'Yeepay' THEN s.orders ELSE 0 END),0) yeepay_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'Yeepay',TRUE,NULL)),0) yeepay_client_count,
ifnull(sum(CASE WHEN s.channel = 'LakalaPay' THEN s.total ELSE 0 END),0) lakalapayamount,
ifnull(sum(CASE WHEN s.channel = 'LakalaPay' THEN s.orders ELSE 0 END),0) lakala_order_count
ifnull(sum(CASE WHEN s.channel = 'LakalaPay' THEN s.orders ELSE 0 END),0) lakala_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'LakalaPay',TRUE,NULL)),0) lakala_client_count,
ifnull(sum(s.orders), 0) all_count,
ifnull(sum(s.total), 0) all_amount,
ifnull(COUNT(DISTINCT s.client_id),0) all_client_count
FROM statistics_customer_order s
LEFT JOIN sys_clients c ON c.client_id = s.client_id and c.is_valid=1
LEFT JOIN sys_clients c ON c.client_id = s.client_id
]]>
<where>
s.client_id != 0
s.client_id != 0 and c.is_valid=1
<if test="bd_group!=null">and c.client_id in
(SELECT b.client_id FROM sys_client_bd b
INNER JOIN financial_bd_config c ON c.manager_id=b.bd_id

@ -6,6 +6,11 @@
.cen table th {
text-align: center;
}
.channel .col-sm-2 {
border: 1px solid #d2d6de;
border-left: 0;
}
</style>
<!--<section class="content-header">
<h1>Transaction Data</h1>
@ -141,25 +146,35 @@
</div>
</div>
<div class="box box-warning" ng-if="currentUser.org==null">
<div class="box-header with-border">各平台交易总额</div>
<div class="box-body table-responsive">
<div class="box-header with-border">各平台交易总额
<div class="description-text" style="display: inline-block;float: right;">
<label class="description-text text-red">交易金额{{ totalChannelAmount.all_amount|currency: ' $ ' }}</label>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.all_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.all_client_count }}</label>
</div>
</div>
<div class="box-body table-responsive channel">
<div class="row">
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/wechatpay_sign.png"/>Wechat</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.wechatamount|currency: ' $ '"></label>
ng-bind="totalChannelAmount.wechatamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.wechat_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.wechat_client_count }}</label>
</div>
</div>
</div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/bestpay_sign.png"/>Bestpay</div>
<div class="description-text">
<div class="description-header text-bold"><img src="/static/images/bestpay_sign.png"/>Bestpay</div>
<label class="description-text text-red"
ng-bind="totalChannelAmount.bestpayamount|currency: ' $ '"></label>
ng-bind="totalChannelAmount.bestpayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.bestpay_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.bestpay_client_count }}</label>
</div>
</div>
@ -167,9 +182,11 @@
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/alipay_sign.png"/>Alipay</div>
<div class="description-text text-red">
<label class="description-text"
ng-bind="totalChannelAmount.alipayamount|currency: ' $ '"></label>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.alipayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.alipay_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.alipay_client_count }}</label>
</div>
</div>
@ -177,9 +194,11 @@
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/alipay_sign.png"/>AlipayOnline</div>
<div class="description-text text-red">
<label class="description-text"
ng-bind="totalChannelAmount.alipayonlineamount|currency: ' $ '"></label>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.alipayonlineamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.alipayonline_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.alipayonline_client_count }}</label>
</div>
</div>
@ -187,9 +206,11 @@
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/jd_sign.png"/>JD Pay</div>
<div class="description-text text-red">
<label class="description-text"
ng-bind="totalChannelAmount.jdamount|currency: ' $ '"></label>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.jdamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.jd_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.jd_client_count }}</label>
</div>
</div>
@ -197,37 +218,46 @@
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/hf_sign.png"/>HF Pay</div>
<div class="description-text text-red">
<label class="description-text"
ng-bind="totalChannelAmount.hfamount|currency: ' $ '"></label>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.hfamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.hf_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.hf_client_count }}</label>
</div>
</div>
</div>
<!-- Rpay+显示交易额分析-->
<!-- 显示Rpay+交易额分析-->
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/rpayplus_sign.png"/>RPay+</div>
<div class="description-text text-red">
<label class="description-text"
ng-bind="totalChannelAmount.rpayamount|currency: ' $ '"></label>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.rpay_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.rpay_client_count }}</label>
</div>
</div>
</div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/yeepay_sign.png"/>Yeepay</div>
<div class="description-text text-red">
<label class="description-text"
ng-bind="totalChannelAmount.yeepayamount|currency: ' $ '"></label>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.yeepayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.yeepay_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.yeepay_client_count }}</label>
</div>
</div>
</div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/lakalapay_sign.png"/>LakalaPay</div>
<div class="description-text text-red">
<label class="description-text"
ng-bind="totalChannelAmount.lakalapayamount|currency: ' $ '"></label>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.lakalapayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.lakala_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.lakala_client_count }}</label>
</div>
</div>
</div>

@ -6,6 +6,11 @@
.cen table th {
text-align: center;
}
.channel .col-sm-2 {
border: 1px solid #d2d6de;
border-left: 0;
}
</style>
<!--<section class="content-header">
<h1>Transaction Data</h1>
@ -110,25 +115,35 @@
</div>
</div>
<div class="box box-warning" ng-if="currentUser.org==null">
<div class="box-header with-border">各平台交易总额</div>
<div class="box-body table-responsive">
<div class="box-header with-border">各平台交易总额
<div class="description-text" style="display: inline-block;float: right;">
<label class="description-text text-red">交易金额{{ totalChannelAmount.all_amount|currency: ' $ ' }}</label>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.all_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.all_client_count }}</label>
</div>
</div>
<div class="box-body table-responsive channel">
<div class="row">
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/wechatpay_sign.png"/>Wechat</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.wechatamount|currency: ' $ '"></label>
ng-bind="totalChannelAmount.wechatamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.wechat_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.wechat_client_count }}</label>
</div>
</div>
</div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/bestpay_sign.png"/>Bestpay</div>
<div class="description-text">
<div class="description-header text-bold"><img src="/static/images/bestpay_sign.png"/>Bestpay</div>
<label class="description-text text-red"
ng-bind="totalChannelAmount.bestpayamount|currency: ' $ '"></label>
ng-bind="totalChannelAmount.bestpayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.bestpay_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.bestpay_client_count }}</label>
</div>
</div>
@ -138,7 +153,9 @@
<div class="description-header text-bold"><img src="/static/images/alipay_sign.png"/>Alipay</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.alipayamount|currency: ' $ '"></label>
ng-bind="totalChannelAmount.alipayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.alipay_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.alipay_client_count }}</label>
</div>
</div>
@ -148,7 +165,9 @@
<div class="description-header text-bold"><img src="/static/images/alipay_sign.png"/>AlipayOnline</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.alipayonlineamount|currency: ' $ '"></label>
ng-bind="totalChannelAmount.alipayonlineamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.alipayonline_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.alipayonline_client_count }}</label>
</div>
</div>
@ -158,7 +177,9 @@
<div class="description-header text-bold"><img src="/static/images/jd_sign.png"/>JD Pay</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.jdamount|currency: ' $ '"></label>
ng-bind="totalChannelAmount.jdamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.jd_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.jd_client_count }}</label>
</div>
</div>
@ -168,7 +189,9 @@
<div class="description-header text-bold"><img src="/static/images/hf_sign.png"/>HF Pay</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.hfamount|currency: ' $ '"></label>
ng-bind="totalChannelAmount.hfamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.hf_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.hf_client_count }}</label>
</div>
</div>
</div>
@ -179,7 +202,9 @@
<div class="description-header text-bold"><img src="/static/images/rpayplus_sign.png"/>RPay+</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpayamount|currency: ' $ '"></label>
ng-bind="totalChannelAmount.rpayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.rpay_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.rpay_client_count }}</label>
</div>
</div>
</div>
@ -188,7 +213,9 @@
<div class="description-header text-bold"><img src="/static/images/yeepay_sign.png"/>Yeepay</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.yeepayamount|currency: ' $ '"></label>
ng-bind="totalChannelAmount.yeepayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.yeepay_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.yeepay_client_count }}</label>
</div>
</div>
</div>
@ -197,11 +224,14 @@
<div class="description-header text-bold"><img src="/static/images/lakalapay_sign.png"/>LakalaPay</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.lakalapayamount|currency: ' $ '"></label>
ng-bind="totalChannelAmount.lakalapayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.lakala_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.lakala_client_count }}</label>
</div>
</div>
</div>
</div>
<!-- <table class="table">
<tr>

@ -56,6 +56,13 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
$scope.params.begin = currentYearFirstDate;
$scope.doAnalysis(1);
};
$scope.thisMonth = function () {
$scope.params.end = new Date(new Date().getTime() - 24*60*60*1000);
var monthBegin = new Date();
monthBegin.setDate(1);
$scope.params.begin = monthBegin;
$scope.doAnalysis(1);
};
$scope.doAnalysis = function () {
if ($scope.params.channel == 'All') {
$scope.params.channel = null;
@ -93,7 +100,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
var new_date = new Date(new_year,new_month,1); //取当年当月中的第一天
return new Date(new_date.getTime()-1000*60*60*24);//获取当月最后一天日期
}
$scope.thisYear();
$scope.thisMonth();
var ordersHistoryConfig = {
chart: {
tooltip: {

Loading…
Cancel
Save