(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-balanca-descarga-ferroviaria-comboio-descarga-ferroviaria-comboio-module"],{

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

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-form/descarga-ferroviaria-comboio-form.component.html":
/*!*************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-form/descarga-ferroviaria-comboio-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 [botoesComando]=\"constantes.listaForm\" [sisFormularioId]=\"constantes.sisFormularioId\"\r\n    [formAction]=\"actionForm\" [itemData]=\"service.dataDadosVagoes.regMovimento\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"col-lg-12 col-12 section-comand-bar\">\r\n    <div class=\"clearfix\">\r\n        <ul class=\"nav nav-tabs\">\r\n            <li class=\"nav-item\">\r\n                <a class=\"nav-link active\" data-toggle=\"tab\" href=\"#tDados\">{{\"labels.dados\" | translate }}</a>\r\n            </li>\r\n            <li class=\"nav-item\" *ngIf=\"service.dataDadosVagoes.regMovimento\">\r\n                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#tItem\">{{\"labels.item\" |\r\n                    translate }}</a>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n    <div class=\"tab-content top\">\r\n        <div class=\"tab-pane active\" id=\"tDados\">\r\n            <div class=\"row\">\r\n                <div class=\"col-md-12 col-lg-12\">\r\n                    <app-menu-button *ngIf=\"!showTable\" title=\"{{ 'buttons.voltar' | translate }}\"\r\n                        [icon]=\"'icon-arrow-left'\" [disabled]=\"!service.dataDadosVagoes.regMovimento\"\r\n                        (click)=\"voltar()\">\r\n                    </app-menu-button>\r\n                    <app-menu-button *ngIf=\"showTable\" title=\"{{ 'buttons.visualizar' | translate }}\"\r\n                        [icon]=\"'icon-eye'\" [disabled]=\"!service.dataDadosVagoes.regMovimento\" (click)=\"show()\">\r\n                    </app-menu-button>\r\n                </div>\r\n            </div>\r\n            <form *ngIf=\"!showTable\" class=\"form\" #f=\"ngForm\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"registro\">{{'labels.registro' | translate}}</label>\r\n                            <input id=\"registro\" name=\"registro\" [(ngModel)]=\"service.dataDadosVagoesTmp.regTmp\"\r\n                                class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                [options]=\"funcoes.optionCurrency(0)\" disabled>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"situacao\">{{'labels.situacao' | translate}}</label>\r\n                            <input id=\"situacao\" name=\"situacao\" [(ngModel)]=\"service.dataDadosVagoesTmp.situacao\"\r\n                                class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"numeroVagao\">{{'labels.numeroVagao' | translate}}</label>\r\n                            <input id=\"numeroVagao\" name=\"numeroVagao\"\r\n                                [(ngModel)]=\"service.dataDadosVagoesTmp.cadastroPlacaId\"\r\n                                class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"cadastramento\">{{'labels.cadastramento' | translate}}</label>\r\n                            <app-data id=\"cadastramento\" name=\"cadastramento\"\r\n                                [(ngModel)]=\"service.dataDadosVagoesTmp.dtAutorizacao\" class=\"dataHora\"\r\n                                [formatDateTime]=\"mascara.getFormatDataHorMinSeg\" [disabled]=\"true\">\r\n                            </app-data>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"encoste\">{{'labels.encoste' |\r\n                                translate}}</label>\r\n                            <app-data id=\"encoste\" name=\"encoste\" [(ngModel)]=\"service.dataDadosVagoesTmp.dtTriagem\"\r\n                                class=\"dataHora\" [formatDateTime]=\"mascara.getFormatDataHorMin\" [disabled]=\"true\">\r\n                            </app-data>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"entregaNf\">{{'labels.entregaNf' | translate}}</label>\r\n                            <app-data id=\"entregaNf\" name=\"entregaNf\"\r\n                                [(ngModel)]=\"service.dataDadosVagoesTmp.dtEntregaNF\" class=\"dataHora\"\r\n                                [formatDateTime]=\"mascara.getFormatDataHorMin\" [disabled]=\"true\">\r\n                            </app-data>\r\n                        </div>\r\n                    </div>\r\n\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <app-pesquisa-destinatario id=\"cliente\" name=\"cliente\" label=\"cliente\"\r\n                                modalTitle=\"pesquisaDeCliente\"\r\n                                [(ngModel)]=\"service.dataDadosVagoesTmp.destinatarioIdCliente\"\r\n                                [inSelected]=\"service.dataDadosVagoesTmp.cliente\"\r\n                                (outSelected)=\"service.dataDadosVagoesTmp.cliente = $event\" tipoDestinatario=\"C\"\r\n                                showCgcCpf=\"true\" showInscricao=\"false\" disabled>\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-8 col-md-8 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <app-pesquisa-destinatario id=\"emitente\" name=\"emitente\" label=\"emitente\"\r\n                                modalTitle=\"pesquisaDeEmitente\"\r\n                                [(ngModel)]=\"service.dataDadosVagoesTmp.destinatarioIdEmitente\"\r\n                                [inSelected]=\"service.dataDadosVagoesTmp.emitente\"\r\n                                (outSelected)=\"service.dataDadosVagoesTmp.emitente = $event\" tipoDestinatario=\"C\"\r\n                                showCgcCpf=\"true\" showInscricao=\"false\" disabled>\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 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <app-pesquisa-material id=\"produto\" name=\"produto\" label=\"produto\"\r\n                                [(ngModel)]=\"service.dataDadosVagoesTmp.materialId\" modalTitle=\"pesquisaDeProduto\"\r\n                                [inSelected]=\"service.dataDadosVagoesTmp.material\"\r\n                                (outSelected)=\"service.dataDadosVagoesTmp.material = $event\" disabled>\r\n                            </app-pesquisa-material>\r\n                        </div>\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <app-pesquisa-destinatario id=\"transportadora\" name=\"transportadora\" label=\"transportadora\"\r\n                                modalTitle=\"pesquisaDeTransportadora\" disabled\r\n                                [(ngModel)]=\"service.dataDadosVagoesTmp.destinatarioIdTransportadora\"\r\n                                [inSelected]=\"service.dataDadosVagoesTmp.transportadora\"\r\n                                (outSelected)=\"service.dataDadosVagoesTmp.transportadora = $event\" tipoDestinatario=\"T\"\r\n                                showCgcCpf=\"false\" showInscricao=\"false\">\r\n                            </app-pesquisa-destinatario>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-pesquisa-tanque id=\"tanqueId\" name=\"deposito\" title=\"deposito\" label=\"deposito\"\r\n                                        [disabled]=\"true\" [(ngModel)]=\"service.dataDadosVagoesTmp.tanqueId\">\r\n                                    </app-pesquisa-tanque>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-2 col-md-6 col-sm-12\">\r\n                    </div>\r\n                    <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                        <fieldset>\r\n                            <legend>{{ \"labels.pesoOrigem\" | translate }}</legend>\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"pesoLiquido\">{{'labels.pesoLiquido' | translate}}</label>\r\n                                <input id=\"pesoLiquido\" name=\"pesoLiquido\"\r\n                                    [(ngModel)]=\"service.dataDadosVagoesTmp.kilos\" class=\"form-control form-control-sm\"\r\n                                    type=\"text\" currencyMask [options]=\"funcoes.optionCurrency(0)\" disabled>\r\n                            </div>\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"pesoBruto\">{{'labels.pesoBruto' | translate}}</label>\r\n                                <input id=\"pesoBruto\" name=\"pesoBruto\"\r\n                                    [(ngModel)]=\"service.dataDadosVagoesTmp.pesoBruOrigem\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                    [options]=\"funcoes.optionCurrency(0)\" disabled>\r\n                            </div>\r\n                        </fieldset>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"tipoOperacao\">{{'labels.tipoOperacao' | translate}}</label>\r\n                            <app-combo-tipo-operacao id=\"tipoOperacao\" name=\"tipoOperacao\"\r\n                                [(ngModel)]=\"service.dataDadosVagoesTmp.tipoOperacaoId\" disabled>\r\n                            </app-combo-tipo-operacao>\r\n                        </div>\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"terno\">{{'labels.regTerno' | translate}}</label>\r\n                            <select id=\"terno\" name=\"terno\" class=\"form-control form-control-sm\" disabled\r\n                                [(ngModel)]=\"service.dataDadosVagoesTmp.ternoId\">\r\n                                <option [value]=\"t.ternoId\" *ngFor=\"let t of ternos\">{{t.descricao}}</option>\r\n                            </select>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                    </div>\r\n                    <div *ngIf=\"exibeDCL\" class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                        <fieldset>\r\n                            <legend>{{ \"labels.dcl\" | translate }}</legend>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"numero\">{{'labels.numero' | translate}}</label>\r\n                                        <input id=\"numero\" name=\"numero\"\r\n                                            [(ngModel)]=\"service.dataDadosVagoesTmp.numeroCTE\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                            [options]=\"funcoes.optionCurrency(0)\" disabled>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"serie\">{{ 'labels.serie' | translate}}</label>\r\n                                        <app-combo-serie name=\"serie\" id=\"serie\" disabled\r\n                                            [(ngModel)]=\"service.dataDadosVagoesTmp.serieCTE\">\r\n                                        </app-combo-serie>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"emissao\">{{\"labels.emissao\" | translate }}</label>\r\n                                        <app-data id=\"emissao\" name=\"emissao\"\r\n                                            [(ngModel)]=\"service.dataDadosVagoesTmp.dataCTE\" class=\"dataHora\"\r\n                                            [formatDateTime]=\"mascara.getFormatData\" [disabled]=\"true\">\r\n                                        </app-data>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </fieldset>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"localTransbordo\">{{'labels.localTransbordo' | translate}}</label>\r\n                            <select id=\"localTransbordo\" name=\"localTransbordo\" class=\"form-control form-control-sm\"\r\n                                disabled [(ngModel)]=\"service.dataDadosVagoesTmp.localTransbordoId\">\r\n                                <option [value]=\"t.localTransbordoId\" *ngFor=\"let t of locaisTransbordo\">\r\n                                    {{t.descrLocalTransb}}</option>\r\n                            </select>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </form>\r\n            <div *ngIf=\"showTable\" class=\"table-responsive\" style=\"overflow: auto; max-height: 500px;\">\r\n                <table id=\"dtDescargaFerroviariaComboioDados\"\r\n                    class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n            </div>\r\n\r\n        </div>\r\n        <div class=\"tab-pane\" id=\"tItem\">\r\n            <app-descarga-ferroviaria-comboio-item [dadosItemTmp]=\"dadosItemTmp\"\r\n                (dataResult)=\"getTmpItens(this.service.dataDadosVagoesTmp.regMovimento)\"\r\n                (btnFotoOCR)=\"habilitarBtnFotoOCR(this.service.dataItens.opDescargaTremId)\">\r\n            </app-descarga-ferroviaria-comboio-item>\r\n        </div>\r\n    </div>\r\n</div>\r\n<app-descarga-ferroviaria-comboio-print-modal\r\n    (outConfirma)=\"confirmaImpressao($event)\"></app-descarga-ferroviaria-comboio-print-modal>\r\n<app-foto-ocr></app-foto-ocr>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-historico-email/descarga-ferroviaria-comboio-historico-email.component.html":
/*!***********************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-historico-email/descarga-ferroviaria-comboio-historico-email.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=\"descarga-ferroviaria-comboio-historico-email-dialog\" tabindex=\"-1\" role=\"dialog\"\r\n    data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.historicoDeEmailsEnviados' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <div class=\"modal-body\">\r\n                    <fieldset>\r\n                        <legend>{{ \"labels.dadosComboio\" | translate }}</legend>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"comboio\">{{'labels.comboio' |\r\n                                        translate}}</label>\r\n                                    <input type=\"text\" class=\"form-control\" style=\"text-align: right;\"\r\n                                        [value]=\"comboioId\" disabled>\r\n\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"dataComboio\">{{'labels.dataComboio' |\r\n                                        translate}}</label>\r\n                                    <input class=\"form-control\" type=\"text\" disabled\r\n                                        [value]=\"dtComboio | date: 'dd/MM/yyyy HH:mm:ss'\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </fieldset>\r\n                    <div class=\"table-responsive mt-1\" style=\"overflow: auto; max-height: 300px;\">\r\n                        <table id=\"dthistoricoDeEmailsEnviados\" class=\"table table-striped table-bordered table-hover nowrap table-sm\">\r\n                            <thead>\r\n                                <tr>\r\n                                    <th style=\"text-align: right\">{{ 'labels.contador' | translate }}</th>\r\n                                    <th>{{ 'labels.dataEnvio' | translate }}</th>\r\n                                    <th>{{ 'labels.email' | translate }}</th>\r\n                                    <th>{{ 'labels.titulo' | translate }}</th>\r\n                                    <th>{{ 'labels.mensagem' | translate }}</th>\r\n                                </tr>\r\n                            </thead>\r\n                            <tbody>\r\n                                <tr *ngFor=\"let t of dados; index as i\"\r\n                                    [ngClass]=\"{'info': t == data && i == currentIndex ? true : false}\">\r\n                                    <td style=\"text-align: right\">{{ t.comboioVagaoEmailId }}</td>\r\n                                    <td style=\"white-space: nowrap;\">{{ t.dtOperInc | date: 'dd/MM/yyyy HH:mm:ss' }}\r\n                                    </td>\r\n                                    <td>{{ t.email }}</td>\r\n                                    <td style=\"white-space: nowrap;\">{{ t.titulo }}</td>\r\n                                    <td style=\"white-space: nowrap;\">{{ t.mensagem }}</td>\r\n                                </tr>\r\n                                <tr *ngIf=\"!hasDados\">\r\n                                    <th colspan=\"5\" style=\"text-align: center\">\r\n                                        {{ \"messages.nenhumRegistroEncontrado\" | translate }}\r\n                                    </th>\r\n                                </tr>\r\n                            </tbody>\r\n                        </table>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.ok' | translate }}\r\n                    </button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-index/descarga-ferroviaria-comboio-index.component.html":
/*!***************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-index/descarga-ferroviaria-comboio-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\"\r\n    [itemData]=\"service.data.comboioId\" [sisFormularioId]=\"constantes.sisFormularioId\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"section-comand-bar\">\r\n    <table id=\"dtDescargaFerroviariaComboio\" class=\"table table-striped table-bordered table-hover nowrap table-sm\">\r\n    </table>\r\n</div>\r\n\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\r\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\r\n<app-propriedades></app-propriedades>\r\n<app-descarga-ferroviaria-comboio-filter (filtrar)=\"executaFiltro()\"></app-descarga-ferroviaria-comboio-filter>\r\n<app-descarga-ferroviaria-comboio-historico-email></app-descarga-ferroviaria-comboio-historico-email>\r\n<app-descarga-ferroviaria-comboio-informar-encoste></app-descarga-ferroviaria-comboio-informar-encoste>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-informar-encoste/descarga-ferroviaria-comboio-informar-encoste.component.html":
/*!*************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-informar-encoste/descarga-ferroviaria-comboio-informar-encoste.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=\"descarga-ferroviaria-comboio-informar-encoste\" tabindex=\"-1\" role=\"dialog\"\n    data-backdrop=\"static\">\n    <div class=\"uni-modal-dialog-md-60\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.informarEncoste' | translate }}</h6>\n            </div>\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\n                <div class=\"modal-body\">\n                    <app-validacoes></app-validacoes>\n                    <div class=\"row\">\n                        <div class=\"col-lg-8 col-md-8 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-material id=\"produto\" name=\"produto\" label=\"produto\"\n                                    modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"materialId\" [inSelected]=\"material\"\n                                    (outSelected)=\"material = $event\">\n                                </app-pesquisa-material>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-2\">\n                            <div class=\"cleafix\">&nbsp;</div>\n                            <button class=\"btn btn-success\" (click)=\"pesquisar()\" type=\"button\">{{ 'buttons.pesquisar' |\n                                translate }}</button>\n                        </div>\n                    </div>\n\n                    <div class=\"row\">\n                        <div class=\"col-lg-3 col-md-3 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"dtHoraEncoste\" class=\"required\">{{ 'labels.dtHoraEncoste' | translate\n                                    }}</label>\n                                <app-data-h-m id=\"dtHoraEncoste\" name=\"dtHoraEncoste\" required=\"true\"\n                                    [(ngModel)]=\"dtEncoste\">\n                                </app-data-h-m>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-6 col-md-6 col-sm-12 mt-4\">\n                            <button type=\"button\" class=\"btn btn-success mr-2\" (click)=\"marcarTodos()\">\n                                {{ 'buttons.selecionaTodos' | translate }}\n                            </button>\n                            <button type=\"button\" class=\"btn btn-success\" (click)=\"desmarcarTodos()\">\n                                {{ 'buttons.desmarcarTodos' | translate }}\n                            </button>\n                        </div>\n                    </div>\n\n\n                    <div class=\"table-responsive mt-1\" style=\"overflow: auto; max-height: 300px;\">\n                        <table id=\"dtInformarEncoste\"\n                            class=\"table table-striped table-bordered table-hover nowrap table-sm\">\n                            <thead>\n                                <tr>\n                                    <th class=\"text-center\">{{ 'labels.sel' | translate}}</th>\n                                    <th style=\"text-align: right\">{{ 'labels.registro' | translate }}</th>\n                                    <th>{{ 'labels.vagao' | translate }}</th>\n                                    <th>{{ 'labels.data' | translate }}</th>\n                                    <th>{{ 'labels.cliente' | translate }}</th>\n                                    <th>{{ 'labels.produto' | translate }}</th>\n                                </tr>\n                            </thead>\n                            <tbody>\n                                <tr *ngFor=\"let t of data; index as i\" (dblclick)=\"_dbClick(t, i)\">\n                                    <td class=\"text-center\">\n                                        <label class=\"chk\">\n                                            <input type=\"checkbox\" id=\"selecionado\" name=\"selecionado\" value=\"checked\"\n                                                (ngModelChange)=\"t.selecionado = $event ? 'S' : 'N'\"\n                                                [ngModel]=\"t.selecionado ==='S'\"\n                                                style=\"margin-left:auto; margin-right:auto;\" disabled>\n                                            <span [ngClass]=\"{'red':t.selecionado == 'S' ? true : false}\"></span>\n                                        </label>\n                                    </td>\n                                    <td style=\"white-space: nowrap; text-align: right\">{{ t.regMovimento }}</td>\n                                    <td style=\"white-space: nowrap;\">{{ t.placa }}</td>\n                                    <td style=\"white-space: nowrap;\">{{ t.dtAutorizacao | date: 'dd/MM/yyyy HH:mm' }}\n                                    </td>\n                                    <td style=\"white-space: nowrap;\">{{ t.cliente }}</td>\n                                    <td style=\"white-space: nowrap;\">{{ t.produto }}</td>\n                                </tr>\n                                <tr *ngIf=\"!hasDados\">\n                                    <th colspan=\"6\" style=\"text-align: center\">\n                                        {{ \"messages.nenhumRegistroEncontrado\" | translate }}\n                                    </th>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" [disabled]=\"!hasDados\" type=\"submit\">{{ 'buttons.salvar' |\n                        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>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-item/descarga-ferroviaria-comboio-item.component.html":
/*!*************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-item/descarga-ferroviaria-comboio-item.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-lg-4 col-md-4 col-sm-12\">\r\n        <app-menu-button *ngIf=\"showTable\" title=\"{{ 'buttons.novo' | translate }}\" [icon]=\"'icon-plus'\"\r\n            (click)=\"create()\">\r\n        </app-menu-button>\r\n        <app-menu-button *ngIf=\"!showTable\" title=\"{{ 'buttons.voltar' | translate }}\" [icon]=\"'icon-arrow-left'\"\r\n            (click)=\"back()\">\r\n        </app-menu-button>\r\n        <app-menu-button *ngIf=\"showTable\" title=\"{{ 'buttons.visualizar' | translate }}\" [icon]=\"'icon-eye'\"\r\n            [disabled]=\"!service.dataItens?.opDescargaTremId\" (click)=\"show()\">\r\n        </app-menu-button>\r\n        <app-menu-button *ngIf=\"funcoesService.isDetail(actionForm) || showTable\"\r\n            title=\"{{ 'buttons.editar' | translate }}\" [icon]=\"'icon-pencil'\"\r\n            [disabled]=\"!service.dataItens?.opDescargaTremId\" (click)=\"edit()\">\r\n        </app-menu-button>\r\n        <app-menu-button *ngIf=\"showTable\" title=\"{{ 'buttons.excluir' | translate }}\" [icon]=\"'icon-trash'\"\r\n            [disabled]=\"!service.dataItens?.opDescargaTremId\" (click)=\"remove()\">\r\n        </app-menu-button>\r\n    </div>\r\n</div>\r\n\r\n<ng-container *ngIf=\"!showTable\">\r\n    <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\r\n        <app-form-legenda></app-form-legenda>\r\n        <app-validacoes></app-validacoes>\r\n        <div class=\"row\">\r\n            <div class=\"col-lg-12\">\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <app-pesquisa-destinatario id=\"cliente\" name=\"cliente\" label=\"cliente\"\r\n                                [(ngModel)]=\"service.dataItens.destinatarioIdCliente\" [required]=\"true\"\r\n                                [inSelected]=\"service.dataItens.cliente\" tipoDestinatario=\"C\" showCgcCpf=\"true\"\r\n                                (outSelected)=\"service.dataItens.cliente = $event\"\r\n                                (change)=\"replicaValorClienteParaEmitente()\" showInscricao=\"false\"\r\n                                [disabled]=\"desabilitaCampos\">\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-8 col-md-8 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <app-pesquisa-destinatario id=\"emitente\" name=\"emitente\" label=\"emitente\"\r\n                                [(ngModel)]=\"service.dataItens.destinatarioIdEmitente\" [required]=\"true\"\r\n                                [inSelected]=\"service.dataItens.emitente\" tipoDestinatario=\"C\" showCgcCpf=\"true\"\r\n                                (outSelected)=\"service.dataItens.emitente = $event\" showInscricao=\"false\"\r\n                                (executa)=\"trataDestinatarioIdEmitente()\" [disabled]=\"desabilitaCampos\">\r\n                            </app-pesquisa-destinatario>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <app-pesquisa-saldo-lote-deposito id=\"lote\" name=\"lote\" [modalTitle]=\"'lotes'\"\r\n                                [field]=\"'loteId'\" [options]=\"saldoLoteOptions\" [(ngModel)]=\"service.dataItens.loteId\"\r\n                                [disabled]=\"desabilitaCampos\" [required]=\"true\"\r\n                                (outSelected)=\"service.carregaDadosLote(service.dataItens.loteId)\">\r\n                            </app-pesquisa-saldo-lote-deposito>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"valorUnitario\">{{'labels.valorUnitario' | translate}}</label>\r\n                            <input id=\"valorUnitario\" name=\"valorUnitario\"\r\n                                [(ngModel)]=\"service.dataItens.lote.precoArmazenado\"\r\n                                class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                [options]=\"funcoesService.optionCurrency(9)\" disabled>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"densidadeLote\">{{'labels.densidadeLote' | translate}}</label>\r\n                            <input id=\"densidadeLote\" name=\"densidadeLote\"\r\n                                [(ngModel)]=\"service.dataItens.lote.densidade\" class=\"form-control form-control-sm\"\r\n                                type=\"text\" currencyMask [options]=\"funcoesService.optionCurrency(9)\" disabled>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"quantid\" [class.required]=\"quantidIsRequired\">{{('labels.' + labelQuantid) |\r\n                                translate}}</label>\r\n                            <input id=\"quantid\" name=\"quantid\" [(ngModel)]=\"service.dataItens.quantid\"\r\n                                class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                [required]=\"quantidIsRequired\" [options]=\"funcoesService.optionCurrency(3)\"\r\n                                [disabled]=\"desabilitaCampos || !habilitaQuantidade\">\r\n                        </div>\r\n                    </div>\r\n                    <div *ngIf=\"!solConclLaudoSegPesF\" class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"situacaoLote\">{{'labels.situacaoLote' | translate}}</label>\r\n                            <select id=\"situacaoLote\" name=\"situacaoLote\" [(ngModel)]=\"service.dataItens.sitLaudo\"\r\n                                [disabled]=\"desabilitaCampos\" class=\"form-control form-control-sm\">\r\n                                <option value=\"-1\">{{ 'labels.selecione' | translate}}</option>\r\n                                <option value=\"0\">{{ 'labels.devido' | translate}}</option>\r\n                                <option value=\"1\">{{ 'labels.indevido' | translate}}</option>\r\n                            </select>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"numeroLaudo\">{{'labels.numeroLaudo' | translate}}</label>\r\n                            <input id=\"numeroLaudo\" maxlength=\"6\" name=\"numeroLaudo\"\r\n                                [(ngModel)]=\"service.dataItens.numLaudo\" class=\"form-control form-control-sm\"\r\n                                type=\"text\" [disabled]=\"desabilitaCampos\">\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-5 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"tipoDocTransporte\" class=\"required\">{{'labels.tipoDocTransporte' |\r\n                                translate}}</label>\r\n                            <app-combo-tipo-documento-transp id=\"tipoDocTransporte\" name=\"tipoDocTransporte\"\r\n                                [(ngModel)]=\"service.dataItens.tipoDocumentoTranspId\" required\r\n                                [disabled]=\"desabilitaCampos || desabilitaTipoDocTransporte || service.dataItens.lote.tipoDocumentoTranspIdEntrada > 0\"\r\n                                (outSelected)=\"service.trataTipoDocumentoTransp($event)\">\r\n                            </app-combo-tipo-documento-transp>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"docTranspNumero\"\r\n                                [class.required]=\"service.flagSolDadosEnt\">{{'labels.docTranspNumero' |\r\n                                translate}}</label>\r\n                            <input id=\"docTranspNumero\" name=\"docTranspNumero\" maxlength=\"20\"\r\n                                [required]=\"service.flagSolDadosEnt\"\r\n                                value=\"{{ service.dataItens.docTranspNumero | mask: service.maskDocTransNumero }}\"\r\n                                class=\"form-control form-control-sm\" type=\"text\"\r\n                                [disabled]=\"desabilitaCampos || !habilitaDocTranspNumeroEDocTranspEmissao || !service.flagSolDadosEnt\">\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"emissao\" [class.required]=\"service.flagSolDadosEnt\">{{'labels.emissao' |\r\n                                translate}}</label>\r\n                            <app-data id=\"emissao\" name=\"emissao\" [(ngModel)]=\"service.dataItens.docTranspEmissao\"\r\n                                [required]=\"service.flagSolDadosEnt\" class=\"dataHora\"\r\n                                [formatDateTime]=\"mascara.getFormatData\"\r\n                                [disabled]=\"desabilitaCampos || !habilitaDocTranspNumeroEDocTranspEmissao || !service.flagSolDadosEnt\">\r\n                            </app-data>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-9 col-md-9 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"modeloNf\" class=\"required\">{{'labels.modeloNf' | translate}}</label>\r\n                                    <app-combo-modelo-nota id=\"modeloNf\" name=\"modeloNf\"\r\n                                        [(ngModel)]=\"service.dataItens.modeloNotaId\" [disabled]=\"desabilitaCampos\"\r\n                                        flagAtivo=\"S\" required\r\n                                        (outSelected)=\"trataModeloNota($event)\">\r\n                                    </app-combo-modelo-nota>\r\n                                </div>\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"chaveNFE\"\r\n                                        [class.required]=\"obrChaveNFeEnt || obrigaImportacaoDeDanfe\">{{'labels.chaveNFE'\r\n                                        | translate}}</label>\r\n                                    <div class=\"input-group\">\r\n                                        <input id=\"chaveNFE\" name=\"chaveNFE\" [(ngModel)]=\"service.dataItens.chaveNFE\"\r\n                                            [required]=\"obrChaveNFeEnt || obrigaImportacaoDeDanfe\"\r\n                                            maxlength=\"54\"  mask=\"0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000\"\r\n                                            (blur)=\"validaChaveNfe()\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"desabilitaCampos || !habilitaChaveNFE || !obrigaImportacaoDeDanfe\">\r\n                                        <span class=\"input-group-btn\">\r\n                                            <button type=\"button\" class=\"btn btn-success btn-sm\"\r\n                                                [disabled]=\"desabilitaCampos || !habilitaChaveNFE || !obrigaImportacaoDeDanfe\"\r\n                                                (click)=\"importarDanfe(service.dataItens.chaveNFE)\"\r\n                                                title=\"Importa DANFE\"> <i class=\"fa fa-search\"></i>\r\n                                            </button>\r\n                                        </span>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-4 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"numeroDoDocumento\" class=\"required\">{{'labels.numeroDoDocumento' |\r\n                                        translate}}</label>\r\n                                    <input id=\"numeroDoDocumento\" name=\"numeroDoDocumento\"\r\n                                        [(ngModel)]=\"service.dataItens.docto\" class=\"form-control form-control-sm\"\r\n                                        [required]=\"true\" type=\"text\" currencyMask\r\n                                        [options]=\"funcoesService.optionCurrency(0)\"\r\n                                        (change)=\"onDoctoChange()\"\r\n                                        [disabled]=\"desabilitaCampos || desabilitaDocto || desabilitaSeNfeAuto\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-2 col-md-2 col-sm-12\">\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)]=\"service.dataItens.serieNotaId\"\r\n                                        (executa)=\"onSerieNotaIdChange()\"\r\n                                        [disabled]=\"desabilitaCampos || isDisabledNfeImportada || desabilitaDoctoDtDoctoSerie || desabilitaSeNfeAuto\"\r\n                                        [required]=\"true\">\r\n                                    </app-combo-serie-nota>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"dtEmissao\" class=\"required\">{{'labels.dtEmissao' |\r\n                                        translate}}</label>\r\n                                    <app-data id=\"dtEmissao\" name=\"dtEmissao\" [(ngModel)]=\"service.dataItens.dtDocto\"\r\n                                        class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\"\r\n                                        [disabled]=\"desabilitaCampos || isDisabledNfeImportada || desabilitaDoctoDtDoctoSerie || desabilitaSeNfeAuto\"\r\n                                        (executa)=\"validaDtEmissao()\" autofocus required>\r\n                                    </app-data>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"quantidDoc\" class=\"required\">{{ labelQuantidDoc |\r\n                                        translate}}</label>\r\n                                    <input id=\"quantidDoc\" name=\"quantidDoc\" [(ngModel)]=\"service.dataItens.quantidDoc\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                        [options]=\"funcoesService.optionCurrency(0)\" required\r\n                                        [disabled]=\"desabilitaCampos || isDisabledNfeImportada || desabilitaSeNfeAuto\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"total\">{{ 'labels.total' | translate}}</label>\r\n                                    <input id=\"total\" name=\"total\" [(ngModel)]=\"service.dataItens.vlNota\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                        [options]=\"funcoesService.optionCurrency(2)\"\r\n                                        (blur)=\"service.validarVlNota()\"\r\n                                        [disabled]=\"desabilitaCampos || isDisabledNfeImportada || desabilitaSeNfeAuto\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"pesoDocto\" class=\"required\">{{'labels.pesoDocto' |\r\n                                        translate}}</label>\r\n                                    <input id=\"pesoDocto\" name=\"pesoDocto\" [required]=\"true\"\r\n                                        [(ngModel)]=\"service.dataItens.pesoDoc\" (blur)=\"calcQuantidDoc()\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                        [options]=\"funcoesService.optionCurrency(0)\"\r\n                                        [disabled]=\"desabilitaCampos || isDisabledNfeImportada || desabilitaSeNfeAuto\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"pesoRateio\">{{'labels.pesoRateio' |\r\n                                        translate}}</label>\r\n                                    <input id=\"pesoRateio\" name=\"pesoRateio\" [(ngModel)]=\"service.dataItens.pesoRateio\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                        (blur)=\"validaIntegracaoNFCompra()\" [options]=\"funcoesService.optionCurrency(0)\"\r\n                                        [disabled]=\"desabilitaCampos\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"frete\">{{'labels.frete' | translate}}</label>\r\n                                    <select id=\"frete\" name=\"frete\" [(ngModel)]=\"service.dataItens.tipoFrete\"\r\n                                        [disabled]=\"desabilitaCampos\" class=\"form-control form-control-sm\">\r\n                                        <option value=\"0\">{{ 'labels.semFrete' | translate}}</option>\r\n                                        <option value=\"1\">{{ 'labels.emitenteCif' | translate}}</option>\r\n                                        <option value=\"2\">{{ 'labels.destRemFob' | translate}}</option>\r\n                                        <option value=\"3\">{{ 'labels.terceiros' | translate}}</option>\r\n                                    </select>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"notaOrigem\">{{'labels.notaOrigem' |\r\n                                        translate}}</label>\r\n                                    <input id=\"notaOrigem\" name=\"notaOrigem\" [(ngModel)]=\"service.dataItens.notaOrigem\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" currencyMask\r\n                                        [options]=\"funcoesService.optionCurrency(0)\"\r\n                                        [disabled]=\"desabilitaCampos || desabilitaNotaOrigem\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-3 col-sm-12 mt-4\" *ngIf=\"isNotaComplementar\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <input id=\"notaComplementar\" name=\"notaComplementar\" class=\"custom-control-input\">\r\n                                    <label for=\"notaComplementar\"\r\n                                        style=\"color: rgb(212, 109, 109);\">{{'labels.notaComplementar' |\r\n                                        translate}}</label>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-3 col-md-12 mt-4\">\r\n                                <div class=\"custom-control custom-checkbox\"\r\n                                    *ngIf=\"service.dataItens.flagIntegra === 'S'\">\r\n                                    <input id=\"integraNfCompra\" name=\"integraNfCompra\"\r\n                                        [ngModel]=\"service.dataItens.flagIntegra === 'S'\"\r\n                                        (ngModelChange)=\"service.dataItens.flagIntegra=$event?'S':'N'\"\r\n                                        class=\"custom-control-input checkbox-success\" type=\"checkbox\" [disabled]=\"true\">\r\n                                    <label class=\"custom-control-label\" for=\"integraNfCompra\">{{'labels.integraNfCompra'\r\n                                        |\r\n                                        translate}}</label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"lacresAmostra\">{{'labels.lacresAmostra' |\r\n                                        translate}}</label>\r\n                                    <input id=\"lacresAmostra\" name=\"lacresAmostra\"\r\n                                        [(ngModel)]=\"service.dataItens.lacreAmostra\" maxlength=\"250\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" [disabled]=\"desabilitaCampos\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"observacoes\">{{'labels.observacoes' |\r\n                                        translate}}</label>\r\n                                    <input id=\"observacoes\" name=\"observacoes\" [(ngModel)]=\"service.dataItens.observ\"\r\n                                        maxlength=\"70\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"desabilitaCampos\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div *ngIf=\"exibePesoFOB\" class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                        <fieldset>\r\n                            <legend>{{ \"labels.pesoFOB\" | translate }}</legend>\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"pesoBruFob\" class=\"required\">{{'labels.pesoBruFob' | translate}}</label>\r\n                                <input id=\"pesoBruFob\" name=\"pesoBruFob\" [(ngModel)]=\"service.dataItens.pesoBruFob\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\" currencyMask \r\n                                    [options]=\"funcoesService.optionCurrency(0)\" [disabled]=\"desabilitaCampos\">\r\n                            </div>\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"pesoTaraFob\" class=\"required\">{{'labels.pesoTaraFob' |\r\n                                    translate}}</label>\r\n                                <input id=\"pesoTaraFob\" name=\"pesoTaraFob\" [(ngModel)]=\"service.dataItens.pesoTaraFob\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\" currencyMask \r\n                                    [options]=\"funcoesService.optionCurrency(0)\" [disabled]=\"desabilitaCampos\">\r\n                            </div>\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"pesoLiqFob\" class=\"required\">{{'labels.pesoLiqFob' | translate}}</label>\r\n                                <input id=\"pesoLiqFob\" name=\"pesoLiqFob\" [(ngModel)]=\"service.dataItens.pesoLiqFob\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\" currencyMask \r\n                                    [options]=\"funcoesService.optionCurrency(0)\" [disabled]=\"desabilitaCampos\">\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"cfop\" class=\"required\">{{'labels.cfop' | translate}}</label>\r\n                                        <app-pesquisa-natureza id=\"cfop\" name=\"cfop\"\r\n                                            [(ngModel)]=\"service.dataItens.naturezaId\" \r\n                                            [disabled]=\"desabilitaCampos\">\r\n                                        </app-pesquisa-natureza>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"metrofile\" class=\"required\">{{'labels.metrofile' | translate}}</label>\r\n                                <input id=\"metrofile\" name=\"metrofile\" [(ngModel)]=\"service.dataItens.metrofile\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\" maxlength=\"15\" \r\n                                    [disabled]=\"desabilitaCampos\">\r\n                            </div>\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"contrato\" class=\"required\">{{'labels.contrato' | translate}}</label>\r\n                                <input id=\"contrato\" name=\"contrato\" [(ngModel)]=\"service.dataItens.contrato\" \r\n                                    class=\"form-control form-control-sm\" type=\"text\" maxlength=\"15\"\r\n                                    [disabled]=\"desabilitaCampos\">\r\n                            </div>\r\n                        </fieldset>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n        <div class=\"row\">\r\n            <div class=\"col-4\">\r\n                <div class=\"form-group\">\r\n                    <button class=\"btn btn-success mr-2\" type=\"submit\" [disabled]=\"desabilitaCampos\">\r\n                        {{ 'buttons.salvar' | translate }}\r\n                    </button>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </form>\r\n</ng-container>\r\n<div class=\"row\" *ngIf=\"showTable\">\r\n    <div class=\"col-lg-12\">\r\n        <div class=\"table-overflow\">\r\n            <table class=\"table table-striped table-hover form-control-sm\">\r\n                <thead>\r\n                    <tr>\r\n                        <th class=\"text-right\">{{ 'labels.autorizacao' | translate }}</th>\r\n                        <th class=\"text-left\">{{ 'labels.cliente' | translate }}</th>\r\n                        <th class=\"text-left\">{{ 'labels.emitente' | translate }}</th>\r\n                        <th class=\"text-left\">{{ 'labels.lote' | translate }}</th>\r\n                        <th class=\"text-right\">{{ 'labels.docto' | translate }}</th>\r\n                        <th class=\"text-left\">{{ 'labels.serie' | translate }}</th>\r\n                        <th class=\"text-left\">{{ 'labels.emissao' | translate }}</th>\r\n                        <th class=\"text-right\">{{ 'labels.peso' | translate }}</th>\r\n                    </tr>\r\n                </thead>\r\n                <tbody>\r\n                    <tr *ngFor=\"let c of dadosItemTmp | removeExcluidos; let i = index\" (click)=\"selected(c, i)\"\r\n                        class=\"clickable\" [ngClass]=\"{ 'info' : i === _index }\">\r\n                        <td width=\"10%\" class=\"text-right\">{{c.opDescargaId}}</td>\r\n                        <td class=\"text-left\">{{c.fantasiaCliente}}</td>\r\n                        <td class=\"text-left\">{{c.fantasiaEmitente}}</td>\r\n                        <td class=\"text-left\">{{c.loteId}}</td>\r\n                        <td class=\"text-right\">{{c.docto}}</td>\r\n                        <td class=\"text-left\">{{c.serieNotaId}}</td>\r\n                        <td class=\"text-left\">{{c.dtDocto | date:'dd/MM/yyyy' }}</td>\r\n                        <td class=\"text-right\">{{c.pesoDoc | formatCurrency: 0}}</td>\r\n                    </tr>\r\n                    <tr *ngIf=\"!dadosItemTmp || dadosItemTmp.length === 0\">\r\n                        <th colspan=\"9\">\r\n                            {{'messages.nenhumRegistroEncontrado' | translate }}\r\n                        </th>\r\n                    </tr>\r\n                </tbody>\r\n            </table>\r\n        </div>\r\n    </div>\r\n</div>\r\n<div *ngIf=\"showTable\" class=\"col-lg-8 col-md-8 col-sm-12\">\r\n    <button class=\"btn btn-success mr-2\" [disabled]=\"desabilitaBtnGravarCancelar\" (click)=\"gravar()\" type=\"button\">\r\n        {{ 'buttons.gravar' | translate }}\r\n    </button>\r\n    <button class=\"btn btn-danger mr-2\" [disabled]=\"desabilitaBtnGravarCancelar\" (click)=\"cancelar()\" type=\"button\">\r\n        {{ 'buttons.cancelar' | translate }}\r\n    </button>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-print-modal/descarga-ferroviaria-comboio-print-modal.component.html":
/*!***************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-print-modal/descarga-ferroviaria-comboio-print-modal.component.html ***!
  \***************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"modalPrint\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n\t<div class=\"modal-dialog modal-sm\">\r\n\t\t<div class=\"modal-content\">\r\n\t\t\t<form class=\"form\" #frmPrint=\"ngForm\" (ngSubmit)=\"onSubmit(frmPrint)\">\r\n\t\t\t\t<div class=\"modal-header\">\r\n\t\t\t\t\t<h4 class=\"modal-title\">{{ 'titles.imprimir' | translate }}</h4>\r\n\t\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" data-dismiss=\"modal\">\r\n\t\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"modal-body\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t\t\t\t<div class=\"form-group form-group-sm\">\r\n\t\t\t\t\t\t\t\t<label for=\"tipoImpressao\">{{'labels.tipoImpressao' | translate}}</label>\r\n\t\t\t\t\t\t\t\t<select id=\"tipoImpressao\" name=\"tipoImpressao\" class=\"form-control form-control-sm\"\r\n\t\t\t\t\t\t\t\t\t[(ngModel)]=\"tipoSelecionado\">\r\n\t\t\t\t\t\t\t\t\t<option value=\"\">{{ 'labels.selecione' | translate}}</option>\r\n\t\t\t\t\t\t\t\t\t<option *ngFor=\"let tipo of tiposImpressao\" [value]=\"tipo.value\">{{ tipo.label |\r\n\t\t\t\t\t\t\t\t\t\ttranslate}}</option>\r\n\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"modal-footer\">\r\n\t\t\t\t\t<button type=\"submit\" class=\"btn btn-small btn-success\" [disabled]=\"tipoSelecionado == ''\">{{\r\n\t\t\t\t\t\t'buttons.ok' | translate }}</button>\r\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-small btn-default\" data-dismiss=\"modal\">{{ 'buttons.cancelar' |\r\n\t\t\t\t\t\ttranslate }}</button>\r\n\t\t\t\t</div>\r\n\t\t\t</form>\r\n\t\t</div>\r\n\t</div>\r\n</div>");

/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-filter/descarga-ferroviaria-comboio-filter.component.ts":
/*!*************************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-filter/descarga-ferroviaria-comboio-filter.component.ts ***!
  \*************************************************************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioFilterComponent", function() { return DescargaFerroviariaComboioFilterComponent; });
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.constants */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.constants.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.service */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.service.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.model */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.model.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};









