Commit 33e084b501b33fbb0367e0045511f4e8726a477a
1 parent
f25ff4555e
Exists in
master
arreglos para mobile
Showing
2 changed files
with
181 additions
and
9 deletions
 
Show diff stats
gulpfile.js
| 1 | const templateCache = require('gulp-angular-templatecache'); | 1 | const templateCache = require('gulp-angular-templatecache'); | 
| 2 | const clean = require('gulp-clean'); | 2 | const clean = require('gulp-clean'); | 
| 3 | const concat = require('gulp-concat'); | 3 | const concat = require('gulp-concat'); | 
| 4 | const htmlmin = require('gulp-htmlmin'); | 4 | const htmlmin = require('gulp-htmlmin'); | 
| 5 | const rename = require('gulp-rename'); | 5 | const rename = require('gulp-rename'); | 
| 6 | const uglify = require('gulp-uglify'); | 6 | const uglify = require('gulp-uglify'); | 
| 7 | const gulp = require('gulp'); | 7 | const gulp = require('gulp'); | 
| 8 | const pump = require('pump'); | 8 | const pump = require('pump'); | 
| 9 | const jshint = require('gulp-jshint'); | 9 | const jshint = require('gulp-jshint'); | 
| 10 | const replace = require('gulp-replace'); | 10 | const replace = require('gulp-replace'); | 
| 11 | const connect = require('gulp-connect'); | 11 | const connect = require('gulp-connect'); | 
| 12 | 12 | ||
| 13 | var paths = { | 13 | var paths = { | 
| 14 | srcJS: 'src/js/*.js', | 14 | srcJS: 'src/js/*.js', | 
| 15 | srcViews: 'src/views/*.html', | 15 | srcViews: 'src/views/*.html', | 
| 16 | tmp: 'tmp', | 16 | tmp: 'tmp', | 
| 17 | dist: 'dist/' | 17 | dist: 'dist/' | 
| 18 | }; | 18 | }; | 
| 19 | 19 | ||
| 20 | gulp.task('templates', ['clean'], function() { | 20 | gulp.task('templates', ['clean'], function() { | 
| 21 | return pump( | 21 | return pump( | 
| 22 | [ | 22 | [ | 
| 23 | gulp.src(paths.srcViews), | 23 | gulp.src(paths.srcViews), | 
| 24 | htmlmin(), | 24 | htmlmin(), | 
| 25 | templateCache('views.js', { | 25 | templateCache('views.js', { | 
| 26 | module: 'focaCrearNotaPedido', | 26 | module: 'focaCrearNotaPedido', | 
| 27 | root: '' | 27 | root: '' | 
| 28 | }), | 28 | }), | 
| 29 | gulp.dest(paths.tmp) | 29 | gulp.dest(paths.tmp) | 
| 30 | ] | 30 | ] | 
| 31 | ); | 31 | ); | 
| 32 | }); | 32 | }); | 
| 33 | 33 | ||
| 34 | gulp.task('uglify', ['templates'], function() { | 34 | gulp.task('uglify', ['templates'], function() { | 
| 35 | return pump( | 35 | return pump( | 
| 36 | [ | 36 | [ | 
| 37 | gulp.src([ | 37 | gulp.src([ | 
| 38 | paths.srcJS, | 38 | paths.srcJS, | 
| 39 | 'tmp/views.js' | 39 | 'tmp/views.js' | 
| 40 | ]), | 40 | ]), | 
| 41 | concat('foca-crear-nota-pedido.js'), | 41 | concat('foca-crear-nota-pedido.js'), | 
| 42 | replace('src/views/', ''), | 42 | replace('src/views/', ''), | 
| 43 | gulp.dest(paths.tmp), | 43 | gulp.dest(paths.tmp), | 
| 44 | rename('foca-crear-nota-pedido.min.js'), | 44 | rename('foca-crear-nota-pedido.min.js'), | 
| 45 | uglify(), | 45 | uglify(), | 
| 46 | replace('"ngRoute","ui.bootstrap","focaModalVendedores","focaBusquedaProductos",'+ | 46 | replace('"ngRoute","ui.bootstrap","focaModalVendedores","focaBusquedaProductos",'+ | 
| 47 | '"focaModalProveedor","focaBusquedaCliente","focaModalPrecioCondicion",'+ | 47 | '"focaModalProveedor","focaBusquedaCliente","focaModalPrecioCondicion",'+ | 
| 48 | '"focaModalFlete","focaDirectivas","focaModal","focaModalDomicilio"', ''), | 48 | '"focaModalFlete","focaDirectivas","focaModal","focaModalDomicilio"', ''), | 
| 49 | gulp.dest(paths.dist) | 49 | gulp.dest(paths.dist) | 
| 50 | ] | 50 | ] | 
| 51 | ); | 51 | ); | 
| 52 | }); | 52 | }); | 
| 53 | 53 | ||
| 54 | gulp.task('clean', function(){ | 54 | gulp.task('clean', function(){ | 
| 55 | return gulp.src(['tmp', 'dist'], {read: false}) | 55 | return gulp.src(['tmp', 'dist'], {read: false}) | 
| 56 | .pipe(clean()); | 56 | .pipe(clean()); | 
| 57 | }); | 57 | }); | 
| 58 | 58 | ||
| 59 | gulp.task('pre-commit', function() { | 59 | gulp.task('pre-commit', function() { | 
| 60 | return pump( | 60 | return pump( | 
| 61 | [ | 61 | [ | 
| 62 | gulp.src(paths.srcJS), | 62 | gulp.src(paths.srcJS), | 
| 63 | jshint('.jshintrc'), | 63 | jshint('.jshintrc'), | 
| 64 | jshint.reporter('default'), | 64 | jshint.reporter('default'), | 
| 65 | jshint.reporter('fail') | 65 | jshint.reporter('fail') | 
| 66 | ] | 66 | ] | 
| 67 | ); | 67 | ); | 
| 68 | 68 | ||
| 69 | gulp.start('uglify'); | 69 | gulp.start('uglify'); | 
| 70 | }); | 70 | }); | 
| 71 | 71 | ||
| 72 | gulp.task('webserver', function() { | 72 | gulp.task('webserver', function() { | 
| 73 | pump [ | 73 | pump [ | 
| 74 | connect.server({port: 3000}) | 74 | connect.server({port: 3300, host: '0.0.0.0'}) | 
| 75 | ] | 75 | ] | 
| 76 | }); | 76 | }); | 
| 77 | 77 | ||
| 78 | gulp.task('clean-post-install', function() { | 78 | gulp.task('clean-post-install', function() { | 
| 79 | return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', | 79 | return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', | 
| 80 | 'index.html'], {read: false}) | 80 | 'index.html'], {read: false}) | 
| 81 | .pipe(clean()); | 81 | .pipe(clean()); | 
| 82 | }); | 82 | }); | 
| 83 | 83 | ||
| 84 | gulp.task('default', ['webserver']); | 84 | gulp.task('default', ['webserver']); | 
| 85 | 85 | ||
| 86 | gulp.task('watch', function() { | 86 | gulp.task('watch', function() { | 
| 87 | gulp.watch([paths.srcJS, paths.srcViews], ['uglify']); | 87 | gulp.watch([paths.srcJS, paths.srcViews], ['uglify']); | 
| 88 | }); | 88 | }); | 
| 89 | 89 | 
src/views/nota-pedido.html
| 1 | <div class="crear-nota-pedido"> | 1 | <div class="crear-nota-pedido"> | 
| 2 | <form name="formCrearNota" ng-submit="crearNotaPedido()"> | 2 | <form name="formCrearNota" ng-submit="crearNotaPedido()"> | 
| 3 | <div class="row"> | 3 | <div class="row"> | 
| 4 | <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2"> | 4 | <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2"> | 
| 5 | <div class="row p-1 panel-informativo"> | 5 | <div class="row p-1 panel-informativo"> | 
| 6 | <div class="col-12"> | 6 | <div class="col-12"> | 
| 7 | <div class="row"> | 7 | <div class="row"> | 
| 8 | <div class="col-12 col-sm-4 nota-pedido"> | 8 | <div class="col-12 col-sm-4 nota-pedido"> | 
| 9 | <h5>NOTA DE PEDIDO</h5> | 9 | <h5>NOTA DE PEDIDO</h5> | 
| 10 | </div> | 10 | </div> | 
| 11 | <div class="col-6 col-sm-4 numero-pedido">Nº {{puntoVenta}}-{{comprobante}}</div> | 11 | <div class="col-5 col-sm-4 numero-pedido">Nº {{puntoVenta}}-{{comprobante}}</div> | 
| 12 | <div class="col-6 col-sm-4 text-right"> | 12 | <div class="col-7 col-sm-4 text-right"> | 
| 13 | Fecha: {{ now | date:'dd/MM/yyyy HH:mm'}} | 13 | Fecha: {{ now | date:'dd/MM/yyyy HH:mm'}} | 
| 14 | </div> | 14 | </div> | 
| 15 | </div> | 15 | </div> | 
| 16 | <div class="row"> | 16 | <div class="row"> | 
| 17 | <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> | 17 | <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> | 
| 18 | <span class="label" ng-bind="cab.label"></span> | 18 | <span class="label" ng-bind="cab.label"></span> | 
| 19 | <span class="valor" ng-bind="cab.valor"></span> | 19 | <span class="valor" ng-bind="cab.valor"></span> | 
| 20 | </div> | 20 | </div> | 
| 21 | <a | 21 | <a | 
| 22 | class="btn col-12 btn-secondary d-sm-none" | 22 | class="btn col-12 btn-secondary d-sm-none" | 
| 23 | ng-show="cabecera.length > 0" | 23 | ng-show="cabecera.length > 0" | 
| 24 | ng-click="showCabecera = !showCabecera" | 24 | ng-click="showCabecera = !showCabecera" | 
| 25 | > | 25 | > | 
| 26 | <i | 26 | <i | 
| 27 | class="fa fa-chevron-down" | 27 | class="fa fa-chevron-down" | 
| 28 | ng-hide="showCabecera" | 28 | ng-hide="showCabecera" | 
| 29 | aria-hidden="true" | 29 | aria-hidden="true" | 
| 30 | > | 30 | > | 
| 31 | </i> | 31 | </i> | 
| 32 | <i | 32 | <i | 
| 33 | class="fa fa-chevron-up" | 33 | class="fa fa-chevron-up" | 
| 34 | ng-show="showCabecera" | 34 | ng-show="showCabecera" | 
| 35 | aria-hidden="true"> | 35 | aria-hidden="true"> | 
| 36 | </i> | 36 | </i> | 
| 37 | </a> | 37 | </a> | 
| 38 | </div> | 38 | </div> | 
| 39 | </div> | 39 | </div> | 
| 40 | </div> | 40 | </div> | 
| 41 | <div class="row p-1 botonera-secundaria"> | 41 | <div class="row p-1 botonera-secundaria"> | 
| 42 | <div class="col-12"> | 42 | <div class="col-12"> | 
| 43 | <div class="row"> | 43 | <div class="row"> | 
| 44 | <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera"> | 44 | <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera"> | 
| 45 | <button | 45 | <button | 
| 46 | type="button" | 46 | type="button" | 
| 47 | class="btn btn-default btn-block btn-xs text-left py-2" | 47 | class="btn btn-default btn-block btn-xs text-left py-2" | 
| 48 | ng-click="boton.accion()" | 48 | ng-click="boton.accion()" | 
| 49 | ng-class="{'d-none d-sm-block': boton.texto == ''}" | 49 | ng-class="{'d-none d-sm-block': boton.texto == ''}" | 
| 50 | > | 50 | > | 
| 51 | <i | 51 | <i | 
| 52 | class="fa fa-arrow-circle-right" | 52 | class="fa fa-arrow-circle-right" | 
| 53 | ng-show="boton.texto != ''" | 53 | ng-show="boton.texto != ''" | 
| 54 | ></i> | 54 | ></i> | 
| 55 |   | 55 |   | 
| 56 | {{boton.texto}} | 56 | {{boton.texto}} | 
| 57 | </button> | 57 | </button> | 
| 58 | </div> | 58 | </div> | 
| 59 | </div> | 59 | </div> | 
| 60 | </div> | 60 | </div> | 
| 61 | </div> | 61 | </div> | 
| 62 | </div> | 62 | </div> | 
| 63 | </div> | 63 | </div> | 
| 64 | </form> | 64 | </form> | 
| 65 | <div class="row"> | 65 | <div class="row"> | 
| 66 | <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | 66 | <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | 
| 67 | <!-- PC --> | 67 | <!-- PC --> | 
| 68 | <div class="row grilla-articulo align-items-end"> | 68 | <div class="row grilla-articulo align-items-end d-none d-sm-block"> | 
| 69 | <table class="table tabla-articulo table-striped table-sm table-dark"> | 69 | <table class="table tabla-articulo table-striped table-sm table-dark"> | 
| 70 | <thead> | 70 | <thead> | 
| 71 | <tr class="d-flex"> | 71 | <tr class="d-flex"> | 
| 72 | <th class="">#</th> | 72 | <th class="">#</th> | 
| 73 | <th class="col">Código</th> | 73 | <th class="col">Código</th> | 
| 74 | <th class="col-4">Descripción</th> | 74 | <th class="col-4">Descripción</th> | 
| 75 | <th class="col text-right">Cantidad</th> | 75 | <th class="col text-right">Cantidad</th> | 
| 76 | <th class="col text-right">Precio Unitario</th> | 76 | <th class="col text-right">Precio Unitario</th> | 
| 77 | <th class="col text-right">SubTotal</th> | 77 | <th class="col text-right">SubTotal</th> | 
| 78 | <th class="text-right"> | 78 | <th class="text-right"> | 
| 79 | <button | 79 | <button | 
| 80 | class="btn btn-outline-secondary selectable" | 80 | class="btn btn-outline-secondary selectable" | 
| 81 | ng-click="show = !show; masMenos()" | 81 | ng-click="show = !show; masMenos()" | 
| 82 | > | 82 | > | 
| 83 | <i | 83 | <i | 
| 84 | class="fa fa-chevron-down" | 84 | class="fa fa-chevron-down" | 
| 85 | ng-show="show" | 85 | ng-show="show" | 
| 86 | aria-hidden="true" | 86 | aria-hidden="true" | 
| 87 | > | 87 | > | 
| 88 | </i> | 88 | </i> | 
| 89 | <i | 89 | <i | 
| 90 | class="fa fa-chevron-up" | 90 | class="fa fa-chevron-up" | 
| 91 | ng-hide="show" | 91 | ng-hide="show" | 
| 92 | aria-hidden="true"> | 92 | aria-hidden="true"> | 
| 93 | </i> | 93 | </i> | 
| 94 | </button> | 94 | </button> | 
| 95 | </th> | 95 | </th> | 
| 96 | </tr> | 96 | </tr> | 
| 97 | </thead> | 97 | </thead> | 
| 98 | <tbody class="tabla-articulo-body"> | 98 | <tbody class="tabla-articulo-body"> | 
| 99 | <tr | 99 | <tr | 
| 100 | ng-repeat="(key, articulo) in articulosTabla" | 100 | ng-repeat="(key, articulo) in articulosTabla" | 
| 101 | ng-show="show || key == (articulosTabla.length - 1)" | 101 | ng-show="show || key == (articulosTabla.length - 1)" | 
| 102 | class="d-flex" | 102 | class="d-flex" | 
| 103 | > | 103 | > | 
| 104 | <td ng-bind="key + 1"></td> | 104 | <td ng-bind="key + 1"></td> | 
| 105 | <td | 105 | <td | 
| 106 | class="col" | 106 | class="col" | 
| 107 | ng-bind="articulo.sector + '-' + articulo.codigo" | 107 | ng-bind="articulo.sector + '-' + articulo.codigo" | 
| 108 | ></td> | 108 | ></td> | 
| 109 | <td | 109 | <td | 
| 110 | class="col-4" | 110 | class="col-4" | 
| 111 | ng-bind="articulo.descripcion" | 111 | ng-bind="articulo.descripcion" | 
| 112 | ></td> | 112 | ></td> | 
| 113 | <td class="col text-right"> | 113 | <td class="col text-right"> | 
| 114 | <input | 114 | <input | 
| 115 | ng-show="articulo.edit" | 115 | ng-show="articulo.edit" | 
| 116 | ng-model="articulo.cantidad" | 116 | ng-model="articulo.cantidad" | 
| 117 | class="form-control" | 117 | class="form-control" | 
| 118 | type="number" | 118 | type="number" | 
| 119 | min="1" | 119 | min="1" | 
| 120 | foca-focus="articulo.edit" | 120 | foca-focus="articulo.edit" | 
| 121 | ng-keypress="editarArticulo($event.keyCode, articulo)" | 121 | ng-keypress="editarArticulo($event.keyCode, articulo)" | 
| 122 | ng-focus="selectFocus($event)" | 122 | ng-focus="selectFocus($event)" | 
| 123 | > | 123 | > | 
| 124 | <i | 124 | <i | 
| 125 | class="selectable" | 125 | class="selectable" | 
| 126 | ng-click="cambioEdit(articulo)" | 126 | ng-click="cambioEdit(articulo)" | 
| 127 | ng-hide="articulo.edit" | 127 | ng-hide="articulo.edit" | 
| 128 | ng-bind="articulo.cantidad"> | 128 | ng-bind="articulo.cantidad"> | 
| 129 | </i> | 129 | </i> | 
| 130 | </td> | 130 | </td> | 
| 131 | <td | 131 | <td | 
| 132 | class="col text-right" | 132 | class="col text-right" | 
| 133 | ng-bind="articulo.precio | currency: '$'" | 133 | ng-bind="articulo.precio | currency: '$'" | 
| 134 | ></td> | 134 | ></td> | 
| 135 | <td | 135 | <td | 
| 136 | class="col text-right" | 136 | class="col text-right" | 
| 137 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"> | 137 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"> | 
| 138 | </td> | 138 | </td> | 
| 139 | <td class="text-center"> | 139 | <td class="text-center"> | 
| 140 | <button | 140 | <button | 
| 141 | class="btn btn-outline-secondary" | 141 | class="btn btn-outline-secondary" | 
| 142 | ng-click="quitarArticulo(key)" | 142 | ng-click="quitarArticulo(key)" | 
| 143 | > | 143 | > | 
| 144 | <i class="fa fa-trash"></i> | 144 | <i class="fa fa-trash"></i> | 
| 145 | </button> | 145 | </button> | 
| 146 | </td> | 146 | </td> | 
| 147 | </tr> | 147 | </tr> | 
| 148 | </tbody> | 148 | </tbody> | 
| 149 | <tfoot> | 149 | <tfoot> | 
| 150 | <tr ng-show="!cargando" class="d-flex"> | 150 | <tr ng-show="!cargando" class="d-flex"> | 
| 151 | <td | 151 | <td | 
| 152 | class="align-middle" | 152 | class="align-middle" | 
| 153 | ng-bind="articulosTabla.length + 1" | 153 | ng-bind="articulosTabla.length + 1" | 
| 154 | ></td> | 154 | ></td> | 
| 155 | <td class="col"> | 155 | <td class="col"> | 
| 156 | <input | 156 | <input | 
| 157 | class="form-control" | 157 | class="form-control" | 
| 158 | ng-model="articuloACargar.sectorCodigo" | 158 | ng-model="articuloACargar.sectorCodigo" | 
| 159 | readonly | 159 | readonly | 
| 160 | > | 160 | > | 
| 161 | </td> | 161 | </td> | 
| 162 | <td class="col-4 tabla-articulo-descripcion"> | 162 | <td class="col-4 tabla-articulo-descripcion"> | 
| 163 | <input | 163 | <input | 
| 164 | class="form-control" | 164 | class="form-control" | 
| 165 | ng-model="articuloACargar.descripcion" | 165 | ng-model="articuloACargar.descripcion" | 
| 166 | readonly | 166 | readonly | 
| 167 | > | 167 | > | 
| 168 | </td> | 168 | </td> | 
| 169 | <td class="col text-right"> | 169 | <td class="col text-right"> | 
| 170 | <input | 170 | <input | 
| 171 | class="form-control" | 171 | class="form-control" | 
| 172 | type="number" | 172 | type="number" | 
| 173 | min="1" | 173 | min="1" | 
| 174 | ng-model="articuloACargar.cantidad" | 174 | ng-model="articuloACargar.cantidad" | 
| 175 | foca-focus="!cargando" | 175 | foca-focus="!cargando" | 
| 176 | esc-key="resetFilter()" | 176 | esc-key="resetFilter()" | 
| 177 | ng-keypress="agregarATabla($event.keyCode)" | 177 | ng-keypress="agregarATabla($event.keyCode)" | 
| 178 | > | 178 | > | 
| 179 | </td> | 179 | </td> | 
| 180 | <td class="col text-right"> | 180 | <td class="col text-right"> | 
| 181 | <input | 181 | <input | 
| 182 | class="form-control" | 182 | class="form-control" | 
| 183 | ng-value="articuloACargar.precio | currency: '$'" | 183 | ng-value="articuloACargar.precio | currency: '$'" | 
| 184 | readonly | 184 | readonly | 
| 185 | > | 185 | > | 
| 186 | </td> | 186 | </td> | 
| 187 | <td class="col text-right"> | 187 | <td class="col text-right"> | 
| 188 | <input | 188 | <input | 
| 189 | class="form-control" | 189 | class="form-control" | 
| 190 | ng-value="getSubTotal() | currency: '$'" | 190 | ng-value="getSubTotal() | currency: '$'" | 
| 191 | readonly | 191 | readonly | 
| 192 | ></td> | 192 | ></td> | 
| 193 | <td class="text-center align-middle"> | 193 | <td class="text-center align-middle"> | 
| 194 | <button | 194 | <button | 
| 195 | class="btn btn-outline-secondary" | 195 | class="btn btn-outline-secondary" | 
| 196 | ng-click="agregarATabla(13)" | 196 | ng-click="agregarATabla(13)" | 
| 197 | > | 197 | > | 
| 198 | <i class="fa fa-save"></i> | 198 | <i class="fa fa-save"></i> | 
| 199 | </button> | 199 | </button> | 
| 200 | </td> | 200 | </td> | 
| 201 | </tr> | 201 | </tr> | 
| 202 | <tr ng-show="cargando" class="d-flex"> | 202 | <tr ng-show="cargando" class="d-flex"> | 
| 203 | <td colspan="7" class="col-12"> | 203 | <td colspan="7" class="col-12"> | 
| 204 | <input | 204 | <input | 
| 205 | placeholder="Seleccione Articulo" | 205 | placeholder="Seleccione Articulo" | 
| 206 | class="form-control form-control-sm" | 206 | class="form-control form-control-sm" | 
| 207 | readonly | 207 | readonly | 
| 208 | ng-click="seleccionarArticulo()" | 208 | ng-click="seleccionarArticulo()" | 
| 209 | /> | 209 | /> | 
| 210 | </td> | 210 | </td> | 
| 211 | </tr> | 211 | </tr> | 
| 212 | <tr class="d-flex"> | 212 | <tr class="d-flex"> | 
| 213 | <td colspan="4"> | 213 | <td colspan="4" class="no-border-top"> | 
| 214 | <strong>Cantidad Items:</strong> | 214 | <strong>Cantidad Items:</strong> | 
| 215 | <a ng-bind="articulosTabla.length"></a> | 215 | <a ng-bind="articulosTabla.length"></a> | 
| 216 | </td> | 216 | </td> | 
| 217 | <td class="text-right ml-auto table-celda-total"><h3>Total:</h3></td> | 217 | <td class="text-right ml-auto table-celda-total no-border-top"><h3>Total:</h3></td> | 
| 218 | <td class="table-celda-total text-right" colspan="1"> | 218 | <td class="table-celda-total text-right no-border-top" colspan="1"> | 
| 219 | <h3>{{getTotal() | currency: '$'}}</h3> | 219 | <h3>{{getTotal() | currency: '$'}}</h3> | 
| 220 | </td> | 220 | </td> | 
| 221 | <td class="text-right"> | 221 | <td class="text-right no-border-top"> | 
| 222 | <button | 222 | <button | 
| 223 | type="button" | 223 | type="button" | 
| 224 | class="btn btn-default btn-sm" | 224 | class="btn btn-default btn-sm" | 
| 225 | > | 225 | > | 
| 226 | Totales | 226 | Totales | 
| 227 | </button> | 227 | </button> | 
| 228 | </td> | 228 | </td> | 
| 229 | </tr> | 229 | </tr> | 
| 230 | </tfoot> | 230 | </tfoot> | 
| 231 | </table> | 231 | </table> | 
| 232 | </div> | 232 | </div> | 
| 233 | |||
| 234 | <!-- MOBILE --> | ||
| 235 | <div class="row d-sm-none"> | ||
| 236 | <table class="table table-sm table-striped table-dark margin-bottom-mobile"> | ||
| 237 | <thead> | ||
| 238 | <tr class="d-flex"> | ||
| 239 | <th class="">#</th> | ||
| 240 | <th class="col px-0"> | ||
| 241 | <div class="d-flex"> | ||
| 242 | <div class="col-4 px-1">Código</div> | ||
| 243 | <div class="col-8 px-1">Descripción</div> | ||
| 244 | </div> | ||
| 245 | <div class="d-flex"> | ||
| 246 | <div class="col-3 px-1">Cantidad</div> | ||
| 247 | <div class="col px-1 text-right">P. Uni.</div> | ||
| 248 | <div class="col px-1 text-right">Subtotal</div> | ||
| 249 | </div> | ||
| 250 | </th> | ||
| 251 | <th class="text-center tamaño-boton"> | ||
| 252 |   | ||
| 253 | </th> | ||
| 254 | </tr> | ||
| 255 | </thead> | ||
| 256 | <tbody> | ||
| 257 | <tr | ||
| 258 | ng-repeat="(key, articulo) in articulosTabla" | ||
| 259 | ng-show="show || key == articulosTabla.length - 1" | ||
| 260 | > | ||
| 261 | <td class="w-100 align-middle d-flex p-0"> | ||
| 262 | <div class="align-middle p-1"> | ||
| 263 | <span ng-bind="key+1" class="align-middle"></span> | ||
| 264 | </div> | ||
| 265 | <div class="col px-0"> | ||
| 266 | <div class="d-flex"> | ||
| 267 | <div class="col-4 px-1"> | ||
| 268 | <span | ||
| 269 | ng-bind="articulo.sector + '-' + articulo.codigo" | ||
| 270 | ></span> | ||
| 271 | </div> | ||
| 272 | <div class="col-8 px-1"> | ||
| 273 | <span ng-bind="articulo.descripcion"></span> | ||
| 274 | </div> | ||
| 275 | </div> | ||
| 276 | <div class="d-flex"> | ||
| 277 | <div class="col-3 px-1"> | ||
| 278 | <span ng-bind="'x' + articulo.cantidad"></span> | ||
| 279 | </div> | ||
| 280 | <div class="col-3 px-1 text-right"> | ||
| 281 | <span ng-bind="articulo.precio | currency: '$'"></span> | ||
| 282 | </div> | ||
| 283 | <div class="col px-1 text-right"> | ||
| 284 | <span | ||
| 285 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'" | ||
| 286 | > | ||
| 287 | </span> | ||
| 288 | </div> | ||
| 289 | </div> | ||
| 290 | </div> | ||
| 291 | <div class="align-middle p-1"> | ||
| 292 | <button | ||
| 293 | class="btn btn-outline-secondary" | ||
| 294 | ng-click="quitarArticulo(key)" | ||
| 295 | > | ||
| 296 | <i class="fa fa-trash"></i> | ||
| 297 | </button> | ||
| 298 | </div> | ||
| 299 | </td> | ||
| 300 | </tr> | ||
| 301 | </tbody> | ||
| 302 | <tfoot> | ||
| 303 | <!-- CARGANDO ITEM --> | ||
| 304 | <tr ng-show="!cargando" class="d-flex"> | ||
| 305 | <td | ||
| 306 | class="align-middle p-1" | ||
| 307 | ng-bind="articulosTabla.length + 1" | ||
| 308 | ></td> | ||
| 309 | <td class="col p-0"> | ||
| 310 | <div class="d-flex"> | ||
| 311 | <div class="col-4 px-1"> | ||
| 312 | <span | ||
| 313 | ng-bind="articuloACargar.sectorCodigo" | ||
| 314 | ></span> | ||
| 315 | </div> | ||
| 316 | <div class="col-8 px-1"> | ||
| 317 | <span ng-bind="articuloACargar.descripcion"></span> | ||
| 318 | </div> | ||
| 319 | </div> | ||
| 320 | <div class="d-flex"> | ||
| 321 | <div class="col-3 px-1 m-1"> | ||
| 322 | <input | ||
| 323 | class="form-control p-1" | ||
| 324 | type="number" | ||
| 325 | min="1" | ||
| 326 | ng-model="articuloACargar.cantidad" | ||
| 327 | foca-focus="!cargando" | ||
| 328 | ng-keypress="agregarATabla($event.keyCode)" | ||
| 329 | style="height: auto; line-height: 1.1em" | ||
| 330 | > | ||
| 331 | </div> | ||
| 332 | <div class="col-3 px-1 text-right"> | ||
| 333 | <span ng-bind="articuloACargar.precio | currency: '$'"></span> | ||
| 334 | </div> | ||
| 335 | <div class="col px-1 text-right"> | ||
| 336 | <span | ||
| 337 | ng-bind="getSubTotal() | currency: '$'" | ||
| 338 | > | ||
| 339 | </span> | ||
| 340 | </div> | ||
| 341 | </div> | ||
| 342 | </td> | ||
| 343 | <td class="text-center align-middle"> | ||
| 344 | <button | ||
| 345 | class="btn btn-outline-secondary" | ||
| 346 | ng-click="agregarATabla(13)" | ||
| 347 | > | ||
| 348 | <i class="fa fa-save"></i> | ||
| 349 | </button> | ||
| 350 | </td> | ||
| 351 | </tr> | ||
| 352 | <!-- SELECCIONAR PRODUCTO --> | ||
| 353 | <tr ng-show="cargando" class="d-flex"> | ||
| 354 | <td class="col-12"> | ||
| 355 | <input | ||
| 356 | placeholder="Seleccione Articulo" | ||
| 357 | class="form-control form-control-sm" | ||
| 358 | readonly | ||
| 359 | ng-click="seleccionarArticulo()" | ||
| 360 | /> | ||
| 361 | </td> | ||
| 362 | </tr> | ||
| 363 | <!-- TOOGLE EXPANDIR --> | ||
| 364 | <tr> | ||
| 365 | <td class="col"> | ||
| 366 | <button | ||
| 367 | class="btn btn-outline-secondary selectable w-100" | ||
| 368 | ng-click="show = !show; masMenos()" | ||
| 369 | ng-show="articulosTabla.length > 0" | ||
| 370 | > | ||
| 371 | <i | ||
| 372 | class="fa fa-chevron-down" | ||
| 373 | ng-hide="show" | ||
| 374 | aria-hidden="true" | ||
| 375 | > | ||
| 376 | </i> | ||
| 377 | <i | ||
| 378 | class="fa fa-chevron-up" | ||
| 379 | ng-show="show" | ||
| 380 | aria-hidden="true"> | ||
| 381 | </i> | ||
| 382 | </button> | ||
| 383 | </td> | ||
| 384 | </tr> | ||
| 385 | <!-- FOOTER --> | ||
| 386 | <tr class="d-flex"> | ||
| 387 | <td class="align-middle no-border-top" colspan="2"> | ||
| 388 | <strong>Cantidad Items:</strong> | ||
| 389 | <a ng-bind="articulosTabla.length"></a> | ||
| 390 | </td> | ||
| 391 | <td class="text-right ml-auto table-celda-total no-border-top"><h3>Total:</h3></td> | ||
| 392 | <td class="table-celda-total text-right no-border-top"> | ||
| 393 | <h3>{{getTotal() | currency: '$'}}</h3> | ||
| 394 | </td> | ||
| 395 | </tr> | ||
| 396 | </tfoot> | ||
| 397 | </table> | ||
| 398 | </div> | ||
| 233 | </div> | 399 | </div> | 
| 234 | <div class="col-auto my-2 col-lg-2 botonera-lateral"> | 400 | <div class="col-auto my-2 col-lg-2 botonera-lateral d-none d-sm-block"> | 
| 235 | <div class="row align-items-end"> | 401 | <div class="row align-items-end"> | 
| 236 | <div class="col-12"> | 402 | <div class="col-12"> | 
| 237 | <button | 403 | <button | 
| 238 | ng-click="crearNotaPedido()" | 404 | ng-click="crearNotaPedido()" | 
| 239 | type="submit" | 405 | type="submit" | 
| 240 | title="Crear nota pedido" | 406 | title="Crear nota pedido" | 
| 241 | class="btn btn-default btn-block mb-2"> | 407 | class="btn btn-default btn-block mb-2"> | 
| 242 | Guardar | 408 | Guardar | 
| 243 | </button> | 409 | </button> | 
| 244 | <button | 410 | <button | 
| 245 | ng-click="salir()" | 411 | ng-click="salir()" | 
| 246 | type="button" | 412 | type="button" | 
| 247 | title="Salir" | 413 | title="Salir" | 
| 248 | class="btn btn-default btn-block"> | 414 | class="btn btn-default btn-block"> | 
| 249 | Salir | 415 | Salir | 
| 250 | </button> | 416 | </button> | 
| 251 | </div> | 417 | </div> | 
| 252 | </div> | 418 | </div> | 
| 253 | </div> | 419 | </div> | 
| 254 | </div> | 420 | </div> | 
| 421 | <div class="row d-sm-none fixed-bottom"> | ||
| 422 | <div class="w-100 bg-dark d-flex px-3 acciones-mobile"> | ||
| 423 | <span class="ml-3 text-muted" ng-click="salir()">Salir</span> | ||
| 424 | <span class="mr-3 ml-auto" ng-click="crearNotaPedido()">Guardar</span> | ||
| 425 | </div> | ||
| 426 | </div> | ||
| 255 | </div> | 427 | </div> | 
| 256 | 428 |