admin sign

main
panliang 2024-04-29 12:26:48 +08:00
parent de101d9010
commit c62c37360e
9 changed files with 10 additions and 14 deletions

View File

@ -65,7 +65,7 @@ class StoreMasterCommissionController extends AdminController
->method('post') ->method('post')
->data(['id' => '${workflow.id}']) ->data(['id' => '${workflow.id}'])
), ),
$this->cancelAction(), // $this->cancelAction(),
$this->rowEditTypeButton('drawer', 'lg') $this->rowEditTypeButton('drawer', 'lg')
->visible(Admin::user()->can('admin.finance.store_master_commissions.update')) ->visible(Admin::user()->can('admin.finance.store_master_commissions.update'))
->visibleOn('${OR(workflow.check_status == '.CheckStatus::None->value.', workflow.check_status == '.CheckStatus::Cancel->value.', workflow.check_status == '.CheckStatus::Fail->value.')}'), ->visibleOn('${OR(workflow.check_status == '.CheckStatus::None->value.', workflow.check_status == '.CheckStatus::Cancel->value.', workflow.check_status == '.CheckStatus::Fail->value.')}'),

View File

@ -71,7 +71,7 @@ class HolidayController extends AdminController
// $this->rowEditTypeButton('drawer', 'lg')->visibleOn('${ARRAYINCLUDES(row_actions, "edit")}'), // $this->rowEditTypeButton('drawer', 'lg')->visibleOn('${ARRAYINCLUDES(row_actions, "edit")}'),
$this->rowDeleteButton()->visibleOn('${ARRAYINCLUDES(row_actions, "delete")}'), $this->rowDeleteButton()->visibleOn('${ARRAYINCLUDES(row_actions, "delete")}'),
$this->applyAction()->visibleOn('${ARRAYINCLUDES(row_actions, "apply")}'), $this->applyAction()->visibleOn('${ARRAYINCLUDES(row_actions, "apply")}'),
$this->cancelAction()->visibleOn('${ARRAYINCLUDES(row_actions, "cancel")}'), // $this->cancelAction()->visibleOn('${ARRAYINCLUDES(row_actions, "cancel")}'),
]), ]),
]); ]);

View File

@ -84,7 +84,7 @@ class PromotionController extends AdminController
{ {
return $this->baseForm()->title('')->body([ return $this->baseForm()->title('')->body([
amisMake()->SelectControl()->name('employee_id')->label(__('employee_promotion.employee_id')) amisMake()->SelectControl()->name('employee_id')->label(__('employee_promotion.employee_id'))
->source(admin_url('api/employees?_all=1&store_id_gt=0&employee_status='.EmployeeStatus::Online->value)) ->source(admin_url('api/employees?_all=1&employee_status='.EmployeeStatus::Online->value))
->labelField('name') ->labelField('name')
->valueField('id') ->valueField('id')
->searchable() ->searchable()
@ -92,7 +92,7 @@ class PromotionController extends AdminController
->extractValue() ->extractValue()
->required(), ->required(),
amisMake()->SelectControl()->name('invitor_id')->label(__('employee_promotion.invitor_id')) amisMake()->SelectControl()->name('invitor_id')->label(__('employee_promotion.invitor_id'))
->source(admin_url('api/employees?_all=1&store_id_gt=0&employee_status='.EmployeeStatus::Online->value)) ->source(admin_url('api/employees?_all=1&employee_status='.EmployeeStatus::Online->value))
->labelField('name') ->labelField('name')
->valueField('id') ->valueField('id')
->searchable() ->searchable()

View File

@ -30,7 +30,7 @@ class SignController extends AdminController
->filter($this->baseFilter()->body([ ->filter($this->baseFilter()->body([
amis()->GroupControl()->mode('horizontal')->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()->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()->TextControl()->name('employee_search')->label(__('employee_sign.employee_id'))->placeholder(__('employee.name').'/'.__('employee.phone'))->columnRatio(3)->clearable(),
amisMake()->SelectControl()->options(SignType::options())->name('sign_type')->label(__('employee_sign.sign_type'))->columnRatio(3)->clearable(), amisMake()->SelectControl()->options(SignType::options())->name('sign_type')->label(__('employee_sign.sign_type'))->columnRatio(3)->clearable(),
amisMake()->SelectControl()->options(SignStatus::options())->name('sign_status')->label(__('employee_sign.sign_status'))->columnRatio(3)->clearable(), amisMake()->SelectControl()->options(SignStatus::options())->name('sign_status')->label(__('employee_sign.sign_status'))->columnRatio(3)->clearable(),
]), ]),

View File

@ -46,8 +46,8 @@ class SignController extends Controller
$date = now(); $date = now();
// 是否允许打卡 // 是否允许打卡
$enable = true; $enable = true;
// 上班/下班 打卡, 天是否打卡 // 上班/下班 打卡, 天是否打卡
$time = EmployeeSignLog::filter(['date' => $date->format('Y-m-d')])->exists() ? SignTime::Morning : SignTime::Afternoon; $time = EmployeeSignLog::filter(['date' => $date->format('Y-m-d')])->exists() ? SignTime::Afternoon : SignTime::Morning;
// 根据定位的距离判断, 是否外勤 // 根据定位的距离判断, 是否外勤
$maxDistance = AdminSettingService::make()->arrayGet('sign', 'distance'); $maxDistance = AdminSettingService::make()->arrayGet('sign', 'distance');

View File

@ -27,7 +27,7 @@ class TaskHygieneResource extends JsonResource
'created_at' => $this->created_at->timestamp, 'created_at' => $this->created_at->timestamp,
'store_master_id' => $this->store_master_id, 'store_master_id' => $this->store_master_id,
'store_master' => EmployeeResource::make($this->whenLoaded('storeMaster')), 'store_master' => EmployeeResource::make($this->whenLoaded('storeMaster')),
'task_id' => $this->task_id, 'workflow_check' => WorkflowCheckResource::make($this->whenLoaded('workflow')),
'task' => TaskResource::make($this->whenLoaded('task')), 'task' => TaskResource::make($this->whenLoaded('task')),
]; ];
} }

View File

@ -18,6 +18,7 @@ class WorkflowCheckResource extends JsonResource
{ {
$resource = $this->mapResource($this->subject_type); $resource = $this->mapResource($this->subject_type);
return [ return [
'id' => $this->id,
'check_status' => $this->check_status, 'check_status' => $this->check_status,
'check_status_text' => $this->check_status?->text(), 'check_status_text' => $this->check_status?->text(),
'checked_at' => $this->checked_at?->getTimestamp(), 'checked_at' => $this->checked_at?->getTimestamp(),

View File

@ -37,11 +37,6 @@ class SendWorkflowCheckSuccessNotification implements ShouldQueue
$applyAt = $event->workflowCheck->created_at; $applyAt = $event->workflowCheck->created_at;
} }
// 本地环境不发送短信
if (config('app.env') == 'local') {
return;
}
$client = new EasySms(config('easysms')); $client = new EasySms(config('easysms'));
$client->send($phone, [ $client->send($phone, [

View File

@ -140,7 +140,7 @@ return [
'roles' => '角色', 'roles' => '角色',
'lock' => '锁定', 'lock' => '锁定',
'edit_password' => '修改密码', 'edit_password' => '修改密码',
'search_username' => '搜索用户名/', 'search_username' => '搜索用户名/名',
'password_confirmation' => '两次输入密码不一致', 'password_confirmation' => '两次输入密码不一致',
'old_password_required' => '请输入原密码', 'old_password_required' => '请输入原密码',
'old_password_error' => '原密码错误', 'old_password_error' => '原密码错误',