(window.webpackJsonp=window.webpackJsonp||[]).push([[1157],{2841:function(t,o,e){"use strict";e.r(o);e(6),e(5),e(7),e(12),e(8),e(13);var r=e(2),l=(e(4),e(78));function n(object,t){var o=Object.keys(object);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(object);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),o.push.apply(o,e)}return o}var c={data:function(){return{loading:!1,breadcrumb:[{text:"Laboratório",to:"/laboratorio"},{text:"Controles",to:"/laboratorio/controles"},{text:"Fator de Pagamento",to:"/laboratorio/controles/fatorPagamento"},{text:"Relatórios",active:!0}],payload:{tipoRelatorio:null,arquivo:null}}},computed:function(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?n(Object(source),!0).forEach((function(o){Object(r.a)(t,o,source[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):n(Object(source)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(source,o))}))}return t}({},Object(l.c)({empresa:"empresa/empresaAtual"})),methods:{uploadRelatorio:function(){var t=this;this.loading=!0;var o=new FormData;o.append("hierarquia",this.payload.tipoRelatorio),o.append("file",this.payload.arquivo),this.$controlesLabService.uploadRelatorio(this.empresa.sigla,this.$auth.strategy.token.get(),o).then((function(o){t.$notify({title:"Sucesso",message:"Relatório importado com sucesso",type:"success"})})).catch((function(o){t.$notify({title:"Erro",text:o.response?o.response.data.message:o,type:"error"})})).finally((function(){t.loading=!1}))}}},d=c,f=e(42),component=Object(f.a)(d,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("b-row",[e("b-col",[e("b-overlay",{attrs:{variant:"white",show:t.loading,rounded:"false"}},[e("b-form",{on:{submit:function(o){return o.stopPropagation(),o.preventDefault(),t.uploadRelatorio.apply(null,arguments)}}},[e("b-card",[e("div",{staticClass:"mt-4 mx-2",attrs:{slot:"header"},slot:"header"},[e("b-row",[e("b-col",[e("h2",{staticClass:"primary"},[t._v("\n                  Fator de Pagamento - Padrão Relatórios\n                ")])])],1)],1),t._v(" "),e("b-row",[e("b-col",[e("b-form-group",{attrs:{label:"Tipo do Relatório:"}},[e("b-form-select",{attrs:{autofocus:""},model:{value:t.payload.tipoRelatorio,callback:function(o){t.$set(t.payload,"tipoRelatorio",o)},expression:"payload.tipoRelatorio"}},[e("b-form-select-option",{attrs:{value:null}},[t._v("\n                    Selecione\n                  ")]),t._v(" "),e("b-form-select-option",{attrs:{value:"CBUQ"}},[t._v("\n                    CBUQ\n                  ")]),t._v(" "),e("b-form-select-option",{attrs:{value:"Micro"}},[t._v("\n                    MICRO\n                  ")]),t._v(" "),e("b-form-select-option",{attrs:{value:"Tratamento"}},[t._v("\n                    Tratamento\n                  ")])],1)],1)],1)],1),t._v(" "),e("b-row",[e("b-col",[e("b-form-group",{attrs:{label:"Arquivo:"}},[e("b-form-file",{attrs:{accept:".xlsx",placeholder:"Escolha o relatorio para importar ou solte-o aqui...","drop-placeholder":"Solte o arquivo aqui...","browse-text":"Escolher"},model:{value:t.payload.arquivo,callback:function(o){t.$set(t.payload,"arquivo",o)},expression:"payload.arquivo"}})],1)],1)],1),t._v(" "),e("b-row",[e("b-col",[e("b-button",{staticClass:"mt-3 rounded",attrs:{size:"sm",variant:"outline-secondary",type:"submit"}},[e("fa-icon",{staticClass:"mr-1",attrs:{icon:"file-import"}}),t._v("\n                Upload\n              ")],1)],1)],1)],1)],1)],1)],1)],1)}),[],!1,null,null,null);o.default=component.exports}}]);
//# sourceMappingURL=c88ae37-1.2.11.js.map