| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
- var Controller = {
- index: function () {
- // 初始化表格参数配置
- Table.api.init({
- extend: {
- index_url: 'product/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',
- fixedColumns: false,
-
- columns: [
- [
- {checkbox: true},
- {field: 'user_id', title: __('用户Id'), operate: 'LIKE'},
- {field: 'users.address', title: __('用户地址'), operate: 'LIKE'},
- {field: 'total_num', title: __('持有数量'), operate: false},
-
-
- ]
- ]
- });
- // 为表格绑定事件
- Table.api.bindevent(table);
- },
-
- api: {
- bindevent: function () {
- Form.api.bindevent($("form[role=form]"));
- }
- }
- };
- return Controller;
- });
|