You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
791 B
36 lines
791 B
<?php
|
|
|
|
|
|
namespace App\Admin\Extensions;
|
|
|
|
|
|
use App\Admin\Forms\RefundNote;
|
|
use Dcat\Admin\Grid\RowAction;
|
|
use Dcat\Admin\Widgets\Modal;
|
|
|
|
class OrderRefund extends RowAction
|
|
{
|
|
protected $title;
|
|
protected $order_id;
|
|
protected $currentPage;
|
|
public function __construct($orderId,$currentPage,$title=null)
|
|
{
|
|
$this->order_id = $orderId;
|
|
$this->currentPage = $currentPage;
|
|
parent::__construct($title);
|
|
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
|
|
// 实例化表单类并传递自定义参数
|
|
$form = RefundNote::make(['order_id'=>$this->order_id,'current_page'=>$this->currentPage]);
|
|
return Modal::make()
|
|
->lg()
|
|
->title('拒绝理由')
|
|
->body($form)
|
|
->button($this->title);
|
|
|
|
}
|
|
}
|