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

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"emissao-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-45\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.pesquisaDeEmissao' | 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                                </app-pesquisa-destinatario>\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/emissao/emissao-form/emissao-form.component.html":
/*!************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/emissao/emissao-form/emissao-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.regPedido\"\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-form-legenda></app-form-legenda>\r\n            <div class=\"card-body widget-body\">\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-3\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"pedido\">{{'labels.pedido' | translate}}</label>\r\n                                    <input id=\"pedido\" name=\"pedido\" [(ngModel)]=\"data.pedido\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-3\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"contrato\">{{'labels.contrato' | translate}}</label>\r\n                                    <input id=\"contrato\" name=\"contrato\" [(ngModel)]=\"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-6\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"cliente\">{{'labels.cliente' | translate}}</label>\r\n                                    <input id=\"cliente\" name=\"cliente\" [(ngModel)]=\"data.fantasia\"\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-3\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"municipio\">{{'labels.municipio' | translate}}</label>\r\n                                    <input id=\"municipio\" name=\"municipio\" [(ngModel)]=\"data.municipio\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-1\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"uf\">{{'labels.uf' | translate}}</label>\r\n                                    <input id=\"uf\" name=\"uf\" [(ngModel)]=\"data.estado\"\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-3\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"dtEmissao\">{{\"labels.dtEmissao\" | translate }}</label>\r\n                                    <app-data id=\"dtEmissao\" name=\"dtEmissao\" [(ngModel)]=\"data.dtemissao\"\r\n                                        class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\" disabled>\r\n                                    </app-data>\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"col-3\">\r\n                                <div class=\"form-group form-group-sm\">\r\n                                    <label for=\"notaFiscal\">{{'labels.notaFiscal' | translate}}</label>\r\n                                    <input id=\"notaFiscal\" name=\"notaFiscal\" [(ngModel)]=\"data.descrTipoNota\"\r\n                                        class=\"form-control form-control-sm\" type=\"text\" disabled>\r\n                                </div>\r\n                            </div>\r\n                        </div>\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=\"#va\">{{\"labels.valores\"\r\n                                            | translate }}</a>\r\n                                    </li>\r\n                                    <li class=\"nav-item\">\r\n                                        <a class=\"nav-link\" data-toggle=\"tab\" href=\"#du\">{{ 'labels.duplicatas' |\r\n                                            translate }}</a>\r\n                                    </li>\r\n                                    <li class=\"nav-item\">\r\n                                        <a class=\"nav-link\" data-toggle=\"tab\" href=\"#ob\">{{ 'labels.observacoes' |\r\n                                            translate }}</a>\r\n                                    </li>\r\n                                </ul>\r\n                            </div>\r\n                            <div class=\"tab-content top\">\r\n                                <!-- ABA VALORES -->\r\n                                <div class=\"tab-pane active show\" id=\"va\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-3\">\r\n                                            <div class=\"row\">\r\n                                                <div class=\"col-9\">\r\n                                                    <div class=\"form-group form-group-sm\">\r\n                                                        <label for=\"descontoPt\">{{'labels.descontoPt' |\r\n                                                            translate}}</label>\r\n                                                        <input id=\"descontoPt\" name=\"descontoPt\"\r\n                                                            [(ngModel)]=\"data.descPtPed\" maxlength=\"5\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            (blur)=\"exececutaConfirmacaoPedidoCalcula($event)\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n\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=\"descontoVlr\">{{'labels.descontoVlr' |\r\n                                                            translate}}</label>\r\n                                                        <input id=\"descontoVlr\" name=\"descontoVlr\"\r\n                                                            [(ngModel)]=\"data.descVl\" maxlength=\"14\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            (blur)=\"exececutaConfirmacaoPedidoCalcula($event)\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n\r\n                                            </div>\r\n                                            <div class=\"row\">\r\n                                                <div class=\"col-9\">\r\n                                                    <div class=\"form-group form-group-sm\">\r\n                                                        <label for=\"encFin\">{{'labels.encFin' | translate}}</label>\r\n                                                        <input id=\"encFin\" name=\"encFin\" [(ngModel)]=\"data.encFin\"\r\n                                                            maxlength=\"6\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 3 }\"\r\n                                                            (blur)=\"exececutaConfirmacaoPedidoCalcula($event)\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-5\">\r\n                                            <app-card-container tituloCard=\"\">\r\n                                                <div class=\"clearfix\">&nbsp;</div>\r\n                                                <div class=\"row\">\r\n                                                    <div class=\"col-6 linha\">\r\n                                                        <label for=\"vlISS\">{{'labels.vlDoIss' | translate}}</label>\r\n                                                    </div>\r\n                                                    <div class=\"col-6\">\r\n                                                        <input id=\"vlISS\" name=\"vlrISS\" [(ngModel)]=\"data.vlIss\"\r\n                                                            disabled maxlength=\"16\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                                <div class=\"clearfix\">&nbsp;</div>\r\n                                                <div class=\"row\">\r\n                                                    <div class=\"col-6 linha\">\r\n                                                        <label for=\"vlrIssDes\">{{'labels.vlrIssDes' |\r\n                                                            translate}}</label>\r\n                                                    </div>\r\n                                                    <div class=\"col-6\">\r\n                                                        <input id=\"vlrIssDes\" name=\"vlrIssDes\"\r\n                                                            [(ngModel)]=\"data.vlIssdest\" disabled maxlength=\"16\"\r\n                                                            currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                                <div class=\"clearfix\">&nbsp;</div>\r\n                                                <div class=\"row\">\r\n                                                    <div class=\"col-6 linha\">\r\n                                                        <label for=\"vlrCofinsDest\">{{'labels.vlrCofinsDest' |\r\n                                                            translate}}</label>\r\n                                                    </div>\r\n                                                    <div class=\"col-6\">\r\n                                                        <input id=\"vlrCofinsDest\" name=\"vlrCofinsDest\"\r\n                                                            [(ngModel)]=\"data.vlCofinsDest\" disabled maxlength=\"16\"\r\n                                                            currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                                <div class=\"clearfix\">&nbsp;</div>\r\n                                                <div class=\"row\">\r\n                                                    <div class=\"col-6 linha\">\r\n                                                        <label for=\"vlEncFin\">{{'labels.encargoFinanceiro' |\r\n                                                            translate}}</label>\r\n                                                    </div>\r\n                                                    <div class=\"col-6\">\r\n                                                        <input id=\"vlEncFin\" name=\"vlEncFin\" [(ngModel)]=\"data.vlEncFin\"\r\n                                                            disabled maxlength=\"16\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                                <div class=\"clearfix\">&nbsp;</div>\r\n                                                <div class=\"row\">\r\n                                                    <div class=\"col-6 linha\">\r\n                                                        <label for=\"vlIR\">{{'labels.vlDoIR' | translate}}</label>\r\n                                                    </div>\r\n                                                    <div class=\"col-6\">\r\n                                                        <input id=\"vlIR\" name=\"vlIR\" [(ngModel)]=\"data.vlIr\" disabled\r\n                                                            maxlength=\"16\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                                <div class=\"clearfix\">&nbsp;</div>\r\n                                                <div class=\"row\">\r\n                                                    <div class=\"col-6 linha\">\r\n                                                        <label for=\"vlINSS\">{{'labels.vlDoINSS' | translate}}</label>\r\n                                                    </div>\r\n                                                    <div class=\"col-6\">\r\n                                                        <input id=\"vlINSS\" name=\"vlINSS\" [(ngModel)]=\"data.vlInss\"\r\n                                                            disabled maxlength=\"16\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                                <div class=\"clearfix\">&nbsp;</div>\r\n                                                <div class=\"row\">\r\n                                                    <div class=\"col-6 linha\">\r\n                                                        <label for=\"vlServico\">{{'labels.vlDosServicos' |\r\n                                                            translate}}</label>\r\n                                                    </div>\r\n                                                    <div class=\"col-6\">\r\n                                                        <input id=\"vlServico\" name=\"vlServico\" [(ngModel)]=\"data.vlServ\"\r\n                                                            disabled maxlength=\"16\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                                <div class=\"clearfix\">&nbsp;</div>\r\n                                                <div class=\"row\">\r\n                                                    <div class=\"col-6 linha\">\r\n                                                        <label for=\"vlRetido\">{{'labels.vlRetido' | translate}}</label>\r\n                                                    </div>\r\n                                                    <div class=\"col-6\">\r\n                                                        <input id=\"vlRetido\" name=\"vlRetido\" [(ngModel)]=\"data.vlRetido\"\r\n                                                            disabled maxlength=\"16\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                                <div class=\"clearfix\">&nbsp;</div>\r\n                                                <div class=\"row\">\r\n                                                    <div class=\"col-6 linha\">\r\n                                                        <label for=\"vlFatura\">{{'labels.vlDaFatura' |\r\n                                                            translate}}</label>\r\n                                                    </div>\r\n                                                    <div class=\"col-6\">\r\n                                                        <input id=\"vlFatura\" name=\"vlFatura\" [(ngModel)]=\"data.vlFatura\"\r\n                                                            disabled maxlength=\"16\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                                <div class=\"clearfix\">&nbsp;</div>\r\n                                                <div class=\"row\">\r\n                                                    <div class=\"col-6 linha\">\r\n                                                        <label for=\"totalDaNF\">{{'labels.totalDaNF' |\r\n                                                            translate}}</label>\r\n                                                    </div>\r\n                                                    <div class=\"col-6\">\r\n                                                        <input id=\"totalDaNF\" name=\"totalDaNF\" [(ngModel)]=\"data.vlNota\"\r\n                                                            disabled maxlength=\"16\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                                <div class=\"clearfix\">&nbsp;</div>\r\n                                            </app-card-container>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <!-- ABA DUPLICATAS -->\r\n                                <div class=\"tab-pane\" id=\"du\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-3\">\r\n                                            <div class=\"row\">\r\n                                                <div class=\"col-12\">\r\n                                                    <div class=\"form-group form-group-sm\">\r\n                                                        <label for=\"condPagamentoId\"\r\n                                                            class=\"required\">{{\"labels.condPagamento\" | translate\r\n                                                            }}</label>\r\n                                                        <app-combo-padrao name=\"condPagamentoId\" id=\"condPagamentoId\"\r\n                                                            chave=\"CondPag\" descricao=\"DescrCond\" ativo=\"true\"\r\n                                                            required=\"true\" tabela=\"CondPagamento\"\r\n                                                            (change)=\"exececutaConfirmacaoPedidoDuplicatas($event)\"\r\n                                                            [(ngModel)]=\"data.condPag\">\r\n                                                        </app-combo-padrao>\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=\"desdobramento\">{{'labels.desdobramento' |\r\n                                                            translate}}</label>\r\n                                                        <input id=\"desdobramento\" name=\"desdobramento\" disabled\r\n                                                            [(ngModel)]=\"data.dias\" class=\"form-control form-control-sm\"\r\n                                                            type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                            </div>\r\n                                            <div class=\"row\">\r\n                                                <div class=\"col-12\">\r\n                                                    <div class=\"form-group form-group-sm\">\r\n                                                        <label for=\"codConta\" class=\"required\">{{\"labels.contaCorrente\"\r\n                                                            | translate }}</label>\r\n                                                        <app-combo-padrao name=\"codConta\" id=\"codConta\" chave=\"CodConta\"\r\n                                                            descricao=\"DescrConta\" ativo=\"true\" required=\"true\"\r\n                                                            tabela=\"ContaCorrente\" [(ngModel)]=\"data.codConta\">\r\n                                                        </app-combo-padrao>\r\n                                                    </div>\r\n                                                </div>\r\n                                            </div>\r\n                                            <div class=\"row\">\r\n                                                <div class=\"col-9\">\r\n                                                    <div class=\"form-group form-group-sm\">\r\n                                                        <label for=\"descFinanceiro\">{{'labels.descFinanceiro' |\r\n                                                            translate}}</label>\r\n                                                        <input id=\"descFinanceiro\" name=\"descFinanceiro\"\r\n                                                            [(ngModel)]=\"data.descFin\" maxlength=\"5\" currencyMask\r\n                                                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\r\n                                                            class=\"form-control form-control-sm\" type=\"text\">\r\n                                                    </div>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"col-4\">\r\n                                            <app-card-container tituloCard=\"desdobramentos\">\r\n                                                <div class=\"col-12\">\r\n                                                    <table\r\n                                                        class=\"table table-striped table-bordered table-hover nowrap table-sm table-responsive\">\r\n                                                        <thead>\r\n                                                            <tr>\r\n                                                                <th class=\"text-left\">{{ 'labels.parcela' | translate }}\r\n                                                                </th>\r\n                                                                <th class=\"text-left\">{{ 'labels.vencimento' | translate\r\n                                                                    }}</th>\r\n                                                                <th class=\"text-left\" width=\"200px\">{{ 'labels.valor' |\r\n                                                                    translate }}</th>\r\n                                                            </tr>\r\n                                                        </thead>\r\n                                                        <tbody>\r\n                                                            <tr *ngFor=\"let c of duplicatas\">\r\n                                                                <td class=\"text-center\">{{c.parcela}}</td>\r\n                                                                <td class=\"text-center\">{{c.vencimento |\r\n                                                                    date:'dd/MM/yyyy'}}</td>\r\n                                                                <td class=\"text-center\" width=\"200px\">{{c.valor |\r\n                                                                    formatCurrency: 2}}</td>\r\n                                                            </tr>\r\n                                                        </tbody>\r\n                                                    </table>\r\n                                                </div>\r\n                                            </app-card-container>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <!-- ABA OBSERVACOES -->\r\n                                <div class=\"tab-pane\" id=\"ob\">\r\n                                    <div class=\"row\">\r\n                                        <div class=\"col-12\">\r\n                                            <div class=\"form-group form-group-sm\">\r\n                                                <label for=\"observ\">{{\"labels.obsFixas\" | translate}}</label>\r\n                                                <textarea id=\"observ\" name=\"observ\" disabled [(ngModel)]=\"data.obsNot\"\r\n                                                    maxlength=\"1000\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    rows=\"4\"></textarea>\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=\"clearfix\">&nbsp;</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=\"observDest\">{{\"labels.obsComp\" | translate}}</label>\r\n                                                <textarea id=\"observDest\" name=\"observDest\" [(ngModel)]=\"data.obsDig\"\r\n                                                    maxlength=\"1000\" class=\"form-control form-control-sm\" type=\"text\"\r\n                                                    rows=\"4\"></textarea>\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=\"clearfix\">&nbsp;</div>\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.ok' | translate }}\r\n                        </button>\r\n                        <button class=\"btn btn-default\" type=\"button\" (click)=\"back()\">\r\n                            {{ 'buttons.cancelar' | translate }}\r\n                        </button>\r\n                    </div>\r\n                </form>\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/emissao/emissao-index/emissao-index.component.html":
/*!**************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/emissao/emissao-index/emissao-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\"\r\n                      [formAction]=\"actionForm\"\r\n                      [itemData]=\"data.pedido\"\r\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\r\n</app-menu-command-bar>\r\n\r\n<div class=\"section-comand-bar\">\r\n    <table id=\"dtEmissao\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\r\n</div>\r\n\r\n<app-propriedades></app-propriedades>\r\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\r\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\r\n<app-emissao-filter (filtrar)=\"executaFiltro()\"></app-emissao-filter>\r\n<app-emissao-periodo-pedido [dados]=\"dados\" (dataResult)=\"executafiltrarPeriodoPedido($event)\"></app-emissao-periodo-pedido>\r\n<app-emissao-valida-moeda [cotacaoDeMoeda]=\"cotacaoDeMoeda\" (dataResult)=\"executafiltrarValidaMoeda()\"></app-emissao-valida-moeda>\r\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/emissao/emissao-periodo-pedido/emissao-periodo-pedido.component.html":
/*!********************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/emissao/emissao-periodo-pedido/emissao-periodo-pedido.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=\"emissao-periodo-pedido-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.periodosPedido' | 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-12\">\r\n                            <label >{{'labels.confirmaEmissaoNotaParaEstePeriodo' | translate}}</label>\r\n                        </div>\r\n                    </div>\r\n                    <table class=\"table table-hover\">\r\n                        <thead>\r\n                        <tr>\r\n                            <th>{{ 'labels.inicio' | translate }}</th>\r\n                            <th>{{ 'labels.fim' | translate }}</th>\r\n                            <th>{{ 'labels.descricao' | translate }}</th>\r\n                        </tr>\r\n                        </thead>\r\n                        <tbody>\r\n                        <tr *ngFor=\"let item of dados.pedidos\">\r\n                            <td>{{ item.dtInicio | date: 'dd/MM/yyyy' }}</td>\r\n                            <td>{{ item.dtFim | date: 'dd/MM/yyyy' }}</td>\r\n                            <td>{{ item.descrResumo }}</td>\r\n                        </tr>\r\n                        </tbody>\r\n                    </table>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.ok' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">cancelar</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/emissao/emissao-valida-moeda/emissao-valida-moeda.component.html":
/*!****************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/emissao/emissao-valida-moeda/emissao-valida-moeda.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=\"emissao-valida-moeda-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.cotacao' | 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-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"moedaId\">{{\"labels.moeda\" | translate}}</label>\r\n                                <app-combo-moeda id=\"moedaId\" name=\"moedaId\" [(ngModel)]=\"cotacaoDeMoeda.moedaId\"\r\n                                    [disabled]=\"true\">\r\n                                </app-combo-moeda>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"dtCotacao\" class=\"required\">{{\"labels.dtcotacao\" | translate }}</label>\r\n                                <app-data id=\"dtCotacao\" name=\"dtCotacao\" [(ngModel)]=\"cotacaoDeMoeda.dtCotacao\"\r\n                                    autofocus class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\" required=\"true\"\r\n                                    [disabled]=\"true\">\r\n                                </app-data>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-6\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"vlCotacao\">{{'labels.valorCotacao' | translate}}</label>\r\n                                <input id=\"vlCotacao\" name=\"valor\" [(ngModel)]=\"cotacaoDeMoeda.vlCotacao\"\r\n                                    class=\"form-control form-control-sm\" type=\"text\">\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.ok' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">cancelar</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoFilterComponent", function() { return EmissaoFilterComponent; });
/* 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 _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_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 _emissao_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../emissao.constants */ "./src/app/pages/comercial/emissao/emissao.constants.ts");
/* harmony import */ var _emissao_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../emissao.service */ "./src/app/pages/comercial/emissao/emissao.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 EmissaoFilterComponent = /** @class */ (function () {
    function EmissaoFilterComponent(funcoesService, messageService, service) {
        this.funcoesService = funcoesService;
        this.messageService = messageService;
        this.service = service;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        this.constantes = new _emissao_constants__WEBPACK_IMPORTED_MODULE_5__["EmissaoConstants"]();
    }
    EmissaoFilterComponent.prototype.ngOnInit = function () {
    };
    EmissaoFilterComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        this.filtrar.emit();
        jQuery("#emissao-filter-dialog").modal("hide");
    };
    EmissaoFilterComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] },
        { type: _emissao_service__WEBPACK_IMPORTED_MODULE_6__["EmissaoService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], EmissaoFilterComponent.prototype, "filtrar", void 0);
    EmissaoFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/emissao/emissao-filter/emissao-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"],
            _emissao_service__WEBPACK_IMPORTED_MODULE_6__["EmissaoService"]])
    ], EmissaoFilterComponent);
    return EmissaoFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/comercial/emissao/emissao-form/emissao-form.component.scss":