var DescargaFerroviariaComboioFilterComponent = /** @class */ (function () {
    function DescargaFerroviariaComboioFilterComponent(service, loginService, messageService) {
        this.service = service;
        this.loginService = loginService;
        this.messageService = messageService;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_3__["Mascaras"]();
        this.constantes = new _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_4__["DescargaFerroviariaComboioConstants"]();
        this.filialId = this.loginService.getLogin().filialId;
    }
    DescargaFerroviariaComboioFilterComponent.prototype.ngOnInit = function () {
        if (!this.service.filtro) {
            this.service.filtro = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_6__["DescargaFerroviariaComboioFilter"]();
        }
    };
    DescargaFerroviariaComboioFilterComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get("formError").emit(form);
        if (!this.validaDatas()) {
            return;
        }
        if (form.invalid) {
            return;
        }
        this.filtrar.emit();
        jQuery("#descarga-ferroviaria-comboio-filter-dialog").modal("hide");
    };
    DescargaFerroviariaComboioFilterComponent.prototype.validaDatas = function () {
        if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_7__["DateTimeUtilsStaticService"].menorA(this.service.filtro.dataF, this.service.filtro.dataI, ['H', 'M'])) {
            this.messageService.warning("titles.descargaFerroviariaComboio", "messages.periodoDeMaiorQueAte");
            return false;
        }
        return true;
    };
    DescargaFerroviariaComboioFilterComponent.ctorParameters = function () { return [
        { type: _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_5__["DescargaFerroviariaComboioService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_0__["LoginService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
        __metadata("design:type", Object)
    ], DescargaFerroviariaComboioFilterComponent.prototype, "filtrar", void 0);
    DescargaFerroviariaComboioFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-descarga-ferroviaria-comboio-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./descarga-ferroviaria-comboio-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-filter/descarga-ferroviaria-comboio-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_5__["DescargaFerroviariaComboioService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_0__["LoginService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"]])
    ], DescargaFerroviariaComboioFilterComponent);
    return DescargaFerroviariaComboioFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-form/descarga-ferroviaria-comboio-form.component.scss":
/*!***********************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-form/descarga-ferroviaria-comboio-form.component.scss ***!
  \***********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("fieldset {\n  border: 1px solid #dfdbdb;\n  padding: 10px;\n  /* controla a distancia entre os elementos e a borda */\n  width: 100%;\n}\n\nlegend {\n  display: inline;\n  width: auto;\n  border: 0;\n  padding: 0px 10px 0px 10px;\n  margin: 0px;\n  font-weight: 600;\n  font-size: 13px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvYmFsYW5jYS9kZXNjYXJnYS1mZXJyb3ZpYXJpYS1jb21ib2lvL2Rlc2NhcmdhLWZlcnJvdmlhcmlhLWNvbWJvaW8tZm9ybS9DOlxcQ29ycG9yYXRlXFxDb3Jwb3JhdGVXZWJEZXNlbnZcXF91bmlzb2x1dGlvbi9zcmNcXGFwcFxccGFnZXNcXGJhbGFuY2FcXGRlc2NhcmdhLWZlcnJvdmlhcmlhLWNvbWJvaW9cXGRlc2NhcmdhLWZlcnJvdmlhcmlhLWNvbWJvaW8tZm9ybVxcZGVzY2FyZ2EtZmVycm92aWFyaWEtY29tYm9pby1mb3JtLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9wYWdlcy9iYWxhbmNhL2Rlc2NhcmdhLWZlcnJvdmlhcmlhLWNvbWJvaW8vZGVzY2FyZ2EtZmVycm92aWFyaWEtY29tYm9pby1mb3JtL2Rlc2NhcmdhLWZlcnJvdmlhcmlhLWNvbWJvaW8tZm9ybS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLHlCQUFBO0VBQ0EsYUFBQTtFQUFnQixzREFBQTtFQUNoQixXQUFBO0FDRUY7O0FEQ0E7RUFDRSxlQUFBO0VBQ0EsV0FBQTtFQUNBLFNBQUE7RUFDQSwwQkFBQTtFQUNBLFdBQUE7RUFDQSxnQkFBQTtFQUNBLGVBQUE7QUNFRiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL2JhbGFuY2EvZGVzY2FyZ2EtZmVycm92aWFyaWEtY29tYm9pby9kZXNjYXJnYS1mZXJyb3ZpYXJpYS1jb21ib2lvLWZvcm0vZGVzY2FyZ2EtZmVycm92aWFyaWEtY29tYm9pby1mb3JtLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiZmllbGRzZXQge1xyXG4gIGJvcmRlcjogMXB4IHNvbGlkICNkZmRiZGI7XHJcbiAgcGFkZGluZzogMTBweDsgIC8qIGNvbnRyb2xhIGEgZGlzdGFuY2lhIGVudHJlIG9zIGVsZW1lbnRvcyBlIGEgYm9yZGEgKi9cclxuICB3aWR0aDogMTAwJTsgIFxyXG59XHJcblxyXG5sZWdlbmQge1xyXG4gIGRpc3BsYXk6IGlubGluZTtcclxuICB3aWR0aDogYXV0bztcclxuICBib3JkZXI6IDA7XHJcbiAgcGFkZGluZzogMHB4IDEwcHggMHB4IDEwcHg7XHJcbiAgbWFyZ2luOiAwcHg7XHJcbiAgZm9udC13ZWlnaHQ6IDYwMDtcclxuICBmb250LXNpemU6IDEzcHg7XHJcbn1cclxuXHJcbi8vIC5pbnB1dC1ncm91cC10ZXh0IHtcclxuLy8gICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7XHJcbi8vIH1cclxuIiwiZmllbGRzZXQge1xuICBib3JkZXI6IDFweCBzb2xpZCAjZGZkYmRiO1xuICBwYWRkaW5nOiAxMHB4O1xuICAvKiBjb250cm9sYSBhIGRpc3RhbmNpYSBlbnRyZSBvcyBlbGVtZW50b3MgZSBhIGJvcmRhICovXG4gIHdpZHRoOiAxMDAlO1xufVxuXG5sZWdlbmQge1xuICBkaXNwbGF5OiBpbmxpbmU7XG4gIHdpZHRoOiBhdXRvO1xuICBib3JkZXI6IDA7XG4gIHBhZGRpbmc6IDBweCAxMHB4IDBweCAxMHB4O1xuICBtYXJnaW46IDBweDtcbiAgZm9udC13ZWlnaHQ6IDYwMDtcbiAgZm9udC1zaXplOiAxM3B4O1xufSJdfQ== */");

/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-form/descarga-ferroviaria-comboio-form.component.ts":
/*!*********************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-form/descarga-ferroviaria-comboio-form.component.ts ***!
  \*********************************************************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioFormComponent", function() { return DescargaFerroviariaComboioFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.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 app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.constants */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.constants.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.model */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.model.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.service */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.service.ts");
/* harmony import */ var app_pages_cadastro_local_de_transbordo_local_de_transbordo_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/pages/cadastro/local-de-transbordo/local-de-transbordo.service */ "./src/app/pages/cadastro/local-de-transbordo/local-de-transbordo.service.ts");
/* harmony import */ var app_pages_cadastro_terno_terno_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/pages/cadastro/terno/terno.service */ "./src/app/pages/cadastro/terno/terno.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_19__ = __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_20__ = __webpack_require__(/*! app/pages/cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_pages_cadastro_tanque_tanque_service__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! app/pages/cadastro/tanque/tanque.service */ "./src/app/pages/cadastro/tanque/tanque.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};























