57 lines
2.2 KiB
JavaScript
57 lines
2.2 KiB
JavaScript
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
|
|
|
var Controller = {
|
|
presales: function () {
|
|
// 初始化表格参数配置
|
|
Table.api.init({
|
|
extend: {
|
|
index_url: 'performance/presales' + location.search,
|
|
}
|
|
});
|
|
var table = $("#table");
|
|
// 初始化表格
|
|
table.bootstrapTable({
|
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
|
pk: 'id',
|
|
sortName: 'id',
|
|
search: false,
|
|
commonSearch:true,
|
|
visible: false,
|
|
showToggle: false,
|
|
showColumns: false,
|
|
showExport: true,
|
|
searchFormVisible:true,
|
|
columns: [
|
|
[
|
|
{checkbox: true},
|
|
{field: 'id', title: __('Id')},
|
|
{field: 'nickname', title: '名称', operate: 'LIKE'},
|
|
{field: 'mobile', title: '号码', operate: 'LIKE'},
|
|
{field: 'total', title: '派单数',searchable:false},
|
|
{field: 'money', title: '派单利润',searchable:false},
|
|
{field: 'rate', title: '提成比例',searchable:false},
|
|
{field: 'my_money', title: '提成',searchable:false},
|
|
{field: 'daterange', title: __('时间筛选'), addclass:'datetimerange',
|
|
autocomplete:false,
|
|
operate: "RANGE",
|
|
datetimeFormat: "YYYY-MM-DD",
|
|
data:'autocomplete="off" data-local={"format":"YYYY-MM-DD"}',
|
|
visible:false,
|
|
defaultValue: Config.default_daterange
|
|
},
|
|
]
|
|
]
|
|
});
|
|
|
|
// 为表格绑定事件
|
|
Table.api.bindevent(table);
|
|
},
|
|
api: {
|
|
bindevent: function () {
|
|
Form.api.bindevent($("form[role=form]"));
|
|
}
|
|
}
|
|
};
|
|
return Controller;
|
|
});
|