1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
- var Controller = {
- index: function () {
-
- Table.api.init({
- extend: {
- index_url: 'viplog/index' + location.search,
-
-
-
-
-
- table: 'vip_log',
- }
- });
- 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: 'user_id', title: __('User_id')},
- {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
- {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
- {field: 'vip_id', title: __('Vip_id')},
- {field: 'title', title: __('Title'), operate: 'LIKE'},
- {field: 'level', title: __('Level'), operate: 'LIKE'},
- {field: 'growthvalue', title: __('Growthvalue')},
- {field: 'free', title: __('Free')},
- {field: 'price', title: __('Price'), operate: 'LIKE'},
- {field: 'endtime', title: __('Endtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
- {field: 'vipdiscount', title: __('Vipdiscount')},
- {field: 'birthdiscount', title: __('Birthdiscount')},
- {field: 'manypeople', title: __('Manypeople')},
- {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
-
-
-
- ]
- ]
- });
-
- 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;
- });
|