$(document).ready(function() {
$("tr[id*='child']").css("display","none");
$('tr.parent').css("cursor","pointer").attr("title","点击这里展开/关闭").click(function(){
$(this).siblings('.child-'+this.id).toggle();
});
});
<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
<thead>
<tr>
<th> 选择 </th>
<th class="sort-column remarks">临时凭证号</th>
<th class="sort-column remarks">费用类型</th>
<th class="sort-column remarks">费用编号</th>
<th class="sort-column remarks">费用归属公司</th>
<th class="sort-column remarks">流程名称</th>
<th class="sort-column remarks">申请人</th>
<th class="sort-column remarks">申请时间</th>
<th class="sort-column remarks">报销金额</th>
</tr>
</thead>
<tbody>
<c:forEach items="${page.list}" var="handleReverse">
<c:choose>
<c:when test="${handleReverse.judge}">
<tr class="parent" id="${handleReverse.processNo}">//父
<td><input type="radio" name="payRefNo" value="${handleReverse.payRefNo}" id="${handleReverse.id}" /></td>
</c:when>
<c:otherwise>
<tr class="child-${handleReverse.processNo}" id="child">//子
<td></td>
</c:otherwise>
</c:choose>
<td>${handleReverse.voucherNo}</td>
<td>${handleReverse.costType}</td>
<td>${handleReverse.processNo}</td>
<td>${companyName}</td>
<td>${handleReverse.processDefName}</td>
<td>${handleReverse.applyUserName}</td>
<td><fmt:formatDate value="${handleReverse.payRefDate}" pattern="yyyy-MM-dd" /></td>
<td>
<input type="hidden" name="centerCode" value="${handleReverse.centerCode}" />
<input type="hidden" name="branchCode" value="${handleReverse.branchCode}" />
<p style="text-align:right"><fmt:formatNumber value="${handleReverse.realPayCost}" pattern=".00"/></p>
</td>
</tr>
</c:forEach>
</tbody>
</table>