update: lấy dữ liệu mã thẻ từ thiết bị, mở cửa từ phần mềm

This commit is contained in:
2020-10-26 14:25:49 +07:00
parent 579ec676cb
commit 2b88dbb695
7 changed files with 138 additions and 7 deletions

View File

@@ -68,8 +68,14 @@
'value' => \app\helpers\DeviceGrid::checkbox("device", false)
],
'name',
'serial',
'ip_address',
[
'attribute' => 'serial',
'headerOptions' => ['style' => 'width:10%']
],
[
'attribute' => 'ip_address',
'headerOptions' => ['style' => 'width:10%']
],
'subnet_mask',
'gateway',
'mac_address',
@@ -80,7 +86,11 @@
'contentOptions' => ['class' => 'text-center'],
'value' => \app\helpers\DeviceGrid::status($statusArray)
],
'type',
[
'attribute' => 'type',
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['style' => 'width:5%']
],
[
'attribute' => 'area_id',
'format' => 'raw',
@@ -88,7 +98,12 @@
'contentOptions' => ['class' => 'text-center'],
'value' => \app\helpers\DeviceGrid::area($areaArray)
],
'version'
'version',
[
'format' => 'raw',
'headerOptions' => ['style' => 'width:10%'],
'value' => \app\helpers\DeviceGrid::openDoor()
]
]
])}
{/Pjax}

View File

@@ -81,9 +81,28 @@
<div class="input-group">
<div class="input-group-addon">Mã thẻ</div>
<input type="number" class="form-control" value="{$model->card_number|default:""}" name="CardNumber">
<div class="input-group-btn">
<button class="btn btn-warning" onclick="formGetRTLog(this);" data-stt="true" id="btn-get-rtlog">
<i class="fa fa-credit-card"></i>
</button>
</div>
</div>
<span class="help-block hidden"></span>
</div>
<div class="form-group hidden" id='device-lists'>
<div class="input-group">
<div class="input-group-addon">Chọn thiết bị</div>
<select class="form-control" name='Device'>
{html_options options=$deviceArray}
</select>
<div class="input-group-btn">
<button class="btn btn-info" onclick="getRTLog(this);" data-href='{yii\helpers\Url::to(["get-rtlog"])}' title='Lấy mã thẻ từ đầu đọc'>
<i class="fa fa-download"></i>
</button>
</div>
</div>
<span class="help-block hidden"></span>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-addon">Phòng ban</div>