[#if info?? && info.datas?? && info.datas?size>0]
|
<table class="display_form common_list_table">
|
<tr class="title">
|
<td width="5%"><input type="checkbox" class="checkAll" /></td>
|
<td width="5%">序号</td>
|
<td width="20%">${Constants.CUSTOMER_CONSTANTS}名称</td>
|
<td width="15%">${Constants.CUSTOMER_CONSTANTS}简称</td>
|
<td width="14%">手机</td>
|
<td width="16%">开通时间</td>
|
<td width="10%">状态</td>
|
</tr>
|
[#list info.datas as cus]
|
<tr>
|
<td><input type="checkbox" class="check" id="${cus.ID}" value="${cus.CUSTOMER_NAME}" [#if cus.check == 1]checked[/#if]/></td>
|
<td>${info.rowNum+cus_index+1}</td>
|
<td>${cus.CUSTOMER_NAME}</td>
|
<td>${cus.SHORT_NAME}</td>
|
<td>${cus.PHONE}</td>
|
<td>${DateUtil.format("yyyy-MM-dd HH:mm:ss",cus.CREATE_TIME)}</td>
|
<td>[#if cus.CUSTOMER_STATE == 1]启用[#else]禁用[/#if]</td>
|
</tr>
|
[/#list]
|
</table>
|
[#else]
|
<div class="loadpos"><span class="nodata"></span></div>
|
[/#if]
|
<script type="text/javascript">
|
|
$(function() {
|
$(".checkAll").on("click",function() {
|
$('.check').attr('checked',$(this).prop('checked'));
|
var checkTree = $(".check");
|
var alreadySelect = "";
|
if($(this).is(":checked")){
|
checkTree.each(function() {
|
var slId = $(this).attr("id");
|
var sel = $("."+slId).text();
|
if($.util.isEmpty(sel)){
|
alreadySelect += "<span class='selcus "+slId +"' sl='"+slId+"'>"+$(this).parent().next().next().text()+"<img src='${common_static}/static/ui/images/del.png' alt=''/></span>";
|
}
|
});
|
$(".checked-now #content").append(alreadySelect);
|
}else{
|
checkTree.each(function() {
|
var slId = $(this).attr("id");
|
$("."+slId).remove();
|
});
|
|
}
|
|
});
|
|
$(".check").on("click",function() {
|
var slId = $(this).attr("id");
|
if($(this).is(":checked")){
|
var alreadySelect = "";
|
|
var sel = $("."+slId).text();
|
if($.util.isEmpty(sel)){
|
alreadySelect += "<span class='selcus "+slId +"' sl='"+slId+"' p='"+$(this).parent().next().next().text()+"'>"+$(this).parent().next().next().text()+"<img src='${common_static}/static/ui/images/del.png' alt=''/></span>";
|
}
|
$(".checked-now #content").append(alreadySelect);
|
}else{
|
$("."+slId).remove();
|
}
|
|
});
|
|
$(".checked-now img").live("click",function() {
|
var slId = $(this).parent().attr("sl");
|
$("#"+slId).prop("checked",false);
|
//$(".checkAll").prop("checked",false);
|
$(this).parent().remove();
|
});
|
|
$(".kong").live('click',function(){
|
$(".checked-now #content").empty();
|
$(".check,.checkAll").prop("checked",false);
|
});
|
|
})
|
|
</script>
|