| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 | <?phpreturn [    "field" => [        '产品名称' => [            'key' =>'title',            'rule' =>'',            'other_rule' => 'require|unique:Product',        ],        '产品分类' => [            'key' =>'product_category_id',            'db_search' => [                'db_name' => 'ProductCategory',                'key' => 'title',                'value' => 'id',            ],            'other_rule' => 'require',        ],        '产品编码' => [            'key' =>'code',            'rule' => '',            'other_rule' => 'require|unique:Product',        ],        '规格' => [            'key' =>'size',            'rule' =>'',            'other_rule' => '',        ],        '单位' => [            'key' =>'unit',            'rule' =>'',            'other_rule' => '',            'db_search' => [                'db_name' => 'BasicType',                'key' => 'title',                'value' => 'id',            ],        ],        '条码' => [            'key' =>'bar_code',            'rule' =>'',            'other_rule' => '',        ],        '成本' => [            'key' =>'cost',            'rule' =>'',            'other_rule' => 'require|is_numeric',        ],        '零售价' => [            'key' =>'retail_price',            'rule' =>'',            'other_rule' => 'is_numeric',        ],    ],    //(特殊) 额外表头字段数组名 因为一般这个数据理论上是无限的  所以放在子表里 结构是数组    "dynamics_field" => [        "name" => "basic_type_22",        "func" => "productTitle",    ],    "other_field_func" => "fillInsertProductData",// (特殊)需要填充的其它字段 这里是为了前端组件渲染的数据    "table" => [        "Product" => [            "field" => ["title","product_category_id","code","size","unit","bar_code","cost","retail_price","crt_id","mark","crt_time","depart_id","top_depart_id"],        ],        "ProductPriceDetail" => [            "field_array" => [                "basic_type_22" => [                    "product_id","basic_type_id","price","crt_time"                ],            ],            "need_param" => "product_id",            "db_name" => "Product",            "db_key" => "id",        ],    ],];
 |