43 lines
865 B
PHP
43 lines
865 B
PHP
<?php
|
|
|
|
namespace App\Admin\Extensions\Grid\Tools\Package;
|
|
|
|
use App\Admin\Forms\Imports\OrderPackageImport;
|
|
use Dcat\Admin\Grid\Tools\AbstractTool;
|
|
use Dcat\Admin\Widgets\Modal;
|
|
|
|
class Import extends AbstractTool
|
|
{
|
|
protected function authorize($user): bool
|
|
{
|
|
return $user->can('dcat.admin.order_packages.import');
|
|
}
|
|
|
|
/**
|
|
* 按钮样式定义,默认 btn btn-white waves-effect
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $style = 'btn btn btn-danger';
|
|
|
|
/**
|
|
* 按钮文本
|
|
*
|
|
* @return string|void
|
|
*/
|
|
public function title()
|
|
{
|
|
return '导入发货单';
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
$form = OrderPackageImport::make();
|
|
return Modal::make()
|
|
->lg()
|
|
->title($this->title())
|
|
->body($form)
|
|
->button($this->html());
|
|
}
|
|
}
|