(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-consultas-consulta-saldo-consulta-saldo-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/consultas/consulta-saldo/consulta-saldo-filter/consulta-saldo-filter.component.html":
/*!*************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/consultas/consulta-saldo/consulta-saldo-filter/consulta-saldo-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 fade\" id=\"consulta-saldo-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop='static'>\n    <div class=\"uni-modal-dialog-md-45\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\">{{ 'titles.consultaSaldo' | translate }}</h5>\n            </div>\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\n                <app-validacoes></app-validacoes>\n                <div class=\"modal-body\">\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=\"dtRef\" class=\"required\">{{\"labels.data\" | translate }}</label>\n                                <app-data id=\"dtRef\" name=\"dtRef\" [(ngModel)]=\"data.dtRef\" autofocus\n                                    [formatDateTime]=\"mascara.getFormatDataHorMinSeg\" class=\"dataHora\">\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=\"grupoClienteId\">{{\"labels.grupo\" | translate}}</label>\n                                <app-combo-grupo-cliente id=\"grupoClienteId\" name=\"grupoClienteId\"\n                                    [disabled]=\"validaClienteSelecionado()\" [(ngModel)]=\"data.grupoClienteId\">\n                                </app-combo-grupo-cliente>\n                            </div>\n                        </div>\n                    </div>\n                    <div *ngIf=\"!data.grupoClienteId\" class=\"row\">\n                        <div class=\"col-lg-12\">\n                            <app-pesquisa-destinatario [(ngModel)]=\"data.destinatarioIdCliente\" [disabled]=\"blockFields\"\n                                id=\"cliente\" name=\"cliente\" label=\"cliente\" [disabled]=\"validaGrupoSelecionado()\"\n                                title=\"cliente\" showCgcCpf=\"false\" showInscricao=\"false\">\n                            </app-pesquisa-destinatario>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12\">\n                            <app-pesquisa-destinatario [(ngModel)]=\"data.destinatarioIdEmitente\"\n                                id=\"destinatarioIdEmitente\" name=\"destinatarioIdEmitente\" label=\"emitente\"\n                                title=\"destinatarioIdEmitente\" tipoDestinatario=\"C\" showCgcCpf=\"false\"\n                                showInscricao=\"false\">\n                            </app-pesquisa-destinatario>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12\">\n                            <app-pesquisa-material [(ngModel)]=\"data.materialId\" id=\"materialId\" name=\"materialId\"\n                                label=\"produto\" title=\"produto\">\n                            </app-pesquisa-material>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12\">\n                            <app-pesquisa-destinatario id=\"navio\" name=\"navio\" tipoDestinatario=\"N\"\n                                modalTitle=\"pesquisaDeNavio\" label=\"navio\" [(ngModel)]=\"data.destinatarioIdNavio\"\n                                showInscricao=\"false\" showCgcCpf=\"false\">\n                            </app-pesquisa-destinatario>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label>{{'labels.viagem' | translate}}</label>\n                                <app-combo-viagem-navio id=\"viagem\" name=\"viagem\" [(ngModel)]=\"data.viagem\"\n                                    [destinatarioIdNavio]=\"data.destinatarioIdNavio\">\n                                </app-combo-viagem-navio>\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=\"localizacao\">{{ 'labels.localizacao' | translate }}</label>\n                                <app-combo-localizacao id=\"localizacao\" name=\"localizacao\"\n                                    [(ngModel)]=\"data.localizacaoId\">\n                                </app-combo-localizacao>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-sto-contrato-item id=\"contrato\" name=\"contrato\"\n                                    [(ngModel)]=\"data.regContrato\" (outSelected)=\"trataContrato($event)\">\n                                </app-pesquisa-sto-contrato-item>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-lote id=\"loteId\" label=\"lote\" name=\"loteId\" modalTitle=\"lote\"\n                                    [(ngModel)]=\"data.loteId\" [clienteOuProdutoObrigatorio]=\"false\">\n                                </app-pesquisa-lote>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-6 col-md-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-osg id=\"osg\" label=\"osg\" name=\"osg\" [(ngModel)]=\"data.regOsg\">\n                                </app-pesquisa-osg>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.consultar' | 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/consultas/consulta-saldo/consulta-saldo-index/consulta-saldo-index.component.html":
/*!***********************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/consultas/consulta-saldo/consulta-saldo-index/consulta-saldo-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\"\r\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"box-shadow\" style=\"padding: 10px; background-color: #fff;\" *ngIf=\"exibeFiltroTipoConsulta\">\r\n    <div class=\"row\">\r\n        <div class=\"col-lg-12 col-md-12\">\r\n            <div class=\"card\">\r\n                <div class=\"card-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-4 col-md-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"tipoConsulta\">{{\"labels.tipoConsulta\" | translate}}</label>\r\n                                <select id=\"tipoConsulta\"\r\n                                        name=\"tipoConsulta\"\r\n                                        data-title=\"{{ 'labels.tipoConsulta' | translate }}\"\r\n                                        class=\"form-control form-control-sm\"\r\n                                        [(ngModel)]=\"filtro.tipoConsulta\" (change)=\"onChange()\">\r\n                                    <option value=\"1\">{{ 'labels.lote' | translate}}</option>\r\n                                    <option value=\"2\">{{ 'labels.depositos' | translate }}</option>\r\n                                    <option value=\"3\">{{ 'labels.depositosLotes' | translate }}</option>\r\n                                    <option value=\"4\">{{ 'labels.clienteEmitente' | translate }}</option>\r\n                                    <option value=\"5\">{{ 'labels.produto' | translate }}</option>\r\n                                    <option value=\"6\">{{ 'labels.ordemServico' | translate }}</option>\r\n                                    <option value=\"7\">{{ 'labels.dadosLote' | translate }}</option>\r\n                                </select>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n\r\n<div class=\"section-comand-bar\" *ngIf=\"filtro.tipoConsulta === '1'\">\r\n    <table id=\"dtConsultaSaldo1\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<div class=\"section-comand-bar\" *ngIf=\"filtro.tipoConsulta === '2'\">\r\n    <table id=\"dtConsultaSaldo2\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<div class=\"section-comand-bar\" *ngIf=\"filtro.tipoConsulta === '3'\">\r\n    <table id=\"dtConsultaSaldo3\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<div class=\"section-comand-bar\" *ngIf=\"filtro.tipoConsulta === '4'\">\r\n    <table id=\"dtConsultaSaldo4\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<div class=\"section-comand-bar\" *ngIf=\"filtro.tipoConsulta === '5'\">\r\n    <table id=\"dtConsultaSaldo5\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<div class=\"section-comand-bar\" *ngIf=\"filtro.tipoConsulta === '6'\">\r\n    <table id=\"dtConsultaSaldo6\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<div class=\"section-comand-bar\" *ngIf=\"filtro.tipoConsulta === '7'\">\r\n    <table id=\"dtConsultaSaldo7\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<app-consulta-saldo-filter [data]=\"filtro\" (filtrar)=\"executaFiltro($event)\"></app-consulta-saldo-filter>\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\r\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\r\n");

/***/ }),

