(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-especificos-ageo-relatorios-pesagem-carga-descarga-pesagem-carga-descarga-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga-form/pesagem-carga-descarga-form.component.html":
/*!***************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga-form/pesagem-carga-descarga-form.component.html ***!
  \***************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [sisFormularioId]=\"constantes.sisFormularioId\" [botoesComando]=\"constantes.listaForm\">\n</app-menu-command-bar>\n\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <div class=\"\">\n                <app-form-legenda></app-form-legenda>\n                <div class=\"card-body widget-body\">\n                    <form class=\"form\" #pesagemCarga=\"ngForm\" (ngSubmit)=\"onSubmit(pesagemCarga)\">\n                        <app-validacoes></app-validacoes>\n                        <div class=\"row\">\n                            <div class=\"col-lg-8\">\n                                <div class=\"row\">\n                                    <div class=\"col-lg-6\">\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)]=\"filtro.dataIni\"\n                                                autofocus class=\"dataHora\"\n                                                [formatDateTime]=\"mascara.getFormatDataHorMinSeg\"\n                                                [disabled]=\"funcoesService.isDetail(actionForm)\" required>\n                                            </app-data>\n                                        </div>\n                                    </div>\n                                    <div class=\"col-lg-6\">\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)]=\"filtro.dataFim\" class=\"dataHora\"\n                                                [formatDateTime]=\"mascara.getFormatDataHorMinSeg\">\n                                            </app-data>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <app-pesquisa-destinatario id=\"destinatarioIdCliente\"\n                                                name=\"destinatarioIdCliente\" label=\"cliente\"\n                                                modalTitle=\"pesquisaDeCliente\"\n                                                [(ngModel)]=\"filtro.destinatarioIdCliente\" showCgcCpf=\"false\"\n                                                showInscricao=\"false\" [inSelected]=\"filtro?.cliente\">\n                                            </app-pesquisa-destinatario>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <app-pesquisa-destinatario id=\"destinatarioIdClienteVenda\"\n                                                name=\"destinatarioIdClienteVenda\" label=\"clienteVenda\"\n                                                modalTitle=\"pesquisaDeClienteVenda\"\n                                                [(ngModel)]=\"filtro.destinatarioIdClienteVenda\" showCgcCpf=\"false\"\n                                                showInscricao=\"false\">\n                                            </app-pesquisa-destinatario>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <app-pesquisa-material id=\"materialId\" name=\"materialId\" label=\"produto\"\n                                                modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"filtro.materialId\"\n                                                [inSelected]=\"filtro?.produto\">\n                                            </app-pesquisa-material>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <app-pesquisa-destinatario id=\"destinatarioIdTransportadora\"\n                                                name=\"destinatarioIdTransportadora\" label=\"transportadora\"\n                                                modalTitle=\"transportadora\"\n                                                [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                [(ngModel)]=\"filtro.destinatarioIdTransportadora\" showCgcCpf=\"false\"\n                                                showInscricao=\"false\">\n                                            </app-pesquisa-destinatario>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <app-pesquisa-destinatario id=\"destinatarioIdNavio\"\n                                                name=\"destinatarioIdNavio\" label=\"navio\" modalTitle=\"navio\"\n                                                [(ngModel)]=\"filtro.destinatarioIdNavio\" showCgcCpf=\"false\"\n                                                showInscricao=\"false\">\n                                            </app-pesquisa-destinatario>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-7 col-sm-12\">\n                                        <app-pesquisa-motorista id=\"motoristaId\" label=\"motorista\" name=\"motoristaId\"\n                                            [(ngModel)]=\"filtro.motoristaId\" [inputMotorista]=\"filtro.motorista\">\n                                        </app-pesquisa-motorista>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-6\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"tipo\">{{ \"labels.operacao\" | translate}}</label>\n                                            <select id=\"tipo\" [(ngModel)]=\"filtro.operacao\"\n                                                class=\"form-control form-control-sm\" name=\"tipo\"\n                                                data-title=\"{{ 'labels.operacao' | translate }}\"\n                                                [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                                <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\n                                                <option *ngFor=\"let t of operacao.get\" value=\"{{ t.id }}\">\n                                                    {{ t.descricao }}\n                                                </option>\n                                            </select>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-6\">\n                                        <app-pesquisa-lote id=\"lote\" label=\"lote\" name=\"lote\" modalTitle=\"lote\"\n                                            [(ngModel)]=\"filtro.lote\"\n                                            [destinatarioIdCliente]=\"filtro.destinatarioIdCliente\"\n                                            [materialId]=\"filtro.materialId\" [loteId]=\"filtro.lote\"\n                                            [destinatarioIdEmitente]=\"0\"\n                                            [destinatarioIdNavio]=\"filtro.destinatarioIdNavio\" [osgId]=\"0\"\n                                            [consideraLotesEncerrados]=\"true\" [stoContratoId]=\"0\"\n                                            [stoContratoItemId]=\"0\" (outLote)=\"onSelectedLote($event)\">\n                                        </app-pesquisa-lote>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-6\">\n                                        <div class=\"form-group\">\n                                            <label for=\"localizacao\">{{\"labels.localizacao\" | translate}}</label>\n                                            <app-combo-localizacao id=\"localizacao\" name=\"localizacao\"\n                                                [(ngModel)]=\"filtro.localizacaoId\">\n                                            </app-combo-localizacao>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-6\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"ordem\">{{'labels.ordem' | translate}}</label>\n                                            <app-ordem id=\"ordem\" name=\"ordem\" [list]=\"constantes.orderBy\"\n                                                (outOrdem)=\"filtro.ordem = $event\"></app-ordem>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-6\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"quebra\">{{'labels.quebra' | translate}}</label>\n                                            <select id=\"quebra\" name=\"quebra\" [(ngModel)]=\"filtro.quebra\"\n                                                [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                class=\"form-control form-control-sm\">\n                                                <option value=\"porData\">{{ 'labels.porData' | translate}}</option>\n                                                <option value=\"porPlataforma\">{{ 'labels.porPlataforma' | translate}}\n                                                </option>\n                                            </select>\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"col-lg-4\">\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"card\">\n                                            <div class=\"card-header\">\n                                                {{'labels.tipoDeTransporte' | translate }}\n                                            </div>\n                                            <div class=\"card-body p-6\">\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-12\">\n                                                        <app-combo-multi-padrao id=\"tipoTransporteId\"\n                                                            name=\"tipoTransporteId\" tabela=\"TiposDeTransporte\"\n                                                            chave=\"TipoTransp\" descricao=\"DescrMov\" ativos=\"true\"\n                                                            (outObjeto)=\"trataTipoTransporte($event)\">\n                                                        </app-combo-multi-padrao>\n                                                    </div>\n                                                </div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-check mt-2\">\n                                            <input class=\"form-check-input\" type=\"checkbox\"\n                                                id=\"apresentarNomeCpfMotorista\" name=\"apresentarNomeCpfMotorista\"\n                                                (ngModelChange)=\"filtro.apresentarNomeCpfMotorista = $event ? 'S' : 'N'\"\n                                                [ngModel]=\"filtro.apresentarNomeCpfMotorista ==='S'\">\n                                            <label class=\"form-check-label\"\n                                                for=\"apresentarNomeCpfMotorista\">{{'labels.apresentarNomeCpfMotorista' |\n                                                translate}}\n                                            </label>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-check mt-2\">\n                                            <input class=\"form-check-input\" type=\"checkbox\"\n                                                id=\"apresentaTemposCarregamento\"\n                                                (ngModelChange)=\"filtro.apresentaTemposCarregamento = $event ? 'S' : 'N'\"\n                                                name=\"apresentaTemposCarregamento\"\n                                                [ngModel]=\"filtro.apresentaTemposCarregamento ==='S'\">\n                                            <label class=\"form-check-label\"\n                                                for=\"apresentaTemposCarregamento\">{{'labels.apresentaTemposCarregamento'\n                                                | translate}}\n                                            </label>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-check mt-2\">\n                                            <input class=\"form-check-input\" type=\"checkbox\" id=\"apresentaDeposito\"\n                                                name=\"apresentaDeposito\"\n                                                (ngModelChange)=\"filtro.apresentaDeposito = $event ? 'S' : 'N'\"\n                                                [ngModel]=\"filtro.apresentaDeposito ==='S'\">\n                                            <label class=\"form-check-label\"\n                                                for=\"apresentaDeposito\">{{'labels.apresentaDeposito' | translate}}\n                                            </label>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-check mt-2\">\n                                            <input class=\"form-check-input\" type=\"checkbox\"\n                                                id=\"apresentaVeiculosRefugados\" name=\"apresentaVeiculosRefugados\"\n                                                (ngModelChange)=\"filtro.apresentaVeiculosRefugados = $event ? 'S' : 'N'\"\n                                                [ngModel]=\"filtro.apresentaVeiculosRefugados ==='S'\">\n                                            <label class=\"form-check-label\"\n                                                for=\"apresentaVeiculosRefugados\">{{'labels.apresentaVeiculosRefugados' |\n                                                translate}}\n                                            </label>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-12\">\n                                        <div class=\"form-check mt-2\">\n                                            <input class=\"form-check-input\" type=\"checkbox\"\n                                                id=\"apresentaOpConcluida\" name=\"apresentaOpConcluida\"\n                                                (ngModelChange)=\"filtro.apresentaOpConcluida = $event ? 'S' : 'N'\"\n                                                [ngModel]=\"filtro.apresentaOpConcluida ==='S'\">\n                                            <label class=\"form-check-label\"\n                                                for=\"apresentaOpConcluida\">{{'labels.apresentaOpConcluida' |\n                                                translate}}\n                                            </label>\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                        <div class=\"clearfix\">&nbsp;</div>\n                        <div class=\"form-group\">\n                            <button class=\"btn btn-success mr-2\" type=\"submit\">\n                                {{ 'buttons.gerarRelatorio' | translate }}\n                            </button>\n                            <button class=\"btn btn-success mr-2\" (click)=\"export(pesagemCarga)\" type=\"button\">{{\n                                'buttons.exportarExcel' | translate }}\n                            </button>\n                            <button class=\"btn btn-success mr-2\" (click)=\"sendMail(pesagemCarga)\" type=\"button\">{{\n                                'buttons.enviarEmail' | translate }}\n                            </button>\n                        </div>\n                    </form>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n<app-email [reportId]=\"constantes.reportId\" [titulo]=\"constantes.reportTitulo.titulo\"\n    [subTitulo]=\"constantes.reportTitulo.subTitulo\" [data]=\"constantes.paramRelatorio\"></app-email>");

/***/ }),

