(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-controle-liberacao-lote-liberacao-lote-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-ajuste/liberacao-lote-ajuste.component.html":
/*!************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-ajuste/liberacao-lote-ajuste.component.html ***!
  \************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"liberacao-lote-ajuste-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-45\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.ajusteDeAutorizacao' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"quantidDoc\">{{'labels.quantidDoc' | translate}}</label>\r\n                                <input id=\"quantidDoc\" name=\"quantidDoc\"\r\n                                       [(ngModel)]=\"data.quantid\"\r\n                                       class=\"form-control form-control-sm\" type=\"text\"\r\n                                       currencyMask\r\n                                       [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                       (blur)=\"validateQtde()\">\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"pesoDocto\">{{'labels.pesoDocto' | translate}}</label>\r\n                                <input id=\"pesoDocto\" name=\"pesoDocto\"\r\n                                       [(ngModel)]=\"data.peso\"\r\n                                       class=\"form-control form-control-sm\" type=\"text\"\r\n                                       currencyMask\r\n                                       [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                       (blur)=\"validatePeso()\">\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"totItem\">{{'labels.vlDocumento' | translate}}</label>\r\n                                <input id=\"totItem\" name=\"totItem\"\r\n                                       [(ngModel)]=\"data.totItem\"\r\n                                       class=\"form-control form-control-sm\" type=\"text\"\r\n                                       currencyMask\r\n                                       [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                       disabled>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.ok' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">cancelar</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>\r\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-erros/liberacao-lote-erros.component.html":
/*!**********************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-erros/liberacao-lote-erros.component.html ***!
  \**********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"liberacao-lote-erros-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"modal-dialog modal-lg\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.errosGeracaoRecebimento' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <table class=\"table table-hover\">\r\n                        <thead>\r\n                            <tr>\r\n                                <th>{{ 'labels.autorizacao' | translate }}</th>\r\n                                <th>{{ 'labels.lote' | translate }}</th>\r\n                                <th>{{ 'labels.cliente' | translate }}</th>\r\n                                <th>{{ 'labels.erro' | translate }}</th>\r\n                            </tr>\r\n                        </thead>\r\n                        <tbody>\r\n                            <tr *ngFor=\"let item of dados\">\r\n                                <td>{{ item.autorizacao }}</td>\r\n                                <td>{{ item.lote }}</td>\r\n                                <td>{{ item.fantasia }}</td>\r\n                                <td style=\"white-space: pre-wrap;\">{{ item.msgErro }}</td>\r\n                            </tr>\r\n                        </tbody>\r\n                    </table>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.ok' | translate }}\r\n                    </button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-filter/liberacao-lote-filter.component.html":
/*!************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-filter/liberacao-lote-filter.component.html ***!
  \************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"liberacao-lote-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-60\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.pesquisaDeLiberacaoLote' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes class=\"us-validacoes\"></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <ul class=\"nav nav-tabs\" id=\"tab\">\r\n                        <li class=\"nav-item\">\r\n                            <a class=\"nav-link active show\" data-toggle=\"tab\" href=\"#principal\">{{\"labels.principal\" |\r\n                                translate}}</a>\r\n                        </li>\r\n                        <li class=\"nav-item\" *ngIf=\"service.filtro.geraIndividual === 'N'\">\r\n                            <a class=\"nav-link\" data-toggle=\"tab\" href=\"#adicional\">{{\"labels.adicional\" |\r\n                                translate}}</a>\r\n                        </li>\r\n                    </ul>\r\n                    <div class=\"tab-content top\">\r\n                        <div class=\"tab-pane active show\" id=\"principal\" tabindex=\"0\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-9\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <app-pesquisa-destinatario id=\"cliente\" name=\"cliente\" tipoDestinatario=\"C\"\r\n                                            modalTitle=\"pesquisaDeCliente\" label=\"cliente\"\r\n                                            [required]=\"service.filtro.geraIndividual === 'N'? true: false\"\r\n                                            [(ngModel)]=\"service.filtro.destinatarioIdCliente\" showInscricao=\"false\"\r\n                                            showCgcCpf=\"false\" [inSelected]=\"service.filtro.cliente\"\r\n                                            data-aba=\"principal\"\r\n                                            (outModel)=\"!!$event ? service.filtro.cliente = $event : ''\"\r\n                                            (outSelected)=\"trataEmitente()\"\r\n                                            >\r\n                                        </app-pesquisa-destinatario>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-9\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <app-pesquisa-material id=\"materialId\" name=\"materialId\" label=\"produto\"\r\n                                            modalTitle=\"pesquisaDeProduto\"\r\n                                            [required]=\"service.filtro.geraIndividual === 'N'? true: false\"\r\n                                            [(ngModel)]=\"service.filtro.materialId\"\r\n                                            [inSelected]=\"service.filtro.material\" data-aba=\"principal\"\r\n                                            (outModel)=\"!!$event ? service.filtro.material = $event : ''\">\r\n                                        </app-pesquisa-material>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-9\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <app-pesquisa-destinatario id=\"emitente\" name=\"emitente\" tipoDestinatario=\"C\"\r\n                                            modalTitle=\"pesquisaDeEmitente\" label=\"emitente\"\r\n                                            [(ngModel)]=\"service.filtro.destinatarioIdEmitente\" showInscricao=\"false\"\r\n                                            showCgcCpf=\"false\" \r\n                                            [inSelected]=\"service.filtro.emitente\"\r\n                                            data-aba=\"principal\"\r\n                                            (outModel)=\"!!$event ? service.filtro.emitente = $event : ''\">\r\n                                        </app-pesquisa-destinatario>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                                    <app-pesquisa-lote id=\"lote\" label=\"lote\" name=\"lote\" modalTitle=\"lote\"\r\n                                        [(ngModel)]=\"service.filtro.loteId\"\r\n                                        [destinatarioIdCliente]=\"service.filtro.destinatarioIdCliente\"\r\n                                        data-aba=\"principal\" [materialId]=\"service.filtro.materialId\"\r\n                                        [loteId]=\"service.filtro.loteId\" destinatarioIdEmitente=\"0\"\r\n                                        destinatarioIdNavio=\"0\" [osgId]=\"0\" stoContratoId=\"\" stoContratoItemId=\"0\">\r\n                                    </app-pesquisa-lote>\r\n                                </div>\r\n                                <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                                    <app-pesquisa-lote id=\"novoLote\" label=\"novoLote\" name=\"novoLote\" modalTitle=\"lote\"\r\n                                        [(ngModel)]=\"service.filtro.loteIdNovo\"\r\n                                        [destinatarioIdCliente]=\"service.filtro.destinatarioIdCliente\"\r\n                                        data-aba=\"principal\" [materialId]=\"service.filtro.materialId\"\r\n                                        [loteId]=\"service.filtro.loteIdNovo\" destinatarioIdEmitente=\"0\"\r\n                                        destinatarioIdNavio=\"0\" [osgId]=\"0\" stoContratoId=\"\" stoContratoItemId=\"0\"\r\n                                        (outLote)=\"validaLote($event)\">\r\n                                    </app-pesquisa-lote>\r\n                                </div>\r\n                                <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                                    <label for=\"loteOrigem\" class=\"mb-1\">{{ 'labels.loteOrigem' | translate }}</label>\r\n                                    <input type=\"text\" class=\"form-control-sm form-control\" name=\"loteOrigem\"\r\n                                        data-aba=\"principal\" id=\"loteOrigem\" [(ngModel)]=\"service.filtro.loteIdOrigem\"\r\n                                        maxlength=\"20\">\r\n                                </div>\r\n                                <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"dtEscritura\" class=\"required\">{{\"labels.dtEscrituracao\" | translate\r\n                                            }}</label>\r\n                                        <app-data-h-m id=\"dtEscritura\" name=\"dtEscritura\"\r\n                                            [(ngModel)]=\"service.filtro.dtEscritura\" autofocus class=\"dataHora\"\r\n                                            [formatDateTime]=\"mascara.getFormatDataHorMin\" required=\"true\"\r\n                                            data-aba=\"principal\" (executa)=\"validaDtEscritura({'dtEscritura': $event})\">\r\n                                        </app-data-h-m>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"periodoDe\" class=\"required\">{{\"labels.periodoDe\" | translate\r\n                                            }}</label>\r\n                                        <app-data-h-m-s id=\"periodoDe\" name=\"periodoDe\" [(ngModel)]=\"service.filtro.dataI\"\r\n                                            autofocus class=\"dataHora\" [formatDateTime]=\"mascara.getFormatDataHorMinSeg\"\r\n                                            data-aba=\"principal\" required=\"true\">\r\n                                        </app-data-h-m-s>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"ate\" class=\"required\">{{\"labels.ate\" | translate}}</label>\r\n                                        <app-data-h-m-s id=\"ate\" name=\"ate\" [(ngModel)]=\"service.filtro.dataF\"\r\n                                            data-aba=\"principal\" class=\"dataHora\"\r\n                                            [formatDateTime]=\"mascara.getFormatDataHorMinSeg\" required=\"true\">\r\n                                        </app-data-h-m-s>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"modal\">{{'labels.modal' | translate}}</label>\r\n                                        <app-combo-padrao id=\"modal\" name=\"modal\" tabela=\"TiposdeTransporte\"\r\n                                            data-aba=\"principal\" chave=\"TipoTransp\" descricao=\"DescrMov\"\r\n                                            [(ngModel)]=\"service.filtro.modal\">\r\n                                        </app-combo-padrao>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                                    <label for=\"nroFatura\">{{ 'labels.numeroFatura' | translate }}</label>\r\n                                    <input type=\"number\" class=\"form-control-sm form-control\" name=\"nroFatura\"\r\n                                        data-aba=\"principal\" id=\"nroFatura\" [(ngModel)]=\"service.filtro.nroFatura\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row mt-2\">\r\n                                <div class=\"card-body\" id=\"cli\">\r\n                                    <div class=\"form-check mb-2\">\r\n                                        <input class=\"form-check-input\" type=\"checkbox\" id=\"escComDtSaidaVeiculo\"\r\n                                            name=\"escComDtSaidaVeiculo\"\r\n                                            (ngModelChange)=\"service.filtro.dtVeiculo = $event ? 'S' : 'N'\"\r\n                                            data-aba=\"principal\" [ngModel]=\"service.filtro.dtVeiculo ==='S'\">\r\n                                        <label class=\"form-check-label\"\r\n                                            for=\"escComDtSaidaVeiculo\">{{'labels.escComDtSaidaVeiculo' | translate}}\r\n                                        </label>\r\n                                    </div>\r\n                                    <div class=\"form-check mb-3\">\r\n                                        <input class=\"form-check-input\" type=\"checkbox\" id=\"geraIndividual\"\r\n                                            name=\"geraIndividual\" (ngModelChange)=\"trataIndividual($event)\"\r\n                                            data-aba=\"principal\" [ngModel]=\"service.filtro.geraIndividual ==='S'\" (click)=\"trataEmitente()\">\r\n                                        <label class=\"form-check-label\"\r\n                                            for=\"geraIndividual\">{{'labels.geraEntradaParaCada' | translate}}\r\n                                        </label>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                                    <label for=\"nroPedido\">{{ 'labels.numeroPedido' | translate }}</label>\r\n                                    <input type=\"text\" class=\"form-control-sm form-control\" name=\"nroPedido\"\r\n                                        data-aba=\"principal\" id=\"nroPedido\" [(ngModel)]=\"service.filtro.nroPedido\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"tab-pane\" id=\"adicional\" tabindex=\"1\" *ngIf=\"mostrarAbaAdicional\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-9\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <app-pesquisa-destinatario id=\"emitenteAdicional\" name=\"emitenteAdicional\"\r\n                                            tipoDestinatario=\"C\" modalTitle=\"pesquisaDeEmitente\" label=\"emitente\"\r\n                                            required=\"true\" [(ngModel)]=\"service.filtro.destinatarioIdEmitenteAdicional\"\r\n                                            showInscricao=\"false\" showCgcCpf=\"false\" data-aba=\"adicional\"\r\n                                            [inSelected]=\"service.filtro.emitenteAdicional\" data-label=\"emitente\"\r\n                                            (outModel)=\"!!$event ? service.filtro.emitenteAdicional = $event : ''\">\r\n                                        </app-pesquisa-destinatario>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-9\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"modNota\">{{ \"labels.modelo\" | translate }}</label>\r\n                                        <select class=\"form-control form-control-sm\" id=\"modNota\" name=\"modNota\"\r\n                                            data-aba=\"adicional\" [(ngModel)]=\"service.filtro.modeloNotaId\">\r\n                                            <option *ngFor=\"let item of modNotas\" value=\"{{ item.modeloNotaId }}\">{{\r\n                                                item.descrModNota }}</option>\r\n                                        </select>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-9\">\r\n                                    <label for=\"chaveNFe\" [class.required]=\"requiredDadosNfe()\">{{'labels.chaveNFE' |\r\n                                        translate}}</label>\r\n                                    <div class=\"input-group\">\r\n                                        <input type=\"text\" id=\"chaveNFe\" name=\"chaveNfe\"\r\n                                            class=\"form-control form-control-sm\" [(ngModel)]=\"service.filtro.chaveNfe\"\r\n                                            [disabled]=\"!isNFE\" [required]=\"requiredDadosNfe()\" data-aba=\"adicional\"\r\n                                            data-title=\"{{'labels.chaveNFE' | translate}}\" maxlength=\"54\"\r\n                                            mask=\"0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000\"\r\n                                            (blur)=\"validaChaveNfe()\">\r\n                                        <span class=\"input-group-btn\">\r\n                                            <button type=\"button\" class=\"btn btn-success btn-sm\" [disabled]=\"!isNFE\"\r\n                                                (click)=\"importarDanfe(service.filtro.chaveNfe)\" title=\"Importa DANFE\">\r\n                                                <i class=\"fa fa-search\"></i>\r\n                                            </button>\r\n                                        </span>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"clearfix\">&nbsp;</div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"nota\" class=\"required\">{{'labels.numDocEntrada' |\r\n                                            translate}}</label>\r\n                                        <input type=\"text\" id=\"nota\" name=\"nota\" class=\"form-control form-control-sm\"\r\n                                            [(ngModel)]=\"service.filtro.nota\" [disabled]=\"disabledNotaESerie()\"\r\n                                            data-aba=\"adicional\" required=\"true\"\r\n                                            data-title=\"{{'labels.nota' | translate}}\">\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label class=\"required\">{{'labels.serie' | translate}}</label>\r\n                                        <app-combo-serie-nota id=\"serie\" name=\"serie\" data-aba=\"adicional\"\r\n                                            [(ngModel)]=\"service.filtro.serieNotaId\" [disabled]=\"disabledNotaESerie()\"\r\n                                            required>\r\n                                        </app-combo-serie-nota>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"dtEmissao\" class=\"required\">{{'labels.emissao' |\r\n                                            translate}}</label>\r\n                                        <app-data-h-m id=\"dtEmissao\" name=\"dtEmissao\"\r\n                                            [(ngModel)]=\"service.filtro.dtEmissao\" [disabled]=\"disabledNotaESerie()\"\r\n                                            [formatDateTime]=\"mascara.getFormatData\" class=\"data\" required=\"true\"\r\n                                            data-aba=\"adicional\" (executa)=\"validaDtEmissao({'dtEmissao': $event})\">\r\n                                        </app-data-h-m>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"card-body\" id=\"arm\">\r\n                                    <div class=\"form-check mb-2\">\r\n                                        <input class=\"form-check-input\" type=\"checkbox\" id=\"alteraPrecoArmazenado\"\r\n                                            name=\"alteraPrecoArmazenado\" data-aba=\"adicional\"\r\n                                            (ngModelChange)=\"service.filtro.altPrecoArm = $event ? 'S' : 'N'\"\r\n                                            [ngModel]=\"service.filtro.altPrecoArm ==='S'\">\r\n                                        <label class=\"form-check-label\"\r\n                                            for=\"alteraPrecoArmazenado\">{{'labels.alteraPrecoArmazenado' | translate}}\r\n                                        </label>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"novoValorArmazenado\"\r\n                                            [class.required]=\"service.filtro.altPrecoArm==='S'\">{{'labels.novoValorArmazenado'\r\n                                            | translate}}</label>\r\n                                        <input id=\"novoValorArmazenado\" name=\"novoValorArmazenado\"\r\n                                            [(ngModel)]=\"service.filtro.precoArmazenado\" maxlength=\"12\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\" required=\"true\"\r\n                                            data-aba=\"adicional\" currencyMask\r\n                                            [disabled]=\"service.filtro.altPrecoArm!=='S'\"\r\n                                            [options]=\"funcoesService.optionCurrency(9)\"\r\n                                            [required]=\"service.filtro.altPrecoArm==='S'\">\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"kilosMax\" class=\"required\">{{'labels.kilosMax' | translate}}</label>\r\n                                        <input id=\"kilosMax\" name=\"kilosMax\" [(ngModel)]=\"service.filtro.kilosMax\"\r\n                                            maxlength=\"12\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                            required=\"true\" currencyMask data-aba=\"adicional\"\r\n                                            [options]=\"funcoesService.optionCurrency(0)\">\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"vlNotaFiscal\" class=\"required\">{{'labels.valorTotalNf' |\r\n                                            translate}}</label>\r\n                                        <input id=\"vlNotaFiscal\" name=\"vlNotaFiscal\" data-aba=\"adicional\"\r\n                                            [(ngModel)]=\"service.filtro.vlNotaFiscal\" maxlength=\"18\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\" required=\"true\"\r\n                                            currencyMask [options]=\"funcoesService.optionCurrency(2)\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">\r\n                        {{ 'buttons.seleciona' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default mr-1\" data-dismiss=\"modal\">\r\n                        {{ 'buttons.cancelar' | translate }}\r\n                    </button>\r\n                    <button class=\"btn btn-default mr-1\" type=\"button\" (click)=\"resetar()\">\r\n                        {{ 'buttons.limpar' | translate }}\r\n                    </button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-index/liberacao-lote-index.component.html":
/*!**********************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-index/liberacao-lote-index.component.html ***!
  \**********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\" [formAction]=\"actionForm\" [itemData]=\"data.autorizacao\"\r\n    [sisFormularioId]=\"constantes.sisFormularioId\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"tab-content top\">\r\n    <div class=\"tab-pane active show\" id=\"da\">\r\n        <div class=\"section-comand-bar\">\r\n            <div class=\"row\">\r\n                <div class=\"col-lg-2 col-md-6 col-sm-12\" *ngIf=\"service.filtro.geraIndividual ==='N'\">\r\n                    <div class=\"form-group form-group-sm\">\r\n                        <label for=\"kilosMax\">{{'labels.kilosMax' | translate}}</label>\r\n                        <input id=\"kilosMax\" name=\"kilosMax\" [(ngModel)]=\"dataAux.kgMax\"\r\n                            class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                            [options]=\"funcoesService.optionCurrency(0)\" disabled>\r\n                    </div>\r\n                </div>\r\n                <div class=\"col-lg-2 col-md-6 col-sm-12\">\r\n                    <div class=\"form-group form-group-sm\">\r\n                        <label for=\"pesodoc\">{{'labels.pesoDoc' | translate}}</label>\r\n                        <input id=\"pesodoc\" name=\"pesodoc\" [(ngModel)]=\"dataAux.sumPesoDoc\"\r\n                            class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                            [options]=\"funcoesService.optionCurrency(0)\" disabled>\r\n                    </div>\r\n                </div>\r\n                <div class=\"col-lg-2 col-md-6 col-sm-12\" *ngIf=\"service.filtro.geraIndividual ==='S'\">\r\n                    <div class=\"form-group form-group-sm\">\r\n                        <label for=\"pesoliq\">{{'labels.pesoLiquido' | translate}}</label>\r\n                        <input id=\"pesoliq\" name=\"pesoliq\" [(ngModel)]=\"dataAux.sumPesoLiq\"\r\n                            class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                            [options]=\"funcoesService.optionCurrency(0)\" disabled>\r\n                    </div>\r\n                </div>\r\n                <div class=\"col-lg-2 col-md-6 col-sm-12\" *ngIf=\"service.filtro.geraIndividual ==='N'\">\r\n                    <div class=\"form-group form-group-sm\">\r\n                        <label for=\"quantidDoc\">{{'labels.quantidDoc' | translate}}</label>\r\n                        <input id=\"quantidDoc\" name=\"quantidDoc\" [(ngModel)]=\"dataAux.sumQuantidDoc\"\r\n                            class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                            [options]=\"funcoesService.optionCurrency(0)\" disabled>\r\n                    </div>\r\n                </div>\r\n                <div class=\"col-lg-2 col-md-6 col-sm-12\" *ngIf=\"service.filtro.geraIndividual ==='N'\">\r\n                    <div class=\"form-group form-group-sm\">\r\n                        <label for=\"valor\">{{'labels.valor' | translate}}</label>\r\n                        <input id=\"valor\" name=\"valor\" [(ngModel)]=\"dataAux.sumValor\"\r\n                            class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                            [options]=\"funcoesService.optionCurrency(2)\" disabled>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n            <app-table>\r\n                <div class=\"row\">\r\n                    <div class=\"col-12\">\r\n                        <div class=\"table-responsive\">\r\n                            <table id=\"dtConsulta\"\r\n                                class=\"table table-striped table-bordered table-hover nowrap table-sm\">\r\n                                <thead>\r\n                                    <tr>\r\n                                        <th colspan=\"8\"></th>\r\n                                        <th colspan=\"5\" style=\"text-align: center;\">{{ 'labels.dadosDodocumento' |\r\n                                            translate}}\r\n                                        </th>\r\n                                        <th colspan=\"3\" style=\"text-align: center;\">{{ 'labels.dadosDaLiberacao' |\r\n                                            translate}}\r\n                                        </th>\r\n                                        <th colspan=\"2\"></th>\r\n                                    </tr>\r\n                                    <tr>\r\n                                        <th>\r\n                                            <span class=\"colTodos\" *ngIf=\"hasDados\">\r\n                                                <input type=\"checkbox\" name=\"todosNf\" id=\"todosNf\" [ngModel]=\"btnTodos\"\r\n                                                    (ngModelChange)=\"selectAll($event)\" [disabled]=\"!hasDados\"\r\n                                                    title=\"{{ 'buttons.selecionarTodos' | translate }}\">\r\n                                            </span>\r\n                                        </th>\r\n                                        <th>{{ 'labels.autorizacao' | translate}}</th>\r\n                                        <th>{{ 'labels.placa' | translate}}</th>\r\n                                        <th>{{ 'labels.cliente' | translate}}</th>\r\n                                        <th>{{ 'labels.emitente' | translate}}</th>\r\n                                        <th>{{ 'labels.lote' | translate}}</th>\r\n                                        <th>{{ 'labels.entrada' | translate}}</th>\r\n                                        <th>{{ 'labels.docto' | translate}}</th>\r\n                                        <th>{{ 'labels.serie' | translate}}</th>\r\n                                        <th>{{ 'labels.emissao' | translate}}</th>\r\n                                        <th class=\"col-right\">{{ 'labels.qtdeDoc' | translate}}</th>\r\n                                        <th class=\"col-right\">{{ 'labels.unid' | translate}}</th>\r\n                                        <th class=\"col-right\">{{ 'labels.pesoDocto' | translate}}</th>\r\n                                        <th class=\"col-right\">{{ 'labels.pesoLiquido' | translate}} </th>\r\n                                        <th class=\"col-right\">{{ 'labels.total' | translate}}</th>\r\n                                        <th class=\"col-right\">{{ 'labels.qtdeDoc' | translate}}</th>\r\n                                        <th class=\"col-right\">{{ 'labels.unid' | translate}}</th>\r\n                                        <th class=\"col-right\">{{ 'labels.pesoDocto' | translate}}</th>\r\n                                    </tr>\r\n                                </thead>\r\n                                <tbody>\r\n                                    <tr *ngFor=\"let t of dados; index as i\" (click)=\"select(t)\"\r\n                                        (dblclick)=\"rowSelect(t)\"\r\n                                        [ngClass]=\"{'info': t?.autorizacao == data?.autorizacao }\">\r\n                                        <td>\r\n                                            <label class=\"chk\">\r\n                                                <input type=\"checkbox\" id=\"seleciona\" name=\"seleciona\" value=\"checked\"\r\n                                                    (ngModelChange)=\"t.flagSeleciona = $event ? 'S' : 'N'\"\r\n                                                    [ngModel]=\"t.flagGera ==='S'\" disabled>\r\n                                                <span [ngClass]=\"{'red':t.flag}\">\r\n                                                </span>\r\n                                            </label>\r\n                                        </td>\r\n                                        <td>{{ t.autorizacao }}</td>\r\n                                        <td>{{ t.placa }}</td>\r\n                                        <td style=\"white-space: nowrap;\">{{ t.cliente }} ( {{ t.coddest }} )</td>\r\n                                        <td style=\"white-space: nowrap;\">{{ t.emitenteFantasia }}</td>\r\n                                        <td>{{ t.lote }}</td>\r\n                                        <td style=\"white-space: nowrap;\">{{ t.dtSaida | date: 'dd/MM/yyyy HH:mm' }}</td>\r\n                                        <td>{{ t.docto }}</td>\r\n                                        <td>{{ t.serie }}</td>\r\n                                        <td>{{ t.dataDocumento | date: 'dd/MM/yyyy' }}</td>\r\n                                        <td style=\"text-align: right;\">{{ t.quantidDoc | formatCurrency: 0 }}</td>\r\n                                        <td style=\"text-align: right;\">{{ t.unidade }}</td>\r\n                                        <td style=\"text-align: right;\">{{ t.pesodoc | formatCurrency: 0 }}</td>\r\n                                        <td style=\"text-align: right;\">{{ t.pesoLiq | formatCurrency: 0 }}</td>\r\n                                        <td style=\"text-align: right;\">{{ t.totItem | formatCurrency: 2 }}</td>\r\n                                        <td style=\"text-align: right;\">{{ t.quantid | formatCurrency: 0 }}</td>\r\n                                        <td style=\"text-align: right;\">{{ t.unidade }}</td>\r\n                                        <td style=\"text-align: right;\">{{ t.peso | formatCurrency: 0 }}</td>\r\n                                    </tr>\r\n                                    <tr *ngIf=\"!hasDados\">\r\n                                        <th colspan=\"18\" style=\"text-align: center\">\r\n                                            {{ \"messages.nenhumRegistroEncontrado\" | translate }}\r\n                                        </th>\r\n                                    </tr>\r\n                                </tbody>\r\n                            </table>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </app-table>\r\n        </div>\r\n        <div class=\"row\">\r\n            <div class=\"col-lg-3 col-sm-12\">\r\n                <button class=\"btn btn-secondary btn-block\" (click)=\"cancelar()\" type=\"button\">\r\n                    {{ 'buttons.cancelar' | translate }}\r\n                </button>\r\n            </div>\r\n            <div class=\"col-lg-3 col-sm-12\">\r\n                <button class=\"btn btn-block btn-success\" (click)=\"ajusteManual()\" type=\"button\"\r\n                    [disabled]=\"!hasDados || !data?.autorizacao\">\r\n                    {{ 'buttons.ajusteManual' | translate }}\r\n                </button>\r\n            </div>\r\n            <div class=\"col-lg-3 col-sm-12\">\r\n                <button class=\"btn btn-block btn-info\" (click)=\"gerar()\" type=\"button\"\r\n                    [disabled]=\"!hasDados || !hasDadosSelecionados\">\r\n                    {{ 'buttons.gerar' | translate }}\r\n                </button>\r\n            </div>\r\n            <div class=\"col-lg-3 col-sm-12\">\r\n                <button class=\"btn btn-block btn-success\" (click)=\"exportExcel()\" type=\"button\"\r\n                    [disabled]=\"!hasDados || !hasDadosSelecionados\">\r\n                    {{ 'buttons.exportExcel' | translate }}\r\n                </button>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n\r\n<app-propriedades></app-propriedades>\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\r\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\r\n<app-liberacao-lote-filter (filtrar)=\"executaFiltro()\"></app-liberacao-lote-filter>\r\n<app-liberacao-lote-ajuste (_refresh)=\"outAjuste($event)\"></app-liberacao-lote-ajuste>\r\n<app-liberacao-lote-erros [dados]=\"dataErros\" (dataResult)=\"executaListagemErros($event)\"></app-liberacao-lote-erros>");

/***/ }),