/***/ "./src/app/pages/consultas/consulta-saldo/consulta-saldo-filter/consulta-saldo-filter.component.ts":
/*!*********************************************************************************************************!*\
  !*** ./src/app/pages/consultas/consulta-saldo/consulta-saldo-filter/consulta-saldo-filter.component.ts ***!
  \*********************************************************************************************************/
/*! exports provided: ConsultaSaldoFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSaldoFilterComponent", function() { return ConsultaSaldoFilterComponent; });
/* 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_message_message_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_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 _consulta_saldo_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../consulta-saldo.model */ "./src/app/pages/consultas/consulta-saldo/consulta-saldo.model.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.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 ConsultaSaldoFilterComponent = /** @class */ (function () {
    function ConsultaSaldoFilterComponent(message, loginService) {
        this.message = message;
        this.loginService = loginService;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_3__["Mascaras"]();
        this.filialId = this.loginService.getLogin().filialId;
    }
    ConsultaSaldoFilterComponent.prototype.ngOnInit = function () {
        this.filtro = this.data;
        this.filtro.filialId = this.loginService.getLogin().filialId;
        this.filtro.colaboradorId = +this.loginService.getLogin().colaboradorId;
        this.blockFields = false;
    };
    ConsultaSaldoFilterComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        this.filtrar.emit(this.filtro);
        jQuery("#consulta-saldo-filter-dialog").modal("hide");
    };
    ConsultaSaldoFilterComponent.prototype.checkValue = function (value) {
        this.tipoFiltro = value;
        this.data.tipoConsulta = this.tipoFiltro;
    };
    ConsultaSaldoFilterComponent.prototype.onSelectedLote = function (lote) {
        this.blockFields = true;
    };
    ConsultaSaldoFilterComponent.prototype.trataContrato = function (contrato) {
        this.filtro.regContrato = contrato.stoContratoId;
        this.filtro.itemContrato = contrato.stoContratoItemId;
    };
    ConsultaSaldoFilterComponent.prototype.validaGrupoSelecionado = function () {
        var valReturn = false;
        if (this.filtro.grupoClienteId > 0) {
            valReturn = true;
        }
        return valReturn;
    };
    ConsultaSaldoFilterComponent.prototype.validaClienteSelecionado = function () {
        var valReturn = false;
        if (this.filtro.destinatarioIdCliente > 0) {
            valReturn = true;
        }
        return valReturn;
    };
    ConsultaSaldoFilterComponent.ctorParameters = function () { return [
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_1__["MessageService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_5__["LoginService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _consulta_saldo_model__WEBPACK_IMPORTED_MODULE_4__["ConsultaSaldoFilter"])
    ], ConsultaSaldoFilterComponent.prototype, "data", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ConsultaSaldoFilterComponent.prototype, "filtrar", void 0);
    ConsultaSaldoFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-consulta-saldo-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./consulta-saldo-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/consultas/consulta-saldo/consulta-saldo-filter/consulta-saldo-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_1__["MessageService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_5__["LoginService"]])
    ], ConsultaSaldoFilterComponent);
    return ConsultaSaldoFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/consultas/consulta-saldo/consulta-saldo-index/consulta-saldo-index.component.ts":
/*!*******************************************************************************************************!*\
  !*** ./src/app/pages/consultas/consulta-saldo/consulta-saldo-index/consulta-saldo-index.component.ts ***!
  \*******************************************************************************************************/
/*! exports provided: ConsultaSaldoIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSaldoIndexComponent", function() { return ConsultaSaldoIndexComponent; });
/* 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_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/pages/cadastro/lote/lote.service */ "./src/app/pages/cadastro/lote/lote.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 _consulta_saldo_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../consulta-saldo.constants */ "./src/app/pages/consultas/consulta-saldo/consulta-saldo.constants.ts");
/* harmony import */ var _consulta_saldo_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../consulta-saldo.service */ "./src/app/pages/consultas/consulta-saldo/consulta-saldo.service.ts");
/* harmony import */ var _consulta_saldo_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../consulta-saldo.model */ "./src/app/pages/consultas/consulta-saldo/consulta-saldo.model.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../shared/services/funcoes/excel/excel.service */ "./src/app/shared/services/funcoes/excel/excel.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};













