(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-especificos-rocha-movimentos-controle-envase-controle-envase-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-filter/controle-envase-filter.component.html":
/*!***********************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-filter/controle-envase-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=\"controle-envase-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"modal-dialog\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.controleEnvase' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\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=\"periodoDe\" class=\"required\">{{\"labels.periodoDe\" | translate\r\n                                    }}</label>\r\n                                <app-data id=\"periodoDe\" name=\"periodoDe\" [(ngModel)]=\"service.filtro.dataI\" autofocus\r\n                                    class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\" required=\"true\"\r\n                                    (executa)=\"validaDatas()\">\r\n                                </app-data>\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=\"ate\" class=\"required\">{{\"labels.ate\" | translate}}</label>\r\n                                <app-data id=\"ate\" name=\"ate\" [(ngModel)]=\"service.filtro.dataF\" class=\"dataHora\"\r\n                                    [formatDateTime]=\"mascara.getFormatData\" required=\"true\" (executa)=\"validaDatas()\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario id=\"cliente\" name=\"cliente\" tipoDestinatario=\"C\"\r\n                                    modalTitle=\"pesquisaDeCliente\" label=\"cliente\"\r\n                                    [(ngModel)]=\"service.filtro.destinatarioIdCliente\" showInscricao=\"false\"\r\n                                    showCgcCpf=\"false\" [inSelected]=\"service.filtro.cliente\"\r\n                                    (outSelected)=\"service.filtro.cliente = $event\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-material id=\"materialId\" name=\"materialId\" label=\"produto\"\r\n                                    modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"service.filtro.materialId\"\r\n                                    [inSelected]=\"service.filtro.material\"\r\n                                    (outSelected)=\"service.filtro.material = $event\">\r\n                                </app-pesquisa-material>\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                            <label for=\"transfdeProdutosId\">{{ 'labels.documento' | translate }}</label>\r\n                            <input type=\"text\" class=\"form-control-sm form-control text-right\" name=\"transfdeProdutosId\"\r\n                                id=\"transfdeProdutosId\" [(ngModel)]=\"service.filtro.transfdeProdutosId\"\r\n                                (keypress)=\"funcoesService.apenasNumeros($event)\">\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/rocha/movimentos/controle-envase/controle-envase-form/controle-envase-form.component.html":
/*!*******************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-form/controle-envase-form.component.html ***!
  \*******************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaForm\" [formAction]=\"actionForm\"\n    [itemData]=\"data.transfdeProdutosId\" [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <app-form-legenda></app-form-legenda>\n    <div class=\"card-body widget-body\">\n        <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\n            <app-validacoes></app-validacoes>\n            <div class=\"row\">\n                <div class=\"col-lg-3 col-md-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"documento\">{{'labels.documento' | translate}}</label>\n                        <input id=\"documento\" name=\"documento\" [(ngModel)]=\"data.transfdeProdutosId\"\n                            class=\"form-control form-control-sm\" type=\"text\" [disabled]=\"true\" maxlength=\"20\">\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <div class=\"form-check-inline\">\n                            <input type=\"radio\" name=\"envase\" class=\"form-check-input\" value=\"E\" required=\"true\"\n                                [(ngModel)]=\"data.flagEnvase\" [disabled]=\"funcoesService.isDetail(actionForm)\" /> {{\n                            'labels.envase' |\n                            translate }}\n                        </div>\n                        <div class=\"form-check-inline\">\n                            <input type=\"radio\" name=\"desenvase\" class=\"form-check-input\" value=\"D\" required=\"true\"\n                                [(ngModel)]=\"data.flagEnvase\" [disabled]=\"funcoesService.isDetail(actionForm)\" /> {{\n                            'labels.desenvase'\n                            | translate }}\n                        </div>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3 col-md-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"data\" class=\"required\">{{\n                            \"labels.data\" | translate\n                            }}</label>\n                        <app-data-h-m-s id=\"data\" name=\"data\" [(ngModel)]=\"data.dtMovimento\" class=\"dataHora\"\n                            [disabled]=\"funcoesService.isDetail(actionForm)\" required></app-data-h-m-s>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-9 col-md-10 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <app-pesquisa-destinatario id=\"cliente\" name=\"cliente\" tipoDestinatario=\"C\"\n                            modalTitle=\"pesquisaDeCliente\" label=\"cliente\" [(ngModel)]=\"data.destinatarioIdCliente\"\n                            showInscricao=\"false\" showCgcCpf=\"false\" [inSelected]=\"data.cliente\"\n                            [disabled]=\"!funcoesService.isCreate(actionForm)\">\n                        </app-pesquisa-destinatario>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-9 col-md-10 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <app-pesquisa-material id=\"materialId\" name=\"materialId\" label=\"produto\"\n                            modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"data.materialId\" [inSelected]=\"data.material\"\n                            [disabled]=\"!funcoesService.isCreate(actionForm)\">\n                        </app-pesquisa-material>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3 col-md-8 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <app-pesquisa-saldo-lote-deposito id=\"lote\" name=\"lote\" required=\"true\" [modalTitle]=\"'lotes'\"\n                            [disabled]=\"!funcoesService.isCreate(actionForm)\" [field]=\"'loteId'\"\n                            [options]=\"saldoLoteOptions\" [(ngModel)]=\"data.loteId\" (outModel)=\"trataLote($event)\">\n                        </app-pesquisa-saldo-lote-deposito>\n                    </div>\n                </div>\n                <div class=\"col-lg-3 col-md-8 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <app-pesquisa-sto-saldo-deposito id=\"origem\" name=\"origem\" required=\"true\"\n                            [modalTitle]=\"'deposito'\" [disabled]=\"!funcoesService.isCreate(actionForm)\"\n                            [field]=\"'tanqueId'\" [label]=\"'origem'\" [options]=\"stoSaldoDepositoOptions\"\n                            [(ngModel)]=\"data.tanqueId\" (outModel)=\"trataDeposito($event)\" [loteObrigatorio]=\"true\">\n                        </app-pesquisa-sto-saldo-deposito>\n                    </div>\n                </div>\n                <div class=\"col-lg-3 col-md-8 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <app-pesquisa-sto-saldo-deposito-descarga id=\"destino\" label=\"destino\" name=\"destino\"\n                            modalTitle=\"deposito\" [required]=\"true\" [(ngModel)]=\"data.tanqueIdDestino\"\n                            [materialId]=\"data.materialId\" [destinatarioIdCliente]=\"data.destinatarioIdCliente\"\n                            [dataMovimento]=\"data.dtMovimento\" [tipoSaldo]=\"2\" [modo]=\"3\" [planejTanque]=\"false\"\n                            [somenteAtivos]=\"false\" [movQuantid]=\"getMovQuantid()\"\n                            [disabled]=\"funcoesService.isDetail(actionForm)\" (outTanque)=\"trataDepositoDestino($event)\">\n                        </app-pesquisa-sto-saldo-deposito-descarga>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3 col-md-8 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"quantidade\">{{ \"labels.quantidade\" |\n                            translate }}</label>\n                        <input type=\"text\" id=\"quantidade\" name=\"quantidade\" [(ngModel)]=\"data.quantid\"\n                            class=\"form-control form-control-sm\" [disabled]=\"funcoesService.isDetail(actionForm)\"\n                            currencyMask [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                            (blur)=\"calcKilos()\" />\n                    </div>\n                </div>\n                <div class=\"col-lg-3 col-md-8 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"kilos\">{{ \"labels.kilos\" |\n                            translate }}</label>\n                        <input type=\"text\" id=\"kilos\" name=\"kilos\" [(ngModel)]=\"data.kilos\"\n                            class=\"form-control form-control-sm\" disabled currencyMask\n                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\" />\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-9 col-md-12 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"observacoes\">{{'labels.observacoes' | translate}}</label>\n                        <input id=\"observacoes\" name=\"observacoes\" [(ngModel)]=\"data.observ\"\n                            class=\"form-control form-control-sm\" type=\"text\"\n                            [disabled]=\"funcoesService.isDetail(actionForm)\">\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-12 mt-3\">\n                    <div class=\"form-group\">\n                        <button class=\"btn btn-success mr-2\" type=\"submit\"\n                            [disabled]=\"funcoesService.isDetail(actionForm)\">\n                            {{ 'buttons.salvar' | translate }}\n                        </button>\n                        <button class=\"btn btn-success mr-2\" (click)=\"saveAndCreate(f)\" type=\"button\"\n                            [disabled]=\"funcoesService.isDetail(actionForm)\">\n                            {{ 'buttons.salvarNovo' | translate }}\n                        </button>\n                    </div>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\" [formAction]=\"actionForm\"\n    [itemData]=\"data.transfdeProdutosId\" [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtControleEnvase\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n</div>\n\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n<app-controle-envase-filter (filtrar)=\"executaFiltro()\"></app-controle-envase-filter>");

/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-filter/controle-envase-filter.component.ts":
/*!*******************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-filter/controle-envase-filter.component.ts ***!
  \*******************************************************************************************************************************/
/*! exports provided: ControleEnvaseFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControleEnvaseFilterComponent", function() { return ControleEnvaseFilterComponent; });
/* 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_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
/* 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_config_enumerables__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _controle_envase_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../controle-envase.model */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.model.ts");
/* harmony import */ var _controle_envase_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../controle-envase.service */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.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 ControleEnvaseFilterComponent = /** @class */ (function () {
    function ControleEnvaseFilterComponent(service, messageService, funcoesService) {
        this.service = service;
        this.messageService = messageService;
        this.funcoesService = funcoesService;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_4__["Mascaras"]();
    }
    ControleEnvaseFilterComponent.prototype.ngOnInit = function () {
        if (!this.service.filtro)
            this.service.filtro = new _controle_envase_model__WEBPACK_IMPORTED_MODULE_5__["ControleEnvaseFilter"]();
    };
    ControleEnvaseFilterComponent.prototype.onSubmit = function (form) {
        if (form.invalid) {
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        this.filtrar.emit(this.service.filtro);
        jQuery("#controle-envase-filter-dialog").modal("hide");
    };
    ControleEnvaseFilterComponent.prototype.validaDatas = function () {
        if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["DateTimeUtilsStaticService"].menorA(this.service.filtro.dataF, this.service.filtro.dataI, ['H', 'M'])) {
            this.messageService.warning("titles.controleEnvase", "messages.periodoDeMaiorQueAte");
            return false;
        }
        return true;
    };
    ControleEnvaseFilterComponent.ctorParameters = function () { return [
        { type: _controle_envase_service__WEBPACK_IMPORTED_MODULE_6__["ControleEnvaseService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ControleEnvaseFilterComponent.prototype, "filtrar", void 0);
    ControleEnvaseFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-controle-envase-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./controle-envase-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-filter/controle-envase-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_controle_envase_service__WEBPACK_IMPORTED_MODULE_6__["ControleEnvaseService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"]])
    ], ControleEnvaseFilterComponent);
    return ControleEnvaseFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-form/controle-envase-form.component.ts":
/*!***************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-form/controle-envase-form.component.ts ***!
  \***************************************************************************************************************************/
/*! exports provided: ControleEnvaseFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControleEnvaseFormComponent", function() { return ControleEnvaseFormComponent; });
/* 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 _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _controle_envase_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../controle-envase.model */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.model.ts");
/* harmony import */ var _controle_envase_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../controle-envase.constants */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.constants.ts");
/* harmony import */ var _controle_envase_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../controle-envase.service */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.service.ts");
/* harmony import */ var app_pages_cadastro_tanque_tanque_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/pages/cadastro/tanque/tanque.service */ "./src/app/pages/cadastro/tanque/tanque.service.ts");
/* harmony import */ var app_pages_controle_baixa_produtos_lote_baixa_produtos_lote_model__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/pages/controle/baixa-produtos-lote/baixa-produtos-lote.model */ "./src/app/pages/controle/baixa-produtos-lote/baixa-produtos-lote.model.ts");
/* harmony import */ var app_pages_controle_baixa_produtos_lote_baixa_produtos_lote_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/pages/controle/baixa-produtos-lote/baixa-produtos-lote.service */ "./src/app/pages/controle/baixa-produtos-lote/baixa-produtos-lote.service.ts");
/* harmony import */ var app_pages_balanca_bal_requisicao_carga_bal_requisicao_carga_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! app/pages/balanca/bal-requisicao-carga/bal-requisicao-carga.service */ "./src/app/pages/balanca/bal-requisicao-carga/bal-requisicao-carga.service.ts");
/* harmony import */ var app_pages_cadastro_tanque_tanque_model__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! app/pages/cadastro/tanque/tanque.model */ "./src/app/pages/cadastro/tanque/tanque.model.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! app/shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/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 __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 ControleEnvaseFormComponent = /** @class */ (function (_super) {
    __extends(ControleEnvaseFormComponent, _super);
    function ControleEnvaseFormComponent(router, messageService, activatedRoute, funcoesService, permissoesUtils, destinatarioService, materialService, service, tanqueService, baixaProdutosLoteService, balRequisicaoCargaService) {
        var _this = _super.call(this, new _controle_envase_constants__WEBPACK_IMPORTED_MODULE_12__["ControleEnvaseConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.destinatarioService = destinatarioService;
        _this.materialService = materialService;
        _this.service = service;
        _this.tanqueService = tanqueService;
        _this.baixaProdutosLoteService = baixaProdutosLoteService;
        _this.balRequisicaoCargaService = balRequisicaoCargaService;
        _this.data = new _controle_envase_model__WEBPACK_IMPORTED_MODULE_11__["ControleEnvase"]();
        _this.habilitaCampos = true;
        _this.mensagens = [];
        _this.constantes = new _controle_envase_constants__WEBPACK_IMPORTED_MODULE_12__["ControleEnvaseConstants"]();
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_10__["Mascaras"]();
        _this.now = new Date();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/rocha/movimentos/controleEnvase";
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    ControleEnvaseFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () { return _this.carregarDados(); }, function () { return _this.permissoesUtils.back(); });
    };
    ControleEnvaseFormComponent.prototype.carregarDados = function () {
        var _this = this;
        var id = this.activatedRoute.snapshot.paramMap.get("id");
        if (!id)
            return;
        this.service.getByDocumento({ transfdeProdutosId: +id }).subscribe(function (resp) {
            if (!resp) {
                _this.messageService.warning("titles.controleEnvase", "messages.nenhumRegistroEncontrado");
                _this.back();
                return;
            }
            _this.data = resp;
            var destinatario$ = _this.destinatarioService.getById(resp.destinatarioIdCliente);
            var material$ = _this.materialService.getById(resp.materialId);
            var tanqueOrigem$ = _this.tanqueService.getById(btoa(resp.tanqueId));
            var tanqueDestino$ = _this.tanqueService.getById(btoa(resp.tanqueIdDestino));
            Object(rxjs__WEBPACK_IMPORTED_MODULE_22__["forkJoin"])([destinatario$, material$, tanqueOrigem$, tanqueDestino$]).subscribe(function (_a) {
                var cliente = _a[0], material = _a[1], origem = _a[2], destino = _a[3];
                _this.trataCliente(cliente);
                _this.trataMaterial(material);
                _this.trataDeposito(origem);
                _this.trataDepositoDestino(destino);
                _this.getValObterSaldoLb();
            });
        });
    };
    ControleEnvaseFormComponent.prototype.onSubmit = function (form, create) {
        var _this = this;
        if (create === void 0) { create = false; }
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_8__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        this.data.logRotina = "Controle de Envase/Desenvase";
        this.service
            .save(this.data, this.funcoesService.isEdit(this.actionForm))
            .subscribe(function (validationResult) {
            _this.mensagens = _this.messageService.validationResult(validationResult);
            if (!validationResult.isValid) {
                app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_8__["EventEmitterService"].get("backError").emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess("titles.controleEnvase");
                if (create) {
                    _this.data = new _controle_envase_model__WEBPACK_IMPORTED_MODULE_11__["ControleEnvase"]();
                    _this.router.navigate(["" + _this.target + _this.pageRoute + "/create"]);
                }
                else {
                    _this.back();
                }
            }
        });
    };
    ControleEnvaseFormComponent.prototype.edit = function () {
        this.router.navigate(["" + this.target + this.pageRoute + "/edit/" + this.data.transfdeProdutosId]);
    };
    ControleEnvaseFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    ControleEnvaseFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    ControleEnvaseFormComponent.prototype.trataCliente = function (cliente) {
        this.data.cliente = !!cliente ? cliente : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_7__["Destinatario"]();
    };
    ControleEnvaseFormComponent.prototype.trataMaterial = function (material) {
        this.data.material = material;
    };
    Object.defineProperty(ControleEnvaseFormComponent.prototype, "saldoLoteOptions", {
        get: function () {
            return {
                destinatarioIdCliente: this.data.destinatarioIdCliente,
                destinatarioIdEmitente: 0,
                materialId: this.data.materialId,
                tanqueId: "",
                loteId: "",
                sitLote: "A",
                modo: 2,
                tipoSaldo: 0,
                osgId: 0,
                dataMovimento: this.data.dtMovimento,
                localOperacaoId: 0,
                tipoAgrupa: "L",
                geraArquivo: "N",
                planejTanque: false
            };
        },
        enumerable: true,
        configurable: true
    });
    ControleEnvaseFormComponent.prototype.trataLote = function (event) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                if (this.funcoesService.stringUtils.isNotEmpty(event.lote)) {
                    this.data.lote = event.lote;
                }
                return [2 /*return*/];
            });
        });
    };
    Object.defineProperty(ControleEnvaseFormComponent.prototype, "saldoDepositoOptions", {
        get: function () {
            return {
                destinatarioIdCliente: this.data.destinatarioIdCliente,
                destinatarioIdEmitente: 0,
                materialId: this.data.materialId,
                tanqueId: "",
                loteId: this.data.loteId,
                sitLote: "A",
                modo: 2,
                tipoSaldo: 0,
                osgId: 0,
                dataMovimento: this.data.dtMovimento,
                localOperacaoId: 0,
                tipoAgrupa: "D",
                geraArquivo: "S",
                planejTanque: false
            };
        },
        enumerable: true,
        configurable: true
    });
    ControleEnvaseFormComponent.prototype.trataDeposito = function (e) {
        var _this = this;
        this.data.tanque = e;
        this.tanqueService.getById(btoa(this.data.tanque.tanqueId)).subscribe(function (resp) {
            _this.verificaDepositoValidoCarga(resp, 'tanque');
            _this.getValObterSaldoLb();
        });
    };
    ControleEnvaseFormComponent.prototype.getValObterSaldoLb = function () {
        var _this = this;
        var filtro = new app_pages_controle_baixa_produtos_lote_baixa_produtos_lote_model__WEBPACK_IMPORTED_MODULE_15__["BaixaProdutosLoteFiltroObterSaldo"]();
        filtro.materialId = this.data.materialId;
        filtro.destinatarioIdCliente = this.data.destinatarioIdCliente;
        filtro.loteId = this.data.loteId;
        filtro.tanqueId = this.data.tanqueId;
        filtro.dtData = this.data.dtMovimento;
        this.baixaProdutosLoteService.getObterSaldoLb(filtro).subscribe(function (resp) {
            if (!resp) {
                _this.messageService.warning("titles.controleEnvase", "messages.loteInvalido");
                _this.data.tanqueId = undefined;
                return;
            }
            else {
                // Saldo Liberado
                _this.loteLB = resp;
            }
        });
    };
    Object.defineProperty(ControleEnvaseFormComponent.prototype, "saldoDepositoDestinoOptions", {
        get: function () {
            return {
                destinatarioIdCliente: this.data.destinatarioIdCliente,
                destinatarioIdEmitente: 0,
                materialId: this.data.materialId,
                tanqueId: this.data.tanqueId,
                loteId: "",
                sitLote: "A",
                modo: 0,
                tipoSaldo: 0,
                osgId: 0,
                dataMovimento: this.data.dtMovimento,
                localOperacaoId: 0,
                tipoAgrupa: "D",
                geraArquivo: "S",
                planejTanque: false
            };
        },
        enumerable: true,
        configurable: true
    });
    ControleEnvaseFormComponent.prototype.trataDepositoDestino = function (e) {
        var _this = this;
        if (!e || (e && !e.tanqueId)) {
            return;
        }
        this.data.tanqueDestino = e;
        this.tanqueService.getById(btoa(this.data.tanqueDestino.tanqueId)).subscribe(function (resp) {
            _this.movQuantid = resp.movQuantid;
            if (resp.movQuantid === "S") {
                _this.capacidadeEmb = resp.capacidadeEmb;
                _this.pesoEmbalagem = resp.pesoEmbalagem;
            }
        });
    };
    ControleEnvaseFormComponent.prototype.verificaDepositoValidoCarga = function (tanque, campo) {
        return __awaiter(this, void 0, void 0, function () {
            var ret, valido;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!this.funcoesService.isCreate(this.actionForm)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.balRequisicaoCargaService.getDepositoValidoCarga({
                                tanqueId: tanque.tanqueId,
                                materialId: this.data.materialId,
                                destinatarioIdCliente: this.data.destinatarioIdCliente,
                                dt: this.data.dtMovimento,
                                localOperacaoId: tanque.localOperacaoId
                            }).toPromise()];
                    case 1:
                        ret = _a.sent();
                        if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["StringUtilsStaticService"].isNotEmpty(ret.msg)) {
                            this.messageService.warning("titles.controleEnvase", ret.msg);
                            return [2 /*return*/];
                        }
                        valido = app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_20__["BooleanUtilsStaticService"].toBoolean(ret.outValido);
                        if (!valido) {
                            this.messageService.warning("titles.controleEnvase", "messages.informeOutroDeposito");
                            this.data[campo] = new app_pages_cadastro_tanque_tanque_model__WEBPACK_IMPORTED_MODULE_18__["Tanque"]();
                            this.data[campo].tanqueId = undefined;
                            return [2 /*return*/];
                        }
                        _a.label = 2;
                    case 2:
                        this.data[campo] = tanque;
                        this.movQuantid = tanque.movQuantid;
                        if (tanque.movQuantid === "S") {
                            this.capacidadeEmb = tanque.capacidadeEmb;
                            this.pesoEmbalagem = tanque.pesoEmbalagem;
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    ControleEnvaseFormComponent.prototype.calcKilos = function () {
        if (!this.data.loteId) {
            this.messageService.warning("titles.controleEnvase", "messages.selecioneUmLote");
            this.data.quantid = 0;
            return;
        }
        this.data.kilos = this.data.quantid * app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_21__["NumberUtilsStaticService"].toNumber(this.capacidadeEmb);
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_21__["NumberUtilsStaticService"].toNumber(this.data.kilos) !== 0) {
            if (this.data.kilos > app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_21__["NumberUtilsStaticService"].toNumber(this.loteLB.kilosComLib)) {
                this.messageService.warning("titles.controleEnvase", "messages.saldoMaximooPermitido", { value: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_21__["NumberUtilsStaticService"].getCurrency(app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_21__["NumberUtilsStaticService"].toNumber(this.loteLB.kilosComLib), 0) });
                return;
            }
        }
    };
    ControleEnvaseFormComponent.prototype.getMovQuantid = function () {
        return this.data.flagEnvase === "E" ? "S" : "N";
    };
    Object.defineProperty(ControleEnvaseFormComponent.prototype, "stoSaldoDepositoOptions", {
        get: function () {
            return {
                destinatarioIdCliente: this.data.destinatarioIdCliente,
                materialId: this.data.materialId,
                tanqueId: "",
                loteId: this.data.loteId,
                tipoDeposito: '',
                movQuantid: this.data.flagEnvase === "E" ? "N" : "S",
                osgId: 0,
                tipoSaldo: 2,
                modo: 3,
                dataRef: this.data.dtMovimento,
                planejTanque: "N",
                localOperacaoId: 0
            };
        },
        enumerable: true,
        configurable: true
    });
    ControleEnvaseFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_9__["MaterialService"] },
        { type: _controle_envase_service__WEBPACK_IMPORTED_MODULE_13__["ControleEnvaseService"] },
        { type: app_pages_cadastro_tanque_tanque_service__WEBPACK_IMPORTED_MODULE_14__["TanqueService"] },
        { type: app_pages_controle_baixa_produtos_lote_baixa_produtos_lote_service__WEBPACK_IMPORTED_MODULE_16__["BaixaProdutosLoteService"] },
        { type: app_pages_balanca_bal_requisicao_carga_bal_requisicao_carga_service__WEBPACK_IMPORTED_MODULE_17__["BalRequisicaoCargaService"] }
    ]; };
    ControleEnvaseFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-controle-envase-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./controle-envase-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-form/controle-envase-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_9__["MaterialService"],
            _controle_envase_service__WEBPACK_IMPORTED_MODULE_13__["ControleEnvaseService"],
            app_pages_cadastro_tanque_tanque_service__WEBPACK_IMPORTED_MODULE_14__["TanqueService"],
            app_pages_controle_baixa_produtos_lote_baixa_produtos_lote_service__WEBPACK_IMPORTED_MODULE_16__["BaixaProdutosLoteService"],
            app_pages_balanca_bal_requisicao_carga_bal_requisicao_carga_service__WEBPACK_IMPORTED_MODULE_17__["BalRequisicaoCargaService"]])
    ], ControleEnvaseFormComponent);
    return ControleEnvaseFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-index/controle-envase-index.component.ts":
