(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-especificos-cargill-movimentos-interface-rds-interface-rds-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-filter/interface-rds-filter.component.html":
/*!*******************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-filter/interface-rds-filter.component.html ***!
  \*******************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"interface-rds-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-40\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{title}}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\" *ngIf=\"!!service.filter\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"tipoData\">{{'labels.tipo' | translate}}</label>\r\n                                <select id=\"tipoData\" name=\"tipoData\" class=\"form-control form-control-sm\"\r\n                                    [(ngModel)]=\"service.filter.tipoData\">\r\n                                    <option value=\"DtIntegracao\">{{ \"labels.dtIntegracao\" | translate }}</option>\r\n                                </select>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label class=\"required\" for=\"periodoDe\">{{ 'labels.periodoDe' | translate }}</label>\r\n                                <app-data-h-m-s id=\"periodoDe\" name=\"periodoDe\" required=\"true\"\r\n                                    [(ngModel)]=\"service.filter.dtInicio\">\r\n                                </app-data-h-m-s>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label class=\"required\" for=\"ate\">{{ 'labels.ate' | translate }}</label>\r\n                                <app-data-h-m-s id=\"ate\" name=\"ate\" required=\"true\" [(ngModel)]=\"service.filter.dtFim\">\r\n                                </app-data-h-m-s>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"ficha\">{{'labels.ficha' | translate}}</label>\r\n                                <input id=\"ficha\" name=\"ficha\" [(ngModel)]=\"service.filter.idRegistro\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                    (keypress)=\"funcoesService.apenasNumeros($event)\">\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"codigoBP\">{{'labels.codigoBP' | translate}}</label>\r\n                                <input id=\"codigoBP\" name=\"codigoBP\" [(ngModel)]=\"service.filter.codigoBP\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\">\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-4 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"placa\">{{'labels.placa' | translate}}</label>\r\n                                <input id=\"placa\" name=\"placa\" maxlength=\"18\"\r\n                                    [(ngModel)]=\"service.filter.cadastroPlacaId\" class=\"form-control form-control-sm\"\r\n                                    type=\"text\">\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"cnpjCliente\">{{\"labels.cliente\" | translate}}</label>\r\n                                <div class=\"input-group\">\r\n                                    <input id=\"cnpjCliente\" name=\"cnpjCliente\" [(ngModel)]=\"service.filter.clienteCnpj\"\r\n                                        cnpjFormat placeholder=\"{{'labels.cnpj'|translate}}\"\r\n                                        class=\"form-control form-control-sm col-3\" type=\"text\" />\r\n                                    <input id=\"clienteRazaoSocial\" name=\"clienteRazaoSocial\"\r\n                                        placeholder=\"{{'labels.razaoSocial'|translate}}\"\r\n                                        [(ngModel)]=\"service.filter.clienteRazaoSocial\" maxlength=\"50\"\r\n                                        class=\"form-control form-control-sm col-9\" type=\"text\" />\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"material\">{{\"labels.produto\" | translate}}</label>\r\n                                <div class=\"input-group\">\r\n                                    <input id=\"material\" name=\"material\" [(ngModel)]=\"service.filter.material\"\r\n                                        maxlength=\"18\" placeholder=\"{{'labels.material'|translate}}\"\r\n                                        class=\"form-control form-control-sm col-3\" type=\"text\" />\r\n                                    <input id=\"descrMater\" name=\"descrMater\"\r\n                                        placeholder=\"{{'labels.descricao'|translate}}\"\r\n                                        [(ngModel)]=\"service.filter.descrMater\" maxlength=\"50\"\r\n                                        class=\"form-control form-control-sm col-9\" type=\"text\" />\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"situacao\">{{'labels.situacao' | translate}}</label>\r\n                                <select id=\"situacao\" name=\"situacao\" class=\"form-control form-control-sm\"\r\n                                    [(ngModel)]=\"service.filter.flagIntegracao\">\r\n                                    <option *ngFor=\"let situacoes of listaSituacoes\" [value]=\"situacoes.value\">{{\r\n                                        situacoes.label }}\r\n                                    </option>\r\n                                </select>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"modal\">{{'labels.modal' | translate}}</label>\r\n                                <select id=\"modal\" name=\"modal\" class=\"form-control form-control-sm\"\r\n                                    [(ngModel)]=\"service.filter.modal\">\r\n                                    <option *ngFor=\"let modal of modais\" [value]=\"modal.value\">{{\r\n                                        modal.label }}\r\n                                    </option>\r\n                                </select>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-12\">\r\n                            <div class=\"custom-control custom-checkbox\">\r\n                                <input id=\"apresentaExcluidos\" name=\"flagAtivo\"\r\n                                    [ngModel]=\"service.filter.apresentaExcluidos === 'S'\"\r\n                                    (ngModelChange)=\"service.filter.apresentaExcluidos=$event?'S':'N'\"\r\n                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                <label class=\"custom-control-label\"\r\n                                    for=\"apresentaExcluidos\">{{'labels.apresentarRegistrosExcluidos' |\r\n                                    translate}}</label>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.pesquisar' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{ 'buttons.sair' | translate\r\n                        }}</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-index/interface-rds-index.component.html":
/*!*****************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-index/interface-rds-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\" [sisFormularioId]=\"constantes.sisFormularioId\"\n    [itemData]=\"data?.idRegistro\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <fieldset>\n        <legend>{{ \"labels.descarga\" | translate }}</legend>\n        <table id=\"dtDescarga\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n    </fieldset>\n    <ng-container *ngIf=\"hasItem\">\n        <fieldset>\n            <legend>{{ \"labels.notas\" | translate }}</legend>\n            <table id=\"dtItem\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n        </fieldset>\n    </ng-container>\n    <ng-container *ngIf=\"hasClassifica\">\n        <fieldset>\n            <legend>{{ \"labels.classificacao\" | translate }}</legend>\n            <table id=\"dtClassifica\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n        </fieldset>\n    </ng-container>\n</div>\n\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n<app-interface-rds-filter (filtrar)=\"executaFiltro($event)\"></app-interface-rds-filter>");

/***/ }),

/***/ "./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-filter/interface-rds-filter.component.ts":
/*!***************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-filter/interface-rds-filter.component.ts ***!
  \***************************************************************************************************************************/
/*! exports provided: InterfaceRdsFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterfaceRdsFilterComponent", function() { return InterfaceRdsFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service */ "./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _interface_rds_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../interface-rds.constants */ "./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds.constants.ts");
/* harmony import */ var _monitor_interface_rds_monitor_interface_rds_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../monitor-interface-rds/monitor-interface-rds.model */ "./src/app/pages/especificos/cargill/movimentos/monitor-interface-rds/monitor-interface-rds.model.ts");
/* harmony import */ var _monitor_interface_rds_monitor_interface_rds_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../monitor-interface-rds/monitor-interface-rds.service */ "./src/app/pages/especificos/cargill/movimentos/monitor-interface-rds/monitor-interface-rds.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 InterfaceRdsFilterComponent = /** @class */ (function () {
    function InterfaceRdsFilterComponent(service, message, funcoesService, cpfCnpjService) {
        this.service = service;
        this.message = message;
        this.funcoesService = funcoesService;
        this.cpfCnpjService = cpfCnpjService;
        this.constantes = new _interface_rds_constants__WEBPACK_IMPORTED_MODULE_5__["InterfaceRdsConstants"]();
        this.listaSituacoes = _monitor_interface_rds_monitor_interface_rds_model__WEBPACK_IMPORTED_MODULE_6__["MonitorInterfaceRdsFiltroVo"].listaSituacoes();
        this.modais = _monitor_interface_rds_monitor_interface_rds_model__WEBPACK_IMPORTED_MODULE_6__["MonitorInterfaceRdsFiltroVo"].modais();
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    InterfaceRdsFilterComponent.prototype.ngOnInit = function () {
        if (!this.service.filter) {
            this.service.filter = new _monitor_interface_rds_monitor_interface_rds_model__WEBPACK_IMPORTED_MODULE_6__["MonitorInterfaceRdsFiltroVo"]();
        }
    };
    Object.defineProperty(InterfaceRdsFilterComponent.prototype, "title", {
        get: function () {
            return this.message.translate("titles.dadosRds");
        },
        enumerable: true,
        configurable: true
    });
    InterfaceRdsFilterComponent.prototype.onSubmit = function (form) {
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid)
            return;
        this.filtrar.emit(this.service.filter);
        jQuery("#interface-rds-filter-dialog").modal("hide");
    };
    InterfaceRdsFilterComponent.prototype.validaCpfCnpj = function () {
        var valid = this.cpfCnpjService.valida_cpf_cnpj(this.service.filter.clienteCnpj);
        if (!valid) {
            this.message.warning("titles.monitorInterfaceRds", "messages.cpfCnpjInvalido");
            return false;
        }
        return true;
    };
    InterfaceRdsFilterComponent.ctorParameters = function () { return [
        { type: _monitor_interface_rds_monitor_interface_rds_service__WEBPACK_IMPORTED_MODULE_7__["MonitorInterfaceRdsService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_2__["CpfCnpjService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], InterfaceRdsFilterComponent.prototype, "filtrar", void 0);
    InterfaceRdsFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-interface-rds-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./interface-rds-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-filter/interface-rds-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_monitor_interface_rds_monitor_interface_rds_service__WEBPACK_IMPORTED_MODULE_7__["MonitorInterfaceRdsService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_2__["CpfCnpjService"]])
    ], InterfaceRdsFilterComponent);
    return InterfaceRdsFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-index/interface-rds-index.component.ts":
/*!*************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-index/interface-rds-index.component.ts ***!
  \*************************************************************************************************************************/
/*! exports provided: InterfaceRdsIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterfaceRdsIndexComponent", function() { return InterfaceRdsIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* 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_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var _monitor_interface_rds_monitor_interface_rds_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../monitor-interface-rds/monitor-interface-rds.model */ "./src/app/pages/especificos/cargill/movimentos/monitor-interface-rds/monitor-interface-rds.model.ts");
/* harmony import */ var _monitor_interface_rds_monitor_interface_rds_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../monitor-interface-rds/monitor-interface-rds.service */ "./src/app/pages/especificos/cargill/movimentos/monitor-interface-rds/monitor-interface-rds.service.ts");
/* harmony import */ var _interface_rds_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../interface-rds.constants */ "./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds.constants.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};













