(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-comercial-sto-contrato-sto-contrato-module"],{

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"sto-contrato-duplicar-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-30\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.duplContrato' | 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=\"card\">\r\n                        <div class=\"card-body\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"numContrato\">{{'labels.nContrato' | translate}}</label>\r\n                                        <input id=\"numContrato\"\r\n                                               name=\"numContrato\"\r\n                                               [(ngModel)]=\"stoContrato.novoContrato\"\r\n                                               maxlength=\"20\"\r\n                                               (change)=\"vrfDuplicidadeNumContrato()\"\r\n                                               class=\"form-control form-control-sm\" type=\"text\"\r\n                                               [disabled]=\"false\">\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-12\">\r\n                            <div class=\"custom-control custom-checkbox uni-checkbox\">\r\n                                <input\r\n                                        id=\"transfere\"\r\n                                        name=\"transfere\"\r\n                                        [ngModel]=\"stoContrato.transfere === 'S'\"\r\n                                        (ngModelChange)=\"stoContrato.transfere = $event ? 'S' : 'N'\"\r\n                                        class=\"custom-control-input checkbox-success\"\r\n                                        type=\"checkbox\"\r\n                                        [disabled]=\"false\"/>\r\n                                <label class=\"custom-control-label\" for=\"transfere\">{{\r\n                                    \"labels.transfMovEncContrato\" | translate }}</label>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-12\">\r\n                            <div class=\"custom-control custom-checkbox uni-checkbox\">\r\n                                <input\r\n                                        id=\"trocaData\"\r\n                                        name=\"trocaData\"\r\n                                        [ngModel]=\"stoContrato.trocaData === 'S'\"\r\n                                        (ngModelChange)=\"stoContrato.trocaData = $event ? 'S' : 'N'\"\r\n                                        class=\"custom-control-input checkbox-success\"\r\n                                        type=\"checkbox\"\r\n                                        [disabled]=\"false\"/>\r\n                                <label class=\"custom-control-label\" for=\"trocaData\">{{\r\n                                    \"labels.consDtAtualComoDtInicio\" | translate }}</label>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"clearfix\">&nbsp;</div>\r\n                <div class=\"clearfix\">&nbsp;</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\">{{ 'buttons.cancelar' | translate }}\r\n                    </button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>\r\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/sto-contrato/sto-contrato-filter/sto-contrato-filter.component.html":
/*!*******************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/sto-contrato/sto-contrato-filter/sto-contrato-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=\"sto-contrato-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-40\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.pesquisaDeStoContrato' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"periodoDe\"\r\n                                       class=\"required\">{{\"labels.periodoDe\" | translate }}</label>\r\n                                <app-data id=\"periodoDe\"\r\n                                          name=\"periodoDe\"\r\n                                          [(ngModel)]=\"service.filtro.dataI\"\r\n                                          autofocus\r\n                                          class=\"dataHora\"\r\n                                          [formatDateTime]=\"mascara.getFormatData\"\r\n                                          required=\"true\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-lg-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"ate\"\r\n                                       class=\"required\">{{\"labels.ate\" | translate}}</label>\r\n                                <app-data id=\"ate\"\r\n                                          name=\"ate\"\r\n                                          [(ngModel)]=\"service.filtro.dataF\"\r\n                                          class=\"dataHora\"\r\n                                          [formatDateTime]=\"mascara.getFormatData\"\r\n                                          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-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <app-pesquisa-destinatario id=\"cliente\"\r\n                                                           name=\"cliente\"\r\n                                                           tipoDestinatario=\"C\"\r\n                                                           modalTitle=\"pesquisaDeCliente\"\r\n                                                           label=\"cliente\"\r\n                                                           [(ngModel)]=\"service.filtro.destinatarioIdCliente\"\r\n                                                           showInscricao=\"false\"\r\n                                                           showCgcCpf=\"false\"\r\n                                                           (outModel)=\"trataDest($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-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"situacao\">{{ \"labels.situacao\" | translate}}</label>\r\n                                <select id=\"situacao\"\r\n                                        [(ngModel)]=\"service.filtro.sitReg\"\r\n                                        class=\"form-control form-control-sm\" name=\"situacao\"\r\n                                        data-title=\"{{ 'labels.situacao' | translate }}\">\r\n                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                    <option *ngFor=\"let t of situacao.get\"\r\n                                            value=\"{{ t.id }}\">\r\n                                        {{ t.descricao }}\r\n                                    </option>\r\n                                </select>\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>\r\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/sto-contrato/sto-contrato-form/sto-contrato-form.component.html":
/*!***************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/sto-contrato/sto-contrato-form/sto-contrato-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.stoContratoId\"\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            <app-validacoes *ngIf=\"showButton\"></app-validacoes>\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\" | translate}}</a>\r\n                    </li>\r\n                    <li class=\"nav-item\">\r\n                        <a class=\"nav-link\" data-toggle=\"tab\" href=\"#it\">{{\"labels.itens\" | translate}}</a>\r\n                    </li>\r\n                    <li class=\"nav-item\"\r\n                        *ngIf=\"funcoesService.isDetail(actionForm) && data.itens[0].tipoServicoId == 1 \">\r\n                        <a class=\"nav-link\" data-toggle=\"tab\" href=\"#os\">{{\"labels.osg\" | translate}}</a>\r\n                    </li>\r\n                    <li class=\"nav-item\">\r\n                        <a class=\"nav-link\" data-toggle=\"tab\" href=\"#in\">{{\"labels.invoice\" | translate}}</a>\r\n                    </li>\r\n                    <li class=\"nav-item\">\r\n                        <a class=\"nav-link\" data-toggle=\"tab\" href=\"#ie\">{{\"labels.invoiceEmitidas\" | translate}}</a>\r\n                    </li>\r\n                </ul>\r\n            </div>\r\n            <div class=\"tab-content top\">\r\n                <!-- ABA DADOS -->\r\n                <div class=\"tab-pane active show\" id=\"da\">\r\n                    <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\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=\"numContrato\" class=\"required\">{{'labels.nContrato' | translate}}</label>\r\n                                    <input id=\"numContrato\" name=\"numContrato\" [(ngModel)]=\"data.numContrato\"\r\n                                        maxlength=\"20\" required=\"true\" (change)=\"vrfDuplicidadeNumContrato()\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-lg-3 col-md-5 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"numCotacao\">{{'labels.cotacao' | translate}}</label>\r\n                                    <input id=\"numCotacao\" name=\"numCotacao\" maxlength=\"10\"\r\n                                        [(ngModel)]=\"data.numCotacao\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\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=\"tipo\" class=\"required\">{{ 'labels.tipo' | translate}}</label>\r\n                                    <app-combo-padrao name=\"tipo\" id=\"tipo\" chave=\"TipoMov\" descricao=\"DescrTipoMov\"\r\n                                        ativo=\"true\" required=\"true\" tabela=\"ModalidadeContrato\"\r\n                                        [(ngModel)]=\"data.tipoMov\" [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=\"card-body\" id=\"cli\">\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-6 col-md-9 col-sm-12\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"emissao\" class=\"required\">{{\"labels.emissao\" |\r\n                                                translate}}</label>\r\n                                            <app-data id=\"emissao\" name=\"emissao\" [(ngModel)]=\"data.dtEmissao\"\r\n                                                class=\"dataHora\" required=\"true\"\r\n                                                [formatDateTime]=\"mascara.getFormatData\"\r\n                                                [disabled]=\"funcoesService.isDetail(actionForm)\" 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-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)]=\"data.destinatarioIdCliente\" showInscricao=\"false\"\r\n                                                showCgcCpf=\"false\" required=\"true\" [inSelected]=\"data.cliente\"\r\n                                                (outModel)=\"trataDest($event)\"\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-10 col-sm-12\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"tipoContrato\" class=\"required\">{{ 'labels.tipoContrato' |\r\n                                                translate}}</label>\r\n                                            <app-combo-padrao name=\"tipoContrato\" id=\"tipoContrato\" chave=\"TipoContrato\"\r\n                                                descricao=\"DescrTipoContrato\" ativo=\"true\" required=\"true\"\r\n                                                tabela=\"TipoContrato\" [(ngModel)]=\"data.tipoContrato\"\r\n                                                [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                            </app-combo-padrao>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"card-body\" id=\"obs\">\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-5 col-md-8 col-sm-12\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"juros\">{{'labels.jurosPerc' | translate}}</label>\r\n                                            <input id=\"juros\" name=\"juros\" maxlength=\"6\" currencyMask\r\n                                                [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                [(ngModel)]=\"data.juros\" class=\"form-control form-control-sm\"\r\n                                                type=\"text\" [disabled]=\"disabledDadosFatura\">\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-5 col-md-8 col-sm-12\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"multa\">{{'labels.multaPerc' | translate}}</label>\r\n                                            <input id=\"multa\" name=\"multa\" maxlength=\"6\" currencyMask\r\n                                                [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                [(ngModel)]=\"data.multa\" class=\"form-control form-control-sm\"\r\n                                                type=\"text\" [disabled]=\"disabledDadosFatura\">\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-5 col-md-8 col-sm-12\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"encFin\">{{'labels.encargosFinanceiros' | translate}}</label>\r\n                                            <input id=\"encFin\" name=\"encFin\" maxlength=\"6\" currencyMask\r\n                                                [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                [(ngModel)]=\"data.encFin\" class=\"form-control form-control-sm\"\r\n                                                type=\"text\" [disabled]=\"funcoesService.isDetail(actionForm)\">\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-9 col-md-10 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"observacoes\">{{'labels.observacoes' | translate}}</label>\r\n                                    <textarea id=\"observacoes\" name=\"observacoes\" [(ngModel)]=\"data.observacoes\"\r\n                                        class=\"form-control\" rows=\"2\" maxlength=\"250\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        data-title=\"{{'labels.observacoes' | translate}}\"></textarea>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-9 col-md-10 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"mensagemParaNota\">{{'labels.mensagemParaNota' | translate}}</label>\r\n                                    <textarea id=\"mensagemParaNota\" name=\"mensagemParaNota\"\r\n                                        [(ngModel)]=\"data.observacoes2\" class=\"form-control\" rows=\"3\" maxlength=\"250\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                        data-title=\"{{'labels.observacoes' | translate}}\"></textarea>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-2 col-md-4 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"ptQuebra\">{{'labels.ptQuebra' | translate}}</label>\r\n                                    <input id=\"ptQuebra\" name=\"ptQuebra\" maxlength=\"6\" currencyMask\r\n                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                        [(ngModel)]=\"data.ptQuebra\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"clearfix\">&nbsp;</div>\r\n                        <div class=\"row\" *ngIf=\"showButton\">\r\n                            <div class=\"col-lg-12\">\r\n                                <div class=\"form-group\">\r\n                                    <button class=\"btn btn-success mr-2\" type=\"submit\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                        {{ 'buttons.salvar' | translate }}\r\n                                    </button>\r\n                                    <button class=\"btn btn-success\" (click)=\"saveAndCreate(f)\" type=\"button\"\r\n                                        [disabled]=\"funcoesService.isDetail(actionForm)\">{{ 'buttons.salvarNovo' |\r\n                                        translate }}</button>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </form>\r\n                </div>\r\n                <!-- ABA ITENS-->\r\n                <div class=\"tab-pane\" id=\"it\">\r\n                    <div class=\"card\">\r\n                        <div class=\"card-body\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"numContrato2\">{{'labels.nContrato' | translate}}</label>\r\n                                        <input id=\"numContrato2\" name=\"numContrato2\" value=\"{{data?.numContrato}}\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <app-input-description label=\"cliente\" [valueID]=\"data?.cliente?.destinatarioId\"\r\n                                            [valueDescription]=\"data?.cliente?.fantasia\">\r\n                                        </app-input-description>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"clearfix\">&nbsp;</div>\r\n                    <app-sto-contrato-item [dadosContrato]=\"data\" [dados]=\"data.itens\"\r\n                        (dataResult)=\"refreshItens($event)\" mostrarAba=\"mostraTsSop\"\r\n                        botaoBloqMovProduto=\"botaoBloqMovProduto\" botaoEncContrato=\"botaoEncContrato\"\r\n                        [descrResumo]=\"data.observacoes\" [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                        (response)=\"updateShowButtom($event)\">\r\n                    </app-sto-contrato-item>\r\n                </div>\r\n                <!--ABA INVOICE-->\r\n                <div class=\"tab-pane\" id=\"in\">\r\n                    <div class=\"card\">\r\n                        <div class=\"card-body\">\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"numContrato1\">{{'labels.nContrato' | translate}}</label>\r\n                                        <input id=\"numContrato1\" name=\"numContrato1\" [(ngModel)]=\"data.numContrato\"\r\n                                            maxlength=\"20\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                            disabled=\"true\">\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=\"cliente1\" name=\"cliente1\" tipoDestinatario=\"C\"\r\n                                            modalTitle=\"pesquisaDeCliente\" label=\"cliente\"\r\n                                            [(ngModel)]=\"data.destinatarioIdCliente\" showInscricao=\"false\"\r\n                                            showCgcCpf=\"false\" [inSelected]=\"data.cliente\" disabled=\"true\">\r\n                                        </app-pesquisa-destinatario>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"clearfix\">&nbsp;</div>\r\n                    <div class=\"card\">\r\n                        <div class=\"card-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                                        <label for=\"byOrder\">{{'labels.byOrder' | translate}}</label>\r\n                                        <input id=\"byOrder\" name=\"byOrder\" [(ngModel)]=\"data.byOrder\" maxlength=\"150\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\"\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-6 col-md-9 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"vessel\">{{'labels.vesSel' | translate}}</label>\r\n                                        <input id=\"vessel\" name=\"vessel\" [(ngModel)]=\"data.vessel\" maxlength=\"50\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\"\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-6 col-md-9 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"product\">{{'labels.product' | translate}}</label>\r\n                                        <input id=\"product\" name=\"product\" [(ngModel)]=\"data.product\" maxlength=\"70\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\"\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-12 col-md-12 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"description\">{{'labels.description' | translate}}</label>\r\n                                        <textarea id=\"description\" name=\"description\" [(ngModel)]=\"data.description\"\r\n                                            class=\"form-control\" rows=\"4\" maxlength=\"500\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                            data-title=\"{{'labels.observacoes' | translate}}\"></textarea>\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=\"benificiary\">{{'labels.benificiary' | translate}}</label>\r\n                                        <textarea id=\"benificiary\" name=\"benificiary\" [(ngModel)]=\"data.benificiary\"\r\n                                            class=\"form-control\" rows=\"4\" maxlength=\"500\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                            data-title=\"{{'labels.observacoes' | translate}}\"></textarea>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <!--ABA INVOICE EMITIDAS-->\r\n                <div class=\"tab-pane\" id=\"ie\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-md-12 col-lg-12\">\r\n                            <div *ngIf=\"!showAdd\">\r\n                                <div class=\"btn-group\" *ngIf=\"!showAdd\">\r\n                                    <button title=\"{{ 'buttons.visualizar' | translate }}\" (click)=\"_detail()\"\r\n                                        class=\"btn uni-btn btn-sm\" [disabled]=\"!dataAux.nota\">\r\n                                        <i class=\"icon-eye\"></i>\r\n                                    </button>\r\n                                    <button title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm\"\r\n                                        (click)=\"_edit()\" [disabled]=\"isDetail || !dataAux.nota\">\r\n                                        <i class=\"icon-pencil\"></i>\r\n                                    </button>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"col-md-12 col-lg-12\">\r\n                            <div *ngIf=\"showAdd\">\r\n                                <div class=\"btn-group\" *ngIf=\"showAdd\">\r\n                                    <button title=\"{{ 'buttons.voltar' | translate }}\" (click)=\"_back()\"\r\n                                        class=\"btn uni-btn btn-sm\"> \r\n                                        <i class=\"icon-arrow-left\"></i>\r\n                                    </button>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"card-body\" *ngIf=\"showAdd\">\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=\"byOrder\">{{'labels.byOrder' | translate}}</label>\r\n                                    <input id=\"byOrder\" name=\"byOrder\" [(ngModel)]=\"dataInEmitdas.byOrder\"\r\n                                        maxlength=\"150\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"_isEdit || funcoesService.isDetail(actionForm)\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-9 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"vessel\">{{'labels.vesSel' | translate}}</label>\r\n                                    <input id=\"vessel\" name=\"vessel\" [(ngModel)]=\"dataInEmitdas.vessel\" maxlength=\"50\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"_isEdit || funcoesService.isDetail(actionForm)\">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"row\">\r\n                            <div class=\"col-lg-6 col-md-9 col-sm-12\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"product\">{{'labels.product' | translate}}</label>\r\n                                    <input id=\"product\" name=\"product\" [(ngModel)]=\"dataInEmitdas.product\"\r\n                                        maxlength=\"70\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                        [disabled]=\"_isEdit || funcoesService.isDetail(actionForm)\">\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=\"description\">{{'labels.description' | translate}}</label>\r\n                                    <textarea id=\"description\" name=\"description\"\r\n                                        [(ngModel)]=\"dataInEmitdas.description1\" class=\"form-control\" rows=\"4\"\r\n                                        maxlength=\"500\" [disabled]=\"_isEdit || funcoesService.isDetail(actionForm)\"\r\n                                        data-title=\"{{'labels.observacoes' | translate}}\"></textarea>\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=\"benificiary\">{{'labels.benificiary' | translate}}</label>\r\n                                    <textarea id=\"benificiary\" name=\"benificiary\"\r\n                                        [(ngModel)]=\"dataInEmitdas.benificiary1\" class=\"form-control\" rows=\"4\"\r\n                                        maxlength=\"500\" [disabled]=\"_isEdit || funcoesService.isDetail(actionForm)\"\r\n                                        data-title=\"{{'labels.observacoes' | translate}}\"></textarea>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div *ngIf=\"!showAdd\">\r\n                        <div class=\"table-overflow\">\r\n                            <table class=\"table table-striped table-bordered table-hover rownowrap\">\r\n                                <thead>\r\n                                    <tr>\r\n                                        <th class=\"text-center\">{{ 'labels.numero' | translate }}</th>\r\n                                        <th class=\"text-center\">{{ 'labels.emissao' | translate }}</th>\r\n                                        <th class=\"text-center\">{{ 'labels.material' | translate }}</th>\r\n                                        <th class=\"text-center\">{{ 'labels.descricao' | translate }}</th>\r\n                                        <th class=\"text-center\">{{ 'labels.situacao' | translate }}</th>\r\n                                    </tr>\r\n                                </thead>\r\n                                <tbody>\r\n                                    <tr *ngFor=\"let item of listInEmitdas | removeExcluidos\" class=\"clickable\"\r\n                                        [ngClass]=\"{ 'info' : item === dataAux }\" (click)=\"rowSelect(item)\">\r\n                                        <td class=\"text-center\">{{ item.nota }}</td>\r\n                                        <td class=\"text-center\">{{ item.dtEmissao | date: 'dd/MM/yyyy' }}</td>\r\n                                        <td class=\"text-center\">{{ item.fantasia }}</td>\r\n                                        <td class=\"text-center\">{{ item.vlNota | formatCurrency: 2 }}</td>\r\n                                        <td class=\"text-center\">{{ item.description1 }}</td>\r\n                                    </tr>\r\n                                    <tr *ngIf=\"hasDados\">\r\n                                        <th colspan=\"5\">\r\n                                            {{'messages.nenhumRegistroEncontrado' | translate }}\r\n                                        </th>\r\n                                    </tr>\r\n                                </tbody>\r\n                            </table>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <!--ABA OSG-->\r\n                <div class=\"tab-pane\" id=\"os\">\r\n                    <!-- tabela -->\r\n                    <div class=\"table-overflow\">\r\n                        <table class=\"table table-striped table-bordered table-hover rownowrap\">\r\n                            <thead>\r\n                                <tr>\r\n                                    <th class=\"text-center\">{{ 'labels.numero' | translate }}</th>\r\n                                    <th class=\"text-center\">{{ 'labels.emissao' | translate }}</th>\r\n                                    <th class=\"text-center\">{{ 'labels.material' | translate }}</th>\r\n                                    <th class=\"text-center\">{{ 'labels.descricao' | translate }}</th>\r\n                                    <th class=\"text-center\">{{ 'labels.situacao' | translate }}</th>\r\n                                </tr>\r\n                            </thead>\r\n                            <tbody>\r\n                                <tr *ngFor=\"let item of dataItens\" class=\"clickable\">\r\n                                    <td class=\"text-center\">{{ item.numeroOsg }}</td>\r\n                                    <td class=\"text-center\">{{ item.dtEmissao | date: 'dd/MM/yyyy' }}</td>\r\n                                    <td class=\"text-center\">{{ item.materialId }}</td>\r\n                                    <td class=\"text-center\">{{ item.fantasiaMaterial }}</td>\r\n                                    <td class=\"text-center\">{{ item.sitOsg }}</td>\r\n                                </tr>\r\n                                <tr *ngIf=\"dataItens?.length === 0\">\r\n\r\n                                    <th colspan=\"5\">\r\n                                        {{'messages.nenhumRegistroEncontrado' | translate }}\r\n                                    </th>\r\n                                </tr>\r\n                            </tbody>\r\n                        </table>\r\n                    </div>\r\n                </div>\r\n            </div>\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/comercial/sto-contrato/sto-contrato-index/sto-contrato-index.component.html":
/*!*****************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/sto-contrato/sto-contrato-index/sto-contrato-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\"\n                      [formAction]=\"actionForm\"\n                      [itemData]=\"data.regContrato\"\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtStoContrato\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n</div>\n\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-sto-contrato-filter (filtrar)=\"executaFiltro($event)\"></app-sto-contrato-filter>\n<app-sto-contrato-duplicar [stoContrato]=\"stoContratoDuplicar\" (dataResult)=\"executaDuplicarContrato()\"></app-sto-contrato-duplicar>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"row\">\r\n\r\n    <div class=\"col-md-12 col-lg-12\">\r\n        <div *ngIf=\"!showAdd\">\r\n            <div class=\"btn-group\" *ngIf=\"!showAdd\">\r\n                <button title=\"{{ 'buttons.novo' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"create()\"\r\n                    [disabled]=\"disabled\">\r\n                    <i class=\"icon-plus\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.visualizar' | translate }}\" (click)=\"detail()\" class=\"btn uni-btn btn-sm\"\r\n                    [disabled]=\"funcoesService.showButtons.detail(actionForm,  dataAux.stoContratoId) || isSet\">\r\n                    <i class=\"icon-eye\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"edit()\"\r\n                    [disabled]=\"disabled || funcoesService.showButtons.detail(actionForm,  dataAux.stoContratoId) || isSet\">\r\n                    <i class=\"icon-pencil\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.excluir' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"_remove()\"\r\n                    [disabled]=\"disabled || funcoesService.showButtons.detail(actionForm,  dataAux.stoContratoId) || isSet\">\r\n                    <i class=\"icon-close\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.bloqMovimentacao' | translate }}\" class=\"btn uni-btn btn-sm\"\r\n                    (click)=\"bloquearMov()\" [disabled]=\"botaoBloqMovProduto && isSet\">\r\n                    <i class=\"icon-lock\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.encContrato' | translate }}\" class=\"btn uni-btn btn-sm\"\r\n                    (click)=\"encerraContrato()\" [disabled]=\"botaoEncContrato && isSet\">\r\n                    <i class=\"icon-folder\"></i>\r\n                </button>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n\r\n<div class=\"row\" *ngIf=\"!showAdd\">\r\n\r\n    <div class=\"col-md-12 col-lg-12\">\r\n        <table class=\"table table-striped table-bordered table-hover rownowrap form-control-sm\">\r\n            <thead>\r\n                <tr>\r\n                    <th class=\"text-center\" width=\"10%\">{{ 'labels.item' | translate }}</th>\r\n                    <th class=\"text-left\">{{ 'labels.servico' | translate }}</th>\r\n                    <th class=\"text-left\">{{ 'labels.tipoServico' | translate }}</th>\r\n                    <th class=\"text-left\">{{ 'labels.bloqueado' | translate }}</th>\r\n                    <th class=\"text-left\">{{ 'labels.resumo' | translate }}</th>\r\n                </tr>\r\n            </thead>\r\n            <tbody>\r\n                <tr *ngFor=\"let c of dados | removeExcluidos\" class=\"clickable\" [ngClass]=\"{ 'info' : c === dataAux }\"\r\n                    (click)=\"rowSelect(c)\">\r\n                    <td class=\"text-center\">{{c.stoContratoItemId}}</td>\r\n                    <td class=\"text-left\">{{c.servico}}</td>\r\n                    <td class=\"text-left\">{{c.descrTipoServico}}</td>\r\n                    <td class=\"text-left\">{{c.descrBloq}}</td>\r\n                    <td class=\"text-left\">{{c.descrResumo}}</td>\r\n                </tr>\r\n                <tr *ngIf=\"!hasDados\">\r\n                    <th colspan=\"9\">\r\n                        {{'messages.nenhumRegistroEncontrado' | translate }}\r\n                    </th>\r\n                </tr>\r\n            </tbody>\r\n        </table>\r\n    </div>\r\n</div>\r\n\r\n<div *ngIf=\"showAdd\">\r\n    <div class=\"row\">\r\n        <div class=\"col-lg-6\">\r\n            <div class=\"uni-botoes\">\r\n                <button title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"edit()\"\r\n                    [disabled]=\"disabled || funcoesService.showButtons.edit(actionForm, dataAux.stoContratoId)\">\r\n                    <i class=\"fa fa-edit\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.voltar' | translate }}\" (click)=\"back()\" type=\"button\"\r\n                    class=\"btn uni-btn btn-sm\">\r\n                    <i class=\"fa fa-arrow-left\"></i>\r\n                </button>\r\n            </div>\r\n        </div>\r\n        <div class=\"col-lg-6\">\r\n            <app-form-legenda></app-form-legenda>\r\n        </div>\r\n    </div>\r\n\r\n    <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\r\n        <app-validacoes></app-validacoes>\r\n        <div class=\"row\">\r\n            <div class=\"col-lg-12\">\r\n                <div class=\"section-comand-bar\">\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=\"#dd\">{{\"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=\"#fa\">{{\"labels.faturamento\" |\r\n                                    translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#pe\">{{\"labels.periodo\" | translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#ad\">{{\"labels.adicionais\" | translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\" *ngIf=\"isTabItemTanque\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#ta\">{{\"labels.tanques\" | translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\" *ngIf=\"mostraAba(1)\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#os\">{{\"labels.osg\" | translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\" *ngIf=\"isTabItemSop\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#so\">{{\"labels.sop\" | translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\" *ngIf=\"isTabItemN2\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#n2\">{{\"labels.n2\" | translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\" *ngIf=\"isTabItemFundaf\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#fu\">{{\"labels.fundaf\" | translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\" *ngIf=\"isTabItemMov\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#mo\">{{\"labels.movimentacao\" |\r\n                                    translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\" *ngIf=\"isTabItemExc\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#ex\">{{\"labels.excedente\" | translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\" *ngIf=\"isTabItemAdic\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#ar\">{{\"labels.armAdicional\" |\r\n                                    translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\" *ngIf=\"isTabItemGir\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#gi\">{{\"labels.2Giro\" | translate}}</a>\r\n                            </li>\r\n                            <li class=\"nav-item\" *ngIf=\"isTabItemAdv\">\r\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#se\">{{\"labels.seguro\" | translate}}</a>\r\n                            </li>\r\n                        </ul>\r\n                    </div>\r\n                    <div class=\"tab-content top\">\r\n                        <!-- ABA DADOS -->\r\n                        <div class=\"tab-pane active show\" id=\"dd\">\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=\"tipoServico\" class=\"required\">{{ 'labels.tipoServico' |\r\n                                            translate}}</label>\r\n                                        <select id=\"tipoServico\" [(ngModel)]=\"data.tipoServicoId\"\r\n                                            class=\"form-control form-control-sm\" name=\"tipoServico\" required=\"true\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                            (change)=\"visualizarAbas(true)\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of $tipoServico\" [value]=\"t.tipoServicoId\">\r\n                                                {{ t.descrTipoServico }}\r\n                                            </option>\r\n                                        </select>\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=\"tipoNota\" class=\"required\">{{ \"labels.tipoCobranca\" |\r\n                                            translate}}</label>\r\n                                        <select id=\"tipoNota\" [(ngModel)]=\"data.tipoNota\"\r\n                                            class=\"form-control form-control-sm\" name=\"tipoNota\" required=\"true\"\r\n                                            data-title=\"{{ 'labels.tipoCobranca' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoNota.get\" value=\"{{ t.id }}\">\r\n                                                {{ t.descricao }}\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-9 col-md-10 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <app-pesquisa-destinatario id=\"cliente3\" name=\"cliente3\" 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]=\"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-9 col-md-10 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <app-pesquisa-material id=\"servico\" name=\"servico\" label=\"servico\"\r\n                                            modalTitle=\"servico\" [(ngModel)]=\"data.materialId\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                            [inSelected]=\"data.material\" (outModel)=\"outMaterial($event)\"\r\n                                            tipoProduto=\"S\" required=\"true\">\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-9 col-md-10 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"descrResumo\" class=\"required\">{{'labels.resumo' |\r\n                                            translate}}</label>\r\n                                        <input id=\"descrResumo\" name=\"descrResumo\" maxlength=\"100\" required=\"true\"\r\n                                            [(ngModel)]=\"data.descrResumo\" class=\"form-control form-control-sm\"\r\n                                            type=\"text\" [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-9 col-md-10 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"descricao\" class=\"required\">{{'labels.descricao' |\r\n                                            translate}}</label>\r\n                                        <textarea id=\"descricao\" name=\"descricao\" [(ngModel)]=\"data.especificacao\"\r\n                                            class=\"form-control\" rows=\"3\" maxlength=\"250\" required=\"true\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                            data-title=\"{{'labels.descricao' | translate}}\"></textarea>\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=\"operacaoId\" class=\"required\">{{ \"labels.operacao\" | translate\r\n                                            }}</label>\r\n                                        <app-combo-operacao id=\"operacaoId\" label=\"operacaoId\" name=\"operacaoId\"\r\n                                            tipo=\"S\" exibe=\"S\" flagServ=\"S\" [(ngModel)]=\"data.operacaoId\"\r\n                                            data-title=\"{{ 'labels.operacao' | translate }}\"\r\n                                            [disabled]=\"disabledDadosFatura\" (outSelected)=\"atualizaCamposAbas()\"\r\n                                            required=\"true\">\r\n                                        </app-combo-operacao>\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=\"condPag\" class=\"required\">{{\"labels.condPagFor\" | translate\r\n                                            }}</label>\r\n                                        <app-combo-padrao name=\"condPag\" id=\"condPag\" chave=\"CondPag\"\r\n                                            descricao=\"DescrCond\" ativo=\"true\" tabela=\"CondPagamento\" required=\"true\"\r\n                                            [(ngModel)]=\"data.condPagId\"\r\n                                            data-title=\"{{ 'labels.condPagFor' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                            (change)=\"atualizaCamposAbas()\">\r\n                                        </app-combo-padrao>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-3 col-md-4 col-sm-8\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"quantidM3\">{{'labels.quantidM3TO' |\r\n                                            translate}}</label>\r\n                                        <input id=\"quantidM3\" name=\"quantidM3\" maxlength=\"9\" currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                            [(ngModel)]=\"data.quantidM3\" class=\"form-control form-control-sm\"\r\n                                            type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || data.tipoServicoId != 1\">\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=\"codTipoMovContr\">{{\"labels.tipoMov\" | translate }}</label>\r\n                                        <app-combo-padrao name=\"codTipoMovContr\" id=\"codTipoMovContr\"\r\n                                            chave=\"CodTipoMovContr\" descricao=\"DescrTipoMovContr\" ativo=\"true\"\r\n                                            tabela=\"TipoMovimentacaoContrato\" [(ngModel)]=\"data.codTipoMovContr\"\r\n                                            data-title=\"{{ 'labels.tipoMov' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                        </app-combo-padrao>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <!--ABA FATURAMENTO-->\r\n                        <div class=\"tab-pane\" id=\"fa\">\r\n                            <div class=\"row\">\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-4 col-md-4 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"unidadeId\" class=\"required\">{{ 'labels.unidade' |\r\n                                                    translate}}</label>\r\n                                                <app-combo-padrao id=\"unidadeId\" name=\"unidadeId\"\r\n                                                    [(ngModel)]=\"data.unidadeId\" tabela=\"Unidade\" chave=\"Unidade\"\r\n                                                    ativos=\"true\" [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                                    descricao=\"Unidade\" required=\"true\">\r\n                                                </app-combo-padrao>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-6 col-md-5 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"quantid\" class=\"required\">{{'labels.quantidade' |\r\n                                                    translate}}</label>\r\n                                                <input id=\"quantid\" name=\"quantid\" [(ngModel)]=\"data.quantid\"\r\n                                                    maxlength=\"9\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                                    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-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"tipoPreco\" class=\"required\">{{ \"labels.tipoPreco\" |\r\n                                                    translate}}</label>\r\n                                                <select id=\"tipoPreco\" [(ngModel)]=\"data.tipoPreco\" required=\"true\"\r\n                                                    class=\"form-control form-control-sm\" name=\"tipoPreco\"\r\n                                                    data-title=\"{{ 'labels.tipoPreco' | translate }}\"\r\n                                                    [disabled]=\"disabledDadosFatura\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoPreco.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-6 col-md-10 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"preco\">{{\"labels.preco\" | translate}}</label>\r\n                                                <input id=\"preco\" name=\"preco\" [(ngModel)]=\"data.preco\" maxlength=\"11\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"disabledDadosFatura\" currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-10 col-md-12 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"moeda1\" class=\"required\">{{ 'labels.moeda' | translate\r\n                                                    }}</label>\r\n                                                <app-combo-padrao id=\"moeda1\" name=\"moeda1\" tabela=\"Moedas\"\r\n                                                    chave=\"CodMoeda\" descricao=\"DescrMoeda\" required=\"true\"\r\n                                                    [(ngModel)]=\"data.moedaId\"\r\n                                                    data-title=\"{{ 'labels.moeda' | translate }}\"\r\n                                                    [disabled]=\"disabledDadosFatura\" (change)=\"atualizaCamposAbas()\">\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-5 col-md-9 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"densidade\">{{'labels.densidade' | translate}}</label>\r\n                                                <input id=\"densidade\" name=\"densidade\" [(ngModel)]=\"data.densidade\"\r\n                                                    maxlength=\"11\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 5 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-5 col-md-9 col-sm-12\">\r\n                                            <div class=\"custom-control custom-checkbox\">\r\n                                                <input id=\"primPerFree\" name=\"primPerFree\"\r\n                                                    [ngModel]=\"data.primPerFree === 'S'\"\r\n                                                    (ngModelChange)=\"data.primPerFree = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                                <label class=\"custom-control-label\" for=\"primPerFree\">{{\r\n                                                    \"labels.primPerFree\" | translate }}</label>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row\" *ngIf=\"obrgDias\">\r\n                                        <div class=\"col-lg-6 col-md-8 col-sm-12\">\r\n                                            <div class=\"custom-control custom-checkbox mt-4\">\r\n                                                <input id=\"flagEncFin\" name=\"flagEncFin\"\r\n                                                    [ngModel]=\"data.flagEncFin === 'S'\"\r\n                                                    (ngModelChange)=\"data.flagEncFin = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                                <label class=\"custom-control-label\" for=\"flagEncFin\">{{\r\n                                                    \"labels.encargoFinanceiro\" | translate }}</label>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-6 col-md-10 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"dias\">{{'labels.dias' | translate}}</label>\r\n                                                <input id=\"dias\" name=\"dias\" [(ngModel)]=\"data.dias\" maxlength=\"3\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row\" *ngIf=\"!obrgDias\">\r\n                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                            <div class=\"custom-control custom-checkbox\">\r\n                                                <input id=\"flagEncFin10\" name=\"flagEncFin10\"\r\n                                                    [ngModel]=\"data.flagEncFin === 'S'\"\r\n                                                    (ngModelChange)=\"data.flagEncFin = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                                    [disabled]=\"disabledDadosFatura\" />\r\n                                                <label class=\"custom-control-label\" for=\"flagEncFin10\">{{\r\n                                                    \"labels.encargoFinanceiro\" | translate }}</label>\r\n\r\n\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-group form-group-sm\">\r\n                                                <label for=\"flagIssDest\">{{ \"labels.tipoISS\" | translate}}</label>\r\n                                                <select id=\"flagIssDest\" [(ngModel)]=\"data.flagIssDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagIssDest\"\r\n                                                    data-title=\"{{ 'labels.flagIssDest' | translate }}\"\r\n                                                    [disabled]=\"disabledDadosFatura\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoIssDest.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-6 col-md-10 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqIssDest\">{{\"labels.aliqIss\" | translate}}</label>\r\n                                                <input id=\"aliqIssDest\" name=\"aliqIssDest\"\r\n                                                    [(ngModel)]=\"data.aliqIssDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"disabledDadosFatura\" currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\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-group form-group-sm\">\r\n                                                <label for=\"flagCofinsDes\">{{ \"labels.tipoPisCofins\" |\r\n                                                    translate}}</label>\r\n                                                <select id=\"flagCofinsDes\" [(ngModel)]=\"data.flagCofinsDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagCofinsDes\"\r\n                                                    data-title=\"{{ 'labels.flagCofinsDes' | translate }}\"\r\n                                                    [disabled]=\"disabledDadosFatura\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoCofinsDes.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-6 col-md-10 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqCofinsDest\">{{\"labels.aliquota\" | translate}}</label>\r\n                                                <input id=\"aliqCofinsDest\" name=\"aliqCofinsDest\"\r\n                                                    [(ngModel)]=\"data.aliqCofinsDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"disabledDadosFatura\" currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-10 col-md-12 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"referencia\">{{'labels.referencia' | translate}}</label>\r\n                                                <input id=\"referencia\" name=\"referencia\" [(ngModel)]=\"data.referContr\"\r\n                                                    maxlength=\"25\" class=\"form-control form-control-sm\" type=\"text\"\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-10 col-md-12 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"produtoFantasia1\">{{\"labels.produto\" | translate }}</label>\r\n                                                <app-combo-sto-contrato-item id=\"produtoFantasia1\" label=\"produto\"\r\n                                                    name=\"produtoFantasia1\" [(ngModel)]=\"data.fantasia\"\r\n                                                    (executa)=\"trataFantasia($event)\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                                </app-combo-sto-contrato-item>\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=\"codMetCalcArm\">{{ 'labels.codMetCalcArm' |\r\n                                                    translate}}</label>\r\n                                                <app-combo-metodo-calculo-arm id=\"codMetCalcArm\" name=\"codMetCalcArm\"\r\n                                                    [(ngModel)]=\"data.codMetCalcArm\" [tipoServico]=\"data.tipoServicoId\"\r\n                                                    [tipoFixo]=\"faturamentoflexivel()\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                                </app-combo-metodo-calculo-arm>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row\" *ngIf=\"isMetCalculo\">\r\n                                        <div class=\"col-lg-6 col-md-9 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"tipoCobranca\">{{ \"labels.tipoCobranca\" | translate}}</label>\r\n                                                <select id=\"tipoCobranca\" [(ngModel)]=\"data.metCalculo\" required=\"true\"\r\n                                                    class=\"form-control form-control-sm\" name=\"tipoCobranca\"\r\n                                                    data-title=\"{{ 'labels.tipoCobranca' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoMetCalculo.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <!-- ABA PERÍODO-->\r\n                        <div class=\"tab-pane\" id=\"pe\">\r\n                            <div class=\"row\">\r\n                                <div class=\"card-body\">\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=\"codPeriodo\" class=\"required\">{{ 'labels.periodo' |\r\n                                                    translate}}</label>\r\n                                                <app-combo-padrao id=\"codPeriodo\" name=\"codPeriodo\"\r\n                                                    [(ngModel)]=\"data.tipoPeriodoId\" tabela=\"Tipoperiodo\"\r\n                                                    chave=\"CodPeriodo\" ativos=\"true\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                                    descricao=\"DescrPeriodo\" 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-5 col-md-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"quantidPer\" class=\"required\">{{'labels.quantidPer' |\r\n                                                    translate}}</label>\r\n                                                <input id=\"quantidPer\" name=\"quantidPer\" [(ngModel)]=\"data.quantidPer\"\r\n                                                    maxlength=\"4\" required=\"true\" class=\"form-control form-control-sm\"\r\n                                                    type=\"text\" [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\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=\"dtInicio\" class=\"required\">{{\"labels.dtInicio\" |\r\n                                                    translate}}</label>\r\n                                                <app-data id=\"dtInicio\" name=\"dtInicio\" [(ngModel)]=\"data.dtInicio\"\r\n                                                    class=\"dataHora\" (change)=\"validaDtInicio()\"\r\n                                                    [formatDateTime]=\"mascara.getFormatData\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\" required=\"true\">\r\n                                                </app-data>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-5 col-md-8 col-sm-12\">\r\n                                            <div class=\"custom-control custom-checkbox mt-4\">\r\n                                                <input id=\"flagFinalOper\" name=\"flagFinalOper\"\r\n                                                    [ngModel]=\"data.flagFinalOper === 'S'\"\r\n                                                    (ngModelChange)=\"data.flagFinalOper = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                                <label class=\"custom-control-label\" for=\"flagFinalOper\">{{\r\n                                                    \"labels.flagFinalOper\" | translate }}</label>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row\" *ngIf=\"obrgPeriodo\">\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=\"dtIniPeriodo\">{{\"labels.dtIniPeriodo\" | translate}}</label>\r\n                                                <app-data id=\"dtIniPeriodo\" name=\"dtIniPeriodo\"\r\n                                                    [(ngModel)]=\"data.dtIniPeriodo\" class=\"dataHora\"\r\n                                                    [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 class=\"row\" *ngIf=\"obrgPeriodo\">\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=\"dtFimPeriodo\">{{\"labels.dtFimPeriodo\" | translate}}</label>\r\n                                                <app-data id=\"dtFimPeriodo\" name=\"dtFimPeriodo\"\r\n                                                    [(ngModel)]=\"data.dtFimPeriodo\" class=\"dataHora\"\r\n                                                    [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=\"card-body\">\r\n                                    <div class=\"row mt-4\">\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                                            <div class=\"custom-control custom-checkbox\">\r\n                                                <input id=\"flagPer\" name=\"flagPer\" [ngModel]=\"data.flagPer === 'S'\"\r\n                                                    (ngModelChange)=\"data.flagPer = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                                <label class=\"custom-control-label\" for=\"flagPer\">{{\r\n                                                    \"labels.flagPer\" | translate }}</label>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-8 col-md-12 col-sm-12\">\r\n                                            <div class=\"custom-control custom-checkbox\">\r\n                                                <input id=\"altPeriodoFat\" name=\"altPeriodoFat\"\r\n                                                    [ngModel]=\"data.altPeriodoFat === 'S'\"\r\n                                                    (ngModelChange)=\"data.altPeriodoFat = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                                <label class=\"custom-control-label\" for=\"altPeriodoFat\">{{\r\n                                                    \"labels.altPeriodoFat\" | translate }}</label>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row mt-3\">\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=\"tipoCobrPer\" class=\"required\">{{ \"labels.tipoCobrPer\" |\r\n                                                    translate}}</label>\r\n                                                <select id=\"tipoCobrPer\" [(ngModel)]=\"data.tipoCobrPer\"\r\n                                                    class=\"form-control form-control-sm\" name=\"tipoCobrPer\"\r\n                                                    required=\"true\" data-title=\"{{ 'labels.tipoCobrPer' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoCobrPer.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\" *ngIf=\"mostraAba(0)\">\r\n                                <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                    <app-card-container tituloCard=\"periodosDiferenciados\">\r\n                                        <div class=\"row\">\r\n                                            <div class=\"col-lg-2 col-md-4 col-sm-8\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label for=\"quantidPer2\">{{'labels.quantidPer' | translate}}</label>\r\n                                                    <input id=\"quantidPer2\" name=\"quantidPer2\"\r\n                                                        [(ngModel)]=\"data.quantidPer2\" maxlength=\"4\"\r\n                                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                                        (blur)=\"requiredcodPeriodo2()\">\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=\"codPeriodo2\" [class.required]=\"requiredcodPeriodo2()\">{{\r\n                                                        'labels.periodo' | translate}}</label>\r\n                                                    <app-combo-padrao id=\"codPeriodo2\" name=\"codPeriodo2\"\r\n                                                        [(ngModel)]=\"data.codPeriodo2\" tabela=\"Tipoperiodo\"\r\n                                                        chave=\"CodPeriodo\" ativos=\"true\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                                        descricao=\"DescrPeriodo\" [required]=\"requiredcodPeriodo2()\">\r\n                                                    </app-combo-padrao>\r\n                                                </div>\r\n                                            </div>\r\n                                            <div class=\"col-lg-2 col-md-4 col-sm-8\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label for=\"precoPer2\">{{'labels.preco' | translate}}</label>\r\n                                                    <input id=\"precoPer2\" name=\"precoPer2\" [(ngModel)]=\"data.precoPer2\"\r\n                                                        maxlength=\"14\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"row\">\r\n                                            <div class=\"col-lg-2 col-md-4 col-sm-8\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label for=\"quantidPer3\">{{'labels.quantidPer' | translate}}</label>\r\n                                                    <input id=\"quantidPer3\" name=\"quantidPer3\"\r\n                                                        [(ngModel)]=\"data.quantidPer3\" maxlength=\"4\"\r\n                                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                                        (blur)=\"requiredcodPeriodo3()\">\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=\"codPeriodo3\" [class.required]=\"requiredcodPeriodo3()\">{{\r\n                                                        'labels.periodo' | translate}}</label>\r\n                                                    <app-combo-padrao id=\"codPeriodo3\" name=\"codPeriodo3\"\r\n                                                        [(ngModel)]=\"data.codPeriodo3\" tabela=\"Tipoperiodo\"\r\n                                                        chave=\"CodPeriodo\" ativos=\"true\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                                        descricao=\"DescrPeriodo\" [required]=\"requiredcodPeriodo3()\">\r\n                                                    </app-combo-padrao>\r\n                                                </div>\r\n                                            </div>\r\n                                            <div class=\"col-lg-2 col-md-4 col-sm-8\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label for=\"precoPer3\">{{'labels.preco' | translate}}</label>\r\n                                                    <input id=\"precoPer3\" name=\"precoPer3\" [(ngModel)]=\"data.precoPer3\"\r\n                                                        maxlength=\"14\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"row\">\r\n                                            <div class=\"col-lg-2 col-md-4 col-sm-8\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label for=\"quantidPer4\">{{'labels.quantidPer' | translate}}</label>\r\n                                                    <input id=\"quantidPer4\" name=\"quantidPer4\"\r\n                                                        [(ngModel)]=\"data.quantidPer4\" maxlength=\"4\"\r\n                                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                                        (blur)=\"requiredcodPeriodo4()\">\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=\"codPeriodo4\" [class.required]=\"requiredcodPeriodo4()\">{{\r\n                                                        'labels.periodo' | translate}}</label>\r\n                                                    <app-combo-padrao id=\"codPeriodo4\" name=\"codPeriodo4\"\r\n                                                        [(ngModel)]=\"data.codPeriodo4\" tabela=\"Tipoperiodo\"\r\n                                                        chave=\"CodPeriodo\" ativos=\"true\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                                        descricao=\"DescrPeriodo\" [required]=\"requiredcodPeriodo4()\">\r\n                                                    </app-combo-padrao>\r\n                                                </div>\r\n                                            </div>\r\n                                            <div class=\"col-lg-2 col-md-4 col-sm-8\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label for=\"precoPer4\">{{'labels.preco' | translate}}</label>\r\n                                                    <input id=\"precoPer4\" name=\"precoPer4\" [(ngModel)]=\"data.precoPer4\"\r\n                                                        maxlength=\"14\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"row\">\r\n                                            <div class=\"col-lg-2 col-md-4 col-sm-8\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label for=\"quantidPer5\">{{'labels.quantidPer' | translate}}</label>\r\n                                                    <input id=\"quantidPer5\" name=\"quantidPer5\"\r\n                                                        [(ngModel)]=\"data.quantidPer5\" maxlength=\"4\"\r\n                                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                                        (blur)=\"requiredcodPeriodo5()\">\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=\"codPeriodo5\" [class.required]=\"requiredcodPeriodo5()\">{{\r\n                                                        'labels.periodo' | translate}}</label>\r\n                                                    <app-combo-padrao id=\"codPeriodo5\" name=\"codPeriodo5\"\r\n                                                        [(ngModel)]=\"data.codPeriodo5\" tabela=\"Tipoperiodo\"\r\n                                                        chave=\"CodPeriodo\" ativos=\"true\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                                        descricao=\"DescrPeriodo\" [required]=\"requiredcodPeriodo5()\">\r\n                                                    </app-combo-padrao>\r\n                                                </div>\r\n                                            </div>\r\n                                            <div class=\"col-lg-2 col-md-4 col-sm-8\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label for=\"precoPer5\">{{'labels.preco' | translate}}</label>\r\n                                                    <input id=\"precoPer5\" name=\"precoPer5\" [(ngModel)]=\"data.precoPer5\"\r\n                                                        maxlength=\"14\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"row\">\r\n                                            <div class=\"col-lg-2 col-md-4 col-sm-8\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label for=\"quantidPer6\">{{'labels.quantidPer' | translate}}</label>\r\n                                                    <input id=\"quantidPer6\" name=\"quantidPer6\"\r\n                                                        [(ngModel)]=\"data.quantidPer6\" maxlength=\"4\"\r\n                                                        class=\"form-control form-control-sm\" type=\"text\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\r\n                                                        (blur)=\"requiredcodPeriodo6()\">\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=\"codPeriodo6\" [class.required]=\"requiredcodPeriodo6()\">{{\r\n                                                        'labels.periodo' | translate}}</label>\r\n                                                    <app-combo-padrao id=\"codPeriodo6\" name=\"codPeriodo6\"\r\n                                                        [(ngModel)]=\"data.codPeriodo6\" tabela=\"Tipoperiodo\"\r\n                                                        chave=\"CodPeriodo\" ativos=\"true\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                                        descricao=\"DescrPeriodo\" [required]=\"requiredcodPeriodo6()\">\r\n                                                    </app-combo-padrao>\r\n                                                </div>\r\n                                            </div>\r\n                                            <div class=\"col-lg-2 col-md-4 col-sm-8\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label for=\"precoPer6\">{{'labels.preco' | translate}}</label>\r\n                                                    <input id=\"precoPer6\" name=\"precoPer6\" [(ngModel)]=\"data.precoPer6\"\r\n                                                        maxlength=\"14\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\r\n                                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                    </app-card-container>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <!-- ABA ADICIONAIS-->\r\n                        <div class=\"tab-pane\" id=\"ad\">\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=\"dtPreEncerra\">{{\"labels.dtPreEncerra\" | translate}}</label>\r\n                                        <app-data id=\"dtPreEncerra\" name=\"dtPreEncerra\" [(ngModel)]=\"data.dtPreEncerra\"\r\n                                            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 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=\"dtReajuste\">{{\"labels.dtReajuste\" | translate}}</label>\r\n                                        <app-data id=\"dtReajuste\" name=\"dtReajuste\" [(ngModel)]=\"data.dtReajuste\"\r\n                                            class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                        </app-data>\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=\"modalReajuste\">{{'labels.modalReajuste' | translate}}</label>\r\n                                        <input id=\"modalReajuste\" name=\"modalReajuste\" [(ngModel)]=\"data.modalReajuste\"\r\n                                            maxlength=\"20\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-2 col-md-4 col-sm-6\">\r\n                                            <label for=\"diasReajuste\">{{'labels.preAvisoReajuste' | translate}}</label>\r\n                                        </div>\r\n                                        <div class=\"col-lg-1 col-md-2 col-sm-4\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <input id=\"diasReajuste\" name=\"diasReajuste\"\r\n                                                    [(ngModel)]=\"data.diasReajuste\" maxlength=\"3\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                                    data-title=\"{{ 'labels.diasReajuste' | translate }}\" currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-3 col-md-6 col-sm-12\">\r\n                                            <label for=\"diasReajuste\">{{'labels.diasAntecedencia' | translate}}</label>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <!-- ABA TANQUES-->\r\n                        <div class=\"tab-pane\" id=\"ta\">\r\n                            <app-sto-contrato-tanque [dadosStoContrato]=\"data\" [dados]=\"data.tanques\"\r\n                                [disabled]=\"funcoesService.isDetail(actionForm)\" (dataResult)=\"refreshTanques($event)\">\r\n                            </app-sto-contrato-tanque>\r\n                        </div>\r\n                        <!-- ABA OSG-->\r\n                        <div class=\"tab-pane\" id=\"os\">\r\n                            <div class=\"col-md-12 col-lg-12\">\r\n                                <table class=\"table table-striped table-bordered table-hover rownowrap form-control-sm\">\r\n                                    <thead>\r\n                                        <tr>\r\n                                            <th class=\"text-left\" width=\"10%\">{{ 'labels.numero' | translate }}</th>\r\n                                            <th class=\"text-left\">{{ 'labels.emissao' | translate }}</th>\r\n                                            <th class=\"text-left\">{{ 'labels.material' | translate }}</th>\r\n                                            <th class=\"text-left\">{{ 'labels.descricao' | translate }}</th>\r\n                                            <th class=\"text-left\">{{ 'labels.situacao' | translate }}</th>\r\n                                        </tr>\r\n                                    </thead>\r\n                                    <tbody>\r\n                                        <tr *ngFor=\"let c of data.osgs | removeExcluidos\" class=\"clickable\"\r\n                                            [ngClass]=\"{ 'info' : c === dataAux }\" (click)=\"rowSelect(c)\">\r\n                                            <td class=\"text-left\">{{c.numeroOsg}}</td>\r\n                                            <td class=\"text-left\">{{c.dtEmissao | date:'dd/MM/yyyy'}}</td>\r\n                                            <td class=\"text-left\">{{c.materialId}}</td>\r\n                                            <td class=\"text-left\">{{c.fantasiaMaterial}}</td>\r\n                                            <td class=\"text-left\">{{c.sitOsg}}</td>\r\n                                        </tr>\r\n                                        <tr *ngIf=\"!hasDados\">\r\n                                            <th colspan=\"9\">\r\n                                                {{'messages.nenhumRegistroEncontrado' | translate }}\r\n                                            </th>\r\n                                        </tr>\r\n                                    </tbody>\r\n                                </table>\r\n                            </div>\r\n                        </div>\r\n                        <!-- ABA SOP-->\r\n                        <div class=\"tab-pane\" id=\"so\">\r\n                            <div class=\"row mt-1 mb-4\">\r\n                                <div class=\"col-lg-2 col-md-8 col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"flagSOP\" name=\"flagSOP\" [ngModel]=\"data.flagSOP === 'S'\"\r\n                                            (ngModelChange)=\"data.flagSOP = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                            (change)=\"obrigaCampos()\" (blur)=\"validaSop()\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                        <label class=\"custom-control-label\" for=\"flagSOP\">{{\r\n                                            \"labels.flagSOP\" | translate }}</label>\r\n\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n\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=\"preco1\">{{'labels.preco' | translate}}</label>\r\n                                        <input id=\"preco1\" name=\"preco1\" [(ngModel)]=\"data.itensSop.preco\"\r\n                                            maxlength=\"11\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposSop\"\r\n                                            currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\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=\"moeda3\" [class.required]=\"isCamposSop\">{{ 'labels.moeda' | translate\r\n                                            }}</label>\r\n                                        <app-combo-padrao id=\"moeda3\" name=\"moeda3\" tabela=\"Moedas\" chave=\"CodMoeda\"\r\n                                            descricao=\"Sifra\" [(ngModel)]=\"data.itensSop.moedaId\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposSop\">\r\n                                        </app-combo-padrao>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-4 col-md-9 col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox mt-4\">\r\n                                        <input id=\"flagEncFin1\" name=\"flagEncFin1\"\r\n                                            [ngModel]=\"data.itensSop.flagEncFin === 'S'\"\r\n                                            (ngModelChange)=\"data.itensSop.flagEncFin = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposSop\" />\r\n                                        <label class=\"custom-control-label\" for=\"flagEncFin1\">{{\r\n                                            \"labels.flagEncFin\" | translate }}</label>\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=\"operacao1\" [class.required]=\"isCamposSop\">{{ \"labels.operacao\" |\r\n                                            translate }}</label>\r\n                                        <app-combo-operacao id=\"operacao1\" label=\"operacao1\" name=\"operacao1\" tipo=\"S\"\r\n                                            exibe=\"S\" flagServ=\"S\" [required]=\"isCamposSop\"\r\n                                            [(ngModel)]=\"data.itensSop.operacaoId\"\r\n                                            data-title=\"{{ 'labels.operacao' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposSop\">\r\n                                        </app-combo-operacao>\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=\"flagIssDest1\" [class.required]=\"isCamposSop\">{{ \"labels.tipoISS\" |\r\n                                            translate}}</label>\r\n                                        <select id=\"flagIssDest1\" [(ngModel)]=\"data.itensSop.flagIssDest\"\r\n                                            class=\"form-control form-control-sm\" name=\"flagIssDest1\"\r\n                                            [required]=\"isCamposSop\" data-title=\"{{ 'labels.tipoISS' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposSop\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoIssDest.get\" value=\"{{ t.id }}\">\r\n                                                {{ t.descricao }}\r\n                                            </option>\r\n                                        </select>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-2 col-md-4 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"aliqIssDest1\">{{\"labels.aliqIss\" | translate}}</label>\r\n                                        <input id=\"aliqIssDest1\" name=\"aliqIssDest1\"\r\n                                            [(ngModel)]=\"data.itensSop.aliqIssDest\" maxlength=\"5\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposSop\"\r\n                                            currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\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=\"condPag1\" [class.required]=\"isCamposSop\">{{\"labels.condPagFor\" |\r\n                                            translate }}</label>\r\n                                        <app-combo-padrao name=\"condPag1\" id=\"condPag1\" chave=\"CondPag\"\r\n                                            descricao=\"DescrCond\" ativo=\"true\" tabela=\"CondPagamento\"\r\n                                            [required]=\"isCamposSop\" [(ngModel)]=\"data.itensSop.condPagId\"\r\n                                            data-title=\"{{ 'labels.condPagFor' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposSop\">\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-group form-group-sm\">\r\n                                        <label for=\"flagCofinsDest1\" [class.required]=\"isCamposSop\">{{\r\n                                            \"labels.tipoPisCofins\" | translate}}</label>\r\n                                        <select id=\"flagCofinsDest1\" [(ngModel)]=\"data.itensSop.flagCofinsDest\"\r\n                                            class=\"form-control form-control-sm\" name=\"flagCofinsDest1\"\r\n                                            [required]=\"isCamposSop\"\r\n                                            data-title=\"{{ 'labels.tipoPisCofins' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposSop\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoCofinsDes.get\" value=\"{{ t.id }}\">\r\n                                                {{ t.descricao }}\r\n                                            </option>\r\n                                        </select>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-2 col-md-4 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"aliqCofinsDest1\">{{\"labels.aliquota\" | translate}}</label>\r\n                                        <input id=\"aliqCofinsDest1\" name=\"aliqCofinsDest1\"\r\n                                            [(ngModel)]=\"data.itensSop.aliqCofinsDest\" maxlength=\"5\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposSop\"\r\n                                            currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-6 col-md-9 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"metCalc\" [class.required]=\"isCamposSop\">{{ \"labels.metodo\" |\r\n                                            translate}}</label>\r\n                                        <select id=\"metCalc\" [(ngModel)]=\"data.itensSop.metCalculo\"\r\n                                            [required]=\"isCamposSop\" class=\"form-control form-control-sm\" name=\"metCalc\"\r\n                                            data-title=\"{{ 'labels.metodo' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposSop\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoMetCalc.get\" value=\"{{ t.id }}\">\r\n                                                {{ t.descricao }}\r\n                                            </option>\r\n                                        </select>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-4 col-md-4 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"unidadeId1\" [class.required]=\"isCamposSop\">{{ 'labels.unidade' |\r\n                                            translate}}</label>\r\n                                        <app-combo-padrao id=\"unidadeId1\" name=\"unidadeId1\"\r\n                                            [(ngModel)]=\"data.itensSop.unidadeId\" tabela=\"Unidade\" chave=\"Unidade\"\r\n                                            ativos=\"true\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposSop\"\r\n                                            data-title=\"{{ 'labels.unidade' | translate }}\" descricao=\"Unidade\"\r\n                                            [required]=\"isCamposSop\">\r\n                                        </app-combo-padrao>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <!-- ABA N2 -->\r\n                        <div class=\"tab-pane\" id=\"n2\">\r\n                            <div class=\"row mt-1 mb-4\">\r\n                                <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"flagN2\" name=\"flagN2\" [ngModel]=\"data.flagN2 === 'S'\"\r\n                                            (ngModelChange)=\"data.flagN2 = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                            (change)=\"obrigaCampos()\" (blur)=\"validaN2()\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                        <label class=\"custom-control-label\" for=\"flagN2\">{{\r\n                                            \"labels.flagN2\" | translate }}</label>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n\r\n\r\n                            <div class=\"row mt-2\">\r\n                                <div class=\"col-lg-2 col-md-8 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"tipoPrecoN2\" class=\"required\">{{ \"labels.tipoPreco\" |\r\n                                            translate}}</label>\r\n                                        <select id=\"tipoPrecoN2\" [(ngModel)]=\"data.itensN2.tipoPreco\" required=\"true\"\r\n                                            class=\"form-control form-control-sm\" name=\"tipoPrecoN2\"\r\n                                            data-title=\"{{ 'labels.tipoPreco' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoPreco.get\" value=\"{{ t.id }}\">\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-8 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"preco2\">{{'labels.preco' | translate}}</label>\r\n                                        <input id=\"preco2\" name=\"preco2\" [(ngModel)]=\"data.itensN2.preco\" maxlength=\"11\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\"\r\n                                            currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\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=\"moeda4\" [class.required]=\"isCamposItemN2\">{{ 'labels.moeda' |\r\n                                            translate }}</label>\r\n                                        <app-combo-padrao id=\"moeda4\" name=\"moeda4\" tabela=\"Moedas\" chave=\"CodMoeda\"\r\n                                            descricao=\"Sifra\" [(ngModel)]=\"data.itensN2.moedaId\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\">\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=\"custom-control custom-checkbox mt-4\">\r\n                                        <input id=\"flagEncFin2\" name=\"flagEncFin2\"\r\n                                            [ngModel]=\"data.itensN2.flagEncFin === 'S'\"\r\n                                            (ngModelChange)=\"data.itensN2.flagEncFin = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\" />\r\n                                        <label class=\"custom-control-label\" for=\"flagEncFin2\">{{\r\n                                            \"labels.flagEncFin\" | translate }}</label>\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                                        <label for=\"operacao2\" [class.required]=\"isCamposItemN2\">{{ \"labels.operacao\" |\r\n                                            translate }}</label>\r\n                                        <app-combo-operacao id=\"operacao2\" label=\"operacao2\" name=\"operacao2\" tipo=\"S\"\r\n                                            exibe=\"S\" flagServ=\"S\" [required]=\"isCamposItemN2\"\r\n                                            [(ngModel)]=\"data.itensN2.operacaoId\"\r\n                                            data-title=\"{{ 'labels.operacao' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\">\r\n                                        </app-combo-operacao>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-2 col-md-4 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"flagIssDest2\">{{ \"labels.tipoISS\" | translate}}</label>\r\n                                        <select id=\"flagIssDest2\" [(ngModel)]=\"data.itensN2.flagIssDest\"\r\n                                            class=\"form-control form-control-sm\" name=\"flagIssDest2\"\r\n                                            data-title=\"{{ 'labels.flagIssDest' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoIssDest.get\" value=\"{{ t.id }}\">\r\n                                                {{ t.descricao }}\r\n                                            </option>\r\n                                        </select>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-2 col-md-4 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"aliqIssDest2\">{{\"labels.aliqIss\" | translate}}</label>\r\n                                        <input id=\"aliqIssDest2\" name=\"aliqIssDest2\"\r\n                                            [(ngModel)]=\"data.itensN2.aliqIssDest\" maxlength=\"5\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\"\r\n                                            currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"condPag2\" [class.required]=\"isCamposItemN2\">{{\"labels.condPagFor\" |\r\n                                            translate }}</label>\r\n                                        <app-combo-padrao name=\"condPag2\" id=\"condPag2\" chave=\"CondPag\"\r\n                                            descricao=\"DescrCond\" ativo=\"true\" tabela=\"CondPagamento\"\r\n                                            [required]=\"isCamposItemN2\" [(ngModel)]=\"data.itensN2.condPagId\"\r\n                                            data-title=\"{{ 'labels.condPagFor' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\">\r\n                                        </app-combo-padrao>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-2 col-md-8 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"flagCofinsDest2\">{{ \"labels.tipoPisCofins\" | translate}}</label>\r\n                                        <select id=\"flagCofinsDest2\" [(ngModel)]=\"data.itensN2.flagCofinsDest\"\r\n                                            class=\"form-control form-control-sm\" name=\"flagCofinsDest2\"\r\n                                            data-title=\"{{ 'labels.flagCofinsDes' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoCofinsDes.get\" value=\"{{ t.id }}\">\r\n                                                {{ t.descricao }}\r\n                                            </option>\r\n                                        </select>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-2 col-md-4 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"aliqCofinsDest2\">{{\"labels.aliquota\" | translate}}</label>\r\n                                        <input id=\"aliqCofinsDest2\" name=\"aliqCofinsDest2\"\r\n                                            [(ngModel)]=\"data.itensN2.aliqCofinsDest\" maxlength=\"5\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\"\r\n                                            currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"especificacao1\">{{'labels.especificacao' | translate}}</label>\r\n                                        <textarea id=\"especificacao1\" name=\"especificacao1\"\r\n                                            [(ngModel)]=\"data.itensN2.especificacao\" class=\"form-control\" rows=\"3\"\r\n                                            maxlength=\"250\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\"\r\n                                            data-title=\"{{'labels.especificacao' | translate}}\"></textarea>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-1 col-md-2 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"ptProporcaoN2\">{{\"labels.propPerc\" | translate}}</label>\r\n                                        <input id=\"ptProporcaoN2\" name=\"ptProporcaoN2\"\r\n                                            [(ngModel)]=\"data.itensN2.ptProporcaoN2\" maxlength=\"5\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\"\r\n                                            currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-3 col-md-5 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"metCalc1\" [class.required]=\"isCamposItemN2\">{{ \"labels.metodo\" |\r\n                                            translate}}</label>\r\n                                        <select id=\"metCalc1\" [(ngModel)]=\"data.itensN2.metCalculo\"\r\n                                            [required]=\"isCamposItemN2\" class=\"form-control form-control-sm\"\r\n                                            name=\"metCalc1\" (change)=\"atualizaQuantidPer()\"\r\n                                            data-title=\"{{ 'labels.metodo' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemN2\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoMetCalc1.get\" value=\"{{ t.id }}\">\r\n                                                {{ t.descricao }}\r\n                                            </option>\r\n                                        </select>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n\r\n\r\n                        </div>\r\n                        <!-- ABA FUNDAF -->\r\n                        <div class=\"tab-pane\" id=\"fu\">\r\n                            <div class=\"row mt-1 mb-4\">\r\n                                <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"flagFundaf\" name=\"flagFundaf\" [ngModel]=\"data.flagFundaf === 'S'\"\r\n                                            (ngModelChange)=\"data.flagFundaf = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                            (change)=\"obrigaCampos()\" (blur)=\"validaFundaf()\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                        <label class=\"custom-control-label\" for=\"flagFundaf\">{{\r\n                                            \"labels.flagFundaf\" | translate }}</label>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n\r\n\r\n                            <div class=\"row mt-2\">\r\n                                <div class=\"col-lg-2 col-md-4 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"tipoPrecoF\" [class.required]=\"isCamposItemFundaf\">{{\r\n                                            \"labels.tipoPreco\" | translate}}</label>\r\n                                        <select id=\"tipoPrecoF\" [(ngModel)]=\"data.itensFundaf.tipoPreco\"\r\n                                            [required]=\"isCamposItemFundaf\" class=\"form-control form-control-sm\"\r\n                                            name=\"tipoPrecoF\" data-title=\"{{ 'labels.tipoPreco' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoPreco.get\" value=\"{{ t.id }}\">\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-8 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"precoF\">{{'labels.preco' | translate}}</label>\r\n                                        <input id=\"precoF\" name=\"precoF\" [(ngModel)]=\"data.itensFundaf.preco\"\r\n                                            maxlength=\"11\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\"\r\n                                            currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\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=\"moedaF\" [class.required]=\"isCamposItemFundaf\">{{'labels.moeda' |\r\n                                            translate}}</label>\r\n                                        <app-combo-padrao id=\"moedaF\" name=\"moedaF\" tabela=\"Moedas\" chave=\"CodMoeda\"\r\n                                            descricao=\"Sifra\" [required]=\"isCamposItemFundaf\"\r\n                                            [(ngModel)]=\"data.itensFundaf.moedaId\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\">\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=\"custom-control custom-checkbox mt-4\">\r\n                                        <input id=\"flagEncFin3\" name=\"flagEncFin3\"\r\n                                            [ngModel]=\"data.itensFundaf.flagEncFin === 'S'\"\r\n                                            (ngModelChange)=\"data.itensFundaf.flagEncFin = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\" />\r\n                                        <label class=\"custom-control-label\" for=\"flagEncFin3\">{{\r\n                                            \"labels.flagEncFin\" | translate }}</label>\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                                        <label for=\"operacao3\" [class.required]=\"isCamposItemFundaf\">{{\r\n                                            \"labels.operacao\" | translate }}</label>\r\n                                        <app-combo-operacao id=\"operacao3\" label=\"operacao3\" name=\"operacao3\" tipo=\"S\"\r\n                                            exibe=\"S\" flagServ=\"S\" [required]=\"isCamposItemFundaf\"\r\n                                            [(ngModel)]=\"data.itensFundaf.operacaoId\"\r\n                                            data-title=\"{{ 'labels.operacao' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\">\r\n                                        </app-combo-operacao>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-2 col-md-4 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"flagIssDest3\" [class.required]=\"isCamposItemFundaf\">{{\r\n                                            \"labels.tipoISS\" | translate}}</label>\r\n                                        <select id=\"flagIssDest3\" [(ngModel)]=\"data.itensFundaf.flagIssDest\"\r\n                                            class=\"form-control form-control-sm\" name=\"flagIssDest3\"\r\n                                            [required]=\"isCamposItemFundaf\"\r\n                                            data-title=\"{{ 'labels.tipoISS' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoIssDest.get\" value=\"{{ t.id }}\">\r\n                                                {{ t.descricao }}\r\n                                            </option>\r\n                                        </select>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-2 col-md-4 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"aliqIssDest3\">{{\"labels.aliqIss\" | translate}}</label>\r\n                                        <input id=\"aliqIssDest3\" name=\"aliqIssDest3\"\r\n                                            [(ngModel)]=\"data.itensFundaf.aliqIssDest\" maxlength=\"5\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\"\r\n                                            currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"condPag3\"\r\n                                            [class.required]=\"isCamposItemFundaf\">{{\"labels.condPagFor\" | translate\r\n                                            }}</label>\r\n                                        <app-combo-padrao name=\"condPag3\" id=\"condPag3\" chave=\"CondPag\"\r\n                                            descricao=\"DescrCond\" ativo=\"true\" tabela=\"CondPagamento\"\r\n                                            [required]=\"isCamposItemFundaf\" [(ngModel)]=\"data.itensFundaf.condPagId\"\r\n                                            data-title=\"{{ 'labels.condPagFor' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\">\r\n                                        </app-combo-padrao>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-2 col-md-8 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"flagCofinsDest3\" [class.required]=\"isCamposItemFundaf\">{{\r\n                                            \"labels.tipoPisCofins\" | translate}}</label>\r\n                                        <select id=\"flagCofinsDest3\" [(ngModel)]=\"data.itensFundaf.flagCofinsDest\"\r\n                                            class=\"form-control form-control-sm\" name=\"flagCofinsDest3\"\r\n                                            [required]=\"isCamposItemFundaf\"\r\n                                            data-title=\"{{ 'labels.tipoPisCofins' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoCofinsDes.get\" value=\"{{ t.id }}\">\r\n                                                {{ t.descricao }}\r\n                                            </option>\r\n                                        </select>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"col-lg-2 col-md-4 col-sm-6\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"aliqCofinsDest3\">{{\"labels.aliquota\" | translate}}</label>\r\n                                        <input id=\"aliqCofinsDest3\" name=\"aliqCofinsDest3\"\r\n                                            [(ngModel)]=\"data.itensFundaf.aliqCofinsDest\" maxlength=\"5\"\r\n                                            class=\"form-control form-control-sm\" type=\"text\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\"\r\n                                            currencyMask\r\n                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"row\">\r\n                                <div class=\"col-lg-3 col-md-4 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"metCalc2\" [class.required]=\"isCamposItemFundaf\">{{\r\n                                            \"labels.codMetCalcArm\" | translate}}</label>\r\n                                        <select id=\"metCalc2\" [(ngModel)]=\"data.itensFundaf.metCalculo\"\r\n                                            [required]=\"isCamposItemFundaf\" class=\"form-control form-control-sm\"\r\n                                            name=\"metCalc2\" data-title=\"{{ 'labels.codMetCalcArm' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoMetCalc2.get\" value=\"{{ t.id }}\">\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-4 col-sm-12\">\r\n                                    <div class=\"form-group form-group-sm\">\r\n                                        <label for=\"tipoNota1\" [class.required]=\"isCamposItemFundaf\">{{\r\n                                            \"labels.tipoNota\" | translate}}</label>\r\n                                        <select id=\"tipoNota1\" [(ngModel)]=\"data.itensFundaf.tipoNota\"\r\n                                            class=\"form-control form-control-sm\" name=\"tipoNota1\"\r\n                                            [required]=\"isCamposItemFundaf\"\r\n                                            data-title=\"{{ 'labels.tipoNota' | translate }}\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemFundaf\">\r\n                                            <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                            <option *ngFor=\"let t of tipoNota1.get\" value=\"{{ t.id }}\">\r\n                                                {{ t.descricao }}\r\n                                            </option>\r\n                                        </select>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <!-- ABA MOVIMENTACAO -->\r\n                        <div class=\"tab-pane\" id=\"mo\">\r\n                            <div class=\"row mt-1 mb-1\">\r\n                                <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"flagMov\" name=\"flagMov\" [ngModel]=\"data.flagMov === 'S'\"\r\n                                            (ngModelChange)=\"data.flagMov = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                            (change)=\"obrigaCampos()\" (blur)=\"validaMov()\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                        <label class=\"custom-control-label\" for=\"flagMov\">{{\r\n                                            \"labels.movimentacao\" | translate }}</label>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n\r\n                            <div class=\"row\">\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-6 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"preco3\">{{'labels.preco' | translate}}</label>\r\n                                                <input id=\"preco3\" name=\"preco3\" [(ngModel)]=\"data.itensMov.preco\"\r\n                                                    maxlength=\"11\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemMov\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-6 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"moeda5\">{{'labels.moeda' | translate}}</label>\r\n                                                <app-combo-padrao id=\"moeda5\" name=\"moeda5\" tabela=\"Moedas\"\r\n                                                    chave=\"CodMoeda\" descricao=\"Sifra\"\r\n                                                    [(ngModel)]=\"data.itensMov.moedaId\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemMov\">\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-group form-group-sm\">\r\n                                                <div class=\"form-group form-group-sm\">\r\n                                                    <label for=\"operacao4\" [class.required]=\"isCamposItemMov\">{{\r\n                                                        \"labels.operacao\" | translate }}</label>\r\n                                                    <app-combo-operacao id=\"operacao4\" label=\"operacao4\"\r\n                                                        name=\"operacao4\" tipo=\"S\" exibe=\"S\" flagServ=\"S\"\r\n                                                        [required]=\"isCamposItemMov\"\r\n                                                        [(ngModel)]=\"data.itensMov.operacaoId\"\r\n                                                        data-title=\"{{ 'labels.operacao' | translate }}\"\r\n                                                        [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemMov\">\r\n                                                    </app-combo-operacao>\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=\"condPag4\"\r\n                                                    [class.required]=\"isCamposItemMov\">{{\"labels.condPagFor\" | translate\r\n                                                    }}</label>\r\n                                                <app-combo-padrao name=\"condPag4\" id=\"condPag4\" chave=\"CondPag\"\r\n                                                    descricao=\"DescrCond\" ativo=\"true\" tabela=\"CondPagamento\"\r\n                                                    [required]=\"isCamposItemMov\" [(ngModel)]=\"data.itensMov.condPagId\"\r\n                                                    data-title=\"{{ 'labels.condPagFor' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemMov\">\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-group form-group-sm\">\r\n                                                <label for=\"metCalc3\" [class.required]=\"isCamposItemMov\">{{\r\n                                                    'labels.codMetCalcArm' | translate}}</label>\r\n                                                <app-combo-metodo-calculo-arm id=\"metCalc3\" name=\"metCalc3\"\r\n                                                    tipoServico=\"5\" tipoFixo=\"0\"\r\n                                                    [(ngModel)]=\"data.itensMov.codMetCalcArm\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemMov\"\r\n                                                    [required]=\"isCamposItemMov\">\r\n                                                </app-combo-metodo-calculo-arm>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row mt-4\">\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                                            <div class=\"custom-control custom-checkbox\">\r\n                                                <input id=\"flagEncFin4\" name=\"flagEncFin4\"\r\n                                                    [ngModel]=\"data.itensMov.flagEncFin === 'S'\"\r\n                                                    (ngModelChange)=\"data.itensMov.flagEncFin = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemMov\" />\r\n                                                <label class=\"custom-control-label\" for=\"flagEncFin4\">{{\r\n                                                    \"labels.flagEncFin\" | translate }}</label>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row mt-3\">\r\n                                        <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"flagIssDest4\" [class.required]=\"isCamposItemMov\">{{\r\n                                                    \"labels.tipoISS\" | translate}}</label>\r\n                                                <select id=\"flagIssDest4\" [(ngModel)]=\"data.itensMov.flagIssDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagIssDest4\"\r\n                                                    [required]=\"isCamposItemMov\"\r\n                                                    data-title=\"{{ 'labels.tipoISS' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemMov\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoIssDest.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-6\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqIssDest4\">{{\"labels.aliqIss\" | translate}}</label>\r\n                                                <input id=\"aliqIssDest4\" name=\"aliqIssDest4\"\r\n                                                    [(ngModel)]=\"data.itensMov.aliqIssDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemMov\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"flagCofinsDest4\" [class.required]=\"isCamposItemMov\">{{\r\n                                                    \"labels.tipoPisCofins\" | translate}}</label>\r\n                                                <select id=\"flagCofinsDest4\" [(ngModel)]=\"data.itensMov.flagCofinsDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagCofinsDest4\"\r\n                                                    [required]=\"isCamposItemMov\"\r\n                                                    data-title=\"{{ 'labels.tipoPisCofins' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemMov\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoCofinsDes.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-6\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqCofinsDest4\">{{\"labels.aliquota\" | translate}}</label>\r\n                                                <input id=\"aliqCofinsDest4\" name=\"aliqCofinsDest4\"\r\n                                                    [(ngModel)]=\"data.itensMov.aliqCofinsDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemMov\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <!-- ABA EXCEDENTE -->\r\n                        <div class=\"tab-pane\" id=\"ex\">\r\n                            <div class=\"row mt-1 mb-1\">\r\n                                <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"flagExc\" name=\"flagExc\" [ngModel]=\"data.flagExc === 'S'\"\r\n                                            (ngModelChange)=\"data.flagExc = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                            (change)=\"obrigaCampos()\" (blur)=\"validaExc()\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                        <label class=\"custom-control-label\" for=\"flagExc\">{{\r\n                                            \"labels.excedente\" | translate }}</label>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n\r\n                            <div class=\"row\">\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-6 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"preco4\">{{'labels.preco' | translate}}</label>\r\n                                                <input id=\"preco4\" name=\"preco4\" [(ngModel)]=\"data.itensExc.preco\"\r\n                                                    maxlength=\"11\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemExc\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-6 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"moeda6\">{{'labels.moeda' | translate}}</label>\r\n                                                <app-combo-padrao id=\"moeda6\" name=\"moeda6\" tabela=\"Moedas\"\r\n                                                    chave=\"CodMoeda\" descricao=\"Sifra\"\r\n                                                    [(ngModel)]=\"data.itensExc.moedaId\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemExc\">\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-group form-group-sm\">\r\n                                                <label for=\"operacao5\" [class.required]=\"isCamposItemExc\">{{\r\n                                                    \"labels.operacao\" | translate }}</label>\r\n                                                <app-combo-operacao id=\"operacao5\" label=\"operacao5\" name=\"operacao5\"\r\n                                                    tipo=\"S\" exibe=\"S\" flagServ=\"S\" [required]=\"isCamposItemExc\"\r\n                                                    [(ngModel)]=\"data.itensExc.operacaoId\"\r\n                                                    data-title=\"{{ 'labels.operacao' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemExc\">\r\n                                                </app-combo-operacao>\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=\"condPag5\"\r\n                                                    [class.required]=\"isCamposItemExc\">{{\"labels.condPagFor\" | translate\r\n                                                    }}</label>\r\n                                                <app-combo-padrao name=\"condPag5\" id=\"condPag5\" chave=\"CondPag\"\r\n                                                    descricao=\"DescrCond\" ativo=\"true\" tabela=\"CondPagamento\"\r\n                                                    [required]=\"isCamposItemExc\" [(ngModel)]=\"data.itensExc.condPagId\"\r\n                                                    data-title=\"{{ 'labels.condPagFor' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemExc\">\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-group form-group-sm\">\r\n                                                <label for=\"metCalc4\">{{ 'labels.codMetCalcArm' | translate}}</label>\r\n                                                <app-combo-metodo-calculo-arm id=\"metCalc4\" name=\"metCalc4\"\r\n                                                    [(ngModel)]=\"data.itensExc.codMetCalcArm\" tipoServico=\"6\"\r\n                                                    tipoFixo=\"0\">\r\n                                                </app-combo-metodo-calculo-arm>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row mt-4\">\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-12\">\r\n                                            <div class=\"custom-control custom-checkbox\">\r\n                                                <input id=\"flagEncFin5\" name=\"flagEncFin5\"\r\n                                                    [ngModel]=\"data.itensExc.flagEncFin === 'S'\"\r\n                                                    (ngModelChange)=\"data.itensExc.flagEncFin = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemExc\" />\r\n                                                <label class=\"custom-control-label\" for=\"flagEncFin5\">{{\r\n                                                    \"labels.flagEncFin\" | translate }}</label>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row mt-3\">\r\n                                        <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"flagIssDest5\" [class.required]=\"isCamposItemExc\">{{\r\n                                                    \"labels.tipoISS\" | translate}}</label>\r\n                                                <select id=\"flagIssDest5\" [(ngModel)]=\"data.itensExc.flagIssDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagIssDest5\"\r\n                                                    [required]=\"isCamposItemExc\"\r\n                                                    data-title=\"{{ 'labels.tipoISS' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemExc\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoIssDest.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-6\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqIssDest5\">{{\"labels.aliqIss\" | translate}}</label>\r\n                                                <input id=\"aliqIssDest5\" name=\"aliqIssDest5\"\r\n                                                    [(ngModel)]=\"data.itensExc.aliqIssDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemExc\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"flagCofinsDest5\" [class.required]=\"isCamposItemExc\">{{\r\n                                                    \"labels.tipoPisCofins\" | translate}}</label>\r\n                                                <select id=\"flagCofinsDest5\" [(ngModel)]=\"data.itensExc.flagCofinsDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagCofinsDest5\"\r\n                                                    [required]=\"isCamposItemExc\"\r\n                                                    data-title=\"{{ 'labels.tipoPisCofins' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemExc\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoCofinsDes.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-6\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqCofinsDest5\">{{\"labels.aliquota\" | translate}}</label>\r\n                                                <input id=\"aliqCofinsDest5\" name=\"aliqCofinsDest5\"\r\n                                                    [(ngModel)]=\"data.itensExc.aliqCofinsDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemExc\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <!-- ABA ARM. ADICIONAL -->\r\n                        <div class=\"tab-pane\" id=\"ar\">\r\n                            <div class=\"row mt-1 mb-1\">\r\n                                <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"flagAdic\" name=\"flagAdic\" [ngModel]=\"data.flagAdic === 'S'\"\r\n                                            (ngModelChange)=\"data.flagAdic = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                            (change)=\"obrigaCampos()\" (blur)=\"validaAdic()\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                        <label class=\"custom-control-label\" for=\"flagAdic\">{{\r\n                                            \"labels.armAdicional\" | translate }}</label>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n\r\n                            <div class=\"row\">\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-6 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"preco5\">{{'labels.preco' | translate}}</label>\r\n                                                <input id=\"preco5\" name=\"preco5\" [(ngModel)]=\"data.itensAdic.preco\"\r\n                                                    maxlength=\"11\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdic\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-6 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"moeda7\">{{'labels.moeda' | translate}}</label>\r\n                                                <app-combo-padrao id=\"moeda7\" name=\"moeda7\" tabela=\"Moedas\"\r\n                                                    chave=\"CodMoeda\" descricao=\"Sifra\"\r\n                                                    [(ngModel)]=\"data.itensAdic.moedaId\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdic\">\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-group form-group-sm\">\r\n                                                <label for=\"operacao6\" [class.required]=\"isCamposItemAdic\">{{\r\n                                                    \"labels.operacao\" | translate }}</label>\r\n                                                <app-combo-operacao id=\"operacao6\" label=\"operacao6\" name=\"operacao6\"\r\n                                                    tipo=\"S\" exibe=\"S\" flagServ=\"S\" [required]=\"isCamposItemAdic\"\r\n                                                    [(ngModel)]=\"data.itensAdic.operacaoId\"\r\n                                                    data-title=\"{{ 'labels.operacao' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdic\">\r\n                                                </app-combo-operacao>\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=\"condPag6\"\r\n                                                    [class.required]=\"isCamposItemAdic\">{{\"labels.condPagFor\" |\r\n                                                    translate }}</label>\r\n                                                <app-combo-padrao name=\"condPag6\" id=\"condPag6\" chave=\"CondPag\"\r\n                                                    descricao=\"DescrCond\" ativo=\"true\" tabela=\"CondPagamento\"\r\n                                                    [required]=\"isCamposItemAdic\" [(ngModel)]=\"data.itensAdic.condPagId\"\r\n                                                    data-title=\"{{ 'labels.condPagFor' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdic\">\r\n                                                </app-combo-padrao>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row mt-4\">\r\n                                        <div class=\"col-lg-5 col-md-8 col-sm-12\">\r\n                                            <div class=\"custom-control custom-checkbox\">\r\n                                                <input id=\"flagEncFin6\" name=\"flagEncFin6\"\r\n                                                    [ngModel]=\"data.itensAdic.flagEncFin === 'S'\"\r\n                                                    (ngModelChange)=\"data.itensAdic.flagEncFin = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdic\" />\r\n                                                <label class=\"custom-control-label\" for=\"flagEncFin6\">{{\r\n                                                    \"labels.flagEncFin\" | translate }}</label>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row mt-3\">\r\n                                        <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"flagIssDest6\" [class.required]=\"isCamposItemAdic\">{{\r\n                                                    \"labels.tipoISS\" | translate}}</label>\r\n                                                <select id=\"flagIssDest6\" [(ngModel)]=\"data.itensAdic.flagIssDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagIssDest6\"\r\n                                                    [required]=\"isCamposItemAdic\"\r\n                                                    data-title=\"{{ 'labels.tipoISS' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdic\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoIssDest.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-6\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqIssDest6\">{{\"labels.aliqIss\" | translate}}</label>\r\n                                                <input id=\"aliqIssDest6\" name=\"aliqIssDest6\"\r\n                                                    [(ngModel)]=\"data.itensAdic.aliqIssDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdic\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"flagCofinsDest6\" [class.required]=\"isCamposItemAdic\">{{\r\n                                                    \"labels.tipoPisCofins\" | translate}}</label>\r\n                                                <select id=\"flagCofinsDest6\" [(ngModel)]=\"data.itensAdic.flagCofinsDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagCofinsDest6\"\r\n                                                    [required]=\"isCamposItemAdic\"\r\n                                                    data-title=\"{{ 'labels.tipoPisCofins' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdic\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoCofinsDes.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-6\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqCofinsDest6\">{{\"labels.aliquota\" | translate}}</label>\r\n                                                <input id=\"aliqCofinsDest6\" name=\"aliqCofinsDest6\"\r\n                                                    [(ngModel)]=\"data.itensAdic.aliqCofinsDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdic\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <!-- ABA 2o Giro -->\r\n                        <div class=\"tab-pane\" id=\"gi\">\r\n                            <div class=\"row mt-1 mb-1\">\r\n                                <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"flagGir\" name=\"flagGir\" [ngModel]=\"data.flagGir === 'S'\"\r\n                                            (ngModelChange)=\"data.flagGir = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                            (change)=\"obrigaCampos()\" (blur)=\"validaGir()\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                        <label class=\"custom-control-label\" for=\"flagGir\">{{\r\n                                            \"labels.2Giro\" | translate }}</label>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n\r\n                            <div class=\"row\">\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-6 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"preco6\">{{'labels.preco' | translate}}</label>\r\n                                                <input id=\"preco6\" name=\"preco6\" [(ngModel)]=\"data.itensGir.preco\"\r\n                                                    maxlength=\"11\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemGir\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: decimalPreco }\">\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-6 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"moeda8\">{{'labels.moeda' | translate}}</label>\r\n                                                <app-combo-padrao id=\"moeda8\" name=\"moeda8\" tabela=\"Moedas\"\r\n                                                    chave=\"CodMoeda\" descricao=\"Sifra\"\r\n                                                    [(ngModel)]=\"data.itensGir.moedaId\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemGir\">\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-group form-group-sm\">\r\n                                                <label for=\"operacao7\" [class.required]=\"isCamposItemGir\">{{\r\n                                                    \"labels.operacao\" | translate }}</label>\r\n                                                <app-combo-operacao id=\"operacao7\" label=\"operacao7\" name=\"operacao7\"\r\n                                                    tipo=\"S\" exibe=\"S\" flagServ=\"S\" [required]=\"isCamposItemGir\"\r\n                                                    [(ngModel)]=\"data.itensGir.operacaoId\"\r\n                                                    data-title=\"{{ 'labels.operacao' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemGir\">\r\n                                                </app-combo-operacao>\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=\"condPag7\"\r\n                                                    [class.required]=\"isCamposItemGir\">{{\"labels.condPagFor\" | translate\r\n                                                    }}</label>\r\n                                                <app-combo-padrao name=\"condPag7\" id=\"condPag7\" chave=\"CondPag\"\r\n                                                    descricao=\"DescrCond\" ativo=\"true\" tabela=\"CondPagamento\"\r\n                                                    [required]=\"isCamposItemGir\" [(ngModel)]=\"data.itensGir.condPagId\"\r\n                                                    data-title=\"{{ 'labels.condPagFor' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemGir\">\r\n                                                </app-combo-padrao>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row mt-4\">\r\n                                        <div class=\"col-lg-5 col-md-8 col-sm-12\">\r\n                                            <div class=\"custom-control custom-checkbox\">\r\n                                                <input id=\"flagEncFin7\" name=\"flagEncFin7\"\r\n                                                    [ngModel]=\"data.itensGir.flagEncFin === 'S'\"\r\n                                                    (ngModelChange)=\"data.itensGir.flagEncFin = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemGir\" />\r\n                                                <label class=\"custom-control-label\" for=\"flagEncFin7\">{{\r\n                                                    \"labels.flagEncFin\" | translate }}</label>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row mt-3\">\r\n                                        <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"flagIssDest7\" [class.required]=\"isCamposItemGir\">{{\r\n                                                    \"labels.tipoISS\" | translate}}</label>\r\n                                                <select id=\"flagIssDest7\" [(ngModel)]=\"data.itensGir.flagIssDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagIssDest7\"\r\n                                                    [required]=\"isCamposItemGir\"\r\n                                                    data-title=\"{{ 'labels.tipoISS' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemGir\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoIssDest.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-6\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqIssDest7\">{{\"labels.aliqIss\" | translate}}</label>\r\n                                                <input id=\"aliqIssDest7\" name=\"aliqIssDest7\"\r\n                                                    [(ngModel)]=\"data.itensGir.aliqIssDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemGir\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"flagCofinsDest7\" [class.required]=\"isCamposItemGir\">{{\r\n                                                    \"labels.tipoPisCofins\" | translate}}</label>\r\n                                                <select id=\"flagCofinsDest7\" [(ngModel)]=\"data.itensGir.flagCofinsDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagCofinsDest7\"\r\n                                                    [required]=\"isCamposItemGir\"\r\n                                                    data-title=\"{{ 'labels.tipoPisCofins' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemGir\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoCofinsDes.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-6\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqCofinsDest7\">{{\"labels.aliquota\" | translate}}</label>\r\n                                                <input id=\"aliqCofinsDest7\" name=\"aliqCofinsDest7\"\r\n                                                    [(ngModel)]=\"data.itensGir.aliqCofinsDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemGir\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <!-- ABA SEGURO -->\r\n                        <div class=\"tab-pane\" id=\"se\">\r\n                            <div class=\"row mt-1 mb-1\">\r\n                                <div class=\"col-lg-8 col-md-10 col-sm-12\">\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                        <input id=\"flagAdv\" name=\"flagAdv\" [ngModel]=\"data.flagAdv === 'S'\"\r\n                                            (ngModelChange)=\"data.flagAdv = $event ? 'S' : 'N'\"\r\n                                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                            (change)=\"obrigaCampos()\" (blur)=\"validaAdval()\"\r\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\" />\r\n                                        <label class=\"custom-control-label\" for=\"flagAdv\">{{\r\n                                            \"labels.seguro\" | translate }}</label>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n\r\n                            <div class=\"row\">\r\n                                <div class=\"card-body\">\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=\"aliqAdvalorem\">{{'labels.aliqAdvalorem' |\r\n                                                    translate}}</label>\r\n                                                <input id=\"aliqAdvalorem\" name=\"aliqAdvalorem\"\r\n                                                    [(ngModel)]=\"data.itensAdval.aliqAdvalorem\" maxlength=\"6\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdv\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\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=\"operacao8\" [class.required]=\"isCamposItemAdv\">{{\r\n                                                    \"labels.operacao\" | translate }}</label>\r\n                                                <app-combo-operacao id=\"operacao8\" label=\"operacao8\" name=\"operacao8\"\r\n                                                    tipo=\"S\" exibe=\"S\" flagServ=\"S\" [required]=\"isCamposItemAdv\"\r\n                                                    [(ngModel)]=\"data.itensAdval.operacaoId\"\r\n                                                    data-title=\"{{ 'labels.operacao' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdv\">\r\n                                                </app-combo-operacao>\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=\"condPag8\"\r\n                                                    [class.required]=\"isCamposItemAdv\">{{\"labels.condPagFor\" | translate\r\n                                                    }}</label>\r\n                                                <app-combo-padrao name=\"condPag8\" id=\"condPag8\" chave=\"CondPag\"\r\n                                                    descricao=\"DescrCond\" ativo=\"true\" tabela=\"CondPagamento\"\r\n                                                    [required]=\"isCamposItemAdv\" [(ngModel)]=\"data.itensAdval.condPagId\"\r\n                                                    data-title=\"{{ 'labels.condPagFor' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdv\">\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-group form-group-sm\">\r\n                                                <label for=\"metCalc5\">{{ 'labels.codMetCalcArm' | translate}}</label>\r\n                                                <app-combo-padrao id=\"metCalc5\" name=\"metCalc5\"\r\n                                                    [(ngModel)]=\"data.itensAdval.metCalculoSeg\"\r\n                                                    tabela=\"MetodoCalculoSeg\" chave=\"MetCalculoSeg\" ativos=\"true\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdv\"\r\n                                                    descricao=\"DescrMetCalcSeg\">\r\n                                                </app-combo-padrao>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"card-body\">\r\n                                    <div class=\"row mt-4\">\r\n                                        <div class=\"col-lg-5 col-md-8 col-sm-12\">\r\n                                            <div class=\"custom-control custom-checkbox\">\r\n                                                <input id=\"flagEncFin8\" name=\"flagEncFin8\"\r\n                                                    [ngModel]=\"data.itensAdval.flagEncFin === 'S'\"\r\n                                                    (ngModelChange)=\"data.itensAdval.flagEncFin = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdv\" />\r\n                                                <label class=\"custom-control-label\" for=\"flagEncFin8\">{{\r\n                                                    \"labels.flagEncFin\" | translate }}</label>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row mt-3\">\r\n                                        <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"flagIssDest8\" [class.required]=\"isCamposItemAdv\">{{\r\n                                                    \"labels.tipoISS\" | translate}}</label>\r\n                                                <select id=\"flagIssDest8\" [(ngModel)]=\"data.itensAdval.flagIssDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagIssDest8\"\r\n                                                    [required]=\"isCamposItemAdv\"\r\n                                                    data-title=\"{{ 'labels.tipoISS' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdv\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoIssDest.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-6\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqIssDest8\">{{\"labels.aliqIss\" | translate}}</label>\r\n                                                <input id=\"aliqIssDest8\" name=\"aliqIssDest8\"\r\n                                                    [(ngModel)]=\"data.itensAdval.aliqIssDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdv\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-lg-8 col-md-8 col-sm-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"flagCofinsDest8\" [class.required]=\"isCamposItemAdv\">{{\r\n                                                    \"labels.tipoPisCofins\" | translate}}</label>\r\n                                                <select id=\"flagCofinsDest8\"\r\n                                                    [(ngModel)]=\"data.itensAdval.flagCofinsDest\"\r\n                                                    class=\"form-control form-control-sm\" name=\"flagCofinsDest8\"\r\n                                                    [required]=\"isCamposItemAdv\"\r\n                                                    data-title=\"{{ 'labels.tipoPisCofins' | translate }}\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdv\">\r\n                                                    <option value=\"\">{{ \"labels.selecione\" | translate }}</option>\r\n                                                    <option *ngFor=\"let t of tipoCofinsDes.get\" value=\"{{ t.id }}\">\r\n                                                        {{ t.descricao }}\r\n                                                    </option>\r\n                                                </select>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-lg-4 col-md-8 col-sm-6\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"aliqCofinsDest8\">{{\"labels.aliquota\" | translate}}</label>\r\n                                                <input id=\"aliqCofinsDest8\" name=\"aliqCofinsDest8\"\r\n                                                    [(ngModel)]=\"data.itensAdval.aliqCofinsDest\" maxlength=\"5\"\r\n                                                    class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm) || !isCamposItemAdv\"\r\n                                                    currencyMask\r\n                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12\">\r\n                            <div class=\"form-group\">\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                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </form>\r\n</div>");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"row\">\r\n    <div class=\"col-md-12 col-lg-12\">\r\n        <div *ngIf=\"!showAdd\">\r\n            <div class=\"btn-group\" *ngIf=\"!showAdd\">\r\n                <button title=\"{{ 'buttons.novo' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"create()\"\r\n                        [disabled]=\"disabled\">\r\n                    <i class=\"icon-plus\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.visualizar' | translate }}\" (click)=\"detail()\" class=\"btn uni-btn btn-sm\"\r\n                        [disabled]=\" funcoesService.showButtons.detail(actionForm, dataAux.stoContratoId)\">\r\n                    <i class=\"icon-eye\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"edit()\"\r\n                        [disabled]=\"disabled || funcoesService.showButtons.edit(actionForm, dataAux.stoContratoId)\">\r\n                    <i class=\"icon-pencil\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.excluir' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"remove()\"\r\n                        [disabled]=\"disabled ||funcoesService.showButtons.remove(actionForm, dataAux.stoContratoId)\">\r\n                    <i class=\"icon-close\"></i>\r\n                </button>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n\r\n<div class=\"row\" *ngIf=\"!showAdd\">\r\n    <div class=\"col-md-12 col-lg-12\">\r\n        <table class=\"table table-striped table-bordered table-hover rownowrap form-control-sm\">\r\n            <thead>\r\n            <tr>\r\n                <th class=\"text-center\">{{ \"labels.deposito\" | translate }}</th>\r\n                <th class=\"text-center\">{{ \"labels.material\" | translate }}</th>\r\n                <th class=\"text-center\">{{ \"labels.descricao\" | translate }}</th>\r\n                <th class=\"text-center\">{{ \"labels.quantidade\" | translate }}</th>\r\n            </tr>\r\n            </thead>\r\n            <tbody>\r\n            <tr *ngFor=\"let c of (dados | removeExcluidos)\" class=\"clickable\" [ngClass]=\"{ info: c === dataAux }\"\r\n                (click)=\"dataAux = c\">\r\n                <td class=\"text\">{{ c.tanqueId }}</td>\r\n                <td class=\"text\">{{ c.materialId }}</td>\r\n                <td class=\"text\">{{ c.produto }}</td>\r\n                <td class=\"text\">{{ c.quantidM3 }}</td>\r\n            </tr>\r\n            <tr *ngIf=\"!hasDados\">\r\n                <th colspan=\"9\">\r\n                    {{ \"messages.nenhumRegistroEncontrado\" | translate }}\r\n                </th>\r\n            </tr>\r\n            </tbody>\r\n        </table>\r\n    </div>\r\n</div>\r\n\r\n<div *ngIf=\"showAdd\">\r\n    <div class=\"row\">\r\n        <div class=\"col-lg-6\">\r\n            <div class=\"uni-botoes\">\r\n                <button title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"edit()\"\r\n                        [disabled]=\"disabled || funcoesService.showButtons.edit(actionForm, dataAux.stoContratoId)\">\r\n                    <i class=\"fa fa-edit\"></i>\r\n                </button>\r\n                <button title=\"{{ 'buttons.voltar' | translate }}\" (click)=\"back()\" type=\"button\"\r\n                        class=\"btn uni-btn btn-sm\">\r\n                    <i class=\"fa fa-arrow-left\"></i>\r\n                </button>\r\n            </div>\r\n        </div>\r\n        <div class=\"col-lg-6\">\r\n            <app-form-legenda></app-form-legenda>\r\n        </div>\r\n    </div>\r\n    <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\r\n        <div class=\"row\">\r\n            <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                    <div class=\"card-body widget-body\">\r\n                        <app-validacoes></app-validacoes>\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=\"descricaoTanque\">{{'labels.descricao' | translate}}</label>\r\n                                    <textarea id=\"descricaoTanque\"\r\n                                              name=\"descricaoTanque\"\r\n                                              [(ngModel)]=\"data.especificacao\"\r\n                                              class=\"form-control\"\r\n                                              rows=\"2\"\r\n                                              maxlength=\"500\"\r\n                                              disabled=\"true\"\r\n                                              data-title=\"{{'labels.observacoes' | translate}}\">\r\n                                    </textarea>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"card\">\r\n                            <div class=\"card-body\">\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-4 col-md-6 col-sm-12\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"deposito\">{{\"labels.deposito\" | translate}}</label>\r\n                                            <app-combo-tanque id=\"deposito\"\r\n                                                              name=\"deposito\"\r\n                                                              [(ngModel)]=\"data.tanqueId\"\r\n                                                              [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                                              (outSelected)=\"verificaTanque()\">\r\n                                            </app-combo-tanque>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div class=\"col-lg-2 col-md-8 col-sm-6\">\r\n                                        <div class=\"custom-control custom-checkbox uni-checkbox\">\r\n                                            <input\r\n                                                    id=\"cativo\"\r\n                                                    name=\"cativo\"\r\n                                                    [ngModel]=\"data.flagCativo === 'S'\"\r\n                                                    (ngModelChange)=\"data.flagCativo = $event ? 'S' : 'N'\"\r\n                                                    class=\"custom-control-input checkbox-success\"\r\n                                                    type=\"checkbox\"\r\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\"/>\r\n                                            <label class=\"custom-control-label\" for=\"cativo\">{{\r\n                                                \"labels.cativo\" | translate }}</label>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-12\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <app-pesquisa-material id=\"materialId\" name=\"materialId\"\r\n                                                                   [(ngModel)]=\"data.materialId\"\r\n                                                                   modalTitle=\"pesquisaDeProduto\"\r\n                                                                   [inSelected]=\"data.material\"\r\n                                                                   [disabled]=\"funcoesService.isDetail(actionForm)\"\r\n                                                                   required=\"true\" label=\"produto\">\r\n                                            </app-pesquisa-material>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"clearfix\">&nbsp;</div>\r\n                        <div class=\"form-group\">\r\n                            <button\r\n                                    class=\"btn btn-success\"\r\n                                    type=\"submit\"\r\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\">\r\n                                {{ \"buttons.salvar\" | translate }}\r\n                            </button>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </form>\r\n</div>\r\n");

/***/ }),

