1.前台js实现
$('#report').datagrid({
fit: true,
rownumbers: true,
remoteSort: false,
nowrap: false,
fitColumns: true,
singleSelect: true,
url: '/purchasebillitem/report',
toolbar: '#tool',
columns: [[
{field: 'id', title: 'ID', width: 30, sortable: true},
{field: 'supplierName', title: '供货商', width: 80, align: 'right', align: 'center'},
{field: 'buyerName', title: '采购员', width: 60, align: 'right', align: 'center'},
{field: 'productName', title: '产品', width: 60, align: 'center'},
{field: 'productType', title: '产品类型', width: 60, align: 'center'},
{field: 'vdate', title: '交易时间', width: 80, align: 'center', sortable: