| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 | 
							- <?php
 
- $status = Dever::config('base')->status;
 
- $type = function()
 
- {
 
-     return Dever::db('card/type')->state();
 
- };
 
- $card_type = array
 
- (
 
-     1 => '全数字',
 
-     2 => '全小写',
 
-     3 => '全大写',
 
-     4 => '大小写组合',
 
-     5 => '数字+大小写组合',
 
- );
 
- return array
 
- (
 
-     # 表名
 
-     'name' => 'info',
 
-     # 显示给用户看的名称
 
-     'lang' => '面值配置',
 
-     # 后台菜单排序
 
-     'order' => 99,
 
-     # 数据结构
 
-     'struct' => array
 
-     (
 
-         'id'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => 'ID',
 
-             'default'   => '',
 
-             'desc'      => '',
 
-             'match'     => 'is_numeric',
 
-             'search'    => 'order',
 
-             'list'      => true,
 
-             'order'     => 'desc',
 
-         ),
 
-         
 
-         'name'      => array
 
-         (
 
-             'type'      => 'varchar-80',
 
-             'name'      => '礼品卡名称',
 
-             'default'   => '',
 
-             'desc'      => '请输入礼品卡名称',
 
-             'match'     => 'is_string',
 
-             'update'    => 'text',
 
-             'search'    => 'fulltext',
 
-             'list'      => true,
 
-         ),
 
-         'type_id'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '礼品卡类型',
 
-             'default'   => '1',
 
-             'desc'      => '礼品卡类型',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'radio',
 
-             'option'    => $type,
 
-             'list'      => true,
 
-         ),
 
-         'value'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '面值',
 
-             'default'   => '100',
 
-             'desc'      => '面值',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'text',
 
-             'list'      => true,
 
-         ),
 
-         'price'        => array
 
-         (
 
-             'type'      => 'varchar-80',
 
-             'name'      => '售价',
 
-             'default'   => '100',
 
-             'desc'      => '售价',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'text',
 
-             'list'      => true,
 
-         ),
 
-         'card_type'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '卡号生成规则',
 
-             'default'   => '3',
 
-             'desc'      => '卡号生成规则',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'select',
 
-             'option'    => $card_type,
 
-             'list_name' => '数量',
 
-             'list'      => 'Dever::load("card/lib/manage.getNum", "{id}")',
 
-         ),
 
-         'card_prefix'        => array
 
-         (
 
-             'type'      => 'varchar-80',
 
-             'name'      => '卡号前缀-前缀不占用卡号长度的位数,如卡号长度填写14,卡号前缀为Q,则生成卡号前缀+14位随机数',
 
-             'default'   => '',
 
-             'desc'      => '卡号前缀',
 
-             'match'     => 'option',
 
-             'update'    => 'text',
 
-         ),
 
-         'card_len'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '卡号长度',
 
-             'default'   => '14',
 
-             'desc'      => '卡号长度',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'text',
 
-         ),
 
-         'status'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '状态',
 
-             'default'   => '1',
 
-             'desc'      => '状态',
 
-             'match'     => 'is_numeric',
 
-             //'update'  => 'select',
 
-             'option'    => $status,
 
-             'search'    => 'select',
 
-             'list'      => true,
 
-             'edit'      => true,
 
-         ),
 
-         'content'       => array
 
-         (
 
-             'type'      => 'text-255',
 
-             'name'      => '介绍',
 
-             'default'   => '',
 
-             'desc'      => '请输入内容',
 
-             'match'     => 'is_string',
 
-             'update'    => 'editor',
 
-             'key'       => '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,
 
-             'list'      => 'date("Y-m-d H:i:s", {cdate})',
 
-         ),
 
-     ),
 
-     'manage' => array
 
-     (
 
-     	'list_button' => array
 
-         (
 
-             'fast' => array('生成卡号', '"add&where_id=1&search_option_card_id={id}"', '{status} == 1'),
 
-             'list1' => array('卡号列表', '"code&search_option_card_id={id}&oper_table=info"'),
 
-         ),
 
-     ),
 
-     'request' => array
 
-     (
 
-         'getDataByType' => array
 
-         (
 
-             # 匹配的正则或函数 选填项
 
-             'option' => array
 
-             (
 
-                 'type_id' => array('yes', 'in'),
 
-                 'status' => 1,
 
-                 'state' => 1,
 
-             ),
 
-             'type' => 'all',
 
-             'order' => array('cdate' => 'desc'),
 
-             'col' => '*',
 
-         ),
 
-     ),
 
- );
 
 
  |