123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287 |
- <?php
- $shop = function()
- {
- $array = array();
- $data = Dever::db('shop/info-state');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $role = function()
- {
- $array = array();
- $data = Dever::load('setting/lib/manage.role');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $new_shop = Dever::input('search_option_new_shop_id');
- $group = 't_1.mid,t_1.new_shop_id';
- $admin = Dever::load('manage/auth.info');
- $admin_auth = false;
- if ($admin && $admin['role'] == 24){
- $admin_auth = $admin['role'];
- }
- # 权限设置 1是归店记录列表、2是归店详细信息
- $search_auth = Dever::input('search_option_dever_auth', 1);
- $excel = array();
- if(Dever::load('manage/auth')->checkFunc('agent.member_shop_log', 'editshoplog', '归店记录明细')){
- $excel[] = array('归店记录明细', '归店记录明细', 'agent/lib/member.out_member_shop_log');
- }
- $status = array
- (
- 1 => '主信息',
- 2 => '历史信息',
- );
- return array
- (
- # 表名
- 'name' => 'member_shop_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)' : ($search_auth == 1 ? 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)': 'Dever::load("bill/lib/manage.guidian",{mid})'),
- 'list_order' => 1,
- ),
- 'agent-member-role'=> array
- (
- 'name' => '代理角色',
- 'default' => '',
- 'desc' => '代理角色',
- 'match' => 'option',
- # 读取另外表的关联方式
- 'sync' => array('mid', 'id'),
- 'search' => 'select',
- 'option' => $role,
- 'search_col' => 'agent-member-role',
- //'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
- //'list_order' => 3,
- ),
- 'old_shop_id' => array
- (
- 'type' => 'int-11',
- 'name' => '变更前店铺名称',
- 'default' => '',
- 'desc' => '店铺名称',
- 'match' => 'is_numeric',
- 'option' => $shop,
- 'list_name' => $search_auth == 2 ? '角色' : '变更前店铺名称',
- 'list' => $search_auth == 1 ? true : 'Dever::load("bill/lib/manage.role",{mid})',
- //'list_order' => 6,
- ),
- 'new_shop_id' => array
- (
- 'type' => 'int-11',
- 'name' => '变更后店铺名称',
- 'default' => '',
- 'desc' => '店铺名称',
- 'match' => 'is_numeric',
- 'search' => 'hidden',
- 'option' => $shop,
- 'list' => $search_auth == 1 ? true : false,
- ),
- 'dever_auth' => array
- (
- 'name' => '类型',
- 'default' => '',
- 'desc' => '类型',
- 'match' => 'is_string',
- 'search' => 'hidden',
-
- ),
- 'dever_time' => array
- (
- 'name' => '归店时间',
- 'default' => '',
- 'desc' => '类型',
- 'match' => 'is_string',
- // 'search' => 'hidden',
- //'search' => $search_auth == 2 ? 'date' : false,
- ),
- 'status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '2',
- 'desc' => '请选择状态',
- 'match' => 'is_numeric',
- 'search' => 'hidden',
- ),
- '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' => $search_auth == 1 ? 'month' : 'date',
- 'list' => 'date("Y-m-d H:i", {cdate})',
- //'order' => 'desc',
- ),
- ),
- 'manage' => array
- (
- 'edit' => false,
- 'insert' => false,
- 'delete' => false,
- 'excel' => $excel,
- ),
- 'request' => array
- (
- 'list' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'mid' => array('yes-t_1.mid', 'in'),
- 'start_cdate' => array('yes-t_1.cdate','>='),
- 'end_cdate' => array('yes-t_1.cdate','<='),
- 'new_shop_id' => 'yes-t_1.new_shop_id',
- 'agent-member-role' => 'yes-t_2.role',
- 'status' => 'yes-t_1.status',
- 'state' => 'yes-t_1.state-1',
- ),
- 'join' => array
- (
- array
- (
- 'table' => 'agent/member',
- 'type' => 'left join',
- 'on' => array('mid','id'),
- 'col' => 't_2.id as mid',
- ),
- ),
- 'type' => 'all',
- 'group' => $group,
- 'order' => array('t_1.id' => 'desc'),
- 'page' => array(20, 'list'),
- 'col' => '*',
- ),
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate','>='),
- 'end' => array('yes-cdate','<='),
- 'new_shop_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'count',
- // 'order' => array('cdate' => 'desc'),
- 'col' => '*',
- ),
- 'getAllByShop' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate','>='),
- 'end' => array('yes-cdate','<='),
- 'new_shop_id' => 'yes',
- 'status' => 1,
- 'state' => 1,
- ),
- 'type' => 'all',
- // 'order' => array('cdate' => 'desc'),
- 'col' => '*|mid',
- ),
- 'getGui' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate','>='),
- 'end' => array('yes-cdate','<='),
- // 'new_shop_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'asc'),
- 'col' => '*',
- ),
- 'getLog' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate','>='),
- 'end' => array('yes-cdate','<='),
- 'new_shop_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'asc'),
- 'col' => '*',
- ),
- 'getData' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('id' => 'desc'),
- 'col' => '*|mid|',
- ),
- ),
- );
|