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

51 lines
1.2 KiB

  1. <?php
  2. namespace App\Admin\Actions\Grid\v3;
  3. use Dcat\Admin\Grid\RowAction;
  4. use Dcat\Admin\Widgets\Modal;
  5. use App\Admin\Forms\v3\CouponTimeForm;
  6. class CouponTime extends RowAction
  7. {
  8. /**
  9. * 修改优惠券活动时间
  10. * @return string
  11. */
  12. protected $title = ' 时间 ';
  13. public function render()
  14. {
  15. $id = $this->getKey();
  16. $modal = Modal::make()
  17. ->xl()
  18. ->title($this->title)
  19. ->body(CouponTimeForm::make()->setKey($id)->payload([
  20. 'id'=>$this->row->id,
  21. 'inventory'=>$this->row->inventory,
  22. 'title'=>$this->row->title,
  23. 'start_time'=>$this->row->start_time,
  24. 'end_time'=>$this->row->end_time,
  25. 'usable_start_time'=>$this->row->usable_start_time,
  26. 'usable_end_time'=>$this->row->usable_end_time,
  27. ]))
  28. ->button($this->title);
  29. return $modal;
  30. }
  31. // 确认弹窗信息
  32. public function confirm()
  33. {
  34. return '您确定要修改时间吗?';
  35. }
  36. public function parameters()
  37. {
  38. return [
  39. ];
  40. }
  41. }