(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-cockpit-lancamento-vagao-lancamento-vagao-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-filter/lancamento-vagao-filter.component.html":
/*!*****************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-filter/lancamento-vagao-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=\"lancamento-vagao-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\n    <div class=\"uni-modal-dialog-md-30\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.lancamentoVagao' | translate }}</h6>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"row\">\n                    <div class=\"col-lg-12\">\n                        <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\n                            <app-validacoes></app-validacoes>\n                            <div class=\"row\">\n                                <div class=\"col-lg-6 col-md-6\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"periodoDe\">{{\"labels.de\" | translate }}</label>\n                                        <app-data id=\"periodoDe\" name=\"periodoDe\"\n                                            [(ngModel)]=\"service.filtro.dataI\" autofocus class=\"dataHora\">\n                                        </app-data>\n                                    </div>\n                                </div>\n                                <div class=\"col-lg-6 col-md-6\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"ate\">{{\"labels.ate\" | translate}}</label>\n                                        <app-data id=\"ate\" name=\"ate\" [(ngModel)]=\"service.filtro.dataF\"\n                                            class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\">\n                                        </app-data>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"modal-footer\">\n                                <button class=\"btn btn-success\" type=\"submit\">{{ 'buttons.pesquisar' | translate\n                                    }}</button>\n                                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                            </div>\n                        </form>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-form/lancamento-vagao-form.component.html":
/*!*************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-form/lancamento-vagao-form.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 [sisFormularioId]=\"constantes.sisFormularioId\" [itemData]=\"data.regPlaneja\"\n    [botoesComando]=\"constantes.listaForm\">\n</app-menu-command-bar>\n\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <div class=\"\">\n                <app-form-legenda></app-form-legenda>\n                <div class=\"card-body widget-body\">\n                    <app-validacoes></app-validacoes>\n                    <div class=\"clearfix\">\n                        <ul class=\"nav nav-tabs \">\n                            <li class=\"nav-item\">\n                                <a class=\"nav-link active show\" data-toggle=\"tab\" href=\"#da\">{{ \"labels.dados\" |\n                                    translate }}</a>\n                            </li>\n                            <li class=\"nav-item\">\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#nt\">{{ \"labels.notas\" | translate\n                                    }}</a>\n                            </li>\n                        </ul>\n                    </div>\n                    <div class=\"tab-content top\">\n                        <div class=\"tab-pane active show\" id=\"da\">\n                            <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\n                                <div class=\"row\">\n                                    <div class=\"col-lg-3\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label class=\"required\" for=\"vagao\">{{'labels.vagao' | translate}}</label>\n                                            <input id=\"vagao\" type=\"text\" name=\"vagao\"\n                                                class=\"form-control form-control-sm\" [(ngModel)]=\"data.vagao\"\n                                                [disabled]=\"funcoesService.isDetail(actionForm)\" required=\"true\"\n                                                (blur)=\"validarCadastroPlaca()\" maxlength=\"11\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-3\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"dtEmissao\" class=\"required\">{{'labels.emissao' |\n                                                translate}}</label>\n                                            <app-data-h-m id=\"dtEmissao\" name=\"dtEmissao\" [(ngModel)]=\"data.dtEmissao\"\n                                                [disabled]=\"true\">\n                                            </app-data-h-m>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-6 col-md-6\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <app-pesquisa-destinatario id=\"destinatarioIdCliente\"\n                                                name=\"destinatarioIdCliente\" label=\"cliente\"\n                                                modalTitle=\"pesquisaDeCliente\" [inSelected]=\"data.destCliente\"\n                                                [(ngModel)]=\"data.cliente\" tipoDestinatario=\"C\" showCgcCpf=\"false\"\n                                                showInscricao=\"false\" (outModel)=\"trataDest($event)\" required=\"true\"\n                                                [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                            </app-pesquisa-destinatario>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <app-pesquisa-material id=\"material\" name=\"material\" label=\"produto\"\n                                                modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"data.material\"\n                                                required=\"true\" [inSelected]=\"data.produtoModel\"\n                                                [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                (outModel)=\"trataMat($event)\">\n                                            </app-pesquisa-material>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-3\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"pesoBruto\" class=\"required\">{{'labels.pesoBruto' |\n                                                translate}}</label>\n                                            <input id=\"pesoBruto\" name=\"pesoBruto\" maxlength=\"50\"\n                                                [(ngModel)]=\"data.pesoBruto\" required\n                                                class=\"form-control form-control-sm\" type=\"text\" currencyMask\n                                                [options]=\"funcoesService.optionCurrency(0)\" (blur)=\"validaPesoBru()\"\n                                                [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-3\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"pesoLiquido\" class=\"required\">{{'labels.pesoLiq' |\n                                                translate}}</label>\n                                            <input id=\"pesoLiquido\" name=\"pesoLiquido\" maxlength=\"50\" currencyMask\n                                                [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                                                [(ngModel)]=\"data.pesoLiquido\" class=\"form-control form-control-sm\"\n                                                type=\"text\" [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                required=\"true\" (blur)=\"validaPesoBru()\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-3\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"localTransbordo\" class=\"required\">{{\"labels.localTransbordo\" |\n                                                translate}}</label>\n                                            <app-combo-padrao id=\"localTransbordo\" name=\"localTransbordo\"\n                                                [(ngModel)]=\"data.localTransbordo\" tabela=\"LocalTransbordo\"\n                                                chave=\"CodLocalTransb\" descricao=\"DescrLocalTransb\" ativos=\"true\"\n                                                [disabled]=\"funcoesService.isDetail(actionForm)\" required>\n                                            </app-combo-padrao>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"clearfix\">&nbsp;</div>\n                                <div class=\"form-group\">\n                                    <button class=\"btn btn-success mr-2\" type=\"submit\"\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                        {{ 'buttons.salvar' | translate }}\n                                    </button>\n                                </div>\n                            </form>\n                        </div>\n                        <div class=\"tab-pane\" id=\"nt\">\n                            <app-lancamento-vagao-notas [dados]=\"this.data.notas\" (dataResult)=\"refreshItens($event)\"\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">\n                            </app-lancamento-vagao-notas>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\" [formAction]=\"actionForm\"\n    [sisFormularioId]=\"constantes.sisFormularioId\" [itemData]=\"data.regPlaneja\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <div class=\"row mt-2\">\n        <div class=\"col-12\">\n            <table id=\"dtLancamentoVagao\" class=\"table table-striped table-bordered table-hover nowrap table-sm\">\n            </table>\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-lancamento-vagao-filter (filtrar)=\"refresh()\"></app-lancamento-vagao-filter>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-notas/lancamento-vagao-notas.component.html":
/*!***************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-notas/lancamento-vagao-notas.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=\"row\">\r\n    <div class=\"col-md-12 col-lg-12\">\r\n        <div *ngIf=\"!showAdd\">\r\n            <div class=\"btn-group\" *ngIf=\"!showAdd\">\r\n                <button title=\"{{ 'buttons.novo' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"create()\"\r\n                    [disabled]=\"disabled\">\r\n                    <i class=\"icon-plus\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.visualizar' | translate }}\" (click)=\"detail()\" class=\"btn uni-btn btn-sm\"\r\n                    [disabled]=\" funcoesService.showButtons.detail(actionForm, dataAux.chaveNfe)\">\r\n                    <i class=\"icon-eye\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"edit()\"\r\n                    [disabled]=\"disabled || funcoesService.showButtons.edit(actionForm, dataAux.chaveNfe)\">\r\n                    <i class=\"icon-pencil\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.excluir' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"remove()\"\r\n                    [disabled]=\" disabled || funcoesService.showButtons.remove(actionForm, dataAux.chaveNfe)\">\r\n                    <i class=\"icon-close\"></i>\r\n                </button>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n<div class=\"row\" *ngIf=\"!showAdd\">\r\n    <div class=\"col-md-12 col-lg-12\">\r\n        <table class=\"table table-striped table-bordered table-hover rownowrap form-control-sm\">\r\n            <thead>\r\n                <tr>\r\n                    <th style=\"display: none\">{{ 'labels.item' | translate }}</th>\r\n                    <th class=\"text-center\">{{ 'labels.numero' | translate }}</th>\r\n                    <th class=\"text-center\">{{ 'labels.cliente' | translate }}</th>\r\n                    <th class=\"text-center\">{{ 'labels.emitente' | translate }}</th>\r\n                    <th class=\"text-center\">{{ 'labels.dtEmissao' | translate }}</th>\r\n                    <th class=\"text-center\">{{ 'labels.chaveNFE' | translate }}</th>\r\n                </tr>\r\n            </thead>\r\n            <tbody>\r\n                <tr *ngFor=\"let c of (dados | removeExcluidos)\" class=\"clickable\" [ngClass]=\"{ info: c.chaveNfe === dataAux.chaveNfe }\"\r\n                    (click)=\"rowSelected(c)\">\r\n                    <td style=\"display: none\">{{ c.item }}</td>\r\n                    <td class=\"text-center\">{{ c.numero }}</td>\r\n                    <td class=\"text-center\">{{ c.cliente }}</td>\r\n                    <td class=\"text-center\">{{ c.emitente }}</td>\r\n                    <td class=\"text-center\">{{ c.dtDocto | date:'dd/MM/yyyy' }}</td>\r\n                    <td class=\"text-center\">{{ c.chaveNfe }}</td>\r\n                </tr>\r\n                <tr *ngIf=\"!hasDados\">\r\n                    <th colspan=\"7\">\r\n                        {{ \"messages.nenhumRegistroEncontrado\" | translate }}\r\n                    </th>\r\n                </tr>\r\n            </tbody>\r\n        </table>\r\n    </div>\r\n</div>\r\n<div *ngIf=\"showAdd\">\r\n    <div class=\"row\">\r\n        <div class=\"col-lg-6\">\r\n            <div class=\"uni-botoes\">\r\n                <button title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"edit()\"\r\n                    [disabled]=\" disabled ||funcoesService.showButtons.edit(actionForm, dataAux.chaveNfe)\">\r\n                    <i class=\"fa fa-edit\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.voltar' | translate }}\" (click)=\"back()\" type=\"button\"\r\n                    class=\"btn uni-btn btn-sm\">\r\n                    <i class=\"fa fa-arrow-left\"></i>\r\n                </button>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <form class=\"form\" #ngFormNotas=\"ngForm\">\r\n        <div class=\"row\">\r\n            <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                    <div class=\"card-body widget-body\">\r\n                        <app-validacoes formErrorId=\"msgLancamentoVagao\"></app-validacoes>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-6\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-pesquisa-destinatario id=\"destinatarioIdClienteNt\"\r\n                                        name=\"destinatarioIdClienteNt\" label=\"cliente\"\r\n                                        modalTitle=\"pesquisaDeCliente\" [inSelected]=\"data.destCliente\"\r\n                                        [(ngModel)]=\"data.cliente\" tipoDestinatario=\"C\"\r\n                                        showCgcCpf=\"false\" showInscricao=\"false\" (outModel)=\"trataDest($event)\"\r\n                                        required=\"true\" [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-pesquisa-destinatario>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-6\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-pesquisa-destinatario id=\"destinatarioIdEmitente\"\r\n                                        name=\"destinatarioIdEmitente\" label=\"emitente\"\r\n                                        modalTitle=\"pesquisaDeEmitente\" [inSelected]=\"data.destEmitente\"\r\n                                        [(ngModel)]=\"data.emitente\" tipoDestinatario=\"C\"\r\n                                        showCgcCpf=\"false\" showInscricao=\"false\" (outModel)=\"trataEmitente($event)\"\r\n                                        required=\"true\" [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-pesquisa-destinatario>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label class=\"required\" for=\"numero\">{{'labels.numero' | translate}}</label>\r\n                                    <input id=\"numero\" type=\"text\" name=\"numero\"\r\n                                        class=\"form-control form-control-sm\" [(ngModel)]=\"data.numero\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" required=\"true\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-2\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"serie\" class=\"required\">{{ \"labels.serie\" | translate }}</label>\r\n                                    <app-combo-serie-nota id=\"serie\" name=\"serie\"\r\n                                        [(ngModel)]=\"data.serieNotaId\" required=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-combo-serie-nota>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"modelo\">{{\"labels.modelo\" | translate}}</label>\r\n                                    <app-combo-padrao id=\"modelo\" name=\"modelo\"\r\n                                        [(ngModel)]=\"data.modelo\" tabela=\"ModeloNota\" chave=\"ModNota\"\r\n                                        descricao=\"DescrModNota\" ativos=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        [condicionais]=\"condicionaisOptions\">\r\n                                    </app-combo-padrao>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-md-6\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label class=\"required\" for=\"chaveDaNFE\">{{'labels.chaveDaNFE' | translate}}</label>\r\n                                    <div class=\"input-group\">\r\n                                        <input id=\"chaveDaNFE\" name=\"chaveDaNFE\" type=\"text\"\r\n                                            class=\"form-control form-control-sm\"\r\n                                            [(ngModel)]=\"data.chaveNfe\" required\r\n                                            data-title=\"{{'labels.chaveDaNFE' | translate}}\" maxlength=\"54\"\r\n                                            mask=\"0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\" (blur)=\"validaVagao()\" \r\n                                            (blur)=\"validaChaveNfe({'data': data})\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label class=\"required\" for=\"dtDocto\">{{'labels.dataEmissao' | translate}}</label>\r\n                                    <app-data id=\"dtDocto\" name=\"dtDocto\"\r\n                                        [(ngModel)]=\"data.dtDocto\" [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-data>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-2\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label class=\"required\" for=\"cfop\">{{'labels.cfop' | translate}}</label>\r\n                                    <input id=\"cfop\" type=\"text\" name=\"cfop\"\r\n                                        class=\"form-control form-control-sm\" [(ngModel)]=\"data.cfop\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" required=\"true\" mask=\"9999\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label class=\"required\" for=\"pesoDocto\">{{'labels.pesoNF' | translate}}</label>\r\n                                    <input id=\"pesoDocto\" name=\"pesoDocto\" maxlength=\"50\"\r\n                                        [(ngModel)]=\"data.pesoDocto\" required\r\n                                        class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                        [options]=\"funcoesService.optionCurrency(0)\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-2\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"serie\" class=\"required\">{{ \"labels.valorNF\" | translate }}</label>\r\n                                    <input id=\"vlItem\" name=\"vlItem\" maxlength=\"50\"\r\n                                        [(ngModel)]=\"data.vlItem\" required\r\n                                        class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                        [options]=\"funcoesService.optionCurrency(2)\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"pesoRateio\" class=\"required\">{{ \"labels.pesoRateio\" | translate }}</label>\r\n                                    <input id=\"pesoRateio\" name=\"pesoRateio\" maxlength=\"50\"\r\n                                        [(ngModel)]=\"data.pesoRateio\" required\r\n                                        class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                        [options]=\"funcoesService.optionCurrency(0)\" (blur)=\"validaPesoRat()\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group mt-2\">\r\n                            <button class=\"btn btn-success\" type=\"button\"  (click)=\"onSubmit(ngFormNotas)\"\r\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                {{ \"buttons.salvar\" | translate }}\r\n                            </button>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </form>\r\n</div>");

/***/ }),

