You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
2.0 KiB
55 lines
2.0 KiB
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
|
|
|
var Controller = {
|
|
index: function () {
|
|
// 初始化表格参数配置
|
|
Table.api.init({
|
|
extend: {
|
|
index_url: 'user/vipset/index' + location.search,
|
|
add_url: 'user/vipset/edit/ids/1',
|
|
edit_url: 'user/vipset/edit',
|
|
del_url: 'user/vipset/del',
|
|
multi_url: 'user/vipset/multi',
|
|
import_url: 'user/vipset/import',
|
|
table: 'user_vipset',
|
|
}
|
|
});
|
|
|
|
var table = $("#table");
|
|
|
|
// 初始化表格
|
|
table.bootstrapTable({
|
|
url: 'order/yungudong?type=2',
|
|
pk: 'id',
|
|
sortName: 'id',
|
|
columns: [
|
|
[
|
|
{checkbox: true},
|
|
{field: 'id', title: __('Id')},
|
|
{field: 'user_id', title: '用户ID'},
|
|
{field: 'nickname', title: '用户昵称'},
|
|
{field: 'money', title: __('Pay_money'), operate:'BETWEEN'},
|
|
{field: 'createtime', title: '加入时间'},
|
|
{field: 'outtime', title: '到期时间'},
|
|
// {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;
|
|
});
|
|
|