| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 | <?php$project = function(){	$array = array	(		-1 => '全部项目',	);	$data = Dever::load('account/config_project-state');	if($data)	{		$array += $data;	}	return $array;};$type = array(	1 => '增加',	2 => '减少',);$manual = array(	1 => '手动操作',	2 => '不可以手动操作',);$id = Dever::input('where_id');return array(	# 表名	'name' => 'config_type',	# 显示给用户看的名称	'lang' => '交易类型',	# 是否显示在后台菜单	'order' => 10,	'check' => 'key',	'menu' => false,	# 数据结构	'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,		),		'key'		=> array		(			'type' 		=> 'varchar-50',			'name' 		=> '唯一标识-入账和出账通过该标识定义,充值和提现不能修改',			'default' 	=> '',			'desc' 		=> '唯一标识',			'match' 	=> 'is_string',			'update'	=> ($id && $id < 12) ? false : 'text',			'search'	=> 'fulltext',			'list'		=> true,		),		'project_id'        => array        (            'type'      => 'int-11',            'name'      => '所属项目',            'default'   => '-1',            'desc'      => '所属项目',            'match'     => 'is_numeric',            'update'    => 'radio',            'option'    => $project,            'list'		=> true,        ),        'type'        => array        (            'type'      => 'tinyint-1',            'name'      => '交易模式',            'default'   => '1',            'desc'      => '交易模式',            'match'     => 'is_numeric',            'update'    => 'radio',            'option'    => $type,            'list'		=> true,        ),        'manual'        => array        (            'type'      => 'tinyint-1',            'name'      => '是否允许手动操作',            'default'   => '1',            'desc'      => '是否允许手动操作',            'match'     => 'is_numeric',            'update'    => 'radio',            'option'    => $manual,            'list'		=> true,        ),		'reorder'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '排序(数值越大越靠前)',			'default' 	=> '1',			'desc' 		=> '请输入排序',			'match' 	=> 'option',			//'update'	=> 'text',			'search'	=> 'order',			'list_name' => '排序',			'list'		=> true,			'order'		=> 'desc',			'edit'		=> 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,        # 自定义快捷新增和编辑        'button' => array        (            '新增' => array('fast'),        ),		'list_button' => array        (        	'edit' => array('编辑'),        )	),	'default' => array	(		'col' => 'id,name,`key`,project_id,type,manual,state,cdate',		'value' => array		(			'1,"充值", "chongzhi", -1, 1, 1, 1,' . DEVER_TIME,			'2,"提现", "tixian",-1, 2, 1, 1,' . DEVER_TIME,			'3,"采购", "caigou",-1, 2, 2, 1,' . DEVER_TIME,			'4,"购买", "goumai",-1, 2, 2, 1,' . DEVER_TIME,			'5,"销售", "xiaoshou",-1, 1, 2, 1,' . DEVER_TIME,			'6,"收益", "shouyi",-1, 1, 2, 1,' . DEVER_TIME,			'7,"提现作废", "tixian_zuofei",-1, 1, 2, 1,' . DEVER_TIME,			'8,"购买退款", "goumai_tuikuan",-1, 1, 2, 1,' . DEVER_TIME,			'9,"采购退款", "caigou_tuikuan",-1, 1, 2, 1,' . DEVER_TIME,			'10,"销售退款", "xiaoshou_tuikuan",-1, 2, 2, 1,' . DEVER_TIME,			'11,"收益退款", "shouyi_tuikuan",-1, 2, 2, 1,' . DEVER_TIME,		),	),	'request' => array	(		'getData' => array		(			'type' => 'all',			'option' => array			(				'type' => 'yes',				'manual' => 'yes',				'project_id' => array('yes', 'in'),				'state' => 1,			),			'col' => '*|id',		),	));
 |