(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-cadastro-lote-lote-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-duplicate/lote-duplicate.component.html":
/*!************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-duplicate/lote-duplicate.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=\"lote-duplicate-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-50\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 *ngIf=\"!isCreateSubLote\" class=\"modal-title\">{{ 'titles.duplicateLote' | translate }}</h6>\r\n                <h6 *ngIf=\"isCreateSubLote\" class=\"modal-title\">{{ 'titles.gerarSubLote' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12\">\r\n                            <app-card-container tituloCard=\"dadosOrigem\">\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-3\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"lote\">{{\"labels.lote\" | translate }}</label>\r\n                                            <input id=\"lote\" name=\"lote\" value=\"{{data.loteId}}\"\r\n                                                class=\"form-control form-control-sm\" type=\"text\" mask=\"0000/00S\"\r\n                                                disabled>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"col-lg-3\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"data\">{{'labels.data' | translate}}</label>\r\n                                            <input type=\"text\" class=\"form-control form-control-sm\" id=\"data\"\r\n                                                name=\"data\" value=\"{{data.dataLote | date:'dd/MM/yy HH:MM' }}\" disabled>\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 form-group-sm\">\r\n                                            <label for=\"cliente\">{{\"labels.cliente\" | translate }}</label>\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"cliente\" name=\"cliente\"\r\n                                                    value=\"{{data.destinatarioIdCliente}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"clienteFantasia\" name=\"clienteFantasia\"\r\n                                                    value=\"{{data.cliente}}\" class=\"form-control form-control-sm col\"\r\n                                                    type=\"text\" disabled>\r\n                                            </div>\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 form-group-sm\">\r\n                                            <label for=\"produto\">{{\"labels.produto\" | translate }}</label>\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"produto\" name=\"produto\" value=\"{{data.materialId}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"produtoFantasia\" name=\"produtoFantasia\"\r\n                                                    value=\"{{data.produto}}\" class=\"form-control form-control-sm col\"\r\n                                                    type=\"text\" disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </app-card-container>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12\">\r\n                            <app-card-container tituloCard=\"dadosDestino\">\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-3\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"loteIdDestino\"\r\n                                                [class.required]=\"!loteAutomatico\">{{'labels.lote' | translate}}</label>\r\n                                            <input type=\"text\" class=\"form-control form-control-sm\" id=\"loteIdDestino\"\r\n                                                name=\"loteIdDestino\" [(ngModel)]=\"data.loteIdDestino\" mask=\"0000/00S\"\r\n                                                [dropSpecialCharacters]=\"false\" [required]=\"!loteAutomatico\"\r\n                                                (blur)=\"validaLote()\" [disabled]=\"loteAutomatico\">\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"row\" [hidden]=\"!solOSGDuplLote\">\r\n                                    <div class=\"col-lg-6 col-md-12 col-sm-12\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <app-pesquisa-osg id=\"osg\" label=\"osg\" name=\"osg\" [(ngModel)]=\"data.osgId\"\r\n                                                required=\"solOSGDuplLote\"\r\n                                                [destinatarioIdCliente]=\"data.destinatarioIdCliente\"\r\n                                                [materialId]=\"data.materialId\"\r\n                                                (outSelected)=\"!!$event ? data.osg = $event : ''\" [inpOsg]=\"data.osg\">\r\n                                            </app-pesquisa-osg>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-6 col-md-12 col-sm-12 check\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"geraCodigo\" name=\"geraCodigo\" [(ngModel)]=\"loteAutomatico\"\r\n                                            (ngModelChange)=\"generatedLote($event)\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\">\r\n                                        <label class=\"custom-control-label\" for=\"geraCodigo\">{{'labels.geraCodigo'\r\n                                            | translate}}</label>\r\n                                    </div>\r\n                                </div>\r\n                            </app-card-container>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.ok' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-filter/lote-filter.component.html":
/*!******************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-filter/lote-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=\"lote-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop='static'>\r\n    <div class=\"uni-modal-dialog-md-45\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.pesquisaDeLotes' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario id=\"cliente\" name=\"cliente\" tipoDestinatario=\"C\"\r\n                                    modalTitle=\"pesquisaDeCliente\" label=\"cliente\"\r\n                                    [(ngModel)]=\"service.filter.destinatarioIdCliente\" showInscricao=\"false\"\r\n                                    showCgcCpf=\"false\" [inSelected]=\"service.filter.cliente\"\r\n                                    (outModel)=\"!!$event ? service.filter.cliente = $event : ''\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario id=\"emitente\" name=\"emitente\" tipoDestinatario=\"C, E\"\r\n                                    modalTitle=\"pesquisaDeEmitente\" label=\"emitente\"\r\n                                    [(ngModel)]=\"service.filter.destinatarioIdEmitente\" showInscricao=\"false\"\r\n                                    showCgcCpf=\"false\" [inSelected]=\"service.filter.emitente\"\r\n                                    (outModel)=\"!!$event ? service.filter.emitente = $event : ''\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-material id=\"materialId\" name=\"materialId\" label=\"produto\"\r\n                                    modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"service.filter.materialId\"\r\n                                    [inSelected]=\"service.filter.material\"\r\n                                    (outModel)=\"!!$event ? service.filter.material = $event : ''\">\r\n                                </app-pesquisa-material>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario id=\"navio\" name=\"navio\" tipoDestinatario=\"N\"\r\n                                    modalTitle=\"pesquisaDeNavio\" label=\"navio\"\r\n                                    [(ngModel)]=\"service.filter.destinatarioIdNavio\" showInscricao=\"false\"\r\n                                    showCgcCpf=\"false\" [inSelected]=\"service.filter.navio\"\r\n                                    (outModel)=\"!!$event ? service.filter.navio = $event : ''\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-12 col-sm-12\">\r\n                            <app-pesquisa-lote id=\"lote\" label=\"lote\" name=\"_lote\" modalTitle=\"lote\"\r\n                                [(ngModel)]=\"service.filter.loteId\"\r\n                                [destinatarioIdCliente]=\"service.filter.destinatarioIdCliente\"\r\n                                [materialId]=\"service.filter.materialId\" [loteId]=\"service.filter.loteId\"\r\n                                destinatarioIdEmitente=\"0\" destinatarioIdNavio=\"0\" osgId=\"0\" stoContratoId=\"0\"\r\n                                [consideraLotesEncerrados]=\"true\" stoContratoItemId=\"0\">\r\n                            </app-pesquisa-lote>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"periodoDe\" class=\"required\">{{\"labels.periodoDe\" | translate }}</label>\r\n                                <app-data id=\"periodoDe\" name=\"periodoDe\" [(ngModel)]=\"service.filter.dataI\" autofocus\r\n                                    class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\" required=\"true\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-6 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"ate\" class=\"required\">{{\"labels.ate\" | translate}}</label>\r\n                                <app-data id=\"ate\" name=\"ate\" [(ngModel)]=\"service.filter.dataF\" class=\"dataHora\"\r\n                                    [formatDateTime]=\"mascara.getFormatData\" required=\"true\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6 col-md-12 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"nomeArmazenadoId\">{{\"labels.nomeArmazenado\" | translate}}</label>\r\n                                <app-combo-padrao name=\"nomeArmazenadoId\" id=\"nomeArmazenadoId\" chave=\"CodNome\"\r\n                                    descricao=\"DescrMater\" ativo=\"true\" tabela=\"NomeArmazenado\"\r\n                                    [(ngModel)]=\"service.filter.nomeArmazenadoId\">\r\n                                </app-combo-padrao>\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-check mb-2\">\r\n                                <input id=\"apresentaLoteEncerrado\" class=\"form-check-input\" type=\"checkbox\"\r\n                                    name=\"apresentaLoteEncerrado\" [(ngModel)]=\"service.filter.apresentaLoteEncerrado\">\r\n                                <label class=\"form-check-label\" for=\"apresentaLoteEncerrado\">\r\n                                    {{'labels.apresentaLoteEncerrado' | translate}}\r\n                                </label>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.pesquisar' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-form/lote-form.component.html":
/*!**************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-form/lote-form.component.html ***!
  \**************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaForm\" [formAction]=\"actionForm\" [itemData]=\"data.loteId\"\r\n    [sisFormularioId]=\"constantes.sisFormularioId\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"row\">\r\n    <div class=\"col-lg-12\">\r\n        <div class=\"section-comand-bar\">\r\n            <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\" autocomplete=\"off\">\r\n                <app-validacoes></app-validacoes>\r\n                <app-form-legenda></app-form-legenda>\r\n                <div class=\"clearfix\">\r\n                    <ul class=\"nav nav-tabs\">\r\n                        <li class=\"nav-item\">\r\n                            <a class=\"nav-link active show\" data-toggle=\"tab\" href=\"#da\">{{\"labels.dados\" |\r\n                                translate}}</a>\r\n                        </li>\r\n                        <li class=\"nav-item\">\r\n                            <a class=\"nav-link\" data-toggle=\"tab\" href=\"#en\">{{\"labels.entrada\" | translate}}</a>\r\n                        </li>\r\n                        <li class=\"nav-item\">\r\n                            <a class=\"nav-link\" data-toggle=\"tab\" href=\"#re\">{{\"labels.retorno\" | translate}}</a>\r\n                        </li>\r\n                        <li class=\"nav-item\">\r\n                            <a class=\"nav-link\" data-toggle=\"tab\" href=\"#infAdu\">{{\"labels.informacoesAduaneiras\" |\r\n                                translate}}</a>\r\n                        </li>\r\n                        <li class=\"nav-item\">\r\n                            <a class=\"nav-link\" data-toggle=\"tab\" href=\"#dadAd\">{{\"labels.dadosAdicionais\" |\r\n                                translate}}</a>\r\n                        </li>\r\n                        <li class=\"nav-item\">\r\n                            <a *ngIf=\"tipoEspecLote\" class=\"nav-link\" data-toggle=\"tab\"\r\n                                href=\"#infEsp\">{{\"labels.informacoesEspecificas\" | translate}}</a>\r\n                        </li>\r\n                    </ul>\r\n                </div>\r\n                <div class=\"tab-content top\">\r\n                    <div class=\"tab-pane active show\" id=\"da\">\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=\"lote\" [class.required]=\"!loteAutomatico\">{{'labels.lote' |\r\n                                        translate}}</label>\r\n                                    <div class=\"input-group\">\r\n                                        <input type=\"text\" class=\"form-control form-control-sm col-5 mr-4\" id=\"lote\"\r\n                                            name=\"lote\" [(ngModel)]=\"data.loteId\" mask=\"AAAA/00SS\"\r\n                                            [dropSpecialCharacters]=\"false\"\r\n                                            [disabled]=\"!funcoesService.isCreate(actionForm) || loteAutomatico\"\r\n                                            [required]=\"!loteAutomatico\" (blur)=\"validaLote()\">\r\n                                        <div class=\"input-group-prepend\">\r\n                                            <div class=\"form-check\">\r\n                                                <input class=\"form-check-input\" type=\"checkbox\" id=\"aberto\"\r\n                                                    name=\"aberto\" (ngModelChange)=\"data.sitLote = $event ? 'A' : 'E'\"\r\n                                                    [ngModel]=\"data.sitLote ==='A'\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                                <label class=\"form-check-label\" for=\"aberto\">{{'labels.aberto' |\r\n                                                    translate}}\r\n                                                </label>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\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=\"loteReceita\">{{'labels.loteReceita' | translate}}</label>\r\n                                    <input type=\"text\" class=\"form-control form-control-sm\" id=\"loteReceita\"\r\n                                        name=\"loteReceita\" value=\"{{data?.loteReceita}}\" disabled>\r\n                                </div>\r\n                            </div>\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=\"dataLote\" class=\"required\">{{\"labels.dataLote\" | translate }}</label>\r\n                                    <app-data id=\"dataLote\" name=\"dataLote\" [(ngModel)]=\"data.dataLote\" autofocus\r\n                                        class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\" required=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-data>\r\n                                </div>\r\n                            </div>\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=\"dtInicioDescarga\" class=\"required\">{{\"labels.dtInicioDescarga\" |\r\n                                        translate }}</label>\r\n                                    <app-data id=\"dtInicioDescarga\" name=\"dtInicioDescarga\"\r\n                                        [(ngModel)]=\"data.dtInicioDescarga\" autofocus class=\"dataHora\"\r\n                                        [formatDateTime]=\"mascara.getFormatDataHorMin\" required=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-data>\r\n                                </div>\r\n                            </div>\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=\"loteOrigem\">{{'labels.loteOrigem' | translate}}</label>\r\n                                    <input type=\"text\" class=\"form-control form-control-sm\" id=\"loteOrigem\"\r\n                                        name=\"loteOrigem\" [(ngModel)]=\"data.loteIdOrigem\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" [mask]=\"'0000/00A'\"\r\n                                        [patterns]=\"customPatterns\" [dropSpecialCharacters]=\"false\"\r\n                                        (blur)=\"validaLoteOrigem()\" uppercase>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"tipoOperacao\" class=\"required\">\r\n                                        {{'labels.tipoOperacao' | translate}}\r\n                                    </label>\r\n                                    <app-combo-tipo-operacao id=\"tipoOperacao\" name=\"tipoOperacao\"\r\n                                        [(ngModel)]=\"data.tipoOperacaoId\" required=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" flagAtivo=\"S\">\r\n                                    </app-combo-tipo-operacao>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"regimeAduaneiro\" class=\"required\">\r\n                                        {{'labels.regimeAduaneiro' | translate}}\r\n                                    </label>\r\n                                    <app-combo-padrao id=\"regimeAduaneiro\" name=\"regimeAduaneiro\"\r\n                                        tabela=\"RegimeAduaneiro\" chave=\"Regime\" descricao=\"DescrRegime\" flagAtivo=\"S\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        [(ngModel)]=\"data.regimeAduaneiroId\" required=\"true\">\r\n                                    </app-combo-padrao>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-pesquisa-destinatario id=\"cliente\" name=\"cliente\" tipoDestinatario=\"C\"\r\n                                        modalTitle=\"pesquisaDeCliente\" label=\"cliente\"\r\n                                        [(ngModel)]=\"data.destinatarioIdCliente\" showInscricao=\"false\"\r\n                                        showCgcCpf=\"false\" required=\"true\" [inSelected]=\"data.cliente\"\r\n                                        [disabled]=\"disabledSePossuiEntrada\"\r\n                                        (outModel)=\"trataClienteSelecionado($event)\">\r\n                                    </app-pesquisa-destinatario>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-pesquisa-destinatario id=\"emitente\" name=\"emitente\" label=\"emitente\"\r\n                                        modalTitle=\"pesquisaDeEmitente\" [(ngModel)]=\"data.destinatarioIdEmitente\"\r\n                                        tipoDestinatario=\"C\" showCgcCpf=\"false\" showInscricao=\"false\" required=\"true\"\r\n                                        [disabled]=\"disabledSePossuiMovimento\" [inSelected]=\"data.emitente\"\r\n                                        (outModel)=\"trataEmitente($event)\">>\r\n                                    </app-pesquisa-destinatario>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-2 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"cnpjCpf\">{{'labels.cnpjCpf' | translate}}</label>\r\n                                    <input type=\"text\" id=\"cnpjCpf\" name=\"cnpjCpf\" class=\"form-control form-control-sm\"\r\n                                        value=\"{{data?.emitente?.cgcCpf}}\" disabled>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-1 col-md-4 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"estadoId\">{{'labels.estado' | translate}}</label>\r\n                                    <input type=\"text\" class=\"form-control form-control-sm\" id=\"estadoId\"\r\n                                        name=\"estadoId\" value=\"{{data?.emitente?.estadoId}}\" disabled>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"grupo\" [class.required]=\"obrigaGrpCliLote\">{{ 'labels.grupo' |\r\n                                        translate}}</label>\r\n                                    <app-combo-grupo-cliente name=\"grupo\" id=\"grupo\" [(ngModel)]=\"data.grupoClienteId\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" [required]=\"obrigaGrpCliLote\"\r\n                                        (outSelected)=\"trataGrupoCliente($event)\">\r\n                                    </app-combo-grupo-cliente>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-pesquisa-material id=\"produto\" name=\"produto\" label=\"produto\"\r\n                                        modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"data.materialId\"\r\n                                        [inSelected]=\"data.material\" [disabled]=\"disabledSePossuiMovimento\"\r\n                                        required=\"true\" (outModel)=\"trataMaterialSelecionado($event)\">\r\n                                    </app-pesquisa-material>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"nomeArmazenado\" class=\"required\">{{ 'labels.nomeArmazenado' |\r\n                                        translate}}</label>\r\n                                    <select id=\"nomeArmazenado\" [(ngModel)]=\"data.nomeArmazenadoId\"\r\n                                        class=\"form-control form-control-sm\" name=\"nomeArmazenado\"\r\n                                        data-title=\"{{ 'labels.nomeArmazenado' | translate }}\"\r\n                                        [disabled]=\"disabledSePossuiEntrada\" required=\"true\">\r\n                                        <option value=\"0\">{{ \"labels.selecione\" | translate }}</option>\r\n                                        <option *ngFor=\"let t of nomeArmazenados\" value=\"{{ t.nomeArmazenadoId }}\">\r\n                                            {{ t.descrMater }} - {{ t.descrCompl }}\r\n                                        </option>\r\n                                    </select>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-pesquisa-osg id=\"osg\" label=\"osg\" name=\"osg\" [(ngModel)]=\"data.osgId\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" required=\"true\"\r\n                                        [destinatarioIdCliente]=\"data.destinatarioIdCliente\"\r\n                                        [materialId]=\"data.materialId\" (outSelected)=\"trataOsg($event)\"\r\n                                        [inpOsg]=\"data.osg\">\r\n                                    </app-pesquisa-osg>\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=\"unidadeControle\" class=\"required\">{{ 'labels.unidadeControle' |\r\n                                        translate}}</label>\r\n                                    <select id=\"unidadeControle\" [(ngModel)]=\"data.unidadeId\"\r\n                                        class=\"form-control form-control-sm\" name=\"unidadeControle\"\r\n                                        data-title=\"{{ 'labels.unidadeControle' | translate }}\"\r\n                                        [disabled]=\"disabledUnidade\" required=\"true\"\r\n                                        (change)=\"trataDensidadePrecoSeguro()\">\r\n                                        <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                        <option *ngFor=\"let t of unidades\" value=\"{{ t.unidadeId }}\">\r\n                                            {{ t.descricao }}\r\n                                        </option>\r\n                                    </select>\r\n                                </div>\r\n                            </div>\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=\"densidade\" [class.required]=\"vrfObrigaDensidade\">{{'labels.densidade' |\r\n                                        translate}}</label>\r\n                                    <input id=\"densidade\" name=\"densidade\" [(ngModel)]=\"data.densidade\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" [disabled]=\"disabledDensidade\"\r\n                                        currencyMask\r\n                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 9 }\"\r\n                                        maxlength=\"12\" [required]=\"vrfObrigaDensidade\"\r\n                                        (blur)=\"trataDensidadePrecoSeguro()\">\r\n                                </div>\r\n                            </div>\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=\"precoArmazenado\" class=\"required\">{{'labels.precoArmazenado' |\r\n                                        translate}}</label>\r\n                                    <input id=\"precoArmazenado\" name=\"precoArmazenado\"\r\n                                        [(ngModel)]=\"data.precoArmazenado\" class=\"form-control form-control-sm\"\r\n                                        type=\"text\" [disabled]=\"disabledSePossuiEntrada\" currencyMask\r\n                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 9 }\"\r\n                                        maxlength=\"17\" required=\"true\" (blur)=\"trataDensidadePrecoSeguro()\">\r\n                                </div>\r\n                            </div>\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=\"precoSeguro\" class=\"required\">{{'labels.precoSeguro' |\r\n                                        translate}}</label>\r\n                                    <input id=\"precoSeguro\" name=\"precoSeguro\" [(ngModel)]=\"data.precoSeguro\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 9 }\"\r\n                                        maxlength=\"17\" required=\"true\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"procedencia\" class=\"required\">{{'labels.procedencia' |\r\n                                        translate}}</label>\r\n                                    <app-combo-padrao id=\"procedencia\" name=\"procedencia\"\r\n                                        [(ngModel)]=\"data.procedenciaId\" tabela=\"Procedencia\" chave=\"Procedencia\"\r\n                                        descricao=\"DescrProcedencia\" ativos=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" required=\"true\">\r\n                                    </app-combo-padrao>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"origem\">{{'labels.origem' | translate}}</label>\r\n                                    <input id=\"origem\" name=\"origem\" [(ngModel)]=\"data.origem\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"80\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"safra\">{{'labels.safra' | translate}}</label>\r\n                                    <app-combo-padrao id=\"safra\" name=\"safra\" [(ngModel)]=\"data.safraId\" tabela=\"Safra\"\r\n                                        chave=\"RegSafra\" descricao=\"DescSafra\" ativos=\"true\" flagAtivo=\"S\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-combo-padrao>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"observacoes\">{{'labels.observacoes' | translate}}</label>\r\n                                    <input id=\"observacoes\" name=\"observacoes\" [(ngModel)]=\"data.observ\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"150\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"observacoesDoc\">{{'labels.observacoesDoc' | translate}}</label>\r\n                                    <input id=\"observacoesDoc\" name=\"observacoesDoc\" [(ngModel)]=\"data.obs01\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"100\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"tab-pane\" id=\"en\">\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"lote\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-4 col-sm-12\">\r\n                                            <input id=\"loteEntrada\" name=\"loteEntrada\" [(ngModel)]=\"auxLote\"\r\n                                                class=\"form-control form-control-sm\" type=\"text\" mask=\"0000/00S\"\r\n                                                disabled>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-5 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"cliente\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"clienteEntrada\" name=\"clienteEntrada\"\r\n                                                    value=\"{{data.destinatarioIdCliente}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"clienteFantasia\" name=\"clienteFantasia\"\r\n                                                    value=\"{{data?.cliente?.fantasia}}\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-5 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"produto\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"produtoEntrada\" name=\"produtoEntrada\"\r\n                                                    value=\"{{data.materialId}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"produtoFantasiaEntrada\" name=\"produtoFantasiaEntrada\"\r\n                                                    value=\"{{data?.material?.fantasia}}\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-pesquisa-destinatario id=\"navio\" name=\"navio\" tipoDestinatario=\"N\"\r\n                                        modalTitle=\"pesquisaDeNavio\" label=\"navio\"\r\n                                        [(ngModel)]=\"data.destinatarioIdNavio\" showInscricao=\"false\" showCgcCpf=\"false\"\r\n                                        [inSelected]=\"data.navio\" [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        (outModel)=\"trataNavio($event)\">\r\n                                    </app-pesquisa-destinatario>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label [class.required]=\"requiredDadosNavio\">{{'labels.viagemNavio' |\r\n                                        translate}}</label>\r\n                                    <app-combo-viagem-navio id=\"viagemNavio\" name=\"viagemNavio\"\r\n                                        [(ngModel)]=\"data.viagemNavioId\" (change)=\"preencheComboCeMercante()\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm) || !requiredDadosNavio\"\r\n                                        [destinatarioIdNavio]=\"data.destinatarioIdNavio\"\r\n                                        [required]=\"requiredDadosNavio\">\r\n                                    </app-combo-viagem-navio>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"ceMercanteId\" [class.required]=\"requiredDadosNavio\">{{\r\n                                        'labels.ceMercante' |\r\n                                        translate}}</label>\r\n                                    <select id=\"ceMercanteId\" [(ngModel)]=\"data.ceMercanteId\"\r\n                                        class=\"form-control form-control-sm\" name=\"ceMercanteId\"\r\n                                        data-title=\"{{ 'labels.ceMercante' | translate }}\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm) || !requiredDadosNavio\">\r\n                                        <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                        <option *ngFor=\"let t of ceMercantes\" value=\"{{ t.ceMercanteId }}\">\r\n                                            {{ t.navio }} - {{ t.nrCeMercante }}\r\n                                        </option>\r\n                                    </select>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"paisOri\" [class.required]=\"isObrigaPais\">\r\n                                        {{'labels.paisOri' | translate}}\r\n                                    </label>\r\n                                    <app-combo-padrao id=\"paisOri\" name=\"paisOri\" [(ngModel)]=\"data.paisIdOrigem\"\r\n                                        tabela=\"Pais\" chave=\"SiglaPais\" descricao=\"DescrPais\" ativos=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" [required]=\"isObrigaPais\">\r\n                                    </app-combo-padrao>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-4 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"portoOrigem\"\r\n                                        [class.required]=\"requiredDadosNavio\">{{'labels.portoOrigem' |\r\n                                        translate}}</label>\r\n                                    <app-combo-padrao id=\"portoOrigem\" name=\"portoOrigem\"\r\n                                        [(ngModel)]=\"data.portoIdOrigem\" tabela=\"Porto\" chave=\"CodPorto\"\r\n                                        descricao=\"DescrPorto\" ativos=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm) || !requiredDadosNavio\"\r\n                                        [required]=\"requiredDadosNavio\">\r\n                                    </app-combo-padrao>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"docTranspEntrada\" class=\"required\">{{'labels.docTranspEntrada' |\r\n                                        translate}}</label>\r\n                                    <app-combo-padrao id=\"docTranspEntrada\" name=\"docTranspEntrada\"\r\n                                        [(ngModel)]=\"data.tipoDocumentoTranspIdEntrada\" tabela=\"TipoDocumentoTransp\"\r\n                                        chave=\"CodTipoDocto\" descricao=\"DescrTipoDocto\" ativos=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" required=\"true\">\r\n                                    </app-combo-padrao>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <label for=\"operacaoValE\" class=\"required\">{{ 'labels.operacaoValE' | translate\r\n                                    }}</label>\r\n                                <app-combo-multi-operacao id=\"operacaoValE\" name=\"operacaoValE\" origem=\"E\" exibe=\"S\"\r\n                                    [required]=\"true\" [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                    [(ngModel)]=\"data.operacaoIdEntrada\">\r\n                                </app-combo-multi-operacao>\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-check\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"gerarRetencao\"\r\n                                        name=\"gerarRetencao\" (ngModelChange)=\"data.geraRetencao = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.geraRetencao ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    <label class=\"form-check-label\" for=\"gerarRetencao\">{{'labels.gerarRetencao' |\r\n                                        translate}}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\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=\"retencaoPerc\"\r\n                                        [class.required]=\"data.geraRetencao === 'S'\">{{'labels.retencaoPerc' |\r\n                                        translate}}</label>\r\n                                    <input id=\"retencaoPerc\" name=\"retencaoPerc\" [(ngModel)]=\"data.ptRetencao\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 3 }\"\r\n                                        maxlength=\"6\" [required]=\"data.geraRetencao === 'S'\">\r\n                                </div>\r\n                            </div>\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=\"kilosQuebra\">{{'labels.kilosQuebra' | translate}}</label>\r\n                                    <input id=\"kilosQuebra\" name=\"kilosQuebra\" [(ngModel)]=\"data.kilosQuebra\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"disabledKilosQuebra\" currencyMask\r\n                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                        maxlength=\"15\">\r\n                                </div>\r\n                            </div>\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=\"quebraPerc\">{{'labels.quebraPerc' | translate}}</label>\r\n                                    <input id=\"quebraPerc\" name=\"quebraPerc\" [(ngModel)]=\"data.quebraPt\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"disabledKilosQuebra\" currencyMask\r\n                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 3 }\"\r\n                                        maxlength=\"11\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"modDocEntrada\" class=\"required\">{{'labels.modDocEntrada' |\r\n                                        translate}}</label>\r\n                                    <app-combo-modelo-nota id=\"modDocEntrada\" name=\"modDocEntrada\" [flagAtivo]=\"'S'\"\r\n                                        [(ngModel)]=\"data.modeloNotaId\" [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        required></app-combo-modelo-nota>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-2 col-md-2 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label [class.required]=\"obrigaSerieNota\">{{ 'labels.serie' | translate }}</label>\r\n                                    <app-combo-serie-nota id=\"serie\" name=\"serie\" flagAtivo=\"S\"\r\n                                        [(ngModel)]=\"data.serieNotaId\" [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        [required]=\"obrigaSerieNota\" [hasItemOption]=\"false\">\r\n                                    </app-combo-serie-nota>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-8 col-sm-12\">\r\n                                <div class=\"form-check\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"libProdAutomatica\"\r\n                                        name=\"libProdAutomatica\" (ngModelChange)=\"data.geraNota = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.geraNota ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    <label class=\"form-check-label\" for=\"libProdAutomatica\">{{'labels.libProdAutomatica'\r\n                                        | translate}}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-8 col-sm-12\">\r\n                                <div class=\"form-check\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"formControle\"\r\n                                        name=\"formControle\" (ngModelChange)=\"data.formControle = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.formControle ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    <label class=\"form-check-label\" for=\"formControle\">{{'labels.formControle' |\r\n                                        translate}}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-8 col-sm-12\">\r\n                                <div class=\"form-check\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"solDensidadeDescarga\"\r\n                                        name=\"solDensidadeDescarga\"\r\n                                        (ngModelChange)=\"data.densDescarga = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.densDescarga ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    <label class=\"form-check-label\"\r\n                                        for=\"solDensidadeDescarga\">{{'labels.solDensidadeDescarga' | translate}}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-8 col-sm-12\">\r\n                                <div class=\"form-check\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"efetuaConfDescarga\"\r\n                                        name=\"efetuaConfDescarga\"\r\n                                        (ngModelChange)=\"data.flagConferencia = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.flagConferencia ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    <label class=\"form-check-label\"\r\n                                        for=\"efetuaConfDescarga\">{{'labels.efetuaConfDescarga' | translate}}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-8 col-sm-12\">\r\n                                <div class=\"form-check\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"importaDanfe\"\r\n                                        name=\"importaDanfe\" (ngModelChange)=\"data.importaDanfe = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.importaDanfe ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    <label class=\"form-check-label\" for=\"importaDanfe\">{{'labels.importarDanfe' |\r\n                                        translate}}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"tab-pane\" id=\"re\">\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"lote\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-4 col-sm-12\">\r\n                                            <input id=\"loteRetorno\" name=\"loteRetorno\" value=\"{{data.loteId}}\"\r\n                                                class=\"form-control form-control-sm\" type=\"text\" mask=\"0000/00S\"\r\n                                                disabled>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-5 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"cliente\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"clienteRetorno\" name=\"clienteRetorno\"\r\n                                                    value=\"{{data.destinatarioIdCliente}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"clienteFantasiaRetorno\" name=\"clienteFantasiaRetorno\"\r\n                                                    value=\"{{data?.cliente?.fantasia}}\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-5 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"produto\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"produtoRetorno\" name=\"produtoRetorno\"\r\n                                                    value=\"{{data.materialId}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"produtoFantasiaRetorno\" name=\"produtoFantasiaRetorno\"\r\n                                                    value=\"{{data?.material?.fantasia}}\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <label for=\"operacoesRetorno\" class=\"required\">{{ 'labels.operacoesRetorno' | translate\r\n                                    }}</label>\r\n                                <app-combo-multi-operacao id=\"operacoesRetorno\" name=\"operacoesRetorno\" origem=\"S\"\r\n                                    exibe=\"S\" [required]=\"true\" [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                    [(ngModel)]=\"data.operacaoIdRetorno\">\r\n                                </app-combo-multi-operacao>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"docTranspSaida\" class=\"required\">{{'labels.docTranspSaida' |\r\n                                        translate}}</label>\r\n                                    <app-combo-padrao id=\"docTranspSaida\" name=\"docTranspSaida\"\r\n                                        [(ngModel)]=\"data.tipoDocumentoTranspIdSaida\" tabela=\"TipoDocumentoTransp\"\r\n                                        chave=\"CodTipoDocto\" descricao=\"DescrTipoDocto\" ativos=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" required=\"true\">\r\n                                    </app-combo-padrao>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"pedidoDoCliente\">{{'labels.pedidoDoCliente' | translate}}</label>\r\n                                    <input type=\"text\" class=\"form-control form-control-sm\" id=\"pedidoDoCliente\"\r\n                                        name=\"pedidoDoCliente\" [(ngModel)]=\"data.pedCliente\" maxlength=\"15\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-2 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"item\">{{'labels.item' | translate}}</label>\r\n                                    <input type=\"text\" class=\"form-control form-control-sm\" id=\"item\" name=\"item\"\r\n                                        [(ngModel)]=\"data.pedClienteIte\" maxlength=\"5\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"loteCliente\">{{'labels.loteCliente' | translate}}</label>\r\n                                    <input type=\"text\" class=\"form-control form-control-sm\" id=\"loteCliente\"\r\n                                        name=\"loteCliente\" [(ngModel)]=\"data.loteCliente\" maxlength=\"20\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label>{{'labels.mensagemRetorno' | translate}}</label>\r\n                                    <app-pesquisa-mensagem id=\"mensagemRetorno\" name=\"mensagemRetorno\"\r\n                                        [(ngModel)]=\"data.mensagemId\" tipo=\"FIS\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        (outMensagem)=\"setMensagem($event)\">\r\n                                    </app-pesquisa-mensagem>\r\n\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <textarea name=\"mensagem\" value=\"{{data.mensagem}}\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                    </textarea>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-8 col-sm-12\">\r\n                                <div class=\"form-check\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"retTonelada\" name=\"retTonelada\"\r\n                                        (ngModelChange)=\"data.flagTon = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.flagTon ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm) || !permiteAlterarFlagRetornoTonelada\">\r\n                                    <label class=\"form-check-label\" for=\"retTonelada\">{{'labels.retToneladaM3' |\r\n                                        translate}}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-8 col-sm-12\">\r\n                                <div class=\"form-check\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"geraFormRetorno\"\r\n                                        name=\"geraFormRetorno\"\r\n                                        (ngModelChange)=\"data.geraFormRetorno = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.geraFormRetorno ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm) || !permiteAlterarGeraFormContrAut\">\r\n                                    <label class=\"form-check-label\" for=\"geraFormRetorno\">{{'labels.geraFormRetorno' |\r\n                                        translate}}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div *ngIf=\"permiteDensTanque\" class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                                <div class=\"form-check\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"flagDensidadeTanque\"\r\n                                        name=\"flagDensidadeTanque\"\r\n                                        (ngModelChange)=\"data.flagDensidadeTanque = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.flagDensidadeTanque ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    <label class=\"form-check-label\"\r\n                                        for=\"flagDensidadeTanque\">{{'labels.flagDensidadeTanque' | translate}}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"tab-pane\" id=\"infAdu\">\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"lote\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-4 col-sm-12\">\r\n                                            <input id=\"loteinfAdu\" name=\"loteinfAdu\" value=\"{{data.loteId}}\"\r\n                                                class=\"form-control form-control-sm\" type=\"text\" mask=\"0000/00S\"\r\n                                                disabled>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-5 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"cliente\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"clienteinfAdu\" name=\"clienteinfAdu\"\r\n                                                    value=\"{{data.destinatarioIdCliente}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"clienteFantasiainfAdu\" name=\"clienteFantasiainfAdu\"\r\n                                                    value=\"{{data?.cliente?.fantasia}}\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-5 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"produto\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"produtoInfAd\" name=\"produtoInfAd\" value=\"{{data.materialId}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"fantasiaInfAd\" name=\"fantasiaInfAd\"\r\n                                                    value=\"{{data?.material?.fantasia}}\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-pesquisa-cadastro-da id=\"cadastroDa\" name=\"cadastroDa\" label=\"diAdmissaoDA\"\r\n                                        modalTitle=\"pesquisaDeCadastroDa\" [(ngModel)]=\"data.cadastroDaId\"\r\n                                        [destinatarioIdCliente]=\"data.destinatarioIdCliente\"\r\n                                        [materialId]=\"data.materialId\" [inpCadastroDa]=\"data.cadastroDa\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-pesquisa-cadastro-da>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                                <div class=\"form-check mt-4\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"mercAbandonada\"\r\n                                        name=\"mercAbandonada\" (ngModelChange)=\"data.mercAbandonada = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.mercAbandonada ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    <label class=\"form-check-label\" for=\"mercAbandonada\">{{'labels.mercAbandonada' |\r\n                                        translate}}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3 col-md-8 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"ptDifAduaneira\">{{'labels.percMaxDifAduaneira' | translate}}</label>\r\n                                    <input id=\"ptDifAduaneira\" name=\"ptDifAduaneira\" [(ngModel)]=\"data.ptDifAduaneira\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                        maxlength=\"5\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-8 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"ptDiPosterior\">{{'labels.percDiPosterior' | translate}}</label>\r\n                                    <input id=\"ptDiPosterior\" name=\"ptDiPosterior\" [(ngModel)]=\"data.ptDiPosterior\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                        maxlength=\"5\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-8 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"valorAduana\">{{'labels.valorAduana' | translate}}</label>\r\n                                    <input id=\"valorAduana\" name=\"valorAduana\" [(ngModel)]=\"data.valorAduana\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                        maxlength=\"14\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"moeda\">{{'labels.moeda' | translate}}</label>\r\n                                    <app-combo-padrao id=\"moeda\" name=\"moeda\" [(ngModel)]=\"data.moedaId\" tabela=\"Moedas\"\r\n                                        chave=\"CodMoeda\" descricao=\"DescrMoeda\" ativos=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-combo-padrao>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3 col-md-12 col-sm-12\">\r\n                                <app-card-container tituloCard=\"verificacaoFisicaStatus\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <div class=\"custom-control custom-radio\">\r\n                                            <input class=\"custom-control-input radio-success\" id=\"radioDefault\"\r\n                                                name=\"radioDefault\" [(ngModel)]=\"data.verifFisicaDec\" type=\"radio\"\r\n                                                value=\"D\" [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                            <label class=\"custom-control-label\" for=\"radioDefault\">{{\r\n                                                'labels.disponivel' | translate\r\n                                                }}\r\n                                            </label>\r\n                                        </div>\r\n                                        <div class=\"custom-control custom-radio\">\r\n                                            <input class=\"custom-control-input radio-success\" id=\"radioPrimary\"\r\n                                                name=\"radioPrimary\" [(ngModel)]=\"data.verifFisicaDec\" type=\"radio\"\r\n                                                value=\"I\" [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                            <label class=\"custom-control-label\" for=\"radioPrimary\">{{\r\n                                                'labels.indisponivel' |\r\n                                                translate }}\r\n                                            </label>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-12 col-sm-12\">\r\n                                <app-card-container tituloCard=\"verificacaoFisicaPC\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <div class=\"custom-control custom-radio\">\r\n                                            <input class=\"custom-control-input radio-success\" id=\"radioDefaultPC\"\r\n                                                name=\"radioDefaultPC\" [(ngModel)]=\"data.sitFisicaDec\" type=\"radio\"\r\n                                                value=\"P\" [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                            <label class=\"custom-control-label\" for=\"radioDefaultPC\">{{\r\n                                                'labels.pendente' | translate\r\n                                                }}\r\n                                            </label>\r\n                                        </div>\r\n                                        <div class=\"custom-control custom-radio\">\r\n                                            <input class=\"custom-control-input radio-success\" id=\"radioPrimaryPC\"\r\n                                                name=\"radioPrimaryPC\" [(ngModel)]=\"data.sitFisicaDec\" type=\"radio\"\r\n                                                value=\"C\" [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                            <label class=\"custom-control-label\" for=\"radioPrimaryPC\">{{\r\n                                                'labels.concluido' |\r\n                                                translate }}\r\n                                            </label>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3 col-md-8 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"declaracaoAduaneira\">{{'labels.declaracaoAduaneira' |\r\n                                        translate}}</label>\r\n                                    <input id=\"declaracaoAduaneira\" name=\"declaracaoAduaneira\"\r\n                                        [(ngModel)]=\"data.decAduana\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"15\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-8 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"tipoDeclaracao\">{{'labels.tipoDeclaracao' | translate}}</label>\r\n                                    <input id=\"tipoDeclaracao\" name=\"tipoDeclaracao\" [(ngModel)]=\"data.tipoDecAduana\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"15\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3 col-md-12 col-sm-12\">\r\n                                <app-card-container tituloCard=\"tipoProcesso\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <div class=\"custom-control custom-radio\">\r\n                                            <input class=\"custom-control-input radio-success\" id=\"radioDefaultTipoProce\"\r\n                                                name=\"radioDefaultTipoProce\" [(ngModel)]=\"data.tipoProcesso\"\r\n                                                type=\"radio\" value=\"A\" [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                            <label class=\"custom-control-label\" for=\"radioDefaultTipoProce\">{{\r\n                                                'labels.administrativo' | translate\r\n                                                }}\r\n                                            </label>\r\n                                        </div>\r\n                                        <div class=\"custom-control custom-radio\">\r\n                                            <input class=\"custom-control-input radio-success\" id=\"radioPrimaryTipoProc\"\r\n                                                name=\"radioPrimaryTipoProc\" [(ngModel)]=\"data.tipoProcesso\" type=\"radio\"\r\n                                                value=\"J\" [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                            <label class=\"custom-control-label\" for=\"radioPrimaryTipoProc\">{{\r\n                                                'labels.judicial' |\r\n                                                translate }}\r\n                                            </label>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-8 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"numero\">{{'labels.numero' | translate}}</label>\r\n                                    <input id=\"numero\" name=\"numero\" [(ngModel)]=\"data.numeroProcesso\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"25\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2 col-md-6 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"dataProcesso\">{{\"labels.dataProcesso\" | translate }}</label>\r\n                                    <app-data id=\"dataProcesso\" name=\"dataProcesso\" [(ngModel)]=\"data.dtProcesso\"\r\n                                        autofocus class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-data>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"tab-pane\" id=\"dadAd\">\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"lote\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-4 col-sm-12\">\r\n                                            <input name=\"_lote\" value=\"{{data.loteId}}\"\r\n                                                class=\"form-control form-control-sm\" type=\"text\" mask=\"0000/00S\"\r\n                                                disabled>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-5 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"cliente\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"_cliente\" name=\"_cliente\"\r\n                                                    value=\"{{data.destinatarioIdCliente}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"_clienteFantasia\" name=\"_clienteFantasia\"\r\n                                                    value=\"{{data?.cliente?.fantasia}}\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-5 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"produto\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"_produto2\" name=\"_produto2\" value=\"{{data.materialId}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"_fantasia2\" name=\"_fantasia2\"\r\n                                                    value=\"{{data?.material?.fantasia}}\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"localOperacao\"\r\n                                        [class.required]=\"obrigaLocalOperacao\">{{'labels.localOperacao' |\r\n                                        translate}}</label>\r\n                                    <app-combo-padrao id=\"localOperacao\" name=\"localOperacao\"\r\n                                        [(ngModel)]=\"data.localOperacaoId\" tabela=\"LocalOperacao\" chave=\"CodLocalOper\"\r\n                                        descricao=\"DescrLocalOper\" ativos=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        [required]=\"obrigaLocalOperacao\">\r\n                                    </app-combo-padrao>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                                <div class=\"form-check mt-4\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"consideraQuebra\"\r\n                                        name=\"consideraQuebra\"\r\n                                        (ngModelChange)=\"data.consideraQuebra = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.consideraQuebra ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    <label class=\"form-check-label\"\r\n                                        for=\"consideraQuebra\">{{'labels.consideraApuracaoQuebra' | translate}}\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-3 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"tipoDeIntegracao\"\r\n                                        [class.required]=\"obrigaTipoIntegracao\">{{'labels.tipoDeIntegracao' |\r\n                                        translate}}</label>\r\n                                    <app-combo-padrao id=\"tipoDeIntegracao\" name=\"tipoDeIntegracao\"\r\n                                        [(ngModel)]=\"data.tipoIntegracaoId\" tabela=\"TipoIntegracao\"\r\n                                        chave=\"CodTipoIntegra\" descricao=\"DescrTipoIntegra\" ativos=\"true\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        [required]=\"obrigaTipoIntegracao\">\r\n                                    </app-combo-padrao>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                                <div class=\"form-check mt-4\">\r\n                                    <input class=\"form-check-input\" type=\"checkbox\" id=\"tanqueCativo\"\r\n                                        name=\"tanqueCativo\" (ngModelChange)=\"data.tanqueCativo = $event ? 'S' : 'N'\"\r\n                                        [ngModel]=\"data.tanqueCativo ==='S'\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    <label class=\"form-check-label\" for=\"tanqueCativo\">{{'labels.tanqueCativo' |\r\n                                        translate}}\r\n                                    </label>\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=\"codIntegracao\"\r\n                                        [class.required]=\"data.tipoIntegracaoId != 0 && data.tipoIntegracaoId != null\">{{'labels.codIntegracao'\r\n                                        | translate}}</label>\r\n                                    <input id=\"codIntegracao\" name=\"codIntegracao\" [(ngModel)]=\"data.codIntegracao\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"15\"\r\n                                        [required]=\"data.tipoIntegracaoId != 0 && data.tipoIntegracaoId != null\">\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=\"idAppaWeb\">{{'labels.idAppaWeb' | translate}}</label>\r\n                                    <input id=\"idAppaWeb\" name=\"idAppaWeb\" [(ngModel)]=\"data.idAppaWeb\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm) || !exibeAppaWeb\"\r\n                                        maxlength=\"15\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"tab-pane\" id=\"infEsp\">\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"lote\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-4 col-sm-12\">\r\n                                            <input name=\"_lote\" value=\"{{data.loteId}}\"\r\n                                                class=\"form-control form-control-sm\" type=\"text\" mask=\"0000/00S\"\r\n                                                disabled>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-5 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"cliente\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"_cliente1\" name=\"_cliente1\"\r\n                                                    value=\"{{data.destinatarioIdCliente}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"_clienteFantasia1\" name=\"_clienteFantasia1\"\r\n                                                    value=\"{{data?.cliente?.fantasia}}\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                            <div class=\"col-lg-5 col-md-4 col-sm-12\">\r\n                                <app-card-container tituloCard=\"produto\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"_produto3\" name=\"_produto3\" value=\"{{data.materialId}}\"\r\n                                                    class=\"form-control form-control-sm col-2\" type=\"text\" disabled>\r\n                                                <input id=\"_fantasia3\" name=\"_fantasia3\"\r\n                                                    value=\"{{data?.material?.fantasia}}\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </app-card-container>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-pesquisa-destinatario id=\"clientePortal\" name=\"clientePortal\"\r\n                                        tipoDestinatario=\"C\" modalTitle=\"pesquisaDeClientePortal\" label=\"clientePortal\"\r\n                                        [(ngModel)]=\"data.destinatarioIdClientePortal\" showInscricao=\"false\"\r\n                                        showCgcCpf=\"false\" [inSelected]=\"data.clientePortal\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-pesquisa-destinatario>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"numeroContrato\">{{'labels.numeroContrato' | translate}}</label>\r\n                                    <input id=\"numeroContrato\" name=\"numeroContrato\" [(ngModel)]=\"data.numContrato\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"20\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"faturaComercial\">{{'labels.faturaComercial' | translate}}</label>\r\n                                    <input id=\"faturaComercial\" name=\"faturaComercial\"\r\n                                        [(ngModel)]=\"data.faturaComercial\" class=\"form-control form-control-sm\"\r\n                                        type=\"text\" [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"30\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"campoEsp01\">{{lblCpLote01 | translate}}</label>\r\n                                    <input id=\"campoEsp01\" name=\"campoEsp01\" [(ngModel)]=\"data.campoEsp01\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"50\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"campoEsp02\">{{lblCpLote02 | translate}}</label>\r\n                                    <input id=\"campoEsp02\" name=\"campoEsp02\" [(ngModel)]=\"data.campoEsp02\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"50\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"campoEsp03\">{{lblCpLote03 | translate}}</label>\r\n                                    <input id=\"campoEsp03\" name=\"campoEsp03\" [(ngModel)]=\"data.campoEsp03\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"50\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"campoEsp04\">{{lblCpLote04 | translate}}</label>\r\n                                    <input id=\"campoEsp04\" name=\"campoEsp04\" [(ngModel)]=\"data.campoEsp04\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"50\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"campoEsp05\">{{lblCpLote05 | translate}}</label>\r\n                                    <input id=\"campoEsp05\" name=\"campoEsp05\" [(ngModel)]=\"data.campoEsp05\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\" maxlength=\"50\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <app-pesquisa-destinatario id=\"origemGrupo\" name=\"origemGrupo\" tipoDestinatario=\"C\"\r\n                                        modalTitle=\"pesquisaDeOrigemGrupo\" label=\"origemGrupo\"\r\n                                        [(ngModel)]=\"data.destinatarioIdClienteOrigem\" showInscricao=\"false\"\r\n                                        showCgcCpf=\"false\" [inSelected]=\"data.clienteOrigem\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </app-pesquisa-destinatario>\r\n                                </div>\r\n                            </div>\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 form-group-sm\">\r\n                            <button class=\"btn btn-success mr-2\" type=\"submit\"\r\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">{{ 'buttons.salvar' | translate }}\r\n                            </button>\r\n                            <button class=\"btn btn-success mr-2\" (click)=\"saveAndCreate(f)\" type=\"button\"\r\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">{{ 'buttons.salvarNovo' | translate }}\r\n                            </button>\r\n                            <button class=\"btn btn-success mr-2\" (click)=\"routeLancamentoBl()\" type=\"button\">{{\r\n                                'buttons.bl' | translate }}\r\n                                <i class=\"fa fa-refresh\"></i>\r\n                            </button>\r\n                            <button class=\"btn btn-success mr-2\" (click)=\"routeLancamentoDi()\" type=\"button\">{{\r\n                                'buttons.di' | translate }}\r\n                                <i class=\"fa fa-refresh\"></i>\r\n                            </button>\r\n                            <button class=\"btn btn-success\" (click)=\"routeLancamentoFma()\" type=\"button\">{{\r\n                                'buttons.fma' | translate }}\r\n                                <i class=\"fa fa-refresh\"></i>\r\n                            </button>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>\r\n\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-index/lote-index.component.html":
/*!****************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-index/lote-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\" [itemData]=\"data.loteId\"\r\n    [sisFormularioId]=\"constantes.sisFormularioId\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"section-comand-bar\">\r\n    <table id=\"dtLote\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<div class=\"row\">\r\n    <div class=\"col-12\">\r\n        <button type=\"button\" class=\"btn btn-success\" [disabled]=\"!data.loteId\" (click)=\"bl()\">\r\n            {{'buttons.bl' | translate}}\r\n        </button>\r\n        <button type=\"button\" class=\"btn btn-success ml-2\" [disabled]=\"!data.loteId\" (click)=\"di()\">\r\n            {{'buttons.di' | translate}}\r\n        </button>\r\n        <button type=\"button\" class=\"btn btn-success ml-2\" [disabled]=\"!data.loteId\" (click)=\"fma()\">\r\n            {{'buttons.fma' | translate}}\r\n        </button>\r\n    </div>\r\n</div>\r\n\r\n<app-propriedades></app-propriedades>\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\r\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\r\n<app-lote-filter (filtrar)=\"executaFiltro($event)\"></app-lote-filter>\r\n<app-lote-duplicate [data]=\"data\" (atualizar)=\"refresh()\"></app-lote-duplicate>");

/***/ }),

/***/ "./src/app/pages/cadastro/lote/lote-duplicate/lote-duplicate.component.ts":
/*!********************************************************************************!*\
  !*** ./src/app/pages/cadastro/lote/lote-duplicate/lote-duplicate.component.ts ***!
  \********************************************************************************/
/*! exports provided: LoteDuplicateComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoteDuplicateComponent", function() { return LoteDuplicateComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _lote_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lote.constants */ "./src/app/pages/cadastro/lote/lote.constants.ts");
/* harmony import */ var _lote_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../lote.model */ "./src/app/pages/cadastro/lote/lote.model.ts");
/* harmony import */ var _lote_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../lote.service */ "./src/app/pages/cadastro/lote/lote.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __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 LoteDuplicateComponent = /** @class */ (function () {
    function LoteDuplicateComponent(funcoesService, messageService, configuracao, loteService, loginService) {
        var _this = this;
        this.funcoesService = funcoesService;
        this.messageService = messageService;
        this.configuracao = configuracao;
        this.loteService = loteService;
        this.loginService = loginService;
        this.atualizar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.constantes = new _lote_constants__WEBPACK_IMPORTED_MODULE_7__["LoteConstants"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        this.dataLoteDuplica = new _lote_model__WEBPACK_IMPORTED_MODULE_8__["LoteDuplica"]();
        this.mensagens = [];
        this.isCreateSubLote = false;
        this.loadConfig = function () {
            _this.loteAutomatico = _this.configuracao.lerConfig("CTR", "LoteAutomatico") === "S" ? true : false;
            _this.solOSGDuplLote = _this.configuracao.lerConfig("CTR", "SolOSGDuplLote") === "S" ? true : false;
        };
        this.sub = _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("emitterDuplicaLote").subscribe(function (object) {
            _this.isCreateSubLote = object.createSubLote;
            _this.loteService._getById(object.loteId).subscribe(function (data) {
                _this.data.osg = data.osg;
                _this.data.osgId = data.osgId;
                _this.loteService.getProximoLote({ loteId: object.loteId, isCreateSubLote: _this.isCreateSubLote }).subscribe(function (resp) {
                    _this.data.loteIdDestino = resp.retLoteId;
                });
                jQuery("#lote-duplicate-dialog").modal("show");
            });
        });
        this.filialId = loginService.getLogin().filialId;
    }
    LoteDuplicateComponent.prototype.ngOnInit = function () {
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
    };
    LoteDuplicateComponent.prototype.onSubmit = function (form) {
        var _this = this;
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            this.funcoesService.backToTop();
            return;
        }
        this.dataLoteDuplica.loteId = this.data.loteIdDestino;
        this.dataLoteDuplica.loteIdOri = this.data.loteId;
        this.dataLoteDuplica.geraCodigo = this.loteAutomatico === true ? 'S' : 'N';
        this.dataLoteDuplica.retLote = "";
        this.dataLoteDuplica.osgId = this.data.osgId;
        this.loteService.loteDuplica(this.dataLoteDuplica).subscribe(function (resp) {
            if (_this.funcoesService.isNotUndefinedOrNull(resp.validationResult)) {
                _this.mensagens = _this.messageService.validationResult(resp.validationResult);
                if (!resp.validationResult.isValid) {
                    _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("backError").emit(_this.mensagens);
                    _this.funcoesService.backToTop();
                }
                else {
                    _this.messageService.success("titles.cadastroLotes", !_this.isCreateSubLote ? "messages.loteDuplicadoComSucesso" : "messages.subLoteGeradoComSucesso");
                    _this.atualizar.emit();
                    jQuery("#lote-duplicate-dialog").modal("hide");
                }
            }
        });
    };
    LoteDuplicateComponent.prototype.validaLote = function () {
        var _this = this;
        if (this.funcoesService.isNotUndefinedOrNull(this.data.loteIdDestino)) {
            if (this.data.loteIdDestino !== '') {
                var testFormat = /^([0-9]{4})(\/)([0-9]{2})(([A-Z]{1})?)$/.test(this.data.loteIdDestino);
                if (!testFormat) {
                    this.messageService.warning("titles.cadastroLotes", "messages.formatoDoLoteInvalido");
                    this.data.loteIdDestino = "";
                    return;
                }
                else {
                    this.loteService._getById(this.data.loteIdDestino).subscribe(function (resp) {
                        if (!_this.funcoesService.isUndefinedOrNull(resp)) {
                            _this.messageService.warning("titles.cadastroLotes", "messages.loteJaCadastrado");
                            _this.data.loteIdDestino = "";
                            return;
                        }
                    });
                }
            }
        }
    };
    LoteDuplicateComponent.prototype.newSubLote = function (loteId /*, sublote: false */) {
        return __awaiter(this, void 0, void 0, function () {
            var alphabet, isSetLoteId, i, response;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "U", "V", "W", "X", "Y", "Z"];
                        i = 0;
                        _a.label = 1;
                    case 1:
                        if (!(i < alphabet.length)) return [3 /*break*/, 4];
                        isSetLoteId = loteId + alphabet[i];
                        return [4 /*yield*/, this.loteService._getById(isSetLoteId).toPromise()];
                    case 2:
                        response = _a.sent();
                        if (!response) {
                            return [3 /*break*/, 4];
                        }
                        _a.label = 3;
                    case 3:
                        i++;
                        return [3 /*break*/, 1];
                    case 4:
                        this.data.loteIdDestino = isSetLoteId;
                        return [2 /*return*/];
                }
            });
        });
    };
    LoteDuplicateComponent.prototype.generatedLote = function (event) {
        var _this = this;
        if (this.loteAutomatico) {
            var params = {
                loteId: this.data.loteId,
                isCreateSubLote: this.isCreateSubLote
            };
            this.loteService.getProximoLote(params).subscribe({
                next: function (resp) {
                    if (resp && resp.retLoteId) {
                        _this.data.loteIdDestino = resp.retLoteId;
                    }
                }
            });
        }
        else {
            this.data.loteIdDestino = "";
        }
    };
    LoteDuplicateComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"] },
        { type: _lote_service__WEBPACK_IMPORTED_MODULE_9__["LoteService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _lote_model__WEBPACK_IMPORTED_MODULE_8__["LoteDto"])
    ], LoteDuplicateComponent.prototype, "data", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], LoteDuplicateComponent.prototype, "atualizar", void 0);
    LoteDuplicateComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-lote-duplicate",
            template: __importDefault(__webpack_require__(/*! raw-loader!./lote-duplicate.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-duplicate/lote-duplicate.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"],
            _lote_service__WEBPACK_IMPORTED_MODULE_9__["LoteService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"]])
    ], LoteDuplicateComponent);
    return LoteDuplicateComponent;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/lote/lote-filter/lote-filter.component.ts":
/*!**************************************************************************!*\
  !*** ./src/app/pages/cadastro/lote/lote-filter/lote-filter.component.ts ***!
  \**************************************************************************/
/*! exports provided: LoteFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoteFilterComponent", function() { return LoteFilterComponent; });
/* harmony import */ var _lote_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../lote.service */ "./src/app/pages/cadastro/lote/lote.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 _lote_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../lote.model */ "./src/app/pages/cadastro/lote/lote.model.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.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 LoteFilterComponent = /** @class */ (function () {
    function LoteFilterComponent(service) {
        this.service = service;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_4__["Mascaras"]();
    }
    LoteFilterComponent.prototype.ngOnInit = function () {
        if (!this.service.filter)
            this.service.filter = new _lote_model__WEBPACK_IMPORTED_MODULE_2__["LoteFilter"]();
    };
    LoteFilterComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid)
            return;
        this.filtrar.emit(this.service.filter);
        jQuery("#lote-filter-dialog").modal("hide");
    };
    LoteFilterComponent.ctorParameters = function () { return [
        { type: _lote_service__WEBPACK_IMPORTED_MODULE_0__["LoteService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
        __metadata("design:type", Object)
    ], LoteFilterComponent.prototype, "filtrar", void 0);
    LoteFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-lote-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./lote-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-filter/lote-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_lote_service__WEBPACK_IMPORTED_MODULE_0__["LoteService"]])
    ], LoteFilterComponent);
    return LoteFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/lote/lote-form/lote-form.component.scss":
