forked from nathalie/pedi2
Borrar producto de chismosa
This commit is contained in:
parent
fba73636de
commit
1779f573ec
|
@ -17,11 +17,11 @@ class SubpedidoResource extends JsonResource
|
|||
return [
|
||||
'id' => $this->id,
|
||||
'nombre' => $this->nombre,
|
||||
'subtotal_productos' => number_format($this->getSubtotalProductos(),2),
|
||||
'subtotal_bonos' => number_format($this->getSubtotalBonos(),2),
|
||||
'subtotal_productos' => number_format($this->getSubtotalProductos(),0),
|
||||
'subtotal_bonos' => number_format($this->getSubtotalBonos(),0),
|
||||
'bonos_de_transporte' => $this->cantidadBDT(),
|
||||
'subtotal_bonos_de_transporte' => number_format($this->getSubtotalBDT(),2),
|
||||
'total' => number_format($this->getTotal(),2),
|
||||
'subtotal_bonos_de_transporte' => number_format($this->getSubtotalBDT(),0),
|
||||
'total' => number_format($this->getTotal(),0),
|
||||
'grupo_de_compra' => $this->grupoDeCompra,
|
||||
'productos' => $this->productos
|
||||
];
|
||||
|
|
|
@ -4,7 +4,7 @@ Vue.component('chismosa', {
|
|||
<table class="table is-fullwidth is-striped is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><abbr title="Producto">Prod</abbr></th>
|
||||
<th>Producto</th>
|
||||
<th><abbr title="Cantidad">C</abbr></th>
|
||||
<th><abbr title="Precio Total">$</abbr></th>
|
||||
<th></th>
|
||||
|
@ -13,7 +13,7 @@ Vue.component('chismosa', {
|
|||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th><abbr title="Bonos de Transporte">BTR</abbr></th>
|
||||
<th><abbr title="Bonos de Transporte">B. Transporte</abbr></th>
|
||||
<th>{{ this.subpedido.bonos_de_transporte }}</th>
|
||||
<th>{{ this.subpedido.subtotal_bonos_de_transporte }}</th>
|
||||
<th></th>
|
||||
|
@ -82,7 +82,7 @@ Vue.component('producto-row', {
|
|||
<i class="fas fa-edit"></i>
|
||||
</span>
|
||||
</button></td>
|
||||
<td><button class="button is-danger">
|
||||
<td><button @click.capture="eliminarProducto(producto)" class="button is-danger">
|
||||
<span class="icon">
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</span>
|
||||
|
@ -95,6 +95,10 @@ Vue.component('producto-row', {
|
|||
methods: {
|
||||
seleccionarProducto(producto) {
|
||||
Event.$emit("producto-seleccionado",producto);
|
||||
},
|
||||
eliminarProducto(producto) {
|
||||
Event.$emit("sync-subpedido", 0, this.producto.id);
|
||||
Event.$emit("sync-subpedido");
|
||||
}
|
||||
}
|
||||
})
|
Loading…
Reference in New Issue