/*!**********************************************************************************!*\
  !*** ./src/app/pages/comercial/emissao/emissao-form/emissao-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"] = (".linha {\n  position: relative;\n  display: flex;\n  width: 30%;\n  top: 5px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvY29tZXJjaWFsL2VtaXNzYW8vZW1pc3Nhby1mb3JtL0M6XFxDb3Jwb3JhdGVcXENvcnBvcmF0ZVdlYkRlc2VudlxcX3VuaXNvbHV0aW9uL3NyY1xcYXBwXFxwYWdlc1xcY29tZXJjaWFsXFxlbWlzc2FvXFxlbWlzc2FvLWZvcm1cXGVtaXNzYW8tZm9ybS5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvcGFnZXMvY29tZXJjaWFsL2VtaXNzYW8vZW1pc3Nhby1mb3JtL2VtaXNzYW8tZm9ybS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGtCQUFBO0VBQ0EsYUFBQTtFQUNBLFVBQUE7RUFDQSxRQUFBO0FDQ0YiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9jb21lcmNpYWwvZW1pc3Nhby9lbWlzc2FvLWZvcm0vZW1pc3Nhby1mb3JtLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmxpbmhhIHtcclxuICBwb3NpdGlvbjogcmVsYXRpdmU7XHJcbiAgZGlzcGxheTogZmxleDtcclxuICB3aWR0aDogMzAlO1xyXG4gIHRvcDogNXB4O1xyXG59IiwiLmxpbmhhIHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBkaXNwbGF5OiBmbGV4O1xuICB3aWR0aDogMzAlO1xuICB0b3A6IDVweDtcbn0iXX0= */");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoFormComponent", function() { return EmissaoFormComponent; });
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _emissao_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../emissao.service */ "./src/app/pages/comercial/emissao/emissao.service.ts");
/* harmony import */ var _emissao_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../emissao.model */ "./src/app/pages/comercial/emissao/emissao.model.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _emissao_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../emissao.constants */ "./src/app/pages/comercial/emissao/emissao.constants.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.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 _pedido_pedido_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../pedido/pedido.constants */ "./src/app/pages/comercial/pedido/pedido.constants.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};













