经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » JS/JS库/框架 » Vue.js » 查看文章
VUE 记账凭证模块组件的示例代码
来源:jb51  时间:2022/3/1 19:40:12  对本文有异议

效果如下所示:

  1. <template>
  2. <div class="voucher-container">
  3. <div class="voucher_header">
  4. <div class="voucher_header_title">记账凭证</div>
  5. <div class="voucher_header_number">单据号: {{voucher.numberId}}</div>
  6. </div>
  7. <table class="voucher" cellpadding="0" cellspacing="0">
  8. <thead>
  9. <tr>
  10. <th class="voucher_summary">摘要</th>
  11. <th class="voucher_subject">会计科目</th>
  12. <th class="voucher_money">
  13. <strong class="voucher_title">借方金额</strong>
  14. <div class="voucher_column voucher_unit">
  15. <span>亿</span>
  16. <span></span>
  17. <span></span>
  18. <span></span>
  19. <span></span>
  20. <span></span>
  21. <span></span>
  22. <span class="voucher_last"></span>
  23. </div>
  24. </th>
  25. <strong class="voucher_title">贷方金额</strong>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. <tr class="voucher_item" v-for="(item) in voucher.items" :key="item.id">
  30. <td class="voucher_summary">{{item.summart}}</td>
  31. <td class="voucher_subject">{{item.subject}}</td>
  32. <td class="voucher_debite">
  33. <div class="voucher_number"><money-format :number="item.debite"></money-format></div>
  34. </td>
  35. <td class="voucher_credit">
  36. <div class="voucher_number"><money-format :number="item.credit"></money-format></div>
  37. </tbody>
  38. <tfoot>
  39. <td class="voucher_total" colspan="2">
  40. 合计:
  41. <money-format :number="voucher.total" :chinese="true"></money-format>
  42. <div class="voucher_number"><money-format :number="voucher.debite" :colour="true"></money-format></div>
  43. <div class="voucher_number"><money-format :number="voucher.credit" :colour="true"></money-format></div>
  44. </tfoot>
  45. </table>
  46. <div class="voucher_footer">制单人:{{voucher.bookkeeper}}</div>
  47. </div>
  48. </template>
  49. <script>
  50. import MoneyFormat from './MoneyFormat';
  51. export default {
  52. name: 'Voucher',
  53. props: {
  54. voucher: {
  55. type: Object,
  56. }
  57. },
  58. components: {
  59. MoneyFormat
  60. }
  61. };
  62. </script>
  63. <style lang="less" rel="stylesheet/less">
  64. .voucher-container {
  65. height: 100%;
  66. width: 100%;
  67. overflow: hidden;
  68. margin: 0.625rem;
  69. padding: 0;
  70. }
  71. .voucher_header {
  72. padding-top: 20px;
  73. margin-bottom: 10px;
  74. .voucher_header_title {
  75. float: left;
  76. display: inline;
  77. margin: -20px 130px 0px 100px;
  78. font: 28px/1.8 'Microsoft Yahei';
  79. text-align: center;
  80. text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
  81. .voucher_header_number {
  82. text-align: left;
  83. margin-left: 120px;
  84. .voucher_footer {
  85. margin: 10px;
  86. font-weight: bold;
  87. .voucher {
  88. border-collapse: collapse;
  89. th,
  90. td {
  91. border: 1px solid #ccc;
  92. height: 35px;
  93. th {
  94. height: 48px;
  95. color: #555555;
  96. font-size: 14px;
  97. text-align: center;
  98. font-weight: bold;
  99. overflow: hidden;
  100. .voucher_title {
  101. display: block;
  102. height: 25px;
  103. line-height: 25px;
  104. .voucher_last {
  105. margin-right: 0;
  106. width: 18px;
  107. .voucher_money {
  108. font-size: 12px;
  109. min-width: 221px;
  110. span {
  111. float: left;
  112. display: inline;
  113. width: 19px;
  114. height: 100%;
  115. margin-right: 1px;
  116. .voucher_column,
  117. .voucher_credit,
  118. .voucher_debite {
  119. background-image: url(../assets/image/money_column.png);
  120. background-repeat: repeat-y;
  121. .voucher_summary {
  122. min-width: 6.25rem;
  123. word-break: break-all;
  124. word-wrap: break-word;
  125. .voucher_subject {
  126. .voucher_unit {
  127. height: 22px;
  128. line-height: 22px;
  129. font-weight: normal;
  130. border-top: 1px solid #dadada;
  131. .voucher_total {
  132. letter-spacing: 1px;
  133. .voucher_number {
  134. position: relative;
  135. font-family: 'tahoma';
  136. letter-spacing: 11px;
  137. text-align: right;
  138. right: -5px;
  139. .voucher_item {
  140. </style>

到此这篇关于VUE 记账凭证模块组件的示例代码的文章就介绍到这了,更多相关vue记账凭证内容请搜索w3xue以前的文章或继续浏览下面的相关文章希望大家以后多多支持w3xue!

 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号