(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-balanca-emissao-nota-fiscal-lote-emissao-nota-fiscal-lote-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-filter/emissao-nota-fiscal-lote-filter.component.html":
/*!*****************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-filter/emissao-nota-fiscal-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=\"emissao-nf-lote-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-55\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.pesquisaEmissaoNotaFiscalLote' | 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-md-3 col-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"de\" class=\"required\">{{\"labels.de\" | translate }}</label>\r\n                                <app-data id=\"de\" name=\"de\"\r\n                                    [(ngModel)]=\"service.filtro.dataInicial\"\r\n                                    required=\"true\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-md-3 col-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 id=\"ate\" name=\"ate\"\r\n                                    [(ngModel)]=\"service.filtro.dataFinal\"\r\n                                    required=\"true\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario id=\"cliente\" name=\"cliente\"\r\n                                    label=\"cliente\"\r\n                                    modalTitle=\"cliente\"\r\n                                    [(ngModel)]=\"service.filtro.destinatarioIdCliente\"\r\n                                    tipoDestinatario=\"C\"\r\n                                    showCgcCpf=\"false\" showInscricao=\"false\"\r\n                                    [inSelected]=\"service.filtro.cliente\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n\r\n                    <div class=\"row\">\r\n                        <div class=\"col-12\">\r\n                            <table id=\"dtRequisicoes\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\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.pesquisar' | translate }}\r\n                    </button>\r\n                    <button class=\"btn btn-success mr-1\" type=\"button\" (click)=\"selecionar()\">\r\n                        {{ 'buttons.ok' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">\r\n                        {{ 'buttons.sair' | 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/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-index/emissao-nota-fiscal-lote-index.component.html":
/*!***************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-index/emissao-nota-fiscal-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\"\n                      [formAction]=\"actionForm\"\n                      [itemData]=\"service.requisicao\"\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <div class=\"row\">\n        <div class=\"col-sm-12 col-md-6\">\n            <div class=\"row\">\n                <div class=\"col-sm-12 col-md-6 col-lg-4\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"requisicao\">{{'labels.requisicao' | translate}}</label>\n                        <input id=\"requisicao\" name=\"requisicao\" type=\"text\" disabled=\"true\"\n                            class=\"form-control form-control-sm\"\n                            currencyMask appNumbersPositive\n                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                            [(ngModel)]=\"service.requisicao.requisicaoId\"\n                            disabled>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\" *ngIf=\"service.requisicao.requisicaoId > 0\">\n                <div class=\"col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <app-input-description label=\"cliente\"\n                            [valueID]=\"service.requisicao.destinatarioIdCliente\"\n                            [valueDescription]=\"service.requisicao.clienteFantasia\">\n                        </app-input-description>\n                    </div>\n                </div>\n            </div>\n        </div>\n        <div class=\"col-sm-12 col-md-6\">\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <button class=\"btn btn-success mr-2\" type=\"button\"\n                        [disabled]=\"!service.requisicao.requisicaoId\"\n                        (click)=\"importarAutorizacoes()\">\n                        {{ 'buttons.importarAutorizacoes' | translate }}\n                    </button>\n                    <button class=\"btn btn-success mr-2\" type=\"button\"\n                        [disabled]=\"desabilitarImpressaoNotaFiscal\"\n                        (click)=\"imprimirNotaFiscal()\">\n                        {{ 'buttons.imprimirNotaFiscal' | translate }}\n                    </button>\n                </div>\n            </div>\n        </div>\n    </div>\n    \n    <div class=\"row\" *ngIf=\"service.autorizacoes.autorizacoes.length > 0\">\n        <div class=\"col-sm-12\">\n            <div class=\"table-responsive\" style=\"overflow: auto;\">\n                <label for=\"dtAutorizacoes\">{{ \"labels.autorizacoes\" | translate}}</label>\n                <table id=\"dtAutorizacoes\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n                \n                <div class=\"clearfix\">&nbsp;</div>\n                <label for=\"dtProdutos\">{{ \"labels.produtos\" | translate}}</label>\n                <table id=\"dtProdutos\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n            </div>\n        </div>\n    </div>\n\n    <div class=\"row mt-3\" *ngIf=\"service.autorizacoes.autorizacoes.length > 0\">\n        <div class=\"col-sm-12 col-md-3\">\n            <app-card-container>\n                <div class=\"row\">\n                    <div class=\"col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"kilos\">{{'labels.kilos' | translate}}</label>\n                            <input id=\"kilos\" name=\"kilos\" type=\"text\"\n                                disabled currencyMask\n                                [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                                [(ngModel)]=\"service.autorizacoes.totais.kilos\" maxlength=\"15\"\n                                class=\"form-control form-control-sm highlight-yellow\" />\n                        </div>\n                    </div>\n                </div>\n                <div class=\"row\">\n                    <div class=\"col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"litrosCc\">{{'labels.litrosCc' | translate}}</label>\n                            <input id=\"litrosCc\" name=\"litrosCc\" type=\"text\"\n                                disabled currencyMask\n                                [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                                [(ngModel)]=\"service.autorizacoes.totais.litros\" maxlength=\"15\"\n                                class=\"form-control form-control-sm highlight-yellow\" />\n                        </div>\n                    </div>\n                </div>\n                <div class=\"row\">\n                    <div class=\"col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"quantidade\">{{'labels.quantidade' | translate}}</label>\n                            <input id=\"quantidade\" name=\"quantidade\" type=\"text\"\n                                disabled currencyMask\n                                [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                                [(ngModel)]=\"service.autorizacoes.totais.quantid\" maxlength=\"15\"\n                                class=\"form-control form-control-sm highlight-yellow\" />\n                        </div>\n                    </div>\n                </div>\n                <div class=\"row\">\n                    <div class=\"col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"valorTotal\">{{'labels.valorTotal' | translate}}</label>\n                            <input id=\"valorTotal\" name=\"valorTotal\" type=\"text\"\n                                disabled currencyMask\n                                [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\n                                [(ngModel)]=\"service.autorizacoes.totais.total\" maxlength=\"15\"\n                                class=\"form-control form-control-sm highlight-yellow\" />\n                        </div>\n                    </div>\n                </div>\n                <div class=\"row\">\n                    <div class=\"col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"vlIcms\">{{'labels.vlIcms' | translate}}</label>\n                            <input id=\"vlIcms\" name=\"vlIcms\" type=\"text\"\n                                disabled currencyMask\n                                [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\n                                [(ngModel)]=\"service.autorizacoes.totais.icms\" maxlength=\"15\"\n                                class=\"form-control form-control-sm highlight-yellow\" />\n                        </div>\n                    </div>\n                </div>\n            </app-card-container>\n        </div>\n    </div>\n</div>\n\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n<app-emissao-nota-fiscal-lote-filter (filtrar)=\"executarFiltro()\"></app-emissao-nota-fiscal-lote-filter>\n<app-emissao-nota-fiscal-lote-nota-carga (filtrar)=\"carregarDadosAutorizacoes()\"></app-emissao-nota-fiscal-lote-nota-carga>\n<app-emissao-nota-fiscal-lote-observ (outSelected)=\"preConfirmacao()\"></app-emissao-nota-fiscal-lote-observ>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.component.html":
/*!*************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.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=\"emissao-nf-lote-nota-carga-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-55\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.selecionarAutorizacoes' | 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-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-input-description label=\"cliente\"\r\n                                    [valueID]=\"service.requisicao.destinatarioIdCliente\"\r\n                                    [valueDescription]=\"service.requisicao.clienteFantasia\">\r\n                                </app-input-description>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-md-3 col-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"de\">{{\"labels.de\" | translate }}</label>\r\n                                <app-data id=\"de\" name=\"de\" disabled\r\n                                    [(ngModel)]=\"service.filtro.dataInicial\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-md-3 col-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"ate\">{{\"labels.ate\" | translate}}</label>\r\n                                <app-data id=\"ate\" name=\"ate\" disabled\r\n                                    [(ngModel)]=\"service.filtro.dataFinal\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-sm-12 col-md-6 col-lg-3 background-gray mt-2 ml-3\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"kilos\">{{'labels.kilos' | translate}}</label>\r\n                                        <input id=\"kilos\" name=\"kilos\" type=\"text\"\r\n                                            disabled currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                            [(ngModel)]=\"kilos\" maxlength=\"15\"\r\n                                            class=\"form-control form-control-sm highlight-yellow\" />\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"litros\">{{'labels.litros' | translate}}</label>\r\n                                        <input id=\"litros\" name=\"litros\" type=\"text\"\r\n                                            disabled currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                            [(ngModel)]=\"litros\" maxlength=\"15\"\r\n                                            class=\"form-control form-control-sm highlight-yellow\" />\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-sm-12 col-md-6 col-lg-4 mt-3 mb-3\">\r\n                            <button class=\"btn btn-success mr-1\" type=\"button\" (click)=\"selecionarTodos()\">\r\n                                {{ 'buttons.selecionarTodos' | translate }}\r\n                            </button>\r\n                        </div>\r\n                    </div>\r\n                    \r\n                    <div class=\"row\">\r\n                        <div class=\"col-12\">\r\n                            <table id=\"dtNotasCargas\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\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.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/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-observ/emissao-nota-fiscal-lote-observ.component.html":
/*!*****************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-observ/emissao-nota-fiscal-lote-observ.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 fade\" id=\"emissao-nf-lote-observ-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"modal-dialog modal-md\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h5 class=\"modal-title\">{{ 'titles.observacoesParaNotaFiscal' | translate }}</h5>\r\n            </div>\r\n            <div class=\"modal-body\">\r\n                <div class=\"row\">\r\n                    <div class=\"col-12\">\r\n                        <textarea id=\"template\" name=\"template\" [(ngModel)]=\"service.notaFiscalEmissao.observacao\"\r\n                            class=\"form-control\" type=\"text\" rows=\"10\"\r\n                            required maxlength=\"750\"></textarea>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row mt-2\">\r\n                    <div class=\"col-lg-12 col-md-12\">\r\n                        <app-combo-padrao [tabela]=\"'Observacoes'\" [chave]=\"'RegObserv'\" [descricao]=\"'Descricao'\"\r\n                            [ativos]=\"true\" [camposExtras]=\"'Observ'\" (outSelected)=\"observacao($event)\"\r\n                            name=\"regObserv\" [(ngModel)]=\"regObserv\">\r\n                        </app-combo-padrao>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button type=\"button\" class=\"btn btn-success mr-2\" (click)=\"confirma()\">\r\n                        {{ 'buttons.ok' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" (click)=\"closeModal()\">\r\n                        {{ 'buttons.cancelar' | translate }}\r\n                    </button>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-filter/emissao-nota-fiscal-lote-filter.component.ts":
/*!*************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-filter/emissao-nota-fiscal-lote-filter.component.ts ***!
  \*************************************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalLoteFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteFilterComponent", function() { return EmissaoNotaFiscalLoteFilterComponent; });
/* 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_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../emissao-nota-fiscal-lote.service */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.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_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-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 EmissaoNotaFiscalLoteFilterComponent = /** @class */ (function () {
    function EmissaoNotaFiscalLoteFilterComponent(service, messageService, datatablesService) {
        this.service = service;
        this.messageService = messageService;
        this.datatablesService = datatablesService;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    EmissaoNotaFiscalLoteFilterComponent.prototype.onSubmit = function (form) {
        var _this = this;
        if (form.invalid) {
            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        if (this.validarDataFiltro()) {
            this.service.getRequisicoes(this.service.filtro).subscribe(function (data) {
                var columns = [
                    _this.datatablesService.getDataStringAlignRight("requisicaoId", "requisicao", "10%"),
                    _this.datatablesService.getDataStringAlignRight("requisicao", "reqCliente", "10%"),
                    _this.datatablesService.getDataString("placa", "placa"),
                    _this.datatablesService.getDataDateTime("dtRequisicao", "data", "DD/MM/YYYY HH:mm:ss"),
                    _this.datatablesService.getDataString("clienteFantasia", "cliente"),
                    _this.datatablesService.getDataString("transportadoraFantasia", "transportadora")
                ];
                _this.datatablesService.toDataTable({ tableId: "dtRequisicoes", columns: columns, data: data, orientationOrder: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["EOrientationOrder"].ASC }, function (aData) {
                    _this.service.requisicao = aData;
                });
            });
        }
    };
    EmissaoNotaFiscalLoteFilterComponent.prototype.selecionar = function () {
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["NumberUtilsStaticService"].isNotPositive(this.service.requisicao.requisicaoId)) {
            this.messageService.warning(this.service.title, "messages.selecioneRequisicao");
            return;
        }
        this.filtrar.emit();
        jQuery("#emissao-nf-lote-filter-dialog").modal("hide");
    };
    EmissaoNotaFiscalLoteFilterComponent.prototype.validarDataFiltro = function () {
        if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["DateTimeUtilsStaticService"].menorA(this.service.filtro.dataFinal, this.service.filtro.dataInicial)) {
            this.messageService.warning(this.service.title, "messages.dataDeMaiordataAte");
            return false;
        }
        return true;
    };
    EmissaoNotaFiscalLoteFilterComponent.ctorParameters = function () { return [
        { type: _emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_2__["EmissaoNotaFiscalLoteService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["DatatablesService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], EmissaoNotaFiscalLoteFilterComponent.prototype, "filtrar", void 0);
    EmissaoNotaFiscalLoteFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-nota-fiscal-lote-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-nota-fiscal-lote-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-filter/emissao-nota-fiscal-lote-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_2__["EmissaoNotaFiscalLoteService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["DatatablesService"]])
    ], EmissaoNotaFiscalLoteFilterComponent);
    return EmissaoNotaFiscalLoteFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-index/emissao-nota-fiscal-lote-index.component.ts":
/*!***********************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-index/emissao-nota-fiscal-lote-index.component.ts ***!
  \***********************************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalLoteIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteIndexComponent", function() { return EmissaoNotaFiscalLoteIndexComponent; });
/* 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_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.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_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../emissao-nota-fiscal-lote.constants */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.constants.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../emissao-nota-fiscal-lote.service */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.service.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../emissao-nota-fiscal-lote.model */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.model.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_11__ = __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 _emissao_nota_fiscal_lote_nota_carga_emissao_nota_fiscal_lote_nota_carga_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.component */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.component.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var app_pages_cadastro_serie_serie_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/pages/cadastro/serie/serie.service */ "./src/app/pages/cadastro/serie/serie.service.ts");
/* harmony import */ var app_pages_nota_fiscal_nota_fiscal_emissao_nota_fiscal_emissao_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/pages/nota-fiscal/nota-fiscal-emissao/nota-fiscal-emissao.service */ "./src/app/pages/nota-fiscal/nota-fiscal-emissao/nota-fiscal-emissao.service.ts");
/* harmony import */ var app_pages_nota_fiscal_nota_fiscal_emissao_nota_fiscal_emissao_model__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/pages/nota-fiscal/nota-fiscal-emissao/nota-fiscal-emissao.model */ "./src/app/pages/nota-fiscal/nota-fiscal-emissao/nota-fiscal-emissao.model.ts");
/* harmony import */ var _nota_complementar_nota_complementar_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../nota-complementar/nota-complementar.service */ "./src/app/pages/balanca/nota-complementar/nota-complementar.service.ts");
/* harmony import */ var app_pages_login_login_model__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! app/pages/login/login.model */ "./src/app/pages/login/login.model.ts");
/* harmony import */ var app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_19__ = __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_pages_nota_fiscal_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! app/pages/nota-fiscal/nota-fiscal.service */ "./src/app/pages/nota-fiscal/nota-fiscal.service.ts");
/* harmony import */ var environments_environment__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var app_pages_nfe_nfe_service__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! app/pages/nfe/nfe.service */ "./src/app/pages/nfe/nfe.service.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_observ_emissao_nota_fiscal_lote_observ_component__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../emissao-nota-fiscal-lote-observ/emissao-nota-fiscal-lote-observ.component */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-observ/emissao-nota-fiscal-lote-observ.component.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 EmissaoNotaFiscalLoteIndexComponent = /** @class */ (function (_super) {
    __extends(EmissaoNotaFiscalLoteIndexComponent, _super);
    function EmissaoNotaFiscalLoteIndexComponent(router, activatedRoute, datatablesService, messageService, loginService, configuracao, service, notaFiscalEmissaoService, notaComplementarService, notaFiscalService, nfeService, funcoesService, permissoesUtils, serieService) {
        var _this = _super.call(this, new _emissao_nota_fiscal_lote_constants__WEBPACK_IMPORTED_MODULE_8__["EmissaoNotaFiscalLoteConstants"](), funcoesService) || this;
        _this.router = router;
        _this.activatedRoute = activatedRoute;
        _this.datatablesService = datatablesService;
        _this.messageService = messageService;
        _this.loginService = loginService;
        _this.configuracao = configuracao;
        _this.service = service;
        _this.notaFiscalEmissaoService = notaFiscalEmissaoService;
        _this.notaComplementarService = notaComplementarService;
        _this.notaFiscalService = notaFiscalService;
        _this.nfeService = nfeService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.serieService = serieService;
        _this.data = new _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_10__["EmissaoNotaFiscalLote"]();
        _this.mensagens = [];
        _this.constantes = new _emissao_nota_fiscal_lote_constants__WEBPACK_IMPORTED_MODULE_8__["EmissaoNotaFiscalLoteConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.login = new app_pages_login_login_model__WEBPACK_IMPORTED_MODULE_18__["Login"]();
        _this.desabilitarImpressaoNotaFiscal = true;
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.service.configs.flagObsCarga = _this.configuracao.boolean("BAL", "FlagObsCarga");
                _this.service.configs.chkDataServ = _this.configuracao.boolean("UNI", "ChkDataServ");
                _this.service.configs.rSeriePadrao = _this.configuracao.number("FAT", "RSeriePadrao");
                _this.service.configs.nfeContingencia = _this.configuracao.boolean("FAT", "NfeContingencia");
                _this.service.configs.impNfeLote = _this.configuracao.boolean("FAT", "ImpNfeLote");
                _this.service.configs.ida1Certificate = _this.configuracao.lerConfig("FAT", "IDA1CERTIFICATE");
            }
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        _this.login = _this.loginService.getLogin();
        return _this;
    }
    EmissaoNotaFiscalLoteIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoesService.abrirFiltro) {
                    _this.service.filtro = new _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_10__["EmissaoNotaFiscalLoteFiltro"]();
                    _this.filtrar();
                }
                else {
                    _this.executarFiltro();
                }
                _this.alterarStatusBtnRemover();
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.alterarStatusBtnRemover = function () {
        this.buttonDisabled('listaIndex', 'remove', (!this.service.autorizacaoSelecionada || app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["NumberUtilsStaticService"].isNotPositive(this.service.autorizacaoSelecionada.autorizacao)));
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.executarFiltro = function () {
        this.service.requisicao = this.service.requisicao;
        this.reiniciar(false);
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.filtrar = function () {
        jQuery("#emissao-nf-lote-filter-dialog").modal("show");
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.refresh = function () {
        this.reiniciar(false);
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.isRequisicaoSelecionada = function () {
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["NumberUtilsStaticService"].isNotPositive(this.service.requisicao.requisicaoId)) {
            this.messageService.warning(this.service.title, "messages.requisicaoNaoInformada");
            return false;
        }
        return true;
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.isAutorizacaoSelecionada = function () {
        if (!!this.service.autorizacaoSelecionada && app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["NumberUtilsStaticService"].isPositive(this.service.autorizacaoSelecionada.autorizacao)) {
            return true;
        }
        this.messageService.warning(this.service.title, "messages.selecioneAutorizacao");
        return false;
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.importarAutorizacoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function () {
            if (_this.isRequisicaoSelecionada()) {
                _this.abrirNotaCarga();
            }
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.abrirNotaCarga = function () {
        var _this = this;
        this.service.gerarNotasCarga(this.service.requisicao.requisicaoId).subscribe(function (resp) {
            if (!resp.isValid) {
                _this.mensagens = _this.messageService.validationResult(resp);
                _this.messageService.warning(_this.service.title, _this.mensagens[0]);
                return;
            }
            jQuery("#emissao-nf-lote-nota-carga-dialog").modal("show");
            _this.childEmissaoNotaFiscalLoteNotaCargaComponent.refreshNotasCargasSelecionadas();
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.carregarDadosAutorizacoes = function () {
        var _this = this;
        this.service.getImportarAutorizacoes().subscribe(function (resp) {
            if (!!resp) {
                _this.service.autorizacoes = resp;
                _this.desabilitarImpressaoNotaFiscal = false;
                _this.carregarGridAutorizacoes();
                _this.carregarGridProdutos();
            }
            else {
                _this.service.autorizacoes = new _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_10__["EmissaoNotaFiscalLoteImpAutorizacao"]();
                _this.desabilitarImpressaoNotaFiscal = true;
            }
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.carregarGridAutorizacoes = function () {
        var _this = this;
        this.service.autorizacaoSelecionada = null;
        this.alterarStatusBtnRemover();
        var columns = [
            this.datatablesService.getDataStringAlignRight("autorizacao", "autorizacao", "10%"),
            this.datatablesService.getDataString("deposito", "deposito"),
            this.datatablesService.getDataString("produto", "produto"),
            this.datatablesService.getDataString("lote1", "lote"),
            this.datatablesService.getDataDouble("kilos1", "kilos", 0),
            this.datatablesService.getDataDouble("litros1", "litros", 0)
        ];
        setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.datatablesService.toDataTable({ tableId: "dtAutorizacoes", columns: columns, data: this.service.autorizacoes.autorizacoes }, function (aData) {
                    _this.service.autorizacaoSelecionada = aData;
                    _this.alterarStatusBtnRemover();
                });
                return [2 /*return*/];
            });
        }); });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.carregarGridProdutos = function () {
        var _this = this;
        var columns = [
            this.datatablesService.getDataString("produto", "produto"),
            this.datatablesService.getDataDouble("kilos", "kilos", 0),
            this.datatablesService.getDataDouble("litros", "litros", 0),
            this.datatablesService.getDataDouble("total", "total", 2)
        ];
        setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this.datatablesService.toDataTable({ tableId: "dtProdutos", columns: columns, data: this.service.autorizacoes.produtos });
                return [2 /*return*/];
            });
        }); }, 500);
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.imprimirNotaFiscal = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            if (_this.isAutorizacaoSelecionada()) {
                if (!_this.service.configs.chkDataServ) {
                    _this.service.notaFiscalEmissao.dtEmissao = new Date();
                }
                if (_this.service.configs.flagObsCarga) {
                    _this.childEmissaoNotaFiscalLoteObservComponent.abrirObservacaoNota();
                }
                else
                    _this.preConfirmacao();
            }
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.preConfirmacao = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.serieService.byRegSerie(this.service.configs.rSeriePadrao).subscribe(function (serie) {
                    if (!serie) {
                        _this.messageService.warning(_this.service.title, 'messages.serieNaoInformada');
                        return;
                    }
                    _this.service.notaFiscalEmissao.regSerie = _this.service.configs.rSeriePadrao;
                    _this.service.notaFiscalEmissao.nota = serie.nota;
                    _this.service.notaFiscalEmissao.codDest = _this.service.requisicao.destinatarioIdCliente;
                    _this.messageService.confirm(_this.service.title, 'messages.confirmaEmissaoNotaFiscal', null, function () { return _this.confirmacao(serie); });
                });
                return [2 /*return*/];
            });
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.confirmacao = function (serie) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.notaFiscalEmissaoService.notaFiscalEmissao = new app_pages_nota_fiscal_nota_fiscal_emissao_nota_fiscal_emissao_model__WEBPACK_IMPORTED_MODULE_16__["NotaFiscalEmissao"]();
                this.notaFiscalEmissaoService.notaFiscalEmissao = this.service.notaFiscalEmissao;
                this.notaFiscalEmissaoService.confirmaNotaCargaLote().subscribe(function (resp) {
                    if (!resp.validationResult.isValid) {
                        resp.validationResult.erros.forEach(function (c) { return _this.messageService.warning(_this.service.title, c.message); });
                        _this.service.autorizacaoSelecionada = null;
                        return;
                    }
                    _this.notaComplementarService.notaComplementar.retRegNota = resp.retRegNota;
                    if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["NumberUtilsStaticService"].toNumber(serie.tipoNfeId) === 2) {
                        if (_this.service.configs.nfeContingencia) {
                            _this.notaComplementarService.setFlagFormCont().subscribe(function (respNotaC) {
                                if (!respNotaC.isValid) {
                                    respNotaC.erros.forEach(function (c) { return _this.messageService.warning(_this.service.title, c.message); });
                                    return;
                                }
                                else {
                                    _this.imprimirEnviarDanfe();
                                }
                            });
                        }
                        else if (_this.service.configs.impNfeLote) {
                            _this.notaComplementarService.confirmacaoContingencia().subscribe(function (respConf) {
                                if (!respConf.isValid) {
                                    respConf.erros.forEach(function (c) { return _this.messageService.warning(_this.service.title, c.message); });
                                    return;
                                }
                                else {
                                    _this.gerarNFEXML();
                                }
                            });
                        }
                    }
                    else if (app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["BooleanUtilsStaticService"].toBoolean(serie.flagImp)) {
                        _this.imprimirEnviarDanfe();
                    }
                });
                return [2 /*return*/];
            });
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.imprimirEnviarDanfe = function () {
        var _this = this;
        this.imprimirDanfe();
        this.notaFiscalService.enviarEmailXmlPdfCliente({
            regNota: this.notaComplementarService.notaComplementar.retRegNota,
            reportId: 'COM0007',
            titulo: this.messageService.getTranslates('titles', 'notaComplementar'),
            logotipo: environments_environment__WEBPACK_IMPORTED_MODULE_21__["environment"].logotipo_relatorio,
            filtro: {
                regNota: this.notaComplementarService.notaComplementar.retRegNota,
                filialId: this.login.filialId,
                colaboradorId: this.login.colaboradorId
            }
        }).subscribe(function (result) {
            if (!result.isValid) {
                result.erros.forEach(function (c) { return _this.messageService.warning(_this.service.title, c.message); });
                return;
            }
            else {
                _this.messageService.info(_this.service.title, "messages.emailEnviadoSucesso");
                _this.reiniciar(true);
            }
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.reiniciar = function (limparRequisicao) {
        if (limparRequisicao)
            this.service.requisicao = new _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_10__["EmissaoNotaFiscalLoteRequisicao"]();
        this.service.autorizacaoSelecionada = null;
        this.service.autorizacoes = new _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_10__["EmissaoNotaFiscalLoteImpAutorizacao"]();
        this.desabilitarImpressaoNotaFiscal = true;
        this.alterarStatusBtnRemover();
        this.datatablesService.destroy("dtAutorizacoes");
        this.datatablesService.destroy("dtProdutos");
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.imprimirDanfe = function () {
        this.funcoesService.reportInvoc.invocaRelatorio('COM0007', {
            titulo: this.messageService.getTranslates('titles', 'emissaoNotaFiscal'),
            subTitulo: ''
        }, {
            regNota: this.notaComplementarService.notaComplementar.retRegNota,
            filialId: this.login.filialId,
            colaboradorId: this.login.colaboradorId
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.gerarNFEXML = function () {
        var _this = this;
        if (this.funcoesService.isUndefinedOrNull(this.service.configs.ida1Certificate)) {
            this.messageService.error(this.service.title, "messages.certificadoNaoSelecionadoConfiguracoes");
        }
        else {
            this.nfeService.emissao({ regNota: this.notaComplementarService.notaComplementar.retRegNota }).subscribe(function (resp) {
                if (resp.has) {
                    _this.messageService.warning(_this.service.title, "messages.verifiqueStatusNfe");
                }
                else {
                    _this.imprimirDanfe();
                    _this.reiniciar(true);
                }
            });
        }
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (_this.isRequisicaoSelecionada()) {
                _super.prototype.properties.call(_this, _this.service.requisicao);
            }
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.remove = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            _this.messageService.confirm(_this.service.title, "messages.confirmaExclusaoAutorizacao", "", function () {
                _this.service.removerAutorizacao(_this.service.autorizacaoSelecionada).subscribe(function (result) {
                    if (!result.isValid) {
                        _this.mensagens = _this.messageService.validationResult(result);
                        _this.messageService.warning(_this.service.title, _this.mensagens[0]);
                    }
                    else {
                        _this.datatablesService.remove("dtAutorizacoes");
                        _this.service.autorizacaoSelecionada = null;
                        _this.carregarDadosAutorizacoes();
                    }
                });
            });
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.prototype.print = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
            _this.constantes.paramRelatorio = {
                dataInicial: _this.service.filtro.dataInicial,
                dataFinal: _this.service.filtro.dataFinal,
                destinatarioIdCliente: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["NumberUtilsStaticService"].toNumber(_this.service.filtro.destinatarioIdCliente)
            };
            _super.prototype.print.call(_this);
        });
    };
    EmissaoNotaFiscalLoteIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_13__["ConfiguracaoFacade"] },
        { type: _emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_9__["EmissaoNotaFiscalLoteService"] },
        { type: app_pages_nota_fiscal_nota_fiscal_emissao_nota_fiscal_emissao_service__WEBPACK_IMPORTED_MODULE_15__["NotaFiscalEmissaoService"] },
        { type: _nota_complementar_nota_complementar_service__WEBPACK_IMPORTED_MODULE_17__["NotaComplementarService"] },
        { type: app_pages_nota_fiscal_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_20__["NotaFiscalService"] },
        { type: app_pages_nfe_nfe_service__WEBPACK_IMPORTED_MODULE_22__["NfeService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] },
        { type: app_pages_cadastro_serie_serie_service__WEBPACK_IMPORTED_MODULE_14__["SerieService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(_emissao_nota_fiscal_lote_nota_carga_emissao_nota_fiscal_lote_nota_carga_component__WEBPACK_IMPORTED_MODULE_12__["EmissaoNotaFiscalLoteNotaCargaComponent"], { static: false }),
        __metadata("design:type", _emissao_nota_fiscal_lote_nota_carga_emissao_nota_fiscal_lote_nota_carga_component__WEBPACK_IMPORTED_MODULE_12__["EmissaoNotaFiscalLoteNotaCargaComponent"])
    ], EmissaoNotaFiscalLoteIndexComponent.prototype, "childEmissaoNotaFiscalLoteNotaCargaComponent", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(_emissao_nota_fiscal_lote_observ_emissao_nota_fiscal_lote_observ_component__WEBPACK_IMPORTED_MODULE_23__["EmissaoNotaFiscalLoteObservComponent"], { static: false }),
        __metadata("design:type", _emissao_nota_fiscal_lote_observ_emissao_nota_fiscal_lote_observ_component__WEBPACK_IMPORTED_MODULE_23__["EmissaoNotaFiscalLoteObservComponent"])
    ], EmissaoNotaFiscalLoteIndexComponent.prototype, "childEmissaoNotaFiscalLoteObservComponent", void 0);
    EmissaoNotaFiscalLoteIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-nota-fiscal-lote-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-nota-fiscal-lote-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-index/emissao-nota-fiscal-lote-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_13__["ConfiguracaoFacade"],
            _emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_9__["EmissaoNotaFiscalLoteService"],
            app_pages_nota_fiscal_nota_fiscal_emissao_nota_fiscal_emissao_service__WEBPACK_IMPORTED_MODULE_15__["NotaFiscalEmissaoService"],
            _nota_complementar_nota_complementar_service__WEBPACK_IMPORTED_MODULE_17__["NotaComplementarService"],
            app_pages_nota_fiscal_nota_fiscal_service__WEBPACK_IMPORTED_MODULE_20__["NotaFiscalService"],
            app_pages_nfe_nfe_service__WEBPACK_IMPORTED_MODULE_22__["NfeService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"],
            app_pages_cadastro_serie_serie_service__WEBPACK_IMPORTED_MODULE_14__["SerieService"]])
    ], EmissaoNotaFiscalLoteIndexComponent);
    return EmissaoNotaFiscalLoteIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.component.scss":
/*!***********************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.component.scss ***!
  \***********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".highlight-yellow,\n.highlight-yellow:disabled {\n  background-color: yellow;\n}\n\n.background-gray {\n  background-color: #ddd;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvYmFsYW5jYS9lbWlzc2FvLW5vdGEtZmlzY2FsLWxvdGUvZW1pc3Nhby1ub3RhLWZpc2NhbC1sb3RlLW5vdGEtY2FyZ2EvQzpcXENvcnBvcmF0ZVxcQ29ycG9yYXRlV2ViRGVzZW52XFxfdW5pc29sdXRpb24vc3JjXFxhcHBcXHBhZ2VzXFxiYWxhbmNhXFxlbWlzc2FvLW5vdGEtZmlzY2FsLWxvdGVcXGVtaXNzYW8tbm90YS1maXNjYWwtbG90ZS1ub3RhLWNhcmdhXFxlbWlzc2FvLW5vdGEtZmlzY2FsLWxvdGUtbm90YS1jYXJnYS5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvcGFnZXMvYmFsYW5jYS9lbWlzc2FvLW5vdGEtZmlzY2FsLWxvdGUvZW1pc3Nhby1ub3RhLWZpc2NhbC1sb3RlLW5vdGEtY2FyZ2EvZW1pc3Nhby1ub3RhLWZpc2NhbC1sb3RlLW5vdGEtY2FyZ2EuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0VBRUksd0JBQUE7QUNDSjs7QURFQTtFQUNJLHNCQUFBO0FDQ0oiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9iYWxhbmNhL2VtaXNzYW8tbm90YS1maXNjYWwtbG90ZS9lbWlzc2FvLW5vdGEtZmlzY2FsLWxvdGUtbm90YS1jYXJnYS9lbWlzc2FvLW5vdGEtZmlzY2FsLWxvdGUtbm90YS1jYXJnYS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5oaWdobGlnaHQteWVsbG93LFxyXG4uaGlnaGxpZ2h0LXllbGxvdzpkaXNhYmxlZCB7XHJcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB5ZWxsb3c7XHJcbn1cclxuXHJcbi5iYWNrZ3JvdW5kLWdyYXkge1xyXG4gICAgYmFja2dyb3VuZC1jb2xvcjogI2RkZDtcclxufSIsIi5oaWdobGlnaHQteWVsbG93LFxuLmhpZ2hsaWdodC15ZWxsb3c6ZGlzYWJsZWQge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB5ZWxsb3c7XG59XG5cbi5iYWNrZ3JvdW5kLWdyYXkge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjZGRkO1xufSJdfQ== */");

/***/ }),