/***/ "./src/app/pages/comercial/sto-contrato/sto-contrato-duplicar/sto-contrato-duplicar.component.ts":
/*!*******************************************************************************************************!*\
  !*** ./src/app/pages/comercial/sto-contrato/sto-contrato-duplicar/sto-contrato-duplicar.component.ts ***!
  \*******************************************************************************************************/
/*! exports provided: StoContratoDuplicarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoContratoDuplicarComponent", function() { return StoContratoDuplicarComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _sto_contrato_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../sto-contrato.service */ "./src/app/pages/comercial/sto-contrato/sto-contrato.service.ts");
/* harmony import */ var _sto_contrato_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../sto-contrato.model */ "./src/app/pages/comercial/sto-contrato/sto-contrato.model.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __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 StoContratoDuplicarComponent = /** @class */ (function () {
    function StoContratoDuplicarComponent(funcoesService, messageService, service) {
        this.funcoesService = funcoesService;
        this.messageService = messageService;
        this.service = service;
        this.dataResult = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_1__["Mascaras"]();
    }
    StoContratoDuplicarComponent.prototype.ngOnInit = function () {
    };
    StoContratoDuplicarComponent.prototype.onSubmit = function (form) {
        if (!this.funcoesService.isNotUndefinedOrNull(this.stoContrato.novoContrato) || (this.stoContrato.novoContrato === "0") || (this.stoContrato.novoContrato === "")) {
            this.messageService.warning("titles.stoContrato", "messages.numContratoInvalido");
            return;
        }
        if (!form.invalid) {
            this.dataResult.emit(this.stoContrato);
        }
    };
    StoContratoDuplicarComponent.prototype.vrfDuplicidadeNumContrato = function () {
        return __awaiter(this, void 0, void 0, function () {
            var filtro, resultado, ret;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!!this.stoContrato.novoContrato) return [3 /*break*/, 3];
                        filtro = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_3__["StoContratoFiltro"]();
                        filtro.numContrato = this.stoContrato.novoContrato;
                        filtro.consideraExcluido = true;
                        return [4 /*yield*/, this.service.getPesquisa(filtro)];
                    case 1:
                        resultado = _a.sent();
                        if (!(resultado.length > 0)) return [3 /*break*/, 3];
                        this.messageService.warning("titles.stoContrato", "messages.numContratoJaExiste");
                        return [4 /*yield*/, this.service.corpWebCmlContratoNumero()];
                    case 2:
                        ret = _a.sent();
                        this.stoContrato.novoContrato = ret.numContrato;
                        _a.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        });
    };
    StoContratoDuplicarComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] },
        { type: _sto_contrato_service__WEBPACK_IMPORTED_MODULE_2__["StoContratoService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], StoContratoDuplicarComponent.prototype, "stoContrato", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], StoContratoDuplicarComponent.prototype, "dataResult", void 0);
    StoContratoDuplicarComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-sto-contrato-duplicar",
            template: __importDefault(__webpack_require__(/*! raw-loader!./sto-contrato-duplicar.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/sto-contrato/sto-contrato-duplicar/sto-contrato-duplicar.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_4__["MessageService"],
            _sto_contrato_service__WEBPACK_IMPORTED_MODULE_2__["StoContratoService"]])
    ], StoContratoDuplicarComponent);
    return StoContratoDuplicarComponent;
}());



/***/ }),

/***/ "./src/app/pages/comercial/sto-contrato/sto-contrato-filter/sto-contrato-filter.component.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/comercial/sto-contrato/sto-contrato-filter/sto-contrato-filter.component.ts ***!
  \***************************************************************************************************/
/*! exports provided: StoContratoFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoContratoFilterComponent", function() { return StoContratoFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _sto_contrato_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../sto-contrato.model */ "./src/app/pages/comercial/sto-contrato/sto-contrato.model.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _sto_contrato_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../sto-contrato.service */ "./src/app/pages/comercial/sto-contrato/sto-contrato.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};






var StoContratoFilterComponent = /** @class */ (function () {
    function StoContratoFilterComponent(service, messageService) {
        this.service = service;
        this.messageService = messageService;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        this.situacao = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_3__["Situacao"]();
    }
    StoContratoFilterComponent.prototype.ngOnInit = function () {
    };
    StoContratoFilterComponent.prototype.onSubmit = function (form) {
        if (((this.service.filtro.dataI === undefined) || (this.service.filtro.dataI === "")) ||
            ((this.service.filtro.dataF === undefined) || (this.service.filtro.dataF === "")) ||
            (this.service.filtro.dataF.toString() === "Invalid Date") || (this.service.filtro.dataI.toString() === "Invalid Date")) {
            this.messageService.warning("titles.stoContrato", "messages.periodoNaoPreenchidoOuInvalido");
            return;
        }
        if (form.invalid) {
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        this.filtrar.emit(this.service.filtro);
        jQuery("#sto-contrato-filter-dialog").modal("hide");
    };
    StoContratoFilterComponent.prototype.trataDest = function (destinatario) {
        this.service.filtro.cliente = destinatario;
    };
    StoContratoFilterComponent.ctorParameters = function () { return [
        { type: _sto_contrato_service__WEBPACK_IMPORTED_MODULE_5__["StoContratoService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], StoContratoFilterComponent.prototype, "filtrar", void 0);
    StoContratoFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-sto-contrato-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./sto-contrato-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/sto-contrato/sto-contrato-filter/sto-contrato-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_sto_contrato_service__WEBPACK_IMPORTED_MODULE_5__["StoContratoService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"]])
    ], StoContratoFilterComponent);
    return StoContratoFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/comercial/sto-contrato/sto-contrato-form/sto-contrato-form.component.scss":
/*!*************************************************************************************************!*\
  !*** ./src/app/pages/comercial/sto-contrato/sto-contrato-form/sto-contrato-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"] = ("#cli {\n  padding-top: 0px;\n  padding-bottom: 0px;\n}\n\n#obs {\n  padding-top: 0px;\n  padding-bottom: 0px;\n}\n\n.flags {\n  padding-top: 0px;\n  padding-bottom: 0px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvY29tZXJjaWFsL3N0by1jb250cmF0by9zdG8tY29udHJhdG8tZm9ybS9DOlxcQ29ycG9yYXRlXFxDb3Jwb3JhdGVXZWJEZXNlbnZcXF91bmlzb2x1dGlvbi9zcmNcXGFwcFxccGFnZXNcXGNvbWVyY2lhbFxcc3RvLWNvbnRyYXRvXFxzdG8tY29udHJhdG8tZm9ybVxcc3RvLWNvbnRyYXRvLWZvcm0uY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL3BhZ2VzL2NvbWVyY2lhbC9zdG8tY29udHJhdG8vc3RvLWNvbnRyYXRvLWZvcm0vc3RvLWNvbnRyYXRvLWZvcm0uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBQTtFQUNBLG1CQUFBO0FDQ0Y7O0FERUE7RUFDRSxnQkFBQTtFQUNBLG1CQUFBO0FDQ0Y7O0FERUE7RUFDRSxnQkFBQTtFQUNBLG1CQUFBO0FDQ0YiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9jb21lcmNpYWwvc3RvLWNvbnRyYXRvL3N0by1jb250cmF0by1mb3JtL3N0by1jb250cmF0by1mb3JtLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiI2NsaSB7XHJcbiAgcGFkZGluZy10b3A6IDBweDtcclxuICBwYWRkaW5nLWJvdHRvbTogMHB4O1xyXG59XHJcblxyXG4jb2JzIHtcclxuICBwYWRkaW5nLXRvcDogMHB4O1xyXG4gIHBhZGRpbmctYm90dG9tOiAwcHg7XHJcbn1cclxuXHJcbi5mbGFncyB7XHJcbiAgcGFkZGluZy10b3A6IDBweDtcclxuICBwYWRkaW5nLWJvdHRvbTogMHB4O1xyXG59IiwiI2NsaSB7XG4gIHBhZGRpbmctdG9wOiAwcHg7XG4gIHBhZGRpbmctYm90dG9tOiAwcHg7XG59XG5cbiNvYnMge1xuICBwYWRkaW5nLXRvcDogMHB4O1xuICBwYWRkaW5nLWJvdHRvbTogMHB4O1xufVxuXG4uZmxhZ3Mge1xuICBwYWRkaW5nLXRvcDogMHB4O1xuICBwYWRkaW5nLWJvdHRvbTogMHB4O1xufSJdfQ== */");

/***/ }),

/***/ "./src/app/pages/comercial/sto-contrato/sto-contrato-form/sto-contrato-form.component.ts":
/*!***********************************************************************************************!*\
  !*** ./src/app/pages/comercial/sto-contrato/sto-contrato-form/sto-contrato-form.component.ts ***!
  \***********************************************************************************************/
/*! exports provided: StoContratoFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoContratoFormComponent", function() { return StoContratoFormComponent; });
/* 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 _config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__ = __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_4__ = __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_5__ = __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_6__ = __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_7__ = __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_8__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.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 _sto_contrato_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../sto-contrato.constants */ "./src/app/pages/comercial/sto-contrato/sto-contrato.constants.ts");
/* harmony import */ var _sto_contrato_model__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../sto-contrato.model */ "./src/app/pages/comercial/sto-contrato/sto-contrato.model.ts");
/* harmony import */ var _sto_contrato_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../sto-contrato.service */ "./src/app/pages/comercial/sto-contrato/sto-contrato.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 StoContratoFormComponent = /** @class */ (function (_super) {
    __extends(StoContratoFormComponent, _super);
    function StoContratoFormComponent(router, messageService, activatedRoute, service, configuracao, funcoesService, permissoesUtils, loginService, destinatarioService, stoContrato) {
        var _this = _super.call(this, new _sto_contrato_constants__WEBPACK_IMPORTED_MODULE_12__["StoContratoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.configuracao = configuracao;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.destinatarioService = destinatarioService;
        _this.stoContrato = stoContrato;
        _this.data = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_13__["StoContrato"]();
        _this.dataAux = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_13__["StoContratoInvoiceEmitidas"]();
        _this.dataInEmitdas = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_13__["StoContratoInvoiceEmitidas"]();
        _this.listInEmitdas = [];
        _this.mensagens = [];
        _this.constantes = new _sto_contrato_constants__WEBPACK_IMPORTED_MODULE_12__["StoContratoConstants"]();
        _this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.showComponent = false;
        _this.aprova = "";
        _this.botaoBloqMovProduto = false;
        _this.botaoEncContrato = false;
        _this.permiteAlterarDadosFatura = false;
        _this.showAdd = false;
        _this._isEdit = false;
        _this.loadConfig = function () {
            _this.aprova = _this.configuracao.lerConfig("CML", "CmlAprovaCtr") === "S" ? "N" : "S";
        };
        _this._edit = function () {
            _this._isEdit = false;
            _this.showAdd = true;
        };
        _this._detail = function () {
            _this._isEdit = true;
            _this.showAdd = true;
        };
        _this._back = function () {
            _this.showAdd = false;
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    StoContratoFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.showButton = true;
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
        this.validaPermissoes();
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () { return __awaiter(_this, void 0, void 0, function () {
            var id, result;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        id = this.activatedRoute.snapshot.paramMap.get("id");
                        if (!id) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.service.getById(id).subscribe(function (resp) {
                                _this.data = resp;
                                _this.dataItens = _this.data.itens[0].osgs;
                                _this.data.description = _this.data.description1 + _this.data.description2;
                                _this.data.benificiary = _this.data.benificiary1 + _this.data.benificiary2;
                                _this.showComponent = true;
                                _this.data.destinatarioIdClienteItem = _this.data.destinatarioIdCliente;
                                _this.destinatarioService.getById(_this.data.destinatarioIdCliente).subscribe(function (ret) {
                                    _this.data.cliente = ret;
                                    _this.data.clienteItem = ret;
                                });
                                _this.numContrato = resp.numContrato;
                                _this.service.getInvoiceEmitidos(id).subscribe(function (resp) {
                                    _this.listInEmitdas = resp;
                                });
                            })];
                    case 1:
                        _a.sent();
                        return [3 /*break*/, 4];
                    case 2:
                        this.data = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_13__["StoContrato"]();
                        return [4 /*yield*/, this.service.corpWebCmlContratoNumero()];
                    case 3:
                        result = _a.sent();
                        this.data.numContrato = result.numContrato;
                        this.numContrato = result.numContrato;
                        this.showComponent = true;
                        this.getCamposAdicionais();
                        _a.label = 4;
                    case 4: return [2 /*return*/];
                }
            });
        }); }, function () {
            _this.permissoesUtils.back();
        });
        this.botoesEPermitido();
    };
    Object.defineProperty(StoContratoFormComponent.prototype, "hasDados", {
        get: function () {
            return this.listInEmitdas && this.listInEmitdas.length > 1;
        },
        enumerable: true,
        configurable: true
    });
    StoContratoFormComponent.prototype.rowSelect = function (item) {
        this.dataAux = item;
        this.dataInEmitdas = item;
    };
    StoContratoFormComponent.prototype.updateShowButtom = function (event) {
        this.showButton = event;
    };
    StoContratoFormComponent.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_4__["EventEmitterService"].get("formError").emit(form);
            this.funcoesService.backToTop();
            return;
        }
        this.mensagens = [];
        if (!(this.funcoesService.isNotUndefinedOrNull(this.data.filialId)) || (this.data.filialId === "")) {
            this.data.filialId = this.loginService.getLogin().filialId;
        }
        if ((this.data.numContrato === 0) || (this.data.numContrato === "0")) {
            this.mensagens.push("messages.numContratoNaoInformado");
        }
        if (this.data.tipoMov === "") {
            this.mensagens.push("messages.tipoDeveSerPreenchido");
        }
        if (this.data.dtEmissao.toString() === "Invalid Date") {
            this.mensagens.push("messages.dtEmissaoNaoPreenchidaOuInvalida");
        }
        if (this.mensagens.length > 0) {
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit(this.mensagens);
            this.funcoesService.backToTop();
            return;
        }
        if (this.funcoesService.isNotUndefinedOrNull(this.data.description)) {
            this.data.description1 = this.data.description.toString().substring(0, 250);
            this.data.description2 = this.data.description.toString().substring(250, 500);
        }
        if (this.funcoesService.isNotUndefinedOrNull(this.data.benificiary)) {
            this.data.benificiary1 = this.data.benificiary.toString().substring(0, 250);
            this.data.benificiary2 = this.data.benificiary.toString().substring(250, 500);
        }
        this.data.flagAprova = this.aprova;
        this.data.logRotina = "Manutenção de Contratos";
        if (!!this.dataInEmitdas)
            this.data.invoiceEmitdas.push(this.dataInEmitdas);
        this.service
            ._save(this.data)
            .subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result);
            if (!result.isValid) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess("titles.stoContrato");
                if (create) {
                    _this.data = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_13__["StoContrato"]();
                    _this.dataInEmitdas = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_13__["StoContratoInvoiceEmitidas"]();
                    _this.router.navigate([_this.target + "/comercial/contratos/create"]);
                }
                else {
                    _this.data.invoiceEmitdas = null;
                    _this.back();
                }
            }
        });
    };
    StoContratoFormComponent.prototype.refreshItens = function (event) {
        var _this = this;
        this.data.itens = event;
        this.data.itens.forEach(function (val) {
            val.flagAprova = _this.aprova;
        });
    };
    StoContratoFormComponent.prototype.saveAndCreate = function (form) {
        this.data.filialId = this.loginService.getLogin().filialId;
        this.data.flagAprova = this.aprova;
        this.onSubmit(form, true);
    };
    StoContratoFormComponent.prototype.getCamposAdicionais = function () {
        var _this = this;
        this.funcoesService.camposAdicionais
            .get(this.constantes.sisFormularioId)
            .subscribe(function (data) {
            _this.data.sisCampoAdds = data;
        });
    };
    StoContratoFormComponent.prototype.verificaPermissao = function (rotina, callback) {
        // se ele tiver permissao callbackvalid = false, senão callbackNovalid = true
        this.permissoesUtils.validRotina(this.constantes.sisFormularioId, rotina, function () { return callback(false); }, function () { return callback(true); });
    };
    StoContratoFormComponent.prototype.botoesEPermitido = function () {
        var _this = this;
        this.verificaPermissao(9, function (permitido) { return _this.botaoBloqMovProduto = permitido; });
        this.verificaPermissao(10, function (permitido) { return _this.botaoEncContrato = permitido; });
    };
    StoContratoFormComponent.prototype.trataDest = function (destinatario) {
        if (destinatario.tipoDeDestinatarioId === "N") {
            this.messageService.warning("titles.stoContrato", "messages.tipoDestinatarioNaoPermitido");
            this.data.cliente = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_9__["Destinatario"]();
            this.data.clienteItem = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_9__["Destinatario"]();
            this.data.destinatarioIdClienteItem = 0;
            this.data.destinatarioIdCliente = 0;
        }
        else {
            this.data.cliente = destinatario;
            this.data.clienteItem = destinatario;
        }
    };
    StoContratoFormComponent.prototype.vrfDuplicidadeNumContrato = function () {
        return __awaiter(this, void 0, void 0, function () {
            var filtro, resultado;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!this.funcoesService.isNotUndefinedOrNull(this.data.numContrato)) return [3 /*break*/, 2];
                        filtro = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_13__["StoContratoFiltro"]();
                        filtro.numContrato = this.data.numContrato;
                        filtro.consideraExcluido = true;
                        return [4 /*yield*/, this.service.getPesquisa(filtro)];
                    case 1:
                        resultado = _a.sent();
                        if (resultado.length > 0) {
                            this.messageService.warning("titles.stoContrato", "messages.numContratoJaExiste");
                            this.data.numContrato = this.numContrato;
                        }
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    StoContratoFormComponent.prototype.validaPermissoes = function () {
        var _this = this;
        this.permissoesUtils.validRotina(this.constantes.sisFormularioId, 8, function () { return _this.permiteAlterarDadosFatura = true; }, function () { return _this.permiteAlterarDadosFatura = false; });
    };
    Object.defineProperty(StoContratoFormComponent.prototype, "disabledDadosFatura", {
        get: function () {
            return this.funcoesService.isDetail(this.actionForm)
                || !this.permiteAlterarDadosFatura;
        },
        enumerable: true,
        configurable: true
    });
    StoContratoFormComponent.prototype.edit = function () {
        this.router.navigate([this.target + "/comercial/contratos/edit/" + this.data.stoContratoId]);
    };
    Object.defineProperty(StoContratoFormComponent.prototype, "isDetail", {
        get: function () {
            return this.funcoesService.isDetail(this.actionForm);
        },
        enumerable: true,
        configurable: true
    });
    StoContratoFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate([this.target + "/comercial/contratos"]);
    };
    StoContratoFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _sto_contrato_service__WEBPACK_IMPORTED_MODULE_14__["StoContratoService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"] },
        { type: _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_10__["DestinatarioService"] },
        { type: _sto_contrato_service__WEBPACK_IMPORTED_MODULE_14__["StoContratoService"] }
    ]; };
    StoContratoFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-sto-contrato-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./sto-contrato-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/sto-contrato/sto-contrato-form/sto-contrato-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./sto-contrato-form.component.scss */ "./src/app/pages/comercial/sto-contrato/sto-contrato-form/sto-contrato-form.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _sto_contrato_service__WEBPACK_IMPORTED_MODULE_14__["StoContratoService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"],
            _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_10__["DestinatarioService"],
            _sto_contrato_service__WEBPACK_IMPORTED_MODULE_14__["StoContratoService"]])
    ], StoContratoFormComponent);
    return StoContratoFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/comercial/sto-contrato/sto-contrato-index/sto-contrato-index.component.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/pages/comercial/sto-contrato/sto-contrato-index/sto-contrato-index.component.ts ***!
  \*************************************************************************************************/
