1. 合并 datagrid 的表头信息【基础】,茗洋芳竹尝试Easy API的例子的延伸
部分效果图:
部分代码:
$('#dg').datagrid({
url: getUrl(),
method: 'post',
fitColumns: true,
pagination: isPage,
rownumbers: true,
singleSelect: true,
nowrap: false,
pageList: [15, 30, 45, 60],
columns: [[
{ field: 'InsureNo', title: '投保单号', width: 150, align: 'center', formatter: outputFormatter, rowspan: 2 },
{ field: 'Applicant', title: '投保人', width: 110, align: 'center', rowspan: 2 },
{ field: 'Insurant', title: '被保险人', width: 110, align: 'center', rowspan: 2 },
{ field: 'CompanyName', title: '保险公司', width: 120, align: 'center', rowspan: 2 },
{ field: 'ProductShow', title: '产品类型', width: 150, align: 'center', rowspan: 2 },
{ field: 'GetMoney', title: '保费', align: 'center', width: 90, align: 'center', formatter: MoneyFormatter, rowspan: 2 },
{ field: 'PayeeName', title: '收款方', width: 80, align: 'center', rowspan: 2 },
{ title: '状态', align: 'center', colspan: 5 },
{ field: 'Id', title: '操作', align: 'center', width: 60, rowspan: 2,
formatter: function (value, row, index) {
var a = "<a href='javascript:view(" + value + ")'>查看</a>";
return a;
}
}
], [
{ field: 'OutStateName', title: '出单状态', width: 80, align: 'center', formatter: OutStateFormatter },
{ field: 'ReceiveStateName', title: '收款状态', width: 80, align: 'center', formatter: ReceiveStateFormatter },
{ field: 'PayStateName', title: '付款状态', width: 80, align: 'center', formatter: PayStateFormatter },
{ field: 'SendStateName', title: '寄送状态', width: 80, align: 'center', formatter: SendStateFormatter },
{ field: 'ReceStateName', title: '签收状态', width: 80, align: 'center', formatter: ReceStateFormatter }
]
]
});