Commit a7a2db83784d04bb618db510676faf359d86ce2e

Authored by Jose Pinto
1 parent c2c7a3fb93
Exists in master

ok focus y teclado-virtual

src/js/controller.js
1 angular.module('focaAbmPreciosCondiciones') 1 angular.module('focaAbmPreciosCondiciones')
2 .controller('focaAbmPreciosCondicionesController', [ 2 .controller('focaAbmPreciosCondicionesController', [
3 '$scope', 'focaAbmPreciosCondicionesService', '$location', 3 '$scope', 'focaAbmPreciosCondicionesService', '$location',
4 'focaModalService', 'focaBotoneraLateralService', '$timeout', 4 'focaModalService', 'focaBotoneraLateralService', '$timeout',
5 function($scope, focaAbmPreciosCondicionesService, $location, 5 function($scope, focaAbmPreciosCondicionesService, $location,
6 focaModalService, focaBotoneraLateralService, $timeout) { 6 focaModalService, focaBotoneraLateralService, $timeout) {
7 7
8 $scope.focusSearch = false;
9 $scope.filters = '';
10 $scope.now = new Date();
8 $timeout(function() { 11 $timeout(function() {
9 focaBotoneraLateralService.showSalir(true); 12 focaBotoneraLateralService.showSalir(true);
10 focaBotoneraLateralService.showPausar(false); 13 focaBotoneraLateralService.showPausar(false);
11 focaBotoneraLateralService.showCancelar(false); 14 focaBotoneraLateralService.showCancelar(false);
12 focaBotoneraLateralService.showGuardar(false); 15 focaBotoneraLateralService.showGuardar(false);
13 }); 16 $scope.focusSearch = true;
14 $scope.filters = ''; 17 }, 3000);
15 $scope.now = new Date();
16 $scope.editar = function(id) { 18 $scope.editar = function(id) {
17 $location.path('/precio-condicion/' + id); 19 $location.path('/precio-condicion/' + id);
18 }; 20 };
19 $scope.solicitarConfirmacion = function(precioCondicion) { 21 $scope.solicitarConfirmacion = function(precioCondicion) {
20 focaModalService.confirm('¿Está seguro que desea borrar el precio condición' + 22 focaModalService.confirm('¿Está seguro que desea borrar el precio condición' +
21 precioCondicion.codigo + ' ' + precioCondicion.nombre + ' ?').then( 23 precioCondicion.codigo + ' ' + precioCondicion.nombre + ' ?').then(
22 function(data) { 24 function(data) {
23 if (data) { 25 if (data) {
24 focaAbmPreciosCondicionesService 26 focaAbmPreciosCondicionesService
25 .borrarPrecioCondicion(precioCondicion.id); 27 .borrarPrecioCondicion(precioCondicion.id);
26 $scope.preciosCondiciones.splice( 28 $scope.preciosCondiciones.splice(
27 $scope.preciosCondiciones.indexOf(precioCondicion), 1 29 $scope.preciosCondiciones.indexOf(precioCondicion), 1
28 ); 30 );
29 } 31 }
30 } 32 }
31 ); 33 );
32 }; 34 };
33 35
34 $scope.buscar = function(key) { 36 $scope.buscar = function(key) {
35 if(key === 13){ 37 if(key === 13){
36 focaAbmPreciosCondicionesService 38 focaAbmPreciosCondicionesService
37 .obtenerPreciosCondiciones($scope.filters) 39 .obtenerPreciosCondiciones($scope.filters)
38 .then(function(datos) { 40 .then(function(datos) {
39 $scope.preciosCondiciones = datos.data; 41 $scope.preciosCondiciones = datos.data;
40 $scope.preciosCondiciones.forEach(function(precioCondicion) { 42 $scope.preciosCondiciones.forEach(function(precioCondicion) {
41 precioCondicion.plazoPago.sort(function(a, b) { 43 precioCondicion.plazoPago.sort(function(a, b) {
42 return a.dias- b.dias; 44 return a.dias- b.dias;
43 }); 45 });
44 }); 46 });
45 }); 47 });
46 } 48 }
47 }; 49 };
48 } 50 }
49 ]) 51 ])
50 .controller('focaAbmPrecioCondicionController', [ 52 .controller('focaAbmPrecioCondicionController', [
51 '$scope', 'focaAbmPreciosCondicionesService', 'focaBotoneraLateralService', 53 '$scope', 'focaAbmPreciosCondicionesService', 'focaBotoneraLateralService',
52 '$routeParams', '$location', 'focaModalService', '$timeout', '$uibModal', '$window', 54 '$routeParams', '$location', 'focaModalService', '$timeout', '$uibModal', '$window',
53 function( 55 function(
54 $scope, focaAbmPreciosCondicionesService, focaBotoneraLateralService, 56 $scope, focaAbmPreciosCondicionesService, focaBotoneraLateralService,
55 $routeParams, $location, focaModalService, $timeout, $uibModal, $window 57 $routeParams, $location, focaModalService, $timeout, $uibModal, $window
56 ) { 58 ) {
57 $scope.focused = 1; 59 $scope.focused = 1;
58 $scope.plazosAEliminar = []; 60 $scope.plazosAEliminar = [];
59 $scope.mostrarPlazos = $routeParams.id > 0; 61 $scope.mostrarPlazos = $routeParams.id > 0;
60 $scope.now = new Date(); 62 $scope.now = new Date();
61 $scope.listaPrecioLabel = ''; 63 $scope.listaPrecioLabel = '';
62 focaAbmPreciosCondicionesService.obtenerPrecioCondicion($routeParams.id) 64 focaAbmPreciosCondicionesService.obtenerPrecioCondicion($routeParams.id)
63 .then(function(datos) { 65 .then(function(datos) {
64 $scope.precioCondicion = { 66 $scope.precioCondicion = {
65 id: 0, 67 id: 0,
66 codigo: '', 68 codigo: '',
67 nombre: '', 69 nombre: '',
68 descripcion: '', 70 descripcion: '',
69 idListaPrecio: 0, 71 idListaPrecio: 0,
70 vigencia: new Date() 72 vigencia: new Date()
71 }; 73 };
72 if(datos.data.id) { 74 if(datos.data.id) {
73 $scope.precioCondicion = datos.data; 75 $scope.precioCondicion = datos.data;
74 $scope.listaPrecioLabel = datos.data.listaPrecio.ID.trim() + 76 $scope.listaPrecioLabel = datos.data.listaPrecio.ID.trim() +
75 ' - ' + datos.data.listaPrecio.DES; 77 ' - ' + datos.data.listaPrecio.DES;
76 $scope.$broadcast('addCabecera', { 78 $scope.$broadcast('addCabecera', {
77 label: 'Precio y condición:', 79 label: 'Precio y condición:',
78 valor: datos.data.nombre 80 valor: datos.data.nombre
79 }); 81 });
80 focaAbmPreciosCondicionesService.obtenerPlazoPago(datos.data.id) 82 focaAbmPreciosCondicionesService.obtenerPlazoPago(datos.data.id)
81 .then(function(datos) { 83 .then(function(datos) {
82 $scope.precioCondicion.plazos = datos.data; 84 $scope.precioCondicion.plazos = datos.data;
83 $scope.precioCondicion.plazos.sort(function(a, b) { 85 $scope.precioCondicion.plazos.sort(function(a, b) {
84 return a.dias- b.dias; 86 return a.dias- b.dias;
85 }); 87 });
86 $scope.plazoACargar = 88 $scope.plazoACargar =
87 { 89 {
88 item: datos.data.length + 1 90 item: datos.data.length + 1
89 }; 91 };
90 }); 92 });
91 } 93 }
92 }); 94 });
93 95
94 $timeout(function() { 96 $timeout(function() {
95 focaBotoneraLateralService.showSalir(false); 97 focaBotoneraLateralService.showSalir(false);
96 focaBotoneraLateralService.showPausar(true); 98 focaBotoneraLateralService.showPausar(true);
97 focaBotoneraLateralService.showCancelar(true); 99 focaBotoneraLateralService.showCancelar(true);
98 focaBotoneraLateralService.showGuardar(true, $scope.guardar); 100 focaBotoneraLateralService.showGuardar(true, $scope.guardar);
99 }); 101 });
100 102
101 $scope.cancelar = function() { 103 $scope.cancelar = function() {
102 $location.path('/precio-condicion'); 104 $location.path('/precio-condicion');
103 }; 105 };
104 $scope.guardar = function() { 106 $scope.guardar = function() {
105 var promises = []; 107 var promises = [];
106 var precioCondicion = $scope.precioCondicion; 108 var precioCondicion = $scope.precioCondicion;
107 precioCondicion.idListaPrecio = precioCondicion.listaPrecio.ID; 109 precioCondicion.idListaPrecio = precioCondicion.listaPrecio.ID;
108 delete precioCondicion.listaPrecio; 110 delete precioCondicion.listaPrecio;
109 if($scope.mostrarPlazos) { 111 if($scope.mostrarPlazos) {
110 promises.push( 112 promises.push(
111 focaAbmPreciosCondicionesService 113 focaAbmPreciosCondicionesService
112 .guardarPlazosPago($scope.precioCondicion.plazos) 114 .guardarPlazosPago($scope.precioCondicion.plazos)
113 ); 115 );
114 $scope.plazosAEliminar.forEach(function(id) { 116 $scope.plazosAEliminar.forEach(function(id) {
115 promises.push( 117 promises.push(
116 focaAbmPreciosCondicionesService 118 focaAbmPreciosCondicionesService
117 .borrarPlazoPago(id) 119 .borrarPlazoPago(id)
118 ); 120 );
119 }); 121 });
120 } 122 }
121 promises.push( 123 promises.push(
122 focaAbmPreciosCondicionesService 124 focaAbmPreciosCondicionesService
123 .guardarPrecioCondicion(precioCondicion) 125 .guardarPrecioCondicion(precioCondicion)
124 ); 126 );
125 127
126 Promise.all(promises).then(function() { 128 Promise.all(promises).then(function() {
127 $timeout(function() { 129 $timeout(function() {
128 $location.path('/precio-condicion'); 130 $location.path('/precio-condicion');
129 }, 0); 131 }, 0);
130 }, function(err){ 132 }, function(err){
131 console.error(err); 133 console.error(err);
132 }); 134 });
133 }; 135 };
134 136
135 $scope.agregarPlazo = function(key) { 137 $scope.agregarPlazo = function(key) {
136 if(key === 13) { 138 if(key === 13) {
137 if(!$scope.plazoACargar.dias && $scope.plazoACargar.dias !== 0) { 139 if(!$scope.plazoACargar.dias && $scope.plazoACargar.dias !== 0) {
138 focaModalService.alert('Ingrese cantidad de días'); 140 focaModalService.alert('Ingrese cantidad de días');
139 return; 141 return;
140 } 142 }
141 var tieneEseDia = $scope.precioCondicion.plazos.filter(function(a) { 143 var tieneEseDia = $scope.precioCondicion.plazos.filter(function(a) {
142 return a.dias === $scope.plazoACargar.dias; 144 return a.dias === $scope.plazoACargar.dias;
143 }); 145 });
144 if(tieneEseDia.length > 0) { 146 if(tieneEseDia.length > 0) {
145 focaModalService.alert('Ya ha ingresado un plazo con esos días'); 147 focaModalService.alert('Ya ha ingresado un plazo con esos días');
146 return; 148 return;
147 } 149 }
148 $scope.plazoACargar.idPreciosCondiciones = $scope.precioCondicion.id; 150 $scope.plazoACargar.idPreciosCondiciones = $scope.precioCondicion.id;
149 $scope.plazoACargar.activo = true; 151 $scope.plazoACargar.activo = true;
150 $scope.precioCondicion.plazos.push($scope.plazoACargar); 152 $scope.precioCondicion.plazos.push($scope.plazoACargar);
151 $scope.plazoACargar = 153 $scope.plazoACargar =
152 { 154 {
153 item: $scope.precioCondicion.plazos.length + 1 155 item: $scope.precioCondicion.plazos.length + 1
154 }; 156 };
155 } 157 }
156 }; 158 };
157 $scope.quitarPlazo = function(key) { 159 $scope.quitarPlazo = function(key) {
158 if($scope.precioCondicion.plazos[key].id) 160 if($scope.precioCondicion.plazos[key].id)
159 $scope.plazosAEliminar.push($scope.precioCondicion.plazos[key].id); 161 $scope.plazosAEliminar.push($scope.precioCondicion.plazos[key].id);
160 162
161 $scope.precioCondicion.plazos.splice(key, 1); 163 $scope.precioCondicion.plazos.splice(key, 1);
162 $scope.plazoACargar = 164 $scope.plazoACargar =
163 { 165 {
164 item: $scope.precioCondicion.plazos.length + 1 166 item: $scope.precioCondicion.plazos.length + 1
165 }; 167 };
166 }; 168 };
167 $scope.solicitarConfirmacionPlazoPago = function(plazoPago) { 169 $scope.solicitarConfirmacionPlazoPago = function(plazoPago) {
168 focaModalService.confirm('¿Está seguro que desea borrar el plazo de pago ' + 170 focaModalService.confirm('¿Está seguro que desea borrar el plazo de pago ' +
169 plazoPago.item + ' ' + plazoPago.dias + ' ?').then( 171 plazoPago.item + ' ' + plazoPago.dias + ' ?').then(
170 function(confirm) { 172 function(confirm) {
171 if (confirm) { 173 if (confirm) {
172 focaAbmPreciosCondicionesService.borrarPlazoPago(plazoPago.id); 174 focaAbmPreciosCondicionesService.borrarPlazoPago(plazoPago.id);
173 $scope.precioCondicion.plazos.splice( 175 $scope.precioCondicion.plazos.splice(
174 $scope.precioCondicion.plazos.indexOf(plazoPago), 1 176 $scope.precioCondicion.plazos.indexOf(plazoPago), 1
175 ); 177 );
176 } 178 }
177 } 179 }
178 ); 180 );
179 }; 181 };
180 182
181 $scope.seleccionarListaPrecio = function(key) { 183 $scope.seleccionarListaPrecio = function(key) {
182 if(key === 13){ 184 if(key === 13){
183 var modalInstance = $uibModal.open( 185 var modalInstance = $uibModal.open(
184 { 186 {
185 ariaLabelledBy: 'Busqueda de Listas de precio', 187 ariaLabelledBy: 'Busqueda de Listas de precio',
186 templateUrl: 'modal-lista-precio.html', 188 templateUrl: 'modal-lista-precio.html',
187 controller: 'focaModalListaPrecioCtrl', 189 controller: 'focaModalListaPrecioCtrl',
188 size: 'lg' 190 size: 'lg'
189 } 191 }
190 ); 192 );
191 modalInstance.result.then(function(listaPrecio) { 193 modalInstance.result.then(function(listaPrecio) {
192 $scope.precioCondicion.listaPrecio = listaPrecio; 194 $scope.precioCondicion.listaPrecio = listaPrecio;
193 $scope.listaPrecioLabel = listaPrecio.ID + ' - ' + listaPrecio.DES; 195 $scope.listaPrecioLabel = listaPrecio.ID + ' - ' + listaPrecio.DES;
194 $scope.focused = 4; 196 $scope.focused = 4;
195 }); 197 });
196 } 198 }
197 }; 199 };
198 200
199 $scope.verProductosListaPrecio = function() { 201 $scope.verProductosListaPrecio = function() {
200 $uibModal.open( 202 $uibModal.open(
201 { 203 {
202 ariaLabelledBy: 'Busqueda de Productos', 204 ariaLabelledBy: 'Busqueda de Productos',
203 templateUrl: 'modal-busqueda-productos.html', 205 templateUrl: 'modal-busqueda-productos.html',
204 controller: 'modalBusquedaProductosCtrl', 206 controller: 'modalBusquedaProductosCtrl',
205 resolve: { 207 resolve: {
206 parametroProducto: { 208 parametroProducto: {
207 idLista: $scope.precioCondicion.listaPrecio.ID, 209 idLista: $scope.precioCondicion.listaPrecio.ID,
208 cotizacion: 1, 210 cotizacion: 1,
209 simbolo: '$', 211 simbolo: '$',
210 soloMostrar: true 212 soloMostrar: true
211 } 213 }
212 }, 214 },
213 size: 'md' 215 size: 'md'
214 } 216 }
215 ); 217 );
216 }; 218 };
217 219
218 $scope.next = function(key) { 220 $scope.next = function(key) {
219 if(key === 13) $scope.focused++; 221 if(key === 13) $scope.focused++;
220 }; 222 };
221 } 223 }
222 ]); 224 ]);
src/views/foca-abm-precios-condiciones-item.html
1 <div class="row"> 1 <div class="row">
2 <foca-cabecera-facturador 2 <foca-cabecera-facturador
3 titulo="'Precios y condiciones'" 3 titulo="'Precios y condiciones'"
4 fecha="now" 4 fecha="now"
5 class="mb-0 col-lg-12" 5 class="mb-0 col-lg-12"
6 ></foca-cabecera-facturador> 6 ></foca-cabecera-facturador>
7 </div> 7 </div>
8 <div class="row"> 8 <div class="row">
9 <form class="col-md-10"> 9 <form class="col-md-10">
10 <input type="hidden" name="id" ng-model="precioCondicion.id" /> 10 <input type="hidden" name="id" ng-model="precioCondicion.id" />
11 <div class="row mb-3"> 11 <div class="row mb-3">
12 <label class="col-sm-2 col-form-label">Código</label> 12 <label class="col-sm-2 col-form-label">Código</label>
13 <input 13 <input
14 class="form-control col-sm-4" 14 class="form-control col-sm-4"
15 type="text" 15 type="text"
16 name="codigo" 16 name="codigo"
17 ng-value="precioCondicion.id | rellenarDigitos: 4: 0" 17 ng-value="precioCondicion.id | rellenarDigitos: 4: 0"
18 autocomplete="off" 18 autocomplete="off"
19 readonly 19 readonly
20 /> 20 />
21 <label class="col-sm-2 col-form-label">Nombre</label> 21 <label class="col-sm-2 col-form-label">Nombre</label>
22 <input 22 <input
23 class="form-control col-sm-4" 23 class="form-control col-sm-4"
24 type="text" 24 type="text"
25 name="nombre" 25 name="nombre"
26 ng-model="precioCondicion.nombre" 26 ng-model="precioCondicion.nombre"
27 autocomplete="off" 27 autocomplete="off"
28 foca-focus="focused == 1" 28 foca-focus="focused == 1"
29 ng-focus="focused = 1" 29 ng-focus="focused = 1"
30 ng-keypress="next($event.keyCode)" 30 ng-keypress="next($event.keyCode)"
31 teclado-virtual 31 teclado-virtual
32 /> 32 />
33 </div> 33 </div>
34 <div class="form-group row"> 34 <div class="form-group row">
35 <label class="col-sm-2 col-form-label">Descripción</label> 35 <label class="col-sm-2 col-form-label">Descripción</label>
36 <input 36 <input
37 class="form-control col-sm-10" 37 class="form-control col-sm-10"
38 type="text" 38 type="text"
39 name="nombre" 39 name="nombre"
40 ng-model="precioCondicion.descripcion" 40 ng-model="precioCondicion.descripcion"
41 autocomplete="off" 41 autocomplete="off"
42 foca-focus="focused == 2" 42 foca-focus="focused == 2"
43 ng-focus="focused = 2" 43 ng-focus="focused = 2"
44 ng-keypress="next($event.keyCode)" 44 ng-keypress="next($event.keyCode)"
45 teclado-virtual 45 teclado-virtual
46 /> 46 />
47 </div> 47 </div>
48 <div class="row"> 48 <div class="row">
49 <label class="col-sm-2 col-form-label">Lista de precios</label> 49 <label class="col-sm-2 col-form-label">Lista de precios</label>
50 <div class="col-sm-4 input-group p-0"> 50 <div class="col-sm-4 input-group p-0">
51 <input 51 <input
52 ng-model="listaPrecioLabel" 52 ng-model="listaPrecioLabel"
53 class="form-control" 53 class="form-control"
54 foca-focus="focused == 3" 54 foca-focus="focused == 3"
55 ng-focus="focused = 3" 55 ng-focus="focused = 3"
56 ng-keypress="seleccionarListaPrecio($event.keyCode)" 56 ng-keypress="seleccionarListaPrecio($event.keyCode)"
57 readonly 57 readonly
58 /> 58 />
59 <div class="input-group-append"> 59 <div class="input-group-append">
60 <button 60 <button
61 class="btn btn-outline-secondary form-control" 61 class="btn btn-outline-secondary form-control"
62 title="Ver productos" 62 title="Ver productos"
63 type="button" 63 type="button"
64 ng-click="verProductosListaPrecio()" 64 ng-click="verProductosListaPrecio()"
65 ng-show="precioCondicion.listaPrecio" 65 ng-show="precioCondicion.listaPrecio"
66 > 66 >
67 <i class="fa fa-eye" aria-hidden="true"></i> 67 <i class="fa fa-eye" aria-hidden="true"></i>
68 </button> 68 </button>
69 <button 69 <button
70 ladda="searchLoading" 70 ladda="searchLoading"
71 class="btn btn-outline-secondary form-control" 71 class="btn btn-outline-secondary form-control"
72 title="Buscar" 72 title="Buscar"
73 type="button" 73 type="button"
74 ng-click="seleccionarListaPrecio(13)" 74 ng-click="seleccionarListaPrecio(13)"
75 > 75 >
76 <i class="fa fa-search" aria-hidden="true"></i> 76 <i class="fa fa-search" aria-hidden="true"></i>
77 </button> 77 </button>
78 </div> 78 </div>
79 </div> 79 </div>
80 <label class="col-sm-2 col-form-label" ng-show="mostrarPlazos">Plazos</label> 80 <label class="col-sm-2 col-form-label" ng-show="mostrarPlazos">Plazos</label>
81 <div class="col-sm-4 p-0" ng-show="mostrarPlazos"> 81 <div class="col-sm-4 p-0" ng-show="mostrarPlazos">
82 <div class="input-group p-0"> 82 <div class="input-group p-0">
83 <input 83 <input
84 type="number" 84 type="number"
85 class="form-control text-right" 85 class="form-control text-right"
86 min="0" 86 min="0"
87 ng-model="plazoACargar.dias" 87 ng-model="plazoACargar.dias"
88 ng-keypress="agregarPlazo($event.keyCode)" 88 ng-keypress="agregarPlazo($event.keyCode)"
89 foca-focus="focused == 4" 89 foca-focus="focused == 4"
90 ng-focus="focused = 4" 90 ng-focus="focused = 4"
91 placeholder="Días" 91 placeholder="Días"
92 teclado-virtual
92 /> 93 />
93 <div class="input-group-append"> 94 <div class="input-group-append">
94 <button 95 <button
95 class="btn btn-outline-secondary form-control" 96 class="btn btn-outline-secondary form-control"
96 title="Agregar" 97 title="Agregar"
97 type="button" 98 type="button"
98 ng-click="agregarPlazo(13)" 99 ng-click="agregarPlazo(13)"
99 > 100 >
100 <i class="fa fa-save" aria-hidden="true"></i> 101 <i class="fa fa-save" aria-hidden="true"></i>
101 </button> 102 </button>
102 </div> 103 </div>
103 </div> 104 </div>
104 <table class="table table-striped table-sm"> 105 <table class="table table-striped table-sm">
105 <tbody> 106 <tbody>
106 <tr ng-repeat="(key, plazo) in precioCondicion.plazos"> 107 <tr ng-repeat="(key, plazo) in precioCondicion.plazos">
107 <td class="text-right" > 108 <td class="text-right" >
108 <span ng-bind="plazo.dias + ' días'"></span> 109 <span ng-bind="plazo.dias + ' días'"></span>
109 <button 110 <button
110 type="button" 111 type="button"
111 title="Eliminar" 112 title="Eliminar"
112 class="btn btn-outline-secondary ml-1" 113 class="btn btn-outline-secondary ml-1"
113 ng-click="quitarPlazo(key)" 114 ng-click="quitarPlazo(key)"
114 > 115 >
115 <i class="fa fa-trash"></i> 116 <i class="fa fa-trash"></i>
116 </button> 117 </button>
117 </td> 118 </td>
118 </tr> 119 </tr>
119 </tbody> 120 </tbody>
120 </table> 121 </table>
121 </div> 122 </div>
122 </div> 123 </div>
123 </form> 124 </form>
124 </div> 125 </div>
125 126
src/views/foca-abm-precios-condiciones-listado.html
1 <div class="row"> 1 <div class="row">
2 <foca-cabecera-facturador 2 <foca-cabecera-facturador
3 titulo="'Precios y condiciones'" 3 titulo="'Precios y condiciones'"
4 fecha="now" 4 fecha="now"
5 class="mb-0 col-lg-12" 5 class="mb-0 col-lg-12"
6 ></foca-cabecera-facturador> 6 ></foca-cabecera-facturador>
7 </div> 7 </div>
8 <div class="row"> 8 <div class="row">
9 <div class="col-12 col-md-10 p-0 mt-4 border border-white rounded"> 9 <div class="col-12 col-md-10 p-0 mt-4 border border-white rounded">
10 <div class="form-group input-group mt-3 px-5"> 10 <div class="form-group input-group mt-3 px-5">
11 <input 11 <input
12 type="text" 12 type="text"
13 class="form-control form-control-sm" 13 class="form-control form-control-sm"
14 id="search" 14 id="search"
15 placeholder="Búsqueda" 15 placeholder="Búsqueda"
16 teclado-virtual 16 teclado-virtual
17 ng-keypress="buscar($event.keyCode)" 17 ng-keypress="buscar($event.keyCode)"
18 ng-model="filters" 18 ng-model="filters"
19 foca-focus="focusSearch"
19 /> 20 />
20 <div class="input-group-append"> 21 <div class="input-group-append">
21 <button 22 <button
22 ladda="searchLoading" 23 ladda="searchLoading"
23 class="btn btn-outline-secondary" 24 class="btn btn-outline-secondary"
24 type="button" 25 type="button"
25 ng-click="buscar(13)" 26 ng-click="buscar(13)"
26 > 27 >
27 <i class="fa fa-search" aria-hidden="true"></i> 28 <i class="fa fa-search" aria-hidden="true"></i>
28 </button> 29 </button>
29 </div> 30 </div>
30 </div> 31 </div>
31 <table class="table table-default table-hover table-sm table-abm table-striped mb-0"> 32 <table class="table table-default table-hover table-sm table-abm table-striped mb-0">
32 <thead> 33 <thead>
33 <tr> 34 <tr>
34 <th>Código</th> 35 <th>Código</th>
35 <th>Nombre</th> 36 <th>Nombre</th>
36 <th>Lista de precio</th> 37 <th>Lista de precio</th>
37 <th>Plazos</th> 38 <th>Plazos</th>
38 <th colspan="2" class="text-center"> 39 <th colspan="2" class="text-center">
39 <button 40 <button
40 title="Agregar" 41 title="Agregar"
41 class="btn btn-outline-debo boton-accion" 42 class="btn btn-outline-debo boton-accion"
42 ng-click="editar(0)"> 43 ng-click="editar(0)">
43 <i class="fa fa-plus"></i> 44 <i class="fa fa-plus"></i>
44 </button> 45 </button>
45 </th> 46 </th>
46 </tr> 47 </tr>
47 </thead> 48 </thead>
48 <tbody> 49 <tbody>
49 <tr ng-repeat="precioCondicion in preciosCondiciones"> 50 <tr ng-repeat="precioCondicion in preciosCondiciones">
50 <td ng-bind="precioCondicion.id | rellenarDigitos: 4: 0"></td> 51 <td ng-bind="precioCondicion.id | rellenarDigitos: 4: 0"></td>
51 <td ng-bind="precioCondicion.nombre"></td> 52 <td ng-bind="precioCondicion.nombre"></td>
52 <td ng-bind="precioCondicion.listaPrecio.ID + ' - ' + precioCondicion.listaPrecio.DES + ' - ' + precioCondicion.listaPrecio.moneda.DETALLE"></td> 53 <td ng-bind="precioCondicion.listaPrecio.ID + ' - ' + precioCondicion.listaPrecio.DES + ' - ' + precioCondicion.listaPrecio.moneda.DETALLE"></td>
53 <td><span 54 <td><span
54 ng-repeat="plazo in precioCondicion.plazoPago" 55 ng-repeat="plazo in precioCondicion.plazoPago"
55 ng-if="plazo.activo" 56 ng-if="plazo.activo"
56 ng-bind="$last ? plazo.dias : plazo.dias + ', '"></span></td> 57 ng-bind="$last ? plazo.dias : plazo.dias + ', '"></span></td>
57 <td class="text-center"> 58 <td class="text-center">
58 <button 59 <button
59 title="Editar" 60 title="Editar"
60 class="btn btn-outline-dark boton-accion" 61 class="btn btn-outline-dark boton-accion"
61 ng-click="editar(precioCondicion.id)"> 62 ng-click="editar(precioCondicion.id)">
62 <i class="fa fa-pencil"></i> 63 <i class="fa fa-pencil"></i>
63 </button> 64 </button>
64 <button 65 <button
65 title="Eliminar" 66 title="Eliminar"
66 class="btn btn-outline-dark boton-accion" 67 class="btn btn-outline-dark boton-accion"
67 ng-click="solicitarConfirmacion(precioCondicion)"> 68 ng-click="solicitarConfirmacion(precioCondicion)">
68 <i class="fa fa-trash"></i> 69 <i class="fa fa-trash"></i>
69 </button> 70 </button>
70 </td> 71 </td>
71 </tr> 72 </tr>
72 </tbody> 73 </tbody>
73 </table> 74 </table>
74 </div> 75 </div>
75 </div> 76 </div>
76 77