<ww:iterator value="budgetRealContractList" id="al">
<li>
<a id='<ww:property value="#al.id"/>' onclick="intoReal('<ww:property value="#al.id"/>')" href="#">
<span id='span<ww:property value="#al.id"/>'><ww:property value="#al.reimburseNumberView"/></span>
</a>
</li>
</ww:iterator>
<ww:iterator value="budgetPaymentList" id="al" status="pro">
<tr class="center">
<td id="payWay${pro.index+1}" style="color:black;width: 20%;">
<script>
var paymentType=<ww:property value="#al.paymentType" />;
if(paymentType=='0'){
$("#payWay"+${pro.index+1}).text('进卡');
}else if(paymentType=='1'){
$("#payWay"+${pro.index+1}).text('银行转账');
}else if(paymentType=='2'){
$("#payWay"+${pro.index+1}).text('现金');
}else{
$("#payWay"+${pro.index+1}).text('');
}
</script>
</td>
</tr>
</ww:iterator>
<ec:table items="budgetRealList" var="budgetReal" action="${pageContext.request.contextPath}/selfbuilding/toApplyBudgetRealList.action"
view="compact" tableId="BudgetRealListAction" styleClass="ContentDetail"style="table-layout:fixed">
<ec:row>
<ec:column width="5%" property="rowcount" cell="rowCount" sortable="false" title="序号" style="text-align: center" />
<ec:column width="13%" property="status" title="状态" sortable="false" style="text-align:center">
<script><!-- 使用script后,即使不添加status=0的判断,也不会显示0 -->
var status='${budgetReal.status}';
if(status=='0'){
document.write('未发布');
}else if(status=='1'){
document.write('${budgetReal.taskName}');
}else if(status=='2'){
document.write("<font color='red'>审批未通过</font>");
}else if(status=='3'){
document.write('审批通过');
}else if(status=='4'){
document.write('已报销');
}
</script>
</ec:column>
</ec:row>
</ec:table>
<!-- 备份 -->
trhtml = $("#trDetail").html();
<!-- 操作,变化id="trDetail"的内容 -->
<!-- 还原备份 trhtml中check在"传参"时失效,需:checked="checked"-->
$("#trDetail").html(trhtml);
转载于:https://www.cnblogs.com/chonghaojie/p/8978896.html