/**
 *
 * @author BOGON
 * @version 1.0
 */

var page = {
    initDatagrid: function () {
        $('#tb').datagrid({
            height: $(window).height() - 10,
            width: '100%',
            url: g.ctx + 'pc/tender/template/rest/fieldList',
            singleSelect: false,
            pagination: false,
            autoHeight: true,
            method: "GET",
            loadMsg: "数据加载中......",
            rownumbers: true,
            fitColumns: false,
            nowrap: true,
            remoteSort: true,
            striped: true,
            columns: [[{
                field: 'ck', checkbox: true
            }, {
                field: 'labelName', title: '字段名称', width: '200', align: 'left'
            }]]
        })
    }, getChecked: function (call) {
        var rows = $('#tb').datagrid('getChecked')
        if (rows.length <= 0) {
            topWin.layer.msg("请至少选择一条数据")
            return;
        }
        call(rows)
    }
}
$(function () {
    page.initDatagrid()
})