define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { var Controller = { index: function () { // 初始化表格参数配置 Table.api.init({ extend: { index_url: 'picking/index' + location.search, add_url: 'picking/add', edit_url: 'picking/edit', del_url: 'picking/del', multi_url: 'picking/multi', table: 'picking', } }); var table = $("#table"); // 初始化表格 table.bootstrapTable({ url: $.fn.bootstrapTable.defaults.extend.index_url, pk: 'id', sortName: 'id', columns: [ [ {checkbox: true}, {field: 'id', title: __('Id')}, {field: 'picking', title: __('领料单编码')}, {field: 'order', title: __('工单编号')}, {field: 'matter', title: __('原墨名称')}, {field: 'code', title: __('存货编码')}, {field: 'weight', title: __('重量(kg)')}, {field: 'create', title: __('创建时间')}, {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} ] ], showToggle:false, showColumns:false, showExport:false, // search: false, commonSearch: false, //可以控制是否默认显示搜索单表,false则隐藏,默认为false searchFormVisible: false, }); // 为表格绑定事件 Table.api.bindevent(table); }, add: function () { Controller.api.bindevent(); }, edit: function () { Controller.api.bindevent(); }, order: function () { // 初始化表格参数配置 Table.api.init({ extend: { index_url: 'picking/order' + location.search, add_url: 'picking/add', table: 'picking', } }); var table = $("#table"); // 初始化表格 table.bootstrapTable({ url: $.fn.bootstrapTable.defaults.extend.index_url, pk: 'id', sortName: 'Gy0_sbbh', columns: [ [ {checkbox: true,}, {field: 'Gd_gdbh', title: __('工单编号'),}, {field: 'Gd_cpmc', title: __('产品名称'),operate:false}, {field: 'gd_statu', title: __('工单状态'),operate:false}, {field: 'Gy0_sbbh', title: __('机台')}, {field: 'Gy0_sj1', title: __('生产时间安排(开始)'),operate:false}, {field: 'Gy0_sj2', title: __('生产时间安排(结束)'),operate:false}, // {field: 'operate', title: __('操作'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} ] ], showToggle:false, showColumns:false, showExport:false, // search: false, // commonSearch: false, //可以控制是否默认显示搜索单表,false则隐藏,默认为false // searchFormVisible: false, pageSize: 50, }); $("#button").on("click",function(){ var temp=table.bootstrapTable('getSelections'); var ids = ''; for (i=0;i