继续增加4张报表的打印功能

This commit is contained in:
季圣华
2017-09-03 13:10:53 +08:00
parent 463baec598
commit a21a403a57
5 changed files with 54 additions and 7 deletions

View File

@@ -3,9 +3,15 @@
function CreateFormPage(strPrintName, printDatagrid) {
var beginDate= $("#searchBeginTime").val();
var endDate= $("#searchEndTime").val();
var tableString = '<div class="div-title">上海某某某某有限责任公司\n</div>' +
'\n<div class="div-time">日期:' + beginDate + ' 至 ' + endDate + ' \n</div>' +
'\n<table cellspacing="0" class="pb">';
var getMonth= $("#searchMonth").val();
var tableString = '<div class="div-title">上海某某某某有限责任公司\n</div>';
if(beginDate && endDate) {
tableString+='\n<div class="div-time">日期:' + beginDate + ' 至 ' + endDate + ' \n</div>';
}
if(getMonth) {
tableString += '\n<div class="div-time">月份:' + getMonth + ' \n</div>';
}
tableString+='\n<table cellspacing="0" class="pb">';
var frozenColumns = printDatagrid.datagrid("options").frozenColumns; // 得到frozenColumns对象
var columns = printDatagrid.datagrid("options").columns; // 得到columns对象
var nameList = '';

View File

@@ -13,6 +13,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
@@ -39,6 +40,8 @@
<td>&nbsp;</td>
<td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</td>
</tr>
</table>
@@ -55,6 +58,7 @@
{
initTableData();
ininPager();
print();
});
//初始化表格数据
@@ -179,6 +183,12 @@
return;
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click",function(){
CreateFormPage('打印报表', $('#tableData'));
});
}
</script>
</body>

View File

@@ -13,6 +13,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
@@ -34,6 +35,8 @@
<td>&nbsp;</td>
<td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</td>
</tr>
</table>
@@ -53,6 +56,7 @@
initTableData();
ininPager();
search();
print();
});
//初始化表格数据
@@ -226,6 +230,12 @@
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click",function(){
CreateFormPage('打印报表', $('#tableData'));
});
}
</script>
</body>
</html>

View File

@@ -13,6 +13,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
@@ -40,8 +41,11 @@
</td>
<td>&nbsp;</td>
<td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="exprotBtn">导出</a>
&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
&nbsp;&nbsp;<span class="total-count"></span>
</td>
</tr>
@@ -71,6 +75,7 @@
ininPager();
search();
exportExcel();
print();
});
//导出EXCEL
@@ -402,6 +407,12 @@
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click",function(){
CreateFormPage('打印报表', $('#tableData'));
});
}
</script>
</body>
</html>

View File

@@ -13,6 +13,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
@@ -34,6 +35,8 @@
<td>&nbsp;</td>
<td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</td>
<td><span class="tip">注:此处包含零售+批发销售</span></td>
</tr>
@@ -55,6 +58,7 @@
initTableData();
ininPager();
search();
print();
});
//初始化表格数据
@@ -228,6 +232,12 @@
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click",function(){
CreateFormPage('打印报表', $('#tableData'));
});
}
</script>
</body>
</html>