From b569573d6d1c72890bfe5e1e320d3467365a2a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s?= Date: Tue, 16 Oct 2018 12:14:32 -0300 Subject: [PATCH] =?UTF-8?q?WIP:=20renovaci=C3=B3n=20a=20creaci=C3=B3n=20de?= =?UTF-8?q?=20nota=20de=20pedido?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + index.html | 7 +- package.json | 9 ++ src/etc/develop.js.ejemplo | 4 + src/js/app.js | 23 ++-- src/js/controller.js | 27 +++-- src/js/route.js | 7 ++ src/js/service.js | 2 +- src/views/nota-pedido-lista.html | 4 +- src/views/nota-pedido.html | 148 ++++++++++++++++++++++- src/views/nota-pedido_1.html | 245 +++++++++++++++++++++++++++++++++++++++ 11 files changed, 447 insertions(+), 31 deletions(-) create mode 100644 src/etc/develop.js.ejemplo create mode 100644 src/js/route.js create mode 100644 src/views/nota-pedido_1.html diff --git a/.gitignore b/.gitignore index dd9bd26..76a3502 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /dist package-lock\.json /src/etc/develop.js + +tmp/ diff --git a/index.html b/index.html index c151157..62f1942 100644 --- a/index.html +++ b/index.html @@ -14,6 +14,7 @@ + @@ -22,9 +23,11 @@ + + - - + +
diff --git a/package.json b/package.json index 9b3be45..9698d2a 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,14 @@ "angular": "^1.7.x", "angular-route": "^1.7.4", "bootstrap": "^4.1.x", + "foca-directivas": "git+https://192.168.0.11/modulos-npm/foca-directivas.git", + "foca-modal-busqueda-productos": "git+https://192.168.0.11/nguarnieri/foca-modal-busqueda-productos", + "foca-modal-petroleras": "git+https://192.168.0.11/modulos-npm/foca-modal-petroleras.git", + "foca-modal-vendedores": "git+https://192.168.0.11/modulos-npm/foca-modal-vendedores.git", "font-awesome": "^4.7.x", "gulp": "^3.9.x", + "gulp-angular-templatecache": "^2.2.1", + "gulp-clean": "^0.4.0", "gulp-concat": "2.6.x", "gulp-jshint": "^2.1.x", "gulp-rename": "^1.4.x", @@ -31,7 +37,10 @@ "ui-bootstrap4": "^3.0.5" }, "devDependencies": { + "foca-busqueda-cliente": "git+https://192.168.0.11/modulos-npm/foca-busqueda-cliente", "gulp-connect": "^5.6.1", + "gulp-htmlmin": "^5.0.1", + "gulp-uglify": "^3.0.1", "jasmine-core": "3.2.1", "pre-commit": "^1.2.2" } diff --git a/src/etc/develop.js.ejemplo b/src/etc/develop.js.ejemplo new file mode 100644 index 0000000..f2b0c28 --- /dev/null +++ b/src/etc/develop.js.ejemplo @@ -0,0 +1,4 @@ +angular.module('focaCrearNotaPedido') + .constant("API_ENDPOINT", { + 'URL': '//127.0.0.1:9000' + }); diff --git a/src/js/app.js b/src/js/app.js index ae5768d..5a59fd2 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -1,14 +1,9 @@ -angular.module('focaCrearNotaPedido', ['ngRoute', 'ui.bootstrap', 'focaModalVendedores', - 'focaBusquedaProductos', 'focaModalPetroleras', 'focaBusquedaCliente']) - .config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/venta-nota-pedido', { - controller: 'notaPedidoListaCtrl', - templateUrl: 'src/views/nota-pedido-lista.html' - }); - }]) - .config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/venta-nota-pedido/abm', { - controller: 'notaPedidoCtrl', - templateUrl: 'src/views/nota-pedido.html' - }); - }]); +angular.module('focaCrearNotaPedido', [ + 'ngRoute', + 'ui.bootstrap', + 'focaModalVendedores', + 'focaBusquedaProductos', + 'focaModalPetroleras', + 'focaBusquedaCliente' +]); + \ No newline at end of file diff --git a/src/js/controller.js b/src/js/controller.js index c69a294..45fe208 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -1,11 +1,14 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', - [ - '$scope', - '$uibModal', - '$location', - 'crearNotaPedidoService', + ['$scope', '$uibModal', '$location', 'crearNotaPedidoService', function($scope, $uibModal, $location, crearNotaPedidoService) { + $scope.show = false; + + $scope.dateOptions = { + maxDate: new Date(), + minDate: new Date(2010,0,1) + }; + $scope.notaPedido = {}; $scope.articulosTabla = []; var idLista; @@ -22,11 +25,12 @@ angular.module('focaCrearNotaPedido') $scope.notaPedido.flete = ($scope.notaPedido.flete).toString(); $scope.notaPedido.bomba = ($scope.notaPedido.bomba).toString(); idLista = $scope.notaPedido.precioCondicion; - crearNotaPedidoService.getArticulosByIdNotaPedido($scope.notaPedido.id).then( - function(res) { - $scope.articulosTabla = res.data; - } - ); + crearNotaPedidoService + .getArticulosByIdNotaPedido($scope.notaPedido.id).then( + function(res) { + $scope.articulosTabla = res.data; + } + ); crearNotaPedidoService.getDomiciliosByIdNotaPedido($scope.notaPedido.id).then( function(res) { $scope.notaPedido.domicilio = res.data; @@ -62,7 +66,8 @@ angular.module('focaCrearNotaPedido') jurisdiccionIIBB: $scope.notaPedido.jurisdiccionIIBB, costoFinanciacion: $scope.notaPedido.costoFinanciacion, flete: $scope.notaPedido.flete, - costoUnitarioKmFlete: $scope.notaPedido.costoUnitarioKmFlete + costoUnitarioKmFlete: $scope.notaPedido.costoUnitarioKmFlete, + total : $scope.articulosTabla[0].subTotal } crearNotaPedidoService.crearNotaPedido(notaPedido).then( function(res) { diff --git a/src/js/route.js b/src/js/route.js new file mode 100644 index 0000000..fb8d7ea --- /dev/null +++ b/src/js/route.js @@ -0,0 +1,7 @@ +angular.module('focaCrearNotaPedido') + .config(['$routeProvider', function($routeProvider) { + $routeProvider.when('/venta-nota-pedido/crear', { + controller: 'notaPedidoCtrl', + templateUrl: 'src/views/nota-pedido.html' + }); + }]); diff --git a/src/js/service.js b/src/js/service.js index d6abfd5..810e692 100644 --- a/src/js/service.js +++ b/src/js/service.js @@ -1,5 +1,5 @@ angular.module('focaCrearNotaPedido') - .service('crearNotaPedidoService', ['$http', 'API_ENDPOINT',function($http, API_ENDPOINT) { + .service('crearNotaPedidoService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { var route = API_ENDPOINT.URL; var notaPedido; return { diff --git a/src/views/nota-pedido-lista.html b/src/views/nota-pedido-lista.html index 16293a4..e64cd14 100644 --- a/src/views/nota-pedido-lista.html +++ b/src/views/nota-pedido-lista.html @@ -5,6 +5,7 @@ Vendedor Cliente Petrolera + Total @@ -14,8 +15,9 @@ + - + diff --git a/src/views/nota-pedido.html b/src/views/nota-pedido.html index afc783a..dcd9356 100644 --- a/src/views/nota-pedido.html +++ b/src/views/nota-pedido.html @@ -1,4 +1,148 @@ -
+
+
+
+
+
+ + + + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SectorCódigoDescripciónCantidadPrecio UnitarioSubTotal
11Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...{{10000 | number: 2}}{{1000000000 | currency:'$'}}{{1000000000 | currency:'$'}} + +
12Lorem Ipsum1{{1000000000 | currency:'U$D'}}{{10 | currency:'$'}}
12Lorem Ipsum1{{10 | currency:'$'}}{{10 | currency:'$'}}
Cantidad Items: 3{{30 | currency:'$'}}
+
+
+
+ + \ No newline at end of file diff --git a/src/views/nota-pedido_1.html b/src/views/nota-pedido_1.html new file mode 100644 index 0000000..afc783a --- /dev/null +++ b/src/views/nota-pedido_1.html @@ -0,0 +1,245 @@ + + + + +
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
$
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+ + +
+
+ + +
+
+
+
+
+ +
+
+
+
+
+ + +
+
+ + +
+
+
+
+
+ +
+
+
+
+
+
+
$
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ + +
+ No se encontraron resultados. +
+
+ - + + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
CódigoNombrePrecio unitarioCosto unitario brutoCantidadSubtotal
+
+
+
+
\ No newline at end of file -- 1.9.1