37 lines
1.4 KiB
PHP
37 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Admin\Actions\Modal;
|
|
|
|
use Dcat\Admin\Admin;
|
|
use Dcat\Admin\Grid\Tools\AbstractTool;
|
|
use App\Admin\Actions\Form\ProductImportForm;
|
|
use Dcat\Admin\Widgets\Modal;
|
|
use Dcat\Admin\Widgets\Alert;
|
|
|
|
class ProductImport extends AbstractTool
|
|
{
|
|
protected $title = '导入商品';
|
|
public function render()
|
|
{
|
|
$form = ProductImportForm::make();
|
|
$items = [
|
|
'<a href="'.admin_url('product-categories').'" target="_blank" style="color:#000;font-weight: bold;">商品分类<a>是否录入?',
|
|
'<a href="javascript:void(0)" style="color:#000;font-weight: bold;">商品图片<a>是否上传?',
|
|
'<a href="'.admin_url('product-groups').'" target="_blank" style="color:#000;font-weight: bold;">商品规格属性<a>是否录入?',
|
|
'<a href="'.admin_url('shipping-templates').'" target="_blank" style="color:#000;font-weight: bold;">运费模板<a>是否录入?',
|
|
];
|
|
$html = '<div class="list-group list-group-flush">';
|
|
foreach($items as $item) {
|
|
$html .= '<li class="list-group-item list-group-item-warning">'.$item.'</li>';
|
|
}
|
|
$html .= '</div>';
|
|
$alert = Alert::make($html, '请先检查数据是否完整');
|
|
$alert->warning();
|
|
return Modal::make()
|
|
->lg()
|
|
->title($this->title)
|
|
->body($alert->render() . $form->render())
|
|
->button($this->html());
|
|
}
|
|
}
|