| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 | 
							- <?php
 
- /*
 
- |--------------------------------------------------------------------------
 
- | admin.php 管理员表
 
- |--------------------------------------------------------------------------
 
- */
 
- $type = array
 
- (
 
- 	1 => '普通员工',
 
- 	2 => '部门主管',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'admin_group',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '管理员部门关联表',
 
- 	'menu' => false,
 
- 	'end' => array
 
- 	(
 
- 		'insert' => 'manage/group.update',
 
- 		'update' => 'manage/group.update',
 
- 	),
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'order',
 
- 			'list'		=> true,
 
- 		),
 
- 		
 
- 		'admin_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '管理员ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '管理员ID',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'hidden',
 
- 			//'list'		=> true,
 
- 			'value'		=> Dever::input('search_option_admin_id'),
 
- 		),
 
- 		'company'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-800',
 
- 			'name' 		=> '公司与部门',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '公司与部门',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'linkage',
 
- 			'update'	=> 'linkage',
 
- 			'option'	=> Dever::url('group.get', 'manage'),
 
- 		),
 
- 		'company_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '公司',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '公司',
 
- 			'match' 	=> 'is_numeric',
 
- 		),
 
- 		'group_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '部门',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '部门',
 
- 			'match' 	=> 'is_numeric',
 
- 		),
 
- 		'type'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '类型',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '类型',
 
- 			'match' 	=> 'is_numeric',
 
- 			'option' 	=> $type,
 
- 			'update'	=> 'radio',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'state'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '请选择状态',
 
- 			'match' 	=> 'option',
 
- 		),
 
- 		
 
- 		'cdate'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '录入时间',
 
- 			'match' 	=> array('is_numeric', DEVER_TIME),
 
- 			'desc' 		=> '',
 
- 			# 只有insert时才生效
 
- 			'insert'	=> true,
 
- 			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 
- 		),
 
- 	),
 
- 	# request 请求接口定义
 
- 	'request' => array
 
- 	(
 
- 		'getAll' => array
 
-         (
 
-             # 匹配的正则或函数 选填项
 
-             'option' => array
 
-             (
 
-                 'group_id' => 'yes',
 
-                 'admin_id' => array('yes', '!='),
 
-             ),
 
-             'type' => 'all',
 
-             'col' => '*|admin_id',
 
-         ),
 
- 	)
 
- );
 
 
  |