企业级后台列表常用操作

 

//全选/反选
$("#all").click(function(){
$(":checkbox").attr("checked",this.checked)
});

//审核通过
$("#ok").click(function(){
var flag = $("input[name=id]:checked").length == 0;
if(flag){
alert("请至少选择一条!");
}else{
var ids = "";
$("#uncheckReason").val("");
$("input[name=id]").each(function(){
if($(this).is(':checked')){
ids+=$(this).val()+",";
}
})
$("#ids").val(ids);
$("#form").attr("action","clearBatchInfo!verifyOk.action").submit();
}
});

//审核不通过
$("#no").click(function(){
var flag = $("input[name=id]:checked").length == 0;
var uncheckReason = $("#uncheckReason");
if(flag){
alert("请至少选择一条!");
}else if($.trim(uncheckReason.val()) == ""){
alert("请输入审核不通过原因!");
uncheckReason.focus();
}else{
var ids = "";
$("input[name=id]").each(function(){
if($(this).is(':checked')){
ids+=$(this).val()+",";
}
})
$("#ids").val(ids);
$("#form").attr("action","clearBatchInfo!verifyNo.action").submit();
}
});

posted @ 2016-03-16 17:10  ysw  阅读(167)  评论(0编辑  收藏  举报