/*! exports provided: StoContratoIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoContratoIndexComponent", function() { return StoContratoIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __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_5__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __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_7__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _sto_contrato_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../sto-contrato.model */ "./src/app/pages/comercial/sto-contrato/sto-contrato.model.ts");
/* harmony import */ var _sto_contrato_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../sto-contrato.constants */ "./src/app/pages/comercial/sto-contrato/sto-contrato.constants.ts");
/* harmony import */ var _sto_contrato_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../sto-contrato.service */ "./src/app/pages/comercial/sto-contrato/sto-contrato.service.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.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 StoContratoIndexComponent = /** @class */ (function (_super) {
    __extends(StoContratoIndexComponent, _super);
    function StoContratoIndexComponent(router, service, datatablesService, messageService, funcoesService, permissoesUtils, loginService) {
        var _this = _super.call(this, new _sto_contrato_constants__WEBPACK_IMPORTED_MODULE_9__["StoContratoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.service = service;
        _this.datatablesService = datatablesService;
        _this.messageService = messageService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.data = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_8__["StoContratoNavega"]();
        _this.mensagens = [];
        _this.constantes = new _sto_contrato_constants__WEBPACK_IMPORTED_MODULE_9__["StoContratoConstants"]();
        _this.stoContratoDuplicar = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_8__["StoContratoDuplicar"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.properties = function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                if (!!(this.data.regContrato)) {
                    this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function () { return __awaiter(_this, void 0, void 0, function () {
                        return __generator(this, function (_a) {
                            _super.prototype.properties.call(this, this.data);
                            return [2 /*return*/];
                        });
                    }); });
                }
                return [2 /*return*/];
            });
        }); };
        _this.remove = function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                if (!!(this.data.regContrato)) {
                    this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () { return __awaiter(_this, void 0, void 0, function () {
                        var _this = this;
                        return __generator(this, function (_a) {
                            this.messageService.removeConfirm(function () {
                                var stoContrato = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_8__["StoContrato"]();
                                stoContrato.stoContratoId = _this.data.regContrato;
                                stoContrato.sitReg = "E";
                                _this.service._remove(stoContrato).subscribe(function (result1) {
                                    _this.mensagens = _this.messageService.validationResult(result1);
                                    if (!result1.isValid) {
                                        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__["EventEmitterService"].get("backError").emit(_this.mensagens);
                                    }
                                    else {
                                        _this.refresh();
                                        _this.datatablesService.remove("dtStoContrato");
                                    }
                                });
                            });
                            return [2 /*return*/];
                        });
                    }); });
                }
                return [2 /*return*/];
            });
        }); };
        _this.encContrato = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 11, function () {
                if (_this.data.sitReg === "E") {
                    _this.messageService.confirm("titles.encContrato", "messages.confEstItemContrato", null, function () {
                        // this.data.sitReg = "A"
                        var obj = {
                            id: _this.data.regContrato,
                            sitReg: "A",
                            item: 0
                        };
                        _this.service.encerraContrato(obj).subscribe(function (result1) {
                            _this.mensagens = _this.messageService.validationResult(result1.validationResult);
                            if (!result1.validationResult.isValid) {
                                _this.messageService.warning("titles.stoContrato", _this.mensagens[0]);
                            }
                            else {
                                _this.messageService.success("titles.stoContrato", "messages.estornoContratoRealizado");
                            }
                        });
                        _this.refresh();
                    }, false);
                }
                else {
                    _this.messageService.confirm("titles.encContrato", "messages.confEncItemContrato", null, function () {
                        // this.data.sitReg = "E"
                        var obj = {
                            id: _this.data.regContrato,
                            sitReg: "E",
                            item: 0
                        };
                        _this.service.encerraContrato(obj).subscribe(function (result1) {
                            _this.mensagens = _this.messageService.validationResult(result1.validationResult);
                            if (!result1.validationResult.isValid) {
                                _this.messageService.warning("titles.stoContrato", _this.mensagens[0]);
                            }
                            else {
                                _this.messageService.success("titles.stoContrato", "messages.encerramentoContratoRealizado");
                            }
                            _this.refresh();
                        });
                    }, false);
                }
            });
        };
        _this.duplContrato = function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 10, function () { return __awaiter(_this, void 0, void 0, function () {
                    var ret;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0: return [4 /*yield*/, this.executarDuplicarContrato()];
                            case 1:
                                ret = _a.sent();
                                return [2 /*return*/];
                        }
                    });
                }); });
                return [2 /*return*/];
            });
        }); };
        _this.executaDuplicarContrato = function () { return __awaiter(_this, void 0, void 0, function () {
            var retDuplicacao;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.service.corpWebContratoDuplica(this.stoContratoDuplicar)];
                    case 1:
                        retDuplicacao = _a.sent();
                        if (this.funcoesService.isNotUndefinedOrNull(retDuplicacao.regContrato)) {
                            if (this.data.regContrato !== retDuplicacao.regContrato) {
                                jQuery("#sto-contrato-duplicar-dialog").modal("hide");
                                this.router.navigate([this.target + "/comercial/contratos/detail/" + retDuplicacao.regContrato]);
                            }
                            else {
                                if (this.funcoesService.isNotUndefinedOrNull(retDuplicacao.validationResult)) {
                                    this.mensagens = this.messageService.validationResult(retDuplicacao.validationResult);
                                    if (retDuplicacao && !retDuplicacao.validationResult.isValid) {
                                        this.messageService.warning("titles.stoContrato", this.mensagens[0]);
                                        return [2 /*return*/];
                                    }
                                }
                            }
                        }
                        return [2 /*return*/];
                }
            });
        }); };
        _this.executarDuplicarContrato = function () { return __awaiter(_this, void 0, void 0, function () {
            var ret;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.stoContratoDuplicar.stoContratoId = this.data.regContrato;
                        return [4 /*yield*/, this.service.corpWebCmlContratoNumero()];
                    case 1:
                        ret = _a.sent();
                        if (this.funcoesService.isNotUndefinedOrNull(ret.validationResult)) {
                            this.mensagens = this.messageService.validationResult(ret.validationResult);
                            if (ret && !ret.validationResult.isValid) {
                                this.messageService.warning("titles.stoContrato", this.mensagens[0]);
                                return [2 /*return*/];
                            }
                        }
                        else {
                            this.stoContratoDuplicar.novoContrato = ret.numContrato;
                            this.stoContratoDuplicar.transfere = "N";
                            this.stoContratoDuplicar.trocaData = "S";
                            jQuery("#sto-contrato-duplicar-dialog").modal('show');
                        }
                        return [2 /*return*/];
                }
            });
        }); };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    StoContratoIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoesService.abrirFiltro) {
                    _this.service.filtro = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_8__["StoContratoFilter"]();
                    _this.service.filtro.filialId = _this.loginService.getLogin().filialId;
                    jQuery("#sto-contrato-filter-dialog").modal("show");
                }
                else {
                    _this.refresh();
                }
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'encContrato', func: function () { return _this.encContrato; } },
            { action: 'duplContrato', func: function () { return _this.duplContrato; } }
        ]);
    };
    StoContratoIndexComponent.prototype.create = function () {
        this.router.navigate([this.target + "/comercial/contratos/create"]);
    };
    StoContratoIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.filtro.filialId = this.loginService.getLogin().filialId;
        this.service.getByContrato(this.service.filtro).subscribe(function (resp) {
            var columns = [
                _this.datatablesService.getDataString("numContrato", "contrato"),
                _this.datatablesService.getDataDateTime("dtEmissao", "emissao", "DD/MM/YYYY", "15%"),
                _this.datatablesService.getDataString("descrTipoContrato", "tipo"),
                _this.datatablesService.getDataString("fantasia", "cliente"),
                _this.datatablesService.getDataString("situacao", "situacao"),
                _this.datatablesService.getDataString("produto", "produto"),
                _this.datatablesService.getDataString("referencia", "referencia"),
            ];
            _this.datatablesService.datatable("dtStoContrato", columns, resp, function (aData) {
                _this.data = aData;
            }, 0, "asc");
        });
    };
    StoContratoIndexComponent.prototype.edit = function () {
        if (!!(this.data.regContrato)) {
            this.router.navigate([this.target + "/comercial/contratos/edit/" + this.data.regContrato]);
        }
    };
    StoContratoIndexComponent.prototype.filtrar = function () {
        jQuery("#sto-contrato-filter-dialog").modal("show");
    };
    StoContratoIndexComponent.prototype.executaFiltro = function (event) {
        jQuery("#sto-contrato-filter-dialog").modal("hide");
        this.refresh();
    };
    StoContratoIndexComponent.prototype.detail = function () {
        if (!!(this.data.regContrato)) {
            this.router.navigate([this.target + "/comercial/contratos/detail/" + this.data.regContrato]);
        }
    };
    StoContratoIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    StoContratoIndexComponent.prototype.print = function () {
        this.constantes.paramRelatorio = {
            filialId: this.loginService.getLogin().filialId,
            dataI: this.service.filtro.dataI,
            dataF: this.service.filtro.dataF,
            destinatarioIdCliente: this.funcoesService.isNotUndefinedOrNull(this.service.filtro.destinatarioIdCliente) ? this.service.filtro.destinatarioIdCliente : 0,
            sitReg: this.funcoesService.isNotUndefinedOrNull(this.service.filtro.sitReg) ? this.service.filtro.sitReg : "",
            ordem: this.funcoesService.isNotUndefinedOrNull(this.service.filtro.ordem) ? this.service.filtro.ordem : "",
        };
        _super.prototype.print.call(this);
    };
    StoContratoIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _sto_contrato_service__WEBPACK_IMPORTED_MODULE_10__["StoContratoService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_7__["LoginService"] }
    ]; };
    StoContratoIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-sto-contrato-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./sto-contrato-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/sto-contrato/sto-contrato-index/sto-contrato-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _sto_contrato_service__WEBPACK_IMPORTED_MODULE_10__["StoContratoService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_7__["LoginService"]])
    ], StoContratoIndexComponent);
    return StoContratoIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/comercial/sto-contrato/sto-contrato-item/sto-contrato-item.component.ts":