var EmissaoFormComponent = /** @class */ (function (_super) {
    __extends(EmissaoFormComponent, _super);
    function EmissaoFormComponent(router, messageService, activatedRoute, emissaoService, funcoesService, permissoesUtils, loginService) {
        var _this = _super.call(this, new _emissao_constants__WEBPACK_IMPORTED_MODULE_7__["EmissaoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.emissaoService = emissaoService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.data = new _emissao_model__WEBPACK_IMPORTED_MODULE_4__["EmissaoTmpDto"]();
        _this.dados = new _emissao_model__WEBPACK_IMPORTED_MODULE_4__["EmissaoTmpDto"]();
        _this.mensagens = [];
        _this.constantes = new _emissao_constants__WEBPACK_IMPORTED_MODULE_7__["EmissaoConstants"]();
        _this.pedidosConstantes = new _pedido_pedido_constants__WEBPACK_IMPORTED_MODULE_12__["PedidoConstants"]();
        _this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_10__["Mascaras"]();
        _this.target = _this.funcoesService.getTargetLocation();
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    EmissaoFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
            _this.codRotina = _this.activatedRoute.snapshot.paramMap.get("codRotina");
            var pedidosId = _this.activatedRoute.snapshot.paramMap.get("pedidosId");
            if (pedidosId) {
                _this.emissaoService.getByPedido(+pedidosId).subscribe(function (resp) {
                    _this.data = resp;
                    _this.duplicatas = _this.data.duplicatas;
                    _this.data.obsNot = _this.data.obsNot1 + _this.data.obsNot2 + _this.data.obsNot3 + _this.data.obsNot4;
                    _this.data.obsDig = _this.data.obsDig1 + _this.data.obsDig2 + _this.data.obsDig3 + _this.data.obsDig4;
                });
            }
            else {
                _this.data = new _emissao_model__WEBPACK_IMPORTED_MODULE_4__["EmissaoTmpDto"]();
                _this.getCamposAdicionais();
            }
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    EmissaoFormComponent.prototype.onSubmit = function (form, create) {
        if (create === void 0) { create = false; }
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_0__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        if (!(this.data.codConta > 0)) {
            this.messageService.warning("titles.emissao", "messages.selecioneContaCorrente");
            return;
        }
        if (!this.funcoesService.isPositive(this.data.vlNota)) {
            this.messageService.warning("titles.emissao", "messages.totalNotaFiscalDeveSerMaiorQueZero");
            return;
        }
        if (this.funcoesService.isNotUndefinedOrNull(this.data.obsDig)) {
            this.data.obsDig1 = this.data.obsDig.toString().substring(0, 250);
            this.data.obsDig2 = this.data.obsDig.toString().substring(250, 500);
            this.data.obsDig3 = this.data.obsDig.toString().substring(500, 750);
            this.data.obsDig4 = this.data.obsDig.toString().substring(750, 1000);
        }
        this.processData(create);
        this.emissaoService.filtro = new _emissao_model__WEBPACK_IMPORTED_MODULE_4__["EmissaoFilter"]();
    };
    EmissaoFormComponent.prototype.processData = function (create) {
        return __awaiter(this, void 0, void 0, function () {
            var r, result, err_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _a.trys.push([0, 2, , 3]);
                        r = { "isValid": true, "message": "" };
                        return [4 /*yield*/, this.emissaoService.confirmacaoPedido(this.data).toPromise()];
                    case 1:
                        result = _a.sent();
                        this.data.regNota = result.regNota;
                        this.data.numRegNota = result.numRegNota;
                        r.isValid = this.funcoesService.isNotUndefinedOrNull(result.validationResult) ? result.validationResult.isValid : true;
                        r.message = this.funcoesService.isNotUndefinedOrNull(result.validationResult) ? this.messageService.validationResult(result.validationResult)[0] : "";
                        if ((!r.isValid) && (this.funcoesService.isNotUndefinedOrNull(r.isValid))) {
                            this.messageService.warning("titles.emissao", r.message);
                            return [2 /*return*/];
                        }
                        else {
                            this.print();
                        }
                        return [3 /*break*/, 3];
                    case 2:
                        err_1 = _a.sent();
                        return [2 /*return*/, console.log(err_1.message)];
                    case 3: return [2 /*return*/];
                }
            });
        });
    };
    EmissaoFormComponent.prototype.refresh = function () {
        var _this = this;
        this.emissaoService.getByPedido(this.data.regPedido).subscribe(function (resp) {
            _this.data = resp;
            _this.duplicatas = _this.data.duplicatas;
            _this.data.obsNot = _this.data.obsNot1 + _this.data.obsNot2 + _this.data.obsNot3 + _this.data.obsNot4;
            _this.data.obsDig = _this.data.obsDig1 + _this.data.obsDig2 + _this.data.obsDig3 + _this.data.obsDig4;
        });
    };
    EmissaoFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    EmissaoFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.onCancelar();
        if (!!this.codRotina && this.codRotina == this.pedidosConstantes.sisFormularioId) {
            this.router.navigate([this.target + "/comercial/pedido"]);
        }
        else {
            this.router.navigate([this.target + "/comercial/emissao"]);
        }
    };
    EmissaoFormComponent.prototype.onCancelar = function () {
        return __awaiter(this, void 0, void 0, function () {
            var obj, result;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        obj = {
                            pedidosId: this.data.regPedido,
                            regNota: this.constantes.sisFormularioId
                        };
                        return [4 /*yield*/, this.emissaoService.pedidoTmpCancela(obj).toPromise()];
                    case 1:
                        result = _a.sent();
                        this.mensagens = this.mensagens = this.messageService.validationResult(result);
                        if (!result.isValid) {
                            this.messageService.warning("titles.emissao", this.mensagens[0]);
                            return [2 /*return*/];
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoFormComponent.prototype.getCamposAdicionais = function () {
        var _this = this;
        this.funcoesService.camposAdicionais
            .get(this.constantes.sisFormularioId)
            .subscribe(function (data) {
            _this.data.sisCampoAdds = data;
        });
    };
    EmissaoFormComponent.prototype.exececutaConfirmacaoPedidoCalcula = function (event) {
        return __awaiter(this, void 0, void 0, function () {
            var obj, result;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        obj = {
                            pedidosId: this.data.regPedido,
                            descVl: this.data.descVl,
                            descPtPed: this.data.descPtPed,
                            encFin: this.data.encFin
                        };
                        return [4 /*yield*/, this.emissaoService.confirmacaoPedidoCalcula(obj).toPromise()];
                    case 1:
                        result = _a.sent();
                        if (!this.funcoesService.isNotUndefinedOrNull(result.validationResult)) return [3 /*break*/, 4];
                        this.mensagens = this.messageService.validationResult(result.validationResult);
                        if (!(result && !result.validationResult.isValid)) return [3 /*break*/, 2];
                        this.messageService.warning("titles.emissao", this.mensagens[0]);
                        return [2 /*return*/];
                    case 2: return [4 /*yield*/, this.exececutaConfirmacaoPedidoDuplicatas(event)];
                    case 3:
                        _a.sent();
                        _a.label = 4;
                    case 4: return [2 /*return*/];
                }
            });
        });
    };
    EmissaoFormComponent.prototype.exececutaConfirmacaoPedidoDuplicatas = function (event) {
        return __awaiter(this, void 0, void 0, function () {
            var obj, result;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        obj = {
                            pedidosId: this.data.regPedido,
                            condPag: this.data.condPag
                        };
                        return [4 /*yield*/, this.emissaoService.confirmacaoPedidoDuplicatas(obj).toPromise()];
                    case 1:
                        result = _a.sent();
                        if (this.funcoesService.isNotUndefinedOrNull(result.validationResult)) {
                            this.mensagens = this.messageService.validationResult(result.validationResult);
                            if (result && !result.validationResult.isValid) {
                                this.messageService.warning("titles.emissao", this.mensagens[0]);
                                return [2 /*return*/];
                            }
                            else {
                                this.refresh();
                            }
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    EmissaoFormComponent.prototype.print = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () { return __awaiter(_this, void 0, void 0, function () {
            var modRel, reportTitulo, reportTitulo, reportTitulo;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!(this.data.tipoNota === "A")) return [3 /*break*/, 5];
                        if (!this.funcoesService.isPositive(this.data.regNota)) return [3 /*break*/, 4];
                        modRel = this.emissaoService.configs.cWebModAvisoLcto;
                        if (!!modRel) return [3 /*break*/, 1];
                        this.messageService.warning("titles.emissao", "messages.modAvisoLctoNaoConfigurado");
                        return [3 /*break*/, 3];
                    case 1:
                        reportTitulo = { titulo: '', subTitulo: '' };
                        return [4 /*yield*/, this.funcoesService.reportInvoc.invocaRelatorio(modRel, reportTitulo, {
                                regNota: this.data.regNota,
                                regAviso: 0
                            })];
                    case 2:
                        _a.sent();
                        _a.label = 3;
                    case 3: return [3 /*break*/, 5];
                    case 4:
                        this.messageService.warning("titles.reemissao", "messages.selecioneUmRegistro");
                        return [2 /*return*/];
                    case 5:
                        if (!(this.data.tipoNota === "I")) return [3 /*break*/, 8];
                        if (!this.funcoesService.isPositive(this.data.regNota)) return [3 /*break*/, 7];
                        reportTitulo = {
                            titulo: 'COMMERCIAL INVOICE',
                            subTitulo: ''
                        };
                        this.constantes.reportId = "COM0002";
                        return [4 /*yield*/, this.funcoesService.reportInvoc.invocaRelatorio(this.constantes.reportId, reportTitulo, {
                                regNota: this.data.regNota
                            })];
                    case 6:
                        _a.sent();
                        return [3 /*break*/, 8];
                    case 7:
                        this.messageService.warning("titles.reemissao", "messages.selecioneUmRegistro");
                        return [2 /*return*/];
                    case 8:
                        if (!((this.data.tipoNota === "N") || (!this.funcoesService.isNotUndefinedOrNull(this.data.tipoNota)) || (this.data.descrTipoNota === "Nota Fiscal"))) return [3 /*break*/, 11];
                        if (!this.funcoesService.isPositive(this.data.regNota)) return [3 /*break*/, 10];
                        reportTitulo = {
                            titulo: 'Recibo Provisório de Serviços',
                            subTitulo: ''
                        };
                        this.constantes.reportId = "COM0003";
                        return [4 /*yield*/, this.funcoesService.reportInvoc.invocaRelatorio(this.constantes.reportId, reportTitulo, {
                                filialId: this.loginService.getLogin().filialId,
                                regNota: this.data.regNota,
                                nota: this.data.nota,
                                regSerie: this.data.regSerie,
                                reemissao: "N",
                                colaboradorId: this.loginService.getLogin().colaboradorId
                            })];
                    case 9:
                        _a.sent();
                        return [3 /*break*/, 11];
                    case 10:
                        this.messageService.warning("titles.reemissao", "messages.selecioneUmRegistro");
                        return [2 /*return*/];
                    case 11: return [2 /*return*/];
                }
            });
        }); });
        this.back();
    };
    EmissaoFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["ActivatedRoute"] },
        { type: _emissao_service__WEBPACK_IMPORTED_MODULE_3__["EmissaoService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"] }
    ]; };
    EmissaoFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
            selector: "app-emissao-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/emissao/emissao-form/emissao-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./emissao-form.component.scss */ "./src/app/pages/comercial/emissao/emissao-form/emissao-form.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_6__["ActivatedRoute"],
            _emissao_service__WEBPACK_IMPORTED_MODULE_3__["EmissaoService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_1__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"]])
    ], EmissaoFormComponent);
    return EmissaoFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_8__["BasePermissoes"]));



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoIndexComponent", function() { return EmissaoIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_6__ = __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_7__ = __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_8__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _cadastro_cotacao_de_moeda_cotacao_de_moeda_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../cadastro/cotacao-de-moeda/cotacao-de-moeda.model */ "./src/app/pages/cadastro/cotacao-de-moeda/cotacao-de-moeda.model.ts");
/* harmony import */ var _cadastro_cotacao_de_moeda_cotacao_de_moeda_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../cadastro/cotacao-de-moeda/cotacao-de-moeda.service */ "./src/app/pages/cadastro/cotacao-de-moeda/cotacao-de-moeda.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _emissao_constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../emissao.constants */ "./src/app/pages/comercial/emissao/emissao.constants.ts");
/* harmony import */ var _emissao_model__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../emissao.model */ "./src/app/pages/comercial/emissao/emissao.model.ts");
/* harmony import */ var _emissao_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../emissao.service */ "./src/app/pages/comercial/emissao/emissao.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 EmissaoIndexComponent = /** @class */ (function (_super) {
    __extends(EmissaoIndexComponent, _super);
    function EmissaoIndexComponent(router, datatablesService, messageService, configuracao, service, datatables, funcoes, permissoesUtils, loginService, cotacaoService) {
        var _this = _super.call(this, new _emissao_constants__WEBPACK_IMPORTED_MODULE_13__["EmissaoConstants"](), funcoes) || this;
        _this.router = router;
        _this.datatablesService = datatablesService;
        _this.messageService = messageService;
        _this.configuracao = configuracao;
        _this.service = service;
        _this.datatables = datatables;
        _this.funcoes = funcoes;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.cotacaoService = cotacaoService;
        _this.data = new _emissao_model__WEBPACK_IMPORTED_MODULE_14__["EmissaoDto"]();
        _this.dados = new _emissao_model__WEBPACK_IMPORTED_MODULE_14__["EmissaoPeriodoDto"]();
        _this.constantes = new _emissao_constants__WEBPACK_IMPORTED_MODULE_13__["EmissaoConstants"]();
        _this.mensagens = [];
        _this.cotacaoDeMoeda = new _cadastro_cotacao_de_moeda_cotacao_de_moeda_model__WEBPACK_IMPORTED_MODULE_10__["CotacaoDeMoeda"]();
        _this.target = _this.funcoes.getTargetLocation();
        _this.loadConfig = function () {
            _this.moedaPadrao = _this.configuracao.lerConfig("UNI", "MoedaPadrao");
            _this.iniPerCot = _this.configuracao.lerConfig("CML", "IniPerCot") === "S" ? true : false;
            _this.service.configs.cWebModAvisoLcto = _this.configuracao.string("WEB", "CWebModAvisoLcto");
        };
        _this.confirmacaoVerificaPedido = function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () { return __awaiter(_this, void 0, void 0, function () {
                    var object, ret, object1, ret1;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                if (!(this.data.pedido > 0)) return [3 /*break*/, 4];
                                object = {
                                    pedidosId: this.data.pedidosId,
                                    verificaPedido: this.data.verificaPedido,
                                    mensagem: this.data.mensagem
                                };
                                return [4 /*yield*/, this.corpWebCmlConfirmacaoVerificaPedido(object)];
                            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.emissao", this.mensagens[0]);
                                        return [2 /*return*/];
                                    }
                                }
                                this.confirmaVerificacaoPedido = this.funcoes.isNotUndefinedOrNull(ret.verificaPedido) ? ret.verificaPedido : "";
                                this.mensagem = ret.mensagem;
                                if (!(this.confirmaVerificacaoPedido === "N")) return [3 /*break*/, 2];
                                this.messageService.warning("titles.emissao", this.mensagem);
                                return [2 /*return*/];
                            case 2:
                                object1 = {
                                    pedidosId: this.data.pedidosId,
                                    verificaArmazenagem: this.data.verificaArmazenagem
                                };
                                return [4 /*yield*/, this.corpWebCmlConfirmacaoVerificaPeriodo(object1)];
                            case 3:
                                ret1 = _a.sent();
                                if (this.funcoesService.isNotUndefinedOrNull(ret1.validationResult)) {
                                    this.mensagens = this.messageService.validationResult(ret1.validationResult);
                                    if (ret1 && !ret1.validationResult.isValid) {
                                        this.messageService.warning("titles.emissao", this.mensagens[0]);
                                        return [2 /*return*/];
                                    }
                                }
                                this.confirmaItemArmazengem = this.funcoes.isNotUndefinedOrNull(ret1.verificaArmazenagem) ? ret1.verificaArmazenagem : 0;
                                this.mensagem = ret1.mensagem;
                                /* 2 A - Solicitar confirmação para o periodo listado */
                                if (this.confirmaItemArmazengem === 1) {
                                    this.dados.confirmaPeriodo = "N";
                                    this.filtrarPeriodoPedido();
                                }
                                else {
                                    this.executafiltrarValidaMoeda();
                                }
                                _a.label = 4;
                            case 4: return [2 /*return*/];
                        }
                    });
                }); });
                return [2 /*return*/];
            });
        }); };
        _this.filtrarPeriodoPedido = function () {
            _this.service.getListaPeridoPedido(_this.data.pedidosId).subscribe(function (resp) {
                _this.dadosAux = resp;
                _this.dados.pedidos = _this.dadosAux;
                jQuery("#emissao-periodo-pedido-dialog").modal('show');
            });
        };
        _this.filtrarMoeda = function () { return __awaiter(_this, void 0, void 0, function () {
            var moeda, ret3, obj, ret4, obj1, ret5, object2, ret7;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        moeda = this.data.codMoeda.toString();
                        if (!(this.moedaPadrao !== moeda)) return [3 /*break*/, 10];
                        this.dtIni = moment__WEBPACK_IMPORTED_MODULE_5__().toDate();
                        this.dtFin = moment__WEBPACK_IMPORTED_MODULE_5__().add(1, 'days').toDate();
                        if (!this.iniPerCot) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.cotacaoPedido(this.data.pedidosId)];
                    case 1:
                        ret3 = _a.sent();
                        if ((this.funcoes.isNotUndefinedOrNull(ret3.dtCotacao)) && (ret3.dtCotacao !== "")) {
                            this.dtIni = ret3.dtCotacao;
                            this.dtFin = ret3.dtCotacao;
                        }
                        return [3 /*break*/, 3];
                    case 2:
                        this.dtIni = moment__WEBPACK_IMPORTED_MODULE_5__().toDate();
                        this.dtFin = moment__WEBPACK_IMPORTED_MODULE_5__().add(1, 'days').toDate();
                        _a.label = 3;
                    case 3:
                        obj = {
                            moedaId: this.data.codMoeda,
                            dtIni: this.dtIni,
                            dtFin: this.dtFin
                        };
                        return [4 /*yield*/, this.maxCotacaoDia(obj)];
                    case 4:
                        ret4 = _a.sent();
                        if (!this.funcoesService.isNotUndefinedOrNull(ret4.moedaId)) return [3 /*break*/, 8];
                        this.cotacaoDeMoeda = ret4;
                        if (!(ret4.moedaId === 0)) return [3 /*break*/, 6];
                        obj1 = {
                            moedaId: this.data.codMoeda
                        };
                        return [4 /*yield*/, this.ultCotacao(obj1)];
                    case 5:
                        ret5 = _a.sent();
                        if (this.funcoesService.isNotUndefinedOrNull(ret5.moedaId)) {
                            this.cotacaoDeMoeda = ret5;
                            // this.cotacaoDeMoeda.validacaoMoeda = "S";
                            jQuery("#emissao-valida-moeda-dialog").modal('show');
                        }
                        else {
                            // const dtNaoLoc: any = await (this.dtIni.getDate() + "/" + (this.dtIni.getMonth() + 1) + "/" + this.dtIni.getFullYear());
                            this.messageService.warning("titles.emissao", "Moeda sem Cotação para o dia " + this.dtIni.toString());
                            this.cotacaoDeMoeda.validacaoMoeda = "N";
                            return [2 /*return*/];
                        }
                        return [3 /*break*/, 7];
                    case 6:
                        this.cotacaoDeMoeda = ret4;
                        // this.cotacaoDeMoeda.validacaoMoeda = "S";
                        jQuery("#emissao-valida-moeda-dialog").modal('show');
                        _a.label = 7;
                    case 7: return [3 /*break*/, 9];
                    case 8:
                        // const dtNaoLoc: any = await (this.dtIni.getDate() + "/" + (this.dtIni.getMonth() + 1) + "/" + this.dtIni.getFullYear());
                        this.messageService.warning("titles.emissao", "Moeda sem Cotação para o dia " + this.dtIni.toString());
                        _a.label = 9;
                    case 9: return [3 /*break*/, 12];
                    case 10:
                        jQuery("#emissao-valida-moeda-dialog").modal("hide");
                        this.dtIni = moment__WEBPACK_IMPORTED_MODULE_5__().toDate();
                        object2 = {
                            pedidosId: this.data.pedidosId,
                            dtCotacao: this.dtIni,
                            vlCotacao: 1
                        };
                        return [4 /*yield*/, this.service.confirmacaoPedidoGera(object2).toPromise()];
                    case 11:
                        ret7 = _a.sent();
                        if (this.funcoesService.isNotUndefinedOrNull(ret7.validationResult)) {
                            this.mensagens = this.messageService.validationResult(ret7.validationResult);
                            if (ret7 && !ret7.validationResult.isValid) {
                                this.messageService.warning("titles.emissao", this.mensagens[0]);
                                return [2 /*return*/];
                            }
                        }
                        this.router.navigate([this.target + "/comercial/emissao/detail/" + ret7.regPedido + "/" + this.constantes.sisFormularioId]);
                        _a.label = 12;
                    case 12: return [2 /*return*/];
                }
            });
        }); };
        // @ts-ignore
        _this.executafiltrarValidaMoeda = function () { return __awaiter(_this, void 0, void 0, function () {
            var obj, ret5, object2, ret6;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!(this.cotacaoDeMoeda.execFuncao === "S")) return [3 /*break*/, 5];
                        if (!((!this.funcoesService.isNotUndefinedOrNull(this.cotacaoDeMoeda.validacaoMoeda)) && (this.cotacaoDeMoeda.validacaoMoeda === "S"))) return [3 /*break*/, 2];
                        jQuery("#emissao-valida-moeda-dialog").modal("hide");
                        obj = {
                            pedidosId: this.data.pedidosId,
                            dtCotacao: this.dtIni.getFullYear() + "-" + (this.dtIni.getMonth() + 1) + "-" + this.dtIni.getDate(),
                            vlCotacao: this.cotacaoDeMoeda.vlCotacao
                        };
                        return [4 /*yield*/, this.service.confirmacaoPedidoGera(obj).toPromise()];
                    case 1:
                        ret5 = _a.sent();
                        if (this.funcoesService.isNotUndefinedOrNull(ret5.validationResult)) {
                            this.mensagens = this.messageService.validationResult(ret5.validationResult);
                            if (ret5 && !ret5.validationResult.isValid) {
                                this.messageService.warning("titles.emissao", this.mensagens[0]);
                                return [2 /*return*/];
                            }
                        }
                        this.router.navigate([this.target + "/comercial/emissao/detail/" + ret5.regPedido + "/" + this.constantes.sisFormularioId]);
                        return [3 /*break*/, 4];
                    case 2:
                        jQuery("#emissao-valida-moeda-dialog").modal("hide");
                        this.dtIni = moment__WEBPACK_IMPORTED_MODULE_5__().format('DD/MM/YYYY').toString();
                        object2 = {
                            pedidosId: this.data.pedidosId,
                            dtCotacao: this.dtIni,
                            vlCotacao: 1
                        };
                        return [4 /*yield*/, this.service.confirmacaoPedidoGera(object2).toPromise()];
                    case 3:
                        ret6 = _a.sent();
                        if (this.funcoesService.isNotUndefinedOrNull(ret6.validationResult)) {
                            this.mensagens = this.messageService.validationResult(ret6.validationResult);
                            if (ret6 && !ret6.validationResult.isValid) {
                                this.messageService.warning("titles.emissao", this.mensagens[0]);
                                return [2 /*return*/];
                            }
                        }
                        this.router.navigate([this.target + "/comercial/emissao/detail/" + ret6.regPedido + "/" + this.constantes.sisFormularioId]);
                        _a.label = 4;
                    case 4: return [3 /*break*/, 7];
                    case 5: return [4 /*yield*/, this.filtrarMoeda()];
                    case 6:
                        _a.sent();
                        _a.label = 7;
                    case 7: return [2 /*return*/];
                }
            });
        }); };
        router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        if (!_this.service.filtro) {
            _this.service.filtro = new _emissao_model__WEBPACK_IMPORTED_MODULE_14__["EmissaoFilter"]();
        }
        return _this;
    }
    EmissaoIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoesService.abrirFiltro) {
                    _this.service.filtro = new _emissao_model__WEBPACK_IMPORTED_MODULE_14__["EmissaoFilter"]();
                    jQuery("#emissao-filter-dialog").modal("show");
                }
                else {
                    _this.executaFiltro();
                }
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'confirmacaoVerificaPedido', func: function () { return _this.confirmacaoVerificaPedido; } }
        ]);
        this.configuracao.getConfig(this.constantes.listaParam, this.loadConfig);
    };
    EmissaoIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.getByFiltro(this.service.filtro).subscribe(function (resp) {
            var columns = [
                _this.datatables.getDataString("pedido", "pedido"),
                _this.datatables.getDataString("numContrato", "contrato"),
                _this.datatables.getDataDateTime("dtPedido", "emissao", "DD/MM/YYYY", "15%"),
                _this.datatables.getDataString("fantasia", "cliente"),
                _this.datatables.getDataDouble("totalPed", "total", 2)
            ];
            _this.datatables.datatable("dtEmissao", columns, resp, function (aData) {
                _this.data = aData;
            }, 0, "asc");
        });
    };
    EmissaoIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    EmissaoIndexComponent.prototype.filtrar = function () {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_7__["EventEmitterService"].get("formError").emit(null);
        jQuery("#emissao-filter-dialog").modal("show");
    };
    EmissaoIndexComponent.prototype.executaFiltro = function () {
        this.refresh();
    };
    EmissaoIndexComponent.prototype.corpWebCmlConfirmacaoVerificaPedido = function (obj) {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.service.confirmacaoVerificaPedido(obj).subscribe(function (result) {
                resolve(result);
                reject(result);
            });
        });
        return promise;
    };
    EmissaoIndexComponent.prototype.corpWebCmlConfirmacaoVerificaPeriodo = function (obj) {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.service.confirmacaoVerificaPeriodo(obj).subscribe(function (result) {
                resolve(result);
                reject(result);
            });
        });
        return promise;
    };
    EmissaoIndexComponent.prototype.executafiltrarPeriodoPedido = function (event) {
        jQuery("#emissao-periodo-pedido-dialog").modal("hide");
        if (this.dados.confirmaPeriodo === "S") {
            this.executafiltrarValidaMoeda();
            // this.filtrarMoeda();
            return;
        }
    };
    EmissaoIndexComponent.prototype.cotacaoPedido = function (data) {
        var request = this.service;
        var promise = new Promise(function (resolve, reject) {
            request.getCotacaoPedido(data).subscribe(function (resp) {
                resolve(resp);
            });
        });
        return promise;
    };
    EmissaoIndexComponent.prototype.maxCotacaoDia = function (data) {
        var request = this.cotacaoService;
        var promise = new Promise(function (resolve, reject) {
            request.getMaxCotacaoDia(data).subscribe(function (resp) {
                resolve(resp);
            });
        });
        return promise;
    };
    EmissaoIndexComponent.prototype.ultCotacao = function (data) {
        var request = this.cotacaoService;
        var promise = new Promise(function (resolve, reject) {
            request.getCotacaoAtual(data).subscribe(function (resp) {
                resolve(resp);
            });
        });
        return promise;
    };
    EmissaoIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_8__["ConfiguracaoFacade"] },
        { type: _emissao_service__WEBPACK_IMPORTED_MODULE_15__["EmissaoService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_12__["LoginService"] },
        { type: _cadastro_cotacao_de_moeda_cotacao_de_moeda_service__WEBPACK_IMPORTED_MODULE_11__["CotacaoDeMoedaService"] }
    ]; };
    EmissaoIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/emissao/emissao-index/emissao-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_8__["ConfiguracaoFacade"],
            _emissao_service__WEBPACK_IMPORTED_MODULE_15__["EmissaoService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_9__["PermissoesUtilsService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_12__["LoginService"],
            _cadastro_cotacao_de_moeda_cotacao_de_moeda_service__WEBPACK_IMPORTED_MODULE_11__["CotacaoDeMoedaService"]])
    ], EmissaoIndexComponent);
    return EmissaoIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_6__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/comercial/emissao/emissao-periodo-pedido/emissao-periodo-pedido.component.ts":
