easyui datagrid合并单元格

<div class="iteye-blog-content-contain" style="font-size: 14px;">
<pre name="code" class="js">$('#listTable').datagrid({
queryParams:map,
        border : true,
        nowrap : true,
        striped : true,
        fit:true,
        fitColumns:true,
        enableHeaderClickMenu:false,
        enableHeaderContextMenu:false,
        singleSelect: false,
        rownumbers:true,
        idField: 'id',
        url:'schoolsReport/schools_report_info_list.action',
        onLoadSuccess: function (data) {
$(this).datagrid("fixRownumber");
$(this).datagrid('clearSelections');
$(this).datagrid('clearChecked');
},
        columns:[[
        {
            title:'&lt;b&gt;表2:全国旅游业职工教育培训情况年报表&lt;/b&gt;',
            halign:'center',
            colspan:30
            }
        ],[{
        title:'项目',
            align:'left',
            colspan:2,
            rowspan:2
            },
            {
            title:'总计(人次)',
            align:'left',
            width:50,
            halign:'center',
            rowspan:2
            },
            {
            title:'旅游饭店(人次)',
            width:600,
colspan:6
            },
            {
            title:'旅行社(人次)',
            width:500,
colspan:5
            },
            {
            title:'旅游区(点)(人次)',
            width:600,
colspan:6
            },
            {
            title:'旅游车船公司(人次)',
            width:600,
colspan:5
            },
            {
            title:'旅游政部门(人次)',
            width:400,
colspan:4
            },
            {
            title:'其他人员',
            width:100,
rowspan:2
            }
            ],[{
            title:'小计',
            width:50,
            },
            {
            title:'正副总经理',
            width:50,
            },
            {
            title:'部门经理',
            width:50,
            },
            {
            title:'主管',
            width:50,
            },
            {
            title:'服务员',
            width:50,
            },
            {
            title:'其他人员',
            width:50,
            },
            {
            title:'小计',
            width:50, 
            },
            {
            title:'正副总经理',
            width:50, 
            },
            {
            title:'部门经理',
            width:50, 
            },
            {
            title:'导游',
            width:50, 
            },
            {
            title:'其他人员',
            width:50, 
            },
            {
            title:'小计',
            width:50, 
            },
            {
            title:'正副总经理',
            width:50, 
            },
            {
            title:'部门经理',
            width:50, 
            },
            {
            title:'讲解员',
            width:50, 
            },
            {
            title:'服务员',
            width:50, 
            },
            {
            title:'其他人员',
            width:50, 
            },
            {
            title:'小计',
            width:50, 
            },
            {
            title:'正副总经理',
            width:50, 
            },
            {
            title:'部门经理',
            width:50, 
            },
            {
            title:'司机',
            width:50, 
            },
            {
            title:'其他人员',
            width:50, 
            },
            {
            title:'小计',
            width:50, 
            },
            {
            title:'局处级干部',
            width:50, 
            },
            {
            title:'科级干部',
            width:50, 
            },
            {
            title:'其他人员',
            width:50, 
            }
        ],[{
            field:'name1',
            title:'甲',
            width:50,
            align:'left',
            halign:'center'
            },
            {
            field:'name2',
            title:'乙',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff01',
            title:'1',
            width:50,
            halign:'center'
            },{
            field:'ff02',
            title:'2',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff03',
            title:'3',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff04',
            title:'4',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff05',
            title:'5',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff06',
            title:'6',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff07',
            title:'7',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff08',
            title:'8',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff09',
            title:'9',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff10',
            title:'10',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff11',
            title:'11',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff12',
            title:'12',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff13',
            title:'13',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff14',
            title:'14',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff15',
            title:'15',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff16',
            title:'16',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff17',
            title:'17',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff18',
            title:'18',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff19',
            title:'19',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff20',
            title:'20',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff21',
            title:'21',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff22',
            title:'22',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff23',
            title:'23',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff24',
            title:'24',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff25',
            title:'25',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff26',
            title:'26',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff27',
            title:'27',
            width:50,
            align:'right',
            halign:'center'
            },{
            field:'ff28',
            title:'28',
            width:50,
            align:'right',
            halign:'center'
            }]]
    });</pre>
<p> </p>
<p>效果图:</p>
<p><br><img src="http://dl2.iteye.com/upload/attachment/0114/4522/fc6d26ba-b754-30bf-8ba5-5a8d983a8a25.png" alt=""><br> </p>
<p> </p>
</div>

猜你喜欢

转载自javaxxxd.iteye.com/blog/2269742