Commit a35dd53a7b82240586fd7a69ff13ec3ecad09b2a
1 parent
a159da92f7
Exists in
develop
Change
Cambiados de lugar inputs domicilio y provincia
Showing
1 changed file
with
20 additions
and
20 deletions
Show diff stats
src/views/modal-domicilio.html
| 1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
| 2 | <div class="row w-100 justify-content-between"> | 2 | <div class="row w-100 justify-content-between"> |
| 3 | <div class="col-auto"> | 3 | <div class="col-auto"> |
| 4 | <h5 class="modal-title my-1" ng-hide="ingreso">Búsqueda de Domicilios</h5> | 4 | <h5 class="modal-title my-1" ng-hide="ingreso">Búsqueda de Domicilios</h5> |
| 5 | <h5 class="modal-title my-1" ng-show="ingreso">Crear domicilios de descarga</h5> | 5 | <h5 class="modal-title my-1" ng-show="ingreso">Crear domicilios de descarga</h5> |
| 6 | </div> | 6 | </div> |
| 7 | <div class="col-auto pr-0 my-2"> | 7 | <div class="col-auto pr-0 my-2"> |
| 8 | <button | 8 | <button |
| 9 | class="btn btn-outline-debo mr-2" | 9 | class="btn btn-outline-debo mr-2" |
| 10 | ng-click="ingreso = true" | 10 | ng-click="ingreso = true" |
| 11 | ng-show="!ingreso" | 11 | ng-show="!ingreso" |
| 12 | title="Nuevo"> | 12 | title="Nuevo"> |
| 13 | <i class="fa fa-plus"></i> | 13 | <i class="fa fa-plus"></i> |
| 14 | </button> | 14 | </button> |
| 15 | </div> | 15 | </div> |
| 16 | </div> | 16 | </div> |
| 17 | </div> | 17 | </div> |
| 18 | <div class="modal-body" id="modal-body"> | 18 | <div class="modal-body" id="modal-body"> |
| 19 | 19 | ||
| 20 | <div ng-show="!primerBusqueda">Debe realizar una primer búsqueda.</div> | 20 | <div ng-show="!primerBusqueda">Debe realizar una primer búsqueda.</div> |
| 21 | 21 | ||
| 22 | <div ng-show="!ingreso"> | 22 | <div ng-show="!ingreso"> |
| 23 | <table ng-show="!ingreso" class="table table-striped table-sm"> | 23 | <table ng-show="!ingreso" class="table table-striped table-sm"> |
| 24 | <thead> | 24 | <thead> |
| 25 | <tr> | 25 | <tr> |
| 26 | <th>Titulo</th> | 26 | <th>Titulo</th> |
| 27 | <th>Calle</th> | 27 | <th>Calle</th> |
| 28 | <th>Localidad</th> | 28 | <th>Localidad</th> |
| 29 | <th>Provincia</th> | 29 | <th>Provincia</th> |
| 30 | <th></th> | 30 | <th></th> |
| 31 | <th></th> | 31 | <th></th> |
| 32 | </tr> | 32 | </tr> |
| 33 | </thead> | 33 | </thead> |
| 34 | <tbody> | 34 | <tbody> |
| 35 | <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda"> | 35 | <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda"> |
| 36 | <td colspan="5">No se encontraron resultados.</td> | 36 | <td colspan="5">No se encontraron resultados.</td> |
| 37 | </tr> | 37 | </tr> |
| 38 | <tr class="selectable" | 38 | <tr class="selectable" |
| 39 | ng-repeat="(key,domicilio) in currentPageDomicilios"> | 39 | ng-repeat="(key,domicilio) in currentPageDomicilios"> |
| 40 | <td | 40 | <td |
| 41 | ng-bind="domicilio.titulo" | 41 | ng-bind="domicilio.titulo" |
| 42 | ng-click="select(domicilio)"> | 42 | ng-click="select(domicilio)"> |
| 43 | </td> | 43 | </td> |
| 44 | <td | 44 | <td |
| 45 | ng-bind="domicilio.Calle + ' ' + domicilio.Numero" | 45 | ng-bind="domicilio.Calle + ' ' + domicilio.Numero" |
| 46 | ng-click="select(domicilio)"> | 46 | ng-click="select(domicilio)"> |
| 47 | </td> | 47 | </td> |
| 48 | <td | 48 | <td |
| 49 | ng-bind="domicilio.Localidad" | 49 | ng-bind="domicilio.Localidad" |
| 50 | ng-click="select(domicilio)"> | 50 | ng-click="select(domicilio)"> |
| 51 | </td> | 51 | </td> |
| 52 | <td | 52 | <td |
| 53 | ng-bind="domicilio.Provincia" | 53 | ng-bind="domicilio.Provincia" |
| 54 | ng-click="select(domicilio)"> | 54 | ng-click="select(domicilio)"> |
| 55 | </td> | 55 | </td> |
| 56 | <td> | 56 | <td> |
| 57 | <button | 57 | <button |
| 58 | class="btn btn-sm p-1 float-right btn-secondary" | 58 | class="btn btn-sm p-1 float-right btn-secondary" |
| 59 | ng-click="verPuntosDescarga(key)" | 59 | ng-click="verPuntosDescarga(key)" |
| 60 | title="Puntos de descarga"> | 60 | title="Puntos de descarga"> |
| 61 | <small>PD</small> | 61 | <small>PD</small> |
| 62 | </button> | 62 | </button> |
| 63 | </td> | 63 | </td> |
| 64 | <td> | 64 | <td> |
| 65 | <button | 65 | <button |
| 66 | class="btn btn-sm p-1 float-right" | 66 | class="btn btn-sm p-1 float-right" |
| 67 | ng-class="{ | 67 | ng-class="{ |
| 68 | 'btn-secondary': selectedDomicilio != key + 1, | 68 | 'btn-secondary': selectedDomicilio != key + 1, |
| 69 | 'btn-primary': selectedDomicilio == key + 1 | 69 | 'btn-primary': selectedDomicilio == key + 1 |
| 70 | }" | 70 | }" |
| 71 | foca-focus="selectedDomicilio == {{key + 1}}" | 71 | foca-focus="selectedDomicilio == {{key + 1}}" |
| 72 | ng-keydown="itemDomicilio($event.keyCode)" | 72 | ng-keydown="itemDomicilio($event.keyCode)" |
| 73 | ng-click="select(domicilio)" | 73 | ng-click="select(domicilio)" |
| 74 | title="Seleccionar"> | 74 | title="Seleccionar"> |
| 75 | <i class="fa fa-circle-thin"></i> | 75 | <i class="fa fa-circle-thin"></i> |
| 76 | </button> | 76 | </button> |
| 77 | </td> | 77 | </td> |
| 78 | </tr> | 78 | </tr> |
| 79 | </tbody> | 79 | </tbody> |
| 80 | </table> | 80 | </table> |
| 81 | </div> | 81 | </div> |
| 82 | <form name="formDomicilio" ng-show="ingreso"> | 82 | <form name="formDomicilio" ng-show="ingreso"> |
| 83 | <input | 83 | <input |
| 84 | type="hidden" | 84 | type="hidden" |
| 85 | ng-model="domicilio.latitud" | 85 | ng-model="domicilio.latitud" |
| 86 | ng-required="true"> | 86 | ng-required="true"> |
| 87 | <input | 87 | <input |
| 88 | type="hidden" | 88 | type="hidden" |
| 89 | ng-model="domicilio.longitud" | 89 | ng-model="domicilio.longitud" |
| 90 | ng-required="true"> | 90 | ng-required="true"> |
| 91 | <div class="row"> | 91 | <div class="row"> |
| 92 | <div class="col-4"> | 92 | <div class="col-4"> |
| 93 | <label>Tipo</label> | 93 | <label>Tipo</label> |
| 94 | <select | 94 | <select |
| 95 | class="form-control" | 95 | class="form-control" |
| 96 | ng-disabled="true"> | 96 | ng-disabled="true"> |
| 97 | <option ng-value="2">Entrega</option> | 97 | <option ng-value="2">Entrega</option> |
| 98 | </select> | 98 | </select> |
| 99 | </div> | 99 | </div> |
| 100 | <div class="col-8"> | 100 | <div class="col-8"> |
| 101 | <label>Titulo</label> | 101 | <label>Titulo</label> |
| 102 | <input | 102 | <input |
| 103 | type="text" | 103 | type="text" |
| 104 | foca-focus="ingreso" | 104 | foca-focus="ingreso" |
| 105 | class="form-control" | 105 | class="form-control" |
| 106 | ng-model="domicilio.titulo" | 106 | ng-model="domicilio.titulo" |
| 107 | placeholder="Ingrese título" | 107 | placeholder="Ingrese título" |
| 108 | ng-required="true" | 108 | ng-required="true" |
| 109 | ng-keypress="next($event.keyCode)" | 109 | ng-keypress="next($event.keyCode)" |
| 110 | ng-focus="focused = 1" | 110 | ng-focus="focused = 1" |
| 111 | foca-focus="focused == 1" | 111 | foca-focus="focused == 1" |
| 112 | teclado-virtual/> | 112 | teclado-virtual/> |
| 113 | </div> | 113 | </div> |
| 114 | <div class="col-9"> | 114 | <div class="col-9"> |
| 115 | <label>Calle</label> | 115 | <label>Calle</label> |
| 116 | <input | 116 | <input |
| 117 | type="text" | 117 | type="text" |
| 118 | class="form-control" | 118 | class="form-control" |
| 119 | ng-model="domicilio.calle" | 119 | ng-model="domicilio.calle" |
| 120 | placeholder="Ingrese calle" | 120 | placeholder="Ingrese calle" |
| 121 | ng-required="true" | 121 | ng-required="true" |
| 122 | ng-keypress="next($event.keyCode)" | 122 | ng-keypress="next($event.keyCode)" |
| 123 | ng-focus="focused = 2" | 123 | ng-focus="focused = 2" |
| 124 | foca-focus="focused == 2" | 124 | foca-focus="focused == 2" |
| 125 | teclado-virtual/> | 125 | teclado-virtual/> |
| 126 | </div> | 126 | </div> |
| 127 | <div class="col-3"> | 127 | <div class="col-3"> |
| 128 | <label>Nº</label> | 128 | <label>Nº</label> |
| 129 | <input | 129 | <input |
| 130 | type="text" | 130 | type="text" |
| 131 | class="form-control" | 131 | class="form-control" |
| 132 | ng-model="domicilio.numeroCalle" | 132 | ng-model="domicilio.numeroCalle" |
| 133 | placeholder="Ingrese Numero" | 133 | placeholder="Ingrese Numero" |
| 134 | ng-required="true" | 134 | ng-required="true" |
| 135 | ng-keypress="next($event.keyCode)" | 135 | ng-keypress="next($event.keyCode)" |
| 136 | ng-focus="focused = 3" | 136 | ng-focus="focused = 3" |
| 137 | foca-focus="focused == 3" | 137 | foca-focus="focused == 3" |
| 138 | only-numbers | 138 | only-numbers |
| 139 | teclado-virtual | 139 | teclado-virtual |
| 140 | /> | 140 | /> |
| 141 | </div> | 141 | </div> |
| 142 | <div class="col-6"> | 142 | <div class="col-6"> |
| 143 | <label>Localidad</label> | 143 | <label>Provincia</label> |
| 144 | <div class="input-group"> | 144 | <div class="input-group"> |
| 145 | <input | 145 | <input |
| 146 | type="text" | 146 | type="text" |
| 147 | class="form-control form-control-sm" | 147 | class="form-control form-control-sm" |
| 148 | ng-model="domicilio.localidad.NOMBRE" | 148 | ng-model="domicilio.provincia.NOMBRE" |
| 149 | ng-keypress="seleccionarLocalidad($event.keyCode)" | 149 | ng-keypress="seleccionarProvincia($event.keyCode)" |
| 150 | placeholder="Seleccione localidad" | 150 | placeholder="Seleccione provincia" |
| 151 | ng-required="true" | 151 | ng-required="true" |
| 152 | foca-focus="focused == 5" | 152 | ng-focus="focus(4)" |
| 153 | ng-focus="focus(5)" | 153 | foca-focus="focused == 4" |
| 154 | ng-disabled="domicilio.localidad.ID" | 154 | ng-disabled="domicilio.provincia.ID" |
| 155 | teclado-virtual/> | 155 | teclado-virtual/> |
| 156 | <button | 156 | <button |
| 157 | ng-show="domicilio.localidad.NOMBRE.length" | 157 | ng-show="domicilio.provincia.NOMBRE.length" |
| 158 | class="clear-input simple-hover" | 158 | class="clear-input simple-hover" |
| 159 | ng-click="domicilio.localidad.ID = null; domicilio.localidad.NOMBRE = ''"> | 159 | ng-click="domicilio.provincia.ID = null; domicilio.provincia.NOMBRE = ''"> |
| 160 | <i class="fa fa-times"></i> | 160 | <i class="fa fa-times"></i> |
| 161 | </button> | 161 | </button> |
| 162 | <div class="input-group-append"> | 162 | <div class="input-group-append"> |
| 163 | <button | 163 | <button |
| 164 | ladda="searchLoading" | 164 | ladda="searchLoading" |
| 165 | class="btn btn-outline-secondary" | 165 | class="btn btn-outline-secondary" |
| 166 | ng-click="seleccionarLocalidad(13)"> | 166 | ng-click="seleccionarProvincia(13)"> |
| 167 | <i class="fa fa-search"></i> | 167 | <i class="fa fa-search"></i> |
| 168 | </button> | 168 | </button> |
| 169 | </div> | 169 | </div> |
| 170 | </div> | 170 | </div> |
| 171 | </div> | 171 | </div> |
| 172 | <div class="col-6"> | 172 | <div class="col-6"> |
| 173 | <label>Provincia</label> | 173 | <label>Localidad</label> |
| 174 | <div class="input-group"> | 174 | <div class="input-group"> |
| 175 | <input | 175 | <input |
| 176 | type="text" | 176 | type="text" |
| 177 | class="form-control form-control-sm" | 177 | class="form-control form-control-sm" |
| 178 | ng-model="domicilio.provincia.NOMBRE" | 178 | ng-model="domicilio.localidad.NOMBRE" |
| 179 | ng-keypress="seleccionarProvincia($event.keyCode)" | 179 | ng-keypress="seleccionarLocalidad($event.keyCode)" |
| 180 | placeholder="Seleccione provincia" | 180 | placeholder="Seleccione localidad" |
| 181 | ng-required="true" | 181 | ng-required="true" |
| 182 | ng-focus="focus(4)" | 182 | foca-focus="focused == 5" |
| 183 | foca-focus="focused == 4" | 183 | ng-focus="focus(5)" |
| 184 | ng-disabled="domicilio.provincia.ID" | 184 | ng-disabled="domicilio.localidad.ID" |
| 185 | teclado-virtual/> | 185 | teclado-virtual/> |
| 186 | <button | 186 | <button |
| 187 | ng-show="domicilio.provincia.NOMBRE.length" | 187 | ng-show="domicilio.localidad.NOMBRE.length" |
| 188 | class="clear-input simple-hover" | 188 | class="clear-input simple-hover" |
| 189 | ng-click="domicilio.provincia.ID = null; domicilio.provincia.NOMBRE = ''"> | 189 | ng-click="domicilio.localidad.ID = null; domicilio.localidad.NOMBRE = ''"> |
| 190 | <i class="fa fa-times"></i> | 190 | <i class="fa fa-times"></i> |
| 191 | </button> | 191 | </button> |
| 192 | <div class="input-group-append"> | 192 | <div class="input-group-append"> |
| 193 | <button | 193 | <button |
| 194 | ladda="searchLoading" | 194 | ladda="searchLoading" |
| 195 | class="btn btn-outline-secondary" | 195 | class="btn btn-outline-secondary" |
| 196 | ng-click="seleccionarProvincia(13)"> | 196 | ng-click="seleccionarLocalidad(13)"> |
| 197 | <i class="fa fa-search"></i> | 197 | <i class="fa fa-search"></i> |
| 198 | </button> | 198 | </button> |
| 199 | </div> | 199 | </div> |
| 200 | </div> | 200 | </div> |
| 201 | </div> | 201 | </div> |
| 202 | </div> | 202 | </div> |
| 203 | <div class="row mt-3"> | 203 | <div class="row mt-3"> |
| 204 | <div class="col-12"> | 204 | <div class="col-12"> |
| 205 | <button | 205 | <button |
| 206 | class="btn btn-outline-debo float-right ml-3" | 206 | class="btn btn-outline-debo float-right ml-3" |
| 207 | ng-click="localizarDomicilio()">Buscar</button> | 207 | ng-click="localizarDomicilio()">Buscar</button> |
| 208 | <button | 208 | <button |
| 209 | class="btn btn-outline-debo float-right" | 209 | class="btn btn-outline-debo float-right" |
| 210 | ng-disabled="!domicilio.calle || !domicilio.numeroCalle || !domicilio.localidad || !domicilio.provincia" | 210 | ng-disabled="!domicilio.calle || !domicilio.numeroCalle || !domicilio.localidad || !domicilio.provincia" |
| 211 | ng-click="localizarDomicilio(true)">Localizar</button> | 211 | ng-click="localizarDomicilio(true)">Localizar</button> |
| 212 | </div> | 212 | </div> |
| 213 | </div> | 213 | </div> |
| 214 | </form> | 214 | </form> |
| 215 | </div> | 215 | </div> |
| 216 | <div class="modal-footer"> | 216 | <div class="modal-footer"> |
| 217 | <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto"> | 217 | <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto"> |
| 218 | <ul class="pagination pagination-sm mb-0 justify-content-end"> | 218 | <ul class="pagination pagination-sm mb-0 justify-content-end"> |
| 219 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 219 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
| 220 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 220 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
| 221 | <span>«</span> | 221 | <span>«</span> |
| 222 | <span class="sr-only">Anterior</span> | 222 | <span class="sr-only">Anterior</span> |
| 223 | </a> | 223 | </a> |
| 224 | </li> | 224 | </li> |
| 225 | <li | 225 | <li |
| 226 | class="page-item" | 226 | class="page-item" |
| 227 | ng-repeat="pagina in paginas" | 227 | ng-repeat="pagina in paginas" |
| 228 | ng-class="{'active': pagina == currentPage}"> | 228 | ng-class="{'active': pagina == currentPage}"> |
| 229 | <a | 229 | <a |
| 230 | class="page-link" | 230 | class="page-link" |
| 231 | href="javascript:void();" | 231 | href="javascript:void();" |
| 232 | ng-click="selectPage(pagina)" | 232 | ng-click="selectPage(pagina)" |
| 233 | ng-bind="pagina"> | 233 | ng-bind="pagina"> |
| 234 | </a> | 234 | </a> |
| 235 | </li> | 235 | </li> |
| 236 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 236 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
| 237 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 237 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> |
| 238 | <span>»</span> | 238 | <span>»</span> |
| 239 | <span class="sr-only">Siguiente</span> | 239 | <span class="sr-only">Siguiente</span> |
| 240 | </a> | 240 | </a> |
| 241 | </li> | 241 | </li> |
| 242 | </ul> | 242 | </ul> |
| 243 | </nav> | 243 | </nav> |
| 244 | <button | 244 | <button |
| 245 | ng-show="!ingreso" | 245 | ng-show="!ingreso" |
| 246 | class="btn btn-sm btn-secondary" | 246 | class="btn btn-sm btn-secondary" |
| 247 | ng-click="cancel()"> | 247 | ng-click="cancel()"> |
| 248 | Volver | 248 | Volver |
| 249 | </button> | 249 | </button> |
| 250 | <button | 250 | <button |
| 251 | ng-show="ingreso" | 251 | ng-show="ingreso" |
| 252 | class="btn btn-secondary btn-sm" | 252 | class="btn btn-secondary btn-sm" |
| 253 | ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]"> | 253 | ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]"> |
| 254 | Cancelar | 254 | Cancelar |
| 255 | </button> | 255 | </button> |
| 256 | <button | 256 | <button |
| 257 | ng-show="ingreso" | 257 | ng-show="ingreso" |
| 258 | class="btn btn-sm btn-primary" | 258 | class="btn btn-sm btn-primary" |
| 259 | ng-click="agregarDomicilio()"> | 259 | ng-click="agregarDomicilio()"> |
| 260 | Agregar domicilio | 260 | Agregar domicilio |
| 261 | </button> | 261 | </button> |
| 262 | </div> | 262 | </div> |
| 263 | 263 |