/***/ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-filter/lancamento-vagao-filter.component.ts":
/*!*************************************************************************************************************!*\
  !*** ./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-filter/lancamento-vagao-filter.component.ts ***!
  \*************************************************************************************************************/
/*! exports provided: LancamentoVagaoFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoFilterComponent", function() { return LancamentoVagaoFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lancamento-vagao.service */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.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");
/* 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_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};







var LancamentoVagaoFilterComponent = /** @class */ (function () {
    function LancamentoVagaoFilterComponent(funcoesService, service, messageService) {
        this.funcoesService = funcoesService;
        this.service = service;
        this.messageService = messageService;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
    }
    LancamentoVagaoFilterComponent.prototype.ngOnInit = function () { };
    LancamentoVagaoFilterComponent.prototype.onSubmit = function (form) {
        if (!this.validatePeriodoAte())
            return;
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        this.filtrar.emit();
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ModalUtilsStaticService"].closeModal("lancamento-vagao-dialog");
    };
    LancamentoVagaoFilterComponent.prototype.validatePeriodoAte = function () {
        if (!this.service.filtro.dataI)
            return;
        if (!this.service.filtro.dataF)
            return;
        if (this.funcoesService.dateTimeUtils.maiorA(this.service.filtro.dataI, this.service.filtro.dataF)) {
            this.messageService.warning("titles.lancamentoVagao", "messages.ateMenorPeriodoDe");
            return false;
        }
        return true;
    };
    LancamentoVagaoFilterComponent.ctorParameters = function () { return [
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_1__["LancamentoVagaoService"] },
        { 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)
    ], LancamentoVagaoFilterComponent.prototype, "filtrar", void 0);
    LancamentoVagaoFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-lancamento-vagao-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./lancamento-vagao-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-filter/lancamento-vagao-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_1__["LancamentoVagaoService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"]])
    ], LancamentoVagaoFilterComponent);
    return LancamentoVagaoFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-form/lancamento-vagao-form.component.ts":
/*!*********************************************************************************************************!*\
  !*** ./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-form/lancamento-vagao-form.component.ts ***!
  \*********************************************************************************************************/
/*! exports provided: LancamentoVagaoFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoFormComponent", function() { return LancamentoVagaoFormComponent; });
/* 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 _lancamento_vagao_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../lancamento-vagao.constants */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.constants.ts");
/* harmony import */ var _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../lancamento-vagao.model */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.model.ts");
/* harmony import */ var _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../lancamento-vagao.service */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_12__ = __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 app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_16__ = __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 __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 LancamentoVagaoFormComponent = /** @class */ (function (_super) {
    __extends(LancamentoVagaoFormComponent, _super);
    function LancamentoVagaoFormComponent(router, messageService, permissoesUtils, funcoesService, service, activatedRoute, destinatarioService, destinatarioNavioService, materialService) {
        var _this = _super.call(this, new _lancamento_vagao_constants__WEBPACK_IMPORTED_MODULE_2__["LancamentoVagaoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.funcoesService = funcoesService;
        _this.service = service;
        _this.activatedRoute = activatedRoute;
        _this.destinatarioService = destinatarioService;
        _this.destinatarioNavioService = destinatarioNavioService;
        _this.materialService = materialService;
        _this.mensagens = [];
        _this.constantes = new _lancamento_vagao_constants__WEBPACK_IMPORTED_MODULE_2__["LancamentoVagaoConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.data = new _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_3__["LancamentoVagao"]();
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_10__["Mascaras"]();
        _this.visibleDate = true;
        _this.pageRoute = "/cockpit/lancamentoVagao";
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    LancamentoVagaoFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            var obj = _this.activatedRoute.snapshot.paramMap.get("regPlaneja");
            if (obj) {
                _this.service._getById(app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_16__["NumberUtilsStaticService"].toNumber(obj)).subscribe(function (result) {
                    _this.data = result;
                    _this.trataDados();
                    _this.service.validaPesoLiq = _this.data.pesoLiquido;
                    _this.service.validVagao = _this.data.vagao;
                });
            }
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    LancamentoVagaoFormComponent.prototype.refreshItens = function (event) {
        this.data.notas = event;
    };
    LancamentoVagaoFormComponent.prototype.trataDados = function () {
        var _this = this;
        Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["forkJoin"])([
            this.destinatarioService.getById(this.data.cliente),
            this.destinatarioService.getById(this.data.emitente),
            this.materialService.getById(this.data.material)
        ]).subscribe(function (result) {
            _this.data.destCliente = !!result[0] ? result[0] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_5__["Destinatario"]();
            _this.data.destEmitente = !!result[1] ? result[1] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_5__["Destinatario"]();
            _this.data.produtoModel = !!result[2] ? result[2] : new app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_8__["Material"]();
        });
    };
    LancamentoVagaoFormComponent.prototype.trataDest = function (destinatario) {
        this.data.destCliente = destinatario;
        this.service.clienteCod = this.data.cliente;
    };
    LancamentoVagaoFormComponent.prototype.trataMat = function (material) {
        this.data.produtoModel = material;
    };
    LancamentoVagaoFormComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    LancamentoVagaoFormComponent.prototype.onSubmit = function (form) {
        var _this = this;
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_15__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            this.funcoesService.backToTop();
            return;
        }
        this.validaPesoBru();
        if (this.data.notas.length == 0) {
            return this.messageService.warning("titles.lancamentoVagao", 'messages.abaNotasÉobrigatrio');
        }
        this.service._save(this.data).subscribe(function (resp) {
            _this.mensagens = _this.messageService.validationResult(resp);
            if (!resp.isValid) {
                _this.messageService.warning("titles.lancamentoVagao", _this.mensagens[0]);
            }
            else {
                _this.data = new _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_3__["LancamentoVagao"]();
                _this.back();
            }
        });
    };
    LancamentoVagaoFormComponent.prototype.validaPesoBru = function () {
        this.service.validaPesoLiq = this.data.pesoLiquido;
        if (this.data.pesoBruto <= this.data.pesoLiquido) {
            this.data.pesoLiquido = null;
            return this.messageService.warning("titles.lancamentoVagao", 'messages.pesoBruDeveSerMaiorPesoLiqu');
        }
    };
    LancamentoVagaoFormComponent.prototype.edit = function () {
        this.router.navigate([this.target + "/cockpit/lancamentoVagao/edit/" + this.data.regPlaneja]);
    };
    LancamentoVagaoFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    LancamentoVagaoFormComponent.prototype.validarCadastroPlaca = function () {
        this.service.validVagao = this.data.vagao;
        if (this.data.vagao.length !== 10) {
            this.messageService.warning("titles.lancamentoVagao", "messages.numVagaoInvalido");
            this.data.vagao = null;
            return;
        }
        if (!/^[a-zA-Z]+$/.test(this.data.vagao.substring(0, 3))) {
            this.messageService.warning("titles.lancamentoVagao", "messages.numVagaoInvalido");
            this.data.vagao = null;
            return;
        }
        if (!/^\d+$/.test(this.data.vagao.substring(3, 10))) {
            this.messageService.warning("titles.lancamentoVagao", "messages.numVagaoInvalido");
            this.data.vagao = null;
            return;
        }
    };
    LancamentoVagaoFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__["MessageService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_12__["PermissoesUtilsService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_13__["FuncoesService"] },
        { type: _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_4__["LancamentoVagaoService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_14__["DestinatarioService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_14__["DestinatarioService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__["MaterialService"] }
    ]; };
    LancamentoVagaoFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-lancamento-vagao-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./lancamento-vagao-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-form/lancamento-vagao-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__["MessageService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_12__["PermissoesUtilsService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_13__["FuncoesService"],
            _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_4__["LancamentoVagaoService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_14__["DestinatarioService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_14__["DestinatarioService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__["MaterialService"]])
    ], LancamentoVagaoFormComponent);
    return LancamentoVagaoFormComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_9__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-index/lancamento-vagao-index.component.ts":
/*!***********************************************************************************************************!*\
  !*** ./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-index/lancamento-vagao-index.component.ts ***!
  \***********************************************************************************************************/
/*! exports provided: LancamentoVagaoIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoIndexComponent", function() { return LancamentoVagaoIndexComponent; });
/* 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_commons_table_table_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/components/commons/table/table.component */ "./src/app/shared/components/commons/table/table.component.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__ = __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_4__ = __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_5__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __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 _lancamento_vagao_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lancamento-vagao.constants */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.constants.ts");
/* harmony import */ var _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../lancamento-vagao.model */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.model.ts");
/* harmony import */ var _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../lancamento-vagao.service */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};













var LancamentoVagaoIndexComponent = /** @class */ (function (_super) {
    __extends(LancamentoVagaoIndexComponent, _super);
    function LancamentoVagaoIndexComponent(router, service, datatablesService, funcoesService, messageService, permissoesUtils, loginService) {
        var _this = _super.call(this, new _lancamento_vagao_constants__WEBPACK_IMPORTED_MODULE_7__["LancamentoVagaoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.service = service;
        _this.datatablesService = datatablesService;
        _this.funcoesService = funcoesService;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.constantes = new _lancamento_vagao_constants__WEBPACK_IMPORTED_MODULE_7__["LancamentoVagaoConstants"]();
        _this.mensagens = [];
        _this.data = new _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_8__["LancamentoVagaoDto"];
        _this.dataRemove = new _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_8__["LancamentoVagao"]();
        _this.target = _this.funcoesService.getTargetLocation();
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    LancamentoVagaoIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoesService.abrirFiltro) {
                    _this.filtrar();
                }
                _this.refresh();
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
        this.service.validaPesoLiq = 0;
    };
    LancamentoVagaoIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.getByFiltro(this.service.filtro).subscribe(function (data) {
            var columns = [
                _this.datatablesService.getDataString("cliente", "cliente"),
                _this.datatablesService.getDataDateTime("dtEmissao", "dataEmissao", "DD/MM/YYYY HH:mm", "10%"),
                _this.datatablesService.getDataString("placaCavalo", "placaVagao"),
                _this.datatablesService.getDataString("descrLocalTransb", "localTransbordo"),
                _this.datatablesService.getDataString("material", "material"),
                _this.datatablesService.getDataString("produto", "produto"),
                _this.datatablesService.getDataDouble("kilos", "kilos", 0, false, "10%")
            ];
            _this.datatablesService.toDataTable({ tableId: "dtLancamentoVagao", columns: columns, data: data, columnOrder: 0, orientationOrder: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_4__["EOrientationOrder"].ASC }, function (aData) {
                _this.data = aData;
            });
        });
    };
    LancamentoVagaoIndexComponent.prototype.filtrar = function () {
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_10__["ModalUtilsStaticService"].openModal("lancamento-vagao-dialog");
    };
    LancamentoVagaoIndexComponent.prototype.validaUpdateremove = function () {
        return true;
    };
    LancamentoVagaoIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    LancamentoVagaoIndexComponent.prototype.create = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            _this.router.navigate([_this.target + "/cockpit/lancamentoVagao/create"]);
        });
    };
    LancamentoVagaoIndexComponent.prototype.detail = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            _this.router.navigate([_this.target + "/cockpit/lancamentoVagao/detail/" + _this.data.regPlaneja]);
        });
    };
    LancamentoVagaoIndexComponent.prototype.edit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _this.router.navigate([_this.target + "/cockpit/lancamentoVagao/edit/" + _this.data.regPlaneja]);
        });
    };
    LancamentoVagaoIndexComponent.prototype.remove = function () {
        var _this = this;
        this.service._getById(this.data.regPlaneja).subscribe(function (result) {
            _this.dataRemove = result;
        });
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
            _this.messageService.removeConfirm(function () {
                _this.service.remover(_this.dataRemove).subscribe(function (result) {
                    if (!result.isValid) {
                        _this.messageService.warning("titles.lancamentoVagao", _this.mensagens[0]);
                    }
                    else {
                        _this.refresh();
                    }
                });
            });
        });
    };
    LancamentoVagaoIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_9__["LancamentoVagaoService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_4__["DatatablesService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__["MessageService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(app_shared_components_commons_table_table_component__WEBPACK_IMPORTED_MODULE_2__["TableComponent"], { static: false }),
        __metadata("design:type", app_shared_components_commons_table_table_component__WEBPACK_IMPORTED_MODULE_2__["TableComponent"])
    ], LancamentoVagaoIndexComponent.prototype, "table", void 0);
    LancamentoVagaoIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-lancamento-vagao-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./lancamento-vagao-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-index/lancamento-vagao-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_9__["LancamentoVagaoService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_4__["DatatablesService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__["MessageService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"]])
    ], LancamentoVagaoIndexComponent);
    return LancamentoVagaoIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-notas/lancamento-vagao-notas.component.ts":
/*!***********************************************************************************************************!*\
  !*** ./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-notas/lancamento-vagao-notas.component.ts ***!
  \***********************************************************************************************************/
/*! exports provided: LancamentoVagaoNotasComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoNotasComponent", function() { return LancamentoVagaoNotasComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.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_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service */ "./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts");
/* harmony import */ var _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lancamento-vagao.model */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.model.ts");
/* harmony import */ var _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lancamento-vagao.service */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_shared_services_funcoes_nfe_utils_nfe_utils_static_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/shared/services/funcoes/nfe-utils/nfe-utils.static.service */ "./src/app/shared/services/funcoes/nfe-utils/nfe-utils.static.service.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};












var LancamentoVagaoNotasComponent = /** @class */ (function () {
    function LancamentoVagaoNotasComponent(messageService, funcoesService, cpfCnpjService, service, destinatarioService) {
        this.messageService = messageService;
        this.funcoesService = funcoesService;
        this.cpfCnpjService = cpfCnpjService;
        this.service = service;
        this.destinatarioService = destinatarioService;
        this.dataResult = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.dataAux = new _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_6__["LancamentoVagaoNota"]();
        this.data = new _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_6__["LancamentoVagaoNota"]();
        this.dataRemove = [];
        this.showAdd = false;
        this.actionForm = app_config_enumerables__WEBPACK_IMPORTED_MODULE_1__["ActionForm"].index;
        this.hasDados = false;
        this.mensagens = [];
    }
    LancamentoVagaoNotasComponent.prototype.ngDoCheck = function () {
        this.hasDados =
            this.dados &&
                this.dados.length > 0 &&
                this.dados.filter(function (v) {
                    if (v["sitReg"] !== "E") {
                        return true;
                    }
                    return false;
                }).length > 0;
        if (!this.isDoCheck) {
            if (this.dados) {
                for (var i = 1; i <= this.dados.length; i++) {
                    this.dados[i - 1]["sequencia"] = i;
                }
                this.isDoCheck = true;
            }
        }
    };
    LancamentoVagaoNotasComponent.prototype.rowSelected = function (obj) {
        this.dataAux = obj;
        this.data = obj;
    };
    LancamentoVagaoNotasComponent.prototype.create = function () {
        this.trataDados();
        this.showAdd = true;
        this.actionForm = app_config_enumerables__WEBPACK_IMPORTED_MODULE_1__["ActionForm"].create;
        this.data = new _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_6__["LancamentoVagaoNota"]();
    };
    LancamentoVagaoNotasComponent.prototype.edit = function () {
        this.trataDados();
        this.showAdd = true;
        this.actionForm = app_config_enumerables__WEBPACK_IMPORTED_MODULE_1__["ActionForm"].edit;
        this.data = this.dataAux;
    };
    LancamentoVagaoNotasComponent.prototype.detail = function () {
        this.trataDados();
        this.showAdd = true;
        this.actionForm = app_config_enumerables__WEBPACK_IMPORTED_MODULE_1__["ActionForm"].detail;
        this.data = this.dataAux;
    };
    LancamentoVagaoNotasComponent.prototype.back = function () {
        this.showAdd = false;
        this.actionForm = app_config_enumerables__WEBPACK_IMPORTED_MODULE_1__["ActionForm"].index;
    };
    LancamentoVagaoNotasComponent.prototype.remove = function () {
        var _this = this;
        this.data = this.dataAux;
        var remove = {
            regPlaneja: this.data.regPlaneja,
            item: this.data.item
        };
        this.messageService.removeConfirm(function () {
            _this.service.removerItem(remove).subscribe(function (result) {
                _this.mensagens = _this.messageService.validationResult(result);
                if (!result.isValid) {
                    _this.messageService.warning("titles.lancamentoVagao", _this.mensagens[0]);
                }
                _this.dados = _this.dados.filter(function (x) { return x.item !== _this.data.item; });
            });
        });
    };
    LancamentoVagaoNotasComponent.prototype.onSubmit = function (form) {
        var _this = this;
        this.validaPesoRat();
        if (form.invalid) {
            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("msgLancamentoVagao").emit(form);
            return;
        }
        if (this.funcoesService.isNotUndefinedOrNull(this.data)) {
            if (this.data.sequencia && this.data.sequencia > 0) {
                if (this.dados.length > 0) {
                    var i = this.dados.findIndex(function (x) { return x.sequencia === _this.data.sequencia; });
                    this.dados[i] = this.data;
                }
                else {
                    this.dados = [];
                    this.dados.push(this.data);
                }
            }
            else {
                this.setSequencia();
                if (this.funcoesService.isUndefinedOrNull(this.dados)) {
                    this.dados = [];
                }
                if (this.data.sequencia > 0) {
                    this.dados.push(this.data);
                }
            }
            this.dataResult.emit(this.dados);
        }
        this.back();
    };
    LancamentoVagaoNotasComponent.prototype.setSequencia = function () {
        if (this.funcoesService.isUndefinedOrNull(this.data.regPlaneja)) {
            var s = this.dados ? this.dados.length : 0;
            this.data.sequencia = s + 1;
        }
        else {
            this.data.sequencia = this.data.sequencia;
        }
    };
    LancamentoVagaoNotasComponent.prototype.trataDest = function (destinatario) {
        this.data.destCliente = destinatario;
    };
    LancamentoVagaoNotasComponent.prototype.trataEmitente = function (emitente) {
        this.data.destEmitente = emitente;
    };
    LancamentoVagaoNotasComponent.prototype.validaPesoRat = function () {
        if (this.data.pesoRateio > this.service.validaPesoLiq) {
            this.data.pesoRateio = null;
            return this.messageService.warning("titles.lancamentoVagao", 'messages.pesoRatDeveSerMenorIgualPesoLiqu');
        }
    };
    LancamentoVagaoNotasComponent.prototype.validaVagao = function () {
        var _this = this;
        var vagao = {
            chaveNFe: this.data.chaveNfe,
            vagao: this.service.validVagao
        };
        this.service.validaVagao(vagao).subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result);
            if (!result.isValid) {
                _this.data.chaveNfe = null;
                return _this.messageService.warning("titles.lancamentoVagao", _this.mensagens[0]);
            }
        });
    };
    LancamentoVagaoNotasComponent.prototype.validaChaveNfe = function (params) {
        if ((!app_shared_services_funcoes_nfe_utils_nfe_utils_static_service__WEBPACK_IMPORTED_MODULE_10__["NfeUtilsStaticService"].validaChaveNFe(params.data.chaveNfe, params.data.destEmitente, params.data.numero, params.data.serieNotaId))) {
            this.data.chaveNfe = null;
            return this.messageService.warning("titles.lancamentoVagao", "messages.chaveNfeInvalida");
        }
    };
    LancamentoVagaoNotasComponent.prototype.trataDados = function () {
        var _this = this;
        Object(rxjs__WEBPACK_IMPORTED_MODULE_11__["forkJoin"])([
            this.destinatarioService.getById(this.data.cliente),
            this.destinatarioService.getById(this.data.emitente)
        ]).subscribe(function (result) {
            _this.data.destCliente = !!result[0] ? result[0] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_8__["Destinatario"]();
            _this.data.destEmitente = !!result[1] ? result[1] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_8__["Destinatario"]();
        });
        this.dataAux.modelo = 55;
    };
    Object.defineProperty(LancamentoVagaoNotasComponent.prototype, "condicionaisOptions", {
        get: function () {
            return [
                {
                    operadorLogico: "AND",
                    campo: "DescrModNota",
                    operador: "=",
                    valor: "55-Nota Fiscal Eletrônica"
                }
            ];
        },
        enumerable: true,
        configurable: true
    });
    LancamentoVagaoNotasComponent.ctorParameters = function () { return [
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_5__["CpfCnpjService"] },
        { type: _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_7__["LancamentoVagaoService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_9__["DestinatarioService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Array)
    ], LancamentoVagaoNotasComponent.prototype, "dados", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], LancamentoVagaoNotasComponent.prototype, "disabled", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], LancamentoVagaoNotasComponent.prototype, "dataResult", void 0);
    LancamentoVagaoNotasComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-lancamento-vagao-notas",
            template: __importDefault(__webpack_require__(/*! raw-loader!./lancamento-vagao-notas.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-notas/lancamento-vagao-notas.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_5__["CpfCnpjService"],
            _lancamento_vagao_service__WEBPACK_IMPORTED_MODULE_7__["LancamentoVagaoService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_9__["DestinatarioService"]])
    ], LancamentoVagaoNotasComponent);
    return LancamentoVagaoNotasComponent;
}());



/***/ }),

