Commit 452c4b9fc40033f686a93f259dfd42e44a36679e
1 parent
ee52eb146f
Exists in
master
agrego boton ver productos en detalles remito
Showing
2 changed files
with
38 additions
and
7 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -360,14 +360,36 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
| 360 | 360 | focaModalService.confirm('¿Está seguro que desea desasociar este remito del' + |
| 361 | 361 | ' vehículo?').then(function() { |
| 362 | 362 | focaCrearHojaRutaService.desasociarRemitos(idsRemito, |
| 363 | - $scope.hojaRuta.vehiculo.id, $scope.hojaRuta.remitosTabla.length <= 1).then( | |
| 364 | - function() { | |
| 363 | + $scope.hojaRuta.vehiculo.id, $scope.hojaRuta.remitosTabla.length <= 1) | |
| 364 | + .then(function() { | |
| 365 | 365 | $scope.hojaRuta.remitosTabla.splice(key, 1); |
| 366 | 366 | focaModalService.alert('Remito desasociado con éxito'); |
| 367 | - } | |
| 368 | - ); | |
| 367 | + }); | |
| 369 | 368 | }); |
| 370 | 369 | }; |
| 370 | + | |
| 371 | + $scope.verProductosRemito = function(idRemito) { | |
| 372 | + var parametrosModal = { | |
| 373 | + titulo: 'Articulos remito', | |
| 374 | + query: '/articulos/remito/' + idRemito, | |
| 375 | + soloMostrar: true, | |
| 376 | + columnas: [ | |
| 377 | + { | |
| 378 | + nombre: 'Código', | |
| 379 | + propiedad: 'codigo' | |
| 380 | + }, | |
| 381 | + { | |
| 382 | + nombre: 'Descripción', | |
| 383 | + propiedad: 'descripcion' | |
| 384 | + }, | |
| 385 | + { | |
| 386 | + nombre: 'Cantidad', | |
| 387 | + propiedad: 'cantidad' | |
| 388 | + } | |
| 389 | + ] | |
| 390 | + }; | |
| 391 | + focaModalService.modal(parametrosModal).then(); | |
| 392 | + }; | |
| 371 | 393 | |
| 372 | 394 | function elegirFecha() { |
| 373 | 395 | var fechaEntrega = { |
src/views/hoja-ruta.html
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 | <th class="col-2">Remito</th> |
| 23 | 23 | <th class="col">Cliente</th> |
| 24 | 24 | <th class="col">Dirección</th> |
| 25 | + <th class="col-auto"></th> | |
| 25 | 26 | <th class="col-auto"> |
| 26 | 27 | <button |
| 27 | 28 | class="btn btn-outline-light selectable" |
| ... | ... | @@ -40,7 +41,6 @@ |
| 40 | 41 | </i> |
| 41 | 42 | </button> |
| 42 | 43 | </th> |
| 43 | - </th> | |
| 44 | 44 | </tr> |
| 45 | 45 | </thead> |
| 46 | 46 | <tbody class="tabla-articulo-body"> |
| ... | ... | @@ -52,14 +52,23 @@ |
| 52 | 52 | <td ng-bind="key + 1" class="col-auto"></td> |
| 53 | 53 | <td |
| 54 | 54 | class="col-2" |
| 55 | - ng-bind="rellenar(remito.sucursal, 4) + '-' + rellenar(remito.numeroRemito, 8)" | |
| 56 | - ></td> | |
| 55 | + >{{remito.sucursal | rellenarDigitos: 4}}-{{remito.numeroRemito | rellenarDigitos: 8}}</td> | |
| 57 | 56 | <th class="col" ng-bind="remito.nombreCliente"></th> |
| 58 | 57 | <th class="col" ng-bind="remito.domicilioStamp"></th> |
| 59 | 58 | <td class="text-center col-auto"> |
| 60 | 59 | <button |
| 61 | 60 | class="btn btn-outline-light" |
| 61 | + ng-click="verProductosRemito(remito.id)" | |
| 62 | + title="Ver productos" | |
| 63 | + > | |
| 64 | + <i class="fa fa-eye"></i> | |
| 65 | + </button> | |
| 66 | + </td> | |
| 67 | + <td class="text-center col-auto"> | |
| 68 | + <button | |
| 69 | + class="btn btn-outline-light" | |
| 62 | 70 | ng-click="desasociarRemito(key, remito.id)" |
| 71 | + title="Eliminar" | |
| 63 | 72 | > |
| 64 | 73 | <i class="fa fa-trash"></i> |
| 65 | 74 | </button> |