var DescargaFerroviariaComboioFormComponent = /** @class */ (function (_super) {
    __extends(DescargaFerroviariaComboioFormComponent, _super);
    function DescargaFerroviariaComboioFormComponent(router, message, activatedRoute, service, configuracao, datatablesService, funcoes, permissoesUtils, loginService, ternoService, localTransbordoService, destinatarioService, materialService, tanqueService) {
        var _this = _super.call(this, new _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_8__["DescargaFerroviariaComboioConstants"](), funcoes) || this;
        _this.router = router;
        _this.message = message;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.configuracao = configuracao;
        _this.datatablesService = datatablesService;
        _this.funcoes = funcoes;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.ternoService = ternoService;
        _this.localTransbordoService = localTransbordoService;
        _this.destinatarioService = destinatarioService;
        _this.materialService = materialService;
        _this.tanqueService = tanqueService;
        _this.mensagens = [];
        _this.constantes = new _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_8__["DescargaFerroviariaComboioConstants"]();
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        _this.ternos = [];
        _this.locaisTransbordo = [];
        _this.target = _this.funcoes.getTargetLocation();
        _this.cWebModRequisicaoF = "";
        _this.cWebModTicketF = "";
        _this.loadConfig = function () {
            _this.exibeDCL = _this.funcoesService.isBoolean(_this.configuracao.lerConfig('BAL', 'SolCTEDescFer'));
            _this.cWebModRequisicaoF = _this.configuracao.lerConfig("WEB", "CWebModRequisicaoF");
            _this.cWebModTicketF = _this.configuracao.lerConfig("WEB", "CWebModTicketF");
            _this.ocrFerTipo = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["NumberUtilsStaticService"].toNumber(_this.configuracao.lerConfig("CTV", "OcrFerTipo"));
        };
        _this.refresh = function () {
            _this.service.getDadosVagoes(_this.comboioId).subscribe(function (data) {
                _this.service.dataDadosVagoes = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioDadosVagaoDto"]();
                var columns = [
                    _this.datatablesService.getDataStringAlignRight("regMovimento", "registro", "10%"),
                    _this.datatablesService.getDataString("placa", "placa"),
                    _this.datatablesService.getDataDateTime("dtAutorizacao", "data", "DD/MM/YYYY HH:mm:ss", "15%"),
                    _this.datatablesService.getDataString("nomeCliente", "cliente"),
                    _this.datatablesService.getDataString("nomeMaterial", "produto"),
                    _this.datatablesService.getDataDateTime("dtTriagem", "encoste", "DD/MM/YYYY HH:mm:ss", "15%"),
                    _this.datatablesService.getDataString("situacao", "situacao")
                ];
                _this.datatablesService.toDataTable({ tableId: "dtDescargaFerroviariaComboioDados", columns: columns, data: data, orientationOrder: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_14__["EOrientationOrder"].ASC }, function (aData) {
                    _this.service.dataDadosVagoes = aData;
                    _this.geraDadosTmp(_this.service.dataDadosVagoes.regMovimento);
                    _this.habilitarBtnFotoOCR(0);
                });
            });
        };
        _this.liberarVagao = function () {
            if (!_this.service.dataDadosVagoes.regMovimento || !_this.service.data.comboioId)
                return;
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 10, function () { return __awaiter(_this, void 0, void 0, function () {
                var _this = this;
                return __generator(this, function (_a) {
                    if (this.service.data.sitReg === 'C') {
                        this.message.warning("titles.descargaFerroviariaComboio", "messages.operacaoDoComboioConcluidaAcaoNaoPermitida");
                        return [2 /*return*/];
                    }
                    if (this.service.data.sitReg === 'L') {
                        this.message.warning("titles.descargaFerroviariaComboio", "messages.comboioJaLiberadoAcaoNaoPermitida");
                        return [2 /*return*/];
                    }
                    this.message.confirm("titles.descargaFerroviariaComboio", "messages.confirmaLiberacaoDoVagao", null, function () {
                        var obj = {
                            regMovimento: _this.service.dataDadosVagoes.regMovimento,
                            flagAprova: 'L'
                        };
                        _this.service.liberarVagao(obj).subscribe(function (result) {
                            _this.mensagens = _this.message.validationResult(result);
                            if (!result.isValid) {
                                _this.message.warning("titles.descargaFerroviariaComboio", _this.mensagens[0]);
                                return;
                            }
                            else {
                                jQuery("a.nav-link[href='#tDados']").click();
                                _this.message.success('titles.descargaFerroviariaComboio', 'messages.vagaoLiberadoComSucesso');
                                _this.refresh();
                            }
                        });
                    });
                    return [2 /*return*/];
                });
            }); });
        };
        _this.reprovarVagao = function () {
            if (!_this.service.dataDadosVagoes.regMovimento || !_this.service.data.comboioId)
                return;
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 11, function () { return __awaiter(_this, void 0, void 0, function () {
                var _this = this;
                return __generator(this, function (_a) {
                    if (this.service.data.sitReg === 'C') {
                        this.message.warning("titles.descargaFerroviariaComboio", "messages.operacaoDoComboioConcluidaAcaoNaoPermitida");
                        return [2 /*return*/];
                    }
                    if (this.service.data.sitReg === 'L') {
                        this.message.warning("titles.descargaFerroviariaComboio", "messages.comboioJaLiberadoAcaoNaoPermitida");
                        return [2 /*return*/];
                    }
                    this.message.confirm("titles.descargaFerroviariaComboio", "messages.confirmaReprovacaoDoVagao", null, function () {
                        var obj = {
                            regMovimento: _this.service.dataDadosVagoes.regMovimento,
                            flagAprova: 'R'
                        };
                        _this.service.reprovarVagao(obj).subscribe(function (result) {
                            _this.mensagens = _this.message.validationResult(result);
                            if (!result.isValid) {
                                _this.message.warning("titles.descargaFerroviariaComboio", _this.mensagens[0]);
                            }
                            else {
                                jQuery("a.nav-link[href='#tDados']").click();
                                _this.message.success('titles.descargaFerroviariaComboio', 'messages.vagaoReprovadoComSucesso');
                                _this.refresh();
                            }
                        });
                    });
                    return [2 /*return*/];
                });
            }); });
        };
        _this.visualizarFotoOCR = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 16, function () { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    if (!this.service.dataItens.opDescargaTremId)
                        return [2 /*return*/];
                    if (!this.ocrFerTipo) {
                        this.message.warning("titles.descargaFerroviariaComboio", "messages.ocrFerTipoNaoConfiguradoVerifique");
                        return [2 /*return*/, false];
                    }
                    if ([3, 4].includes(this.ocrFerTipo)) {
                        this.registro = this.service.dataDadosVagoesTmp.regControle;
                        this.tipo = 'E';
                    }
                    else if ([1, 2].includes(this.ocrFerTipo)) {
                        this.registro = this.service.dataItens.opDescargaId;
                        this.tipo = 'D';
                    }
                    app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_21__["EventEmitterService"].get('emiFotoOcr').emit({
                        registro: this.registro,
                        tipo: this.tipo
                    });
                    return [2 /*return*/];
                });
            }); });
        };
        _this._print = function () {
            if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["NumberUtilsStaticService"].isPositive(_this.service.dataDadosVagoes.regMovimento)) {
                _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 7, function () { return jQuery("#modalPrint").modal("show"); });
            }
            else {
                _this.message.warning("titles.descargaFerroviariaComboio", "messages.selecioneUmRegistro");
            }
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    DescargaFerroviariaComboioFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
        this.showTable = true;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this.comboioId = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["NumberUtilsStaticService"].toNumber(this.activatedRoute.snapshot.paramMap.get("id"));
                if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["NumberUtilsStaticService"].isPositive(this.comboioId)) {
                    this.refresh();
                    this.getTernos();
                    this.getLocalTransbordo();
                }
                else {
                    this.service.dataDadosVagoesTmp = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioDadosVagaoTmpDto"]();
                }
                return [2 /*return*/];
            });
        }); }, function () {
            _this.permissoesUtils.back();
        });
        _super.prototype.addFuncoes.call(this, [
            { action: '_print', func: function () { return _this._print; } },
            { action: 'visualizarFotoOCR', func: function () { return _this.visualizarFotoOCR; } },
            { action: 'liberarVagao', func: function () { return _this.liberarVagao; } },
            { action: 'reprovarVagao', func: function () { return _this.reprovarVagao; } }
        ]);
    };
    DescargaFerroviariaComboioFormComponent.prototype.habilitarBotoes = function () {
        this.buttonDisabled('listaForm', 'liberarVagao', !this.habilitaBtnLiberarVagao);
        this.buttonDisabled('listaForm', 'reprovarVagao', !this.habilitaBtnReprovarVagao);
    };
    Object.defineProperty(DescargaFerroviariaComboioFormComponent.prototype, "habilitaBtnLiberarVagao", {
        get: function () {
            return ['A', 'R'].includes(this.service.dataDadosVagoes.sitReg) && !!this.service.dataDadosVagoes.regMovimento && this.dadosItemTmp.length > 0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioFormComponent.prototype, "habilitaBtnReprovarVagao", {
        get: function () {
            return ['A', 'L'].includes(this.service.dataDadosVagoes.sitReg) && !!this.service.dataDadosVagoes.regMovimento && this.dadosItemTmp.length > 0;
        },
        enumerable: true,
        configurable: true
    });
    DescargaFerroviariaComboioFormComponent.prototype.geraDadosTmp = function (regMovimento) {
        return __awaiter(this, void 0, void 0, function () {
            var obj, resp;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        obj = {
                            regMovimento: regMovimento,
                            codRotina: this.constantes.sisFormularioId,
                            sitRotina: "I"
                        };
                        return [4 /*yield*/, this.service.gerarDadosTmp(obj).toPromise()];
                    case 1:
                        resp = _a.sent();
                        this.mensagens = this.message.validationResult(resp.validationResult);
                        if (resp.validationResult != null && !resp.validationResult.isValid) {
                            this.message.warning("titles.descargaFerroviariaComboio", this.mensagens[0]);
                            this.voltar();
                        }
                        else {
                            this.service.dataDadosVagoesTmp = resp;
                            this.getTmpItens(this.service.dataDadosVagoesTmp.regMovimento);
                            this.trataDadosTmp();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    DescargaFerroviariaComboioFormComponent.prototype.trataDadosTmp = function () {
        var _this = this;
        Object(rxjs__WEBPACK_IMPORTED_MODULE_18__["forkJoin"])([
            this.destinatarioService.getById(this.service.dataDadosVagoesTmp.destinatarioIdCliente),
            this.destinatarioService.getById(this.service.dataDadosVagoesTmp.destinatarioIdEmitente),
            this.destinatarioService.getById(this.service.dataDadosVagoesTmp.destinatarioIdTransportadora),
            this.materialService.getById(this.service.dataDadosVagoesTmp.materialId)
        ]).subscribe(function (resp) {
            _this.service.dataDadosVagoesTmp.cliente = !!resp[0] ? resp[0] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_19__["Destinatario"]();
            _this.service.dataDadosVagoesTmp.emitente = !!resp[1] ? resp[1] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_19__["Destinatario"]();
            _this.service.dataDadosVagoesTmp.transportadora = !!resp[2] ? resp[2] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_19__["Destinatario"]();
            _this.service.dataDadosVagoesTmp.material = !!resp[3] ? resp[3] : new app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_20__["Material"]();
        });
    };
    DescargaFerroviariaComboioFormComponent.prototype.getTmpItens = function (regMovimento) {
        var _this = this;
        this.service.getTmpItens(regMovimento).subscribe(function (resp) {
            _this.service.qtdeItens = resp.length;
            _this.dadosItemTmp = resp;
            _this.habilitarBotoes();
        });
    };
    DescargaFerroviariaComboioFormComponent.prototype.back = function () {
        this.service.dataDadosVagoes = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioDadosVagaoDto"]();
        this.funcoesService.desabilitarFiltro();
        this.router.navigate([this.target + "/balanca/descargaFerroviariaComboio"]);
    };
    DescargaFerroviariaComboioFormComponent.prototype.getTernos = function () {
        var _this = this;
        this.ternoService.get().subscribe(function (resp) {
            _this.ternos = resp;
        });
    };
    DescargaFerroviariaComboioFormComponent.prototype.getLocalTransbordo = function () {
        var _this = this;
        this.localTransbordoService.get().subscribe(function (resp) {
            _this.locaisTransbordo = resp;
        });
    };
    DescargaFerroviariaComboioFormComponent.prototype.voltar = function () {
        this.showTable = true;
        this.service.dataDadosVagoes = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioDadosVagaoDto"]();
        this.service.dataItens = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioNota"]();
        this.refresh();
        this.habilitarBtnFotoOCR(this.service.dataItens.opDescargaTremId);
    };
    DescargaFerroviariaComboioFormComponent.prototype.show = function () {
        this.showTable = false;
    };
    DescargaFerroviariaComboioFormComponent.prototype.habilitarBtnFotoOCR = function (opDescargaTremId) {
        this.buttonDisabled('listaForm', 'visualizarFotoOCR', !opDescargaTremId);
    };
    DescargaFerroviariaComboioFormComponent.prototype.confirmaImpressao = function (tipoImpressao) {
        switch (tipoImpressao) {
            case "listagem":
                this.printListagem();
                break;
            case "requisicao":
                this.printRequisicao();
                break;
            case "ticket":
                this.printTicket();
                break;
            default:
                break;
        }
    };
    DescargaFerroviariaComboioFormComponent.prototype.printListagem = function () {
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["NumberUtilsStaticService"].isPositive(this.service.dataDadosVagoes.regMovimento)) {
            this.funcoesService.reportInvoc.invocaRelatorio(this.constantes.reportId, this.constantes.reportTitulo, {
                dataI: this.service.filtro.dataI,
                dataF: this.service.filtro.dataF
            });
        }
        else {
            this.message.warning("titles.descargaFerroviariaComboio", "messages.selecioneUmRegistro");
        }
    };
    DescargaFerroviariaComboioFormComponent.prototype.printRequisicao = function () {
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["NumberUtilsStaticService"].isPositive(this.service.dataDadosVagoes.regMovimento)) {
            var modRel = this.cWebModRequisicaoF;
            if (!modRel)
                this.message.warning("titles.descargaFerroviariaComboio", "messages.modRelNaoConfigurado");
            else {
                this.funcoesService.reportInvoc.invocaRelatorio(modRel, this.constantes.reportTitulo, {
                    filialId: this.loginService.getLogin().filialId,
                    regMovimento: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["NumberUtilsStaticService"].toNumber(this.service.dataDadosVagoes.regMovimento)
                });
            }
            this.back();
        }
        else {
            this.message.warning("titles.descargaFerroviariaComboio", "messages.selecioneUmRegistro");
        }
    };
    DescargaFerroviariaComboioFormComponent.prototype.printTicket = function () {
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["NumberUtilsStaticService"].isPositive(this.service.dataDadosVagoes.regMovimento)) {
            var modRel = this.cWebModTicketF;
            if (!modRel)
                this.message.warning("titles.descargaFerroviariaComboio", "messages.modRelNaoConfigurado");
            else {
                this.funcoesService.reportInvoc.invocaRelatorio(modRel, this.constantes.reportTitulo, {
                    filialId: this.loginService.getLogin().filialId,
                    regMovimento: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["NumberUtilsStaticService"].toNumber(this.service.dataDadosVagoes.regMovimento)
                });
            }
            this.back();
        }
        else {
            this.message.warning("titles.descargaFerroviariaComboio", "messages.selecioneUmRegistro");
        }
    };
    DescargaFerroviariaComboioFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_10__["DescargaFerroviariaComboioService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_17__["ConfiguracaoFacade"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_14__["DatatablesService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"] },
        { type: app_pages_cadastro_terno_terno_service__WEBPACK_IMPORTED_MODULE_12__["TernoService"] },
        { type: app_pages_cadastro_local_de_transbordo_local_de_transbordo_service__WEBPACK_IMPORTED_MODULE_11__["LocalTransbordoService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_15__["DestinatarioService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_16__["MaterialService"] },
        { type: app_pages_cadastro_tanque_tanque_service__WEBPACK_IMPORTED_MODULE_22__["TanqueService"] }
    ]; };
    DescargaFerroviariaComboioFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-descarga-ferroviaria-comboio-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./descarga-ferroviaria-comboio-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-form/descarga-ferroviaria-comboio-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./descarga-ferroviaria-comboio-form.component.scss */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-form/descarga-ferroviaria-comboio-form.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_10__["DescargaFerroviariaComboioService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_17__["ConfiguracaoFacade"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_14__["DatatablesService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"],
            app_pages_cadastro_terno_terno_service__WEBPACK_IMPORTED_MODULE_12__["TernoService"],
            app_pages_cadastro_local_de_transbordo_local_de_transbordo_service__WEBPACK_IMPORTED_MODULE_11__["LocalTransbordoService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_15__["DestinatarioService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_16__["MaterialService"],
            app_pages_cadastro_tanque_tanque_service__WEBPACK_IMPORTED_MODULE_22__["TanqueService"]])
    ], DescargaFerroviariaComboioFormComponent);
    return DescargaFerroviariaComboioFormComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-historico-email/descarga-ferroviaria-comboio-historico-email.component.ts":
/*!*******************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-historico-email/descarga-ferroviaria-comboio-historico-email.component.ts ***!
  \*******************************************************************************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioHistoricoEmailComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioHistoricoEmailComponent", function() { return DescargaFerroviariaComboioHistoricoEmailComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.service */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.service.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.model */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.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 DescargaFerroviariaComboioHistoricoEmailComponent = /** @class */ (function () {
    function DescargaFerroviariaComboioHistoricoEmailComponent(funcoesService, messageService, service, loginService) {
        this.funcoesService = funcoesService;
        this.messageService = messageService;
        this.service = service;
        this.loginService = loginService;
        this.data = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_5__["DescargaFerroviariaComboioComboioVagaoEmailDto"]();
        this.hasDados = false;
    }
    DescargaFerroviariaComboioHistoricoEmailComponent.prototype.ngOnInit = function () {
    };
    DescargaFerroviariaComboioHistoricoEmailComponent.prototype.onSubmit = function (form) {
        jQuery("#descarga-ferroviaria-comboio-historico-email-dialog").modal("hide");
    };
    DescargaFerroviariaComboioHistoricoEmailComponent.prototype.objectSelect = function (comboioId, dtComboio) {
        var _this = this;
        this.service.getDadosHistoricoEmail(comboioId).subscribe(function (resp) {
            _this.dados = resp;
            _this.comboioId = comboioId;
            _this.dtComboio = dtComboio;
            _this.hasDados = resp && resp.length > 0;
        });
    };
    DescargaFerroviariaComboioHistoricoEmailComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_4__["DescargaFerroviariaComboioService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"] }
    ]; };
    DescargaFerroviariaComboioHistoricoEmailComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-descarga-ferroviaria-comboio-historico-email",
            template: __importDefault(__webpack_require__(/*! raw-loader!./descarga-ferroviaria-comboio-historico-email.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-historico-email/descarga-ferroviaria-comboio-historico-email.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_4__["DescargaFerroviariaComboioService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"]])
    ], DescargaFerroviariaComboioHistoricoEmailComponent);
    return DescargaFerroviariaComboioHistoricoEmailComponent;
}());



/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-index/descarga-ferroviaria-comboio-index.component.ts":
/*!***********************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-index/descarga-ferroviaria-comboio-index.component.ts ***!
  \***********************************************************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioIndexComponent", function() { return DescargaFerroviariaComboioIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* 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_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.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 app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.constants */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.constants.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.service */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_historico_email_descarga_ferroviaria_comboio_historico_email_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio-historico-email/descarga-ferroviaria-comboio-historico-email.component */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-historico-email/descarga-ferroviaria-comboio-historico-email.component.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.model */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};














var DescargaFerroviariaComboioIndexComponent = /** @class */ (function (_super) {
    __extends(DescargaFerroviariaComboioIndexComponent, _super);
    function DescargaFerroviariaComboioIndexComponent(router, datatablesService, funcoesService, messageService, permissoesUtils, service, loginService, configuracao) {
        var _this = _super.call(this, new _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_8__["DescargaFerroviariaComboioConstants"](), funcoesService) || this;
        _this.router = router;
        _this.datatablesService = datatablesService;
        _this.funcoesService = funcoesService;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.service = service;
        _this.loginService = loginService;
        _this.configuracao = configuracao;
        _this.constantes = new _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_8__["DescargaFerroviariaComboioConstants"]();
        _this.paramReportSituacao = false;
        _this.paramReportLacreVeiculo = false;
        _this.mensagens = [];
        _this.cWebModRequisicaoF = "";
        _this.cWebModTicketF = "";
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/balanca/descargaFerroviariaComboio";
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.controlaEmail = _this.funcoesService.isBoolean(_this.configuracao.lerConfig("CTV", "ControlaEmail"));
                _this.cWebModRequisicaoF = _this.configuracao.lerConfig("WEB", "CWebModRequisicaoF");
                _this.cWebModTicketF = _this.configuracao.lerConfig("WEB", "CWebModTicketF");
            }
        };
        _this.refresh = function () {
            _this.service.data = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_13__["DescargaFerroviariaComboioDto"]();
            _this.service.getByFiltro(_this.service.filtro).subscribe(function (data) {
                var columns = [
                    _this.datatablesService.getDataStringAlignRight("comboioId", "comboio", "10%"),
                    _this.datatablesService.getDataDateTime("dtComboio", "data", "DD/MM/YYYY HH:mm:ss", "15%"),
                    _this.datatablesService.getDataString("situacao", "situacao")
                ];
                _this.datatablesService.toDataTable({ tableId: "dtDescargaFerroviariaComboio", columns: columns, data: data, orientationOrder: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["EOrientationOrder"].ASC }, function (aData) {
                    _this.service.data = aData;
                });
            });
        };
        _this.permissoes = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 6, function () {
                _super.prototype.permissoes.call(_this, _this.constantes);
            });
        };
        _this.liberacaoEmLote = function () {
            if (!_this.itemSelecionado())
                return;
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 8, function () { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    this.funcoesService.openWindow('controle/liberacaoLote');
                    return [2 /*return*/];
                });
            }); });
        };
        _this.liberarComboio = function () {
            if (!_this.itemSelecionado())
                return;
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 9, function () { return __awaiter(_this, void 0, void 0, function () {
                var _this = this;
                return __generator(this, function (_a) {
                    if (this.service.data.sitReg === 'C') {
                        this.messageService.warning("titles.descargaFerroviariaComboio", "messages.operacaoDoComboioConcluidaAcaoNaoPermitida");
                        return [2 /*return*/];
                    }
                    if (this.service.data.sitReg === 'L') {
                        this.messageService.warning("titles.descargaFerroviariaComboio", "messages.comboioJaLiberadoAcaoNaoPermitida");
                        return [2 /*return*/];
                    }
                    if (this.service.data.sitReg === 'A') {
                        this.messageService.warning("titles.descargaFerroviariaComboio", "messages.paraContinuarENecessarioLiberarOuReprovarOsVagoesDoComboio");
                        return [2 /*return*/];
                    }
                    this.messageService.confirm("titles.descargaFerroviariaComboio", "messages.confirmaLiberacaoDoComboio", null, function () {
                        _this.service.liberarComboio(_this.service.data.comboioId).subscribe(function (result) {
                            _this.mensagens = _this.messageService.validationResult(result);
                            if (!result.isValid) {
                                _this.messageService.warning("titles.descargaFerroviariaComboio", _this.mensagens[0]);
                                return;
                            }
                            else {
                                _this.messageService.success('titles.descargaFerroviariaComboio', 'messages.comboioLiberadoComSucesso');
                                _this.refresh();
                            }
                        });
                    });
                    return [2 /*return*/];
                });
            }); });
        };
        _this.enviaEmail = function () {
            if (!_this.itemSelecionado())
                return;
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 12, function () { return __awaiter(_this, void 0, void 0, function () {
                var _this = this;
                return __generator(this, function (_a) {
                    if (this.service.data.sitReg === 'C') {
                        this.messageService.warning("titles.descargaFerroviariaComboio", "messages.operacaoDoComboioConcluidaNaoEPossivelReenviarEmail");
                        return [2 /*return*/];
                    }
                    else if (this.service.data.sitReg === 'A') {
                        this.messageService.warning("titles.descargaFerroviariaComboio", "messages.comboioNaoLiberadoNaoEPossivelReenviarEmail");
                        return [2 /*return*/];
                    }
                    else {
                        this.messageService.confirm("titles.descargaFerroviariaComboio", "messages.comboioJaLiberadoDesejaReenviarEmailAoSetorResponsavel", "null", function () { return __awaiter(_this, void 0, void 0, function () {
                            return __generator(this, function (_a) {
                                this.enviaEmailSetorResponsavel(this.service.data.comboioId, "messages.emailEnviadoSucesso");
                                return [2 /*return*/];
                            });
                        }); }, false, function () { });
                    }
                    return [2 /*return*/];
                });
            }); });
        };
        _this.historicoEmail = function () {
            if (!_this.itemSelecionado())
                return;
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 13, function () { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    this.childDescargaFerroviariaComboioHistoricoEmailComponent.objectSelect(this.service.data.comboioId, this.service.data.dtComboio);
                    jQuery("#descarga-ferroviaria-comboio-historico-email-dialog").modal("show");
                    return [2 /*return*/];
                });
            }); });
        };
        _this.informarEncoste = function () {
            if (!_this.itemSelecionado())
                return;
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 15, function () { return __awaiter(_this, void 0, void 0, function () {
                return __generator(this, function (_a) {
                    jQuery("#descarga-ferroviaria-comboio-informar-encoste").modal("show");
                    return [2 /*return*/];
                });
            }); });
        };
        _this.cancelarLiberacaoComboio = function () {
            if (!_this.itemSelecionado())
                return;
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 14, function () { return __awaiter(_this, void 0, void 0, function () {
                var _this = this;
                return __generator(this, function (_a) {
                    if (this.service.data.sitReg === 'C') {
                        this.messageService.warning("titles.descargaFerroviariaComboio", "messages.operacaoDoComboioConcluidaAcaoNaoPermitida");
                        return [2 /*return*/];
                    }
                    if (this.service.data.sitReg !== 'L') {
                        this.messageService.warning("titles.descargaFerroviariaComboio", "messages.comboioNaoLiberadoAcaoNaoPermitida");
                        return [2 /*return*/];
                    }
                    this.messageService.confirm("titles.descargaFerroviariaComboio", "messages.desejaCancelarLiberacaoDoComboio", null, function () {
                        _this.service.cancelarLiberacaoComboio(_this.service.data.comboioId).subscribe(function (result) {
                            _this.mensagens = _this.messageService.validationResult(result);
                            if (!result.isValid) {
                                _this.messageService.warning("titles.descargaFerroviariaComboio", _this.mensagens[0]);
                                return;
                            }
                            else {
                                if (_this.controlaEmail) {
                                    _this.messageService.confirm("titles.descargaFerroviariaComboio", "messages.liberacaoDeComboioCanceladaDesejaEnviarEmailAoSetorResponsavel", "null", function () { return __awaiter(_this, void 0, void 0, function () {
                                        return __generator(this, function (_a) {
                                            this.enviaEmailSetorResponsavel(this.service.data.comboioId, "messages.liberacaoDoComboioCanceladaComSucesso");
                                            return [2 /*return*/];
                                        });
                                    }); }, false, function () {
                                        _this.messageService.success("titles.descargaFerroviariaComboio", "messages.liberacaoDoComboioCanceladaComSucesso");
                                        _this.refresh();
                                    });
                                }
                                else {
                                    _this.messageService.success("titles.descargaFerroviariaComboio", "messages.liberacaoDoComboioCanceladaComSucesso");
                                    _this.refresh();
                                }
                            }
                        });
                    });
                    return [2 /*return*/];
                });
            }); });
        };
        _this._print = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 7, function () {
                _this.funcoesService.reportInvoc.invocaRelatorio(_this.constantes.reportId, _this.constantes.reportTitulo, {
                    dataI: _this.service.filtro.dataI,
                    dataF: _this.service.filtro.dataF
                });
            });
        };
        return _this;
    }
    DescargaFerroviariaComboioIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoesService.abrirFiltro) {
                    _this.service.filtro = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_13__["DescargaFerroviariaComboioFilter"]();
                    _this.filtrar();
                }
                else {
                    _this.refresh();
                }
            }
        }, function () { return _this.permissoesUtils.back(); }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: '_print', func: function () { return _this._print; } },
            { action: 'liberacaoEmLote', func: function () { return _this.liberacaoEmLote; } },
            { action: 'liberarComboio', func: function () { return _this.liberarComboio; } },
            { action: 'enviaEmail', func: function () { return _this.enviaEmail; } },
            { action: 'historicoEmail', func: function () { return _this.historicoEmail; } },
            { action: 'cancelarLiberacaoComboio', func: function () { return _this.cancelarLiberacaoComboio; } },
            { action: 'informarEncoste', func: function () { return _this.informarEncoste; } }
        ]);
    };
    DescargaFerroviariaComboioIndexComponent.prototype.detail = function () {
        if (!this.itemSelecionado())
            return;
        this.router.navigate(["" + this.target + this.pageRoute + "/detail/" + this.service.data.comboioId]);
    };
    DescargaFerroviariaComboioIndexComponent.prototype.itemSelecionado = function () {
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_10__["NumberUtilsStaticService"].isNotPositive(this.service.data.comboioId)) {
            this.messageService.warning("titles.descargaFerroviariaComboio", "messages.selecioneUmRegistro");
            return false;
        }
        return true;
    };
    DescargaFerroviariaComboioIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _super.prototype.properties.call(_this, _this.service.data);
        });
    };
    DescargaFerroviariaComboioIndexComponent.prototype.filtrar = function () {
        jQuery("#descarga-ferroviaria-comboio-filter-dialog").modal("show");
    };
    DescargaFerroviariaComboioIndexComponent.prototype.executaFiltro = function () {
        this.refresh();
    };
    DescargaFerroviariaComboioIndexComponent.prototype.enviaEmailSetorResponsavel = function (comboioId, mensagem) {
        return __awaiter(this, void 0, void 0, function () {
            var validationResult, mensagens;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.service.enviaEmailSetorResponsavel(comboioId).toPromise()];
                    case 1:
                        validationResult = _a.sent();
                        if (!validationResult.isValid) {
                            mensagens = this.messageService.validationResult(validationResult);
                            mensagens.forEach(function (m) { return _this.messageService.warning("titles.descargaFerroviariaComboio", m); });
                            return [2 /*return*/];
                        }
                        else {
                            this.messageService.success("titles.descargaFerroviariaComboio", mensagem);
                            this.refresh();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    DescargaFerroviariaComboioIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] },
        { type: _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_7__["LoginService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_11__["ConfiguracaoFacade"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(_descarga_ferroviaria_comboio_historico_email_descarga_ferroviaria_comboio_historico_email_component__WEBPACK_IMPORTED_MODULE_12__["DescargaFerroviariaComboioHistoricoEmailComponent"], { static: false }),
        __metadata("design:type", _descarga_ferroviaria_comboio_historico_email_descarga_ferroviaria_comboio_historico_email_component__WEBPACK_IMPORTED_MODULE_12__["DescargaFerroviariaComboioHistoricoEmailComponent"])
    ], DescargaFerroviariaComboioIndexComponent.prototype, "childDescargaFerroviariaComboioHistoricoEmailComponent", void 0);
    DescargaFerroviariaComboioIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-descarga-ferroviaria-comboio-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./descarga-ferroviaria-comboio-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-index/descarga-ferroviaria-comboio-index.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_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"],
            _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_7__["LoginService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_11__["ConfiguracaoFacade"]])
    ], DescargaFerroviariaComboioIndexComponent);
    return DescargaFerroviariaComboioIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-informar-encoste/descarga-ferroviaria-comboio-informar-encoste.component.scss":
