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