如何用easyui+JAVA 实现动态拼凑datagrid表格
1个回答
展开全部
$('#list').datagrid({
view : detailview,
detailFormatter : function(index, row) {
return '<div style="padding:2px"><table class="ddv"></table></div>';
},
onExpandRow : function(index, row) {
var ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
ddv.datagrid({
url : '${ctx}/deliveryOrder/list?queryFrom=ORDER_VIEW&isNeedWaiter=Y&moid='+row.id
,
queryParams:{orderStrCol:$('#orderStrCol').val(),orderStrOrder:$('#orderStrOrder').val()},
fitColumns : true,
nowrap:false,
singleSelect : true,
rownumbers : true,
pagination : true,
pagePosition : 'bottom',
pageSize : 50,
pageList : [ 30, 50, 100 ],
idField : 'id',
loadMsg : '',
height : 'auto',
columns : [ [ {
field : 'id',
title : '发货单号',
width : 80,
align : 'center',
formatter:OrderIdColFormatNewSUB
}, {
field : 'warehouseName',
title : '发货仓',
width : 100,
align : 'left'
}, {
field : 'logisticName',
title : '快递公司',
width : 200,
align : 'left'
}, {
field : 'expressBill',
title : '快递单号',
width : 200,
align : 'left',
}, {
field : 'deliveryStatus',
title : '配送状态',
width : 200,
align : 'left',
formatter:dashOrderDeliveryStatusFormat
} , {
field : 'pushStatusMulti',
title : '推送拦截状态',
width : 200,
align : 'left',
}] ],
onResize : function() {
$('#list')
.datagrid(
'fixDetailRowHeight',
index);
},
onLoadSuccess : function() {
$(this).datagrid('tooltip');
setTimeout(
function() {
$('#list').datagrid('fixDetailRowHeight',index);
}, 0);
}
});
$('#list').datagrid('fixDetailRowHeight',index);
},
title: '<font color=red>注: 原始订单号红色字体显示表示该内部订单有合并原始订单</font>',
url: '${ctx}/deliveryOrder/listOld?queryFrom=ORDER_VIEW&isNeedWaiter=Y',
striped: true,
rownumbers: true,
fitColumns:true,
nowrap:false,
height: fixHeight(0.94),
pagination: true,
singleSelect: true,
pagePosition: 'bottom',
pageSize: 30,
pageList: [30, 50, 100],
idField: 'id',
queryParams: $("#searchForm").serializeObject(),
onBeforeLoad : function (param){
if(i!=true){
return false;
}
},
onLoadSuccess: function (data) {
$(this).datagrid('tooltip');
}
});
view : detailview,
detailFormatter : function(index, row) {
return '<div style="padding:2px"><table class="ddv"></table></div>';
},
onExpandRow : function(index, row) {
var ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
ddv.datagrid({
url : '${ctx}/deliveryOrder/list?queryFrom=ORDER_VIEW&isNeedWaiter=Y&moid='+row.id
,
queryParams:{orderStrCol:$('#orderStrCol').val(),orderStrOrder:$('#orderStrOrder').val()},
fitColumns : true,
nowrap:false,
singleSelect : true,
rownumbers : true,
pagination : true,
pagePosition : 'bottom',
pageSize : 50,
pageList : [ 30, 50, 100 ],
idField : 'id',
loadMsg : '',
height : 'auto',
columns : [ [ {
field : 'id',
title : '发货单号',
width : 80,
align : 'center',
formatter:OrderIdColFormatNewSUB
}, {
field : 'warehouseName',
title : '发货仓',
width : 100,
align : 'left'
}, {
field : 'logisticName',
title : '快递公司',
width : 200,
align : 'left'
}, {
field : 'expressBill',
title : '快递单号',
width : 200,
align : 'left',
}, {
field : 'deliveryStatus',
title : '配送状态',
width : 200,
align : 'left',
formatter:dashOrderDeliveryStatusFormat
} , {
field : 'pushStatusMulti',
title : '推送拦截状态',
width : 200,
align : 'left',
}] ],
onResize : function() {
$('#list')
.datagrid(
'fixDetailRowHeight',
index);
},
onLoadSuccess : function() {
$(this).datagrid('tooltip');
setTimeout(
function() {
$('#list').datagrid('fixDetailRowHeight',index);
}, 0);
}
});
$('#list').datagrid('fixDetailRowHeight',index);
},
title: '<font color=red>注: 原始订单号红色字体显示表示该内部订单有合并原始订单</font>',
url: '${ctx}/deliveryOrder/listOld?queryFrom=ORDER_VIEW&isNeedWaiter=Y',
striped: true,
rownumbers: true,
fitColumns:true,
nowrap:false,
height: fixHeight(0.94),
pagination: true,
singleSelect: true,
pagePosition: 'bottom',
pageSize: 30,
pageList: [30, 50, 100],
idField: 'id',
queryParams: $("#searchForm").serializeObject(),
onBeforeLoad : function (param){
if(i!=true){
return false;
}
},
onLoadSuccess: function (data) {
$(this).datagrid('tooltip');
}
});
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询