/***/ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.component.ts":
/*!*********************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.component.ts ***!
  \*********************************************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalLoteNotaCargaComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteNotaCargaComponent", function() { return EmissaoNotaFiscalLoteNotaCargaComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../emissao-nota-fiscal-lote.service */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../emissao-nota-fiscal-lote.model */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.model.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 __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 EmissaoNotaFiscalLoteNotaCargaComponent = /** @class */ (function () {
    function EmissaoNotaFiscalLoteNotaCargaComponent(service, messageService, datatablesService) {
        var _this = this;
        this.service = service;
        this.messageService = messageService;
        this.datatablesService = datatablesService;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.data = new _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_4__["EmissaoNotaFiscalLoteNotaCarga"]();
        this.kilos = 0;
        this.litros = 0;
        this.mensagens = [];
        this.selecionarNotaCarga = function (div) {
            var id = div.attr("id");
            if (id) {
                setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
                    var _this = this;
                    return __generator(this, function (_a) {
                        this.data.selecionado = this.data.selecionado === "S" ? "N" : "S";
                        this.service.selecionarNotaCarga(this.data.autorizacao, this.data.material, this.data.selecionado).subscribe(function (resp) {
                            if (!resp.isValid) {
                                _this.mensagens = _this.messageService.validationResult(resp);
                                _this.messageService.warning(_this.service.title, _this.mensagens[0]);
                                return;
                            }
                            _this.refreshNotasCargasSelecionadas();
                        });
                        return [2 /*return*/];
                    });
                }); });
            }
        };
    }
    EmissaoNotaFiscalLoteNotaCargaComponent.prototype.refreshNotasCargasSelecionadas = function () {
        var _this = this;
        this.service.getTmpNotasCargasSelecionadas().subscribe(function (resp) {
            _this.kilos = 0;
            _this.litros = 0;
            resp.filter(function (r) { return r.selecionado === "S"; }).forEach(function (r) {
                _this.kilos += r.kilos;
                _this.litros += r.volumeCorrigido;
            });
            var columns = [
                _this.datatablesService.getBolinha("selecionado", "sel", "S", _this.selecionarNotaCarga, "", "rgb(255, 0, 0)"),
                _this.datatablesService.getDataStringAlignRight("autorizacao", "autorizacao", "10%"),
                _this.datatablesService.getDataString("deposito", "deposito"),
                _this.datatablesService.getDataString("codigo", "codigo"),
                _this.datatablesService.getDataString("produto", "produto"),
                _this.datatablesService.getDataStringAlignRight("kilos", "kilos"),
                _this.datatablesService.getDataStringAlignRight("volumeCorrigido", "litros")
            ];
            _this.datatablesService.toDataTable({ tableId: "dtNotasCargas", columns: columns, data: resp }, function (aData) {
                _this.data = aData;
            });
        });
    };
    EmissaoNotaFiscalLoteNotaCargaComponent.prototype.selecionarTodos = function () {
        var _this = this;
        this.service.selecionarTodasNotaCarga().subscribe(function (resp) {
            if (!resp.isValid) {
                _this.mensagens = _this.messageService.validationResult(resp);
                _this.messageService.warning(_this.service.title, _this.mensagens[0]);
                return;
            }
            _this.refreshNotasCargasSelecionadas();
        });
    };
    EmissaoNotaFiscalLoteNotaCargaComponent.prototype.onSubmit = function (form) {
        this.filtrar.emit();
        jQuery("#emissao-nf-lote-nota-carga-dialog").modal("hide");
    };
    EmissaoNotaFiscalLoteNotaCargaComponent.ctorParameters = function () { return [
        { type: _emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_1__["EmissaoNotaFiscalLoteService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], EmissaoNotaFiscalLoteNotaCargaComponent.prototype, "filtrar", void 0);
    EmissaoNotaFiscalLoteNotaCargaComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-nota-fiscal-lote-nota-carga",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-nota-fiscal-lote-nota-carga.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./emissao-nota-fiscal-lote-nota-carga.component.scss */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_1__["EmissaoNotaFiscalLoteService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"]])
    ], EmissaoNotaFiscalLoteNotaCargaComponent);
    return EmissaoNotaFiscalLoteNotaCargaComponent;
}());



