js custom tag library (passing multiple parameters to the background controller)

 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 
<html  >
<head>
<%@ include file="../head.jsp"%>
<script type="text/javascript">

//delete
function toDel(){

var ids = getCheckBoxVal ();
if(ids.length == 0){
alertF("No data selected");
return;
}

alertConfirm("Confirm to delete?",function(){
$.post("${basePath}/manage/shouldPayment/doDel.shtml?ids="+ids,function(){
//window.location.reload();
$('.btn-refresh').click();
});
},null);
 
  }
//edit modification
function toEdit(){

var ids = getCheckBoxVal ();
if(ids.length == 0){
alertF("No data selected");
return;

}else  if(ids.length > 1){
alertF("Only one record can be selected");
return;
}  
var paymentId=$(":checkbox:checked").val();
var costName=$(":checkbox:checked").attr("costName");
alert_form('修改ShouldPayment ','${basePath}/manage/shouldPayment/toEdit.shtml?objId='+paymentId+'&costName='+costName,800,600)

 

</script>
<title>ShouldPayment列表</title>
</head>
<body>
<form action="${basePath}/manage/shouldPayment/list.shtml" method="post" id="sform">
<div class="page-content clearfix">
  <div class="administrator">
       <div class="d_Confirm_Order_style"> 
    
      <!--List-->
        <div class="table_menu_list">
    <table class="table table-striped table-bordered table-hover menuTable">
<thead> 
<tr>
<th width="5%"> <input type="checkbox" name="allData"/>  </th> 
<th width="4%">栋号</th>
<th width="5%">单元号</th>
<th width="5%">Room number</th>
<th width="5%">金额</th>
<th width="8%">Charge start date</th>
<th width="8%">Charge Deadline</th>
<th width="8%">Payment Deadline</th>
<th width="7%">Payment Type</th>
<th width="5%">月数</th>
<th width="5%">费率</th>
<th width="5%">Building area</th>
<th width="6%">Payment Status</th>
<th width="5%">Biller</th>
<th width="8%">Payment time</th>
<th width="8%">Ticketing time</th>
</tr>
</thead>
<tbody> 
<c:forEach items="${result.data}" var="item" varStatus="s">
<tr class="tr_change">
<td> <input type="checkbox" name="singleData" value="${item.paymentid}" costName="${item.costName}"/>
 
</td>
  <td> ${item.buildNo} </td>
<td> ${item.unitNo} </td>
<td> ${item.roomNo} </td>
<td> ${item.account} </td>
<td> ${item.begindate} </td>
<td> ${item.enddate} </td>
<td> ${item.lastdate} </td>
<td> ${item.costName} </td>
<td> ${item.months} </td>
<td> ${item.costrate} </td>
<td> ${item.buildarea} </td>
<td>
<c:if test="${item.paymentstatus=='0'}">未缴费</c:if>
<c:if test="${item.paymentstatus=='1'}">已缴费</c:if>
<c:if test="${item.paymentstatus=='2'}">退费</c:if></td>
<td> ${item.recipient} </td>
<td> ${item.paymentdate} </td>
<td> ${item.printbilldate} </td>

</tr>   


</c:forEach> 
</tbody>
</table>
    <c:if test="${fn:length(result.data)==0}"> 
I am sorry! No relevant data was queried! 
</c:if>
<sm:kkpager page="${result.page}" />
        </div>
       </div>
  </div>
</div>
</form>
</body>
</html>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325607941&siteId=291194637