CustomerDetails.vue 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template lang="pug">
  2. .customer-details
  3. form.form-customer-display
  4. .form-separatoe
  5. h3 Detalles Generales
  6. hr
  7. .form-item-payments
  8. label.form-label Nombre
  9. input.form-input(:value="customer.name || ''" readonly)
  10. .form-item-payments
  11. label.form-label R.U.C/C.I.Nº
  12. input.form-input(:value="customer.ruc || ''" readonly)
  13. .form-item-payments
  14. label.form-label Celular
  15. input.form-input(:value="customer.phone || ''" readonly)
  16. .form-item-payments
  17. label.form-label Teléfono
  18. input.form-input(:value="customer.mobile || ''" readonly)
  19. .form-item-payments
  20. label.form-label Email
  21. input.form-input(:value="customer.email || ''" readonly)
  22. .form-separatoe
  23. h3 Finanzas
  24. hr
  25. .form-item-payments
  26. label.form-label Débito
  27. input.form-input(:value="customer.credit | currency(...currencyCompany)" readonly)
  28. .form-item-payments
  29. label.form-label Crédito
  30. input.form-input(:value="customer.creditLimit | currency(...currencyCompany)" readonly)
  31. </template>
  32. <script>
  33. export default {
  34. props: {
  35. customer: {
  36. type: Object,
  37. default: {
  38. name: '',
  39. ruc: '',
  40. phone: '',
  41. mobile: '',
  42. email: '',
  43. credit: 0,
  44. creditLimit: 0,
  45. symbolPosition: 'before'
  46. }
  47. },
  48. currencyCompany: {
  49. type: Object,
  50. default: {
  51. name: '',
  52. symbol: '',
  53. rateSilent: 0,
  54. thousandsSeparator: '.',
  55. decimalSeparator: ',',
  56. decimalPlaces: 0
  57. }
  58. }
  59. },
  60. // methods: {
  61. // // getCurrencyFormat(item) {
  62. // // // return item.toFixed(0).replace(".", ",").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1'+'.')
  63. // // // return this.currency.symbol+" "+item.toFixed(this.currency.decimalPlaces).replace(".", ",").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1'+this.currency.thousandsSeparator)
  64. // // },
  65. // }
  66. }
  67. </script>
  68. <style lang="sass">
  69. @import '../../assets/variables'
  70. .customer-details
  71. width: 320px
  72. height: 100%
  73. .form-customer-display
  74. width: 320px
  75. height: 100%
  76. padding: 15px
  77. .form-separatoe
  78. h3
  79. color: $app-separator-color
  80. font-size: 8pt
  81. hr
  82. .form-item-payments
  83. width: 100%
  84. height: 35px
  85. margin-bottom: 10px
  86. .form-label
  87. width: 30%
  88. height: 35px
  89. font-size: 10pt
  90. .form-input
  91. width: 70%
  92. height: 35px
  93. font-size: 10pt
  94. </style>