print.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. table tbody tr td{
  5. text-align: center;
  6. }
  7. </style>
  8. <div class="row">
  9. <div class="col-sm-12">
  10. <div class="ibox float-e-margins">
  11. <div class="ibox-content">
  12. <div class="panel panel-default">
  13. <div class="panel-body">
  14. <table class="table table-bordered" id="visaReport" style="background: #fff;">
  15. <tr>
  16. <td colspan="4" class="text-center">订单号{$info.sn}</td>
  17. </tr>
  18. <tr>
  19. <td colspan="2">下单人:{$info.name}({$info.mobile})</td>
  20. <td colspan="2">下单时间:{$info.pay_time}</td>
  21. </tr>
  22. <tr>
  23. <td colspan="4">下单地址:{$info.address}</td>
  24. </tr>
  25. <tr>
  26. <td class="text-center">序号</td>
  27. <td class="text-center">类型</td>
  28. <td class="text-center">购买物品</td>
  29. <td class="text-center">购买数量</td>
  30. </tr>
  31. {foreach $info.item as $k=>$v}
  32. <tr>
  33. <td class="text-center">
  34. {if $k<10}
  35. 0{$k}
  36. {else}
  37. {$k}
  38. {/if}
  39. </td>
  40. <td>
  41. <span class="label" style="color: white;background:{$v['color']}"> {$v.dinner_type_name}
  42. </span>
  43. </td>
  44. <td>
  45. {$v.dinner_name}
  46. </td>
  47. <td>
  48. {$v.num}
  49. </td>
  50. </tr>
  51. {/foreach}
  52. <tr>
  53. <td class="text-right" colspan="3">合计:</td>
  54. <td>{$info.price}</td>
  55. </tr>
  56. </table>
  57. <div class="form-group">
  58. <div class="col-sm-6 col-sm-offset-2">
  59. <button class="btn btn-primary" onclick="visa_report()" type="button">打 印</button>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. {/block}
  69. {block name="script"}
  70. <script src="/static/browser.js"></script>
  71. <script src="/static/jquery.jqprint-0.3.js"></script>
  72. <script>
  73. function visa_report()
  74. {
  75. $("#visaReport").jqprint({});
  76. }
  77. </script>
  78. {/block}