/*!****************************************************************************************************!*\
  !*** ./src/app/pages/comercial/emissao/emissao-periodo-pedido/emissao-periodo-pedido.component.ts ***!
  \****************************************************************************************************/
/*! exports provided: EmissaoPeriodoPedidoComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoPeriodoPedidoComponent", function() { return EmissaoPeriodoPedidoComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
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 EmissaoPeriodoPedidoComponent = /** @class */ (function () {
    function EmissaoPeriodoPedidoComponent() {
        this.dataResult = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    EmissaoPeriodoPedidoComponent.prototype.ngOnInit = function () {
    };
    EmissaoPeriodoPedidoComponent.prototype.onSubmit = function (form) {
        if (!form.invalid) {
            this.dados.confirmaPeriodo = "S";
            this.dataResult.emit(this.dados);
        }
    };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], EmissaoPeriodoPedidoComponent.prototype, "dados", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], EmissaoPeriodoPedidoComponent.prototype, "dataResult", void 0);
    EmissaoPeriodoPedidoComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-periodo-pedido",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-periodo-pedido.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/emissao/emissao-periodo-pedido/emissao-periodo-pedido.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        })
    ], EmissaoPeriodoPedidoComponent);
    return EmissaoPeriodoPedidoComponent;
}());



/***/ }),