/***/ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.constants.ts":
/*!******************************************************************************!*\
  !*** ./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.constants.ts ***!
  \******************************************************************************/
/*! exports provided: LancamentoVagaoConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoConstants", function() { return LancamentoVagaoConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var LancamentoVagaoConstants = /** @class */ (function () {
    function LancamentoVagaoConstants() {
        this.sisFormularioId = 375324;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.inclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.exclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.permissoes" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.propriedades" },
        ];
        this.nomeForm = "titles.lancamentoVagao";
        this.reportId = "ROC00025";
        this.configs = [];
        this.reportTitulo = { "titulo": "Lançamento Vagão", "subTitulo": "" };
        this.listaIndex = [
            { title: 'Novo', action: 'create', icon: "icon-plus", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Visualizar', action: 'detail', icon: "icon-eye", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { 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: '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' }
        ];
    }
    return LancamentoVagaoConstants;
}());



/***/ }),

/***/ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.model.ts":
/*!**************************************************************************!*\
  !*** ./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.model.ts ***!
  \**************************************************************************/
/*! exports provided: LancamentoVagaoFiltro, LancamentoVagao, LancamentoVagaoNota, LancamentoVagaoDto, LancamentoVagaoGetId */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoFiltro", function() { return LancamentoVagaoFiltro; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagao", function() { return LancamentoVagao; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoNota", function() { return LancamentoVagaoNota; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoDto", function() { return LancamentoVagaoDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoGetId", function() { return LancamentoVagaoGetId; });
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/pages/cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/base/base.model */ "./src/app/shared/services/base/base.model.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");
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 LancamentoVagaoFiltro = /** @class */ (function () {
    function LancamentoVagaoFiltro() {
        this.dataI = app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["DateTimeUtilsStaticService"].addDays(new Date(), -30);
        this.dataF = new Date();
    }
    return LancamentoVagaoFiltro;
}());

var LancamentoVagao = /** @class */ (function (_super) {
    __extends(LancamentoVagao, _super);
    function LancamentoVagao() {
        var _this = _super.call(this) || this;
        _this.notas = [];
        _this.destCliente = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__["Destinatario"]();
        _this.destEmitente = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__["Destinatario"]();
        _this.produtoModel = new app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_1__["Material"]();
        _this.dtEmissao = new Date();
        return _this;
    }
    return LancamentoVagao;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_2__["BaseModel"]));

var LancamentoVagaoNota = /** @class */ (function (_super) {
    __extends(LancamentoVagaoNota, _super);
    function LancamentoVagaoNota() {
        var _this = _super.call(this) || this;
        _this.destCliente = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__["Destinatario"]();
        _this.destEmitente = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__["Destinatario"]();
        _this.modelo = 55;
        return _this;
    }
    return LancamentoVagaoNota;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_2__["BaseModel"]));

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

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



/***/ }),

/***/ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.module.ts":
/*!***************************************************************************!*\
  !*** ./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.module.ts ***!
  \***************************************************************************/
/*! exports provided: LancamentoVagaoModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoModule", function() { return LancamentoVagaoModule; });
/* 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 _lancamento_vagao_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lancamento-vagao.routing.module */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.routing.module.ts");
/* harmony import */ var _lancamento_vagao_form_lancamento_vagao_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lancamento-vagao-form/lancamento-vagao-form.component */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-form/lancamento-vagao-form.component.ts");
/* harmony import */ var _lancamento_vagao_filter_lancamento_vagao_filter_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lancamento-vagao-filter/lancamento-vagao-filter.component */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-filter/lancamento-vagao-filter.component.ts");
/* harmony import */ var _lancamento_vagao_index_lancamento_vagao_index_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lancamento-vagao-index/lancamento-vagao-index.component */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-index/lancamento-vagao-index.component.ts");
/* harmony import */ var _lancamento_vagao_notas_lancamento_vagao_notas_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lancamento-vagao-notas/lancamento-vagao-notas.component */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-notas/lancamento-vagao-notas.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 LancamentoVagaoModule = /** @class */ (function () {
    function LancamentoVagaoModule() {
    }
    LancamentoVagaoModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _lancamento_vagao_routing_module__WEBPACK_IMPORTED_MODULE_2__["LancamentoVagaoRoutingModule"]],
            declarations: [_lancamento_vagao_form_lancamento_vagao_form_component__WEBPACK_IMPORTED_MODULE_3__["LancamentoVagaoFormComponent"],
                _lancamento_vagao_filter_lancamento_vagao_filter_component__WEBPACK_IMPORTED_MODULE_4__["LancamentoVagaoFilterComponent"],
                _lancamento_vagao_index_lancamento_vagao_index_component__WEBPACK_IMPORTED_MODULE_5__["LancamentoVagaoIndexComponent"],
                _lancamento_vagao_notas_lancamento_vagao_notas_component__WEBPACK_IMPORTED_MODULE_6__["LancamentoVagaoNotasComponent"]],
            providers: []
        })
    ], LancamentoVagaoModule);
    return LancamentoVagaoModule;
}());



