PaymentCreditAmount.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template lang="pug">
  2. form.payment-credit-form
  3. .payment-credit-form-separator
  4. h3 Detalles de la Entrega
  5. hr
  6. .payment-amount-item
  7. label.payment-label Monto entregado
  8. input.payment-input(:value="paid" v-model="paid" autofocus)
  9. .payment-credit-form-separator
  10. h3 Pagos Pendientes
  11. hr
  12. .payment-credit-form-table
  13. table
  14. thead
  15. td
  16. th Fecha de Pago
  17. th Monto a pagar
  18. </template>
  19. <script>
  20. import { mapGetters, mapActions } from 'vuex'
  21. export default {
  22. computed: {
  23. paid: {
  24. get() {
  25. return accounting.formatMoney(this.amountPaid, this.currencySymbol, 0, '.', ',')
  26. },
  27. set(value) {
  28. value = accounting.unformat(value, ',')
  29. this.changeAmountPaid(value)
  30. }
  31. },
  32. ...mapGetters([
  33. 'total',
  34. 'currencySymbol',
  35. 'amountPaid'
  36. ])
  37. },
  38. methods: {
  39. formatTotal() {
  40. return accounting.formatMoney(this.total, this.currencySymbol, 0, '.', ',')
  41. },
  42. ...mapActions([
  43. 'changeAmountPaid'
  44. ])
  45. },
  46. mounted() {
  47. this.changeAmountPaid(0)
  48. }
  49. }
  50. </script>
  51. <style lang="sass">
  52. .payment-credit-form
  53. width: calc(100% - 450px)
  54. height: 100%
  55. margin-right: 50px
  56. padding: 35px
  57. background: #f5f5f5
  58. .payment-credit-form-separator
  59. h3
  60. color: #9e9e9e
  61. font-size: 8pt
  62. hr
  63. margin-top: 5px
  64. .result-separator
  65. margin: 30px 165px 30px 250px
  66. border-top: 1px solid #bdbdbd
  67. .payment-amount-item
  68. width: 100%
  69. height: 45px
  70. margin-bottom: 15px
  71. .payment-label
  72. width: 250px
  73. height: 45px
  74. font-size: 14pt
  75. .payment-input
  76. width: 350px
  77. height: 45px
  78. font-size: 24pt
  79. border-radius: 0
  80. text-align: right
  81. .payment-credit-form-table
  82. width: 100%
  83. height: 250px
  84. border: 1px solid #d3d3d3
  85. table
  86. width: 100%
  87. td
  88. height: 35px
  89. thead
  90. th
  91. line-height: 35px
  92. padding-left: 10px
  93. th:nth-child(1)
  94. width: 250px
  95. th:nth-child(2)
  96. width: 200px
  97. </style>