38 lines
917 B
PHP
38 lines
917 B
PHP
<?php
|
|
|
|
namespace App\Admin\Actions\Show;
|
|
|
|
use App\Admin\Forms\OrderPackage;
|
|
use Dcat\Admin\Show\AbstractTool;
|
|
use Dcat\Admin\Widgets\Modal;
|
|
|
|
class OrderCreatePackage extends AbstractTool
|
|
{
|
|
public function __construct($id, $title = null)
|
|
{
|
|
parent::__construct($title);
|
|
$this->setKey($id);
|
|
}
|
|
/**
|
|
* @return string
|
|
*/
|
|
protected $title = '<i class="feather icon-package"></i> 发货';
|
|
|
|
/**
|
|
* 按钮样式定义,默认 btn btn-white waves-effect
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $style = 'btn-warning';
|
|
|
|
public function render()
|
|
{
|
|
$form = OrderPackage::make()->payload(['id'=>$this->getKey()]);
|
|
return Modal::make()
|
|
->lg()
|
|
->title($this->title)
|
|
->body($form)
|
|
->button("<a href=\"javascript:void(0)\" class=\"btn btn-sm {$this->style}\">{$this->title}</a> ");
|
|
}
|
|
}
|