This commit is contained in:
@@ -0,0 +1,327 @@
|
||||
@extends('impressoes.layout1.content')
|
||||
|
||||
@section('conteudo')
|
||||
<style>
|
||||
.table-relatorio > thead > tr > th,
|
||||
.table-relatorio > tfoot > tr > th { text-align: center; }
|
||||
.col-min { width: 1%; }
|
||||
.text-center { text-align: center; }
|
||||
.margin-bottom { margin-bottom: 15px; }
|
||||
</style>
|
||||
|
||||
<fieldset>
|
||||
<legend>Filtros</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Período:</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<strong>Unidade (Almoxarifado):</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
De {{ $inicio }} até {{ $fim }}
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
{{ $unidade }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Local de atendimento (Almoxarifado):</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<strong>Setor (Almoxarifado):</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $infraestrutura }}
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
{{ $setor }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Unidade requisitante:</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<strong>Local de atendimento requisitante:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $unidadeRequisitante }}
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
{{ $infraestruturaRequisitante }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Setor requisitante:</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<strong>Usuário requisitante:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $setorRequisitante }}
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
{{ $usuarioRequisitante }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<strong>Status:</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<strong>Número:</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<strong>Grupo:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
{{ $status }}
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ $numero }}
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
{{ $grupo }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<strong>Subgrupo:</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<strong>Material:</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ $subgrupo }}
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
{{ $material }}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<table class="table table-relatorio">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<th class="{{ $coluna['class'] }}">{{ $coluna['label'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($requisicoes as $requisicao)
|
||||
<tr>
|
||||
@foreach ($colunas as $coluna)
|
||||
<td class="{{ $coluna['class'] }}">{{ $requisicao->{$coluna['key']} ?? '-' }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
|
||||
@if ($withDetails)
|
||||
<tr>
|
||||
<td colspan="{{ $colunas->count() }}">
|
||||
@if ($requisicao->respostas->isNotEmpty())
|
||||
@foreach ($requisicao->respostas as $k => $resposta)
|
||||
<table class="table table-relatorio margin-bottom">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="7" style="text-align: left !important;">
|
||||
<span><strong>{{ $resposta->numero_resposta }}ª resposta</strong></span>
|
||||
|
||||
@if (!is_null($resposta->data_hora_envio))
|
||||
<span><br>Data/hora envio: {{ $resposta->data_hora_envio }} ({{ $resposta->usuario_envio }})</span>
|
||||
@endif
|
||||
|
||||
@if (!is_null($resposta->data_hora_recebimento))
|
||||
<span><br>Data/hora recebimento: {{ $resposta->data_hora_recebimento }}</span>
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Material</th>
|
||||
<th class="col-min">{{ $resposta->numero_resposta === 1 ? 'Requisitado' : 'Restante requisitado' }}</th>
|
||||
<th class="col-min">Lote</th>
|
||||
<th class="col-min">Validade</th>
|
||||
<th class="col-min">Enviado</th>
|
||||
<th class="col-min">Recebido</th>
|
||||
<th style="width: 150px">Motivo da diferença entre solicitado e enviado</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($resposta->itens as $item)
|
||||
<tr>
|
||||
<td>{{ $item->material }}</td>
|
||||
<td class="text-center">{{ $item->requisitado }}</td>
|
||||
|
||||
<td class="text-center">
|
||||
@if ($item->possui_entrada_com_lote)
|
||||
@if ($item->entrada_itens->isNotEmpty())
|
||||
@foreach ($item->entrada_itens as $i => $lote)
|
||||
@if ($i > 0)
|
||||
<br>
|
||||
@endif
|
||||
|
||||
{{ $lote->lote ?? '-' }}
|
||||
@endforeach
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
@if ($item->possui_entrada_com_lote)
|
||||
@if ($item->entrada_itens->isNotEmpty())
|
||||
@foreach ($item->entrada_itens as $i => $lote)
|
||||
@if ($i > 0)
|
||||
<br>
|
||||
@endif
|
||||
|
||||
{{ $lote->validade_lote ?? '-' }}
|
||||
@endforeach
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
@if ($item->possui_entrada_com_lote)
|
||||
@if ($item->entrada_itens->isNotEmpty())
|
||||
@foreach ($item->entrada_itens as $i => $lote)
|
||||
@if ($i > 0)
|
||||
<br>
|
||||
@endif
|
||||
|
||||
{{ $lote->enviado ?? '-' }}
|
||||
@endforeach
|
||||
@else
|
||||
0
|
||||
@endif
|
||||
@else
|
||||
{{ $item->enviado }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
@if ($item->possui_entrada_com_lote)
|
||||
@if ($item->entrada_itens->isNotEmpty())
|
||||
@foreach ($item->entrada_itens as $i => $lote)
|
||||
@if ($i > 0)
|
||||
<br>
|
||||
@endif
|
||||
|
||||
{{ $lote->recebido ?? '-' }}
|
||||
@endforeach
|
||||
@else
|
||||
0
|
||||
@endif
|
||||
@else
|
||||
{{ $item->recebido }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $item->motivo_diferenca ?? '-' }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@if (!is_null($resposta->observacoes))
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="7" style="text-align: left !important;">
|
||||
<span>
|
||||
<strong>Observações:</strong> <span style="font-weight: normal;">{{ $resposta->observacoes }}</span>
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
@endforeach
|
||||
@else
|
||||
<table class="table table-relatorio margin-bottom">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Material</th>
|
||||
<th class="col-min text-center">Requisitado</th>
|
||||
<th class="col-min text-center">Lote</th>
|
||||
<th class="col-min text-center">Validade</th>
|
||||
<th class="col-min text-center">Enviado</th>
|
||||
<th class="col-min text-center">Recebido</th>
|
||||
<th style="width: 150px">Motivo da diferença entre solicitado e enviado</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($requisicao->itens as $item)
|
||||
<tr>
|
||||
<td>{{ $item->material }}</td>
|
||||
<td class="col-min text-center">{{ $item->requisitado }}</td>
|
||||
<td class="col-min text-center">-</td>
|
||||
<td class="col-min text-center">-</td>
|
||||
<td class="col-min text-center">-</td>
|
||||
<td class="col-min text-center">-</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user