print.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. .custom-table th,td{
  5. padding: 10px;
  6. }
  7. .custom-table th{
  8. width: 120px;
  9. text-align: left;
  10. }
  11. .custom-table-th{
  12. width: 120px;
  13. text-align: right;
  14. font-weight: bold;
  15. /*background-color: rgba(0,0,0,0.15);*/
  16. background-color: #F5F5F6;
  17. }
  18. .custom-table{
  19. table-layout:fixed;
  20. }
  21. table,tr,td{
  22. border: 1px solid #333333 !important;
  23. }
  24. </style>
  25. <div class="row">
  26. <div class="col-sm-12">
  27. <div class="ibox-content" >
  28. <div id="printer">
  29. <table class="table custom-table table-bordered">
  30. <tr style="text-align: center">
  31. <td colspan="4">工料单</td>
  32. </tr>
  33. <tr>
  34. <td>报修科室:{$info.depName}</td>
  35. <td>报修日期:{$info.create_time}</td>
  36. <td colspan="2">维修人:{$info['to_real_name']}</td>
  37. </tr>
  38. <tr>
  39. <td colspan="4">维修内容:{$info['content']}</td>
  40. </tr>
  41. <tr>
  42. <td>用料名称</td>
  43. <td>数量</td>
  44. <td>单价</td>
  45. <td>金额</td>
  46. </tr>
  47. {foreach $info['cons'] as $k=>$v}
  48. <tr style="height: 35px">
  49. <td>{$v.title}</td>
  50. <td>
  51. {if $v.total}
  52. {$v.total}
  53. {/if}
  54. </td>
  55. <td>
  56. {if $v.money}
  57. {$v.money}
  58. {/if}
  59. </td>
  60. <td>
  61. {if $v['total_money']}
  62. {$v['total_money']}
  63. {/if}
  64. </td>
  65. </tr>
  66. {/foreach}
  67. <tr>
  68. <td colspan="2" style="text-align: center">用料合计</td>
  69. <td colspan="2">{if $info['total'] > 0}
  70. {$info['totalPrice']}
  71. {/if}</td>
  72. </tr>
  73. <tr>
  74. <td>工时费</td>
  75. <td></td>
  76. <td>工料费合计</td>
  77. <td>
  78. </td>
  79. </tr>
  80. <tr>
  81. <td>总价</td>
  82. <td colspan="3">
  83. <span style="margin-left: 40px"> 万</span>
  84. <span style="margin-left: 40px"> 仟</span>
  85. <span style="margin-left: 40px"> 佰</span>
  86. <span style="margin-left: 40px"> 拾</span>
  87. <span style="margin-left: 40px"> 元</span>
  88. <span style="margin-left: 40px"> 角</span>
  89. </td>
  90. </tr>
  91. <tr>
  92. <td>审批人签字</td>
  93. <td></td>
  94. <td>报修科室签字</td>
  95. <td>
  96. {if $info['sign']}
  97. <img src="{$info['sign']}" width="40px" height="40px" onclick="open_img(this)" alt="" style="margin-left: 5px" />
  98. {/if}
  99. </td>
  100. </tr>
  101. </table>
  102. </div>
  103. <a href="javascript:;" class="btn btn-sm btn-primary" onclick="printer()">
  104. <i class="glyphicon glyphicon-print">打印</i>
  105. </a>
  106. </div>
  107. </div>
  108. </div>
  109. {/block}
  110. {block name="script"}
  111. <script src="/static/browser.js"></script>
  112. <script src="/static/jquery.jqprint-0.3.js"></script>
  113. <script>
  114. $(document).ready(function(){
  115. });
  116. function printer() {
  117. $("#printer").jqprint({});
  118. }
  119. </script>
  120. {/block}