Commit 3011e0a3f126ede6779593e52716828cc8930dfb
1 parent
d0ba160322
Exists in
master
- Cambié la estructura de la botonera secundaria.
- Unifiqué sector y código. - Invertí el orden de cantidad y precio unitario. - Alineé a la derecha cantidad, precio unitario y subtotal. - Agregué task watch.
Showing
2 changed files
with
32 additions
and
26 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 | '"focaModalPetroleras","focaBusquedaCliente","focaModalPrecioCondicion",'+ | 47 | '"focaModalPetroleras","focaBusquedaCliente","focaModalPrecioCondicion",'+ |
48 | '"focaModalFlete","focaDirectivas","focaModal"', ''), | 48 | '"focaModalFlete","focaDirectivas","focaModal"', ''), |
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: 3000}) |
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 | |||
86 | gulp.task('watch', function() { | ||
87 | gulp.watch([paths.srcJS, paths.srcViews], ['uglify']); | ||
88 | }); | ||
85 | 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-3"> | 8 | <div class="col-3"> |
9 | {{ now | date:'dd/MM/yyyy HH:mm'}} | 9 | {{ now | date:'dd/MM/yyyy HH:mm'}} |
10 | </div> | 10 | </div> |
11 | <div class="col-6 text-center"> | 11 | <div class="col-6 text-center"> |
12 | <div class="h2">NOTA DE PEDIDO</div> | 12 | <div class="h2">NOTA DE PEDIDO</div> |
13 | </div> | 13 | </div> |
14 | <div class="col-3 text-right">{{puntoVenta}}-{{comprobante}}</div> | 14 | <div class="col-3 text-right">{{puntoVenta}}-{{comprobante}}</div> |
15 | </div> | 15 | </div> |
16 | <div class="row"> | 16 | <div class="row"> |
17 | <div class="col-auto" ng-repeat="cab in cabecera"> | 17 | <div class="col-auto" ng-repeat="cab in cabecera"> |
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 | </div> | 21 | </div> |
22 | </div> | 22 | </div> |
23 | </div> | 23 | </div> |
24 | <div class="row p-1 botonera-secundaria"> | 24 | <div class="row p-1 botonera-secundaria"> |
25 | <div class=" col-12 col-sm-6 col-md-3 botonera" ng-repeat="boton in botonera"> | 25 | <div class="col-12"> |
26 | <button | 26 | <div class="row"> |
27 | type="button" | 27 | <div class="col-3 px-0 py-0" ng-repeat="boton in botonera"> |
28 | class="btn btn-default btn-block btn-xs" | 28 | <button |
29 | ng-bind="boton.texto" | 29 | type="button" |
30 | ng-click="boton.accion()" | 30 | class="btn btn-default btn-block btn-xs text-left py-2" |
31 | ></button> | 31 | ng-click="boton.accion()" |
32 | > | ||
33 | <i class="fa fa-arrow-circle-right"></i> | ||
34 | | ||
35 | {{boton.texto}} | ||
36 | </button> | ||
37 | </div> | ||
38 | </div> | ||
32 | </div> | 39 | </div> |
33 | </div> | 40 | </div> |
34 | </div> | 41 | </div> |
35 | </div> | 42 | </div> |
36 | </form> | 43 | </form> |
37 | <div class="row"> | 44 | <div class="row"> |
38 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | 45 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> |
39 | <div class="row grilla-articulos align-items-end"> | 46 | <div class="row grilla-articulos align-items-end"> |
40 | <table class="table table-striped table-sm table-dark"> | 47 | <table class="table table-striped table-sm table-dark"> |
41 | <thead> | 48 | <thead> |
42 | <tr> | 49 | <tr> |
43 | <th>Sector</th> | ||
44 | <th>Código</th> | 50 | <th>Código</th> |
45 | <th>Descripción</th> | 51 | <th>Descripción</th> |
46 | <th>Precio Unitario</th> | ||
47 | <th>Cantidad</th> | 52 | <th>Cantidad</th> |
53 | <th>Precio Unitario</th> | ||
48 | <th>SubTotal</th> | 54 | <th>SubTotal</th> |
49 | <th> | 55 | <th> |
50 | <button | 56 | <button |
51 | class="btn btn-outline-secondary selectable" | 57 | class="btn btn-outline-secondary selectable" |
52 | style="float: right;" | 58 | style="float: right;" |
53 | ng-click="show = !show; masMenos()" | 59 | ng-click="show = !show; masMenos()" |
54 | > | 60 | > |
55 | <i | 61 | <i |
56 | class="fa fa-chevron-down" | 62 | class="fa fa-chevron-down" |
57 | ng-hide="show" | 63 | ng-hide="show" |
58 | aria-hidden="true" | 64 | aria-hidden="true" |
59 | > | 65 | > |
60 | </i> | 66 | </i> |
61 | <i | 67 | <i |
62 | class="fa fa-chevron-up" | 68 | class="fa fa-chevron-up" |
63 | ng-show="show" | 69 | ng-show="show" |
64 | aria-hidden="true"> | 70 | aria-hidden="true"> |
65 | </i> | 71 | </i> |
66 | </button> | 72 | </button> |
67 | </th> | 73 | </th> |
68 | </tr> | 74 | </tr> |
69 | </thead> | 75 | </thead> |
70 | <tbody> | 76 | <tbody> |
71 | <tr ng-show="!cargando"> | 77 | <tr ng-show="!cargando"> |
72 | <td><input | 78 | <td><input |
73 | class="form-control" | 79 | class="form-control" |
74 | ng-model="articuloACargar.sector" | 80 | ng-model="articuloACargar.sector + '-' + articuloACargar.codigo" |
75 | readonly></td> | ||
76 | <td><input | ||
77 | class="form-control" | ||
78 | ng-model="articuloACargar.codigo" | ||
79 | readonly></td> | 81 | readonly></td> |
80 | <td><input | 82 | <td><input |
81 | class="form-control" | 83 | class="form-control" |
82 | ng-model="articuloACargar.descripcion" | 84 | ng-model="articuloACargar.descripcion" |
83 | readonly></td> | 85 | readonly></td> |
84 | <td><input | 86 | <td class="text-right"><input |
85 | class="form-control" | ||
86 | ng-value="articuloACargar.precio | currency: '$'" | ||
87 | readonly></td> | ||
88 | <td><input | ||
89 | class="form-control" | 87 | class="form-control" |
90 | type="number" | 88 | type="number" |
91 | min="1" | 89 | min="1" |
92 | ng-model="articuloACargar.cantidad" | 90 | ng-model="articuloACargar.cantidad" |
93 | foca-focus="!cargando" | 91 | foca-focus="!cargando" |
94 | esc-key="resetFilter()" | 92 | esc-key="resetFilter()" |
95 | ng-keypress="agregarATabla($event.keyCode)"></td> | 93 | ng-keypress="agregarATabla($event.keyCode)"></td> |
96 | <td><input | 94 | <td class="text-right"><input |
95 | class="form-control" | ||
96 | ng-value="articuloACargar.precio | currency: '$'" | ||
97 | readonly></td> | ||
98 | <td class="text-right"><input | ||
97 | class="form-control" | 99 | class="form-control" |
98 | ng-value="getSubTotal() | currency: '$'" | 100 | ng-value="getSubTotal() | currency: '$'" |
99 | readonly></td> | 101 | readonly></td> |
100 | <td class="text-center"><button | 102 | <td class="text-center"><button |
101 | class="btn btn-outline-secondary btn-sm" | 103 | class="btn btn-outline-secondary btn-sm" |
102 | ng-click="agregarATabla(13)"> | 104 | ng-click="agregarATabla(13)"> |
103 | <i class="fa fa-save"></i> | 105 | <i class="fa fa-save"></i> |
104 | </button></td> | 106 | </button></td> |
105 | </tr> | 107 | </tr> |
106 | <tr | 108 | <tr |
107 | ng-repeat="(key, articulo) in articulosTabla" | 109 | ng-repeat="(key, articulo) in articulosTabla" |
108 | ng-show="show || key == 0" | 110 | ng-show="show || key == 0" |
109 | > | 111 | > |
110 | <td ng-bind="articulo.sector"></td> | 112 | <td ng-bind="articulo.sector + '-' + articulo.codigo"></td> |
111 | <td ng-bind="articulo.codigo"></td> | ||
112 | <td ng-bind="articulo.descripcion"></td> | 113 | <td ng-bind="articulo.descripcion"></td> |
113 | <td ng-bind="articulo.precio | currency: '$'"></td> | 114 | <td class="text-right"><input |
114 | <td><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 class="text-right" ng-bind="articulo.precio | currency: '$'"></td> | ||
131 | <td | 132 | <td |
133 | class="text-right" | ||
132 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"> | 134 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"> |
133 | </td> | 135 | </td> |
134 | <td class="text-center"> | 136 | <td class="text-center"> |
135 | <button | 137 | <button |
136 | class="btn btn-outline-secondary btn-sm" | 138 | class="btn btn-outline-secondary btn-sm" |
137 | ng-click="quitarArticulo(key)" | 139 | ng-click="quitarArticulo(key)" |
138 | > | 140 | > |
139 | <i class="fa fa-trash"></i> | 141 | <i class="fa fa-trash"></i> |
140 | </button> | 142 | </button> |
141 | </td> | 143 | </td> |
142 | </tr> | 144 | </tr> |
143 | <tr ng-show="cargando"> | 145 | <tr ng-show="cargando"> |
144 | <td colspan="7"> | 146 | <td colspan="6"> |
145 | <input | 147 | <input |
146 | placeholder="Seleccione Articulo" | 148 | placeholder="Seleccione Articulo" |
147 | class="form-control form-control-sm" | 149 | class="form-control form-control-sm" |
148 | readonly | 150 | readonly |
149 | ng-click="seleccionarArticulo()" | 151 | ng-click="seleccionarArticulo()" |
150 | /> | 152 | /> |
151 | </td> | 153 | </td> |
152 | </tr> | 154 | </tr> |
153 | </tbody> | 155 | </tbody> |
154 | <tfoot> | 156 | <tfoot> |
155 | <tr class=""> | 157 | <tr class=""> |
156 | <td colspan="4"> | 158 | <td colspan="3"> |
157 | <strong>Cantidad Items:</strong> | 159 | <strong>Cantidad Items:</strong> |
158 | <a ng-bind="articulosTabla.length"></a> | 160 | <a ng-bind="articulosTabla.length"></a> |
159 | </td> | 161 | </td> |
160 | <td class="text-right table-celda-total"><h3>Total:</h3></td> | 162 | <td class="text-right table-celda-total"><h3>Total:</h3></td> |
161 | <td class="table-celda-total text-right" colspan="1"> | 163 | <td class="table-celda-total text-right" colspan="1"> |
162 | <h3>{{getTotal() | currency: '$'}}</h3> | 164 | <h3>{{getTotal() | currency: '$'}}</h3> |
163 | </td> | 165 | </td> |
164 | <td colspan="2"></td> | 166 | <td colspan="2"></td> |
165 | </tr> | 167 | </tr> |
166 | </tfoot> | 168 | </tfoot> |
167 | </table> | 169 | </table> |
168 | </div> | 170 | </div> |
169 | </div> | 171 | </div> |
170 | <div class="col-auto my-2 col-lg-2 botonera-lateral"> | 172 | <div class="col-auto my-2 col-lg-2 botonera-lateral"> |
171 | <div class="row align-items-end"> | 173 | <div class="row align-items-end"> |
172 | <div class="col-12"> | 174 | <div class="col-12"> |
173 | <button | 175 | <button |
174 | ng-click="crearNotaPedido()" | 176 | ng-click="crearNotaPedido()" |
175 | type="submit" | 177 | type="submit" |
176 | title="Crear nota pedido" | 178 | title="Crear nota pedido" |
177 | class="btn btn-default btn-block mb-2"> | 179 | class="btn btn-default btn-block mb-2"> |
178 | Guardar | 180 | Guardar |
179 | </button> | 181 | </button> |
180 | <button | 182 | <button |
181 | ng-click="salir()" | 183 | ng-click="salir()" |
182 | type="button" | 184 | type="button" |
183 | title="Salir" | 185 | title="Salir" |
184 | class="btn btn-default btn-block"> | 186 | class="btn btn-default btn-block"> |
185 | Salir | 187 | Salir |
186 | </button> | 188 | </button> |
187 | </div> | 189 | </div> |
188 | </div> | 190 | </div> |
189 | </div> | 191 | </div> |
190 | </div> | 192 | </div> |
191 | </div> | 193 | </div> |
192 | <!-- | 194 | <!-- |
193 | <form name="formCrearNota"> | 195 | <form name="formCrearNota"> |
194 | <uib-tabset active="active"> | 196 | <uib-tabset active="active"> |
195 | <uib-tab index="0" heading="General"> | 197 | <uib-tab index="0" heading="General"> |
196 | <input type="hidden" name="id" ng-model="notaPedido.id" /> | 198 | <input type="hidden" name="id" ng-model="notaPedido.id" /> |
197 | <div> | 199 | <div> |
198 | <div class="col-auto my-2"> | 200 | <div class="col-auto my-2"> |
199 | <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button> | 201 | <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button> |
200 | </div> | 202 | </div> |
201 | </div> | 203 | </div> |
202 | <br> | 204 | <br> |
203 | <br> | 205 | <br> |
204 | <div class="row"> | 206 | <div class="row"> |
205 | <div class="col-md-2"> | 207 | <div class="col-md-2"> |
206 | <div class="col-auto"> | 208 | <div class="col-auto"> |
207 | <label>Fecha de carga</label> | 209 | <label>Fecha de carga</label> |
208 | </div> | 210 | </div> |
209 | </div> | 211 | </div> |
210 | <div class="col-md-3"> | 212 | <div class="col-md-3"> |
211 | <div class="col-auto"> | 213 | <div class="col-auto"> |
212 | <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true"> | 214 | <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true"> |
213 | </div> | 215 | </div> |
214 | </div> | 216 | </div> |
215 | <div class="col-md-2"> | 217 | <div class="col-md-2"> |
216 | <div class="col-auto"> | 218 | <div class="col-auto"> |
217 | <label>Kilómetros</label> | 219 | <label>Kilómetros</label> |
218 | </div> | 220 | </div> |
219 | </div> | 221 | </div> |
220 | <div class="col-md-3"> | 222 | <div class="col-md-3"> |
221 | <div class="col-auto"> | 223 | <div class="col-auto"> |
222 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente" | 224 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente" |
223 | ng-model="notaPedido.kilometros" ng-required="true"> | 225 | ng-model="notaPedido.kilometros" ng-required="true"> |
224 | </div> | 226 | </div> |
225 | </div> | 227 | </div> |
226 | </div> | 228 | </div> |
227 | <div class="row my-3"> | 229 | <div class="row my-3"> |
228 | <div class="col-md-2"> | 230 | <div class="col-md-2"> |
229 | <div class="col-auto"> | 231 | <div class="col-auto"> |
230 | <label>Jurisdicción de IIBB</label> | 232 | <label>Jurisdicción de IIBB</label> |
231 | </div> | 233 | </div> |
232 | </div> | 234 | </div> |
233 | <div class="col-md-3"> | 235 | <div class="col-md-3"> |
234 | <div class="col-auto"> | 236 | <div class="col-auto"> |
235 | <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" | 237 | <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" |
236 | ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> | 238 | ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> |
237 | </div> | 239 | </div> |
238 | </div> | 240 | </div> |
239 | <div class="col-md-2"> | 241 | <div class="col-md-2"> |
240 | <div class="col-auto"> | 242 | <div class="col-auto"> |
241 | <label>Costo de financiación</label> | 243 | <label>Costo de financiación</label> |
242 | </div> | 244 | </div> |
243 | </div> | 245 | </div> |
244 | <div class="col-md-3"> | 246 | <div class="col-md-3"> |
245 | <div class="col-auto"> | 247 | <div class="col-auto"> |
246 | <div class="input-group mb-2"> | 248 | <div class="input-group mb-2"> |
247 | <div class="input-group-prepend"> | 249 | <div class="input-group-prepend"> |
248 | <div class="input-group-text">$</div> | 250 | <div class="input-group-text">$</div> |
249 | </div> | 251 | </div> |
250 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación" | 252 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación" |
251 | ng-model="notaPedido.costoFinanciacion"> | 253 | ng-model="notaPedido.costoFinanciacion"> |
252 | </div> | 254 | </div> |
253 | </div> | 255 | </div> |
254 | </div> | 256 | </div> |
255 | </div> | 257 | </div> |
256 | <div class="row"> | 258 | <div class="row"> |
257 | <div class="col-md-2"> | 259 | <div class="col-md-2"> |
258 | <div class="col-auto"> | 260 | <div class="col-auto"> |
259 | <label>Bomba</label> | 261 | <label>Bomba</label> |
260 | </div> | 262 | </div> |
261 | </div> | 263 | </div> |
262 | <div class="col-md-1"> | 264 | <div class="col-md-1"> |
263 | <div class="col-auto"> | 265 | <div class="col-auto"> |
264 | <div class="form-check custom-radio custom-control-inline"> | 266 | <div class="form-check custom-radio custom-control-inline"> |
265 | <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba"> | 267 | <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba"> |
266 | <label class="form-check-label"> | 268 | <label class="form-check-label"> |
267 | Si | 269 | Si |
268 | </label> | 270 | </label> |
269 | </div> | 271 | </div> |
270 | <div class="form-check custom-radio custom-control-inline"> | 272 | <div class="form-check custom-radio custom-control-inline"> |
271 | <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba"> | 273 | <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba"> |
272 | <label class="form-check-label"> | 274 | <label class="form-check-label"> |
273 | No | 275 | No |
274 | </label> | 276 | </label> |
275 | </div> | 277 | </div> |
276 | </div> | 278 | </div> |
277 | </div> | 279 | </div> |
278 | <div class="col-md-1"> | 280 | <div class="col-md-1"> |
279 | <div class="col-auto"> | 281 | <div class="col-auto"> |
280 | <label>Flete</label> | 282 | <label>Flete</label> |
281 | </div> | 283 | </div> |
282 | </div> | 284 | </div> |
283 | <div class="col-md-1"> | 285 | <div class="col-md-1"> |
284 | <div class="col-auto"> | 286 | <div class="col-auto"> |
285 | <div class="form-check custom-radio custom-control-inline"> | 287 | <div class="form-check custom-radio custom-control-inline"> |
286 | <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete"> | 288 | <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete"> |
287 | <label class="form-check-label"> | 289 | <label class="form-check-label"> |
288 | Si | 290 | Si |
289 | </label> | 291 | </label> |
290 | </div> | 292 | </div> |
291 | <div class="form-check custom-radio custom-control-inline"> | 293 | <div class="form-check custom-radio custom-control-inline"> |
292 | <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete"> | 294 | <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete"> |
293 | <label class="form-check-label"> | 295 | <label class="form-check-label"> |
294 | FOB | 296 | FOB |
295 | </label> | 297 | </label> |
296 | </div> | 298 | </div> |
297 | </div> | 299 | </div> |
298 | </div> | 300 | </div> |
299 | <div class="col-md-2"> | 301 | <div class="col-md-2"> |
300 | <div class="col-auto"> | 302 | <div class="col-auto"> |
301 | <label>Costo unitario kilometro flete</label> | 303 | <label>Costo unitario kilometro flete</label> |
302 | </div> | 304 | </div> |
303 | </div> | 305 | </div> |
304 | <div class="col-md-3"> | 306 | <div class="col-md-3"> |
305 | <div class="col-auto"> | 307 | <div class="col-auto"> |
306 | <div class="input-group mb-2"> | 308 | <div class="input-group mb-2"> |
307 | <div class="input-group-prepend"> | 309 | <div class="input-group-prepend"> |
308 | <div class="input-group-text">$</div> | 310 | <div class="input-group-text">$</div> |
309 | </div> | 311 | </div> |
310 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete" | 312 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete" |
311 | ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true"> | 313 | ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true"> |
312 | </div> | 314 | </div> |
313 | </div> | 315 | </div> |
314 | </div> | 316 | </div> |
315 | </div> | 317 | </div> |
316 | <div class="row my-3"> | 318 | <div class="row my-3"> |
317 | <div class="col-md-2"> | 319 | <div class="col-md-2"> |
318 | <div class="col-auto"> | 320 | <div class="col-auto"> |
319 | <label>Vendedor</label> | 321 | <label>Vendedor</label> |
320 | </div> | 322 | </div> |
321 | </div> | 323 | </div> |
322 | <div class="col-md-3"> | 324 | <div class="col-md-3"> |
323 | <div class="col-auto"> | 325 | <div class="col-auto"> |
324 | <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" | 326 | <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" |
325 | ng-click="seleccionarVendedor()" readonly> | 327 | ng-click="seleccionarVendedor()" readonly> |
326 | </div> | 328 | </div> |
327 | </div> | 329 | </div> |
328 | <div class="col-md-2"> | 330 | <div class="col-md-2"> |
329 | <div class="col-auto"> | 331 | <div class="col-auto"> |
330 | <label>Petrolera</label> | 332 | <label>Petrolera</label> |
331 | </div> | 333 | </div> |
332 | </div> | 334 | </div> |
333 | <div class="col-md-3"> | 335 | <div class="col-md-3"> |
334 | <div class="col-auto"> | 336 | <div class="col-auto"> |
335 | <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" | 337 | <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" |
336 | ng-click="seleccionarPetrolera()" readonly> | 338 | ng-click="seleccionarPetrolera()" readonly> |
337 | </div> | 339 | </div> |
338 | </div> | 340 | </div> |
339 | </div> | 341 | </div> |
340 | </div> | 342 | </div> |
341 | <div class="row"> | 343 | <div class="row"> |
342 | <div class="col-md-2"> | 344 | <div class="col-md-2"> |
343 | <div class="col-auto"> | 345 | <div class="col-auto"> |
344 | <label>Cliente</label> | 346 | <label>Cliente</label> |
345 | </div> | 347 | </div> |
346 | </div> | 348 | </div> |
347 | <div class="col-md-3"> | 349 | <div class="col-md-3"> |
348 | <div class="col-auto"> | 350 | <div class="col-auto"> |
349 | <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" | 351 | <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" |
350 | ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> | 352 | ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> |
351 | </div> | 353 | </div> |
352 | </div> | 354 | </div> |
353 | <div class="col-md-2"> | 355 | <div class="col-md-2"> |
354 | <div class="col-auto"> | 356 | <div class="col-auto"> |
355 | <label>Domicilio</label> | 357 | <label>Domicilio</label> |
356 | </div> | 358 | </div> |
357 | </div> | 359 | </div> |
358 | <div class="col-md-4"> | 360 | <div class="col-md-4"> |
359 | <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> | 361 | <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> |
360 | <div class="col-auto"> | 362 | <div class="col-auto"> |
361 | <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" | 363 | <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" |
362 | domi.dom | 364 | domi.dom |
363 | for domi | 365 | for domi |
364 | in domiciliosCliente | 366 | in domiciliosCliente |
365 | " | 367 | " |
366 | typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" | 368 | typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" |
367 | class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> | 369 | class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> |
368 | <i ng-show="cargandoClientes" class="fas fa-sync"></i> | 370 | <i ng-show="cargandoClientes" class="fas fa-sync"></i> |
369 | <div ng-show="sinResultados"> | 371 | <div ng-show="sinResultados"> |
370 | No se encontraron resultados. | 372 | No se encontraron resultados. |
371 | </div> | 373 | </div> |
372 | </div> | 374 | </div> |
373 | <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> | 375 | <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> |
374 | <a class="btn" ng-click="addNewDom()">+</a> | 376 | <a class="btn" ng-click="addNewDom()">+</a> |
375 | </div> | 377 | </div> |
376 | </div> | 378 | </div> |
377 | </div> | 379 | </div> |
378 | </uib-tab> | 380 | </uib-tab> |
379 | <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> | 381 | <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> |
380 | <div> | 382 | <div> |
381 | <div class="col-auto my-2"> | 383 | <div class="col-auto my-2"> |
382 | <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> | 384 | <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> |
383 | </div> | 385 | </div> |
384 | </div> | 386 | </div> |
385 | <br> | 387 | <br> |
386 | <br> | 388 | <br> |
387 | <div class="row"> | 389 | <div class="row"> |
388 | <div class="col-md-2"> | 390 | <div class="col-md-2"> |
389 | <div class="col-auto"> | 391 | <div class="col-auto"> |
390 | <label>Precios y condiciones</label> | 392 | <label>Precios y condiciones</label> |
391 | </div> | 393 | </div> |
392 | </div> | 394 | </div> |
393 | <div class="col-md-4"> | 395 | <div class="col-md-4"> |
394 | <div class="col-auto"> | 396 | <div class="col-auto"> |
395 | <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> | 397 | <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> |
396 | </select> | 398 | </select> |
397 | </div> | 399 | </div> |
398 | </div> | 400 | </div> |
399 | <div class="col-md-2"> | 401 | <div class="col-md-2"> |
400 | <div class="col-auto"> | 402 | <div class="col-auto"> |
401 | <label>Producto</label> | 403 | <label>Producto</label> |
402 | </div> | 404 | </div> |
403 | </div> | 405 | </div> |
404 | <div class="col-md-4"> | 406 | <div class="col-md-4"> |
405 | <div class="col-auto"> | 407 | <div class="col-auto"> |
406 | <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto" | 408 | <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto" |
407 | ng-click="seleccionarArticulo()" readonly> | 409 | ng-click="seleccionarArticulo()" readonly> |
408 | </div> | 410 | </div> |
409 | </div> | 411 | </div> |
410 | </div> | 412 | </div> |
411 | <div class="col-md-12"> | 413 | <div class="col-md-12"> |
412 | <table class="table my-3 table-hover table-nonfluid"> | 414 | <table class="table my-3 table-hover table-nonfluid"> |
413 | <thead> | 415 | <thead> |
414 | <tr> | 416 | <tr> |
415 | <th>Código</th> | 417 | <th>Código</th> |
416 | <th>Nombre</th> | 418 | <th>Nombre</th> |
417 | <th>Precio unitario</th> | 419 | <th>Precio unitario</th> |
418 | <th>Costo unitario bruto</th> | 420 | <th>Costo unitario bruto</th> |
419 | <th>Cantidad</th> | 421 | <th>Cantidad</th> |
420 | <th>Subtotal</th> | 422 | <th>Subtotal</th> |
421 | </tr> | 423 | </tr> |
422 | </thead> | 424 | </thead> |
423 | <tbody> | 425 | <tbody> |
424 | <tr ng-repeat="articulo in articulosTabla"> | 426 | <tr ng-repeat="articulo in articulosTabla"> |
425 | <td ng-bind="articulo.codigo"></td> | 427 | <td ng-bind="articulo.codigo"></td> |