|
@@ -1,8 +1,34 @@
|
|
|
-define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
|
|
+define(['jquery', 'bootstrap', 'backend', 'table', 'form','echarts', 'echarts-theme'], function ($, undefined, Backend, Table, Form,Echarts) {
|
|
|
|
|
|
var Controller = {
|
|
|
amount_statistics: function () {
|
|
|
Form.events.daterangepicker($('.form'))
|
|
|
+ var myChart = Echarts.init(document.getElementById('amountShow'));
|
|
|
+ var option = {
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ data: ['订单金额','退款金额','销售额']
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value'
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ data: [payAmount,refundAmount,sellAmount],
|
|
|
+ type: 'bar'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ tooltip:{
|
|
|
+ trigger:'axis',
|
|
|
+ axisPointer: {
|
|
|
+ type: 'cross',
|
|
|
+ label: {
|
|
|
+ backgroundColor: '#6a7985'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ myChart.setOption(option);
|
|
|
},
|
|
|
add: function () {
|
|
|
Controller.api.bindevent();
|