/***/ "./src/app/pages/controle/liberacao-lote/liberacao-lote-ajuste/liberacao-lote-ajuste.component.ts":
/*!********************************************************************************************************!*\
  !*** ./src/app/pages/controle/liberacao-lote/liberacao-lote-ajuste/liberacao-lote-ajuste.component.ts ***!
  \********************************************************************************************************/
/*! exports provided: LiberacaoLoteAjusteComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiberacaoLoteAjusteComponent", function() { return LiberacaoLoteAjusteComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _liberacao_lote_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../liberacao-lote.model */ "./src/app/pages/controle/liberacao-lote/liberacao-lote.model.ts");
/* harmony import */ var _liberacao_lote_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../liberacao-lote.service */ "./src/app/pages/controle/liberacao-lote/liberacao-lote.service.ts");
/* harmony import */ var app_shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/funcoes/object-utils/object-utils.static.service */ "./src/app/shared/services/funcoes/object-utils/object-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};









var LiberacaoLoteAjusteComponent = /** @class */ (function () {
    function LiberacaoLoteAjusteComponent(funcoesService, messageService, service) {
        this.funcoesService = funcoesService;
        this.messageService = messageService;
        this.service = service;
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_1__["Mascaras"]();
        this.mensagens = [];
        this._refresh = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    LiberacaoLoteAjusteComponent.prototype.ngOnInit = function () {
        this.data = new _liberacao_lote_model__WEBPACK_IMPORTED_MODULE_5__["LiberacaoLoteDto"]();
        this.dataAux = new _liberacao_lote_model__WEBPACK_IMPORTED_MODULE_5__["LiberacaoLoteDto"]();
    };
    LiberacaoLoteAjusteComponent.prototype.onSubmit = function (form) {
        var _this = this;
        var object = {
            flagGera: 'S',
            quantid: this.data.quantid,
            peso: this.data.peso,
            autorizacao: this.data.autorizacao
        };
        this.service._update(object).subscribe(function (resp) {
            if (_this.funcoesService.isNotUndefinedOrNull(resp.validationResult)) {
                _this.mensagens = _this.messageService.validationResult(resp.validationResult);
                if (resp && !resp.validationResult.isValid) {
                    _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit(_this.mensagens);
                    _this.funcoesService.backToTop();
                    return;
                }
            }
            _this._refresh.emit(true);
            app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["ModalUtilsStaticService"].closeModal("liberacao-lote-ajuste-dialog");
        });
    };
    LiberacaoLoteAjusteComponent.prototype.show = function (current) {
        this.data = app_shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_7__["ObjectUtilsStaticService"].clone(current);
        this.dataAux.quantid = this.data.quantid;
        this.dataAux.peso = this.data.peso;
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["ModalUtilsStaticService"].openModal("liberacao-lote-ajuste-dialog");
    };
    LiberacaoLoteAjusteComponent.prototype.validateQtde = function () {
        if (this.data.quantid > this.dataAux.quantid) {
            this.messageService.warning("titles.liberacaoLote", "messages.quantidadeInformadoMaiorDisponivel");
            this.data.quantid = this.dataAux.quantid;
            return;
        }
    };
    LiberacaoLoteAjusteComponent.prototype.validatePeso = function () {
        if (this.data.peso > this.dataAux.peso) {
            this.messageService.warning("titles.liberacaoLote", "messages.pesoInformadoMaiorDisponivel");
            this.data.peso = this.dataAux.peso;
            return;
        }
    };
    LiberacaoLoteAjusteComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_2__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"] },
        { type: _liberacao_lote_service__WEBPACK_IMPORTED_MODULE_6__["LiberacaoLoteService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], LiberacaoLoteAjusteComponent.prototype, "_refresh", void 0);
    LiberacaoLoteAjusteComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-liberacao-lote-ajuste",
            template: __importDefault(__webpack_require__(/*! raw-loader!./liberacao-lote-ajuste.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-ajuste/liberacao-lote-ajuste.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_2__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"],
            _liberacao_lote_service__WEBPACK_IMPORTED_MODULE_6__["LiberacaoLoteService"]])
    ], LiberacaoLoteAjusteComponent);
    return LiberacaoLoteAjusteComponent;
}());



/***/ }),

/***/ "./src/app/pages/controle/liberacao-lote/liberacao-lote-erros/liberacao-lote-erros.component.ts":
/*!******************************************************************************************************!*\
  !*** ./src/app/pages/controle/liberacao-lote/liberacao-lote-erros/liberacao-lote-erros.component.ts ***!
  \******************************************************************************************************/
/*! exports provided: LiberacaoLoteErrosComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiberacaoLoteErrosComponent", function() { return LiberacaoLoteErrosComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var LiberacaoLoteErrosComponent = /** @class */ (function () {
    function LiberacaoLoteErrosComponent() {
        this.dataResult = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    LiberacaoLoteErrosComponent.prototype.ngOnInit = function () {
    };
    LiberacaoLoteErrosComponent.prototype.onSubmit = function (form) {
        if (!form.invalid) {
            this.dataResult.emit(this.dados);
        }
    };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Array)
    ], LiberacaoLoteErrosComponent.prototype, "dados", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], LiberacaoLoteErrosComponent.prototype, "dataResult", void 0);
    LiberacaoLoteErrosComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-liberacao-lote-erros",
            template: __importDefault(__webpack_require__(/*! raw-loader!./liberacao-lote-erros.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-erros/liberacao-lote-erros.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        })
    ], LiberacaoLoteErrosComponent);
    return LiberacaoLoteErrosComponent;
}());



/***/ }),

/***/ "./src/app/pages/controle/liberacao-lote/liberacao-lote-filter/liberacao-lote-filter.component.scss":
/*!**********************************************************************************************************!*\
  !*** ./src/app/pages/controle/liberacao-lote/liberacao-lote-filter/liberacao-lote-filter.component.scss ***!
  \**********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".linha {\n  position: relative;\n  display: flex;\n  width: 30%;\n  top: 5px;\n  margin-left: -5px;\n}\n\n#cli {\n  padding-top: 0px;\n  padding-bottom: 0px;\n}\n\n#arm {\n  padding-top: 0px;\n  padding-bottom: 0px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvY29udHJvbGUvbGliZXJhY2FvLWxvdGUvbGliZXJhY2FvLWxvdGUtZmlsdGVyL0M6XFxDb3Jwb3JhdGVcXENvcnBvcmF0ZVdlYkRlc2VudlxcX3VuaXNvbHV0aW9uL3NyY1xcYXBwXFxwYWdlc1xcY29udHJvbGVcXGxpYmVyYWNhby1sb3RlXFxsaWJlcmFjYW8tbG90ZS1maWx0ZXJcXGxpYmVyYWNhby1sb3RlLWZpbHRlci5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvcGFnZXMvY29udHJvbGUvbGliZXJhY2FvLWxvdGUvbGliZXJhY2FvLWxvdGUtZmlsdGVyL2xpYmVyYWNhby1sb3RlLWZpbHRlci5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGtCQUFBO0VBQ0EsYUFBQTtFQUNBLFVBQUE7RUFDQSxRQUFBO0VBQ0EsaUJBQUE7QUNDRjs7QURFQTtFQUNFLGdCQUFBO0VBQ0EsbUJBQUE7QUNDRjs7QURFQTtFQUNFLGdCQUFBO0VBQ0EsbUJBQUE7QUNDRiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL2NvbnRyb2xlL2xpYmVyYWNhby1sb3RlL2xpYmVyYWNhby1sb3RlLWZpbHRlci9saWJlcmFjYW8tbG90ZS1maWx0ZXIuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubGluaGEge1xyXG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcclxuICBkaXNwbGF5OiBmbGV4O1xyXG4gIHdpZHRoOiAzMCU7XHJcbiAgdG9wOiA1cHg7XHJcbiAgbWFyZ2luLWxlZnQ6IC01cHg7XHJcbn1cclxuXHJcbiNjbGkge1xyXG4gIHBhZGRpbmctdG9wOiAwcHg7XHJcbiAgcGFkZGluZy1ib3R0b206IDBweDtcclxufVxyXG5cclxuI2FybSB7XHJcbiAgcGFkZGluZy10b3A6IDBweDtcclxuICBwYWRkaW5nLWJvdHRvbTogMHB4O1xyXG59XHJcbiIsIi5saW5oYSB7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgZGlzcGxheTogZmxleDtcbiAgd2lkdGg6IDMwJTtcbiAgdG9wOiA1cHg7XG4gIG1hcmdpbi1sZWZ0OiAtNXB4O1xufVxuXG4jY2xpIHtcbiAgcGFkZGluZy10b3A6IDBweDtcbiAgcGFkZGluZy1ib3R0b206IDBweDtcbn1cblxuI2FybSB7XG4gIHBhZGRpbmctdG9wOiAwcHg7XG4gIHBhZGRpbmctYm90dG9tOiAwcHg7XG59Il19 */");

/***/ }),

/***/ "./src/app/pages/controle/liberacao-lote/liberacao-lote-filter/liberacao-lote-filter.component.ts":
/*!********************************************************************************************************!*\
  !*** ./src/app/pages/controle/liberacao-lote/liberacao-lote-filter/liberacao-lote-filter.component.ts ***!
  \********************************************************************************************************/
/*! exports provided: LiberacaoLoteFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiberacaoLoteFilterComponent", function() { return LiberacaoLoteFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ngx-toastr */ "./node_modules/ngx-toastr/fesm5/ngx-toastr.js");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../cadastro/lote/lote.service */ "./src/app/pages/cadastro/lote/lote.service.ts");
/* harmony import */ var _cadastro_modelo_nota_modelo_nota_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../cadastro/modelo-nota/modelo-nota.service */ "./src/app/pages/cadastro/modelo-nota/modelo-nota.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _liberacao_lote_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../liberacao-lote.constants */ "./src/app/pages/controle/liberacao-lote/liberacao-lote.constants.ts");
/* harmony import */ var _liberacao_lote_model__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../liberacao-lote.model */ "./src/app/pages/controle/liberacao-lote/liberacao-lote.model.ts");
/* harmony import */ var _liberacao_lote_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../liberacao-lote.service */ "./src/app/pages/controle/liberacao-lote/liberacao-lote.service.ts");
/* harmony import */ var _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./../../../../shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-utils.static.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};