/***/ "./src/app/pages/comercial/emissao/emissao-valida-moeda/emissao-valida-moeda.component.ts":
/*!************************************************************************************************!*\
  !*** ./src/app/pages/comercial/emissao/emissao-valida-moeda/emissao-valida-moeda.component.ts ***!
  \************************************************************************************************/
/*! exports provided: EmissaoValidaMoedaComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoValidaMoedaComponent", function() { return EmissaoValidaMoedaComponent; });
/* 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");
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 EmissaoValidaMoedaComponent = /** @class */ (function () {
    function EmissaoValidaMoedaComponent() {
        this.dataResult = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_1__["Mascaras"]();
    }
    EmissaoValidaMoedaComponent.prototype.ngOnInit = function () {
    };
    EmissaoValidaMoedaComponent.prototype.onSubmit = function (form) {
        if (!form.invalid) {
            this.cotacaoDeMoeda.validacaoMoeda = "S";
            this.cotacaoDeMoeda.execFuncao = "S";
            this.dataResult.emit(this.cotacaoDeMoeda);
        }
    };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], EmissaoValidaMoedaComponent.prototype, "cotacaoDeMoeda", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], EmissaoValidaMoedaComponent.prototype, "dataResult", void 0);
    EmissaoValidaMoedaComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-emissao-valida-moeda",
            template: __importDefault(__webpack_require__(/*! raw-loader!./emissao-valida-moeda.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/comercial/emissao/emissao-valida-moeda/emissao-valida-moeda.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        })
    ], EmissaoValidaMoedaComponent);
    return EmissaoValidaMoedaComponent;
}());



/***/ }),

