6
0
Fork 0
jiqu-library-server/app/Admin/Extensions/Grid/Tools/ProfitBatchSuccess.php

35 lines
802 B
PHP

<?php
namespace App\Admin\Extensions\Grid\Tools;
use App\Admin\Forms\ProfitSuccessForm;
use Dcat\Admin\Grid\BatchAction;
use Dcat\Admin\Widgets\Modal;
class ProfitBatchSuccess extends BatchAction
{
protected $title = '支付';
protected function html()
{
$form = ProfitSuccessForm::make();
return Modal::make()
->lg()
->title($this->title)
->body($form)
->onLoad($this->getModalScript())
->button($this->title);
}
protected function getModalScript()
{
// 弹窗显示后往隐藏的id表单中写入批量选中的行ID
return <<<JS
// 获取选中的ID数组
var key = {$this->getSelectedKeysScript()}
$('#order-profit-ids').val(key);
JS;
}
}