generated from liutk/owl-admin-base
admin agreement
parent
57fd08dc41
commit
cb8a32101b
|
|
@ -136,8 +136,9 @@ class AgreementController extends AdminController
|
||||||
$filename = time().'.zip';
|
$filename = time().'.zip';
|
||||||
$filepath = storage_path('app/' . $filename);
|
$filepath = storage_path('app/' . $filename);
|
||||||
$zip->open($filepath, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
|
$zip->open($filepath, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
|
||||||
|
$baseUrl = Storage::disk('public')->url('');
|
||||||
foreach($model->images as $item) {
|
foreach($model->images as $item) {
|
||||||
$path = data_get($item, 'value');
|
$path = str_replace($baseUrl, '', $item);
|
||||||
$info = pathinfo($path);
|
$info = pathinfo($path);
|
||||||
$zip->addFile(Storage::disk('public')->path($path), data_get($info, 'basename'));
|
$zip->addFile(Storage::disk('public')->path($path), data_get($info, 'basename'));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ class EmployeeSignRepairService extends BaseService
|
||||||
'employee_id' => $data['employee_id'],
|
'employee_id' => $data['employee_id'],
|
||||||
'sign_time' => $data['sign_time']
|
'sign_time' => $data['sign_time']
|
||||||
])->exists()) {
|
])->exists()) {
|
||||||
return '已经打过卡了';
|
return '已经补过卡了';
|
||||||
}
|
}
|
||||||
// todo 已经打卡不能申请
|
// todo 已经打卡不能申请
|
||||||
// todo 验证申请时间是否重复
|
// todo 验证申请时间是否重复
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,11 @@ class EmployeeSignService extends BaseService
|
||||||
|
|
||||||
protected string $modelFilterName = EmployeeSignFilter::class;
|
protected string $modelFilterName = EmployeeSignFilter::class;
|
||||||
|
|
||||||
|
public function sortColumn()
|
||||||
|
{
|
||||||
|
return 'date';
|
||||||
|
}
|
||||||
|
|
||||||
public function preDelete(array $ids): void
|
public function preDelete(array $ids): void
|
||||||
{
|
{
|
||||||
// 删除打卡日志
|
// 删除打卡日志
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue