Commit 542d5d368478ae4eaaa0e7d640b0d398acf540d9
1 parent
3206897c
Exists in
master
Redmine #4783 Iniciando criação do wizard de entrada de materiais
Showing
7 changed files
with
309 additions
and
214 deletions
Show diff stats
cit-almoxarifado-web/src/main/java/br/com/centralit/listener/StartupListenerAlmoxarifado.java
@@ -301,6 +301,9 @@ public class StartupListenerAlmoxarifado extends UtilStartup implements Applicat | @@ -301,6 +301,9 @@ public class StartupListenerAlmoxarifado extends UtilStartup implements Applicat | ||
301 | internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.LABEL.MATERAIS_VINCULADOS", "Existe materiais vinculados", dominio, modulo)); | 301 | internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.LABEL.MATERAIS_VINCULADOS", "Existe materiais vinculados", dominio, modulo)); |
302 | internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.LABEL.ENDERECO_ESTOQUE_VINCULADO_SUPERIOR", "Endereço de Estoque vinculado ao endereço superior", dominio, modulo)); | 302 | internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.LABEL.ENDERECO_ESTOQUE_VINCULADO_SUPERIOR", "Endereço de Estoque vinculado ao endereço superior", dominio, modulo)); |
303 | 303 | ||
304 | + //Entrada de materiais | ||
305 | + internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.LABEL.DADOS_ENTRADA", "Dados da entrada", dominio, modulo)); | ||
306 | + internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.LABEL.DOCUMENTOS", "Documentos", dominio, modulo)); | ||
304 | } | 307 | } |
305 | 308 | ||
306 | private void gerarValidacao(Dominio dominio, Modulo modulo, List<Internacionalizacao> internacionalizacaoList) { | 309 | private void gerarValidacao(Dominio dominio, Modulo modulo, List<Internacionalizacao> internacionalizacaoList) { |
cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js
@@ -11,6 +11,7 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp | @@ -11,6 +11,7 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp | ||
11 | var CODIGO_DOMINIO_TIPO_RECEBIMENTO_COMPRA_ORCAMENTARIA = 1; | 11 | var CODIGO_DOMINIO_TIPO_RECEBIMENTO_COMPRA_ORCAMENTARIA = 1; |
12 | 12 | ||
13 | $scope.entradaAlmoxarifado = {}; | 13 | $scope.entradaAlmoxarifado = {}; |
14 | + $scope.edit = true; | ||
14 | 15 | ||
15 | /** | 16 | /** |
16 | * Inicializa as datas do formulario de cadastro como data padrao hoje. | 17 | * Inicializa as datas do formulario de cadastro como data padrao hoje. |
@@ -685,5 +686,162 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp | @@ -685,5 +686,162 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp | ||
685 | } | 686 | } |
686 | }; | 687 | }; |
687 | //### FIM METODOS RELACIONADOS AOS RELATORIOS DE INVENTARIO ### | 688 | //### FIM METODOS RELACIONADOS AOS RELATORIOS DE INVENTARIO ### |
689 | + | ||
690 | + | ||
691 | + | ||
692 | + | ||
693 | + | ||
694 | + | ||
695 | + | ||
696 | + | ||
697 | + // ########################################### | ||
698 | + // ########################################### DAQUI PARA BAIXO SAO TODOS OS METODOS RELACIONADOS AO WIZARD | ||
699 | + // ########################################### | ||
700 | + | ||
701 | + $scope.templates = [{ name: 'entradaAlmoxarifadoPg1.html', url: '/cit-almoxarifado-web/html/entradaAlmoxarifado/entradaAlmoxarifadoPg1.html', show: true}, | ||
702 | + { name: 'entradaAlmoxarifadoPg2.html', url: '/cit-almoxarifado-web/html/entradaAlmoxarifado/entradaAlmoxarifadoPg2.html', show: false}, | ||
703 | + { name: 'entradaAlmoxarifadoPg3.html', url: '/cit-almoxarifado-web/html/entradaAlmoxarifado/entradaAlmoxarifadoPg3.html', show: false}, | ||
704 | + { name: 'entradaAlmoxarifadoPg4.html', url: '/cit-almoxarifado-web/html/entradaAlmoxarifado/entradaAlmoxarifadoPg4.html', show: false} ]; | ||
705 | + | ||
706 | + $scope.steps = ['one', 'two', 'three', 'four']; | ||
707 | + $scope.step = 0; | ||
708 | + | ||
709 | +// Verifica se o passo é o primeiro passo do wizard | ||
710 | + $scope.isFirstStep = function() { | ||
711 | + return $scope.step === 0; | ||
712 | + }; | ||
713 | + | ||
714 | + // Verifica se o passo é o ultimo passo do wizard | ||
715 | + $scope.isLastStep = function() { | ||
716 | + return $scope.step === ($scope.steps.length - 1); | ||
717 | + }; | ||
718 | + | ||
719 | + // Verifica se o passo é o passo atual do wizard | ||
720 | + $scope.isCurrentStep = function(step) { | ||
721 | + return $scope.step === step; | ||
722 | + }; | ||
723 | + | ||
724 | + // Utilizado pelo wizard para mudar para o passo desejado | ||
725 | + $scope.setCurrentStep = function(step) { | ||
726 | + | ||
727 | + $scope.setLoadingGet(true); | ||
728 | + | ||
729 | + if (step <= ($scope.step - 1)) { | ||
730 | + $scope.templates[$scope.step].show = false; | ||
731 | + $scope.step = step; | ||
732 | + $scope.templates[step].show = true; | ||
733 | + } else { | ||
734 | + if (!$scope.edit) { | ||
735 | + $scope.permitidoAvancar = true; | ||
736 | + } else { | ||
737 | + permiteAvancoFluxo(); | ||
738 | + } | ||
739 | + | ||
740 | + if ($scope.permitidoAvancar) { | ||
741 | + $scope.templates[$scope.step].show = false; | ||
742 | + $scope.step = step; | ||
743 | + $scope.templates[step].show = true; | ||
744 | + } | ||
745 | + } | ||
746 | + | ||
747 | + $scope.setLoading(false); | ||
748 | + }; | ||
749 | + | ||
750 | + // Controla se o usuario pode avancar o fluxo no wizard, validando os itens obrigatórios | ||
751 | + function permiteAvancoFluxo() { | ||
752 | + | ||
753 | + $scope.permitidoAvancar = true; | ||
754 | + | ||
755 | + if ($scope.step === 0) { | ||
756 | + if (!validStepDadosEntrada() && $scope.permitidoAvancar) { | ||
757 | + $scope.entradaAlmoxarifadoForm.dadosEntradaForm.$submitted = true; | ||
758 | + } | ||
759 | + } else if ($scope.step === 1) { | ||
760 | + if (!validStepMateriais() && $scope.permitidoAvancar) { | ||
761 | + $scope.entradaAlmoxarifadoForm.materiaisForm.$submitted = true; | ||
762 | + } | ||
763 | + } else if ($scope.step === 2) { | ||
764 | + if (!validStepDocumentos() && $scope.permitidoAvancar) { | ||
765 | + $scope.entradaAlmoxarifadoForm.documentosForm.$submitted = true; | ||
766 | + } | ||
767 | + } else if ($scope.step === 3) { | ||
768 | + $scope.entradaAlmoxarifadoForm.observacoesForm.$submitted = true; | ||
769 | + } | ||
770 | + | ||
771 | + if (!$scope.permitidoAvancar && !$scope.stepValid) { | ||
772 | + //Mensagem de erro de campos obrigatorios nao preenchidos | ||
773 | + $scope.showAlert('error', $translate.instant('VALIDACAO.ALERTA_OBRIGATORIOS'), " ", false); | ||
774 | + } | ||
775 | + }; | ||
776 | + | ||
777 | +// Recupera o passo atual do wizard | ||
778 | + $scope.getCurrentStep = function() { | ||
779 | + return $scope.steps[$scope.step]; | ||
780 | + }; | ||
781 | + | ||
782 | + // Faz com o que o wizard retroceda um passo | ||
783 | + $scope.handlePrevious = function() { | ||
784 | + | ||
785 | + $scope.setLoadingGet(true); | ||
786 | + | ||
787 | + $scope.templates[$scope.step].show = false; | ||
788 | + $scope.step -= ($scope.isFirstStep()) ? 0 : 1; | ||
789 | + $scope.templates[$scope.step].show = true; | ||
790 | + | ||
791 | + $scope.setLoading(false); | ||
792 | + | ||
793 | + }; | ||
794 | + | ||
795 | + // Faz com o que o wizard avance um passo | ||
796 | + $scope.handleNext = function () { | ||
797 | + $scope.setLoadingGet(true); | ||
798 | + | ||
799 | + if(!$scope.edit){ | ||
800 | + $scope.permitidoAvancar = true; | ||
801 | + } else { | ||
802 | + permiteAvancoFluxo(); | ||
803 | + } | ||
804 | + | ||
805 | + if ($scope.permitidoAvancar){ | ||
806 | + $scope.templates[$scope.step].show = false; | ||
807 | + $scope.step += 1; | ||
808 | + $scope.templates[$scope.step].show = true; | ||
809 | + } | ||
810 | + | ||
811 | + $scope.setLoading(false); | ||
812 | + }; | ||
813 | + | ||
814 | + // Funcao especifica que retorna se o formulario de dados da entrada esta valido | ||
815 | + function validStepDadosEntrada() { | ||
816 | + $scope.stepValid = true; | ||
817 | + | ||
818 | + if ($scope.entradaAlmoxarifadoForm.dadosEntradaForm.$invalid) { | ||
819 | + $scope.stepValid = false; | ||
820 | + } | ||
821 | + | ||
822 | + return $scope.stepValid; | ||
823 | + }; | ||
824 | + | ||
825 | + // Funcao especifica que retorna se o formulario de materiais esta valido | ||
826 | + function validStepMateriais() { | ||
827 | + $scope.stepValid = true; | ||
828 | + | ||
829 | + if ($scope.entradaAlmoxarifadoForm.materiaisForm.$invalid) { | ||
830 | + $scope.stepValid = false; | ||
831 | + } | ||
832 | + | ||
833 | + return $scope.stepValid; | ||
834 | + }; | ||
835 | + | ||
836 | + //Funcao especifica que retorna se o formulario de documentos esta valido | ||
837 | + function validStepDocumentos() { | ||
838 | + $scope.stepValid = true; | ||
839 | + | ||
840 | + if ($scope.entradaAlmoxarifadoForm.documentosForm.$invalid) { | ||
841 | + $scope.stepValid = false; | ||
842 | + } | ||
843 | + | ||
844 | + return $scope.stepValid; | ||
845 | + }; | ||
688 | 846 | ||
689 | }]); | 847 | }]); |
cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/entradaAlmoxarifadoEdit.html
1 | -<div id="editEntradaAlmoxarifado" class="page-content clearfix" ng-controller="EntradaAlmoxarifadoController"> | ||
2 | - <div class="bar-buttons-action fixed"> | ||
3 | - <div class="row"> | ||
4 | - <div class="col-sm-8 text-left"> | ||
5 | - | ||
6 | - <button class="btn btn-clear" ng-click="saveOrUpdate()" ng-show="edit"> | ||
7 | - <i class="fa fa-save green"></i> <translate>LABEL.SALVAR</translate> | ||
8 | - </button> | ||
9 | - | ||
10 | - <button class="btn btn-clear" ng-click="resetForm();" ng-show="entradaAlmoxarifado.id === undefined"> | ||
11 | - <i class="fa fa-eraser yellow-dark"></i> <translate>LABEL.LIMPAR</translate> | ||
12 | - </button> | ||
13 | - | ||
14 | - <button class="btn btn-clear" ng-click="remove(entradaAlmoxarifado);" ng-show="entradaAlmoxarifado.id !== undefined"> | ||
15 | - <i class="fa fa-times red"></i> <translate>LABEL.REMOVER</translate> | ||
16 | - </button> | ||
17 | - | ||
18 | - <button class="btn btn-clear" ng-click="$showPageSearchWorkspace(workspace); atualizaPaginaPesquisa();"> | ||
19 | - <i class="fa fa-search"></i> <translate>LABEL.PESQUISAR</translate> | ||
20 | - </button> | ||
21 | - | ||
22 | - </div><!-- .col --> | ||
23 | - | ||
24 | - <div class="col-sm-4 text-right"> | ||
25 | - | ||
26 | - <favorito/> | ||
27 | - | ||
28 | - <help-button workspace="workspace" /> | ||
29 | - | ||
30 | - </div><!-- .col --> | ||
31 | - </div><!-- .row --> | ||
32 | - </div><!-- .bar-buttons-action --> | ||
33 | - | ||
34 | - <breadcrumb ng-workspace="workspace"></breadcrumb> | ||
35 | - | ||
36 | - <p> | ||
37 | - <small>( <span class="red">*</span> ) <translate>LABEL.CAMPOS_OBRIGATORIOS</translate></small> | ||
38 | - </p> | ||
39 | - | ||
40 | - <fieldset> | 1 | +<div class="page-content clearfix" id="entradaAlmoxarifadoControllerId" ng-controller="EntradaAlmoxarifadoController"> |
2 | + <div class="bar-buttons-action fixed" > | ||
3 | + <div class="row"> | ||
4 | + <div class="col-sm-9 text-left"> | ||
5 | + <button title="{{$translate.instant('LABEL.SALVAR')}}" alt="{{$translate.instant('LABEL.SALVAR')}}" class="btn btn-clear" ng-click="saveOrUpdate()" ng-if="edit" type="button"> | ||
6 | + <i class="fa fa-save green"></i> <translate>LABEL.SALVAR</translate> | ||
7 | + </button> | ||
8 | + <button title="{{$translate.instant('LABEL.LIMPAR')}}" alt="{{$translate.instant('LABEL.LIMPAR')}}" class="btn btn-clear" type="button" ng-show="entradaAlmoxarifado.id === undefined" ng-click="resetForm();" > | ||
9 | + <i class="fa fa-eraser yellow-dark"></i> <translate>LABEL.LIMPAR</translate> | ||
10 | + </button> | ||
11 | + <button | ||
12 | + title="{{$translate.instant('LABEL.GERAR_RELATORIO')}}" | ||
13 | + alt="{{$translate.instant('LABEL.GERAR_RELATORIO')}}" | ||
14 | + class="btn btn-clear" type="button" ng-disabled="false" | ||
15 | + ng-click="gerarRelatorioEntradaAlmoxarifado();" ng-if="entradaAlmoxarifado.id"> | ||
16 | + <i class="fa fa-print"></i> | ||
17 | + <translate>LABEL.GERAR_RELATORIO</translate> | ||
18 | + </button> | ||
19 | + <button title="{{$translate.instant('LABEL.PESQUISAR')}}" alt="{{$translate.instant('LABEL.PESQUISAR')}}" class="btn btn-clear" type="button" ng-click="$showPageSearchWorkspace(workspace); atualizarLista('EntradaAlmoxarifadoListControllerId');"> | ||
20 | + <i class="fa fa-search"></i> <translate>LABEL.PESQUISAR</translate> | ||
21 | + </button> | ||
22 | + </div> | ||
23 | + <!-- .col --> | ||
41 | 24 | ||
42 | - <legend><translate>ALMOXARIFADO.LABEL.DADOS_ENTRADA_ALMOXARIFADO</translate></legend> | ||
43 | - | ||
44 | - <form name="entradaAlmoxarifadoForm"> | ||
45 | - | ||
46 | - <div class="row"> | ||
47 | - | ||
48 | - <div class="col-md-3"> | ||
49 | - | ||
50 | - <label-input-number ng-id="entradaAlmoxarifado.notaRecebimento" ng-label="ALMOXARIFADO.LABEL.NOTA_RECEBIMENTO" ng-model="entradaAlmoxarifado.notaRecebimento" ng-obrigatorio="false" ng-disabled="true" /> | ||
51 | - | ||
52 | - </div> | ||
53 | - | ||
54 | - <div class="col-md-9"> | ||
55 | - | ||
56 | - <auto-complete ng-id="entradaAlmoxarifado.almoxarifado" ng-label="ALMOXARIFADO.LABEL.ALMOXARIFADO" ng-model="entradaAlmoxarifado.almoxarifado" form="entradaAlmoxarifadoForm" ng-obrigatorio="{{edit}}" ng-disabled="!edit" ng-find="findAutoCompleteAlmoxarifado(value)" ng-item="item.nome + ' - ' + item.classificacao" /> | ||
57 | - | ||
58 | - </div> | 25 | + <div class="col-sm-3 text-right"> |
59 | 26 | ||
60 | - </div> | ||
61 | - | ||
62 | - <div class="row"> | ||
63 | - | ||
64 | - <div class="col-sm-4"> | ||
65 | - | ||
66 | - <label-input-data ng-id="entradaAlmoxarifado.dataReferencia" ng-label="LABEL.DATA_REGISTRO" ng-obrigatorio="false" ng-disabled="true" ng-model="entradaAlmoxarifado.dataReferencia" form="entradaAlmoxarifadoForm" /> | ||
67 | - | ||
68 | - </div> | ||
69 | - | ||
70 | - <div class="col-md-4"> | ||
71 | - | ||
72 | - <label-input-data ng-id="entradaAlmoxarifado.dataRecebimento" ng-label="ALMOXARIFADO.LABEL.DATA_RECEBIMENTO" ng-model="entradaAlmoxarifado.dataRecebimento" form="entradaAlmoxarifadoForm" ng-obrigatorio="edit" ng-disabled="!edit" ng-mode="day" ng-format="dd/MM/yyyy" /> | ||
73 | - | ||
74 | - </div> | ||
75 | - | ||
76 | - <div class="col-md-4"> | ||
77 | - | ||
78 | - <label-input-data ng-id="entradaAlmoxarifado.dataContabilizacao" ng-label="LABEL.DATA_CONTABILIZACAO" ng-model="entradaAlmoxarifado.dataContabil" form="entradaAlmoxarifadoForm" ng-obrigatorio="edit" ng-disabled="!edit" ng-mode="day" ng-format="dd/MM/yyyy" /> | ||
79 | - | ||
80 | - </div> | ||
81 | - | ||
82 | - </div> | ||
83 | - | ||
84 | - <div class="row"> | ||
85 | - | ||
86 | - <div class="col-md-4"> | ||
87 | - <label-select ng-id="entradaAlmoxarifado.dominioTipoEntrada" ng-label="LABEL.TIPO_ENTRADA" ng-model="entradaAlmoxarifado.dominioTipoEntrada" form="entradaAlmoxarifadoForm" ng-obrigatorio="edit" | ||
88 | - ng-disabled="!edit" ng-custom-options="dominio.originalElement as dominio.descricao for dominio" track-by="track by dominio.id" ng-list="dominioTipoEntradaList" /> | ||
89 | - | ||
90 | - </div> | 27 | + <favorito/> |
91 | 28 | ||
92 | - <div class="col-md-4" ng-if="entradaAlmoxarifado.dominioTipoEntrada.codigo === 1 && edit"> | ||
93 | - <label-select ng-id="entradaAlmoxarifado.dominioTipoRecebimentoOrcamentaria" ng-label="LABEL.TIPO_RECEBIMENTO" ng-model="entradaAlmoxarifado.dominioTipoRecebimento" form="entradaAlmoxarifadoForm" ng-obrigatorio="edit" | ||
94 | - ng-disabled="!edit" ng-custom-options="dominio.originalElement as dominio.descricao for dominio" ng-list="dominiosTipoRecebimentoOrcamentaria" track-by="track by dominio.id" /> | ||
95 | - | ||
96 | - </div> | ||
97 | - | ||
98 | - <div class="col-sm-4" ng-if="entradaAlmoxarifado.dominioTipoEntrada.codigo === 2 && edit"> | ||
99 | - <label-select ng-id="entradaAlmoxarifado.dominioTipoRecebimentoExtra" ng-label="LABEL.TIPO_RECEBIMENTO" ng-model="entradaAlmoxarifado.dominioTipoRecebimento" form="entradaAlmoxarifadoForm" ng-obrigatorio="edit" | ||
100 | - ng-disabled="!edit" ng-custom-options="dominio.originalElement as dominio.descricao for dominio" ng-list="dominiosTipoRecebimentoExtraOrcamentaria" track-by="track by dominio.id" /> | ||
101 | - </div> | 29 | + <help-button workspace="workspace" /> |
102 | 30 | ||
103 | - <div class="col-sm-4" ng-if="!edit"> | ||
104 | - <label-select ng-id="entradaAlmoxarifado.dominioTipoRecebimento" ng-label="LABEL.TIPO_RECEBIMENTO" ng-model="entradaAlmoxarifado.dominioTipoRecebimento" form="entradaAlmoxarifadoForm" ng-obrigatorio="edit" | ||
105 | - ng-disabled="true" ng-custom-options="dominio.originalElement as dominio.descricao for dominio" ng-list="dominiosTipoRecebimento" track-by="track by dominio.id" /> | ||
106 | - </div> | ||
107 | - | ||
108 | - <div class="col-md-4"> | ||
109 | - <auto-complete ng-id="entradaAlmoxarifado.fornecedor" ng-label="LABEL.FORNECEDOR" ng-model="entradaAlmoxarifado.fornecedor" form="entradaAlmoxarifadoForm" ng-obrigatorio="{{edit}}" ng-disabled="!edit" ng-find="findAutoCompleteFornecedor(value)" ng-item="item['pessoa.nome']" /> | ||
110 | - </div> | ||
111 | - | ||
112 | - </div> | ||
113 | - | ||
114 | - <fieldset> | ||
115 | - <legend> | ||
116 | - <label ng-class="{'has-error' : entradaAlmoxarifadoForm.$submitted && entradaAlmoxarifado.entradasIten && entradaAlmoxarifado.entradasIten.length < 1}"> | ||
117 | - <translate>ALMOXARIFADO.LABEL.MATERIAIS</translate> | ||
118 | - <span class='red' ng-if=" edit">*</span> | ||
119 | - <i ng-show="entradaAlmoxarifadoForm.$submitted && entradaAlmoxarifado.entradasIten && entradaAlmoxarifado.entradasIten.length < 1" class='fa fa-warning red' tooltip="{{$translate.instant('ALMOXARIFADO.LABEL.MATERIAIS') + ' ' +$translate.instant('LABEL.CAMPO_OBRIGATORIO')}}" tooltip-placement='top'></i> | ||
120 | - </label> | ||
121 | - </legend> | ||
122 | - | ||
123 | - <script type="text/ng-template" id="modal-materiais-consumo.html"> | ||
124 | - <div ng-include src="'/cit-almoxarifado-web/html/entradaAlmoxarifado/dialog_add_materiais.html'" /> | ||
125 | - </script> | ||
126 | - | ||
127 | - <div class="row"> | ||
128 | - <div class="col-md-3"> | ||
129 | - <label-input-radio ng-id="entradaAlmoxarifado.dominioFinalidade.codigo" ng-model="entradaAlmoxarifado.dominioFinalidade.codigo" ng-label="LABEL.FINALIDADE" | ||
130 | - ng-obrigatorio="edit" text="descricao" value="codigo" form="entradaAlmoxarifadoForm" ng-disabled="!edit" list="dominiosTipoFinalidade"/> | ||
131 | - </div> | ||
132 | - <div class="col-md-7" ng-if="entradaAlmoxarifado.dominioFinalidade.codigo == 2"> | ||
133 | - <auto-complete ng-id="entradaAlmoxarifado.unidadeRequisitante" ng-label="ALMOXARIFADO.LABEL.UNIDADE_REQUISITANTE" ng-obrigatorio="{{edit}}" | ||
134 | - ng-model="entradaAlmoxarifado.unidadeRequisitante" form="entradaAlmoxarifadoForm" ng-disabled="!edit" | ||
135 | - ng-find="findEstruturaOrganizacionalUR(value)" ng-item="item.nome + ' - ' + item.classificacao" /> | ||
136 | - </div> | ||
137 | </div> | 31 | </div> |
138 | - | ||
139 | - <div class="row"> | ||
140 | - | ||
141 | - <div class="col-md-3"> | ||
142 | - | ||
143 | - <label-input-money ng-id="entradaAlmoxarifado.valorTotalNota" ng-label="ALMOXARIFADO.LABEL.VALOR_TOTAL_NOTA" ng-model="entradaAlmoxarifado.valorTotalNota" | ||
144 | - form="entradaAlmoxarifadoForm" ng-obrigatorio="edit" ng-precision="2" ng-disabled="!edit" ng-custom-maxlength="19" /> | ||
145 | - | ||
146 | - </div> | ||
147 | - | ||
148 | - <div class="col-md-3"> | ||
149 | - | ||
150 | - <label-input-money ng-id="valorTotalMateriais" ng-label="LABEL.VALOR_TOTAL_INCLUIDO" ng-model="valorTotalMateriais" form="entradaAlmoxarifadoForm" ng-precision="2" ng-disabled="true" ng-custom-maxlength="19"/> | ||
151 | - | ||
152 | - </div> | ||
153 | - | ||
154 | - </div> | ||
155 | - | ||
156 | - </form> | ||
157 | - | ||
158 | - <div class="row margin-top"> | ||
159 | - <div class="col-sm-12"> | ||
160 | - <div class="panel panel-default"> | ||
161 | - <div class="panel-heading clearfix"> | ||
162 | - <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" ng-show="edit" class="btn btn-clear" type="button" ng-click="inicializarModalMateriais();"> | ||
163 | - <i class="fa fa-plus-circle yellow-dark"></i> | ||
164 | - <translate>LABEL.ADICIONAR</translate> | ||
165 | - </button> | ||
166 | - <button title="{{$translate.instant('LABEL.VISUALIZAR')}}" alt="{{$translate.instant('LABEL.VISUALIZAR')}}" class="btn btn-clear" type="button" ng-click="abrirEntradaItem(false)" > | ||
167 | - <i class="fa fa-search blue"></i> | ||
168 | - <translate>LABEL.VISUALIZAR</translate> | ||
169 | - </button> | ||
170 | - | ||
171 | - <button title="{{$translate.instant('LABEL.EDITAR')}}" alt="{{$translate.instant('LABEL.EDITAR')}}" ng-show="edit" class="btn btn-clear" type="button" ng-click="abrirEntradaItem(true)" > | ||
172 | - <i class="fa fa-pencil blue"></i> | ||
173 | - <translate>LABEL.EDITAR</translate> | ||
174 | - </button> | 32 | + <!-- .col --> |
33 | + </div> | ||
34 | + <!-- .row --> | ||
35 | + </div> | ||
36 | + | ||
37 | + <breadcrumb ng-workspace="workspace"></breadcrumb> | ||
175 | 38 | ||
176 | - <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" ng-show="edit" class="btn btn-clear" type="button" ng-click="removerEntradaItem()"> | ||
177 | - <i class="fa fa-times red"></i> | ||
178 | - <translate>LABEL.REMOVER</translate> | ||
179 | - </button> | 39 | + <p> |
40 | + <small>( <span class="red">*</span> ) <translate>LABEL.CAMPOS_OBRIGATORIOS</translate> | ||
41 | + </small> | ||
42 | + </p> | ||
180 | 43 | ||
181 | - </div><!-- .panel-heading --> | ||
182 | - <table class="table table-bordered table-striped"> | ||
183 | - <thead> | ||
184 | - <tr> | ||
185 | - <th width="20px" class="text-center"></th> | ||
186 | - <th width="10%" class="text-center"><translate>LABEL.ITEM</translate></th> | ||
187 | - <th style="width: 25%;" class="text-center"><translate>LABEL.DESCRICAO_MATERIAL</translate></th> | ||
188 | - <th style="width: 15%;" class="text-center"><translate>LABEL.UNIDADE_MEDIDA</translate></th> | ||
189 | - <th style="width: 15%;" class="text-center"><translate>ALMOXARIFADO.LABEL.UNIDADES</translate></th> | ||
190 | - <th style="width: 15%;" class="text-center"><translate>LABEL.VALOR_UNITARIO</translate></th> | ||
191 | - <th style="width: 15%;" class="text-center"><translate>ALMOXARIFADO.LABEL.SUBTOTAL</translate></th> | ||
192 | - </tr> | ||
193 | - </thead> | ||
194 | - <tbody> | ||
195 | - <tr ng-hide="entradaAlmoxarifado.entradasIten.length != 0"> | ||
196 | - <td colspan="7" class="text-center"><translate>LABEL.TABELA_VAZIA</translate></td> | ||
197 | - </tr> | ||
198 | - <tr ng-repeat="entradaItemLista in entradaAlmoxarifado.entradasIten"> | ||
199 | - <td class="text-center"><input type="radio" name="entradaItemChecked" ng-value="entradaItemLista" ng-model="$parent.entradaItemSelecionado"/></td> | ||
200 | - <td class="text-center">{{$index +1}}</td> | ||
201 | - <td class="text-center">{{ entradaItemLista.material.descricao }}</td> | ||
202 | - <td class="text-center">{{ entradaItemLista.material.unidadeArmazenamento.descricao }}</td> | ||
203 | - <td class="text-center">{{ entradaItemLista.quantidade }}</td> | ||
204 | - <td class="text-center">{{ entradaItemLista.valorUnitario | currency:"R$":2}}</td> | ||
205 | - <td class="text-center">{{ entradaItemLista.valorTotal | currency}}</td> | ||
206 | - </tr> | ||
207 | - </tbody> | ||
208 | - </table> | ||
209 | - </div> | 44 | + <div class="page-content"> |
45 | + <fieldset> | ||
46 | + <form name="entradaAlmoxarifadoForm" novalidate autocomplete="off"> | ||
47 | + <div class="widget-box"> | ||
48 | + | ||
49 | + <div class="widget-body"> | ||
50 | + | ||
51 | + <div class="widget-main"> | ||
52 | + | ||
53 | + <div> | ||
54 | + <ul class="wizard-steps"> | ||
55 | + <li ng-class="{'active': isCurrentStep(0), 'complete' : !entradaAlmoxarifadoForm.dadosEntradaForm.$invalid, 'invalid' : (entradaAlmoxarifadoForm.dadosEntradaForm.$submitted && entradaAlmoxarifadoForm.dadosEntradaForm.$invalid)}" | ||
56 | + ng-click="setCurrentStep(0)" title="{{$translate.instant('ALMOXARIFADO.LABEL.DADOS_ENTRADA')}}" alt="{{$translate.instant('ALMOXARIFADO.LABEL.DADOS_ENTRADA')}}"> | ||
57 | + <span class="step">1</span> | ||
58 | + <a href="#void" class="title" style="text-decoration: none;"><translate>ALMOXARIFADO.LABEL.DADOS_ENTRADA</translate></a> | ||
59 | + </li> | ||
60 | + | ||
61 | + <li ng-class="{'active': isCurrentStep(1), 'complete' : ((isCurrentStep(1) || isCurrentStep(2) || isCurrentStep(3)) && !entradaAlmoxarifadoForm.materiaisForm.$invalid), 'invalid' : ((entradaAlmoxarifadoForm.materiaisForm.$submitted || step > 1) && entradaAlmoxarifadoForm.materiaisForm.$invalid) && (isCurrentStep(1) || isCurrentStep(2) || isCurrentStep(3))}" | ||
62 | + ng-click="setCurrentStep(1)" title="{{$translate.instant('LABEL.MATERIAIS')}}" alt="{{$translate.instant('LABEL.MATERIAIS')}}"> | ||
63 | + <span class="step">2</span> | ||
64 | + <a href="#void" class="title" style="text-decoration: none;"><translate>LABEL.MATERIAIS</translate></a> | ||
65 | + </li> | ||
66 | + | ||
67 | + <li ng-class="{'active': isCurrentStep(2), 'complete' : ((isCurrentStep(2) || isCurrentStep(3)) && !entradaAlmoxarifadoForm.documentosForm.$invalid), 'invalid' : ((entradaAlmoxarifadoForm.documentosForm.$submitted || step > 1) && entradaAlmoxarifadoForm.documentosForm.$invalid) && (isCurrentStep(2) || isCurrentStep(3))}" | ||
68 | + ng-click="setCurrentStep(2)" title="{{$translate.instant('ALMOXARIFADO.LABEL.DOCUMENTOS')}}" alt="{{$translate.instant('ALMOXARIFADO.LABEL.DOCUMENTOS')}}"> | ||
69 | + <span class="step">3</span> | ||
70 | + <a href="#void" class="title" style="text-decoration: none;"><translate>ALMOXARIFADO.LABEL.DOCUMENTOS</translate></a> | ||
71 | + </li> | ||
72 | + | ||
73 | + <li ng-class="{'active': isCurrentStep(3), 'complete' : isCurrentStep(3)}" title="{{$translate.instant('LABEL.OBSERVACOES')}}" alt="{{$translate.instant('LABEL.OBSERVACOES')}}" | ||
74 | + ng-click="setCurrentStep(3)"> | ||
75 | + <span class="step">4</span> | ||
76 | + <a href="#void" class="title" style="text-decoration: none;"><translate>LABEL.OBSERVACOES</translate></a> | ||
77 | + </li> | ||
78 | + </ul> | ||
79 | + | ||
80 | + </div> | ||
81 | + | ||
82 | + <hr> | ||
83 | + <div ng-repeat="template in templates"> | ||
84 | + <div class="slide-frame" ng-include="template.url" ng-show="template.show"></div> | ||
85 | + </div> | ||
86 | + <hr> | ||
87 | + <div> | ||
88 | + <button class="btn btn-prev" ng-click="handlePrevious()" ng-hide="isFirstStep()" type="button"> | ||
89 | + <i class="ace-icon fa fa-arrow-left"></i> | ||
90 | + <translate>LABEL.ANTERIOR</translate> | ||
91 | + </button> | ||
92 | + | ||
93 | + <!-- <button class="btn btn-success btn-next" ng-click="handleNext()" ng-hide="isLastStep()" type="button"> | ||
94 | + <translate>LABEL.PROXIMO</translate> | ||
95 | + <i ng-class="fa fa-arrow-right icon-on-right"></i></button> --> | ||
96 | + | ||
97 | + <button class="btn btn-success btn-next" ng-click="handleNext()" ng-hide="isLastStep()" type="button"> | ||
98 | + <i class="fa fa-arrow-right icon-on-right"></i> | ||
99 | + <translate>LABEL.PROXIMO</translate> | ||
100 | + </button> | ||
101 | + </div> | ||
102 | + </div><!-- /.widget-main --> | ||
103 | + </div><!-- /.widget-body --> | ||
210 | </div> | 104 | </div> |
211 | - <!-- .col --> | ||
212 | - </div> | ||
213 | - | ||
214 | - </fieldset> | 105 | + </form> |
106 | + </fieldset> | ||
107 | + </div> <!-- /.page-content --> | ||
215 | 108 | ||
216 | - <componente-associar-documentos ng-documentos="entradaAlmoxarifado.documentos" ng-edit="edit" ng-uploader="uploader" ng-workspace="$parent.workspace" form="entradaAlmoxarifadoForm" ng-obrigatorio="edit"></componente-associar-documentos> | ||
217 | - | ||
218 | - <form name="entradaObservacaoForm"> | ||
219 | - <componente-observacao ng-observacoes="entradaAlmoxarifado.observacoes" ng-hide="false" ng-edit="edit"></componente-observacao> | ||
220 | - </form> | ||
221 | - | ||
222 | - </fieldset> | ||
223 | -</div><!-- .page-content --> | ||
224 | \ No newline at end of file | 109 | \ No newline at end of file |
110 | +</div> | ||
225 | \ No newline at end of file | 111 | \ No newline at end of file |
cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/entradaAlmoxarifadoPg1.html
0 → 100644
@@ -0,0 +1,12 @@ | @@ -0,0 +1,12 @@ | ||
1 | +<ng-form name="dadosEntradaForm" novalidate autocomplete="off"> | ||
2 | + <div class="page-content"> | ||
3 | + <fieldset> | ||
4 | + <legend> | ||
5 | + <translate>ALMOXARIFADO.LABEL.DADOS_ENTRADA</translate> | ||
6 | + </legend> | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + </fieldset> | ||
11 | + </div> <!-- /.page-content --> | ||
12 | +</ng-form> | ||
0 | \ No newline at end of file | 13 | \ No newline at end of file |
cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/entradaAlmoxarifadoPg2.html
0 → 100644
@@ -0,0 +1,12 @@ | @@ -0,0 +1,12 @@ | ||
1 | +<ng-form name="materiaisForm" novalidate autocomplete="off"> | ||
2 | + <div class="page-content"> | ||
3 | + <fieldset> | ||
4 | + <legend> | ||
5 | + <translate>LABEL.MATERIAIS</translate> | ||
6 | + </legend> | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + </fieldset> | ||
11 | + </div> <!-- /.page-content --> | ||
12 | +</ng-form> | ||
0 | \ No newline at end of file | 13 | \ No newline at end of file |
cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/entradaAlmoxarifadoPg3.html
0 → 100644
@@ -0,0 +1,12 @@ | @@ -0,0 +1,12 @@ | ||
1 | +<ng-form name="documentosForm" novalidate autocomplete="off"> | ||
2 | + <div class="page-content"> | ||
3 | + <fieldset> | ||
4 | + <legend> | ||
5 | + <translate>ALMOXARIFADO.LABEL.DOCUMENTOS</translate> | ||
6 | + </legend> | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + </fieldset> | ||
11 | + </div> <!-- /.page-content --> | ||
12 | +</ng-form> | ||
0 | \ No newline at end of file | 13 | \ No newline at end of file |
cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/entradaAlmoxarifadoPg4.html
0 → 100644
@@ -0,0 +1,12 @@ | @@ -0,0 +1,12 @@ | ||
1 | +<ng-form name="observacoesForm" novalidate autocomplete="off"> | ||
2 | + <div class="page-content"> | ||
3 | + <fieldset> | ||
4 | + <legend> | ||
5 | + <translate>LABEL.OBSERVACOES</translate> | ||
6 | + </legend> | ||
7 | + | ||
8 | + <componente-observacao ng-observacoes="entradaAlmoxarifado.observacoes" ng-hide="false" ng-edit="edit"></componente-observacao> | ||
9 | + | ||
10 | + </fieldset> | ||
11 | + </div> <!-- /.page-content --> | ||
12 | +</ng-form> | ||
0 | \ No newline at end of file | 13 | \ No newline at end of file |