Fix page terima/serah marhun and scan barcode

This commit is contained in:
Amir
2023-02-15 11:08:27 +08:00
parent 7a3c21f764
commit 713a04fc4d
4 changed files with 98 additions and 107 deletions
@@ -610,6 +610,7 @@ class MarhunController extends Controller
->join('cawangan', 'cawangan_lelong.caw_id', '=', 'cawangan.id')
->where('cawangan.caw_code', $user->kodcaw)
->where('sts_lelong', 0)
->orderBy('lelong_id', 'asc')
->get();
// $lelong = Lelong::orderBy('id', 'desc')->get();
@@ -627,6 +628,7 @@ class MarhunController extends Controller
->where('cawangan.caw_code', $user->kodcaw)
->where('sts_lelong', 0)
->select('lelong_id', 'tarikh_lelong', 'cawangan_lelong.masatamat_lelong', 'harga_emas_asas', 'jbg', 'cajlelong', 'sts_lelong')
->orderBy('lelong_id', 'asc')
->get()
->toArray();
@@ -4,90 +4,74 @@
<div class="container-fluid">
<div class="row ">
<div class="col mx-auto p-4">
<div class="card">
<div class="card-header header-style">
<a href="{{ route('marhun.senarailelongscan') }}" class="header-style-icon">
<i class="fas fa-arrow-left"></i>
</a>
<div class="header-style-title">
Senarai Lelongan Scan
</div>
<div class="col mx-auto p-4">
<div class="card">
<div class="card-header header-style">
<div class="header-style-title">
Scan Barcode
</div>
<div class="card-body">
<table class="table table-bordered text-center" id="senarailelongonline" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>Batch Lelong</th>
<th>Tarikh Lelong</th>
<th>Status Lelong</th>
<th>Tindakan</th>
<th>Scan Keluar</th>
<th>Scan Masuk</th>
</tr>
</thead>
<tbody>
@foreach($arrayinfo as $lel)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{ $lel['info']['lelong_id']}}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $lel['info']['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>
@if($lel['info']['sts_lelong'] == 0)
<button class="btn btn-warning btn-sm" disabled>LELONG BELUM BERMULA</button>
@endif
</td>
<td>
@if($lel['info']['sts_lelong'] == 0)
<a class="btn btn-warning btn-sm" href="{{ route('marhun.exportmarhundetails', ['lelong_id'=>$lel['info']['lelong_id']]) }}" data-toggle="tooltip" data-placement="top" title="Muat Turun Senarai Marhun" style="margin-right:40px"><i class="fas fa-download"></i></a>
@endif
</td>
<td>
@if($lel['info']['sts_lelong'] == 0)
<a class="btn btn-info btn-sm" href=" {{ route('marhun.scanbarcode', ['lelong_id'=>$lel['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Senarai Lelong Marhun"><i class="far fa-edit"></i></a>
@endif
</td>
<td>
@if($lel['info']['sts_lelong'] == 0)
<a class="btn btn-info btn-sm" href=" {{ route('marhun.scanbarcodemasuk', ['lelong_id'=>$lel['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Senarai Lelong Marhun"><i class="far fa-edit"></i></a>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="card-body">
<div style="overflow-x: auto;">
<table class="table table-bordered text-center" id="senarailelongonline">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>Batch Lelong</th>
<th>Tarikh Lelong</th>
<th>Status Lelong</th>
<th>Tindakan</th>
<th>Scan Keluar</th>
<th>Scan Masuk</th>
</tr>
</thead>
<tbody>
@foreach($arrayinfo as $lel)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{ $lel['info']['lelong_id']}}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $lel['info']['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>
@if($lel['info']['sts_lelong'] == 0)
<span class="badge badge-warning">LELONG BELUM BERMULA</span>
@endif
</td>
<td>
@if($lel['info']['sts_lelong'] == 0)
<a class="btn btn-warning btn-sm" href="{{ route('marhun.exportmarhundetails', ['lelong_id'=>$lel['info']['lelong_id']]) }}" data-toggle="tooltip" data-placement="top" title="Muat Turun Senarai Marhun"><i class="fas fa-download"></i></a>
@endif
</td>
<td>
@if($lel['info']['sts_lelong'] == 0)
<a class="btn btn-primary btn-sm" href=" {{ route('marhun.scanbarcode', ['lelong_id'=>$lel['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Senarai Lelong Marhun"><i class="far fa-edit"></i></a>
@endif
</td>
<td>
@if($lel['info']['sts_lelong'] == 0)
<a class="btn btn-info btn-sm" href=" {{ route('marhun.scanbarcodemasuk', ['lelong_id'=>$lel['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Senarai Lelong Marhun"><i class="far fa-edit"></i></a>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(function() {
$('[data-toggle="tooltip"]').tooltip()
})
var tablesenarailelongonline = $('#senarailelongonline').DataTable({
"columnDefs": [{
"targets": 0,
"orderable": false
},
{
"targets": 3,
"orderable": false
}
],
order: [
[1, 'asc']
],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
});
var tablesenarailelongonline = $('#senarailelongonline').DataTable({});
</script>
@endsection
@@ -7,11 +7,8 @@
<div class="col mx-auto p-4">
<div class="card">
<div class="card-header header-style">
<a href="{{ route('marhun.senarailelongterimaserah') }}" class="header-style-icon">
<i class="fas fa-arrow-left"></i>
</a>
<div class="header-style-title">
Terima/Serah Marhun
Terima/Serah Marhun
</div>
</div>
<div class="card-body">
@@ -25,32 +22,40 @@
<p>{{ $message }}</p>
</div>
@endif
<table class='table table-bordered table-hover' id="table-lelong">
<thead class="bg-primary text-white">
<th>Bil</th>
<th>Batch Lelong</th>
<th>Tarikh Lelong</th>
<th>Status Lelong</th>
<th>Tindakan</th>
</thead>
<tbody>
@foreach ($lelong as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->lelong_id}}</td>
<td>{{$index->tarikh_lelong}}</td>
@if($index->sts_lelong == 0)
<td>
<button class="btn btn-warning btn-sm" disabled>LELONG BELUM BERMULA</button>
</td>
@endif
<td>
<a class="btn m-1 btn-primary" href="{{route('marhun.terimaserahmarhun', ['lelong_id'=>$index->lelong_id])}}" data-toggle="tooltip" data-placement="top" title="Muat Turun Senarai Marhun"><i class="far fa-edit"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div style="overflow-x: auto;">
<table class='table table-bordered text-center' id="table-lelong">
<thead class="bg-primary text-white">
<th>Bil</th>
<th>Batch Lelong</th>
<th>Tarikh Lelong</th>
<th>Status Lelong</th>
<th>Tindakan</th>
</thead>
<tbody>
@foreach ($lelong as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->lelong_id}}</td>
<td>
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $index->tarikh_lelong );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp
</td>
@if($index->sts_lelong == 0)
<td>
<span class="badge badge-warning">LELONG BELUM BERMULA</span>
</td>
@endif
<td>
<a class="btn btn-primary btn-sm" href="{{route('marhun.terimaserahmarhun', ['lelong_id'=>$index->lelong_id])}}" data-toggle="tooltip" data-placement="top" title="Muat Turun Senarai Marhun"><i class="far fa-edit"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@@ -7,11 +7,11 @@
<div class="col mx-auto p-4">
<div class="card">
<div class="card-header header-style">
<a href="{{ route('marhun.senarailelongscan') }}" class="header-style-icon">
<a href="{{ route('marhun.senarailelongterimaserah') }}" class="header-style-icon">
<i class="fas fa-arrow-left"></i>
</a>
<div class="header-style-title">
Terima/Serah Marhun
Terima/Serah Marhun, Batch Lelong: {{ $lelong_id}}
</div>
</div>
<div class="card-body">