work_card.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. /*#printer img{*/
  5. /* width: 150px;*/
  6. /*}*/
  7. #printer p{
  8. text-align: center;
  9. }
  10. .ibox-tools{
  11. margin: 5px 10px;
  12. float: right;
  13. }
  14. .text-center{
  15. text-align: center;
  16. }
  17. .right{
  18. }
  19. </style>
  20. <div id="printer" class="text-center" style="
  21. border: 1px solid #f1f1f1;
  22. margin: 0 auto;
  23. width: auto;
  24. margin: 20px;
  25. height: auto;
  26. background-color: #fff;
  27. padding: 10px;
  28. /*margin-top: 20px;*/
  29. ">
  30. <h3 style="margin-bottom: 20px">{$orgName}</h3>
  31. <div class="left" style="width: 50%;height: 200px;display: inline-block;">
  32. <img src="{:url('Qrcode/qrcode')}?code={$code}" width="150px" height="150px" alt="">
  33. </div>
  34. <div class="right" style="width: 50%;
  35. height: 200px;
  36. display: inline-block;
  37. float: right;
  38. text-align: left;
  39. font-size: 25px;">
  40. <div class="name" style="margin-top: 10px">{$info.real_name}</div>
  41. <div class="job-number" style="margin-top: 10px">工号:{$info.id}</div>
  42. <div class="dep" style="margin-top: 10px">部门:{$info.dep}</div>
  43. </div>
  44. </div>
  45. <div class="text-center">
  46. <br>
  47. <a href="javascript:;" class="btn btn-sm btn-primary" onclick="print()"><i class="glyphicon glyphicon-print"> 打印</i></a>
  48. </div>
  49. <script src="/static/jquery-1.11.3.min.js"></script>
  50. <script src="/static/browser.js"></script>
  51. <script src="/static/jquery.jqprint-0.3.js"></script>
  52. <script>
  53. function print(){
  54. $("#printer").jqprint();
  55. }
  56. </script>
  57. {/block}