| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 | <?php$goods = array(	1 => '所有商品',	2 => '部分商品',);$category = function(){	$array = array();	$data = Dever::load('scm_product/category-getTop');	if($data)	{		$array += $data;	}	return $array;};$status = array(	1 => '有效',	2 => '失效',);$type = array(	1 => '统一调价',	2 => '手动调价',);$time = array(	1 => '长期有效',	2 => '短期有效',);return array(	# 表名	'name' => 'price',	# 显示给用户看的名称	'lang' => '价格模板设置',	'info' => '在商品中设置的价格是默认价格,如果一个SKU想设置不同的价格,则可以通过价格模板设置',	# 是否显示在后台菜单	'order' => 100,	# 数据结构	'struct' => array	(		'id' 		=> array		(			'type' 		=> 'int-11',			'name' 		=> 'ID',			'default' 	=> '',			'desc' 		=> '',			'match' 	=> 'is_numeric',			'list'		=> true,			'order'		=> 'asc',		),		'name'		=> array		(			'type' 		=> 'varchar-150',			'name' 		=> '模板名称',			'default' 	=> '',			'desc' 		=> '模板名称',			'match' 	=> 'is_string',			'update'	=> 'text',			'search'	=> 'fulltext',			'list'		=> true,			'edit'		=> true,		),		'scm_product-price_rule'=> array		(			'name' 		=> '策略设置',			'default' 	=> '',			'desc' 		=> '策略设置',			'match' 	=> 'option',			# 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段			'sync'		=> array('id', 'price_id'),			# 根据category字段的值,获取scm_product/attr.search接口的内容			'update'	=> array(1),		),				'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,        # 自定义快捷新增和编辑        'button' => array        (            //'新增' => array('fast'),        ),		'list_button' => array        (        	//'edit' => array('编辑'),        	'list' => array('策略管理', 'price_rule&oper_table=price&search_option_price_id={id}'),        )	),	'request' => array	(			));
 |