(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-especificos-cargill-consultas-acomp-da-operacao-acomp-da-operacao-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-depositos/acomp-da-operacao-depositos.component.html":
/*!************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-depositos/acomp-da-operacao-depositos.component.html ***!
  \************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"row\">\r\n    <div class=\"col-lg-12\">\r\n        <app-form-legenda></app-form-legenda>\r\n        <div class=\"card-body widget-body\">\r\n            <form class=\"form\" #f=\"ngForm\">\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                        <div class=\"form-group form-group-sm\">\r\n                            <label for=\"totalOperado\">{{'labels.totalOperado' | translate}}</label>\r\n                            <input id=\"totalOperado\" name=\"totalOperado\" value=\"{{data.peso | formatCurrency:0}}\"\r\n                                class=\"form-control form-control-sm\" type=\"text\" maxlength=\"11\" disabled\r\n                                style=\"font-size: 14px;background-color: yellow;text-align: right;font-weight: 700;\">\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"clearfix\">&nbsp;</div>\r\n                <div class=\"row\">\r\n                    <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                        <table id=\"maintable\" class=\"table table-striped table-bordered table-hover nowrap table-sm\">\r\n                            <tr>\r\n                                <th>{{'buttons.excluir'|translate}}</th>\r\n                                <th> {{\"labels.deposito\" | translate}} </th>\r\n                                <th> {{\"labels.kilos\" | translate}} </th>\r\n                            </tr>\r\n                            <tbody>\r\n                                <tr *ngFor=\"let val of depositos; index as i\" (click)=\"selected(val, i)\"\r\n                                    [ngClass]=\"{'info': i == currentIndex ? true : false}\">\r\n                                    <td class=\"px-50-c\">\r\n                                        <button type=\"button\" (click)=\"excluirDeposito(val)\"\r\n                                            class=\"btn btn-sm btn-danger\">\r\n                                            <i class=\"fa fa-remove\"></i>\r\n                                        </button>\r\n                                    </td>\r\n                                    <td class=\"px-200-r\"> {{ val?.deposito }} </td>\r\n                                    <td class=\"px-200-r\">{{ val?.kilos | formatCurrency: 0 }} </td>\r\n                                </tr>\r\n                                <tr *ngIf=\"!hasDados\">\r\n                                    <ng-container>\r\n                                        <th colspan=\"2\">{{'messages.nenhumRegistroEncontrado' | translate }}</th>\r\n                                    </ng-container>\r\n                                </tr>\r\n                            </tbody>\r\n                        </table>\r\n                    </div>\r\n                    <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                        <app-card-container tituloCard=\"dadosParaDesmembramento\">\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=\"deposito\" class=\"required\">{{\r\n                                            'labels.deposito' | translate\r\n                                            }}</label>\r\n                                        <app-combo-padrao id=\"tanqueId\" name=\"deposito\" tabela=\"Tanque\" chave=\"Deposito\"\r\n                                            descricao=\"DescrDeposito\" ativos=\"true\" flagAtivo=\"S\" required\r\n                                            [filialId]=\"service.filialId\"\r\n                                            [(ngModel)]=\"dataDeposito.deposito\">\r\n                                        </app-combo-padrao>\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=\"kilos\" class=\"required\">{{'labels.kilos' | translate}}</label>\r\n                                        <input id=\"kilos\" name=\"kilos\" [(ngModel)]=\"dataDeposito.kilos\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\" maxlength=\"11\" required\r\n                                            currencyMask [options]=\"funcoesService.optionCurrency(0)\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                    <div class=\"form-group\">\r\n                                        <button class=\"btn btn-success mr-2\" type=\"button\"\r\n                                            (click)=\"desmembrarDeposito(this.dataDeposito)\"\r\n                                            [disabled]=\"!dataDeposito.deposito || !dataDeposito.kilos\"><i\r\n                                                class=\"fa fa-expand\"></i>\r\n                                            {{ 'buttons.desmembrarDeposito' | translate }}\r\n                                        </button>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </app-card-container>\r\n                    </div>\r\n                </div>\r\n            </form>\r\n        </div>\r\n\r\n    </div>\r\n    <app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\r\n</div>");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"acomp-da-operacao-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\n    <div class=\"modal-dialog modal-lg\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.acompDaOperacao' | translate }}</h6>\n            </div>\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\n                <app-validacoes></app-validacoes>\n                <div class=\"modal-body\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"timer\">\n                                    {{ 'labels.intervaloDeVerificacao' | translate }}:\n                                    <strong> {{ value }} {{ 'labels.minutos' | translate }}</strong>\n                                </label>\n                                <div class=\"custom-slider\">\n                                    <ng5-slider id=\"timer\" [(value)]=\"value\" [options]=\"options\"\n                                        (valueChange)=\"trataConsulta(this.value)\"></ng5-slider>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-5 col-md-4 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"stoLaudoId\" class=\"required\">{{\n                                    \"labels.laudo\" | translate\n                                    }}</label>\n                                <select class=\"form-control form-control-sm\" [(ngModel)]=\"service.filtro.stoLaudoId\"\n                                    id=\"stoLaudoId\" name=\"stoLaudoId\" (change)=\"getItemLaudo()\" required>\n                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\n                                    <option *ngFor=\"let t of laudos\" value=\"{{t.stoLaudoId}}\">\n                                        {{t.descricao}}\n                                    </option>\n                                </select>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-7 col-md-8 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-input-description label=\"navio\" [valueID]=\"service.filtro.destinatarioIdNavio\"\n                                    [valueDescription]=\"service?.filtro?.navio?.fantasia\">\n                                </app-input-description>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-5 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"item\" class=\"required\">\n                                    {{'labels.itemLaudo' | translate}}</label>\n                                <select class=\"form-control form-control-sm\" [(ngModel)]=\"service.filtro.itemLaudoId\"\n                                    id=\"item\" name=\"item\" (change)=\"trataItem()\" required>\n                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\n                                    <option *ngFor=\"let val of itensLaudo\" value=\"{{val.item}}\">\n                                        {{val.descricao}}\n                                    </option>\n                                </select>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-7 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-input-description label=\"produto\" [valueID]=\"service?.filtro?.materialId\"\n                                    [valueDescription]=\"service?.filtro?.material?.fantasia\">\n                                </app-input-description>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.pesquisar' | translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-index/acomp-da-operacao-index.component.html":
/*!****************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-index/acomp-da-operacao-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]=\"service.data.codPesagem\" [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <div class=\"row\">\n        <div class=\"col-lg-2\" *ngIf=\"exibirPrevisto\">\n            <div class=\"form-group form-group-sm\">\n                <label>{{ \"labels.previsto\" | translate }}</label>\n                <input type=\"text\" id=\"quantidadePlanejada\" name=\"quantidadePlanejada\" [(ngModel)]=\"dadosgetQtdStoLaudoItem.quantidadePlanejada\"\n                    class=\"form-control form-control-sm\" (blur)=\"saveQtdStoLaudoItem()\"\n                    required currencyMask appNumbersPositive\n                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\n            </div>\n        </div>\n        <div class=\"col-lg-2\" *ngIf=\"exbirDados\">\n            <div class=\"form-group form-group-sm\">\n                <label>{{ \"labels.movimentacao\" | translate }}</label> \n                <input type=\"text\" id=\"total\" name=\"total\" [(ngModel)]=\"totalPeso\" \n                    class=\"form-control form-control-sm\" [disabled]=\"true\"\n                    required currencyMask appNumbersPositive\n                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\n            </div>\n        </div>\n        <div class=\"col-lg-2\" *ngIf=\"exbirDados\">\n            <div class=\"form-group form-group-sm\">\n                <label for=\"diferenca\"> {{ 'labels.diferenca' | translate }}</label>\n                <input id=\"diferenca\" name=\"diferenca\" maxlength=\"18\"\n                    [(ngModel)]=\"diferenca\" class=\"form-control form-control-sm\"\n                    type=\"text\" [disabled]=\"true\"\n                    required currencyMask appNumbersPositive\n                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\n            </div>\n        </div>\n    </div>\n    <table id=\"dtAcompDaOperacao\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n    <div class=\"clearfix\">&nbsp;</div>\n    <div class=\"row\" *ngIf=\"exbirDados\">\n        <div class=\"col-4\">\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <div class=\"table-responsive\">\n                        <div class=\"section-comand-bar p-0\">\n                            <table class=\"table table-striped table-bordered table-hover nowrap table-sm\" id=\"bandaC\">\n                                <thead>\n                                    <tr>\n                                        <th colspan=\"6\" style=\"text-align: center;\">{{'labels.deposito' | translate}}\n                                        </th>\n                                    </tr>\n                                    <tr>\n                                        <th>{{'labels.DescrDeposito' | translate}}</th>\n                                        <th class=\"col-right\">{{'labels.peso' | translate}}</th>\n                                    </tr>\n                                </thead>\n                                <tbody>\n                                    <tr *ngFor=\"let item of dadosBandaC; let i = index\">\n                                        <td>{{ item.deposito }}</td>\n                                        <td style=\"text-align: right;\">{{ item.peso | formatCurrency }}</td>\n                                    </tr>\n                                    <tr *ngIf=\"!hasDadosBandaC\">\n                                        <th colspan=\"16\" style=\"text-align: center\">\n                                            {{ \"messages.nenhumRegistroEncontrado\" | translate }}\n                                        </th>\n                                    </tr>\n                                </tbody>\n                            </table>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n        <div class=\"col-4\">\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <div class=\"table-responsive\">\n                        <div class=\"section-comand-bar p-0\">\n                            <table class=\"table table-striped table-bordered table-hover nowrap table-sm\" id=\"bandaD\">\n                                <thead>\n                                    <tr>\n                                        <th colspan=\"6\" style=\"text-align: center;\">{{'labels.porao' | translate}}</th>\n                                    </tr>\n                                    <tr>\n                                        <th>{{'labels.DescrPorao' | translate}}</th>\n                                        <th class=\"col-right\">{{'labels.peso' | translate}}</th>\n                                    </tr>\n                                </thead>\n                                <tbody>\n                                    <tr *ngFor=\"let item of dadosBandaD; let i = index\">\n                                        <td>{{ item.descrPorao }}</td>\n                                        <td style=\"text-align: right;\">{{ item.peso | formatCurrency }}</td>\n                                    </tr>\n                                    <tr *ngIf=\"!hasDadosBandaD\">\n                                        <th colspan=\"16\" style=\"text-align: center\">\n                                            {{ \"messages.nenhumRegistroEncontrado\" | translate }}\n                                        </th>\n                                    </tr>\n                                </tbody>\n                            </table>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n        <div class=\"col-4\">\n            <div class=\"row\">\n                <div class=\"col-12\">\n                    <div class=\"table-responsive\">\n                        <div class=\"section-comand-bar p-0\">\n                            <table class=\"table table-striped table-bordered table-hover nowrap table-sm\" id=\"bandaE\">\n                                <thead>\n                                    <tr>\n                                        <th colspan=\"6\" style=\"text-align: center;\">{{'labels.torre' | translate}}</th>\n                                    </tr>\n                                    <tr>\n                                        <th>{{'labels.DescrTorre' | translate}}</th>\n                                        <th class=\"col-right\">{{'labels.peso' | translate}}</th>\n                                    </tr>\n                                </thead>\n                                <tbody>\n                                    <tr *ngFor=\"let item of dadosBandaE; let i = index\">\n                                        <td>{{ item.descrTorre }}</td>\n                                        <td style=\"text-align: right;\">{{ item.peso | formatCurrency }}</td>\n                                    </tr>\n                                    <tr *ngIf=\"!hasDadosBandaE\">\n                                        <th colspan=\"16\" style=\"text-align: center\">\n                                            {{ \"messages.nenhumRegistroEncontrado\" | translate }}\n                                        </th>\n                                    </tr>\n                                </tbody>\n                            </table>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\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-acomp-da-operacao-filter (filtrar)=\"executaFiltro($event)\"></app-acomp-da-operacao-filter>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-da-torre/acomp-da-operacao-posicionamento-da-torre.component.html":
/*!****************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-da-torre/acomp-da-operacao-posicionamento-da-torre.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.listaPosicionamentoTorre\"\r\n    [sisFormularioId]=\"constantes.sisFormularioId\" [itemData]=\"data.codPesagem\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"row mt-2\">\r\n    <div class=\"col-12 pb-2\">\r\n        <app-card-container>\r\n            <div class=\"mt-2\">\r\n                <div class=\"tab-content top mb-3\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label>{{'labels.laudo' | translate}}</label>\r\n                                <input id=\"laudo\" name=\"laudo\" value=\"{{data.stoLaudoId}}\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-input-description label=\"navio\" [valueID]=\"dataLaudo?.navio?.destinatarioId\"\r\n                                    [valueDescription]=\"dataLaudo?.navio?.fantasia\">\r\n                                </app-input-description>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"dtLaudo\">{{ \"labels.dataHora\" | translate }}</label>\r\n                                <input id=\"dtLaudo\" name=\"dataHora\" class=\"form-control form-control-sm\"\r\n                                    value=\"{{ dataLaudo?.dtMovimento | date: 'dd/MM/yyyy HH:mm:ss' }}\" disabled>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n\r\n                <div class=\"container-buttons\" *ngIf=\"!showAdd\">\r\n                    <div class=\"btn-group\">\r\n                        <app-menu-button title=\"{{ 'buttons.novo' | translate }}\" [icon]=\"'icon-plus'\"\r\n                            (click)=\"novaTorre()\">\r\n                        </app-menu-button>\r\n                        <app-menu-button title=\"{{ 'buttons.visualizar' | translate }}\" [icon]=\"'icon-eye'\"\r\n                            (click)=\"detail()\"\r\n                            [disabled]=\"funcoesService.showButtons.detail(actionFormTorre, dataTorreAux.item)\">\r\n                        </app-menu-button>\r\n                        <app-menu-button title=\"{{ 'buttons.editar' | translate }}\" [icon]=\"'icon-pencil'\"\r\n                            (click)=\"edit()\"\r\n                            [disabled]=\"funcoesService.showButtons.edit(actionFormTorre, dataTorreAux.item)\">\r\n                        </app-menu-button>\r\n                        <app-menu-button title=\"{{ 'buttons.excluir' | translate }}\" [icon]=\"'icon-close'\"\r\n                            (click)=\"excluirTorre()\"\r\n                            [disabled]=\"funcoesService.showButtons.remove(actionFormTorre, dataTorreAux.item)\">\r\n                        </app-menu-button>\r\n                    </div>\r\n                </div>\r\n\r\n                <div class=\"row\" *ngIf=\"!showAdd\">\r\n                    <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                        <table id=\"maintable\" class=\"table table-striped table-bordered table-hover nowrap table-sm\">\r\n                            <tr>\r\n                                <th> {{\"labels.torre\" | translate}} </th>\r\n                                <th> {{\"labels.data\" | translate}} </th>\r\n                            </tr>\r\n                            <tbody>\r\n                                <tr *ngFor=\"let d of pesagemFluxoTorre\" (click)=\"dataTorreAux = d\"\r\n                                    [ngClass]=\"{'info': d.item === dataTorreAux.item}\">\r\n                                    <td class=\"px-200-r\">{{ d?.descrTorre }}</td>\r\n                                    <td class=\"px-200-r\">{{ d?.dtMovimento | date: 'dd/MM/yyyy HH:mm:ss' }}</td>\r\n                                </tr>\r\n                                <tr *ngIf=\"!hasDados\">\r\n                                    <th colspan=\"2\">{{'messages.nenhumRegistroEncontrado' | translate }}</th>\r\n                                </tr>\r\n                            </tbody>\r\n                        </table>\r\n                    </div>\r\n                </div>\r\n\r\n                <div *ngIf=\"showAdd\">\r\n\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 container-buttons\">\r\n                            <div class=\"btn-group\">\r\n                                <app-menu-button title=\"{{ 'buttons.editar' | translate }}\" [icon]=\"'fa fa-edit'\"\r\n                                    (click)=\"edit()\"\r\n                                    [disabled]=\"funcoesService.showButtons.edit(actionFormTorre, dataTorres.item)\">\r\n                                </app-menu-button>\r\n                                <app-menu-button title=\"{{ 'buttons.voltar' | translate }}\" [icon]=\"'fa fa-arrow-left'\"\r\n                                    (click)=\"backLista()\"></app-menu-button>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n\r\n                    <form class=\"form\" #f=\"ngForm\">\r\n                        <app-validacoes></app-validacoes>\r\n                        <div class=\"tab-content top\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                                    <app-card-container>\r\n                                        <app-form-legenda></app-form-legenda>\r\n\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"torre\" class=\"required\">{{ \"labels.torre\" | translate }}</label>\r\n                                            <app-combo-padrao id=\"torre\" name=\"torre\"\r\n                                                [disabled]=\"funcoesService.isDetail(actionFormTorre)\"\r\n                                                [(ngModel)]=\"dataTorres.codTorre\" tabela=\"TorrePier\" chave=\"CodTorre\"\r\n                                                descricao=\"DescrTorre\" ativos=\"true\">\r\n                                            </app-combo-padrao>\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=\"dtMovimento\" class=\"required\">{{ \"labels.dataHora\" |\r\n                                                        translate }}</label>\r\n                                                    <app-data-h-m-s id=\"dtMovimento\" name=\"dataHora\"\r\n                                                        [(ngModel)]=\"dataTorres.dtMovimento\" required\r\n                                                        [disabled]=\"funcoesService.isDetail(actionFormTorre)\">\r\n                                                    </app-data-h-m-s>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"row mt-2\">\r\n                                            <div class=\"col-12\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <button class=\"btn btn-success mr-2\"\r\n                                                        (click)=\"corpWebPesPesagemTorreGrava(this.dataTorres)\"\r\n                                                        type=\"button\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionFormTorre)\">\r\n                                                        {{ 'buttons.salvar' | translate }}\r\n                                                    </button>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                    </app-card-container>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </form>\r\n                </div>\r\n            </div>\r\n        </app-card-container>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-do-rateio/acomp-da-operacao-posicionamento-do-rateio.component.html":
/*!******************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-do-rateio/acomp-da-operacao-posicionamento-do-rateio.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.listaPosicionamentoTorre\"\r\n    [sisFormularioId]=\"constantes.sisFormularioId\" [itemData]=\"data.codPesagem\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"row mt-2\">\r\n    <div class=\"col-12 pb-2\">\r\n        <app-card-container>\r\n            <div class=\"mt-2\">\r\n                <div class=\"tab-content top mb-3\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label>{{'labels.laudo' | translate}}</label>\r\n                                <input id=\"laudo\" name=\"laudo\" value=\"{{data.stoLaudoId}}\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-input-description label=\"navio\" [valueID]=\"dataLaudo?.navio?.destinatarioId\"\r\n                                    [valueDescription]=\"dataLaudo?.navio?.fantasia\">\r\n                                </app-input-description>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"dtLaudo\">{{ \"labels.dataHora\" | translate }}</label>\r\n                                <input id=\"dtLaudo\" name=\"dataHora\" class=\"form-control form-control-sm\"\r\n                                    value=\"{{ dataLaudo?.dtMovimento | date: 'dd/MM/yyyy HH:mm:ss' }}\" disabled>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n\r\n                <div class=\"container-buttons\" *ngIf=\"!showAdd\">\r\n                    <div class=\"btn-group\">\r\n                        <app-menu-button title=\"{{ 'buttons.novo' | translate }}\" [icon]=\"'icon-plus'\" (click)=\"new()\">\r\n                        </app-menu-button>\r\n                        <app-menu-button title=\"{{ 'buttons.visualizar' | translate }}\" [icon]=\"'icon-eye'\"\r\n                            (click)=\"detail()\"\r\n                            [disabled]=\"funcoesService.showButtons.detail(actionFormRateio, dataRateioAux.item)\">\r\n                        </app-menu-button>\r\n                        <app-menu-button title=\"{{ 'buttons.editar' | translate }}\" [icon]=\"'icon-pencil'\"\r\n                            (click)=\"edit()\"\r\n                            [disabled]=\"funcoesService.showButtons.edit(actionFormRateio, dataRateioAux.item)\">\r\n                        </app-menu-button>\r\n                        <app-menu-button title=\"{{ 'buttons.excluir' | translate }}\" [icon]=\"'icon-close'\"\r\n                            (click)=\"excluir()\"\r\n                            [disabled]=\"funcoesService.showButtons.remove(actionFormRateio, dataRateioAux.item)\">\r\n                        </app-menu-button>\r\n                    </div>\r\n                </div>\r\n\r\n                <div class=\"row\" *ngIf=\"!showAdd\">\r\n                    <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                        <table id=\"maintable\" class=\"table table-striped table-bordered table-hover nowrap table-sm\">\r\n                            <tr>\r\n                                <th> {{\"labels.armazem\" | translate}} </th>\r\n                                <th style=\"text-align: right;\"> {{\"labels.percentRateio\" | translate}} </th>\r\n                                <th> {{\"labels.armazem\" | translate}} </th>\r\n                                <th style=\"text-align: right;\">{{\"labels.percentRateio\" | translate}} </th>\r\n                                <th> {{\"labels.armazem\" | translate}} </th>\r\n                                <th style=\"text-align: right;\"> {{\"labels.percentRateio\" | translate}} </th>\r\n                                <th> {{\"labels.dataHora\" | translate}} </th>\r\n                            </tr>\r\n                            <tbody>\r\n                                <tr *ngFor=\"let d   of pesagemFluxoRateio | removeExcluidos;let i = index\" (click)=\"selected(d, i)\"\r\n                                    [ngClass]=\"{'info': d.item === dataRateioAux.item}\">\r\n                                    <td class=\"px-200-r\">{{ d?.deposito1 }}</td>\r\n                                    <td style=\"text-align: right;\">{{ d?.ptDeposito1 | formatCurrency: 2 }}</td>\r\n                                    <td class=\"px-200-r\">{{ d?.deposito2 }}</td>\r\n                                    <td style=\"text-align: right;\">{{ d?.ptDeposito2 | formatCurrency: 2 }}</td>\r\n                                    <td class=\"px-200-r\">{{ d?.deposito3 }}</td>\r\n                                    <td style=\"text-align: right;\">{{ d?.ptDeposito3 | formatCurrency: 2 }}</td>\r\n                                    <td class=\"px-200-r\">{{ d?.dtMovimento | date: 'dd/MM/yyyy HH:mm:ss' }}</td>\r\n                                </tr>\r\n                                <tr *ngIf=\"!hasDados\">\r\n                                    <th colspan=\"10\">{{'messages.nenhumRegistroEncontrado' | translate }}</th>\r\n                                </tr>\r\n                            </tbody>\r\n                        </table>\r\n                    </div>\r\n                </div>\r\n\r\n                <div *ngIf=\"showAdd\">\r\n\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 container-buttons\">\r\n                            <div class=\"btn-group\">\r\n                                <app-menu-button title=\"{{ 'buttons.editar' | translate }}\" [icon]=\"'fa fa-edit'\"\r\n                                    (click)=\"edit()\"\r\n                                    [disabled]=\"funcoesService.showButtons.edit(actionFormRateio, dataRateio.item)\">\r\n                                </app-menu-button>\r\n                                <app-menu-button title=\"{{ 'buttons.voltar' | translate }}\" [icon]=\"'fa fa-arrow-left'\"\r\n                                    (click)=\"backLista()\"></app-menu-button>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n\r\n                    <form class=\"form\" #f=\"ngForm\">\r\n                        <app-validacoes></app-validacoes>\r\n                        <div class=\"tab-content top\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                                    <app-card-container>\r\n                                        <app-form-legenda></app-form-legenda>\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=\"armazem\" class=\"required\">{{ \"labels.armazem\" |\r\n                                                        translate }}</label>\r\n                                                    <app-combo-padrao id=\"deposito1\" name=\"deposito1\"\r\n                                                        [disabled]=\"true\"\r\n                                                        [(ngModel)]=\"dataRateio.deposito1\"\r\n                                                        (ngModelChange)=\"onDepositoChange(dataRateio.deposito1,'dep1')\"\r\n                                                        required=\"true\" tabela=\"Tanque\" chave=\"Deposito\"\r\n                                                        descricao=\"DescrDeposito\" flagAtivo=\"S\" ativos=\"true\">\r\n                                                    </app-combo-padrao>\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=\"percentRateio\" class=\"required\">{{\"labels.percentRateio\"\r\n                                                        |\r\n                                                        translate }}</label>\r\n                                                    <input class=\"form-control form-control-sm\" id=\"ptDeposito1\"\r\n                                                        name=\"ptDeposito1\" currencyMask\r\n                                                        [(ngModel)]=\"dataRateio.ptDeposito1\" type=\"text\" maxlength=\"6\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionFormRateio)\"\r\n                                                        (blur)=\"trataCampos()\"\r\n                                                        class=\"form-control form-control-sm col-lg-6 col-md-6 col-sm-12\"\r\n                                                        [options]=\"funcoesService.optionCurrency(2)\" />\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"row mt-2\">\r\n                                            <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <app-combo-padrao id=\"deposito2\" name=\"deposito2\"\r\n                                                        [disabled]=\"disabledInputs\" [(ngModel)]=\"dataRateio.deposito2\"\r\n                                                        (ngModelChange)=\"onDepositoChange(dataRateio.deposito2,'dep2')\"\r\n                                                        tabela=\"Tanque\" chave=\"Deposito\" descricao=\"DescrDeposito\"\r\n                                                        flagAtivo=\"S\" ativos=\"true\">\r\n                                                    </app-combo-padrao>\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                                                    <input class=\"form-control form-control-sm\" id=\"ptDeposito2\"\r\n                                                        name=\"ptDeposito2\" currencyMask\r\n                                                        [(ngModel)]=\"dataRateio.ptDeposito2\" type=\"text\" maxlength=\"6\"\r\n                                                        (blur)=\"trataCampos()\" [disabled]=\"disabledInputs\"\r\n                                                        class=\"form-control form-control-sm col-lg-6 col-md-6 col-sm-12\"\r\n                                                        [options]=\"funcoesService.optionCurrency(2)\" />\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"row mt-2\">\r\n                                            <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <app-combo-padrao id=\"deposito3\" name=\"deposito3\"\r\n                                                        [disabled]=\"disabledInputs || disabled3\"\r\n                                                        [(ngModel)]=\"dataRateio.deposito3\"\r\n                                                        (ngModelChange)=\"onDepositoChange(dataRateio.deposito3,'dep3')\"\r\n                                                        tabela=\"Tanque\" chave=\"Deposito\" descricao=\"DescrDeposito\"\r\n                                                        flagAtivo=\"S\" ativos=\"true\">\r\n                                                    </app-combo-padrao>\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                                                    <input class=\"form-control form-control-sm\" id=\"ptDeposito3\"\r\n                                                        name=\"ptDeposito3\" currencyMask\r\n                                                        [(ngModel)]=\"dataRateio.ptDeposito3\" type=\"text\" maxlength=\"6\"\r\n                                                        [disabled]=\"disabledInputs || disabled3\"\r\n                                                        class=\"form-control form-control-sm col-lg-6 col-md-6 col-sm-12\"\r\n                                                        [options]=\"funcoesService.optionCurrency(2)\" />\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=\"dtMovimento\" class=\"required\">{{ \"labels.dataHora\" |\r\n                                                        translate }}</label>\r\n                                                    <app-data-h-m-s id=\"dtMovimento\" name=\"dataHora\"\r\n                                                        [(ngModel)]=\"dataRateio.dtMovimento\" required\r\n                                                        [disabled]=\"funcoesService.isDetail(actionFormRateio)\">\r\n                                                    </app-data-h-m-s>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"row mt-2\">\r\n                                            <div class=\"col-12\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <button class=\"btn btn-success mr-2\"\r\n                                                        (click)=\"salvar(this.dataRateio)\" type=\"button\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionFormRateio)\">\r\n                                                        {{ 'buttons.salvar' | translate }}\r\n                                                    </button>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                    </app-card-container>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </form>\r\n                </div>\r\n            </div>\r\n        </app-card-container>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-tanque-porao/acomp-da-operacao-posicionamento-tanque-porao.component.html":
/*!************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-tanque-porao/acomp-da-operacao-posicionamento-tanque-porao.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.listaTanquePorao\" [sisFormularioId]=\"constantes.sisFormularioId\"\r\n    [itemData]=\"data.codPesagem\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"row mt-2\">\r\n    <div class=\"col-12 pb-2\">\r\n        <app-card-container>\r\n            <div class=\"mt-2\">\r\n                <div class=\"tab-content top mb-3\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-3 col-md-3 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label>{{'labels.laudo' | translate}}</label>\r\n                                <input id=\"laudo\" name=\"laudo\" value=\"{{data.stoLaudoId}}\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-input-description label=\"navio\" [valueID]=\"dataLaudo?.navio?.destinatarioId\"\r\n                                    [valueDescription]=\"dataLaudo?.navio?.fantasia\">\r\n                                </app-input-description>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"dtMovimento\">{{ \"labels.dataHora\" | translate }}</label>\r\n                                <input id=\"dtMovimento\" name=\"dataHora\" class=\"form-control form-control-sm\"\r\n                                    value=\"{{ dataLaudo?.dtMovimento | date: 'dd/MM/yyyy HH:mm:ss' }}\" disabled>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n\r\n                <div class=\"container-buttons\" *ngIf=\"!showAdd\">\r\n                    <div class=\"btn-group\">\r\n                        <app-menu-button title=\"{{ 'buttons.novo' | translate }}\" [icon]=\"'icon-plus'\"\r\n                            (click)=\"novoTanque()\">\r\n                        </app-menu-button>\r\n                        <app-menu-button title=\"{{ 'buttons.visualizar' | translate }}\" [icon]=\"'icon-eye'\"\r\n                            (click)=\"detail()\"\r\n                            [disabled]=\"funcoesService.showButtons.detail(actionFormTanque, dataTanqueAux.item)\">\r\n                        </app-menu-button>\r\n                        <app-menu-button title=\"{{ 'buttons.editar' | translate }}\" [icon]=\"'icon-pencil'\"\r\n                            (click)=\"edit()\"\r\n                            [disabled]=\"funcoesService.showButtons.edit(actionFormTanque, dataTanqueAux.item)\">\r\n                        </app-menu-button>\r\n                        <app-menu-button title=\"{{ 'buttons.excluir' | translate }}\" [icon]=\"'icon-close'\"\r\n                            (click)=\"excluirTanque()\"\r\n                            [disabled]=\"funcoesService.showButtons.remove(actionFormTanque, dataTanqueAux.item)\">\r\n                        </app-menu-button>\r\n                    </div>\r\n                </div>\r\n\r\n                <div class=\"row\" *ngIf=\"!showAdd\">\r\n                    <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                        <table id=\"maintable\" class=\"table table-striped table-bordered table-hover nowrap table-sm\">\r\n                            <tr>\r\n                                <th> {{\"labels.tanque\" | translate}} </th>\r\n                                <th> {{\"labels.data\" | translate}} </th>\r\n                            </tr>\r\n                            <tbody>\r\n                                <tr *ngFor=\"let d of pesagemFluxoTanque\" (click)=\"dataTanqueAux = d\"\r\n                                    [ngClass]=\"{'info': d.item === dataTanqueAux.item}\">\r\n                                    <td class=\"px-200-r\">{{ d?.tanque }}</td>\r\n                                    <td class=\"px-200-r\">{{ d?.dtMovimento | date: 'dd/MM/yyyy HH:mm:ss' }} </td>\r\n                                </tr>\r\n                                <tr *ngIf=\"!hasDados\">\r\n                                    <th colspan=\"2\">{{'messages.nenhumRegistroEncontrado' | translate }}</th>\r\n                                </tr>\r\n                            </tbody>\r\n                        </table>\r\n                    </div>\r\n                </div>\r\n\r\n                <div *ngIf=\"showAdd\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 container-buttons\">\r\n                            <div class=\"btn-group\">\r\n                                <app-menu-button title=\"{{ 'buttons.editar' | translate }}\" [icon]=\"'fa fa-edit'\"\r\n                                    (click)=\"edit()\"\r\n                                    [disabled]=\"funcoesService.showButtons.edit(actionFormTanque, dataTanques.item)\">\r\n                                </app-menu-button>\r\n                                <app-menu-button title=\"{{ 'buttons.voltar' | translate }}\" [icon]=\"'fa fa-arrow-left'\"\r\n                                    (click)=\"backLista()\"></app-menu-button>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n\r\n                    <form class=\"form\" #f=\"ngForm\">\r\n                        <app-validacoes></app-validacoes>\r\n                        <div class=\"tab-content top\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6 col-md-6 col-sm-12\">\r\n                                    <app-card-container>\r\n                                        <app-form-legenda></app-form-legenda>\r\n\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"tanqueId\" class=\"required\">{{\r\n                                                \"labels.tanquePorao\" | translate\r\n                                                }}</label>\r\n                                            <select class=\"form-control form-control-sm\" required\r\n                                                [disabled]=\"funcoesService.isDetail(actionFormTanque)\"\r\n                                                [(ngModel)]=\"dataTanques.tanque\" id=\"tanqueId\" name=\"tanquePorao\">\r\n                                                <option value=\"\">{{ 'labels.selecione' | translate }}</option>\r\n                                                <option *ngFor=\"let t of tanques\" value={{t.tanque}}>{{t.tanque}}\r\n                                                </option>\r\n                                            </select>\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=\"dtMovimento\" class=\"required\">{{\r\n                                                        \"labels.dataHora\" | translate\r\n                                                        }}</label>\r\n                                                    <app-data-h-m-s id=\"dtMovimento\" name=\"dataHora\"\r\n                                                        [(ngModel)]=\"dataTanques.dtMovimento\" required\r\n                                                        [disabled]=\"funcoesService.isDetail(actionFormTanque)\">\r\n                                                    </app-data-h-m-s>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"row mt-2\">\r\n                                            <div class=\"col-12\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <button class=\"btn btn-success mr-2\"\r\n                                                        (click)=\"corpWebPesPesagemTanqueGrava(this.dataTanques)\"\r\n                                                        type=\"button\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionFormTanque)\">\r\n                                                        {{ 'buttons.salvar' | translate }}\r\n                                                    </button>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                    </app-card-container>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </form>\r\n                </div>\r\n            </div>\r\n        </app-card-container>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-depositos/acomp-da-operacao-depositos.component.ts":
/*!********************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-depositos/acomp-da-operacao-depositos.component.ts ***!
  \********************************************************************************************************************************************/
/*! exports provided: AcompDaOperacaoDepositosComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoDepositosComponent", function() { return AcompDaOperacaoDepositosComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__ = __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_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_6__ = __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_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../acomp-da-operacao.model */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.model.ts");
/* harmony import */ var _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../acomp-da-operacao.service */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.service.ts");
/* harmony import */ var _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../acomp-da-operacao.constants */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.constants.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.service */ "./src/app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

















var AcompDaOperacaoDepositosComponent = /** @class */ (function (_super) {
    __extends(AcompDaOperacaoDepositosComponent, _super);
    function AcompDaOperacaoDepositosComponent(router, messageService, activatedRoute, service, pesagemBalancaDeFluxoService, funcoesService, loginService, permissoesUtils, configuracao, destinatarioService, materialService) {
        var _this = _super.call(this, new _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_10__["AcompDaOperacaoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.pesagemBalancaDeFluxoService = pesagemBalancaDeFluxoService;
        _this.funcoesService = funcoesService;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.configuracao = configuracao;
        _this.destinatarioService = destinatarioService;
        _this.materialService = materialService;
        _this.constantes = new _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_10__["AcompDaOperacaoConstants"]();
        _this.mensagens = [];
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        _this.depositoSelecionado = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_8__["PesagemFluxoDeposito"]();
        _this.dataDeposito = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_8__["PesagemFluxoDeposito"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/cargill/consultas/acompDaOperacao";
        _this.refresh = function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.pesagemBalancaDeFluxoService.getPesagemFluxoDeposito(this.data).subscribe(function (resp) {
                            _this.depositos = resp;
                        })];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        }); };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    AcompDaOperacaoDepositosComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.parametrosConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.data.codPesagem = this.funcoesService.getValue(this.activatedRoute.snapshot.paramMap.get("id"), "I");
                        if (!!this.loginService.isTokenExpired()) return [3 /*break*/, 3];
                        if (!this.funcoesService.isPositive(this.data.codPesagem)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.refresh()];
                    case 1:
                        _a.sent();
                        return [3 /*break*/, 3];
                    case 2:
                        this.data = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_8__["AcompDaOperacaoIndex"]();
                        _a.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        }); }, function () {
            _this.back();
        });
    };
    AcompDaOperacaoDepositosComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    AcompDaOperacaoDepositosComponent.prototype.onSubmit = function (form, create) {
        if (create === void 0) { create = false; }
        if (form.invalid) {
            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(form);
            return;
        }
    };
    Object.defineProperty(AcompDaOperacaoDepositosComponent.prototype, "hasDados", {
        get: function () {
            if (!app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ArrayUtilsStaticService"].any(this.depositos))
                return false;
            return this.depositos.length > 0;
        },
        enumerable: true,
        configurable: true
    });
    AcompDaOperacaoDepositosComponent.prototype.selected = function (item, index) {
        this.currentIndex = index;
        this.depositoSelecionado = item;
    };
    AcompDaOperacaoDepositosComponent.prototype.excluirDeposito = function (valor) {
        var _this = this;
        this.pesagemBalancaDeFluxoService.checaSeUltimoDeposito(valor).subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result);
            if (!result.isValid) {
                _this.messageService.warning("titles.pesagemBalancaDeFluxo", _this.mensagens[0]);
                return;
            }
            _this.messageService.confirm("titles.pesagemBalancaDeFluxo", "messages.confirmaExclusaoDoDeposito", null, function () {
                return _this.pesagemBalancaDeFluxoService.corpWebPesManutencaoPesagemDepositoExclui(valor).subscribe(function (result) {
                    _this.mensagens = _this.messageService.validationResult(result);
                    if (!result.isValid) {
                        _this.messageService.warning("titles.pesagemBalancaDeFluxo", _this.mensagens[0]);
                    }
                    else {
                        _this.messageService.success("Sucesso", "messages.depositoExcluido");
                        _this.refresh();
                    }
                });
            });
        });
    };
    AcompDaOperacaoDepositosComponent.prototype.desmembrarDeposito = function (dados) {
        var _this = this;
        this.dataDeposito = dados;
        this.dataDeposito.codPesagem = this.data.codPesagem;
        if (!!this.dataDeposito.deposito && !!this.dataDeposito.kilos) {
            if (!this.depositoSelecionado.deposito) {
                this.messageService.warning("titles.pesagemBalancaDeFluxo", "messages.selecioneODepositoASerDesmembrado");
                return;
            }
            this.dataDeposito.depositoVelho = this.depositoSelecionado.deposito;
            this.pesagemBalancaDeFluxoService.checaSeDepositoJaExiste(this.dataDeposito).subscribe(function (result) {
                _this.mensagens = _this.messageService.validationResult(result);
                if (!result.isValid) {
                    _this.messageService.warning("titles.pesagemBalancaDeFluxo", _this.mensagens[0]);
                    return;
                }
                if (_this.dataDeposito.kilos > _this.depositoSelecionado.kilos) {
                    _this.messageService.warning("titles.pesagemBalancaDeFluxo", "messages.kilosParaDesmDeveSerMenorQueAtual");
                    return;
                }
                var message = _this.messageService.getTranslates("messages", "confirmaDesmembramentoDoDeposito") + " " + _this.dataDeposito.depositoVelho;
                _this.messageService.confirm("titles.pesagemBalancaDeFluxo", message, null, function () {
                    return _this.pesagemBalancaDeFluxoService.corpWebPesManutencaoPesagemDepositoDesmembra(_this.dataDeposito).subscribe(function (result) {
                        _this.mensagens = _this.messageService.validationResult(result);
                        if (!result.isValid) {
                            _this.messageService.warning("titles.pesagemBalancaDeFluxo", _this.mensagens[0]);
                        }
                        else {
                            _this.messageService.success("Sucesso", "messages.depositoDesmembrado");
                            _this.refresh();
                        }
                    });
                });
            });
        }
        else {
            this.messageService.warning("titles.pesagemBalancaDeFluxo", "messages.depositoEPesoObrigatorios");
        }
    };
    AcompDaOperacaoDepositosComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_9__["AcompDaOperacaoService"] },
        { type: app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_16__["PesagemBalancaDeFluxoService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_13__["FuncoesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_14__["LoginService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_15__["PermissoesUtilsService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_7__["ConfiguracaoFacade"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_3__["DestinatarioService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_4__["MaterialService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_8__["AcompDaOperacaoIndex"])
    ], AcompDaOperacaoDepositosComponent.prototype, "data", void 0);
    AcompDaOperacaoDepositosComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-acomp-da-operacao-depositos',
            template: __importDefault(__webpack_require__(/*! raw-loader!./acomp-da-operacao-depositos.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-depositos/acomp-da-operacao-depositos.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_9__["AcompDaOperacaoService"],
            app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_16__["PesagemBalancaDeFluxoService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_13__["FuncoesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_14__["LoginService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_15__["PermissoesUtilsService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_7__["ConfiguracaoFacade"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_3__["DestinatarioService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_4__["MaterialService"]])
    ], AcompDaOperacaoDepositosComponent);
    return AcompDaOperacaoDepositosComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_11__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-filter/acomp-da-operacao-filter.component.ts":
/*!**************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-filter/acomp-da-operacao-filter.component.ts ***!
  \**************************************************************************************************************************************/
/*! exports provided: AcompDaOperacaoFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoFilterComponent", function() { return AcompDaOperacaoFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../acomp-da-operacao.service */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/pages/cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.service */ "./src/app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.service.ts");
/* harmony import */ var _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../acomp-da-operacao.model */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.model.ts");
/* harmony import */ var app_pages_operacao_sto_laudo_sto_laudo_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/pages/operacao/sto-laudo/sto-laudo.service */ "./src/app/pages/operacao/sto-laudo/sto-laudo.service.ts");
/* harmony import */ var _destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../destinatario/destinatario.service */ "./src/app/pages/especificos/cargill/consultas/destinatario/destinatario.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};













var AcompDaOperacaoFilterComponent = /** @class */ (function () {
    function AcompDaOperacaoFilterComponent(loginService, message, service, materialService, destinatarioService, pesagemBalancaDeFluxoService, stoLaudoService) {
        this.loginService = loginService;
        this.message = message;
        this.service = service;
        this.materialService = materialService;
        this.destinatarioService = destinatarioService;
        this.pesagemBalancaDeFluxoService = pesagemBalancaDeFluxoService;
        this.stoLaudoService = stoLaudoService;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.filtro = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_9__["AcompDaOperacaoFilter"]();
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_3__["Mascaras"]();
        this.data = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_9__["AcompDaOperacaoIndex"]();
        this.options = {
            floor: 0,
            ceil: 60,
            showTicks: true,
            step: 10
        };
        this.filialId = loginService.getLogin().filialId;
    }
    AcompDaOperacaoFilterComponent.prototype.ngOnInit = function () {
        this.value = 0;
        this.minValue = 10;
        this.maxValue = 60;
        this.service.filtro.intervaloVerificacao = this.value;
        this.getLaudosEmAberto();
    };
    AcompDaOperacaoFilterComponent.prototype.onSubmit = function (form) {
        if (form.invalid) {
            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        jQuery("#acomp-da-operacao-filter-dialog").modal("hide");
        this.filtrar.emit(this.service.filtro);
    };
    AcompDaOperacaoFilterComponent.prototype.trataMaterial = function (material) {
        this.service.filtro.material = material;
    };
    AcompDaOperacaoFilterComponent.prototype.trataNavio = function () {
        var _this = this;
        this.destinatarioService.getById(this.service.filtro.destinatarioIdNavio).subscribe(function (result) {
            _this.service.filtro.navio = result;
        });
    };
    AcompDaOperacaoFilterComponent.prototype.trataLaudo = function () {
        var _this = this;
        if (!!(this.service.filtro.stoLaudoId) && (this.service.filtro.stoLaudoId > 0)) {
            this.stoLaudoService.getById(this.service.filtro.stoLaudoId).subscribe(function (result) {
                _this.service.filtro.destinatarioIdNavio = result.destinatarioIdNavio;
                _this.resultadoItens = result.stoLaudoItems;
                _this.trataNavio();
            });
        }
    };
    AcompDaOperacaoFilterComponent.prototype.trataItem = function () {
        var _this = this;
        var item = this.resultadoItens.find(function (c) { return c.stoLaudoItemId == _this.service.filtro.itemLaudoId; });
        if (!!item) {
            this.service.filtro.material = item.material;
            this.service.filtro.materialId = item.materialId;
        }
    };
    AcompDaOperacaoFilterComponent.prototype.getLaudo = function () {
        var _this = this;
        this.pesagemBalancaDeFluxoService.getLaudo(this.data).subscribe(function (ret) {
            if (!!ret) {
                _this.laudos = ret;
            }
        });
    };
    AcompDaOperacaoFilterComponent.prototype.getLaudosEmAberto = function () {
        var _this = this;
        this.pesagemBalancaDeFluxoService.getLaudosEmAberto().subscribe(function (ret) {
            if (!!ret) {
                _this.laudos = ret;
            }
        });
    };
    AcompDaOperacaoFilterComponent.prototype.getItemLaudo = function () {
        var _this = this;
        if (this.service.filtro.stoLaudoId == 0) {
            console.log("zerando");
            this.service.filtro.destinatarioIdNavio = 0;
            this.service.filtro.materialId = '';
            this.service.filtro.material = new app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_7__["Material"]();
            this.service.filtro.navio = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_12__["Destinatario"]();
        }
        this.pesagemBalancaDeFluxoService.getItemLaudo({ stoLaudoId: this.service.filtro.stoLaudoId }).subscribe(function (resp) {
            if (!!resp) {
                _this.itensLaudo = resp;
            }
        });
        this.trataLaudo();
    };
    AcompDaOperacaoFilterComponent.prototype.trataConsulta = function (value) {
        this.service.filtro.intervaloVerificacao = value;
    };
    AcompDaOperacaoFilterComponent.ctorParameters = function () { return [
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_4__["LoginService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_1__["AcompDaOperacaoService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_6__["MaterialService"] },
        { type: _destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_11__["DestinatarioService"] },
        { type: app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_8__["PesagemBalancaDeFluxoService"] },
        { type: app_pages_operacao_sto_laudo_sto_laudo_service__WEBPACK_IMPORTED_MODULE_10__["StoLaudoService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], AcompDaOperacaoFilterComponent.prototype, "filtrar", void 0);
    AcompDaOperacaoFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-acomp-da-operacao-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./acomp-da-operacao-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-filter/acomp-da-operacao-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./acomp-da-operacao-filter.scss */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-filter/acomp-da-operacao-filter.scss")).default]
        }),
        __metadata("design:paramtypes", [app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_4__["LoginService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_1__["AcompDaOperacaoService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_6__["MaterialService"],
            _destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_11__["DestinatarioService"],
            app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_8__["PesagemBalancaDeFluxoService"],
            app_pages_operacao_sto_laudo_sto_laudo_service__WEBPACK_IMPORTED_MODULE_10__["StoLaudoService"]])
    ], AcompDaOperacaoFilterComponent);
    return AcompDaOperacaoFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-filter/acomp-da-operacao-filter.scss":
/*!******************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-filter/acomp-da-operacao-filter.scss ***!
  \******************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".custom-slider .ng5-slider .ng5-slider-bar {\n  background: #7874af;\n  height: 2px;\n}\n\n.custom-slider .ng5-slider .ng5-slider-selection {\n  background: #bd7d05;\n}\n\n.custom-slider .ng5-slider .ng5-slider-pointer {\n  width: 8px;\n  height: 16px;\n  top: auto;\n  /* to remove the default positioning */\n  bottom: 0;\n  background-color: #333;\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n\n.custom-slider .ng5-slider .ng5-slider-pointer:after {\n  display: none;\n}\n\n.custom-slider .ng5-slider .ng5-slider-bubble {\n  bottom: 14px;\n}\n\n.custom-slider .ng5-slider .ng5-slider-limit {\n  font-weight: bold;\n  color: #827eb5;\n}\n\n.custom-slider .ng5-slider .ng5-slider-tick {\n  width: 1px;\n  height: 10px;\n  margin-left: 4px;\n  border-radius: 0;\n  background: #827eb5;\n  top: -1px;\n}\n\n.custom-slider .ng5-slider .ng5-slider-tick.ng5-slider-selected {\n  background: #e49607;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvZXNwZWNpZmljb3MvY2FyZ2lsbC9jb25zdWx0YXMvYWNvbXAtZGEtb3BlcmFjYW8vYWNvbXAtZGEtb3BlcmFjYW8tZmlsdGVyL0M6XFxDb3Jwb3JhdGVcXENvcnBvcmF0ZVdlYkRlc2VudlxcX3VuaXNvbHV0aW9uL3NyY1xcYXBwXFxwYWdlc1xcZXNwZWNpZmljb3NcXGNhcmdpbGxcXGNvbnN1bHRhc1xcYWNvbXAtZGEtb3BlcmFjYW9cXGFjb21wLWRhLW9wZXJhY2FvLWZpbHRlclxcYWNvbXAtZGEtb3BlcmFjYW8tZmlsdGVyLnNjc3MiLCJzcmMvYXBwL3BhZ2VzL2VzcGVjaWZpY29zL2NhcmdpbGwvY29uc3VsdGFzL2Fjb21wLWRhLW9wZXJhY2FvL2Fjb21wLWRhLW9wZXJhY2FvLWZpbHRlci9hY29tcC1kYS1vcGVyYWNhby1maWx0ZXIuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLG1CQUFBO0VBQ0EsV0FBQTtBQ0NGOztBRENBO0VBQ0UsbUJBQUE7QUNFRjs7QURDQTtFQUNFLFVBQUE7RUFDQSxZQUFBO0VBQ0EsU0FBQTtFQUFXLHNDQUFBO0VBQ1gsU0FBQTtFQUNBLHNCQUFBO0VBQ0EsMkJBQUE7RUFDQSw0QkFBQTtBQ0dGOztBREFBO0VBQ0UsYUFBQTtBQ0dGOztBREFBO0VBQ0UsWUFBQTtBQ0dGOztBREFBO0VBQ0UsaUJBQUE7RUFDQSxjQUFBO0FDR0Y7O0FEQUE7RUFDRSxVQUFBO0VBQ0EsWUFBQTtFQUNBLGdCQUFBO0VBQ0EsZ0JBQUE7RUFDQSxtQkFBQTtFQUNBLFNBQUE7QUNHRjs7QURBQTtFQUNFLG1CQUFBO0FDR0YiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9lc3BlY2lmaWNvcy9jYXJnaWxsL2NvbnN1bHRhcy9hY29tcC1kYS1vcGVyYWNhby9hY29tcC1kYS1vcGVyYWNhby1maWx0ZXIvYWNvbXAtZGEtb3BlcmFjYW8tZmlsdGVyLnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuY3VzdG9tLXNsaWRlciAubmc1LXNsaWRlciAubmc1LXNsaWRlci1iYXIgIHtcclxuICBiYWNrZ3JvdW5kOiAjNzg3NGFmO1xyXG4gIGhlaWdodDogMnB4O1xyXG59XHJcbi5jdXN0b20tc2xpZGVyIC5uZzUtc2xpZGVyIC5uZzUtc2xpZGVyLXNlbGVjdGlvbiB7XHJcbiAgYmFja2dyb3VuZDogI2JkN2QwNTtcclxufVxyXG5cclxuLmN1c3RvbS1zbGlkZXIgLm5nNS1zbGlkZXIgLm5nNS1zbGlkZXItcG9pbnRlciB7XHJcbiAgd2lkdGg6IDhweDtcclxuICBoZWlnaHQ6IDE2cHg7XHJcbiAgdG9wOiBhdXRvOyAvKiB0byByZW1vdmUgdGhlIGRlZmF1bHQgcG9zaXRpb25pbmcgKi9cclxuICBib3R0b206IDA7XHJcbiAgYmFja2dyb3VuZC1jb2xvcjogIzMzMztcclxuICBib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAzcHg7XHJcbiAgYm9yZGVyLXRvcC1yaWdodC1yYWRpdXM6IDNweDtcclxufVxyXG5cclxuLmN1c3RvbS1zbGlkZXIgLm5nNS1zbGlkZXIgLm5nNS1zbGlkZXItcG9pbnRlcjphZnRlciB7XHJcbiAgZGlzcGxheTogbm9uZTtcclxufVxyXG5cclxuLmN1c3RvbS1zbGlkZXIgLm5nNS1zbGlkZXIgLm5nNS1zbGlkZXItYnViYmxlIHtcclxuICBib3R0b206IDE0cHg7XHJcbn1cclxuXHJcbi5jdXN0b20tc2xpZGVyIC5uZzUtc2xpZGVyIC5uZzUtc2xpZGVyLWxpbWl0IHtcclxuICBmb250LXdlaWdodDogYm9sZDtcclxuICBjb2xvcjogIzgyN2ViNTtcclxufVxyXG5cclxuLmN1c3RvbS1zbGlkZXIgLm5nNS1zbGlkZXIgLm5nNS1zbGlkZXItdGljayB7XHJcbiAgd2lkdGg6IDFweDtcclxuICBoZWlnaHQ6IDEwcHg7XHJcbiAgbWFyZ2luLWxlZnQ6IDRweDtcclxuICBib3JkZXItcmFkaXVzOiAwO1xyXG4gIGJhY2tncm91bmQ6ICM4MjdlYjU7XHJcbiAgdG9wOiAtMXB4O1xyXG59XHJcblxyXG4uY3VzdG9tLXNsaWRlciAubmc1LXNsaWRlciAubmc1LXNsaWRlci10aWNrLm5nNS1zbGlkZXItc2VsZWN0ZWQge1xyXG4gIGJhY2tncm91bmQ6ICNlNDk2MDc7XHJcbn1cclxuIiwiLmN1c3RvbS1zbGlkZXIgLm5nNS1zbGlkZXIgLm5nNS1zbGlkZXItYmFyIHtcbiAgYmFja2dyb3VuZDogIzc4NzRhZjtcbiAgaGVpZ2h0OiAycHg7XG59XG5cbi5jdXN0b20tc2xpZGVyIC5uZzUtc2xpZGVyIC5uZzUtc2xpZGVyLXNlbGVjdGlvbiB7XG4gIGJhY2tncm91bmQ6ICNiZDdkMDU7XG59XG5cbi5jdXN0b20tc2xpZGVyIC5uZzUtc2xpZGVyIC5uZzUtc2xpZGVyLXBvaW50ZXIge1xuICB3aWR0aDogOHB4O1xuICBoZWlnaHQ6IDE2cHg7XG4gIHRvcDogYXV0bztcbiAgLyogdG8gcmVtb3ZlIHRoZSBkZWZhdWx0IHBvc2l0aW9uaW5nICovXG4gIGJvdHRvbTogMDtcbiAgYmFja2dyb3VuZC1jb2xvcjogIzMzMztcbiAgYm9yZGVyLXRvcC1sZWZ0LXJhZGl1czogM3B4O1xuICBib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogM3B4O1xufVxuXG4uY3VzdG9tLXNsaWRlciAubmc1LXNsaWRlciAubmc1LXNsaWRlci1wb2ludGVyOmFmdGVyIHtcbiAgZGlzcGxheTogbm9uZTtcbn1cblxuLmN1c3RvbS1zbGlkZXIgLm5nNS1zbGlkZXIgLm5nNS1zbGlkZXItYnViYmxlIHtcbiAgYm90dG9tOiAxNHB4O1xufVxuXG4uY3VzdG9tLXNsaWRlciAubmc1LXNsaWRlciAubmc1LXNsaWRlci1saW1pdCB7XG4gIGZvbnQtd2VpZ2h0OiBib2xkO1xuICBjb2xvcjogIzgyN2ViNTtcbn1cblxuLmN1c3RvbS1zbGlkZXIgLm5nNS1zbGlkZXIgLm5nNS1zbGlkZXItdGljayB7XG4gIHdpZHRoOiAxcHg7XG4gIGhlaWdodDogMTBweDtcbiAgbWFyZ2luLWxlZnQ6IDRweDtcbiAgYm9yZGVyLXJhZGl1czogMDtcbiAgYmFja2dyb3VuZDogIzgyN2ViNTtcbiAgdG9wOiAtMXB4O1xufVxuXG4uY3VzdG9tLXNsaWRlciAubmc1LXNsaWRlciAubmc1LXNsaWRlci10aWNrLm5nNS1zbGlkZXItc2VsZWN0ZWQge1xuICBiYWNrZ3JvdW5kOiAjZTQ5NjA3O1xufSJdfQ== */");

/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-index/acomp-da-operacao-index.component.ts":
/*!************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-index/acomp-da-operacao-index.component.ts ***!
  \************************************************************************************************************************************/
/*! exports provided: AcompDaOperacaoIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoIndexComponent", function() { return AcompDaOperacaoIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_shared_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_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../acomp-da-operacao.constants */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.constants.ts");
/* harmony import */ var _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../acomp-da-operacao.model */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.model.ts");
/* harmony import */ var _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../acomp-da-operacao.service */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.service.ts");
/* harmony import */ var app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_11__ = __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_pages_login_login_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.service */ "./src/app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.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 AcompDaOperacaoIndexComponent = /** @class */ (function (_super) {
    __extends(AcompDaOperacaoIndexComponent, _super);
    function AcompDaOperacaoIndexComponent(router, datatablesService, messageService, loginService, configuracao, service, pesagemBalancaDeFluxoService, funcoesService, permissoesUtils) {
        var _this = _super.call(this, new _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_8__["AcompDaOperacaoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.datatablesService = datatablesService;
        _this.messageService = messageService;
        _this.loginService = loginService;
        _this.configuracao = configuracao;
        _this.service = service;
        _this.pesagemBalancaDeFluxoService = pesagemBalancaDeFluxoService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.mensagens = [];
        _this.constantes = new _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_8__["AcompDaOperacaoConstants"]();
        _this.title = "titles.pesagemBalancaDeFluxo";
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/cargill/consultas/acompDaOperacao";
        _this.hasDadosBandaC = false;
        _this.hasDadosBandaD = false;
        _this.hasDadosBandaE = false;
        _this.exbirDados = false;
        _this.exibirPrevisto = false;
        _this.loadConfig = function () {
            _this.service.configs.pesTeste = app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["BooleanUtilsStaticService"].toBoolean(_this.configuracao.string("PES", "PesTeste"));
            _this.service.configs.pesLimp = app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["BooleanUtilsStaticService"].toBoolean(_this.configuracao.string("PES", "PesLimp"));
            _this.service.configs.desmDepPes = app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["BooleanUtilsStaticService"].toBoolean(_this.configuracao.string("PES", "DesmDepPes"));
            _this.service.configs.tipoPesagem = app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["BooleanUtilsStaticService"].toBoolean(_this.configuracao.string("PES", "TipoPesagem"));
            _this.service.configs.liberaPesoZero = app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["BooleanUtilsStaticService"].toBoolean(_this.configuracao.string("PES", "liberaPesoZero"));
        };
        _this.ajustarDepositos = function () {
            if (!!_this.service.data.codPesagem) {
                _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 3, function () {
                    _this.router.navigate(["" + _this.target + _this.pageRoute + "/ajustarDepositos/" + _this.service.data.codPesagem]);
                });
            }
        };
        _this.ajustePesagem = function () {
            if (!!_this.service.data.codPesagem) {
                _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 4, function () {
                    _this.router.navigate(["" + _this.target + _this.pageRoute + "/ajustePesagem/" + _this.service.data.codPesagem]);
                });
            }
        };
        _this.posicionamentoDoRateio = function () {
            if (!!_this.service.data.codPesagem) {
                _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 6, function () {
                    _this.router.navigate(["" + _this.target + _this.pageRoute + "/posicionamentoRateio/" + _this.service.data.codPesagem]);
                });
            }
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    AcompDaOperacaoIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.parametrosConfig, this.loadConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoesService.abrirFiltro) {
                    _this.service.filtro = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_9__["AcompDaOperacaoFilter"]();
                    _this.funcoesService.openModal("acomp-da-operacao-filter-dialog");
                }
                else {
                    _this.refresh();
                }
            }
        }, function () { return _this.permissoesUtils.back(); }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: "ajustarDepositos", func: function () { return _this.ajustarDepositos; } },
            { action: "ajustePesagem", func: function () { return _this.ajustePesagem; } },
            { action: "posicionamentoDoRateio", func: function () { return _this.posicionamentoDoRateio; } },
        ]);
    };
    AcompDaOperacaoIndexComponent.prototype.getQtdStoLaudoItem = function () {
        var _this = this;
        this.service.getQtdStoLaudoItem(this.service.filtro.stoLaudoId, this.service.filtro.itemLaudoId).subscribe(function (resp) {
            _this.dadosgetQtdStoLaudoItem = resp[0];
            _this.exibirPrevisto = true;
        });
    };
    AcompDaOperacaoIndexComponent.prototype.saveQtdStoLaudoItem = function () {
        var _this = this;
        this.service.saveQtdStoLaudoItem(this.dadosgetQtdStoLaudoItem).subscribe(function (result) {
            _this.mensagens =
                _this.messageService.validationResult(result);
            if (!result.isValid) {
                _this.messageService.warning(_this.title, _this.mensagens[0]);
            }
            else {
                _this.messageService.success("Sucesso", "messages.previstoAlterado");
                _this.diferenca = _this.dadosgetQtdStoLaudoItem.quantidadePlanejada - _this.totalPeso;
            }
        });
    };
    AcompDaOperacaoIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.getQtdStoLaudoItem();
        this.service.getByFilter().subscribe(function (resp) {
            _this.dadosBandaA = resp.filter(function (item) { return item.banda == 'A'; });
            _this.dadosBandaC = resp.filter(function (item) { return item.banda == 'C'; });
            _this.dadosBandaD = resp.filter(function (item) { return item.banda == 'D'; });
            _this.dadosBandaE = resp.filter(function (item) { return item.banda == 'E'; });
            _this.verificaSeHaDados();
            var columns = [
                _this.datatablesService.getDataString("banda", "banda", "10%"),
                _this.datatablesService.getDataString("codPesagem", "codigo", "10%"),
                _this.datatablesService.getDataString("produto", "produto"),
                _this.datatablesService.getDataString("descrBalanca", "balanca", "10%"),
                _this.datatablesService.getDataString("deposito", "deposito", "10%"),
                _this.datatablesService.getDataDateTime("dtInicioPesagem", "inicioPesagem", "DD/MM/YYYY HH:mm:ss", "10%"),
                _this.datatablesService.getDataDateTime("dtPeso", "finalPesagem", "DD/MM/YYYY HH:mm:ss", "10%"),
                _this.datatablesService.getDataString("descrPorao", "porao", "10%"),
                _this.datatablesService.getDataDouble("peso", "peso", 0, false, "10%"),
                _this.datatablesService.getDataString("situacao", "situacao", "15%")
            ];
            _this.totalPeso = _this.dadosBandaA.reduce(function (a, b) { return a + b.peso; }, 0);
            _this.exbirDados = true;
            _this.diferenca = _this.dadosgetQtdStoLaudoItem.quantidadePlanejada - _this.totalPeso;
            _this.datatablesService.toDataTable({ tableId: "dtAcompDaOperacao", columns: columns, data: _this.dadosBandaA }, function (aData) {
                _this.service.data = aData;
            });
        });
        if (this.service.filtro.intervaloVerificacao === 0) {
            clearInterval(this._updateList);
        }
        else {
            this.updateTimer();
        }
    };
    AcompDaOperacaoIndexComponent.prototype.updateTimer = function () {
        var _this = this;
        if (this.service.filtro.intervaloVerificacao === 0) {
            clearInterval(this._updateList);
            return;
        }
        clearInterval(this._updateList);
        var interval = this.service.filtro.intervaloVerificacao * 60000;
        this._updateList = setInterval(function () {
            _this.service.getByFilter().subscribe(function (resp) {
                _this.dadosBandaA = resp.filter(function (item) { return item.banda == 'A'; });
                _this.dadosBandaC = resp.filter(function (item) { return item.banda == 'C'; });
                _this.dadosBandaD = resp.filter(function (item) { return item.banda == 'D'; });
                _this.dadosBandaE = resp.filter(function (item) { return item.banda == 'E'; });
                _this.verificaSeHaDados();
                console.log(_this.dadosBandaE);
                var columns = [
                    _this.datatablesService.getDataString("banda", "banda", "10%"),
                    _this.datatablesService.getDataString("codPesagem", "codigo", "10%"),
                    _this.datatablesService.getDataString("produto", "produto"),
                    _this.datatablesService.getDataString("descrBalanca", "balanca", "10%"),
                    _this.datatablesService.getDataString("deposito", "deposito", "10%"),
                    _this.datatablesService.getDataDateTime("dtInicioPesagem", "inicioPesagem", "DD/MM/YYYY HH:mm:ss", "10%"),
                    _this.datatablesService.getDataDateTime("dtPeso", "finalPesagem", "DD/MM/YYYY HH:mm:ss", "10%"),
                    _this.datatablesService.getDataString("descrPorao", "porao", "10%"),
                    _this.datatablesService.getDataDouble("peso", "peso", 0, false, "10%"),
                    _this.datatablesService.getDataString("situacao", "situacao", "15%")
                ];
                _this.totalPeso = _this.dadosBandaA.reduce(function (a, b) { return a + b.peso; }, 0);
                _this.exbirDados = true;
                _this.datatablesService.toDataTable({ tableId: "dtAcompDaOperacao", columns: columns, data: _this.dadosBandaA }, function (aData) {
                    _this.service.data = aData;
                });
            });
        }, interval);
    };
    AcompDaOperacaoIndexComponent.prototype.verificaSeHaDados = function () {
        this.hasDadosBandaC = this.dadosBandaC.length > 0;
        this.hasDadosBandaD = this.dadosBandaD.length > 0;
        this.hasDadosBandaE = this.dadosBandaE.length > 0;
    };
    AcompDaOperacaoIndexComponent.prototype.filtrar = function () {
        jQuery("#acomp-da-operacao-filter-dialog").modal("show");
    };
    AcompDaOperacaoIndexComponent.prototype.executaFiltro = function (event) {
        this.refresh();
    };
    AcompDaOperacaoIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.properties.call(_this, _this.service.data);
        });
    };
    AcompDaOperacaoIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    AcompDaOperacaoIndexComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    AcompDaOperacaoIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_12__["LoginService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"] },
        { type: _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_10__["AcompDaOperacaoService"] },
        { type: app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_13__["PesagemBalancaDeFluxoService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] }
    ]; };
    AcompDaOperacaoIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-acomp-da-operacao-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./acomp-da-operacao-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-index/acomp-da-operacao-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_12__["LoginService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"],
            _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_10__["AcompDaOperacaoService"],
            app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_13__["PesagemBalancaDeFluxoService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"]])
    ], AcompDaOperacaoIndexComponent);
    return AcompDaOperacaoIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-da-torre/acomp-da-operacao-posicionamento-da-torre.component.ts":