var LiberacaoLoteFilterComponent = /** @class */ (function () {
    function LiberacaoLoteFilterComponent(funcoesService, messageService, service, configuracao, loginService, loteService, modeloNotaService, toastrService) {
        var _this = this;
        this.funcoesService = funcoesService;
        this.messageService = messageService;
        this.service = service;
        this.configuracao = configuracao;
        this.loginService = loginService;
        this.loteService = loteService;
        this.modeloNotaService = modeloNotaService;
        this.toastrService = toastrService;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_3__["Mascaras"]();
        this.constantes = new _liberacao_lote_constants__WEBPACK_IMPORTED_MODULE_11__["LiberacaoLoteConstants"]();
        this.mensagens = [];
        this.loadConfig = function () {
            _this.dtSeguro = _this.configuracao.lerConfig("CTR", "DtSeguro");
            _this.fechamentoCtb = _this.configuracao.lerConfig("UNI", "FechamentoCtb");
            _this.fechamentoFis = _this.configuracao.lerConfig("LIV", "FechamentoFis");
            _this.difMaxNFDtAtual = _this.configuracao.lerConfig("BAL", "DifMaxNFDtAtual");
            _this.configImportaDanfe = _this.configuracao.boolean("BAL", "importaDANFE");
        };
    }
    LiberacaoLoteFilterComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.modNotas = [];
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
        this.modeloNotaService.get().subscribe(function (resp) {
            if (resp) {
                _this.modNotas = resp.filter(function (val) {
                    if (val.flagAtivo === "S" && val.sitReg !== 'E') {
                        return val;
                    }
                });
            }
        });
    };
    LiberacaoLoteFilterComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        if (this.service.filtro.geraIndividual === "N") {
            this.mensagens = [];
            if (!(this.service.filtro.destinatarioIdEmitenteAdicional > 0)) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit([this.messageService.translate("messages.eNecessarioInformarEmitente")]);
                return;
            }
            if (!(this.service.filtro.nota > 0)) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit([this.messageService.translate("messages.eNecessarioInformarNumeroDocEntrada")]);
                return;
            }
            if ((this.service.filtro.serieNotaId === "") || (this.service.filtro.serieNotaId === "-1")) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit([this.messageService.translate("messages.eNecessarioInformarSerie")]);
                return;
            }
            if (!(this.service.filtro.destinatarioIdCliente > 0) || (this.service.filtro.materialId === "")) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit([this.messageService.translate("messages.obrigatorioInformarClienteProduto")]);
                return;
            }
            if (!(this.service.filtro.kilosMax > 0)) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit([this.messageService.translate("messages.eNecessarioInformarkilosMax")]);
                return;
            }
            if (!(this.service.filtro.vlNotaFiscal > 0)) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit([this.messageService.translate("messages.eNecessarioInformarVlrNota")]);
                return;
            }
        }
        this.filtrar.emit();
        jQuery("#liberacao-lote-filter-dialog").modal("hide");
    };
    LiberacaoLoteFilterComponent.prototype.validaDtEscritura = function (params) {
        if ((this.service.filtro.geraIndividual === "N") && (this.service.filtro.dtVeiculo === "N")) {
            if (params.dtEscritura < this.funcoesService.dateTimeUtils.convertDateSqlToDate(this.dtSeguro)) {
                this.messageService.warning("titles.liberacaoLote", "messages.dataMenorQueDataDoSeguro");
                return;
            }
            if (params.dtEscritura < this.funcoesService.dateTimeUtils.convertDateSqlToDate(this.fechamentoCtb)) {
                this.messageService.warning("titles.liberacaoLote", "messages.dataMenorQueFechamentoContabil");
                return;
            }
            if (params.dtEscritura < this.funcoesService.dateTimeUtils.convertDateSqlToDate(this.fechamentoFis)) {
                this.messageService.warning("titles.liberacaoLote", "messages.dataMenorQueFechamentoFiscal");
                return;
            }
        }
    };
    LiberacaoLoteFilterComponent.prototype.validaLote = function (event) {
        var _this = this;
        if (event.lote && this.funcoesService.isNotUndefinedOrNull(this.service.filtro.loteId)) {
            if (event.lote.loteId === this.service.filtro.loteId) {
                this.messageService.warning("titles.liberacaoLote", "messages.loteInvalidoNaoPodeSerIgualLoteAnterior");
                this.service.filtro.loteIdNovo = "";
                return;
            }
            if (this.funcoesService.isNotUndefinedOrNull(event.lote.unidadeId) && this.funcoesService.isNotUndefinedOrNull(this.service.filtro.loteId)) {
                this.loteService._getById(this.service.filtro.loteId).subscribe(function (resp) {
                    if (!_this.funcoesService.isUndefinedOrNull(resp)) {
                        if (resp.unidadeId !== event.lote.unidadeId) {
                            _this.messageService.warning("titles.liberacaoLote", "messages.loteInvalidoUnidadeDiferenteLoteAnterior");
                            _this.service.filtro.loteIdNovo = "";
                            return;
                        }
                        if (resp.densidade !== event.lote.densidade) {
                            _this.messageService.warning("titles.liberacaoLote", "messages.loteInvalidoDensidadeDiferenteLoteAnterior");
                            _this.service.filtro.loteIdNovo = "";
                            return;
                        }
                    }
                });
            }
        }
    };
    LiberacaoLoteFilterComponent.prototype.requiredDadosNfe = function () {
        return this.service.filtro.modeloNotaId === "55";
    };
    Object.defineProperty(LiberacaoLoteFilterComponent.prototype, "isNFE", {
        get: function () {
            if (!this.service.filtro)
                return false;
            return _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_14__["BooleanUtilsStaticService"].toBoolean(this.service.filtro.modeloNotaId === "55");
        },
        enumerable: true,
        configurable: true
    });
    LiberacaoLoteFilterComponent.prototype.validaChaveNfe = function () {
        if (this.funcoesService.isNotUndefinedOrNull(this.service.filtro)) {
            if (this.funcoesService.stringUtils.isEmpty(this.service.filtro.nota)) {
                this.service.filtro.nota = +this.funcoesService.getNumeroNota(this.service.filtro.chaveNfe);
            }
            if (this.funcoesService.stringUtils.isEmpty(this.service.filtro.serieNotaId)) {
                this.service.filtro.serieNotaId = this.funcoesService.getSerieNota(this.service.filtro.chaveNfe);
            }
            var result = this.funcoesService.validaChaveNFe(this.service.filtro.chaveNfe, this.service.filtro.cliente, this.service.filtro.nota, this.service.filtro.serieNotaId);
            if (!result) {
                this.messageService.warning("titles.validacao", "messages.chaveNfeInvalida");
            }
        }
    };
    LiberacaoLoteFilterComponent.prototype.disabledNotaESerie = function () {
        return this.configImportaDanfe && this.isNFE;
    };
    LiberacaoLoteFilterComponent.prototype.importarDanfe = function (chave) {
        var _this = this;
        if (this.funcoesService.isUndefinedOrNull(chave) || chave === '') {
            this.messageService.info('labels.chaveNFE', 'messages.chaveNfeDeveSerInformada');
            return;
        }
        this.funcoesService.nfeHelper.importaDanfe({
            "chave": chave,
            "destinatarioIdCliente": this.service.filtro.destinatarioIdCliente,
            "destinatarioIdEmitente": this.service.filtro.destinatarioIdEmitente,
            "materialId": this.service.filtro.materialId
        }).subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result.validationResult);
            if (!result.validationResult.isValid) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit(_this.mensagens);
                return;
            }
            _this.service.filtro.serieNotaId = result.serie;
            _this.service.filtro.nota = result.numero;
            _this.service.filtro.dtEmissao = result.dtEmissao;
            _this.service.filtro.vlNotaFiscal = result.vlNota;
        });
    };
    LiberacaoLoteFilterComponent.prototype.validaDtEmissao = function (params) {
        var dtEmissaoSub = app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_1__["DateTimeUtilsStaticService"].addDays(new Date(), this.difMaxNFDtAtual * (-1));
        if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_1__["DateTimeUtilsStaticService"].maiorAHoje(params.dtEmissao, ['H', 'M'])) {
            this.messageService.warning("titles.liberacaoLote", "messages.dataEmissaoNaoPodeSerMaiorQueDataAtual");
            return;
        }
        else if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_1__["DateTimeUtilsStaticService"].maiorA(params.dtEmissao, this.service.filtro.dtEscritura, ['H', 'M'])) {
            this.messageService.warning("titles.liberacaoLote", "messages.dataEmissaoNaoPodeSerMaiorQueDtEscrituracao");
            return;
        }
        else if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_1__["DateTimeUtilsStaticService"].menorA(params.dtEmissao, dtEmissaoSub, ['H', 'M'])) {
            this.messageService.warning("titles.liberacaoLote", "messages.dataEmissaoDeveSerMenorA", { qtDias: this.difMaxNFDtAtual });
            return;
        }
    };
    LiberacaoLoteFilterComponent.prototype.trataIndividual = function (event) {
        this.service.filtro.geraIndividual = event ? 'S' : 'N';
        this.service.filtro.limpaDadosAdicionais();
        this.trataEmitente();
    };
    LiberacaoLoteFilterComponent.prototype.trataEmitente = function () {
        if (this.service.filtro.geraIndividual === 'N') {
            this.service.filtro.destinatarioIdEmitenteAdicional = this.service.filtro.destinatarioIdCliente;
            this.service.filtro.emitenteAdicional = this.service.filtro.cliente;
        }
    };
    Object.defineProperty(LiberacaoLoteFilterComponent.prototype, "mostrarAbaAdicional", {
        get: function () {
            return !_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_14__["BooleanUtilsStaticService"].toBoolean(this.service.filtro.geraIndividual);
        },
        enumerable: true,
        configurable: true
    });
    LiberacaoLoteFilterComponent.prototype.resetar = function () {
        this.service.filtro = new _liberacao_lote_model__WEBPACK_IMPORTED_MODULE_12__["LiberacaoLoteFilter"]();
        jQuery('#tab a[href="#principal"]').tab('show');
    };
    LiberacaoLoteFilterComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _liberacao_lote_service__WEBPACK_IMPORTED_MODULE_13__["LiberacaoLoteService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"] },
        { type: _cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_8__["LoteService"] },
        { type: _cadastro_modelo_nota_modelo_nota_service__WEBPACK_IMPORTED_MODULE_9__["ModeloNotaService"] },
        { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_2__["ToastrService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], LiberacaoLoteFilterComponent.prototype, "filtrar", void 0);
    LiberacaoLoteFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-liberacao-lote-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./liberacao-lote-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-filter/liberacao-lote-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./liberacao-lote-filter.component.scss */ "./src/app/pages/controle/liberacao-lote/liberacao-lote-filter/liberacao-lote-filter.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _liberacao_lote_service__WEBPACK_IMPORTED_MODULE_13__["LiberacaoLoteService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"],
            _cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_8__["LoteService"],
            _cadastro_modelo_nota_modelo_nota_service__WEBPACK_IMPORTED_MODULE_9__["ModeloNotaService"],
            ngx_toastr__WEBPACK_IMPORTED_MODULE_2__["ToastrService"]])
    ], LiberacaoLoteFilterComponent);
    return LiberacaoLoteFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/controle/liberacao-lote/liberacao-lote-index/liberacao-lote-index.component.scss":
