6
0
Fork 0
jiqu-library-server/app/Admin/Actions/Store/ShowOrderPrint.php

32 lines
606 B
PHP

<?php
namespace App\Admin\Actions\Store;
use Dcat\Admin\Show\AbstractTool;
use App\Models\Store\Desk;
class ShowOrderPrint extends AbstractTool
{
protected $title = '打印小票';
protected $style = 'btn btn-sm btn-warning mr-1';
public function handle()
{
$id = $this->getKey();
return $this->response()->success('操作成功');
}
public function confirm()
{
return ['是否确定?', '打印小票'];
}
public function allowed()
{
$model = $this->parent->model();
return $model->source_type == Desk::class;
}
}