Commit 37887c105f72104a0bfefd04c836f320c0cd50f3
1 parent
3113efb7e5
Exists in
master
and in
1 other branch
Cambio en estilo de selector de fecha, botones.
Showing
2 changed files
with
54 additions
and
38 deletions
Show diff stats
src/js/controller.js
| 1 | angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoController', [ | 1 | angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoController', [ |
| 2 | '$scope', '$timeout', 'focaAdminSeguimientoService', '$uibModal', | 2 | '$scope', '$timeout', 'focaAdminSeguimientoService', '$uibModal', |
| 3 | 'focaBotoneraLateralService', '$location', '$routeParams', 'focaModalService', | 3 | 'focaBotoneraLateralService', '$location', '$routeParams', 'focaModalService', |
| 4 | function ($scope, $timeout, focaAdminSeguimientoService, $uibModal, | 4 | function ($scope, $timeout, focaAdminSeguimientoService, $uibModal, |
| 5 | focaBotoneraLateralService, $location, $routeParams, focaModalService) { | 5 | focaBotoneraLateralService, $location, $routeParams, focaModalService) { |
| 6 | $scope.actividad = ''; | 6 | $scope.actividad = ''; |
| 7 | $scope.titulo = ''; | 7 | $scope.titulo = ''; |
| 8 | var cabecera = ''; | 8 | var cabecera = ''; |
| 9 | var plural = ''; | 9 | var plural = ''; |
| 10 | 10 | ||
| 11 | $scope.now = new Date(); | 11 | $scope.now = new Date(); |
| 12 | $scope.dateOptions = { | 12 | $scope.dateOptions = { |
| 13 | maxDate: new Date() | 13 | maxDate: new Date() |
| 14 | }; | 14 | }; |
| 15 | 15 | ||
| 16 | switch ($routeParams.parametro) { | 16 | switch ($routeParams.parametro) { |
| 17 | case 'nota-pedido': | 17 | case 'nota-pedido': |
| 18 | $scope.actividad = 'Nota de pedido'; | 18 | $scope.actividad = 'Nota de pedido'; |
| 19 | $scope.titulo = 'Seguimiento de nota de pedido'; | 19 | $scope.titulo = 'Seguimiento de nota de pedido'; |
| 20 | cabecera = 'Vendedor:'; | 20 | cabecera = 'Vendedor:'; |
| 21 | plural = 'Vendedores'; | 21 | plural = 'Vendedores'; |
| 22 | break; | 22 | break; |
| 23 | case 'hoja-ruta': | 23 | case 'hoja-ruta': |
| 24 | $scope.actividad = 'Entrega de producto'; | 24 | $scope.actividad = 'Entrega de producto'; |
| 25 | $scope.titulo = 'Seguimiento de hoja de ruta'; | 25 | $scope.titulo = 'Seguimiento de hoja de ruta'; |
| 26 | cabecera = 'Vehiculo:'; | 26 | cabecera = 'Vehiculo:'; |
| 27 | plural = 'Vehiculos'; | 27 | plural = 'Vehiculos'; |
| 28 | break; | 28 | break; |
| 29 | case 'cobranza': | 29 | case 'cobranza': |
| 30 | $scope.actividad = 'Cobranza'; | 30 | $scope.actividad = 'Cobranza'; |
| 31 | $scope.titulo = 'Seguimiento de cobranza'; | 31 | $scope.titulo = 'Seguimiento de cobranza'; |
| 32 | cabecera = 'Cobrador:'; | 32 | cabecera = 'Cobrador:'; |
| 33 | plural = 'Cobradores'; | 33 | plural = 'Cobradores'; |
| 34 | break; | 34 | break; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | $scope.idUsuario = 0; | 37 | $scope.idUsuario = 0; |
| 38 | $scope.marcadores = []; | 38 | $scope.marcadores = []; |
| 39 | getSeguimiento(); | 39 | getSeguimiento(); |
| 40 | 40 | ||
| 41 | //SETEO BOTONERA LATERAL | 41 | //SETEO BOTONERA LATERAL |
| 42 | focaBotoneraLateralService.showSalir(true); | 42 | focaBotoneraLateralService.showSalir(true); |
| 43 | focaBotoneraLateralService.showPausar(false); | 43 | focaBotoneraLateralService.showPausar(false); |
| 44 | focaBotoneraLateralService.showGuardar(false); | 44 | focaBotoneraLateralService.showGuardar(false); |
| 45 | 45 | ||
| 46 | $scope.general = function () { | 46 | $scope.general = function () { |
| 47 | $scope.idUsuario = 0; | 47 | $scope.idUsuario = 0; |
| 48 | getSeguimiento(); | 48 | getSeguimiento(); |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | $scope.individual = function () { | 51 | $scope.individual = function () { |
| 52 | $scope.idUsuario = -1; | 52 | $scope.idUsuario = -1; |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | $scope.salir = function () { | 55 | $scope.salir = function () { |
| 56 | $location.path('/'); | 56 | $location.path('/'); |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | $scope.search = function (key) { | 59 | $scope.search = function (key) { |
| 60 | if (key === 13) { | 60 | if (key === 13) { |
| 61 | $scope.idUsuario = $scope.idUsuarioInput; | 61 | $scope.idUsuario = $scope.idUsuarioInput; |
| 62 | 62 | ||
| 63 | getSeguimiento(); | 63 | getSeguimiento(); |
| 64 | if ($scope.actividad === 'Entrega de producto' && $scope.idUsuario !== 0) { | 64 | if ($scope.actividad === 'Entrega de producto' && $scope.idUsuario !== 0) { |
| 65 | focaAdminSeguimientoService.obtenerRemitosVehiculo($scope.idUsuario) | 65 | focaAdminSeguimientoService.obtenerRemitosVehiculo($scope.idUsuario) |
| 66 | .then(function (res) { | 66 | .then(function (res) { |
| 67 | var remitos = []; | 67 | var remitos = []; |
| 68 | for (var i = 0; i < res.data.length; i++) { | 68 | for (var i = 0; i < res.data.length; i++) { |
| 69 | remitos = remitos.concat(res.data[i].remitos); | 69 | remitos = remitos.concat(res.data[i].remitos); |
| 70 | } | 70 | } |
| 71 | $scope.remitosVehiculo = remitos; | 71 | $scope.remitosVehiculo = remitos; |
| 72 | }); | 72 | }); |
| 73 | } | 73 | } |
| 74 | } | 74 | } |
| 75 | }; | 75 | }; |
| 76 | 76 | ||
| 77 | $scope.fecha = function () { | 77 | $scope.fecha = function () { |
| 78 | getSeguimiento(); | 78 | getSeguimiento(); |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | $scope.showMarcadores = function () { | 81 | $scope.showMarcadores = function () { |
| 82 | var texto = ''; | 82 | var texto = ''; |
| 83 | 83 | ||
| 84 | if ($scope.actividad === 'Nota de pedido') { | 84 | if ($scope.actividad === 'Nota de pedido') { |
| 85 | texto = 'Marcadores de notas de pedido'; | 85 | texto = 'Marcadores de notas de pedido'; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | if ($scope.actividad === 'Entrega de producto') { | 88 | if ($scope.actividad === 'Entrega de producto') { |
| 89 | texto = 'Marcadores de entregas'; | 89 | texto = 'Marcadores de entregas'; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | if ($scope.actividad === 'Cobranza') { | 92 | if ($scope.actividad === 'Cobranza') { |
| 93 | texto = 'Marcadores de cobranzas'; | 93 | texto = 'Marcadores de cobranzas'; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | 96 | ||
| 97 | var modalInstance = $uibModal.open( | 97 | var modalInstance = $uibModal.open( |
| 98 | { | 98 | { |
| 99 | ariaLabelledBy: texto, | 99 | ariaLabelledBy: texto, |
| 100 | templateUrl: 'foca-modal-marcadores.html', | 100 | templateUrl: 'foca-modal-marcadores.html', |
| 101 | controller: 'focaModalMarcadoresController', | 101 | controller: 'focaModalMarcadoresController', |
| 102 | size: 'lg', | 102 | size: 'lg', |
| 103 | resolve: { | 103 | resolve: { |
| 104 | parametros: function () { | 104 | parametros: function () { |
| 105 | var parametros = { | 105 | var parametros = { |
| 106 | marcadores: $scope.marcadores, | 106 | marcadores: $scope.marcadores, |
| 107 | actividad: $scope.actividad | 107 | actividad: $scope.actividad |
| 108 | }; | 108 | }; |
| 109 | 109 | ||
| 110 | return parametros; | 110 | return parametros; |
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | } | 113 | } |
| 114 | ); | 114 | ); |
| 115 | 115 | ||
| 116 | modalInstance.result.then( | 116 | modalInstance.result.then( |
| 117 | function (localizacion) { | 117 | function (localizacion) { |
| 118 | $scope.$broadcast('moveMap', { | 118 | $scope.$broadcast('moveMap', { |
| 119 | latitud: localizacion.latitud, | 119 | latitud: localizacion.latitud, |
| 120 | longitud: localizacion.longitud, | 120 | longitud: localizacion.longitud, |
| 121 | indice: localizacion.indice | 121 | indice: localizacion.indice |
| 122 | }); | 122 | }); |
| 123 | }, function () { | 123 | }, function () { |
| 124 | // funcion ejecutada cuando se cancela el modal | 124 | // funcion ejecutada cuando se cancela el modal |
| 125 | } | 125 | } |
| 126 | ); | 126 | ); |
| 127 | }; | 127 | }; |
| 128 | 128 | ||
| 129 | function getSeguimiento() { | 129 | function getSeguimiento() { |
| 130 | var now = $scope.now; | 130 | var now = $scope.now; |
| 131 | var hasta = angular.copy(now); | 131 | var hasta = angular.copy(now); |
| 132 | hasta.setDate(hasta.getDate() + 1); | 132 | hasta.setDate(hasta.getDate() + 1); |
| 133 | 133 | ||
| 134 | var datos = { | 134 | var datos = { |
| 135 | actividad: $scope.actividad, | 135 | actividad: $scope.actividad, |
| 136 | idUsuario: $scope.idUsuario, | 136 | idUsuario: $scope.idUsuario, |
| 137 | fechaDesde: now, | 137 | fechaDesde: now, |
| 138 | fechaHasta: hasta, | 138 | fechaHasta: hasta, |
| 139 | entregado: $scope.filtroEstado ? true : ($scope.filtroEstado !== undefined ? | 139 | entregado: $scope.filtroEstado ? true : ($scope.filtroEstado !== undefined ? |
| 140 | false : undefined) | 140 | false : undefined) |
| 141 | }; | 141 | }; |
| 142 | 142 | ||
| 143 | $scope.datosBuscados = { | 143 | $scope.datosBuscados = { |
| 144 | actividad: $scope.actividad, | 144 | actividad: $scope.actividad, |
| 145 | individual: $scope.idUsuario !== 0 ? true : false | 145 | individual: $scope.idUsuario !== 0 ? true : false |
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | focaAdminSeguimientoService | 148 | focaAdminSeguimientoService |
| 149 | .obtenerActividad(datos) | 149 | .obtenerActividad(datos) |
| 150 | .then(function (datos) { | 150 | .then(function (datos) { |
| 151 | $scope.marcadores = datos.data; | 151 | $scope.marcadores = datos.data; |
| 152 | $scope.$broadcast('cleanCabecera'); | 152 | $scope.$broadcast('cleanCabecera'); |
| 153 | 153 | ||
| 154 | if ($scope.idUsuario !== 0) { | 154 | if ($scope.idUsuario !== 0) { |
| 155 | $scope.$broadcast('addCabecera', { | 155 | $scope.$broadcast('addCabecera', { |
| 156 | label: 'Individual', | 156 | label: 'Individual', |
| 157 | valor: '' | 157 | valor: '' |
| 158 | }); | 158 | }); |
| 159 | 159 | ||
| 160 | var valor = ''; | 160 | var valor = ''; |
| 161 | switch ($routeParams.parametro) { | 161 | switch ($routeParams.parametro) { |
| 162 | case 'nota-pedido': | 162 | case 'nota-pedido': |
| 163 | if (datos.data.length) { | 163 | if (datos.data.length) { |
| 164 | valor = datos.data[0].notaPedido.vendedor.NUM + ' - ' + | 164 | valor = datos.data[0].notaPedido.vendedor.NUM + ' - ' + |
| 165 | datos.data[0].notaPedido.vendedor.NOM.trim(); | 165 | datos.data[0].notaPedido.vendedor.NOM.trim(); |
| 166 | } else { | 166 | } else { |
| 167 | valor = $scope.idUsuario; | 167 | valor = $scope.idUsuario; |
| 168 | } | 168 | } |
| 169 | break; | 169 | break; |
| 170 | case 'hoja-ruta': | 170 | case 'hoja-ruta': |
| 171 | if (datos.data.length) { | 171 | if (datos.data.length) { |
| 172 | valor = datos.data[0].hojaRutaMovimiento.remito.hojaRuta | 172 | valor = datos.data[0].hojaRutaMovimiento.remito.hojaRuta |
| 173 | .vehiculo.codigo + ' - ' + datos.data[0] | 173 | .vehiculo.codigo + ' - ' + datos.data[0] |
| 174 | .hojaRutaMovimiento.remito.hojaRuta.vehiculo.tractor.trim(); | 174 | .hojaRutaMovimiento.remito.hojaRuta.vehiculo.tractor.trim(); |
| 175 | } else { | 175 | } else { |
| 176 | valor = $scope.idUsuario; | 176 | valor = $scope.idUsuario; |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | break; | 179 | break; |
| 180 | case 'cobranza': | 180 | case 'cobranza': |
| 181 | if (datos.data.length) { | 181 | if (datos.data.length) { |
| 182 | valor = datos.data[0].recibo.cobrador.NUM + ' - ' + | 182 | valor = datos.data[0].recibo.cobrador.NUM + ' - ' + |
| 183 | datos.data[0].recibo.cobrador.NOM.trim(); | 183 | datos.data[0].recibo.cobrador.NOM.trim(); |
| 184 | } else { | 184 | } else { |
| 185 | valor = $scope.idUsuario; | 185 | valor = $scope.idUsuario; |
| 186 | } | 186 | } |
| 187 | break; | 187 | break; |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | $scope.$broadcast('addCabecera', { | 190 | $scope.$broadcast('addCabecera', { |
| 191 | label: cabecera, | 191 | label: cabecera, |
| 192 | valor: valor | 192 | valor: valor |
| 193 | }); | 193 | }); |
| 194 | 194 | ||
| 195 | } else { | 195 | } else { |
| 196 | $scope.$broadcast('addCabecera', { | 196 | $scope.$broadcast('addCabecera', { |
| 197 | label: 'General', | 197 | label: 'General', |
| 198 | valor: '' | 198 | valor: '' |
| 199 | }); | 199 | }); |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | $scope.$broadcast('addCabecera', { | 202 | $scope.$broadcast('addCabecera', { |
| 203 | label: 'Cantidad: ', | 203 | label: 'Cantidad: ', |
| 204 | valor: datos.data.length + ' Marcadores' | 204 | valor: datos.data.length + ' Marcadores' |
| 205 | }); | 205 | }); |
| 206 | }); | 206 | }); |
| 207 | } | 207 | } |
| 208 | $scope.openModal = function () { | 208 | $scope.openModal = function () { |
| 209 | let parametrosModal = {}; | 209 | let parametrosModal = {}; |
| 210 | switch ($routeParams.parametro) { | 210 | switch ($routeParams.parametro) { |
| 211 | case 'nota-pedido': | 211 | case 'nota-pedido': |
| 212 | parametrosModal = { | 212 | parametrosModal = { |
| 213 | titulo: 'Búsqueda vendedores', | 213 | titulo: 'Búsqueda vendedores', |
| 214 | query: '/vendedor', | 214 | query: '/vendedor', |
| 215 | columnas: [ | 215 | columnas: [ |
| 216 | { | 216 | { |
| 217 | propiedad: 'NUM', | 217 | propiedad: 'NUM', |
| 218 | nombre: 'Código', | 218 | nombre: 'Código', |
| 219 | filtro: { | 219 | filtro: { |
| 220 | nombre: 'rellenarDigitos', | 220 | nombre: 'rellenarDigitos', |
| 221 | parametro: 3 | 221 | parametro: 3 |
| 222 | } | 222 | } |
| 223 | }, | 223 | }, |
| 224 | { | 224 | { |
| 225 | propiedad: 'NOM', | 225 | propiedad: 'NOM', |
| 226 | nombre: 'Nombre' | 226 | nombre: 'Nombre' |
| 227 | } | 227 | } |
| 228 | ], | 228 | ], |
| 229 | size: 'md' | 229 | size: 'md' |
| 230 | }; | 230 | }; |
| 231 | break; | 231 | break; |
| 232 | case 'hoja-ruta': | 232 | case 'hoja-ruta': |
| 233 | parametrosModal = { | 233 | parametrosModal = { |
| 234 | titulo: 'Búsqueda de Transportista', | 234 | titulo: 'Búsqueda de Transportista', |
| 235 | query: '/transportista', | 235 | query: '/transportista', |
| 236 | columnas: [ | 236 | columnas: [ |
| 237 | { | 237 | { |
| 238 | nombre: 'Código', | 238 | nombre: 'Código', |
| 239 | propiedad: 'COD' | 239 | propiedad: 'COD' |
| 240 | }, | 240 | }, |
| 241 | { | 241 | { |
| 242 | nombre: 'Nombre', | 242 | nombre: 'Nombre', |
| 243 | propiedad: 'NOM' | 243 | propiedad: 'NOM' |
| 244 | }, | 244 | }, |
| 245 | { | 245 | { |
| 246 | nombre: 'CUIT', | 246 | nombre: 'CUIT', |
| 247 | propiedad: 'CUIT' | 247 | propiedad: 'CUIT' |
| 248 | } | 248 | } |
| 249 | ], | 249 | ], |
| 250 | size: 'md' | 250 | size: 'md' |
| 251 | }; | 251 | }; |
| 252 | break; | 252 | break; |
| 253 | case 'cobranza': | 253 | case 'cobranza': |
| 254 | parametrosModal = { | 254 | parametrosModal = { |
| 255 | titulo: 'Búsqueda de cobradores', | 255 | titulo: 'Búsqueda de cobradores', |
| 256 | query: '/cobrador', | 256 | query: '/cobrador', |
| 257 | columnas: [ | 257 | columnas: [ |
| 258 | { | 258 | { |
| 259 | propiedad: 'NUM', | 259 | propiedad: 'NUM', |
| 260 | nombre: 'Codigo', | 260 | nombre: 'Codigo', |
| 261 | filtro: { | 261 | filtro: { |
| 262 | nombre: 'rellenarDigitos', | 262 | nombre: 'rellenarDigitos', |
| 263 | parametro: 3 | 263 | parametro: 3 |
| 264 | } | 264 | } |
| 265 | }, | 265 | }, |
| 266 | { | 266 | { |
| 267 | propiedad: 'NOM', | 267 | propiedad: 'NOM', |
| 268 | nombre: 'Nombre' | 268 | nombre: 'Nombre' |
| 269 | } | 269 | } |
| 270 | ], | 270 | ], |
| 271 | size: 'md' | 271 | size: 'md' |
| 272 | }; | 272 | }; |
| 273 | break; | 273 | break; |
| 274 | default: | 274 | default: |
| 275 | break; | 275 | break; |
| 276 | } | 276 | } |
| 277 | focaModalService.modal(parametrosModal) | 277 | focaModalService.modal(parametrosModal) |
| 278 | .then( | 278 | .then( |
| 279 | function (vendedor) { | 279 | function (data) { |
| 280 | $scope.idUsuario = $scope.idUsuarioInput = vendedor.NOM; | 280 | $scope.idUsuario = $scope.idUsuarioInput = data.NUM; |
| 281 | getSeguimiento(); | 281 | getSeguimiento(); |
| 282 | if ($scope.actividad === 'Entrega de producto' && $scope.idUsuario !== 0) { | 282 | if ($scope.actividad === 'Entrega de producto' && $scope.idUsuario !== 0) { |
| 283 | focaAdminSeguimientoService.obtenerRemitosVehiculo($scope.idUsuario) | 283 | focaAdminSeguimientoService.obtenerRemitosVehiculo($scope.idUsuario) |
| 284 | .then(function (res) { | 284 | .then(function (res) { |
| 285 | var remitos = []; | 285 | var remitos = []; |
| 286 | for (var i = 0; i < res.data.length; i++) { | 286 | for (var i = 0; i < res.data.length; i++) { |
| 287 | remitos = remitos.concat(res.data[i].remitos); | 287 | remitos = remitos.concat(res.data[i].remitos); |
| 288 | } | 288 | } |
| 289 | $scope.remitosVehiculo = remitos; | 289 | $scope.remitosVehiculo = remitos; |
| 290 | }); | 290 | }); |
| 291 | } | 291 | } |
| 292 | } | 292 | } |
| 293 | ) | 293 | ) |
| 294 | .catch(function (e) { console.log(e) }); | 294 | .catch(function (e) { console.log(e) }); |
| 295 | } | 295 | } |
| 296 | } | 296 | } |
| 297 | ]); | 297 | ]); |
| 298 | 298 |
src/views/foca-admin-seguimiento.html
| 1 | <div class="foca-admin-seguimiento"> | 1 | <div class="foca-admin-seguimiento"> |
| 2 | <div class="row"> | 2 | <div class="row"> |
| 3 | <foca-cabecera-facturador | 3 | <foca-cabecera-facturador |
| 4 | titulo="titulo" | 4 | titulo="titulo" |
| 5 | fecha="now" | 5 | fecha="now" |
| 6 | class="mb-0 col-lg-12" | 6 | class="mb-0 col-lg-12" |
| 7 | ></foca-cabecera-facturador> | 7 | ></foca-cabecera-facturador> |
| 8 | </div> | 8 | </div> |
| 9 | <div class="row"> | 9 | <div class="row"> |
| 10 | <div class="col-10"> | 10 | <div class="col-10"> |
| 11 | <osm | 11 | <osm |
| 12 | latitud="-34.7152975" | 12 | latitud="-34.7152975" |
| 13 | longitud="-65.9053867" | 13 | longitud="-65.9053867" |
| 14 | zoom="6" | 14 | zoom="6" |
| 15 | marcadores="marcadores" | 15 | marcadores="marcadores" |
| 16 | parametros= "datosBuscados" | 16 | parametros= "datosBuscados" |
| 17 | /> | 17 | /> |
| 18 | </div> | 18 | </div> |
| 19 | <div class="col-2 pl-0"> | 19 | <div class="col-2 pl-0"> |
| 20 | <input | 20 | <div class="input-group mb-3"> |
| 21 | type="text" | 21 | <div class="input-group-prepend my-2"> |
| 22 | ng-model="now" | 22 | <button |
| 23 | class="btn col-12 my-1" | 23 | class="input-group-text" |
| 24 | ng-blur="fecha()" | 24 | ng-click="datepickerOpen = true" |
| 25 | uib-datepicker-popup="dd/MM/yyyy" | 25 | > |
| 26 | show-button-bar="false" | 26 | <i class="fa fa-calendar" aria-hidden="true"></i> |
| 27 | is-open="datepickerOpen" | 27 | </button> |
| 28 | on-open-focus="false" | 28 | </div> |
| 29 | ng-focus="datepickerOpen = true" | 29 | <input |
| 30 | datepicker-options="dateOptions" | 30 | type="text" |
| 31 | /> | 31 | ng-model="now" |
| 32 | <button | 32 | class="form-control col-12 my-2" |
| 33 | type="button" | 33 | ng-blur="fecha()" |
| 34 | ng-class="{'active': idUsuario == 0}" | 34 | uib-datepicker-popup="dd/MM/yyyy" |
| 35 | class="btn col-12 my-1" | 35 | show-button-bar="false" |
| 36 | is-open="datepickerOpen" | ||
| 37 | on-open-focus="false" | ||
| 38 | ng-focus="datepickerOpen = true" | ||
| 39 | datepicker-options="dateOptions" | ||
| 40 | /> | ||
| 41 | </div> | ||
| 42 | <button | ||
| 43 | type="button" | ||
| 44 | ng-class="{'active': idUsuario == 0}" | ||
| 45 | class="btn btn-outline-debo col-12 my-1" | ||
| 36 | ng-click="general()" | 46 | ng-click="general()" |
| 37 | >General</button> | 47 | >General</button> |
| 38 | <button | 48 | <button |
| 39 | type="button" | 49 | type="button" |
| 40 | ng-class="{'active': idUsuario != 0}" | 50 | ng-class="{'active': idUsuario != 0}" |
| 41 | class="btn col-12 my-1" | 51 | class="btn btn-outline-debo col-12 my-1" |
| 42 | ng-click="individual()" | 52 | ng-click="individual()" |
| 43 | >Individual</button> | 53 | >Individual</button> |
| 44 | <div class="form-group my-1" ng-show="idUsuario != 0"> | 54 | <div class="form-group my-1" ng-show="idUsuario != 0"> |
| 45 | <button | 55 | <button |
| 46 | class="btn btn-primary" | 56 | class="btn btn-default" |
| 47 | foca-focus="idUsuario == -1" | 57 | foca-focus="idUsuario == -1" |
| 48 | ng-show="actividad == 'Nota de pedido'" | 58 | ng-show="actividad == 'Nota de pedido'" |
| 49 | ng-click="openModal()" | 59 | ng-click="openModal()"> |
| 50 | >Seleccionar vendedor</button> | 60 | <i class="fa fa-hand-pointer-o" aria-hidden="true"></i> |
| 51 | <button | 61 | Vendedor |
| 52 | class="btn btn-primary" | 62 | </button> |
| 53 | foca-focus="idUsuario == -1" | 63 | <button |
| 64 | class="btn btn-default" | ||
| 65 | foca-focus="idUsuario == -1" | ||
| 54 | ng-show="actividad == 'Entrega de producto'" | 66 | ng-show="actividad == 'Entrega de producto'" |
| 55 | ng-click="openModal()" | 67 | ng-click="openModal()"> |
| 56 | >Seleccionar transportista</button> | 68 | <i class="fa fa-hand-pointer-o" aria-hidden="true"></i> |
| 57 | <button | 69 | Transportista |
| 58 | class="btn btn-primary" | 70 | </button> |
| 59 | foca-focus="idUsuario == -1" | 71 | <button |
| 72 | class="btn btn-default" | ||
| 73 | foca-focus="idUsuario == -1" | ||
| 60 | ng-show="actividad == 'Cobranza'" | 74 | ng-show="actividad == 'Cobranza'" |
| 61 | ng-click="openModal()" | 75 | ng-click="openModal()"> |
| 62 | >Seleccionar cobrador</button> | 76 | <i class="fa fa-hand-pointer-o" aria-hidden="true"></i> |
| 77 | Cobrador | ||
| 78 | </button> | ||
| 63 | </div> | 79 | </div> |
| 64 | <button | 80 | <button |
| 65 | type="button" | 81 | type="button" |
| 66 | class="btn col-12 my-1" | 82 | class="btn btn-danger col-12 my-1" |
| 67 | ng-show="marcadores.length > 0 && idUsuario > 0" | 83 | ng-show="marcadores.length > 0 && idUsuario > 0" |
| 68 | ng-click="showMarcadores()" | 84 | ng-click="showMarcadores()" |
| 69 | >Listar marcadores</button> | 85 | >Listar marcadores</button> |
| 70 | <div ng-show="actividad === 'Entrega de producto' && idUsuario != 0"> | 86 | <div ng-show="actividad === 'Entrega de producto' && idUsuario !== 0"> |
| 71 | <div class="custom-control custom-radio"> | 87 | <div class="custom-control custom-radio"> |
| 72 | <input | 88 | <input |
| 73 | type="radio" | 89 | type="radio" |
| 74 | class="custom-control-input" | 90 | class="custom-control-input" |
| 75 | id="idTodos" | 91 | id="idTodos" |
| 76 | name="filtro" | 92 | name="filtro" |
| 77 | ng-model="filtroEstado" | 93 | ng-model="filtroEstado" |
| 78 | ng-change="search(13)" | 94 | ng-change="search(13)" |
| 79 | checked> | 95 | checked> |
| 80 | <label class="custom-control-label pb-3" for="idTodos"></label> | 96 | <label class="custom-control-label pb-3" for="idTodos"></label> |
| 81 | <img src="img/marker-icon-grey.png"> | 97 | <img src="img/marker-icon-grey.png"> |
| 82 | <strong>Todos</strong> | 98 | <strong>Todos</strong> |
| 83 | </div> | 99 | </div> |
| 84 | <div class="custom-control custom-radio"> | 100 | <div class="custom-control custom-radio"> |
| 85 | <input | 101 | <input |
| 86 | type="radio" | 102 | type="radio" |
| 87 | class="custom-control-input" | 103 | class="custom-control-input" |
| 88 | id="entregado" | 104 | id="entregado" |
| 89 | name="filtro" | 105 | name="filtro" |
| 90 | ng-model="filtroEstado" | 106 | ng-model="filtroEstado" |
| 91 | ng-change="search(13)" | 107 | ng-change="search(13)" |
| 92 | ng-value="true"> | 108 | ng-value="true"> |
| 93 | <label class="custom-control-label pb-3" for="entregado"></label> | 109 | <label class="custom-control-label pb-3" for="entregado"></label> |
| 94 | <img src="img/marker-icon-green.png"> | 110 | <img src="img/marker-icon-green.png"> |
| 95 | <strong>Entregado</strong> | 111 | <strong>Entregado</strong> |
| 96 | </div> | 112 | </div> |
| 97 | <div class="custom-control custom-radio"> | 113 | <div class="custom-control custom-radio"> |
| 98 | <input | 114 | <input |
| 99 | type="radio" | 115 | type="radio" |
| 100 | class="custom-control-input" | 116 | class="custom-control-input" |
| 101 | id="noEntregado" | 117 | id="noEntregado" |
| 102 | name="filtro" | 118 | name="filtro" |
| 103 | ng-model="filtroEstado" | 119 | ng-model="filtroEstado" |
| 104 | ng-change="search(13)" | 120 | ng-change="search(13)" |
| 105 | ng-value="false"> | 121 | ng-value="false"> |
| 106 | <label class="custom-control-label pb-3" for="noEntregado"></label> | 122 | <label class="custom-control-label pb-3" for="noEntregado"></label> |
| 107 | <img src="img/marker-icon-yellow.png"> | 123 | <img src="img/marker-icon-yellow.png"> |
| 108 | <strong>No entregado</strong> | 124 | <strong>No entregado</strong> |
| 109 | </div> | 125 | </div> |
| 110 | </div> | 126 | </div> |
| 111 | </div> | 127 | </div> |
| 112 | </div> | 128 | </div> |
| 113 | <div ng-show="actividad === 'Entrega de producto' && idUsuario != 0"> | 129 | <div ng-show="actividad === 'Entrega de producto' && idUsuario != 0"> |
| 114 | <strong>Remitos pendientes de entrega</strong> | 130 | <strong>Remitos pendientes de entrega</strong> |
| 115 | <table class="table"> | 131 | <table class="table"> |
| 116 | <thead> | 132 | <thead> |
| 117 | <tr> | 133 | <tr> |
| 118 | <th>Remito Nº</th> | 134 | <th>Remito Nº</th> |
| 119 | <th>Cliente</th> | 135 | <th>Cliente</th> |
| 120 | <th>Dirección</th> | 136 | <th>Dirección</th> |
| 121 | </tr> | 137 | </tr> |
| 122 | </thead> | 138 | </thead> |
| 123 | <tbody> | 139 | <tbody> |
| 124 | <tr ng-repeat="remito in remitosVehiculo"> | 140 | <tr ng-repeat="remito in remitosVehiculo"> |
| 125 | <td ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></td> | 141 | <td ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></td> |
| 126 | <td ng-bind="remito.nombreCliente"></td> | 142 | <td ng-bind="remito.nombreCliente"></td> |
| 127 | <td ng-bind="remito.domicilioStamp"></td> | 143 | <td ng-bind="remito.domicilioStamp"></td> |
| 128 | </tr> | 144 | </tr> |
| 129 | </tbody> | 145 | </tbody> |
| 130 | </table> | 146 | </table> |
| 131 | </div> | 147 | </div> |
| 132 | </div> | 148 | </div> |
| 133 | 149 |