完善报表信息,初始化查询
This commit is contained in:
parent
016cf60baa
commit
ef1530e8b1
@ -105,6 +105,20 @@ function getNowFormatDateTime() {
|
|||||||
return currentdate;
|
return currentdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* js获取当前时间, 格式“yyyy-MM”
|
||||||
|
*/
|
||||||
|
function getNowFormatMonth() {
|
||||||
|
var date = new Date();
|
||||||
|
var seperator1 = "-";
|
||||||
|
var month = date.getMonth() + 1;
|
||||||
|
if (month >= 1 && month <= 9) {
|
||||||
|
month = "0" + month;
|
||||||
|
}
|
||||||
|
var currentdate = date.getFullYear() + seperator1 + month;
|
||||||
|
return currentdate;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* js获取当前时间, 格式“yyyy-MM-dd”
|
* js获取当前时间, 格式“yyyy-MM-dd”
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -28,11 +28,11 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>姓名:</td>
|
<td>姓名:</td>
|
||||||
<td>
|
<td>
|
||||||
<input name="searchName" id="searchName" style="width:230px;"/>
|
<input name="searchName" id="searchName" style="width:70px;"/>
|
||||||
</td>
|
</td>
|
||||||
<td>类型:</td>
|
<td>类型:</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="searchType" id="searchType" style="width:230px;">
|
<select name="searchType" id="searchType" style="width:70px;">
|
||||||
<option value="">全部</option>
|
<option value="">全部</option>
|
||||||
<option value="仓管员">仓管员</option>
|
<option value="仓管员">仓管员</option>
|
||||||
<option value="财务员">财务员</option>
|
<option value="财务员">财务员</option>
|
||||||
|
|||||||
@ -48,8 +48,11 @@
|
|||||||
//初始化界面
|
//初始化界面
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
|
var thisDate = getNowFormatMonth(); //当前月份
|
||||||
|
$("#searchMonth").val(thisDate);
|
||||||
initTableData();
|
initTableData();
|
||||||
ininPager();
|
ininPager();
|
||||||
|
search();
|
||||||
});
|
});
|
||||||
|
|
||||||
//初始化表格数据
|
//初始化表格数据
|
||||||
@ -132,26 +135,28 @@
|
|||||||
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
|
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function search() {
|
||||||
|
showDetails(1,initPageSize);
|
||||||
|
var opts = $("#tableData").datagrid('options');
|
||||||
|
var pager = $("#tableData").datagrid('getPager');
|
||||||
|
opts.pageNumber = 1;
|
||||||
|
opts.pageSize = initPageSize;
|
||||||
|
pager.pagination('refresh',
|
||||||
|
{
|
||||||
|
pageNumber:1,
|
||||||
|
pageSize:initPageSize
|
||||||
|
});
|
||||||
|
}
|
||||||
//搜索处理
|
//搜索处理
|
||||||
$("#searchBtn").unbind().bind({
|
$("#searchBtn").unbind().bind({
|
||||||
click:function()
|
click:function()
|
||||||
{
|
{
|
||||||
showDetails(1,initPageSize);
|
search();
|
||||||
var opts = $("#tableData").datagrid('options');
|
|
||||||
var pager = $("#tableData").datagrid('getPager');
|
|
||||||
opts.pageNumber = 1;
|
|
||||||
opts.pageSize = initPageSize;
|
|
||||||
pager.pagination('refresh',
|
|
||||||
{
|
|
||||||
pageNumber:1,
|
|
||||||
pageSize:initPageSize
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function showDetails(pageNo,pageSize)
|
function showDetails(pageNo,pageSize) {
|
||||||
{
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"post",
|
type:"post",
|
||||||
url: "<%=path %>/depotHead/findByMonth.action",
|
url: "<%=path %>/depotHead/findByMonth.action",
|
||||||
@ -219,7 +224,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@ -7,7 +7,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>进销存管理</title>
|
<title>库存状况</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<!-- 指定以IE8的方式来渲染 -->
|
<!-- 指定以IE8的方式来渲染 -->
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||||
@ -53,8 +53,11 @@
|
|||||||
//初始化界面
|
//初始化界面
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
|
var thisDate = getNowFormatMonth(); //当前月份
|
||||||
|
$("#searchMonth").val(thisDate);
|
||||||
initTableData();
|
initTableData();
|
||||||
ininPager();
|
ininPager();
|
||||||
|
search();
|
||||||
exportExcel();
|
exportExcel();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -173,19 +176,22 @@
|
|||||||
var orgPerson = "";
|
var orgPerson = "";
|
||||||
|
|
||||||
//搜索处理
|
//搜索处理
|
||||||
|
function search() {
|
||||||
|
showPersonDetails(1,initPageSize);
|
||||||
|
var opts = $("#tableData").datagrid('options');
|
||||||
|
var pager = $("#tableData").datagrid('getPager');
|
||||||
|
opts.pageNumber = 1;
|
||||||
|
opts.pageSize = initPageSize;
|
||||||
|
pager.pagination('refresh',
|
||||||
|
{
|
||||||
|
pageNumber:1,
|
||||||
|
pageSize:initPageSize
|
||||||
|
});
|
||||||
|
}
|
||||||
$("#searchBtn").unbind().bind({
|
$("#searchBtn").unbind().bind({
|
||||||
click:function()
|
click:function()
|
||||||
{
|
{
|
||||||
showPersonDetails(1,initPageSize);
|
search();
|
||||||
var opts = $("#tableData").datagrid('options');
|
|
||||||
var pager = $("#tableData").datagrid('getPager');
|
|
||||||
opts.pageNumber = 1;
|
|
||||||
opts.pageSize = initPageSize;
|
|
||||||
pager.pagination('refresh',
|
|
||||||
{
|
|
||||||
pageNumber:1,
|
|
||||||
pageSize:initPageSize
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -50,8 +50,11 @@
|
|||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
$("#searchTable .tip").css("padding-left","15px").css("color","red");
|
$("#searchTable .tip").css("padding-left","15px").css("color","red");
|
||||||
|
var thisDate = getNowFormatMonth(); //当前月份
|
||||||
|
$("#searchMonth").val(thisDate);
|
||||||
initTableData();
|
initTableData();
|
||||||
ininPager();
|
ininPager();
|
||||||
|
search();
|
||||||
});
|
});
|
||||||
|
|
||||||
//初始化表格数据
|
//初始化表格数据
|
||||||
@ -136,19 +139,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//搜索处理
|
//搜索处理
|
||||||
$("#searchBtn").unbind().bind({
|
function search() {
|
||||||
click:function()
|
showDetails(1,initPageSize);
|
||||||
|
var opts = $("#tableData").datagrid('options');
|
||||||
|
var pager = $("#tableData").datagrid('getPager');
|
||||||
|
opts.pageNumber = 1;
|
||||||
|
opts.pageSize = initPageSize;
|
||||||
|
pager.pagination('refresh',
|
||||||
{
|
{
|
||||||
showDetails(1,initPageSize);
|
pageNumber:1,
|
||||||
var opts = $("#tableData").datagrid('options');
|
pageSize:initPageSize
|
||||||
var pager = $("#tableData").datagrid('getPager');
|
});
|
||||||
opts.pageNumber = 1;
|
}
|
||||||
opts.pageSize = initPageSize;
|
$("#searchBtn").unbind().bind({
|
||||||
pager.pagination('refresh',
|
click:function() {
|
||||||
{
|
search();
|
||||||
pageNumber:1,
|
|
||||||
pageSize:initPageSize
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user