1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
- var Controller = {
- index: function () {
-
- Table.api.init({
- extend: {
- index_url: 'agent/admin/index',
-
-
-
-
- }
- });
- var table = $("#table");
-
- table.on('post-body.bs.table', function (e, json) {
- $("tbody tr[data-index]", this).each(function () {
- if (parseInt($("td:eq(1)", this).text()) == Config.admin.id) {
- $("input[type=checkbox]", this).prop("disabled", true);
- }
- });
- });
-
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.index_url,
- searchFormVisible: true,
- searchFormTemplate: 'customformtpl',
- columns: [
- [
-
- {field: 'id', title: '平台ID'},
- {field: 'username', title: __('Username')},
- {field: 'nickname', title: __('Nickname')},
-
-
-
-
- {field: 'week_sum_money', title: __('本周流水')},
- {field: 'extend_name', title: __('推广等级')},
- {field: 'extra_reward', title: __('额外分成%')},
- {field: 'extra_moeny', title: __('分成金额')},
- {field: 'status', title: __("Status"), searchList: {"normal":__('Normal'),"hidden":__('Hidden')}, formatter: Table.api.formatter.status},
-
- {field: 'createtime', title: __('创建时间'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange'},
-
- ]
- ]
- });
-
- Table.api.bindevent(table);
- },
- add: function () {
- Form.api.bindevent($("form[role=form]"));
- },
- edit: function () {
- Form.api.bindevent($("form[role=form]"));
- }
- };
- return Controller;
- });
|