|
@@ -2,6 +2,8 @@
|
|
|
|
|
|
namespace App\Distributor\Controllers;
|
|
|
|
|
|
+use App\Distributor\Actions\Extensions\DistProductImport;
|
|
|
+use App\Distributor\Actions\Extensions\DistProductImportForm;
|
|
|
use App\Distributor\Repositories\BaseProduct;
|
|
|
use App\Admin\Repositories\BaseProductCategory;
|
|
|
use App\Distributor\Actions\BatchCopy;
|
|
@@ -23,7 +25,7 @@ class ImportProductController extends AdminController
|
|
|
{
|
|
|
return $content
|
|
|
->header('倒入产品')
|
|
|
- ->description('<span style="color: red; font-weight: bold;">After select,click "Selected" to import products.</span>')
|
|
|
+ ->description('<span style="color: red; font-weight: bold;">Select products to import.</span>')
|
|
|
->breadcrumb(['text'=>'列表','url'=>''])
|
|
|
->body($this->grid());
|
|
|
}
|
|
@@ -67,10 +69,12 @@ class ImportProductController extends AdminController
|
|
|
|
|
|
// 筛选
|
|
|
$grid->filter(function (Grid\Filter $filter) {
|
|
|
- $filter->equal('sku');
|
|
|
- $filter->like('title');
|
|
|
- $filter->equal('category_id',admin_trans_label('category'))->select(BaseProductCategory::selectOptions());
|
|
|
- $filter->equal('enabled', admin_trans_label('enabled'))->select(array_map('admin_trans_label', config('dictionary.enabled')));
|
|
|
+ $filter->panel();
|
|
|
+ $filter->expand();
|
|
|
+ $filter->equal('sku')->width(2);
|
|
|
+ $filter->like('title')->width(2);
|
|
|
+ $filter->equal('category_id',admin_trans_label('category'))->select(BaseProductCategory::selectOptions())->width(2);
|
|
|
+ $filter->equal('enabled', admin_trans_label('enabled'))->select(array_map('admin_trans_label', config('dictionary.enabled')))->width(2);
|
|
|
});
|
|
|
//$grid->column('order');
|
|
|
//$grid->column('enabled');
|
|
@@ -97,6 +101,10 @@ class ImportProductController extends AdminController
|
|
|
$batch->add(new BatchCopy());
|
|
|
});
|
|
|
|
|
|
+ $grid->tools([
|
|
|
+ new DistProductImportForm(),
|
|
|
+ ]);
|
|
|
+
|
|
|
|
|
|
});
|
|
|
}
|