123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>打印申请单</title>
- <style type="text/css">
- body {
- left: 0px;
- top: 0px;
- right: 0px;
- bottom: 0px;
- margin: 0px;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 12px;
- overflow: hidden;
- white-space: nowrap;
- }
- </style>
- <script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
- <script src="../../static/print/jquery.jPrintArea.js" type="text/javascript"></script>
- </head>
- <body>
- <div>
- <input type="button" style="height: 30;" id="print_button" value="打印"/>
- <fieldset align="">
- <legend>打印区</legend>
- <div id="myPrintArea" style="height: 1500;">
- <div align="center">
- <SPAN style="TEXT-DECORATION: underline;font-size:25px">进口食品冷链申报信息表</SPAN>
- <br/><br/>
- </div>
- <div style="text-align:center; font-size:15px;he">
- <table width="100%" style="border-collapse:collapse;border:none;">
-
- </table>
- </div>
- <div align="right">
- <br/><br/>
- <SPAN style=";font-size:15px">      年      月      日</SPAN>
- </div>
- </div>
- </fieldset>
- </div>
- <script type="text/javascript">
- $(function () {
- $("#print_button").click(function () {
- $("#myPrintArea").printArea();
- });
- function getUrlParam(name) {
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
- var r = window.location.search.substr(1).match(reg); //匹配目标参数
- if (r != null) return unescape(r[2]);
- return null; //返回参数值
- }
- var id = getUrlParam('id');
- $.ajax({
- url: 'http://192.168.3.74:8099/pro/TbDeclare/getById?id=' + id,
- type: 'post', // 请求类型,常用的有 GET 和 POST
- success: function (data) { // 接口调用成功回调函数
- $("#myPrintArea").printArea();
- }
- });
- });
- </script>
- </body>
- </html>
|