Commit 2e2bd8c394443ac93bd379ea161e1f1e9e3963c5
1 parent
13e8cc9564
Exists in
master
mejoras en visualizacion para tabla de articulos
Showing
1 changed file
with
7 additions
and
7 deletions
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()"> | 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-5"> | 8 | <div class="col-5"> |
9 | <div class="h6">NOTA DE PEDIDO</div> | 9 | <div class="h6">NOTA DE PEDIDO</div> |
10 | </div> | 10 | </div> |
11 | <div class="col-3">Nº {{puntoVenta}}-{{comprobante}}</div> | 11 | <div class="col-3">Nº {{puntoVenta}}-{{comprobante}}</div> |
12 | <div class="col-4 text-right"> | 12 | <div class="col-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"> | 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"> | 25 | <div class="col-12"> |
26 | <div class="row"> | 26 | <div class="row"> |
27 | <div class="col-3 px-0 py-0" ng-repeat="boton in botonera"> | 27 | <div class="col-3 px-0 py-0" ng-repeat="boton in botonera"> |
28 | <button | 28 | <button |
29 | type="button" | 29 | type="button" |
30 | class="btn btn-default btn-block btn-xs text-left py-2" | 30 | class="btn btn-default btn-block btn-xs text-left py-2" |
31 | ng-click="boton.accion()" | 31 | ng-click="boton.accion()" |
32 | > | 32 | > |
33 | <i | 33 | <i |
34 | class="fa fa-arrow-circle-right" | 34 | class="fa fa-arrow-circle-right" |
35 | ng-show="boton.texto != ''" | 35 | ng-show="boton.texto != ''" |
36 | ></i> | 36 | ></i> |
37 | | 37 | |
38 | {{boton.texto}} | 38 | {{boton.texto}} |
39 | </button> | 39 | </button> |
40 | </div> | 40 | </div> |
41 | </div> | 41 | </div> |
42 | </div> | 42 | </div> |
43 | </div> | 43 | </div> |
44 | </div> | 44 | </div> |
45 | </div> | 45 | </div> |
46 | </form> | 46 | </form> |
47 | <div class="row"> | 47 | <div class="row"> |
48 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | 48 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> |
49 | <div class="row grilla-articulo align-items-end"> | 49 | <div class="row grilla-articulo align-items-end"> |
50 | <table class="table table-striped table-sm table-dark tabla-articulo"> | 50 | <table class="table table-striped table-sm table-dark tabla-articulo"> |
51 | <thead> | 51 | <thead> |
52 | <tr> | 52 | <tr> |
53 | <th class="tabla-articulo-numero">#</th> | 53 | <th class="tabla-articulo-numero">#</th> |
54 | <th class="tabla-articulo-codigo">Código</th> | 54 | <th class="tabla-articulo-codigo">Código</th> |
55 | <th class="tabla-articulo-descripcion">Descripción</th> | 55 | <th class="tabla-articulo-descripcion">Descripción</th> |
56 | <th class="tabla-articulo-cantidad text-right">Cantidad</th> | 56 | <th class="tabla-articulo-cantidad text-right">Cantidad</th> |
57 | <th class="tabla-articulo-precio text-right">Precio Unitario</th> | 57 | <th class="tabla-articulo-precio text-right">Precio Unitario</th> |
58 | <th class="tabla-articulo-subtotal text-right">SubTotal</th> | 58 | <th class="tabla-articulo-subtotal text-right">SubTotal</th> |
59 | <th class="tabla-articulo-boton text-right"> | 59 | <th class="tabla-articulo-boton text-right"> |
60 | <button | 60 | <button |
61 | class="btn btn-outline-secondary selectable" | 61 | class="btn btn-outline-secondary selectable" |
62 | ng-click="show = !show; masMenos()" | 62 | ng-click="show = !show; masMenos()" |
63 | > | 63 | > |
64 | <i | 64 | <i |
65 | class="fa fa-chevron-down" | 65 | class="fa fa-chevron-down" |
66 | ng-show="show" | 66 | ng-show="show" |
67 | aria-hidden="true" | 67 | aria-hidden="true" |
68 | > | 68 | > |
69 | </i> | 69 | </i> |
70 | <i | 70 | <i |
71 | class="fa fa-chevron-up" | 71 | class="fa fa-chevron-up" |
72 | ng-hide="show" | 72 | ng-hide="show" |
73 | aria-hidden="true"> | 73 | aria-hidden="true"> |
74 | </i> | 74 | </i> |
75 | </button> | 75 | </button> |
76 | </th> | 76 | </th> |
77 | </tr> | 77 | </tr> |
78 | </thead> | 78 | </thead> |
79 | <tbody class="tabla-articulos-body"> | 79 | <tbody class="tabla-articulo-body"> |
80 | <tr | 80 | <tr |
81 | ng-repeat="(key, articulo) in articulosTabla" | 81 | ng-repeat="(key, articulo) in articulosTabla" |
82 | ng-show="show || key == (articulosTabla.length - 1)" | 82 | ng-show="show || key == (articulosTabla.length - 1)" |
83 | > | 83 | > |
84 | <td class="tabla-articulo-numero" ng-bind="key + 1"></td> | 84 | <td class="tabla-articulo-numero" ng-bind="key + 1"></td> |
85 | <td | 85 | <td |
86 | class="tabla-articulo-codigo" | 86 | class="tabla-articulo-codigo" |
87 | ng-bind="articulo.sector + '-' + articulo.codigo" | 87 | ng-bind="articulo.sector + '-' + articulo.codigo" |
88 | ></td> | 88 | ></td> |
89 | <td | 89 | <td |
90 | class="tabla-articulo-descripcion" | 90 | class="tabla-articulo-descripcion" |
91 | ng-bind="articulo.descripcion" | 91 | ng-bind="articulo.descripcion" |
92 | ></td> | 92 | ></td> |
93 | <td class="tabla-articulo-cantidad text-right"> | 93 | <td class="tabla-articulo-cantidad text-right"> |
94 | <input | 94 | <input |
95 | ng-show="articulo.edit" | 95 | ng-show="articulo.edit" |
96 | ng-model="articulo.cantidad" | 96 | ng-model="articulo.cantidad" |
97 | class="form-control" | 97 | class="form-control" |
98 | type="number" | 98 | type="number" |
99 | min="1" | 99 | min="1" |
100 | foca-focus="articulo.edit" | 100 | foca-focus="articulo.edit" |
101 | ng-keypress="editarArticulo($event.keyCode, articulo)" | 101 | ng-keypress="editarArticulo($event.keyCode, articulo)" |
102 | ng-focus="selectFocus($event)" | 102 | ng-focus="selectFocus($event)" |
103 | > | 103 | > |
104 | <i | 104 | <i |
105 | class="selectable" | 105 | class="selectable" |
106 | ng-click="cambioEdit(articulo)" | 106 | ng-click="cambioEdit(articulo)" |
107 | ng-hide="articulo.edit" | 107 | ng-hide="articulo.edit" |
108 | ng-bind="articulo.cantidad"> | 108 | ng-bind="articulo.cantidad"> |
109 | </i> | 109 | </i> |
110 | </td> | 110 | </td> |
111 | <td | 111 | <td |
112 | class="tabla-articulo-precio text-right" | 112 | class="tabla-articulo-precio text-right" |
113 | ng-bind="articulo.precio | currency: '$'" | 113 | ng-bind="articulo.precio | currency: '$'" |
114 | ></td> | 114 | ></td> |
115 | <td | 115 | <td |
116 | class="tabla-articulo-subtotal text-right" | 116 | class="tabla-articulo-subtotal text-right" |
117 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"> | 117 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"> |
118 | </td> | 118 | </td> |
119 | <td class="tabla-articulo-boton text-right"> | 119 | <td class="tabla-articulo-boton text-center"> |
120 | <button | 120 | <button |
121 | class="btn btn-outline-secondary btn-sm" | 121 | class="btn btn-outline-secondary btn-sm" |
122 | ng-click="quitarArticulo(key)" | 122 | ng-click="quitarArticulo(key)" |
123 | > | 123 | > |
124 | <i class="fa fa-trash"></i> | 124 | <i class="fa fa-trash"></i> |
125 | </button> | 125 | </button> |
126 | </td> | 126 | </td> |
127 | </tr> | 127 | </tr> |
128 | </tbody> | 128 | </tbody> |
129 | <tfoot> | 129 | <tfoot> |
130 | <tr ng-show="!cargando"> | 130 | <tr ng-show="!cargando"> |
131 | <td | 131 | <td |
132 | class="tabla-articulo-numero align-middle" | 132 | class="tabla-articulo-numero align-middle" |
133 | ng-bind="articulosTabla.length + 1" | 133 | ng-bind="articulosTabla.length + 1" |
134 | ></td> | 134 | ></td> |
135 | <td class="tabla-articulo-codigo"> | 135 | <td class="tabla-articulo-codigo"> |
136 | <input | 136 | <input |
137 | class="form-control" | 137 | class="form-control" |
138 | ng-model="articuloACargar.sectorCodigo" | 138 | ng-model="articuloACargar.sectorCodigo" |
139 | readonly | 139 | readonly |
140 | > | 140 | > |
141 | </td> | 141 | </td> |
142 | <td class="tabla-articulo-descripcion"> | 142 | <td class="tabla-articulo-descripcion"> |
143 | <input | 143 | <input |
144 | class="form-control" | 144 | class="form-control" |
145 | ng-model="articuloACargar.descripcion" | 145 | ng-model="articuloACargar.descripcion" |
146 | readonly | 146 | readonly |
147 | > | 147 | > |
148 | </td> | 148 | </td> |
149 | <td class="tabla-articulo-cantidad text-right"> | 149 | <td class="tabla-articulo-cantidad text-right"> |
150 | <input | 150 | <input |
151 | class="form-control" | 151 | class="form-control" |
152 | type="number" | 152 | type="number" |
153 | min="1" | 153 | min="1" |
154 | ng-model="articuloACargar.cantidad" | 154 | ng-model="articuloACargar.cantidad" |
155 | foca-focus="!cargando" | 155 | foca-focus="!cargando" |
156 | esc-key="resetFilter()" | 156 | esc-key="resetFilter()" |
157 | ng-keypress="agregarATabla($event.keyCode)" | 157 | ng-keypress="agregarATabla($event.keyCode)" |
158 | > | 158 | > |
159 | </td> | 159 | </td> |
160 | <td class="tabla-articulo-precio text-right"> | 160 | <td class="tabla-articulo-precio text-right"> |
161 | <input | 161 | <input |
162 | class="form-control" | 162 | class="form-control" |
163 | ng-value="articuloACargar.precio | currency: '$'" | 163 | ng-value="articuloACargar.precio | currency: '$'" |
164 | readonly | 164 | readonly |
165 | > | 165 | > |
166 | </td> | 166 | </td> |
167 | <td class="tabla-articulo-subtotal text-right"> | 167 | <td class="tabla-articulo-subtotal text-right"> |
168 | <input | 168 | <input |
169 | class="form-control" | 169 | class="form-control" |
170 | ng-value="getSubTotal() | currency: '$'" | 170 | ng-value="getSubTotal() | currency: '$'" |
171 | readonly | 171 | readonly |
172 | ></td> | 172 | ></td> |
173 | <td class="tabla-articulo-boton text-right"> | 173 | <td class="tabla-articulo-boton text-center align-middle"> |
174 | <button | 174 | <button |
175 | class="btn btn-outline-secondary btn-sm" | 175 | class="btn btn-outline-secondary" |
176 | ng-click="agregarATabla(13)" | 176 | ng-click="agregarATabla(13)" |
177 | > | 177 | > |
178 | <i class="fa fa-save"></i> | 178 | <i class="fa fa-save"></i> |
179 | </button> | 179 | </button> |
180 | </td> | 180 | </td> |
181 | </tr> | 181 | </tr> |
182 | <tr ng-show="cargando"> | 182 | <tr ng-show="cargando"> |
183 | <td colspan="6"> | 183 | <td colspan="7"> |
184 | <input | 184 | <input |
185 | placeholder="Seleccione Articulo" | 185 | placeholder="Seleccione Articulo" |
186 | class="form-control form-control-sm" | 186 | class="form-control form-control-sm" |
187 | readonly | 187 | readonly |
188 | ng-click="seleccionarArticulo()" | 188 | ng-click="seleccionarArticulo()" |
189 | /> | 189 | /> |
190 | </td> | 190 | </td> |
191 | </tr> | 191 | </tr> |
192 | <tr class=""> | 192 | <tr class=""> |
193 | <td colspan="3"> | 193 | <td colspan="4"> |
194 | <strong>Cantidad Items:</strong> | 194 | <strong>Cantidad Items:</strong> |
195 | <a ng-bind="articulosTabla.length"></a> | 195 | <a ng-bind="articulosTabla.length"></a> |
196 | </td> | 196 | </td> |
197 | <td class="text-right table-celda-total"><h3>Total:</h3></td> | 197 | <td class="text-right table-celda-total"><h3>Total:</h3></td> |
198 | <td class="table-celda-total text-right" colspan="1"> | 198 | <td class="table-celda-total text-right" colspan="1"> |
199 | <h3>{{getTotal() | currency: '$'}}</h3> | 199 | <h3>{{getTotal() | currency: '$'}}</h3> |
200 | </td> | 200 | </td> |
201 | <td colspan="2" class="text-right"> | 201 | <td class="text-right"> |
202 | <button | 202 | <button |
203 | type="button" | 203 | type="button" |
204 | class="btn btn-default btn-sm" | 204 | class="btn btn-default btn-sm" |
205 | > | 205 | > |
206 | Totales | 206 | Totales |
207 | </button> | 207 | </button> |
208 | </td> | 208 | </td> |
209 | </tr> | 209 | </tr> |
210 | </tfoot> | 210 | </tfoot> |
211 | </table> | 211 | </table> |
212 | </div> | 212 | </div> |
213 | </div> | 213 | </div> |
214 | <div class="col-auto my-2 col-lg-2 botonera-lateral"> | 214 | <div class="col-auto my-2 col-lg-2 botonera-lateral"> |
215 | <div class="row align-items-end"> | 215 | <div class="row align-items-end"> |
216 | <div class="col-12"> | 216 | <div class="col-12"> |
217 | <button | 217 | <button |
218 | ng-click="crearNotaPedido()" | 218 | ng-click="crearNotaPedido()" |
219 | type="submit" | 219 | type="submit" |
220 | title="Crear nota pedido" | 220 | title="Crear nota pedido" |
221 | class="btn btn-default btn-block mb-2"> | 221 | class="btn btn-default btn-block mb-2"> |
222 | Guardar | 222 | Guardar |
223 | </button> | 223 | </button> |
224 | <button | 224 | <button |
225 | ng-click="salir()" | 225 | ng-click="salir()" |
226 | type="button" | 226 | type="button" |
227 | title="Salir" | 227 | title="Salir" |
228 | class="btn btn-default btn-block"> | 228 | class="btn btn-default btn-block"> |
229 | Salir | 229 | Salir |
230 | </button> | 230 | </button> |
231 | </div> | 231 | </div> |
232 | </div> | 232 | </div> |
233 | </div> | 233 | </div> |
234 | </div> | 234 | </div> |
235 | </div> | 235 | </div> |
236 | 236 |