/*!************************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-da-torre/acomp-da-operacao-posicionamento-da-torre.component.ts ***!
  \************************************************************************************************************************************************************************/
/*! exports provided: AcompDaOperacaoPosicionamentoDaTorreComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoPosicionamentoDaTorreComponent", function() { return AcompDaOperacaoPosicionamentoDaTorreComponent; });
/* 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 _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../acomp-da-operacao.service */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.service.ts");
/* harmony import */ var _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../acomp-da-operacao.model */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.model.ts");
/* harmony import */ var _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../acomp-da-operacao.constants */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.constants.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_9__ = __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_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.service */ "./src/app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.service.ts");
/* harmony import */ var app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.model */ "./src/app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

















var AcompDaOperacaoPosicionamentoDaTorreComponent = /** @class */ (function (_super) {
    __extends(AcompDaOperacaoPosicionamentoDaTorreComponent, _super);
    function AcompDaOperacaoPosicionamentoDaTorreComponent(router, messageService, activatedRoute, service, pesagemBalancaDeFluxoService, funcoesService, loginService, permissoesUtils, configuracao, destinatarioService, materialService) {
        var _this = _super.call(this, new _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_4__["AcompDaOperacaoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.pesagemBalancaDeFluxoService = pesagemBalancaDeFluxoService;
        _this.funcoesService = funcoesService;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.configuracao = configuracao;
        _this.destinatarioService = destinatarioService;
        _this.materialService = materialService;
        _this.data = new app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_16__["PesagemBalancaDeFluxoIndex"]();
        _this.actionFormTorre = app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["ActionForm"].index;
        _this.constantes = new _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_4__["AcompDaOperacaoConstants"]();
        _this.mensagens = [];
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["Mascaras"]();
        _this.dataLaudo = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["StoLaudo"]();
        _this.dataTorres = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTorreDto"]();
        _this.dataTorreAux = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTorreDto"]();
        _this.showAdd = false;
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/cargill/consultas/acompDaOperacao";
        _this.refresh = function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.pesagemBalancaDeFluxoService.getById(this.data.codPesagem).subscribe(function (resp) {
                            if (resp) {
                                _this.data = resp;
                                _this.getLaudo();
                                _this.getPesagemFluxoTorre();
                                if (_this.funcoesService.isPositive(_this.data.destinatarioIdNavio)) {
                                    _this.destinatarioService.getById(_this.data.destinatarioIdNavio).subscribe(function (r) {
                                        _this.dataLaudo.navio = r;
                                    });
                                }
                            }
                            else {
                                _this.messageService.warning("titles.pesagemBalancaDeFluxo", "messages.nenhumRegistroEncontrado");
                                _this.back();
                            }
                        })];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        }); };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    AcompDaOperacaoPosicionamentoDaTorreComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.parametrosConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.data.codPesagem = this.funcoesService.getValue(this.activatedRoute.snapshot.paramMap.get("id"), "I");
                        if (!this.funcoesService.isPositive(this.data.codPesagem)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.refresh()];
                    case 1:
                        _a.sent();
                        return [3 /*break*/, 3];
                    case 2:
                        this.data = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["AcompDaOperacaoIndex"]();
                        _a.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        }); }, function () {
            _this.back();
        });
    };
    AcompDaOperacaoPosicionamentoDaTorreComponent.prototype.getLaudo = function () {
        var _this = this;
        this.pesagemBalancaDeFluxoService.getLaudo(this.data).subscribe(function (ret) {
            if (!!ret) {
                _this.laudos = ret;
                _this.laudos.forEach(function (element) {
                    if (element.stoLaudoId === _this.data.stoLaudoId) {
                        _this.dataLaudo.dtMovimento = element.dtMovimento;
                    }
                });
            }
        });
    };
    AcompDaOperacaoPosicionamentoDaTorreComponent.prototype.getPesagemFluxoTorre = function () {
        var _this = this;
        this.pesagemBalancaDeFluxoService.getPesagemFluxoTorre(this.data).subscribe(function (ret) {
            if (!!ret) {
                _this.pesagemFluxoTorre = ret;
            }
        });
    };
    Object.defineProperty(AcompDaOperacaoPosicionamentoDaTorreComponent.prototype, "hasDados", {
        get: function () {
            if (!app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_9__["ArrayUtilsStaticService"].any(this.pesagemFluxoTorre))
                return false;
            return this.pesagemFluxoTorre.length > 0;
        },
        enumerable: true,
        configurable: true
    });
    AcompDaOperacaoPosicionamentoDaTorreComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    AcompDaOperacaoPosicionamentoDaTorreComponent.prototype.backLista = function () {
        this.showAdd = false;
        this.actionFormTorre = app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["ActionForm"].index;
        this.dataTorres = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTorreDto"]();
        this.dataTorreAux = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTorreDto"]();
        this.refresh();
    };
    AcompDaOperacaoPosicionamentoDaTorreComponent.prototype.edit = function () {
        this.showAdd = true;
        this.actionFormTorre = app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["ActionForm"].edit;
        this.dataTorres = Object.assign({}, this.dataTorreAux);
    };
    AcompDaOperacaoPosicionamentoDaTorreComponent.prototype.detail = function () {
        this.showAdd = true;
        this.actionFormTorre = app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["ActionForm"].detail;
        this.dataTorres = Object.assign({}, this.dataTorreAux);
    };
    AcompDaOperacaoPosicionamentoDaTorreComponent.prototype.novaTorre = function () {
        this.showAdd = true;
        this.actionFormTorre = app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["ActionForm"].create;
        this.dataTorres = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTorreDto"]();
        this.dataTorreAux = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTorreDto"]();
    };
    AcompDaOperacaoPosicionamentoDaTorreComponent.prototype.excluirTorre = function () {
        var _this = this;
        if (!!this.dataTorreAux.codTorre) {
            var message = this.messageService.getTranslates("messages", "confirmaExclusaoDaTorre") + " " + this.dataTorreAux.descrTorre;
            this.messageService.confirm("titles.pesagemBalancaDeFluxoPosicionamentoDaTorre", message, null, function () {
                return _this.pesagemBalancaDeFluxoService.corpWebPesPesagemTorreExclui(_this.dataTorreAux).subscribe(function (result) {
                    _this.mensagens = _this.messageService.validationResult(result);
                    if (!result.isValid) {
                        _this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDaTorre", _this.mensagens[0]);
                    }
                    else {
                        _this.messageService.success("Sucesso", "messages.torreExcluida");
                        _this.backLista();
                    }
                });
            });
        }
        else {
            this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDaTorre", "messages.selecioneUmRegistro");
        }
    };
    AcompDaOperacaoPosicionamentoDaTorreComponent.prototype.trataNavio = function (destinatario) {
        this.data.navio = destinatario;
    };
    AcompDaOperacaoPosicionamentoDaTorreComponent.prototype.corpWebPesPesagemTorreGrava = function (dados) {
        var _this = this;
        if (!dados.dtMovimento || !dados.codTorre)
            return this.messageService.warning("titles.pesagemBalancaDeFluxo", "messages.torreOuDataNaoPreenchidos");
        this.dataTorres = dados;
        this.dataTorres.codPesagem = this.data.codPesagem;
        this.pesagemBalancaDeFluxoService.corpWebPesPesagemTorreGrava(this.dataTorres).subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result);
            if (!result.isValid) {
                _this.messageService.warning("titles.pesagemBalancaDeFluxo", _this.mensagens[0]);
            }
            else {
                _this.messageService.success("Sucesso", "messages.torreSalva");
                _this.backLista();
            }
        });
    };
    AcompDaOperacaoPosicionamentoDaTorreComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_2__["AcompDaOperacaoService"] },
        { type: app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_15__["PesagemBalancaDeFluxoService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_12__["FuncoesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_13__["LoginService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_14__["PermissoesUtilsService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__["DestinatarioService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_8__["MaterialService"] }
    ]; };
    AcompDaOperacaoPosicionamentoDaTorreComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-acomp-da-operacao-posicionamento-da-torre',
            template: __importDefault(__webpack_require__(/*! raw-loader!./acomp-da-operacao-posicionamento-da-torre.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-da-torre/acomp-da-operacao-posicionamento-da-torre.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_2__["AcompDaOperacaoService"],
            app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_15__["PesagemBalancaDeFluxoService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_12__["FuncoesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_13__["LoginService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_14__["PermissoesUtilsService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__["DestinatarioService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_8__["MaterialService"]])
    ], AcompDaOperacaoPosicionamentoDaTorreComponent);
    return AcompDaOperacaoPosicionamentoDaTorreComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_10__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-do-rateio/acomp-da-operacao-posicionamento-do-rateio.component.ts":
/*!**************************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-do-rateio/acomp-da-operacao-posicionamento-do-rateio.component.ts ***!
  \**************************************************************************************************************************************************************************/
/*! exports provided: AcompDaOperacaoPosicionamentoDoRateioComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoPosicionamentoDoRateioComponent", function() { return AcompDaOperacaoPosicionamentoDoRateioComponent; });
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __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 _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../acomp-da-operacao.service */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.service.ts");
/* harmony import */ var _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../acomp-da-operacao.model */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.model.ts");
/* harmony import */ var _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../acomp-da-operacao.constants */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.constants.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_pages_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_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_10__ = __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_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.service */ "./src/app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.service.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__ = __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_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_18__ = __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_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.model */ "./src/app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.model.ts");
/* harmony import */ var app_shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! app/shared/services/funcoes/object-utils/object-utils.static.service */ "./src/app/shared/services/funcoes/object-utils/object-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 __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 AcompDaOperacaoPosicionamentoDoRateioComponent = /** @class */ (function (_super) {
    __extends(AcompDaOperacaoPosicionamentoDoRateioComponent, _super);
    function AcompDaOperacaoPosicionamentoDoRateioComponent(router, messageService, activatedRoute, service, pesagemBalancaDeFluxoService, funcoesService, loginService, permissoesUtils, configuracao, destinatarioService, materialService) {
        var _this = _super.call(this, new _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_5__["AcompDaOperacaoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.pesagemBalancaDeFluxoService = pesagemBalancaDeFluxoService;
        _this.funcoesService = funcoesService;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.configuracao = configuracao;
        _this.destinatarioService = destinatarioService;
        _this.materialService = materialService;
        _this.data = new app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_19__["PesagemBalancaDeFluxoIndex"]();
        _this.actionFormRateio = app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__["ActionForm"].index;
        _this.constantes = new _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_5__["AcompDaOperacaoConstants"]();
        _this.mensagens = [];
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__["Mascaras"]();
        _this.dataLaudo = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_4__["StoLaudo"]();
        _this.dataRateio = new app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_19__["PesagemFluxoRateioDto"]();
        _this.dataRateioAux = new app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_19__["PesagemFluxoRateioDto"]();
        _this.showAdd = false;
        _this.disabled = false;
        _this.disabled3 = false;
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/cargill/consultas/acompDaOperacao";
        _this.refresh = function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.pesagemBalancaDeFluxoService.getById(this.data.codPesagem).subscribe(function (resp) {
                            if (resp) {
                                _this.data = resp;
                                _this.getLaudo();
                                _this.getPesagemFluxoRateio();
                                if (_this.funcoesService.isPositive(_this.data.destinatarioIdNavio)) {
                                    _this.destinatarioService.getById(_this.data.destinatarioIdNavio).subscribe(function (r) {
                                        _this.dataLaudo.navio = r;
                                    });
                                }
                            }
                            else {
                                _this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", "messages.nenhumRegistroEncontrado");
                                _this.back();
                            }
                        })];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        }); };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.parametrosConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.data.codPesagem = this.funcoesService.getValue(this.activatedRoute.snapshot.paramMap.get("id"), "I");
                        if (!this.funcoesService.isPositive(this.data.codPesagem)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.refresh()];
                    case 1:
                        _a.sent();
                        return [3 /*break*/, 3];
                    case 2:
                        this.data = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_4__["AcompDaOperacaoIndex"]();
                        _a.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        }); }, function () {
            _this.back();
        });
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.getLaudo = function () {
        var _this = this;
        this.pesagemBalancaDeFluxoService.getLaudo(this.data).subscribe(function (ret) {
            if (!!ret) {
                _this.laudos = ret;
                _this.laudos.forEach(function (element) {
                    if (element.stoLaudoId === _this.data.stoLaudoId) {
                        _this.dataLaudo = element;
                    }
                });
            }
        });
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.getPesagemFluxoRateio = function () {
        var _this = this;
        this.pesagemBalancaDeFluxoService.getPesagemFluxoRateio(this.data).subscribe(function (ret) {
            if (!!ret) {
                _this.pesagemFluxoRateio = ret;
            }
        });
    };
    Object.defineProperty(AcompDaOperacaoPosicionamentoDoRateioComponent.prototype, "hasDados", {
        get: function () {
            if (!app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_10__["ArrayUtilsStaticService"].any(this.pesagemFluxoRateio))
                return false;
            return this.pesagemFluxoRateio.length > 0;
        },
        enumerable: true,
        configurable: true
    });
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.backLista = function () {
        this.showAdd = false;
        this.actionFormRateio = app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__["ActionForm"].index;
        this.dataRateio = new app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_19__["PesagemFluxoRateioDto"]();
        this.dataRateioAux = new app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_19__["PesagemFluxoRateioDto"]();
        this.refresh();
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.edit = function () {
        if (this.pesagemBalancaDeFluxoService.validaSePermiteCriarOuAlterar(this.data))
            return;
        this.showAdd = true;
        this.actionFormRateio = app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__["ActionForm"].edit;
        this.dataRateio = Object.assign({}, this.dataRateioAux);
        this.trataCampos();
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.detail = function () {
        this.showAdd = true;
        this.actionFormRateio = app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__["ActionForm"].detail;
        this.dataRateio = Object.assign({}, this.dataRateioAux);
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.new = function () {
        if (this.pesagemBalancaDeFluxoService.validaSePermiteCriarOuAlterar(this.data))
            return;
        this.showAdd = true;
        this.actionFormRateio = app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__["ActionForm"].create;
        this.dataRateio = new app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_19__["PesagemFluxoRateioDto"]();
        this.dataRateioAux = new app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_19__["PesagemFluxoRateioDto"]();
        this.preCreate();
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.preCreate = function () {
        this.dataRateio.deposito1 = this.data.tanqueId;
        this.trataCampos();
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.excluir = function () {
        var _this = this;
        if (!!this.dataRateioAux.codPesagem) {
            if (this.pesagemBalancaDeFluxoService.validaExclusao(this.data))
                return;
            var message = this.messageService.getTranslates("messages", "confirmaExclusaoDoRateio");
            this.messageService.confirm("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", message, null, function () {
                return _this.pesagemBalancaDeFluxoService.excluirRateio(_this.dataRateioAux).subscribe(function (result) {
                    _this.mensagens = _this.messageService.validationResult(result);
                    if (!result.isValid) {
                        _this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", _this.mensagens[0]);
                    }
                    else {
                        _this.messageService.success("Sucesso", "messages.rateioExcluido");
                        _this.backLista();
                    }
                });
            });
        }
        else {
            this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", "messages.selecioneUmRegistro");
        }
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.salvar = function (dados) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!this.validaCamposObrigatorios(dados))
                            return [2 /*return*/];
                        if (!this.validaPercentualTotalRateio())
                            return [2 /*return*/];
                        if (!this.verifDepositos())
                            return [2 /*return*/];
                        return [4 /*yield*/, this.validaDtMovimento()];
                    case 1:
                        if (!(_a.sent()))
                            return [2 /*return*/];
                        this.dataRateio = dados;
                        this.dataRateio.codPesagem = this.data.codPesagem;
                        this.pesagemBalancaDeFluxoService.posicionamentoRateioGrava(this.dataRateio).subscribe(function (result) {
                            _this.mensagens = _this.messageService.validationResult(result);
                            if (!result.isValid) {
                                _this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", _this.mensagens[0]);
                            }
                            else {
                                _this.messageService.success("Sucesso", "messages.rateioRegistrado");
                                _this.backLista();
                            }
                        });
                        return [2 /*return*/];
                }
            });
        });
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.validaPercentualTotalRateio = function () {
        var escala = 100;
        var ptDeposito1 = Math.round(app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].toNumber(this.dataRateio.ptDeposito1) * escala);
        var ptDeposito2 = Math.round(app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].toNumber(this.dataRateio.ptDeposito2) * escala);
        var ptDeposito3 = Math.round(app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].toNumber(this.dataRateio.ptDeposito3) * escala);
        var soma = (ptDeposito1 + ptDeposito2 + ptDeposito3) / escala;
        if (soma !== 100) {
            this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", "messages.somaPercRateioDeveSer100");
            return false;
        }
        return true;
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.validaCamposObrigatorios = function (dados) {
        if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].isEmpty(dados.deposito1)) {
            this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", "messages.armazemObrigatorio");
            return false;
        }
        if (dados.ptDeposito2 > 0 && app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].isEmpty(dados.deposito2)) {
            this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", "messages.armazemObrigatorio");
            return false;
        }
        if (dados.ptDeposito3 > 0 && app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].isEmpty(dados.deposito3)) {
            this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", "messages.armazemObrigatorio");
            return false;
        }
        if (!dados.dtMovimento) {
            this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", "messages.dataHoraObrigatorio");
            return false;
        }
        return true;
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.trataCampos = function () {
        var ptDeposito1 = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].toNumber(this.dataRateio.ptDeposito1);
        var ptDeposito2 = app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].toNumber(this.dataRateio.ptDeposito2);
        this.disabled = false;
        if (ptDeposito1 >= 100 || app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].isEmpty(this.dataRateio.deposito1) || ptDeposito1 === 0) {
            this.dataRateio.deposito2 = "";
            this.dataRateio.ptDeposito2 = 0;
            this.dataRateio.deposito3 = "";
            this.dataRateio.ptDeposito3 = 0;
            this.disabled = true;
        }
        else if ((app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].isNotEmpty(this.dataRateio.deposito2) && (ptDeposito1 > 0) && (ptDeposito1 + ptDeposito2 === 100)) || ptDeposito2 === 0) {
            this.disabled3 = true;
            this.dataRateio.deposito3 = "";
            this.dataRateio.ptDeposito3 = 0;
        }
        else if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].isEmpty(this.dataRateio.deposito2) || ptDeposito1 + ptDeposito2 >= 100) {
            this.disabled = false;
            this.disabled3 = true;
            this.dataRateio.deposito3 = "";
            this.dataRateio.ptDeposito3 = 0;
        }
        else {
            this.disabled = false;
            this.disabled3 = false;
        }
    };
    Object.defineProperty(AcompDaOperacaoPosicionamentoDoRateioComponent.prototype, "disabledInputs", {
        get: function () {
            if (this.actionFormRateio === app_config_enumerables__WEBPACK_IMPORTED_MODULE_7__["ActionForm"].detail)
                return true;
            if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].isEmpty(this.dataRateio.deposito1))
                return true;
            if (this.disabled)
                return true;
            return false;
        },
        enumerable: true,
        configurable: true
    });
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.onDepositoChange = function (deposito, comboId) {
        this.trataCampos();
        if (comboId === 'dep1') {
            if (this.dataRateio.deposito2 === deposito || this.dataRateio.deposito3 === deposito) {
                this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", "messages.existeArmazemRepetidoVerificar");
                return;
            }
        }
        else if (comboId === 'dep2') {
            if (this.dataRateio.deposito1 === deposito || this.dataRateio.deposito3 === deposito) {
                this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", "messages.existeArmazemRepetidoVerificar");
                return;
            }
        }
        else if (comboId === 'dep3') {
            if (this.dataRateio.deposito1 === deposito || this.dataRateio.deposito2 === deposito) {
                this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", "messages.existeArmazemRepetidoVerificar");
                return;
            }
        }
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.selected = function (val, index) {
        this._index = index;
        this.dataRateioAux = val;
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.verifDepositos = function () {
        var deposito1 = this.dataRateio.deposito1;
        var deposito2 = this.dataRateio.deposito2;
        var deposito3 = this.dataRateio.deposito3;
        if ((deposito2 !== '' && deposito1 === deposito2) || (deposito3 !== '' && (deposito1 === deposito3 || deposito2 === deposito3))) {
            this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", "messages.existeArmazemRepetidoVerificar");
            return false;
        }
        return true;
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.prototype.validaDtMovimento = function () {
        return __awaiter(this, void 0, void 0, function () {
            var dataInicioFinalPesagem, message, message, ultimoRegistro, message, registroAnterior, message;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.service.getDataInicioFinalPesagem(this.data.codPesagem).toPromise()];
                    case 1:
                        dataInicioFinalPesagem = _a.sent();
                        if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["DateTimeUtilsStaticService"].menorA(this.dataRateio.dtMovimento, dataInicioFinalPesagem.dtInicioPesagem, ['H', 'M', 'S'])) {
                            message = this.messageService.getTranslates("messages", "dataHoraNaoPodeSerMenorDtPrimeiraPesagem") + " :: " + app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["DateTimeUtilsStaticService"].format(dataInicioFinalPesagem.dtInicioPesagem, 'DD/MM/YYYY HH:mm:ss');
                            this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", message);
                            return [2 /*return*/, false];
                        }
                        if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["DateTimeUtilsStaticService"].maiorA(this.dataRateio.dtMovimento, dataInicioFinalPesagem.dtFinalPesagem, ['H', 'M', 'S'])) {
                            message = this.messageService.getTranslates("messages", "dataHoraNaoPodeSerMaioDtUltimaPesagem") + " :: " + app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["DateTimeUtilsStaticService"].format(dataInicioFinalPesagem.dtFinalPesagem, 'DD/MM/YYYY HH:mm:ss');
                            this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", message);
                            return [2 /*return*/, false];
                        }
                        if (this.pesagemFluxoRateio && this.pesagemFluxoRateio.length > 0) {
                            if (!app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].isPositive(this.dataRateio.item)) {
                                ultimoRegistro = this.pesagemFluxoRateio[this.pesagemFluxoRateio.length - 1];
                                if (app_shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_20__["ObjectUtilsStaticService"].defined(ultimoRegistro) && (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["DateTimeUtilsStaticService"].menorOuIgualA(this.dataRateio.dtMovimento, ultimoRegistro.dtMovimento, ['H', 'M', 'S']))) {
                                    message = this.messageService.getTranslates("messages", "dataHoraNaoPodeSerIgualOuMenorRegistroAnterior") + " :: " + app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["DateTimeUtilsStaticService"].format(ultimoRegistro.dtMovimento, 'DD/MM/YYYY HH:mm:ss');
                                    this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", message);
                                    return [2 /*return*/, false];
                                }
                            }
                            else {
                                registroAnterior = this.pesagemFluxoRateio[this._index - 1];
                                if (!!registroAnterior && app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["DateTimeUtilsStaticService"].menorOuIgualA(this.dataRateio.dtMovimento, registroAnterior.dtMovimento, ['H', 'M', 'S'])) {
                                    message = this.messageService.getTranslates("messages", "dataHoraNaoPodeSerIgualOuMenorRegistroAnterior") + " :: " + app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["DateTimeUtilsStaticService"].format(registroAnterior.dtMovimento, 'DD/MM/YYYY HH:mm:ss');
                                    this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoDoRateio", message);
                                    return [2 /*return*/, false];
                                }
                            }
                        }
                        return [2 /*return*/, true];
                }
            });
        });
    };
    AcompDaOperacaoPosicionamentoDoRateioComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"] },
        { type: _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_3__["AcompDaOperacaoService"] },
        { type: app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_16__["PesagemBalancaDeFluxoService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_13__["FuncoesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_14__["LoginService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_15__["PermissoesUtilsService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_6__["ConfiguracaoFacade"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__["DestinatarioService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_9__["MaterialService"] }
    ]; };
    AcompDaOperacaoPosicionamentoDoRateioComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: 'app-acomp-da-operacao-posicionamento-do-rateio',
            template: __importDefault(__webpack_require__(/*! raw-loader!./acomp-da-operacao-posicionamento-do-rateio.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-do-rateio/acomp-da-operacao-posicionamento-do-rateio.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_12__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"],
            _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_3__["AcompDaOperacaoService"],
            app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_16__["PesagemBalancaDeFluxoService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_13__["FuncoesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_14__["LoginService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_15__["PermissoesUtilsService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_6__["ConfiguracaoFacade"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__["DestinatarioService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_9__["MaterialService"]])
    ], AcompDaOperacaoPosicionamentoDoRateioComponent);
    return AcompDaOperacaoPosicionamentoDoRateioComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_11__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-tanque-porao/acomp-da-operacao-posicionamento-tanque-porao.component.ts":
/*!********************************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-tanque-porao/acomp-da-operacao-posicionamento-tanque-porao.component.ts ***!
  \********************************************************************************************************************************************************************************/
/*! exports provided: AcompDaOperacaoPosicionamentoTanquePoraoComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoPosicionamentoTanquePoraoComponent", function() { return AcompDaOperacaoPosicionamentoTanquePoraoComponent; });
/* 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 _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../acomp-da-operacao.service */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.service.ts");
/* harmony import */ var _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../acomp-da-operacao.model */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.model.ts");
/* harmony import */ var _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../acomp-da-operacao.constants */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.constants.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_9__ = __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_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.service */ "./src/app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.service.ts");
/* harmony import */ var app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.model */ "./src/app/pages/operacao/pesagem-balanca-de-fluxo/pesagem-balanca-de-fluxo.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

















var AcompDaOperacaoPosicionamentoTanquePoraoComponent = /** @class */ (function (_super) {
    __extends(AcompDaOperacaoPosicionamentoTanquePoraoComponent, _super);
    function AcompDaOperacaoPosicionamentoTanquePoraoComponent(router, messageService, activatedRoute, service, pesagemBalancaDeFluxoService, funcoesService, loginService, permissoesUtils, configuracao, destinatarioService, materialService) {
        var _this = _super.call(this, new _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_4__["AcompDaOperacaoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.pesagemBalancaDeFluxoService = pesagemBalancaDeFluxoService;
        _this.funcoesService = funcoesService;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.configuracao = configuracao;
        _this.destinatarioService = destinatarioService;
        _this.materialService = materialService;
        _this.data = new app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_model__WEBPACK_IMPORTED_MODULE_16__["PesagemBalancaDeFluxoIndex"]();
        _this.actionFormTanque = app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["ActionForm"].index;
        _this.constantes = new _acomp_da_operacao_constants__WEBPACK_IMPORTED_MODULE_4__["AcompDaOperacaoConstants"]();
        _this.mensagens = [];
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["Mascaras"]();
        _this.dataLaudo = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["StoLaudo"]();
        _this.dataTanques = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTanqueDto"]();
        _this.dataTanqueAux = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTanqueDto"]();
        _this.showAdd = false;
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/cargill/consultas/acompDaOperacao";
        _this.refresh = function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.pesagemBalancaDeFluxoService.getById(this.data.codPesagem).subscribe(function (resp) {
                            if (resp) {
                                _this.data = resp;
                                _this.getLaudo();
                                _this.getTanques();
                                _this.getPesagemFluxoTanque();
                                if (_this.funcoesService.isPositive(_this.data.destinatarioIdNavio)) {
                                    _this.destinatarioService.getById(_this.data.destinatarioIdNavio).subscribe(function (r) {
                                        _this.dataLaudo.navio = r;
                                    });
                                }
                            }
                            else {
                                _this.messageService.warning("titles.pesagemBalancaDeFluxo", "messages.nenhumRegistroEncontrado");
                                _this.back();
                            }
                        })];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        }); };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.parametrosConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () { return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.data.codPesagem = this.funcoesService.getValue(this.activatedRoute.snapshot.paramMap.get("id"), "I");
                        if (!this.funcoesService.isPositive(this.data.codPesagem)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.refresh()];
                    case 1:
                        _a.sent();
                        return [3 /*break*/, 3];
                    case 2:
                        this.data = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["AcompDaOperacaoIndex"]();
                        _a.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        }); }, function () {
            _this.back();
        });
    };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.getLaudo = function () {
        var _this = this;
        this.pesagemBalancaDeFluxoService.getLaudo(this.data).subscribe(function (ret) {
            if (!!ret) {
                _this.laudos = ret;
                _this.laudos.forEach(function (element) {
                    if (element.stoLaudoId === _this.data.stoLaudoId) {
                        _this.dataLaudo.dtMovimento = element.dtMovimento;
                    }
                });
            }
        });
    };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.getTanques = function () {
        var _this = this;
        this.pesagemBalancaDeFluxoService.getTanques(this.data).subscribe(function (ret) {
            if (!!ret) {
                _this.tanques = ret;
            }
        });
    };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.getPesagemFluxoTanque = function () {
        var _this = this;
        this.pesagemBalancaDeFluxoService.getPesagemFluxoTanque(this.data).subscribe(function (ret) {
            if (!!ret) {
                _this.pesagemFluxoTanque = ret;
            }
        });
    };
    Object.defineProperty(AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype, "hasDados", {
        get: function () {
            if (!app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_9__["ArrayUtilsStaticService"].any(this.pesagemFluxoTanque))
                return false;
            return this.pesagemFluxoTanque.length > 0;
        },
        enumerable: true,
        configurable: true
    });
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.backLista = function () {
        this.showAdd = false;
        this.actionFormTanque = app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["ActionForm"].index;
        this.dataTanques = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTanqueDto"]();
        this.dataTanqueAux = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTanqueDto"]();
        this.refresh();
    };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.edit = function () {
        this.showAdd = true;
        this.actionFormTanque = app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["ActionForm"].edit;
        this.dataTanques = Object.assign({}, this.dataTanqueAux);
    };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.detail = function () {
        this.showAdd = true;
        this.actionFormTanque = app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["ActionForm"].detail;
        this.dataTanques = Object.assign({}, this.dataTanqueAux);
    };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.novoTanque = function () {
        this.showAdd = true;
        this.actionFormTanque = app_config_enumerables__WEBPACK_IMPORTED_MODULE_6__["ActionForm"].create;
        this.dataTanques = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTanqueDto"]();
        this.dataTanqueAux = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_3__["PesagemFluxoTanqueDto"]();
    };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.excluirTanque = function () {
        var _this = this;
        if (!!this.dataTanqueAux.tanque) {
            var message = this.messageService.getTranslates("messages", "confirmaExclusaoDoTanque") + " " + this.dataTanqueAux.tanque;
            this.messageService.confirm("titles.pesagemBalancaDeFluxoPosicionamentoTanquePorao", message, null, function () {
                return _this.pesagemBalancaDeFluxoService.corpWebPesPesagemTanqueExclui(_this.dataTanqueAux).subscribe(function (result) {
                    _this.mensagens = _this.messageService.validationResult(result);
                    if (!result.isValid) {
                        _this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoTanquePorao", _this.mensagens[0]);
                    }
                    else {
                        _this.messageService.success("Sucesso", "messages.tanqueExcluido");
                        _this.backLista();
                    }
                });
            });
        }
        else {
            this.messageService.warning("titles.pesagemBalancaDeFluxoPosicionamentoTanquePorao", "messages.selecioneUmRegistro");
        }
    };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.trataNavio = function (destinatario) {
        this.data.navio = destinatario;
    };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.prototype.corpWebPesPesagemTanqueGrava = function (dados) {
        var _this = this;
        if (!dados.dtMovimento || !dados.tanque)
            return this.messageService.warning("titles.pesagemBalancaDeFluxo", "messages.tanqueOuDataNaoPreenchidos");
        this.dataTanques = dados;
        this.dataTanques.codPesagem = this.data.codPesagem;
        this.pesagemBalancaDeFluxoService.corpWebPesPesagemTanqueGrava(this.dataTanques).subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result);
            if (!result.isValid) {
                _this.messageService.warning("titles.pesagemBalancaDeFluxo", _this.mensagens[0]);
            }
            else {
                _this.messageService.success("Sucesso", "messages.tanqueSalvo");
                _this.backLista();
            }
        });
    };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_2__["AcompDaOperacaoService"] },
        { type: app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_15__["PesagemBalancaDeFluxoService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_12__["FuncoesService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_13__["LoginService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_14__["PermissoesUtilsService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__["DestinatarioService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_8__["MaterialService"] }
    ]; };
    AcompDaOperacaoPosicionamentoTanquePoraoComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-acomp-da-operacao-posicionamento-tanque-porao',
            template: __importDefault(__webpack_require__(/*! raw-loader!./acomp-da-operacao-posicionamento-tanque-porao.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-tanque-porao/acomp-da-operacao-posicionamento-tanque-porao.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_11__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _acomp_da_operacao_service__WEBPACK_IMPORTED_MODULE_2__["AcompDaOperacaoService"],
            app_pages_operacao_pesagem_balanca_de_fluxo_pesagem_balanca_de_fluxo_service__WEBPACK_IMPORTED_MODULE_15__["PesagemBalancaDeFluxoService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_12__["FuncoesService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_13__["LoginService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_14__["PermissoesUtilsService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__["DestinatarioService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_8__["MaterialService"]])
    ], AcompDaOperacaoPosicionamentoTanquePoraoComponent);
    return AcompDaOperacaoPosicionamentoTanquePoraoComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_10__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.constants.ts":
/*!******************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.constants.ts ***!
  \******************************************************************************************************/
/*! exports provided: AcompDaOperacaoConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoConstants", function() { return AcompDaOperacaoConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var AcompDaOperacaoConstants = /** @class */ (function () {
    function AcompDaOperacaoConstants() {
        this.sisFormularioId = 375121;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta", },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.propriedades", },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.posicionamentoDeTanquePorao", },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.posicionamentoDaTorre", },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.permissoes", },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.posicionamentoDoRateio", }
        ];
        this.sisSistemaId = "PES";
        this.nomeForm = "titles.acompDaOperacao";
        this.reportTitulo = { titulo: "", subTitulo: "" };
        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: "Propriedade", action: "properties", icon: "icon-menu", exibeButton: true, eximeMenu: true, menuName: "Movimento", },
            { title: "AjustarDepositos", action: "ajustarDepositos", icon: "icon-server", exibeButton: false, eximeMenu: true, menuName: "Movimento", },
            { title: "AjustePesagem", action: "ajustePesagem", icon: "icon-files", exibeButton: false, eximeMenu: true, menuName: "Movimento", },
            { title: "Permissao", action: "permissoes", icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: "Movimento", },
            { title: "PosicionamentoDoRateio", action: "posicionamentoDoRateio", icon: "icon-server", exibeButton: false, eximeMenu: true, menuName: "Movimento", }
        ];
        this.listaTanquePorao = [
            { title: "Voltar", action: "back", icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: "Arquivo", },
            { title: "Atualizar", action: "refresh", icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: "Arquivo", },
        ];
        this.listaPosicionamentoTorre = [
            { title: "Voltar", action: "back", icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: "Arquivo", },
            { title: "Atualizar", action: "refresh", icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: "Arquivo", },
        ];
        this.listaPosicionamentoRateio = [
            { title: "Voltar", action: "back", icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: "Arquivo", },
            { title: "Atualizar", action: "refresh", icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: "Arquivo", },
        ];
        this.parametrosConfig = [
            {
                sistema: "PES",
                parametros: [
                    "PesTeste", "PesLimp", "DesmDepPes", "TipoPesagem", "LiberaPesoZero",
                ],
            },
        ];
    }
    return AcompDaOperacaoConstants;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.model.ts":
/*!**************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.model.ts ***!
  \**************************************************************************************************/
/*! exports provided: AcompDaOperacaoFilter, AcompDaOperacaoIndex, StoLaudo, StoLaudoItem, QtdStoLaudoItem, PesagemFluxoTanqueDto, PesagemFluxoDeposito, PesagemFluxoItemFiltroVo, PesagemFluxoItemDto, PesagemFluxoTorreDto, PesagemFluxoAtualizacaoDto, PesagemFluxoUltimaBateladaDto, PesagemFluxoDataInicialFinalPesagemDto, PesagemFluxoBarcacaDto */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoFilter", function() { return AcompDaOperacaoFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoIndex", function() { return AcompDaOperacaoIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoLaudo", function() { return StoLaudo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoLaudoItem", function() { return StoLaudoItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QtdStoLaudoItem", function() { return QtdStoLaudoItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemFluxoTanqueDto", function() { return PesagemFluxoTanqueDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemFluxoDeposito", function() { return PesagemFluxoDeposito; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemFluxoItemFiltroVo", function() { return PesagemFluxoItemFiltroVo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemFluxoItemDto", function() { return PesagemFluxoItemDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemFluxoTorreDto", function() { return PesagemFluxoTorreDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemFluxoAtualizacaoDto", function() { return PesagemFluxoAtualizacaoDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemFluxoUltimaBateladaDto", function() { return PesagemFluxoUltimaBateladaDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemFluxoDataInicialFinalPesagemDto", function() { return PesagemFluxoDataInicialFinalPesagemDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PesagemFluxoBarcacaDto", function() { return PesagemFluxoBarcacaDto; });
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __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_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/pages/cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_3__ = __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 AcompDaOperacaoFilter = /** @class */ (function () {
    function AcompDaOperacaoFilter() {
        this.stoLaudoId = '';
        this.itemLaudoId = '';
        this.destinatarioIdNavio = 0;
        this.intervaloVerificacao = 0;
        this.materialId = '';
        this.material = new app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_2__["Material"]();
        this.navio = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_1__["Destinatario"]();
    }
    return AcompDaOperacaoFilter;
}());

var AcompDaOperacaoIndex = /** @class */ (function (_super) {
    __extends(AcompDaOperacaoIndex, _super);
    function AcompDaOperacaoIndex() {
        return _super.call(this) || this;
    }
    return AcompDaOperacaoIndex;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_3__["BaseModel"]));

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

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

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

var PesagemFluxoTanqueDto = /** @class */ (function () {
    function PesagemFluxoTanqueDto() {
        this.tanque = "";
    }
    return PesagemFluxoTanqueDto;
}());

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

var PesagemFluxoItemFiltroVo = /** @class */ (function () {
    function PesagemFluxoItemFiltroVo() {
        this.pesagemSelecTodasBateladas = "S";
        this.selecionaPeriodo = false;
        this.dataI = app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["DateTimeUtilsStaticService"].addDays(new Date(), -15);
        this.dataF = new Date();
    }
    return PesagemFluxoItemFiltroVo;
}());

var PesagemFluxoItemDto = /** @class */ (function () {
    function PesagemFluxoItemDto() {
        this.tipoPes = "T";
    }
    return PesagemFluxoItemDto;
}());

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

var PesagemFluxoAtualizacaoDto = /** @class */ (function () {
    function PesagemFluxoAtualizacaoDto() {
        this.pesoTotal = 0;
        this.dadosUltimaBatelada = new PesagemFluxoUltimaBateladaDto();
        this.pesagemFluxoItens = [];
    }
    return PesagemFluxoAtualizacaoDto;
}());

var PesagemFluxoUltimaBateladaDto = /** @class */ (function () {
    function PesagemFluxoUltimaBateladaDto() {
        this.sequencialBatelada = 0;
        this.pesoBatelada = 0;
        this.pesoTotalTorre = 0;
        this.pesoTotalPorao = 0;
        this.descrPorao = "";
        this.descrTorre = "";
    }
    return PesagemFluxoUltimaBateladaDto;
}());

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

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



/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.module.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.module.ts ***!
  \***************************************************************************************************/
/*! exports provided: AcompDaOperacaoModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoModule", function() { return AcompDaOperacaoModule; });
/* 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 _acomp_da_operacao_depositos_acomp_da_operacao_depositos_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./acomp-da-operacao-depositos/acomp-da-operacao-depositos.component */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-depositos/acomp-da-operacao-depositos.component.ts");
/* harmony import */ var _acomp_da_operacao_filter_acomp_da_operacao_filter_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./acomp-da-operacao-filter/acomp-da-operacao-filter.component */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-filter/acomp-da-operacao-filter.component.ts");
/* harmony import */ var _acomp_da_operacao_index_acomp_da_operacao_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./acomp-da-operacao-index/acomp-da-operacao-index.component */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-index/acomp-da-operacao-index.component.ts");
/* harmony import */ var _acomp_da_operacao_posicionamento_da_torre_acomp_da_operacao_posicionamento_da_torre_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./acomp-da-operacao-posicionamento-da-torre/acomp-da-operacao-posicionamento-da-torre.component */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-da-torre/acomp-da-operacao-posicionamento-da-torre.component.ts");
/* harmony import */ var _acomp_da_operacao_posicionamento_do_rateio_acomp_da_operacao_posicionamento_do_rateio_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./acomp-da-operacao-posicionamento-do-rateio/acomp-da-operacao-posicionamento-do-rateio.component */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-do-rateio/acomp-da-operacao-posicionamento-do-rateio.component.ts");
/* harmony import */ var _acomp_da_operacao_posicionamento_tanque_porao_acomp_da_operacao_posicionamento_tanque_porao_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./acomp-da-operacao-posicionamento-tanque-porao/acomp-da-operacao-posicionamento-tanque-porao.component */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-tanque-porao/acomp-da-operacao-posicionamento-tanque-porao.component.ts");
/* harmony import */ var _acomp_da_operacao_routing_module__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./acomp-da-operacao.routing.module */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.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 AcompDaOperacaoModule = /** @class */ (function () {
    function AcompDaOperacaoModule() {
    }
    AcompDaOperacaoModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _acomp_da_operacao_routing_module__WEBPACK_IMPORTED_MODULE_8__["AcompDaOperacaoRoutingModule"]],
            declarations: [
                _acomp_da_operacao_index_acomp_da_operacao_index_component__WEBPACK_IMPORTED_MODULE_4__["AcompDaOperacaoIndexComponent"],
                _acomp_da_operacao_filter_acomp_da_operacao_filter_component__WEBPACK_IMPORTED_MODULE_3__["AcompDaOperacaoFilterComponent"],
                _acomp_da_operacao_depositos_acomp_da_operacao_depositos_component__WEBPACK_IMPORTED_MODULE_2__["AcompDaOperacaoDepositosComponent"],
                _acomp_da_operacao_posicionamento_tanque_porao_acomp_da_operacao_posicionamento_tanque_porao_component__WEBPACK_IMPORTED_MODULE_7__["AcompDaOperacaoPosicionamentoTanquePoraoComponent"],
                _acomp_da_operacao_posicionamento_da_torre_acomp_da_operacao_posicionamento_da_torre_component__WEBPACK_IMPORTED_MODULE_5__["AcompDaOperacaoPosicionamentoDaTorreComponent"],
                _acomp_da_operacao_posicionamento_do_rateio_acomp_da_operacao_posicionamento_do_rateio_component__WEBPACK_IMPORTED_MODULE_6__["AcompDaOperacaoPosicionamentoDoRateioComponent"]
            ]
        })
    ], AcompDaOperacaoModule);
    return AcompDaOperacaoModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.routing.module.ts":
/*!***********************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.routing.module.ts ***!
  \***********************************************************************************************************/
/*! exports provided: AcompDaOperacaoRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoRoutingModule", function() { return AcompDaOperacaoRoutingModule; });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _acomp_da_operacao_index_acomp_da_operacao_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./acomp-da-operacao-index/acomp-da-operacao-index.component */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-index/acomp-da-operacao-index.component.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _acomp_da_operacao_posicionamento_da_torre_acomp_da_operacao_posicionamento_da_torre_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./acomp-da-operacao-posicionamento-da-torre/acomp-da-operacao-posicionamento-da-torre.component */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-da-torre/acomp-da-operacao-posicionamento-da-torre.component.ts");
/* harmony import */ var _acomp_da_operacao_posicionamento_tanque_porao_acomp_da_operacao_posicionamento_tanque_porao_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./acomp-da-operacao-posicionamento-tanque-porao/acomp-da-operacao-posicionamento-tanque-porao.component */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-tanque-porao/acomp-da-operacao-posicionamento-tanque-porao.component.ts");
/* harmony import */ var _acomp_da_operacao_posicionamento_do_rateio_acomp_da_operacao_posicionamento_do_rateio_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./acomp-da-operacao-posicionamento-do-rateio/acomp-da-operacao-posicionamento-do-rateio.component */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao-posicionamento-do-rateio/acomp-da-operacao-posicionamento-do-rateio.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: _acomp_da_operacao_index_acomp_da_operacao_index_component__WEBPACK_IMPORTED_MODULE_2__["AcompDaOperacaoIndexComponent"],
        data: { breadcrumb: "acompDaOperacao", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_3__["ActionForm"].index } }
    },
    {
        path: "ajustePesagem/:id",
        component: _acomp_da_operacao_posicionamento_da_torre_acomp_da_operacao_posicionamento_da_torre_component__WEBPACK_IMPORTED_MODULE_4__["AcompDaOperacaoPosicionamentoDaTorreComponent"],
        data: {
            breadcrumb: "pesagemBalancaDeFluxoPosicionamentoDaTorre",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_3__["ActionForm"].detail }
        }
    },
    {
        path: "ajustarDepositos/:id",
        component: _acomp_da_operacao_posicionamento_tanque_porao_acomp_da_operacao_posicionamento_tanque_porao_component__WEBPACK_IMPORTED_MODULE_5__["AcompDaOperacaoPosicionamentoTanquePoraoComponent"],
        data: {
            breadcrumb: "pesagemBalancaDeFluxoPosicionamentoTanquePorao",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_3__["ActionForm"].detail }
        }
    },
    {
        path: "posicionamentoRateio/:id",
        component: _acomp_da_operacao_posicionamento_do_rateio_acomp_da_operacao_posicionamento_do_rateio_component__WEBPACK_IMPORTED_MODULE_6__["AcompDaOperacaoPosicionamentoDoRateioComponent"],
        data: {
            breadcrumb: "pesagemBalancaDeFluxoPosicionamentoDoRateio",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_3__["ActionForm"].detail }
        }
    }
];
var AcompDaOperacaoRoutingModule = /** @class */ (function () {
    function AcompDaOperacaoRoutingModule() {
    }
    AcompDaOperacaoRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__["RouterModule"].forChild(MRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__["RouterModule"]]
        })
    ], AcompDaOperacaoRoutingModule);
    return AcompDaOperacaoRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.service.ts":
