function searchbtn_click() {
if (window.winfilter) {
window.winfilter.show();
}
else {
var filtercontainer = $("").width(500).height(200).hide();
window.filter = filtercontainer.ligerFilter({ fields: fields });
window.winfilter = $.ligerDialog.open({
width: 540, height: 288,
target: filtercontainer, isResize: true, top: 50,
buttons: [
{
text: "确定", onclick: function (item, dialog) {
var group = window.filter.getData();
searchjson = JSON.stringify(group);
gridRefresh();
dialog.hide();
}
},
{ text: "取消", onclick: function (item, dialog) { dialog.hide(); } }
]
});
}
};
function gridRefresh() {
if (grid) {
var gridparms = [];
grid.options.parms[1].value = searchjson;
gridparms.push({ name: "funcid", value: "getprimary" });
gridparms.push({ name: "searchjson", value: searchjson });
gridparms.push({ name: "page", value: 1 });
gridparms.push({ name: "pagesize", value: grid.options.pageSize });
grid.loadServerData(gridparms);
}
}