Linha 158: |
Linha 158: |
| <syntaxhighlight lang="javascript"> | | <syntaxhighlight lang="javascript"> |
| /* JS CUSTOMIZADO */ | | /* JS CUSTOMIZADO */ |
− | if ( ( objeto.CodColigada == "31" && objeto.CodTipoAtendimento == "5" ) || ( objeto.CodColigada == "32" && objeto.CodTipoAtendimento == "5") ) {
| + | if ((objeto.CodColigada == "31" && objeto.CodTipoAtendimento == "5") || (objeto.CodColigada == "32" && objeto.CodTipoAtendimento == "5")) { |
− | let contParametros = 0;
| + | let contParametros = 0; |
− | self.model.ListCamposDinamicos.forEach(function (element) {
| + | self.model.ListCamposDinamicos.forEach(function (element) { |
− | if ( element.Valor ) { | + | if (element.Valor) { |
| contParametros = contParametros + 1; | | contParametros = contParametros + 1; |
| } | | } |
| }) | | }) |
− | if ( contParametros>0 ) { | + | if (contParametros > 0) { |
− | eduRequerimentosFactory.calcularValorReq(contParametros, self.contexto.cursoSelecionado.CODCOLIGADA, self.contexto.cursoSelecionado.RA, self.contexto.cursoSelecionado.IDHABILITACAOFILIAL, self.contexto.cursoSelecionado.IDPERLET, function(retornoMiddleware){
| + | eduRequerimentosFactory.calcularValorReq(contParametros, self.contexto.cursoSelecionado.CODCOLIGADA, self.contexto.cursoSelecionado.RA, self.contexto.cursoSelecionado.IDHABILITACAOFILIAL, self.contexto.cursoSelecionado.IDPERLET, function (retornoMiddleware) { |
− | if ( angular.isDefined(retornoMiddleware) ) {
| + | if (angular.isDefined(retornoMiddleware)) { |
− | self.model.Requerimento.VALOR = retornoMiddleware.Resultado.VALOR;
| + | self.model.Requerimento.VALOR = retornoMiddleware.Resultado.VALOR; |
− | self.model.RequerimentoSolicitacao.VALORTOTAL = retornoMiddleware.Resultado.VALOR;
| + | self.model.RequerimentoSolicitacao.VALORTOTAL = retornoMiddleware.Resultado.VALOR; |
− | }
| + | } |
− | });
| + | }); |
| } | | } |
| } | | } |