/*!****************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.service.ts ***!
  \****************************************************************************************************/
/*! exports provided: AcompDaOperacaoService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AcompDaOperacaoService", function() { return AcompDaOperacaoService; });
/* 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 app_app_error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.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 environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./acomp-da-operacao.model */ "./src/app/pages/especificos/cargill/consultas/acomp-da-operacao/acomp-da-operacao.model.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.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 AcompDaOperacaoService = /** @class */ (function (_super) {
    __extends(AcompDaOperacaoService, _super);
    function AcompDaOperacaoService(http, message, loginService) {
        var _this = _super.call(this, http, "cargill/AcompDaOperacao") || this;
        _this.message = message;
        _this.loginService = loginService;
        _this.data = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_7__["AcompDaOperacaoIndex"]();
        _this.dataBateladas = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_7__["PesagemFluxoItemDto"]();
        _this.filtro = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_7__["AcompDaOperacaoFilter"]();
        _this.filtroBateladas = new _acomp_da_operacao_model__WEBPACK_IMPORTED_MODULE_7__["PesagemFluxoItemFiltroVo"]();
        _this.configs = {
            pesTeste: false,
            pesLimp: false,
            desmDepPes: false,
            tipoPesagem: false,
            liberaPesoZero: false,
        };
        _this.filialId = loginService.getLogin().filialId;
        return _this;
    }
    AcompDaOperacaoService.prototype.getByFilter = function () {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].specifics_service_url + "/api/v1/cargill/AcompDaOperacao/filter", this.filtro)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_2__["ErrorHandler"].handleError));
    };
    AcompDaOperacaoService.prototype.getDataInicioFinalPesagem = function (codPesagem) {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].specifics_service_url + "/api/v1/cargill/pesagemDeFluxo/getDataInicioFinalPesagem/" + codPesagem)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_2__["ErrorHandler"].handleError));
    };
    AcompDaOperacaoService.prototype.getQtdStoLaudoItem = function (regLaudo, item) {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].specifics_service_url + "/api/v1/cargill/AcompDaOperacao/" + regLaudo + "/" + item)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_2__["ErrorHandler"].handleError));
    };
    AcompDaOperacaoService.prototype.saveQtdStoLaudoItem = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].specifics_service_url + "/api/v1/cargill/AcompDaOperacao/save", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_2__["ErrorHandler"].handleError));
    };
    AcompDaOperacaoService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"] }
    ]; };
    AcompDaOperacaoService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"]])
    ], AcompDaOperacaoService);
    return AcompDaOperacaoService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_3__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-especificos-cargill-consultas-acomp-da-operacao-acomp-da-operacao-module.js.map