Commit 561fbf13a32ad15edc91cd8668863d475b98bf64
Exists in
master
Merge branch 'master' into 'master'
edit solo cuando ingresa manual See merge request modulos-npm/foca-crear-nota-pedido!42
Showing
1 changed file
Show diff stats
src/views/nota-pedido.html
1 | <div class="crear-nota-pedido"> | 1 | <div class="crear-nota-pedido"> |
2 | <form name="formCrearNota" ng-submit="crearNotaPedido()" class="mb-0"> | 2 | <form name="formCrearNota" ng-submit="crearNotaPedido()" class="mb-0"> |
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-6 col-sm-4 numero-pedido">Nº {{puntoVenta}}-{{comprobante}}</div> |
12 | <div class="col-6 col-sm-4 text-right crear-nota-pedido-fecha"> | 12 | <div class="col-6 col-sm-4 text-right crear-nota-pedido-fecha"> |
13 | Fecha: | 13 | Fecha: |
14 | <span | 14 | <span |
15 | ng-show="!datepickerAbierto" | 15 | ng-show="!datepickerAbierto" |
16 | ng-bind="now | date:'dd/MM/yyyy HH:mm'" | 16 | ng-bind="now | date:'dd/MM/yyyy HH:mm'" |
17 | ng-click="datepickerAbierto = true" | 17 | ng-click="datepickerAbierto = true" |
18 | > | 18 | > |
19 | </span> | 19 | </span> |
20 | <input | 20 | <input |
21 | ng-show="datepickerAbierto" | 21 | ng-show="datepickerAbierto" |
22 | type="date" | 22 | type="date" |
23 | ng-model="now" | 23 | ng-model="now" |
24 | ng-change="datepickerAbierto = false" | 24 | ng-change="datepickerAbierto = false" |
25 | ng-blur="datepickerAbierto = false" | 25 | ng-blur="datepickerAbierto = false" |
26 | class="form-control form-control-sm col-8 float-right" | 26 | class="form-control form-control-sm col-8 float-right" |
27 | foca-focus="datepickerAbierto" | 27 | foca-focus="datepickerAbierto" |
28 | hasta-hoy | 28 | hasta-hoy |
29 | /> | 29 | /> |
30 | </div> | 30 | </div> |
31 | </div> | 31 | </div> |
32 | <div class="row"> | 32 | <div class="row"> |
33 | <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> | 33 | <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> |
34 | <span class="label" ng-bind="cab.label"></span> | 34 | <span class="label" ng-bind="cab.label"></span> |
35 | <span class="valor" ng-bind="cab.valor"></span> | 35 | <span class="valor" ng-bind="cab.valor"></span> |
36 | </div> | 36 | </div> |
37 | <a | 37 | <a |
38 | class="btn col-12 btn-secondary d-sm-none" | 38 | class="btn col-12 btn-secondary d-sm-none" |
39 | ng-show="cabecera.length > 0" | 39 | ng-show="cabecera.length > 0" |
40 | ng-click="showCabecera = !showCabecera" | 40 | ng-click="showCabecera = !showCabecera" |
41 | > | 41 | > |
42 | <i | 42 | <i |
43 | class="fa fa-chevron-down" | 43 | class="fa fa-chevron-down" |
44 | ng-hide="showCabecera" | 44 | ng-hide="showCabecera" |
45 | aria-hidden="true" | 45 | aria-hidden="true" |
46 | > | 46 | > |
47 | </i> | 47 | </i> |
48 | <i | 48 | <i |
49 | class="fa fa-chevron-up" | 49 | class="fa fa-chevron-up" |
50 | ng-show="showCabecera" | 50 | ng-show="showCabecera" |
51 | aria-hidden="true"> | 51 | aria-hidden="true"> |
52 | </i> | 52 | </i> |
53 | </a> | 53 | </a> |
54 | </div> | 54 | </div> |
55 | </div> | 55 | </div> |
56 | </div> | 56 | </div> |
57 | <div class="row p-1 botonera-secundaria"> | 57 | <div class="row p-1 botonera-secundaria"> |
58 | <div class="col-12"> | 58 | <div class="col-12"> |
59 | <div class="row"> | 59 | <div class="row"> |
60 | <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera"> | 60 | <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera"> |
61 | <button | 61 | <button |
62 | type="button" | 62 | type="button" |
63 | class="btn btn-default btn-block btn-xs text-left py-2" | 63 | class="btn btn-default btn-block btn-xs text-left py-2" |
64 | ng-click="boton.accion()" | 64 | ng-click="boton.accion()" |
65 | ng-class="{'d-none d-sm-block': boton.texto == ''}" | 65 | ng-class="{'d-none d-sm-block': boton.texto == ''}" |
66 | > | 66 | > |
67 | <i | 67 | <i |
68 | class="fa fa-arrow-circle-right" | 68 | class="fa fa-arrow-circle-right" |
69 | ng-show="boton.texto != ''" | 69 | ng-show="boton.texto != ''" |
70 | ></i> | 70 | ></i> |
71 | | 71 | |
72 | {{boton.texto}} | 72 | {{boton.texto}} |
73 | </button> | 73 | </button> |
74 | </div> | 74 | </div> |
75 | </div> | 75 | </div> |
76 | </div> | 76 | </div> |
77 | </div> | 77 | </div> |
78 | </div> | 78 | </div> |
79 | </div> | 79 | </div> |
80 | </form> | 80 | </form> |
81 | <div class="row"> | 81 | <div class="row"> |
82 | <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | 82 | <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"> |
83 | <!-- PC --> | 83 | <!-- PC --> |
84 | <div class="row grilla-articulo align-items-end"> | 84 | <div class="row grilla-articulo align-items-end"> |
85 | <table class="table tabla-articulo table-striped table-sm table-dark mb-0"> | 85 | <table class="table tabla-articulo table-striped table-sm table-dark mb-0"> |
86 | <thead> | 86 | <thead> |
87 | <tr class="d-flex"> | 87 | <tr class="d-flex"> |
88 | <th class="">#</th> | 88 | <th class="">#</th> |
89 | <th class="col">Código</th> | 89 | <th class="col">Código</th> |
90 | <th class="col-4">Descripción</th> | 90 | <th class="col-4">Descripción</th> |
91 | <th class="col text-right">Cantidad</th> | 91 | <th class="col text-right">Cantidad</th> |
92 | <th class="col text-right">Precio Unitario</th> | 92 | <th class="col text-right">Precio Unitario</th> |
93 | <th class="col text-right">SubTotal</th> | 93 | <th class="col text-right">SubTotal</th> |
94 | <th class="text-right"> | 94 | <th class="text-right"> |
95 | <button | 95 | <button |
96 | class="btn btn-outline-secondary selectable" | 96 | class="btn btn-outline-secondary selectable" |
97 | ng-click="show = !show; masMenos()" | 97 | ng-click="show = !show; masMenos()" |
98 | > | 98 | > |
99 | <i | 99 | <i |
100 | class="fa fa-chevron-down" | 100 | class="fa fa-chevron-down" |
101 | ng-show="show" | 101 | ng-show="show" |
102 | aria-hidden="true" | 102 | aria-hidden="true" |
103 | > | 103 | > |
104 | </i> | 104 | </i> |
105 | <i | 105 | <i |
106 | class="fa fa-chevron-up" | 106 | class="fa fa-chevron-up" |
107 | ng-hide="show" | 107 | ng-hide="show" |
108 | aria-hidden="true"> | 108 | aria-hidden="true"> |
109 | </i> | 109 | </i> |
110 | </button> | 110 | </button> |
111 | </th> | 111 | </th> |
112 | </tr> | 112 | </tr> |
113 | </thead> | 113 | </thead> |
114 | <tbody class="tabla-articulo-body"> | 114 | <tbody class="tabla-articulo-body"> |
115 | <tr | 115 | <tr |
116 | ng-repeat="(key, articulo) in articulosTabla" | 116 | ng-repeat="(key, articulo) in articulosTabla" |
117 | ng-show="show || key == (articulosTabla.length - 1)" | 117 | ng-show="show || key == (articulosTabla.length - 1)" |
118 | class="d-flex" | 118 | class="d-flex" |
119 | > | 119 | > |
120 | <td ng-bind="key + 1"></td> | 120 | <td ng-bind="key + 1"></td> |
121 | <td | 121 | <td |
122 | class="col" | 122 | class="col" |
123 | ng-bind="articulo.sector + '-' + articulo.codigo" | 123 | ng-bind="articulo.sector + '-' + articulo.codigo" |
124 | ></td> | 124 | ></td> |
125 | <td | 125 | <td |
126 | class="col-4" | 126 | class="col-4" |
127 | ng-bind="articulo.descripcion" | 127 | ng-bind="articulo.descripcion" |
128 | ></td> | 128 | ></td> |
129 | <td class="col text-right"> | 129 | <td class="col text-right"> |
130 | <input | 130 | <input |
131 | ng-show="articulo.editCantidad" | 131 | ng-show="articulo.editCantidad" |
132 | ng-model="articulo.cantidad" | 132 | ng-model="articulo.cantidad" |
133 | class="form-control" | 133 | class="form-control" |
134 | type="number" | 134 | type="number" |
135 | min="1" | 135 | min="1" |
136 | foca-focus="articulo.editCantidad" | 136 | foca-focus="articulo.editCantidad" |
137 | ng-keypress="editarArticulo($event.keyCode, articulo)" | 137 | ng-keypress="editarArticulo($event.keyCode, articulo)" |
138 | ng-focus="selectFocus($event)" | 138 | ng-focus="selectFocus($event)" |
139 | > | 139 | > |
140 | <i | 140 | <i |
141 | class="selectable" | 141 | class="selectable" |
142 | ng-click="cambioEdit(articulo, 'cantidad')" | 142 | ng-click="cambioEdit(articulo, 'cantidad')" |
143 | ng-hide="articulo.editCantidad" | 143 | ng-hide="articulo.editCantidad" |
144 | ng-bind="articulo.cantidad"> | 144 | ng-bind="articulo.cantidad"> |
145 | </i> | 145 | </i> |
146 | </td> | 146 | </td> |
147 | <td class="col text-right"> | 147 | <td class="col text-right"> |
148 | <input | 148 | <input |
149 | ng-show="articulo.editPrecio" | 149 | ng-show="articulo.editPrecio" |
150 | ng-model="articulo.precio" | 150 | ng-model="articulo.precio" |
151 | class="form-control" | 151 | class="form-control" |
152 | type="number" | 152 | type="number" |
153 | min="1" | 153 | min="1" |
154 | step="0.01" | 154 | step="0.01" |
155 | foca-focus="articulo.editPrecio" | 155 | foca-focus="articulo.editPrecio" |
156 | ng-keypress="editarArticulo($event.keyCode, articulo)" | 156 | ng-keypress="editarArticulo($event.keyCode, articulo)" |
157 | ng-focus="selectFocus($event)" | 157 | ng-focus="selectFocus($event)" |
158 | > | 158 | > |
159 | <i | 159 | <i |
160 | class="selectable" | 160 | class="selectable" |
161 | ng-click="cambioEdit(articulo, 'precio')" | 161 | ng-click="idLista == -1 && cambioEdit(articulo, 'precio')" |
162 | ng-hide="articulo.editPrecio" | 162 | ng-hide="articulo.editPrecio" |
163 | ng-bind="articulo.precio"> | 163 | ng-bind="articulo.precio"> |
164 | </i> | 164 | </i> |
165 | </td> | 165 | </td> |
166 | <td | 166 | <td |
167 | class="col text-right" | 167 | class="col text-right" |
168 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"> | 168 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"> |
169 | </td> | 169 | </td> |
170 | <td class="text-center"> | 170 | <td class="text-center"> |
171 | <button | 171 | <button |
172 | class="btn btn-outline-secondary" | 172 | class="btn btn-outline-secondary" |
173 | ng-click="quitarArticulo(key)" | 173 | ng-click="quitarArticulo(key)" |
174 | > | 174 | > |
175 | <i class="fa fa-trash"></i> | 175 | <i class="fa fa-trash"></i> |
176 | </button> | 176 | </button> |
177 | </td> | 177 | </td> |
178 | </tr> | 178 | </tr> |
179 | </tbody> | 179 | </tbody> |
180 | <tfoot> | 180 | <tfoot> |
181 | <tr ng-show="!cargando" class="d-flex"> | 181 | <tr ng-show="!cargando" class="d-flex"> |
182 | <td | 182 | <td |
183 | class="align-middle" | 183 | class="align-middle" |
184 | ng-bind="articulosTabla.length + 1" | 184 | ng-bind="articulosTabla.length + 1" |
185 | ></td> | 185 | ></td> |
186 | <td class="col"> | 186 | <td class="col"> |
187 | <input | 187 | <input |
188 | class="form-control" | 188 | class="form-control" |
189 | ng-model="articuloACargar.sectorCodigo" | 189 | ng-model="articuloACargar.sectorCodigo" |
190 | readonly | 190 | readonly |
191 | > | 191 | > |
192 | </td> | 192 | </td> |
193 | <td class="col-4 tabla-articulo-descripcion"> | 193 | <td class="col-4 tabla-articulo-descripcion"> |
194 | <input | 194 | <input |
195 | class="form-control" | 195 | class="form-control" |
196 | ng-model="articuloACargar.descripcion" | 196 | ng-model="articuloACargar.descripcion" |
197 | readonly | 197 | readonly |
198 | > | 198 | > |
199 | </td> | 199 | </td> |
200 | <td class="col text-right"> | 200 | <td class="col text-right"> |
201 | <input | 201 | <input |
202 | class="form-control" | 202 | class="form-control" |
203 | type="number" | 203 | type="number" |
204 | min="1" | 204 | min="1" |
205 | ng-model="articuloACargar.cantidad" | 205 | ng-model="articuloACargar.cantidad" |
206 | foca-focus="!cargando" | 206 | foca-focus="!cargando" |
207 | esc-key="resetFilter()" | 207 | esc-key="resetFilter()" |
208 | ng-keypress="agregarATabla($event.keyCode)" | 208 | ng-keypress="agregarATabla($event.keyCode)" |
209 | > | 209 | > |
210 | </td> | 210 | </td> |
211 | <td class="col text-right"> | 211 | <td class="col text-right"> |
212 | <input | 212 | <input |
213 | class="form-control" | 213 | class="form-control" |
214 | ng-value="articuloACargar.precio | currency: '$'" | 214 | ng-value="articuloACargar.precio | currency: '$'" |
215 | ng-show="idLista != -1" | 215 | ng-show="idLista != -1" |
216 | readonly | 216 | readonly |
217 | > | 217 | > |
218 | <input | 218 | <input |
219 | class="form-control" | 219 | class="form-control" |
220 | type="number" | 220 | type="number" |
221 | step="0.01" | 221 | step="0.01" |
222 | ng-model="articuloACargar.precio" | 222 | ng-model="articuloACargar.precio" |
223 | esc-key="resetFilter()" | 223 | esc-key="resetFilter()" |
224 | ng-keypress="agregarATabla($event.keyCode)" | 224 | ng-keypress="agregarATabla($event.keyCode)" |
225 | ng-show="idLista == -1" | 225 | ng-show="idLista == -1" |
226 | > | 226 | > |
227 | </td> | 227 | </td> |
228 | <td class="col text-right"> | 228 | <td class="col text-right"> |
229 | <input | 229 | <input |
230 | class="form-control" | 230 | class="form-control" |
231 | ng-value="getSubTotal() | currency: '$'" | 231 | ng-value="getSubTotal() | currency: '$'" |
232 | readonly | 232 | readonly |
233 | ></td> | 233 | ></td> |
234 | <td class="text-center align-middle"> | 234 | <td class="text-center align-middle"> |
235 | <button | 235 | <button |
236 | class="btn btn-outline-secondary" | 236 | class="btn btn-outline-secondary" |
237 | ng-click="agregarATabla(13)" | 237 | ng-click="agregarATabla(13)" |
238 | > | 238 | > |
239 | <i class="fa fa-save"></i> | 239 | <i class="fa fa-save"></i> |
240 | </button> | 240 | </button> |
241 | </td> | 241 | </td> |
242 | </tr> | 242 | </tr> |
243 | <tr ng-show="cargando" class="d-flex"> | 243 | <tr ng-show="cargando" class="d-flex"> |
244 | <td colspan="7" class="col-12"> | 244 | <td colspan="7" class="col-12"> |
245 | <input | 245 | <input |
246 | placeholder="Seleccione Articulo" | 246 | placeholder="Seleccione Articulo" |
247 | class="form-control form-control-sm" | 247 | class="form-control form-control-sm" |
248 | readonly | 248 | readonly |
249 | ng-click="seleccionarArticulo()" | 249 | ng-click="seleccionarArticulo()" |
250 | /> | 250 | /> |
251 | </td> | 251 | </td> |
252 | </tr> | 252 | </tr> |
253 | <tr class="d-flex"> | 253 | <tr class="d-flex"> |
254 | <td colspan="4"> | 254 | <td colspan="4"> |
255 | <strong>Cantidad Items:</strong> | 255 | <strong>Cantidad Items:</strong> |
256 | <a ng-bind="articulosTabla.length"></a> | 256 | <a ng-bind="articulosTabla.length"></a> |
257 | </td> | 257 | </td> |
258 | <td class="text-right ml-auto table-celda-total"><h3>Total:</h3></td> | 258 | <td class="text-right ml-auto table-celda-total"><h3>Total:</h3></td> |
259 | <td class="table-celda-total text-right" colspan="1"> | 259 | <td class="table-celda-total text-right" colspan="1"> |
260 | <h3>{{getTotal() | currency: '$'}}</h3> | 260 | <h3>{{getTotal() | currency: '$'}}</h3> |
261 | </td> | 261 | </td> |
262 | <td class="text-right"> | 262 | <td class="text-right"> |
263 | <button | 263 | <button |
264 | type="button" | 264 | type="button" |
265 | class="btn btn-default btn-sm" | 265 | class="btn btn-default btn-sm" |
266 | > | 266 | > |
267 | Totales | 267 | Totales |
268 | </button> | 268 | </button> |
269 | </td> | 269 | </td> |
270 | </tr> | 270 | </tr> |
271 | </tfoot> | 271 | </tfoot> |
272 | </table> | 272 | </table> |
273 | </div> | 273 | </div> |
274 | </div> | 274 | </div> |
275 | <div class="col-auto my-2 col-lg-2 botonera-lateral"> | 275 | <div class="col-auto my-2 col-lg-2 botonera-lateral"> |
276 | <div class="row align-items-end"> | 276 | <div class="row align-items-end"> |
277 | <div class="col-12"> | 277 | <div class="col-12"> |
278 | <button | 278 | <button |
279 | ng-click="crearNotaPedido()" | 279 | ng-click="crearNotaPedido()" |
280 | type="submit" | 280 | type="submit" |
281 | title="Crear nota pedido" | 281 | title="Crear nota pedido" |
282 | class="btn btn-default btn-block mb-2"> | 282 | class="btn btn-default btn-block mb-2"> |
283 | Guardar | 283 | Guardar |
284 | </button> | 284 | </button> |
285 | <button | 285 | <button |
286 | ng-click="salir()" | 286 | ng-click="salir()" |
287 | type="button" | 287 | type="button" |
288 | title="Salir" | 288 | title="Salir" |
289 | class="btn btn-default btn-block"> | 289 | class="btn btn-default btn-block"> |
290 | Salir | 290 | Salir |
291 | </button> | 291 | </button> |
292 | </div> | 292 | </div> |
293 | </div> | 293 | </div> |
294 | </div> | 294 | </div> |
295 | </div> | 295 | </div> |
296 | </div> | 296 | </div> |
297 | 297 |