generated from liutk/owl-admin-base
53 lines
2.2 KiB
PHP
53 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace App\Admin\Controllers\Hr;
|
|
|
|
use App\Admin\Controllers\AdminController;
|
|
use App\Admin\Services\EmployeeSignService;
|
|
use Slowlyo\OwlAdmin\Renderers\Form;
|
|
use Slowlyo\OwlAdmin\Renderers\Page;
|
|
|
|
/**
|
|
* 考勤打卡
|
|
*/
|
|
class SignController extends AdminController
|
|
{
|
|
protected string $serviceName = EmployeeSignService::class;
|
|
|
|
public function list(): Page
|
|
{
|
|
$crud = $this->baseCRUD()
|
|
->tableLayout('fixed')
|
|
->headerToolbar([
|
|
...$this->baseHeaderToolBar(),
|
|
])
|
|
->bulkActions([])
|
|
->filter($this->baseFilter()->body([
|
|
amis()->GroupControl()->mode('horizontal')->body([
|
|
amisMake()->SelectControl()->source(admin_url('api/stores?_all=1'))->labelField('title')->valueField('id')->searchable()->name('store_id')->label(__('employee_sign.store_id'))->columnRatio(3)->clearable(),
|
|
amisMake()->TextControl()->name('employee_name')->label(__('employee_sign.employee_id'))->placeholder(__('employee.name').'/'.__('employee.phone'))->columnRatio(3)->clearable(),
|
|
amisMake()->DateRangeControl()->name('date_range')->label(__('employee_sign.date'))->columnRatio(3)->clearable(),
|
|
]),
|
|
]))
|
|
->columns([
|
|
amisMake()->TableColumn()->name('store.name')->label(__('employee_sign.store_id')),
|
|
amisMake()->TableColumn()->name('employee.name')->label(__('employee.name')),
|
|
amisMake()->TableColumn()->name('sign_type')->label(__('employee_sign.sign_type')),
|
|
amisMake()->TableColumn()->name('first_time')->label(__('employee_sign.first_time')),
|
|
amisMake()->TableColumn()->name('last_time')->label(__('employee_sign.last_time')),
|
|
amisMake()->TableColumn()->name('sign_status')->label(__('employee_sign.sign_status')),
|
|
$this->rowActions([
|
|
$this->rowShowButton(),
|
|
]),
|
|
]);
|
|
|
|
return $this->baseList($crud);
|
|
}
|
|
|
|
public function detail(): Form
|
|
{
|
|
return $this->baseDetail()->title('')->body(amisMake()->Property()->items([
|
|
]));
|
|
}
|
|
}
|