77 lines
2.1 KiB
PHP
77 lines
2.1 KiB
PHP
@extends('layouts.app', ['title' => 'Importar NCM'])
|
|
@section('css')
|
|
<style type="text/css">
|
|
input[type="file"] {
|
|
display: none;
|
|
}
|
|
|
|
.file-certificado label {
|
|
padding: 8px 8px;
|
|
width: 100%;
|
|
background-color: #8833FF;
|
|
color: #FFF;
|
|
text-transform: uppercase;
|
|
text-align: center;
|
|
display: block;
|
|
margin-top: 20px;
|
|
cursor: pointer;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
</style>
|
|
@endsection
|
|
@section('content')
|
|
|
|
<div class="card mt-1">
|
|
<div class="card-header">
|
|
<h4>Importar NCM</h4>
|
|
<div style="text-align: right; margin-top: -35px;">
|
|
<a href="{{ route('ncm.index') }}" class="btn btn-danger btn-sm px-3">
|
|
<i class="ri-arrow-left-double-fill"></i>Voltar
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
|
|
<div class="alert alert-info">
|
|
<i class="ri-information-line me-2"></i>
|
|
<strong>Atenção!</strong> A importação substituirá todos os NCMs existentes. Certifique-se de que o arquivo está no formato correto.
|
|
<div>
|
|
<strong>Formato esperado:</strong>
|
|
<br>Código | Descrição
|
|
<br>Os dados devem estar nas colunas A e B, respectivamente.
|
|
</div>
|
|
</div>
|
|
{!!Form::open()
|
|
->post()
|
|
->route('ncm.store-xls')
|
|
->multipart()
|
|
->id('form-xml')
|
|
!!}
|
|
<div class="pl-lg-4">
|
|
<div class="row">
|
|
<div class="row m-2">
|
|
<div class="col-md-5 file-certificado">
|
|
{!! Form::file('file', 'Arquivo XLSX')
|
|
->attrs(['accept' => '.xlsx, xls']) !!}
|
|
<span class="text-danger" id="filename"></span>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{!!Form::close()!!}
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('js')
|
|
<script type="text/javascript">
|
|
$('#inp-file').change(function() {
|
|
$body = $("body");
|
|
$body.addClass("loading");
|
|
$('#form-xml').submit();
|
|
});
|
|
</script>
|
|
@endsection
|