/*!***********************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-informar-encoste/descarga-ferroviaria-comboio-informar-encoste.component.scss ***!
  \***********************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".chk input {\n  display: none;\n}\n\n.chk span {\n  width: 12px;\n  height: 12px;\n  display: block;\n  background-color: #fff;\n  border: 1px solid #DDD;\n  border-radius: 100%;\n}\n\nspan.red {\n  background-color: #c03;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvYmFsYW5jYS9kZXNjYXJnYS1mZXJyb3ZpYXJpYS1jb21ib2lvL2Rlc2NhcmdhLWZlcnJvdmlhcmlhLWNvbWJvaW8taW5mb3JtYXItZW5jb3N0ZS9DOlxcQ29ycG9yYXRlXFxDb3Jwb3JhdGVXZWJEZXNlbnZcXF91bmlzb2x1dGlvbi9zcmNcXGFwcFxccGFnZXNcXGJhbGFuY2FcXGRlc2NhcmdhLWZlcnJvdmlhcmlhLWNvbWJvaW9cXGRlc2NhcmdhLWZlcnJvdmlhcmlhLWNvbWJvaW8taW5mb3JtYXItZW5jb3N0ZVxcZGVzY2FyZ2EtZmVycm92aWFyaWEtY29tYm9pby1pbmZvcm1hci1lbmNvc3RlLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9wYWdlcy9iYWxhbmNhL2Rlc2NhcmdhLWZlcnJvdmlhcmlhLWNvbWJvaW8vZGVzY2FyZ2EtZmVycm92aWFyaWEtY29tYm9pby1pbmZvcm1hci1lbmNvc3RlL2Rlc2NhcmdhLWZlcnJvdmlhcmlhLWNvbWJvaW8taW5mb3JtYXItZW5jb3N0ZS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLGFBQUE7QUNDSjs7QURFQTtFQUNJLFdBQUE7RUFDQSxZQUFBO0VBQ0EsY0FBQTtFQUNBLHNCQUFBO0VBQ0Esc0JBQUE7RUFDQSxtQkFBQTtBQ0NKOztBREVBO0VBQ0ksc0JBQUE7QUNDSiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL2JhbGFuY2EvZGVzY2FyZ2EtZmVycm92aWFyaWEtY29tYm9pby9kZXNjYXJnYS1mZXJyb3ZpYXJpYS1jb21ib2lvLWluZm9ybWFyLWVuY29zdGUvZGVzY2FyZ2EtZmVycm92aWFyaWEtY29tYm9pby1pbmZvcm1hci1lbmNvc3RlLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmNoayBpbnB1dCB7XHJcbiAgICBkaXNwbGF5OiBub25lO1xyXG59XHJcblxyXG4uY2hrIHNwYW4ge1xyXG4gICAgd2lkdGg6IDEycHg7XHJcbiAgICBoZWlnaHQ6IDEycHg7XHJcbiAgICBkaXNwbGF5OiBibG9jaztcclxuICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7XHJcbiAgICBib3JkZXI6IDFweCBzb2xpZCAjREREO1xyXG4gICAgYm9yZGVyLXJhZGl1czogMTAwJTtcclxuICB9XHJcblxyXG5zcGFuLnJlZCB7XHJcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjYzAzO1xyXG59XHJcblxyXG5cclxuIiwiLmNoayBpbnB1dCB7XG4gIGRpc3BsYXk6IG5vbmU7XG59XG5cbi5jaGsgc3BhbiB7XG4gIHdpZHRoOiAxMnB4O1xuICBoZWlnaHQ6IDEycHg7XG4gIGRpc3BsYXk6IGJsb2NrO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmO1xuICBib3JkZXI6IDFweCBzb2xpZCAjREREO1xuICBib3JkZXItcmFkaXVzOiAxMDAlO1xufVxuXG5zcGFuLnJlZCB7XG4gIGJhY2tncm91bmQtY29sb3I6ICNjMDM7XG59Il19 */");

