SummaryDisplay.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template lang="pug">
  2. .summary
  3. table.ticket
  4. thead.ticket-header
  5. tr
  6. th(colspan="4")
  7. h3.ticket-company Compañía
  8. tbody.ticket-content
  9. tr.ticket-item.ticket-item-header
  10. td Producto
  11. td Precio unitario
  12. td Cantidad
  13. td Subtotal
  14. tr.ticket-item
  15. td Producto 001
  16. td 5000
  17. td 1
  18. td 5000
  19. tr.ticket-item
  20. td Producto 002
  21. td 6000
  22. td 2
  23. td 12000
  24. tr.ticket-item
  25. td Producto 003
  26. td 4500
  27. td 1
  28. td 4500
  29. tr.ticket-item
  30. td Producto 004
  31. td 3200
  32. td 1
  33. td 3200
  34. tfoot.ticket-footer
  35. tr
  36. td(colspan="2") Cliente
  37. td(colspan="2") Ocasional
  38. </template>
  39. <script>
  40. import { mapGetters } from 'vuex'
  41. export default {
  42. computed: mapGetters({
  43. total: 'getTotal',
  44. customer: 'getSelectedCustomer',
  45. hasSelectedCustomer: 'hasSelectedCustomer'
  46. }),
  47. methods: {
  48. getTotal() {
  49. return accounting.formatMoney(this.total, '₲', 0, '.', ',')
  50. },
  51. getCustomer() {
  52. return this.hasSelectedCustomer ? this.customer : {}
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="sass">
  58. .summary
  59. width: 100%
  60. height: 100%
  61. display: flex
  62. .ticket
  63. width: 350px
  64. height: 450px
  65. border: 1px solid #d3d3d3
  66. margin: auto
  67. font-size: 8pt
  68. // background: linear-gradient(#BCED91 49%, transparent 49%),linear-gradient(to top right, white 33%, transparent 33%) 0 50%,white linear-gradient(45deg, white 33%, #BCED91 33%) 0 50%
  69. // background-repeat: repeat-x
  70. // background-size: 1px 100%, 40px 40px, 40px 40px
  71. </style>