12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- 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,commissionAmount],
- type: 'bar'
- }
- ],
- tooltip:{
- trigger:'axis',
- axisPointer: {
- type: 'cross',
- label: {
- backgroundColor: '#6a7985'
- }
- }
- }
- };
- myChart.setOption(option);
- },
- add: function () {
- Controller.api.bindevent();
- },
- edit: function () {
- Controller.api.bindevent();
- },
- api: {
- bindevent: function () {
- Form.api.bindevent($("form[role=form]"));
- }
- }
- };
- return Controller;
- });
|