配置列表增加action查询条件.

This commit is contained in:
zhangwenqing
2018-09-12 18:11:05 +08:00
parent 76e692f72d
commit ab7eea2b89
42 changed files with 380 additions and 38 deletions

View File

@@ -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();