| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 | 
							- <?php
 
- $type = Dever::config('base', 'pay')->pay['type'];
 
- $account = function()
 
- {
 
- 	return Dever::db('pay/account')->state();
 
- };
 
- $project = function()
 
- {
 
- 	return Dever::db('pay/project')->state();
 
- };
 
- $status = Dever::config('base', 'pay')->pay['status'];
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'order',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '订单管理',
 
- 	'order' => 1,
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 	
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'order',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'uid'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '用户',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '用户',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			/*
 
- 			'search'	=> array
 
- 			(
 
- 				'api' => 'passport/user-all',
 
- 				'col' => 'username',
 
- 				'result' => 'id',
 
- 			),
 
- 			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
 
- 			*/
 
- 		),
 
- 		'username'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-200',
 
- 			'name' 		=> '用户名称',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '用户名称',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-200',
 
- 			'name' 		=> '订单名称',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '订单名称',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'order_id'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-100',
 
- 			'name' 		=> '订单id',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '订单id',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'type'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-30',
 
- 			'name' 		=> '支付类型',
 
- 			'default' 	=> 'wechat',
 
- 			'desc' 		=> '支付类型',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $type,
 
- 			'search'	=> 'select',
 
- 			'list'		=> true,
 
- 			'control'	=> 'type',
 
- 		),
 
- 		'product_id'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-800',
 
- 			'name' 		=> '产品id-可能为多个',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '产品id',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'account_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '支付账户',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '支付账户',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $account,
 
- 			'search'	=> 'select',
 
- 			'list'		=> true,
 
- 		),
 
- 		'project_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '所属项目',
 
- 			'default' 	=> '0',
 
- 			'desc' 		=> '所属项目',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $project,
 
- 			'search'	=> 'select',
 
- 			'list'		=> true,
 
- 		),
 
- 		'cash'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-11',
 
- 			'name' 		=> '金额',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '金额',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'list'		=> true,
 
- 		),
 
- 		'status'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '支付状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '支付状态',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $status,
 
- 			'search'	=> 'select',
 
- 			'list'      => 'Dever::load("pay/lib/manage.showOrderStatus", "{id}")',
 
- 			'control'	=> 'status',
 
- 		),
 
- 		'status_desc'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-300',
 
- 			'name' 		=> '支付状态说明',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入支付状态说明',
 
- 			'match' 	=> 'option',
 
- 			//'update'	=> 'textarea',
 
- 			'show'		=> 'status=3',
 
- 		),
 
- 		'tk_pic'     => array
 
-         (
 
-             'type'      => 'varchar-150',
 
-             'name'      => '退款截图',
 
-             'default'   => '',
 
-             'desc'      => '退款截图',
 
-             'match'     => 'is_string',
 
-             'update'    => 'image',
 
-             'key'       => 1
 
-         ),
 
-         'tk_time'       => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '退款时间',
 
-             'default'   => '',
 
-             'desc'      => '退款时间',
 
-             'match'     => 'option',
 
-             //'list'        => true,
 
-             //'update'    => 'date',
 
-             'callback'  => 'maketime',
 
-             'show'      => 'status=5',
 
-         ),
 
-         'tk_admin'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '退款审核人',
 
-             'default'   => '1',
 
-             'desc'      => '退款审核人',
 
-             'match'     => 'option',
 
-             //'list'        => true,
 
-             'show'      => 'status=5',
 
-         ),
 
-         'tk_desc'       => array
 
-         (
 
-             'type'      => 'varchar-300',
 
-             'name'      => '退款备注',
 
-             'default'   => '',
 
-             'desc'      => '退款备注',
 
-             'match'     => 'option',
 
-             'update'    => 'textarea',
 
-             //'show'        => 'status=5',
 
-         ),
 
- 		'param'		=> array
 
- 		(
 
- 			'type' 		=> 'text-255',
 
- 			'name' 		=> '支付信息-用于二次支付',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '支付信息',
 
- 			'match' 	=> 'option',
 
- 		),
 
- 		'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,
 
- 		'excel' => true,
 
- 		/*
 
- 		'list_button' => array(
 
-             'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin', '{status} > 1'),
 
-         ),
 
-         */
 
- 	),
 
- );
 
 
  |