/***/ }),

/***/ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-observ/emissao-nota-fiscal-lote-observ.component.ts":
/*!*************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-observ/emissao-nota-fiscal-lote-observ.component.ts ***!
  \*************************************************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalLoteObservComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteObservComponent", function() { return EmissaoNotaFiscalLoteObservComponent; });
/* 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_funcoes_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../emissao-nota-fiscal-lote.service */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.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 EmissaoNotaFiscalLoteObservComponent = /** @class */ (function () {
    function EmissaoNotaFiscalLoteObservComponent(service, funcoes, messageService) {
        this.service = service;
        this.funcoes = funcoes;
        this.messageService = messageService;
        this.outSelected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.regObserv = "";
        this.mensagens = [];
    }
    EmissaoNotaFiscalLoteObservComponent.prototype.ngOnInit = function () {
        this.regObserv = "";
    };
    EmissaoNotaFiscalLoteObservComponent.prototype.closeModal = function () {
        this.funcoes.closeModal("emissao-nf-lote-observ-dialog");
    };
    EmissaoNotaFiscalLoteObservComponent.prototype.openModal = function () {
        this.regObserv = "";
        this.funcoes.openModal("emissao-nf-lote-observ-dialog");
    };
    EmissaoNotaFiscalLoteObservComponent.prototype.confirma = function () {
        this.closeModal();
        this.outSelected.emit(true);
    };
    EmissaoNotaFiscalLoteObservComponent.prototype.observacao = function (selected) {
        if (!selected)
            return;
        this.service.notaFiscalEmissao.observacao = selected.observ;
    };
    EmissaoNotaFiscalLoteObservComponent.prototype.abrirObservacaoNota = function () {
        var _this = this;
        this.service.gerarObservacoesNotaCarga(this.service.autorizacaoSelecionada.regNota).subscribe(function (resp) {
            if (!resp.isValid) {
                _this.mensagens = _this.messageService.validationResult(resp);
                _this.messageService.warning(_this.service.title, _this.mensagens[0]);
            }
            else {
                _this.service.notaFiscalEmissao.observacao = resp.message;
                _this.openModal();
            }
        });
    };
    EmissaoNotaFiscalLoteObservComponent.ctorParameters = function () { return [
        { type: _emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_2__["EmissaoNotaFiscalLoteService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__["FuncoesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], EmissaoNotaFiscalLoteObservComponent.prototype, "outSelected", void 0);
    EmissaoNotaFiscalLoteObservComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-nota-fiscal-lote-observ",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-nota-fiscal-lote-observ.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-observ/emissao-nota-fiscal-lote-observ.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_emissao_nota_fiscal_lote_service__WEBPACK_IMPORTED_MODULE_2__["EmissaoNotaFiscalLoteService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"]])
    ], EmissaoNotaFiscalLoteObservComponent);
    return EmissaoNotaFiscalLoteObservComponent;
}());



