Commit 42db6471295f47c0ab7c67a2af40e8b808934fc3
Exists in
master
Merge branch 'tarefa-3822' of http://ferramentasgo.centralit.com.br:8080/scm/git…
…/cit-grp-almoxarifado into tarefa-3822 # Conflicts: # cit-almoxarifado-web/src/main/java/br/com/centralit/listener/StartupListenerAlmoxarifado.java # cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/AtendimentoRequisicaoConsumoListController.js # cit-almoxarifado-web/src/main/webapp/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoList.html
Showing
10 changed files
with
383 additions
and
140 deletions
Show diff stats
cit-almoxarifado-api/src/main/java/br/com/centralit/api/service/AtendimentoRequisicaoConsumoService.java
... | ... | @@ -65,4 +65,8 @@ public interface AtendimentoRequisicaoConsumoService extends GenericService<Aten |
65 | 65 | |
66 | 66 | boolean removerAtendimentoRequisicao(String idsRequisicaoConsumo, Long idOrganizacao); |
67 | 67 | |
68 | + Boolean finalizarRequisicoes(List<Long> idsRequisicao, Long idOrganizacao); | |
69 | + | |
70 | + Boolean excluirAtendimentos(List<Long> idsRequisicao, Long idOrganizacao); | |
71 | + | |
68 | 72 | } | ... | ... |
cit-almoxarifado-api/src/main/java/br/com/centralit/api/service/impl/AtendimentoRequisicaoConsumoServiceImpl.java
... | ... | @@ -6,6 +6,7 @@ import java.util.HashMap; |
6 | 6 | import java.util.List; |
7 | 7 | import java.util.Map; |
8 | 8 | |
9 | +import org.apache.commons.lang3.StringUtils; | |
9 | 10 | import org.springframework.beans.factory.annotation.Autowired; |
10 | 11 | import org.springframework.beans.factory.annotation.Qualifier; |
11 | 12 | import org.springframework.stereotype.Service; |
... | ... | @@ -19,6 +20,7 @@ import br.com.centralit.api.service.AtendimentoRequisicaoConsumoItemService; |
19 | 20 | import br.com.centralit.api.service.AtendimentoRequisicaoConsumoService; |
20 | 21 | import br.com.centralit.api.service.ContaContabilMovimentoService; |
21 | 22 | import br.com.centralit.api.service.DominioService; |
23 | +import br.com.centralit.api.service.InternacionalizacaoService; | |
22 | 24 | import br.com.centralit.api.service.MaterialConsumoService; |
23 | 25 | import br.com.centralit.api.service.MovimentoEstoqueService; |
24 | 26 | import br.com.centralit.api.service.ConfiguracaoParametroSistemaService; |
... | ... | @@ -27,6 +29,7 @@ import br.com.centralit.api.service.RequisicaoConsumoService; |
27 | 29 | import br.com.centralit.api.viewHelper.InformacoesAtendimentoVH; |
28 | 30 | import br.com.centralit.framework.exception.BusinessException; |
29 | 31 | import br.com.centralit.framework.exception.CodigoErro; |
32 | +import br.com.centralit.framework.model.Dominio; | |
30 | 33 | import br.com.centralit.framework.service.arquitetura.GenericServiceImpl; |
31 | 34 | import br.com.centralit.framework.util.UtilColecao; |
32 | 35 | import br.com.centralit.framework.util.UtilDate; |
... | ... | @@ -98,7 +101,19 @@ public class AtendimentoRequisicaoConsumoServiceImpl extends GenericServiceImpl< |
98 | 101 | |
99 | 102 | @Autowired |
100 | 103 | private ContaContabilMovimentoService contaContabilMovimentoService; |
104 | + | |
105 | + @Autowired | |
106 | + private InternacionalizacaoService internacionalizacaoService; | |
101 | 107 | |
108 | + private Dominio idioma; | |
109 | + | |
110 | + private Dominio getIdioma() { | |
111 | + if(!UtilObjeto.isReferencia(idioma)){ | |
112 | + idioma = this.dominioService.findByChaveAndCodigo("tipoIdioma", Dominio.TIPO_IDIOMA_PT_BR_CODIGO); | |
113 | + } | |
114 | + return idioma; | |
115 | + } | |
116 | + | |
102 | 117 | /** |
103 | 118 | * Responsável pela criação de novas instâncias desta classe. |
104 | 119 | * |
... | ... | @@ -462,4 +477,40 @@ public class AtendimentoRequisicaoConsumoServiceImpl extends GenericServiceImpl< |
462 | 477 | return true; |
463 | 478 | } |
464 | 479 | |
480 | + @Override | |
481 | + public Boolean finalizarRequisicoes(List<Long> idsRequisicao, Long idOrganizacao) { | |
482 | + for (Long idRequisicao : idsRequisicao) { | |
483 | + List<AtendimentoRequisicaoConsumo> listaAtendimentoPorRequisicaoConsumo = this.listaAtendimentoPorRequisicaoConsumo(idRequisicao, idOrganizacao); | |
484 | + for (AtendimentoRequisicaoConsumo atendimentoRequisicaoConsumo : listaAtendimentoPorRequisicaoConsumo) { | |
485 | + atendimentoRequisicaoConsumo.getRequisicaoConsumo().setTipoStatusRequisicao(this.dominioService.findByChaveAndCodigo(DominioAlmoxarifado.TIPO_STATUS_REQUISICAO, DominioAlmoxarifado.TIPO_STATUS_FINALIZADA)); | |
486 | + super.merge(atendimentoRequisicaoConsumo); | |
487 | + } | |
488 | + } | |
489 | + return true; | |
490 | + } | |
491 | + | |
492 | + @Override | |
493 | + public Boolean excluirAtendimentos(List<Long> idsRequisicao, Long idOrganizacao) { | |
494 | + for (Long idRequisicao : idsRequisicao) { | |
495 | + List<AtendimentoRequisicaoConsumo> listaAtendimentoPorRequisicaoConsumo = this.listaAtendimentoPorRequisicaoConsumo(idRequisicao, idOrganizacao); | |
496 | + StringBuilder mensagem = new StringBuilder(); | |
497 | + for (AtendimentoRequisicaoConsumo atendimentoRequisicaoConsumo : listaAtendimentoPorRequisicaoConsumo) { | |
498 | + if (!UtilDate.isDentroMes(atendimentoRequisicaoConsumo.getRequisicaoConsumo().getDataFinalizacaoAtendimento(), atendimentoRequisicaoConsumo.getRequisicaoConsumo().getOrganizacao().getDataReferenciaVigente())) { | |
499 | + String validacao = this.internacionalizacaoService.getTranslate("ALMOXARIFADO.VALIDACAO.DATA_FINALIZACAO_FORA_REFERENCIA", this.getIdioma()); | |
500 | + validacao = String.format(validacao, atendimentoRequisicaoConsumo.getRequisicaoConsumo().getNumeroRequisicao()); | |
501 | + validacao += "</br></br>"; | |
502 | + mensagem.append(validacao); | |
503 | + } | |
504 | + } | |
505 | + if(StringUtils.isNotBlank(mensagem.toString())){ | |
506 | + throw new BusinessException(mensagem.toString(), CodigoErro.REGRA_NEGOCIO.getValue()); | |
507 | + }else{ | |
508 | + for (AtendimentoRequisicaoConsumo atendimentoRequisicaoConsumo : listaAtendimentoPorRequisicaoConsumo) { | |
509 | + this.remove(atendimentoRequisicaoConsumo); | |
510 | + } | |
511 | + } | |
512 | + } | |
513 | + return true; | |
514 | + } | |
515 | + | |
465 | 516 | } | ... | ... |
cit-almoxarifado-web/src/main/java/br/com/centralit/controller/AtendimentoRequisicaoConsumoController.java
... | ... | @@ -10,10 +10,14 @@ import org.springframework.web.bind.annotation.RequestMethod; |
10 | 10 | import org.springframework.web.bind.annotation.RequestParam; |
11 | 11 | import org.springframework.web.bind.annotation.ResponseBody; |
12 | 12 | |
13 | +import com.googlecode.genericdao.search.Search; | |
14 | +import com.googlecode.genericdao.search.SearchResult; | |
15 | + | |
13 | 16 | import br.com.centralit.api.framework.json.ViewsAlmoxarifado; |
14 | 17 | import br.com.centralit.api.model.AtendimentoRequisicaoConsumo; |
15 | 18 | import br.com.centralit.api.model.RequisicaoConsumo; |
16 | 19 | import br.com.centralit.api.service.AtendimentoRequisicaoConsumoService; |
20 | +import br.com.centralit.api.viewHelper.AtendimentoVH; | |
17 | 21 | import br.com.centralit.api.viewHelper.InformacoesAtendimentoVH; |
18 | 22 | import br.com.centralit.framework.controller.GenericController; |
19 | 23 | import br.com.centralit.framework.dao.arquitetura.SearchSeven; |
... | ... | @@ -23,9 +27,6 @@ import br.com.centralit.framework.model.SearchParams; |
23 | 27 | import br.com.centralit.framework.view.GridVH; |
24 | 28 | import br.com.centralit.framework.view.ResultResponseVH; |
25 | 29 | |
26 | -import com.googlecode.genericdao.search.Search; | |
27 | -import com.googlecode.genericdao.search.SearchResult; | |
28 | - | |
29 | 30 | /** |
30 | 31 | * <p><img src="http://centralit.com.br/images/logo_central.png"></p> |
31 | 32 | * |
... | ... | @@ -195,5 +196,21 @@ public class AtendimentoRequisicaoConsumoController extends GenericController<At |
195 | 196 | |
196 | 197 | return new ResponseBodyWrapper(this.atendimentoRequisicaoConsumoService.removerAtendimentoRequisicao(idsRequisicaoConsumo, idOrganizacao), this.getEditView()); |
197 | 198 | } |
199 | + | |
200 | + @RequestMapping(value = "/finalizarRequisicoes", method = RequestMethod.POST, produces = "application/json") | |
201 | + @ResponseBody | |
202 | + public Boolean finalizarRequisicoes(@RequestBody AtendimentoVH atendimentoVH) { | |
203 | + | |
204 | + return this.atendimentoRequisicaoConsumoService.finalizarRequisicoes(atendimentoVH.getIdsRequisicao(), atendimentoVH.getIdOrganizacao()); | |
205 | + | |
206 | + } | |
207 | + | |
208 | + @RequestMapping(value = "/excluirAtendimentos", method = RequestMethod.POST, produces = "application/json") | |
209 | + @ResponseBody | |
210 | + public Boolean excluirAtendimentos(@RequestBody AtendimentoVH atendimentoVH) { | |
211 | + | |
212 | + return this.atendimentoRequisicaoConsumoService.excluirAtendimentos(atendimentoVH.getIdsRequisicao(), atendimentoVH.getIdOrganizacao()); | |
213 | + | |
214 | + } | |
198 | 215 | |
199 | 216 | } | ... | ... |
cit-almoxarifado-web/src/main/java/br/com/centralit/listener/StartupListenerAlmoxarifado.java
... | ... | @@ -322,6 +322,7 @@ public class StartupListenerAlmoxarifado extends UtilStartup implements Applicat |
322 | 322 | |
323 | 323 | internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.LABEL.ATENDIMENTO_S", "Atendimento(s)", dominio, modulo)); |
324 | 324 | internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.LABEL.BAIXA_S", "Baixa(s)", dominio, modulo)); |
325 | + internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.LABEL.EXCLUIR_ATENDIMENTO", "Excluir atendimento", dominio, modulo)); | |
325 | 326 | } |
326 | 327 | |
327 | 328 | private void gerarValidacao(Dominio dominio, Modulo modulo, List<Internacionalizacao> internacionalizacaoList) { |
... | ... | @@ -397,6 +398,14 @@ public class StartupListenerAlmoxarifado extends UtilStartup implements Applicat |
397 | 398 | internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.MSG.ENTRADA_ENDERECOS_ESTOQUE_DESVINCULADOS_MATERIAL", "Todos os materiais desta entrada tiveram seu endereço de estoque retirados!", dominio, modulo)); |
398 | 399 | internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.MSG.ENTRADA_ENDERECOS_ESTOQUE_PADRAO_VINCULADOS_MATERIAL", "Todos os materiais desta entrada que tinham endereços padrões neste almoxarifado foram vinculados a ele!", dominio, modulo)); |
399 | 400 | internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.MSG.EXCLUSAO_ULTIMO_ITEM_ENTRADA", "É necessário existir ao menos um item nesta lista, para continuar exclua a entrada inteira ou adicione outro item primeiro!", dominio, modulo)); |
401 | + | |
402 | + internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.MSG.FINALIZAR_ATENDIMENTO_SOMENTE_ATENDIMENTO_PARCIAL", "A finalização de atendimento somente é permitido para requisições com a situação igual a 'Atendida parcialmente'.", dominio, modulo)); | |
403 | + internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.MSG.EXCLUIR_ATENDIMENTO_SOMENTE_ATENDIMENTO_PARCIAL_FINALIZADA", "A exclusão de atendimento somente é permitido para requisições com a situação igual a 'Atendida parcialmente' ou 'Finalizada'.", dominio, modulo)); | |
404 | + internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.MSG.CONFIRMA_FINALIZAR_REQUISICAO", "Confirma finalização das requisições selecionados?", dominio, modulo)); | |
405 | + internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.MSG.CONFIRMA_EXCLUSAO_ATENDIMENTO_REQUISICAO", "Confirma exclusão dos atendimentos selecionados?", dominio, modulo)); | |
406 | + internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.MSG.NAO_PERMITIDO_ATENDER_REQUISICAO_FINALIZADA", "Atendimento não permitido pois há requisições finalizadas selecionadas para atendimento. Desmarque as requisições finalizadas e clique novamente em 'Atender'.", dominio, modulo)); | |
407 | + internacionalizacaoList.add(new Internacionalizacao("ALMOXARIFADO.VALIDACAO.DATA_FINALIZACAO_FORA_REFERENCIA", "Exclusão não permitida. Data de finalização da requisição %s fora da referência vigente.", dominio, modulo)); | |
408 | + | |
400 | 409 | } |
401 | 410 | } |
402 | 411 | ... | ... |
cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/AtendimentoRequisicaoConsumoController.js
... | ... | @@ -10,6 +10,7 @@ citApp.controller( 'AtendimentoRequisicaoConsumoController', |
10 | 10 | 'RequisicaoConsumoRepository', |
11 | 11 | 'EstruturaOrganizacionalAlmoxarifadoRepository', |
12 | 12 | 'DominioRepository', 'EstruturaOrganizacionalPatrimonioRepository', |
13 | + 'MaterialLocalEstoqueRepository', | |
13 | 14 | function AtendimentoRequisicaoConsumoController($scope, |
14 | 15 | $translate, |
15 | 16 | $timeout, |
... | ... | @@ -18,7 +19,8 @@ citApp.controller( 'AtendimentoRequisicaoConsumoController', |
18 | 19 | AtendimentoRequisicaoConsumoItemRepository, |
19 | 20 | RequisicaoConsumoRepository, |
20 | 21 | EstruturaOrganizacionalAlmoxarifadoRepository, |
21 | - DominioRepository, EstruturaOrganizacionalPatrimonioRepository) { | |
22 | + DominioRepository, EstruturaOrganizacionalPatrimonioRepository, | |
23 | + MaterialLocalEstoqueRepository) { | |
22 | 24 | |
23 | 25 | $scope.TIPO_STATUS_REQUISICAO = "tipoStatusRequisicao"; |
24 | 26 | |
... | ... | @@ -275,6 +277,7 @@ citApp.controller( 'AtendimentoRequisicaoConsumoController', |
275 | 277 | $scope.edit = true; |
276 | 278 | $scope.atendimentos = []; |
277 | 279 | $scope.idsRequisicoesSelecionados = []; |
280 | + $scope.atendimentoRequisicaoConsumo.dataAtendimento = new Date(); | |
278 | 281 | $scope.requisicoesSelecionadas = []; |
279 | 282 | $scope.requisicoesSelecionadas = listaSelecionados; |
280 | 283 | listaSelecionados.forEach(function(requisicao){ |
... | ... | @@ -310,23 +313,36 @@ citApp.controller( 'AtendimentoRequisicaoConsumoController', |
310 | 313 | result.forEach(function (requisicao) { |
311 | 314 | $scope.addRequisicaoConsumoAoAtendimento(requisicao.originalElement); |
312 | 315 | }); |
313 | - $scope.$openModal('/cit-almoxarifado-web/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoEditModal.html', 'lg'); | |
316 | + //$scope.$openModal('/cit-almoxarifado-web/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoEditModal.html', 'lg'); | |
317 | + $scope.$showPageEditWorkspace($scope.workspace); | |
314 | 318 | $scope.setLoading(false); |
315 | 319 | }); |
316 | 320 | } |
317 | 321 | |
318 | 322 | $scope.addRequisicaoConsumoAoAtendimento = function(req){ |
319 | 323 | var atendimento = {requisicaoConsumo : req}; |
320 | - if(atendimento.requisicaoConsumo.tipoStatusRequisicao.codigo == $scope.TIPO_STATUS_PRONTA_PARA_ATENDIMENTO | |
321 | - || atendimento.requisicaoConsumo.tipoStatusRequisicao.codigo == $scope.TIPO_STATUS_ATENDIDA_PARCIALMENTE){ | |
324 | + | |
325 | + if(atendimento.requisicaoConsumo.tipoStatusRequisicao.codigo == $scope.TIPO_STATUS_PRONTA_PARA_ATENDIMENTO || atendimento.requisicaoConsumo.tipoStatusRequisicao.codigo == $scope.TIPO_STATUS_ATENDIDA_PARCIALMENTE){ | |
326 | + | |
322 | 327 | atendimento.requisicaoConsumo.requisicaoConsumoItens.forEach(function (requisicaoConsumoItem) { |
323 | 328 | if(!atendimento.atendimentoRequisicaoConsumoItems){ |
324 | 329 | atendimento.atendimentoRequisicaoConsumoItems = []; |
325 | 330 | } |
331 | + | |
326 | 332 | var atendimentoItem = { |
327 | 333 | material : requisicaoConsumoItem.materialConsumo, |
328 | - requisicaoConsumoItem : requisicaoConsumoItem | |
334 | + requisicaoConsumoItem : requisicaoConsumoItem, | |
335 | + locaisEstoque: [] | |
329 | 336 | }; |
337 | + | |
338 | + MaterialLocalEstoqueRepository.buscarLocaisEstoquePorIdMaterialIdAlmoxarifado(requisicaoConsumoItem.materialConsumo.id, req.almoxarifado.id).then(function(result) { | |
339 | + atendimentoItem.locaisEstoque = result; | |
340 | + | |
341 | + result.forEach(function(localEstoque){ | |
342 | + if(localPrincipal) | |
343 | + }); | |
344 | + }); | |
345 | + | |
330 | 346 | atendimento.atendimentoRequisicaoConsumoItems.push(atendimentoItem); |
331 | 347 | }); |
332 | 348 | $scope.atendimentos.push(atendimento); | ... | ... |
cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/AtendimentoRequisicaoConsumoListController.js
... | ... | @@ -21,7 +21,7 @@ citApp.controller('AtendimentoRequisicaoConsumoListController', ['$scope', 'Aten |
21 | 21 | $scope.filterCriteria = { |
22 | 22 | start : 1, |
23 | 23 | dir : 'asc', |
24 | - sort : 'id', | |
24 | + sort : 'desc:numeroRequisicao;tipoStatusRequisicao.codigo', | |
25 | 25 | limit : 10, |
26 | 26 | fields: ['id', 'numeroRequisicao', 'tipoStatusRequisicao.descricao', 'dataRequisicao', 'unidadeRequisitante.nome', 'almoxarifado.nome', 'centroCusto.descricao', 'tipoStatusRequisicao.codigo'], |
27 | 27 | filters : [ {type : 'numeric-range', field : 'numeroRequisicao' } , |
... | ... | @@ -31,8 +31,8 @@ citApp.controller('AtendimentoRequisicaoConsumoListController', ['$scope', 'Aten |
31 | 31 | {type : 'string', field : 'almoxarifado.nome' } , |
32 | 32 | {type : 'string', field : 'centroCusto.descricao' }] |
33 | 33 | }; |
34 | - | |
35 | - $scope.filterCriteria.filters.push({type: 'string', field: 'tipoStatusRequisicao.nome', value: 'FINALIZADA', comparison: 'ne', notFilter : true}); | |
34 | + | |
35 | + $scope.filterCriteria.filters.push({type: 'string', field: 'tipoStatusRequisicao.nome', value: 'DEVOLVIDA', comparison: 'ne', notFilter : true}); | |
36 | 36 | $scope.filterCriteria.filters.push({type: 'string', field: 'tipoStatusRequisicao.nome', value: 'NAO_CONCLUIDA', comparison: 'ne', notFilter : true}); |
37 | 37 | }; |
38 | 38 | |
... | ... | @@ -41,7 +41,7 @@ citApp.controller('AtendimentoRequisicaoConsumoListController', ['$scope', 'Aten |
41 | 41 | DominioRepository.findAllDominio('tipoStatusRequisicao').then(function(result) { |
42 | 42 | var listaDominio = []; |
43 | 43 | angular.forEach(result, function(dominio){ |
44 | - if(dominio.nome != 'FINALIZADA' && dominio.nome != 'NAO_CONCLUIDA'){ | |
44 | + if(dominio.nome != 'NAO_CONCLUIDA' && dominio.nome != 'DEVOLVIDA'){ | |
45 | 45 | listaDominio.push(dominio) |
46 | 46 | } |
47 | 47 | |
... | ... | @@ -85,7 +85,96 @@ citApp.controller('AtendimentoRequisicaoConsumoListController', ['$scope', 'Aten |
85 | 85 | }; |
86 | 86 | |
87 | 87 | $scope.iniciarAtendimento = function(){ |
88 | - angular.element('#editAtendimentoRequisicaoConsumo').scope().prepararAtendimentoRequisicoes($scope.listaSelecionados); | |
88 | + | |
89 | + if($scope.listaSelecionados && $scope.listaSelecionados.length == 0) { | |
90 | + $scope.showAlert('warning', $translate.instant('MSG.SELECIONE_AO_MENOS_UM_ITEM')); | |
91 | + return; | |
92 | + } | |
93 | + | |
94 | + var permiteAtender = true; | |
95 | + angular.forEach($scope.listaSelecionados, function (requisicaoSelecionado) { | |
96 | + if(requisicaoSelecionado['tipoStatusRequisicao.codigo'] == 5){ | |
97 | + permiteAtender = false; | |
98 | + $scope.showAlert('warning', $translate.instant('ALMOXARIFADO.MSG.NAO_PERMITIDO_ATENDER_REQUISICAO_FINALIZADA')); | |
99 | + } | |
100 | + }); | |
101 | + | |
102 | + if(permiteAtender){ | |
103 | + angular.element('#editAtendimentoRequisicaoConsumo').scope().prepararAtendimentoRequisicoes($scope.listaSelecionados); | |
104 | + } | |
89 | 105 | }; |
90 | - | |
106 | + | |
107 | + function getIdsRequisicao(){ | |
108 | + $scope.idsSelecionados = []; | |
109 | + angular.forEach($scope.listaSelecionados, function (requisicaoSelecionado) { | |
110 | + $scope.idsSelecionados.push(requisicaoSelecionado.id); | |
111 | + }); | |
112 | + } | |
113 | + | |
114 | + $scope.finalizarRequisicao = function(){ | |
115 | + | |
116 | + if($scope.listaSelecionados && $scope.listaSelecionados.length == 0) { | |
117 | + $scope.showAlert('warning', $translate.instant('MSG.SELECIONE_AO_MENOS_UM_ITEM')); | |
118 | + return; | |
119 | + } | |
120 | + | |
121 | + var permiteFinalizar = true; | |
122 | + angular.forEach($scope.listaSelecionados, function (requisicaoSelecionado) { | |
123 | + if(requisicaoSelecionado['tipoStatusRequisicao.codigo'] != 1){ | |
124 | + permiteFinalizar = false; | |
125 | + $scope.showAlert('warning', $translate.instant('ALMOXARIFADO.MSG.FINALIZAR_ATENDIMENTO_SOMENTE_ATENDIMENTO_PARCIAL')); | |
126 | + } | |
127 | + }); | |
128 | + | |
129 | + if(permiteFinalizar){ | |
130 | + $scope.$openModalConfirm({ | |
131 | + message: $translate.instant('ALMOXARIFADO.MSG.CONFIRMA_FINALIZAR_REQUISICAO'), | |
132 | + callback: function () { | |
133 | + | |
134 | + getIdsRequisicao(); | |
135 | + var atendimentoVH = {idsRequisicao : $scope.idsSelecionados, idOrganizacao : $scope.usuarioLogado.organizacao.id}; | |
136 | + AtendimentoRequisicaoConsumoRepository.finalizarRequisicoes(atendimentoVH).then(function(result) { | |
137 | + $scope.$modalConfirmInstance.dismiss('cancel'); | |
138 | + $scope.showAlert('success', $translate.instant('MSG.MG001'), " ", false); | |
139 | + $scope.recarregar(); | |
140 | + }); | |
141 | + } | |
142 | + }); | |
143 | + } | |
144 | + | |
145 | + }; | |
146 | + | |
147 | + $scope.excluirAtendimento = function(){ | |
148 | + | |
149 | + if($scope.listaSelecionados && $scope.listaSelecionados.length == 0) { | |
150 | + $scope.showAlert('warning', $translate.instant('MSG.SELECIONE_AO_MENOS_UM_ITEM')); | |
151 | + return; | |
152 | + } | |
153 | + | |
154 | + var permiteExcluir = true; | |
155 | + angular.forEach($scope.listaSelecionados, function (requisicaoSelecionado) { | |
156 | + if(requisicaoSelecionado['tipoStatusRequisicao.codigo'] != 1 || requisicaoSelecionado['tipoStatusRequisicao.codigo'] != 5){ | |
157 | + permiteExcluir = false; | |
158 | + $scope.showAlert('warning', $translate.instant('ALMOXARIFADO.MSG.EXCLUIR_ATENDIMENTO_SOMENTE_ATENDIMENTO_PARCIAL_FINALIZADA')); | |
159 | + } | |
160 | + }); | |
161 | + | |
162 | + if(permiteExcluir){ | |
163 | + $scope.$openModalConfirm({ | |
164 | + message: $translate.instant('ALMOXARIFADO.MSG.CONFIRMA_EXCLUSAO_ATENDIMENTO_REQUISICAO'), | |
165 | + callback: function () { | |
166 | + | |
167 | + getIdsRequisicao(); | |
168 | + var atendimentoVH = {idsRequisicao : $scope.idsSelecionados, idOrganizacao : $scope.usuarioLogado.organizacao.id}; | |
169 | + AtendimentoRequisicaoConsumoRepository.excluirAtendimentos(atendimentoVH).then(function(result) { | |
170 | + $scope.$modalConfirmInstance.dismiss('cancel'); | |
171 | + $scope.showAlert('success', $translate.instant('MSG.MG001'), " ", false); | |
172 | + $scope.recarregar(); | |
173 | + }); | |
174 | + } | |
175 | + }); | |
176 | + } | |
177 | + | |
178 | + }; | |
179 | + | |
91 | 180 | }]); |
92 | 181 | \ No newline at end of file | ... | ... |
cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/repository/AtendimentoRequisicaoConsumoRepository.js
... | ... | @@ -21,7 +21,15 @@ citApp.factory('AtendimentoRequisicaoConsumoRepository', ['RestangularAlmoxarifa |
21 | 21 | this.removerAtendimentoRequisicao = function (idsRequisicaoConsumo, idOrganizacao) { |
22 | 22 | return this.restangular.one(this.route +'/removerAtendimentoRequisicao').get({idsRequisicaoConsumo : idsRequisicaoConsumo, idOrganizacao : idOrganizacao}).then(); |
23 | 23 | }; |
24 | - | |
24 | + | |
25 | + this.finalizarRequisicoes = function(atendimentoVH){ | |
26 | + return restangularAlmoxarifado.all(this.route + '/finalizarRequisicoes').post(atendimentoVH).then(); | |
27 | + }; | |
28 | + | |
29 | + this.excluirAtendimentos = function(atendimentoVH){ | |
30 | + return restangularAlmoxarifado.all(this.route + '/excluirAtendimentos').post(atendimentoVH).then(); | |
31 | + }; | |
32 | + | |
25 | 33 | } |
26 | 34 | |
27 | 35 | AbstractRepository.extend(AtendimentoRequisicaoConsumoRepository); | ... | ... |
cit-almoxarifado-web/src/main/webapp/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoEdit.html
... | ... | @@ -43,120 +43,170 @@ |
43 | 43 | </p> |
44 | 44 | <div class="modal-body"> |
45 | 45 | |
46 | - <fieldset> | |
47 | - <legend><translate>ALMOXARIFADO.LABEL.DADOS_REQUISICAO_CONSUMO</translate></legend> | |
48 | - <div class="row"> | |
49 | - <div class="col-md-4"> | |
50 | - <label-input-number ng-id="requisicaoConsumo.numeroRequisicao" ng-label="ALMOXARIFADO.LABEL.NUMERO_REQUISICAO" | |
51 | - ng-model="requisicaoConsumo.numeroRequisicao" | |
52 | - ng-obrigatorio="false" ng-disabled="true" /> | |
53 | - </div> | |
54 | - <div class="col-md-4"> | |
55 | - <label-input ng-id="requisicaoConsumo.tipoStatusRequisicao.descricao" ng-label="LABEL.SITUACAO" | |
56 | - ng-model="requisicaoConsumo.tipoStatusRequisicao.descricao" ng-disabled="true" /> | |
57 | - </div> | |
58 | - <div class="col-md-4"> | |
59 | - <label-input-data ng-id="requisicaoConsumo.dataRequisicao" ng-label="ALMOXARIFADO.LABEL.DATA_REQUISICAO" | |
60 | - ng-model="requisicaoConsumo.dataRequisicao" ng-disabled="true" | |
61 | - ng-mode="day" ng-format="dd/MM/yyyy" /> | |
62 | - </div> | |
63 | - </div> | |
64 | - <div class="col-sm-12" style="margin-top: 20px"> | |
65 | - <div class="row margin-top"> | |
66 | - <div class="col-sm-12"> | |
67 | - <div class="panel panel-default"> | |
68 | - <!-- .panel-heading --> | |
69 | - <table class="table table-striped table-bordered table-hover"> | |
70 | - <thead> | |
71 | - <tr> | |
72 | - <th width="45%" class="text-center"><translate>LABEL.DESCRICAO</translate></th> | |
73 | - <th width="25%" class="text-center"><translate>LABEL.UNIDADE_MEDIDA</translate></th> | |
74 | - <th width="25%" class="text-center"><translate>ALMOXARIFADO.LABEL.QUANTIDADE_REQUERIDA</translate></th> | |
75 | - | |
76 | - </tr> | |
77 | - </thead> | |
78 | - <tbody> | |
79 | - <tr ng-repeat="requisicaoConsumoItem in requisicaoConsumo.requisicaoConsumoItens"> | |
80 | - <td class="text-center">{{requisicaoConsumoItem.materialConsumo.descricao}}</td> | |
81 | - <td class="text-center">{{requisicaoConsumoItem.materialConsumo.unidadeArmazenamento.descricao}}</td> | |
82 | - <td> | |
83 | - <div class="col-md-12"> | |
84 | - <label-input-decimal ng-id="requisicaoConsumoItem.quantidade$index" | |
85 | - ng-model="requisicaoConsumoItem.quantidade" form="requisicaoConsumoForm" ng-disabled="true" ng-custom-maxlength="14" | |
86 | - ng-precisao="requisicaoConsumoItem.materialConsumo.unidadeArmazenamento.tipoNumerico.codigo === 1 ? 0 : 2"/> | |
87 | - </div> | |
88 | - </td> | |
89 | - </tr> | |
90 | - <tr ng-hide="requisicaoConsumo.requisicaoConsumoItens.length > 0"> | |
91 | - <td colspan="4" class="text-center"><translate>LABEL.TABELA_VAZIA</translate></td> | |
92 | - </tr> | |
93 | - </tbody> | |
94 | - </table> | |
95 | - <div class="row"> | |
96 | - <div class="col-sm-4 text-left"> | |
97 | - <a ng-href="#top"></a> | |
46 | + <fieldset id="tableAtendimentos" ng-show="atendimentos.length > 0"> | |
47 | + <legend id="top"> | |
48 | + <label ng-class="{'has-error' : formDialogAtendimento.$submitted && atendimentos && atendimentos.length < 1}"> | |
49 | + <translate>ALMOXARIFADO.LABEL.DADOS_ATENDIMENTO_REQUISICAO_CONSUMO</translate> | |
50 | + <span class='red'>*</span> <i ng-show="formDialogAtendimento.$submitted && atendimentos && atendimentos.length < 1" | |
51 | + class='fa fa-warning red' | |
52 | + tooltip="{{$translate.instant('DADOS_ATENDIMENTO_REQUISICAO_CONSUMO') + ' ' +$translate.instant('LABEL.CAMPO_OBRIGATORIO')}}" | |
53 | + tooltip-placement='top'></i> | |
54 | + </label> | |
55 | + </legend> | |
56 | + <!-- <div class="row"> --> | |
57 | + <!-- <div class="col-sm-12"> --> | |
58 | + <!-- <auto-complete ng-id="almoxarifado" ng-label="ALMOXARIFADO.LABEL.ALMOXARIFADO" ng-model="estruturaAlmoxarifadoPadrao" ng-obrigatorio="true" ng-find="findAutoCompleteAlmoxarifado(value)" ng-item="item.nome + ' - ' + item.classificacao" /> --> | |
59 | + <!-- </div> --> | |
60 | + <!-- </div> --> | |
61 | + <div class="row"> | |
62 | + <div class="col-md-6"> | |
63 | + <label-input-data ng-id="atendimentoRequisicaoConsumo.dataAtendimento" ng-label="ALMOXARIFADO.LABEL.DATA_ATENDIMENTO" | |
64 | + ng-model="atendimentoRequisicaoConsumo.dataAtendimento" form="formDialogAtendimento" ng-obrigatorio="true" | |
65 | + ng-disabled="!edit" ng-mode="day" ng-format="dd/MM/yyyy" /> | |
66 | + </div> | |
67 | + </div> | |
68 | + <div class="row" style="margin-top: 20px" ng-repeat="atendimento in atendimentos"> | |
69 | + <div class="widget-box margin-bottom"> | |
70 | + <div class="widget-header"> | |
71 | + <h2 class="widget-title" style="font-size: 16px !important"> | |
72 | + <label><translate>ALMOXARIFADO.LABEL.REQUISICAO</translate>: {{atendimento.requisicaoConsumo.numeroRequisicao}}</label> | |
73 | + </h2> | |
74 | + <div class="widget-toolbar"> | |
75 | + <a href="#void" ng-click="widgetAtendimentoCollapsed = !widgetAtendimentoCollapsed"> | |
76 | + <i class="fa" ng-class="{'fa-chevron-up': widgetAtendimentoCollapsed, 'fa-chevron-down': !widgetAtendimentoCollapsed}"></i> | |
77 | + </a> | |
78 | + </div> | |
79 | + </div> | |
80 | + <div collapse="!widgetAtendimentoCollapsed" class="widget-body"> | |
81 | + <div class="widget-main clearfix"> | |
82 | + <div class="row"> | |
83 | + <div class="col-md-3"> | |
84 | + <label-input-number ng-id="atendimento.requisicaoConsumo.numeroRequisicao$index" ng-label="ALMOXARIFADO.LABEL.NUMERO_ATENDIMENTO" | |
85 | + ng-model="atendimento.requisicaoConsumo.numeroRequisicao" ng-disabled="true" /> | |
86 | + </div> | |
87 | + <div class="col-md-3"> | |
88 | + <label-input ng-type="text" ng-id="atendimento.requisicaoConsumo.tipoStatusRequisicao.descricao$index" ng-label="ALMOXARIFADO.LABEL.STATUS_ATUAL" | |
89 | + ng-model="atendimento.requisicaoConsumo.tipoStatusRequisicao.descricao" ng-disabled="true" /> | |
90 | + </div> | |
91 | + <div class="col-md-3"> | |
92 | + <label-input ng-type="text" ng-id="atendimento.requisicaoConsumo.dataRequisicao$index" ng-label="ALMOXARIFADO.LABEL.DATA_REQUISICAO" | |
93 | + ng-model="atendimento.requisicaoConsumo.dataRequisicao" ng-disabled="true" /> | |
94 | + </div> | |
95 | + </div> | |
96 | + <div class="row"> | |
97 | + <div class="col-md-6"> | |
98 | + <label-input ng-type="text" ng-id="atendimento.requisicaoConsumo.almoxarifado.codigoENome$index" ng-label="ALMOXARIFADO.LABEL.ALMOXARIFADO" | |
99 | + ng-model="atendimento.requisicaoConsumo.almoxarifado.codigoENome" ng-disabled="true" /> | |
100 | + </div> | |
101 | + <div class="col-md-6"> | |
102 | + <label-input ng-type="text" ng-id="atendimento.requisicaoConsumo.unidadeRequisitante.codigoENome$index" ng-label="ALMOXARIFADO.LABEL.UNIDADE_REQUISITANTE" | |
103 | + ng-model="atendimento.requisicaoConsumo.unidadeRequisitante.codigoENome" ng-disabled="true" /> | |
104 | + </div> | |
105 | + </div> | |
106 | + <div class="row margin-top"> | |
107 | + <div class="col-sm-12"> | |
108 | + <div class="panel panel-default"> | |
109 | + <!-- .panel-heading --> | |
110 | + <table class="table table-striped table-bordered table-hover"> | |
111 | + <thead> | |
112 | + <tr> | |
113 | + <th class="text-center" ng-show="edit"><translate>ALMOXARIFADO.LABEL.INFO</translate></th> | |
114 | + <th class="text-center" width="30%"><translate>LABEL.MATERIAL</translate></th> | |
115 | + <th class="text-center"><translate>LABEL.UNIDADE_MEDIDA</translate></th> | |
116 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.QTD_EM_ESTOQUE</translate></th> | |
117 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.QTD_FORNECIDA_REQUISICAO</translate></th> | |
118 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.QUANTIDADE_PEDIDA</translate></th> | |
119 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.QUANTIDADE_ATENDIDA</translate></th> | |
120 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.ENDERECO_ESTOQUE</translate></th> | |
121 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.ATENDER</translate><span class="red">*</span></th> | |
122 | + </tr> | |
123 | + </thead> | |
124 | + <tbody> | |
125 | + <tr ng-repeat-start="atendimentoRequisicaoConsumoItem in atendimento.atendimentoRequisicaoConsumoItems"> | |
126 | + <td class="text-center" ng-show="edit"> | |
127 | + <button type="button" ng-click="buscarInformacoesParaAtendimento(atendimentoRequisicaoConsumoItem)"> | |
128 | + <i class="ace-icon fa {{atendimentoRequisicaoConsumoItem.$verInfo ? 'fa-minus' : 'fa-plus'}} bigger-125"></i> | |
129 | + </button> | |
130 | + </td> | |
131 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.material.descricao}}</td> | |
132 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.material.unidadeArmazenamento.sigla}}</td> | |
133 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.qtdEstoque}}</td> | |
134 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.qtdFornecidaUltimaRequisicao}}</td> | |
135 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.requisicaoConsumoItem.quantidade}}</td> | |
136 | + <td class="text-center" ng-show="novoAtendimento">{{atendimentoRequisicaoConsumoItem.requisicaoConsumoItem.quantidadeAtendida | |
137 | + ? atendimentoRequisicaoConsumoItem.requisicaoConsumoItem.quantidadeAtendida : 0}}</td> | |
138 | + <td class="text-center" ng-hide="novoAtendimento">{{atendimentoRequisicaoConsumoItem.requisicaoConsumoItem.quantidadeAtendida | |
139 | + - atendimentoRequisicaoConsumoItem.$quantidade}}</td> | |
140 | + | |
141 | + <td class="text-center"> | |
142 | + <label-select ng-id="atendimentoRequisicaoConsumoItem.localEstoque$index" ng-obrigatorio="true" | |
143 | + ng-model="atendimentoRequisicaoConsumoItem.localEstoque" ng-list="atendimentoRequisicaoConsumoItem.locaisEstoque" | |
144 | + form="formDialogAtendimento" | |
145 | + ng-custom-options="localEstoque as localEstoque.endereco.descricao for localEstoque"></label-select> | |
146 | + | |
147 | + </td> | |
148 | + | |
149 | + <td ng-if="atendimentoRequisicaoConsumoItem.requisicaoConsumoItem.quantidade != atendimentoRequisicaoConsumoItem.requisicaoConsumoItem.quantidadeAtendida" class="text-center"> | |
150 | + <label-input-decimal ng-id="atendimentoRequisicaoConsumoItem.quantidade$index" ng-obrigatorio="true" ng-evento-blur="aplicarValidacaoDecimal" | |
151 | + ng-model="atendimentoRequisicaoConsumoItem.quantidade" form="formDialogAtendimento" ng-disabled="!edit" ng-custom-maxlength="{{atendimentoRequisicaoConsumoItem.material.unidadeArmazenamento.tipoNumerico.codigo === 1 ? 4 : 11}}" | |
152 | + ng-precisao="{{atendimentoRequisicaoConsumoItem.material.unidadeArmazenamento.tipoNumerico.codigo === 1 ? 0 : 'decimal'}}" /> | |
153 | + </td> | |
154 | + <td class="text-center" ng-show="atendimentoRequisicaoConsumoItem.requisicaoConsumoItem.quantidade == atendimentoRequisicaoConsumoItem.requisicaoConsumoItem.quantidadeAtendida"> | |
155 | + <i class='fa fa-check green' tooltip="{{$translate.instant('ALMOXARIFADO.LABEL.ATENDIDA')}}"></i> | |
156 | + </td> | |
157 | + | |
158 | + </tr> | |
159 | + <tr ng-show="atendimentoRequisicaoConsumoItem.$verInfo == true" class="table-subgrid" ng-repeat-end> | |
160 | + <td colspan="9"> | |
161 | + <table class="table table-bordered table-striped"> | |
162 | + <thead> | |
163 | + <tr> | |
164 | + <th class="text-center" colspan="1"><translate>LABEL.GERAL</translate></th> | |
165 | + <th class="text-center" colspan="8"><translate>ALMOXARIFADO.LABEL.UNIDADE_REQUISITANTE</translate></th> | |
166 | + </tr> | |
167 | + <tr> | |
168 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.QTD_EM_ESTOQUE</translate></th> | |
169 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.CONSUMO_MEDIO_MENSAL</translate></th> | |
170 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.CONSUMO_EXERCICIO_ANTERIOR</translate></th> | |
171 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.CONSUMO_EXERCICIO_ATUAL</translate></th> | |
172 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.CONSUMO_12_MESES</translate></th> | |
173 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.CONSUMO_MEDIO_MENSAL</translate></th> | |
174 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.NUMERO_ULTIMA_REQUISICAO</translate></th> | |
175 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.DATA_ULTIMA_REQUISICAO</translate></th> | |
176 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.QTD_REQUERIDA_REQUISICAO</translate></th> | |
177 | + <th class="text-center"><translate>ALMOXARIFADO.LABEL.QTD_FORNECIDA_REQUISICAO</translate></th> | |
178 | + </tr> | |
179 | + </thead> | |
180 | + <tbody> | |
181 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.qtdEstoque}}</td> | |
182 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.consumoMedioMensalMaterial}}</td> | |
183 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.consumoExercicioAnterior}}</td> | |
184 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.consumoExercicioAtual}}</td> | |
185 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.consumo12meses}}</td> | |
186 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.consumoMedioMensalUR}}</td> | |
187 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.numeroUltimaRequisicao}}</td> | |
188 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.dataUltimaRequisicao | dateBR}}</td> | |
189 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.qtdRequeridaUltimaRequisicao}}</td> | |
190 | + <td class="text-center">{{atendimentoRequisicaoConsumoItem.$info.qtdFornecidaUltimaRequisicao}}</td> | |
191 | + </tbody> | |
192 | + </table> | |
193 | + </td> | |
194 | + </tr> | |
195 | + </tbody> | |
196 | + </table> | |
197 | + <div class="row"> | |
198 | + <div class="col-sm-4 text-left"> | |
199 | + <a ng-href="#top"></a> | |
200 | + </div> | |
201 | + </div> | |
202 | + </div> | |
203 | + </div> | |
98 | 204 | </div> |
99 | 205 | </div> |
100 | 206 | </div> |
101 | 207 | </div> |
102 | 208 | </div> |
103 | - </div> | |
104 | - </fieldset> | |
105 | - | |
106 | - <fieldset> | |
107 | - | |
108 | - <legend id="top"> | |
109 | - <label ng-class="{'has-error' : formDialogAtendimento.$submitted && atendimentos && atendimentos.length < 1}"> | |
110 | - <translate>ALMOXARIFADO.LABEL.DADOS_ATENDIMENTO</translate> | |
111 | - <span class='red'>*</span> <i ng-show="formDialogAtendimento.$submitted && atendimentos && atendimentos.length < 1" | |
112 | - class='fa fa-warning red' | |
113 | - tooltip="{{$translate.instant('DADOS_ATENDIMENTO_REQUISICAO_CONSUMO') + ' ' +$translate.instant('LABEL.CAMPO_OBRIGATORIO')}}" | |
114 | - tooltip-placement='top'></i> | |
115 | - </label> | |
116 | - </legend> | |
117 | - <div class="row"> | |
118 | - <table class="table table-striped table-bordered table-hover"> | |
119 | - <thead> | |
120 | - <tr> | |
121 | - <th width="5%" class="text-center"> </th> | |
122 | - <th class="text-center"><translate>ALMOXARIFADO.LABEL.NUMERO_ATENDIMENTO</translate></th> | |
123 | - <th class="text-center"><translate>ALMOXARIFADO.LABEL.DATA_ATENDIMENTO</translate></th> | |
124 | - </tr> | |
125 | - </thead> | |
126 | - <tbody> | |
127 | - <tr ng-repeat-start="atendimento in atendimentos"> | |
128 | - <td class="text-center"> | |
129 | - <button type="button" ng-click="apresentarInfoAtendimentoItem(atendimento)"> | |
130 | - <i class="ace-icon fa {{atendimento.$verInfo ? 'fa-minus' : 'fa-plus'}} bigger-125"></i> | |
131 | - </button> | |
132 | - </td> | |
133 | - <td class="text-center">{{atendimento.numeroAtendimento}}</td> | |
134 | - <td class="text-center">{{atendimento.dataAtendimento}}</td> | |
135 | - </tr> | |
136 | - <tr ng-show="atendimento.$verInfo == true" class="table-subgrid" ng-repeat-end> | |
137 | - <td colspan="6"> | |
138 | - <table class="table table-bordered table-striped"> | |
139 | - <thead> | |
140 | - <tr> | |
141 | - <th class="text-center"><translate>LABEL.MATERIAL</translate></th> | |
142 | - <th class="text-center"><translate>ALMOXARIFADO.LABEL.QUANTIDADE_ATENDIDA</translate></th> | |
143 | - </tr> | |
144 | - </thead> | |
145 | - <tbody> | |
146 | - <tr ng-repeat="atendimentoItem in atendimento.atendimentoRequisicaoConsumoItems"> | |
147 | - <td style="width: 56%" class="text-center">{{atendimentoItem.material.descricao}}</td> | |
148 | - <td class="text-center"><label-input-decimal ng-id="atendimentoItem.quantidade$index" ng-obrigatorio="true" | |
149 | - ng-model="atendimentoItem.quantidade" ng-custom-maxlength="14" ng-disabled="!edit" | |
150 | - ng-precisao="atendimentoItem.material.unidadeArmazenamento.tipoNumerico.codigo === 1 ? 0 : 2" /></td> | |
151 | - </tr> | |
152 | - </tbody> | |
153 | - </table> | |
154 | - </td> | |
155 | - </tr> | |
156 | - </tbody> | |
157 | - </table> | |
158 | - </div> | |
159 | - </fieldset> | |
160 | - </div> | |
209 | + </fieldset> | |
210 | + </div> | |
161 | 211 | </form> |
162 | 212 | </div> | ... | ... |
cit-almoxarifado-web/src/main/webapp/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoEditModal.html
... | ... | @@ -13,10 +13,9 @@ |
13 | 13 | </li> |
14 | 14 | </ul> |
15 | 15 | </div> |
16 | - <button ng-click="$dismiss('cancel');" class="btn btn-clear"> | |
17 | - <i class="fa fa-times red"></i> | |
18 | - <translate>LABEL.FECHAR</translate> | |
19 | - </button> | |
16 | + <button class="btn btn-clear" ng-click="$showPageSearchWorkspace(workspace); atualizaPaginaPesquisa();"> | |
17 | + <i class="fa fa-search"></i> <translate>LABEL.PESQUISAR</translate> | |
18 | + </button> | |
20 | 19 | </div><!-- .modal-header --> |
21 | 20 | |
22 | 21 | <div class="modal-body"> | ... | ... |
cit-almoxarifado-web/src/main/webapp/html/atendimentoRequisicaoConsumo/atendimentoRequisicaoConsumoList.html
... | ... | @@ -5,23 +5,23 @@ |
5 | 5 | |
6 | 6 | <button class="btn btn-clear" ng-click="iniciarAtendimento();"> |
7 | 7 | <i class="fa fa-plus-circle yellow-dark"></i> |
8 | - <translate>ALMOXARIFADO.LABEL.INICIAR_ATENDIMENTO</translate> | |
8 | + <translate>ALMOXARIFADO.LABEL.ATENDER</translate> | |
9 | 9 | </button> |
10 | 10 | |
11 | - <button ng-show="listaSelecionados.length == 1" class="btn btn-clear" ng-click="abrirVisualizar(false);"> | |
12 | - <i class="fa fa-search blue"></i> | |
13 | - <translate>LABEL.VISUALIZAR</translate> | |
11 | + <button class="btn btn-clear" ng-click="finalizarRequisicao();"> | |
12 | + <i class="fa fa-file-text-o green"></i> | |
13 | + <translate>ALMOXARIFADO.LABEL.FINALIZAR_REQUISICAO</translate> | |
14 | 14 | </button> |
15 | 15 | |
16 | - <button ng-show="listaSelecionados.length == 1" class="btn btn-clear" ng-click="abrirVisualizar(true);"> | |
17 | - <i class="fa fa-pencil blue"></i> | |
18 | - <translate>LABEL.EDITAR</translate> | |
16 | + <button class="btn btn-clear" ng-click="excluirAtendimento()"> | |
17 | + <i class="fa fa-times red"></i> | |
18 | + <translate>ALMOXARIFADO.LABEL.EXCLUIR_ATENDIMENTO</translate> | |
19 | 19 | </button> |
20 | 20 | |
21 | -<!-- <button class="btn btn-clear" ng-click="removerAtendimentoRequisicao();"> --> | |
22 | -<!-- <i class="fa fa-times red"></i> --> | |
23 | -<!-- <translate>LABEL.REMOVER</translate> --> | |
24 | -<!-- </button> --> | |
21 | + <button ng-show="listaSelecionados.length == 1" class="btn btn-clear" ng-click="abrirVisualizar(false);"> | |
22 | + <i class="fa fa-search blue"></i> | |
23 | + <translate>LABEL.VISUALIZAR</translate> | |
24 | + </button> | |
25 | 25 | |
26 | 26 | <span class="divider-vertical"></span> |
27 | 27 | ... | ... |