print.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  6. <title>打印申请单</title>
  7. <style type="text/css">
  8. body {
  9. left: 0px;
  10. top: 0px;
  11. right: 0px;
  12. bottom: 0px;
  13. margin: 0px;
  14. font-family: Arial, Helvetica, sans-serif;
  15. font-size: 12px;
  16. overflow: hidden;
  17. white-space: nowrap;
  18. }
  19. </style>
  20. <script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
  21. <script src="../../static/print/jquery.jPrintArea.js" type="text/javascript"></script>
  22. <script src="../../static/sa.js"></script>
  23. </head>
  24. <body>
  25. <div>
  26. <input type="button" style="height: 30;" id="print_button" value="打印"/>
  27. <fieldset align="">
  28. <legend>打印区</legend>
  29. <div id="myPrintArea" style="height: 1500;">
  30. <div align="center">
  31. <SPAN style="TEXT-DECORATION: underline;font-size:25px">进口食品冷链申报信息表</SPAN>
  32. <br/><br/>
  33. </div>
  34. <div style="text-align:center; font-size:15px;he">
  35. <table width="100%" style="border-collapse:collapse;border:none;">
  36. <tr height="40">
  37. <td style="border:solid #000 1px; width: 25%;hei">产品学名</td>
  38. <td style="border:solid #000 1px;">
  39. <div id="goodsName"></div>
  40. </td>
  41. </tr>
  42. <tr height="40">
  43. <td style="border:solid #000 1px; width: 25%;">毛重</td>
  44. <td style="border:solid #000 1px;">
  45. <div id="grossWeight"></div>
  46. </td>
  47. </tr>
  48. <tr height="40">
  49. <td style="border:solid #000 1px; width: 25%;">件数</td>
  50. <td style="border:solid #000 1px;">
  51. <div id="num"></div>
  52. </td>
  53. </tr>
  54. <tr height="40">
  55. <td style="border:solid #000 1px; width: 25%;">生产日期</td>
  56. <td style="border:solid #000 1px;">
  57. <div id="productionDate"></div>
  58. </td>
  59. </tr>
  60. <tr height="40">
  61. <td style="border:solid #000 1px; width: 25%;">保质期</td>
  62. <td style="border:solid #000 1px;">
  63. <div id="expirationDate"></div>
  64. </td>
  65. </tr>
  66. <tr height="40">
  67. <td style="border:solid #000 1px; width: 25%;">储存条件</td>
  68. <td style="border:solid #000 1px;">
  69. <div id="storageMode"></div>
  70. </td>
  71. </tr>
  72. <tr height="40">
  73. <td style="border:solid #000 1px; width: 25%;">生产方式</td>
  74. <td style="border:solid #000 1px;">
  75. <div id="productionMode"></div>
  76. </td>
  77. </tr>
  78. <tr height="40">
  79. <td style="border:solid #000 1px; width: 25%;">原产国</td>
  80. <td style="border:solid #000 1px;">
  81. <div id="origin"></div>
  82. </td>
  83. </tr>
  84. <tr height="40">
  85. <td style="border:solid #000 1px; width: 25%;">货主单位</td>
  86. <td style="border:solid #000 1px;">
  87. <div id="sendUnit"></div>
  88. </td>
  89. </tr>
  90. <tr height="40">
  91. <td style="border:solid #000 1px; width: 25%;">进口冷链食品生产商注册号</td>
  92. <td style="border:solid #000 1px;">
  93. <div id="producerCode"></div>
  94. </td>
  95. </tr>
  96. <tr height="40">
  97. <td style="border:solid #000 1px; width: 25%;">收货单位</td>
  98. <td style="border:solid #000 1px;">
  99. <div id="receiveUnit"></div>
  100. </td>
  101. </tr>
  102. <tr height="40">
  103. <td style="border:solid #000 1px; width: 25%;">物流流向</td>
  104. <td style="border:solid #000 1px;">
  105. <div id="route"></div>
  106. </td>
  107. </tr>
  108. <tr height="40">
  109. <td style="border:solid #000 1px; width: 25%;">运输车辆(车头牌、车尾牌)</td>
  110. <td style="border:solid #000 1px;">
  111. <div id="chinaCarNo"></div>
  112. </td>
  113. </tr>
  114. <tr height="40">
  115. <td style="border:solid #000 1px; width: 25%;">司机名称</td>
  116. <td style="border:solid #000 1px;">
  117. <div id="driverName"></div>
  118. </td>
  119. </tr>
  120. <tr height="40">
  121. <td style="border:solid #000 1px; width: 25%;">联系电话(司机)</td>
  122. <td style="border:solid #000 1px;">
  123. <div id="driverPhone"></div>
  124. </td>
  125. </tr>
  126. <tr height="40">
  127. <td style="border:solid #000 1px; width: 25%;">联系电话(商家代理人)</td>
  128. <td style="border:solid #000 1px;">
  129. <div id="agentPhone"></div>
  130. </td>
  131. </tr>
  132. <tr height="40">
  133. <td style="border:solid #000 1px; width: 25%;">海关报关单据</td>
  134. <td style="border:solid #000 1px;">
  135. <div id="customProof"></div>
  136. </td>
  137. </tr>
  138. <tr height="40">
  139. <td style="border:solid #000 1px; width: 25%;">进出口检验检疫证书</td>
  140. <td style="border:solid #000 1px;">
  141. <div id="quarantineProof"></div>
  142. </td>
  143. </tr>
  144. <tr height="40">
  145. <td style="border:solid #000 1px; width: 25%;">商铺(互助组)</td>
  146. <td style="border:solid #000 1px;">
  147. <div id="shop"></div>
  148. </td>
  149. </tr>
  150. <tr height="40">
  151. <td style="border:solid #000 1px; width: 25%;">生产批号</td>
  152. <td style="border:solid #000 1px;">
  153. <div id="productionCode"></div>
  154. </td>
  155. </tr>
  156. <tr height="40">
  157. <td style="border:solid #000 1px; width: 25%;">柜号</td>
  158. <td style="border:solid #000 1px;">
  159. <div id="containerCode"></div>
  160. </td>
  161. </tr>
  162. <tr height="40">
  163. <td style="border:solid #000 1px; width: 25%;">越南车牌</td>
  164. <td style="border:solid #000 1px;">
  165. <div id="carNo"></div>
  166. </td>
  167. </tr>
  168. </table>
  169. </div>
  170. <div align="right">
  171. <br/><br/>
  172. <SPAN style=";font-size:15px"> &nbsp&nbsp&nbsp&nbsp 年 &nbsp&nbsp&nbsp&nbsp 月 &nbsp&nbsp&nbsp&nbsp 日</SPAN>
  173. </div>
  174. </div>
  175. </fieldset>
  176. </div>
  177. <script type="text/javascript">
  178. $(function () {
  179. $("#print_button").click(function () {
  180. $("#myPrintArea").printArea();
  181. });
  182. function getUrlParam(name) {
  183. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
  184. var r = window.location.search.substr(1).match(reg); //匹配目标参数
  185. if (r != null) return unescape(r[2]);
  186. return null; //返回参数值
  187. }
  188. var id = getUrlParam('id');
  189. $.ajax({
  190. url: sa.cfg.api_url + '/TbDeclare/getById?id=' + id,
  191. type: 'post', // 请求类型,常用的有 GET 和 POST
  192. success: function (data) { // 接口调用成功回调函数
  193. $("#goodsName").html(data.data.goodsName);
  194. $("#grossWeight").html(data.data.grossWeight + "kg");
  195. $("#num").html(data.data.num + "件");
  196. $("#productionDate").html(data.data.productionDate);
  197. $("#expirationDate").html(data.data.expirationDate + "天");
  198. $("#storageMode").html(data.data.storageMode);
  199. $("#productionMode").html(data.data.productionMode);
  200. $("#origin").html(data.data.origin);
  201. $("#producerCode").html(data.data.producerCode);
  202. $("#sendUnit").html(data.data.sendUnit);
  203. $("#receiveUnit").html(data.data.receiveUnit);
  204. $("#route").html(data.data.route);
  205. $("#chinaCarNo").html(data.data.chinaCarNo);
  206. $("#driverName").html(data.data.driverName);
  207. $("#driverPhone").html(data.data.driverPhone);
  208. $("#agentPhone").html(data.data.agentPhone);
  209. $("#customProof").html(data.data.customProof);
  210. $("#quarantineProof").html(data.data.quarantineProof);
  211. $("#shop").html(data.data.shop);
  212. $("#productionCode").html(data.data.productionCode);
  213. $("#containerCode").html(data.data.containerCode);
  214. $("#carNo").html(data.data.carNo);
  215. $("#myPrintArea").printArea();
  216. }
  217. });
  218. });
  219. </script>
  220. </body>
  221. </html>