/*!********************************************************************************************************!*\
  !*** ./src/app/pages/controle/liberacao-lote/liberacao-lote-index/liberacao-lote-index.component.scss ***!
  \********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".chk input {\n  display: none;\n}\n\n.chk span {\n  width: 12px;\n  height: 12px;\n  display: block;\n  background-color: #fff;\n  border: 1px solid #DDD;\n  border-radius: 100%;\n}\n\nspan.red {\n  background-color: #c03;\n}\n\nspan.green {\n  background-color: #378D3B;\n}\n\nspan.blue {\n  background-color: #0000CC;\n}\n\nspan.ligthgree {\n  background-color: #37b400;\n}\n\ndiv.legend {\n  display: flex;\n  flex-direction: row;\n  margin: 1%;\n}\n\ndiv.legend div.item {\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  padding: 1.5%;\n  flex: 1;\n}\n\ndiv.legend div.item div.circle {\n  width: 15px;\n  height: 15px;\n  border-radius: 100%;\n  border: 1px solid #ccc;\n  margin-right: 2%;\n}\n\ndiv.legend div.item div.circle.red {\n  background-color: #c03;\n}\n\ndiv.legend div.item div.circle.green {\n  background-color: #378D3B;\n}\n\ndiv.legend div.item div.circle.blue {\n  background-color: #0000CC;\n}\n\ndiv.legend div.item div.circle.ligthgree {\n  background-color: #37b400;\n}\n\n/* Table */\n\ntable .col-right {\n  text-align: right;\n  white-space: nowrap;\n}\n\n.colTodos {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-top: -16px;\n}\n\n.colTodos input[type=checkbox] {\n  cursor: pointer;\n}\n\n.tableFixHead thead th {\n  position: -webkit-sticky;\n  position: sticky;\n  top: 0;\n}\n\n/* Just common table stuff. Really. */\n\ntable {\n  border-collapse: collapse;\n  width: 100%;\n}\n\nth,\ntd {\n  padding: 5px 10px;\n  white-space: nowrap;\n}\n\nth {\n  background: #eee;\n}\n/*# sourceMappingURL=data:application/json;base64,  */");

/***/ }),