var InterfaceRdsIndexComponent = /** @class */ (function (_super) {
    __extends(InterfaceRdsIndexComponent, _super);
    function InterfaceRdsIndexComponent(messageService, service, funcoesService, loginService, permissoesUtils, datatables) {
        var _this = _super.call(this, new _interface_rds_constants__WEBPACK_IMPORTED_MODULE_12__["InterfaceRdsConstants"](), funcoesService) || this;
        _this.messageService = messageService;
        _this.service = service;
        _this.funcoesService = funcoesService;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.datatables = datatables;
        _this.constantes = new _interface_rds_constants__WEBPACK_IMPORTED_MODULE_12__["InterfaceRdsConstants"]();
        _this.mensagens = [];
        _this.registrosSelecionados = [];
        _this.registrosSelecionadosComErros = [];
        _this.countFlag = 0;
        _this.title = "titles.dadosRds";
        _this.hasItem = false;
        _this.hasClassifica = false;
        _this.permissoes = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 2, function () {
                _super.prototype.permissoes.call(_this, _this.constantes);
            });
        };
        _this.refresh = function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.hasClassifica = false;
                this.hasItem = false;
                this.service.filter.banda = 1;
                this.service.getDadosRDS(this.service.filter).subscribe(function (data) {
                    if (app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_4__["ArrayUtilsStaticService"].any(data)) {
                        var columns_1 = [];
                        var cabecalhos = Object.keys(data[0]);
                        cabecalhos.forEach(function (c) {
                            switch (c) {
                                case 'dtChegada':
                                case 'dtSaida':
                                case 'dt1Pesagem':
                                case 'dt2Pesagem':
                                case 'dtTriagem':
                                case 'dtEncoste':
                                case 'dtInicioOp':
                                case 'dtFimOp':
                                case 'dtIntegracao':
                                    columns_1.push(_this.datatables.getDataDateTime(c, c, "DD/MM/YYYY HH:mm:ss", "", true));
                                    break;
                                case 'vlBasIcms':
                                case 'vlFrete':
                                case 'vlIcms':
                                case 'vlIPI':
                                case 'vlNota':
                                case 'preco':
                                    columns_1.push(_this.datatables.getDataDouble(c, c, 2, false, "", true));
                                    break;
                                case 'pesoRateio':
                                case 'quantid':
                                    columns_1.push(_this.datatables.getDataDouble(c, c, 0, false, "", true));
                                    break;
                                default:
                                    columns_1.push(_this.datatables.getDataString(c, c, "", true));
                                    break;
                            }
                        });
                        _this.datatables.toDataTable({ tableId: "dtDescarga", columns: columns_1, data: data }, function (aData) {
                            _this.data = aData;
                            _this.getData(aData);
                        });
                    }
                });
                return [2 /*return*/];
            });
        }); };
        return _this;
    }
    InterfaceRdsIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                if (!this.loginService.isTokenExpired()) {
                    if (this.funcoesService.abrirFiltro) {
                        this.service.filter = new _monitor_interface_rds_monitor_interface_rds_model__WEBPACK_IMPORTED_MODULE_10__["MonitorInterfaceRdsFiltroVo"]();
                        this.filtrar();
                    }
                }
                return [2 /*return*/];
            });
        }); }, function () { return _this.permissoesUtils.back(); }, true);
    };
    InterfaceRdsIndexComponent.prototype.getData = function (data) {
        return __awaiter(this, void 0, void 0, function () {
            var res, columns1_1, cabecalhos1, columns2_1, cabecalhos2;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, Object(rxjs__WEBPACK_IMPORTED_MODULE_9__["forkJoin"])([
                            this.service.getDadosRDS({ banda: 2, idRegistro: data.idRegistro, dtInicio: this.service.filter.dtInicio, dtFim: this.service.filter.dtFim }),
                            this.service.getDadosRDS({ banda: 3, idRegistro: data.idRegistro, dtInicio: this.service.filter.dtInicio, dtFim: this.service.filter.dtFim }),
                        ]).toPromise()];
                    case 1:
                        res = _a.sent();
                        if (app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_4__["ArrayUtilsStaticService"].any(res)) {
                            columns1_1 = [];
                            cabecalhos1 = Object.keys(res[0][0]);
                            cabecalhos1.forEach(function (c) {
                                switch (c) {
                                    case 'vlBasIcms':
                                    case 'vlFrete':
                                    case 'vlIcms':
                                    case 'vlIPI':
                                    case 'vlNota':
                                    case 'preco':
                                        columns1_1.push(_this.datatables.getDataDouble(c, c, 2, false, "", true));
                                        break;
                                    case 'dtEmissao':
                                        columns1_1.push(_this.datatables.getDataDateTime(c, c, "DD/MM/YYYY", "", true));
                                        break;
                                    case 'quantid':
                                    case 'pesoRateio':
                                    case 'quantidAju':
                                    case 'pesoLiq':
                                        columns1_1.push(_this.datatables.getDataDouble(c, c, 0, false, "", true));
                                        break;
                                    default:
                                        columns1_1.push(_this.datatables.getDataString(c, c, "", true));
                                        break;
                                }
                            });
                            columns2_1 = [];
                            cabecalhos2 = Object.keys(res[1][0]);
                            cabecalhos2.forEach(function (c) {
                                switch (c) {
                                    case 'valor':
                                        columns2_1.push(_this.datatables.getDataDouble(c, c, 2, false, "", true));
                                        break;
                                    default:
                                        columns2_1.push(_this.datatables.getDataString(c, c, "", true));
                                        break;
                                }
                            });
                            this.hasItem = app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_4__["ArrayUtilsStaticService"].any(res[0]);
                            this.hasClassifica = app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_4__["ArrayUtilsStaticService"].any(res[1]);
                            if (this.hasItem) {
                                setTimeout(function () {
                                    _this.datatables.toDataTable({ tableId: "dtItem", columns: columns1_1, data: res[0] });
                                }, 100);
                            }
                            if (this.hasClassifica) {
                                setTimeout(function () {
                                    _this.datatables.toDataTable({ tableId: "dtClassifica", columns: columns2_1, data: res[1] });
                                }, 200);
                            }
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    Object.defineProperty(InterfaceRdsIndexComponent.prototype, "hasDados", {
        get: function () {
            if (!this.service.dados)
                return false;
            return this.service.dados && this.service.dados.length > 0;
        },
        enumerable: true,
        configurable: true
    });
    InterfaceRdsIndexComponent.prototype.filtrar = function () {
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ModalUtilsStaticService"].openModal("interface-rds-filter-dialog");
    };
    InterfaceRdsIndexComponent.prototype.executaFiltro = function (event) {
        this.service.filter = event;
        this.refresh();
    };
    InterfaceRdsIndexComponent.ctorParameters = function () { return [
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _monitor_interface_rds_monitor_interface_rds_service__WEBPACK_IMPORTED_MODULE_11__["MonitorInterfaceRdsService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] }
    ]; };
    InterfaceRdsIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-interface-rds-index',
            template: __importDefault(__webpack_require__(/*! raw-loader!./interface-rds-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-index/interface-rds-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            _monitor_interface_rds_monitor_interface_rds_service__WEBPACK_IMPORTED_MODULE_11__["MonitorInterfaceRdsService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"]])
    ], InterfaceRdsIndexComponent);
    return InterfaceRdsIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds.constants.ts":
/*!***********************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds.constants.ts ***!
  \***********************************************************************************************/
/*! exports provided: InterfaceRdsConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterfaceRdsConstants", function() { return InterfaceRdsConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var InterfaceRdsConstants = /** @class */ (function () {
    function InterfaceRdsConstants() {
        this.sisFormularioId = 375036;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "REL";
        this.nomeForm = "titles.dadosRds";
        this.reportTitulo = { "titulo": "", "subTitulo": "" };
        this.reportId = "";
        this.listaIndex = [
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
        ];
    }
    return InterfaceRdsConstants;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds.module.ts":
/*!********************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds.module.ts ***!
  \********************************************************************************************/
/*! exports provided: InterfaceRdsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterfaceRdsModule", function() { return InterfaceRdsModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _interface_rds_filter_interface_rds_filter_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interface-rds-filter/interface-rds-filter.component */ "./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-filter/interface-rds-filter.component.ts");
/* harmony import */ var _interface_rds_index_interface_rds_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interface-rds-index/interface-rds-index.component */ "./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-index/interface-rds-index.component.ts");
/* harmony import */ var _interface_rds_routing_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interface-rds.routing.module */ "./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds.routing.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 InterfaceRdsModule = /** @class */ (function () {
    function InterfaceRdsModule() {
    }
    InterfaceRdsModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _interface_rds_routing_module__WEBPACK_IMPORTED_MODULE_4__["InterfaceRdsRoutingModule"]],
            declarations: [
                _interface_rds_index_interface_rds_index_component__WEBPACK_IMPORTED_MODULE_3__["InterfaceRdsIndexComponent"],
                _interface_rds_filter_interface_rds_filter_component__WEBPACK_IMPORTED_MODULE_2__["InterfaceRdsFilterComponent"]
            ]
        })
    ], InterfaceRdsModule);
    return InterfaceRdsModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds.routing.module.ts":
/*!****************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds.routing.module.ts ***!
  \****************************************************************************************************/
/*! exports provided: InterfaceRdsRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterfaceRdsRoutingModule", function() { return InterfaceRdsRoutingModule; });
/* 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 _interface_rds_index_interface_rds_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interface-rds-index/interface-rds-index.component */ "./src/app/pages/especificos/cargill/movimentos/interface-rds/interface-rds-index/interface-rds-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: _interface_rds_index_interface_rds_index_component__WEBPACK_IMPORTED_MODULE_3__["InterfaceRdsIndexComponent"],
        data: { breadcrumb: "dadosRds", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    }
];
var InterfaceRdsRoutingModule = /** @class */ (function () {
    function InterfaceRdsRoutingModule() {
    }
    InterfaceRdsRoutingModule = __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"]]
        })
    ], InterfaceRdsRoutingModule);
    return InterfaceRdsRoutingModule;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-especificos-cargill-movimentos-interface-rds-interface-rds-module.js.map