/***/ }),

/***/ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.routing.module.ts":
/*!***********************************************************************************!*\
  !*** ./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.routing.module.ts ***!
  \***********************************************************************************/
/*! exports provided: LancamentoVagaoRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoRoutingModule", function() { return LancamentoVagaoRoutingModule; });
/* 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 _lancamento_vagao_form_lancamento_vagao_form_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lancamento-vagao-form/lancamento-vagao-form.component */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-form/lancamento-vagao-form.component.ts");
/* harmony import */ var _lancamento_vagao_index_lancamento_vagao_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lancamento-vagao-index/lancamento-vagao-index.component */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao-index/lancamento-vagao-index.component.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.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: _lancamento_vagao_index_lancamento_vagao_index_component__WEBPACK_IMPORTED_MODULE_3__["LancamentoVagaoIndexComponent"],
        data: { breadcrumb: "lancamentoVagao", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].index } }
    },
    {
        path: "create",
        component: _lancamento_vagao_form_lancamento_vagao_form_component__WEBPACK_IMPORTED_MODULE_2__["LancamentoVagaoFormComponent"],
        data: {
            breadcrumb: "lancamentoVagao",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].create }
        }
    },
    {
        path: "detail/:regPlaneja",
        component: _lancamento_vagao_form_lancamento_vagao_form_component__WEBPACK_IMPORTED_MODULE_2__["LancamentoVagaoFormComponent"],
        data: {
            breadcrumb: "lancamentoVagao",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].detail }
        }
    },
    {
        path: "edit/:regPlaneja",
        component: _lancamento_vagao_form_lancamento_vagao_form_component__WEBPACK_IMPORTED_MODULE_2__["LancamentoVagaoFormComponent"],
        data: {
            breadcrumb: "lancamentoVagao",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_4__["ActionForm"].edit }
        }
    }
];
var LancamentoVagaoRoutingModule = /** @class */ (function () {
    function LancamentoVagaoRoutingModule() {
    }
    LancamentoVagaoRoutingModule = __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"]],
        })
    ], LancamentoVagaoRoutingModule);
    return LancamentoVagaoRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.service.ts":
/*!****************************************************************************!*\
  !*** ./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.service.ts ***!
  \****************************************************************************/
/*! exports provided: LancamentoVagaoService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LancamentoVagaoService", function() { return LancamentoVagaoService; });
/* 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_app_error_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lancamento-vagao.model */ "./src/app/pages/cockpit/lancamento-vagao/lancamento-vagao.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 __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};






var LancamentoVagaoService = /** @class */ (function () {
    function LancamentoVagaoService(http) {
        this.http = http;
        this.filtro = new _lancamento_vagao_model__WEBPACK_IMPORTED_MODULE_5__["LancamentoVagaoFiltro"]();
    }
    LancamentoVagaoService.prototype.getByFiltro = function (param) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cockpit/lancamentoVagao/getByFiltro", param)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LancamentoVagaoService.prototype._save = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cockpit/lancamentoVagao/save", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LancamentoVagaoService.prototype._update = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cockpit/lancamentoVagao/update", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LancamentoVagaoService.prototype.remover = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cockpit/lancamentoVagao/remover", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LancamentoVagaoService.prototype.removerItem = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cockpit/lancamentoVagao/removeritem", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LancamentoVagaoService.prototype._getById = function (regPlaneja) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cockpit/lancamentoVagao/getById/" + regPlaneja, null)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LancamentoVagaoService.prototype.validaVagao = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cockpit/lancamentoVagao/validaVagao", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    LancamentoVagaoService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] }
    ]; };
    LancamentoVagaoService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]])
    ], LancamentoVagaoService);
    return LancamentoVagaoService;
}());



