StatementModify.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template lang="pug">
  2. .statement-modify
  3. .details-items
  4. form
  5. .form-item
  6. label.form-label Caja
  7. input.form-input(readonly='readonly' v-model="selectedStatement.name")
  8. .form-item
  9. label.form-label Diario
  10. input.form-input(readonly='readonly' v-model='getJournalSelectedStatement')
  11. .form-item
  12. label.form-label Tipo de Caja
  13. input.form-input(readonly='readonly' v-model="getTypeSelectedStatement")
  14. .form-item
  15. label.form-label Responsable
  16. input.form-input(readonly='readonly' v-model='getUserSelectedStatement')
  17. .details-items-line
  18. card-grid-item(
  19. :items='statementLines'
  20. @onClickUpdate='clickUpdate'
  21. @onClickDeleted='clickDeleted'
  22. )
  23. statement-line-modal(
  24. :show='showStatementLine'
  25. :line='lineSelected'
  26. :currencyStatement='currencyStatement'
  27. @onCancel='onCancel'
  28. )
  29. </template>
  30. <script>
  31. import { mapGetters, mapActions } from 'vuex'
  32. import {SwitchButtonInput, InputDropdown } from '../common'
  33. import CardGridItem from '@/components/steps/CardGridItem'
  34. import StatementLineModal from '../modal/StatementLineModal'
  35. export default {
  36. components: {
  37. SwitchButtonInput,
  38. InputDropdown,
  39. CardGridItem,
  40. StatementLineModal,
  41. },
  42. methods: {
  43. clickUpdate(value) {
  44. // console.log(value);
  45. this.selectLineSelected(value)
  46. this.showStatementLineModify(true)
  47. },
  48. clickDeleted(value, state) {
  49. this.addDeletedLine({'id':value, 'state': state})
  50. },
  51. onCancel(){
  52. this.showStatementLineModify(false)
  53. },
  54. ...mapActions([
  55. 'addDeletedLine',
  56. 'addUpdateLine',
  57. 'showStatementLineModify',
  58. 'selectLineSelected',
  59. ])
  60. },
  61. computed: mapGetters([
  62. 'selectedStatement',
  63. 'getJournalSelectedStatement',
  64. 'getTypeSelectedStatement',
  65. 'getUserSelectedStatement',
  66. 'statementLines',
  67. 'showStatementLine',
  68. 'lineSelected',
  69. 'currencyStatement',
  70. ]),
  71. }
  72. </script>
  73. <style lang="sass">
  74. @import '../../assets/variables'
  75. .statement-modify
  76. width: 100%
  77. height: calc(100% - 50px)
  78. .details-items
  79. width: 100%
  80. height: 200px
  81. form
  82. width: 100%
  83. height: 100%
  84. margin-right: 50px
  85. padding: 25px
  86. border: 1px solid$app-border-color
  87. // background: $app-bg-color
  88. .form-item
  89. width: 100%
  90. height: 35px
  91. margin-bottom: 5px
  92. margin-top: 5px
  93. text-align: center
  94. & > .form-label, > .form-input
  95. display: inline-block
  96. vertical-align: top
  97. .form-label
  98. width: 250px
  99. height: 35px
  100. font-size: 12pt
  101. line-height: 30px
  102. padding-left: 100px
  103. color: $app-dark-color
  104. .form-input
  105. width: 400px
  106. height: 35px
  107. font-size: 12pt
  108. border-radius: 0
  109. .details-items-line
  110. width: 100%
  111. height: calc(100% - 200px)
  112. </style>