status; return array ( # 表名 'name' => 'goods', # 显示给用户看的名称 'lang' => '经销商商品列表', 'order' => 10, 'menu' => false, /* 'end' => array ( 'insert' => 'scm_role/lib/seller.goodsUpdate', 'update' => 'scm_role/lib/seller.goodsUpdate', ), */ # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', 'update' => 'hidden', //'list' => true, ), 'seller_id' => array ( 'type' => 'int-11', 'name' => '所属经销商', 'default' => '', 'desc' => '所属经销商', 'match' => 'is_numeric', 'update' => 'hidden', 'search' => 'hidden', 'value' => Dever::input('search_option_seller_id'), 'list' => 'Dever::load("scm_seller/info-one#name", {seller_id})', ), 'goods_id' => array ( 'type' => 'int-11', 'name' => '商品名称', 'default' => '', 'desc' => '商品名称', 'match' => 'is_numeric', 'update' => 'select', 'update_search' => 'scm_product/lib/manage.search', 'list' => 'Dever::load("scm_product/info-one#name", {goods_id})', ), 'sku_id' => array ( 'type' => 'int-11', 'name' => '规格型号', 'default' => '-1', 'desc' => '规格型号', 'match' => 'is_numeric', ), 'sell_min' => array ( 'type' => 'decimal-11,2', 'name' => '销售起订数', 'default' => '1', 'desc' => '销售起订数', 'match' => 'is_numeric', 'update' => 'text', //'list' => true, ), 'buy_min' => array ( 'type' => 'decimal-11,2', 'name' => '采购起订数', 'default' => '1', 'desc' => '采购起订数', 'match' => 'is_numeric', 'update' => 'text', //'list' => true, ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', ), 'cdate' => array ( 'type' => 'int-11', 'name' => '创建时间', 'match' => array('is_numeric', time()), 'desc' => '', # 只有insert时才生效 //'insert' => true, //'search' => 'date', //'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'manage' => array ( 'insert' => false, 'edit' => false, 'delete' => false, ), 'request' => array ( # 后台搜索用到,也可以不加,自动生成 'search' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'seller_id' => array('yes-t_1.seller_id'), 'status' => 'yes-t_2.status-1', 'state' => 'yes-t_2.state-1', 'state_1' => 'yes-t_1.state-1', ), # 联表 'join' => array ( array ( 'table' => 'scm_product/info', 'type' => 'left join', 'on' => array('goods_id','id'), 'col' => 'goods_id', ), ), 'type' => 'all', 'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'), 'col' => '*,t_2.*,t_2.id as value, "" as selected, "" as disabled', ), 'getData' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'seller_id' => array('yes-t_1.seller_id'), 'name' => array('yes-t_2.name', 'like'), 'category' => array('yes-t_2.category', 'like'), 'top_category_id' => array('yes-t_2.top_category_id'), 'second_category_id' => array('yes-t_2.second_category_id'), 'category_id' => array('yes-t_2.category_id'), 'status' => 'yes-t_2.status-1', 'state' => 'yes-t_2.state-1', 'state_1' => 'yes-t_1.state-1', ), # 联表 'join' => array ( array ( 'table' => 'scm_product/info', 'type' => 'left join', 'on' => array('goods_id','id'), 'col' => 'goods_id', ), ), 'type' => 'all', 'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'), 'col' => '*,t_2.*', ), 'getDataPage' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'seller_id' => array('yes-t_1.seller_id'), 'name' => array('yes-t_2.name', 'like'), 'category' => array('yes-t_2.category', 'like'), 'top_category_id' => array('yes-t_2.top_category_id'), 'second_category_id' => array('yes-t_2.second_category_id'), 'category_id' => array('yes-t_2.category_id'), 'status' => 'yes-t_2.status-1', 'state' => 'yes-t_2.state-1', 'state_1' => 'yes-t_1.state-1', ), # 联表 'join' => array ( array ( 'table' => 'scm_product/info', 'type' => 'left join', 'on' => array('goods_id','id'), 'col' => 'goods_id', ), ), 'type' => 'all', 'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'), 'page' => array(10, 'list'), 'col' => '*,t_2.*', ), 'getOne' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'seller_id' => 'yes', 'goods_id' => 'yes', 'sku_id' => 'yes', 'state' => 1, ), 'type' => 'one', 'col' => '*', ), ), );