vr-shopxo-source/application/admin/form/Goods.php

321 lines
13 KiB
PHP

<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\form;
use think\Db;
use app\service\GoodsService;
use app\service\RegionService;
use app\service\BrandService;
/**
* 商品动态表格
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-05-16
* @desc description
*/
class Goods
{
// 基础条件
public $condition_base = [
['is_delete_time', '=', 0],
];
/**
* 入口
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-05-16
* @desc description
* @param [array] $params [输入参数]
*/
public function Run($params = [])
{
return [
// 基础配置
'base' => [
'key_field' => 'id',
'status_field' => 'is_shelves',
'is_search' => 1,
'search_url' => MyUrl('admin/goods/index'),
'is_delete' => 1,
'delete_url' => MyUrl('admin/goods/delete'),
'delete_key' => 'ids',
'detail_title' => '基础信息',
],
// 表单配置
'form' => [
[
'view_type' => 'checkbox',
'is_checked' => 0,
'checked_text' => '反选',
'not_checked_text' => '全选',
'align' => 'center',
'width' => 80,
],
[
'label' => '商品ID',
'view_type' => 'field',
'view_key' => 'id',
'width' => 105,
'search_config' => [
'form_type' => 'input',
'where_type' => '=',
],
],
[
'label' => '商品信息',
'view_type' => 'module',
'view_key' => 'goods/module/info',
'grid_size' => 'lg',