update scan barcode serahan pembida
This commit is contained in:
@@ -2039,6 +2039,7 @@ class MarhunController extends Controller
|
|||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$arrayinfo = [];
|
$arrayinfo = [];
|
||||||
$arraydetails0 = [];
|
$arraydetails0 = [];
|
||||||
|
$arraydetails1 = [];
|
||||||
|
|
||||||
$lelong = CawanganLelong::join('lelong', 'cawangan_lelong.lelong_id', '=', 'lelong.id')
|
$lelong = CawanganLelong::join('lelong', 'cawangan_lelong.lelong_id', '=', 'lelong.id')
|
||||||
->join('cawangan', 'cawangan_lelong.caw_id', '=', 'cawangan.id')
|
->join('cawangan', 'cawangan_lelong.caw_id', '=', 'cawangan.id')
|
||||||
@@ -2047,10 +2048,19 @@ class MarhunController extends Controller
|
|||||||
->select('lelong_id', 'tarikh_lelong', 'cawangan_lelong.masatamat_lelong', 'harga_emas_asas', 'jbg', 'cajlelong', 'sts_lelong')
|
->select('lelong_id', 'tarikh_lelong', 'cawangan_lelong.masatamat_lelong', 'harga_emas_asas', 'jbg', 'cajlelong', 'sts_lelong')
|
||||||
->get()
|
->get()
|
||||||
->toArray();
|
->toArray();
|
||||||
|
|
||||||
|
$currentdate = Carbon::now();
|
||||||
|
$currentdate = $currentdate->toDateTimeString();
|
||||||
|
|
||||||
|
$tarikhlelong_semasa = $currentdate;
|
||||||
|
|
||||||
|
$lelongAll = Lelong::with('cawangan')->get();
|
||||||
|
|
||||||
|
|
||||||
if($lelong){
|
if($lelong){
|
||||||
foreach ($lelong as $info) {
|
foreach ($lelong as $info)
|
||||||
|
{
|
||||||
$lelong_id = $info['lelong_id'];
|
$lelong_id = $info['lelong_id'];
|
||||||
// dd( $lelong_id );
|
|
||||||
|
|
||||||
$listwinner = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id')
|
$listwinner = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id')
|
||||||
->where('lelongbidder.status_bidder', 1)
|
->where('lelongbidder.status_bidder', 1)
|
||||||
@@ -2060,23 +2070,38 @@ class MarhunController extends Controller
|
|||||||
->select('lelongbidder.user_id')
|
->select('lelongbidder.user_id')
|
||||||
->groupBy('lelongbidder.user_id')
|
->groupBy('lelongbidder.user_id')
|
||||||
->get()->toArray();
|
->get()->toArray();
|
||||||
|
|
||||||
|
|
||||||
foreach($listwinner as $index1=>$winner){
|
foreach($listwinner as $index1=>$winner){
|
||||||
|
|
||||||
$userdetails = User::where('id', $winner['user_id'])->first();
|
$userdetails = User::where('id', $winner['user_id'])->first();
|
||||||
$listwinner[$index1]['details'] = $userdetails;
|
$listwinner[$index1]['details'] = $userdetails;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$detailsinfo = CawanganLelong::join('cawangan', 'cawangan_lelong.caw_id', '=', 'cawangan.id')
|
$detailsinfo = CawanganLelong::join('cawangan', 'cawangan_lelong.caw_id', '=', 'cawangan.id')
|
||||||
->where('lelong_id', $info['lelong_id'])
|
->where('lelong_id', $info['lelong_id'])
|
||||||
->where('cawangan.caw_code', $user->kodcaw)
|
->where('cawangan.caw_code', $user->kodcaw)
|
||||||
->get()
|
->get()
|
||||||
->toArray();
|
->toArray();
|
||||||
array_push($arrayinfo, ['info' => $info, 'detailsinfo' => $detailsinfo, 'listwinner' => $listwinner]);
|
array_push($arrayinfo, ['info' => $info, 'detailsinfo' => $detailsinfo, 'listwinner' => $listwinner]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('marhun.senarailelongscanjual', compact('lelong', 'arrayinfo'));
|
}
|
||||||
|
foreach ($arrayinfo as $lelong) {
|
||||||
|
|
||||||
|
|
||||||
|
if ($info['tarikh_lelong'] == $tarikhlelong_semasa) {
|
||||||
|
array_push($arraydetails0, $lelong);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
array_push($arraydetails1, $lelong);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return view('marhun.senarailelongscanjual', compact('lelong', 'arrayinfo','arraydetails0','arraydetails1','lelongAll'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function listScanBarcodejual($lelong_id)
|
public function listScanBarcodejual($lelong_id)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row ">
|
<div class="row ">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
@@ -21,82 +20,228 @@
|
|||||||
{{ $message }}
|
{{ $message }}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
{{-- <h4> Senarai Lelongan Scan Kepada Pembida</h4> --}}
|
|
||||||
<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>Nama Pembida</th>
|
|
||||||
<th>Status Lelong</th>
|
|
||||||
<th>Tindakan</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
@forelse($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 style='white-space:nowrap;' align = 'left'>
|
|
||||||
{{-- @if(!empty($listwinner)) --}}
|
|
||||||
@foreach($lel['listwinner'] as $winner)
|
|
||||||
<a class="btn m-1 btn-info" href=" {{ route('marhun.scanbarcodejualbycust', ['lelong_id'=>$lel['info']['lelong_id'], 'userid'=>$winner['details']['id']]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Bidaan"><i class="far fa-edit"></i></a>
|
|
||||||
{{ $winner['details']['name']}}<br>
|
|
||||||
@endforeach
|
|
||||||
{{-- @endif --}}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
@if($lel['info']['sts_lelong'] == 3)
|
|
||||||
<button class="btn btn-success btn-sm" disabled>LELONG SELESAI</button>
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
@if($lel['info']['sts_lelong'] == 3)
|
|
||||||
<a class="btn m-1 btn-warning" href="{{ route('marhun.exportmarhundetailspembida', ['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>
|
|
||||||
{{-- <a class="btn m-1 btn-info" href=" {{ route('marhun.scanbarcodejual', ['lelong_id'=>$lel['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Serahan Kepada Pembida"><i class="far fa-edit"></i></a> --}}
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@empty
|
|
||||||
<tr>
|
|
||||||
<td colspan="6">No Data</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
@endforelse
|
<ul class="nav mb-2 nav-tabs" id="myTab" role="tablist">
|
||||||
</tbody>
|
<li class="nav-item">
|
||||||
</table>
|
<a class="nav-link active" id="scan-keluar-tab" data-toggle="tab" href="#scan-keluar" role="tab" aria-controls="scan-keluar" aria-selected="false">
|
||||||
|
Lelong Hari Ini ( {{sizeof($arraydetails0)}}/{{sizeof($lelongAll)}} )
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" id="sedang-lelong-tab" data-toggle="tab" href="#sedang-lelong" role="tab" aria-controls="sedang-lelong" aria-selected="false">
|
||||||
|
Lelong Selesai ( {{sizeof($arraydetails1)}}/{{sizeof($lelongAll)}} )
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="tab-content" style="overflow-x: auto;" id="myTabContent">
|
||||||
|
<div class="tab-pane fade show active" id="scan-keluar" role="tabpanel" aria-labelledby="scan-keluar-tab">
|
||||||
|
<div style="overflow-x: auto;">
|
||||||
|
<table class="table table-bordered text-center" id="lelong-belum">
|
||||||
|
<thead class="bg-primary text-white">
|
||||||
|
<tr>
|
||||||
|
<th>No</th>
|
||||||
|
<th>Batch Lelong</th>
|
||||||
|
<th>Tarikh Lelong</th>
|
||||||
|
<th>Nama Pembida</th>
|
||||||
|
<th>Status Lelong</th>
|
||||||
|
<th>Tindakan</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@forelse($arraydetails0 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 style='white-space:nowrap;' align = 'left'>
|
||||||
|
{{-- @if(!empty($listwinner)) --}}
|
||||||
|
@foreach($lel['listwinner'] as $winner)
|
||||||
|
<a class="btn m-1 btn-info" href=" {{ route('marhun.scanbarcodejualbycust', ['lelong_id'=>$lel['info']['lelong_id'], 'userid'=>$winner['details']['id']]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Bidaan"><i class="far fa-edit"></i></a>
|
||||||
|
{{ $winner['details']['name']}}<br>
|
||||||
|
@endforeach
|
||||||
|
{{-- @endif --}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@if($lel['info']['sts_lelong'] == 3)
|
||||||
|
<button class="btn btn-success btn-sm" disabled>LELONG SELESAI</button>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@if($lel['info']['sts_lelong'] == 3)
|
||||||
|
<a class="btn m-1 btn-warning" href="{{ route('marhun.exportmarhundetailspembida', ['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>
|
||||||
|
{{-- <a class="btn m-1 btn-info" href=" {{ route('marhun.scanbarcodejual', ['lelong_id'=>$lel['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Serahan Kepada Pembida"><i class="far fa-edit"></i></a> --}}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="6">No Data</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@endforelse
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="sedang-lelong" role="tabpanel" aria-labelledby="sedang-keluar-tab">
|
||||||
|
<div style="overflow-x: auto;">
|
||||||
|
|
||||||
|
<table class="table table-bordered text-center" id="lelong-sedang">
|
||||||
|
<thead class="bg-primary text-white">
|
||||||
|
<tr>
|
||||||
|
<th>No</th>
|
||||||
|
<th>Batch Lelong</th>
|
||||||
|
<th>Tarikh Lelong</th>
|
||||||
|
<th>Nama Pembida</th>
|
||||||
|
<th>Status Lelong</th>
|
||||||
|
<th>Tindakan</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@forelse($arraydetails1 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 style='white-space:nowrap;' align = 'left'>
|
||||||
|
{{-- @if(!empty($listwinner)) --}}
|
||||||
|
@foreach($lel['listwinner'] as $winner)
|
||||||
|
<a class="btn m-1 btn-info" href=" {{ route('marhun.scanbarcodejualbycust', ['lelong_id'=>$lel['info']['lelong_id'], 'userid'=>$winner['details']['id']]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Bidaan"><i class="far fa-edit"></i></a>
|
||||||
|
{{ $winner['details']['name']}}<br>
|
||||||
|
@endforeach
|
||||||
|
{{-- @endif --}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@if($lel['info']['sts_lelong'] == 3)
|
||||||
|
<button class="btn btn-success btn-sm" disabled>LELONG SELESAI</button>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@if($lel['info']['sts_lelong'] == 3)
|
||||||
|
<a class="btn m-1 btn-warning" href="{{ route('marhun.exportmarhundetailspembida', ['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>
|
||||||
|
{{-- <a class="btn m-1 btn-info" href=" {{ route('marhun.scanbarcodejual', ['lelong_id'=>$lel['info']['lelong_id']]) }} " data-toggle="tooltip" data-placement="top" title="Serahan Kepada Pembida"><i class="far fa-edit"></i></a> --}}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="6">No Data</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@endforelse
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
//Enable tooltips everywhere
|
||||||
$(function() {
|
$(function() {
|
||||||
$('[data-toggle="tooltip"]').tooltip()
|
$('[data-toggle="tooltip"]').tooltip()
|
||||||
})
|
})
|
||||||
|
|
||||||
var tablesenarailelongonline = $('#senarailelongonline').DataTable({
|
$('a.confirmdel').confirm({
|
||||||
"columnDefs": [{
|
title: 'Padam Simulasi',
|
||||||
"targets": 0,
|
content: 'Adakah anda pasti? Tindakan ini tidak dapat dikembalikan.',
|
||||||
"orderable": false
|
icon: 'fa fa-exclamation-triangle',
|
||||||
|
type: 'red',
|
||||||
|
boxWidth: '500px',
|
||||||
|
useBootstrap: false,
|
||||||
|
typeAnimated: true,
|
||||||
|
buttons: {
|
||||||
|
|
||||||
|
Batal: {
|
||||||
|
btnClass: 'btn-default',
|
||||||
|
action: function() {}
|
||||||
},
|
},
|
||||||
{
|
Padam: {
|
||||||
"targets": 3,
|
btnClass: 'btn-red',
|
||||||
"orderable": false
|
action: function() {
|
||||||
}
|
location.href = this.$target.attr('href');
|
||||||
],
|
$.dialog({
|
||||||
order: [
|
icon: 'fa fa-spinner fa-spin',
|
||||||
[1, 'asc']
|
title: 'Dalam Proses !',
|
||||||
],
|
content: 'Halaman akan dikemaskini selepas proses selesai.',
|
||||||
"info": false,
|
closeIcon: false,
|
||||||
"lengthChange": false,
|
boxWidth: '500px',
|
||||||
"pageLength": 15,
|
useBootstrap: false,
|
||||||
dom: 'Bfrtip',
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('a.confirmrefresh').confirm({
|
||||||
|
title: 'Kemaskini Simulasi',
|
||||||
|
content: 'Adakah anda pasti? Tindakan ini tidak dapat dikembalikan.',
|
||||||
|
icon: 'fa fa-exclamation-triangle',
|
||||||
|
type: 'orange',
|
||||||
|
boxWidth: '500px',
|
||||||
|
useBootstrap: false,
|
||||||
|
typeAnimated: true,
|
||||||
|
buttons: {
|
||||||
|
Batal: {
|
||||||
|
btnClass: 'btn-default',
|
||||||
|
action: function() {}
|
||||||
|
|
||||||
|
},
|
||||||
|
Kemaskini: {
|
||||||
|
btnClass: 'btn-orange',
|
||||||
|
action: function() {
|
||||||
|
location.href = this.$target.attr('href');
|
||||||
|
$.dialog({
|
||||||
|
icon: 'fa fa-spinner fa-spin',
|
||||||
|
title: 'Dalam Proses !',
|
||||||
|
content: 'Halaman akan dikemaskini selepas proses selesai.',
|
||||||
|
closeIcon: false,
|
||||||
|
boxWidth: '500px',
|
||||||
|
useBootstrap: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.addsim').tooltip();
|
||||||
|
$('.export').tooltip();
|
||||||
|
// $( '.dt-buttons').addClass('btn-group');
|
||||||
|
$('.addsim').removeClass('dt-button');
|
||||||
|
$('.export').removeClass('dt-button');
|
||||||
|
|
||||||
|
var tableLelongSemasa = $('#lelong-semasa').DataTable({
|
||||||
|
"pageLength": 100,
|
||||||
|
});
|
||||||
|
var tableLelongSedang = $('#lelong-sedang').DataTable({
|
||||||
|
"pageLength": 100,
|
||||||
|
});
|
||||||
|
var tableLelongBelum = $('#lelong-belum').DataTable({
|
||||||
|
"pageLength": 100,
|
||||||
|
});
|
||||||
|
var tableLelongJanaPemenang = $('#lelong-jana-pemenang').DataTable({
|
||||||
|
"pageLength": 100,
|
||||||
|
});
|
||||||
|
var tableLelongSelesai = $('#lelong-selesai').DataTable({
|
||||||
|
"pageLength": 100,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user