This commit is contained in:
Alejandro Tasistro 2025-05-22 00:01:36 -03:00
parent b8390c4ac6
commit b46b56159b

View file

@ -45,61 +45,62 @@
</template> </template>
<script> <script>
import ProductoRow from "./ProductoRow.vue"; import ProductoRow from "./ProductoRow.vue";
export default { export default {
components: {ProductoRow}, components: { ProductoRow },
data() { data() {
return { return {
mostrar_tabla: false, mostrar_tabla: false,
cantidad_bonos_transporte: 0, cantidad_bonos_transporte: 0,
total_bonos_transporte: 0, total_bonos_transporte: 0,
devoluciones: 0, devoluciones: 0,
notas_devoluciones: "", notas_devoluciones: "",
notas_devoluciones_abbr: "", notas_devoluciones_abbr: "",
total: 0, total: 0,
productos: [], productos: [],
}
},
mounted() {
Event.$on('pedido-actualizado', this.pedidoActualizado);
Event.$on('toggle-chismosa', this.pedidoActualizado);
},
methods: {
pedidoActualizado: function () {
this.mostrar_tabla = this.$root.productos.length > 0;
this.cantidad_bonos_transporte = this.cantidadBonosDeTransporte();
this.total_bonos_transporte = this.totalBonosDeTransporte();
this.devoluciones = this.$root.pedido.devoluciones_total;
this.notas_devoluciones = this.$root.pedido.devoluciones_notas;
this.notas_devoluciones_abbr = this.notas_devoluciones.substring(0, 15);
if (this.notas_devoluciones.length > 15) {
this.notas_devoluciones_abbr += "...";
} }
this.total = this.$root.pedido.total;
this.productos = this.$root.productos;
}, },
mounted() { modificarDevoluciones: function () {
Event.$on('pedido-actualizado', this.pedidoActualizado); Event.$emit("modificar-devoluciones");
Event.$on('toggle-chismosa', this.pedidoActualizado);
}, },
methods: { cantidadBonosDeTransporte: function () {
pedidoActualizado: function() { return this.$root.pedido.cantidad_transporte;
this.mostrar_tabla = this.$root.productos.length > 0;
this.cantidad_bonos_transporte = this.cantidadBonosDeTransporte();
this.total_bonos_transporte = this.totalBonosDeTransporte();
this.devoluciones = this.$root.pedido.devoluciones_total;
this.notas_devoluciones = this.$root.pedido.devoluciones_notas;
this.notas_devoluciones_abbr = this.notas_devoluciones.substring(0, 15);
if (this.notas_devoluciones.length > 15) {
this.notas_devoluciones_abbr += "...";
}
this.total = this.$root.pedido.total;
this.productos = this.$root.productos;
},
modificarDevoluciones: function() {
Event.$emit("modificar-devoluciones");
},
cantidadBonosDeTransporte: function() {
return this.$root.pedido.cantidad_transporte;
},
totalBonosDeTransporte: function() {
return this.$root.pedido.total_transporte
},
}, },
} totalBonosDeTransporte: function () {
return this.$root.pedido.total_transporte
},
},
}
</script> </script>
<style> <style>
.tabla-chismosa { .tabla-chismosa {
width: 100%; width: 100%;
} }
.fixed-right {
position: fixed; .fixed-right {
overflow-y: auto; position: fixed;
max-height: 81vh; overflow-y: auto;
margin-right: 20px; max-height: 81vh;
} margin-right: 20px;
}
</style> </style>