define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { var Controller = { index: function () { // 初始化表格参数配置 Table.api.init({ extend: { index_url: 'user/orders/index' + location.search+'&ids='+Config.ids, table: 'product_order', } }); var table = $("#table"); // 初始化表格 table.bootstrapTable({ url: $.fn.bootstrapTable.defaults.extend.index_url, pk: 'id', sortName: 'id', columns: [ [ {checkbox: true}, {field: 'product_id', title: __('产品Id')}, {field: 'products.zh_name', title: __('产品名称'), operate: 'LIKE'}, {field: 'total_num', title: __('持有数量')}, ] ] }); // 为表格绑定事件 Table.api.bindevent(table); }, api: { bindevent: function () { Form.api.bindevent($("form[role=form]")); } } }; return Controller; });