/***/ "./src/app/pages/controle/liberacao-lote/liberacao-lote-index/liberacao-lote-index.component.ts":
/*!******************************************************************************************************!*\
  !*** ./src/app/pages/controle/liberacao-lote/liberacao-lote-index/liberacao-lote-index.component.ts ***!
  \******************************************************************************************************/
/*! exports provided: LiberacaoLoteIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiberacaoLoteIndexComponent", function() { return LiberacaoLoteIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _liberacao_lote_ajuste_liberacao_lote_ajuste_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../liberacao-lote-ajuste/liberacao-lote-ajuste.component */ "./src/app/pages/controle/liberacao-lote/liberacao-lote-ajuste/liberacao-lote-ajuste.component.ts");
/* harmony import */ var _liberacao_lote_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../liberacao-lote.constants */ "./src/app/pages/controle/liberacao-lote/liberacao-lote.constants.ts");
/* harmony import */ var _liberacao_lote_model__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../liberacao-lote.model */ "./src/app/pages/controle/liberacao-lote/liberacao-lote.model.ts");
/* harmony import */ var _liberacao_lote_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../liberacao-lote.service */ "./src/app/pages/controle/liberacao-lote/liberacao-lote.service.ts");
/* harmony import */ var app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-utils.static.service.ts");
/* harmony import */ var app_shared_components_commons_table_table_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/shared/components/commons/table/table.component */ "./src/app/shared/components/commons/table/table.component.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! app/shared/services/funcoes/excel/excel.service */ "./src/app/shared/services/funcoes/excel/excel.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};



















