App.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template lang="pug">
  2. .payments-purchase
  3. form-wizard( title="" subtitle="" finishButtonText="Finalizar" color="#7c7bad" backButtonText="Volver" :hideButtons='processingPaymentsPurchases' nextButtonText="Continuar" transition="fade" ref='wizard' @on-complete="paymentsPurchaseProcess()" @on-change="(prev, next) => setChangeTabSteps({prev,next})")
  4. tab-content(title="Quien es el proveedor ?" :beforeChange="checkPaymentsPurchasesSupplier")
  5. supplier
  6. tab-content(title="Cual es la factura ?" :beforeChange="checkPaymentsPurchasesInvoices")
  7. invoices
  8. tab-content(title="Que cuota es ?" :beforeChange="checkPaymentsPurchasesLinesPayments")
  9. moves-lines
  10. tab-content(title="Como vas a pagar ?" :beforeChange="checkPaymentsPurchasesJournals")
  11. payments
  12. </template>
  13. <script>
  14. import { mapActions, mapGetters } from 'vuex'
  15. import { FormWizard, TabContent} from 'vue-form-wizard'
  16. import 'vue-form-wizard/dist/vue-form-wizard.min.css'
  17. /* Step */
  18. import Supplier from '@@/steps/Supplier'
  19. import Invoices from '@@/steps/Invoices'
  20. import MovesLines from '@@/steps/MovesLines'
  21. import Payments from '@@/steps/payments'
  22. export default {
  23. components: {
  24. TabContent,
  25. FormWizard,
  26. Supplier,
  27. Invoices,
  28. MovesLines,
  29. Payments
  30. },
  31. computed: mapGetters([
  32. 'processingPaymentsPurchases',
  33. 'completedPaymentsPurchases'
  34. ]),
  35. methods: mapActions([
  36. 'initPaymentsPurchases',
  37. 'paymentsPurchaseProcess',
  38. 'checkPaymentsPurchasesSupplier',
  39. 'checkPaymentsPurchasesInvoices',
  40. 'checkPaymentsPurchasesLinesPayments',
  41. 'checkPaymentsPurchasesJournals',
  42. 'resetPaymentsPurchases',
  43. 'setChangeTabSteps'
  44. ]),
  45. watch: {
  46. completedPaymentsPurchases(value) {
  47. if ( value ){
  48. this.$refs.wizard.changeTab(3, 0, false)
  49. this.resetPaymentsPurchases()
  50. }
  51. }
  52. },
  53. mounted() {
  54. this.initPaymentsPurchases()
  55. }
  56. }
  57. </script>
  58. <style lang="sass">
  59. @import './assets/variables'
  60. .payments-purchase
  61. width: 100%
  62. height: 100%
  63. position: absolute
  64. .vue-form-wizard
  65. width: 100%
  66. height: 100%
  67. padding-bottom: 0
  68. .wizard-header
  69. display: none
  70. .wizard-navigation
  71. width: 100%
  72. height: 100%
  73. .wizard-progress-with-circle
  74. top: 35px
  75. .wizard-icon-circle
  76. width: 60px
  77. height: 60px
  78. .wizard-tab-content
  79. width: 100%
  80. height: calc(100% - 82px)
  81. padding: 0
  82. overflow: hidden
  83. .wizard-tab-container
  84. width: calc(100% - 20px)
  85. height: calc(100% - 20px)
  86. margin: 10px
  87. .payments-purchase-step
  88. width: 100%
  89. height: 100%
  90. background: $app-bg-color
  91. .wizard-card-footer
  92. width: 100%
  93. height: 50px
  94. position: absolute
  95. bottom: 0
  96. .wizard-btn
  97. width: 160px
  98. height: 40px
  99. border-radius: 0
  100. box-shadow: none
  101. border: none
  102. &:hover, &:focus
  103. background: $app-main-color
  104. </style>