define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { var Controller = { index: function () { // 初始化表格参数配置 Table.api.init({ extend: { index_url: 'subscrip/activecollect/index?aid='+Config.aid, table: 'subscrip_user', } }); var table = $("#table"); // 初始化表格 table.bootstrapTable({ url: $.fn.bootstrapTable.defaults.extend.index_url, search:false, commonSearch:false, columns: [ [ {checkbox: true}, {field: 'channel_id', title: __('渠道ID')}, {field: 'channel_name', title: __('渠道名称')}, {field: 'num', title: __('报名成功人数'),operate:false}, {field: 'price', title: __('报名金额'),operate:false}, {field: 'success_num', title: __('完成人数'),operate:false}, {field: 'back_price', title: __('返还金额'),operate:false}, {field: 'state_text', title: __('活动状态'),operate:false}, ] ] }); // 为表格绑定事件 Table.api.bindevent(table); }, add: function () { Controller.api.bindevent(); }, edit: function () { Controller.api.bindevent(); }, channel_show:function(){ // 初始化表格参数配置 Table.api.init({ extend: { index_url: 'subscrip/activecollect/channel_show', table: 'subscrip_user', } }); var table = $("#table"); // 初始化表格 table.bootstrapTable({ url: $.fn.bootstrapTable.defaults.extend.index_url, search:false, commonSearch:false, columns: [ [ {checkbox: true}, {field: 'channel_id', title: __('渠道ID')}, {field: 'active_title', title: __('活动名称')}, {field: 'price', title: __('报名费(元)')}, {field: 'days', title: __('活动周期')}, {field: 'begin_date', title: __('活动开始时间')}, {field: 'num', title: __('报名成功人数'),operate:false}, {field: 'price', title: __('报名金额'),operate:false}, {field: 'success_num', title: __('完成人数'),operate:false}, {field: 'back_price', title: __('返还金额'),operate:false}, {field: 'state_text', title: __('活动状态'),operate:false}, ] ] }); }, api: { bindevent: function () { Form.api.bindevent($("form[role=form]")); } } }; return Controller; });