87,996
社区成员




<div class="grid-container" style="width: 950px;">
<div id="grid">
</div>
</div>
</div>
<script type="text/javascript">
var detailUrl = "http://localhost:8080/springmvc/formWidget/view";
var columns = [
{title: '单号', width: 100, dataIndex: 'orderId'},
{title: '子订单号', width: 120, dataIndex: 'subOrderId'},
{title: '收件人', width: 80, dataIndex: 'consignee'},
{title: '电话', width: 120, dataIndex: 'mobilePhone'},
{
title: '状态', width: 100, dataIndex: 'status',renderer: function (value, obj) {
var status = obj.status;
if('失败' == status){
return '<span style="color:red">'+status+'</span>';
}else{
return '<span>'+status+'</span>';
}
}
},
{
title: '操作', width: 100, dataIndex: 'operator', renderer: function (value, obj) {
var id = obj.orderId;
return '<span data-title="查看" data-href="' + detailUrl + '?orderId=' + orderId + '" data-id="' +
orderId + '" class="detail">查看</span>';
}
}
];
</script>
var colArray = Array.prototype.slice.call(columns);
buildTableTitle(colArray);
function buildTableTitle(colArray){
var thead=[];
thead.push("<thead id='columnTitles'><tr>");
for(var i=0;i<colArray.length;i++){
var col = colArray[i];
thead.push("<th>" + col.title + "</th>");
}
thead.push("</tr></thead>");
$("#retListTable").append(thead.join(""));
}
<table class="listTable" id = "retListTable" >
<tbody id = "retListBody" >
</tbody>
</table>