var LiberacaoLoteIndexComponent = /** @class */ (function (_super) {
    __extends(LiberacaoLoteIndexComponent, _super);
    function LiberacaoLoteIndexComponent(router, messageService, configuracao, service, funcoes, permissoesUtils, loginService, excelService) {
        var _this = _super.call(this, new _liberacao_lote_constants__WEBPACK_IMPORTED_MODULE_12__["LiberacaoLoteConstants"](), funcoes) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.configuracao = configuracao;
        _this.service = service;
        _this.funcoes = funcoes;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.excelService = excelService;
        _this.data = new _liberacao_lote_model__WEBPACK_IMPORTED_MODULE_13__["LiberacaoLoteDto"]();
        _this.dataAux = new _liberacao_lote_model__WEBPACK_IMPORTED_MODULE_13__["LiberacaoLoteDto"]();
        _this.constantes = new _liberacao_lote_constants__WEBPACK_IMPORTED_MODULE_12__["LiberacaoLoteConstants"]();
        _this.mensagens = [];
        _this.btnTodos = false;
        _this.dataErros = [];
        _this.title = "titles.liberacaoLote";
        _this.loadConfig = function () {
            _this.valDifValorLibLote = _this.configuracao.lerConfig("CTR", "ValDifValorLibLote") === "S" ? true : false;
            _this.difMaxValorLibLote = _this.configuracao.lerConfig("CTR", "DifMaxValorLibLote");
            _this.dtSeguro = _this.configuracao.lerConfig("CTR", "DtSeguro");
            _this.fechamentoCtb = _this.configuracao.lerConfig("UNI", "FechamentoCtb");
            _this.fechamentoFis = _this.configuracao.lerConfig("LIV", "FechamentoFis");
            _this.difMaxNFDtAtual = _this.configuracao.lerConfig("BAL", "DifMaxNFDtAtual");
        };
        _this.refresh = function () {
            _this.message = '';
            _this.service.getByFiltro({
                dataI: _this.service.filtro.dataI,
                dataF: _this.service.filtro.dataF,
                loteId: _this.service.filtro.loteId,
                loteIdNovo: _this.service.filtro.loteIdNovo,
                destinatarioIdCliente: _this.service.filtro.destinatarioIdCliente,
                destinatarioIdEmitente: _this.service.filtro.destinatarioIdEmitente,
                materialId: _this.service.filtro.materialId,
                modal: _this.service.filtro.modal,
                geraDados: _this.geraDados
            }).subscribe(function (resp) {
                _this.service.dados = resp;
                _this.sumValues();
                if (resp.length > 0) {
                    if (resp[0].validationResult != null && !resp[0].validationResult.isValid) {
                        _this.message = resp[0].validationResult.erros[0].message;
                    }
                    if (!resp[0].isValid) {
                        if (_this.message) {
                            _this.messageService.error(_this.title, _this.message);
                            return;
                        }
                    }
                    _this.service.dados.forEach(function (val) {
                        if (val.flagGera === 'S') {
                            val.flag = true;
                        }
                        else {
                            val.flag = false;
                        }
                    });
                    _this.btnTodos = _this.hasAoSelecionada && _this.service.dados.filter(function (c) { return c.flag; }).length == _this.service.dados.length;
                }
                else {
                }
            });
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        if (!_this.service.filtro) {
            _this.service.filtro = new _liberacao_lote_model__WEBPACK_IMPORTED_MODULE_13__["LiberacaoLoteFilter"]();
        }
        return _this;
    }
    LiberacaoLoteIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        var base = this;
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            base.geraDados = false;
            _this.service.dados = [];
            if (!base.service.dados || base.service.dados.length === 0) {
                if (!_this.loginService.isTokenExpired()) {
                    _this.service.filtro = new _liberacao_lote_model__WEBPACK_IMPORTED_MODULE_13__["LiberacaoLoteFilter"]();
                    jQuery('#tab a[href="#principal"]').tab('show');
                    jQuery("#liberacao-lote-filter-dialog").modal("show");
                }
            }
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    LiberacaoLoteIndexComponent.prototype.filtrar = function () {
        jQuery('#tab a[href="#principal"]').tab('show');
        jQuery("#liberacao-lote-filter-dialog").modal("show");
    };
    LiberacaoLoteIndexComponent.prototype.executaFiltro = function () {
        this.geraDados = true;
        this.buttonDisabled('listaIndex', 'filtrar', this.hasDados);
        this.refresh();
    };
    LiberacaoLoteIndexComponent.prototype.cancelar = function () {
        this.buttonDisabled('listaIndex', 'filtrar', false);
        this.service.dados = [];
        this.filtrar();
    };
    LiberacaoLoteIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    LiberacaoLoteIndexComponent.prototype.select = function (item) {
        this.data = item;
    };
    LiberacaoLoteIndexComponent.prototype.rowSelect = function (item) {
        var _this = this;
        var checked = !item.flag;
        if (!this.validaKgMax(item, checked))
            return;
        this.data = item;
        this.data.flag = checked;
        this.data.flagGera = checked ? 'S' : 'N';
        var obj = { flagGera: item.flagGera, autorizacoes: [item.autorizacao] };
        this.service.setCorpWebTmpLiberacaoProduto(obj).subscribe(function (r) {
            if (!r.validationResult.isValid) {
                r.validationResult.erros.forEach(function (m) { return _this.messageService.warning(_this.title, m.message); });
                return;
            }
            _this.sumValues();
        });
    };
    LiberacaoLoteIndexComponent.prototype.selectAll = function (checked) {
        var _this = this;
        for (var index = 0; index < this.service.dados.length; index++) {
            var item = this.service.dados[index];
            if (!this.validaKgMax(item, checked)) {
                return;
            }
            this.dataAux.sumPesoDoc = item.pesodoc;
            this.dataAux.sumPesoLiq = item.pesoLiq;
        }
        this.sumValues();
        this.btnTodos = checked;
        var obj = { flagGera: (checked ? 'S' : 'N'), autorizacoes: [] };
        this.service.dados.forEach(function (item) {
            item.flag = checked;
            item.flagGera = checked ? 'S' : 'N';
            obj.autorizacoes.push(item.autorizacao);
        });
        this.service.setCorpWebTmpLiberacaoProduto(obj).subscribe(function (r) {
            if (!r.validationResult.isValid) {
                r.validationResult.erros.forEach(function (m) { return _this.messageService.warning(_this.title, m.message); });
                return;
            }
            _this.sumValues();
        });
    };
    LiberacaoLoteIndexComponent.prototype.sumValues = function () {
        this.dataAux.kgMax = this.service.filtro.kilosMax;
        var tpeso = 0;
        var tpesoliq = 0;
        var tquantid = 0;
        var ttotItem = 0;
        this.service.dados.filter(function (c) { return c.flagGera === 'S'; }).forEach(function (val) {
            tpeso += val.peso;
            tpesoliq += val.pesoLiq;
            tquantid += val.quantid;
            ttotItem += val.totItem;
        });
        this.dataAux.sumPesoLiq = tpesoliq;
        this.dataAux.sumPesoDoc = tpeso;
        this.dataAux.sumQuantidDoc = tquantid;
        this.dataAux.sumValor = ttotItem;
    };
    LiberacaoLoteIndexComponent.prototype.ajusteManual = function () {
        if (this.funcoesService.isPositive(this.data.autorizacao)) {
            this.childLiberacaoLoteAjusteComponent.show(this.data);
        }
        else {
            this.messageService.warning(this.title, "messages.selecioneUmRegistro");
            return;
        }
    };
    LiberacaoLoteIndexComponent.prototype.outAjuste = function (event) {
        var _this = this;
        if (event) {
            this.service.getAosTmp().subscribe(function (resp) {
                if (resp) {
                    _this.service.dados = resp;
                    _this.service.dados.map(function (val) {
                        if (val.flagGera === 'S') {
                            val.flag = true;
                        }
                        else {
                            val.flag = false;
                        }
                    });
                    _this.sumValues();
                }
            });
        }
    };
    LiberacaoLoteIndexComponent.prototype.gerar = function () {
        var _this = this;
        if (!this.hasDadosSelecionados) {
            this.messageService.warning(this.title, "messages.naoExistemRegistrosSelecionados");
            return;
        }
        if ((this.service.filtro.geraIndividual === "N") && (this.service.filtro.dtVeiculo === "N")) {
            if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["DateTimeUtilsStaticService"].menorA(this.service.filtro.dtEscritura, this.dtSeguro)) {
                this.messageService.warning(this.title, "messages.dataMenorQueDataDoSeguro");
                return;
            }
            if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["DateTimeUtilsStaticService"].menorA(this.service.filtro.dtEscritura, this.fechamentoCtb)) {
                this.messageService.warning(this.title, "messages.dataMenorQueFechamentoContabil");
                return;
            }
            if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["DateTimeUtilsStaticService"].menorA(this.service.filtro.dtEscritura, this.fechamentoFis)) {
                this.messageService.warning(this.title, "messages.dataMenorQueFechamentoFiscal");
                return;
            }
        }
        if (this.service.filtro.geraIndividual === 'N') {
            if (this.valDifValorLibLote) {
                var ttotItem_1 = 0;
                this.service.dados.forEach(function (val) {
                    if (val.flagGera === 'N') {
                        ttotItem_1 += val.totItem;
                    }
                });
                if (this.funcoesService.isPositive(+this.difMaxValorLibLote)) {
                    if ((ttotItem_1 - this.service.filtro.vlNotaFiscal) > +this.difMaxValorLibLote) {
                        this.messageService.warning(this.title, "messages.difValorSelecionadoVlNotaFiscalNaoPermitida");
                        return;
                    }
                    if (ttotItem_1 !== this.service.filtro.vlNotaFiscal) {
                        this.messageService.warning(this.title, "messages.difValorSelecionadoVlNotaFiscalNaoPermitida");
                        return;
                    }
                }
            }
        }
        var subject = this.messageService.translate(this.title);
        var message = this.messageService.translate("messages.confirmaOperacaoByParam", { param: subject });
        this.messageService.confirm(this.title, message, null, function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.message = '';
                this.service.gera({
                    nota: this.service.filtro.nota,
                    serieNf: this.service.filtro.serieNotaId,
                    modNota: this.service.filtro.modeloNotaId,
                    chaveNFe: this.service.filtro.chaveNfe,
                    dtEmissao: this.service.filtro.dtEmissao,
                    dtEscritura: this.service.filtro.dtEscritura,
                    geraIndividual: this.service.filtro.geraIndividual,
                    dtVeiculo: this.service.filtro.dtVeiculo,
                    loteIdNovo: this.service.filtro.loteIdNovo,
                    altPrecoArm: this.service.filtro.altPrecoArm,
                    precoArmazenado: this.service.filtro.precoArmazenado,
                    destinatarioIdEmitente: this.service.filtro.destinatarioIdEmitente,
                    vlNotaFiscal: this.service.filtro.vlNotaFiscal,
                    loteIdOrigem: this.service.filtro.loteIdOrigem,
                    nroFatura: this.service.filtro.nroFatura,
                    nroPedido: this.service.filtro.nroPedido,
                }).subscribe(function (resp) {
                    var tam = _this.funcoes.isNotUndefinedOrNull(resp) ? resp.length : 0;
                    if (tam > 0) {
                        if (resp[0].validationResult != null && !resp[0].validationResult.isValid) {
                            _this.message = resp[0].validationResult.erros[0].message;
                        }
                        if (!resp[0].isValid && resp[0].msgErro === null) {
                            if (_this.message) {
                                _this.messageService.error(_this.title, _this.message);
                                return;
                            }
                        }
                        else {
                            _this.dataErros = [];
                            _this.dataErros = resp;
                            jQuery("#liberacao-lote-erros-dialog").modal('show');
                        }
                    }
                    else {
                        _this.messageService.success(_this.title, 'messages.liberacaoRealizadaComSucesso');
                        _this.limparDados();
                        _this.executaFiltro();
                        _this.cancelar();
                    }
                });
                return [2 /*return*/];
            });
        }); });
    };
    LiberacaoLoteIndexComponent.prototype.limparDados = function () {
        this.service.filtro.chaveNfe = '';
        this.service.filtro.nota = '';
        this.service.filtro.serieNotaId = '';
        this.service.filtro.dtEmissao = undefined;
        this.service.filtro.vlNotaFiscal = 0;
        this.service.filtro.kilosMax = 0;
    };
    LiberacaoLoteIndexComponent.prototype.executaListagemErros = function (event) {
        jQuery("#liberacao-lote-erros-dialog").modal("hide");
        this.executaFiltro();
        return;
    };
    LiberacaoLoteIndexComponent.prototype.validaKgMax = function (item, checked) {
        if (!app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_15__["BooleanUtilsStaticService"].toBoolean(this.service.filtro.geraIndividual)) {
            if (checked !== item.flag) {
                if (checked) {
                    if ((item.pesodoc + this.dataAux.sumPesoDoc > (this.dataAux.kgMax))) {
                        this.messageService.warning(this.title, 'messages.kilosInformadoMaiorDisponivel');
                        return false;
                    }
                    else {
                        return true;
                    }
                }
            }
            ;
        }
        return true;
    };
    Object.defineProperty(LiberacaoLoteIndexComponent.prototype, "hasDados", {
        get: function () {
            return app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["ArrayUtilsStaticService"].any(this.service.dados);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LiberacaoLoteIndexComponent.prototype, "hasDadosSelecionados", {
        get: function () {
            return app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["ArrayUtilsStaticService"].any(this.service.dados.filter(function (c) { return c.flagGera === 'S'; }));
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LiberacaoLoteIndexComponent.prototype, "hasAoSelecionada", {
        get: function () {
            if (!this.data)
                return false;
            if (!this.data.autorizacao)
                return false;
            return app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_5__["NumberUtilsStaticService"].isPositive(this.data.autorizacao);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LiberacaoLoteIndexComponent.prototype, "dados", {
        get: function () {
            if (!this.table)
                return [];
            if (!this.hasDados || !this.table.filtro) {
                return this.table.getPage(this.service.dados);
            }
            return this.table.getPage(this.dadosFilter);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LiberacaoLoteIndexComponent.prototype, "dadosFilter", {
        get: function () {
            var _this = this;
            return this.service.dados.filter(function (v) {
                return app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].exist(v.autorizacao.toString(), _this.table.filtro) ||
                    app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].exist(v.cliente, _this.table.filtro) ||
                    app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].exist(v.lote, _this.table.filtro) ||
                    app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].exist(app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["DateTimeUtilsStaticService"].convertDateToDateStr(v.dtSaida), _this.table.filtro) ||
                    app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].exist(v.docto.toString(), _this.table.filtro) ||
                    app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].exist(v.serie, _this.table.filtro) ||
                    app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].exist(app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["DateTimeUtilsStaticService"].convertDateToDateStr(v.dataDocumento), _this.table.filtro) ||
                    app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].exist(v.unidade, _this.table.filtro);
            });
        },
        enumerable: true,
        configurable: true
    });
    LiberacaoLoteIndexComponent.prototype.exportExcel = function () {
        var headerDictionary = {
            "peso": "pesoDoc",
            "quantidade": "total",
            "dataDocumento": "emissao",
            "totalNf": "total"
        };
        var options = {
            headerJsonKeys: true,
            headerDictionary: headerDictionary
        };
        var dadosSelecionados = this.service.dados.filter(function (c) { return c.flagGera === 'S'; });
        dadosSelecionados.forEach(function (obj) {
            delete obj.pesoOri;
            delete obj.coddest;
            delete obj.quantidOri;
            delete obj.totItemOri;
            delete obj.flagGera;
            delete obj.flagLiberado;
            delete obj.codEmitente;
            delete obj.codOperAlt;
            delete obj.codOperCan;
            delete obj.codOperInc;
            delete obj.modNota;
            delete obj.nFeAuto;
            delete obj.importaDANFE;
            delete obj.sitReg;
            delete obj.logRotina;
            delete obj.logChave;
            delete obj.logTabela;
            delete obj.logDescrChave;
            delete obj.sisCampoAdds;
            delete obj.regLog;
            delete obj.dtOperInc;
            delete obj.dtOperCan;
            delete obj.flag;
            delete obj.validationResult;
            delete obj.operCan;
            delete obj.setSisCampoAdds;
            delete obj.sisCampoAdds;
            delete obj.operInc;
            delete obj.dtOperAlt;
            delete obj.sumValor;
            delete obj.precoArmazenado;
        });
        this.excelService.exportAsExcelFile(dadosSelecionados, this.messageService.getTranslates("titles", "liberacaoLote"), options);
    };
    LiberacaoLoteIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_8__["ConfiguracaoFacade"] },
        { type: _liberacao_lote_service__WEBPACK_IMPORTED_MODULE_14__["LiberacaoLoteService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"] },
        { type: app_shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_18__["ExcelService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(_liberacao_lote_ajuste_liberacao_lote_ajuste_component__WEBPACK_IMPORTED_MODULE_11__["LiberacaoLoteAjusteComponent"], { static: false }),
        __metadata("design:type", _liberacao_lote_ajuste_liberacao_lote_ajuste_component__WEBPACK_IMPORTED_MODULE_11__["LiberacaoLoteAjusteComponent"])
    ], LiberacaoLoteIndexComponent.prototype, "childLiberacaoLoteAjusteComponent", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(app_shared_components_commons_table_table_component__WEBPACK_IMPORTED_MODULE_16__["TableComponent"], { static: false }),
        __metadata("design:type", app_shared_components_commons_table_table_component__WEBPACK_IMPORTED_MODULE_16__["TableComponent"])
    ], LiberacaoLoteIndexComponent.prototype, "table", void 0);
    LiberacaoLoteIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-liberacao-lote-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./liberacao-lote-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/controle/liberacao-lote/liberacao-lote-index/liberacao-lote-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./liberacao-lote-index.component.scss */ "./src/app/pages/controle/liberacao-lote/liberacao-lote-index/liberacao-lote-index.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_8__["ConfiguracaoFacade"],
            _liberacao_lote_service__WEBPACK_IMPORTED_MODULE_14__["LiberacaoLoteService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"],
            app_shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_18__["ExcelService"]])
    ], LiberacaoLoteIndexComponent);
    return LiberacaoLoteIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_7__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/controle/liberacao-lote/liberacao-lote.constants.ts":
