Commit 49ac5de96cec038b90695a4f3787c2f737692e46
1 parent
af136b69
Exists in
master
[Redmine Atendimento #4788]Material Endereço Estoque
Showing
4 changed files
with
175 additions
and
3 deletions
Show diff stats
cit-adm-materiais-api/src/main/resources/scripts-bd/postgres/v1.15.0/01-cit-adm-materiais-v1.15.0-postgres.sql
@@ -1456,4 +1456,15 @@ DELETE FROM entradadocumento WHERE entrada_id IS NOT null AND entrada_id NOT IN | @@ -1456,4 +1456,15 @@ DELETE FROM entradadocumento WHERE entrada_id IS NOT null AND entrada_id NOT IN | ||
1456 | DELETE FROM entradadocumento WHERE entrada_id IS NOT null AND entradainativo_id NOT IN (SELECT id FROM entradapatrimonio); | 1456 | DELETE FROM entradadocumento WHERE entrada_id IS NOT null AND entradainativo_id NOT IN (SELECT id FROM entradapatrimonio); |
1457 | DELETE FROM entrada WHERE id NOT IN (SELECT id FROM entradapatrimonio); | 1457 | DELETE FROM entrada WHERE id NOT IN (SELECT id FROM entradapatrimonio); |
1458 | 1458 | ||
1459 | --- GEOVANE FIM 04/05/2016 | ||
1460 | \ No newline at end of file | 1459 | \ No newline at end of file |
1460 | +-- GEOVANE FIM 04/05/2016 | ||
1461 | + | ||
1462 | +-- ERICK INICIO 04/05/2016 | ||
1463 | + | ||
1464 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | ||
1465 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/MaterialEnderecoEstoqueRepository.js', | ||
1466 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | ||
1467 | + | ||
1468 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | ||
1469 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/MaterialEnderecoEstoqueRepository.min.js', | ||
1470 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | ||
1471 | +-- ERICK FIM 04/05/2016 | ||
1461 | \ No newline at end of file | 1472 | \ No newline at end of file |
cit-adm-materiais-web/src/main/webapp/assets/js/angular/custom/controller/MaterialController.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'ClassificacaoMaterialRepository', 'CaracteristicaRepository', 'FileUploader', 'MaterialImagemRepository', | 2 | citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'ClassificacaoMaterialRepository', 'CaracteristicaRepository', 'FileUploader', 'MaterialImagemRepository', |
3 | - '$timeout', 'MaterialCaracteristicaRepository', 'MaterialPermanenteConsumoRepository', 'ContaContabilRepository', 'DominioRepository', '$translate', '$filter', 'MaterialConsumoRepository', 'MaterialConsumoTipoUnidadeMedidaEntradaRepository', 'MaterialPermanenteRepository', 'UnidadeMedidaRepository', | 3 | + '$timeout', 'MaterialCaracteristicaRepository', 'MaterialPermanenteConsumoRepository', 'ContaContabilRepository', 'DominioRepository', '$translate', '$filter', 'MaterialConsumoRepository', 'MaterialConsumoTipoUnidadeMedidaEntradaRepository', 'MaterialPermanenteRepository', 'UnidadeMedidaRepository', '$injector', |
4 | function MaterialController($scope, MaterialRepository, ClassificacaoMaterialRepository, CaracteristicaRepository, FileUploader, MaterialImagemRepository, | 4 | function MaterialController($scope, MaterialRepository, ClassificacaoMaterialRepository, CaracteristicaRepository, FileUploader, MaterialImagemRepository, |
5 | - $timeout, MaterialCaracteristicaRepository, MaterialPermanenteConsumoRepository, ContaContabilRepository, DominioRepository, $translate, $filter, MaterialConsumoRepository, MaterialConsumoTipoUnidadeMedidaEntradaRepository, MaterialPermanenteRepository, UnidadeMedidaRepository) { | 5 | + $timeout, MaterialCaracteristicaRepository, MaterialPermanenteConsumoRepository, ContaContabilRepository, DominioRepository, $translate, $filter, MaterialConsumoRepository, MaterialConsumoTipoUnidadeMedidaEntradaRepository, MaterialPermanenteRepository, UnidadeMedidaRepository, $injector) { |
6 | 6 | ||
7 | // CONSTANTES DOMINIO | 7 | // CONSTANTES DOMINIO |
8 | var CODIGO_TIPO_CLASSIFICACAO_DETALHE = 4; | 8 | var CODIGO_TIPO_CLASSIFICACAO_DETALHE = 4; |
@@ -688,5 +688,14 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi | @@ -688,5 +688,14 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi | ||
688 | $scope.showAlert('warning', $translate.instant('MSG.SELECIONE_ITEM_EXCLUIR')); | 688 | $scope.showAlert('warning', $translate.instant('MSG.SELECIONE_ITEM_EXCLUIR')); |
689 | } | 689 | } |
690 | }; | 690 | }; |
691 | + | ||
692 | + $scope.almoxarifadoAtivo = $scope.isModuloAtivo("/cit-almoxarifado-web"); | ||
693 | + if($scope.almoxarifadoAtivo){ | ||
694 | + $scope.MaterialEnderecoEstoqueRepository = $injector.get(["MaterialEnderecoEstoqueRepository"]); | ||
695 | + } | ||
696 | + | ||
697 | + $scope.adicionarEnderecoEstoque = function(){ | ||
698 | + $scope.$openModal('modal-material-endereco-estoque.html', 'md'); | ||
699 | + }; | ||
691 | 700 | ||
692 | }]); | 701 | }]); |
693 | \ No newline at end of file | 702 | \ No newline at end of file |
cit-adm-materiais-web/src/main/webapp/html/material/materialEdit.html
@@ -59,6 +59,13 @@ | @@ -59,6 +59,13 @@ | ||
59 | <div class="row"> | 59 | <div class="row"> |
60 | <div class="col-sm-12"> | 60 | <div class="col-sm-12"> |
61 | 61 | ||
62 | + <div class="row margin-top" ng-show="material.id && material.dominioTipoMaterial.codigo == 1 && almoxarifadoAtivo"> | ||
63 | + <div class="col-sm-12"> | ||
64 | + <div ng-include src="'/cit-adm-materiais-web/html/material/materialEnderecoEstoque.html'" /> | ||
65 | + </div> | ||
66 | + </div> | ||
67 | + | ||
68 | + | ||
62 | <div class="row margin-top" ng-show="material.dominioTipoMaterial.codigo == 1"> | 69 | <div class="row margin-top" ng-show="material.dominioTipoMaterial.codigo == 1"> |
63 | <div class="col-sm-12"> | 70 | <div class="col-sm-12"> |
64 | <div ng-include src="'/cit-adm-materiais-web/html/material/materialTipoUnidadeMedidaEntrada.html'" /> | 71 | <div ng-include src="'/cit-adm-materiais-web/html/material/materialTipoUnidadeMedidaEntrada.html'" /> |
cit-adm-materiais-web/src/main/webapp/html/material/materialEnderecoEstoque.html
0 → 100644
@@ -0,0 +1,145 @@ | @@ -0,0 +1,145 @@ | ||
1 | + <div class="widget-box margin-bottom"> | ||
2 | + <div class="widget-header"> | ||
3 | + <h4 class="widget-title"> | ||
4 | + <translate>ALMOXARIFADO.LABEL.ENDERECO_ESTOQUE</translate> <translate>LABEL.DO</translate> <translate>LABEL.MATERIAL</translate> | ||
5 | + </h4> | ||
6 | + <div class="widget-toolbar"> | ||
7 | + <a href="#void" ng-click="widgetEnderecoEstoqueMaterialIsCollapsed = !widgetEnderecoEstoqueMaterialIsCollapsed"> | ||
8 | + <i class="fa" ng-class="{'fa-chevron-up': !widgetEnderecoEstoqueMaterialIsCollapsed, 'fa-chevron-down': widgetEnderecoEstoqueMaterialIsCollapsed}"></i> | ||
9 | + </a> | ||
10 | + </div> | ||
11 | + </div> | ||
12 | + <div collapse="widgetEnderecoEstoqueMaterialIsCollapsed" class="widget-body"> | ||
13 | + <div class="widget-main clearfix"> | ||
14 | + <div class="row"> | ||
15 | + <div class="col-sm-12"> | ||
16 | + <div class="panel panel-default"> | ||
17 | + <div class="panel-heading clearfix"> | ||
18 | + <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" ng-click="adicionarEnderecoEstoque()" type="button"> | ||
19 | + <i class="fa fa-plus-circle yellow-dark"></i> | ||
20 | + <translate>LABEL.ADICIONAR</translate> </a> | ||
21 | + </button> | ||
22 | + | ||
23 | + <button title="{{$translate.instant('LABEL.EDITAR')}}" alt="{{$translate.instant('LABEL.EDITAR')}}" class="btn btn-clear" type="button" | ||
24 | + ng-click="editarEnderecoEstoque()"> | ||
25 | + <i class="fa fa-pencil blue"></i> | ||
26 | + <translate>LABEL.EDITAR</translate> | ||
27 | + </button> | ||
28 | + | ||
29 | + <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" class="btn btn-clear" ng-click="exibirDialogRemocaoUnidadeMedida()" ng-disabled="material.tiposUnidadeMedidaEntrada.length < 1 || !edit" type="button"> | ||
30 | + <i class="fa fa-close red"></i> | ||
31 | + <translate>LABEL.REMOVER</translate> </a> | ||
32 | + </button> | ||
33 | + | ||
34 | + <bloquear-desbloquear ng-model="enderecoEstoque" ng-repository="MaterialEnderecoEstoqueRepository" ng-edit="true"></bloquear-desbloquear> | ||
35 | + | ||
36 | + </div> | ||
37 | + <table class="table table-bordered table-striped"> | ||
38 | + <thead> | ||
39 | + <tr> | ||
40 | + <th class="text-center" style="width: 5%;"></th> | ||
41 | + | ||
42 | + <th style="width: 10%;"> | ||
43 | + <translate>LABEL.CODIGO</translate> | ||
44 | + </th> | ||
45 | + <th style="width: 25%;"> | ||
46 | + <translate>LABEL.DESCRICAO</translate> | ||
47 | + </th> | ||
48 | + <th style="width: 25%;"> | ||
49 | + <translate>ALMOXARIFADO.LABEL.ALMOXARIFADO</translate> | ||
50 | + </th> | ||
51 | + <th style="width: 15%;"> | ||
52 | + <translate>LABEL.CAPACIDADE</translate> | ||
53 | + </th> | ||
54 | + <th style="width: 10%;"> | ||
55 | + <translate>LABEL.PRINCIPAL</translate> | ||
56 | + </th> | ||
57 | + <th style="width: 15%;"> | ||
58 | + <translate>LABEL.DATA_BLOQUEIO</translate> | ||
59 | + </th> | ||
60 | + </tr> | ||
61 | + </thead> | ||
62 | + <tbody> | ||
63 | + <tr ng-repeat="matEndEstoque in listaMaterialEnderecoEstoque"> | ||
64 | + <td class="text-center"> | ||
65 | + <input type="radio" name="matEndEstoqueSelect" ng-checked="matEndEstoque.$checked" ng-click="checkMatEndEstoque(matEndEstoque)" ng-disabled="!edit"/> | ||
66 | + </td> | ||
67 | + <td> | ||
68 | + {{matEndEstoque.endereco.codigo}} | ||
69 | + </td> | ||
70 | + <td> | ||
71 | + {{matEndEstoque.endereco.descricao}} | ||
72 | + </td> | ||
73 | + <td> | ||
74 | + {{matEndEstoque.endereco.estoque.almoxarifado.codigoENome}} | ||
75 | + </td> | ||
76 | + <td> | ||
77 | + {{matEndEstoque.quantidade}} | ||
78 | + </td> | ||
79 | + <td> | ||
80 | + {{matEndEstoque.localPrincipal}} | ||
81 | + </td> | ||
82 | + <td> | ||
83 | + {{matEndEstoque.dataBloqueio | date : 'dd/MM/yyyy'}} | ||
84 | + </td> | ||
85 | + <td> | ||
86 | + <input type="checkbox" ng-model="medidaEntrada.isPadrao" ng-disabled="true"/> | ||
87 | + </td> | ||
88 | + </tr> | ||
89 | + </tbody> | ||
90 | + </table> | ||
91 | + | ||
92 | + </div> | ||
93 | + | ||
94 | + </div> | ||
95 | + </div><!-- .row --> | ||
96 | + </div><!-- .widget-main --> | ||
97 | + </div><!-- .widget-body --> | ||
98 | +</div><!-- .widget-box --> | ||
99 | + | ||
100 | +<script type="text/ng-template" id="modal-material-endereco-estoque.html"> | ||
101 | + <form name="formDialogMaterialEnderecoEstoque" novalidate > | ||
102 | + <div class="modal-content modal-dialog modal-md"> | ||
103 | + <div class="modal-header"> | ||
104 | + <button title="{{$translate.instant('LABEL.SALVAR')}}" alt="{{$translate.instant('LABEL.SALVAR')}}" ng-click="salvarMaterialEnderecoEstoque()" class="btn btn-clear" type="button"> | ||
105 | + <i class="fa fa-save green"></i> | ||
106 | + <translate>LABEL.SALVAR</translate> | ||
107 | + </button> | ||
108 | + | ||
109 | + <button title="{{$translate.instant('LABEL.CANCELAR')}}" alt="{{$translate.instant('LABEL.CANCELAR')}}" ng-click="$dismiss('cancel');" class="btn btn-clear" type="button"> | ||
110 | + <i class="fa fa-times red"></i> | ||
111 | + <translate>LABEL.CANCELAR</translate> | ||
112 | + </button> | ||
113 | + </div> | ||
114 | + | ||
115 | + <div class="modal-body"> | ||
116 | + <div class="row"> | ||
117 | + <div class="col-md-12"> | ||
118 | + <auto-complete ng-id="materialLocalEstoque.materialEstoque.estoque.almoxarifado" ng-label="ALMOXARIFADO.LABEL.ALMOXARIFADO" ng-model="materialLocalEstoque.materialEstoque.estoque.almoxarifado" form="formDialogMaterialEnderecoEstoque" ng-obrigatorio="false" ng-find="findAutoCompleteAlmoxarifado(value)" ng-item="item.nome" /> | ||
119 | + </div> | ||
120 | + </div> | ||
121 | + <div class="row"> | ||
122 | + <div class="col-md-7"> | ||
123 | + <auto-complete ng-id="materialLocalEstoque.materialEstoque.endereco" ng-label="ALMOXARIFADO.LABEL.ENDERECO_ESTOQUE" ng-model="materialLocalEstoque.materialEstoque.endereco" form="formDialogMaterialEnderecoEstoque" ng-obrigatorio="true" ng-find="findAutoCompleteEndereco(value)" ng-item="item.nome" /> | ||
124 | + </div> | ||
125 | + <div class="col-md-5"> | ||
126 | + <label-input-number ng-max-number="99999" ng-min-number="0" ng-type="text" ng-id="materialLocalEstoque.quantidade" ng-obrigatorio="true" form="formDialogMaterialEnderecoEstoque" ng-label="LABEL.CAPACIDADE" ng-model="materialLocalEstoque.quantidade" ng-custom-maxlength="5" /> | ||
127 | + </div> | ||
128 | + </div> | ||
129 | + <div class="row"> | ||
130 | + <div class="col-md-12"> | ||
131 | + <label-input-checkbox ng-model="materialLocalEstoque.localPrincipal" ng-label="LABEL.PRINCIPAL" form="formDialogMaterialEnderecoEstoque"/> | ||
132 | + </div> | ||
133 | + </div> | ||
134 | + </div> | ||
135 | + </form> | ||
136 | +</script> | ||
137 | + | ||
138 | + | ||
139 | + | ||
140 | + | ||
141 | + | ||
142 | + | ||
143 | + | ||
144 | + | ||
145 | + |