Commit 09c2e71c575e50753fe651ba735b3b6cfd6706de
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Nuevo diseño See merge request !6
Showing
2 changed files
Show diff stats
src/js/controller.js
| ... | ... | @@ -7,18 +7,25 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 7 | 7 | notaPedidoBusinessService, $rootScope, focaSeguimientoService) |
| 8 | 8 | { |
| 9 | 9 | $scope.botonera = [ |
| 10 | - {texto: 'Vendedor', accion: function() { | |
| 10 | + {texto: 'Vendedor', imagen: '../img/abmPrecios.png', accion: function() { | |
| 11 | 11 | validarNotaRemitada($scope.seleccionarVendedor);}}, |
| 12 | - {texto: 'Cliente', accion: function() { | |
| 12 | + {texto: 'Cliente', imagen: '../img/abmPrecios.png', accion: function() { | |
| 13 | 13 | validarNotaRemitada($scope.seleccionarCliente);}}, |
| 14 | - {texto: 'Proveedor', accion: function() { | |
| 14 | + {texto: 'Proveedor', imagen: '../img/abmPrecios.png', accion: function() { | |
| 15 | 15 | validarNotaRemitada($scope.seleccionarProveedor);}}, |
| 16 | - {texto: 'Moneda', accion: function() { | |
| 16 | + {texto: 'Moneda', imagen: '../img/abmPrecios.png', accion: function() { | |
| 17 | 17 | validarNotaRemitada($scope.abrirModalMoneda);}}, |
| 18 | - {texto: 'Precios y condiciones', accion: function() { | |
| 19 | - validarNotaRemitada($scope.abrirModalListaPrecio);}}, | |
| 20 | - {texto: 'Flete', accion: function() { | |
| 18 | + {texto: 'Precios y condiciones', imagen: '../img/abmPrecios.png', | |
| 19 | + accion: function() { | |
| 20 | + validarNotaRemitada($scope.abrirModalListaPrecio);}}, | |
| 21 | + {texto: 'Flete', imagen: '../img/abmPrecios.png', accion: function() { | |
| 21 | 22 | validarNotaRemitada($scope.abrirModalFlete);}}, |
| 23 | + {texto: 'Productos', imagen: '../img/abmPrecios.png', accion: function() { | |
| 24 | + $scope.seleccionarArticulo(); | |
| 25 | + }}, | |
| 26 | + {texto: '', accion: function() {}}, | |
| 27 | + {texto: '', accion: function() {}}, | |
| 28 | + {texto: '', accion: function() {}}, | |
| 22 | 29 | {texto: '', accion: function() {}}, |
| 23 | 30 | {texto: '', accion: function() {}} |
| 24 | 31 | ]; |
src/views/nota-pedido.html
| 1 | -<div class="crear-nota-pedido"> | |
| 2 | - <form name="formCrearNota" ng-submit="crearNotaPedido()" class="mb-0"> | |
| 1 | +<div class="crear-nota-pedido row"> | |
| 2 | + <form name="formCrearNota" ng-submit="crearNotaPedido()" class="mb-0 col-lg-12"> | |
| 3 | 3 | <div class="row"> |
| 4 | - <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2"> | |
| 5 | - <div class="row p-1 panel-informativo"> | |
| 4 | + <div class="col-md-10 col-lg-12"> | |
| 5 | + <div class="row panel-informativo"> | |
| 6 | 6 | <div class="col-12"> |
| 7 | - <div class="row"> | |
| 8 | - <div class="col-12 col-sm-4 nota-pedido"> | |
| 9 | - <h5>NOTA DE PEDIDO</h5> | |
| 7 | + <div class="row titulares"> | |
| 8 | + <div class="col-12 col-sm-3 nota-pedido border border-left-0 border-white align-middle"> | |
| 9 | + <h5 class="mb-0">NOTA DE PEDIDO</h5> | |
| 10 | 10 | </div> |
| 11 | - <div class="col-5 col-sm-4 numero-pedido" | |
| 11 | + <div class="col-5 col-sm-3 numero-pedido border border-white align-middle" | |
| 12 | 12 | >Nº {{puntoVenta}}-{{comprobante}} |
| 13 | 13 | <button |
| 14 | - class="btn btn-xs btn-outline-dark" | |
| 14 | + class="btn btn-xs btn-outline-light float-right" | |
| 15 | 15 | type="button" |
| 16 | 16 | ng-click="seleccionarNotaPedido()" |
| 17 | 17 | > |
| 18 | 18 | <i class="fa fa-search"></i> |
| 19 | 19 | </button> |
| 20 | 20 | </div> |
| 21 | - <div class="col-7 col-sm-4 text-right"> | |
| 22 | - Fecha: | |
| 21 | + <div class="col-7 col-sm-3 border border-white align-middle"> | |
| 22 | + Fecha:  | |
| 23 | 23 | <span |
| 24 | 24 | ng-show="!datepickerAbierto" |
| 25 | - ng-bind="now | date:'dd/MM/yyyy HH:mm'" | |
| 25 | + ng-bind="now | date:'dd/MM/yyyy'" | |
| 26 | 26 | ng-click="datepickerAbierto = true" |
| 27 | 27 | > |
| 28 | 28 | </span> |
| ... | ... | @@ -37,8 +37,17 @@ |
| 37 | 37 | hasta-hoy |
| 38 | 38 | /> |
| 39 | 39 | </div> |
| 40 | + <div class="col-sm-3 border border-white border-right-0 align-middle"> | |
| 41 | + Hora:  | |
| 42 | + <span | |
| 43 | + ng-show="!datepickerAbierto" | |
| 44 | + ng-bind="now | date:'HH:mm'" | |
| 45 | + ng-click="datepickerAbierto = true" | |
| 46 | + > | |
| 47 | + </span> | |
| 48 | + </div> | |
| 40 | 49 | </div> |
| 41 | - <div class="row"> | |
| 50 | + <div class="row py-2"> | |
| 42 | 51 | <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> |
| 43 | 52 | <span class="label" ng-bind="cab.label"></span> |
| 44 | 53 | <span class="valor" ng-bind="cab.valor" ng-if="!isNumber(cab.valor)"></span> |
| ... | ... | @@ -64,454 +73,452 @@ |
| 64 | 73 | </div> |
| 65 | 74 | </div> |
| 66 | 75 | </div> |
| 67 | - <div class="row p-1 botonera-secundaria"> | |
| 76 | + | |
| 77 | + </div> | |
| 78 | + </div> | |
| 79 | + </form> | |
| 80 | + <div class="col-lg-12"> | |
| 81 | + <div class="row mt-4"> | |
| 82 | + <div class="col-12 col-md-10 col-lg-10 border border-light rounded"> | |
| 83 | + <div class="row px-5 py-2 botonera-secundaria"> | |
| 68 | 84 | <div class="col-12"> |
| 69 | 85 | <div class="row"> |
| 70 | - <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera"> | |
| 86 | + <div | |
| 87 | + class="col-6 col-sm-2 px-1 py-1 m-auto m-md-0" | |
| 88 | + ng-repeat="boton in botonera" | |
| 89 | + ng-class="{'d-none d-md-grid': boton.texto == ''}"> | |
| 71 | 90 | <button |
| 72 | 91 | type="button" |
| 73 | - class="btn btn-default btn-block btn-xs text-left py-2" | |
| 92 | + class="btn btn-default btn-block btn-xs text-center py-1 rounded border border-light" | |
| 74 | 93 | ng-click="boton.accion()" |
| 75 | - ng-class="{'d-none d-sm-block': boton.texto == ''}" | |
| 94 | + ng-class="{'d-sm-block h-100': boton.texto == ''}" | |
| 76 | 95 | > |
| 77 | - <i | |
| 78 | - class="fa fa-arrow-circle-right" | |
| 79 | - ng-show="boton.texto != ''" | |
| 80 | - ></i> | |
| 81 | - | |
| 82 | - {{boton.texto}} | |
| 96 | + <img src="{{boton.imagen}}" alt="" ng-if="boton.imagen"> | |
| 97 | + <span>{{boton.texto}}</span> | |
| 83 | 98 | </button> |
| 84 | 99 | </div> |
| 85 | 100 | </div> |
| 86 | 101 | </div> |
| 87 | 102 | </div> |
| 88 | - </div> | |
| 89 | - </div> | |
| 90 | - </form> | |
| 91 | - <div class="row"> | |
| 92 | - <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | |
| 93 | - <!-- PC --> | |
| 94 | - <div class="row grilla-articulo align-items-end d-none d-sm-flex"> | |
| 95 | - <table class="table tabla-articulo table-striped table-sm table-dark"> | |
| 96 | - <thead> | |
| 97 | - <tr class="d-flex"> | |
| 98 | - <th class="">#</th> | |
| 99 | - <th class="col">Código</th> | |
| 100 | - <th class="col-4">Descripción</th> | |
| 101 | - <th class="col text-right">Cantidad</th> | |
| 102 | - <th class="col text-right">Precio Unitario</th> | |
| 103 | - <th class="col text-right">SubTotal</th> | |
| 104 | - <th class="text-right"> | |
| 105 | - <button | |
| 106 | - class="btn btn-outline-secondary selectable" | |
| 107 | - ng-click="show = !show; masMenos()" | |
| 108 | - > | |
| 109 | - <i | |
| 110 | - class="fa fa-chevron-down" | |
| 111 | - ng-show="show" | |
| 112 | - aria-hidden="true" | |
| 103 | + <!-- PC --> | |
| 104 | + <div class="row grilla-articulo align-items-end d-none d-sm-flex"> | |
| 105 | + <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> | |
| 106 | + <thead> | |
| 107 | + <tr class="d-flex"> | |
| 108 | + <th valign="middle" class="">#</th> | |
| 109 | + <th valign="middle" class="col">Código</th> | |
| 110 | + <th valign="middle" class="col-4">Descripción</th> | |
| 111 | + <th valign="middle" class="col text-right">Cantidad</th> | |
| 112 | + <th valign="middle" class="col text-right">Precio Unitario</th> | |
| 113 | + <th valign="middle" class="col text-right">SubTotal</th> | |
| 114 | + <th valign="middle" class="text-right"> | |
| 115 | + <button | |
| 116 | + class="btn btn-outline-secondary selectable" | |
| 117 | + ng-click="show = !show; masMenos()" | |
| 118 | + > | |
| 119 | + <i | |
| 120 | + class="fa fa-chevron-down" | |
| 121 | + ng-show="show" | |
| 122 | + aria-hidden="true" | |
| 123 | + > | |
| 124 | + </i> | |
| 125 | + <i | |
| 126 | + class="fa fa-chevron-up" | |
| 127 | + ng-hide="show" | |
| 128 | + aria-hidden="true"> | |
| 129 | + </i> | |
| 130 | + </button> | |
| 131 | + </th> | |
| 132 | + </tr> | |
| 133 | + </thead> | |
| 134 | + <tbody class="tabla-articulo-body"> | |
| 135 | + <tr | |
| 136 | + ng-repeat="(key, articulo) in articulosTabla" | |
| 137 | + ng-show="show || key == (articulosTabla.length - 1)" | |
| 138 | + class="d-flex" | |
| 139 | + > | |
| 140 | + <td ng-bind="key + 1"></td> | |
| 141 | + <td | |
| 142 | + class="col" | |
| 143 | + ng-bind="articulo.sector + '-' + articulo.codigo" | |
| 144 | + ></td> | |
| 145 | + <td | |
| 146 | + class="col-4" | |
| 147 | + ng-bind="articulo.descripcion" | |
| 148 | + ></td> | |
| 149 | + <td class="col text-right"> | |
| 150 | + <input | |
| 151 | + ng-show="articulo.editCantidad" | |
| 152 | + ng-model="articulo.cantidad" | |
| 153 | + class="form-control" | |
| 154 | + foca-tipo-input | |
| 155 | + min="1" | |
| 156 | + step="0.001" | |
| 157 | + foca-focus="articulo.editCantidad" | |
| 158 | + ng-keypress="editarArticulo($event.keyCode, articulo)" | |
| 159 | + ng-focus="selectFocus($event)" | |
| 160 | + teclado-virtual | |
| 113 | 161 | > |
| 162 | + <i | |
| 163 | + class="selectable" | |
| 164 | + ng-click="cambioEdit(articulo, 'cantidad')" | |
| 165 | + ng-hide="articulo.editCantidad" | |
| 166 | + ng-bind="articulo.cantidad"> | |
| 114 | 167 | </i> |
| 168 | + </td> | |
| 169 | + <td class="col text-right"> | |
| 170 | + <input | |
| 171 | + ng-show="articulo.editPrecio" | |
| 172 | + ng-model="articulo.precio" | |
| 173 | + class="form-control" | |
| 174 | + foca-tipo-input | |
| 175 | + min="0" | |
| 176 | + step="0.0001" | |
| 177 | + foca-focus="articulo.editPrecio" | |
| 178 | + ng-keypress="editarArticulo($event.keyCode, articulo)" | |
| 179 | + ng-focus="selectFocus($event)" | |
| 180 | + teclado-virtual | |
| 181 | + > | |
| 115 | 182 | <i |
| 116 | - class="fa fa-chevron-up" | |
| 117 | - ng-hide="show" | |
| 118 | - aria-hidden="true"> | |
| 183 | + class="selectable" | |
| 184 | + ng-click="idLista == -1 && cambioEdit(articulo, 'precio')" | |
| 185 | + ng-hide="articulo.editPrecio" | |
| 186 | + ng-bind="articulo.precio | | |
| 187 | + currency: notaPedido.moneda.SIMBOLO : 4"> | |
| 119 | 188 | </i> |
| 120 | - </button> | |
| 121 | - </th> | |
| 122 | - </tr> | |
| 123 | - </thead> | |
| 124 | - <tbody class="tabla-articulo-body"> | |
| 125 | - <tr | |
| 126 | - ng-repeat="(key, articulo) in articulosTabla" | |
| 127 | - ng-show="show || key == (articulosTabla.length - 1)" | |
| 128 | - class="d-flex" | |
| 129 | - > | |
| 130 | - <td ng-bind="key + 1"></td> | |
| 131 | - <td | |
| 132 | - class="col" | |
| 133 | - ng-bind="articulo.sector + '-' + articulo.codigo" | |
| 134 | - ></td> | |
| 135 | - <td | |
| 136 | - class="col-4" | |
| 137 | - ng-bind="articulo.descripcion" | |
| 138 | - ></td> | |
| 139 | - <td class="col text-right"> | |
| 140 | - <input | |
| 141 | - ng-show="articulo.editCantidad" | |
| 142 | - ng-model="articulo.cantidad" | |
| 143 | - class="form-control" | |
| 144 | - foca-tipo-input | |
| 145 | - min="1" | |
| 146 | - step="0.001" | |
| 147 | - foca-focus="articulo.editCantidad" | |
| 148 | - ng-keypress="editarArticulo($event.keyCode, articulo)" | |
| 149 | - ng-focus="selectFocus($event)" | |
| 150 | - teclado-virtual | |
| 151 | - > | |
| 152 | - <i | |
| 153 | - class="selectable" | |
| 154 | - ng-click="cambioEdit(articulo, 'cantidad')" | |
| 155 | - ng-hide="articulo.editCantidad" | |
| 156 | - ng-bind="articulo.cantidad"> | |
| 157 | - </i> | |
| 158 | - </td> | |
| 159 | - <td class="col text-right"> | |
| 160 | - <input | |
| 161 | - ng-show="articulo.editPrecio" | |
| 162 | - ng-model="articulo.precio" | |
| 163 | - class="form-control" | |
| 164 | - foca-tipo-input | |
| 165 | - min="0" | |
| 166 | - step="0.0001" | |
| 167 | - foca-focus="articulo.editPrecio" | |
| 168 | - ng-keypress="editarArticulo($event.keyCode, articulo)" | |
| 169 | - ng-focus="selectFocus($event)" | |
| 170 | - teclado-virtual | |
| 171 | - > | |
| 172 | - <i | |
| 173 | - class="selectable" | |
| 174 | - ng-click="idLista == -1 && cambioEdit(articulo, 'precio')" | |
| 175 | - ng-hide="articulo.editPrecio" | |
| 176 | - ng-bind="articulo.precio | | |
| 177 | - currency: notaPedido.moneda.SIMBOLO : 4"> | |
| 178 | - </i> | |
| 179 | - </td> | |
| 180 | - <td | |
| 181 | - class="col text-right" | |
| 182 | - ng-bind="(articulo.precio * articulo.cantidad) | | |
| 183 | - currency: notaPedido.moneda.SIMBOLO"> | |
| 184 | - </td> | |
| 185 | - <td class="text-center"> | |
| 186 | - <button | |
| 187 | - ng-show="articulo.editCantidad || articulo.editPrecio" | |
| 188 | - class="btn btn-outline-secondary" | |
| 189 | - ng-click="editarArticulo(13, articulo)" | |
| 190 | - > | |
| 191 | - <i class="fa fa-save"></i> | |
| 192 | - </button> | |
| 193 | - <button | |
| 194 | - class="btn btn-outline-secondary" | |
| 195 | - ng-click="quitarArticulo(key)" | |
| 196 | - > | |
| 197 | - <i class="fa fa-trash"></i> | |
| 198 | - </button> | |
| 199 | - </td> | |
| 200 | - </tr> | |
| 201 | - </tbody> | |
| 202 | - <tfoot> | |
| 203 | - <tr ng-show="!cargando" class="d-flex"> | |
| 204 | - <td | |
| 205 | - class="align-middle" | |
| 206 | - ng-bind="articulosTabla.length + 1" | |
| 207 | - ></td> | |
| 208 | - <td class="col"> | |
| 209 | - <input | |
| 210 | - class="form-control" | |
| 211 | - ng-model="articuloACargar.sectorCodigo" | |
| 212 | - readonly | |
| 213 | - > | |
| 214 | - </td> | |
| 215 | - <td class="col-4 tabla-articulo-descripcion"> | |
| 216 | - <input | |
| 217 | - class="form-control" | |
| 218 | - ng-model="articuloACargar.descripcion" | |
| 219 | - readonly | |
| 220 | - > | |
| 221 | - </td> | |
| 222 | - <td class="col text-right"> | |
| 223 | - <input | |
| 224 | - class="form-control" | |
| 225 | - foca-tipo-input | |
| 226 | - min="1" | |
| 227 | - step="0.001" | |
| 228 | - ng-model="articuloACargar.cantidad" | |
| 229 | - foca-focus="!cargando" | |
| 230 | - esc-key="resetFilter()" | |
| 231 | - ng-keypress="agregarATabla($event.keyCode)" | |
| 232 | - teclado-virtual | |
| 233 | - > | |
| 234 | - </td> | |
| 235 | - <td class="col text-right"> | |
| 236 | - <input | |
| 237 | - class="form-control" | |
| 238 | - ng-value="articuloACargar.precio | | |
| 239 | - currency: notaPedido.moneda.SIMBOLO : 4" | |
| 240 | - ng-show="idLista != -1" | |
| 241 | - readonly | |
| 242 | - > | |
| 243 | - <input | |
| 244 | - class="form-control" | |
| 245 | - foca-tipo-input | |
| 246 | - min="0" | |
| 247 | - step="0.0001" | |
| 248 | - ng-model="articuloACargar.precio" | |
| 249 | - esc-key="resetFilter()" | |
| 250 | - ng-keypress="agregarATabla($event.keyCode)" | |
| 251 | - ng-show="idLista == -1" | |
| 252 | - teclado-virtual | |
| 253 | - > | |
| 254 | - </td> | |
| 255 | - <td class="col text-right"> | |
| 256 | - <input | |
| 257 | - class="form-control" | |
| 258 | - ng-value="getSubTotal() | currency: notaPedido.moneda.SIMBOLO" | |
| 259 | - readonly | |
| 189 | + </td> | |
| 190 | + <td | |
| 191 | + class="col text-right" | |
| 192 | + ng-bind="(articulo.precio * articulo.cantidad) | | |
| 193 | + currency: notaPedido.moneda.SIMBOLO"> | |
| 194 | + </td> | |
| 195 | + <td class="text-center"> | |
| 196 | + <button | |
| 197 | + ng-show="articulo.editCantidad || articulo.editPrecio" | |
| 198 | + class="btn btn-outline-secondary" | |
| 199 | + ng-click="editarArticulo(13, articulo)" | |
| 200 | + > | |
| 201 | + <i class="fa fa-save"></i> | |
| 202 | + </button> | |
| 203 | + <button | |
| 204 | + class="btn btn-outline-secondary" | |
| 205 | + ng-click="quitarArticulo(key)" | |
| 206 | + > | |
| 207 | + <i class="fa fa-trash"></i> | |
| 208 | + </button> | |
| 209 | + </td> | |
| 210 | + </tr> | |
| 211 | + </tbody> | |
| 212 | + <tfoot> | |
| 213 | + <tr ng-show="!cargando" class="d-flex"> | |
| 214 | + <td | |
| 215 | + class="align-middle" | |
| 216 | + ng-bind="articulosTabla.length + 1" | |
| 260 | 217 | ></td> |
| 261 | - <td class="text-center align-middle"> | |
| 262 | - <button | |
| 263 | - class="btn btn-outline-secondary" | |
| 264 | - ng-click="agregarATabla(13)" | |
| 265 | - > | |
| 266 | - <i class="fa fa-save"></i> | |
| 267 | - </button> | |
| 268 | - </td> | |
| 269 | - </tr> | |
| 270 | - <tr ng-show="cargando" class="d-flex"> | |
| 271 | - <td colspan="7" class="col-12"> | |
| 272 | - <input | |
| 273 | - placeholder="Seleccione Articulo" | |
| 274 | - class="form-control form-control-sm" | |
| 275 | - readonly | |
| 276 | - ng-click="seleccionarArticulo()" | |
| 277 | - /> | |
| 278 | - </td> | |
| 279 | - </tr> | |
| 280 | - <tr class="d-flex"> | |
| 281 | - <td colspan="4" class="no-border-top"> | |
| 282 | - <strong>Items:</strong> | |
| 283 | - <a ng-bind="articulosTabla.length"></a> | |
| 284 | - </td> | |
| 285 | - <td class="text-right ml-auto table-celda-total no-border-top"> | |
| 286 | - <h3>Total:</h3> | |
| 287 | - </td> | |
| 288 | - <td class="table-celda-total text-right no-border-top" colspan="1"> | |
| 289 | - <h3>{{getTotal() | currency: notaPedido.moneda.SIMBOLO}}</h3> | |
| 290 | - </td> | |
| 291 | - <td class="text-right no-border-top"> | |
| 292 | - <button | |
| 293 | - type="button" | |
| 294 | - class="btn btn-default btn-sm" | |
| 295 | - > | |
| 296 | - Totales | |
| 297 | - </button> | |
| 298 | - </td> | |
| 299 | - </tr> | |
| 300 | - </tfoot> | |
| 301 | - </table> | |
| 302 | - </div> | |
| 303 | - <!-- MOBILE --> | |
| 304 | - <div class="row d-sm-none"> | |
| 305 | - <table class="table table-sm table-striped table-dark margin-bottom-mobile"> | |
| 306 | - <thead> | |
| 307 | - <tr class="d-flex"> | |
| 308 | - <th class="">#</th> | |
| 309 | - <th class="col px-0"> | |
| 310 | - <div class="d-flex"> | |
| 311 | - <div class="col-4 px-1">Código</div> | |
| 312 | - <div class="col-8 px-1">Descripción</div> | |
| 313 | - </div> | |
| 314 | - <div class="d-flex"> | |
| 315 | - <div class="col-3 px-1">Cantidad</div> | |
| 316 | - <div class="col px-1 text-right">P. Uni.</div> | |
| 317 | - <div class="col px-1 text-right">Subtotal</div> | |
| 318 | - </div> | |
| 319 | - </th> | |
| 320 | - <th class="text-center tamaño-boton"> | |
| 321 | - | |
| 322 | - </th> | |
| 323 | - </tr> | |
| 324 | - </thead> | |
| 325 | - <tbody> | |
| 326 | - <tr | |
| 327 | - ng-repeat="(key, articulo) in articulosTabla" | |
| 328 | - ng-show="show || key == articulosTabla.length - 1" | |
| 329 | - > | |
| 330 | - <td class="w-100 align-middle d-flex p-0"> | |
| 331 | - <div class="align-middle p-1"> | |
| 332 | - <span ng-bind="key+1" class="align-middle"></span> | |
| 333 | - </div> | |
| 334 | - <div class="col px-0"> | |
| 218 | + <td class="col"> | |
| 219 | + <input | |
| 220 | + class="form-control" | |
| 221 | + ng-model="articuloACargar.sectorCodigo" | |
| 222 | + readonly | |
| 223 | + > | |
| 224 | + </td> | |
| 225 | + <td class="col-4 tabla-articulo-descripcion"> | |
| 226 | + <input | |
| 227 | + class="form-control" | |
| 228 | + ng-model="articuloACargar.descripcion" | |
| 229 | + readonly | |
| 230 | + > | |
| 231 | + </td> | |
| 232 | + <td class="col text-right"> | |
| 233 | + <input | |
| 234 | + class="form-control" | |
| 235 | + foca-tipo-input | |
| 236 | + min="1" | |
| 237 | + step="0.001" | |
| 238 | + ng-model="articuloACargar.cantidad" | |
| 239 | + foca-focus="!cargando" | |
| 240 | + esc-key="resetFilter()" | |
| 241 | + ng-keypress="agregarATabla($event.keyCode)" | |
| 242 | + teclado-virtual | |
| 243 | + > | |
| 244 | + </td> | |
| 245 | + <td class="col text-right"> | |
| 246 | + <input | |
| 247 | + class="form-control" | |
| 248 | + ng-value="articuloACargar.precio | | |
| 249 | + currency: notaPedido.moneda.SIMBOLO : 4" | |
| 250 | + ng-show="idLista != -1" | |
| 251 | + readonly | |
| 252 | + > | |
| 253 | + <input | |
| 254 | + class="form-control" | |
| 255 | + foca-tipo-input | |
| 256 | + min="0" | |
| 257 | + step="0.0001" | |
| 258 | + ng-model="articuloACargar.precio" | |
| 259 | + esc-key="resetFilter()" | |
| 260 | + ng-keypress="agregarATabla($event.keyCode)" | |
| 261 | + ng-show="idLista == -1" | |
| 262 | + teclado-virtual | |
| 263 | + > | |
| 264 | + </td> | |
| 265 | + <td class="col text-right"> | |
| 266 | + <input | |
| 267 | + class="form-control" | |
| 268 | + ng-value="getSubTotal() | currency: notaPedido.moneda.SIMBOLO" | |
| 269 | + readonly | |
| 270 | + ></td> | |
| 271 | + <td class="text-center align-middle"> | |
| 272 | + <button | |
| 273 | + class="btn btn-outline-secondary" | |
| 274 | + ng-click="agregarATabla(13)" | |
| 275 | + > | |
| 276 | + <i class="fa fa-save"></i> | |
| 277 | + </button> | |
| 278 | + </td> | |
| 279 | + </tr> | |
| 280 | + <tr class="d-flex"> | |
| 281 | + <td colspan="4" class="no-border-top"> | |
| 282 | + <strong>Items:</strong> | |
| 283 | + <a ng-bind="articulosTabla.length"></a> | |
| 284 | + </td> | |
| 285 | + <td class="text-right ml-auto table-celda-total no-border-top"> | |
| 286 | + <h3>Total:</h3> | |
| 287 | + </td> | |
| 288 | + <td class="table-celda-total text-right no-border-top" colspan="1"> | |
| 289 | + <h3>{{getTotal() | currency: notaPedido.moneda.SIMBOLO}}</h3> | |
| 290 | + </td> | |
| 291 | + <td class="text-right no-border-top"> | |
| 292 | + <button | |
| 293 | + type="button" | |
| 294 | + class="btn btn-default btn-sm" | |
| 295 | + > | |
| 296 | + Totales | |
| 297 | + </button> | |
| 298 | + </td> | |
| 299 | + </tr> | |
| 300 | + </tfoot> | |
| 301 | + </table> | |
| 302 | + </div> | |
| 303 | + <!-- MOBILE --> | |
| 304 | + <div class="row d-sm-none"> | |
| 305 | + <table class="table table-sm table-striped table-dark margin-bottom-mobile"> | |
| 306 | + <thead> | |
| 307 | + <tr class="d-flex"> | |
| 308 | + <th class="">#</th> | |
| 309 | + <th class="col px-0"> | |
| 310 | + <div class="d-flex"> | |
| 311 | + <div class="col-4 px-1">Código</div> | |
| 312 | + <div class="col-8 px-1">Descripción</div> | |
| 313 | + </div> | |
| 314 | + <div class="d-flex"> | |
| 315 | + <div class="col-3 px-1">Cantidad</div> | |
| 316 | + <div class="col px-1 text-right">P. Uni.</div> | |
| 317 | + <div class="col px-1 text-right">Subtotal</div> | |
| 318 | + </div> | |
| 319 | + </th> | |
| 320 | + <th class="text-center tamaño-boton"> | |
| 321 | + | |
| 322 | + </th> | |
| 323 | + </tr> | |
| 324 | + </thead> | |
| 325 | + <tbody> | |
| 326 | + <tr | |
| 327 | + ng-repeat="(key, articulo) in articulosTabla" | |
| 328 | + ng-show="show || key == articulosTabla.length - 1" | |
| 329 | + > | |
| 330 | + <td class="w-100 align-middle d-flex p-0"> | |
| 331 | + <div class="align-middle p-1"> | |
| 332 | + <span ng-bind="key+1" class="align-middle"></span> | |
| 333 | + </div> | |
| 334 | + <div class="col px-0"> | |
| 335 | + <div class="d-flex"> | |
| 336 | + <div class="col-4 px-1"> | |
| 337 | + <span | |
| 338 | + ng-bind="articulo.sector + '-' + articulo.codigo" | |
| 339 | + ></span> | |
| 340 | + </div> | |
| 341 | + <div class="col-8 px-1"> | |
| 342 | + <span ng-bind="articulo.descripcion"></span> | |
| 343 | + </div> | |
| 344 | + </div> | |
| 345 | + <div class="d-flex"> | |
| 346 | + <div class="col-3 px-1"> | |
| 347 | + <span | |
| 348 | + ng-bind="'x' + articulo.cantidad" | |
| 349 | + ng-hide="articulo.editCantidad" | |
| 350 | + ></span> | |
| 351 | + <i | |
| 352 | + class="fa fa-pencil text-white-50" | |
| 353 | + aria-hidden="true" | |
| 354 | + ng-hide="articulo.editCantidad" | |
| 355 | + ng-click="articulo.editCantidad = true" | |
| 356 | + ></i> | |
| 357 | + <input | |
| 358 | + ng-show="articulo.editCantidad" | |
| 359 | + ng-model="articulo.cantidad" | |
| 360 | + class="form-control" | |
| 361 | + foca-tipo-input | |
| 362 | + min="1" | |
| 363 | + step="0.001" | |
| 364 | + foca-focus="articulo.editCantidad" | |
| 365 | + ng-keypress="editarArticulo($event.keyCode, articulo)" | |
| 366 | + ng-focus="selectFocus($event)" | |
| 367 | + > | |
| 368 | + </div> | |
| 369 | + <div class="col px-1 text-right"> | |
| 370 | + <span ng-bind="articulo.precio | | |
| 371 | + currency: notaPedido.moneda.SIMBOLO : 4"></span> | |
| 372 | + ></span> | |
| 373 | + </div> | |
| 374 | + <div class="col px-1 text-right"> | |
| 375 | + <span | |
| 376 | + ng-bind="(articulo.precio * articulo.cantidad) | | |
| 377 | + currency: notaPedido.moneda.SIMBOLO" | |
| 378 | + > | |
| 379 | + </span> | |
| 380 | + </div> | |
| 381 | + </div> | |
| 382 | + </div> | |
| 383 | + <div class="align-middle p-1"> | |
| 384 | + <button | |
| 385 | + class="btn btn-outline-secondary" | |
| 386 | + ng-click="quitarArticulo(key)" | |
| 387 | + > | |
| 388 | + <i class="fa fa-trash"></i> | |
| 389 | + </button> | |
| 390 | + </div> | |
| 391 | + </td> | |
| 392 | + </tr> | |
| 393 | + </tbody> | |
| 394 | + <tfoot> | |
| 395 | + <!-- CARGANDO ITEM --> | |
| 396 | + <tr ng-show="!cargando" class="d-flex"> | |
| 397 | + <td | |
| 398 | + class="align-middle p-1" | |
| 399 | + ng-bind="articulosTabla.length + 1" | |
| 400 | + ></td> | |
| 401 | + <td class="col p-0"> | |
| 335 | 402 | <div class="d-flex"> |
| 336 | 403 | <div class="col-4 px-1"> |
| 337 | 404 | <span |
| 338 | - ng-bind="articulo.sector + '-' + articulo.codigo" | |
| 405 | + ng-bind="articuloACargar.sectorCodigo" | |
| 339 | 406 | ></span> |
| 340 | 407 | </div> |
| 341 | 408 | <div class="col-8 px-1"> |
| 342 | - <span ng-bind="articulo.descripcion"></span> | |
| 409 | + <span ng-bind="articuloACargar.descripcion"></span> | |
| 343 | 410 | </div> |
| 344 | 411 | </div> |
| 345 | 412 | <div class="d-flex"> |
| 346 | - <div class="col-3 px-1"> | |
| 347 | - <span | |
| 348 | - ng-bind="'x' + articulo.cantidad" | |
| 349 | - ng-hide="articulo.editCantidad" | |
| 350 | - ></span> | |
| 351 | - <i | |
| 352 | - class="fa fa-pencil text-white-50" | |
| 353 | - aria-hidden="true" | |
| 354 | - ng-hide="articulo.editCantidad" | |
| 355 | - ng-click="articulo.editCantidad = true" | |
| 356 | - ></i> | |
| 413 | + <div class="col-3 px-1 m-1"> | |
| 357 | 414 | <input |
| 358 | - ng-show="articulo.editCantidad" | |
| 359 | - ng-model="articulo.cantidad" | |
| 360 | - class="form-control" | |
| 415 | + class="form-control p-1" | |
| 361 | 416 | foca-tipo-input |
| 362 | 417 | min="1" |
| 363 | - step="0.001" | |
| 364 | - foca-focus="articulo.editCantidad" | |
| 365 | - ng-keypress="editarArticulo($event.keyCode, articulo)" | |
| 366 | - ng-focus="selectFocus($event)" | |
| 418 | + ng-model="articuloACargar.cantidad" | |
| 419 | + foca-focus="!cargando" | |
| 420 | + ng-keypress="agregarATabla($event.keyCode)" | |
| 421 | + style="height: auto; line-height: 1.1em" | |
| 367 | 422 | > |
| 368 | 423 | </div> |
| 369 | 424 | <div class="col px-1 text-right"> |
| 370 | - <span ng-bind="articulo.precio | | |
| 371 | - currency: notaPedido.moneda.SIMBOLO : 4"></span> | |
| 425 | + <span ng-bind="articuloACargar.precio | | |
| 426 | + currency: notaPedido.moneda.SIMBOLO : 4" | |
| 372 | 427 | ></span> |
| 373 | 428 | </div> |
| 374 | 429 | <div class="col px-1 text-right"> |
| 375 | 430 | <span |
| 376 | - ng-bind="(articulo.precio * articulo.cantidad) | | |
| 431 | + ng-bind="getSubTotal() | | |
| 377 | 432 | currency: notaPedido.moneda.SIMBOLO" |
| 378 | 433 | > |
| 379 | 434 | </span> |
| 380 | 435 | </div> |
| 381 | 436 | </div> |
| 382 | - </div> | |
| 383 | - <div class="align-middle p-1"> | |
| 437 | + </td> | |
| 438 | + <td class="text-center align-middle"> | |
| 384 | 439 | <button |
| 385 | 440 | class="btn btn-outline-secondary" |
| 386 | - ng-click="quitarArticulo(key)" | |
| 441 | + ng-click="agregarATabla(13)" | |
| 387 | 442 | > |
| 388 | - <i class="fa fa-trash"></i> | |
| 443 | + <i class="fa fa-save"></i> | |
| 389 | 444 | </button> |
| 390 | - </div> | |
| 391 | - </td> | |
| 392 | - </tr> | |
| 393 | - </tbody> | |
| 394 | - <tfoot> | |
| 395 | - <!-- CARGANDO ITEM --> | |
| 396 | - <tr ng-show="!cargando" class="d-flex"> | |
| 397 | - <td | |
| 398 | - class="align-middle p-1" | |
| 399 | - ng-bind="articulosTabla.length + 1" | |
| 400 | - ></td> | |
| 401 | - <td class="col p-0"> | |
| 402 | - <div class="d-flex"> | |
| 403 | - <div class="col-4 px-1"> | |
| 404 | - <span | |
| 405 | - ng-bind="articuloACargar.sectorCodigo" | |
| 406 | - ></span> | |
| 407 | - </div> | |
| 408 | - <div class="col-8 px-1"> | |
| 409 | - <span ng-bind="articuloACargar.descripcion"></span> | |
| 410 | - </div> | |
| 411 | - </div> | |
| 412 | - <div class="d-flex"> | |
| 413 | - <div class="col-3 px-1 m-1"> | |
| 414 | - <input | |
| 415 | - class="form-control p-1" | |
| 416 | - foca-tipo-input | |
| 417 | - min="1" | |
| 418 | - ng-model="articuloACargar.cantidad" | |
| 419 | - foca-focus="!cargando" | |
| 420 | - ng-keypress="agregarATabla($event.keyCode)" | |
| 421 | - style="height: auto; line-height: 1.1em" | |
| 422 | - > | |
| 423 | - </div> | |
| 424 | - <div class="col px-1 text-right"> | |
| 425 | - <span ng-bind="articuloACargar.precio | | |
| 426 | - currency: notaPedido.moneda.SIMBOLO : 4" | |
| 427 | - ></span> | |
| 428 | - </div> | |
| 429 | - <div class="col px-1 text-right"> | |
| 430 | - <span | |
| 431 | - ng-bind="getSubTotal() | | |
| 432 | - currency: notaPedido.moneda.SIMBOLO" | |
| 433 | - > | |
| 434 | - </span> | |
| 435 | - </div> | |
| 436 | - </div> | |
| 437 | - </td> | |
| 438 | - <td class="text-center align-middle"> | |
| 439 | - <button | |
| 440 | - class="btn btn-outline-secondary" | |
| 441 | - ng-click="agregarATabla(13)" | |
| 442 | - > | |
| 443 | - <i class="fa fa-save"></i> | |
| 444 | - </button> | |
| 445 | - </td> | |
| 446 | - </tr> | |
| 447 | - <!-- SELECCIONAR PRODUCTO --> | |
| 448 | - <tr ng-show="cargando" class="d-flex"> | |
| 449 | - <td class="col-12"> | |
| 450 | - <input | |
| 451 | - placeholder="Seleccione Articulo" | |
| 452 | - class="form-control form-control-sm" | |
| 453 | - readonly | |
| 454 | - ng-click="seleccionarArticulo()" | |
| 455 | - /> | |
| 456 | - </td> | |
| 457 | - </tr> | |
| 458 | - <!-- TOOGLE EXPANDIR --> | |
| 459 | - <tr> | |
| 460 | - <td class="col"> | |
| 461 | - <button | |
| 462 | - class="btn btn-outline-secondary selectable w-100" | |
| 463 | - ng-click="show = !show; masMenos()" | |
| 464 | - ng-show="articulosTabla.length > 0" | |
| 465 | - > | |
| 466 | - <i | |
| 467 | - class="fa fa-chevron-down" | |
| 468 | - ng-hide="show" | |
| 469 | - aria-hidden="true" | |
| 445 | + </td> | |
| 446 | + </tr> | |
| 447 | + <!-- SELECCIONAR PRODUCTO --> | |
| 448 | + <tr ng-show="cargando" class="d-flex"> | |
| 449 | + <td class="col-12"> | |
| 450 | + <input | |
| 451 | + placeholder="Seleccione Articulo" | |
| 452 | + class="form-control form-control-sm" | |
| 453 | + readonly | |
| 454 | + ng-click="seleccionarArticulo()" | |
| 455 | + /> | |
| 456 | + </td> | |
| 457 | + </tr> | |
| 458 | + <!-- TOOGLE EXPANDIR --> | |
| 459 | + <tr> | |
| 460 | + <td class="col"> | |
| 461 | + <button | |
| 462 | + class="btn btn-outline-secondary selectable w-100" | |
| 463 | + ng-click="show = !show; masMenos()" | |
| 464 | + ng-show="articulosTabla.length > 0" | |
| 470 | 465 | > |
| 471 | - </i> | |
| 472 | - <i | |
| 473 | - class="fa fa-chevron-up" | |
| 474 | - ng-show="show" | |
| 475 | - aria-hidden="true"> | |
| 476 | - </i> | |
| 477 | - </button> | |
| 478 | - </td> | |
| 479 | - </tr> | |
| 480 | - <!-- FOOTER --> | |
| 481 | - <tr class="d-flex"> | |
| 482 | - <td class="align-middle no-border-top" colspan="2"> | |
| 483 | - <strong>Cantidad Items:</strong> | |
| 484 | - <a ng-bind="articulosTabla.length"></a> | |
| 485 | - </td> | |
| 486 | - <td class="text-right ml-auto table-celda-total no-border-top"> | |
| 487 | - <h3>Total:</h3> | |
| 488 | - </td> | |
| 489 | - <td class="table-celda-total text-right no-border-top"> | |
| 490 | - <h3>{{getTotal() | currency: notaPedido.moneda.SIMBOLO}}</h3> | |
| 491 | - </td> | |
| 492 | - </tr> | |
| 493 | - </tfoot> | |
| 494 | - </table> | |
| 466 | + <i | |
| 467 | + class="fa fa-chevron-down" | |
| 468 | + ng-hide="show" | |
| 469 | + aria-hidden="true" | |
| 470 | + > | |
| 471 | + </i> | |
| 472 | + <i | |
| 473 | + class="fa fa-chevron-up" | |
| 474 | + ng-show="show" | |
| 475 | + aria-hidden="true"> | |
| 476 | + </i> | |
| 477 | + </button> | |
| 478 | + </td> | |
| 479 | + </tr> | |
| 480 | + <!-- FOOTER --> | |
| 481 | + <tr class="d-flex"> | |
| 482 | + <td class="align-middle no-border-top" colspan="2"> | |
| 483 | + <strong>Cantidad Items:</strong> | |
| 484 | + <a ng-bind="articulosTabla.length"></a> | |
| 485 | + </td> | |
| 486 | + <td class="text-right ml-auto table-celda-total no-border-top"> | |
| 487 | + <h3>Total:</h3> | |
| 488 | + </td> | |
| 489 | + <td class="table-celda-total text-right no-border-top"> | |
| 490 | + <h3>{{getTotal() | currency: notaPedido.moneda.SIMBOLO}}</h3> | |
| 491 | + </td> | |
| 492 | + </tr> | |
| 493 | + </tfoot> | |
| 494 | + </table> | |
| 495 | + </div> | |
| 495 | 496 | </div> |
| 496 | - </div> | |
| 497 | - <div class="col-auto my-2 col-lg-2 botonera-lateral d-none d-md-block"> | |
| 498 | - <div class="row align-items-end"> | |
| 499 | - <div class="col-12"> | |
| 497 | + <div class="col-auto my-2 col-lg-2 botonera-lateral d-none"> | |
| 498 | + <div class="col-12 mt-auto"> | |
| 500 | 499 | <button |
| 501 | 500 | ng-click="crearNotaPedido()" |
| 502 | 501 | type="submit" |
| 503 | 502 | title="Crear nota pedido" |
| 504 | - class="btn btn-default btn-block mb-2" | |
| 503 | + class="btn btn-default btn-block mb-2 border border-dark" | |
| 505 | 504 | ng-disabled="notaPedido.idRemito" |
| 506 | 505 | > |
| 507 | - Guardar | |
| 506 | + <strong>GUARDAR</strong> | |
| 507 | + </button> | |
| 508 | + <!-- AGREGAR FUNCIONALIDAD PAUSAR --> | |
| 509 | + <button | |
| 510 | + type="submit" | |
| 511 | + title="Crear nota pedido" | |
| 512 | + class="btn btn-default btn-block mb-2 border border-dark" | |
| 513 | + > | |
| 514 | + <strong>PAUSAR</strong> | |
| 508 | 515 | </button> |
| 509 | 516 | <button |
| 510 | 517 | ng-click="salir()" |
| 511 | 518 | type="button" |
| 512 | 519 | title="Salir" |
| 513 | - class="btn btn-default btn-block"> | |
| 514 | - Salir | |
| 520 | + class="btn btn-default btn-block border border-dark"> | |
| 521 | + <strong>SALIR</strong> | |
| 515 | 522 | </button> |
| 516 | 523 | </div> |
| 517 | 524 | </div> |