/*!***************************************************************************!*\
  !*** ./src/app/pages/controle/liberacao-lote/liberacao-lote.constants.ts ***!
  \***************************************************************************/
/*! exports provided: LiberacaoLoteConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiberacaoLoteConstants", function() { return LiberacaoLoteConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var LiberacaoLoteConstants = /** @class */ (function () {
    function LiberacaoLoteConstants() {
        this.sisFormularioId = 90172;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.geracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.ajusteS" },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "CTR";
        this.nomeForm = "titles.liberacaoLote";
        this.tabela = "CorpWebTmpLiberacaoProduto ";
        this.listaIndex = [
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' }
        ];
        this.listaParam = [
            { 'sistema': 'CTR', 'parametros': ["ValDifValorLibLote", "DifMaxValorLibLote", "DtSeguro"] },
            { 'sistema': 'UNI', 'parametros': ["FechamentoCtb"] },
            { 'sistema': 'LIV', 'parametros': ["FechamentoFis"] },
            { 'sistema': 'BAL', 'parametros': ["DifMaxNFDtAtual"] }
        ];
    }
    return LiberacaoLoteConstants;
}());



/***/ }),

/***/ "./src/app/pages/controle/liberacao-lote/liberacao-lote.model.ts":
/*!***********************************************************************!*\
  !*** ./src/app/pages/controle/liberacao-lote/liberacao-lote.model.ts ***!
  \***********************************************************************/