/***/ }),

/***/ "./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts":
/*!**********************************************************************!*\
  !*** ./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts ***!
  \**********************************************************************/
/*! exports provided: CpfCnpjService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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


var CpfCnpjService = /** @class */ (function () {
    function CpfCnpjService() {
        this.mask$ = new rxjs__WEBPACK_IMPORTED_MODULE_1__["BehaviorSubject"]('AA.AAA.AAA/AAAA-00');
    }
    CpfCnpjService.prototype.verifica_cpf_cnpj = function (valor) {
        valor = valor.toString();
        valor = valor.replace(/[^0-9A-Za-z]/g, '');
        if (valor.length === 11) {
            return 'CPF';
        }
        else if (valor.length === 14) {
            return 'CNPJ';
        }
        else {
            return false;
        }
    };
    CpfCnpjService.prototype.valida_cpf = function (valor) {
        if (!valor)
            return true;
        valor = valor.replace(/[^0-9]/g, '');
        if (!/^\d{11}$/.test(valor))
            return false;
        // elimina CPFs inválidos conhecidos (ex: 00000000000, 11111111111 etc.)
        if (/^(\d)\1{10}$/.test(valor))
            return false;
        var digitos = valor.substring(0, 9);
        // calcula 1º DV
        var soma = 0;
        for (var i = 0; i < 9; i++) {
            soma += parseInt(digitos.charAt(i), 10) * (10 - i);
        }
        var resto = soma % 11;
        var dv1 = resto < 2 ? 0 : 11 - resto;
        // calcula 2º DV
        soma = 0;
        var digitosMaisDv1 = digitos + dv1;
        for (var i = 0; i < 10; i++) {
            soma += parseInt(digitosMaisDv1.charAt(i), 10) * (11 - i);
        }
        resto = soma % 11;
        var dv2 = resto < 2 ? 0 : 11 - resto;
        // monta CPF completo calculado
        var cpfCalculado = digitos + dv1.toString() + dv2.toString();
        return valor === cpfCalculado;
    };
    CpfCnpjService.prototype.valida_cnpj = function (cnpj) {
        function calc_digitos_cnpj(digitos) {
            var soma = 0;
            var peso = digitos.length === 12 ? 5 : 6; // 1º DV começa em 5, 2º em 6
            for (var i = 0; i < digitos.length; i++) {
                var char = digitos.charAt(i);
                var valorNumerico = void 0;
                if (/[0-9]/.test(char)) {
                    valorNumerico = parseInt(char, 10);
                }
                else if (/[A-Z]/.test(char)) {
                    valorNumerico = char.charCodeAt(0) - 48; // NT 49/2024
                }
                else {
                    throw new Error("Caractere inv\u00E1lido no CNPJ: '" + char + "'");
                }
                soma += valorNumerico * peso;
                peso--;
                if (peso < 2)
                    peso = 9;
            }
            var resto = soma % 11;
            return resto < 2 ? 0 : 11 - resto;
        }
        cnpj = cnpj.replace(/[^0-9A-Za-z]/g, '').toUpperCase();
        if (!/^[0-9A-Z]{12}[0-9]{2}$/.test(cnpj)) {
            return false;
        }
        var corpo = cnpj.substring(0, 12);
        var dv1Informado = parseInt(cnpj.charAt(12), 10);
        var dv2Informado = parseInt(cnpj.charAt(13), 10);
        var dv1Calculado = calc_digitos_cnpj(corpo);
        var dv2Calculado = calc_digitos_cnpj(corpo + dv1Calculado);
        return dv1Informado === dv1Calculado && dv2Informado === dv2Calculado;
    };
    CpfCnpjService.prototype.valida_cpf_cnpj = function (valor) {
        var valida = this.verifica_cpf_cnpj(valor);
        if (valida === 'CPF') {
            return this.valida_cpf(valor);
        }
        else if (valida === 'CNPJ') {
            return this.valida_cnpj(valor);
        }
        else {
            return false;
        }
    };
    CpfCnpjService.prototype.formata_cpf_cnpj = function (valor) {
        var formatado = "";
        var valida = this.verifica_cpf_cnpj(valor);
        if (valida === 'CPF') {
            if (this.valida_cpf(valor)) {
                formatado = valor.substr(0, 3) + '.';
                formatado += valor.substr(3, 3) + '.';
                formatado += valor.substr(6, 3) + '-';
                formatado += valor.substr(9, 2) + '';
            }
        }
        else if (valida === 'CNPJ') {
            if (this.valida_cnpj(valor)) {
                formatado = valor.substr(0, 2) + '.';
                formatado += valor.substr(2, 3) + '.';
                formatado += valor.substr(5, 3) + '/';
                formatado += valor.substr(8, 4) + '-';
                formatado += valor.substr(12, 14) + '';
            }
        }
        return formatado;
    };
    CpfCnpjService.prototype.format = function (documento, tipo) {
        var _this = this;
        if (tipo === void 0) { tipo = ''; }
        var valor = documento.replace(/[^a-zA-Z0-9]/g, '') || '';
        setTimeout(function () {
            var novaMask = 'AA.AAA.AAA/AAAA-00';
            if (tipo === 'F') {
                novaMask = '000.000.000-00';
            }
            else if (tipo === 'J') {
                if (/^[0-9]{14}$/.test(valor)) {
                    novaMask = '00.000.000/0000-00';
                }
                else if (valor.length >= 14 && /[a-zA-Z]/.test(valor)) {
                    novaMask = 'AA.AAA.AAA/AAAA-00';
                }
            }
            else {
                // tipo vazio
                if (/^[0-9]{11}$/.test(valor)) {
                    novaMask = '000.000.000-00';
                }
                else if (/^[0-9]{14}$/.test(valor)) {
                    novaMask = '00.000.000/0000-00';
                }
                else if (valor.length >= 14 && /[a-zA-Z]/.test(valor)) {
                    novaMask = 'AA.AAA.AAA/AAAA-00';
                }
            }
            _this.mask$.next(novaMask);
        });
    };
    CpfCnpjService.prototype.length = function (tipo) {
        if (tipo === 'F') {
            return 14;
        }
        else {
            return 18;
        }
    };
    CpfCnpjService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [])
    ], CpfCnpjService);
    return CpfCnpjService;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-cockpit-lancamento-vagao-lancamento-vagao-module.js.map