3 changed files with 71 additions and 3 deletions
-
2app/Admin/Controllers/ImsCjdcOrderMainController.php
-
17app/Admin/Controllers/v3/GoodsController.php
-
55app/Admin/Extensions/OrderDetailCopy.php
@ -0,0 +1,55 @@ |
|||
<?php |
|||
|
|||
|
|||
namespace App\Admin\Extensions; |
|||
|
|||
use Dcat\Admin\Grid\RowAction; |
|||
use Dcat\Admin\Widgets\Modal; |
|||
use Illuminate\Http\Request; |
|||
|
|||
|
|||
class OrderDetailCopy 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 = MyDetailPage::make(['order_id' => $this->order_id]); |
|||
return Modal::make() |
|||
->xl() |
|||
->title('订单详情') |
|||
->body($form) |
|||
->button($this->title); |
|||
|
|||
} |
|||
|
|||
// /**
|
|||
// * 添加JS
|
|||
// * @return string
|
|||
// */
|
|||
// protected function script()
|
|||
// {
|
|||
// return <<<JS
|
|||
//$('.detail_{$this->order_id}').on('click', function () {
|
|||
// window.location.href ="detail?order_id={$this->order_id}&page={$this->currentPage}";
|
|||
// });
|
|||
//JS;
|
|||
// }
|
|||
//
|
|||
public function html() |
|||
{ |
|||
$this->setHtmlAttribute(['class'=>"detail_{$this->order_id}"]); |
|||
return parent::html(); |
|||
} |
|||
|
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue