链街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.

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