Commit ab64fc7b312ef77f0172dea35eec0c7f8837aa34
1 parent
838be37ae1
Exists in
master
and in
1 other branch
Arreglo boton Pausar
Showing
1 changed file
with
11 additions
and
8 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -70,16 +70,16 @@ angular.module('focaAbmPreciosCondiciones') |
70 | 70 | $scope.mostrarPlazos = $routeParams.id > 0; |
71 | 71 | $scope.now = new Date(); |
72 | 72 | $scope.listaPrecioLabel = ''; |
73 | + $scope.precioCondicion = { | |
74 | + id: 0, | |
75 | + codigo: '', | |
76 | + nombre: '', | |
77 | + descripcion: '', | |
78 | + idListaPrecio: 0, | |
79 | + vigencia: new Date() | |
80 | + }; | |
73 | 81 | focaAbmPreciosCondicionesService.obtenerPrecioCondicion($routeParams.id) |
74 | 82 | .then(function(datos) { |
75 | - $scope.precioCondicion = { | |
76 | - id: 0, | |
77 | - codigo: '', | |
78 | - nombre: '', | |
79 | - descripcion: '', | |
80 | - idListaPrecio: 0, | |
81 | - vigencia: new Date() | |
82 | - }; | |
83 | 83 | if (datos.data.id) { |
84 | 84 | $scope.precioCondicion = datos.data; |
85 | 85 | $scope.listaPrecioLabel = datos.data.listaPrecio.ID.trim() + |
... | ... | @@ -259,6 +259,7 @@ angular.module('focaAbmPreciosCondiciones') |
259 | 259 | |
260 | 260 | //watch |
261 | 261 | $scope.$watch('precioCondicion', function(newValue) { |
262 | + console.log(newValue); | |
262 | 263 | focaBotoneraLateralService.setPausarData({ |
263 | 264 | label: 'precioCondicion', |
264 | 265 | val: newValue |
... | ... | @@ -266,7 +267,9 @@ angular.module('focaAbmPreciosCondiciones') |
266 | 267 | }, true); |
267 | 268 | |
268 | 269 | function setearPrecioCondicion(precioCondicion) { |
270 | + console.log('Datos 1: ',$scope.precioCondicion); | |
269 | 271 | $scope.precioCondicion = precioCondicion; |
272 | + console.log('Datos 2: ',$scope.precioCondicion); | |
270 | 273 | $scope.$broadcast('addCabecera', { |
271 | 274 | label: 'Precio y Condicion:', |
272 | 275 | valor: $filter('rellenarDigitos')(precioCondicion.id) |