/*!***********************************************************************************************!*\
  !*** ./src/app/pages/comercial/sto-contrato/sto-contrato-item/sto-contrato-item.component.ts ***!
  \***********************************************************************************************/
/*! exports provided: StoContratoItemComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoContratoItemComponent", function() { return StoContratoItemComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__ = __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_4__ = __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_5__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../sto-contrato.model */ "./src/app/pages/comercial/sto-contrato/sto-contrato.model.ts");
/* harmony import */ var _sto_contrato_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../sto-contrato.service */ "./src/app/pages/comercial/sto-contrato/sto-contrato.service.ts");
/* harmony import */ var _cadastro_tipo_servico_tipo_servico_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../../../cadastro/tipo-servico/tipo-servico.service */ "./src/app/pages/cadastro/tipo-servico/tipo-servico.service.ts");
/* harmony import */ var _sto_contrato_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../sto-contrato.constants */ "./src/app/pages/comercial/sto-contrato/sto-contrato.constants.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
var __assign = (undefined && undefined.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
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 StoContratoItemComponent = /** @class */ (function () {
    function StoContratoItemComponent(messageService, funcoesService, destinatarioService, materialService, configuracao, tipoServicoService, service, permissoesUtils) {
        var _this = this;
        this.messageService = messageService;
        this.funcoesService = funcoesService;
        this.destinatarioService = destinatarioService;
        this.materialService = materialService;
        this.configuracao = configuracao;
        this.tipoServicoService = tipoServicoService;
        this.service = service;
        this.permissoesUtils = permissoesUtils;
        this.dataResult = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.response = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.dadosContratoAux = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContrato"]();
        this.dataAux = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemNavegaDto"]();
        this.data = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemNavegaDto"]();
        this.showAdd = false;
        this.actionForm = _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index;
        this.hasDados = false;
        this.mensagens = [];
        this.constantes = new _sto_contrato_constants__WEBPACK_IMPORTED_MODULE_12__["StoContratoConstants"]();
        this.isSet = true;
        this.tipoNota = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["TipoNota"]();
        this.tipoPreco = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["TipoPreco"]();
        this.tipoIssDest = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["TipoIssDest"]();
        this.tipoCofinsDes = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["TipoCofinsDest"]();
        this.tipoMetCalculo = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["TipoMetCalculo"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        this.tipoCobrPer = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["TipoCobrPer"]();
        this.tipoMetCalc = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["TipoMetCalc"]();
        this.tipoMetCalc1 = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["TipoMetCalcN2"]();
        this.tipoMetCalc2 = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["TipoMetCalcFundaf"]();
        this.tipoNota1 = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["TipoNotaFundaf"]();
        this.isTabDados = true;
        this.isTabItemSop = true;
        this.isTabItemTanque = true;
        this.isTabItemN2 = true;
        this.isTabItemFundaf = true;
        this.isTabItemMov = true;
        this.isTabItemExc = true;
        this.isTabItemAdic = true;
        this.isTabItemGir = true;
        this.isTabItemAdv = true;
        this.isQuantidM3 = false;
        this.isCamposSop = false;
        this.isCamposItemN2 = false;
        this.isCamposItemFundaf = false;
        this.isCamposItemMov = false;
        this.isCamposItemExc = false;
        this.isCamposItemAdic = false;
        this.isCamposItemGir = false;
        this.isCamposItemAdv = false;
        this.isMetCalculo = false;
        this.permiteAlterarDadosFatura = false;
        this.naoExibirTiposServicoIds = [2, 3, 4, 6, 15, 21, 22, 23];
        this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.servArm = _this.configuracao.string("CML", "ServArm");
                _this.decPreco = _this.configuracao.number("CML", "DecPreco");
            }
        };
    }
    StoContratoItemComponent.prototype.ngOnInit = function () {
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
        this.getTipoServico();
        this.validaPermissoes();
    };
    StoContratoItemComponent.prototype.getTipoServico = function () {
        var _this = this;
        this.tipoServicoService.get().subscribe(function (result) {
            _this.$tipoServico = result
                .filter(function (item) { return !_this.naoExibirTiposServicoIds.includes(item.tipoServicoId); })
                .sort(function (a, b) { return a.descrTipoServico.localeCompare(b.descrTipoServico); });
        });
    };
    StoContratoItemComponent.prototype.ngDoCheck = function () {
        this.hasDados =
            this.dados && this.dados.length > 0 &&
                this.dados.filter(function (v) {
                    if (v["sitReg"] !== "E") {
                        return true;
                    }
                    return false;
                }).length > 0;
        if (!this.isDoCheck) {
            if (this.dados) {
                for (var i = 1; i <= this.dados.length; i++) {
                    this.dados[i - 1]["sequencia"] = i;
                }
                this.isDoCheck = true;
            }
        }
    };
    StoContratoItemComponent.prototype.create = function () {
        var _this = this;
        this.response.emit(false);
        if ((this.dadosContrato.numContrato.toString().trim() === "0") || (this.dadosContrato.numContrato.toString().trim() === "")) {
            this.messageService.warning("titles.stoContrato", "messages.numContratoNaoInformado");
            return;
        }
        if (this.dadosContrato.destinatarioIdCliente > 0) {
            this.showAdd = true;
            this.actionForm = _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create;
            this.moeda = this.configuracao.lerConfig("UNI", "MoedaPadrao");
            if (this.funcoesService.isNotUndefinedOrNull(this.moeda)) {
                this.data.moedaId = +this.moeda;
            }
            this.data = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemNavegaDto"]();
            this.data.itensSop = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            this.data.itensSop.flagIssDest = "N";
            this.data.itensSop.flagCofinsDest = "N";
            this.data.itensSop.metCalculo = "T";
            this.data.itensSop.operacaoId = this.data.operacaoId;
            this.data.itensSop.condPagId = this.data.condPagId;
            this.data.itensSop.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensSop.tipoPreco = "U";
            this.data.itensN2 = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            this.data.itensN2.flagIssDest = "N";
            this.data.itensN2.flagCofinsDest = "N";
            this.data.itensN2.metCalculo = "Q";
            this.data.itensN2.operacaoId = this.data.operacaoId;
            this.data.itensN2.condPagId = this.data.condPagId;
            this.data.itensN2.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensN2.tipoPreco = "U";
            this.data.itensFundaf = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            this.data.itensFundaf.flagIssDest = "N";
            this.data.itensFundaf.flagCofinsDest = "N";
            this.data.itensFundaf.metCalculo = "C";
            this.data.itensFundaf.tipoNota = "N";
            this.data.itensFundaf.tipoPreco = "U";
            this.data.itensFundaf.operacaoId = this.data.operacaoId;
            this.data.itensFundaf.condPagId = this.data.condPagId;
            this.data.itensFundaf.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensFundaf.flagPer = this.data.itensFundaf.metCalculo === "C" ? "S" : "N";
            this.data.itensMov = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            this.data.itensMov.flagIssDest = "N";
            this.data.itensMov.flagCofinsDest = "N";
            this.data.itensMov.operacaoId = this.data.operacaoId;
            this.data.itensMov.condPagId = this.data.condPagId;
            this.data.itensMov.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensMov.tipoPreco = "U";
            this.data.itensExc = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            this.data.itensExc.flagIssDest = "N";
            this.data.itensExc.flagCofinsDest = "N";
            this.data.itensExc.operacaoId = this.data.operacaoId;
            this.data.itensExc.condPagId = this.data.condPagId;
            this.data.itensExc.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensExc.tipoPreco = "U";
            this.data.itensAdic = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            this.data.itensAdic.flagIssDest = "N";
            this.data.itensAdic.flagCofinsDest = "N";
            this.data.itensAdic.operacaoId = this.data.operacaoId;
            this.data.itensAdic.condPagId = this.data.condPagId;
            this.data.itensAdic.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensAdic.tipoPreco = "U";
            this.data.itensGir = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            this.data.itensGir.flagIssDest = "N";
            this.data.itensGir.flagCofinsDest = "N";
            this.data.itensGir.operacaoId = this.data.operacaoId;
            this.data.itensGir.condPagId = this.data.condPagId;
            this.data.itensGir.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensGir.tipoPreco = "U";
            this.data.itensAdval = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            this.data.itensAdval.flagIssDest = "N";
            this.data.itensAdval.flagCofinsDest = "N";
            this.data.tipoNota = "N";
            this.data.itensAdval.operacaoId = this.data.operacaoId;
            this.data.itensAdval.condPagId = this.data.condPagId;
            this.data.itensAdval.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensAdval.tipoPreco = "U";
            this.oper = this.configuracao.lerConfig("CML", "Operacao");
            if (this.funcoesService.isNotUndefinedOrNull(this.oper)) {
                this.data.operacaoId = +this.oper;
                this.data.destinatarioIdCliente = this.dadosContrato.destinatarioIdCliente;
            }
            this.destinatarioService.getById(this.data.destinatarioIdCliente).subscribe(function (ret) {
                _this.data.cliente = ret;
            });
            this.visualizarAbas();
        }
        else {
            this.messageService.warning("titles.stoContrato", "messages.clienteNaoInformado");
            return;
        }
    };
    StoContratoItemComponent.prototype.edit = function () {
        this.showAdd = true;
        this.actionForm = _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit;
        this.data = this.dataAux;
        this.response.emit(false);
        this.visualizarAbas();
        this.setVlrImpostos();
        this.atualizaCamposAbas();
    };
    StoContratoItemComponent.prototype.detail = function () {
        this.showAdd = true;
        this.actionForm = _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail;
        this.data = this.dataAux;
        this.response.emit(false);
        this.visualizarAbas();
        this.setVlrImpostos();
        this.atualizaCamposAbas();
    };
    StoContratoItemComponent.prototype.atualizaCamposAbas = function () {
        if (this.funcoesService.isCreate(this.actionForm)) {
            this.data.itensSop.operacaoId = this.data.operacaoId;
            this.data.itensSop.condPagId = this.data.condPagId;
            this.data.itensSop.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensN2.operacaoId = this.data.operacaoId;
            this.data.itensN2.condPagId = this.data.condPagId;
            this.data.itensN2.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensFundaf.operacaoId = this.data.operacaoId;
            this.data.itensFundaf.condPagId = this.data.condPagId;
            this.data.itensFundaf.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensMov.operacaoId = this.data.operacaoId;
            this.data.itensMov.condPagId = this.data.condPagId;
            this.data.itensMov.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensExc.operacaoId = this.data.operacaoId;
            this.data.itensExc.condPagId = this.data.condPagId;
            this.data.itensExc.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensAdic.operacaoId = this.data.operacaoId;
            this.data.itensAdic.condPagId = this.data.condPagId;
            this.data.itensAdic.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensGir.operacaoId = this.data.operacaoId;
            this.data.itensGir.condPagId = this.data.condPagId;
            this.data.itensGir.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
            this.data.itensAdval.operacaoId = this.data.operacaoId;
            this.data.itensAdval.condPagId = this.data.condPagId;
            this.data.itensAdval.moedaId = this.funcoesService.isUndefinedOrNull(this.data.moedaId) ? 1 : this.data.moedaId;
        }
    };
    StoContratoItemComponent.prototype.setVlrImpostos = function () {
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensSop.flagIssDest)) {
            this.data.itensSop.flagIssDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensSop.flagCofinsDest)) {
            this.data.itensSop.flagCofinsDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensN2.flagIssDest)) {
            this.data.itensN2.flagIssDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensN2.flagCofinsDest)) {
            this.data.itensN2.flagCofinsDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensFundaf.flagIssDest)) {
            this.data.itensFundaf.flagIssDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensFundaf.flagCofinsDest)) {
            this.data.itensFundaf.flagCofinsDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensMov.flagIssDest)) {
            this.data.itensMov.flagIssDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensMov.flagCofinsDest)) {
            this.data.itensMov.flagCofinsDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensExc.flagIssDest)) {
            this.data.itensExc.flagIssDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensExc.flagCofinsDest)) {
            this.data.itensExc.flagCofinsDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensAdic.flagIssDest)) {
            this.data.itensAdic.flagIssDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensAdic.flagCofinsDest)) {
            this.data.itensAdic.flagCofinsDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensGir.flagIssDest)) {
            this.data.itensGir.flagIssDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensGir.flagCofinsDest)) {
            this.data.itensGir.flagCofinsDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensAdval.flagIssDest)) {
            this.data.itensAdval.flagIssDest = "N";
        }
        if (!this.funcoesService.isNotUndefinedOrNull(this.data.itensAdval.flagCofinsDest)) {
            this.data.itensAdval.flagCofinsDest = "N";
        }
    };
    StoContratoItemComponent.prototype.back = function () {
        this.response.emit(true);
        this.showAdd = false;
        this.actionForm = _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index;
    };
    StoContratoItemComponent.prototype._remove = function () {
        return __awaiter(this, void 0, void 0, function () {
            var obj, result;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.data = Object.assign({}, this.dataAux);
                        if (!this.funcoesService.isNotUndefinedOrNull(this.data)) return [3 /*break*/, 2];
                        obj = {
                            id: this.data.stoContratoId,
                            item: this.data.stoContratoItemId
                        };
                        return [4 /*yield*/, this.executePromiseValidaExclusaoItem(obj)];
                    case 1:
                        result = _a.sent();
                        if (result) {
                            this.messageService.warning("titles.stoContrato", "messages.contratoComItemFaturadoExclusaoNaoPermitida");
                            return [2 /*return*/];
                        }
                        this.remove();
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    StoContratoItemComponent.prototype.executePromiseValidaExclusaoItem = function (obj) {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.service.validaExclusaoItem(obj).subscribe(function (result) {
                resolve(result);
            });
        });
        return promise;
    };
    StoContratoItemComponent.prototype.remove = function () {
        var _this = this;
        this.data = Object.assign({}, this.dataAux);
        if (!this.funcoesService.isUndefinedOrNull(this.data.sequencia)) {
            this.messageService.removeConfirm(function () {
                var i = _this.dados.findIndex(function (x) { return x.sequencia === _this.data.sequencia; });
                _this.data["sitReg"] = "E";
                _this.dados[i] = _this.data;
                _this.isSet = true;
            });
        }
    };
    StoContratoItemComponent.prototype.onSubmit = function (form) {
        return __awaiter(this, void 0, void 0, function () {
            var confirmation, currentDate, index, ultimoItem;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formError").emit(form);
                        if (form.invalid) {
                            this.funcoesService.backToTop();
                            return [2 /*return*/];
                        }
                        this.data.servico = this.data.material.fantasia;
                        this.data.descrTipoServico = this.data.material.fantasia;
                        this.data.descrBloq = this.data.descrBloq === "S" ? "Sim" : "Não";
                        if (!(this.data.tipoServicoId == 1)) return [3 /*break*/, 2];
                        this.validTanque = this.configuracao.lerConfig("CML", "TanqueNoContr") === "S";
                        this.ttlTanque = this.funcoesService.isNotUndefinedOrNull(this.data.tanques) ? this.data.tanques.length : 0;
                        if (this.validTanque && !(this.ttlTanque > 0)) {
                            this.messageService.error("titles.stoContrato", "messages.tanqueNoContr");
                            return [2 /*return*/];
                        }
                        this.obrgDias = this.configuracao.lerConfig("CML", "TipoValCml") === "1";
                        if (this.obrgDias && this.data.flagEncFin === 'S' && !(this.data.dias > 0)) {
                            this.messageService.error("titles.stoContrato", "messages.tipoValCml");
                            return [2 /*return*/];
                        }
                        if (!!this.funcoesService.isPositive(this.data.quantidM3)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.showConfirmation("titles.stoContrato", "messages.quantidadeM3NaoInformada")];
                    case 1:
                        confirmation = _a.sent();
                        if (!confirmation)
                            return [2 /*return*/];
                        _a.label = 2;
                    case 2:
                        this.obrgDias = this.configuracao.lerConfig("CML", "TipoValCml") === "1";
                        currentDate = new Date();
                        currentDate.setDate(currentDate.getDate() - 30);
                        if (this.obrgDias && this.data.dtInicio < currentDate) {
                            this.messageService.error("titles.stoContrato", "messages.dtInicioSuperiorTrintaDias");
                            return [2 /*return*/];
                        }
                        this.data.logRotina = "Manutenção de Itens do Contrato";
                        if (!Array.isArray(this.dados)) {
                            this.dados = [];
                        }
                        index = -1;
                        if (this.data.sequencia && this.data.sequencia > 0) {
                            index = this.dados.findIndex(function (x) { return Number(x.sequencia) === Number(_this.data.sequencia); });
                        }
                        else if (this.data.stoContratoItemId) {
                            index = this.dados.findIndex(function (x) { return Number(x.stoContratoItemId) === Number(_this.data.stoContratoItemId); });
                        }
                        if (index !== -1) {
                            this.dados[index] = __assign({}, this.data);
                        }
                        else {
                            this.setSequencia();
                            ultimoItem = this.dados.length > 0 ? Math.max.apply(Math, this.dados.map(function (x) { return Number(x.stoContratoItemId) || 0; })) : 0;
                            this.data.stoContratoItemId = ultimoItem + 1;
                            this.dados.push(__assign({}, this.data));
                        }
                        this.data = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemNavegaDto"]();
                        this.response.emit(true);
                        this.dataResult.emit(this.dados);
                        this.back();
                        return [2 /*return*/];
                }
            });
        });
    };
    StoContratoItemComponent.prototype.setSequencia = function () {
        if (this.funcoesService.isUndefinedOrNull(this.data.stoContratoId) || this.data.stoContratoId === 0) {
            var s = this.dados ? this.dados.length : 0;
            this.data.sequencia = s + 1;
        }
        else {
            this.data.sequencia = this.data.sequencia;
        }
    };
    StoContratoItemComponent.prototype.visualizarAbas = function (comboTipoServico) {
        var _this = this;
        if (comboTipoServico === void 0) { comboTipoServico = false; }
        if (!this.funcoesService.isDetail(this.actionForm)) {
            if (this.data.tipoServicoId == 1 && comboTipoServico) {
                this.data.materialId = this.servArm;
                if (this.funcoesService.isNotUndefinedOrNull(this.data.materialId)) {
                    this.materialService.getById(this.data.materialId).subscribe(function (ret) {
                        _this.data.material = ret;
                        _this.data.descrResumo = _this.data.material.fantasia;
                        _this.data.especificacao = ret.especificacao;
                        _this.unidadeId = ret.unidade;
                        _this.data.unidadeId = _this.unidadeId;
                        _this.data.itensSop.unidadeId = _this.unidadeId;
                    });
                }
            }
            else if (comboTipoServico) {
                this.data.descrResumo = "";
                this.data.especificacao = "";
                this.data.materialId = "";
                this.data.material = new _cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_7__["Material"]();
            }
        }
        this.isTabItemTanque = this.mostraAba(1);
        this.isTabItemSop = this.mostraAba(2);
        this.isTabItemN2 = this.mostraAba(3);
        this.isTabItemFundaf = this.mostraAba(4);
        this.isTabItemMov = this.mostraAba(5);
        this.isTabItemExc = this.mostraAba(6);
        this.isTabItemAdic = this.mostraAba(7);
        this.isTabItemGir = this.mostraAba(8);
        this.isTabItemAdv = this.mostraAba(9);
        this.isQuantidM3 = this.data.tipoServicoId == 1 ? true : false;
        this.obrigaCampos();
        this.obrgDias = this.configuracao.lerConfig("CML", "TipoValCml") === "1" ? true : false;
        this.obrgPeriodo = this.configuracao.lerConfig("CML", "Faturamentoflexivel") === "S" ? true : false;
    };
    StoContratoItemComponent.prototype.mostraAba = function (aba) {
        if (aba === 0) {
            this.isTabDados = this.configuracao.lerConfig("CML", "CtrPerAdic") === "S" ? true : false;
        }
        else {
            this.isTabDados = this.data.tipoServicoId == '1' ? true : false;
            if (this.isTabDados) {
                switch (aba) {
                    case 1: {
                        // Aba Tanques
                        this.isTabDados = this.configuracao.lerConfig("CML", "TanqueNoContr") === "S" ? true : false;
                        break;
                    }
                    case 2: {
                        // Aba SOP
                        this.isTabDados = this.configuracao.lerConfig("CML", "MostraTsSop") === "S" ? true : false;
                        break;
                    }
                    case 3: {
                        // Aba N2
                        this.isTabDados = this.configuracao.lerConfig("CML", "MostraTsN2") === "S" ? true : false;
                        break;
                    }
                    case 4: {
                        // Aba Fundaf
                        this.isTabDados = this.configuracao.lerConfig("CML", "MostraTsFund") === "S" ? true : false;
                        break;
                    }
                    case 5: {
                        // Aba Movimentacao
                        this.isTabDados = this.configuracao.lerConfig("CML", "MostraTsMov") === "S" ? true : false;
                        break;
                    }
                    case 6: {
                        // Aba Excedente
                        this.isTabDados = this.configuracao.lerConfig("CML", "MostraTsExc") === "S" ? true : false;
                        break;
                    }
                    case 7: {
                        // Aba Arm. Adicional
                        this.isTabDados = this.configuracao.lerConfig("CML", "MostraTsAdic") === "S" ? true : false;
                        break;
                    }
                    case 8: {
                        // Aba 2 Giro
                        this.isTabDados = this.configuracao.lerConfig("CML", "MostraTsGir") === "S" ? true : false;
                        break;
                    }
                    case 9: {
                        // Aba Seguro
                        this.isTabDados = this.configuracao.lerConfig("CML", "MostraTsAdv") === "S" ? true : false;
                        break;
                    }
                    default: {
                        break;
                    }
                }
            }
        }
        return this.isTabDados;
    };
    StoContratoItemComponent.prototype.bloquearMov = function () {
        var _this = this;
        this.data = this.dataAux;
        if (this.data.descrBloq === "Sim") {
            this.messageService.confirm("titles.bloqMovProduto", "messages.confEstBloqMovimentacao", null, function () {
                _this.data.descrBloq = "Não";
                var obj = {
                    id: _this.data.stoContratoId,
                    bloqMov: "N",
                    item: _this.data.stoContratoItemId
                };
                _this.service.bloqueaMovimentacao(obj).subscribe(function (result1) {
                    _this.mensagens = _this.messageService.validationResult(result1.validationResult);
                    if (!result1.validationResult.isValid) {
                        _this.messageService.warning("titles.stoContrato", _this.mensagens[0]);
                    }
                    else {
                        _this.messageService.success("titles.stoContrato", "messages.estornoBloqueioItemRealizado");
                    }
                });
            }, false);
        }
        else {
            this.messageService.confirm("titles.bloqMovProduto", "messages.confBloqMovimentacao", null, function () {
                _this.data.descrBloq = "Sim";
                var obj = {
                    id: _this.data.stoContratoId,
                    bloqMov: "S",
                    item: _this.data.stoContratoItemId
                };
                _this.service.bloqueaMovimentacao(obj).subscribe(function (result1) {
                    _this.mensagens = _this.messageService.validationResult(result1.validationResult);
                    if (!result1.validationResult.isValid) {
                        _this.messageService.warning("titles.stoContrato", _this.mensagens[0]);
                    }
                    else {
                        _this.messageService.success("titles.stoContrato", "messages.bloqueioItemRealizado");
                    }
                });
            }, false);
        }
    };
    StoContratoItemComponent.prototype.encerraContrato = function () {
        var _this = this;
        this.data = this.dataAux;
        if (this.data.sitReg === "E") {
            this.messageService.confirm("titles.encItemContrato", "messages.confEstItemContrato", null, function () {
                _this.data.sitReg = "A";
                var obj = {
                    id: _this.data.stoContratoId,
                    sitReg: "A",
                    item: _this.data.stoContratoItemId
                };
                _this.service.encerraContrato(obj).subscribe(function (result1) {
                    _this.mensagens = _this.messageService.validationResult(result1.validationResult);
                    if (!result1.validationResult.isValid) {
                        _this.messageService.warning("titles.stoContrato", _this.mensagens[0]);
                    }
                    else {
                        _this.messageService.success("titles.stoContrato", "messages.estornoItemRealizado");
                    }
                });
            }, false);
        }
        else {
            this.messageService.confirm("titles.encItemContrato", "messages.confEncItemContrato", null, function () {
                _this.data.sitReg = "E";
                var obj = {
                    id: _this.data.stoContratoId,
                    sitReg: "E",
                    item: _this.data.stoContratoItemId
                };
                _this.service.encerraContrato(obj).subscribe(function (result1) {
                    _this.mensagens = _this.messageService.validationResult(result1.validationResult);
                    if (!result1.validationResult.isValid) {
                        _this.messageService.warning("titles.stoContrato", _this.mensagens[0]);
                    }
                    else {
                        _this.messageService.success("titles.stoContrato", "messages.encerramentoItemRealizado");
                    }
                });
            }, false);
        }
    };
    StoContratoItemComponent.prototype.rowSelect = function (item) {
        this.dataAux = item;
        if (this.funcoesService.isNotUndefinedOrNull(this.dataAux)) {
            this.isSet = false;
        }
    };
    StoContratoItemComponent.prototype.refreshTanques = function (event) {
        this.data.tanques = event;
    };
    StoContratoItemComponent.prototype.validaSop = function () {
        if (this.data.flagSOP === "S") {
            this.servSop = this.configuracao.lerConfig("CML", "ServSop");
            if (!this.funcoesService.isNotUndefinedOrNull(this.servSop)) {
                this.messageService.error("titles.stoContrato", "messages.servSop");
                this.data.flagSOP = "N";
                this.data.itensSop = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            }
            else {
                this.data.itensSop.stoContratoId = this.data.stoContratoId;
                this.data.itensSop.filialId = this.dadosContrato.filialId;
                this.data.itensSop.sitReg = "A";
                this.data.itensSop.tipoServicoId = 3;
                this.data.itensSop.materialId = this.servSop;
                this.data.itensSop.destinatarioIdCliente = this.data.destinatarioIdCliente;
                this.data.itensSop.especificacao = "SOP";
                this.data.itensSop.descrResumo = "SOP " + this.data.descrResumo.toString().substring(0, 70);
                this.data.itensSop.quantidPer = 9999;
                this.data.itensSop.tipoPreco = "U";
                this.data.itensSop.flagPer = "N";
            }
        }
        else {
            this.data.itensSop.sitReg = "C";
        }
    };
    StoContratoItemComponent.prototype.validaN2 = function () {
        var _this = this;
        if (this.data.flagN2 === "S") {
            this.servN2 = this.configuracao.lerConfig("CML", "ServN2");
            if (!this.funcoesService.isNotUndefinedOrNull(this.servN2)) {
                this.messageService.error("titles.stoContrato", "messages.servN2");
                this.data.flagN2 = "N";
                this.data.itensN2 = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            }
            else {
                this.materialService.getById(this.servN2).subscribe(function (ret) {
                    _this.data.itensFundaf.unidadeId = ret.unidade;
                });
                this.data.itensN2.stoContratoId = this.data.stoContratoId;
                this.data.itensN2.filialId = this.dadosContrato.filialId;
                this.data.itensN2.sitReg = "A";
                this.data.itensN2.tipoServicoId = 2;
                this.data.itensN2.materialId = this.servN2;
                this.data.itensN2.destinatarioIdCliente = this.data.destinatarioIdCliente;
                this.data.itensN2.especificacao = "N2";
                this.data.itensN2.descrResumo = "N2 " + this.data.descrResumo.toString().substring(0, 70);
                this.data.itensN2.quantidPer = this.data.itensN2.metCalculo !== "P" ? 9999 : 0;
                this.data.itensN2.tipoPreco = "U";
                this.data.itensN2.flagPer = "S";
            }
        }
        else {
            this.data.itensN2.sitReg = "C";
        }
    };
    StoContratoItemComponent.prototype.validaFundaf = function () {
        var _this = this;
        if (this.data.flagFundaf === "S") {
            this.servFundaf = this.configuracao.lerConfig("CML", "ServFundaf");
            if (!this.funcoesService.isNotUndefinedOrNull(this.servFundaf)) {
                this.messageService.error("titles.stoContrato", "messages.servFundaf");
                this.data.flagFundaf = "N";
                this.data.itensFundaf = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            }
            else {
                this.materialService.getById(this.servFundaf).subscribe(function (ret) {
                    _this.data.itensFundaf.unidadeId = ret.unidade;
                });
                this.data.itensFundaf.stoContratoId = this.data.stoContratoId;
                this.data.itensFundaf.filialId = this.dadosContrato.filialId;
                this.data.itensFundaf.sitReg = "A";
                this.data.itensFundaf.tipoServicoId = 4;
                this.data.itensFundaf.materialId = this.servFundaf;
                this.data.itensFundaf.destinatarioIdCliente = this.data.destinatarioIdCliente;
                this.data.itensFundaf.especificacao = "Fundaf";
                this.data.itensFundaf.descrResumo = "Fundaf " + this.data.descrResumo.toString().substring(0, 70);
            }
        }
        else {
            this.data.itensFundaf.sitReg = "C";
        }
    };
    StoContratoItemComponent.prototype.validaMov = function () {
        var _this = this;
        if (this.data.flagMov === "S") {
            this.servMov = this.configuracao.lerConfig("CML", "ServMov");
            if (!this.funcoesService.isNotUndefinedOrNull(this.servMov)) {
                this.messageService.error("titles.stoContrato", "messages.servMov");
                this.data.flagMov = "N";
                this.data.itensMov = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            }
            else {
                this.materialService.getById(this.servMov).subscribe(function (ret) {
                    _this.data.itensMov.unidadeId = ret.unidade;
                });
                this.data.itensMov.stoContratoId = this.data.stoContratoId;
                this.data.itensMov.filialId = this.dadosContrato.filialId;
                this.data.itensMov.sitReg = "A";
                this.data.itensMov.tipoServicoId = 15;
                this.data.itensMov.materialId = this.servMov;
                this.data.itensMov.destinatarioIdCliente = this.data.destinatarioIdCliente;
                this.data.itensMov.especificacao = "Movimentação";
                this.data.itensMov.descrResumo = "Movimentação " + this.data.descrResumo.toString().substring(0, 70);
                this.data.itensMov.quantidPer = 9999;
                this.data.itensMov.tipoPreco = "U";
                this.data.itensMov.flagPer = this.configuracao.lerConfig("CML", "TipoValCml") === "7" ? "S" : "N";
                this.data.itensMov.tipoCobrPer = "F";
            }
        }
        else {
            this.data.itensMov.sitReg = "C";
        }
    };
    StoContratoItemComponent.prototype.validaExc = function () {
        var _this = this;
        if (this.data.flagExc === "S") {
            this.servExc = this.configuracao.lerConfig("CML", "ServArmEX");
            if (!this.funcoesService.isNotUndefinedOrNull(this.servExc)) {
                this.messageService.error("titles.stoContrato", "messages.servExc");
                this.data.flagExc = "N";
                this.data.itensExc = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            }
            else {
                this.materialService.getById(this.servExc).subscribe(function (ret) {
                    _this.data.itensExc.unidadeId = ret.unidade;
                });
                this.data.itensExc.stoContratoId = this.data.stoContratoId;
                this.data.itensExc.filialId = this.dadosContrato.filialId;
                this.data.itensExc.sitReg = "A";
                this.data.itensExc.tipoServicoId = 21;
                this.data.itensExc.materialId = this.servExc;
                this.data.itensExc.destinatarioIdCliente = this.data.destinatarioIdCliente;
                this.data.itensExc.especificacao = "Excedente";
                this.data.itensExc.descrResumo = "Excedente " + this.data.descrResumo.toString().substring(0, 70);
                this.data.itensExc.tipoPreco = "U";
                this.data.itensExc.flagPer = "S";
            }
        }
        else {
            this.data.itensExc.sitReg = "C";
        }
    };
    StoContratoItemComponent.prototype.validaAdic = function () {
        var _this = this;
        if (this.data.flagAdic === "S") {
            this.servAdic = this.configuracao.lerConfig("CML", "ServArmAdic");
            if (!this.funcoesService.isNotUndefinedOrNull(this.servAdic)) {
                this.messageService.error("titles.stoContrato", "messages.servAdic");
                this.data.flagExc = "N";
                this.data.itensAdic = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            }
            else {
                this.materialService.getById(this.servAdic).subscribe(function (ret) {
                    _this.data.itensAdic.unidadeId = ret.unidade;
                });
                this.data.itensAdic.stoContratoId = this.data.stoContratoId;
                this.data.itensAdic.filialId = this.dadosContrato.filialId;
                this.data.itensAdic.sitReg = "A";
                this.data.itensAdic.tipoServicoId = 22;
                this.data.itensAdic.materialId = this.servAdic;
                this.data.itensAdic.destinatarioIdCliente = this.data.destinatarioIdCliente;
                this.data.itensAdic.especificacao = "Arm Adicional";
                this.data.itensAdic.descrResumo = "Arm Adicional " + this.data.descrResumo.toString().substring(0, 70);
            }
        }
        else {
            this.data.itensAdic.sitReg = "C";
        }
    };
    StoContratoItemComponent.prototype.validaGir = function () {
        var _this = this;
        if (this.data.flagGir === "S") {
            this.servGir = this.configuracao.lerConfig("CML", "Serv2Giro");
            if (!this.funcoesService.isNotUndefinedOrNull(this.servGir)) {
                this.messageService.error("titles.stoContrato", "messages.servGir");
                this.data.flagGir = "N";
                this.data.itensGir = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            }
            else {
                this.materialService.getById(this.servGir).subscribe(function (ret) {
                    _this.data.itensGir.unidadeId = ret.unidade;
                });
                this.data.itensGir.stoContratoId = this.data.stoContratoId;
                this.data.itensGir.filialId = this.dadosContrato.filialId;
                this.data.itensGir.sitReg = "A";
                this.data.itensGir.tipoServicoId = 23;
                this.data.itensGir.materialId = this.servGir;
                this.data.itensGir.destinatarioIdCliente = this.data.destinatarioIdCliente;
                this.data.itensGir.especificacao = "2 Giro'";
                this.data.itensGir.descrResumo = "2 Giro " + this.data.descrResumo.toString().substring(0, 70);
                this.data.itensGir.tipoPreco = "U";
                this.data.itensGir.quantidPer = 9999;
            }
        }
        else {
            this.data.itensGir.sitReg = "C";
        }
    };
    StoContratoItemComponent.prototype.validaAdval = function () {
        var _this = this;
        if (this.data.flagAdv === "S") {
            this.servAdval = this.configuracao.lerConfig("CML", "ServAdval");
            if (!this.funcoesService.isNotUndefinedOrNull(this.servAdval)) {
                this.messageService.error("titles.stoContrato", "messages.servAdval");
                this.data.flagAdv = "N";
                this.data.itensAdval = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContratoItemDto"]();
            }
            else {
                this.materialService.getById(this.servAdval).subscribe(function (ret) {
                    _this.data.itensAdval.unidadeId = ret.unidade;
                });
                this.data.itensAdval.stoContratoId = this.data.stoContratoId;
                this.data.itensAdval.filialId = this.dadosContrato.filialId;
                this.data.itensAdval.sitReg = "A";
                this.data.itensAdval.tipoServicoId = 6;
                this.data.itensAdval.materialId = this.servAdval;
                this.data.itensAdval.destinatarioIdCliente = this.data.destinatarioIdCliente;
                this.data.itensAdval.especificacao = "Seguro'";
                this.data.itensAdval.descrResumo = "Seguro " + this.data.descrResumo.toString().substring(0, 70);
                this.data.itensAdval.tipoPreco = "U";
                this.data.itensAdval.quantidPer = 9999;
                this.data.itensAdval.altPeriodoFat = "N";
                this.data.itensAdval.flagPer = "S";
            }
        }
        else {
            this.data.itensAdval.sitReg = "C";
        }
    };
    StoContratoItemComponent.prototype.faturamentoflexivel = function () {
        this.fatFlexivel = this.configuracao.lerConfig("CML", "Faturamentoflexivel") === "S" ? 63 : 0;
        return this.fatFlexivel;
    };
    StoContratoItemComponent.prototype.validaDtInicio = function () {
        this.obrgDias = this.configuracao.lerConfig("CML", "TipoValCml") === "1" ? true : false;
        var currentDate = new Date();
        currentDate.setDate(currentDate.getDate() - 30);
        if ((this.obrgDias) && (this.data.dtInicio < currentDate)) {
            this.messageService.error("titles.stoContrato", "messages.dtInicioSuperiorTrintaDias");
            return;
        }
    };
    StoContratoItemComponent.prototype.atualizaQuantidPer = function () {
        this.data.itensN2.quantidPer = this.data.itensN2.metCalculo !== "P" ? 9999 : 0;
    };
    StoContratoItemComponent.prototype.obrigaCampos = function () {
        this.isCamposSop = this.data.flagSOP === "S" ? true : false;
        this.isCamposItemN2 = this.data.flagN2 === "S" ? true : false;
        this.isCamposItemFundaf = this.data.flagFundaf === "S" ? true : false;
        this.isCamposItemMov = this.data.flagMov === "S" ? true : false;
        this.isCamposItemExc = this.data.flagExc === "S" ? true : false;
        this.isCamposItemAdic = this.data.flagAdic === "S" ? true : false;
        this.isCamposItemGir = this.data.flagGir === "S" ? true : false;
        this.isCamposItemAdv = this.data.flagAdv === "S" ? true : false;
        this.isMetCalculo = this.configuracao.lerConfig("CML", "TipoValCml") === "6" ? true : false;
        this.data.itensFundaf.tipoPreco = this.funcoesService.isUndefinedOrNull(this.data.itensFundaf.tipoPreco) ? "U" : this.data.itensFundaf.tipoPreco;
        this.data.itensFundaf.moedaId = this.funcoesService.isUndefinedOrNull(this.data.itensFundaf.moedaId) ? 1 : this.data.itensFundaf.moedaId;
        this.data.itensFundaf.tipoNota = this.funcoesService.isUndefinedOrNull(this.data.itensFundaf.tipoNota) ? "N" : this.data.itensFundaf.tipoNota;
        this.data.itensN2.tipoPreco = this.funcoesService.isUndefinedOrNull(this.data.itensN2.tipoPreco) ? "U" : this.data.itensN2.tipoPreco;
    };
    StoContratoItemComponent.prototype.outMaterial = function (event) {
        var _this = this;
        if (!event) {
            return;
        }
        this.data.descrResumo = event.fantasia;
        this.data.material = event;
        this.materialService.getById(event.materialId).subscribe(function (resp) {
            if (resp) {
                _this.data.especificacao = resp.especificacao;
                _this.data.unidadeId = resp.unidade;
                _this.unidadeId = resp.unidade;
            }
        });
    };
    StoContratoItemComponent.prototype.trataFantasia = function (stoContratoItemFantasia) {
        this.data.materialIdFantasia = stoContratoItemFantasia.itemId;
    };
    StoContratoItemComponent.prototype.requiredcodPeriodo2 = function () {
        if (this.data.quantidPer2 > 0) {
            return true;
        }
        else {
            return false;
        }
    };
    StoContratoItemComponent.prototype.requiredcodPeriodo3 = function () {
        if (this.data.quantidPer3 > 0) {
            return true;
        }
        else {
            return false;
        }
    };
    StoContratoItemComponent.prototype.requiredcodPeriodo4 = function () {
        if (this.data.quantidPer4 > 0) {
            return true;
        }
        else {
            return false;
        }
    };
    StoContratoItemComponent.prototype.requiredcodPeriodo5 = function () {
        if (this.data.quantidPer5 > 0) {
            return true;
        }
        else {
            return false;
        }
    };
    StoContratoItemComponent.prototype.requiredcodPeriodo6 = function () {
        if (this.data.quantidPer6 > 0) {
            return true;
        }
        else {
            return false;
        }
    };
    StoContratoItemComponent.prototype.validaPermissoes = function () {
        var _this = this;
        this.permissoesUtils.validRotina(this.constantes.sisFormularioId, 8, function () { return _this.permiteAlterarDadosFatura = true; }, function () { return _this.permiteAlterarDadosFatura = false; });
    };
    Object.defineProperty(StoContratoItemComponent.prototype, "disabledDadosFatura", {
        get: function () {
            return this.funcoesService.isDetail(this.actionForm)
                || !this.permiteAlterarDadosFatura;
        },
        enumerable: true,
        configurable: true
    });
    StoContratoItemComponent.prototype.showConfirmation = function (title, message) {
        var _this = this;
        return new Promise(function (resolve) {
            _this.messageService.confirm(title, message, null, function () { return resolve(true); }, false, function () { return resolve(false); });
        });
    };
    Object.defineProperty(StoContratoItemComponent.prototype, "decimalPreco", {
        get: function () {
            return this.decPreco;
        },
        enumerable: true,
        configurable: true
    });
    StoContratoItemComponent.ctorParameters = function () { return [
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"] },
        { type: _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_8__["MaterialService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__["ConfiguracaoFacade"] },
        { type: _cadastro_tipo_servico_tipo_servico_service__WEBPACK_IMPORTED_MODULE_11__["TipoServicoService"] },
        { type: _sto_contrato_service__WEBPACK_IMPORTED_MODULE_10__["StoContratoService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_13__["PermissoesUtilsService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _sto_contrato_model__WEBPACK_IMPORTED_MODULE_9__["StoContrato"])
    ], StoContratoItemComponent.prototype, "dadosContrato", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Array)
    ], StoContratoItemComponent.prototype, "dados", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], StoContratoItemComponent.prototype, "disabled", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], StoContratoItemComponent.prototype, "mostrarAba", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], StoContratoItemComponent.prototype, "botaoBloqMovProduto", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], StoContratoItemComponent.prototype, "botaoEncContrato", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], StoContratoItemComponent.prototype, "descrResumo", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], StoContratoItemComponent.prototype, "dataResult", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], StoContratoItemComponent.prototype, "response", void 0);
    StoContratoItemComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-sto-contrato-item",
            template: __importDefault(__webpack_require__(/*! raw-loader!./sto-contrato-item.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/sto-contrato/sto-contrato-item/sto-contrato-item.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"],
            _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_8__["MaterialService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__["ConfiguracaoFacade"],
            _cadastro_tipo_servico_tipo_servico_service__WEBPACK_IMPORTED_MODULE_11__["TipoServicoService"],
            _sto_contrato_service__WEBPACK_IMPORTED_MODULE_10__["StoContratoService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_13__["PermissoesUtilsService"]])
    ], StoContratoItemComponent);
    return StoContratoItemComponent;
}());



/***/ }),

