Commit cf01dcac55c68054f3fa9710934c3bf895041923
Exists in
master
Merge branch 'master' of https://192.168.0.11/modulos-npm/foca-abm-precios-condiciones
# Conflicts: # gulpfile.js # index.html # package.json
Showing
8 changed files
Show diff stats
gulpfile.js
1 | const templateCache = require('gulp-angular-templatecache'); | 1 | const templateCache = require('gulp-angular-templatecache'); |
2 | const concat = require('gulp-concat'); | 2 | const concat = require('gulp-concat'); |
3 | const clean = require('gulp-clean'); | 3 | const clean = require('gulp-clean'); |
4 | const htmlmin = require('gulp-htmlmin'); | 4 | const htmlmin = require('gulp-htmlmin'); |
5 | const rename = require('gulp-rename'); | 5 | const rename = require('gulp-rename'); |
6 | const uglify = require('gulp-uglify-es').default; | 6 | const uglify = require('gulp-uglify-es').default; |
7 | const gulp = require('gulp'); | 7 | const gulp = require('gulp'); |
8 | const pump = require('pump'); | 8 | const pump = require('pump'); |
9 | const jshint = require('gulp-jshint'); | 9 | const jshint = require('gulp-jshint'); |
10 | const replace = require('gulp-replace'); | 10 | const replace = require('gulp-replace'); |
11 | |||
11 | 12 | var paths = { | |
12 | var paths = { | 13 | srcJS: 'src/js/*.js', |
13 | srcJS: 'src/js/*.js', | 14 | srcViews: 'src/views/*.html', |
14 | srcViews: 'src/views/*.html', | 15 | tmp: 'tmp', |
15 | tmp: 'tmp', | 16 | dist: 'dist/' |
16 | dist: 'dist/' | 17 | }; |
17 | }; | 18 | |
18 | 19 | gulp.task('templates', function() { | |
19 | gulp.task('templates', function() { | 20 | return pump( |
20 | return pump( | 21 | [ |
21 | [ | 22 | gulp.src(paths.srcViews), |
22 | gulp.src(paths.srcViews), | 23 | htmlmin(), |
23 | htmlmin(), | 24 | templateCache('views.js', { |
24 | templateCache('views.js', { | 25 | module: 'focaAbmPreciosCondiciones', |
25 | module: 'focaAbmPreciosCondiciones', | 26 | root: '' |
26 | root: '' | 27 | }), |
27 | }), | 28 | gulp.dest(paths.tmp) |
28 | gulp.dest(paths.tmp) | 29 | ] |
29 | ] | 30 | ); |
30 | ); | 31 | }); |
31 | }); | 32 | |
32 | 33 | gulp.task('uglify', ['templates'], function() { | |
33 | gulp.task('uglify', ['templates'], function() { | 34 | return pump( |
34 | return pump( | 35 | [ |
35 | [ | 36 | gulp.src([ |
36 | gulp.src([ | 37 | paths.srcJS, |
37 | paths.srcJS, | 38 | 'tmp/views.js' |
38 | 'tmp/views.js' | 39 | ]), |
39 | ]), | 40 | concat('foca-abm-precios-condiciones.js'), |
40 | concat('foca-abm-precios-condiciones.js'), | 41 | replace('src/views/', ''), |
41 | replace('src/views/', ''), | 42 | replace("['ngRoute', 'ui.bootstrap', 'focaModal']", '[]'), |
42 | replace("['ngRoute', 'ui.bootstrap', 'focaModal']", '[]'), | 43 | gulp.dest(paths.tmp), |
43 | gulp.dest(paths.tmp), | 44 | rename('foca-abm-precios-condiciones.min.js'), |
44 | rename('foca-abm-precios-condiciones.min.js'), | 45 | uglify(), |
45 | uglify(), | 46 | gulp.dest(paths.dist) |
46 | gulp.dest(paths.dist) | 47 | ] |
47 | ] | 48 | ); |
48 | ); | 49 | }); |
49 | }); | 50 | |
50 | 51 | gulp.task('clean', function() { | |
51 | gulp.task('clean', function() { | 52 | return gulp.src(['tmp', 'dist'], {read: false}) |
52 | return gulp.src(['tmp', 'dist'], {read: false}) | 53 | .pipe(clean()); |
53 | .pipe(clean()); | 54 | }); |
54 | }); | 55 | |
55 | 56 | gulp.task('pre-commit', function() { | |
56 | gulp.task('pre-commit', function() { | 57 | pump( |
57 | pump( | 58 | [ |
58 | [ | 59 | gulp.src(paths.srcJS), |
59 | gulp.src(paths.srcJS), | 60 | jshint('.jshintrc'), |
60 | jshint('.jshintrc'), | 61 | jshint.reporter('default'), |
61 | jshint.reporter('default'), | 62 | jshint.reporter('fail') |
62 | jshint.reporter('fail') | 63 | ] |
63 | ] | 64 | ); |
64 | ); | 65 | }); |
65 | }); | 66 | |
66 | 67 | gulp.task('clean-post-install', function() { | |
67 | gulp.task('clean-post-install', function() { | 68 | return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', |
68 | return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', | 69 | 'index.html'], {read: false}) |
69 | 'index.html'], {read: false}) | 70 | .pipe(clean()); |
70 | .pipe(clean()); | 71 | }); |
71 | }); | 72 | |
72 | 73 | gulp.task('webserver', function() { | |
73 | gulp.task('webserver', function() { | 74 | pump [ |
74 | pump [ | 75 | connect.server({port: 3000}) |
75 | connect.server({port: 3000}) | 76 | ] |
76 | ] | 77 | }); |
77 | }); | 78 | |
78 | 79 | gulp.task('default', ['webserver']); | |
79 | gulp.task('default', ['webserver']); | 80 |
index.html
1 | <html ng-app="focaAbmPreciosCondiciones"> | 1 | <html ng-app="focaAbmPreciosCondiciones"> |
2 | |||
3 | <head> | ||
4 | <meta charset="UTF-8" /> | ||
2 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
3 | <head> | 6 | |
4 | <meta charset="UTF-8" /> | 7 | <!--CSS--> |
5 | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | 8 | <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" /> |
6 | 9 | <link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet" /> | |
7 | <!--CSS--> | 10 | |
8 | <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" /> | 11 | <!--VENDOR JS--> |
9 | <link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet" /> | 12 | <script src="node_modules/jquery/dist/jquery.min.js"></script> |
13 | <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script> | ||
14 | <script src="node_modules/angular/angular.min.js"></script> | ||
15 | <script src="node_modules/angular-route/angular-route.min.js"></script> | ||
10 | 16 | <script src="node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js"></script> | |
11 | <!--VENDOR JS--> | ||
12 | <script src="node_modules/jquery/dist/jquery.min.js"></script> | ||
13 | <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script> | ||
14 | <script src="node_modules/angular/angular.min.js"></script> | ||
15 | <script src="node_modules/angular-route/angular-route.min.js"></script> | ||
16 | <script src="node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js"></script> | ||
17 | <script src="node_modules/foca-modal/dist/foca-modal.min.js"></script> | ||
18 | |||
19 | <!-- BUILD --> | ||
20 | <script src="src/js/app.js"></script> | ||
21 | <script src="src/js/route.js"></script> | ||
22 | <script src="src/js/controller.js"></script> | ||
23 | <script src="src/js/service.js"></script> | ||
24 | <script src="src/etc/develop.js"></script> | ||
25 | <!-- /BUILD --> | ||
26 | |||
27 | <body> |
package.json
1 | { | 1 | { |
2 | "name": "foca-abm-precios-condiciones", | 2 | "name": "foca-abm-precios-condiciones", |
3 | "version": "1.0.0", | 3 | "version": "1.0.0", |
4 | "description": "ABM de precios y condiciones", | 4 | "description": "ABM de precios y condiciones", |
5 | "main": "dist/foca-abm-precios-condiciones.js", | 5 | "main": "dist/foca-abm-precios-condiciones.js", |
6 | "scripts": { | 6 | "scripts": { |
7 | "test": "echo \"Error: no test specified\" && exit 1", | 7 | "test": "echo \"Error: no test specified\" && exit 1", |
8 | "compile": "gulp uglify", | 8 | "compile": "gulp uglify", |
9 | "gulp-pre-commit": "gulp pre-commit", | 9 | "gulp-pre-commit": "gulp pre-commit", |
10 | "postinstall": "npm run compile && gulp clean-post-install", | 10 | "postinstall": "npm run compile && gulp clean-post-install", |
11 | "install-dev": "npm install -D jasmine-core pre-commit angular angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify gulp-replace jquery jshint pump git+https://192.168.0.11/modulos-npm/foca-modal.git" | 11 | "install-dev": "npm install -D jasmine-core pre-commit angular angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify gulp-replace jquery jshint pump git+https://192.168.0.11/modulos-npm/foca-modal.git" |
12 | }, | 12 | }, |
13 | "pre-commit": [ | 13 | "pre-commit": [ |
14 | "gulp-pre-commit" | 14 | "gulp-pre-commit" |
15 | ], | 15 | ], |
16 | "repository": { | 16 | "repository": { |
17 | "type": "git", | 17 | "type": "git", |
18 | "url": "https://192.168.0.11/modulos-npm/foca-abm-precios-condiciones.git" | 18 | "url": "https://192.168.0.11/modulos-npm/foca-abm-precios-condiciones.git" |
19 | }, | 19 | }, |
20 | "author": "Foca Software", | 20 | "author": "Foca Software", |
21 | "license": "ISC", | 21 | "license": "ISC", |
22 | "peerDependencies": { | 22 | "peerDependencies": { |
23 | "angular": "^1.7.x", | 23 | "angular": "^1.7.x", |
24 | "bootstrap": "^4.1.x", | 24 | "bootstrap": "^4.1.x", |
25 | "jquery": "^3.3.x", | 25 | "jquery": "^3.3.x", |
26 | "font-awesome": "^4.7.x", | 26 | "font-awesome": "^4.7.x", |
27 | "gulp": "^3.9.x", | 27 | "gulp": "^3.9.x", |
28 | "gulp-concat": "2.6.x", | 28 | "gulp-concat": "2.6.x", |
29 | "gulp-jshint": "^2.1.x", | 29 | "gulp-jshint": "^2.1.x", |
30 | "gulp-rename": "^1.4.x", | 30 | "gulp-rename": "^1.4.x", |
31 | "gulp-replace": "^1.0.x", | 31 | "gulp-replace": "^1.0.x", |
32 | "gulp-uglify-es": "^1.0.x", | 32 | "gulp-uglify-es": "^1.0.x", |
33 | "jshint": "^2.9.x", | 33 | "jshint": "^2.9.x", |
34 | "pump": "^3.0.x" | 34 | "pump": "^3.0.x" |
35 | }, | 35 | }, |
36 | "devDependencies": { | 36 | "devDependencies": { |
37 | "angular": "^1.7.4", | 37 | "angular": "^1.7.4", |
38 | "angular-route": "^1.7.5", | 38 | "angular-route": "^1.7.5", |
39 | "bootstrap": "^4.1.3", | 39 | "bootstrap": "^4.1.3", |
40 | "foca-modal": "git+https://192.168.0.11/modulos-npm/foca-modal.git", | 40 | "foca-modal": "git+https://192.168.0.11/modulos-npm/foca-modal.git", |
41 | "font-awesome": "^4.7.0", | 41 | "font-awesome": "^4.7.0", |
42 | "gulp": "^3.9.1", | 42 | "gulp": "^3.9.1", |
43 | "gulp-angular-templatecache": "^2.2.1", | 43 | "gulp-angular-templatecache": "^2.2.1", |
44 | "gulp-clean": "^0.4.0", | 44 | "gulp-clean": "^0.4.0", |
45 | "gulp-connect": "^5.6.1", | 45 | "gulp-connect": "^5.6.1", |
46 | "gulp-htmlmin": "^5.0.1", | 46 | "gulp-htmlmin": "^5.0.1", |
47 | "gulp-jshint": "^2.1.0", | 47 | "gulp-jshint": "^2.1.0", |
48 | "gulp-rename": "^1.4.0", | 48 | "gulp-rename": "^1.4.0", |
49 | "gulp-replace": "^1.0.0", | 49 | "gulp-replace": "^1.0.0", |
50 | "gulp-sequence": "^1.0.0", | 50 | "gulp-sequence": "^1.0.0", |
51 | "gulp-uglify": "^3.0.1", | 51 | "gulp-uglify": "^3.0.1", |
52 | "gulp-uglify-es": "^1.0.4", | 52 | "gulp-uglify-es": "^1.0.4", |
53 | "jasmine-core": "^3.2.1", | 53 | "jasmine-core": "^3.2.1", |
54 | "jquery": "^3.3.1", | 54 | "jquery": "^3.3.1", |
55 | "jshint": "^2.9.6", | 55 | "jshint": "^2.9.6", |
56 | "pre-commit": "^1.2.2", | 56 | "pre-commit": "^1.2.2", |
57 | "pump": "^3.0.0", | 57 | "pump": "^3.0.0", |
58 | "ui-bootstrap4": "^3.0.5" | 58 | "ui-bootstrap4": "^3.0.5" |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 |
src/etc/develop.js
1 | angular.module('focaAbmPreciosCondiciones') | File was deleted | |
2 | .constant("API_ENDPOINT", { | ||
3 | 'URL': 'http://192.168.0.23:9900' | ||
4 | }); | ||
5 |
src/js/controller.js
1 | angular.module('focaAbmPreciosCondiciones') | 1 | angular.module('focaAbmPreciosCondiciones') |
2 | .controller('focaAbmPreciosCondicionesController', [ | 2 | .controller('focaAbmPreciosCondicionesController', [ |
3 | '$scope', 'focaAbmPreciosCondicionesService', '$location', 'focaModalService', | 3 | '$scope', 'focaAbmPreciosCondicionesService', '$location', 'focaModalService', |
4 | function($scope, focaAbmPreciosCondicionesService, $location, focaModalService) { | 4 | function($scope, focaAbmPreciosCondicionesService, $location, focaModalService) { |
5 | focaAbmPreciosCondicionesService.obtenerPreciosCondiciones().then(function(datos) { | 5 | focaAbmPreciosCondicionesService.obtenerPreciosCondiciones().then(function(datos) { |
6 | $scope.preciosCondiciones = datos.data; | 6 | $scope.preciosCondiciones = datos.data; |
7 | }); | 7 | }); |
8 | $scope.editar = function(id) { | 8 | $scope.editar = function(id) { |
9 | $location.path('/precio-condicion/' + id); | 9 | $location.path('/precio-condicion/' + id); |
10 | }; | 10 | }; |
11 | $scope.solicitarConfirmacion = function(precioCondicion) { | 11 | $scope.solicitarConfirmacion = function(precioCondicion) { |
12 | focaModalService.confirm('¿Está seguro que desea borrar el precio condición' + | 12 | focaModalService.confirm('¿Está seguro que desea borrar el precio condición' + |
13 | precioCondicion.codigo + ' ' + precioCondicion.nombre + ' ?').then( | 13 | precioCondicion.codigo + ' ' + precioCondicion.nombre + ' ?').then( |
14 | function(data) { | 14 | function(data) { |
15 | if (data) { | 15 | if (data) { |
16 | focaAbmPreciosCondicionesService | 16 | focaAbmPreciosCondicionesService |
17 | .borrarPrecioCondicion(precioCondicion.id); | 17 | .borrarPrecioCondicion(precioCondicion.id); |
18 | $scope.preciosCondiciones.splice( | 18 | $scope.preciosCondiciones.splice( |
19 | $scope.preciosCondiciones.indexOf(precioCondicion), 1 | 19 | $scope.preciosCondiciones.indexOf(precioCondicion), 1 |
20 | ); | 20 | ); |
21 | } | 21 | } |
22 | } | 22 | } |
23 | ); | 23 | ); |
24 | }; | 24 | }; |
25 | } | 25 | } |
26 | ]) | 26 | ]) |
27 | .controller('focaAbmPrecioCondicionController', [ | 27 | .controller('focaAbmPrecioCondicionController', [ |
28 | '$scope', 'focaAbmPreciosCondicionesService', | 28 | '$scope', 'focaAbmPreciosCondicionesService', |
29 | '$routeParams', '$location', 'focaModalService', | 29 | '$routeParams', '$location', 'focaModalService', |
30 | function( | 30 | function( |
31 | $scope, focaAbmPreciosCondicionesService, | 31 | $scope, focaAbmPreciosCondicionesService, |
32 | $routeParams, $location, focaModalService | 32 | $routeParams, $location, focaModalService |
33 | ) { | 33 | ) { |
34 | focaAbmPreciosCondicionesService.obtenerPrecioCondicion($routeParams.id) | 34 | focaAbmPreciosCondicionesService.obtenerPrecioCondicion($routeParams.id) |
35 | .then(function(datos) { | ||
35 | .then(function(datos) { | 36 | $scope.precioCondicion = { |
36 | $scope.precioCondicion = { | 37 | id: 0, |
37 | id: 0, | 38 | codigo: '', |
38 | codigo: '', | 39 | nombre: '', |
39 | nombre: '', | 40 | descripcion: '', |
40 | descripcion: '', | 41 | idListaPrecio: 0, |
41 | idListaPrecio: 0, | 42 | vigencia: new Date() |
42 | vigencia: new Date() | 43 | }; |
43 | }; | 44 | if (datos.data.id) { |
44 | if (datos.data.id) { | 45 | $scope.precioCondicion = datos.data; |
45 | $scope.precioCondicion = datos.data; | 46 | focaAbmPreciosCondicionesService.obtenerPlazoPago(datos.data.id) |
46 | focaAbmPreciosCondicionesService.obtenerPlazoPago(datos.data.id) | 47 | .then(function(datos) { |
47 | .then(function(datos) { | 48 | $scope.precioCondicion.plazos = datos.data; |
48 | $scope.precioCondicion.plazos = datos.data; | 49 | }); |
49 | }); | 50 | } |
50 | } | 51 | }); |
51 | }); | 52 | $scope.cancelar = function() { |
52 | $scope.cancelar = function() { | 53 | $location.path('/precio-condicion'); |
53 | $location.path('/precio-condicion'); | 54 | }; |
54 | }; | 55 | $scope.guardar = function(precioCondicion) { |
55 | $scope.guardar = function(precioCondicion) { | 56 | focaAbmPreciosCondicionesService.guardarPrecioCondicion(precioCondicion) |
56 | focaAbmPreciosCondicionesService.guardarPrecioCondicion(precioCondicion) | 57 | .then(function() { |
57 | .then(function() { | 58 | $location.path('/precio-condicion'); |
58 | $location.path('/precio-condicion'); | 59 | }); |
59 | }); | 60 | }; |
60 | }; | 61 | $scope.editarPlazoPago = function(id) { |
61 | $scope.editarPlazoPago = function(id) { | 62 | $location.path( |
62 | $location.path( | 63 | '/precio-condicion/' + $scope.precioCondicion.id + |
63 | '/precio-condicion/' + $scope.precioCondicion.id + | 64 | '/plazo-pago/' + id |
64 | '/plazo-pago/' + id | 65 | ); |
65 | ); | 66 | }; |
66 | }; | 67 | $scope.solicitarConfirmacionPlazoPago = function(plazoPago) { |
67 | $scope.solicitarConfirmacionPlazoPago = function(plazoPago) { | 68 | focaModalService.confirm('¿Está seguro que desea borrar el plazo de pago '+ |
68 | focaModalService.confirm('¿Está seguro que desea borrar el plazo de pago '+ | 69 | plazoPago.item+' '+plazoPago.dias + ' ?').then( |
69 | plazoPago.item+' '+plazoPago.dias + ' ?').then( | 70 | function(confirm) { |
70 | function(confirm) { | 71 | if (confirm) { |
71 | if (confirm) { | 72 | focaAbmPreciosCondicionesService.borrarPlazoPago(plazoPago.id); |
72 | focaAbmPreciosCondicionesService.borrarPlazoPago(plazoPago.id); | 73 | $scope.precioCondicion.plazos.splice( |
73 | $scope.precioCondicion.plazos.splice( | 74 | $scope.precioCondicion.plazos.indexOf(plazoPago), 1 |
74 | $scope.precioCondicion.plazos.indexOf(plazoPago), 1 | 75 | ); |
75 | ); | 76 | } |
76 | } | 77 | } |
77 | } | 78 | ); |
78 | ); | 79 | }; |
79 | }; | 80 | } |
80 | } | 81 | ]); |
81 | ]); | 82 |
src/views/foca-abm-precios-condiciones-item.html
1 | <h4>Precios y Condiciones</h4> | 1 | <h4>Precios y Condiciones</h4> |
2 | <form> | 2 | <form> |
3 | <input type="hidden" name="id" ng-model="precioCondicion.id" /> | 3 | <input type="hidden" name="id" ng-model="precioCondicion.id" /> |
4 | <div class="form-group row"> | 4 | <div class="form-group row"> |
5 | <label class="offset-sm-1 col-sm-2 col-form-label">Código</label> | 5 | <label class="offset-sm-1 col-sm-2 col-form-label">Código</label> |
6 | <div class="col-sm-4"> | 6 | <div class="col-sm-4"> |
7 | <input | 7 | <input |
8 | class="form-control" | 8 | class="form-control" |
9 | type="text" | 9 | type="text" |
10 | name="codigo" | 10 | name="codigo" |
11 | ng-model="precioCondicion.codigo" | 11 | ng-model="precioCondicion.codigo" |
12 | /> | ||
12 | /> | 13 | </div> |
13 | </div> | 14 | </div> |
14 | </div> | 15 | <div class="form-group row"> |
15 | <div class="form-group row"> | 16 | <label class="offset-sm-1 col-sm-2 col-form-label">Nombre</label> |
16 | <label class="offset-sm-1 col-sm-2 col-form-label">Nombre</label> | 17 | <div class="col-sm-4"> |
17 | <div class="col-sm-4"> | 18 | <input |
18 | <input | 19 | class="form-control" |
19 | class="form-control" | 20 | type="text" |
20 | type="text" | 21 | name="nombre" |
21 | name="nombre" | 22 | ng-model="precioCondicion.nombre" |
22 | ng-model="precioCondicion.nombre" | 23 | /> |
24 | </div> | ||
23 | /> | 25 | </div> |
24 | </div> | 26 | <div class="form-group row"> |
25 | </div> | 27 | <label class="offset-sm-1 col-sm-2 col-form-label">Descripción</label> |
26 | <div class="form-group row"> | 28 | <div class="col-sm-4"> |
27 | <label class="offset-sm-1 col-sm-2 col-form-label">Descripción</label> | 29 | <input |
28 | <div class="col-sm-4"> | 30 | class="form-control" |
29 | <input | 31 | type="text" |
30 | class="form-control" | 32 | name="nombre" |
31 | type="text" | 33 | ng-model="precioCondicion.descripcion" |
32 | name="nombre" | 34 | /> |
33 | ng-model="precioCondicion.descripcion" | 35 | </div> |
36 | </div> | ||
34 | /> | 37 | <div class="form-group row"> |
35 | </div> | 38 | <label class="offset-sm-1 col-sm-2 col-form-label">Lista de precios</label> |
36 | </div> | 39 | <div class="col-sm-4"> |
37 | <div class="form-group row"> | 40 | <input |
38 | <label class="offset-sm-1 col-sm-2 col-form-label">Lista de precios</label> | 41 | class="form-control" |
39 | <div class="col-sm-4"> | 42 | type="number" |
40 | <input | 43 | name="nombre" |
41 | class="form-control" | 44 | ng-model="precioCondicion.idListaPrecio" |
42 | type="number" | 45 | /> |
43 | name="nombre" | 46 | </div> |
44 | ng-model="precioCondicion.idListaPrecio" | 47 | </div> |
48 | <div class="form-group row"> | ||
45 | /> | 49 | <label class="offset-sm-1 col-sm-2 col-form-label">Plazos</label> |
46 | </div> | 50 | <div class="col-sm-4"> |
47 | </div> | 51 | <table class="table table-sm table-hover"> |
48 | <div class="form-group row"> | 52 | <tr> |
49 | <label class="offset-sm-1 col-sm-2 col-form-label">Plazos</label> | 53 | <th>Item</th> |
50 | <div class="col-sm-4"> | 54 | <th>Dias</th> |
51 | <table class="table table-sm table-hover"> | 55 | <th colspan="2" class="text-center"> |
52 | <tr> | 56 | <button class="btn btn-default" ng-click="editarPlazoPago(0)"> |
53 | <th>Item</th> | 57 | <i class="fa fa-plus"></i> |
54 | <th>Dias</th> | 58 | </button> |
55 | <th colspan="2" class="text-center"> | 59 | </th> |
56 | <button class="btn btn-default" ng-click="editarPlazoPago(0)"> | 60 | </tr> |
57 | <i class="fa fa-plus"></i> | 61 | <tr ng-repeat="plazo in precioCondicion.plazos"> |
58 | </button> | 62 | <td ng-bind="plazo.item"></td> |
59 | </th> | 63 | <td ng-bind="plazo.dias"></td> |
60 | </tr> | 64 | <td class="text-center"> |
61 | <tr ng-repeat="plazo in precioCondicion.plazos"> | 65 | <button class="btn btn-default" ng-click="editarPlazoPago(plazo.id)"> |
62 | <td ng-bind="plazo.item"></td> | 66 | <i class="fa fa-pencil"></i> |
63 | <td ng-bind="plazo.dias"></td> | 67 | </button> |
64 | <td class="text-center"> | 68 | <button |
65 | <button class="btn btn-default" ng-click="editarPlazoPago(plazo.id)"> | 69 | class="btn btn-default" |
66 | <i class="fa fa-pencil"></i> | 70 | ng-click="solicitarConfirmacionPlazoPago(plazo)" |
67 | </button> | 71 | > |
68 | <button | 72 | <i class="fa fa-trash"></i> |
69 | class="btn btn-default" | 73 | </button> |
70 | ng-click="solicitarConfirmacionPlazoPago(plazo)" | 74 | </td> |
71 | > | 75 | </tr> |
72 | <i class="fa fa-trash"></i> | 76 | </table> |
73 | </button> | 77 | </div> |
74 | </td> | 78 | </div> |
75 | </tr> | 79 | <div class="form-group row"> |
80 | <div class="col-sm-7 text-right"> | ||
81 | <button class="btn btn-primary" ng-click="guardar(precioCondicion)">Guardar</button> | ||
82 | <button class="btn btn-default" ng-click="cancelar()">Cancelar</button> | ||
83 | </div> | ||
76 | </table> | 84 | </div> |
77 | </div> | 85 | </form> |
78 | </div> | 86 |
src/views/foca-abm-precios-condiciones-listado.html
1 | <h4>Precios y Condiciones</h4> | 1 | <h4>Precios y Condiciones</h4> |
2 | <table class="table table-sm table-hover table-nonfluid"> | 2 | <table class="table table-sm table-hover table-nonfluid"> |
3 | <tr> | 3 | <tr> |
4 | <th>Código</th> | 4 | <th>Código</th> |
5 | <th>Nombre</th> | 5 | <th>Nombre</th> |
6 | <th colspan="2" class="text-center"> | 6 | <th colspan="2" class="text-center"> |
7 | <button class="btn btn-default" ng-click="editar(0)"> | 7 | <button class="btn btn-default" ng-click="editar(0)"> |
8 | <i class="fa fa-plus"></i> | 8 | <i class="fa fa-plus"></i> |
9 | </button> | 9 | </button> |
10 | </th> | 10 | </th> |
11 | </tr> | 11 | </tr> |
12 | <tr ng-repeat="precioCondicion in preciosCondiciones"> | 12 | <tr ng-repeat="precioCondicion in preciosCondiciones"> |
13 | <td ng-bind="precioCondicion.codigo"></td> | 13 | <td ng-bind="precioCondicion.codigo"></td> |
14 | <td ng-bind="precioCondicion.nombre"></td> | 14 | <td ng-bind="precioCondicion.nombre"></td> |
15 | <td> | 15 | <td> |
16 | <button class="btn btn-default" ng-click="editar(precioCondicion.id)"> | 16 | <button class="btn btn-default" ng-click="editar(precioCondicion.id)"> |
17 | <i class="fa fa-pencil"></i> | 17 | <i class="fa fa-pencil"></i> |
18 | </button> | 18 | </button> |
19 | <button class="btn btn-default" ng-click="solicitarConfirmacion(precioCondicion)"> | 19 | <button class="btn btn-default" ng-click="solicitarConfirmacion(precioCondicion)"> |
20 | <i class="fa fa-trash"></i> | 20 | <i class="fa fa-trash"></i> |
21 | </button> | 21 | </button> |
22 | </td> | 22 | </td> |
23 | </tr> | 23 | </tr> |
24 | </table> | 24 | </table> |
25 |