Files
lelong/resources/views/marhun/scanbarcode.blade.php
T
2022-09-27 16:39:00 +08:00

153 lines
9.0 KiB
PHP

@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto p-4">
<div class="card">
<div class="card-header">Scan Barcode</div>
<div class="card-body">
@if ($message = Session::get('success'))
<div class="alert mt-2 alert-success">
<p>{{ $message }}</p>
</div>
@elseif ($message = Session::get('failed'))
<div class="alert mt-2 alert-danger">
<p>{{ $message }}</p>
</div>
@endif
<a class="btn btn-secondary mb-1" href="{{route('marhun.senarailelongscan')}}">Kembali</a>
<p>Tarikh Lelong:
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $lelongDetail['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp
</p>
<ul class="nav mb-2 nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="senarai-tab" data-toggle="tab" href="#senarai" role="tab" aria-controls="senarai" aria-selected="true">Senarai</a>
</li>
<li class="nav-item">
<a class="nav-link" id="scan-keluar-tab" data-toggle="tab" href="#scan-keluar" role="tab" aria-controls="scan-keluar" aria-selected="false">SAG Keluar Peti Besi</a>
</li>
<li class="nav-item">
<a class="nav-link" id="scan-masuk-tab" data-toggle="tab" href="#scan-masuk" role="tab" aria-controls="scan-masuk" aria-selected="false">SAG Masuk Peti Besi</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="senarai" role="tabpanel" aria-labelledby="senarai-tab">
<table class='table table-bordered table-hover' id='table-senarai'>
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Marhun</th>
<th>N. Marhun</th>
<th>Berat</th>
</tr>
</thead>
<tbody>
@foreach($lelongbid as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->marhun}}</td>
<td>{{ number_format($index->nilaimarhun, 2, '.', ',')}}</td>
<td>{{$index->berat}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="tab-pane fade" id="scan-keluar" role="tabpanel" aria-labelledby="scan-keluar-tab">
<div class="row justify-content-center mb-4">
<div class="col-5">
<form action="{{ route('marhun.scankeluarmarhun') }}" method="POST">
@csrf
<div style="text-align: center;">Scan Barcode Marhun Yang Dibawa Keluar Dari Peti Besi</div>
<input type="text" style="text-align: center;" class="form-control" name="norujukan_barcode" autocomplete="off" id="norujukan_barcode" placeholder="SILA SCAN BARCODE PADA SAG" />
<input type="hidden" name="lelong_id" value="{{$lelong_id}}">
</form>
</div>
</div>
<div style="text-align: left;"> <a href="{{ route('marhun.cetakkeluarscanbarcode', $lelong_id) }}" class="btn btn-info">Laporan Keluar Peti Besi semasa</a><br></div>
<table class='table table-bordered table-hover' id='table-scan-keluar'>
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Tarikh/Masa Scan Keluar</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@foreach ($senaraiScanKeluar as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->scan_keluar}}</td>
<td><span class="badge badge-pill badge-danger">Berada Di Luar Peti Besi</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="tab-pane fade" id="scan-masuk" role="tabpanel" aria-labelledby="scan-masuk-tab">
<div class="row justify-content-center mb-4">
<div class="col-5">
<form action="{{ route('marhun.scanmasukmarhun') }}" method="POST">
@csrf
<label>Scan Barcode Marhun Yang Dimasukkan Ke Peti Besi</label>
<input type="text" style="text-align: center;" class="form-control" name="norujukan_barcode" autocomplete="off" id="norujukan_barcode" placeholder="SILA SCAN BARCODE PADA SAG" />
<input type="hidden" name="lelong_id" value="{{$lelong_id}}">
</form>
</div>
</div>
<div style="text-align: left;"> <a href="{{ route('marhun.cetakmasukscanbarcode', $lelong_id) }}" class="btn btn-info">Laporan Masuk Peti Besi semasa</a><br></div>
<table class="table table-bordered table-hover" id="table-scan-masuk" style="width: 100%;">
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Status</th>
<th>Tarikh/Masa Scan Keluar</th>
<th>Tarikh/Masa Terima Marhun</th>
<th>Tarikh/Masa Serah Marhun</th>
<th>Tarikh/Masa Scan Masuk</th>
</tr>
</thead>
<tbody>
@foreach ($senaraiScanMasuk as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->scan_keluar}}</td>
<td>{{$index->terima_marhun}}</td>
<td>{{$index->serah_marhun}}</td>
<td>{{$index->scan_masuk}}</td>
<td><span class="badge badge-pill badge-success">Berada Di Dalam Peti Besi</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var tableSenarai = $('#table-senarai').DataTable({});
var tableScanKeluar = $('#table-scan-keluar').DataTable({});
var tableScanMasuk = $('#table-scan-masuk').DataTable({});
</script>
@endsection