/*!*****************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-index/controle-envase-index.component.ts ***!
  \*****************************************************************************************************************************/
/*! exports provided: ControleEnvaseIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControleEnvaseIndexComponent", function() { return ControleEnvaseIndexComponent; });
/* 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 _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_8__ = __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 _controle_envase_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../controle-envase.model */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.model.ts");
/* harmony import */ var _controle_envase_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../controle-envase.constants */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.constants.ts");
/* harmony import */ var _controle_envase_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../controle-envase.service */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.service.ts");
/* harmony import */ var app_pages_controle_baixa_produtos_lote_baixa_produtos_lote_model__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/pages/controle/baixa-produtos-lote/baixa-produtos-lote.model */ "./src/app/pages/controle/baixa-produtos-lote/baixa-produtos-lote.model.ts");
/* harmony import */ var app_pages_controle_baixa_produtos_lote_baixa_produtos_lote_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/pages/controle/baixa-produtos-lote/baixa-produtos-lote.service */ "./src/app/pages/controle/baixa-produtos-lote/baixa-produtos-lote.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
















var ControleEnvaseIndexComponent = /** @class */ (function (_super) {
    __extends(ControleEnvaseIndexComponent, _super);
    function ControleEnvaseIndexComponent(router, service, datatablesService, funcoesService, messageService, permissoesUtils, loginService, baixaProdutosLoteService) {
        var _this = _super.call(this, new _controle_envase_constants__WEBPACK_IMPORTED_MODULE_10__["ControleEnvaseConstants"](), funcoesService) || this;
        _this.router = router;
        _this.service = service;
        _this.datatablesService = datatablesService;
        _this.funcoesService = funcoesService;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.baixaProdutosLoteService = baixaProdutosLoteService;
        _this.data = new _controle_envase_model__WEBPACK_IMPORTED_MODULE_9__["ControleEnvase"]();
        _this.dados = new _controle_envase_model__WEBPACK_IMPORTED_MODULE_9__["ControleEnvaseIndex"]();
        _this.constantes = new _controle_envase_constants__WEBPACK_IMPORTED_MODULE_10__["ControleEnvaseConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/rocha/movimentos/controleEnvase";
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    ControleEnvaseIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoesService.abrirFiltro) {
                    app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["ModalUtilsStaticService"].openModal('controle-envase-filter-dialog');
                }
                else {
                    _this.refresh();
                }
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    ControleEnvaseIndexComponent.prototype.filtrar = function () {
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["ModalUtilsStaticService"].openModal('controle-envase-filter-dialog');
        });
    };
    ControleEnvaseIndexComponent.prototype.executaFiltro = function () {
        this.refresh();
    };
    ControleEnvaseIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.getByFilter(this.service.filtro).subscribe(function (data) {
            var columns = [
                _this.datatablesService.getDataString("transfdeProdutosId", "documento", "15%"),
                _this.datatablesService.getDataDateTime("dtMovimento", "data", "DD/MM/YYYY HH:mm", "15%"),
                _this.datatablesService.getDataString("cliente", "cliente"),
                _this.datatablesService.getDataString("produto", "produto"),
                _this.datatablesService.getDataString("tanqueId", "origem"),
                _this.datatablesService.getDataString("tanqueIdDestino", "destino")
            ];
            _this.datatablesService.toDataTable({ tableId: "dtControleEnvase", columns: columns, data: data }, function (aData) {
                _this.data = aData;
            });
        });
    };
    ControleEnvaseIndexComponent.prototype.print = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _this.constantes.paramRelatorio = {
                filialId: _this.loginService.getLogin().filialId,
                transfdeProdutosId: _this.service.filtro.transfdeProdutosId,
                dataI: _this.service.filtro.dataI,
                dataF: _this.service.filtro.dataF,
                destinatarioIdCliente: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_14__["NumberUtilsStaticService"].toNumber(_this.service.filtro.destinatarioIdCliente),
                materialId: app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_15__["StringUtilsStaticService"].toString(_this.service.filtro.materialId)
            };
            _super.prototype.print.call(_this, null, true);
        });
    };
    ControleEnvaseIndexComponent.prototype.remove = function () {
        var _this = this;
        if (!!(this.data.transfdeProdutosId)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
                if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_14__["NumberUtilsStaticService"].toNumber(_this.data.cliFelRegPrograma) !== 0) {
                    _this.messageService.warning("titles.controleEnvase", "messages.transferenciaGeradaOutraRotinaExclusao");
                    return;
                }
                else {
                    _this.messageService.removeConfirm(function () {
                        _this.service.remove(_this.data).subscribe(function () {
                            _this.service.remove(_this.data);
                            _this.datatablesService.remove("dtControleEnvase");
                        });
                    });
                }
            });
        }
    };
    ControleEnvaseIndexComponent.prototype.create = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            _this.router.navigate(["" + _this.target + _this.pageRoute + "/create"]);
        });
    };
    ControleEnvaseIndexComponent.prototype.edit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            if (_this.funcoesService.isNotUndefinedOrNull(_this.data.transfdeProdutosId)) {
                var filtro = new app_pages_controle_baixa_produtos_lote_baixa_produtos_lote_model__WEBPACK_IMPORTED_MODULE_12__["BaixaProdutosLoteFiltroObterSaldo"]();
                filtro.materialId = _this.data.materialId;
                filtro.destinatarioIdCliente = _this.data.destinatarioIdCliente;
                filtro.loteId = _this.data.loteId;
                filtro.tanqueId = _this.data.tanqueId;
                filtro.dtData = _this.data.dtMovimento;
                _this.baixaProdutosLoteService.getObterSaldoLb(filtro).subscribe(function (resp) {
                    if (!resp) {
                        _this.messageService.warning("titles.controleEnvase", "messages.loteInvalido");
                        return;
                    }
                    else {
                        _this.router.navigate(["" + _this.target + _this.pageRoute + "/edit/" + _this.data.transfdeProdutosId]);
                    }
                });
            }
        });
    };
    ControleEnvaseIndexComponent.prototype.detail = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            _this.router.navigate(["" + _this.target + _this.pageRoute + "/detail/" + _this.data.transfdeProdutosId]);
        });
    };
    ControleEnvaseIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function () {
            _super.prototype.properties.call(_this, _this.data);
        });
    };
    ControleEnvaseIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    ControleEnvaseIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _controle_envase_service__WEBPACK_IMPORTED_MODULE_11__["ControleEnvaseService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"] },
        { type: app_pages_controle_baixa_produtos_lote_baixa_produtos_lote_service__WEBPACK_IMPORTED_MODULE_13__["BaixaProdutosLoteService"] }
    ]; };
    ControleEnvaseIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-controle-envase-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./controle-envase-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-index/controle-envase-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _controle_envase_service__WEBPACK_IMPORTED_MODULE_11__["ControleEnvaseService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"],
            app_pages_controle_baixa_produtos_lote_baixa_produtos_lote_service__WEBPACK_IMPORTED_MODULE_13__["BaixaProdutosLoteService"]])
    ], ControleEnvaseIndexComponent);
    return ControleEnvaseIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.constants.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.constants.ts ***!
  \*************************************************************************************************/
