修改partner_dashboard.html

master
yuan 7 years ago
parent 0bef940daa
commit 1561c75e50

@ -23,6 +23,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -236,6 +237,10 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
params.put("end",DateUtils.addDays(params.getDate("end"),-1));
JSONObject yes = getTransJSONO(params);
res.put("today",today);
res.put("trade_amount_rise",yes.getBigDecimal("trade_amount").compareTo(BigDecimal.ZERO)>0 ? (today.getBigDecimal("trade_amount").subtract(yes.getBigDecimal("trade_amount"))).divide(yes.getBigDecimal("trade_amount"),4):BigDecimal.ZERO);
res.put("trade_count_rise", yes.getIntValue("trade_count") > 0 ? (today.getIntValue("trade_count")-yes.getIntValue("trade_count"))/yes.getIntValue("trade_count") : 0);
res.put("new_customers_rise", yes.getIntValue("new_customers") > 0 ? (today.getIntValue("new_customers")-yes.getIntValue("new_customers"))/yes.getIntValue("new_customers") : 0);
res.put("not_settled_rise",yes.getBigDecimal("not_settled").compareTo(BigDecimal.ZERO)>0 ? (today.getBigDecimal("not_settled").subtract(yes.getBigDecimal("not_settled"))).divide(yes.getBigDecimal("not_settled"),4):BigDecimal.ZERO);
res.put("yes",yes);
return res;
}

@ -711,7 +711,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
$scope.trade_type_chart = chartParser.parse(tradeInTypeConfig, resp.data);
});
}
loadTradeAmountInTypes($scope.scales[4].params());
loadTradeAmountInTypes($scope.scales[2].params());
function getAvgOrderAndCustomer() {
$http.get('/dashboard/partner/' + $scope.clientMoniker + '/avg_order_customer').then(function (resp) {
$scope.avgOrderAndCustomer = resp.data;
@ -776,7 +776,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
$scope.trade_line = chartParser.parse(analysisConfig, resp.data);
})
}
loadFeeAnalysis($scope.scales[4].params());
loadFeeAnalysis($scope.scales[2].params());
function getOrderCustomerChartAnalysis(params) {
$http.get('/dashboard/partner/customers',{params:params}).then(function (resp) {
@ -795,7 +795,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
$scope.customersHistory = customersHistoryConfig(dates, old_customers, new_customers, orders);
});
}
getOrderCustomerChartAnalysis($scope.scales[4].params());
getOrderCustomerChartAnalysis($scope.scales[2].params());
var customersHistoryConfig = function (date, old_customers, new_customers, orders) {
return {
color: colors,

@ -202,7 +202,7 @@
<p class="mb-0 m-t-20 text-muted">Yesterday: {{transcommon.yes.trade_amount|currency:'AUD'}} <span class="pull-right" ng-class="{'text-red':transcommon.today.trade_amount<transcommon.yes.trade_amount}">
<i class="fa fa-caret-up m-r-5" ng-if="transcommon.today.trade_amount >=transcommon.yes.trade_amount"></i>
<i class="fa fa-caret-down m-r-5" ng-if="transcommon.today.trade_amount<transcommon.yes.trade_amount"></i>
{{((transcommon.today.trade_amount-transcommon.yes.trade_amount)/transcommon.yes.trade_amount)|number:2|abs}}%</span></p>
{{transcommon.trade_amount_rise|abs}}%</span></p>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
@ -215,7 +215,7 @@
<p class="mb-0 m-t-20 text-light">Yesterday: {{transcommon.yes.trade_count}} <span class="pull-right" ng-class="{'text-red':transcommon.today.trade_count<transcommon.yes.trade_count}">
<i class="fa fa-caret-up m-r-5" ng-if="transcommon.today.trade_count >=transcommon.yes.trade_count"></i>
<i class="fa fa-caret-down m-r-5 " ng-if="transcommon.today.trade_count<transcommon.yes.trade_count"></i>
{{((transcommon.today.trade_count-transcommon.yes.trade_count)/transcommon.yes.trade_count)|number:2|abs}}%</span></p>
{{transcommon.trade_count_rise|number:2|abs}}%</span></p>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
@ -228,7 +228,7 @@
<p class="mb-0 m-t-20 text-muted">Yesterday: {{transcommon.yes.new_customers}} <span class="pull-right" ng-class="{'text-red':transcommon.today.new_customers<transcommon.yes.new_customers}">
<i class="fa fa-caret-up m-r-5" ng-if="transcommon.today.new_customers >=transcommon.yes.new_customers"></i>
<i class="fa fa-caret-down m-r-5" ng-if="transcommon.today.new_customers<transcommon.yes.new_customers"></i>
{{((transcommon.today.trade_count-transcommon.yes.new_customers)/transcommon.yes.new_customers*100)|number:2|abs}}%</span></p>
{{transcommon.new_customers_rise|abs}}%</span></p>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
@ -241,7 +241,7 @@
<p class="mb-0 m-t-20 text-light">Latest settle: {{transcommon.yes.not_settled|currency:'AUD '}} <span class="pull-right" ng-class="{'text-red':transcommon.today.not_settled<transcommon.yes.not_settled}">
<i class="fa fa-caret-up m-r-5" ng-if="transcommon.today.not_settled >=transcommon.yes.not_settled"></i>
<i class="fa fa-caret-down m-r-5" ng-if="transcommon.today.not_settled<transcommon.yes.not_settled"></i>
{{((transcommon.today.not_settled-transcommon.yes.not_settled)/transcommon.yes.not_settled)|number:2|abs}}%</span></p>
{{transcommon.not_settled_rise|number:2|abs}}%</span></p>
</div>
</div>
</div>

Loading…
Cancel
Save