| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286 | 
							- <?php
 
- $mid = Dever::input('search_option_mid');
 
- $button = array();
 
- if ($mid) {
 
-     $button = array
 
-     (
 
-         '返回上一页' => array('location', 'l=project/database/list&project=agent&table=member_area&page_type=1&mid=' . $mid),
 
-     );
 
- }
 
- $level = function()
 
- {
 
- 	$array = array
 
- 	(
 
- 		-1 => array
 
- 		(
 
- 			'id' => -1,
 
- 			'name' => '普通',
 
- 		),
 
- 	);
 
- 	$data = Dever::load('setting/level-state');
 
- 	if($data)
 
- 	{
 
- 		$array += $data;
 
- 	}
 
- 	return $array;
 
- };
 
- $type = array
 
- (
 
-     1 => '客户修改',
 
-     2 => '后台修改',
 
- );
 
- $admin = Dever::load('manage/auth.info');
 
- $admin_auth = false;
 
- if ($admin && $admin['role'] == 24){
 
-     $admin_auth = $admin['role'];
 
- }
 
- return array
 
- (
 
-     # 表名
 
-     'name' => 'member_level_log',
 
-     # 显示给用户看的名称
 
-     'lang' => '等级变更记录',
 
-     'order' => 9,
 
-     # 数据结构
 
-     'struct' => array
 
-     (
 
-     
 
-         'id'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => 'ID',
 
-             'default'   => '',
 
-             'desc'      => '',
 
-             'match'     => 'is_numeric',
 
-             'search'    => 'order',
 
-             'update'    => 'hidden',
 
-             //'list'        => true,
 
-         ),
 
-         'mid'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '代理商姓名/手机号',
 
-             'default'   => '-1',
 
-             'desc'      => '代理商',
 
-             'match'     => 'is_string',
 
-             'update'    => 'text',
 
-             'search'    => array
 
-             (
 
-                 'api' => 'agent/member-getSearch',
 
-                 'col' => 'col',
 
-                 'result' => 'id',
 
-                 'search' => 'mid',
 
-             ),
 
-             'list_name' => '代理商信息',
 
-             'list'      => $admin_auth ? 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true, true)' : 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
 
-             'list_order' => 1,
 
-         ),
 
-         'order_id'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '关联订单',
 
-             'default'   => '',
 
-             'desc'      => '关联订单',
 
-             'match'     => 'is_numeric',
 
-             //'list'		=> 'Dever::db("agent/order-find#order_num", {order_id})',
 
-             //'list'      => true,
 
-             //'list_order' => 6,
 
-         ),
 
-         'agent-member-name'=> array
 
-         (
 
-             'name'      => '代理商',
 
-             'default'   => '',
 
-             'desc'      => '代理商',
 
-             'match'     => 'option',
 
-             # 读取另外表的关联方式
 
-             'sync'      => array('mid', 'id'),
 
-             //'list'      => $mid ? false : true,
 
-             //'list_order' => 3,
 
-         ),
 
-         'agent-member-role'=> array
 
-         (
 
-             'name'      => '角色',
 
-             'default'   => '',
 
-             'desc'      => '角色',
 
-             'match'     => 'option',
 
-             # 读取另外表的关联方式
 
-             'sync'      => array('mid', 'id'),
 
-             //'list'      => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
 
-             //'list_order' => 5,
 
-         ),
 
-         'order_num'      => array
 
-         (
 
-             'type'      => 'varchar-100',
 
-             'name'      => '日志单号',
 
-             'default'   => '',
 
-             'desc'      => '日志单号',
 
-             'match'     => 'is_string',
 
-             'update'    => 'text',
 
-             //'search'    => 'fulltext',
 
-             //'list'      => true,
 
-             //'list_order'  => 2,
 
-         ),
 
-         'old_level'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '变更前等级',
 
-             'default'   => '-1',
 
-             'desc'      => '原级别',
 
-             'match'     => 'is_numeric',
 
-             'update'  	=> 'radio',
 
-             'option'    => $level,
 
-             'search'    => 'select',
 
-             'list'      => true,
 
-             'list_order' => 3,
 
-         ),
 
-         'new_level'        => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '变更后等级',
 
-             'default'   => '-1',
 
-             'desc'      => '新级别',
 
-             'match'     => 'is_numeric',
 
-             'update'  	=> 'radio',
 
-             'option'    => $level,
 
-             'search'    => 'select',
 
-             'list'      => true,
 
-             'list_order' => 4,
 
-         ),
 
-         'new_sell'      => array
 
-         (
 
-             'type'      => 'decimal-11,2',
 
-             'name'      => '新增业绩',
 
-             'default'   => '0',
 
-             'desc'      => '新增业绩',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'text',
 
-             //'list'      => true,
 
-             //'list_order' => 5,
 
-         ),
 
-         'sell'      => array
 
-         (
 
-             'type'      => 'decimal-11,2',
 
-             'name'      => '升级时业绩',
 
-             'default'   => '0',
 
-             'desc'      => '总业绩',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'text',
 
-             'list'      => true,
 
-             'list_order' => 5,
 
-         ),
 
-         'group_num'      => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '代理商团队数',
 
-             'default'   => '0',
 
-             'desc'      => '代理商团队数',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'text',
 
-             'list'      => true,
 
-             'list_order' => 9,
 
-         ),
 
-         'type'        => array
 
-         (
 
-             'type'      => 'tinyint-1',
 
-             'name'      => '类型',
 
-             'default'   => '1',
 
-             'desc'      => '类型',
 
-             'match'     => 'is_numeric',
 
-             'update'    => 'radio',
 
-             'option'    => $type,
 
-         ),
 
-         'audit_date'     => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '审核时间',
 
-             'match'     => 'is_numeric',
 
-             'desc'      => '审核时间',
 
-             'default'   => '',
 
-         ),
 
-         'audit_admin'     => array
 
-         (
 
-             'type'      => 'int-11',
 
-             'name'      => '操作人',
 
-             'default'   => '',
 
-             'match'     => 'is_numeric',
 
-             'desc'      => '操作人',
 
-             'list'      => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
 
-             // 'list_order'  => 8,
 
-         ),
 
-         '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", {cdate})',
 
-             'list_order' => 2,
 
-         ),
 
-     ),
 
-     'alter' => array
 
-     (
 
-         5 => array
 
-         (
 
-             array('update', 'new_sell', 'new_sell', 'decimal-11,2 0 新增业绩'),
 
-             array('update', 'sell', 'sell', 'decimal-11,2 0 升级时业绩'),
 
-         ),
 
-         'version' => 5,
 
-     ),
 
-     'manage' => array
 
-     (
 
-         'edit' => false,
 
-         'insert' => false,
 
-         'delete' => false,
 
-         'button' => $button,
 
-     ),
 
-     'request' => array
 
-     (
 
-         'getData' => array
 
-         (
 
-             # 匹配的正则或函数 选填项
 
-             'option' => array
 
-             (
 
-                 'mid' => 'yes',
 
-                 'type' => 'yes',
 
-                 'state' => 1,
 
-             ),
 
-             'order' => array('type' => 'asc', 'id' => 'desc'),
 
-             'type' => 'all',
 
-             'col' => '*, total_num-sell_num as num',
 
-         ),
 
-     ),
 
- );
 
 
  |