/***/ }),

/***/ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.constants.ts":
/*!**********************************************************************************************!*\
  !*** ./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.constants.ts ***!
  \**********************************************************************************************/
/*! exports provided: EmissaoNotaFiscalLoteConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteConstants", function() { return EmissaoNotaFiscalLoteConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var EmissaoNotaFiscalLoteConstants = /** @class */ (function () {
    function EmissaoNotaFiscalLoteConstants() {
        this.sisFormularioId = 375159;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: 'labels.exclusao' },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: 'labels.consulta' },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: 'labels.propriedades' },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: 'labels.permissoes' },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: 'labels.importarAutorizacoes' },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: 'labels.imprimirNotaFiscal' }
        ];
        this.sisSistemaId = "BAL";
        this.nomeForm = "titles.emissaoNotaFiscalLote";
        this.reportId = "BAL0019";
        this.reportTitulo = { "titulo": "Emissão Nota Fiscal em Lote", "subTitulo": "" };
        this.listaIndex = [
            { title: 'Excluir', action: 'remove', icon: 'icon-close', exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: 'icon-reload', exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: 'print', icon: 'icon-printer', exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Propriedade', action: 'properties', icon: 'icon-menu', exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: 'icon-unlock', exibeButton: true, eximeMenu: true, menuName: 'Movimento' }
        ];
        this.listaForm = [
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
        this.listaParam = [
            {
                sistema: 'BAL',
                parametros: [
                    'FlagObsCarga'
                ]
            },
            {
                sistema: 'UNI',
                parametros: [
                    'ChkDataServ'
                ]
            },
            {
                sistema: 'FAT',
                parametros: [
                    'RSeriePadrao',
                    'NfeContingencia',
                    'ImpNfeLote',
                    'IDA1CERTIFICATE',
                ]
            }
        ];
    }
    return EmissaoNotaFiscalLoteConstants;
}());



