123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- <?php
- $role = function()
- {
- $array = array();
- $data = Dever::load('setting/lib/manage.role');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $excel = false;
- if (Dever::load('manage/auth')->checkFunc('menu_240.menu_271', 'area_excel1', '已售区域列表导出')) {
- $excel = array
- (
- array('已售区域列表导出', '已售区域列表导出', 'agent/lib/manage.out_arealog'),
- );
- }
- $type = array
- (
- 1 => '购买',
- 2 => '赠送',
- 3 => '后台修改',
- 4 => '系统导入',
- 5 => '系统同步',
- );
- $admin = Dever::load('manage/auth.info');
- $admin_auth = false;
- if ($admin && $admin['role'] == 24){
- $admin_auth = $admin['role'];
- }
- return array
- (
- # 表名
- 'name' => 'member_area',
- # 显示给用户看的名称
- 'lang' => '已售区域列表',
- 'order' => 8,
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- //'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)',
- ),
- 'order_id' => array
- (
- 'type' => 'int-11',
- 'name' => '订单表id',
- 'default' => '',
- 'desc' => '订单表id',
- 'match' => 'is_numeric',
- ),
- 'type' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '类型',
- 'default' => '1',
- 'desc' => '类型',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $type,
- ),
- 'price' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '实付金额',
- 'default' => '0',
- 'desc' => '金额',
- 'match' => 'option',
- 'update' => 'text',
- 'list' => true,
- ),
- 'role' => array
- (
- 'type' => 'int-11',
- 'name' => '代理角色',
- 'default' => '',
- 'desc' => '代理角色',
- 'match' => 'is_numeric',
- 'search' => 'select',
- 'update' => 'checkbox',
- 'option' => $role,
- // 'list' => true,
- ),
- 'area' => array
- (
- 'type' => 'varchar-500',
- 'name' => '区域',
- 'default' => '',
- 'desc' => '区域',
- 'match' => 'option',
- 'search' => 'linkage',
- 'update' => 'linkage',
- 'option' => Dever::url('api.get?level_total=4', 'area'),
- 'list' => 'Dever::load("area/api.string", "{area}", ",", true, "不限", 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,
- 'search' => 'date',
- 'list' => 'date("Y-m-d H:i:s", {cdate})',
- ),
- ),
- 'alter' => array
- (
- 5 => array
- (
- array('update', 'price', 'price', 'decimal-11,2 0 实付金额'),
- ),
- 'version' => 5,
- ),
- 'manage' => array
- (
- 'insert' => false,
- 'delete' => false,
- 'edit' => false,
- 'page_list' => 'member_area',
- 'excel' => $excel,
- ),
- 'request' => array
- (
- 'getData' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'mid' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('id' => 'desc'),
- 'col' => '*',
- ),
- 'getOne' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'order_id' => 'yes',
- 'role' => 'yes',
- 'mid' => 'yes',
- 'type' => 'yes',
- 'area' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'order' => array('id' => 'desc'),
- 'col' => '*',
- ),
- ),
- );
|