/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-informar-encoste/descarga-ferroviaria-comboio-informar-encoste.component.ts":
/*!*********************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-informar-encoste/descarga-ferroviaria-comboio-informar-encoste.component.ts ***!
  \*********************************************************************************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioInformarEncosteComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioInformarEncosteComponent", function() { return DescargaFerroviariaComboioInformarEncosteComponent; });
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.constants */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.constants.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.service */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_email_email_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/shared/services/funcoes/email/email.service */ "./src/app/shared/services/funcoes/email/email.service.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.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 DescargaFerroviariaComboioInformarEncosteComponent = /** @class */ (function (_super) {
    __extends(DescargaFerroviariaComboioInformarEncosteComponent, _super);
    function DescargaFerroviariaComboioInformarEncosteComponent(router, descargaFerroviariaComboioService, activatedRoute, datatablesService, messageService, emailService, funcoesService, permissoesUtils, loginService) {
        var _this = _super.call(this, new _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_3__["DescargaFerroviariaComboioConstants"](), funcoesService) || this;
        _this.router = router;
        _this.descargaFerroviariaComboioService = descargaFerroviariaComboioService;
        _this.activatedRoute = activatedRoute;
        _this.datatablesService = datatablesService;
        _this.messageService = messageService;
        _this.emailService = emailService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.hasDados = false;
        _this.data = [];
        _this.selecionadosEnvio = [];
        _this.constantes = new _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_3__["DescargaFerroviariaComboioConstants"]();
        _this.mensagens = [];
        _this.materialId = "";
        _this.target = _this.funcoesService.getTargetLocation();
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        _this.filialId = loginService.getLogin().filialId;
        return _this;
    }
    DescargaFerroviariaComboioInformarEncosteComponent.prototype.ngOnInit = function () {
    };
    DescargaFerroviariaComboioInformarEncosteComponent.prototype.pesquisar = function () {
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_12__["EventEmitterService"].get("formError").emit();
        this.refresh();
    };
    DescargaFerroviariaComboioInformarEncosteComponent.prototype.validaDtEncoste = function () {
        if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["DateTimeUtilsStaticService"].maiorA(this.dtEncoste, new Date(), ['H', 'M'])) {
            this.messageService.warning("titles.descargaFerroviariaComboio", "messages.dtHoraEncosteNaoPodeSerMaiorQueDtHoraAtual");
            return false;
        }
        if (!this.dtEncoste) {
            this.messageService.warning("titles.descargaFerroviariaComboio", "messages.dtEncosteObrigatoria");
            return false;
        }
        return true;
    };
    DescargaFerroviariaComboioInformarEncosteComponent.prototype.refresh = function () {
        var _this = this;
        this.selecionadosEnvio = [];
        var obj = {
            materialId: this.materialId
        };
        this.descargaFerroviariaComboioService
            .getDadosInformarEncosteByFiltro(obj)
            .subscribe(function (resp) {
            _this.data = resp;
            _this.hasDados = resp && resp.length > 0;
        });
    };
    DescargaFerroviariaComboioInformarEncosteComponent.prototype.marcarTodos = function () {
        var _this = this;
        if (!this.hasDados) {
            this.messageService.warning("titles.descargaFerroviariaComboio", "messages.tabelaVazia");
            return;
        }
        this.data.forEach(function (e) { return _this.onMarcarTodos(e); });
    };
    DescargaFerroviariaComboioInformarEncosteComponent.prototype.desmarcarTodos = function () {
        var _this = this;
        if (!this.hasDados) {
            this.messageService.warning("titles.descargaFerroviariaComboio", "messages.tabelaVazia");
            return;
        }
        this.data.forEach(function (e) { return _this.onDesmarcarTodos(e); });
    };
    DescargaFerroviariaComboioInformarEncosteComponent.prototype._dbClick = function (obj) {
        this.onMarcarDesmarcar(obj);
    };
    DescargaFerroviariaComboioInformarEncosteComponent.prototype.onMarcarDesmarcar = function (obj) {
        obj.selecionado = obj.selecionado === 'S' ? 'N' : 'S';
    };
    DescargaFerroviariaComboioInformarEncosteComponent.prototype.onMarcarTodos = function (obj) {
        obj.selecionado = 'S';
    };
    DescargaFerroviariaComboioInformarEncosteComponent.prototype.onDesmarcarTodos = function (obj) {
        obj.selecionado = 'N';
    };
    DescargaFerroviariaComboioInformarEncosteComponent.prototype.onSubmit = function (form) {
        var _this = this;
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_12__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        if (!this.validaDtEncoste()) {
            return;
        }
        if (!this.hasDados) {
            this.messageService.warning("titles.descargaFerroviariaComboio", "messages.tabelaVazia");
            return;
        }
        this.selecionadosEnvio = this.data.filter(function (d) { return d.selecionado === "S"; });
        if (this.selecionadosEnvio.length === 0) {
            this.messageService.warning("titles.descargaFerroviariaComboio", "messages.nenhumRegistroFoiSelecionado");
            return;
        }
        this.descargaFerroviariaComboioService.gravarDtEncoste(this.selecionadosEnvio, this.dtEncoste)
            .subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result);
            if (!result.isValid) {
                app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_12__["EventEmitterService"].get("backError").emit(_this.mensagens);
                _this.refresh();
            }
            else {
                _this.messageService.saveSuccess("titles.descargaFerroviariaComboio");
                jQuery("#descarga-ferroviaria-comboio-informar-encoste").modal("hide");
            }
        });
    };
    DescargaFerroviariaComboioInformarEncosteComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
        { type: _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_4__["DescargaFerroviariaComboioService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_6__["DatatablesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"] },
        { type: app_shared_services_funcoes_email_email_service__WEBPACK_IMPORTED_MODULE_10__["EmailService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_0__["LoginService"] }
    ]; };
    DescargaFerroviariaComboioInformarEncosteComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-descarga-ferroviaria-comboio-informar-encoste",
            template: __importDefault(__webpack_require__(/*! raw-loader!./descarga-ferroviaria-comboio-informar-encoste.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-informar-encoste/descarga-ferroviaria-comboio-informar-encoste.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./descarga-ferroviaria-comboio-informar-encoste.component.scss */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-informar-encoste/descarga-ferroviaria-comboio-informar-encoste.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
            _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_4__["DescargaFerroviariaComboioService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_6__["DatatablesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"],
            app_shared_services_funcoes_email_email_service__WEBPACK_IMPORTED_MODULE_10__["EmailService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_0__["LoginService"]])
    ], DescargaFerroviariaComboioInformarEncosteComponent);
    return DescargaFerroviariaComboioInformarEncosteComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-item/descarga-ferroviaria-comboio-item.component.ts":
/*!*********************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-item/descarga-ferroviaria-comboio-item.component.ts ***!
  \*********************************************************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioItemComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioItemComponent", function() { return DescargaFerroviariaComboioItemComponent; });
/* harmony import */ var _shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
/* harmony import */ var app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/pages/cadastro/lote/lote.service */ "./src/app/pages/cadastro/lote/lote.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.service */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.service.ts");
/* harmony import */ var app_pages_cadastro_tipo_documento_transp_tipo_documento_transp_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/pages/cadastro/tipo-documento-transp/tipo-documento-transp.service */ "./src/app/pages/cadastro/tipo-documento-transp/tipo-documento-transp.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.model */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.model.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.constants */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.constants.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_pages_cadastro_tanque_tanque_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/pages/cadastro/tanque/tanque.service */ "./src/app/pages/cadastro/tanque/tanque.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_17__ = __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_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! app/shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_20__ = __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_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! app/pages/cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var app_pages_cadastro_tanque_tanque_model__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! app/pages/cadastro/tanque/tanque.model */ "./src/app/pages/cadastro/tanque/tanque.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

























var DescargaFerroviariaComboioItemComponent = /** @class */ (function (_super) {
    __extends(DescargaFerroviariaComboioItemComponent, _super);
    function DescargaFerroviariaComboioItemComponent(message, service, funcoesService, permissoesUtils, loginService, loteService, materialService, tanqueService, configuracao, destinatarioService, tipoDocumentoTranspService) {
        var _this = _super.call(this, new _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_11__["DescargaFerroviariaComboioConstants"](), funcoesService) || this;
        _this.message = message;
        _this.service = service;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.loteService = loteService;
        _this.materialService = materialService;
        _this.tanqueService = tanqueService;
        _this.configuracao = configuracao;
        _this.destinatarioService = destinatarioService;
        _this.tipoDocumentoTranspService = tipoDocumentoTranspService;
        _this.dataResult = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["EventEmitter"]();
        _this.btnFotoOCR = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["EventEmitter"]();
        _this.constantes = new _descarga_ferroviaria_comboio_constants__WEBPACK_IMPORTED_MODULE_11__["DescargaFerroviariaComboioConstants"]();
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["Mascaras"]();
        _this.tipoDocumentoTransp = [];
        _this.dataAtual = new Date();
        _this.mensagens = [];
        _this.tmpGerados = false;
        _this._index = 0;
        _this.editChaveNfeEModeloNotaId55 = false;
        _this.loadConfig = function () {
            _this.exibePesoFOB = _this.funcoesService.isBoolean(_this.configuracao.lerConfig('BAL', 'InfPesoFob'));
            _this.obrChaveNFeEnt = _this.funcoesService.isBoolean(_this.configuracao.lerConfig('UNI', 'ObrChaveNFeEnt'));
            _this.difMaxNFDtAtual = _this.configuracao.number('BAL', 'DifMaxNFDtAtual');
            _this.service.calculaTotalNF = _this.funcoesService.isBoolean(_this.configuracao.lerConfig('BAL', 'CalculaTotalNF'));
            _this.importaDANFE = _this.funcoesService.isBoolean(_this.configuracao.lerConfig('CTV', 'ImportaDANFE'));
            _this.ptNfCompraDif = _this.configuracao.number('BAL', 'PtNfCompraDif');
            _this.solConclLaudoSegPesF = _this.funcoesService.isBoolean(_this.configuracao.lerConfig('BAL', 'SolConclLaudoSegPesF'));
        };
        return _this;
    }
    DescargaFerroviariaComboioItemComponent.prototype.ngOnInit = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this.service.dataItens = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioNota"]();
                this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
                this.showTable = true;
                this.ajustarUnidade();
                return [2 /*return*/];
            });
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.onSubmit = function (form) {
        return __awaiter(this, void 0, void 0, function () {
            var object;
            var _this = this;
            return __generator(this, function (_a) {
                app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_17__["EventEmitterService"].get("formError").emit(form);
                if (form.invalid) {
                    this.funcoesService.backToTop();
                    return [2 /*return*/];
                }
                if (!this.validaDtEmissao()) {
                    return [2 /*return*/];
                }
                if (this.actionForm !== app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].create) {
                    object = {
                        opDescargaTremId: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].toNumber(this.service.dataDadosVagoes.regMovimento),
                        regTmp: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].toNumber(this.service.dataItens.opDescargaTremId),
                        destinatarioIdEmitente: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].toNumber(this.service.dataItens.destinatarioIdEmitente),
                        destinatarioIdEmitenteAnterior: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].toNumber(this.service.dataItensAnterior.destinatarioIdEmitente),
                        docto: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].toNumber(this.service.dataItens.docto),
                        doctoAnterior: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].toNumber(this.service.dataItensAnterior.docto),
                        serieNotaId: _shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["StringUtilsStaticService"].toString(this.service.dataItens.serieNotaId),
                        complementar: _shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["StringUtilsStaticService"].toString(this.service.dataItens.complementar)
                    };
                    this.service.validaDocto(object).subscribe(function (result) {
                        if (result.retornoId > 1 && result.validationResult != null && !result.validationResult.isValid) {
                            _this.mensagens = _this.message.validationResult(result.validationResult);
                            _this.message.warning("titles.descargaFerroviariaComboio", _this.mensagens[0]);
                            return;
                        }
                        else {
                            _this.gravarItemNaTmp();
                        }
                    });
                }
                else {
                    this.gravarItemNaTmp();
                }
                return [2 /*return*/];
            });
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.gravarItemNaTmp = function () {
        var _this = this;
        this.service.dataItens.logRotina = "Descarga Ferroviária (Comboio)";
        this.service
            .save(this.service.dataItens, this.funcoesService.isEdit(this.actionForm))
            .subscribe(function (result) {
            _this.mensagens = _this.message.validationResult(result.validationResult);
            if (!result.validationResult.isValid) {
                app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_17__["EventEmitterService"].get("backError").emit(_this.mensagens);
                _this.funcoesService.backToTop();
            }
            else {
                _this.message.saveSuccess("titles.descargaFerroviariaComboio");
                _this.tmpGerados = true;
                _this.showTable = true;
                _this.dataResult.emit(true);
            }
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.selected = function (val, index) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this._index = index;
                        this.service.dataItens = val;
                        this.btnFotoOCR.emit(true);
                        return [4 /*yield*/, this.service.carregaDadosLote(this.service.dataItens.loteId)];
                    case 1:
                        _a.sent();
                        return [4 /*yield*/, this.trataClienteEmitente()];
                    case 2:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.trataClienteEmitente = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                Object(rxjs__WEBPACK_IMPORTED_MODULE_14__["forkJoin"])([
                    this.destinatarioService.getById(this.service.dataItens.destinatarioIdCliente),
                    this.destinatarioService.getById(this.service.dataItens.destinatarioIdEmitente)
                ]).subscribe(function (resp) {
                    _this.service.dataItens.cliente = !!resp[0] ? resp[0] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_21__["Destinatario"]();
                    _this.service.dataItens.emitente = !!resp[1] ? resp[1] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_21__["Destinatario"]();
                });
                return [2 /*return*/];
            });
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.validarENotaComplementar = function () {
        var _this = this;
        var object = {
            opDescargaTremId: this.service.dataDadosVagoes.regMovimento,
            regTmp: this.service.dataItens.opDescargaTremId,
            destinatarioIdEmitente: this.service.dataItens.destinatarioIdEmitente,
            destinatarioIdEmitenteAnterior: this.service.dataItensAnterior.destinatarioIdEmitente,
            docto: this.service.dataItens.docto,
            doctoAnterior: this.service.dataItensAnterior.docto,
            serieNotaId: this.service.dataItens.serieNotaId,
            complementar: this.service.dataItens.complementar
        };
        this.service.validarENotaComplementar(object).subscribe(function (resp) {
            _this.service.dataENotaComplementar = resp;
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.trataDestinatarioIdEmitente = function () {
        if (this.actionForm !== app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].create) {
            this.validarENotaComplementar();
            if (this.service.dataENotaComplementar !== null) {
                if (this.service.dataENotaComplementar.retornoId > 2) {
                    this.message.warning("titles.descargaFerroviariaComboio", "messages.existeNotaComplementarVinculadaAlteracaoNaoPermitida");
                    this.service.dataItens.destinatarioIdEmitente = this.service.dataItensAnterior.destinatarioIdEmitente;
                }
            }
        }
    };
    DescargaFerroviariaComboioItemComponent.prototype.onDoctoChange = function () {
        if (this.actionForm !== app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].create) {
            this.validarENotaComplementar();
            if (this.service.dataENotaComplementar !== null) {
                if (this.service.dataENotaComplementar.retornoId > 1) {
                    this.message.warning("titles.descargaFerroviariaComboio", "messages.existeNotaComplementarVinculadaAlteracaoNaoPermitida");
                    this.service.dataItens.docto = this.service.dataItensAnterior.docto;
                }
            }
        }
    };
    DescargaFerroviariaComboioItemComponent.prototype.onSerieNotaIdChange = function () {
        if (this.actionForm !== app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].create) {
            this.validarENotaComplementar();
            if (this.service.dataENotaComplementar !== null) {
                if (this.service.dataENotaComplementar.retornoId > 1) {
                    this.message.warning("titles.descargaFerroviariaComboio", "messages.existeNotaComplementarVinculadaAlteracaoNaoPermitida");
                    this.service.dataItens.docto = this.service.dataItensAnterior.docto;
                }
            }
        }
    };
    DescargaFerroviariaComboioItemComponent.prototype.back = function () {
        this.showTable = true;
        this.actionForm = app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].detail;
        this.service.dataItens = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioNota"]();
        this.dataResult.emit(true);
    };
    DescargaFerroviariaComboioItemComponent.prototype.show = function () {
        this.showTable = false;
        this.actionForm = app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].detail;
        this.dataResult.emit(false);
    };
    DescargaFerroviariaComboioItemComponent.prototype.edit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () { return __awaiter(_this, void 0, void 0, function () {
            var obj;
            var _this = this;
            return __generator(this, function (_a) {
                this.service.dataItensAnterior = this.funcoesService.cloneObject(this.service.dataItens);
                if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].isPositive(this.service.dataItens.opDescargaTremId)) {
                    obj = {
                        opDescargaTremId: this.service.dataDadosVagoes.regMovimento,
                        macAddress: this.configuracao.macAddress
                    };
                    this.service.validarItemPodeSerAlteradoOuExcuido(obj).subscribe(function (result) {
                        _this.mensagens = _this.message.validationResult(result);
                        if (!result.isValid) {
                            _this.message.warning("titles.descargaFerroviariaComboio", _this.mensagens[0]);
                            return;
                        }
                        else {
                            if (_this.service.dataDadosVagoes.sitReg === 'C') {
                                _this.message.warning("titles.descargaFerroviariaComboio", "messages.operacaoDoComboioConcluidaAcaoNaoPermitida");
                                return;
                            }
                            else if (_this.service.dataDadosVagoes.sitReg === 'L') {
                                _this.message.warning("titles.descargaFerroviariaComboio", "messages.comboioJaLiberadoAcaoNaoPermitida");
                                return;
                            }
                            else {
                                if (_this.showTable) {
                                    if (_this.tmpGerados) {
                                        _this.showTable = false;
                                        _this.actionForm = app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].edit;
                                    }
                                    else {
                                        _this.geraDadosTmpEdit(_this.service.dataDadosVagoes.regMovimento);
                                    }
                                }
                                else {
                                    _this.actionForm = app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].edit;
                                }
                            }
                        }
                    });
                }
                return [2 /*return*/];
            });
        }); });
    };
    DescargaFerroviariaComboioItemComponent.prototype.geraDadosTmpEdit = function (regMovimento) {
        return __awaiter(this, void 0, void 0, function () {
            var obj, resp;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        obj = {
                            regMovimento: regMovimento,
                            codRotina: this.constantes.sisFormularioId,
                            sitRotina: "A"
                        };
                        return [4 /*yield*/, this.service.gerarDadosTmp(obj).toPromise()];
                    case 1:
                        resp = _a.sent();
                        this.mensagens = this.message.validationResult(resp.validationResult);
                        if (resp.validationResult != null && !resp.validationResult.isValid) {
                            this.message.warning("titles.descargaFerroviariaComboio", this.mensagens[0]);
                            this.back();
                        }
                        else {
                            this.service.dataDadosVagoesTmp = resp;
                            this.getTmpItens(this.service.dataDadosVagoesTmp.regMovimento);
                            this.trataDadosTmp();
                            this.trataTanqueMaterial();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.trataDadosTmp = function () {
        var _this = this;
        Object(rxjs__WEBPACK_IMPORTED_MODULE_14__["forkJoin"])([
            this.destinatarioService.getById(this.service.dataDadosVagoesTmp.destinatarioIdCliente),
            this.destinatarioService.getById(this.service.dataDadosVagoesTmp.destinatarioIdEmitente),
            this.destinatarioService.getById(this.service.dataDadosVagoesTmp.destinatarioIdTransportadora),
            this.materialService.getById(this.service.dataDadosVagoesTmp.materialId)
        ]).subscribe(function (resp) {
            _this.service.dataDadosVagoesTmp.cliente = !!resp[0] ? resp[0] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_21__["Destinatario"]();
            _this.service.dataDadosVagoesTmp.emitente = !!resp[1] ? resp[1] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_21__["Destinatario"]();
            _this.service.dataDadosVagoesTmp.transportadora = !!resp[2] ? resp[2] : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_21__["Destinatario"]();
            _this.service.dataDadosVagoesTmp.material = !!resp[3] ? resp[3] : new app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_23__["Material"]();
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.getTmpItens = function (regMovimento) {
        var _this = this;
        this.service.getTmpItens(regMovimento).subscribe(function (resp) {
            if (resp && resp.length > 0) {
                _this.service.qtdeItens = resp.length;
                _this.dadosItemTmp = resp;
                _this.showTable = false;
                _this.actionForm = app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].edit;
                _this.service.carregaDadosLote(_this.service.dataItens.loteId);
                _this.validarENotaComplementar();
            }
            else {
                _this.back();
            }
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.trataTanqueMaterial = function () {
        var _this = this;
        Object(rxjs__WEBPACK_IMPORTED_MODULE_14__["forkJoin"])([
            this.tanqueService.getById(btoa(this.service.dataDadosVagoes.deposito)),
            this.materialService.getById(this.service.dataDadosVagoes.materialId)
        ]).subscribe(function (resp) {
            _this.service.dataItens.tanque = !!resp[0] ? resp[0] : new app_pages_cadastro_tanque_tanque_model__WEBPACK_IMPORTED_MODULE_24__["Tanque"]();
            _this.service.dataItens.material = !!resp[1] ? resp[1] : new app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_23__["Material"]();
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.create = function () {
        var _this = this;
        this.actionForm = app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].create;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                if (this.service.dataDadosVagoesTmp.flagIntegracao === 'I') {
                    this.message.warning("titles.descargaFerroviariaComboio", "messages.ticketJaIntegradoAltNaoPermitida");
                    return [2 /*return*/];
                }
                else {
                    this.showTable = false;
                    this.dataResult.emit(false);
                    this.service.dataItens = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioNota"]();
                    this.service.dataItens.opDescargaTremId = this.service.dataDadosVagoesTmp.regMovimento;
                    this.service.dataItens.destinatarioIdCliente = this.service.dataDadosVagoesTmp.destinatarioIdCliente;
                    this.service.dataItens.cliente = this.service.dataDadosVagoesTmp.cliente;
                    this.service.dataItens.destinatarioIdEmitente = this.service.dataDadosVagoesTmp.destinatarioIdEmitente;
                    this.service.dataItens.emitente = this.service.dataDadosVagoesTmp.emitente;
                    this.service.dataItens.flagIntegra = "N";
                    this.service.dataItens.complementar = "N";
                    this.service.dataItens.docTranspNumero = "";
                    this.service.dataItens.nfeAuto = "N";
                    this.service.dataItens.tipoFrete = 0;
                    this.service.dataItens.sitLaudo = null;
                    this.service.dataItens.opDescargaTremItemId = (this.service.qtdeItens + 1);
                    this.trataTanqueMaterial();
                }
                return [2 /*return*/];
            });
        }); });
    };
    DescargaFerroviariaComboioItemComponent.prototype.gravar = function () {
        var _this = this;
        var obj = {
            opDescargaTremId: this.service.dataDadosVagoes.regMovimento,
            regTmp: this.service.dataItens.opDescargaTremId,
            codRotina: this.constantes.sisFormularioId
        };
        this.service.gravarItens(obj).subscribe(function (result) {
            _this.mensagens = _this.message.validationResult(result);
            if (!result.isValid) {
                _this.message.warning("titles.descargaFerroviariaComboio", _this.mensagens[0]);
                return;
            }
            else {
                _this.message.success("titles.descargaFerroviariaComboio", "messages.operacaoRealizadaComSucesso");
                _this.tmpGerados = false;
                _this.service.dataDadosVagoes = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioDadosVagaoDto"]();
                jQuery("a.nav-link[href='#tDados']").click();
            }
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.cancelar = function () {
        var _this = this;
        var object = {
            opDescargaTremId: this.service.dataItens.opDescargaTremId,
            codRotina: this.constantes.sisFormularioId
        };
        this.service.cancelarTmp(object).subscribe(function (result) {
            _this.mensagens = _this.message.validationResult(result);
            if (!result.isValid) {
                _this.message.warning("titles.descargaFerroviariaComboio", _this.mensagens[0]);
                return;
            }
            else {
                _this.message.success("titles.descargaFerroviariaComboio", "messages.operacaoRealizadaComSucesso");
                _this.tmpGerados = false;
                _this.service.dataDadosVagoes = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioDadosVagaoDto"]();
                jQuery("a.nav-link[href='#tDados']").click();
            }
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.remove = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () { return __awaiter(_this, void 0, void 0, function () {
            var obj, mensagem;
            var _this = this;
            return __generator(this, function (_a) {
                if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].isPositive(this.service.dataItens.opDescargaTremId)) {
                    if (this.service.dataItens.sitReg === 'A' || _shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["StringUtilsStaticService"].isEmpty(this.service.dataItens.sitReg)) {
                        obj = {
                            opDescargaTremId: this.service.dataDadosVagoes.regMovimento,
                            macAddress: this.configuracao.macAddress
                        };
                        this.service.validarItemPodeSerAlteradoOuExcuido(obj).subscribe(function (result) {
                            _this.mensagens = _this.message.validationResult(result);
                            if (!result.isValid) {
                                _this.message.warning("titles.descargaFerroviariaComboio", _this.mensagens[0]);
                                return;
                            }
                            else {
                                if (_this.service.dataDadosVagoesTmp.pesoTara > 0) {
                                    _this.message.warning("titles.descargaFerroviariaComboio", "messages.descargaComSegundaPesagemExclusaoNaoPermitida");
                                    return;
                                }
                                else if (_this.service.dataDadosVagoesTmp.flagIntegracao === 'I') {
                                    _this.message.warning("titles.descargaFerroviariaComboio", "messages.ticketJaIntegradoExclusaoNaoPermitida");
                                    return;
                                }
                                else {
                                    _this.message.removeConfirm(function () {
                                        var object = {
                                            regTmp: _this.service.dataItens.opDescargaTremId,
                                            opDescargaTremItemId: _this.service.dataItens.opDescargaTremItemId
                                        };
                                        _this.service.excluirItem(object).subscribe(function (result) {
                                            _this.mensagens = _this.message.validationResult(result);
                                            if (!result.isValid) {
                                                _this.message.warning("titles.descargaFerroviariaComboio", _this.mensagens[0]);
                                                return;
                                            }
                                            else {
                                                _this.message.success("titles.descargaFerroviariaComboio", "messages.operacaoRealizadaComSucesso");
                                                _this.dataResult.emit(true);
                                                _this.tmpGerados = true;
                                            }
                                        });
                                    });
                                }
                            }
                        });
                    }
                    else {
                        mensagem = this.message.translate("messages.operacaoNaoPermitidaSituacao", { descrSituacao: this.service.dataItens.situacao });
                        this.message.warning("titles.descargaFerroviariaComboio", mensagem);
                        return [2 /*return*/];
                    }
                }
                return [2 /*return*/];
            });
        }); });
    };
    DescargaFerroviariaComboioItemComponent.prototype.replicaValorClienteParaEmitente = function () {
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].isPositive(this.service.dataItens.destinatarioIdCliente)) {
            this.service.dataItens.destinatarioIdEmitente = this.service.dataItens.destinatarioIdCliente;
            this.trataEmitente(this.service.dataItens.destinatarioIdEmitente);
        }
    };
    DescargaFerroviariaComboioItemComponent.prototype.trataEmitente = function (destinatarioIdEmitente) {
        var _this = this;
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].isPositive(destinatarioIdEmitente)) {
            this.destinatarioService.getById(destinatarioIdEmitente).subscribe(function (resp) {
                _this.service.dataItens.emitente = resp;
            });
        }
    };
    DescargaFerroviariaComboioItemComponent.prototype.ajustarUnidade = function () {
        var _this = this;
        Object(rxjs__WEBPACK_IMPORTED_MODULE_14__["forkJoin"])([
            this.materialService.getById(this.service.dataDadosVagoes.materialId),
            this.tanqueService.getById(btoa(this.service.dataDadosVagoes.deposito))
        ]).subscribe(function (resp) {
            var material = resp[0] && resp[0].sitReg !== 'E' ? resp[0] : null;
            var tanque = resp[1] && resp[1].sitReg !== 'E' ? resp[1] : null;
            _this.obrEtiquetaMaterial = material ? material.obrEtiqueta : "";
            _this.movQuantidTanque = tanque ? tanque.movQuantid : "";
        });
    };
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "labelQuantidDoc", {
        get: function () {
            if (_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["StringUtilsStaticService"].isNotEmpty(this.service.dataItens.lote.unidadeId))
                return "Quantid. Docto (" + this.service.dataItens.lote.unidadeId + ")";
            return "Quantid. Docto";
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "labelQuantid", {
        get: function () {
            return this.movQuantidTanque === 'S' ? 'qtDeposito' : 'quantidade';
        },
        enumerable: true,
        configurable: true
    });
    DescargaFerroviariaComboioItemComponent.prototype.trataModeloNota = function (data) {
        this.service.dataItens.modeloNotaId = data.modeloNotaId;
        if (this.service.dataItens.modeloNotaId !== "55") {
            this.service.dataItens.nfeAuto = "N";
            this.service.dataItens.chaveNFE = "";
        }
    };
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "isDisabledNfeImportada", {
        get: function () {
            if (!this.service.dataItens)
                return true;
            if (app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["BooleanUtilsStaticService"].toBoolean(this.service.dataItens.nfeAuto) && this.service.dataItens.modeloNotaId === "55")
                return true;
            return false;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "desabilitaDocto", {
        get: function () {
            if (!this.service.dataItens)
                return true;
            if (this.service.dataItens.nfeAuto === 'S')
                return true;
            if (this.editChaveNfeEModeloNotaId55)
                return false;
            if (this.service.flagSolDadosEnt)
                return true;
            if (this.service.dataItens.tipoDocumentoTranspId > 0 && this.service.flagSolDadosEnt)
                return true;
            return false;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "desabilitaDoctoDtDoctoSerie", {
        get: function () {
            return (this.service.flagSolDadosEnt);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "desabilitaSeNfeAuto", {
        get: function () {
            return (this.service.dataItens.nfeAuto === 'S');
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "desabilitaTipoDocTransporte", {
        get: function () {
            if (this.service.dataItens.loteId !== "")
                return true;
            if (this.service.dataItens.lote.tipoDocumentoTranspIdEntrada === 0)
                return true;
            return false;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "desabilitaNotaOrigem", {
        get: function () {
            return (this.service.dataItens.lote.flagRemessa === "S");
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "desabilitaBtnGravarCancelar", {
        get: function () {
            if (!this.service.dataItens)
                return true;
            if (!this.tmpGerados)
                return true;
            return false;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "quantidIsRequired", {
        get: function () {
            return (this.obrEtiquetaMaterial === 'S' || this.movQuantidTanque === 'S' || this.service.dataItens.lote.unidadeId === 'UN');
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "habilitaQuantidade", {
        get: function () {
            return (this.quantidIsRequired);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "habilitaDocTranspNumeroEDocTranspEmissao", {
        get: function () {
            if (this.service.dataItens.tipoDocumentoTranspId > 0 && this.service.flagSolDadosEnt)
                return true;
            return false;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "habilitaChaveNFE", {
        get: function () {
            if (this.service.dataItens.modeloNotaId === "55")
                return true;
            if (this.service.dataItens.lote.modeloNotaId === "55")
                return true;
            return false;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "obrigaImportacaoDeDanfe", {
        get: function () {
            if (this.importaDANFE)
                return true;
            if (this.service.dataItens.lote.importaDanfe === 'S')
                return true;
            if (this.service.dataItens.modeloNotaId === "55")
                return true;
            return false;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "isNotaComplementar", {
        get: function () {
            if (!this.service.dataENotaComplementar)
                return false;
            return (this.service.dataENotaComplementar.retornoId === 1);
        },
        enumerable: true,
        configurable: true
    });
    DescargaFerroviariaComboioItemComponent.prototype.validaDtEmissao = function () {
        var dtEmissaoMinina = app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["DateTimeUtilsStaticService"].addDays(new Date(), this.difMaxNFDtAtual * (-1));
        if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["DateTimeUtilsStaticService"].maiorAHoje(this.service.dataItens.dtDocto)) {
            this.message.warning("titles.descargaFerroviariaComboio", "messages.dataEmissaoNaoPodeSerMaiorQueDataAtual");
            return false;
        }
        else if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["DateTimeUtilsStaticService"].menorA(this.service.dataItens.dtDocto, dtEmissaoMinina, ['H', 'M'])) {
            this.message.warning("titles.descargaFerroviariaComboio", "messages.dtEmissaoDeveSerMenorQue", { qtdeDias: this.difMaxNFDtAtual });
            return false;
        }
        return true;
    };
    DescargaFerroviariaComboioItemComponent.prototype.validaChaveNfe = function () {
        if (this.funcoesService.isNotUndefinedOrNull(this.service.dataItens)) {
            this.service.dataItens.docto = +this.funcoesService.getNumeroNota(this.service.dataItens.chaveNFE);
            this.service.dataItens.serieNotaId = this.funcoesService.getSerieNota(this.service.dataItens.chaveNFE);
            var result = this.funcoesService.validaChaveNFe(this.service.dataItens.chaveNFE, this.service.dataItens.emitente, this.service.dataItens.docto, this.service.dataItens.serieNotaId);
            if (!result) {
                this.message.warning("titles.validacao", "messages.chaveNfeInvalida");
            }
            this.habilitaDoctoSeEditouChaveNfeEmodelonotaId55();
        }
    };
    DescargaFerroviariaComboioItemComponent.prototype.habilitaDoctoSeEditouChaveNfeEmodelonotaId55 = function () {
        if (this.service.dataItens.modeloNotaId === '55') {
            this.editChaveNfeEModeloNotaId55 = true;
        }
        else {
            this.editChaveNfeEModeloNotaId55 = false;
        }
    };
    DescargaFerroviariaComboioItemComponent.prototype.importarDanfe = function (chave) {
        var _this = this;
        if (this.funcoesService.isUndefinedOrNull(chave) || chave === '') {
            this.message.info('labels.chaveNFE', 'messages.chaveNfeDeveSerInformada');
            return;
        }
        this.funcoesService.nfeHelper.importaDanfe({ chave: chave })
            .subscribe(function (result) {
            _this.mensagens = _this.message.validationResult(result.validationResult);
            if (!result.validationResult.isValid) {
                app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_17__["EventEmitterService"].get("backError").emit(_this.mensagens);
                _this.funcoesService.backToTop();
                return;
            }
            _this.service.dataItens.nfeAuto = 'S';
            _this.service.dataItens.serieNotaId = result.serie;
            _this.service.dataItens.pesoDoc = result.peso;
            _this.service.dataItens.docto = result.numero;
            _this.service.dataItens.dtDocto = result.dtEmissao;
            _this.service.dataItens.quantidDoc = result.qtde;
            _this.service.dataItens.naturezaId = result.cfop;
            _this.service.dataItens.vlNota = result.vlNota;
        });
    };
    DescargaFerroviariaComboioItemComponent.prototype.calcQuantidDoc = function () {
        if (this.service.dataItens.complementar === "N") {
            if (!!this.service.dataItens.lote) {
                if (this.service.dataItens.lote.unidadeId === "KG") {
                    this.service.dataItens.quantidDoc = this.service.dataItens.pesoDoc;
                }
                else if (this.service.dataItens.lote.unidadeId === "LT" && this.service.dataItens.lote.densidade > 0) {
                    this.service.dataItens.quantidDoc = this.service.dataItens.pesoDoc / this.service.dataItens.lote.densidade;
                }
                else if (this.service.dataItens.lote.unidadeId === "CC" && this.service.dataItens.lote.densidade > 0) {
                    this.service.dataItens.quantidDoc = this.service.dataItens.pesoDoc * this.service.dataItens.lote.densidade;
                }
                else if (this.service.dataItens.pesoRateio === 0) {
                    this.service.dataItens.pesoRateio = this.service.dataItens.pesoDoc;
                }
                this.service.dataItens.quantidDoc = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].round(this.service.dataItens.quantidDoc, 0);
                this.calcVlNota();
            }
        }
        this.validaIntegracaoNFCompra();
    };
    DescargaFerroviariaComboioItemComponent.prototype.calcVlNota = function () {
        if (this.service.calculaTotalNF) {
            if (this.service.dataItens.lote.precoArmazenado > 0 && this.service.dataItens.quantidDoc > 0) {
                this.service.dataItens.vlNota = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].round(this.service.dataItens.quantidDoc * this.service.dataItens.lote.precoArmazenado, 2);
            }
            this.service.validarVlNota();
        }
    };
    DescargaFerroviariaComboioItemComponent.prototype.validaIntegracaoNFCompra = function () {
        var _this = this;
        if (this.actionForm === app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].edit) {
            var diferenca = ((this.service.dataItens.pesoRateio - this.service.dataItens.pesoDoc) * -1);
            var diferencaPercentual = ((diferenca * 100) / this.service.dataItens.pesoDoc);
            if (diferencaPercentual > 0 && diferencaPercentual > this.ptNfCompraDif) {
                var object = {
                    destinatarioIdEmitente: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].toNumber(this.service.dataItensAnterior.destinatarioIdEmitente),
                    docto: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].toNumber(this.service.dataItensAnterior.docto),
                    opDescargaTremId: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].toNumber(this.service.dataDadosVagoes.regMovimento)
                };
                this.service.getPesoRateioTotal(object).subscribe(function (resp) {
                    if (!!resp.pesoRateioTotal) {
                        var diferenca_1 = ((resp.pesoRateioTotal + _this.service.dataItens.pesoRateio) - _this.service.dataItens.pesoDoc) * (-1);
                        var diferencaPercentual_1 = ((diferenca_1 * 100) / _this.service.dataItens.pesoDoc);
                        if (diferencaPercentual_1 > 0 && diferencaPercentual_1 > _this.ptNfCompraDif) {
                            _this.service.dataItens.flagIntegra = "N";
                        }
                        else {
                            _this.service.dataItens.flagIntegra = "S";
                        }
                    }
                });
            }
        }
    };
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "desabilitaCampos", {
        get: function () {
            return (this.actionForm === app_config_enumerables__WEBPACK_IMPORTED_MODULE_8__["ActionForm"].detail);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DescargaFerroviariaComboioItemComponent.prototype, "saldoLoteOptions", {
        get: function () {
            return {
                destinatarioIdCliente: this.service.dataItens.destinatarioIdCliente,
                destinatarioIdEmitente: this.service.dataItens.destinatarioIdEmitente,
                loteId: this.service.dataItens.loteId,
                sitLote: 'A',
                modo: 7,
                tipoSaldo: 7,
                dataMovimento: this.dataAtual,
                tipoAgrupa: 'L',
                geraArquivo: 'N'
            };
        },
        enumerable: true,
        configurable: true
    });
    DescargaFerroviariaComboioItemComponent.ctorParameters = function () { return [
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_6__["DescargaFerroviariaComboioService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_20__["PermissoesUtilsService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"] },
        { type: app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_1__["LoteService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_15__["MaterialService"] },
        { type: app_pages_cadastro_tanque_tanque_service__WEBPACK_IMPORTED_MODULE_16__["TanqueService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_10__["ConfiguracaoFacade"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_13__["DestinatarioService"] },
        { type: app_pages_cadastro_tipo_documento_transp_tipo_documento_transp_service__WEBPACK_IMPORTED_MODULE_7__["TipoDocumentoTranspService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"])(),
        __metadata("design:type", Array)
    ], DescargaFerroviariaComboioItemComponent.prototype, "dadosItemTmp", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Output"])(),
        __metadata("design:type", Object)
    ], DescargaFerroviariaComboioItemComponent.prototype, "dataResult", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Output"])(),
        __metadata("design:type", Object)
    ], DescargaFerroviariaComboioItemComponent.prototype, "btnFotoOCR", void 0);
    DescargaFerroviariaComboioItemComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"])({
            selector: "app-descarga-ferroviaria-comboio-item",
            template: __importDefault(__webpack_require__(/*! raw-loader!./descarga-ferroviaria-comboio-item.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-item/descarga-ferroviaria-comboio-item.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_6__["DescargaFerroviariaComboioService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_20__["PermissoesUtilsService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_3__["LoginService"],
            app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_1__["LoteService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_15__["MaterialService"],
            app_pages_cadastro_tanque_tanque_service__WEBPACK_IMPORTED_MODULE_16__["TanqueService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_10__["ConfiguracaoFacade"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_13__["DestinatarioService"],
            app_pages_cadastro_tipo_documento_transp_tipo_documento_transp_service__WEBPACK_IMPORTED_MODULE_7__["TipoDocumentoTranspService"]])
    ], DescargaFerroviariaComboioItemComponent);
    return DescargaFerroviariaComboioItemComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_22__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-print-modal/descarga-ferroviaria-comboio-print-modal.component.ts":
/*!***********************************************************************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-print-modal/descarga-ferroviaria-comboio-print-modal.component.ts ***!
  \***********************************************************************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioPrintModalComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioPrintModalComponent", function() { return DescargaFerroviariaComboioPrintModalComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__ = __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_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 _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../descarga-ferroviaria-comboio.service */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.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 DescargaFerroviariaComboioPrintModalComponent = /** @class */ (function () {
    function DescargaFerroviariaComboioPrintModalComponent(router, funcoes, service) {
        this.router = router;
        this.funcoes = funcoes;
        this.service = service;
        this.outConfirma = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    DescargaFerroviariaComboioPrintModalComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(_this.router, event);
        });
        this.tipoSelecionado = "";
        this.initListaTiposImpressao();
    };
    DescargaFerroviariaComboioPrintModalComponent.prototype.initListaTiposImpressao = function () {
        this.tiposImpressao = [
            { value: "listagem", label: "labels.impressaoDeListagem" },
            { value: "requisicao", label: "labels.impressaoDeRequisicao" },
            { value: "ticket", label: "labels.impressaoDeTicket" }
        ];
    };
    DescargaFerroviariaComboioPrintModalComponent.prototype.onSubmit = function (form) {
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        this.outConfirma.emit(this.tipoSelecionado);
        this.tipoSelecionado = "";
        jQuery("#modalPrint").modal("hide");
    };
    DescargaFerroviariaComboioPrintModalComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_4__["DescargaFerroviariaComboioService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], DescargaFerroviariaComboioPrintModalComponent.prototype, "outConfirma", void 0);
    DescargaFerroviariaComboioPrintModalComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-descarga-ferroviaria-comboio-print-modal",
            template: __importDefault(__webpack_require__(/*! raw-loader!./descarga-ferroviaria-comboio-print-modal.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-print-modal/descarga-ferroviaria-comboio-print-modal.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_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _descarga_ferroviaria_comboio_service__WEBPACK_IMPORTED_MODULE_4__["DescargaFerroviariaComboioService"]])
    ], DescargaFerroviariaComboioPrintModalComponent);
    return DescargaFerroviariaComboioPrintModalComponent;
}());



/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.constants.ts":
/*!******************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.constants.ts ***!
  \******************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioConstants", function() { return DescargaFerroviariaComboioConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var DescargaFerroviariaComboioConstants = /** @class */ (function () {
    function DescargaFerroviariaComboioConstants() {
        this.sisFormularioId = 250106;
        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.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.permissoes" },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 8, acao: "labels.liberacaoEmLote" },
            { sisFormularioId: this.sisFormularioId, libRotina: 9, acao: "labels.liberaComboio" },
            { sisFormularioId: this.sisFormularioId, libRotina: 10, acao: "labels.liberarVagao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 11, acao: "labels.reprovarVagao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 12, acao: "labels.enviaEmail" },
            { sisFormularioId: this.sisFormularioId, libRotina: 13, acao: "labels.historicoEmail" },
            { sisFormularioId: this.sisFormularioId, libRotina: 14, acao: "labels.cancelarLiberacaoComboio" },
            { sisFormularioId: this.sisFormularioId, libRotina: 15, acao: "labels.informarEncoste" },
            { sisFormularioId: this.sisFormularioId, libRotina: 16, acao: "labels.visualizarFotoOCR" }
        ];
        this.sisSistemaId = "BAL";
        this.nomeForm = "titles.descargaFerroviariaComboio";
        this.reportId = "BAL0012";
        this.reportTitulo = { "titulo": "Descarga Ferroviária (Comboio)", "subTitulo": "" };
        this.listaIndex = [
            { title: 'Visualizar', action: 'detail', icon: 'icon-eye', exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: '_print', icon: "icon-printer", exibeButton: true, eximeMenu: true, menuName: 'Movimento', disabled: false },
            { 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' },
            { title: 'liberacaoEmLote', action: 'liberacaoEmLote', icon: "fa fa-database", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'liberarComboio', action: 'liberarComboio', icon: "fa fa-thumbs-o-up", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'enviaEmail', action: 'enviaEmail', icon: "fa fa-envelope-o", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'historicoEmail', action: 'historicoEmail', icon: "fa fa-history", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'cancelarLiberacaoComboio', action: 'cancelarLiberacaoComboio', icon: "fa fa-ban", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'informarEncoste', action: 'informarEncoste', icon: "fa fa-calendar", exibeButton: true, eximeMenu: true, menuName: 'Movimento' }
        ];
        this.listaForm = [
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: '_print', icon: "icon-printer", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'liberarVagao', action: 'liberarVagao', icon: "fa fa-thumbs-o-up", exibeButton: true, eximeMenu: true, menuName: 'Movimento', disabled: true },
            { title: 'reprovarVagao', action: 'reprovarVagao', icon: "fa fa-thumbs-o-down", exibeButton: true, eximeMenu: true, menuName: 'Movimento', disabled: true },
            { title: 'visualizarFotoOCR', action: 'visualizarFotoOCR', icon: "fa fa-camera", exibeButton: true, eximeMenu: true, menuName: 'Movimento', disabled: true }
        ];
        this.listaParam = [
            { 'sistema': 'CTV', 'parametros': ['ControlaEmail', 'SolicitaPlanejEv', 'ImportaDANFE', 'OcrFerTipo'] },
            { 'sistema': 'BAL', 'parametros': ['InfPesoFob', 'PerEditFerroviario', 'PesAntAn', 'PtNfCompraDif', 'SolCTEDescFer', 'CalculaTotalNF', 'DifMaxNFDtAtual', 'SolConclLaudoSegPesF'] },
            { 'sistema': 'CTR', 'parametros': ['DtSeguro'] },
            { 'sistema': 'WEB', 'parametros': ['CWebModRequisicaoF', 'CWebModTicketF'] },
            { 'sistema': 'UNI', 'parametros': ['ObrChaveNFeEnt'] }
        ];
    }
    return DescargaFerroviariaComboioConstants;
}());



/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.model.ts":
/*!**************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.model.ts ***!
  \**************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioFilter, DescargaFerroviariaComboioDto, DescargaFerroviariaComboioDadosVagaoDto, DescargaFerroviariaComboioDadosVagaoTmpDto, DescargaFerroviariaComboioNota, DescargaFerrComboioValidaENotaComplementarDto, DescargaFerroviariaComboioComboioVagaoEmailDto, DescargaFerroviariaComboioInformarEncoste */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioFilter", function() { return DescargaFerroviariaComboioFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioDto", function() { return DescargaFerroviariaComboioDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioDadosVagaoDto", function() { return DescargaFerroviariaComboioDadosVagaoDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioDadosVagaoTmpDto", function() { return DescargaFerroviariaComboioDadosVagaoTmpDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioNota", function() { return DescargaFerroviariaComboioNota; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerrComboioValidaENotaComplementarDto", function() { return DescargaFerrComboioValidaENotaComplementarDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioComboioVagaoEmailDto", function() { return DescargaFerroviariaComboioComboioVagaoEmailDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioInformarEncoste", function() { return DescargaFerroviariaComboioInformarEncoste; });
/* harmony import */ var app_pages_cadastro_lote_lote_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/pages/cadastro/lote/lote.model */ "./src/app/pages/cadastro/lote/lote.model.ts");
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__ = __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_2__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};



var DescargaFerroviariaComboioFilter = /** @class */ (function () {
    function DescargaFerroviariaComboioFilter() {
        this.dataI = app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["DateTimeUtilsStaticService"].addDays(new Date(), -1);
        this.dataF = app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["DateTimeUtilsStaticService"].getFinalDay();
    }
    return DescargaFerroviariaComboioFilter;
}());

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

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

var DescargaFerroviariaComboioDadosVagaoTmpDto = /** @class */ (function (_super) {
    __extends(DescargaFerroviariaComboioDadosVagaoTmpDto, _super);
    function DescargaFerroviariaComboioDadosVagaoTmpDto() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return DescargaFerroviariaComboioDadosVagaoTmpDto;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

var DescargaFerroviariaComboioNota = /** @class */ (function (_super) {
    __extends(DescargaFerroviariaComboioNota, _super);
    function DescargaFerroviariaComboioNota() {
        var _this = _super.call(this) || this;
        _this.lote = new app_pages_cadastro_lote_lote_model__WEBPACK_IMPORTED_MODULE_0__["Lote"]();
        return _this;
    }
    return DescargaFerroviariaComboioNota;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

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

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

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



/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.module.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.module.ts ***!
  \***************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioModule", function() { return DescargaFerroviariaComboioModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./descarga-ferroviaria-comboio.routing.module */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.routing.module.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_index_descarga_ferroviaria_comboio_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./descarga-ferroviaria-comboio-index/descarga-ferroviaria-comboio-index.component */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-index/descarga-ferroviaria-comboio-index.component.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_filter_descarga_ferroviaria_comboio_filter_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./descarga-ferroviaria-comboio-filter/descarga-ferroviaria-comboio-filter.component */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-filter/descarga-ferroviaria-comboio-filter.component.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_print_modal_descarga_ferroviaria_comboio_print_modal_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./descarga-ferroviaria-comboio-print-modal/descarga-ferroviaria-comboio-print-modal.component */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-print-modal/descarga-ferroviaria-comboio-print-modal.component.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_historico_email_descarga_ferroviaria_comboio_historico_email_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./descarga-ferroviaria-comboio-historico-email/descarga-ferroviaria-comboio-historico-email.component */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-historico-email/descarga-ferroviaria-comboio-historico-email.component.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_form_descarga_ferroviaria_comboio_form_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./descarga-ferroviaria-comboio-form/descarga-ferroviaria-comboio-form.component */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-form/descarga-ferroviaria-comboio-form.component.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_item_descarga_ferroviaria_comboio_item_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./descarga-ferroviaria-comboio-item/descarga-ferroviaria-comboio-item.component */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-item/descarga-ferroviaria-comboio-item.component.ts");
/* harmony import */ var _descarga_ferroviaria_comboio_informar_encoste_descarga_ferroviaria_comboio_informar_encoste_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./descarga-ferroviaria-comboio-informar-encoste/descarga-ferroviaria-comboio-informar-encoste.component */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio-informar-encoste/descarga-ferroviaria-comboio-informar-encoste.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 DescargaFerroviariaComboioModule = /** @class */ (function () {
    function DescargaFerroviariaComboioModule() {
    }
    DescargaFerroviariaComboioModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _descarga_ferroviaria_comboio_routing_module__WEBPACK_IMPORTED_MODULE_2__["DescargaFerroviariaComboioRoutingModule"]],
            declarations: [_descarga_ferroviaria_comboio_index_descarga_ferroviaria_comboio_index_component__WEBPACK_IMPORTED_MODULE_3__["DescargaFerroviariaComboioIndexComponent"],
                _descarga_ferroviaria_comboio_filter_descarga_ferroviaria_comboio_filter_component__WEBPACK_IMPORTED_MODULE_4__["DescargaFerroviariaComboioFilterComponent"],
                _descarga_ferroviaria_comboio_form_descarga_ferroviaria_comboio_form_component__WEBPACK_IMPORTED_MODULE_7__["DescargaFerroviariaComboioFormComponent"],
                _descarga_ferroviaria_comboio_item_descarga_ferroviaria_comboio_item_component__WEBPACK_IMPORTED_MODULE_8__["DescargaFerroviariaComboioItemComponent"],
                _descarga_ferroviaria_comboio_informar_encoste_descarga_ferroviaria_comboio_informar_encoste_component__WEBPACK_IMPORTED_MODULE_9__["DescargaFerroviariaComboioInformarEncosteComponent"],
                _descarga_ferroviaria_comboio_print_modal_descarga_ferroviaria_comboio_print_modal_component__WEBPACK_IMPORTED_MODULE_5__["DescargaFerroviariaComboioPrintModalComponent"],
                _descarga_ferroviaria_comboio_historico_email_descarga_ferroviaria_comboio_historico_email_component__WEBPACK_IMPORTED_MODULE_6__["DescargaFerroviariaComboioHistoricoEmailComponent"]]
        })
    ], DescargaFerroviariaComboioModule);
    return DescargaFerroviariaComboioModule;
}());



/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.routing.module.ts":
/*!***********************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.routing.module.ts ***!
  \***********************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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





var MRoutes = [
    {
        path: "",
        component: _descarga_ferroviaria_comboio_index_descarga_ferroviaria_comboio_index_component__WEBPACK_IMPORTED_MODULE_4__["DescargaFerroviariaComboioIndexComponent"],
        data: { breadcrumb: "descargaFerroviariaComboio" }
    },
    {
        path: "detail/:id",
        component: _descarga_ferroviaria_comboio_form_descarga_ferroviaria_comboio_form_component__WEBPACK_IMPORTED_MODULE_3__["DescargaFerroviariaComboioFormComponent"],
        data: {
            breadcrumb: "descargaFerroviariaComboio",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    }
];
var DescargaFerroviariaComboioRoutingModule = /** @class */ (function () {
    function DescargaFerroviariaComboioRoutingModule() {
    }
    DescargaFerroviariaComboioRoutingModule = __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"]]
        })
    ], DescargaFerroviariaComboioRoutingModule);
    return DescargaFerroviariaComboioRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.service.ts":
/*!****************************************************************************************************!*\
  !*** ./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.service.ts ***!
  \****************************************************************************************************/
/*! exports provided: DescargaFerroviariaComboioService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescargaFerroviariaComboioService", function() { return DescargaFerroviariaComboioService; });
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./descarga-ferroviaria-comboio.model */ "./src/app/pages/balanca/descarga-ferroviaria-comboio/descarga-ferroviaria-comboio.model.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/cadastro/lote/lote.service */ "./src/app/pages/cadastro/lote/lote.service.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
/* harmony import */ var app_pages_cadastro_lote_lote_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/pages/cadastro/lote/lote.model */ "./src/app/pages/cadastro/lote/lote.model.ts");
/* harmony import */ var app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var app_pages_cadastro_tipo_documento_transp_tipo_documento_transp_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/pages/cadastro/tipo-documento-transp/tipo-documento-transp.service */ "./src/app/pages/cadastro/tipo-documento-transp/tipo-documento-transp.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};














var DescargaFerroviariaComboioService = /** @class */ (function (_super) {
    __extends(DescargaFerroviariaComboioService, _super);
    function DescargaFerroviariaComboioService(http, messageService, loteService, funcoesService, tipoDocumentoTranspService) {
        var _this = _super.call(this, http, "balanca/DescargaFerroviariaComboio") || this;
        _this.http = http;
        _this.messageService = messageService;
        _this.loteService = loteService;
        _this.funcoesService = funcoesService;
        _this.tipoDocumentoTranspService = tipoDocumentoTranspService;
        _this.data = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_6__["DescargaFerroviariaComboioDto"]();
        _this.dataDadosVagoes = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_6__["DescargaFerroviariaComboioDadosVagaoDto"]();
        _this.dataDadosVagoesTmp = new _descarga_ferroviaria_comboio_model__WEBPACK_IMPORTED_MODULE_6__["DescargaFerroviariaComboioDadosVagaoTmpDto"]();
        _this.flagSolDadosEnt = false;
        _this.maskDocTransNumero = "";
        return _this;
    }
    DescargaFerroviariaComboioService.prototype.getByFiltro = function (filter) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/getByFiltro", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.getDadosVagoes = function (comboioId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/getDadosVagoes/" + comboioId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.getTmpItens = function (opDescargaTremId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/getTmpItens/" + opDescargaTremId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.gerarDadosTmp = function (filter) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/gerarDadosTmp", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.verifSeExisteRestricaoPlaca = function (cadastroPlacaId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/verifSeExisteRestricaoPlaca/" + cadastroPlacaId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.carregaDadosLote = function (loteId) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_9__["StringUtilsStaticService"].isNotEmpty(loteId)) {
                    this.loteService.getByLoteId(loteId).subscribe(function (resp) {
                        if (!!resp) {
                            _this.dataItens.lote = resp;
                            //Ajusta Tipo de Transporte
                            _this.dataItens.tipoDocumentoTranspId = (_this.dataItens.loteId !== "" && _this.dataItens.lote.tipoDocumentoTranspIdEntrada > 0) ? _this.dataItens.lote.tipoDocumentoTranspIdEntrada : _this.dataItens.tipoDocumentoTranspId;
                            _this.dataItens.modeloNotaId = _this.dataItens.lote.modeloNotaId;
                            _this.trataTipoDocumentoTransp();
                            _this.calcPesoDoc();
                            if (_this.dataItens.modeloNotaId !== "55") {
                                _this.dataItens.nfeAuto = "N";
                            }
                        }
                        else {
                            _this.dataItens.lote = new app_pages_cadastro_lote_lote_model__WEBPACK_IMPORTED_MODULE_10__["Lote"]();
                        }
                    });
                }
                return [2 /*return*/];
            });
        });
    };
    DescargaFerroviariaComboioService.prototype.trataTipoDocumentoTransp = function () {
        var _this = this;
        this.tipoDocumentoTranspService.getById(this.dataItens.tipoDocumentoTranspId).subscribe(function (resp) {
            if (!!resp) {
                _this.flagSolDadosEnt = _this.funcoesService.isBoolean(resp.flagSolDadosEnt);
                _this.maskDocTransNumero = resp.mascara === null ? "" : resp.mascara;
            }
        });
    };
    DescargaFerroviariaComboioService.prototype.calcPesoDoc = function () {
        if (!!this.dataItens.lote) {
            if (this.dataItens.lote.unidadeId === "KG") {
                this.dataItens.pesoDoc = this.dataItens.quantidDoc;
            }
            else if (this.dataItens.lote.unidadeId === "LT" && this.dataItens.lote.densidade > 0) {
                this.dataItens.pesoDoc = this.dataItens.quantidDoc * this.dataItens.lote.densidade;
            }
            this.dataItens.pesoDoc = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].round(this.dataItens.pesoDoc, 0);
            this.calcVlNota();
        }
    };
    DescargaFerroviariaComboioService.prototype.calcVlNota = function () {
        if (this.calculaTotalNF) {
            if (this.dataItens.lote.precoArmazenado > 0 && this.dataItens.quantidDoc > 0) {
                this.dataItens.vlNota = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].round(this.dataItens.quantidDoc * this.dataItens.lote.precoArmazenado, 2);
            }
            this.validarVlNota();
        }
    };
    DescargaFerroviariaComboioService.prototype.validarVlNota = function () {
        var calcTotItem = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].round((this.dataItens.quantidDoc * (this.dataItens.lote == null ? 1 : this.dataItens.lote.precoArmazenado)), 2);
        if ((this.dataItens.vlNota - calcTotItem) > 1) {
            this.messageService.warning("titles.descargaFerroviariaComboio", "messages.totItemNPodeMaiorCalcTotItem");
            this.dataItens.vlNota = 0;
        }
    };
    DescargaFerroviariaComboioService.prototype.validarENotaComplementar = function (filter) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/validarENotaComplementar", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.liberarComboio = function (comboioId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/liberarComboio/" + comboioId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.cancelarLiberacaoComboio = function (comboioId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/cancelarLiberacaoComboio/" + comboioId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.cancelarTmp = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/cancelarTmp", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.liberarVagao = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/liberarVagao", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.reprovarVagao = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/reprovarVagao", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.getDadosHistoricoEmail = function (comboioId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/getDadosHistoricoEmail/" + comboioId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.validarItemPodeSerAlteradoOuExcuido = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/validarItemPodeSerAlteradoOuExcuido", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.excluirItem = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/excluirItem", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.gravarItens = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/gravarItens", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.validaDocto = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/validarDocto", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.enviaEmailSetorResponsavel = function (comboioId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/enviaEmailSetorResponsavel/" + comboioId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.getDadosInformarEncosteByFiltro = function (filter) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/getDadosInformarEncosteByFiltro", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.gravarDtEncoste = function (dadosEncoste, dtEncoste) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/gravarDtEncoste", {
            dadosEncoste: dadosEncoste,
            dtEncoste: dtEncoste
        })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.prototype.getPesoRateioTotal = function (filter) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/descargaFerroviariaComboio/getPesoRateioTotal", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    DescargaFerroviariaComboioService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_8__["LoteService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_0__["FuncoesService"] },
        { type: app_pages_cadastro_tipo_documento_transp_tipo_documento_transp_service__WEBPACK_IMPORTED_MODULE_13__["TipoDocumentoTranspService"] }
    ]; };
    DescargaFerroviariaComboioService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_8__["LoteService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_0__["FuncoesService"],
            app_pages_cadastro_tipo_documento_transp_tipo_documento_transp_service__WEBPACK_IMPORTED_MODULE_13__["TipoDocumentoTranspService"]])
    ], DescargaFerroviariaComboioService);
    return DescargaFerroviariaComboioService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_11__["BaseService"]));



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmailService", function() { return EmailService; });
/* harmony import */ var _base_base_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../environments/environment */ "./src/environments/environment.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 EmailService = /** @class */ (function (_super) {
    __extends(EmailService, _super);
    function EmailService(http) {
        var _this = _super.call(this, http, "controlle/enviarEmail") || this;
        _this.http = http;
        return _this;
    }
    EmailService.prototype.enviarEmail = function (data) {
        return this.http.post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/controlle/enviarEmail/", data);
    };
    EmailService.prototype.IsValidEmailAddress = function (email) {
        var exclude = email.search("/[^@.-w]|^[_@.-]|[._-]{2}|[@.]{2}|(@)[^@]*1/");
        var check = email.search("/@[w-]+./");
        var checkend = email.search("/.[a-zA-Z]{2,3}$/");
        if ((exclude !== -1)
            || (check === -1)
            || (checkend === -1)) {
            return false;
        }
        else {
            return true;
        }
    };
    EmailService.prototype.IsValidEmailAddressed = function (emails) {
        var regex = /^((?!\.)[\w-_.]*[^.])(@\w+)(\.\w+(\.\w+)?[^.\W])$/gm;
        var emailList = emails.split(";");
        var isAllValid = true;
        emailList.forEach(function (e) {
            if (!regex.test(e) && isAllValid) {
                isAllValid = false;
            }
        });
        return isAllValid;
    };
    EmailService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"] }
    ]; };
    EmailService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])
    ], EmailService);
    return EmailService;
}(_base_base_service__WEBPACK_IMPORTED_MODULE_0__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-balanca-descarga-ferroviaria-comboio-descarga-ferroviaria-comboio-module.js.map