update socket
This commit is contained in:
114
views/dashboard/index.tpl
Normal file
114
views/dashboard/index.tpl
Normal file
@@ -0,0 +1,114 @@
|
||||
{extends file=$smarty.current_dir|cat:'/../extends.tpl'}
|
||||
{use class="yii\helpers\Url"}
|
||||
{use class="yii\grid\GridView"}
|
||||
{use class="app\assets\DashboardAsset"}
|
||||
{DashboardAsset::register($this)|void}
|
||||
{block name='content'}
|
||||
<input type="hidden" value="{Url::to(['/logs/save'])}" name="saveUrl">
|
||||
<input type="hidden" value="{date("d/m/Y")}" name="currentDay">
|
||||
<h2 class="text-center" style="font-family: Time New Roman;color:#009;font-weight: bold;">{"XE RA/VÀO NGÀY "|cat:date("d/m/Y")|upper}</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="text-left" style="margin-bottom: 10px;font-size: 20px;">
|
||||
Tổng số xe vào: <b class="text-green" id="totals-in">{$in}</b>
|
||||
<br>
|
||||
Tổng số xe ra: <b class="text-red" id="totals-out">{$out}</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<a href="{Url::to(['/logs'])}" class="btn btn-primary" target="_blank">
|
||||
<i class="fa fa-bar-chart"></i> Thống kê
|
||||
</a>
|
||||
<a href="{Url::to(['/logs-unknow'])}" class="btn btn-danger" target="_blank">
|
||||
<i class="fa fa-truck"></i> Xe khác
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-striped table-bordered" style="background:#fff;min-width:700px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Biển số</th>
|
||||
<th>Loại xe</th>
|
||||
<th style="width: 15%;">Tên công ty</th>
|
||||
<th style="width: 10%;">Lái xe</th>
|
||||
<th>Điện thoại</th>
|
||||
<th style="width: 7%;">CMT</th>
|
||||
<th>Factory</th>
|
||||
<th>SEAL_NO</th>
|
||||
<th style="width: 8%;">Ảnh biển vào</th>
|
||||
<th style="width: 7%;">Thời gian vào</th>
|
||||
<th style="width: 8%;">Ảnh biển ra</th>
|
||||
<th style="width: 7%;">Thời gian ra</th>
|
||||
<th>Nội dung khác</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="logs-lists">
|
||||
{foreach from=$results item=arr}
|
||||
<tr id="logs-{$arr->id}">
|
||||
<td>{$arr->vehicle->plate}</td>
|
||||
<td>{$arr->vehicle->type}</td>
|
||||
<td>{$arr->vehicle->company}</td>
|
||||
<td>
|
||||
{$data=explode("/",$arr->vehicle->driver)}
|
||||
{implode("<br>",$data)}
|
||||
</td>
|
||||
<td>
|
||||
{$data=explode("/",$arr->vehicle->telephone)}
|
||||
{implode("<br>",$data)}
|
||||
</td>
|
||||
<td>
|
||||
{$data=explode("/",$arr->vehicle->indentity_card)}
|
||||
{implode("<br>",$data)}
|
||||
</td>
|
||||
<td>
|
||||
<div style='cursor:pointer;' onclick='openForm(this, "factory");' data-id='{$arr->id}' data-text='{$arr->factory}'>
|
||||
{if $arr->factory == null}
|
||||
<i class='text-red'>không có</i>
|
||||
{else}
|
||||
{$arr->factory}
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div style='cursor:pointer;' onclick='openForm(this, "seal_no");' data-id='{$arr->id}' data-text='{$arr->seal_no}'>
|
||||
{if $arr->seal_no == null}
|
||||
<i class='text-red'>không có</i>
|
||||
{else}
|
||||
{$arr->seal_no}
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if $arr->time_in}
|
||||
<img src="{Yii::$app->request->hostInfo}/AIParking_Intops_Server/web/data/uploads/{$arr->plate_image_in}" class="img-thumbnail" style="width:100%;">
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if $arr->time_in}
|
||||
{$common->formatTime($arr->time_in,"H:i:s d/m/Y")}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if $arr->time_out}
|
||||
<img src="{Yii::$app->request->hostInfo}/AIParking_Intops_Server/web/data/uploads/{$arr->plate_image_out}" class="img-thumbnail" style="width:100%;">
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if $arr->time_out}
|
||||
{$common->formatTime($arr->time_out,"H:i:s d/m/Y")}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<div style='cursor:pointer;' onclick='openForm(this, "note");' data-id='{$arr->id}' data-text='{$arr->note}'>
|
||||
{if $arr->note == null}
|
||||
<i class='text-red'>không có</i>
|
||||
{else}
|
||||
{$arr->note}
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{/block}
|
||||
@@ -4,6 +4,7 @@
|
||||
{use class="app\assets\LogsAsset"}
|
||||
{LogsAsset::register($this)|void}
|
||||
{block name='content'}
|
||||
<input type="hidden" value="{Url::to(['/logs-unknow/save'])}" name="saveUrl">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
@@ -44,8 +45,16 @@
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
'plate',
|
||||
'factory',
|
||||
'seal_no',
|
||||
[
|
||||
'attribute' => 'factory',
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\LogsGrid::factory()
|
||||
],
|
||||
[
|
||||
'attribute' => 'seal_no',
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\LogsGrid::sealNo()
|
||||
],
|
||||
[
|
||||
'attribute' => "plate_image_in",
|
||||
'format' => 'raw',
|
||||
@@ -74,7 +83,11 @@
|
||||
'headerOptions' => ['style' => 'width:5%'],
|
||||
'value' => \app\helpers\LogsGrid::timeOut()
|
||||
],
|
||||
'note'
|
||||
[
|
||||
'attribute' => 'note',
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\LogsGrid::note()
|
||||
]
|
||||
]
|
||||
])}
|
||||
{/block}
|
||||
@@ -4,6 +4,15 @@
|
||||
{use class="app\assets\LogsAsset"}
|
||||
{LogsAsset::register($this)|void}
|
||||
{block name='content'}
|
||||
<style>
|
||||
.img-thumbnail{
|
||||
max-width: inherit;
|
||||
}
|
||||
.popover{
|
||||
max-width:600px;
|
||||
}
|
||||
</style>
|
||||
<input type="hidden" value="{Url::to(['/logs/save'])}" name="saveUrl">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
@@ -31,7 +40,12 @@
|
||||
<i class="fa fa-download"></i> Xuất báo cáo
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-2 col-md-push-4">
|
||||
<div class="col-md-1 col-md-push-3">
|
||||
<button class="btn btn-info" onclick="window.location.reload(true);">
|
||||
<i class="fa fa-refresh"></i> Làm mới
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-2 col-md-push-3">
|
||||
<a href="{Url::to(['/logs-unknow'])}" class="btn btn-danger">
|
||||
<i class="fa fa-truck"></i> Xe khác
|
||||
</a>
|
||||
@@ -62,23 +76,33 @@
|
||||
],
|
||||
[
|
||||
'attribute' => 'driver',
|
||||
'value' => 'vehicle.driver'
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\LogsGrid::driver()
|
||||
],
|
||||
[
|
||||
'attribute' => 'telephone',
|
||||
'value' => 'vehicle.telephone'
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\LogsGrid::telephone()
|
||||
],
|
||||
[
|
||||
'attribute' => 'cmt',
|
||||
'value' => 'vehicle.indentity_card'
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\LogsGrid::cmt()
|
||||
],
|
||||
[
|
||||
'attribute' => 'factory',
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\LogsGrid::factory()
|
||||
],
|
||||
[
|
||||
'attribute' => 'seal_no',
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\LogsGrid::sealNo()
|
||||
],
|
||||
'factory',
|
||||
'seal_no',
|
||||
[
|
||||
'attribute' => "plate_image_in",
|
||||
'format' => 'raw',
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'headerOptions' => ['style' => 'width:8%'],
|
||||
'value' => \app\helpers\LogsGrid::plateIn()
|
||||
],
|
||||
[
|
||||
@@ -92,7 +116,6 @@
|
||||
'attribute' => "plate_image_out",
|
||||
'format' => 'raw',
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'headerOptions' => ['style' => 'width:8%'],
|
||||
'value' => \app\helpers\LogsGrid::plateOut()
|
||||
],
|
||||
[
|
||||
@@ -102,7 +125,11 @@
|
||||
'headerOptions' => ['style' => 'width:5%'],
|
||||
'value' => \app\helpers\LogsGrid::timeOut()
|
||||
],
|
||||
'note'
|
||||
[
|
||||
'attribute' => 'note',
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\LogsGrid::note()
|
||||
]
|
||||
]
|
||||
])}
|
||||
{/block}
|
||||
Reference in New Issue
Block a user