|  |  | 
 |  |  | var myColumns=[]; | 
 |  |  | $(function(){ | 
 |  |  |    getColumns(); | 
 |  |  | 	 | 
 |  |  |  | 
 |  |  |    $('#test-table').bootstrapTable('destroy'); | 
 |  |  |    $('#test-table').bootstrapTable({ | 
 |  |  |       method : 'GET', | 
 |  |  | 
 |  |  |       clickToSelect: true, // 单击行即可以选中 | 
 |  |  |       search : false,//显示搜素表单 | 
 |  |  |       silent : true, //刷新事件必须设置 | 
 |  |  |       sidePagination : "server", //表示服务端请求   | 
 |  |  |       columns ://myColumns,  | 
 |  |  |       sidePagination : "server", //表示服务端请求 | 
 |  |  |       columns ://myColumns, | 
 |  |  |       [{ | 
 |  |  |          field : "lgnum", | 
 |  |  |          title : "仓库号", | 
 |  |  | 
 |  |  |          field : "tapos", | 
 |  |  |          title : "行项目", | 
 |  |  |          align : "center", | 
 |  |  |          valign : "middle",		 | 
 |  |  |          valign : "middle", | 
 |  |  |       }, { | 
 |  |  |          field : "matnr", | 
 |  |  |          title : "物料", | 
 |  |  | 
 |  |  | //      onCheck:function(row){ | 
 |  |  | ////         alert(row.menu_name); | 
 |  |  | //      },onUncheck:function(row){ | 
 |  |  | ////          alert('取消选中');        | 
 |  |  | ////          alert('取消选中'); | 
 |  |  | //        }, | 
 |  |  |         onClickRow:function (row,$element) { | 
 |  |  |             $('.info').removeClass('info'); | 
 |  |  |             $($element).addClass('info'); | 
 |  |  |         } | 
 |  |  |    }); | 
 |  |  | 	 | 
 |  |  | });  | 
 |  |  |  | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | function operateFormatter(value, row, index) { | 
 |  |  |    return [ | 
 |  |  | 
 |  |  | //               valign : "middle" | 
 |  |  | //              }); | 
 |  |  |             myColumns.push({ | 
 |  |  |                title: '序号',   | 
 |  |  |                 field: '',   | 
 |  |  |                 formatter: function (value, row, index) {   | 
 |  |  |                     return index+1;   | 
 |  |  |                title: '序号', | 
 |  |  |                 field: '', | 
 |  |  |                 formatter: function (value, row, index) { | 
 |  |  |                     return index+1; | 
 |  |  |                 } | 
 |  |  |               }); | 
 |  |  | //            myColumns.push({ | 
 |  |  | 
 |  |  | //               align : "left", | 
 |  |  | //               valign : "middle" | 
 |  |  | //              }); | 
 |  |  | 				 | 
 |  |  |  | 
 |  |  | //            myColumns.push({ | 
 |  |  | //               field : "io_status", | 
 |  |  | //               title : "状态", | 
 |  |  | 
 |  |  |    $("#addDlg").modal("hide"); | 
 |  |  |    $("#info").text(""); | 
 |  |  |    $("#infos").text(""); | 
 |  |  | 	 | 
 |  |  |  | 
 |  |  |    $('#myform').data('bootstrapValidator', null); | 
 |  |  |    $("#addForm").data('bootstrapValidator',null); | 
 |  |  |    formValidator(); | 
 |  |  |    //$('#mydlg').data('bootstrapValidator').resetForm(true); | 
 |  |  |    $("input[type=reset]").trigger("click"); | 
 |  |  | } | 
 |  |  | } | 
 |  |  |  | 
 |  |  | //导出 | 
 |  |  | function ExportExcel(){ | 
 |  |  |    if(confirm("确认导出excel?")){ | 
 |  |  |       var url = "work/exportWaitPakOutLog.action?"; | 
 |  |  |       url += "matnr=" + $("#search_sheet_no").val(); | 
 |  |  |       url += "&maktx=" + $("#search_mat_no").val(); | 
 |  |  |       url += "&begin_date=" + $("#begin_date").val(); | 
 |  |  |       url += "&end_date=" + $("#end_date").val(); | 
 |  |  |       location.href=url; | 
 |  |  |    }else{ | 
 |  |  |       return false; | 
 |  |  |    } | 
 |  |  | } |