/***/ "./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga-form/pesagem-carga-descarga-form.component.ts":
/*!***********************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga-form/pesagem-carga-descarga-form.component.ts ***!
  \***********************************************************************************************************************************************/
/*! exports provided: PesagemCargaDescargaFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemCargaDescargaFormComponent", function() { return PesagemCargaDescargaFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var _pesagem_carga_descarga_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../pesagem-carga-descarga.constants */ "./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga.constants.ts");
/* harmony import */ var _pesagem_carga_descarga_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pesagem-carga-descarga.model */ "./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga.model.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_config_enumerables__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __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_7__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/shared/services/funcoes/excel/excel.service */ "./src/app/shared/services/funcoes/excel/excel.service.ts");
/* harmony import */ var app_shared_components_report_report_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/components/report/report.service */ "./src/app/shared/components/report/report.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_14__ = __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 PesagemCargaDescargaFormComponent = /** @class */ (function (_super) {
    __extends(PesagemCargaDescargaFormComponent, _super);
    function PesagemCargaDescargaFormComponent(funcoes, permissoesUtils, destinatarioService, loginService, excelService, reportService, messageService, materialService) {
        var _this = _super.call(this, new _pesagem_carga_descarga_constants__WEBPACK_IMPORTED_MODULE_2__["PesagemCargaDescargaConstants"](), funcoes) || this;
        _this.funcoes = funcoes;
        _this.permissoesUtils = permissoesUtils;
        _this.destinatarioService = destinatarioService;
        _this.loginService = loginService;
        _this.excelService = excelService;
        _this.reportService = reportService;
        _this.messageService = messageService;
        _this.materialService = materialService;
        _this.filtro = new _pesagem_carga_descarga_model__WEBPACK_IMPORTED_MODULE_3__["PesagemCargaDescarga"]();
        _this.mensagens = [];
        _this.constantes = new _pesagem_carga_descarga_constants__WEBPACK_IMPORTED_MODULE_2__["PesagemCargaDescargaConstants"]();
        _this.dataAtual = new Date();
        _this.operacao = new _pesagem_carga_descarga_model__WEBPACK_IMPORTED_MODULE_3__["Operacao"]();
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_5__["Mascaras"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.export = function (form) {
            if (!_this.printParams(form))
                return;
            _this.reportService.exportEspecificos(_this.constantes.sisFormularioId, _this.constantes.paramRelatorio).subscribe(function (resp) {
                var headerDictionary = {
                    "observacoes": "notas"
                };
                var options = {
                    headerJsonKeys: true,
                    headerDictionary: headerDictionary
                };
                resp = resp.map(function (_a) {
                    var codDest = _a.codDest, descrCli = _a.descrCli, descrMater = _a.descrMater, autorizacao = _a.autorizacao, dtAutorizacao = _a.dtAutorizacao, descrTransp = _a.descrTransp, placa = _a.placa, dtEntrada = _a.dtEntrada, dtSaida = _a.dtSaida, difTotal = _a.difTotal, pesoBru = _a.pesoBru, pesoTara = _a.pesoTara, pesoliq = _a.pesoliq, deposito = _a.deposito, dtDescarga = _a.dtDescarga, clienteVenda = _a.clienteVenda, observacoes = _a.observacoes, localizacao = _a.localizacao, nomeMotorista = _a.nomeMotorista, cpfMotorista = _a.cpfMotorista, notaVenda = _a.notaVenda;
                    return { codDest: codDest, descrCli: descrCli, descrMater: descrMater, autorizacao: autorizacao, dtAutorizacao: dtAutorizacao, descrTransp: descrTransp, placa: placa, dtEntrada: dtEntrada, dtSaida: dtSaida, difTotal: difTotal, pesoBru: pesoBru, pesoTara: pesoTara, pesoliq: pesoliq, deposito: deposito, dtDescarga: dtDescarga, clienteVenda: clienteVenda, observacoes: observacoes, localizacao: localizacao, nomeMotorista: nomeMotorista, cpfMotorista: cpfMotorista, notaVenda: notaVenda };
                });
                _this.excelService.exportAsExcelFile(resp, _this.messageService.getTranslates("titles", "pesagemCargaDescarga"), options);
            });
        };
        _this.filialId = loginService.getLogin().filialId;
        return _this;
    }
    PesagemCargaDescargaFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () { }, function () { return _this.permissoesUtils.back(); }, true);
    };
    PesagemCargaDescargaFormComponent.prototype.onSubmit = function (form) {
        if (!this.printParams(form))
            return;
        this.print(null, true);
    };
    PesagemCargaDescargaFormComponent.prototype.trataTipoTransporte = function (selectedItems) {
        this.filtro.tipoTransporteId = selectedItems;
    };
    PesagemCargaDescargaFormComponent.prototype.onCancelar = function () {
        this.filtro = new _pesagem_carga_descarga_model__WEBPACK_IMPORTED_MODULE_3__["PesagemCargaDescarga"]();
    };
    PesagemCargaDescargaFormComponent.prototype.validaClienteSelecionado = function () {
        var valReturn = false;
        if (this.filtro.destinatarioIdCliente > 0) {
            valReturn = true;
        }
        return valReturn;
    };
    PesagemCargaDescargaFormComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    PesagemCargaDescargaFormComponent.prototype.printParams = function (form) {
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_14__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return false;
        }
        var ordem = this.filtro.ordem;
        if (this.filtro.quebra === "DescrPlataforma") {
            ordem += ', DescrPlataforma';
        }
        else {
            ordem += ', DtAutorizacao';
        }
        this.constantes.paramRelatorio = {
            filialId: this.loginService.getLogin().filialId,
            dataIni: this.filtro.dataIni,
            dataFim: this.filtro.dataFim,
            destinatarioIdCliente: this.filtro.destinatarioIdCliente === undefined ? 0 : this.filtro.destinatarioIdCliente,
            destinatarioIdTransportadora: this.filtro.destinatarioIdTransportadora === undefined ? 0 : this.filtro.destinatarioIdTransportadora,
            tipoTransporteId: this.filtro.tipoTransporteId === undefined ? "" : this.filtro.tipoTransporteId,
            materialId: this.filtro.materialId === undefined ? "" : this.filtro.materialId,
            ordem: ordem,
            quebra: this.filtro.quebra === 'porPlataforma' ? true : false,
            destinatarioIdClienteVenda: this.filtro.destinatarioIdClienteVenda === undefined ? 0 : this.filtro.destinatarioIdClienteVenda,
            destinatarioIdNavio: this.filtro.destinatarioIdNavio === undefined ? 0 : this.filtro.destinatarioIdNavio,
            localizacaoId: this.filtro.localizacaoId === undefined ? 0 : this.filtro.localizacaoId,
            apresentaVeiculosRefugados: this.filtro.apresentaVeiculosRefugados,
            apresentaOpConcluida: this.filtro.apresentaOpConcluida,
            apresentarNomeCpfMotorista: this.filtro.apresentarNomeCpfMotorista,
            apresentaDeposito: this.filtro.apresentaDeposito,
            apresentaTemposCarregamento: this.filtro.apresentaTemposCarregamento,
            loteId: this.filtro.lote === undefined ? "" : this.filtro.lote,
            operacao: this.filtro.operacao,
            motoristaId: this.filtro.motoristaId
        };
        return true;
    };
    PesagemCargaDescargaFormComponent.prototype.sendMail = function (form) {
        if (!this.printParams(form))
            return;
        _super.prototype.sendMail.call(this, this.constantes);
    };
    PesagemCargaDescargaFormComponent.prototype.onSelectedLote = function (event) {
        var _this = this;
        if (!event) {
            return;
        }
        else if (!event.lote) {
            return;
        }
        else {
            Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["forkJoin"])([this.destinatarioService.getById(event.lote.destinatarioIdCliente), this.materialService.getById(event.lote.materialId)]).subscribe(function (r) {
                _this.filtro.destinatarioIdCliente = event.lote.destinatarioIdCliente;
                _this.filtro.cliente = r[0];
                _this.filtro.materialId = event.lote.materialId;
                _this.filtro.produto = r[1];
            });
        }
    };
    PesagemCargaDescargaFormComponent.ctorParameters = function () { return [
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__["DestinatarioService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_9__["LoginService"] },
        { type: app_shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_10__["ExcelService"] },
        { type: app_shared_components_report_report_service__WEBPACK_IMPORTED_MODULE_11__["ReportService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__["MessageService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_13__["MaterialService"] }
    ]; };
    PesagemCargaDescargaFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-pesagem-carga-descarga-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./pesagem-carga-descarga-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga-form/pesagem-carga-descarga-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__["DestinatarioService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_9__["LoginService"],
            app_shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_10__["ExcelService"],
            app_shared_components_report_report_service__WEBPACK_IMPORTED_MODULE_11__["ReportService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__["MessageService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_13__["MaterialService"]])
    ], PesagemCargaDescargaFormComponent);
    return PesagemCargaDescargaFormComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga.constants.ts":
