Commit 2675dc494f750fe3d3b02ee3891776752779c862
Exists in
master
and in
1 other branch
Merge branch 'master' into 'develop'
Master See merge request !6
Showing
5 changed files
Show diff stats
src/js/controller-general-unidad.js
| ... | ... | @@ -146,6 +146,7 @@ angular.module('focaModalInforme') |
| 146 | 146 | if (key === 13) { |
| 147 | 147 | var parametrosModal = { |
| 148 | 148 | titulo: 'Búsqueda de Sector', |
| 149 | + searchText: $scope.params.sector.NOMBRE, | |
| 149 | 150 | query: '/sector', |
| 150 | 151 | columnas: [ |
| 151 | 152 | { |
| ... | ... | @@ -237,8 +238,6 @@ angular.module('focaModalInforme') |
| 237 | 238 | }); |
| 238 | 239 | return results; |
| 239 | 240 | } |
| 240 | - | |
| 241 | - | |
| 242 | 241 | } |
| 243 | 242 | ] |
| 244 | 243 | ); |
src/js/controller-hoja-ruta.js
| ... | ... | @@ -32,7 +32,6 @@ angular.module('focaModalInforme') |
| 32 | 32 | ] |
| 33 | 33 | }; |
| 34 | 34 | }, |
| 35 | - | |
| 36 | 35 | }; |
| 37 | 36 | $scope.generarInforme = function() { |
| 38 | 37 | focaModalInformeHojaRutaService |
| ... | ... | @@ -51,7 +50,6 @@ angular.module('focaModalInforme') |
| 51 | 50 | fechaDeReparto: $filter('date')(hojaRuta.fechaReparto, 'dd/MM/yyyy') |
| 52 | 51 | }; |
| 53 | 52 | }); |
| 54 | - | |
| 55 | 53 | //TODO: sacar id empresa hardcodeado |
| 56 | 54 | return focaModalInformeHojaRutaService.getEmpresa(1); |
| 57 | 55 | }) |
src/js/controller-litros-km-unidad.js
| ... | ... | @@ -57,7 +57,7 @@ angular.module('focaModalInforme') |
| 57 | 57 | field: 'kmRecorridos', |
| 58 | 58 | enableSorting: false, |
| 59 | 59 | cellClass: function(grid, row, col, rowRenderIndex, colRenderIndex) { |
| 60 | - if (!grid.getCellValue(row,col)) | |
| 60 | + if (!grid.getCellValue(row,col)) | |
| 61 | 61 | return 'd-none'; |
| 62 | 62 | } |
| 63 | 63 | }, |
| ... | ... | @@ -143,40 +143,43 @@ angular.module('focaModalInforme') |
| 143 | 143 | return focaModalService.modal(parametrosModal) |
| 144 | 144 | }; |
| 145 | 145 | |
| 146 | - $scope.seleccionarUnidad = function() { | |
| 147 | - $scope.seleccionarTransportista().then( | |
| 148 | - function(transportista) { | |
| 149 | - $scope.transportista = transportista; | |
| 150 | - var parametrosModal = { | |
| 151 | - titulo: 'Búsqueda de vehículos', | |
| 152 | - query: '/vehiculo/transportista/' + transportista.COD, | |
| 153 | - columnas: [ | |
| 154 | - { | |
| 155 | - propiedad: 'codigo', | |
| 156 | - nombre: 'Código' | |
| 157 | - }, | |
| 158 | - { | |
| 159 | - propiedad: 'tractor', | |
| 160 | - nombre: 'Tractor' | |
| 161 | - }, | |
| 162 | - { | |
| 163 | - propiedad: 'semi', | |
| 164 | - nombre: 'Semi' | |
| 165 | - }, | |
| 166 | - { | |
| 167 | - propiedad: 'tractor', | |
| 168 | - nombre: 'Tractor' | |
| 169 | - } | |
| 170 | - ], | |
| 171 | - size: 'md' | |
| 172 | - }; | |
| 173 | - focaModalService.modal(parametrosModal).then( | |
| 174 | - function(unidad) { | |
| 175 | - $scope.unidad = unidad; | |
| 176 | - }, function() { | |
| 177 | - $scope.seleccionarUnidad(); | |
| 178 | - }); | |
| 179 | - }); | |
| 146 | + $scope.seleccionarUnidad = function(key) { | |
| 147 | + if (key === 13) { | |
| 148 | + $scope.seleccionarTransportista().then( | |
| 149 | + function(transportista) { | |
| 150 | + $scope.transportista = transportista; | |
| 151 | + var parametrosModal = { | |
| 152 | + titulo: 'Búsqueda de vehículos', | |
| 153 | + searchText: $scope.unidad.codigo, | |
| 154 | + query: '/vehiculo/transportista/' + transportista.COD, | |
| 155 | + columnas: [ | |
| 156 | + { | |
| 157 | + propiedad: 'codigo', | |
| 158 | + nombre: 'Código' | |
| 159 | + }, | |
| 160 | + { | |
| 161 | + propiedad: 'tractor', | |
| 162 | + nombre: 'Tractor' | |
| 163 | + }, | |
| 164 | + { | |
| 165 | + propiedad: 'semi', | |
| 166 | + nombre: 'Semi' | |
| 167 | + }, | |
| 168 | + { | |
| 169 | + propiedad: 'tractor', | |
| 170 | + nombre: 'Tractor' | |
| 171 | + } | |
| 172 | + ], | |
| 173 | + size: 'md' | |
| 174 | + }; | |
| 175 | + focaModalService.modal(parametrosModal).then( | |
| 176 | + function(unidad) { | |
| 177 | + $scope.unidad = unidad; | |
| 178 | + }, function() { | |
| 179 | + $scope.seleccionarUnidad(); | |
| 180 | + }); | |
| 181 | + }); | |
| 182 | + } | |
| 180 | 183 | }; |
| 181 | 184 | $scope.volver = function() { |
| 182 | 185 | $scope.buscar = true; |
src/js/controller-productividad.js
| ... | ... | @@ -45,21 +45,21 @@ angular.module('focaModalInforme') |
| 45 | 45 | |
| 46 | 46 | if (value.indexOf('Vendedores') !== -1 || |
| 47 | 47 | value.indexOf('Cobradores') !== -1 || |
| 48 | - value.indexOf('Transportistas') !== -1) | |
| 48 | + value.indexOf('Transportistas') !== -1) | |
| 49 | 49 | return 'yellow w-100'; |
| 50 | 50 | if (value.indexOf('Vendedor:') !== -1 || |
| 51 | 51 | value.indexOf('Cobrador:') !== -1 || |
| 52 | - value.indexOf('Transportista:') !== -1) | |
| 52 | + value.indexOf('Transportista:') !== -1) | |
| 53 | 53 | return 'red w-100'; |
| 54 | - if (value.indexOf('Fecha:') !== -1) | |
| 54 | + if (value.indexOf('Fecha:') !== -1) | |
| 55 | 55 | return 'green w-100'; |
| 56 | 56 | } |
| 57 | 57 | }, |
| 58 | - { | |
| 58 | + { | |
| 59 | 59 | field: 'fecha', |
| 60 | 60 | enableSorting: false, |
| 61 | 61 | cellClass: function(grid, row, col) { |
| 62 | - if (!grid.getCellValue(row,col)) | |
| 62 | + if (!grid.getCellValue(row,col)) | |
| 63 | 63 | return 'd-none'; |
| 64 | 64 | } |
| 65 | 65 | }, |
| ... | ... | @@ -67,15 +67,15 @@ angular.module('focaModalInforme') |
| 67 | 67 | field: 'kmRecorridos', |
| 68 | 68 | enableSorting: false, |
| 69 | 69 | cellClass: function(grid, row, col) { |
| 70 | - if (!grid.getCellValue(row,col)) | |
| 70 | + if (!grid.getCellValue(row,col)) | |
| 71 | 71 | return 'd-none'; |
| 72 | 72 | } |
| 73 | 73 | }, |
| 74 | - { | |
| 74 | + { | |
| 75 | 75 | field: 'geolocalizacion', |
| 76 | 76 | enableSorting: false, |
| 77 | 77 | cellClass: function(grid, row, col) { |
| 78 | - if (!grid.getCellValue(row,col)) | |
| 78 | + if (!grid.getCellValue(row,col)) | |
| 79 | 79 | return 'd-none'; |
| 80 | 80 | } |
| 81 | 81 | } |
| ... | ... | @@ -175,8 +175,8 @@ angular.module('focaModalInforme') |
| 175 | 175 | geolocalizacion; |
| 176 | 176 | remito.hojaRutaMovimiento.forEach(function(movimiento) { |
| 177 | 177 | kms += movimiento.seguimiento.kmRecorridos || 0; |
| 178 | - geolocalizacion = geolocalizacion || | |
| 179 | - movimiento.seguimiento.latitud + ', ' + | |
| 178 | + geolocalizacion = geolocalizacion || | |
| 179 | + movimiento.seguimiento.latitud + ', ' + | |
| 180 | 180 | movimiento.seguimiento.longitud; |
| 181 | 181 | }); |
| 182 | 182 | result.push({ |
| ... | ... | @@ -194,7 +194,6 @@ angular.module('focaModalInforme') |
| 194 | 194 | }); |
| 195 | 195 | }; |
| 196 | 196 | |
| 197 | - | |
| 198 | 197 | $scope.volver = function() { |
| 199 | 198 | $scope.buscar = true; |
| 200 | 199 | }; |
| ... | ... | @@ -204,7 +203,6 @@ angular.module('focaModalInforme') |
| 204 | 203 | $scope.clearEntidad = function() { |
| 205 | 204 | $scope.params.entidad = undefined; |
| 206 | 205 | }; |
| 207 | - | |
| 208 | 206 | } |
| 209 | 207 | ] |
| 210 | 208 | ); |
src/js/controller-reparto-optimo.js
| ... | ... | @@ -43,17 +43,17 @@ angular.module('focaModalInforme') |
| 43 | 43 | cellClass: function(grid, row, col) { |
| 44 | 44 | if (grid.getCellValue(row,col).indexOf('Sector:') !== -1) |
| 45 | 45 | return 'yellow w-100'; |
| 46 | - if (grid.getCellValue(row,col).indexOf('Producto:') !== -1) | |
| 46 | + if (grid.getCellValue(row,col).indexOf('Producto:') !== -1) | |
| 47 | 47 | return 'red w-100'; |
| 48 | - if (grid.getCellValue(row,col).indexOf('Fecha:') !== -1) | |
| 48 | + if (grid.getCellValue(row,col).indexOf('Fecha:') !== -1) | |
| 49 | 49 | return 'green w-100'; |
| 50 | 50 | } |
| 51 | 51 | }, |
| 52 | - { | |
| 52 | + { | |
| 53 | 53 | field: 'ltsRepartidos', |
| 54 | 54 | enableSorting: false, |
| 55 | 55 | cellClass: function(grid, row, col) { |
| 56 | - if (!grid.getCellValue(row,col)) | |
| 56 | + if (!grid.getCellValue(row,col)) | |
| 57 | 57 | return 'd-none'; |
| 58 | 58 | } |
| 59 | 59 | }, |
| ... | ... | @@ -61,23 +61,23 @@ angular.module('focaModalInforme') |
| 61 | 61 | field: 'ltsOptimos', |
| 62 | 62 | enableSorting: false, |
| 63 | 63 | cellClass: function(grid, row, col) { |
| 64 | - if (!grid.getCellValue(row,col)) | |
| 64 | + if (!grid.getCellValue(row,col)) | |
| 65 | 65 | return 'd-none'; |
| 66 | 66 | } |
| 67 | 67 | }, |
| 68 | - { | |
| 68 | + { | |
| 69 | 69 | field: 'diferencia', |
| 70 | 70 | enableSorting: false, |
| 71 | 71 | cellClass: function(grid, row, col) { |
| 72 | - if (!grid.getCellValue(row,col)) | |
| 72 | + if (!grid.getCellValue(row,col)) | |
| 73 | 73 | return 'd-none'; |
| 74 | 74 | } |
| 75 | 75 | }, |
| 76 | - { | |
| 76 | + { | |
| 77 | 77 | field: 'porcentaje', |
| 78 | 78 | enableSorting: false, |
| 79 | 79 | cellClass: function(grid, row, col) { |
| 80 | - if (!grid.getCellValue(row,col)) | |
| 80 | + if (!grid.getCellValue(row,col)) | |
| 81 | 81 | return 'd-none'; |
| 82 | 82 | } |
| 83 | 83 | } |
| ... | ... | @@ -157,11 +157,11 @@ angular.module('focaModalInforme') |
| 157 | 157 | }); |
| 158 | 158 | }; |
| 159 | 159 | |
| 160 | - | |
| 161 | 160 | $scope.seleccionarSector = function(key) { |
| 162 | 161 | if (key === 13) { |
| 163 | 162 | var parametrosModal = { |
| 164 | 163 | titulo: 'Búsqueda de Sector', |
| 164 | + searchText: $scope.params.sector.NOMBRE, | |
| 165 | 165 | query: '/sector', |
| 166 | 166 | columnas: [ |
| 167 | 167 | { |