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
51 lines
1.2 KiB
<?php
|
|
|
|
namespace App\Admin\Actions\Grid\v3;
|
|
|
|
use Dcat\Admin\Grid\RowAction;
|
|
use Dcat\Admin\Widgets\Modal;
|
|
use App\Admin\Forms\v3\CouponTimeForm;
|
|
|
|
class CouponTime extends RowAction
|
|
{
|
|
/**
|
|
* 修改优惠券活动时间
|
|
* @return string
|
|
*/
|
|
protected $title = ' 时间 ';
|
|
|
|
public function render()
|
|
{
|
|
$id = $this->getKey();
|
|
|
|
$modal = Modal::make()
|
|
->xl()
|
|
->title($this->title)
|
|
->body(CouponTimeForm::make()->setKey($id)->payload([
|
|
'id'=>$this->row->id,
|
|
'inventory'=>$this->row->inventory,
|
|
'title'=>$this->row->title,
|
|
'start_time'=>$this->row->start_time,
|
|
'end_time'=>$this->row->end_time,
|
|
'usable_start_time'=>$this->row->usable_start_time,
|
|
'usable_end_time'=>$this->row->usable_end_time,
|
|
]))
|
|
->button($this->title);
|
|
|
|
return $modal;
|
|
}
|
|
|
|
// 确认弹窗信息
|
|
public function confirm()
|
|
{
|
|
return '您确定要修改时间吗?';
|
|
}
|
|
|
|
public function parameters()
|
|
{
|
|
|
|
return [
|
|
|
|
];
|
|
}
|
|
}
|