update tính năng thống kê chấm công và xuất dữ liệu chấm công
This commit is contained in:
11
views/logs/export.tpl
Normal file
11
views/logs/export.tpl
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">Chọn tháng</div>
|
||||
<input type='text' value="{date("m/Y")}" class="form-control" id='month' name='Month' readonly="">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" onclick="exportStatistics(this);" data-href='{$url}'>
|
||||
<i class="fa fa-download"></i> Xuất dữ liệu
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -62,9 +62,11 @@
|
||||
'value' => \app\helpers\LogsGrid::time()
|
||||
],
|
||||
[
|
||||
'attribute' => 'staff_id',
|
||||
'attribute' => 'staff_code',
|
||||
'format' => 'raw',
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'headerOptions' => ['style' => 'width:5%']
|
||||
'headerOptions' => ['style' => 'width:5%'],
|
||||
'value' => \app\helpers\LogsGrid::code()
|
||||
],
|
||||
[
|
||||
'attribute' => 'staff_name',
|
||||
|
||||
79
views/logs/statistics.tpl
Normal file
79
views/logs/statistics.tpl
Normal file
@@ -0,0 +1,79 @@
|
||||
{extends file=$smarty.current_dir|cat:'/../extends.tpl'}
|
||||
{use class="yii\helpers\Url"}
|
||||
{use class="yii\grid\GridView"}
|
||||
{use class="yii\widgets\Pjax" type="block"}
|
||||
{use class="app\assets\LogsAsset"}
|
||||
{LogsAsset::register($this)|void}
|
||||
{block name='content'}
|
||||
<style>
|
||||
.form-group{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
<div class="staff-index">
|
||||
<div class="row" style="font-size: 15px;">
|
||||
<div class="col-md-6">
|
||||
<label class="action-button" onclick="common.form(this, 'statistics');" data-href="{Url::to(['export-statistics-form'])}">
|
||||
<i class="fa fa-download fa-1-5x"></i> Xuất dữ liệu chấm công tháng
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-6" style="padding-top: 5px;">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4 col-md-push-8">
|
||||
<div class="input-group">
|
||||
<input type='text' value="{$day}" class="form-control" id='date' name='Date' readonly="">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-primary btn-block" onclick="statistics(this);" data-href='{Url::to(['statistics'])}'>
|
||||
<i class="fa fa-bar-chart"></i> Thống kê
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{Pjax id="staff-list"}
|
||||
{GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'layout'=> \app\helpers\CommonGrid::getLayout(),
|
||||
'tableOptions' => [
|
||||
'class' => 'table table-striped table-bordered table-hover',
|
||||
'style' => 'background:#fff;min-width:700px;'
|
||||
],
|
||||
'columns' => [
|
||||
[
|
||||
'class' => 'yii\grid\SerialColumn',
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'headerOptions' => ['class' => 'text-center', 'style' => 'width:3%']
|
||||
],
|
||||
'code',
|
||||
'name',
|
||||
[
|
||||
'attribute' => 'department_id',
|
||||
'filter' => $departmentArray,
|
||||
'value' => \app\helpers\StaffGrid::department($departmentArray)
|
||||
],
|
||||
[
|
||||
'attribute' => 'time_in',
|
||||
'value' => \app\helpers\StaffGrid::timeIn($staffLogs)
|
||||
],
|
||||
[
|
||||
'attribute' => 'time_out',
|
||||
'value' => \app\helpers\StaffGrid::timeOut($staffLogs)
|
||||
],
|
||||
[
|
||||
'attribute' => 'man_hour',
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'value' => \app\helpers\StaffGrid::manHour($staffLogs)
|
||||
],
|
||||
[
|
||||
'attribute' => 'man_day',
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'value' => \app\helpers\StaffGrid::manDay($staffLogs)
|
||||
]
|
||||
]
|
||||
])}
|
||||
{/Pjax}
|
||||
</div>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user