/*! exports provided: LiberacaoLoteDto, LiberacaoLoteFilter, LiberacaoLoteGeraErroDto, SetLiberacaoLote */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiberacaoLoteDto", function() { return LiberacaoLoteDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiberacaoLoteFilter", function() { return LiberacaoLoteFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiberacaoLoteGeraErroDto", function() { return LiberacaoLoteGeraErroDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetLiberacaoLote", function() { return SetLiberacaoLote; });
/* harmony import */ var app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/pages/cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var _shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};



var LiberacaoLoteDto = /** @class */ (function (_super) {
    __extends(LiberacaoLoteDto, _super);
    function LiberacaoLoteDto() {
        var _this = _super.call(this) || this;
        _this.autorizacao = 0;
        _this.flagGera = 'N';
        _this.quantid = 0;
        _this.peso = 0;
        _this.quantidOri = 0;
        _this.pesoOri = 0;
        _this.totItemOri = 0;
        _this.totItem = 0;
        _this.flagLiberado = 'N';
        _this.coddest = 0;
        _this.cliente = '';
        _this.lote = '';
        _this.docto = '';
        _this.serie = '';
        _this.modNota = '';
        _this.quantidDoc = 0;
        _this.pesodoc = 0;
        _this.unidade = '';
        _this.pesoLiq = 0;
        _this.nFeAuto = '';
        _this.importaDANFE = 'N';
        _this.codEmitente = 0;
        _this.precoArmazenado = 0;
        _this.material = '';
        _this.kgMax = 0;
        _this.sumValor = 0;
        _this.sumPesoDoc = 0;
        _this.sumQuantidDoc = 0;
        return _this;
    }
    return LiberacaoLoteDto;
}(_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

var LiberacaoLoteFilter = /** @class */ (function () {
    function LiberacaoLoteFilter() {
        var currentDate = new Date();
        currentDate.setDate(1);
        this.destinatarioIdEmitenteAdicional = '';
        this.dataI = currentDate;
        this.dataF = new Date();
        this.loteId = '';
        this.loteIdNovo = '';
        this.destinatarioIdCliente = "";
        this.destinatarioIdEmitente = "";
        this.materialId = '';
        this.modal = '';
        this.dtVeiculo = 'S';
        this.loteIdOrigem = '';
        this.geraIndividual = 'S';
        this.nroFatura = 0;
        this.nroPedido = '';
        this.dtEscritura = new Date();
        this.cliente = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_2__["Destinatario"]();
        this.material = new app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_0__["Material"]();
        this.emitente = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_2__["Destinatario"]();
        this.limpaDadosAdicionais();
    }
    LiberacaoLoteFilter.prototype.limpaDadosAdicionais = function () {
        this.destinatarioIdEmitenteAdicional = "";
        this.chaveNfe = '';
        this.vlNotaFiscal = 0;
        this.altPrecoArm = 'N';
        this.precoArmazenado = 0;
        this.kilosMax = 0;
        this.nota = "";
        this.serieNotaId = "";
        this.dtEmissao = undefined;
        this.modeloNotaId = '55';
        this.emitenteAdicional = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_2__["Destinatario"]();
    };
    return LiberacaoLoteFilter;
}());

var LiberacaoLoteGeraErroDto = /** @class */ (function (_super) {
    __extends(LiberacaoLoteGeraErroDto, _super);
    function LiberacaoLoteGeraErroDto() {
        var _this = _super.call(this) || this;
        _this.autorizacao = 0;
        _this.lote = '';
        _this.codDest = 0;
        _this.fantasia = '';
        _this.msgErro = '';
        return _this;
    }
    return LiberacaoLoteGeraErroDto;
}(_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

var SetLiberacaoLote = /** @class */ (function () {
    function SetLiberacaoLote() {
    }
    return SetLiberacaoLote;
}());



/***/ }),

/***/ "./src/app/pages/controle/liberacao-lote/liberacao-lote.module.ts":
/*!************************************************************************!*\
  !*** ./src/app/pages/controle/liberacao-lote/liberacao-lote.module.ts ***!
  \************************************************************************/
/*! exports provided: LiberacaoLoteModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiberacaoLoteModule", function() { return LiberacaoLoteModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var app_pages_controle_liberacao_lote_liberacao_lote_index_liberacao_lote_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/pages/controle/liberacao-lote/liberacao-lote-index/liberacao-lote-index.component */ "./src/app/pages/controle/liberacao-lote/liberacao-lote-index/liberacao-lote-index.component.ts");
/* harmony import */ var app_pages_controle_liberacao_lote_liberacao_lote_routing_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/controle/liberacao-lote/liberacao-lote.routing.module */ "./src/app/pages/controle/liberacao-lote/liberacao-lote.routing.module.ts");
/* harmony import */ var app_pages_controle_liberacao_lote_liberacao_lote_filter_liberacao_lote_filter_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/pages/controle/liberacao-lote/liberacao-lote-filter/liberacao-lote-filter.component */ "./src/app/pages/controle/liberacao-lote/liberacao-lote-filter/liberacao-lote-filter.component.ts");
/* harmony import */ var _liberacao_lote_ajuste_liberacao_lote_ajuste_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./liberacao-lote-ajuste/liberacao-lote-ajuste.component */ "./src/app/pages/controle/liberacao-lote/liberacao-lote-ajuste/liberacao-lote-ajuste.component.ts");
/* harmony import */ var _liberacao_lote_erros_liberacao_lote_erros_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./liberacao-lote-erros/liberacao-lote-erros.component */ "./src/app/pages/controle/liberacao-lote/liberacao-lote-erros/liberacao-lote-erros.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};







var LiberacaoLoteModule = /** @class */ (function () {
    function LiberacaoLoteModule() {
    }
    LiberacaoLoteModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], app_pages_controle_liberacao_lote_liberacao_lote_routing_module__WEBPACK_IMPORTED_MODULE_3__["LiberacaoLoteRoutingModule"]],
            declarations: [app_pages_controle_liberacao_lote_liberacao_lote_index_liberacao_lote_index_component__WEBPACK_IMPORTED_MODULE_2__["LiberacaoLoteIndexComponent"], app_pages_controle_liberacao_lote_liberacao_lote_filter_liberacao_lote_filter_component__WEBPACK_IMPORTED_MODULE_4__["LiberacaoLoteFilterComponent"], _liberacao_lote_ajuste_liberacao_lote_ajuste_component__WEBPACK_IMPORTED_MODULE_5__["LiberacaoLoteAjusteComponent"],
                _liberacao_lote_erros_liberacao_lote_erros_component__WEBPACK_IMPORTED_MODULE_6__["LiberacaoLoteErrosComponent"]]
        })
    ], LiberacaoLoteModule);
    return LiberacaoLoteModule;
}());



/***/ }),

/***/ "./src/app/pages/controle/liberacao-lote/liberacao-lote.routing.module.ts":
/*!********************************************************************************!*\
  !*** ./src/app/pages/controle/liberacao-lote/liberacao-lote.routing.module.ts ***!
  \********************************************************************************/
/*! exports provided: LiberacaoLoteRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiberacaoLoteRoutingModule", function() { return LiberacaoLoteRoutingModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _liberacao_lote_index_liberacao_lote_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./liberacao-lote-index/liberacao-lote-index.component */ "./src/app/pages/controle/liberacao-lote/liberacao-lote-index/liberacao-lote-index.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};




var MRoutes = [
    {
        path: "",
        component: _liberacao_lote_index_liberacao_lote_index_component__WEBPACK_IMPORTED_MODULE_3__["LiberacaoLoteIndexComponent"],
        data: { breadcrumb: "liberacaoLote", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    }
];
var LiberacaoLoteRoutingModule = /** @class */ (function () {
    function LiberacaoLoteRoutingModule() {
    }
    LiberacaoLoteRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(MRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], LiberacaoLoteRoutingModule);
    return LiberacaoLoteRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/controle/liberacao-lote/liberacao-lote.service.ts":
/*!*************************************************************************!*\
  !*** ./src/app/pages/controle/liberacao-lote/liberacao-lote.service.ts ***!
  \*************************************************************************/
/*! exports provided: LiberacaoLoteService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiberacaoLoteService", function() { return LiberacaoLoteService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};






var LiberacaoLoteService = /** @class */ (function (_super) {
    __extends(LiberacaoLoteService, _super);
    function LiberacaoLoteService(http) {
        var _this = _super.call(this, http, "controle/liberacaoLote") || this;
        _this.http = http;
        return _this;
    }
    LiberacaoLoteService.prototype.getByFiltro = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/controle/liberacaoLote/getByFiltro", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LiberacaoLoteService.prototype.setCorpWebTmpLiberacaoProduto = function (data) {
        return this.http.put(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/controle/liberacaoLote/setCorpWebTmpLiberacaoProduto", {
            flagGera: data.flagGera, autorizacoes: data.autorizacoes.join(',')
        }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LiberacaoLoteService.prototype._update = function (data) {
        return this.http
            .put(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/controle/liberacaoLote", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LiberacaoLoteService.prototype.getAosTmp = function () {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/controle/liberacaoLote/getCorpWebTmpLiberacaoProduto")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LiberacaoLoteService.prototype.gera = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/controle/liberacaoLote/gera", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LiberacaoLoteService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"] }
    ]; };
    LiberacaoLoteService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])
    ], LiberacaoLoteService);
    return LiberacaoLoteService;
}(_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-controle-liberacao-lote-liberacao-lote-module.js.map