define(['jquery', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echarts-theme', 'form'], function ($, undefined, Backend, Datatable, Table, Echarts, undefined, form) { var Controller= { mobile_data: function () { $('input[name="date_type"]').change(function (){ }) Controller.api.bindevent() }, order_data: function () { $('button[type="submit"]').click(function (){ layer.load(1,{ shade:.3 }) }) Controller.api.bindevent() }, api: { bindevent: function () { form.events.daterangepicker('form') } }, proxy_data: function () { // 初始化表格参数配置 Table.api.init({ extend: { index_url: 'data_view/proxy_data', } }); var table = $("#table"); // 初始化表格 table.bootstrapTable({ url: $.fn.bootstrapTable.defaults.extend.index_url, columns: [ [ {field: 'id', title: 'ID'}, {field: 'id', title: '供应商ID'}, {field: 'nickname', title: __('供应商名称')}, {field: 'mobile_count', title: __('号码数量')}, {field: 'mobile_saled_count', title: __('号码消耗量')}, ] ], search:false, showToggle: false, showExport: true, commonSearch: false, }); // 为表格绑定事件 Table.api.bindevent(table); }, sub_data: function () { // 初始化表格参数配置 Table.api.init({ extend: { index_url: 'data_view/sub_data', } }); var table = $("#table"); // 初始化表格 table.bootstrapTable({ url: $.fn.bootstrapTable.defaults.extend.index_url, columns: [ [ {field: 'id', title: 'ID'}, {field: 'nickname', title: __('代理商名称')}, {field: 'order_count', title: __('订单数量')}, {field: 'sell_amount', title: __('销售金额')}, {field: 'profit_amount', title: __('销售利润')}, ] ], search:false, showToggle: false, showExport: false, commonSearch: false, }); // 为表格绑定事件 Table.api.bindevent(table); }, }; return Controller });