/*!************************************************************************!*\
  !*** ./src/app/pages/cadastro/lote/lote-form/lote-form.component.scss ***!
  \************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".c-btn.disabled {\n  background-color: #e9ecef !important;\n  opacity: 1 !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvY2FkYXN0cm8vbG90ZS9sb3RlLWZvcm0vQzpcXENvcnBvcmF0ZVxcQ29ycG9yYXRlV2ViRGVzZW52XFxfdW5pc29sdXRpb24vc3JjXFxhcHBcXHBhZ2VzXFxjYWRhc3Ryb1xcbG90ZVxcbG90ZS1mb3JtXFxsb3RlLWZvcm0uY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL3BhZ2VzL2NhZGFzdHJvL2xvdGUvbG90ZS1mb3JtL2xvdGUtZm9ybS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLG9DQUFBO0VBQ0EscUJBQUE7QUNDRiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL2NhZGFzdHJvL2xvdGUvbG90ZS1mb3JtL2xvdGUtZm9ybS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5jLWJ0bi5kaXNhYmxlZCB7XHJcbiAgYmFja2dyb3VuZC1jb2xvcjogI2U5ZWNlZiAhaW1wb3J0YW50O1xyXG4gIG9wYWNpdHk6IDEgIWltcG9ydGFudDtcclxufVxyXG5cclxuXHJcbiIsIi5jLWJ0bi5kaXNhYmxlZCB7XG4gIGJhY2tncm91bmQtY29sb3I6ICNlOWVjZWYgIWltcG9ydGFudDtcbiAgb3BhY2l0eTogMSAhaW1wb3J0YW50O1xufSJdfQ== */");