/***/ "./src/app/pages/comercial/emissao/emissao.constants.ts":
/*!**************************************************************!*\
  !*** ./src/app/pages/comercial/emissao/emissao.constants.ts ***!
  \**************************************************************/
/*! exports provided: EmissaoConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoConstants", function() { return EmissaoConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var EmissaoConstants = /** @class */ (function () {
    function EmissaoConstants() {
        this.sisFormularioId = 130109;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.permissoes" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.emissao" }
        ];
        this.sisSistemaId = "CAD";
        this.nomeForm = "titles.emissao";
        this.tabela = "NotaFiscal";
        this.reportId = "COM0001";
        this.listaIndex = [
            { title: 'ConfirmacaoVerificaPedido', action: 'confirmacaoVerificaPedido', icon: "fa fa-check", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' }
        ];
        this.listaForm = [
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
        this.listaParam = [
            { 'sistema': 'UNI', 'parametros': ["MoedaPadrao"] },
            { 'sistema': 'CML', 'parametros': ["IniPerCot"] },
            { 'sistema': 'WEB', 'parametros': ['CWebModAvisoLcto'] }
        ];
    }
    return EmissaoConstants;
}());



/***/ }),

/***/ "./src/app/pages/comercial/emissao/emissao.module.ts":
/*!***********************************************************!*\
  !*** ./src/app/pages/comercial/emissao/emissao.module.ts ***!
  \***********************************************************/