/*!**************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga.constants.ts ***!
  \**************************************************************************************************************/
/*! exports provided: PesagemCargaDescargaConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemCargaDescargaConstants", function() { return PesagemCargaDescargaConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var PesagemCargaDescargaConstants = /** @class */ (function () {
    function PesagemCargaDescargaConstants() {
        this.sisFormularioId = 375351;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "REL";
        this.nomeForm = "titles.pesagemCargaDescarga";
        this.reportId = "AGE0022";
        this.reportTitulo = { "titulo": "Relatório de Pesagem Carga e Descarga", "subTitulo": "" };
        this.listaForm = [
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' }
        ];
        this.orderBy = [
            { field: "DescrCli", description: "Cliente", direction: "asc", default: true, sequence: 1 },
            { field: "DescrMater", description: "Produto", direction: "asc", default: true, sequence: 2 }
        ];
    }
    return PesagemCargaDescargaConstants;
}());



/***/ }),

/***/ "./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga.model.ts":
/*!**********************************************************************************************************!*\
  !*** ./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga.model.ts ***!
  \**********************************************************************************************************/
/*! exports provided: PesagemCargaDescarga, Operacao */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemCargaDescarga", function() { return PesagemCargaDescarga; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Operacao", function() { return Operacao; });
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var PesagemCargaDescarga = /** @class */ (function () {
    function PesagemCargaDescarga() {
        this.filialId = 0;
        this.dataIni = moment__WEBPACK_IMPORTED_MODULE_0__().startOf('month').toDate();
        this.dataFim = new Date();
        this.destinatarioIdCliente = 0;
        this.destinatarioIdClienteVenda = 0;
        this.destinatarioIdNavio = 0;
        this.destinatarioIdTransportadora = 0;
        this.tipoTransporteId = "";
        this.materialId = "";
        this.ordem = "DescrCli,DescrMater";
        this.quebra = "porData";
        this.apresentaDeposito = "S";
        this.apresentarNomeCpfMotorista = "N";
        this.apresentaTemposCarregamento = "N";
        this.apresentaVeiculosRefugados = "N";
        this.apresentaOpConcluida = "N";
        this.motoristaId = 0;
        this.operacao = "T";
    }
    return PesagemCargaDescarga;
}());

