define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { var Controller = { index: function () { // 初始化表格参数配置 Table.api.init({ extend: { index_url: 'cms/author/manuscript/index' + location.search, add_url: 'cms/author/manuscript/add', edit_url: 'cms/author/manuscript/edit', del_url: 'cms/author/manuscript/del', multi_url: 'cms/author/manuscript/multi', import_url: 'cms/author/manuscript/import', table: 'cms_author_manuscript', } }); 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: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, {field: 'manuscript_zip', title: __('Manuscript_zip'), operate: 'LIKE'}, {field: 'manuscript_pdf', title: __('Manuscript_pdf'), operate: 'LIKE'}, {field: 'cover_letter', title: __('Cover_letter'), operate: 'LIKE'}, {field: 'graphical_abstract', title: __('Graphical_abstract'), operate: 'LIKE'}, {field: 'non_material', title: __('Non_material'), operate: 'LIKE'}, {field: 'is_copyright', title: __('Is_copyright'), searchList: {"normal":__('Normal'),"hidden":__('Hidden')}, formatter: Table.api.formatter.normal}, {field: 'copyright_files', title: __('Copyright_files'), operate: false, formatter: Table.api.formatter.files}, {field: 'journal', title: __('Journal'), operate: 'LIKE'}, {field: 'article_type', title: __('Article_type'), operate: 'LIKE'}, {field: 'title', title: __('Title'), operate: 'LIKE'}, {field: 'abstract', title: __('Abstract'), operate: 'LIKE'}, {field: 'keywords', title: __('Keywords'), operate: 'LIKE'}, {field: 'number_page', title: __('Number_page'), operate: 'LIKE'}, {field: 'is_funding', title: __('Is_funding'), searchList: {"normal":__('Normal'),"hidden":__('Hidden')}, formatter: Table.api.formatter.normal}, {field: 'funding_content', title: __('Funding_content'), operate: 'LIKE'}, {field: 'is_interest', title: __('Is_interest'), searchList: {"normal":__('Normal'),"hidden":__('Hidden')}, formatter: Table.api.formatter.normal}, {field: 'interest_content', title: __('Interest_content'), operate: 'LIKE'}, {field: 'statement_type', title: __('Statement_type'), searchList: {"normal":__('Normal'),"hidden":__('Hidden')}, formatter: Table.api.formatter.normal}, {field: 'article_one', title: __('Article_one'), operate: 'LIKE'}, {field: 'article_two', title: __('Article_two'), operate: 'LIKE'}, {field: 'article_three', title: __('Article_three'), operate: 'LIKE'}, {field: 'status', title: __('Status'), searchList: {"100":__('Status 100')}, formatter: Table.api.formatter.status}, {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, {field: 'country', title: __('Country'), operate: 'LIKE'}, {field: 'affiliation', title: __('Affiliation'), operate: 'LIKE'}, {field: 'name', title: __('Name'), operate: 'LIKE'}, {field: 'invoice_email', title: __('Invoice_email'), operate: 'LIKE'}, {field: 'order_email', title: __('Order_email'), operate: 'LIKE'}, {field: 'address', title: __('Address'), operate: 'LIKE'}, {field: 'zip_code', title: __('Zip_code'), operate: 'LIKE'}, {field: 'city', title: __('City'), operate: 'LIKE'}, {field: 'telephone', title: __('Telephone'), operate: 'LIKE'}, {field: 'fax', title: __('Fax'), operate: 'LIKE'}, {field: 'vat', title: __('Vat'), operate: 'LIKE'}, {field: 'editor_ids', title: __('Editor_ids'), operate: 'LIKE'}, {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} ] ] }); // 为表格绑定事件 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; });