123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
- var Controller = {
- index: function () {
- // 初始化表格参数配置
- Table.api.init({
- extend: {
- index_url: 'guideappcollect/index',
- table: 'guideappcollect',
- }
- });
- var table = $("#table");
- if(Config.admin_groupid != 4){
- // 初始化表格
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.index_url,
- pk: 'id',
- sortOrder:'',
- search: false,
- commonSearch:false,
- columns: [
- [
- {
- field: 'createdate',
- title: __('createdate'),
- type: 'datetime',
- operate:false,
- addclass: 'datetimerange'
- },
- {
- field: 'uv_view_total',
- title: __('导端曝光UV'),
- },
- {
- field: 'uv_total',
- title: __('导端点击UV'),
- type: 'datetime',
- operate:false,
- addclass: 'datetimerange'
- },
- {
- field: 'click_rate',
- title: __('点击率'),
- type: 'datetime',
- operate:false,
- addclass: 'datetimerange'
- },
- {
- field: 'import_num',
- title: __('导端用户数'),
- type: 'datetime',
- operate:false,
- addclass: 'datetimerange'
- },
- {
- field: 'importapp_rate',
- title: __('导端率'),
- type: 'datetime',
- operate:false,
- addclass: 'datetimerange'
- },
- {
- field: 'recharge_user_num',
- title: __('充值人数'),
- },
- {
- field: 'recharge_money',
- title: __('充值金额'),
- }
- ]
- ]
- });
- }else{
- // 初始化表格
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.index_url,
- pk: 'id',
- sortOrder:'',
- search: false,
- commonSearch:false,
- columns: [
- [
- {
- field: 'createdate',
- title: __('createdate'),
- type: 'datetime',
- operate:false,
- addclass: 'datetimerange'
- },
- {
- field: 'recharge_user_num',
- title: __('充值人数'),
- },
- {
- field: 'recharge_money',
- title: __('充值金额'),
- }
- ]
- ]
- });
- }
- // 为表格绑定事件
- Table.api.bindevent(table);
- Controller.api.bindevent();
- },
- api: {
- bindevent: function () {
- //Form.api.bindevent($("form[role=form]"));
- }
- }
- };
- return Controller;
- });
|