easyUI查询
javaspringmvc+easyuieasyui怎么写查询,后台怎么接收比如查询条件有按名字和日期查询...
java
springmvc+easyui
easyui怎么写查询,后台怎么接收
比如查询条件有 按名字和日期查询 展开
springmvc+easyui
easyui怎么写查询,后台怎么接收
比如查询条件有 按名字和日期查询 展开
1个回答
展开全部
//查询
function q_dlg() {
var name = document.getElementById("personnelName").value;
var v = document.getElementById("searchStatus").value;
var f = name + ',' + v;
filter = f;
$('#dg').datagrid({
url: 'List1',
pageNumber: 1,
pageSize: 20,
pageList: [20, 40, 60, 80, 100],
queryParams: { filter: f },
rowStyler: function (index, row) {
//获取当前日期:
var myDate = new Date();
var year = myDate.getFullYear();
var month = myDate.getMonth() + 1;
var date = myDate.getDate();
var localdays = year + "-" + month + "-" + date;
newDate = new Date(localdays.replace(/-/g, "/"));
if (row.StatusName == "停用") {
return 'color:red;';
}
return 'cursor:pointer'
},
onDblClickRow: function (rowIndex, rowData) {
v_dlg();
},
onSortColumn: function (sort, order) {
$('#dg').datagrid("reload", { filter: filter, fieldtype: sort, desc: order });
}
});
}
function q_dlg() {
var name = document.getElementById("personnelName").value;
var v = document.getElementById("searchStatus").value;
var f = name + ',' + v;
filter = f;
$('#dg').datagrid({
url: 'List1',
pageNumber: 1,
pageSize: 20,
pageList: [20, 40, 60, 80, 100],
queryParams: { filter: f },
rowStyler: function (index, row) {
//获取当前日期:
var myDate = new Date();
var year = myDate.getFullYear();
var month = myDate.getMonth() + 1;
var date = myDate.getDate();
var localdays = year + "-" + month + "-" + date;
newDate = new Date(localdays.replace(/-/g, "/"));
if (row.StatusName == "停用") {
return 'color:red;';
}
return 'cursor:pointer'
},
onDblClickRow: function (rowIndex, rowData) {
v_dlg();
},
onSortColumn: function (sort, order) {
$('#dg').datagrid("reload", { filter: filter, fieldtype: sort, desc: order });
}
});
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询