/*! exports provided: EmissaoModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmissaoModule", function() { return EmissaoModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var app_pages_comercial_emissao_emissao_index_emissao_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/pages/comercial/emissao/emissao-index/emissao-index.component */ "./src/app/pages/comercial/emissao/emissao-index/emissao-index.component.ts");
/* harmony import */ var app_pages_comercial_emissao_emissao_routing_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/pages/comercial/emissao/emissao.routing.module */ "./src/app/pages/comercial/emissao/emissao.routing.module.ts");
/* harmony import */ var app_pages_comercial_emissao_emissao_filter_emissao_filter_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/pages/comercial/emissao/emissao-filter/emissao-filter.component */ "./src/app/pages/comercial/emissao/emissao-filter/emissao-filter.component.ts");
/* harmony import */ var _emissao_periodo_pedido_emissao_periodo_pedido_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./emissao-periodo-pedido/emissao-periodo-pedido.component */ "./src/app/pages/comercial/emissao/emissao-periodo-pedido/emissao-periodo-pedido.component.ts");
/* harmony import */ var _emissao_valida_moeda_emissao_valida_moeda_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./emissao-valida-moeda/emissao-valida-moeda.component */ "./src/app/pages/comercial/emissao/emissao-valida-moeda/emissao-valida-moeda.component.ts");
/* harmony import */ var _emissao_form_emissao_form_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./emissao-form/emissao-form.component */ "./src/app/pages/comercial/emissao/emissao-form/emissao-form.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};








