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

var page = {
    initTableDataGrid: function () {
        var columns = [[{
            field: 'id', hidden: true
        }, {
            field: 'state', title: '状态', width: 85, align: 'center', formatter: function (value, row, index) {
                if (value === 0) {
                    return '初始化'
                } else if (value === 1) {
                    return '待确认'
                } else if (value === 2) {
                    return '<span style="color: darkgreen">已确认</span>'
                } else {
                    return '已驳回'
                }
            }
        }, {
            field: 'accountName', title: '工号', width: 95
        }, {
            field: 'username', title: '姓名', width: 100, align: 'left'

        }]];

        page.dataGrid = $('#tb').datagrid({
            iconCls: 'icon-list',
            width: '100%',
            method: "GET",
            url: g.ctx + 'pc/tender/benchmarks/rest/confirmUserList?tenderId=' + tenderId,
            height: $(window).height() - 20,
            singleSelect: false,
            pagination: false,
            loadMsg: "数据加载中......",
            rownumbers: true,
            nowrap: true,
            remoteSort: true,
            striped: true,
            page: 1,
            pageSize: 20,
            columns: columns
        });
    }
}
$(function () {
    page.initTableDataGrid()
})