foca-abm-precios-condiciones-listado.html
7.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<div class="row">
<foca-cabecera-facturador
titulo="'Precios y condiciones'"
fecha="now"
class="mb-0 col-lg-12"
></foca-cabecera-facturador>
</div>
<div class="row">
<div class="col-12 col-md-10 p-0 mt-4 border border-white rounded">
<div class="form-group input-group mt-3 px-5">
<input
type="text"
class="form-control form-control-sm"
id="search"
placeholder="Búsqueda"
teclado-virtual
ng-keypress="buscar($event.keyCode)"
ng-model="filters"
foca-focus="focusSearch"
/>
<div class="input-group-append">
<button
ladda="searchLoading"
class="btn btn-outline-secondary"
type="button"
ng-click="buscar(13)"
>
<i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</div>
<table class="table table-default table-hover table-sm table-abm table-striped mb-0" >
<thead>
<tr>
<th>Código</th>
<th>Nombre</th>
<th>Lista de precio</th>
<th>Plazos</th>
<th colspan="2" class="text-center">
<button
title="Agregar Precio y Condicion"
class="btn btn-outline-debo boton-accion"
ng-click="crearPrecioYCondicion()"
ng-disabled="!crear"
>
<i class="fa fa-plus"></i>
</button>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(key, precioCondicion) in preciosCondiciones" ng-hide="precioCondicion.desactivado">
<td ng-bind="precioCondicion.id | rellenarDigitos: 4: 0" ng-hide="precioCondicion.editando"></td>
<td ng-show="precioCondicion.editando">
<input
class="form-control"
type="text"
name="codigo"
ng-value="precioCondicion.id | rellenarDigitos: 4: 0"
autocomplete="off"
readonly
/>
</td>
<td ng-bind="precioCondicion.nombre" ng-hide="precioCondicion.editando"></td>
<td align="center" ng-show="precioCondicion.editando">
<input
class="form-control"
type="text"
name="nombre"
ng-model="precioCondicion.nombre"
autocomplete="off"
foca-focus="focused == 1"
ng-focus="focused = 1"
ng-keypress="next($event.keyCode)"
teclado-virtual
esc-key="volver(precioCondicion, key)"
/>
</td>
<td ng-bind="precioCondicion.listaPrecio.ID + ' - ' + precioCondicion.listaPrecio.DES + ' - ' + precioCondicion.listaPrecio.moneda.DETALLE" ng-hide="precioCondicion.editando"></td>
<td align="center" ng-show="precioCondicion.editando">
<div class="input-group p-0 m-0">
<input
ng-model="listaPrecioLabel"
class="form-control"
foca-focus="focused == 3"
ng-focus="focused = 3"
ng-keypress="seleccionarListaPrecio($event.keyCode)"
readonly
/>
<div class="input-group-append">
<button
class="btn btn-outline-secondary form-control"
title="Ver productos"
type="button"
ng-click="verProductosListaPrecio()"
ng-show="precioCondicion.listaPrecio"
>
<i class="fa fa-eye" aria-hidden="true"></i>
</button>
<button
ladda="searchLoading"
class="btn btn-outline-secondary form-control"
title="Buscar"
type="button"
ng-click="seleccionarListaPrecio(13)"
>
<i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</div>
</td>
<!-- Consultar -->
<td ng-hide="precioCondicion.editando">
<span
ng-repeat="plazo in precioCondicion.plazoPago"
ng-if="plazo.activo"
ng-bind="$last ? plazo.dias : plazo.dias + ', '"
>
</span>
</td>
<td align="center" ng-show="precioCondicion.editando">
<input
type="number"
class="form-control p-1 "
min="0"
max="31"
ng-model="precioCondicion.plazos.dias"
foca-focus="focused == 4"
ng-focus="focused = 4"
placeholder="Días"
teclado-virtual
esc-key="volver(precioCondicion, key)"
>
</td>
<td class="text-center" ng-hide="precioCondicion.editando">
<button
title="Editar"
class="btn btn-outline-dark boton-accion"
ng-click="editar(precioCondicion)">
<i class="fa fa-pencil"></i>
</button>
<button
title="Eliminar"
class="btn btn-outline-dark boton-accion"
ng-click="solicitarConfirmacion(precioCondicion)">
<i class="fa fa-trash"></i>
</button>
</td>
<td align="center" ng-show="precioCondicion.editando" >
<button
class="btn btn-outline-dark boton-accion"
ng-click="agregarPrecioYCondicion(precioCondicion)"
>
<i class="fa fa-save"></i>
</button>
<button
class="btn btn-outline-dark boton-accion"
ng-click="volver(precioCondicion, key)"
>
<i class="fa fa-undo" aria-hidden="true"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>