JQuery Easyui/TopJUI 多表头创建

 

JQuery Easyui/TopJUI 多表头创建

废话不多说,直接贴上代码。

 

html 


<div data-toggle="topjui-layout" data-options="fit:true">
    <div data-options="region:'center',iconCls:'icon-reload',title:'',split:true,border:false">
        <table id="productDg"></table>
    </div>
</div>

js

$(function () {
        $("#productDg").iDatagrid({
            fit: true,
            fitColumns: true,
            url: '../../json/datagrid/product-list.json',
            queryParams: {
                "targetID": '1234'
            }, //请求数据时发送的参数
            iconCls: 'icon-save',
            striped: true,
            nowrap: false,
            singleSelect: true,
            rownumbers: true, //是否加行号
            pagination: true, //是否显式分页
            pageSize: 10,   //页容量,必须和pageList对应起来,否则会报错
            pageNumber: 1, //默认显示第几页
            pageList: [10, 20, 30],//分页中下拉选项的数值
            frozenColumns: [],
            rowStyler: function (index, row) {
                if (index % 2 == 0) {
                    return 'color:red;';
                }
            },
            columns: [
                [
                    {
                        title: "网格员考核测评表", colspan: 11
                    }
                ],
                [
                    {field: "uuid", title: "网格", rowspan: 3, align: "center", width: 100},
                    {field: "name", title: "网格员", rowspan: 3, align: "center", width: 100},
                    {title: "工作纪律", rowspan: 2},
                    {title: "民主互评", rowspan: 2},
                    {title: "志愿者", rowspan: 2},
                    {title: "加分项", colspan: 2},
                    {title: "扣分项", colspan: 2},
                    {title: "总分", rowspan: 2},
                    {title: "平均分", rowspan: 2}
                ],
                [
                    {title: "信息上报", rowspan: 1},
                    {title: "简报采纳", rowspan: 1},
                    {title: "信息上报2", rowspan: 1},
                    {title: "简报采纳2", rowspan: 1}
                ],
                [
                    {field: "code", title: "5分", rowspan: 1, align: "center", width: 100},
                    {field: "spec", title: "5分", rowspan: 1, align: "center", width: 100},
                    {field: "sale_price", title: "6分", rowspan: 1, align: "center", width: 100},
                    {field: "rate", title: "8分", rowspan: 1, align: "center", width: 100},
                    {field: "YW5", title: "5分", rowspan: 1, align: "center", width: 100},
                    {field: "YW6", title: "5分", rowspan: 1, align: "center", width: 100},
                    {field: "YW7", title: "5分", rowspan: 1, align: "center", width: 100},
                    {field: "TOTAL", title: "100分", rowspan: 1, align: "center", width: 100},
                    {field: "AVG", title: "", rowspan: 1, align: "center", width: 100}
                ]
            ]
        });
    });

效果展示:

 

 

  EasyUI中文网:http://www.jeasyui.cn

  TopJUI前端框架:http://www.topjui.com

  TopJUI交流社区:http://ask.topjui.com

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值