Commit cdd21a929b141b19e19eca8eab0daf519056b129
Exists in
master
Merge branch 'develop' into 'master'
Develop See merge request !13
Showing
10 changed files
 
Show diff stats
src/js/controller-general-unidad.js
| ... | ... | @@ -18,7 +18,7 @@ angular.module('focaModalInforme') | 
| 18 | 18 | $scope.params = { | 
| 19 | 19 | fechaHasta: new Date(), | 
| 20 | 20 | fechaDesde: new Date(fecha.setMonth(fecha.getMonth() - 1)), | 
| 21 | - sector: undefined, | |
| 21 | + sector: String, | |
| 22 | 22 | diferenciarProductos: false, | 
| 23 | 23 | diferenciarMeses: false | 
| 24 | 24 | }; | 
| ... | ... | @@ -173,9 +173,6 @@ angular.module('focaModalInforme') | 
| 173 | 173 | $scope.cancel = function() { | 
| 174 | 174 | $uibModalInstance.dismiss('Cancelar'); | 
| 175 | 175 | }; | 
| 176 | - $scope.clearSector = function() { | |
| 177 | - $scope.params.sector = undefined; | |
| 178 | - }; | |
| 179 | 176 | |
| 180 | 177 | function unirProductos(productos) { | 
| 181 | 178 | var result = [{fechas: []}]; | 
src/js/controller-litros-km-unidad.js
| ... | ... | @@ -18,6 +18,9 @@ angular.module('focaModalInforme') | 
| 18 | 18 | $scope.fechaHasta = new Date(); | 
| 19 | 19 | $scope.fechaDesde = new Date(fecha.setMonth(fecha.getMonth() - 1)); | 
| 20 | 20 | $scope.buscar = true; | 
| 21 | + $scope.unidad = { | |
| 22 | + codigo: '' | |
| 23 | + }; | |
| 21 | 24 | $scope.informe = {}; | 
| 22 | 25 | i18nService.setCurrentLang('es'); | 
| 23 | 26 | $scope.gridOptions = { | 
| ... | ... | @@ -142,7 +145,7 @@ angular.module('focaModalInforme') | 
| 142 | 145 | }; | 
| 143 | 146 | return focaModalService.modal(parametrosModal) | 
| 144 | 147 | }; | 
| 145 | - | |
| 148 | + | |
| 146 | 149 | $scope.seleccionarUnidad = function(key) { | 
| 147 | 150 | if (key === 13) { | 
| 148 | 151 | $scope.seleccionarTransportista().then( | 
src/js/controller-productividad.js
| ... | ... | @@ -20,7 +20,10 @@ angular.module('focaModalInforme') | 
| 20 | 20 | fechaDesde: new Date(fecha.setMonth(fecha.getMonth() - 1)), | 
| 21 | 21 | sector: undefined, | 
| 22 | 22 | diferenciarProductos: false, | 
| 23 | - diferenciarMeses: false | |
| 23 | + diferenciarMeses: false, | |
| 24 | + entidad:{ | |
| 25 | + label: '' | |
| 26 | + } | |
| 24 | 27 | }; | 
| 25 | 28 | $scope.gridOptions = { | 
| 26 | 29 | enableGridMenu: true, | 
| ... | ... | @@ -82,39 +85,42 @@ angular.module('focaModalInforme') | 
| 82 | 85 | ] | 
| 83 | 86 | }; | 
| 84 | 87 | $scope.seleccionarTipo = function() { | 
| 85 | - var data = [ | |
| 86 | - { | |
| 87 | - id: 0, | |
| 88 | - label: 'Todos' | |
| 89 | - }, | |
| 90 | - { | |
| 91 | - id: 1, | |
| 92 | - label: 'Vendedores' | |
| 93 | - }, | |
| 94 | - { | |
| 95 | - id: 2, | |
| 96 | - label: 'Cobradores' | |
| 97 | - }, | |
| 98 | - { | |
| 99 | - id: 3, | |
| 100 | - label: 'Transportistas' | |
| 101 | - } | |
| 102 | - ]; | |
| 103 | - focaModalService.modal({ | |
| 104 | - titulo: 'Seleccionar entidad', | |
| 105 | - data: data, | |
| 88 | + var parametrosModal = { | |
| 89 | + searchText: $scope.params.entidad.label, | |
| 106 | 90 | columnas: [ | 
| 107 | 91 | { | 
| 108 | 92 | propiedad: 'label', | 
| 109 | 93 | nombre: 'Entidad' | 
| 110 | 94 | } | 
| 111 | 95 | ], | 
| 112 | - }).then(function(res) { | |
| 96 | + titulo: 'Seleccionar entidad', | |
| 97 | + size: 'md', | |
| 98 | + data: [ | |
| 99 | + { | |
| 100 | + id: 0, | |
| 101 | + label: 'Todos' | |
| 102 | + }, | |
| 103 | + { | |
| 104 | + id: 1, | |
| 105 | + label: 'Vendedores' | |
| 106 | + }, | |
| 107 | + { | |
| 108 | + id: 2, | |
| 109 | + label: 'Cobradores' | |
| 110 | + }, | |
| 111 | + { | |
| 112 | + id: 3, | |
| 113 | + label: 'Transportistas' | |
| 114 | + } | |
| 115 | + ] | |
| 116 | + }; | |
| 117 | + | |
| 118 | + focaModalService.modal(parametrosModal).then(function(res) { | |
| 113 | 119 | $scope.params.entidad = res; | 
| 114 | 120 | }); | 
| 115 | 121 | }; | 
| 116 | 122 | $scope.generarInforme = function() { | 
| 117 | - if (!$scope.params.entidad) { | |
| 123 | + if ($scope.params.entidad.id === undefined) { | |
| 118 | 124 | focaModalService.alert('Seleccione una entidad'); | 
| 119 | 125 | return; | 
| 120 | 126 | } | 
| ... | ... | @@ -201,7 +207,8 @@ angular.module('focaModalInforme') | 
| 201 | 207 | $uibModalInstance.dismiss('Cancelar'); | 
| 202 | 208 | }; | 
| 203 | 209 | $scope.clearEntidad = function() { | 
| 204 | - $scope.params.entidad = undefined; | |
| 210 | + $scope.params.entidad.label = ''; | |
| 211 | + $scope.params.entidad.id = undefined; | |
| 205 | 212 | }; | 
| 206 | 213 | } | 
| 207 | 214 | ] | 
src/js/controller-reparto-optimo.js
| ... | ... | @@ -17,7 +17,7 @@ angular.module('focaModalInforme') | 
| 17 | 17 | $scope.params = { | 
| 18 | 18 | fechaHasta: new Date(), | 
| 19 | 19 | fechaDesde: new Date(fecha.setMonth(fecha.getMonth() - 1)), | 
| 20 | - sector: undefined, | |
| 20 | + sector: String, | |
| 21 | 21 | diferenciarProductos: false, | 
| 22 | 22 | diferenciarMeses: false | 
| 23 | 23 | }; | 
| ... | ... | @@ -182,9 +182,6 @@ angular.module('focaModalInforme') | 
| 182 | 182 | ); | 
| 183 | 183 | } | 
| 184 | 184 | }; | 
| 185 | - $scope.clearSector = function() { | |
| 186 | - $scope.params.sector = undefined; | |
| 187 | - }; | |
| 188 | 185 | $scope.volver = function() { | 
| 189 | 186 | $scope.buscar = true; | 
| 190 | 187 | }; | 
src/views/informe-chofer.html
| ... | ... | @@ -11,11 +11,15 @@ | 
| 11 | 11 | <div class="input-group row" | 
| 12 | 12 | ng-show="buscar"> | 
| 13 | 13 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> | 
| 14 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 14 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 15 | 15 | <div class="input-group-prepend"> | 
| 16 | - <div class="input-group-text form-control-sm"> | |
| 16 | + <button | |
| 17 | + class="input-group-text" | |
| 18 | + type="button" | |
| 19 | + ng-click="datepickerOpen = true" | |
| 20 | + > | |
| 17 | 21 | <i class="fa fa-calendar"></i> | 
| 18 | - </div> | |
| 22 | + </button> | |
| 19 | 23 | </div> | 
| 20 | 24 | <input | 
| 21 | 25 | class="form-control form-control-sm" | 
| ... | ... | @@ -32,11 +36,15 @@ | 
| 32 | 36 | /> | 
| 33 | 37 | </div> | 
| 34 | 38 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> | 
| 35 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 39 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 36 | 40 | <div class="input-group-prepend"> | 
| 37 | - <div class="input-group-text form-control-sm"> | |
| 41 | + <button | |
| 42 | + class="input-group-text" | |
| 43 | + type="button" | |
| 44 | + ng-click="datepicker2Open = true" | |
| 45 | + > | |
| 38 | 46 | <i class="fa fa-calendar"></i> | 
| 39 | - </div> | |
| 47 | + </button> | |
| 40 | 48 | </div> | 
| 41 | 49 | <input | 
| 42 | 50 | class="form-control form-control-sm" | 
src/views/informe-general-unidad.html
| ... | ... | @@ -15,11 +15,15 @@ | 
| 15 | 15 | <div class="input-group row" | 
| 16 | 16 | ng-show="buscar"> | 
| 17 | 17 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> | 
| 18 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 18 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 19 | 19 | <div class="input-group-prepend"> | 
| 20 | - <div class="input-group-text form-control-sm"> | |
| 20 | + <button | |
| 21 | + class="input-group-text" | |
| 22 | + type="button" | |
| 23 | + ng-click="datepickerOpen = true" | |
| 24 | + > | |
| 21 | 25 | <i class="fa fa-calendar"></i> | 
| 22 | - </div> | |
| 26 | + </button> | |
| 23 | 27 | </div> | 
| 24 | 28 | <input | 
| 25 | 29 | class="form-control form-control-sm" | 
| ... | ... | @@ -36,11 +40,15 @@ | 
| 36 | 40 | /> | 
| 37 | 41 | </div> | 
| 38 | 42 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> | 
| 39 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 43 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 40 | 44 | <div class="input-group-prepend"> | 
| 41 | - <div class="input-group-text form-control-sm"> | |
| 45 | + <button | |
| 46 | + class="input-group-text" | |
| 47 | + type="button" | |
| 48 | + ng-click="datepicker2Open = true" | |
| 49 | + > | |
| 42 | 50 | <i class="fa fa-calendar"></i> | 
| 43 | - </div> | |
| 51 | + </button> | |
| 44 | 52 | </div> | 
| 45 | 53 | <input | 
| 46 | 54 | class="form-control form-control-sm" | 
| ... | ... | @@ -56,7 +64,7 @@ | 
| 56 | 64 | /> | 
| 57 | 65 | </div> | 
| 58 | 66 | <small class="col-md-2 col-4 text-left my-1">Sector</small> | 
| 59 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 67 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 60 | 68 | <input | 
| 61 | 69 | class="form-control form-control-sm" | 
| 62 | 70 | id="inlineFormInputGroup" | 
| ... | ... | @@ -65,9 +73,14 @@ | 
| 65 | 73 | ng-required="true" | 
| 66 | 74 | ng-keypress="seleccionarSector($event.keyCode)" | 
| 67 | 75 | /> | 
| 68 | - <button type="button" class="clear-input text-danger" ng-click="clearSector()"> | |
| 69 | - <i class="fa fa-times"></i> | |
| 70 | - </button> | |
| 76 | + <button | |
| 77 | + ng-show="params.sector.NOMBRE.length >= 1" | |
| 78 | + type="button" | |
| 79 | + class="clear-input" | |
| 80 | + ng-click="params.sector.NOMBRE = ''" | |
| 81 | + > | |
| 82 | + <i class="fa fa-times"></i> | |
| 83 | + </button> | |
| 71 | 84 | <div class="input-group-append"> | 
| 72 | 85 | <div class="input-group-append" ng-hide="ingreso"> | 
| 73 | 86 | <button | 
src/views/informe-hoja-ruta.html
| ... | ... | @@ -12,11 +12,15 @@ | 
| 12 | 12 | <div class="input-group row" | 
| 13 | 13 | ng-show="buscar"> | 
| 14 | 14 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> | 
| 15 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 15 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 16 | 16 | <div class="input-group-prepend"> | 
| 17 | - <div class="input-group-text form-control-sm"> | |
| 17 | + <button | |
| 18 | + class="input-group-text" | |
| 19 | + type="button" | |
| 20 | + ng-click="datepickerOpen = true" | |
| 21 | + > | |
| 18 | 22 | <i class="fa fa-calendar"></i> | 
| 19 | - </div> | |
| 23 | + </button> | |
| 20 | 24 | </div> | 
| 21 | 25 | <input | 
| 22 | 26 | class="form-control form-control-sm" | 
| ... | ... | @@ -34,11 +38,15 @@ | 
| 34 | 38 | /> | 
| 35 | 39 | </div> | 
| 36 | 40 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> | 
| 37 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 41 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 38 | 42 | <div class="input-group-prepend"> | 
| 39 | - <div class="input-group-text form-control-sm"> | |
| 43 | + <button | |
| 44 | + class="input-group-text" | |
| 45 | + type="button" | |
| 46 | + ng-click="datepicker2Open = true" | |
| 47 | + > | |
| 40 | 48 | <i class="fa fa-calendar"></i> | 
| 41 | - </div> | |
| 49 | + </button> | |
| 42 | 50 | </div> | 
| 43 | 51 | <input | 
| 44 | 52 | class="form-control form-control-sm" | 
src/views/informe-litros-km-unidad.html
| ... | ... | @@ -13,11 +13,15 @@ | 
| 13 | 13 | <div class="input-group row" | 
| 14 | 14 | ng-show="buscar"> | 
| 15 | 15 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> | 
| 16 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 16 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 17 | 17 | <div class="input-group-prepend"> | 
| 18 | - <div class="input-group-text form-control-sm"> | |
| 18 | + <button | |
| 19 | + class="input-group-text" | |
| 20 | + type="button" | |
| 21 | + ng-click="datepickerOpen = true" | |
| 22 | + > | |
| 19 | 23 | <i class="fa fa-calendar"></i> | 
| 20 | - </div> | |
| 24 | + </button> | |
| 21 | 25 | </div> | 
| 22 | 26 | <input | 
| 23 | 27 | class="form-control form-control-sm" | 
| ... | ... | @@ -34,11 +38,15 @@ | 
| 34 | 38 | /> | 
| 35 | 39 | </div> | 
| 36 | 40 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> | 
| 37 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 41 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 38 | 42 | <div class="input-group-prepend"> | 
| 39 | - <div class="input-group-text form-control-sm"> | |
| 43 | + <button | |
| 44 | + class="input-group-text" | |
| 45 | + type="button" | |
| 46 | + ng-click="datepicker2Open = true" | |
| 47 | + > | |
| 40 | 48 | <i class="fa fa-calendar"></i> | 
| 41 | - </div> | |
| 49 | + </button> | |
| 42 | 50 | </div> | 
| 43 | 51 | <input | 
| 44 | 52 | class="form-control form-control-sm" | 
| ... | ... | @@ -63,6 +71,14 @@ | 
| 63 | 71 | ng-required="true" | 
| 64 | 72 | ng-keypress="seleccionarUnidad($event.keyCode)" | 
| 65 | 73 | /> | 
| 74 | + <button | |
| 75 | + ng-show="unidad.codigo.length >= 1" | |
| 76 | + type="button" | |
| 77 | + class="clear-input" | |
| 78 | + ng-click="unidad.codigo = ''" | |
| 79 | + > | |
| 80 | + <i class="fa fa-times"></i> | |
| 81 | + </button> | |
| 66 | 82 | <div class="input-group-append"> | 
| 67 | 83 | <div class="input-group-append" ng-hide="ingreso"> | 
| 68 | 84 | <button | 
src/views/informe-productividad.html
| ... | ... | @@ -15,11 +15,15 @@ | 
| 15 | 15 | <div class="input-group row" | 
| 16 | 16 | ng-show="buscar"> | 
| 17 | 17 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> | 
| 18 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 18 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 19 | 19 | <div class="input-group-prepend"> | 
| 20 | - <div class="input-group-text form-control-sm"> | |
| 20 | + <button | |
| 21 | + class="input-group-text" | |
| 22 | + type="button" | |
| 23 | + ng-click="datepickerOpen = true" | |
| 24 | + > | |
| 21 | 25 | <i class="fa fa-calendar"></i> | 
| 22 | - </div> | |
| 26 | + </button> | |
| 23 | 27 | </div> | 
| 24 | 28 | <input | 
| 25 | 29 | class="form-control form-control-sm" | 
| ... | ... | @@ -36,11 +40,15 @@ | 
| 36 | 40 | /> | 
| 37 | 41 | </div> | 
| 38 | 42 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> | 
| 39 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 43 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 40 | 44 | <div class="input-group-prepend"> | 
| 41 | - <div class="input-group-text form-control-sm"> | |
| 45 | + <button | |
| 46 | + class="input-group-text" | |
| 47 | + type="button" | |
| 48 | + ng-click="datepicker2Open = true" | |
| 49 | + > | |
| 42 | 50 | <i class="fa fa-calendar"></i> | 
| 43 | - </div> | |
| 51 | + </button> | |
| 44 | 52 | </div> | 
| 45 | 53 | <input | 
| 46 | 54 | class="form-control form-control-sm" | 
| ... | ... | @@ -56,9 +64,14 @@ | 
| 56 | 64 | /> | 
| 57 | 65 | </div> | 
| 58 | 66 | <small class="col-md-2 col-4 text-left my-1">Entidad</small> | 
| 59 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 60 | - <input type="text" class="form-control" ng-model="params.entidad.label" readonly> | |
| 61 | - <button type="button" class="clear-input text-danger" ng-click="clearEntidad()"> | |
| 67 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 68 | + <input type="text" class="form-control form-control-sm" ng-model="params.entidad.label"> | |
| 69 | + <button | |
| 70 | + ng-show="params.entidad.label.length >= 1" | |
| 71 | + type="button" | |
| 72 | + class="clear-input" | |
| 73 | + ng-click="clearEntidad()" | |
| 74 | + > | |
| 62 | 75 | <i class="fa fa-times"></i> | 
| 63 | 76 | </button> | 
| 64 | 77 | <div class="input-group-append"> | 
src/views/informe-reparto-optimo.html
| ... | ... | @@ -13,11 +13,15 @@ | 
| 13 | 13 | <div class="input-group row" | 
| 14 | 14 | ng-show="buscar"> | 
| 15 | 15 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> | 
| 16 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 16 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 17 | 17 | <div class="input-group-prepend"> | 
| 18 | - <div class="input-group-text form-control-sm"> | |
| 18 | + <button | |
| 19 | + class="input-group-text" | |
| 20 | + type="button" | |
| 21 | + ng-click="datepickerOpen = true" | |
| 22 | + > | |
| 19 | 23 | <i class="fa fa-calendar"></i> | 
| 20 | - </div> | |
| 24 | + </button> | |
| 21 | 25 | </div> | 
| 22 | 26 | <input | 
| 23 | 27 | class="form-control form-control-sm" | 
| ... | ... | @@ -34,11 +38,15 @@ | 
| 34 | 38 | /> | 
| 35 | 39 | </div> | 
| 36 | 40 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> | 
| 37 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 41 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 38 | 42 | <div class="input-group-prepend"> | 
| 39 | - <div class="input-group-text form-control-sm"> | |
| 43 | + <button | |
| 44 | + class="input-group-text" | |
| 45 | + type="button" | |
| 46 | + ng-click="datepicker2Open = true" | |
| 47 | + > | |
| 40 | 48 | <i class="fa fa-calendar"></i> | 
| 41 | - </div> | |
| 49 | + </button> | |
| 42 | 50 | </div> | 
| 43 | 51 | <input | 
| 44 | 52 | class="form-control form-control-sm" | 
| ... | ... | @@ -54,7 +62,7 @@ | 
| 54 | 62 | /> | 
| 55 | 63 | </div> | 
| 56 | 64 | <small class="col-md-2 col-4 text-left my-1">Sector</small> | 
| 57 | - <div class="col-md-4 col-8 input-group mb-2"> | |
| 65 | + <div class="col-md-4 col-8 input-group mb-3"> | |
| 58 | 66 | <input | 
| 59 | 67 | class="form-control form-control-sm" | 
| 60 | 68 | id="inlineFormInputGroup" | 
| ... | ... | @@ -63,7 +71,12 @@ | 
| 63 | 71 | ng-required="true" | 
| 64 | 72 | ng-keypress="seleccionarSector($event.keyCode)" | 
| 65 | 73 | /> | 
| 66 | - <button type="button" class="clear-input text-danger" ng-click="clearSector()"> | |
| 74 | + <button | |
| 75 | + ng-show="params.sector.NOMBRE.length >= 1" | |
| 76 | + type="button" | |
| 77 | + class="clear-input" | |
| 78 | + ng-click="params.sector.NOMBRE = ''" | |
| 79 | + > | |
| 67 | 80 | <i class="fa fa-times"></i> | 
| 68 | 81 | </button> | 
| 69 | 82 | <div class="input-group-append"> |