var Operacao = /** @class */ (function () {
    function Operacao() {
        this.get = [
            { id: "C", descricao: "Carga" },
            { id: "D", descricao: "Descarga" },
            { id: "T", descricao: "Todos" },
        ];
    }
    return Operacao;
}());



/***/ }),

/***/ "./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga.module.ts":
/*!***********************************************************************************************************!*\
  !*** ./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga.module.ts ***!
  \***********************************************************************************************************/
/*! exports provided: PesagemCargaDescargaModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemCargaDescargaModule", function() { return PesagemCargaDescargaModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _pesagem_carga_descarga_routing_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pesagem-carga-descarga.routing.module */ "./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga.routing.module.ts");
/* harmony import */ var _pesagem_carga_descarga_form_pesagem_carga_descarga_form_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pesagem-carga-descarga-form/pesagem-carga-descarga-form.component */ "./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga-form/pesagem-carga-descarga-form.component.ts");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../shared/shared.module */ "./src/app/shared/shared.module.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 PesagemCargaDescargaModule = /** @class */ (function () {
    function PesagemCargaDescargaModule() {
    }
    PesagemCargaDescargaModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_3__["SharedModule"], _pesagem_carga_descarga_routing_module__WEBPACK_IMPORTED_MODULE_1__["PesagemCargaDescargaRoutingModule"]],
            declarations: [_pesagem_carga_descarga_form_pesagem_carga_descarga_form_component__WEBPACK_IMPORTED_MODULE_2__["PesagemCargaDescargaFormComponent"]]
        })
    ], PesagemCargaDescargaModule);
    return PesagemCargaDescargaModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga.routing.module.ts":
/*!*******************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga.routing.module.ts ***!
  \*******************************************************************************************************************/
/*! exports provided: PesagemCargaDescargaRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemCargaDescargaRoutingModule", function() { return PesagemCargaDescargaRoutingModule; });
/* 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 _config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _pesagem_carga_descarga_form_pesagem_carga_descarga_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pesagem-carga-descarga-form/pesagem-carga-descarga-form.component */ "./src/app/pages/especificos/ageo/relatorios/pesagem-carga-descarga/pesagem-carga-descarga-form/pesagem-carga-descarga-form.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: _pesagem_carga_descarga_form_pesagem_carga_descarga_form_component__WEBPACK_IMPORTED_MODULE_3__["PesagemCargaDescargaFormComponent"],
        data: { breadcrumb: "pesagemCargaDescarga", formParams: { action: _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    }
];
var PesagemCargaDescargaRoutingModule = /** @class */ (function () {
    function PesagemCargaDescargaRoutingModule() {
    }
    PesagemCargaDescargaRoutingModule = __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"]],
        })
    ], PesagemCargaDescargaRoutingModule);
    return PesagemCargaDescargaRoutingModule;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-especificos-ageo-relatorios-pesagem-carga-descarga-pesagem-carga-descarga-module.js.map