| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 | <?phpreturn [    "field" => [        '产品名称' => [            'key' =>'title',            'rule' =>'',            'other_rule' => 'require|unique:Product',            'search_raw' => 'top_depart_id = ? AND (top_depart_id = ? OR top_depart_id = ?)',            'search_field' => ['top_depart_id']        ],        '产品编码' => [            'key' =>'code',            'rule' => '',            'other_rule' => 'require|unique:Product',            'search_raw' => 'top_depart_id = ? AND (top_depart_id = ? OR top_depart_id = ?)',            'search_field' => ['top_depart_id']        ],        '产品分类' => [            'key' =>'product_category_id',            'db_search' => [                'db_name' => 'ProductCategory',                'key' => 'title',                'value' => 'id',            ],            'other_rule' => 'require',        ],        '规格' => [            '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",        ],    ],];
 |