update gán lịch trình cho nhân viên
This commit is contained in:
133
views/assign/index.tpl
Normal file
133
views/assign/index.tpl
Normal file
@@ -0,0 +1,133 @@
|
||||
{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\AssignAsset"}
|
||||
{AssignAsset::register($this)|void}
|
||||
{block name='content'}
|
||||
<style>
|
||||
.table-staff-schedule{
|
||||
font-size: 13px;
|
||||
}
|
||||
.table-staff-schedule th,td{
|
||||
padding: 3px !important;
|
||||
}
|
||||
.department-schedule-active{
|
||||
background: #cecece;
|
||||
}
|
||||
#form-special-schedule .input-group-addon{
|
||||
width: 120px !important;
|
||||
}
|
||||
#schedule-search-staff{
|
||||
height: 700px;
|
||||
background: #cecece;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
#schedule-search-staff::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
#create-schedule-main{
|
||||
border-left: 1px solid #cecece;
|
||||
margin-bottom: -10px;
|
||||
margin-top: -10px;
|
||||
padding: 10px;
|
||||
}
|
||||
.assign-index{
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
<div class="assign-index">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<fieldset id='schedule-department-tree' style="overflow-y: scroll;">
|
||||
<legend>Chọn phòng ban</legend>
|
||||
<div style="cursor: pointer;">
|
||||
<i class="fa fa-minus-square-o" onclick="schedule.tree(this);" data="1" data-stt="true"></i>
|
||||
<b class="department-schedule" onclick="schedule.chooseDepartment(this);" data-href='{yii\helpers\Url::to(['/assign/staff','id'=> 1])}'>
|
||||
{$company->name}
|
||||
{$staff=$company->countStaff}
|
||||
{if $staff>0}
|
||||
[<span class="text-red">{$staff}</span>]
|
||||
{/if}
|
||||
</b>
|
||||
<div id="sub-department-schedule-1" style="padding-left: 20px;">
|
||||
{\app\widgets\ScheduleDepartment::widget(["pid"=>1])}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-md-6" id='create-schedule-main'>
|
||||
<fieldset>
|
||||
<legend>Danh sách nhân viên</legend>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type='text' class="form-control" onchange="schedule.searchStaff(this);" data-href='{yii\helpers\Url::to(['/assign/search-staff'])}' name='ScheduleSearchStaff' placeholder="Tìm kiếm nhân viên ...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-primary">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='schedule-search-staff'>
|
||||
<table class="table table-bordered table-striped table-staff-schedule">
|
||||
<thead>
|
||||
<tr class="info">
|
||||
<th style="width: 5%;"></th>
|
||||
<th style="width: 20%;">Mã nhân viên</th>
|
||||
<th>Tên nhân viên</th>
|
||||
<th>Phòng ban</th>
|
||||
<th>Lịch trình</th>
|
||||
<th>Cửa</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<fieldset id='schedule-door-lists' style="overflow-y: scroll;">
|
||||
<legend>Cấp quyền truy cập</legend>
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">Chọn lịch trình</div>
|
||||
<select class="form-control" name="ScheduleLists">
|
||||
{html_options options=$scheduleArray}
|
||||
</select>
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="schedule.setSchedule(this);" data-href="{yii\helpers\Url::to(['/assign/set-schedule'])}">
|
||||
<i class="fa fa-arrow-right"></i> Thực hiện
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<table class="table table-bordered table-striped table-staff-schedule" style="background: #fff;">
|
||||
<thead>
|
||||
<tr class="info">
|
||||
<th style="width: 10%;" class="text-center">
|
||||
<input type='checkbox' value='0' class='checkbox-door-schedule' id='checkall-door-schedule'>
|
||||
</th>
|
||||
<th>Cửa</th>
|
||||
<th>Thiết bị</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$doorLists item=door}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type='checkbox' value='{$door->id}' name='checkbox-door-schedule' class='checkbox-door-schedule'>
|
||||
</td>
|
||||
<td>{$door->name}</td>
|
||||
<td>{$deviceArray[$door->device_id]}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
41
views/assign/staff.tpl
Normal file
41
views/assign/staff.tpl
Normal file
@@ -0,0 +1,41 @@
|
||||
<style>
|
||||
.choose-staff-schedule{
|
||||
cursor: pointer;
|
||||
}
|
||||
.choose-staff-schedule:hover{
|
||||
background: #cecece;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
Danh sách có <b class="text-red">{count($staffs)}</b> nhân viên.
|
||||
</div>
|
||||
<table class="table table-bordered table-striped table-staff-schedule" style="background: #fff;">
|
||||
<thead>
|
||||
<tr class="info">
|
||||
<th style="width: 5%;" class="text-center">
|
||||
<input type='checkbox' value='0' class='checkbox-staff-schedule' id='checkall-staff-schedule'>
|
||||
</th>
|
||||
<th style="width: 20%;">Mã nhân viên</th>
|
||||
<th>Tên nhân viên</th>
|
||||
<th>Phòng ban</th>
|
||||
<th>Lịch trình</th>
|
||||
<th>Cửa</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$staffs item=s}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type='checkbox' value='{$s->id}' name='checkbox-staff-schedule' class='checkbox-staff-schedule'>
|
||||
</td>
|
||||
<td>{$s->code}</td>
|
||||
<td class="choose-staff-schedule">
|
||||
{$s->name}
|
||||
</td>
|
||||
<td>{$departmentArray[$s->department_id]|default:""}</td>
|
||||
<td id="schedule-staff-results-{$s->id}">{$scheduleArray[$s->schedule_id]|default:""}</td>
|
||||
<td id="schedule-door-results-{$s->id}">{$s->doors}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user