define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { var Controller = { index: function () { // 初始化表格参数配置 Table.api.init({ extend: { index_url: 'university_event_apply_info/index' + location.search, // add_url: 'university_event_apply_info/add', // edit_url: 'university_event_apply_info/edit', del_url: 'university_event_apply_info/del', multi_url: 'university_event_apply_info/multi', import_url: 'university_event_apply_info/import', table: 'university_event_apply_info', } }); var table = $("#table"); // 初始化表格 table.bootstrapTable({ url: $.fn.bootstrapTable.defaults.extend.index_url, pk: 'id', sortName: 'id', showToggle: false,// 禁用视图切换 search:false,// 禁用默认搜索框 columns: [ [ {checkbox: true}, // {field: 'id', title: __('Id')}, // {field: 'user_id', title: __('User_id')}, // {field: 'event_id', title: __('Event_id')}, {field: 'order_no', title: __('Order_no'), operate: 'LIKE'}, {field: 'name', title: __('Name'), operate: 'LIKE'}, {field: 'phone', title: __('Phone'), operate: 'LIKE'}, // {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} ] ] }); // 为表格绑定事件 Table.api.bindevent(table); }, add: function () { Controller.api.bindevent(); }, edit: function () { Controller.api.bindevent(); }, api: { bindevent: function () { Form.api.bindevent($("form[role=form]")); } } }; return Controller; });