From ccf4f7e303db1184f84b5c4c4f8e2f37f59d9ef7 Mon Sep 17 00:00:00 2001 From: joyfas.silva Date: Wed, 11 May 2016 09:56:35 -0300 Subject: [PATCH] {Redmine tarefa-4530} --- cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js | 120 +++++++++++++++--------------------------------------------------------------------------------------------------------- cit-almoxarifado-web/src/main/webapp/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoEditModal.html | 5 +++-- cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/dialog_add_materiais.html | 144 ++++++++---------------------------------------------------------------------------------------------------------------------------------------- cit-almoxarifado-web/src/main/webapp/html/requisicaoConsumo/requisicaoConsumoEdit.html | 6 +++--- 4 files changed, 29 insertions(+), 246 deletions(-) diff --git a/cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js b/cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js index 3e40eb1..8048410 100644 --- a/cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js +++ b/cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js @@ -31,7 +31,7 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp }; $scope.estruturaAlmoxarifadoPadrao = {}; - + // Limpa formulário para novo cadastro $scope.resetForm = function() { $scope.limparEntradaAlmoxarifado(); @@ -43,14 +43,14 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp $timeout(function(){ $scope.entradaAlmoxarifadoForm.$submitted = false; $scope.entradaAlmoxarifadoForm.$setPristine(); - + // limpar observações if($scope.entradaAlmoxarifadoForm.observacoesForm['observacao.descricao']) { $scope.entradaAlmoxarifadoForm.observacoesForm['observacao.descricao'].$setViewValue(''); $scope.entradaAlmoxarifadoForm.observacoesForm['observacao.descricao'].$render(); } }); - + }; // Limpa o formulario preenchido @@ -68,14 +68,14 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp dominioFinalidade : {} }; $scope.valorTotalMateriais = 0.0; - + DominioRepository.findAllDominio('tipoFinalidadeMaterial').then(function(result) { $scope.dominiosTipoFinalidade = []; - if(result && result.length >0) + if(result && result.length >0) result.forEach(function(r){ - + $scope.dominiosTipoFinalidade.push(r.originalElement); - + if(r.originalElement.codigo === 1){ $scope.entradaAlmoxarifado.dominioFinalidade = r.originalElement; } @@ -126,12 +126,12 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp $scope.entradaAlmoxarifado.fornecedor['pessoa.nome'] = $scope.entradaAlmoxarifado.fornecedor.pessoa.nome; $scope.entradaAlmoxarifadoOriginal.fornecedor['pessoa.nome'] = $scope.entradaAlmoxarifadoOriginal.fornecedor.pessoa.nome; } - + $scope.dominiosTipoRecebimento.forEach(function(item){ if(item.originalElement.id === $scope.entradaAlmoxarifado.dominioTipoRecebimento.id) $scope.entradaAlmoxarifado.dominioTipoRecebimento = item.originalElement; }); - + $scope.calcularValorTotalMateriais(); $scope.atualizarListaSizeSelectEntradaItem(); $scope.edit = edit; @@ -186,24 +186,19 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp } }); }); - + DominioRepository.findAllDominio('tipoFinalidadeMaterial').then(function(result) { $scope.dominiosTipoFinalidade = []; - if(result && result.length >0) + if(result && result.length >0) result.forEach(function(r){ $scope.dominiosTipoFinalidade.push(r.originalElement); }); $scope.dominiosTipoFinalidade.reverse(); }); - + $scope.inicializarModalMateriais = function(){ -<<<<<<< HEAD - $scope.unidadeMedidaEntrada = {}; - $scope.editEntrada = true; -======= $scope.editEntrada = false; $scope.newEntrada = true; ->>>>>>> tarefa-3943 $scope.limparModalMateriais(); $scope.$openModal('modal-materiais-consumo.html', 'lg'); }; @@ -221,29 +216,6 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp }); }; -<<<<<<< HEAD - $scope.carregarItensMaterial = function(item){ - - $scope.entradaItem.quantidade = null; - $scope.entradaItem.quantidadeDominioTipoUnidadeEntrada = null; - $scope.entradaItem.valorTotal = null; - $scope.entradaItem.valorUnitario = null; - $scope.entradaItem.unidadeMedidaEntrada = null; - $scope.unidadesMedidasEntrada = []; - $scope.caracteristicas = []; - $scope.validaAnexo = false; - $scope.unidadesFixa = false; - - $scope.unidadesMedidasEntrada = item.tiposUnidadeMedidaEntrada.map(function(item){ - return item.unidadeMedida; - }); - - $scope.carregarCaracteristicasGenericas(item); - - }; - -======= ->>>>>>> tarefa-3943 // carregar as caracteristicas do material $scope.carregarCaracteristicasGenericas = function(item){ $scope.caracteristicas = []; @@ -267,53 +239,7 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp $scope.setLoading(false); } }; -<<<<<<< HEAD - - $scope.limparCamposMaterial = function(){ - - $scope.unidadesMedidasEntrada = []; - $scope.caracteristicas = []; - $scope.validaAnexo = false; - $scope.unidadesFixa = false; - }; - - $scope.definirTipoNumerico = function(){ - $scope.alternaTipoNumericoUnidadeMedida(); - $scope.unidadesFixa = false; - $timeout(function(){ - if($scope.entradaItem.unidadeMedidaEntrada){ - if($scope.entradaItem.unidadeMedidaEntrada.tipoNumerico && $scope.entradaItem.unidadeMedidaEntrada.tipoNumerico.codigo == $scope.TIPO_NUMERICO_INTEIRO ){ - $scope.tipoNumerico = 0; - }else{ - $scope.tipoNumerico = 2; - }; - - if($scope.entradaItem.unidadeMedidaEntrada.sigla){ - if($scope.entradaItem.unidadeMedidaEntrada.quantidadePadrao && $scope.entradaItem.unidadeMedidaEntrada.quantidadePadrao > 0){ - $scope.entradaItem.quantidadeDominioTipoUnidadeEntrada = $scope.entradaItem.unidadeMedidaEntrada.quantidadePadrao; - $scope.unidadesFixa = true; - } - } - } else{ - $scope.entradaItem.quantidadeDominioTipoUnidadeEntrada = null; - } - }); - }; - - $scope.calcularQuantidadeEValores = function(){ - $timeout(function(){ - if($scope.entradaItem.quantidadeDominioTipoUnidadeEntrada && $scope.entradaItem.$quantidadeEntrada){ - $scope.entradaItem.quantidade = $scope.entradaItem.$quantidadeEntrada * $scope.entradaItem.quantidadeDominioTipoUnidadeEntrada; - } - if($scope.entradaItem.valorTotal && $scope.entradaItem.quantidade){ - $scope.entradaItem.valorUnitario = $scope.entradaItem.valorTotal / $scope.entradaItem.quantidade; - } - }); - }; - -======= ->>>>>>> tarefa-3943 $scope.addEntradaItem = function(formDialogMateriais) { formDialogMateriais.$submitted = true; @@ -401,13 +327,6 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp if ($scope.entradaAlmoxarifado.entradasItem[i].$checked) { entradaItemChecked.push(angular.copy($scope.entradaAlmoxarifado.entradasItem[i])); } -<<<<<<< HEAD - }); - - if($scope.entradaItem.dataValidade && !$scope.entradaItem.id){ - $scope.entradaItem.dataValidade = $filter('date')($scope.entradaItem.dataValidade, "dd/MM/yyyy"); -======= ->>>>>>> tarefa-3943 } } @@ -642,7 +561,7 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp return formularioValido; }; - + // LISTA ESTRUTURAS ORGANIZACIONAIS QUE SAO UNIDADES REQUISITANTES $scope.findEstruturaOrganizacionalUR = function(value){ @@ -654,7 +573,7 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp }); }; - + //#### INICIO METODOS RELACIONADOS AO RELATORIO ### //FUNCAO QUE BUSCA MATERIAL DE CONSUMO PARA FILTRO DE RELATORIO DE ENTRADAS POR PERIODO @@ -1041,7 +960,7 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp } return $scope.stepValid; }; - + $scope.alternaTipoNumericoUnidadeMedida = function(){ $scope.entradaItem.$quantidadeEntrada = ''; $timeout(function(){ @@ -1064,13 +983,4 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp } }); }; - - $scope.aplicarValidacaoDecimal = function(){ - if($scope.entradaItem.$quantidadeEntrada){ - $scope.entradaItem.$quantidadeEntrada = parseFloat($scope.entradaItem.$quantidadeEntrada).toFixed(2); - }else{ - $scope.entradaItem.$quantidadeEntrada = ''; - } - }; - }]); diff --git a/cit-almoxarifado-web/src/main/webapp/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoEditModal.html b/cit-almoxarifado-web/src/main/webapp/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoEditModal.html index 2658580..5f4886f 100644 --- a/cit-almoxarifado-web/src/main/webapp/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoEditModal.html +++ b/cit-almoxarifado-web/src/main/webapp/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoEditModal.html @@ -79,8 +79,9 @@ - atendimentoRequisicaoConsumoItem.$quantidade}} + ng-model="atendimentoRequisicaoConsumoItem.quantidade" form="formDialogAtendimento" ng-disabled="!edit" ng-custom-maxlength="{{atendimentoRequisicaoConsumoItem.material.unidadeArmazenamento.tipoNumerico.codigo === 1 ? 4 : 11}}" + ng-precisao="{{atendimentoRequisicaoConsumoItem.material.unidadeArmazenamento.tipoNumerico.codigo === 1 ? 0 : 'decimal'}}" /> + diff --git a/cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/dialog_add_materiais.html b/cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/dialog_add_materiais.html index 993c2bf..d21c635 100644 --- a/cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/dialog_add_materiais.html +++ b/cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/dialog_add_materiais.html @@ -32,7 +32,7 @@
@@ -41,31 +41,20 @@ ng-custom-options="materialLocal as materialLocal.endereco.descricao for materialLocal" track-by="track by materialLocal.id" ng-list="enderecosMaterial"/>
- +
-<<<<<<< HEAD
- +
- -======= -
- ->>>>>>> tarefa-3943 +
- +
-<<<<<<< HEAD - -======= ->>>>>>> tarefa-3943
@@ -78,7 +67,7 @@ ng-model="entradaItem.dataValidade" form="formDialogMateriais" />
- +
-<<<<<<< HEAD - -
- - LABEL.CARACTERISTICAS - - -
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- - - -
-
-
- -
-
- -
-
-
- - - - - - - - - - - - - - - -
LABEL.NOMELABEL.TAMANHOLABEL.ACOES
{{ item.file.name }}{{ item.file.size/1024/1024|number:2 }} MB - -
-
-
-
-
-
- -
-
- -======= ->>>>>>> tarefa-3943
diff --git a/cit-almoxarifado-web/src/main/webapp/html/requisicaoConsumo/requisicaoConsumoEdit.html b/cit-almoxarifado-web/src/main/webapp/html/requisicaoConsumo/requisicaoConsumoEdit.html index c4b3b84..e782353 100644 --- a/cit-almoxarifado-web/src/main/webapp/html/requisicaoConsumo/requisicaoConsumoEdit.html +++ b/cit-almoxarifado-web/src/main/webapp/html/requisicaoConsumo/requisicaoConsumoEdit.html @@ -197,9 +197,9 @@
- +
-- libgit2 0.21.2