/***/ }),

/***/ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.model.ts":
/*!******************************************************************************************!*\
  !*** ./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.model.ts ***!
  \******************************************************************************************/
/*! exports provided: EmissaoNotaFiscalLote, EmissaoNotaFiscalLoteFiltro, EmissaoNotaFiscalLoteRequisicao, EmissaoNotaFiscalLoteImpAutorizacao, EmissaoNotaFiscalLoteDadosAutorizacao, EmissaoNotaFiscalLoteAutorizacaoProduto, EmissaoNotaFiscalLoteAutorizacaoTotais, EmissaoNotaFiscalLoteNotaCarga */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLote", function() { return EmissaoNotaFiscalLote; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteFiltro", function() { return EmissaoNotaFiscalLoteFiltro; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteRequisicao", function() { return EmissaoNotaFiscalLoteRequisicao; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteImpAutorizacao", function() { return EmissaoNotaFiscalLoteImpAutorizacao; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteDadosAutorizacao", function() { return EmissaoNotaFiscalLoteDadosAutorizacao; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteAutorizacaoProduto", function() { return EmissaoNotaFiscalLoteAutorizacaoProduto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteAutorizacaoTotais", function() { return EmissaoNotaFiscalLoteAutorizacaoTotais; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteNotaCarga", function() { return EmissaoNotaFiscalLoteNotaCarga; });
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_2__ = __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");
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 EmissaoNotaFiscalLote = /** @class */ (function (_super) {
    __extends(EmissaoNotaFiscalLote, _super);
    function EmissaoNotaFiscalLote() {
        var _this = _super.call(this) || this;
        _this.tipoMov = "C";
        _this.flagDegradacao = "N";
        return _this;
    }
    return EmissaoNotaFiscalLote;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var EmissaoNotaFiscalLoteFiltro = /** @class */ (function () {
    function EmissaoNotaFiscalLoteFiltro() {
        var data = new Date();
        this.dataInicial = app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["DateTimeUtilsStaticService"].addDays(data, -1);
        this.dataFinal = data;
        this.destinatarioIdCliente = 0;
        this.cliente = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_1__["Destinatario"]();
    }
    return EmissaoNotaFiscalLoteFiltro;
}());

var EmissaoNotaFiscalLoteRequisicao = /** @class */ (function (_super) {
    __extends(EmissaoNotaFiscalLoteRequisicao, _super);
    function EmissaoNotaFiscalLoteRequisicao() {
        return _super.call(this) || this;
    }
    return EmissaoNotaFiscalLoteRequisicao;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var EmissaoNotaFiscalLoteImpAutorizacao = /** @class */ (function () {
    function EmissaoNotaFiscalLoteImpAutorizacao() {
        this.autorizacoes = [];
        this.produtos = [];
        this.totais = new EmissaoNotaFiscalLoteAutorizacaoTotais();
    }
    return EmissaoNotaFiscalLoteImpAutorizacao;
}());

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

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

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

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



/***/ }),

/***/ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.module.ts":
/*!*******************************************************************************************!*\
  !*** ./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.module.ts ***!
  \*******************************************************************************************/
/*! exports provided: EmissaoNotaFiscalLoteModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteModule", function() { return EmissaoNotaFiscalLoteModule; });
/* 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_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_index_emissao_nota_fiscal_lote_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./emissao-nota-fiscal-lote-index/emissao-nota-fiscal-lote-index.component */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-index/emissao-nota-fiscal-lote-index.component.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_routing_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./emissao-nota-fiscal-lote.routing.module */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.routing.module.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_filter_emissao_nota_fiscal_lote_filter_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./emissao-nota-fiscal-lote-filter/emissao-nota-fiscal-lote-filter.component */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-filter/emissao-nota-fiscal-lote-filter.component.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_nota_carga_emissao_nota_fiscal_lote_nota_carga_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.component */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-nota-carga/emissao-nota-fiscal-lote-nota-carga.component.ts");
/* harmony import */ var _emissao_nota_fiscal_lote_observ_emissao_nota_fiscal_lote_observ_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./emissao-nota-fiscal-lote-observ/emissao-nota-fiscal-lote-observ.component */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-observ/emissao-nota-fiscal-lote-observ.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 EmissaoNotaFiscalLoteModule = /** @class */ (function () {
    function EmissaoNotaFiscalLoteModule() {
    }
    EmissaoNotaFiscalLoteModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [
                app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"],
                _emissao_nota_fiscal_lote_routing_module__WEBPACK_IMPORTED_MODULE_3__["EmissaoNotaFiscalLoteRoutingModule"]
            ],
            declarations: [
                _emissao_nota_fiscal_lote_index_emissao_nota_fiscal_lote_index_component__WEBPACK_IMPORTED_MODULE_2__["EmissaoNotaFiscalLoteIndexComponent"],
                _emissao_nota_fiscal_lote_filter_emissao_nota_fiscal_lote_filter_component__WEBPACK_IMPORTED_MODULE_4__["EmissaoNotaFiscalLoteFilterComponent"],
                _emissao_nota_fiscal_lote_nota_carga_emissao_nota_fiscal_lote_nota_carga_component__WEBPACK_IMPORTED_MODULE_5__["EmissaoNotaFiscalLoteNotaCargaComponent"],
                _emissao_nota_fiscal_lote_observ_emissao_nota_fiscal_lote_observ_component__WEBPACK_IMPORTED_MODULE_6__["EmissaoNotaFiscalLoteObservComponent"]
            ]
        })
    ], EmissaoNotaFiscalLoteModule);
    return EmissaoNotaFiscalLoteModule;
}());