var EmissaoModule = /** @class */ (function () {
    function EmissaoModule() {
    }
    EmissaoModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"], app_pages_comercial_emissao_emissao_routing_module__WEBPACK_IMPORTED_MODULE_3__["EmissaoRoutingModule"]],
            declarations: [app_pages_comercial_emissao_emissao_index_emissao_index_component__WEBPACK_IMPORTED_MODULE_2__["EmissaoIndexComponent"],
                app_pages_comercial_emissao_emissao_filter_emissao_filter_component__WEBPACK_IMPORTED_MODULE_4__["EmissaoFilterComponent"],
                _emissao_periodo_pedido_emissao_periodo_pedido_component__WEBPACK_IMPORTED_MODULE_5__["EmissaoPeriodoPedidoComponent"],
                _emissao_valida_moeda_emissao_valida_moeda_component__WEBPACK_IMPORTED_MODULE_6__["EmissaoValidaMoedaComponent"],
                _emissao_form_emissao_form_component__WEBPACK_IMPORTED_MODULE_7__["EmissaoFormComponent"]]
        })
    ], EmissaoModule);
    return EmissaoModule;
}());



/***/ }),

/***/ "./src/app/pages/comercial/emissao/emissao.routing.module.ts":
/*!*******************************************************************!*\
  !*** ./src/app/pages/comercial/emissao/emissao.routing.module.ts ***!
  \*******************************************************************/
/*! exports provided: EmissaoRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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




var MRoutes = [
    {
        path: "",
        component: _emissao_index_emissao_index_component__WEBPACK_IMPORTED_MODULE_2__["EmissaoIndexComponent"],
        data: { breadcrumb: "emissao", formParams: { action: 1 } }
    },
    {
        path: "detail/:pedidosId/:codRotina",
        component: _emissao_form_emissao_form_component__WEBPACK_IMPORTED_MODULE_3__["EmissaoFormComponent"],
        data: {
            breadcrumb: "emissao", formParams: { action: 3 }
        }
    }
];
var EmissaoRoutingModule = /** @class */ (function () {
    function EmissaoRoutingModule() {
    }
    EmissaoRoutingModule = __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"]]
        })
    ], EmissaoRoutingModule);
    return EmissaoRoutingModule;
}());



/***/ })

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