| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 | <?php$project = function(){	$array = array();	$data = Dever::load('account/config_project-state');	if($data)	{		$array += $data;	}	return $array;};$money = function(){	$array = array();	$data = Dever::load('account/money-state');	if($data)	{		$array += $data;	}	return $array;};$is_withdraw = array(	1 => '可以提现',	2 => '不可以提现',);return array(	# 表名	'name' => 'config',	# 显示给用户看的名称	'lang' => '账户名称设置',	# 是否显示在后台菜单	'check' => 'key',	'order' => 1,	# 数据结构	'struct' => array	(		'id' 		=> array		(			'type' 		=> 'int-11',			'name' 		=> 'ID',			'default' 	=> '',			'desc' 		=> '',			'match' 	=> 'is_numeric',			//'list'		=> true,		),				'name'		=> array		(			'type' 		=> 'varchar-32',			'name' 		=> '账户名称',			'default' 	=> '',			'desc' 		=> '请输入账户名称',			'match' 	=> 'is_string',			'update'	=> 'text',			'search'	=> 'fulltext',			'list'		=> true,		),		'key'		=> array		(			'type' 		=> 'varchar-50',			'name' 		=> '账户唯一标识',			'default' 	=> '',			'desc' 		=> '账户唯一标识',			'match' 	=> 'is_string',			'update'	=> 'text',			'search'	=> 'fulltext',			'list'		=> true,		),		'info'      => array        (            'type'      => 'varchar-800',            'name'      => '账户名称介绍',            'default'   => '',            'desc'      => '账户名称介绍',            'match'     => 'option',            'update'    => 'textarea',        ),        'project_id'        => array        (            'type'      => 'int-11',            'name'      => '所属项目',            'default'   => '1',            'desc'      => '所属项目',            'match'     => 'is_numeric',            'update'    => 'radio',            'option'    => $project,            'list'		=> true,        ),        'money_id'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '关联法定货币',			'default' 	=> '1',			'desc' 		=> '关联法定货币',			'match' 	=> 'is_numeric',			'update'	=> 'radio',			'option'	=> $money,			'list'		=> true,		),        'balance_alert'     => array        (            'type'      => 'varchar-11',            'name'      => '消耗下限-输入100,就是当余额小于等于100时,无法继续消耗,以元为单位,一般为限制授信账户',            'default'   => '0',            'desc'      => '消耗下限',            'match'     => 'option',            'update'    => 'text',        ),        'is_withdraw'        => array        (            'type'      => 'tinyint-1',            'name'      => '是否可提现',            'default'   => '1',            'desc'      => '是否可提现',            'match'     => 'is_numeric',            'update'    => 'radio',            'option'    => $is_withdraw,            'control'	=> 'is_withdraw',        ),        'withdraw_up'     => array        (            'type'      => 'varchar-11',            'name'      => '提现上限-每次提现的上限,0不限制,以元为单位',            'default'   => '0',            'desc'      => '提现上限',            'match'     => 'option',            'update'    => 'text',            'show'		=> 'is_withdraw=1',        ),        'withdraw_down'     => array        (            'type'      => 'varchar-11',            'name'      => '提现下限-每次提现的下限,0不限制,输入100,就是余额至少有100才能提现,以元为单位',            'default'   => '0',            'desc'      => '提现下限',            'match'     => 'option',            'update'    => 'text',            'show'		=> 'is_withdraw=1',        ),        'withdraw_fee'     => array        (            'type'      => 'varchar-11',            'name'      => '提现手续费-输入10%就是百分之10%',            'default'   => '10%',            'desc'      => '提现手续费',            'match'     => 'option',            'update'    => 'text',            'show'		=> 'is_withdraw=1',        ),        'reorder'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '优先级-扣款时,优先级数字大优先使用',			'default' 	=> '1',			'desc' 		=> '优先级',			'match' 	=> 'option',			'update'	=> 'text',			'search'	=> 'order',			'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	(		'button' => array        (            '项目配置' => array('list', 'config_project&oper_parent=config'),            '交易类型配置' => array('list', 'config_type&oper_parent=config'),        ),        'list_button' => array        (        	'list' => array('用户账户列表', '"info&search_option_config_id={id}"'),        )	),	/*	'default' => array	(		'col' => 'name,project_id,state,cdate',		'value' => array		(			'"默认账户", 1, 1,' . DEVER_TIME,		),	),	*/	'request' => array	(		'getData' => array		(			'type' => 'all',			'option' => array			(				'ids' => array('yes-id', 'in'),				'state' => 1,			),			'col' => '*',		),	));
 |