var ConsultaSaldoIndexComponent = /** @class */ (function (_super) {
    __extends(ConsultaSaldoIndexComponent, _super);
    function ConsultaSaldoIndexComponent(router, datatablesService, funcoesService, messageService, permissoesUtils, consultaSaldoService, loginService, loteService, excelService) {
        var _this = _super.call(this, new _consulta_saldo_constants__WEBPACK_IMPORTED_MODULE_8__["ConsultaSaldoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.datatablesService = datatablesService;
        _this.funcoesService = funcoesService;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.consultaSaldoService = consultaSaldoService;
        _this.loginService = loginService;
        _this.loteService = loteService;
        _this.excelService = excelService;
        _this.data = new _consulta_saldo_model__WEBPACK_IMPORTED_MODULE_10__["ConsultaSaldoDto"]();
        _this.constantes = new _consulta_saldo_constants__WEBPACK_IMPORTED_MODULE_8__["ConsultaSaldoConstants"]();
        _this.filtro = new _consulta_saldo_model__WEBPACK_IMPORTED_MODULE_10__["ConsultaSaldoFilter"]();
        _this.exibeFiltroTipoConsulta = false;
        _this.filtrar = function () {
            jQuery("#consulta-saldo-filter-dialog").modal("show");
        };
        _this.executaFiltro = function (event) {
            _this.filtro = event;
            _this.onRefresh(false);
        };
        _this.onChange = function () {
            _this.onRefresh(true);
        };
        _this.permissoes = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 2, function () {
                _super.prototype.permissoes.call(_this, _this.constantes);
            });
        };
        _this.print = function () {
            switch (_this.filtro.tipoConsulta) {
                case "1":
                    _this.constantes.reportId = "CON0002-1";
                    _this.constantes.reportTitulo = { "titulo": "Lote", "subTitulo": "" };
                    break;
                case "2":
                    _this.constantes.reportId = "CON0002-2";
                    _this.constantes.reportTitulo = { "titulo": "Depósitos", "subTitulo": "" };
                    break;
                case "3":
                    _this.constantes.reportId = "CON0002-3";
                    _this.constantes.reportTitulo = { "titulo": "Depositos /Lote", "subTitulo": "" };
                    break;
                case "4":
                    _this.constantes.reportId = "CON0002-4";
                    _this.constantes.reportTitulo = { "titulo": "Cliente/Emitente", "subTitulo": "" };
                    break;
                case "5":
                    _this.constantes.reportId = "CON0002-5";
                    _this.constantes.reportTitulo = { "titulo": "Produto", "subTitulo": "" };
                    break;
                case "6":
                    _this.constantes.reportId = "CON0002-6";
                    _this.constantes.reportTitulo = { "titulo": "Ordem de Serviço", "subTitulo": "" };
                    break;
                case "7":
                    _this.constantes.reportId = "CON0002-7";
                    _this.constantes.reportTitulo = { "titulo": "Dados do Lote", "subTitulo": "" };
                    break;
            }
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 3, function () {
                var param = {
                    filialId: _this.filtro.filialId,
                    colaboradorId: _this.filtro.colaboradorId,
                    dtRef: _this.filtro.dtRef,
                    destinatarioIdCliente: _this.funcoesService.isUndefinedOrNull(_this.filtro.destinatarioIdCliente) ? 0 : _this.filtro.destinatarioIdCliente,
                    destinatarioIdEmitente: _this.funcoesService.isUndefinedOrNull(_this.filtro.destinatarioIdEmitente) ? 0 : _this.filtro.destinatarioIdEmitente,
                    destinatarioIdNavio: _this.funcoesService.isUndefinedOrNull(_this.filtro.destinatarioIdNavio) ? 0 : _this.filtro.destinatarioIdNavio,
                    grupoClienteId: _this.funcoesService.isUndefinedOrNull(_this.filtro.grupoClienteId) ? 0 : _this.filtro.grupoClienteId,
                    localizacaoId: _this.funcoesService.isUndefinedOrNull(_this.filtro.localizacaoId) ? 0 : _this.filtro.localizacaoId,
                    loteId: _this.funcoesService.isUndefinedOrNull(_this.filtro.loteId) ? "" : _this.filtro.loteId === undefined ? "" : _this.filtro.loteId,
                    materialId: _this.funcoesService.isUndefinedOrNull(_this.filtro.materialId) ? "" : _this.filtro.materialId === undefined ? "" : _this.filtro.materialId,
                    viagem: _this.funcoesService.isUndefinedOrNull(_this.filtro.viagem) ? 0 : _this.filtro.viagem === undefined ? 0 : _this.filtro.viagem,
                    regContrato: _this.funcoesService.isUndefinedOrNull(_this.filtro.regContrato) ? 0 : _this.filtro.regContrato,
                    itemContrato: _this.funcoesService.isUndefinedOrNull(_this.filtro.itemContrato) ? 0 : _this.filtro.itemContrato,
                    regOsg: _this.funcoesService.isUndefinedOrNull(_this.filtro.regOsg) ? 0 : _this.filtro.regOsg,
                    tipoConsulta: _this.funcoesService.isUndefinedOrNull(_this.filtro.tipoConsulta) ? 0 : _this.filtro.tipoConsulta
                };
                _this.funcoesService.reportInvoc.invocaRelatorio(_this.constantes.reportId, _this.constantes.reportTitulo, param);
            });
        };
        _this.export = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 4, function () {
                var resultSet = [];
                // Trabalhando as informações para enviar ao banco
                _this.dados.forEach(function (m) {
                    var regLog = m.regLog, tipo = m.tipo, deposito = m.deposito, lote = m.lote, codDest = m.codDest, codEmitente = m.codEmitente, material = m.material, litrosComLib = m.litrosComLib, kilosComLib = m.kilosComLib, quantComLib = m.quantComLib, litrosSemLib = m.litrosSemLib, kilosSemLib = m.kilosSemLib, quantSemLib = m.quantSemLib, litrosTotal = m.litrosTotal, kilosTotal = m.kilosTotal, quantTotal = m.quantTotal, quantBalanca = m.quantBalanca, kilosBalanca = m.kilosBalanca, litrosBalanca = m.litrosBalanca, quantRet = m.quantRet, kilosRet = m.kilosRet, litrosRet = m.litrosRet, quantNomeado = m.quantNomeado, kilosNomeado = m.kilosNomeado, litrosNomeado = m.litrosNomeado, litrosDisponivel = m.litrosDisponivel, kilosDisponivel = m.kilosDisponivel, quantDisponivel = m.quantDisponivel, kilosTmp = m.kilosTmp, qtdeTmp = m.qtdeTmp, kilosRetSL = m.kilosRetSL, kilosDiferenca = m.kilosDiferenca, litrosBloq = m.litrosBloq, kilosBloq = m.kilosBloq, quantBloq = m.quantBloq, produto = m.produto, cliente = m.cliente, cNPJCliente = m.cNPJCliente, emitente = m.emitente, cNPJEmitente = m.cNPJEmitente, estadoEmitente = m.estadoEmitente, nomeArmazenado = m.nomeArmazenado, precoArmazenado = m.precoArmazenado, unidadeControle = m.unidadeControle, origem = m.origem, descrFilial = m.descrFilial, contrato = m.contrato, ordem = m.ordem, numeroBL = m.numeroBL, numeroDI = m.numeroDI, numeroDA = m.numeroDA, numeroOsg = m.numeroOsg, codNavio = m.codNavio, navio = m.navio, viagemNavio = m.viagemNavio, regimeAduaneiro = m.regimeAduaneiro, descrGrupo = m.descrGrupo, kilosRecebe = m.kilosRecebe, kiloscomDI = m.kiloscomDI;
                    var data = {};
                    // @ts-ignore
                    switch (_this.filtro.tipoConsulta) {
                        case "1":
                            data = {
                                lote: lote,
                                cliente: cliente,
                                emitente: emitente,
                                produto: produto,
                                contrato: contrato,
                                kilosComLib: kilosComLib,
                                kilosSemLib: kilosSemLib,
                                kilosTotal: kilosTotal,
                                kilosBalanca: kilosBalanca,
                                kilosDiferenca: kilosDiferenca,
                                kilosBloq: kilosBloq,
                                kilosNomeado: kilosNomeado,
                                kilosDisponivel: kilosDisponivel,
                                litrosComLib: litrosComLib,
                                litrosSemLib: litrosSemLib,
                                litrosTotal: litrosTotal,
                                litrosBloq: litrosBloq,
                                litrosNomeado: litrosNomeado,
                                litrosDisponivel: litrosDisponivel,
                                quantComLib: quantComLib,
                                quantSemLib: quantSemLib,
                                quantTotal: quantTotal,
                                quantNomeado: quantNomeado,
                                quantDisponivel: quantDisponivel,
                                origem: origem,
                            };
                            break;
                        case "2":
                            data = {
                                deposito: deposito,
                                produto: produto,
                                kilosComLib: kilosComLib,
                                kilosSemLib: kilosSemLib,
                                kilosTotal: kilosTotal,
                                kilosBalanca: kilosBalanca,
                                kilosDiferenca: kilosDiferenca,
                                kilosBloq: kilosBloq,
                                kilosNomeado: kilosNomeado,
                                kilosDisponivel: kilosDisponivel,
                                litrosComLib: litrosComLib,
                                litrosSemLib: litrosSemLib,
                                litrosTotal: litrosTotal,
                                litrosBloq: litrosBloq,
                                litrosNomeado: litrosNomeado,
                                litrosDisponivel: litrosDisponivel,
                                quantComLib: quantComLib,
                                quantSemLib: quantSemLib,
                                quantTotal: quantTotal,
                                quantNomeado: quantNomeado,
                                quantDisponivel: quantDisponivel,
                            };
                            break;
                        case "3":
                            data = {
                                deposito: deposito,
                                cliente: cliente,
                                emitente: emitente,
                                produto: produto,
                                lote: lote,
                                contrato: contrato,
                                kilosComLib: kilosComLib,
                                kilosBalanca: kilosBalanca,
                                kilosTotal: kilosTotal,
                                kilosDiferenca: kilosDiferenca,
                                kilosBloq: kilosBloq,
                                kilosNomeado: kilosNomeado,
                                kilosDisponivel: kilosDisponivel,
                                litrosComLib: litrosComLib,
                                litrosSemLib: litrosSemLib,
                                litrosTotal: litrosTotal,
                                litrosBloq: litrosBloq,
                                litrosNomeado: litrosNomeado,
                                litrosDisponivel: litrosDisponivel,
                                quantComLib: quantComLib,
                                quantSemLib: quantSemLib,
                                quantTotal: quantTotal,
                                quantNomeado: quantNomeado,
                                quantDisponivel: quantDisponivel,
                                origem: origem,
                            };
                            break;
                        case "4":
                            data = {
                                produto: produto,
                                cliente: cliente,
                                emitente: emitente,
                                kilosComLib: kilosComLib,
                                kilosSemLib: kilosSemLib,
                                kilosTotal: kilosTotal,
                                kilosBalanca: kilosBalanca,
                                kilosDiferenca: kilosDiferenca,
                                kilosBloq: kilosBloq,
                                kilosNomeado: kilosNomeado,
                                kilosDisponivel: kilosDisponivel,
                                litrosComLib: litrosComLib,
                                litrosSemLib: litrosSemLib,
                                litrosTotal: litrosTotal,
                                litrosBloq: litrosBloq,
                                litrosNomeado: litrosNomeado,
                                litrosDisponivel: litrosDisponivel,
                                quantComLib: quantComLib,
                                quantSemLib: quantSemLib,
                                quantTotal: quantTotal,
                                quantBloq: quantBloq,
                                quantNomeado: quantNomeado,
                                quantDisponivel: quantDisponivel,
                            };
                            break;
                        case "5":
                            data = {
                                produto: produto,
                                kilosComLib: kilosComLib,
                                kilosSemLib: kilosSemLib,
                                kilosTotal: kilosTotal,
                                kilosBalanca: kilosBalanca,
                                kilosDiferenca: kilosDiferenca,
                                kilosBloq: kilosBloq,
                                kilosNomeado: kilosNomeado,
                                kilosDisponivel: kilosDisponivel,
                                litrosComLib: litrosComLib,
                                litrosSemLib: litrosSemLib,
                                litrosTotal: litrosTotal,
                                litrosBloq: litrosBloq,
                                litrosNomeado: litrosNomeado,
                                litrosDisponivel: litrosDisponivel,
                                quantComLib: quantComLib,
                                quantSemLib: quantSemLib,
                                quantTotal: quantTotal,
                                quantBloq: quantBloq,
                                quantNomeado: quantNomeado,
                                quantDisponivel: quantDisponivel,
                            };
                            break;
                        case "6":
                            data = {
                                numeroOsg: numeroOsg,
                                cliente: cliente,
                                produto: produto,
                                kilosComLib: kilosComLib,
                                kilosSemLib: kilosSemLib,
                                kilosTotal: kilosTotal,
                                kilosBalanca: kilosBalanca,
                                kilosDiferenca: kilosDiferenca,
                                kilosBloq: kilosBloq,
                                kilosNomeado: kilosNomeado,
                                kilosDisponivel: kilosDisponivel,
                                litrosComLib: litrosComLib,
                                litrosSemLib: litrosSemLib,
                                litrosTotal: litrosTotal,
                                litrosBloq: litrosBloq,
                                litrosNomeado: litrosNomeado,
                                litrosDisponivel: litrosDisponivel,
                                quantComLib: quantComLib,
                                quantSemLib: quantSemLib,
                                quantTotal: quantTotal,
                                quantBloq: quantBloq,
                                quantNomeado: quantNomeado,
                                quantDisponivel: quantDisponivel,
                            };
                            break;
                        case "7":
                            data = {
                                lote: lote,
                                produto: produto,
                                cliente: cliente,
                                emitente: emitente,
                                estadoEmitente: estadoEmitente,
                                nomeArmazenado: nomeArmazenado,
                                precoArmazenado: precoArmazenado,
                                unidadeControle: unidadeControle,
                                origem: origem,
                                regimeAduaneiro: regimeAduaneiro,
                                contrato: contrato,
                                numeroBL: numeroBL,
                                numeroDI: numeroDI,
                                numeroDA: numeroDA,
                                numeroOsg: numeroOsg,
                                kilosRecebe: kilosRecebe,
                                kiloscomDI: kiloscomDI,
                            };
                            break;
                    }
                    resultSet.push(data);
                });
                var headerDictionary = {
                    "placa1": "placaCarreta1",
                    "placa2": "placaCarreta2",
                    "coddest": "codigo",
                    "cliCGCCPF": "cnpjCpf",
                    "cliRazaoSocial": "razaoSocial",
                    "cliEstado": "estado",
                    "transportNome": "transportadora",
                    "transportCNPJ": "cnpj",
                    "motoristaNome": "motorista",
                    "motoristaCPF": "cpf",
                    "motoristaCNH": "cnh"
                };
                var options = {
                    headerJsonKeys: true,
                    headerDictionary: headerDictionary
                };
                _this.excelService.exportAsExcelFile(resultSet, 'ConsultaSaldoExcel', options);
            });
        };
        return _this;
    }
    ConsultaSaldoIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () { return jQuery("#consulta-saldo-filter-dialog").modal("show"); }, function () { return _this.permissoesUtils.back(); }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'export', func: function () { return _this.export; } },
        ]);
    };
    ConsultaSaldoIndexComponent.prototype.onRefresh = function (trocaTipo) {
        var _this = this;
        this.filtro.trocaTipo = trocaTipo;
        this.consultaSaldoService.getByConsulta(this.filtro).subscribe(function (resp) {
            _this.exibeFiltroTipoConsulta = true;
            _this.dados = resp;
            var columns = [];
            switch (_this.filtro.tipoConsulta) {
                case "1":
                    columns = [
                        _this.datatablesService.getDataString("lote", "lote"),
                        _this.datatablesService.getDataString("cliente", "cliente"),
                        _this.datatablesService.getDataString("emitente", "emitente"),
                        _this.datatablesService.getDataString("produto", "produto"),
                        _this.datatablesService.getDataDouble("contrato", "contrato"),
                        _this.datatablesService.getDataDouble("kilosComLib", "kilosComLib"),
                        _this.datatablesService.getDataDouble("kilosSemLib", "kilosSemLib"),
                        _this.datatablesService.getDataDouble("kilosTotal", "kilosTotal"),
                        _this.datatablesService.getDataDouble("kilosBalanca", "saldoContabil"),
                        _this.datatablesService.getDataDouble("kilosDiferenca", "diferença"),
                        _this.datatablesService.getDataDouble("kilosBloq", "kilosBloq"),
                        _this.datatablesService.getDataDouble("kilosNomeado", "kilosNomeado"),
                        _this.datatablesService.getDataDouble("kilosDisponivel", "kilosDisponivel"),
                        _this.datatablesService.getDataDouble("litrosComLib", "litrosComLib"),
                        _this.datatablesService.getDataDouble("litrosSemLib", "litrosSemLib"),
                        _this.datatablesService.getDataDouble("litrosTotal", "litrosTotal"),
                        _this.datatablesService.getDataDouble("litrosBloq", "litrosBloq"),
                        _this.datatablesService.getDataDouble("litrosNomeado", "litrosNomeado"),
                        _this.datatablesService.getDataDouble("litrosDisponivel", "litrosDisponivel"),
                        _this.datatablesService.getDataDouble("quantComLib", "quantComLib"),
                        _this.datatablesService.getDataDouble("quantSemLib", "quantSemLib"),
                        _this.datatablesService.getDataDouble("quantTotal", "quantTotal"),
                        _this.datatablesService.getDataDouble("quantNomeado", "quantnomeado"),
                        _this.datatablesService.getDataDouble("quantDisponivel", "quantDisponivel"),
                        _this.datatablesService.getDataString("origem", "origem")
                    ];
                    break;
                case "2":
                    columns = [
                        _this.datatablesService.getDataString("deposito", "deposito"),
                        _this.datatablesService.getDataString("produto", "produto"),
                        _this.datatablesService.getDataDouble("kilosComLib", "kilosComLib"),
                        _this.datatablesService.getDataDouble("kilosSemLib", "KilosSemLib"),
                        _this.datatablesService.getDataDouble("kilosTotal", "kilosTotal"),
                        _this.datatablesService.getDataDouble("kilosBalanca", "saldoContabil"),
                        _this.datatablesService.getDataDouble("kilosDiferenca", "diferença"),
                        _this.datatablesService.getDataDouble("kilosBloq", "kilosBloq"),
                        _this.datatablesService.getDataDouble("kilosNomeado", "kilosNomeado"),
                        _this.datatablesService.getDataDouble("kilosDisponivel", "kilosDisponivel"),
                        _this.datatablesService.getDataDouble("litrosComLib", "litrosComLib"),
                        _this.datatablesService.getDataDouble("litrosSemLib", "litrosSemLib"),
                        _this.datatablesService.getDataDouble("litrosTotal", "litrosTotal"),
                        _this.datatablesService.getDataDouble("litrosBloq", "litrosBloq"),
                        _this.datatablesService.getDataDouble("litrosNomeado", "litrosNomeado"),
                        _this.datatablesService.getDataDouble("litrosDisponivel", "litrosDisponivel"),
                        _this.datatablesService.getDataDouble("quantComLib", "quantComLib"),
                        _this.datatablesService.getDataDouble("quantSemLib", "quantSemLib"),
                        _this.datatablesService.getDataDouble("quantTotal", "quantTotal"),
                        _this.datatablesService.getDataDouble("quantNomeado", "quantNomeado"),
                        _this.datatablesService.getDataDouble("quantDisponivel", "quantDisponivel")
                    ];
                    break;
                case "3":
                    columns = [
                        _this.datatablesService.getDataString("deposito", "deposito"),
                        _this.datatablesService.getDataString("cliente", "cliente"),
                        _this.datatablesService.getDataString("emitente", "emitente"),
                        _this.datatablesService.getDataString("produto", "produto"),
                        _this.datatablesService.getDataString("lote", "lote"),
                        _this.datatablesService.getDataDouble("contrato", "contrato"),
                        _this.datatablesService.getDataDouble("kilosComLib", "kilosComLib"),
                        _this.datatablesService.getDataDouble("kilosBalanca", "SaldoContabil"),
                        _this.datatablesService.getDataDouble("kilosTotal", "kilosTotal"),
                        _this.datatablesService.getDataDouble("kilosDiferenca", "diferença"),
                        _this.datatablesService.getDataDouble("kilosBloq", "kilosBloq"),
                        _this.datatablesService.getDataDouble("kilosNomeado", "kilosNomeado"),
                        _this.datatablesService.getDataDouble("kilosDisponivel", "kilosDisponivel"),
                        _this.datatablesService.getDataDouble("litrosComLib", "litrosComLib"),
                        _this.datatablesService.getDataDouble("litrosSemLib", "litrosSemLib"),
                        _this.datatablesService.getDataDouble("litrosTotal", "litrosTotal"),
                        _this.datatablesService.getDataDouble("litrosBloq", "litrosBloq"),
                        _this.datatablesService.getDataDouble("litrosNomeado", "litrosNomeado"),
                        _this.datatablesService.getDataDouble("litrosDisponivel", "litrosDisponivel"),
                        _this.datatablesService.getDataDouble("quantComLib", "quantComLib"),
                        _this.datatablesService.getDataDouble("quantSemLib", "quantSemLib"),
                        _this.datatablesService.getDataDouble("quantTotal", "quantTotal"),
                        _this.datatablesService.getDataDouble("quantNomeado", "quantNomeado"),
                        _this.datatablesService.getDataDouble("quantDisponivel", "quantDisponivel"),
                        _this.datatablesService.getDataString("origem", "origem"),
                    ];
                    break;
                case "4":
                    columns = [
                        _this.datatablesService.getDataString("produto", "produto"),
                        _this.datatablesService.getDataString("cliente", "cliente"),
                        _this.datatablesService.getDataString("emitente", "emitente"),
                        _this.datatablesService.getDataDouble("kilosComLib", "kilosComLib"),
                        _this.datatablesService.getDataDouble("kilosSemLib", "kilosSemLib"),
                        _this.datatablesService.getDataDouble("kilosTotal", "kilosTotal"),
                        _this.datatablesService.getDataDouble("kilosBalanca", "SaldoContabil"),
                        _this.datatablesService.getDataDouble("kilosDiferenca", "diferenca"),
                        _this.datatablesService.getDataDouble("kilosBloq", "kilosBloq"),
                        _this.datatablesService.getDataDouble("kilosNomeado", "kilosNomeado"),
                        _this.datatablesService.getDataDouble("kilosDisponivel", "kilosDisponivel"),
                        _this.datatablesService.getDataDouble("litrosComLib", "LitrosComLib"),
                        _this.datatablesService.getDataDouble("litrosSemLib", "LitrosSemLib"),
                        _this.datatablesService.getDataDouble("litrosTotal", "litrosTotal"),
                        _this.datatablesService.getDataDouble("litrosBloq", "litrosBloq"),
                        _this.datatablesService.getDataDouble("litrosNomeado", "litrosNomeado"),
                        _this.datatablesService.getDataDouble("litrosDisponivel", "litrosDisponivel"),
                        _this.datatablesService.getDataDouble("quantComLib", "quantComLib"),
                        _this.datatablesService.getDataDouble("quantSemLib", "quantSemLib"),
                        _this.datatablesService.getDataDouble("quantTotal", "quantTotal"),
                        _this.datatablesService.getDataDouble("quantBloq", "quantBloq"),
                        _this.datatablesService.getDataDouble("quantNomeado", "quantNomeado"),
                        _this.datatablesService.getDataDouble("quantDisponivel", "quantDisponivel"),
                    ];
                    break;
                case "5":
                    columns = [
                        _this.datatablesService.getDataString("produto", "produto"),
                        _this.datatablesService.getDataDouble("kilosComLib", "kilosComLib"),
                        _this.datatablesService.getDataDouble("kilosSemLib", "kilosSemLib"),
                        _this.datatablesService.getDataDouble("kilosTotal", "kilosTotal"),
                        _this.datatablesService.getDataDouble("kilosBalanca", "SaldoContabil"),
                        _this.datatablesService.getDataDouble("kilosDiferenca", "diferença"),
                        _this.datatablesService.getDataDouble("kilosBloq", "kilosBloq"),
                        _this.datatablesService.getDataDouble("kilosNomeado", "kilosNomeado"),
                        _this.datatablesService.getDataDouble("kilosDisponivel", "kilosDisponivel"),
                        _this.datatablesService.getDataDouble("litrosComLib", "litrosComLib"),
                        _this.datatablesService.getDataDouble("litrosSemLib", "litrosSemLib"),
                        _this.datatablesService.getDataDouble("litrosTotal", "litrosTotal"),
                        _this.datatablesService.getDataDouble("litrosBloq", "litrosBloq"),
                        _this.datatablesService.getDataDouble("litrosNomeado", "litrosNomeado"),
                        _this.datatablesService.getDataDouble("litrosDisponivel", "litrosDisponivel"),
                        _this.datatablesService.getDataDouble("quantComLib", "quantComLib"),
                        _this.datatablesService.getDataDouble("quantSemLib", "quantSemLib"),
                        _this.datatablesService.getDataDouble("quantTotal", "quantTotal"),
                        _this.datatablesService.getDataDouble("quantBloq", "quantBloq"),
                        _this.datatablesService.getDataDouble("quantNomeado", "quantNomeado"),
                        _this.datatablesService.getDataDouble("quantDisponivel", "quantDisponivel"),
                    ];
                    break;
                case "6":
                    columns = [
                        _this.datatablesService.getDataString("numeroOsg", "numeroOSG"),
                        _this.datatablesService.getDataString("cliente", "cliente"),
                        _this.datatablesService.getDataString("produto", "produto"),
                        _this.datatablesService.getDataDouble("kilosComLib", "kilosComLib"),
                        _this.datatablesService.getDataDouble("kilosSemLib", "kilosSemLib"),
                        _this.datatablesService.getDataDouble("kilosTotal", "KilosTotal"),
                        _this.datatablesService.getDataDouble("kilosBalanca", "saldoContabil"),
                        _this.datatablesService.getDataDouble("kilosDiferenca", "diferenca"),
                        _this.datatablesService.getDataDouble("kilosBloq", "kilosBloq"),
                        _this.datatablesService.getDataDouble("kilosNomeado", "kilosNomeado"),
                        _this.datatablesService.getDataDouble("kilosDisponivel", "kilosDisponivel"),
                        _this.datatablesService.getDataDouble("litrosComLib", "litrosComLib"),
                        _this.datatablesService.getDataDouble("litrosSemLib", "litrosSemLib"),
                        _this.datatablesService.getDataDouble("litrosTotal", "litrosTotal"),
                        _this.datatablesService.getDataDouble("litrosBloq", "litrosBloq"),
                        _this.datatablesService.getDataDouble("litrosNomeado", "litrosNomeado"),
                        _this.datatablesService.getDataDouble("litrosDisponivel", "litrosDisponivel"),
                        _this.datatablesService.getDataDouble("quantComLib", "quantComLib"),
                        _this.datatablesService.getDataDouble("quantSemLib", "quantSemLib"),
                        _this.datatablesService.getDataDouble("quantTotal", "QtdeComLib"),
                        _this.datatablesService.getDataDouble("quantBloq", "quantBloq"),
                        _this.datatablesService.getDataDouble("quantNomeado", "quantNomeado"),
                        _this.datatablesService.getDataDouble("quantDisponivel", "quantDisponivel")
                    ];
                    break;
                case "7":
                    columns = [
                        _this.datatablesService.getDataString("lote", "lote"),
                        _this.datatablesService.getDataString("produto", "produto"),
                        _this.datatablesService.getDataString("cliente", "cliente"),
                        _this.datatablesService.getDataString("emitente", "emitente"),
                        _this.datatablesService.getDataString("estadoEmitente", "estadoEmitente"),
                        _this.datatablesService.getDataString("nomeArmazenado", "nomeArmazenado"),
                        _this.datatablesService.getDataDouble("precoArmazenado", "precoArmazenado"),
                        _this.datatablesService.getDataString("unidadeControle", "unidadeControle"),
                        _this.datatablesService.getDataString("origem", "origem"),
                        _this.datatablesService.getDataString("regimeAduaneiro", "regimeAduaneiro"),
                        _this.datatablesService.getDataString("contrato", "contrato"),
                        _this.datatablesService.getDataString("numeroBL", "numeroBL"),
                        _this.datatablesService.getDataString("numeroDI", "numeroDI"),
                        _this.datatablesService.getDataString("numeroDA", "numeroDA"),
                        _this.datatablesService.getDataString("numeroOsg", "numeroOSG"),
                        _this.datatablesService.getDataDouble("kilosRecebe", "kilosRecebido"),
                        _this.datatablesService.getDataDouble("kiloscomDI", "kiloscomDI")
                    ];
                    break;
            }
            _this.datatablesService.datatable("dtConsultaSaldo" + _this.filtro.tipoConsulta, columns, resp, function () {
            });
        });
    };
    ConsultaSaldoIndexComponent.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_7__["PermissoesUtilsService"] },
        { type: _consulta_saldo_service__WEBPACK_IMPORTED_MODULE_9__["ConsultaSaldoService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"] },
        { type: app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_6__["LoteService"] },
        { type: _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_12__["ExcelService"] }
    ]; };
    ConsultaSaldoIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-consulta-saldo-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./consulta-saldo-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/consultas/consulta-saldo/consulta-saldo-index/consulta-saldo-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_7__["PermissoesUtilsService"],
            _consulta_saldo_service__WEBPACK_IMPORTED_MODULE_9__["ConsultaSaldoService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"],
            app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_6__["LoteService"],
            _shared_services_funcoes_excel_excel_service__WEBPACK_IMPORTED_MODULE_12__["ExcelService"]])
    ], ConsultaSaldoIndexComponent);
    return ConsultaSaldoIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/consultas/consulta-saldo/consulta-saldo-routing.module.ts":
/*!*********************************************************************************!*\
  !*** ./src/app/pages/consultas/consulta-saldo/consulta-saldo-routing.module.ts ***!
  \*********************************************************************************/
/*! exports provided: ConsultaSaldoRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSaldoRoutingModule", function() { return ConsultaSaldoRoutingModule; });
/* 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 _consulta_saldo_index_consulta_saldo_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./consulta-saldo-index/consulta-saldo-index.component */ "./src/app/pages/consultas/consulta-saldo/consulta-saldo-index/consulta-saldo-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: _consulta_saldo_index_consulta_saldo_index_component__WEBPACK_IMPORTED_MODULE_3__["ConsultaSaldoIndexComponent"],
        data: { breadcrumb: "consultaSaldo", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    }
];
var ConsultaSaldoRoutingModule = /** @class */ (function () {
    function ConsultaSaldoRoutingModule() {
    }
    ConsultaSaldoRoutingModule = __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"]]
        })
    ], ConsultaSaldoRoutingModule);
    return ConsultaSaldoRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/consultas/consulta-saldo/consulta-saldo.constants.ts":
/*!****************************************************************************!*\
  !*** ./src/app/pages/consultas/consulta-saldo/consulta-saldo.constants.ts ***!
  \****************************************************************************/
/*! exports provided: ConsultaSaldoConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSaldoConstants", function() { return ConsultaSaldoConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ConsultaSaldoConstants = /** @class */ (function () {
    function ConsultaSaldoConstants() {
        this.sisFormularioId = 125041;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.permissoes" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.exportExcel" },
        ];
        this.reportId = "";
        this.sisSistemaId = "CON";
        this.nomeForm = "titles.consultaSaldo";
        this.reportTitulo = { "titulo": "", "subTitulo": "" };
        this.listaIndex = [
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Imprimir', action: 'print', icon: "icon-printer", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'exportExcel', action: 'export', icon: "fa fa-file-excel-o", exibeButton: true, eximeMenu: true, menuName: 'Arquivo', depitem: false },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
        ];
    }
    return ConsultaSaldoConstants;
}());



/***/ }),

/***/ "./src/app/pages/consultas/consulta-saldo/consulta-saldo.model.ts":
/*!************************************************************************!*\
  !*** ./src/app/pages/consultas/consulta-saldo/consulta-saldo.model.ts ***!
  \************************************************************************/
/*! exports provided: ConsultaSaldoFilter, ConsultaSaldoDto */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSaldoFilter", function() { return ConsultaSaldoFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSaldoDto", function() { return ConsultaSaldoDto; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ConsultaSaldoFilter = /** @class */ (function () {
    function ConsultaSaldoFilter() {
        this.filialId = 0;
        this.colaboradorId = 0;
        this.dtRef = new Date();
        this.destinatarioIdCliente = 0;
        this.destinatarioIdEmitente = 0;
        this.grupoClienteId = undefined;
        this.materialId = "";
        this.destinatarioIdNavio = 0;
        this.viagem = "";
        this.loteId = "";
        this.localizacaoId = "";
        this.regContrato = 0;
        this.itemContrato = 0;
        this.regOsg = 0;
        this.tipoConsulta = "1";
        this.trocaTipo = false;
    }
    return ConsultaSaldoFilter;
}());

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



/***/ }),

/***/ "./src/app/pages/consultas/consulta-saldo/consulta-saldo.module.ts":
/*!*************************************************************************!*\
  !*** ./src/app/pages/consultas/consulta-saldo/consulta-saldo.module.ts ***!
  \*************************************************************************/
