12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace App\Distributor\Actions;
- use Dcat\Admin\Grid\BatchAction;
- use Illuminate\Http\Request;
- use App\Distributor\Forms\ImportProduct;
- use Dcat\Admin\Widgets\Modal;
- class BatchCopy extends BatchAction
- {
- protected $title = '产品导入';
-
- public function render()
- {
-
- $form = ImportProduct::make();
- return Modal::make()
- ->lg()
- ->title($this->title)
- ->body($form)
-
-
- ->onShow($this->getModalScript())
- ->button($this->title);
- }
-
- protected function getModalScript()
- {
-
- return <<<JS
- // 获取选中的ID数组
- var key = {$this->getSelectedKeysScript()}
- $('#product_ids').val(key);
- JS;
- }
- }
|