/*! exports provided: ControleEnvaseConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControleEnvaseConstants", function() { return ControleEnvaseConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ControleEnvaseConstants = /** @class */ (function () {
    function ControleEnvaseConstants() {
        this.sisFormularioId = 65671;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.inclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.exclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "PTL";
        this.nomeForm = "titles.controleEnvase";
        this.reportId = "ROC0046";
        this.reportTitulo = { "titulo": "", "subTitulo": "" };
        this.listaIndex = [
            { title: 'Novo', action: 'create', icon: "icon-plus", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Visualizar', action: 'detail', icon: "icon-eye", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Excluir', action: 'remove', icon: "icon-close", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: 'print', icon: "icon-printer", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Propriedade', action: 'properties', icon: "icon-menu", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
        ];
        this.listaForm = [
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
    }
    return ControleEnvaseConstants;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.model.ts":
/*!*********************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.model.ts ***!
  \*********************************************************************************************/
/*! exports provided: ControleEnvaseIndex, ControleEnvase, ControleEnvaseFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControleEnvaseIndex", function() { return ControleEnvaseIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControleEnvase", function() { return ControleEnvase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControleEnvaseFilter", function() { return ControleEnvaseFilter; });
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var ControleEnvaseIndex = /** @class */ (function (_super) {
    __extends(ControleEnvaseIndex, _super);
    function ControleEnvaseIndex() {
        var _this = _super.call(this) || this;
        _this.transfdeProdutosId = 0;
        _this.dtMovimento = new Date();
        _this.tanqueId = "";
        _this.tanqueIdDestino = "";
        _this.tipoOper = "L";
        _this.kilos = 0;
        _this.litros = 0;
        _this.loteId = "";
        _this.loteIdDestino = "";
        _this.quantidDest = 0;
        _this.codMov = "06";
        _this.flagMovimentacaoFisica = "";
        _this.cliFelRegPrograma = 0;
        _this.quantid = 0;
        _this.observ = "";
        return _this;
    }
    return ControleEnvaseIndex;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var ControleEnvase = /** @class */ (function (_super) {
    __extends(ControleEnvase, _super);
    function ControleEnvase() {
        var _this = _super.call(this) || this;
        _this.transfdeProdutosId = 0;
        _this.dtMovimento = new Date();
        _this.flagEnvase = "E";
        _this.quantid = 0;
        _this.kilos = 0;
        _this.observ = "";
        return _this;
    }
    return ControleEnvase;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var ControleEnvaseFilter = /** @class */ (function (_super) {
    __extends(ControleEnvaseFilter, _super);
    function ControleEnvaseFilter() {
        var _this = _super.call(this) || this;
        _this.transfdeProdutosId = 0;
        var currentDate = new Date();
        currentDate.setDate(currentDate.getDate() - 1);
        _this.dataI = currentDate;
        _this.dataF = new Date();
        _this.destinatarioIdCliente = 0;
        _this.materialId = "";
        return _this;
    }
    return ControleEnvaseFilter;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.module.ts":
/*!**********************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.module.ts ***!
  \**********************************************************************************************/
/*! exports provided: ControleEnvaseModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControleEnvaseModule", function() { return ControleEnvaseModule; });
/* 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 _controle_envase_index_controle_envase_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./controle-envase-index/controle-envase-index.component */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-index/controle-envase-index.component.ts");
/* harmony import */ var _controle_envase_form_controle_envase_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./controle-envase-form/controle-envase-form.component */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-form/controle-envase-form.component.ts");
/* harmony import */ var _controle_envase_filter_controle_envase_filter_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./controle-envase-filter/controle-envase-filter.component */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-filter/controle-envase-filter.component.ts");
/* harmony import */ var _controle_envase_routing_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./controle-envase.routing.module */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.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 ControleEnvaseModule = /** @class */ (function () {
    function ControleEnvaseModule() {
    }
    ControleEnvaseModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [
                _controle_envase_index_controle_envase_index_component__WEBPACK_IMPORTED_MODULE_2__["ControleEnvaseIndexComponent"],
                _controle_envase_form_controle_envase_form_component__WEBPACK_IMPORTED_MODULE_3__["ControleEnvaseFormComponent"],
                _controle_envase_filter_controle_envase_filter_component__WEBPACK_IMPORTED_MODULE_4__["ControleEnvaseFilterComponent"]
            ],
            imports: [
                _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"],
                _controle_envase_routing_module__WEBPACK_IMPORTED_MODULE_5__["ControleEnvaseRoutingModule"]
            ]
        })
    ], ControleEnvaseModule);
    return ControleEnvaseModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.routing.module.ts":
/*!******************************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.routing.module.ts ***!
  \******************************************************************************************************/
/*! exports provided: ControleEnvaseRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControleEnvaseRoutingModule", function() { return ControleEnvaseRoutingModule; });
/* 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 _controle_envase_index_controle_envase_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./controle-envase-index/controle-envase-index.component */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-index/controle-envase-index.component.ts");
/* harmony import */ var _controle_envase_form_controle_envase_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./controle-envase-form/controle-envase-form.component */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase-form/controle-envase-form.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};





var ControleEnvaseRoutes = [
    {
        path: "",
        component: _controle_envase_index_controle_envase_index_component__WEBPACK_IMPORTED_MODULE_3__["ControleEnvaseIndexComponent"],
        data: {
            breadcrumb: "controleEnvase",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index }
        }
    },
    {
        path: "create",
        component: _controle_envase_form_controle_envase_form_component__WEBPACK_IMPORTED_MODULE_4__["ControleEnvaseFormComponent"],
        data: {
            breadcrumb: "controleEnvase",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create }
        }
    },
    {
        path: "detail/:id",
        component: _controle_envase_form_controle_envase_form_component__WEBPACK_IMPORTED_MODULE_4__["ControleEnvaseFormComponent"],
        data: {
            breadcrumb: "controleEnvase",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    },
    {
        path: "edit/:id",
        component: _controle_envase_form_controle_envase_form_component__WEBPACK_IMPORTED_MODULE_4__["ControleEnvaseFormComponent"],
        data: {
            breadcrumb: "controleEnvase",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    }
];
var ControleEnvaseRoutingModule = /** @class */ (function () {
    function ControleEnvaseRoutingModule() {
    }
    ControleEnvaseRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(ControleEnvaseRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], ControleEnvaseRoutingModule);
    return ControleEnvaseRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.service.ts":
/*!***********************************************************************************************!*\
  !*** ./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.service.ts ***!
  \***********************************************************************************************/
/*! exports provided: ControleEnvaseService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControleEnvaseService", function() { return ControleEnvaseService; });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var app_shared_services_base_specifics_base_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/base/specifics.base.service */ "./src/app/shared/services/base/specifics.base.service.ts");
/* harmony import */ var _controle_envase_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./controle-envase.model */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.model.ts");
/* harmony import */ var _controle_envase_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./controle-envase.constants */ "./src/app/pages/especificos/rocha/movimentos/controle-envase/controle-envase.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 __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};








var ControleEnvaseService = /** @class */ (function (_super) {
    __extends(ControleEnvaseService, _super);
    function ControleEnvaseService(http) {
        var _this = _super.call(this, http, "rocha/movimentos/controleEnvase") || this;
        _this.http = http;
        _this.constantes = new _controle_envase_constants__WEBPACK_IMPORTED_MODULE_7__["ControleEnvaseConstants"]();
        _this.filtro = new _controle_envase_model__WEBPACK_IMPORTED_MODULE_6__["ControleEnvaseFilter"]();
        return _this;
    }
    ControleEnvaseService.prototype.getByFilter = function (filter) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].specifics_service_url + "/api/v1/rocha/movimentos/controleEnvase/getByFiltro", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    ControleEnvaseService.prototype.getByDocumento = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].specifics_service_url + "/api/v1/rocha/movimentos/controleEnvase/getByDocumento", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    ControleEnvaseService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] }
    ]; };
    ControleEnvaseService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"]])
    ], ControleEnvaseService);
    return ControleEnvaseService;
}(app_shared_services_base_specifics_base_service__WEBPACK_IMPORTED_MODULE_5__["SpecificsBaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-especificos-rocha-movimentos-controle-envase-controle-envase-module.js.map