配置列表增加action查询条件.
This commit is contained in:
@@ -464,7 +464,54 @@ $(function(){
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
// 初始
|
||||
if($("#seltype").val() == "action"){
|
||||
$("#intype").hide();// 隐藏输入框
|
||||
if($("#actionSelect").find("option").length < 3){
|
||||
$("#actionSelect").find("option[value='']").remove();
|
||||
}
|
||||
}else{
|
||||
$("#actionSelect").selectpicker("hide");// 隐藏下拉框
|
||||
}
|
||||
// 改变
|
||||
$("#seltype").on("change",function() {
|
||||
if($(this).val() == "action"){
|
||||
if($("#actionSelect").find("option").length < 3){
|
||||
$("#actionSelect").find("option[value='']").remove();
|
||||
}
|
||||
|
||||
$("#intype").hide(); // 隐藏输入框
|
||||
$("#intype").val("");// 清空input条件
|
||||
$("#actionSelect").find("option").removeAttr("selected",false);
|
||||
$("#actionSelect").selectpicker("refresh");
|
||||
$("#actionSelect").selectpicker("show");// 显示下拉框
|
||||
}else{
|
||||
$("#intype").show(); // 显示输入框
|
||||
$("#intype").val("");// 清空input条件
|
||||
$("#actionSelect").find("option:first").attr("selected",true);// 清空action条件
|
||||
$("#actionSelect").selectpicker("hide");// 隐藏下拉框
|
||||
}
|
||||
});
|
||||
|
||||
// 重置操作(增加)
|
||||
$("#resetBtn").on("click",function(){
|
||||
// action查询条件放最上面的情况
|
||||
if($("#seltype").find("option:first").val() == "action"){
|
||||
$("#intype").hide();
|
||||
$("#actionSelect").selectpicker("show");
|
||||
return false;
|
||||
}
|
||||
if($("#seltype").val() == "action"){
|
||||
$("#intype").show();
|
||||
$("#intype").attr("placeholder",$.validator.messages.input+$("#seltype").find("option:first").text());
|
||||
$("#actionSelect").selectpicker("hide");
|
||||
}else{
|
||||
$("#intype").attr("placeholder",$.validator.messages.input+$("#seltype").find("option:first").text());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
window.onload=function(){
|
||||
$("span[id^=open]").click(function(){
|
||||
@@ -1139,7 +1186,9 @@ var areaControlInit=function(){
|
||||
}
|
||||
//查询
|
||||
var page=function(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
}
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").submit();
|
||||
|
||||
Reference in New Issue
Block a user