| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 | 
							- <?php
 
- # 常用的col
 
- $col = '*';
 
- $is_project = array
 
- (
 
-     1 => '全部可用',
 
-     2 => '部分可用',
 
- );
 
- $project = function()
 
- {
 
-     $array = array();
 
-     $data = Dever::db('manage/menu_group')->state();
 
-     if($data)
 
-     {
 
-         $array += $data;
 
-     }
 
-     return $array;
 
- };
 
- return array
 
- (
 
-     # 表名
 
-     'name' => 'company',
 
-     # 显示给用户看的名称
 
-     'lang' => '公司管理',
 
-     'order' => 7,
 
-     'menu' => false,
 
-     'end' => array
 
-     (
 
-         'update' => 'manage/company.update',
 
-     ),
 
-     # 数据结构
 
-     'struct' => array
 
-     (
 
-         'id'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => 'ID',
 
-             'default'   => '',
 
-             'desc'      => '',
 
-             'match'     => 'is_numeric',
 
-             'list'      => true,
 
-         ),
 
-         
 
-         'name'      => array
 
-         (
 
-             'type'      => 'varchar-80',
 
-             'name'      => '公司名称',
 
-             'default'   => '',
 
-             'desc'      => '公司名称',
 
-             'match'     => 'is_string',
 
-             'update'    => 'text',
 
-             'list'      => true,
 
-             'search'    => 'fulltext',
 
-         ),
 
-         'is_project'        => array
 
-         (
 
-             'type'      => 'tinyint-1',
 
-             'name'      => '项目可用状态',
 
-             'default'   => '1',
 
-             'desc'      => '项目可用状态',
 
-             'match'     => 'is_numeric',
 
-             'option'    => $is_project,
 
-             'update'    => 'radio',
 
-             'list'      => true,
 
-             'control'   => 'is_project',
 
-         ),
 
-         'project'        => array
 
-         (
 
-             'type'      => 'varchar-2000',
 
-             'name'      => '可用项目',
 
-             'default'   => '',
 
-             'desc'      => '选择项目',
 
-             'match'     => 'is_string',
 
-             'option'    => $project,
 
-             'update'    => 'checkbox',
 
-             'show'      => 'is_project=2',
 
-             //'list'      => 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,
 
-             'list'        => 'date("Y-m-d H:i", {cdate})',
 
-         ),
 
-     ),
 
- 	'default' => array
 
-     (
 
-         'col' => 'id,name,state,cdate',
 
-         'value' => array
 
-         (
 
-             '1,"默认公司", 1,' . DEVER_TIME,
 
-         ),
 
-     ),
 
-     
 
-     # 管理功能
 
-     'manage' => array
 
-     (
 
-         'delete' => false,
 
-         'insert' => false,
 
-         'edit' => false,
 
-         # 自定义快捷新增和编辑
 
-         'button' => array
 
-         (
 
-         '新增' => array('fast'),
 
-         ),
 
-         # 快捷更新
 
-         'list_button' => array
 
-         (
 
-         'edit' => array('编辑'),
 
-         ),
 
-     ),
 
-     'request' => array
 
-     (
 
-         'getIds' => array
 
-         (
 
-             'type' => 'all',
 
-             'option' => array
 
-             (
 
-                 'ids' => array('yes-id', 'in'),
 
-                 'state' => 1,
 
-             ),
 
-             'order' => array('id' => 'desc'),
 
-             'col' => '*|id',
 
-         ),
 
-         'getOld' => array
 
-         (
 
-             'type' => 'all',
 
-             'option' => array
 
-             (
 
-                 'ids' => array('yes-id', 'in'),
 
-                 'state' => 1,
 
-             ),
 
-             'order' => array('id' => 'asc'),
 
-             'col' => '*',
 
-         ),
 
-     ),
 
- );
 
 
  |