/***/ }),

/***/ "./src/app/pages/cadastro/lote/lote-form/lote-form.component.ts":
/*!**********************************************************************!*\
  !*** ./src/app/pages/cadastro/lote/lote-form/lote-form.component.ts ***!
  \**********************************************************************/
/*! exports provided: LoteFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoteFormComponent", function() { return LoteFormComponent; });
/* harmony import */ var _shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../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 app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/cadastro/lote/lote.service */ "./src/app/pages/cadastro/lote/lote.service.ts");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _ce_mercante_ce_mercante_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../ce-mercante/ce-mercante.service */ "./src/app/pages/cadastro/ce-mercante/ce-mercante.service.ts");
/* harmony import */ var _destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _mensagem_mensagem_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../mensagem/mensagem.service */ "./src/app/pages/cadastro/mensagem/mensagem.service.ts");
/* harmony import */ var _nome_armazenado_nome_armazenado_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../nome-armazenado/nome-armazenado.service */ "./src/app/pages/cadastro/nome-armazenado/nome-armazenado.service.ts");
/* harmony import */ var _unidade_unidade_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../unidade/unidade.service */ "./src/app/pages/cadastro/unidade/unidade.service.ts");
/* harmony import */ var _lote_constants__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../lote.constants */ "./src/app/pages/cadastro/lote/lote.constants.ts");
/* harmony import */ var _lote_model__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../lote.model */ "./src/app/pages/cadastro/lote/lote.model.ts");
/* harmony import */ var app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_19__ = __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 rxjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var _cadastro_da_cadastro_da_model__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../cadastro-da/cadastro-da.model */ "./src/app/pages/cadastro/cadastro-da/cadastro-da.model.ts");
/* harmony import */ var _cadastro_da_cadastro_da_service__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../cadastro-da/cadastro-da.service */ "./src/app/pages/cadastro/cadastro-da/cadastro-da.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 LoteFormComponent = /** @class */ (function (_super) {
    __extends(LoteFormComponent, _super);
    function LoteFormComponent(router, messageService, activatedRoute, loteService, funcoesService, permissoesUtils, nomeArmazenadoService, unidadeService, configuracao, ceMercanteService, mensagemService, destinatarioService, cadastroDaService, loginService) {
        var _this = _super.call(this, new _lote_constants__WEBPACK_IMPORTED_MODULE_17__["LoteConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.loteService = loteService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.nomeArmazenadoService = nomeArmazenadoService;
        _this.unidadeService = unidadeService;
        _this.configuracao = configuracao;
        _this.ceMercanteService = ceMercanteService;
        _this.mensagemService = mensagemService;
        _this.destinatarioService = destinatarioService;
        _this.cadastroDaService = cadastroDaService;
        _this.loginService = loginService;
        _this.data = new _lote_model__WEBPACK_IMPORTED_MODULE_18__["Lote"]();
        _this.mensagens = [];
        _this.constantes = new _lote_constants__WEBPACK_IMPORTED_MODULE_17__["LoteConstants"]();
        _this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_4__["Mascaras"]();
        _this.permiteAlterarNomeArmazenado = false;
        _this.permiteAlterarDensidade = false;
        _this.permiteImprimir = false;
        _this.permiteAlterarQuebra = false;
        _this.permiteAlterarGeraFormContrAut = false;
        _this.permiteAlterarFlagRetornoTonelada = false;
        _this.permiteAlterarPrecoArmazenado = false;
        _this.selectedOperacaoIdEntrada = [];
        _this.selectedOperacaoIdRetorno = [];
        _this.mascaras = new _config_enumerables__WEBPACK_IMPORTED_MODULE_4__["Mascaras"]();
        _this.auxLote = "";
        _this.possuiMovimentoDescarga = false;
        _this.possuiEntradas = false;
        _this.possuiMovimento = false;
        _this.target = _this.funcoesService.getTargetLocation();
        _this.customPatterns = {
            '0': { pattern: new RegExp('[0-9]') },
            'A': { pattern: new RegExp('[a-zA-Z]'), optional: true } // Para letra opcional
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        _this.filialId = loginService.getLogin().filialId;
        return _this;
    }
    LoteFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.configuracao.getConfig(this.constantes.listaParam, function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, _this.permissoesUtils.getLibRotina(_this.actionForm), function () { return __awaiter(_this, void 0, void 0, function () {
                var id;
                var _this = this;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            this.loadConfig();
                            this.validaPermissoes();
                            id = this.activatedRoute.snapshot.paramMap.get("id");
                            if (!id) return [3 /*break*/, 2];
                            return [4 /*yield*/, this.preEditOrDetail(atob(id))];
                        case 1:
                            _a.sent();
                            Object(rxjs__WEBPACK_IMPORTED_MODULE_20__["forkJoin"])([
                                this.cadastroDaService.getById(this.data.cadastroDaId)
                            ]).subscribe(function (result) {
                                _this.data.cadastroDa = !!result[0] ? result[0] : new _cadastro_da_cadastro_da_model__WEBPACK_IMPORTED_MODULE_22__["CadastroDa"]();
                            });
                            return [3 /*break*/, 3];
                        case 2:
                            this.getCamposAdicionais();
                            this.data.tipoOperacaoId = this.tipoOperacaoDefaut === 0 ? null : this.tipoOperacaoDefaut;
                            this.data.procedenciaId = this.procedenciaDefault === "0" ? "" : this.procedenciaDefault;
                            this.preencheComboNomeArmazenado("");
                            this.preencheComboUnidade("KG, LT, UN, CC");
                            this.data.geraRetencao = this.geraRetencao ? "S" : "N";
                            this.data.formControle = this.formControledefaut ? "S" : "N";
                            this.data.importaDanfe = this.importaDANFE ? "S" : "N";
                            this.data.geraFormRetorno = this.formControleAutoDef ? "S" : "N";
                            this.data.modeloNotaId = this.modeloNotaDefaut;
                            this.data.tipoProcesso = "A";
                            this.data.consideraQuebra = "S";
                            _a.label = 3;
                        case 3: return [2 /*return*/];
                    }
                });
            }); }, function () {
                _this.permissoesUtils.back();
            });
        });
    };
    LoteFormComponent.prototype.preEditOrDetail = function (id) {
        return __awaiter(this, void 0, void 0, function () {
            var resp, arrayOpEntrada, arrayOpRetorno;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.loteService._getById(id).toPromise()];
                    case 1:
                        resp = _a.sent();
                        if (!!resp) {
                            this.data = resp;
                            this.obterDadosMovimentos();
                            this.preencheComboNomeArmazenado(this.data.materialId);
                            this.preencheComboUnidade("KG, LT, UN, CC");
                            this.trataEmitente(resp.emitente);
                            this.trataMensagem(resp.mensagemId);
                            this.preencheComboCeMercante();
                            if (this.data.operacaoIdEntrada) {
                                arrayOpEntrada = this.data.operacaoIdEntrada.split(',');
                                this.selectedOperacaoIdEntrada = arrayOpEntrada;
                            }
                            else {
                                this.selectedOperacaoIdEntrada = [];
                            }
                            if (this.data.operacaoIdRetorno) {
                                arrayOpRetorno = this.data.operacaoIdRetorno.split(',');
                                this.selectedOperacaoIdRetorno = arrayOpRetorno;
                            }
                            else {
                                this.selectedOperacaoIdRetorno = [];
                            }
                            this.auxLote = this.data.loteId;
                            this.data.ceMercanteId = this.funcoesService.isPositive(this.data.ceMercanteId) ? this.data.ceMercanteId : "";
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    LoteFormComponent.prototype.onSubmit = function (form, create) {
        var _this = this;
        if (create === void 0) { create = false; }
        if (form.invalid) {
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_6__["EventEmitterService"].get("formError").emit(form);
            this.funcoesService.backToTop();
            return;
        }
        this.data.logRotina = "Manut. Cadastro Lotes";
        this.loteService
            .save(this.data, this.funcoesService.isEdit(this.actionForm))
            .subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result.validationResult);
            if (!result.validationResult.isValid) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_6__["EventEmitterService"].get("backError").emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess("titles.cadastroLotes");
                if (create) {
                    _this.data = new _lote_model__WEBPACK_IMPORTED_MODULE_18__["Lote"]();
                    _this.router.navigate([_this.target + "/cadastro/lote/create"]);
                }
                else {
                    _this.back();
                    return;
                }
            }
        });
    };
    LoteFormComponent.prototype.edit = function () {
        this.router.navigate([this.target + "/cadastro/lote/edit/" + btoa(this.data.loteId)]);
    };
    LoteFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    LoteFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate([this.target + "/cadastro/lote"]);
    };
    LoteFormComponent.prototype.getCamposAdicionais = function () {
        var _this = this;
        this.funcoesService.camposAdicionais
            .get(this.constantes.sisFormularioId)
            .subscribe(function (data) {
            _this.data.sisCampoAdds = data;
        });
    };
    LoteFormComponent.prototype.validaPermissoes = function () {
        var _this = this;
        this.permissoesUtils.validRotina(this.constantes.sisFormularioId, 8, function () { return _this.permiteAlterarNomeArmazenado = true; }, function () { return _this.permiteAlterarNomeArmazenado = false; });
        this.permissoesUtils.validRotina(this.constantes.sisFormularioId, 9, function () { return _this.permiteAlterarDensidade = true; }, function () { return _this.permiteAlterarDensidade = false; });
        this.permissoesUtils.validRotina(this.constantes.sisFormularioId, 10, function () { return _this.permiteImprimir = true; }, function () { return _this.permiteImprimir = false; });
        this.permissoesUtils.validRotina(this.constantes.sisFormularioId, 11, function () { return _this.permiteAlterarQuebra = true; }, function () { return _this.permiteAlterarQuebra = false; });
        this.permissoesUtils.validRotina(this.constantes.sisFormularioId, 12, function () { return _this.permiteAlterarGeraFormContrAut = true; }, function () { return _this.permiteAlterarGeraFormContrAut = false; });
        this.permissoesUtils.validRotina(this.constantes.sisFormularioId, 13, function () { return _this.permiteAlterarFlagRetornoTonelada = true; }, function () { return _this.permiteAlterarFlagRetornoTonelada = false; });
        this.permissoesUtils.validRotina(this.constantes.sisFormularioId, 7, function () { return _this.permiteAlterarPrecoArmazenado = true; }, function () { return _this.permiteAlterarPrecoArmazenado = false; });
    };
    LoteFormComponent.prototype.loadConfig = function () {
        this.loteAutomatico = this.configuracao.lerConfig("CTR", "LoteAutomatico") === "S" ? true : false;
        this.tipoOperacaoDefaut = this.funcoesService.getValue(this.configuracao.lerConfig("CTR", "TipoOperacaoDefaut"), "I");
        this.grupoCliLote = this.configuracao.lerConfig("CTR", "GrupoCliLote") === "S" ? true : false;
        this.modeloNotaDefaut = this.configuracao.lerConfig("CTR", "ModeloNotaDefaut");
        this.obrigaGrpCliLote = this.configuracao.lerConfig("CTR", "ObrigaGrpCliLote") === "S" ? true : false;
        this.unidadeDispSel = this.configuracao.lerConfig("CTR", "UnidadeDispSel");
        if (!this.unidadeDispSel || (this.unidadeDispSel && (this.unidadeDispSel.trim() === "" || this.unidadeDispSel == 0))) {
            this.unidadeDispSel = "KG, LT, UN, CC";
        }
        this.procedenciaDefault = this.configuracao.lerConfig("CTR", "ProcedenciaDefault");
        this.obrigaPais = this.configuracao.lerConfig("CTR", "ObrigaPais") === "S" ? true : false;
        this.opEntradaDefaut = this.configuracao.lerConfig("CTR", "OpEntradaDefaut");
        this.opSaidaDEfaut = this.configuracao.lerConfig("CTR", "OpSaidaDefaut");
        this.geraRetencao = this.configuracao.lerConfig("CTR", "GeraRetencao") === "S" ? true : false;
        this.formNoLote = this.configuracao.lerConfig("CTR", "FormNoLote") === "S" ? true : false;
        this.formControledefaut = this.configuracao.lerConfig("CTR", "FormControleDefaut") === "S" ? true : false;
        this.importaDANFE = this.configuracao.lerConfig("CTV", "ImportaDANFE") === "S" ? true : false;
        this.formControleAutoDef = this.configuracao.lerConfig("CTR", "FormControleAutoDef") === "S" ? true : false;
        this.permiteDensTanque = this.configuracao.lerConfig("CTR", "PermiteDensTanque") === "S" ? true : false;
        this.obrigaLocalOperacao = this.configuracao.lerConfig("CTR", "ObrigaLocalOperacao") === "S" ? true : false;
        this.obrigaTipoIntegracao = this.configuracao.lerConfig("CTR", "ObrigaTipoIntegracao") === "S" ? true : false;
        this.exibeAppaWeb = this.configuracao.lerConfig("CTR", "ExibeAppaWeb") === "S" ? true : false;
        this.tipoEspecLote = this.funcoesService.isBoolean(this.configuracao.lerConfig("CTR", "TipoEspecLote"));
        this.lblCpLote01 = this.funcoesService.isUndefinedOrNull(this.configuracao.lerConfig("CTR", "lblCpLote01")) ? "" : this.configuracao.lerConfig("CTR", "lblCpLote01");
        this.lblCpLote02 = this.funcoesService.isUndefinedOrNull(this.configuracao.lerConfig("CTR", "lblCpLote02")) ? "" : this.configuracao.lerConfig("CTR", "lblCpLote02");
        this.lblCpLote03 = this.funcoesService.isUndefinedOrNull(this.configuracao.lerConfig("CTR", "lblCpLote03")) ? "" : this.configuracao.lerConfig("CTR", "lblCpLote03");
        this.lblCpLote04 = this.funcoesService.isUndefinedOrNull(this.configuracao.lerConfig("CTR", "lblCpLote04")) ? "" : this.configuracao.lerConfig("CTR", "lblCpLote04");
        this.lblCpLote05 = this.funcoesService.isUndefinedOrNull(this.configuracao.lerConfig("CTR", "lblCpLote05")) ? "" : this.configuracao.lerConfig("CTR", "lblCpLote05");
        this.obrigaSerieNF = this.configuracao.boolean("STO", "ObrigaSerieNF");
        this.obrigaSerieCL = this.configuracao.boolean("CTV", "ObrigaSerieCL");
        if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].isPositive(this.opEntradaDefaut)) {
            var arrayOpEntrada = this.opEntradaDefaut.split(',');
            this.selectedOperacaoIdEntrada = arrayOpEntrada;
            this.data.operacaoIdEntrada = this.opEntradaDefaut;
        }
        else {
            this.selectedOperacaoIdEntrada = [];
        }
        if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].isPositive(this.opSaidaDEfaut)) {
            var arrayOpRetorno = this.opSaidaDEfaut.split(',');
            this.selectedOperacaoIdRetorno = arrayOpRetorno;
            this.data.operacaoIdRetorno = this.opSaidaDEfaut;
        }
        else {
            this.selectedOperacaoIdRetorno = [];
        }
    };
    LoteFormComponent.prototype.trataOsg = function (osg) {
        if (this.funcoesService.isNotUndefinedOrNull(osg)) {
            this.data.osgId = osg.osgId;
        }
    };
    LoteFormComponent.prototype.trataGrupoCliente = function (grupoCliente) {
        this.data.grupoCliente = grupoCliente;
    };
    LoteFormComponent.prototype.trataMaterialSelecionado = function (material) {
        if (this.funcoesService.isNotUndefinedOrNull(material)) {
            this.preencheComboNomeArmazenado(material.materialId);
            this.data.material = material;
            if (this.funcoesService.isCreate(this.actionForm)) {
                this.data.ptRetencao = material.ptRetencao;
                this.data.flagConferencia = material.flagConferencia === "S" ? "S" : "N";
                this.data.ptDifAduaneira = material.ptDifAduaneira;
            }
        }
    };
    LoteFormComponent.prototype.trataClienteSelecionado = function (destinatario) {
        var _this = this;
        if (destinatario) {
            if (this.grupoCliLote) {
                if (this.funcoesService.isNotUndefinedOrNull(destinatario)) {
                    this.data.grupoClienteId = destinatario.grupoClienteId;
                }
            }
            this.destinatarioService.getById(destinatario.destinatarioId).subscribe(function (resp) {
                _this.data.emitente.estadoId = resp.estadoId;
            });
            this.data.cliente = destinatario;
            this.data.emitente = destinatario;
            if (this.funcoesService.isCreate(this.actionForm)) {
                this.data.filialId = this.funcoesService.isUndefinedOrNull(this.data.cliente.filialId) ? 1 : this.data.cliente.filialId;
            }
        }
    };
    LoteFormComponent.prototype.trataEmitente = function (destinatario) {
        var _this = this;
        if (destinatario) {
            this.destinatarioService.getById(destinatario.destinatarioId).subscribe(function (resp) {
                _this.data.emitente.estadoId = resp.estadoId;
            });
            this.data.emitente = destinatario;
        }
    };
    LoteFormComponent.prototype.trataMensagem = function (mensagemId) {
        var _this = this;
        if (this.funcoesService.isPositive(mensagemId)) {
            this.mensagemService.getById(mensagemId).subscribe(function (resp) {
                _this.data.mensagem = resp.observacoes;
            });
        }
    };
    LoteFormComponent.prototype.trataNavio = function (destinatario) {
        if (destinatario) {
            this.data.navio = destinatario;
            this.preencheComboCeMercante();
        }
        else {
            this.ceMercantes = [];
        }
    };
    Object.defineProperty(LoteFormComponent.prototype, "requiredDadosNavio", {
        get: function () {
            if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].toNumber(this.data.destinatarioIdNavio) > 0) {
                return true;
            }
            return false;
        },
        enumerable: true,
        configurable: true
    });
    LoteFormComponent.prototype.trataDensidadePrecoSeguro = function () {
        if (["KG", "UN"].includes(this.data.unidadeId)) {
            this.data.densidade = null;
            this.data.precoSeguro = this.data.precoArmazenado;
        }
        else if (this.data.unidadeId === "LT" && this.data.densidade > 0) {
            this.data.precoSeguro = (this.data.precoArmazenado / this.data.densidade);
        }
        else if (this.data.unidadeId === "CC" && this.data.densidade > 0) {
            this.data.precoSeguro = (this.data.precoArmazenado * this.data.densidade);
        }
    };
    LoteFormComponent.prototype.preencheComboNomeArmazenado = function (materialId) {
        var _this = this;
        this.nomeArmazenados = [];
        this.nomeArmazenadoService.getByMaterial(materialId).subscribe(function (resp) {
            var comparaNomeArmazenadoId = resp.find(function (x) { return x.nomeArmazenadoId == _this.data.nomeArmazenadoId; });
            if (!comparaNomeArmazenadoId)
                _this.data.nomeArmazenadoId = 0;
            resp.forEach(function (e) {
                if (e !== undefined) {
                    _this.nomeArmazenados.push(e);
                }
            });
        });
    };
    LoteFormComponent.prototype.preencheComboUnidade = function (unidades) {
        var _this = this;
        this.unidades = [];
        var uni = this.funcoesService.isUndefinedOrNull(this.unidadeDispSel) ? unidades : this.unidadeDispSel;
        this.unidadeService.getOpcoesValidas(uni).subscribe(function (resp) {
            resp.forEach(function (e) {
                if (e !== undefined) {
                    _this.unidades.push(e);
                }
            });
        });
    };
    LoteFormComponent.prototype.preencheComboCeMercante = function () {
        var _this = this;
        this.ceMercantes = [];
        if (this.funcoesService.isPositive(this.data.destinatarioIdNavio) && this.funcoesService.isPositive(this.data.viagemNavioId)) {
            this.ceMercanteService.getByNavioViagem(this.data.destinatarioIdNavio, this.data.viagemNavioId).subscribe(function (resp) {
                if (resp && resp.length > 0) {
                    resp.forEach(function (e) {
                        if (e !== undefined) {
                            _this.ceMercantes.push(e);
                        }
                    });
                }
            });
        }
    };
    LoteFormComponent.prototype.trataOperacao = function (selectedItems) {
        this.data.operacaoIdEntrada = selectedItems;
    };
    LoteFormComponent.prototype.trataOperacaoRetorno = function (selectedItems) {
        this.data.operacaoIdRetorno = selectedItems;
    };
    LoteFormComponent.prototype.setMensagem = function (m) {
        this.data.mensagem = m.observacoes;
    };
    LoteFormComponent.prototype.validaLoteOrigem = function () {
        var _this = this;
        if (this.funcoesService.isNotUndefinedOrNull(this.data.loteIdOrigem)) {
            if (this.data.loteIdOrigem !== '') {
                this.loteService._getById(this.data.loteIdOrigem).subscribe(function (resp) {
                    if (!resp) {
                        _this.messageService.warning("titles.cadastroLotes", "messages.naoExisteLoteOrigem");
                    }
                });
            }
        }
    };
    LoteFormComponent.prototype.validaLote = function () {
        var _this = this;
        if (this.funcoesService.isNotUndefinedOrNull(this.data.loteId)) {
            if (this.data.loteId !== '') {
                this.loteService._getById(this.data.loteId).subscribe(function (resp) {
                    if (!_this.funcoesService.isUndefinedOrNull(resp)) {
                        _this.messageService.warning("titles.cadastroLotes", "messages.loteJaCadastrado");
                        return;
                    }
                    _this.auxLote = _this.data.loteId;
                });
            }
        }
    };
    Object.defineProperty(LoteFormComponent.prototype, "vrfObrigaDensidade", {
        get: function () {
            return !["KG", "UN"].includes(this.data.unidadeId);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LoteFormComponent.prototype, "disabledDensidade", {
        get: function () {
            return this.funcoesService.isDetail(this.actionForm)
                || !((!this.possuiMovimentoDescarga
                    || this.funcoesService.isCreate(this.actionForm)
                    || this.permiteAlterarDensidade)
                    && ["LT", "CC"].includes(this.data.unidadeId));
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LoteFormComponent.prototype, "isObrigaPais", {
        get: function () {
            return app_shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["BooleanUtilsStaticService"].toBoolean(this.obrigaPais);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LoteFormComponent.prototype, "disabledKilosQuebra", {
        get: function () {
            return this.funcoesService.isDetail(this.actionForm)
                || !(this.funcoesService.isCreate(this.actionForm)
                    || this.permiteAlterarQuebra);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LoteFormComponent.prototype, "disabledSePossuiEntrada", {
        get: function () {
            return this.funcoesService.isDetail(this.actionForm)
                || !(!this.possuiEntradas
                    || this.funcoesService.isCreate(this.actionForm));
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LoteFormComponent.prototype, "disabledSePossuiMovimento", {
        get: function () {
            return this.funcoesService.isDetail(this.actionForm) || this.possuiMovimento;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LoteFormComponent.prototype, "disabledUnidade", {
        get: function () {
            return this.funcoesService.isDetail(this.actionForm)
                || !(!this.possuiMovimentoDescarga
                    || this.funcoesService.isCreate(this.actionForm));
        },
        enumerable: true,
        configurable: true
    });
    LoteFormComponent.prototype.obterDadosMovimentos = function () {
        var _this = this;
        Object(rxjs__WEBPACK_IMPORTED_MODULE_20__["forkJoin"])([
            this.loteService.possuiMovimento(this.data),
            this.loteService.possuiMovimentoDescarga(this.data),
            this.loteService.possuiEntradas(this.data)
        ]).subscribe(function (resp) {
            _this.possuiMovimento = resp[0];
            _this.possuiMovimentoDescarga = resp[1];
            _this.possuiEntradas = resp[2];
        });
    };
    LoteFormComponent.prototype.routeLancamentoBl = function () {
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_21__["ModalUtilsStaticService"].openWindow("cadastro/lancamentoBl");
    };
    LoteFormComponent.prototype.routeLancamentoDi = function () {
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_21__["ModalUtilsStaticService"].openWindow("cadastro/lancamentoDi");
    };
    LoteFormComponent.prototype.routeLancamentoFma = function () {
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_21__["ModalUtilsStaticService"].openWindow("cadastro/lancamentoFma");
    };
    Object.defineProperty(LoteFormComponent.prototype, "obrigaSerieNota", {
        get: function () {
            return this.obrigaSerieNF && this.obrigaSerieCL;
        },
        enumerable: true,
        configurable: true
    });
    LoteFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"] },
        { type: app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_3__["LoteService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"] },
        { type: _nome_armazenado_nome_armazenado_service__WEBPACK_IMPORTED_MODULE_15__["NomeArmazenadoService"] },
        { type: _unidade_unidade_service__WEBPACK_IMPORTED_MODULE_16__["UnidadeService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_10__["ConfiguracaoFacade"] },
        { type: _ce_mercante_ce_mercante_service__WEBPACK_IMPORTED_MODULE_12__["CeMercanteService"] },
        { type: _mensagem_mensagem_service__WEBPACK_IMPORTED_MODULE_14__["MensagemService"] },
        { type: _destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_13__["DestinatarioService"] },
        { type: _cadastro_da_cadastro_da_service__WEBPACK_IMPORTED_MODULE_23__["CadastroDaService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"] }
    ]; };
    LoteFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-lote-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./lote-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-form/lote-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./lote-form.component.scss */ "./src/app/pages/cadastro/lote/lote-form/lote-form.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"],
            app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_3__["LoteService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"],
            _nome_armazenado_nome_armazenado_service__WEBPACK_IMPORTED_MODULE_15__["NomeArmazenadoService"],
            _unidade_unidade_service__WEBPACK_IMPORTED_MODULE_16__["UnidadeService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_10__["ConfiguracaoFacade"],
            _ce_mercante_ce_mercante_service__WEBPACK_IMPORTED_MODULE_12__["CeMercanteService"],
            _mensagem_mensagem_service__WEBPACK_IMPORTED_MODULE_14__["MensagemService"],
            _destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_13__["DestinatarioService"],
            _cadastro_da_cadastro_da_service__WEBPACK_IMPORTED_MODULE_23__["CadastroDaService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"]])
    ], LoteFormComponent);
    return LoteFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/lote/lote-index/lote-index.component.ts":
/*!************************************************************************!*\
  !*** ./src/app/pages/cadastro/lote/lote-index/lote-index.component.ts ***!
  \************************************************************************/
/*! exports provided: LoteIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoteIndexComponent", function() { return LoteIndexComponent; });
/* harmony import */ var _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-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 app_pages_cadastro_lote_lote_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/cadastro/lote/lote.model */ "./src/app/pages/cadastro/lote/lote.model.ts");
/* harmony import */ var app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/pages/cadastro/lote/lote.service */ "./src/app/pages/cadastro/lote/lote.service.ts");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_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 _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _lote_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../lote.constants */ "./src/app/pages/cadastro/lote/lote.constants.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var _lancamento_di_lancamento_di_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../lancamento-di/lancamento-di.service */ "./src/app/pages/cadastro/lancamento-di/lancamento-di.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 LoteIndexComponent = /** @class */ (function (_super) {
    __extends(LoteIndexComponent, _super);
    function LoteIndexComponent(router, service, datatables, messageService, funcoes, loginService, permissoesUtils, lancamentoDiService) {
        var _this = _super.call(this, new _lote_constants__WEBPACK_IMPORTED_MODULE_12__["LoteConstants"](), funcoes) || this;
        _this.router = router;
        _this.service = service;
        _this.datatables = datatables;
        _this.messageService = messageService;
        _this.funcoes = funcoes;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.lancamentoDiService = lancamentoDiService;
        _this.data = new app_pages_cadastro_lote_lote_model__WEBPACK_IMPORTED_MODULE_3__["Lote"]();
        _this.dataList = [];
        _this.mensagens = [];
        _this.constantes = new _lote_constants__WEBPACK_IMPORTED_MODULE_12__["LoteConstants"]();
        _this.target = _this.funcoes.getTargetLocation();
        _this.duplicate = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 6, function () {
                var object = {
                    createSubLote: false,
                    loteId: _this.data.loteId
                };
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_9__["EventEmitterService"].get('emitterDuplicaLote').emit(object);
            });
        };
        _this.newSubLote = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 6, function () { return __awaiter(_this, void 0, void 0, function () {
                var createSubLote, lote, dataLote, hasAllLetters, object;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            createSubLote = true;
                            lote = this.data.loteId;
                            dataLote = this.data.loteId;
                            if (!(this.data.loteId.length === 8)) return [3 /*break*/, 2];
                            return [4 /*yield*/, this.validaNovoLote()];
                        case 1:
                            hasAllLetters = _a.sent();
                            console.log(hasAllLetters);
                            if (this.data.loteId.length === 8 && hasAllLetters) {
                                createSubLote = false;
                                dataLote = lote.slice(0, -1);
                            }
                            _a.label = 2;
                        case 2:
                            object = {
                                createSubLote: createSubLote,
                                loteId: dataLote
                            };
                            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_9__["EventEmitterService"].get('emitterDuplicaLote').emit(object);
                            return [2 /*return*/];
                    }
                });
            }); });
        };
        _this.bl = function () {
            app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["ModalUtilsStaticService"].openWindow("cadastro/lancamentoBl?p=" + btoa(_this.data.loteId));
        };
        _this.di = function () {
            _this.lancamentoDiService.tipoOperacaoLotePermiteDI(_this.data.loteId).subscribe(function (permiteDI) {
                if (permiteDI) {
                    app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["ModalUtilsStaticService"].openWindow("cadastro/lancamentoDi?p=" + btoa(_this.data.loteId));
                }
            });
        };
        _this.fma = function () {
            app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["ModalUtilsStaticService"].openWindow("cadastro/lancamentoFma?p=" + btoa(_this.data.loteId));
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    LoteIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoes.abrirFiltro) {
                    _this.service.filter = new app_pages_cadastro_lote_lote_model__WEBPACK_IMPORTED_MODULE_3__["LoteFilter"]();
                    _this.funcoes.openModal("lote-filter-dialog");
                }
                else {
                    _this.refresh();
                }
            }
        }, function () { return _this.permissoesUtils.back(); }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'duplicate', func: function () { return _this.duplicate; } },
            { action: 'newSubLote', func: function () { return _this.newSubLote; } }
        ]);
    };
    LoteIndexComponent.prototype.create = function () {
        this.router.navigate([this.target + "/cadastro/lote/create"]);
    };
    LoteIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.getByFiltro(this.service.filter).subscribe(function (data) {
            _this.dataList = data;
            var columns = [
                _this.datatables.getDataString("loteId", "lote"),
                _this.datatables.getDataDateTime("dataLote", "data", "DD/MM/YYYY HH:mm"),
                _this.datatables.getDataString("destinatarioIdCliente", "codigo"),
                _this.datatables.getDataString("cliente", "cliente"),
                _this.datatables.getDataString("materialId", "material"),
                _this.datatables.getDataString("produto", "descricao"),
                _this.datatables.getDataString("origem", "origem"),
                _this.datatables.getDataString("loteReceita", "loteReceita"),
                _this.datatables.getDataString("numeroOsg", "osg")
            ];
            _this.datatables.toDataTable({ tableId: "dtLote", columns: columns, data: data, columnOrder: 1, orientationOrder: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["EOrientationOrder"].DESC }, function (aData) {
                _this.data = aData;
                console.log(_this.data);
            });
        });
    };
    LoteIndexComponent.prototype.edit = function () {
        if (this.funcoes.isNotUndefinedOrNull(this.data.loteId)) {
            this.router.navigate([this.target + "/cadastro/lote/edit/" + btoa(this.data.loteId)]);
        }
    };
    LoteIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _super.prototype.properties.call(_this, _this.data);
        });
    };
    LoteIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 14, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    LoteIndexComponent.prototype.filtrar = function () {
        jQuery("#lote-filter-dialog").modal("show");
    };
    LoteIndexComponent.prototype.executaFiltro = function (event) {
        this.refresh();
    };
    LoteIndexComponent.prototype.detail = function () {
        if (this.funcoes.isNotUndefinedOrNull(this.data.loteId)) {
            this.router.navigate([this.target + "/cadastro/lote/detail/" + btoa(this.data.loteId)]);
        }
    };
    LoteIndexComponent.prototype.remove = function () {
        var _this = this;
        if (this.funcoes.isNotUndefinedOrNull(this.data.loteId)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
                _this.messageService.removeConfirm(function () {
                    _this.service.remove(_this.data).subscribe(function (result) {
                        _this.mensagens = _this.messageService.validationResult(result.validationResult);
                        if (!result.validationResult.isValid) {
                            _this.messageService.error("titles.cadastroLotes", _this.mensagens[0]);
                        }
                        else {
                            _this.datatables.remove("dtLote");
                        }
                    });
                });
            });
        }
    };
    LoteIndexComponent.prototype.print = function () {
        var _this = this;
        var isnt = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 10, function () {
            _this.constantes.paramRelatorio = {
                filialId: isnt.loginService.getLogin().filialId,
                dataI: isnt.funcoes.getValue(isnt.service.filter.dataI, 'DI'),
                dataF: isnt.funcoes.getValue(isnt.service.filter.dataF, 'DF'),
                grupoClienteId: 0,
                destinatarioIdCliente: isnt.funcoes.getValue(isnt.service.filter.destinatarioIdCliente, 'I'),
                destinatarioIdEmitente: isnt.funcoes.getValue(isnt.service.filter.destinatarioIdEmitente, 'I'),
                materialId: isnt.funcoes.getValue(_this.service.filter.materialId),
                filialIdReport: isnt.loginService.getLogin().filialId,
                apresentaLoteEncerrado: _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["BooleanUtilsStaticService"].toBoolean(isnt.service.filter.apresentaLoteEncerrado)
            };
            _this.funcoesService.reportInvoc.invocaRelatorio(_this.constantes.reportId, _this.constantes.reportTitulo, _this.constantes.paramRelatorio);
        });
    };
    LoteIndexComponent.prototype.validaNovoLote = function () {
        var lote = this.data.loteId;
        var prefixo = lote.slice(0, -1);
        return this.service.getByFiltro(this.service.filter).toPromise().then(function (result) {
            var dataList = result.filter(function (x) { return x.loteId.slice(0, -1) === prefixo; });
            var alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
            var lastLettersSet = new Set(dataList.map(function (x) { return x.loteId.slice(-1).toUpperCase(); }));
            return alphabet.every(function (letter) { return lastLettersSet.has(letter); });
        });
    };
    LoteIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
        { type: app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_4__["LoteService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["DatatablesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_10__["PermissoesUtilsService"] },
        { type: _lancamento_di_lancamento_di_service__WEBPACK_IMPORTED_MODULE_14__["LancamentoDiService"] }
    ]; };
    LoteIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-lote-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./lote-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/lote/lote-index/lote-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
            app_pages_cadastro_lote_lote_service__WEBPACK_IMPORTED_MODULE_4__["LoteService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["DatatablesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_10__["PermissoesUtilsService"],
            _lancamento_di_lancamento_di_service__WEBPACK_IMPORTED_MODULE_14__["LancamentoDiService"]])
    ], LoteIndexComponent);
    return LoteIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_8__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/lote/lote.constants.ts":
/*!*******************************************************!*\
  !*** ./src/app/pages/cadastro/lote/lote.constants.ts ***!
  \*******************************************************/
/*! exports provided: LoteConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoteConstants", function() { return LoteConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var LoteConstants = /** @class */ (function () {
    function LoteConstants() {
        this.sisFormularioId = 1044;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.inclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.exclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.duplicarLote" },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: "labels.alteraPrecoArmazenado" },
            { sisFormularioId: this.sisFormularioId, libRotina: 8, acao: "labels.alteraNomeArmazenado" },
            { sisFormularioId: this.sisFormularioId, libRotina: 9, acao: "labels.alteraDensidade" },
            { sisFormularioId: this.sisFormularioId, libRotina: 10, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 11, acao: "labels.alteraQuebra" },
            { sisFormularioId: this.sisFormularioId, libRotina: 12, acao: "labels.alteraGeraFormControleAutomatico" },
            { sisFormularioId: this.sisFormularioId, libRotina: 13, acao: "labels.alteraFlagRetornoToneladas" },
            { sisFormularioId: this.sisFormularioId, libRotina: 14, acao: "labels.permissoes" },
        ];
        this.sisSistemaId = "CAD";
        this.nomeForm = "titles.cadastroLotes";
        this.reportId = "REL0018";
        this.reportTitulo = { "titulo": "Cadastro de Lotes", "subTitulo": "" };
        this.tabela = "Lote";
        this.listaIndex = [
            { title: 'Novo', action: 'create', icon: "icon-plus", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Visualizar', action: 'detail', icon: "icon-eye", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Excluir', action: 'remove', icon: "icon-close", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: 'print', icon: "icon-printer", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Propriedade', action: 'properties', icon: "icon-menu", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Duplicate', action: 'duplicate', icon: "fa fa-clone", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'NewSubLote', action: 'newSubLote', icon: "fa fa-sitemap", exibeButton: true, eximeMenu: true, menuName: 'Movimento' }
        ];
        this.listaForm = [
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
        this.listaParam = [
            {
                'sistema': 'CTR', 'parametros': ["TipoEspecLote",
                    "ProcedenciaDefault",
                    "LoteMaximo",
                    "LoteAutomatico",
                    "GrupoCliLote",
                    "ModeloNotaDefaut",
                    "OpSaidaDefaut",
                    "OpEntradaDefaut",
                    "FormControleDefaut",
                    "TipoOperacaoDefaut",
                    "GeraRetencao",
                    "FormNoLote",
                    "FormControleAutoDef",
                    "ExibeAppaWeb",
                    "ExibeOrigemGrupo",
                    "PermiteDensTanque",
                    "ObrigaPais",
                    "ObrigaTipoIntegracao",
                    "ObrigaLocalOperacao",
                    "UnidadeDispSel",
                    "ObrigaGrpCliLote",
                    "lblCpLote01",
                    "lblCpLote02",
                    "lblCpLote03",
                    "lblCpLote04",
                    "lblCpLote05"]
            },
            { 'sistema': 'CTV', 'parametros': ["ImportaDANFE", "ObrigaSerieCL"] },
            { 'sistema': 'STO', 'parametros': ["ObrigaSerieNF"] }
        ];
    }
    return LoteConstants;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/lote/lote.module.ts":
/*!****************************************************!*\
  !*** ./src/app/pages/cadastro/lote/lote.module.ts ***!
  \****************************************************/
/*! exports provided: LoteModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoteModule", function() { return LoteModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var app_pages_cadastro_lote_lote_form_lote_form_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/pages/cadastro/lote/lote-form/lote-form.component */ "./src/app/pages/cadastro/lote/lote-form/lote-form.component.ts");
/* harmony import */ var app_pages_cadastro_lote_lote_index_lote_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/cadastro/lote/lote-index/lote-index.component */ "./src/app/pages/cadastro/lote/lote-index/lote-index.component.ts");
/* harmony import */ var app_pages_cadastro_lote_lote_routing_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/pages/cadastro/lote/lote.routing.module */ "./src/app/pages/cadastro/lote/lote.routing.module.ts");
/* harmony import */ var app_pages_cadastro_lote_lote_filter_lote_filter_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/pages/cadastro/lote/lote-filter/lote-filter.component */ "./src/app/pages/cadastro/lote/lote-filter/lote-filter.component.ts");
/* harmony import */ var _lote_duplicate_lote_duplicate_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lote-duplicate/lote-duplicate.component */ "./src/app/pages/cadastro/lote/lote-duplicate/lote-duplicate.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 LoteModule = /** @class */ (function () {
    function LoteModule() {
    }
    LoteModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], app_pages_cadastro_lote_lote_routing_module__WEBPACK_IMPORTED_MODULE_4__["LoteRoutingModule"]],
            declarations: [app_pages_cadastro_lote_lote_form_lote_form_component__WEBPACK_IMPORTED_MODULE_2__["LoteFormComponent"], app_pages_cadastro_lote_lote_index_lote_index_component__WEBPACK_IMPORTED_MODULE_3__["LoteIndexComponent"], app_pages_cadastro_lote_lote_filter_lote_filter_component__WEBPACK_IMPORTED_MODULE_5__["LoteFilterComponent"], _lote_duplicate_lote_duplicate_component__WEBPACK_IMPORTED_MODULE_6__["LoteDuplicateComponent"]]
        })
    ], LoteModule);
    return LoteModule;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/lote/lote.routing.module.ts":