/***/ "./src/app/pages/comercial/sto-contrato/sto-contrato-tanque/sto-contrato-tanque.component.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/comercial/sto-contrato/sto-contrato-tanque/sto-contrato-tanque.component.ts ***!
  \***************************************************************************************************/
/*! exports provided: StoContratoTanqueComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoContratoTanqueComponent", function() { return StoContratoTanqueComponent; });
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../login/login.service */ "./src/app/pages/login/login.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 _config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _sto_contrato_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../sto-contrato.model */ "./src/app/pages/comercial/sto-contrato/sto-contrato.model.ts");
/* harmony import */ var _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};








var StoContratoTanqueComponent = /** @class */ (function () {
    function StoContratoTanqueComponent(messageService, funcoesService, materialService, loginService) {
        this.messageService = messageService;
        this.funcoesService = funcoesService;
        this.materialService = materialService;
        this.loginService = loginService;
        this.dataResult = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.dataAux = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_6__["StoContratoTanque"]();
        this.data = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_6__["StoContratoTanque"]();
        this.showAdd = false;
        this.actionForm = _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index;
        this.hasDados = false;
    }
    StoContratoTanqueComponent.prototype.ngDoCheck = function () {
        this.hasDados =
            this.dados &&
                this.dados.length > 0 &&
                this.dados.filter(function (v) {
                    if (v["sitReg"] !== "E") {
                        return true;
                    }
                    return false;
                }).length > 0;
        if (!this.isDoCheck) {
            if (this.dados) {
                for (var i = 1; i <= this.dados.length; i++) {
                    this.dados[i - 1]["sequencia"] = i;
                }
                this.isDoCheck = true;
            }
        }
    };
    StoContratoTanqueComponent.prototype.create = function () {
        this.showAdd = true;
        this.actionForm = _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create;
        this.data = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_6__["StoContratoTanque"](this.dadosStoContrato.stoContratoId);
    };
    StoContratoTanqueComponent.prototype.edit = function () {
        var _this = this;
        this.showAdd = true;
        this.actionForm = _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit;
        this.data = this.dataAux;
        var materialId = this.data.materialId;
        if (materialId) {
            this.materialService.getById(materialId).subscribe(function (ret) {
                _this.data.material = ret;
            });
        }
    };
    StoContratoTanqueComponent.prototype.detail = function () {
        var _this = this;
        this.showAdd = true;
        this.actionForm = _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail;
        this.data = this.dataAux;
        var materialId = this.data.materialId;
        if (materialId) {
            this.materialService.getById(materialId).subscribe(function (ret) {
                _this.data.material = ret;
            });
        }
    };
    StoContratoTanqueComponent.prototype.back = function () {
        this.showAdd = false;
        this.actionForm = _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index;
    };
    StoContratoTanqueComponent.prototype.remove = function () {
        var _this = this;
        this.data = this.dataAux;
        if (!this.funcoesService.isUndefinedOrNull(this.data.sequencia)) {
            this.messageService.removeConfirm(function () {
                var i = _this.dados.findIndex(function (x) { return x.sequencia === _this.data.sequencia; });
                _this.data["sitReg"] = "E";
                _this.dados[i] = _this.data;
            });
        }
    };
    StoContratoTanqueComponent.prototype.onSubmit = function (form) {
        var _this = this;
        if (form.invalid) {
            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        this.data.logRotina = "Manutenção de OSG";
        if (this.funcoesService.isNotUndefinedOrNull(this.data.tanqueId) && (!this.isExists)) {
            if (this.data.sequencia && this.data.sequencia > 0) {
                if (this.dados.length > 0) {
                    var i = this.dados.findIndex(function (x) { return x.sequencia === _this.data.sequencia; });
                    this.dados[i] = this.data;
                }
                else {
                    this.dados = [];
                    this.dados.push(this.data);
                }
            }
            else {
                this.setSequencia();
                if (this.funcoesService.isUndefinedOrNull(this.dados)) {
                    this.dados = [];
                }
                this.dados.push(this.data);
            }
            this.data = new _sto_contrato_model__WEBPACK_IMPORTED_MODULE_6__["StoContratoTanque"](this.dadosStoContrato.stoContratoId);
            this.dataResult.emit(this.dados);
        }
        this.back();
    };
    StoContratoTanqueComponent.prototype.setSequencia = function () {
        if (this.funcoesService.isUndefinedOrNull(this.data.stoContratoId)) {
            var s = this.dados ? this.dados.length : 0;
            this.data.sequencia = s + 1;
        }
        else {
            this.data.sequencia = this.data.sequencia;
        }
    };
    StoContratoTanqueComponent.prototype.verificaTanque = function () {
        var _this = this;
        var test = this.dados.filter(function (t) { return t.tanqueId === _this.data.tanqueId && t.sitReg !== "E"; });
        if (test.length > 0) {
            this.messageService.warning("titles.osg", "messages.tanqueJaInformado");
            this.data.tanqueId = "";
            this.isExists = true;
        }
    };
    StoContratoTanqueComponent.ctorParameters = function () { return [
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__["MaterialService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_0__["LoginService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        __metadata("design:type", _sto_contrato_model__WEBPACK_IMPORTED_MODULE_6__["StoContrato"])
    ], StoContratoTanqueComponent.prototype, "dadosStoContrato", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        __metadata("design:type", Array)
    ], StoContratoTanqueComponent.prototype, "dados", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        __metadata("design:type", Object)
    ], StoContratoTanqueComponent.prototype, "disabled", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
        __metadata("design:type", Object)
    ], StoContratoTanqueComponent.prototype, "dataResult", void 0);
    StoContratoTanqueComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-sto-contrato-tanque",
            template: __importDefault(__webpack_require__(/*! raw-loader!./sto-contrato-tanque.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/sto-contrato/sto-contrato-tanque/sto-contrato-tanque.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_7__["MaterialService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_0__["LoginService"]])
    ], StoContratoTanqueComponent);
    return StoContratoTanqueComponent;
}());



/***/ }),

/***/ "./src/app/pages/comercial/sto-contrato/sto-contrato.constants.ts":
/*!************************************************************************!*\
  !*** ./src/app/pages/comercial/sto-contrato/sto-contrato.constants.ts ***!
  \************************************************************************/
/*! exports provided: StoContratoConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoContratoConstants", function() { return StoContratoConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var StoContratoConstants = /** @class */ (function () {
    function StoContratoConstants() {
        this.sisFormularioId = 130026;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.inclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.exclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: "labels.permissoes" },
            { sisFormularioId: this.sisFormularioId, libRotina: 8, acao: "labels.dadosFatura" },
            { sisFormularioId: this.sisFormularioId, libRotina: 9, acao: "labels.bloqMovProduto" },
            { sisFormularioId: this.sisFormularioId, libRotina: 10, acao: "labels.duplContrato" },
            { sisFormularioId: this.sisFormularioId, libRotina: 11, acao: "labels.encContrato" }
        ];
        this.sisSistemaId = "CML";
        this.nomeForm = "titles.stoContrato";
        this.reportId = "COM0006";
        this.tabela = "StoContrato";
        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: 'duplContrato', action: 'duplContrato', icon: "icon-files", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'encContrato', action: 'encContrato', icon: "icon-folder", 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: 'CML', parametros: ["MostraTsSop",
                    "CmlAprovaCtr",
                    "CtrPerAdic",
                    "MostraTsSop",
                    "MostraTsN2",
                    "MostraTsFund",
                    "MostraTsMov",
                    "MostraTsExc",
                    "MostraTsAdic",
                    "MostraTsGir",
                    "MostraTsAdv",
                    "ServSop",
                    "ServN2",
                    "ServFundaf",
                    "ServMov",
                    "TipoValCml",
                    "ServArmEX",
                    "ServArmAdic",
                    "Serv2Giro",
                    "ServAdval",
                    "TanqueNoContr",
                    "Faturamentoflexivel",
                    "Operacao",
                    "ServArm",
                    "DecPreco"]
            },
            {
                sistema: 'UNI', parametros: [
                    'MoedaPadrao'
                ]
            }
        ];
    }
    return StoContratoConstants;
}());



