qrcode.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. #printer{
  5. margin: 0 auto;
  6. width: 600px;
  7. height: 85%;
  8. background-color: #fff;
  9. padding: 10px;
  10. }
  11. /*#printer img{*/
  12. /* width: 150px;*/
  13. /*}*/
  14. #printer p{
  15. text-align: center;
  16. }
  17. .ibox-tools{
  18. margin: 5px 10px;
  19. float: right;
  20. }
  21. .text-center{
  22. text-align: center;
  23. }
  24. </style>
  25. <div id="printer" class="text-center">
  26. <table class="table table-bordered" style="table-layout:fixed;">
  27. <tr>
  28. <td colspan="6" style="text-align: center;font-size: 24px;font-weight: bold;">设备管理卡</td>
  29. </tr>
  30. <tr>
  31. <td class="text-right">设备名称</td>
  32. <td class="text-left" colspan="3">
  33. {$info['title']}
  34. </td>
  35. <td rowspan="6" colspan="2">
  36. <img style="width: 100%" src="{:url('Qrcode/qrcode')}?code={$code}" alt="">
  37. </td>
  38. </tr>
  39. <tr>
  40. <td class="text-right">设备编号</td>
  41. <td class="text-left" colspan="3">
  42. {$info['sn']}
  43. </td>
  44. </tr>
  45. <tr>
  46. <td class="text-right">设备型号</td>
  47. <td class="text-left" colspan="3">
  48. {$info['spec']}
  49. </td>
  50. </tr>
  51. <tr>
  52. <td class="text-right">服务区域</td>
  53. <td class="text-left" colspan="3">
  54. {$info['area']}
  55. </td>
  56. </tr>
  57. <tr>
  58. <td class="text-right">生产厂家</td>
  59. <td class="text-left" colspan="3">
  60. {$info['producer']}
  61. </td>
  62. </tr>
  63. </table>
  64. </div>
  65. <div class="text-center">
  66. <br>
  67. <a href="javascript:;" class="btn btn-sm btn-primary" onclick="print()"><i class="glyphicon glyphicon-print"> 打印</i></a>
  68. </div>
  69. <script src="/static/jquery-1.11.3.min.js"></script>
  70. <script src="/static/browser.js"></script>
  71. <script src="/static/jquery.jqprint-0.3.js"></script>
  72. <script>
  73. function print(){
  74. $("#printer").jqprint();
  75. }
  76. </script>
  77. {/block}