链街Dcat后台
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.

43 lines
1020 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Admin\Extensions;
  3. use Dcat\Admin\Grid\RowAction;
  4. class OrderDetail extends RowAction
  5. {
  6. protected $title;
  7. protected $order_id;
  8. protected $currentPage;
  9. protected $last_url;
  10. public function __construct($orderId,$currentPage,$lastUrl,$title=null)
  11. {
  12. $this->order_id = $orderId;
  13. $this->currentPage = $currentPage;
  14. $this->last_url = $lastUrl;
  15. parent::__construct($title);
  16. }
  17. /**
  18. * 添加JS
  19. * @return string
  20. */
  21. protected function script()
  22. {
  23. return <<<JS
  24. $('.detail_{$this->order_id}').on('click', function () {
  25. //window.location.href ="detail?order_id={$this->order_id}&page={$this->currentPage}&last_url={$this->last_url}";
  26. window.open("detail?order_id={$this->order_id}&page={$this->currentPage}&last_url={$this->last_url}");
  27. });
  28. JS;
  29. }
  30. public function html()
  31. {
  32. $this->setHtmlAttribute(['class'=>"detail_{$this->order_id}"]);
  33. return parent::html();
  34. }
  35. }