/***/ }),

/***/ "./src/app/pages/comercial/sto-contrato/sto-contrato.module.ts":
/*!*********************************************************************!*\
  !*** ./src/app/pages/comercial/sto-contrato/sto-contrato.module.ts ***!
  \*********************************************************************/
/*! exports provided: StoContratoModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoContratoModule", function() { return StoContratoModule; });
/* 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 _sto_contrato_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sto-contrato.routing.module */ "./src/app/pages/comercial/sto-contrato/sto-contrato.routing.module.ts");
/* harmony import */ var _sto_contrato_form_sto_contrato_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sto-contrato-form/sto-contrato-form.component */ "./src/app/pages/comercial/sto-contrato/sto-contrato-form/sto-contrato-form.component.ts");
/* harmony import */ var _sto_contrato_index_sto_contrato_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sto-contrato-index/sto-contrato-index.component */ "./src/app/pages/comercial/sto-contrato/sto-contrato-index/sto-contrato-index.component.ts");
/* harmony import */ var _sto_contrato_filter_sto_contrato_filter_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sto-contrato-filter/sto-contrato-filter.component */ "./src/app/pages/comercial/sto-contrato/sto-contrato-filter/sto-contrato-filter.component.ts");
/* harmony import */ var _sto_contrato_item_sto_contrato_item_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./sto-contrato-item/sto-contrato-item.component */ "./src/app/pages/comercial/sto-contrato/sto-contrato-item/sto-contrato-item.component.ts");
/* harmony import */ var _sto_contrato_tanque_sto_contrato_tanque_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./sto-contrato-tanque/sto-contrato-tanque.component */ "./src/app/pages/comercial/sto-contrato/sto-contrato-tanque/sto-contrato-tanque.component.ts");
/* harmony import */ var _sto_contrato_duplicar_sto_contrato_duplicar_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./sto-contrato-duplicar/sto-contrato-duplicar.component */ "./src/app/pages/comercial/sto-contrato/sto-contrato-duplicar/sto-contrato-duplicar.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 StoContratoModule = /** @class */ (function () {
    function StoContratoModule() {
    }
    StoContratoModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], _sto_contrato_routing_module__WEBPACK_IMPORTED_MODULE_2__["StoContratoRoutingModule"]],
            declarations: [
                _sto_contrato_filter_sto_contrato_filter_component__WEBPACK_IMPORTED_MODULE_5__["StoContratoFilterComponent"],
                _sto_contrato_index_sto_contrato_index_component__WEBPACK_IMPORTED_MODULE_4__["StoContratoIndexComponent"],
                _sto_contrato_form_sto_contrato_form_component__WEBPACK_IMPORTED_MODULE_3__["StoContratoFormComponent"],
                _sto_contrato_item_sto_contrato_item_component__WEBPACK_IMPORTED_MODULE_6__["StoContratoItemComponent"],
                _sto_contrato_tanque_sto_contrato_tanque_component__WEBPACK_IMPORTED_MODULE_7__["StoContratoTanqueComponent"],
                _sto_contrato_duplicar_sto_contrato_duplicar_component__WEBPACK_IMPORTED_MODULE_8__["StoContratoDuplicarComponent"]
            ]
        })
    ], StoContratoModule);
    return StoContratoModule;
}());



