123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390 |
- <?php
- $role = function()
- {
- $array = array();
- $data = Dever::load('setting/lib/manage.role');
- if($data)
- {
- $array += $data;
- }
- return $array;
- };
- $mid = Dever::input('search_option_mid');
- $button = array();
- if ($mid) {
- $button['返回上一页'] = array('location', 'l=project/database/list&project=agent&table=member_area&page_type=1&mid=' . $mid . '&[refer]');
- if (Dever::load('manage/auth')->checkFunc('agent.member', 'edit2', '发放业绩')) {
- $button['发放业绩'] = array('fast', '', 'push_sell&search_option_mid=' . $mid);
- }
- // $button = array
- // (
- // '返回上一页' => array('location', 'l=project/database/list&project=agent&table=member_area&page_type=1&mid=' . $mid),
- // '发放业绩' => array('fast', '', 'push_sell&search_option_mid=' . $mid),
- // );
- }
- $excel = false;
- if (Dever::load('manage/auth')->checkFunc('bill.sell', 'auditsell', '业绩流水导出')) {
- $excel[] = array('数据导出', '业绩流水导出', 'bill/lib/sell.out_sell');
- }
- $type = array
- (
- 1 => '直推业绩',
- 2 => '团队业绩',
- //3 => '间推业绩',
- );
- $stype = 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' => 'sell',
- # 显示给用户看的名称
- 'lang' => '业绩流水',
- 'order' => 90,
- 'set' => array
- (
- 'type' => $type,
- 'stype' => $stype,
- ),
- # 数据结构
- '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)',
- 'list_order' => 1,
- ),
- 'child_mid' => array
- (
- 'type' => 'int-11',
- 'name' => '直推组',
- 'default' => '-1',
- 'desc' => '直推组',
- 'match' => 'is_string',
- 'update' => 'text',
- 'list' => 'Dever::load("agent/lib/member.getOne", {child_mid}, "agent/member", true)',
- 'list_order' => 2,
- ),
- 'agent-member-name'=> array
- (
- 'name' => '姓名',
- 'default' => '',
- 'desc' => '姓名',
- 'match' => 'option',
- # 读取另外表的关联方式
- 'sync' => array('mid', 'id'),
- // 'search' => 'fulltext',
- 'searchs' => array
- (
- 'api' => 'agent/member-find',
- 'col' => 'name',
- 'result' => 'id',
- 'search' => 'mid',
- ),
- ),
- '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' => 1,
- ),
- 'type' => array
- (
- 'type' => 'int-11',
- 'name' => '业绩类型',
- 'default' => '1',
- 'desc' => '业绩类型',
- 'match' => 'is_numeric',
- 'search' => 'select',
- 'update' => 'checkbox',
- 'option' => $type,
- 'list' => true,
- 'list_order' => 7,
- ),
- 'stype' => array
- (
- 'type' => 'int-11',
- 'name' => '发放类型',
- 'default' => '1',
- 'desc' => '发放类型',
- 'match' => 'is_numeric',
- 'search' => 'select',
- 'update' => 'checkbox',
- 'option' => $stype,
- 'list' => true,
- 'list_order' => 8,
- ),
- 'type_id' => array
- (
- 'type' => 'int-11',
- 'name' => '交易来源id',
- 'default' => '',
- 'desc' => '交易来源id',
- 'match' => 'is_string',
- 'update' => 'text',
- ),
- 'role' => array
- (
- 'type' => 'int-11',
- 'name' => '代理角色',
- 'default' => '',
- 'desc' => '代理角色',
- 'match' => 'is_numeric',
- //'search' => 'select',
- 'update' => 'checkbox',
- 'option' => $role,
- //'list' => true,
- ),
- 'num' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '业绩金额',
- 'default' => '0',
- 'desc' => '业绩',
- 'match' => 'is_numeric',
- 'update' => 'text',
- 'list' => true,
- ),
- 'desc' => array
- (
- 'type' => 'varchar-600',
- 'name' => '业绩说明',
- 'default' => '',
- 'desc' => '业绩说明',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- '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,
- 'search' => 'date',
- 'list' => 'date("Y-m-d H:i", {cdate})',
- 'list_order' => 20,
- ),
- ),
- 'manage' => array
- (
- 'insert' => false,
- 'delete' => false,
- 'edit' => false,
- 'button' => $button,
- 'excel' => $excel,
- 'list_button' => array
- (
- 'list' => array('查看详情', '"push_sell&project=bill&id={id}&page_type=1"'),
- ),
- ),
- 'request' => array
- (
- 'getData' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'mid' => 'yes',
- 'type' => 'yes',
- 'state' => 1,
- ),
- 'order' => array('id' => 'desc'),
- 'page' => array(10, 'list'),
- 'type' => 'all',
- 'col' => '*',
- ),
- 'getNumByTime' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'type' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'group' => 'mid,type',
- 'col' => '*,sum(num) as num',
- ),
- 'getNumByTimeOne' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- // 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'mid' => 'yes',
- 'stype' => 'yes',
- 'type' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => '*,sum(num) as num',
- ),
- 'getNewParent' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate','>='),
- 'end' => array('yes-cdate','<='),
- 'mid' => 'yes',
- 'type' => 'yes',
- 'stype' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(num) as total',
- ),
- 'getNewChildParent' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate','>='),
- 'end' => array('yes-cdate','<='),
- 'mid' => 'yes',
- 'type' => 'yes',
- 'stype' => 'yes',
- 'state' => 1,
- ),
- // 'group' => 'child_mid',
- 'type' => 'one',
- 'col' => 'child_mid,sum(num) as total',
- ),
- 'childOne' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate','>='),
- 'end' => array('yes-cdate','<='),
- 'mid' => 'yes',
- 'type' => 'yes',
- 'stype' => 'yes',
- 'state' => 1,
- ),
- // 'group' => 'child_mid',
- 'type' => 'one',
- 'col' => 'child_mid,max(num) as total',
- ),
- 'getChildData' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- //'child_mid' => -1,
- 'stype' => 1,
- 'state' => 1,
- ),
- 'order' => array('id' => 'desc'),
- 'type' => 'all',
- 'limit' => '0,10000',
- 'col' => '*',
- ),
- 'getTotal' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'type' => 'yes',
- 'mid' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(num) as total',
- ),
- ),
- );
|