Commit 42303001b04e5df7cb1aa09e9a605119e44533e7
Exists in
master
Merge branch 'adm-1.15.0' into tarefa-3943
Showing
9 changed files
with
422 additions
and
46 deletions
Show diff stats
cit-adm-materiais-api/src/main/java/br/com/centralit/api/model/Material.java
... | ... | @@ -118,6 +118,7 @@ public class Material extends PersistentObjectAuditOrganizacao { |
118 | 118 | |
119 | 119 | /** Atributo codigo. */ |
120 | 120 | @Column(length = 30) |
121 | + @JsonView({ Views.MaterialEditView.class, ViewsAdmMateriais.MaterialConsultaInfo.class }) | |
121 | 122 | private String codigo; |
122 | 123 | |
123 | 124 | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/model/MaterialConsumoTipoUnidadeMedidaEntrada.java
1 | 1 | package br.com.centralit.api.model; |
2 | 2 | |
3 | +import javax.persistence.Column; | |
3 | 4 | import javax.persistence.Entity; |
4 | 5 | import javax.persistence.FetchType; |
5 | 6 | import javax.persistence.GeneratedValue; |
... | ... | @@ -43,6 +44,11 @@ public class MaterialConsumoTipoUnidadeMedidaEntrada extends PersistentObject { |
43 | 44 | @JsonView({ Views.MaterialEditView.class, ViewsAdmMateriais.MaterialConsumoAutoCompleteView.class, ViewsAdmMateriais.EntradaAlmoxarifadoEditView.class, Views.MaterialConsultaInfo.class }) |
44 | 45 | private UnidadeMedida unidadeMedida; |
45 | 46 | |
47 | + | |
48 | + @Column | |
49 | + @JsonView({ Views.GenericView.class }) | |
50 | + private Boolean isPadrao; | |
51 | + | |
46 | 52 | /** |
47 | 53 | * Retorna o valor do atributo <code>materialConsumo</code> |
48 | 54 | * |
... | ... | @@ -123,4 +129,11 @@ public class MaterialConsumoTipoUnidadeMedidaEntrada extends PersistentObject { |
123 | 129 | this.materialConsumoRemocao = materialConsumoRemocao; |
124 | 130 | } |
125 | 131 | |
132 | + public Boolean getIsPadrao() { | |
133 | + return isPadrao; | |
134 | + } | |
135 | + | |
136 | + public void setIsPadrao(Boolean isPadrao) { | |
137 | + this.isPadrao = isPadrao; | |
138 | + } | |
126 | 139 | } | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/service/impl/InicializarAdmMateriaisServiceImpl.java
... | ... | @@ -79,6 +79,11 @@ public class InicializarAdmMateriaisServiceImpl extends UtilStartup { |
79 | 79 | filesMenuFileMaterial.add(new MenuFile(CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM + "repository/MaterialConsumoTipoUnidadeMedidaEntradaRepository.min.js", dominioJS, menuMaterial)); |
80 | 80 | filesMenuFileMaterial.add(new MenuFile(CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM + "repository/UnidadeMedidaRepository.js", dominioJS, menuMaterial)); |
81 | 81 | filesMenuFileMaterial.add(new MenuFile(CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM + "repository/UnidadeMedidaRepository.min.js", dominioJS, menuMaterial)); |
82 | + filesMenuFileMaterial.add(new MenuFile(CIT_ALMOXARIFADO_WEB_ANGULAR_CUSTOM + "repository/MaterialLocalEstoqueRepository.js", dominioJS, menuMaterial)); | |
83 | + filesMenuFileMaterial.add(new MenuFile(CIT_ALMOXARIFADO_WEB_ANGULAR_CUSTOM + "repository/MaterialLocalEstoqueRepository.min.js", dominioJS, menuMaterial)); | |
84 | + filesMenuFileMaterial.add(new MenuFile(CIT_ALMOXARIFADO_WEB_ANGULAR_CUSTOM + "repository/MaterialEnderecoEstoqueRepository.js", dominioJS, menuMaterial)); | |
85 | + filesMenuFileMaterial.add(new MenuFile(CIT_ALMOXARIFADO_WEB_ANGULAR_CUSTOM + "repository/MaterialEnderecoEstoqueRepository.min.js", dominioJS, menuMaterial)); | |
86 | + | |
82 | 87 | menuMaterial.setIncludes(filesMenuFileMaterial); |
83 | 88 | this.menuService.mergeIfNotExist(menuMaterial); |
84 | 89 | // Menu Classificação de materiais | ... | ... |
cit-adm-materiais-api/src/main/resources/scripts-bd/postgres/v1.15.0/01-cit-adm-materiais-v1.15.0-postgres.sql
... | ... | @@ -1463,4 +1463,31 @@ DELETE FROM entradadocumento WHERE entrada_id IS NOT null AND entrada_id NOT IN |
1463 | 1463 | DELETE FROM entradadocumento WHERE entrada_id IS NOT null AND entradainativo_id NOT IN (SELECT id FROM entradapatrimonio); |
1464 | 1464 | DELETE FROM entrada WHERE id NOT IN (SELECT id FROM entradapatrimonio); |
1465 | 1465 | |
1466 | --- GEOVANE FIM 04/05/2016 | |
1467 | 1466 | \ No newline at end of file |
1467 | +-- GEOVANE FIM 04/05/2016 | |
1468 | + | |
1469 | +-- ERICK INICIO 04/05/2016 | |
1470 | + | |
1471 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
1472 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/MaterialEnderecoEstoqueRepository.js', | |
1473 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | |
1474 | + | |
1475 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
1476 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/MaterialEnderecoEstoqueRepository.min.js', | |
1477 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | |
1478 | + | |
1479 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
1480 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/MaterialLocalEstoqueRepository.js', | |
1481 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | |
1482 | + | |
1483 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
1484 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/MaterialLocalEstoqueRepository.min.js', | |
1485 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | |
1486 | + | |
1487 | + | |
1488 | +ALTER TABLE alm_me_localestoque ALTER COLUMN unidadeMedidaEntrada_id DROP NOT NULL; | |
1489 | +ALTER TABLE alm_me_localestoque ADD COLUMN localPrincipal BOOLEAN; | |
1490 | + | |
1491 | + | |
1492 | +ALTER TABLE alm_me_localestoque DROP CONSTRAINT uk_jsrcjmbvm7pnw3ql1hoiyhamj; | |
1493 | +ALTER TABLE alm_me_localestoque DROP CONSTRAINT uk_qnx0r3sv9yxte5bholpq15k4p; | |
1494 | +-- ERICK FIM 04/05/2016 | |
1468 | 1495 | \ No newline at end of file | ... | ... |
cit-adm-materiais-web/src/main/java/br/com/centralit/listener/StartupListenerAdmMaterial.java
... | ... | @@ -28,43 +28,43 @@ import br.com.centralit.framework.model.UtilStartup; |
28 | 28 | * <p><b>Title: </b></p> |
29 | 29 | * |
30 | 30 | * <p><b>Description: </b></p> |
31 | - * | |
31 | + * | |
32 | 32 | * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> |
33 | 33 | * |
34 | - * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | |
35 | - * | |
34 | + * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | |
35 | + * | |
36 | 36 | * @since 22/02/2016 - 09:30:08 |
37 | 37 | * |
38 | 38 | * @version 1.0.0 |
39 | 39 | * |
40 | 40 | * @author rogerio.cassimiro |
41 | - * | |
41 | + * | |
42 | 42 | */ |
43 | 43 | @Component |
44 | 44 | public class StartupListenerAdmMaterial extends UtilStartup implements ApplicationListener<ContextRefreshedEvent>{ |
45 | 45 | |
46 | 46 | @Autowired |
47 | 47 | DefaultFileService defaultFileService; |
48 | - | |
48 | + | |
49 | 49 | @Autowired |
50 | 50 | private DominioService dominioService; |
51 | - | |
51 | + | |
52 | 52 | @Autowired |
53 | 53 | private ModuloService moduloService; |
54 | - | |
54 | + | |
55 | 55 | @Autowired |
56 | 56 | private InternacionalizacaoService internacionalizacaoService; |
57 | - | |
57 | + | |
58 | 58 | @Override |
59 | 59 | public void onApplicationEvent(ContextRefreshedEvent event) { |
60 | - criarDominios(); | |
60 | + criarDominios(); | |
61 | 61 | criarDefaultFile(); |
62 | 62 | gerarInternacionalizacao(); |
63 | 63 | } |
64 | - | |
64 | + | |
65 | 65 | private void criarDominios() { |
66 | 66 | List<Dominio> list = new ArrayList<Dominio>(); |
67 | - | |
67 | + | |
68 | 68 | list.add(new Dominio("tipoBem", "Próprio contabilizado", "PROPRIO_CONTABILIZADO", 1L, Boolean.FALSE)); |
69 | 69 | list.add(new Dominio("tipoBem", "Próprio controlado", "PROPRIO_CONTROLADO", 2L, Boolean.FALSE)); |
70 | 70 | list.add(new Dominio("tipoBem", "De terceiros", "DE_TERCEIROS", 3L, Boolean.FALSE)); |
... | ... | @@ -149,30 +149,30 @@ public class StartupListenerAdmMaterial extends UtilStartup implements Applicati |
149 | 149 | list.add(new DefaultFile(CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM + "repository/ContaContabilMovimentoRepository.min.js", dominioJS, 147)); |
150 | 150 | this.defaultFileService.saveListIfNotExist(list); |
151 | 151 | } |
152 | - | |
152 | + | |
153 | 153 | /** |
154 | - * | |
154 | + * | |
155 | 155 | * Método responsável por gerar internacionalização do módulo administração de materiais |
156 | - * | |
156 | + * | |
157 | 157 | * @author rogerio.cassimiro |
158 | - * | |
158 | + * | |
159 | 159 | */ |
160 | 160 | private void gerarInternacionalizacao() { |
161 | 161 | |
162 | 162 | dominioPT_BR = this.dominioService.findByChaveAndCodigo(Dominio.TIPO_IDIOMA, Dominio.TIPO_IDIOMA_PT_BR_CODIGO); |
163 | 163 | moduloSelecionado = this.moduloService.getModuloPorBaseUrl(BASE_URL_ADM_MATERIAIS, null); |
164 | 164 | List<Internacionalizacao> internacionalizacaoList = new ArrayList<Internacionalizacao>(); |
165 | - | |
165 | + | |
166 | 166 | this.gerarLabel(dominioPT_BR, moduloSelecionado, internacionalizacaoList); |
167 | 167 | this.gerarValidacao(dominioPT_BR, moduloSelecionado, internacionalizacaoList); |
168 | 168 | this.gerarMensagem(dominioPT_BR, moduloSelecionado, internacionalizacaoList); |
169 | - | |
169 | + | |
170 | 170 | this.internacionalizacaoService.saveListIfNotExist(internacionalizacaoList); |
171 | 171 | Logger.getLogger(StartupListenerAdmMaterial.class).info("Internacionalização executada - StartupListenerAdmMaterial!"); |
172 | 172 | } |
173 | - | |
173 | + | |
174 | 174 | private void gerarLabel(Dominio dominio, Modulo modulo, List<Internacionalizacao> internacionalizacaoList) { |
175 | - | |
175 | + | |
176 | 176 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.LABEL.APRESENTAR_RELATORIO_DEPRECIACAO", "Apresentar no relatório de depreciação", dominio, modulo)); |
177 | 177 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.LABEL.APRESENTAR_RELATORIO_INVENTARIO", "Apresentar relatório inventário", dominio, modulo)); |
178 | 178 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.LABEL.APRESENTAR_RMA", "Apresentar no RMA", dominio, modulo)); |
... | ... | @@ -219,11 +219,11 @@ public class StartupListenerAdmMaterial extends UtilStartup implements Applicati |
219 | 219 | |
220 | 220 | |
221 | 221 | } |
222 | - | |
222 | + | |
223 | 223 | private void gerarValidacao(Dominio dominio, Modulo modulo, List<Internacionalizacao> internacionalizacaoList) { |
224 | 224 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.VALIDACAO.DATA_TRANSFERENCIA_FORA_REFERENCIA", "A data de transferência deve estar dentro da referência vigente!", dominio, modulo)); |
225 | 225 | } |
226 | - | |
226 | + | |
227 | 227 | private void gerarMensagem(Dominio dominio, Modulo modulo, List<Internacionalizacao> internacionalizacaoList) { |
228 | 228 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.CONFIRMA_EXCLUIR_CONTA_CONTABIL", "Confirma a exclusão da conta contábil?", dominio, modulo)); |
229 | 229 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.CONFIRMA_FECHAR_MES", "Tem certeza que deseja fechar o mês de referência? Fechamento de contas e depreciações de bens ocorrerão. Esta ação não poderá ser revertida. O processo será iniciado em segundo plano, quando o mesmo terminar, você será notificado.", dominio, modulo)); |
... | ... | @@ -237,9 +237,13 @@ public class StartupListenerAdmMaterial extends UtilStartup implements Applicati |
237 | 237 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.TRANSFERENCIA_SUCESS", "Transferência realizada com sucesso!", dominio, modulo)); |
238 | 238 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.INFO_EDICAO_MATERIAL", "Para a edição de outro material, localize o nível detalhe da classificação do material.", dominio, modulo)); |
239 | 239 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.FECHAMENTO_ENTRADAS_INCOMPLETAS", "Existem entradas de bens incompletas neste mês de referência! Por favor concluir as mesmas antes de realizar o fechamento do mês!", dominio, modulo)); |
240 | - | |
241 | 240 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.INFO_MSG_FECHAMENTO_MES_NOTIFICA_FIM", "Fechamento do mês de referência em execução. Quando o processo terminar, você será notificado!", dominio, modulo)); |
241 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.CONFIRMA_ALTERAR_PADRAO", "Já foi definido uma Unidae de medida de entrada como padrão! Deseja Alterar?", dominio, modulo)); | |
242 | 242 | |
243 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.REMOVER_LOCAL_ESTOQUE_MATERIAL_PRINCIPAL", "O endereço selecionado para remoção está definido como principal de um almoxarifado. Para remover este endereço de estoque, informe outro endereço de estoque como principal para o almoxarifado.", dominio, modulo)); | |
244 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.EDITA_LOCAL_ESTOQUE_MATERIAL_PRINCIPAL", "Para definir esse endereço de estoque como não sendo principal, primeiramente informe outro endereço de estoque como principal para o almoxarifado.", dominio, modulo)); | |
245 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.LOCAL_SALVA_ESTOQUE_MATERIAL_COMO_PRINCIPAL_PARA_ALMOXARIFADO", "Este endereço de estoque é o principal do almoxarifado ", dominio, modulo)); | |
246 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.LOCAL_ESTOQUE_JA_VINCULADO_MATERIAL", "Este endereço de estoque já possui vínculo ao material.", dominio, modulo)); | |
243 | 247 | } |
244 | - | |
248 | + | |
245 | 249 | } |
246 | 250 | \ No newline at end of file | ... | ... |
cit-adm-materiais-web/src/main/webapp/assets/js/angular/custom/controller/MaterialController.js
1 | 1 | 'use strict'; |
2 | 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 | 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 | 7 | // CONSTANTES DOMINIO |
8 | 8 | var CODIGO_TIPO_CLASSIFICACAO_DETALHE = 4; |
... | ... | @@ -28,7 +28,7 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
28 | 28 | $scope.edit = true; |
29 | 29 | $scope.limpar(); |
30 | 30 | }; |
31 | - | |
31 | + | |
32 | 32 | function verificaMaterialConsumoSetGenerico(){ |
33 | 33 | if ($scope.material.dominioTipoMaterial && $scope.material.dominioTipoMaterial.codigo) { |
34 | 34 | if($scope.material.dominioTipoMaterial.codigo == 1){ |
... | ... | @@ -58,6 +58,7 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
58 | 58 | |
59 | 59 | configurarDadosClassificacaoMaterial(); |
60 | 60 | verificaMaterialConsumoSetGenerico(); |
61 | + $scope.verificaAlmoxarifadoAtivo(); | |
61 | 62 | $scope.setLoading(false); |
62 | 63 | }); |
63 | 64 | }; |
... | ... | @@ -130,7 +131,7 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
130 | 131 | console.info('onCompleteItem', fileItem, response, status, headers); |
131 | 132 | }; |
132 | 133 | uploader.onCompleteAll = function() { |
133 | - //uploader.clearQueue(); | |
134 | + //uploader.clearQueue(); | |
134 | 135 | console.info('onCompleteAll'); |
135 | 136 | }; |
136 | 137 | |
... | ... | @@ -273,13 +274,13 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
273 | 274 | if($scope.material.classificacaoMaterial){ |
274 | 275 | $scope.MaterialDadosDetalhe = $scope.material.classificacaoMaterial.codigo + ' - ' + $scope.material.classificacaoMaterial.descricao; |
275 | 276 | } |
276 | - } | |
277 | + } | |
277 | 278 | }; |
278 | - | |
279 | + | |
279 | 280 | $scope.$watch('material.dominioTipoMaterial.codigo', function() { |
280 | 281 | verificaMaterialConsumoSetGenerico(); |
281 | 282 | }); |
282 | - | |
283 | + | |
283 | 284 | |
284 | 285 | DominioRepository.findAllDominio('tipoMaterial').then(function(result) { |
285 | 286 | $scope.tiposMaterial = result; |
... | ... | @@ -317,12 +318,18 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
317 | 318 | $scope.unidadesMedida.push(item.originalElement); |
318 | 319 | $scope.unidadesMedidaMaterialConsumo.push(item.originalElement); |
319 | 320 | }); |
320 | - | |
321 | + | |
321 | 322 | $scope.unidadesMedidaMaterialConsumo.sort(function (a, b) { |
322 | 323 | return a.descricao.localeCompare(b.descricao); |
323 | 324 | }); |
324 | 325 | }); |
325 | 326 | |
327 | + function addTipoUnidadeMedida(unidadeMedidaEntradaTemp){ | |
328 | + unidadeMedidaEntradaTemp.isPadrao = angular.copy($scope.unidadeMedidaEntrada.isPadrao); | |
329 | + $scope.material.tiposUnidadeMedidaEntrada.push(unidadeMedidaEntradaTemp); | |
330 | + $scope.unidadesMedidaMaterialConsumo = $filter('idNotEqualUnidadeMedida')($scope.unidadesMedidaMaterialConsumo, $scope.material.tiposUnidadeMedidaEntrada); | |
331 | + $scope.unidadeMedidaEntrada = {}; | |
332 | + } | |
326 | 333 | //Método responsável por editar unidadeMedidaEntrada. |
327 | 334 | $scope.adicionarUnidadeMedidaEntrada = function() { |
328 | 335 | //Verifica se a lista tiposUnidadeMedidaEntrada não está vazia |
... | ... | @@ -335,11 +342,32 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
335 | 342 | var unidadeMedidaEntradaTemp = {}; |
336 | 343 | angular.copy($scope.unidadeMedidaEntrada, unidadeMedidaEntradaTemp); |
337 | 344 | |
338 | - $scope.material.tiposUnidadeMedidaEntrada.push(unidadeMedidaEntradaTemp); | |
339 | - $scope.unidadesMedidaMaterialConsumo = $filter('idNotEqualUnidadeMedida')($scope.unidadesMedidaMaterialConsumo, $scope.material.tiposUnidadeMedidaEntrada); | |
340 | - } | |
345 | + if($scope.unidadeMedidaEntrada.isPadrao){ | |
346 | + var isPossuiPadrao = false; | |
341 | 347 | |
342 | - $scope.unidadeMedidaEntrada = {}; | |
348 | + angular.forEach($scope.material.tiposUnidadeMedidaEntrada, function(tipoUnidade) { | |
349 | + if(tipoUnidade.isPadrao){ | |
350 | + isPossuiPadrao = true; | |
351 | + } | |
352 | + }); | |
353 | + | |
354 | + if( isPossuiPadrao){ | |
355 | + $scope.$openModalConfirm({message: $translate.instant('ADMINISTRACAODEMATERIAIS.MSG.CONFIRMA_ALTERAR_PADRAO'), callback: | |
356 | + function(){ | |
357 | + angular.forEach($scope.material.tiposUnidadeMedidaEntrada, function(tipoUnidade) { | |
358 | + tipoUnidade.isPadrao = false; | |
359 | + }); | |
360 | + addTipoUnidadeMedida(unidadeMedidaEntradaTemp); | |
361 | + $scope.$modalConfirmInstance.dismiss('cancel'); | |
362 | + } | |
363 | + }); | |
364 | + }else{ | |
365 | + addTipoUnidadeMedida(unidadeMedidaEntradaTemp); | |
366 | + } | |
367 | + }else{ | |
368 | + addTipoUnidadeMedida(unidadeMedidaEntradaTemp); | |
369 | + } | |
370 | + } | |
343 | 371 | }; |
344 | 372 | |
345 | 373 | $scope.exibirDialogRemocaoUnidadeMedida = function() { |
... | ... | @@ -369,16 +397,16 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
369 | 397 | $scope.$modalConfirmInstance.dismiss('cancel'); |
370 | 398 | }; |
371 | 399 | }); |
372 | - | |
400 | + | |
373 | 401 | $scope.unidadesMedidaMaterialConsumo.sort(function (a, b) { |
374 | 402 | return a.descricao.localeCompare(b.descricao); |
375 | 403 | }); |
376 | 404 | }; |
377 | - | |
405 | + | |
378 | 406 | $scope.getCheckUnidadeMedidaEntrada = function () { |
379 | 407 | $scope.material.tiposUnidadeMedidaEntrada.forEach(function (unidade) { |
380 | 408 | if(unidade.$checked){ |
381 | - $scope.unidadeMedidaSelecionada = unidade; | |
409 | + $scope.unidadeMedidaSelecionada = unidade; | |
382 | 410 | } |
383 | 411 | }); |
384 | 412 | }; |
... | ... | @@ -480,11 +508,11 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
480 | 508 | |
481 | 509 | MaterialCaracteristicaRepository.save(materialCaracteristica).then(function(result) { |
482 | 510 | $scope.showAlert("success", $translate.instant('MSG.SUCESSO_BLOQUEIO_CARACTERISTICA')); |
483 | - | |
511 | + | |
484 | 512 | materialCaracteristica.$checked = false; |
485 | 513 | |
486 | 514 | $scope.apresentarBloquearCaracteristica = false; |
487 | - | |
515 | + | |
488 | 516 | materialCaracteristica.version = result.originalElement.version; |
489 | 517 | }); |
490 | 518 | } |
... | ... | @@ -661,5 +689,132 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
661 | 689 | $scope.showAlert('warning', $translate.instant('MSG.SELECIONE_ITEM_EXCLUIR')); |
662 | 690 | } |
663 | 691 | }; |
664 | - | |
692 | + | |
693 | + $scope.verificaAlmoxarifadoAtivo = function(){ | |
694 | + $scope.almoxarifadoAtivo = $scope.isModuloAtivo("/cit-almoxarifado-web"); | |
695 | + if($scope.almoxarifadoAtivo){ | |
696 | + $scope.MaterialLocalEstoqueRepository = $injector.get(["MaterialLocalEstoqueRepository"]); | |
697 | + $scope.EstruturaOrganizacionalAlmoxarifadoRepository = $injector.get(["EstruturaOrganizacionalAlmoxarifadoRepository"]); | |
698 | + $scope.EnderecoEstoqueRepository = $injector.get(["EnderecoEstoqueRepository"]); | |
699 | + | |
700 | + $scope.EstruturaOrganizacionalAlmoxarifadoRepository.getAlmoxarifadoPadrao($scope.usuarioLogado.organizacao.id).then(function(result){ | |
701 | + $scope.almoxarifadoTemp = result.originalElement.estruturaOrganizacional; | |
702 | + }); | |
703 | + if($scope.material && $scope.material.id){ | |
704 | + $scope.listaLocaisEstoqueMaterial(); | |
705 | + } | |
706 | + $scope.editEnderecoEstoque = false; | |
707 | + } | |
708 | + } | |
709 | + | |
710 | + | |
711 | + $scope.adicionarEnderecoEstoque = function(){ | |
712 | + $scope.$openModal('modal-material-endereco-estoque.html', 'lg'); | |
713 | + }; | |
714 | + | |
715 | + $scope.editarEnderecoEstoque = function(){ | |
716 | + if(!$scope.matEndEstoqueCheck){ | |
717 | + $scope.showAlert("warning", $translate.instant('LABEL.SELECIONE_UM_ITEM')); | |
718 | + }else{ | |
719 | + $scope.editEnderecoEstoque = true; | |
720 | + $scope.materialLocalEstoque = $scope.matEndEstoqueCheck; | |
721 | + $scope.$openModal('modal-material-endereco-estoque.html', 'lg'); | |
722 | + } | |
723 | + }; | |
724 | + | |
725 | + $scope.removerEnderecoEstoque = function(){ | |
726 | + if(!$scope.matEndEstoqueCheck){ | |
727 | + $scope.showAlert("warning", $translate.instant('LABEL.SELECIONE_UM_ITEM')); | |
728 | + }else{ | |
729 | + $scope.$openModalConfirm({message: $translate.instant('LABEL.CONFIRMA_EXCLUSAO'), callback: function() { | |
730 | + $scope.setLoading(true); | |
731 | + $scope.MaterialLocalEstoqueRepository.buscarLocaisEstoquePorIdMaterialIdAlmoxarifado($scope.material.id, $scope.matEndEstoqueCheck.endereco.estoque.almoxarifado.id).then(function(result) { | |
732 | + if(result && result.length > 1){ | |
733 | + if($scope.matEndEstoqueCheck.localPrincipal){ | |
734 | + $scope.showAlert("warning", $translate.instant('ADMINISTRACAODEMATERIAIS.MSG.REMOVER_LOCAL_ESTOQUE_MATERIAL_PRINCIPAL')); | |
735 | + $scope.setLoading(false); | |
736 | + $scope.$modalConfirmInstance.dismiss('cancel'); | |
737 | + return; | |
738 | + } | |
739 | + } | |
740 | + $scope.MaterialLocalEstoqueRepository.remove($scope.matEndEstoqueCheck).then(function(result) { | |
741 | + $scope.listaLocaisEstoqueMaterial(); | |
742 | + $scope.setLoading(false); | |
743 | + }); | |
744 | + $scope.$modalConfirmInstance.dismiss('cancel'); | |
745 | + }); | |
746 | + } | |
747 | + }); | |
748 | + } | |
749 | + }; | |
750 | + | |
751 | + $scope.checkMatEndEstoque = function(materialLocalEstoque){ | |
752 | + $scope.matEndEstoqueCheck = materialLocalEstoque.originalElement; | |
753 | + }; | |
754 | + | |
755 | + $scope.findAutoCompleteAlmoxarifado = function(value){ | |
756 | + return $scope.EstruturaOrganizacionalAlmoxarifadoRepository.listarEstruturasOrganizacionaisAlmoxarifadoPorOrganizacao(value, $scope.usuarioLogado.organizacao.id).then(function(result) { | |
757 | + return result; | |
758 | + }); | |
759 | + }; | |
760 | + | |
761 | + $scope.findAutoCompleteEndereco = function(value, almoxarifado){ | |
762 | + var idAlmoxarifado = 0; | |
763 | + if(almoxarifado){ | |
764 | + idAlmoxarifado = almoxarifado.id; | |
765 | + } | |
766 | + return $scope.EnderecoEstoqueRepository.listarEnderecosEstoque(value, idAlmoxarifado).then(function(result) { | |
767 | + return result; | |
768 | + }); | |
769 | + }; | |
770 | + | |
771 | + $scope.salvarMaterialEnderecoEstoque = function(materialLocalEstoque){ | |
772 | + $scope.setLoading(true); | |
773 | + if(!materialLocalEstoque.materialEstoque){ | |
774 | + materialLocalEstoque.materialEstoque = {material : $scope.material}; | |
775 | + } | |
776 | + materialLocalEstoque.endereco.estoque = {almoxarifado : $scope.almoxarifadoTemp}; | |
777 | + $scope.MaterialLocalEstoqueRepository.save(materialLocalEstoque).then(function(result) { | |
778 | + if( result.originalElement.localPrincipal){ | |
779 | + $scope.showAlert("warning", $translate.instant('ADMINISTRACAODEMATERIAIS.MSG.LOCAL_SALVA_ESTOQUE_MATERIAL_COMO_PRINCIPAL_PARA_ALMOXARIFADO') + $scope.almoxarifadoTemp.codigoENome); | |
780 | + } | |
781 | + $scope.$modalInstance.dismiss('cancel'); | |
782 | + $scope.listaLocaisEstoqueMaterial(); | |
783 | + $scope.editEnderecoEstoque = false; | |
784 | + $scope.setLoading(false); | |
785 | + }); | |
786 | + }; | |
787 | + | |
788 | + $scope.listaLocaisEstoqueMaterial = function(){ | |
789 | + $scope.setLoading(true); | |
790 | + $scope.listaMaterialEnderecoEstoque = []; | |
791 | + $scope.MaterialLocalEstoqueRepository.listarMaterialEstoquePorMaterial($scope.material.id).then(function(result) { | |
792 | + $scope.listaMaterialEnderecoEstoque = result; | |
793 | + $scope.matEndEstoqueCheck = null; | |
794 | + $scope.setLoading(false); | |
795 | + }); | |
796 | + }; | |
797 | + | |
798 | + $scope.bloquearEnderecoEstoque = function(){ | |
799 | + if(!$scope.matEndEstoqueCheck){ | |
800 | + $scope.showAlert("warning", $translate.instant('LABEL.SELECIONE_UM_ITEM')); | |
801 | + }else{ | |
802 | + $scope.matEndEstoqueCheck.dataBloqueio = new Date(); | |
803 | + $scope.MaterialLocalEstoqueRepository.save($scope.matEndEstoqueCheck).then(function(result) { | |
804 | + $scope.listaLocaisEstoqueMaterial(); | |
805 | + }); | |
806 | + } | |
807 | + }; | |
808 | + | |
809 | + $scope.desbloquearEnderecoEstoque = function(){ | |
810 | + if(!$scope.matEndEstoqueCheck){ | |
811 | + $scope.showAlert("warning", $translate.instant('LABEL.SELECIONE_UM_ITEM')); | |
812 | + }else{ | |
813 | + $scope.matEndEstoqueCheck.dataBloqueio = null; | |
814 | + $scope.MaterialLocalEstoqueRepository.save($scope.matEndEstoqueCheck).then(function(result) { | |
815 | + $scope.listaLocaisEstoqueMaterial(); | |
816 | + }); | |
817 | + } | |
818 | + }; | |
819 | + | |
665 | 820 | }]); |
666 | 821 | \ No newline at end of file | ... | ... |
cit-adm-materiais-web/src/main/webapp/html/material/materialEdit.html
... | ... | @@ -59,6 +59,13 @@ |
59 | 59 | <div class="row"> |
60 | 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 | 69 | <div class="row margin-top" ng-show="material.dominioTipoMaterial.codigo == 1"> |
63 | 70 | <div class="col-sm-12"> |
64 | 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,148 @@ |
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="removerEnderecoEstoque()" type="button"> | |
30 | + <i class="fa fa-close red"></i> | |
31 | + <translate>LABEL.REMOVER</translate> </a> | |
32 | + </button> | |
33 | + | |
34 | + <button title="{{$translate.instant('PORTAL.LABEL.BLOQUEAR')}}" alt="{{$translate.instant('PORTAL.LABEL.BLOQUEAR')}}" class="btn btn-clear" ng-show="!matEndEstoqueCheck.dataBloqueio" ng-click="bloquearEnderecoEstoque()" type="button"> | |
35 | + <i class="fa fa-lock"></i> | |
36 | + <translate>PORTAL.LABEL.BLOQUEAR</translate> </a> | |
37 | + </button> | |
38 | + | |
39 | + <button type="button" title="{{$translate.instant('LABEL.DESBLOQUEAR')}}" alt="{{$translate.instant('LABEL.DESBLOQUEAR')}}" class="btn btn-clear" ng-show="matEndEstoqueCheck.dataBloqueio" ng-click="desbloquearEnderecoEstoque();"> | |
40 | + <i class="fa fa-unlock grey"></i> <translate>LABEL.DESBLOQUEAR</translate> | |
41 | + </button> | |
42 | + | |
43 | + </div> | |
44 | + | |
45 | + <table class="table table-bordered table-striped"> | |
46 | + <thead> | |
47 | + <tr> | |
48 | + <th class="text-center" style="width: 5%;"></th> | |
49 | + | |
50 | + <th style="width: 10%;"> | |
51 | + <translate>LABEL.CODIGO</translate> | |
52 | + </th> | |
53 | + <th style="width: 25%;"> | |
54 | + <translate>LABEL.DESCRICAO</translate> | |
55 | + </th> | |
56 | + <th style="width: 25%;"> | |
57 | + <translate>ALMOXARIFADO.LABEL.ALMOXARIFADO</translate> | |
58 | + </th> | |
59 | + <th style="width: 15%;"> | |
60 | + <translate>LABEL.CAPACIDADE</translate> | |
61 | + </th> | |
62 | + <th style="width: 10%;"> | |
63 | + <translate>LABEL.PRINCIPAL</translate> | |
64 | + </th> | |
65 | + <th style="width: 15%;"> | |
66 | + <translate>LABEL.DATA_BLOQUEIO</translate> | |
67 | + </th> | |
68 | + </tr> | |
69 | + </thead> | |
70 | + <tbody> | |
71 | + <tr ng-repeat="matEndEstoque in listaMaterialEnderecoEstoque"> | |
72 | + <td class="text-center"> | |
73 | + <input type="radio" name="matEndEstoqueSelect" ng-checked="matEndEstoque.$checked" ng-click="checkMatEndEstoque(matEndEstoque)" ng-disabled="!edit"/> | |
74 | + </td> | |
75 | + <td> | |
76 | + {{matEndEstoque.endereco.codigo}} | |
77 | + </td> | |
78 | + <td> | |
79 | + {{matEndEstoque.endereco.descricao}} | |
80 | + </td> | |
81 | + <td> | |
82 | + {{matEndEstoque.endereco.estoque.almoxarifado.codigoENome}} | |
83 | + </td> | |
84 | + <td> | |
85 | + {{matEndEstoque.quantidade}} | |
86 | + </td> | |
87 | + <td> | |
88 | + {{matEndEstoque.localPrincipal | booleanSimNao}} | |
89 | + </td> | |
90 | + <td> | |
91 | + {{matEndEstoque.dataBloqueio | date : 'dd/MM/yyyy'}} | |
92 | + </td> | |
93 | + </tr> | |
94 | + </tbody> | |
95 | + </table> | |
96 | + | |
97 | + </div> | |
98 | + | |
99 | + </div> | |
100 | + </div><!-- .row --> | |
101 | + </div><!-- .widget-main --> | |
102 | + </div><!-- .widget-body --> | |
103 | +</div><!-- .widget-box --> | |
104 | + | |
105 | +<script type="text/ng-template" id="modal-material-endereco-estoque.html"> | |
106 | + <form name="formDialogMaterialEnderecoEstoque" novalidate > | |
107 | + <div class="modal-header"> | |
108 | + <button title="{{$translate.instant('LABEL.SALVAR')}}" alt="{{$translate.instant('LABEL.SALVAR')}}" ng-click="salvarMaterialEnderecoEstoque(materialLocalEstoque)" class="btn btn-clear" type="button"> | |
109 | + <i class="fa fa-save green"></i> | |
110 | + <translate>LABEL.SALVAR</translate> | |
111 | + </button> | |
112 | + | |
113 | + <button title="{{$translate.instant('LABEL.CANCELAR')}}" alt="{{$translate.instant('LABEL.CANCELAR')}}" ng-click="$dismiss('cancel');" class="btn btn-clear" type="button"> | |
114 | + <i class="fa fa-times red"></i> | |
115 | + <translate>LABEL.CANCELAR</translate> | |
116 | + </button> | |
117 | + </div> | |
118 | + | |
119 | + <div class="modal-body"> | |
120 | + <div class="row"> | |
121 | + <div class="col-md-12"> | |
122 | + <auto-complete ng-id="almoxarifadoTemp" ng-label="ALMOXARIFADO.LABEL.ALMOXARIFADO" ng-model="almoxarifadoTemp" form="formDialogMaterialEnderecoEstoque" ng-obrigatorio="false" ng-find="findAutoCompleteAlmoxarifado(value)" ng-item="item.nome" /> | |
123 | + </div> | |
124 | + </div> | |
125 | + <div class="row"> | |
126 | + <div class="col-md-7"> | |
127 | + <auto-complete ng-id="materialLocalEstoque.endereco" ng-label="ALMOXARIFADO.LABEL.ENDERECO_ESTOQUE" ng-model="materialLocalEstoque.endereco" form="formDialogMaterialEnderecoEstoque" ng-obrigatorio="true" ng-find="findAutoCompleteEndereco(value, almoxarifadoTemp)" ng-item="item.descricao" /> | |
128 | + </div> | |
129 | + <div class="col-md-5"> | |
130 | + <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" /> | |
131 | + </div> | |
132 | + </div> | |
133 | + <div class="row"> | |
134 | + <div class="col-md-12"> | |
135 | + <label-input-checkbox ng-model="materialLocalEstoque.localPrincipal" ng-label="LABEL.PRINCIPAL" form="formDialogMaterialEnderecoEstoque"/> | |
136 | + </div> | |
137 | + </div> | |
138 | + </form> | |
139 | +</script> | |
140 | + | |
141 | + | |
142 | + | |
143 | + | |
144 | + | |
145 | + | |
146 | + | |
147 | + | |
148 | + | ... | ... |
cit-adm-materiais-web/src/main/webapp/html/material/materialTipoUnidadeMedidaEntrada.html
... | ... | @@ -16,6 +16,16 @@ |
16 | 16 | <label-select ng-id="unidadeMedidaEntrada.unidadeMedida" ng-model="unidadeMedidaEntrada.unidadeMedida" ng-label="ADMINISTRACAODEMATERIAIS.LABEL.TIPO_UNIDADE_MEDIDA_ENTRADA" ng-obrigatorio="false" ng-disabled="!edit" form="formMaterial" |
17 | 17 | ng-list="unidadesMedidaMaterialConsumo" ng-custom-options="unidadeMedidaEntrada as unidadeMedidaEntrada.descricao for unidadeMedidaEntrada" > </label-select> |
18 | 18 | </div> |
19 | + <div class="col-sm-2"> | |
20 | + <div class="form-group no-label"> | |
21 | + <div class="input-group"> | |
22 | + <label> | |
23 | + <input type="checkbox" ng-model="unidadeMedidaEntrada.isPadrao" ng-disabled="!edit"/> | |
24 | + <translate>LABEL.PADRAO</translate> | |
25 | + </label> | |
26 | + </div> | |
27 | + </div> | |
28 | + </div> | |
19 | 29 | </div> |
20 | 30 | <div class="row"> |
21 | 31 | <div class="col-sm-12"> |
... | ... | @@ -25,7 +35,7 @@ |
25 | 35 | <i class="fa fa-plus-circle yellow-dark"></i> |
26 | 36 | <translate>LABEL.ADICIONAR</translate> </a> |
27 | 37 | </button> |
28 | - | |
38 | + | |
29 | 39 | <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 | 40 | <i class="fa fa-close red"></i> |
31 | 41 | <translate>LABEL.REMOVER</translate> </a> |
... | ... | @@ -35,13 +45,16 @@ |
35 | 45 | <thead> |
36 | 46 | <tr> |
37 | 47 | <th class="text-center" style="width: 5%;"></th> |
38 | - | |
48 | + | |
39 | 49 | <th style="width: 30%;"> |
40 | 50 | <translate>LABEL.UNIDADE_MEDIDA</translate> |
41 | 51 | </th> |
42 | 52 | <th style="width: 30%;"> |
43 | 53 | <translate>ADMINISTRACAODEMATERIAIS.LABEL.TIPO_NUMERICO</translate> |
44 | 54 | </th> |
55 | + <th style="width: 8%;"> | |
56 | + <translate>LABEL.PADRAO</translate> | |
57 | + </th> | |
45 | 58 | </tr> |
46 | 59 | </thead> |
47 | 60 | <tbody> |
... | ... | @@ -55,12 +68,15 @@ |
55 | 68 | <td> |
56 | 69 | {{medidaEntrada.unidadeMedida.tipoNumerico.descricao}} |
57 | 70 | </td> |
71 | + <td> | |
72 | + <input type="checkbox" ng-model="medidaEntrada.isPadrao" ng-disabled="true"/> | |
73 | + </td> | |
58 | 74 | </tr> |
59 | 75 | </tbody> |
60 | 76 | </table> |
61 | - | |
77 | + | |
62 | 78 | </div> |
63 | - | |
79 | + | |
64 | 80 | </div> |
65 | 81 | </div><!-- .row --> |
66 | 82 | </div><!-- .widget-main --> | ... | ... |