print.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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;" colspan="3">
  39. <div id="sendPeople"></div>
  40. </td>
  41. </tr>
  42. <tr height="40">
  43. <td style="border:solid #000 1px; width: 25%;hei">收货人名称</td>
  44. <td style="border:solid #000 1px;" colspan="3">
  45. <div id="receivePeople"></div>
  46. </td>
  47. </tr>
  48. <tr height="40">
  49. <td style="border:solid #000 1px; width: 25%;hei">品名</td>
  50. <td style="border:solid #000 1px;">
  51. <div id="goodsName"></div>
  52. </td>
  53. <td style="border:solid #000 1px; width: 25%;hei">产地</td>
  54. <td style="border:solid #000 1px;">
  55. <div id="origin"></div>
  56. </td>
  57. </tr>
  58. <tr height="40">
  59. <td style="border:solid #000 1px; width: 25%;hei">数量/重量</td>
  60. <td style="border:solid #000 1px;">
  61. <div id="numAndWeight"></div>
  62. </td>
  63. <td style="border:solid #000 1px; width: 25%;hei">规格</td>
  64. <td style="border:solid #000 1px;">
  65. <div id="unit"></div>
  66. </td>
  67. </tr>
  68. <tr height="40">
  69. <td style="border:solid #000 1px; width: 25%;hei">包装</td>
  70. <td style="border:solid #000 1px;">
  71. <div id="pack"></div>
  72. </td>
  73. <td style="border:solid #000 1px;" colspan="2">标记及号码</td>
  74. </tr>
  75. <tr height="40">
  76. <td style="border:solid #000 1px; width: 25%;hei">启动地</td>
  77. <td style="border:solid #000 1px;">
  78. <div id="sourceAddress"></div>
  79. </td>
  80. <td style="border:solid #000 1px;" colspan="2" rowspan="4">
  81. <div id="flagAndPhone"></div>
  82. </td>
  83. </tr>
  84. <tr height="40">
  85. <td style="border:solid #000 1px; width: 25%;hei">到达口岸</td>
  86. <td style="border:solid #000 1px;">
  87. <div id="arrivePart"></div>
  88. </td>
  89. </tr>
  90. <tr height="40">
  91. <td style="border:solid #000 1px; width: 25%;hei">运输工具及号码</td>
  92. <td style="border:solid #000 1px;">
  93. <div id="carNameAndNo"></div>
  94. </td>
  95. </tr>
  96. <tr height="40">
  97. <td style="border:solid #000 1px; width: 25%;hei">国内运输工具及号码</td>
  98. <td style="border:solid #000 1px;">
  99. <div id="chinaCarNameAndNo"></div>
  100. </td>
  101. </tr>
  102. <tr height="80">
  103. <td style="border:solid #000 1px; width: 25%;hei">预约处理地点及时间</td>
  104. <td style="border:solid #000 1px;" colspan="3">东兴A1地块进口冷链食品集中监管仓</td>
  105. </tr>
  106. <tr height="80">
  107. <td style="border:solid #000 1px; width: 25%;hei">其他要求及备注</td>
  108. <td style="border:solid #000 1px;" colspan="3">
  109. <div id="remark"></div>
  110. </td>
  111. </tr>
  112. </table>
  113. <table width="100%" style="border-collapse:collapse;border:none;">
  114. <tr height="80">
  115. <td style="border:solid #000 1px;">
  116. <div id="applyUnitAndPeople"></div>
  117. </td>
  118. <td style="border:solid #000 1px;">
  119. <div id="declarePhone"></div>
  120. </td>
  121. <td style="border:solid #000 1px;">
  122. <div id="applyTime"></div>
  123. </td>
  124. </tr>
  125. <tr height="80">
  126. <td style="border:solid #000 1px;">
  127. <div id="acceptPeople"></div>
  128. </td>
  129. <td style="border:solid #000 1px;">
  130. <div id="acceptTime"></div>
  131. </td>
  132. <td style="border:solid #000 1px;">计费:
  133. <div id="money"></div>
  134. </td>
  135. </tr>
  136. </table>
  137. </div>
  138. <div align="right">
  139. <br/><br/>
  140. <SPAN style=";font-size:15px"> &nbsp&nbsp&nbsp&nbsp 年 &nbsp&nbsp&nbsp&nbsp 月 &nbsp&nbsp&nbsp&nbsp 日</SPAN>
  141. </div>
  142. </div>
  143. </fieldset>
  144. </div>
  145. <script type="text/javascript">
  146. $(function () {
  147. $("#print_button").click(function () {
  148. $("#myPrintArea").printArea();
  149. });
  150. function getUrlParam(name) {
  151. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
  152. var r = window.location.search.substr(1).match(reg); //匹配目标参数
  153. if (r != null) return unescape(r[2]);
  154. return null; //返回参数值
  155. }
  156. var id = getUrlParam('id');
  157. $.ajax({
  158. url: sa.cfg.api_url + '/TbDisinfect/getById?id=' + id,
  159. type: 'post',
  160. success: function (data) {
  161. console.log(data);
  162. $("#sendPeople").html(data.data.sendPeople);
  163. $("#receivePeople").html(data.data.receivePeople);
  164. $("#goodsName").html(data.data.goodsName);
  165. $("#origin").html(data.data.origin);
  166. $("#numAndWeight").html(data.data.num + "件/" + data.data.grossWeight + "kg");
  167. $("#unit").html(data.data.unit);
  168. $("#pack").html(data.data.pack);
  169. $("#flagAndPhone").html(data.data.flag + ", " + data.data.phone);
  170. $("#sourceAddress").html(data.data.sourceAddress);
  171. $("#arrivePart").html(data.data.arrivePart);
  172. $("#carNameAndNo").html(data.data.carName + ", " + data.data.carNo);
  173. $("#chinaCarNameAndNo").html(data.data.chinaCarName + ", " + data.data.chinaCarNo);
  174. $("#remark").html(data.data.remark);
  175. $("#applyUnitAndPeople").html("申请人单位、姓名:" + data.data.applyUnit + ", " + data.data.declarePeople);
  176. $("#declarePhone").html("联系方式:" + data.data.declarePhone);
  177. $("#applyTime").html("申请时间:" + data.data.applyTime);
  178. $("#acceptPeople").html("受理人姓名:");
  179. $("#acceptTime").html("受理时间:");
  180. $("#myPrintArea").printArea();
  181. }
  182. });
  183. });
  184. </script>
  185. </body>
  186. </html>