print1.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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['users']}</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}{$info['totalPrice']}{/if}</td>
  70. </tr>
  71. <tr>
  72. <td>工时费</td>
  73. <td></td>
  74. <td>工料费合计</td>
  75. <td></td>
  76. </tr>
  77. <tr>
  78. <td>总价</td>
  79. <td colspan="3">
  80. <span style="margin-left: 40px"> 万</span>
  81. <span style="margin-left: 40px"> 仟</span>
  82. <span style="margin-left: 40px"> 佰</span>
  83. <span style="margin-left: 40px"> 拾</span>
  84. <span style="margin-left: 40px"> 元</span>
  85. <span style="margin-left: 40px"> 角</span>
  86. </td>
  87. </tr>
  88. <tr>
  89. <td>审批人签字</td>
  90. <td></td>
  91. <td>报修科室签字</td>
  92. <td>
  93. {if $info['signs']}
  94. {foreach $info['signs'] as $v}
  95. <img src="{$v}" width="40px" height="40px" onclick="open_img(this)" alt="" style="margin-left: 5px" />
  96. {/foreach}
  97. {/if}
  98. </td>
  99. </tr>
  100. </table>
  101. </div>
  102. <a href="javascript:;" class="btn btn-sm btn-primary" onclick="printer()">
  103. <i class="glyphicon glyphicon-print">打印</i>
  104. </a>
  105. </div>
  106. </div>
  107. </div>
  108. {/block}
  109. {block name="script"}
  110. <script src="/static/browser.js"></script>
  111. <script src="/static/jquery.jqprint-0.3.js"></script>
  112. <script>
  113. $(document).ready(function(){
  114. });
  115. function printer() {
  116. $("#printer").jqprint({});
  117. }
  118. </script>
  119. {/block}