add:俱乐部成员
This commit is contained in:
63
public/assets/js/backend/zy/menber.js
Normal file
63
public/assets/js/backend/zy/menber.js
Normal file
@@ -0,0 +1,63 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'zy/menber/index' + location.search,
|
||||
add_url: 'zy/menber/add',
|
||||
edit_url: 'zy/menber/edit',
|
||||
del_url: 'zy/menber/del',
|
||||
multi_url: 'zy/menber/multi',
|
||||
import_url: 'zy/menber/import',
|
||||
table: 'zy_menber',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
fixedRightNumber: 1,
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'club_id', title: __('Club_id')},
|
||||
{field: 'user_id', title: __('User_id')},
|
||||
{field: 'role', title: __('Role')},
|
||||
{field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'activity', title: __('Activity')},
|
||||
{field: 'game', title: __('Game')},
|
||||
{field: 'plane', title: __('Plane')},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'club.name', title: __('Club.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'user.nickname', title: __('User.nickname'), 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;
|
||||
});
|
||||
Reference in New Issue
Block a user