|
@@ -1,7 +1,7 @@
|
|
|
<?php
|
|
|
namespace App\Distributor\Actions\Extensions;
|
|
|
|
|
|
-use Dcat\Admin\Grid\Tools\AbstractTool;
|
|
|
+
|
|
|
use Dcat\Admin\Widgets\Modal;
|
|
|
use App\Distributor\Forms\ImportProduct;
|
|
|
use Dcat\Admin\Grid\BatchAction;
|
|
@@ -26,33 +26,19 @@ class DistProductImportForm extends BatchAction
|
|
|
->onShow($this->getModalScript())
|
|
|
->button($this->getButtonHTML());
|
|
|
|
|
|
-
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- * 填充选择的产品ID
|
|
|
- * @return string
|
|
|
- */
|
|
|
protected function getModalScript()
|
|
|
{
|
|
|
|
|
|
return <<<JS
|
|
|
|
|
|
var key = {$this->getSelectedKeysScript()}
|
|
|
- if (key.length > 0) {
|
|
|
- $('#product_ids').val(key.join(','));
|
|
|
- } else {
|
|
|
- $('#product_ids').val('');
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
-JS;
|
|
|
+ $('#product_ids').val(key);
|
|
|
+ JS;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
* 获取按钮的 HTML
|
|
@@ -72,4 +58,5 @@ JS;
|
|
|
</button>
|
|
|
HTML;
|
|
|
}
|
|
|
+
|
|
|
}
|