完善报表信息,初始化查询

This commit is contained in:
季圣华 2017-06-30 00:07:41 +08:00
parent 016cf60baa
commit ef1530e8b1
5 changed files with 69 additions and 39 deletions

View File

@ -105,6 +105,20 @@ function getNowFormatDateTime() {
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
*/

View File

@ -28,11 +28,11 @@
<tr>
<td>姓名:</td>
<td>
<input name="searchName" id="searchName" style="width:230px;"/>
<input name="searchName" id="searchName" style="width:70px;"/>
</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>

View File

@ -48,8 +48,11 @@
//初始化界面
$(function()
{
var thisDate = getNowFormatMonth(); //当前月份
$("#searchMonth").val(thisDate);
initTableData();
ininPager();
search();
});
//初始化表格数据
@ -133,10 +136,7 @@
}
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
function search() {
showDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
@ -148,10 +148,15 @@
pageSize:initPageSize
});
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
search();
}
});
function showDetails(pageNo,pageSize)
{
function showDetails(pageNo,pageSize) {
$.ajax({
type:"post",
url: "<%=path %>/depotHead/findByMonth.action",

View File

@ -7,7 +7,7 @@
<!DOCTYPE html>
<html>
<head>
<title>进销存管理</title>
<title>库存状况</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
@ -53,8 +53,11 @@
//初始化界面
$(function()
{
var thisDate = getNowFormatMonth(); //当前月份
$("#searchMonth").val(thisDate);
initTableData();
ininPager();
search();
exportExcel();
});
@ -173,9 +176,7 @@
var orgPerson = "";
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
function search() {
showPersonDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
@ -187,6 +188,11 @@
pageSize:initPageSize
});
}
$("#searchBtn").unbind().bind({
click:function()
{
search();
}
});
function showPersonDetails(pageNo,pageSize)

View File

@ -50,8 +50,11 @@
$(function()
{
$("#searchTable .tip").css("padding-left","15px").css("color","red");
var thisDate = getNowFormatMonth(); //当前月份
$("#searchMonth").val(thisDate);
initTableData();
ininPager();
search();
});
//初始化表格数据
@ -136,9 +139,7 @@
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
function search() {
showDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
@ -150,6 +151,10 @@
pageSize:initPageSize
});
}
$("#searchBtn").unbind().bind({
click:function() {
search();
}
});
function showDetails(pageNo,pageSize)