/*!************************************************************!*\
  !*** ./src/app/pages/cadastro/lote/lote.routing.module.ts ***!
  \************************************************************/
/*! exports provided: LoteRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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





var MRoutes = [
    {
        path: "",
        component: _lote_index_lote_index_component__WEBPACK_IMPORTED_MODULE_4__["LoteIndexComponent"],
        data: { breadcrumb: "cadastroLotes", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    },
    {
        path: "create",
        component: _lote_form_lote_form_component__WEBPACK_IMPORTED_MODULE_3__["LoteFormComponent"],
        data: {
            breadcrumb: "cadastroLotes",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create }
        }
    },
    {
        path: "edit/:id",
        component: _lote_form_lote_form_component__WEBPACK_IMPORTED_MODULE_3__["LoteFormComponent"],
        data: {
            breadcrumb: "cadastroLotes",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    },
    {
        path: "detail/:id",
        component: _lote_form_lote_form_component__WEBPACK_IMPORTED_MODULE_3__["LoteFormComponent"],
        data: {
            breadcrumb: "cadastroLotes",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    }
];
var LoteRoutingModule = /** @class */ (function () {
    function LoteRoutingModule() {
    }
    LoteRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(MRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], LoteRoutingModule);
    return LoteRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/unidade/unidade.service.ts":
/*!***********************************************************!*\
  !*** ./src/app/pages/cadastro/unidade/unidade.service.ts ***!
  \***********************************************************/
/*! exports provided: UnidadeService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnidadeService", function() { return UnidadeService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../app.error-handler */ "./src/app/app.error-handler.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 UnidadeService = /** @class */ (function (_super) {
    __extends(UnidadeService, _super);
    function UnidadeService(http) {
        return _super.call(this, http, "cadastros/unidade") || this;
    }
    UnidadeService.prototype.getOpcoesValidas = function (unidades) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cadastros/unidade/getOpcoesValidas", { "unidades": unidades })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    UnidadeService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"] }
    ]; };
    UnidadeService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])
    ], UnidadeService);
    return UnidadeService;
}(_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-cadastro-lote-lote-module.js.map