2022-05-25 19:03:29 -03:00
|
|
|
<template>
|
2023-05-27 20:08:55 -03:00
|
|
|
<div>
|
|
|
|
<table v-show="productos.length != 0" class="chismosa-tabla table is-narrow is-striped is-bordered">
|
2022-05-25 19:03:29 -03:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Producto</th>
|
|
|
|
<th><abbr title="Cantidad">C</abbr></th>
|
|
|
|
<th><abbr title="Precio Total">$</abbr></th>
|
|
|
|
<th></th>
|
|
|
|
<th><abbr title="Eliminar"></abbr></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<th><abbr title="Bonos de Transporte">B. Transporte</abbr></th>
|
2023-09-09 13:32:49 -03:00
|
|
|
<th class="has-text-right">{{ cantidadBonosDeTransporte }}</th>
|
|
|
|
<th class="has-text-right">{{ totalBonosDeTransporte }}</th>
|
2022-05-25 19:03:29 -03:00
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
2024-07-11 18:59:47 -03:00
|
|
|
<tr v-if="this.$root.devoluciones">
|
2024-07-17 17:25:41 -03:00
|
|
|
<th><p>Devoluciones</p></th>
|
|
|
|
<td><p :title="this.$root.pedido.devoluciones_notas">...</p></td>
|
2023-10-04 22:47:42 -03:00
|
|
|
<th class="has-text-right">-{{ this.$root.pedido.devoluciones_total }}</th>
|
|
|
|
<th>
|
|
|
|
<button @click.capture="modificarDevoluciones()" class="button is-warning">
|
|
|
|
<span class="icon">
|
|
|
|
<i class="fas fa-edit"></i>
|
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
</th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
2022-05-25 19:03:29 -03:00
|
|
|
<tr>
|
|
|
|
<th>Total total</th>
|
|
|
|
<th></th>
|
2024-07-17 17:25:41 -03:00
|
|
|
<th class="has-text-right">{{ total }}</th>
|
2022-05-25 19:03:29 -03:00
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
<tbody>
|
2023-05-27 20:08:55 -03:00
|
|
|
<producto-row v-for="producto in productos" :producto="producto" :key="producto.id"></producto-row>
|
2022-05-25 19:03:29 -03:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2023-05-27 20:08:55 -03:00
|
|
|
<p class="has-text-centered" v-show="productos.length == 0">
|
|
|
|
Compa, todavía no agregaste nada a la chismosa.
|
|
|
|
</p>
|
2022-05-25 19:03:29 -03:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
computed: {
|
2023-05-27 20:08:55 -03:00
|
|
|
productos: function() {
|
2023-06-17 15:54:18 -03:00
|
|
|
return this.$root.productos
|
2023-05-27 20:08:55 -03:00
|
|
|
},
|
|
|
|
cantidadBonosDeTransporte: function() {
|
2023-09-09 13:32:49 -03:00
|
|
|
return this.$limpiarInt(this.$root.pedido.subtotal_bonos_de_transporte) / 15
|
2023-05-27 20:08:55 -03:00
|
|
|
},
|
|
|
|
totalBonosDeTransporte: function() {
|
2023-09-09 13:32:49 -03:00
|
|
|
return this.$limpiarInt(this.$root.pedido.subtotal_bonos_de_transporte)
|
2023-05-27 20:08:55 -03:00
|
|
|
},
|
|
|
|
total: function() {
|
2024-07-11 18:59:47 -03:00
|
|
|
return this.$limpiarInt(this.$root.devoluciones ? this.$root.pedido.total_menos_devoluciones : this.$root.pedido.total)
|
2022-05-25 19:03:29 -03:00
|
|
|
}
|
|
|
|
},
|
2023-10-04 22:47:42 -03:00
|
|
|
methods: {
|
|
|
|
modificarDevoluciones: function() {
|
|
|
|
Event.$emit("modificar-devoluciones");
|
|
|
|
},
|
|
|
|
}
|
2022-05-25 19:03:29 -03:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
2023-05-27 20:08:55 -03:00
|
|
|
@media (max-width: 719px) {
|
|
|
|
.chismosa-tabla {
|
|
|
|
max-width: 80vw;
|
2022-05-25 19:03:29 -03:00
|
|
|
}
|
2023-05-27 20:08:55 -03:00
|
|
|
}
|
2024-07-11 18:59:47 -03:00
|
|
|
</style>
|