/***/ }),

/***/ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.routing.module.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.routing.module.ts ***!
  \***************************************************************************************************/
/*! exports provided: EmissaoNotaFiscalLoteRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteRoutingModule", function() { return EmissaoNotaFiscalLoteRoutingModule; });
/* 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 _emissao_nota_fiscal_lote_index_emissao_nota_fiscal_lote_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./emissao-nota-fiscal-lote-index/emissao-nota-fiscal-lote-index.component */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote-index/emissao-nota-fiscal-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: _emissao_nota_fiscal_lote_index_emissao_nota_fiscal_lote_index_component__WEBPACK_IMPORTED_MODULE_3__["EmissaoNotaFiscalLoteIndexComponent"],
        data: { breadcrumb: "emissaoNotaFiscalLote", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    }
];
var EmissaoNotaFiscalLoteRoutingModule = /** @class */ (function () {
    function EmissaoNotaFiscalLoteRoutingModule() {
    }
    EmissaoNotaFiscalLoteRoutingModule = __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"]],
        })
    ], EmissaoNotaFiscalLoteRoutingModule);
    return EmissaoNotaFiscalLoteRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.service.ts":
/*!********************************************************************************************!*\
  !*** ./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.service.ts ***!
  \********************************************************************************************/
/*! exports provided: EmissaoNotaFiscalLoteService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoNotaFiscalLoteService", function() { return EmissaoNotaFiscalLoteService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* 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 app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.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 _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./emissao-nota-fiscal-lote.model */ "./src/app/pages/balanca/emissao-nota-fiscal-lote/emissao-nota-fiscal-lote.model.ts");
/* harmony import */ var app_pages_nota_fiscal_nota_fiscal_emissao_nota_fiscal_emissao_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/nota-fiscal/nota-fiscal-emissao/nota-fiscal-emissao.model */ "./src/app/pages/nota-fiscal/nota-fiscal-emissao/nota-fiscal-emissao.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 __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 EmissaoNotaFiscalLoteService = /** @class */ (function (_super) {
    __extends(EmissaoNotaFiscalLoteService, _super);
    function EmissaoNotaFiscalLoteService(http, messageService) {
        var _this = _super.call(this, http, "balanca/emissaoNotaFiscalLote") || this;
        _this.http = http;
        _this.messageService = messageService;
        _this.title = "titles.emissaoNotaFiscalLote";
        _this.filtro = new _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_7__["EmissaoNotaFiscalLoteFiltro"]();
        _this.requisicao = new _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_7__["EmissaoNotaFiscalLoteRequisicao"]();
        _this.autorizacoes = new _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_7__["EmissaoNotaFiscalLoteImpAutorizacao"]();
        _this.autorizacaoSelecionada = new _emissao_nota_fiscal_lote_model__WEBPACK_IMPORTED_MODULE_7__["EmissaoNotaFiscalLoteDadosAutorizacao"]();
        _this.notaFiscalEmissao = new app_pages_nota_fiscal_nota_fiscal_emissao_nota_fiscal_emissao_model__WEBPACK_IMPORTED_MODULE_8__["NotaFiscalEmissao"]();
        _this.configs = {
            flagObsCarga: false,
            chkDataServ: false,
            rSeriePadrao: 0,
            nfeContingencia: false,
            impNfeLote: false,
            ida1Certificate: ""
        };
        return _this;
    }
    EmissaoNotaFiscalLoteService.prototype.getRequisicoes = function (filtro) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/emissaoNotaFiscalLote/getRequisicoes", filtro)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalLoteService.prototype.getImportarAutorizacoes = function () {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/emissaoNotaFiscalLote/getImportarAutorizacoes")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalLoteService.prototype.gerarNotasCarga = function (requisicaoId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/emissaoNotaFiscalLote/gerarNotasCarga/" + requisicaoId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalLoteService.prototype.selecionarNotaCarga = function (autorizacao, materialId, selecionado) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/emissaoNotaFiscalLote/selecionarNotaCarga", { autorizacao: autorizacao, materialId: materialId, selecionado: selecionado })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalLoteService.prototype.selecionarTodasNotaCarga = function () {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/emissaoNotaFiscalLote/selecionarTodasNotaCarga")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalLoteService.prototype.getTmpNotasCargasSelecionadas = function () {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/emissaoNotaFiscalLote/getTmpNotasCargasSelecionadas")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalLoteService.prototype.gerarObservacoesNotaCarga = function (notaId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/emissaoNotaFiscalLote/gerarObservacoesNotaCarga/" + notaId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalLoteService.prototype.removerAutorizacao = function (autorizacaoSelecionada) {
        return this.http
            .put(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/emissaoNotaFiscalLote/remove/", autorizacaoSelecionada)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    EmissaoNotaFiscalLoteService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"] }
    ]; };
    EmissaoNotaFiscalLoteService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"]])
    ], EmissaoNotaFiscalLoteService);
    return EmissaoNotaFiscalLoteService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_5__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-balanca-emissao-nota-fiscal-lote-emissao-nota-fiscal-lote-module.js.map