/*! exports provided: ConsultaSaldoModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaSaldoModule", function() { return ConsultaSaldoModule; });
/* 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 _consulta_saldo_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./consulta-saldo-routing.module */ "./src/app/pages/consultas/consulta-saldo/consulta-saldo-routing.module.ts");
/* harmony import */ var _consulta_saldo_filter_consulta_saldo_filter_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./consulta-saldo-filter/consulta-saldo-filter.component */ "./src/app/pages/consultas/consulta-saldo/consulta-saldo-filter/consulta-saldo-filter.component.ts");
/* harmony import */ var _consulta_saldo_index_consulta_saldo_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./consulta-saldo-index/consulta-saldo-index.component */ "./src/app/pages/consultas/consulta-saldo/consulta-saldo-index/consulta-saldo-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 ConsultaSaldoModule = /** @class */ (function () {
    function ConsultaSaldoModule() {
    }
    ConsultaSaldoModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _consulta_saldo_routing_module__WEBPACK_IMPORTED_MODULE_2__["ConsultaSaldoRoutingModule"]],
            declarations: [_consulta_saldo_index_consulta_saldo_index_component__WEBPACK_IMPORTED_MODULE_4__["ConsultaSaldoIndexComponent"], _consulta_saldo_filter_consulta_saldo_filter_component__WEBPACK_IMPORTED_MODULE_3__["ConsultaSaldoFilterComponent"]]
        })
    ], ConsultaSaldoModule);
    return ConsultaSaldoModule;
}());



/***/ }),

/***/ "./src/app/pages/consultas/consulta-saldo/consulta-saldo.service.ts":
/*!**************************************************************************!*\
  !*** ./src/app/pages/consultas/consulta-saldo/consulta-saldo.service.ts ***!
  \**************************************************************************/
/*! exports provided: ConsultaSaldoService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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






var ConsultaSaldoService = /** @class */ (function (_super) {
    __extends(ConsultaSaldoService, _super);
    function ConsultaSaldoService(http) {
        var _this = _super.call(this, http, "consultas/consultaSaldo") || this;
        _this.http = http;
        return _this;
    }
    ConsultaSaldoService.prototype.getByConsulta = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/consultas/consultaSaldos/getConsulta", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    ConsultaSaldoService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"] }
    ]; };
    ConsultaSaldoService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])
    ], ConsultaSaldoService);
    return ConsultaSaldoService;
}(_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-consultas-consulta-saldo-consulta-saldo-module.js.map