/***/ }),

/***/ "./src/app/pages/comercial/sto-contrato/sto-contrato.routing.module.ts":
/*!*****************************************************************************!*\
  !*** ./src/app/pages/comercial/sto-contrato/sto-contrato.routing.module.ts ***!
  \*****************************************************************************/
/*! exports provided: StoContratoRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoContratoRoutingModule", function() { return StoContratoRoutingModule; });
/* 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 _sto_contrato_form_sto_contrato_form_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sto-contrato-form/sto-contrato-form.component */ "./src/app/pages/comercial/sto-contrato/sto-contrato-form/sto-contrato-form.component.ts");
/* harmony import */ var _sto_contrato_index_sto_contrato_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sto-contrato-index/sto-contrato-index.component */ "./src/app/pages/comercial/sto-contrato/sto-contrato-index/sto-contrato-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 ActionForm;
(function (ActionForm) {
    ActionForm[ActionForm["index"] = 0] = "index";
    ActionForm[ActionForm["create"] = 1] = "create";
    ActionForm[ActionForm["detail"] = 2] = "detail";
    ActionForm[ActionForm["edit"] = 3] = "edit";
    ActionForm[ActionForm["duplicate"] = 8] = "duplicate";
})(ActionForm || (ActionForm = {}));
var MRoutes = [
    {
        path: "",
        component: _sto_contrato_index_sto_contrato_index_component__WEBPACK_IMPORTED_MODULE_3__["StoContratoIndexComponent"],
        data: { breadcrumb: "stoContrato", formParams: { action: ActionForm.index } }
    },
    {
        path: "create",
        component: _sto_contrato_form_sto_contrato_form_component__WEBPACK_IMPORTED_MODULE_2__["StoContratoFormComponent"],
        data: {
            breadcrumb: "stoContrato",
            formParams: { action: ActionForm.create }
        }
    },
    {
        path: "edit/:id",
        component: _sto_contrato_form_sto_contrato_form_component__WEBPACK_IMPORTED_MODULE_2__["StoContratoFormComponent"],
        data: {
            breadcrumb: "stoContrato",
            formParams: { action: ActionForm.edit }
        }
    },
    {
        path: "detail/:id",
        component: _sto_contrato_form_sto_contrato_form_component__WEBPACK_IMPORTED_MODULE_2__["StoContratoFormComponent"],
        data: {
            breadcrumb: "stoContrato",
            formParams: { action: ActionForm.detail }
        }
    }
];
var StoContratoRoutingModule = /** @class */ (function () {
    function StoContratoRoutingModule() {
    }
    StoContratoRoutingModule = __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"]],
        })
    ], StoContratoRoutingModule);
    return StoContratoRoutingModule;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-comercial-sto-contrato-sto-contrato-module.js.map