123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601 |
- <?php
- $status = array
- (
- 1 => '未激活',
- 2 => '正常',
- 3 => '停用',
- );
- $audit_manage = array
- (
- //1 => '未开始审核',
- //2 => '待审核',
- 3 => '审核通过',
- 4 => '审核未通过',
- );
- $audit_search = array
- (
- //1 => '未开始审核',
- 2 => '待审核',
- 3 => '审核通过',
- 4 => '审核未通过',
- );
- $audit = array
- (
- 1 => '未开始审核',
- 2 => '待审核',
- 3 => '审核通过',
- 4 => '审核未通过',
- );
- $is_email = array
- (
- 1 => '邮箱已验证',
- 2 => '邮箱未验证',
- );
- $send_email = array
- (
- 1 => '不发送邮件',
- 2 => '发送邮件',
- );
- $is_idcard = array
- (
- 1 => '已上传',
- 2 => '未上传',
- );
- $agreement_status = array
- (
- 0 => '合同审核状态',
- 'no' => '未签署',
- 2 => '待审核',
- 3 => '审核通过',
- 4 => '审核未通过',
- );
- $col = Dever::input('col');
- # 权限设置 1是审核列表、2是账户列表、3是展示列表
- $search_auth = Dever::input('search_option_dever_auth', 1);
- $button = $list_button = array();
- if ($search_auth <= 2) {
- $list_button = array
- (
- 'list' => array('查看详情', '"cash&mid={mid}&page_type=1&search_auth='.$search_auth.'"'),
- );
- }
- if ($search_auth == 1) {
- $list_button['edit'] = array('审核', 'audit,audit_desc', '{audit} == 2');
- } elseif ($search_auth == 2) {
- $button = array
- (
- '创建账户' => array('fast', '', 'member'),
- );
- $list_button['list1'] = array('账户列表', '"member&search_option_aid={id}&search_option_dever_auth='.$search_auth.'"');
-
- } elseif ($search_auth == 3) {
- $list_button['list1'] = array('账户列表', '"member&search_option_aid={id}&search_option_dever_auth='.$search_auth.'"');
- }
- $excel = false;
- if(Dever::load('manage/auth')->checkFunc('option.account', 'editCardMout', '数据导出')){
- $excel[] = array('数据导出','数据导出', 'mail/lib/manage.out_option_qiquan');
- }
- // if (Dever::load('manage/auth')->checkFunc('menu_279.menu_290','setmessage','发送短信')) {
- // $list_button['fast'] = array('发送短信','Dever::load("option/lib/account.send_sms",{mid})');
- // }
- return array
- (
- # 表名
- 'name' => 'account',
- # 显示给用户看的名称
- 'lang' => '期权登录账户',
- 'order' => 100,
- 'set' => array
- (
- 'status' => $status,
- 'audit' => $audit,
- 'is_email' => $is_email,
- 'is_idcard' => $is_idcard,
- ),
- 'end' => array
- (
- 'update' => 'option/lib/manage.updateAccount',
- ),
- 'check' => 'mid',
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- //'search' => 'order',
- //'list' => true,
- ),
- 'option-member-company_id'=> array
- (
- 'name' => '所属公司',
- 'default' => '',
- 'desc' => '所属公司',
- 'match' => 'option',
- # 读取另外表的关联方式
- 'sync' => array('mid', 'id'),
- ),
- 'mid' => array
- (
- 'type' => 'int-11',
- 'name' => '姓名',
- 'default' => '',
- 'desc' => '期权账户',
- 'match' => 'is_numeric',
- 'update' => 'text',
- 'search' => array
- (
- 'api' => 'option/member-getOne',
- 'col' => 'name',
- 'result' => 'id',
- 'search' => 'mid',//本表的字段,默认为当前的字段
- ),
- 'list_name' => '期权账户',
- 'list' => 'Dever::load("option/lib/member.getInfo", {mid})',
- 'list_order' => 1,
- ),
- 'option-member-mobile'=> array
- (
- 'name' => '手机号',
- 'default' => '',
- 'desc' => '手机号',
- 'match' => 'option',
- 'search' => array
- (
- 'api' => 'option/member-getOne',
- 'col' => 'mobile',
- 'result' => 'id',
- 'search' => 'mid',
- ),
- # 读取另外表的关联方式
- 'sync' => array('mid', 'id'),
- ),
- 'option-member-key'=> array
- (
- 'name' => '索引号',
- 'default' => '',
- 'desc' => '索引号',
- 'match' => 'option',
- 'search' => array
- (
- 'api' => 'option/member-getOne',
- 'col' => 'key',
- 'result' => 'id',
- 'search' => 'mid',
- ),
- # 读取另外表的关联方式
- 'sync' => array('mid', 'id'),
- ),
- 'is_email' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '邮箱认证',
- 'default' => '2',
- 'desc' => '邮箱是否验证',
- 'match' => 'is_numeric',
- 'search' => 'select',
- 'option' => $is_email,
- 'list' => 'Dever::load("option/lib/account.getEmail", {id})',
- 'list_order' => 3,
- ),
- 'send_email' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '是否发送邮件',
- 'default' => '2',
- 'desc' => '是否发送邮件',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $send_email,
- ),
- 'email' => array
- (
- 'type' => 'varchar-150',
- 'name' => '邮箱',
- 'default' => '',
- 'desc' => '请输入邮箱',
- 'search' => 'fulltext',
- 'match' => 'option||' . Dever::rule('email'),
- 'update' => 'text',
- ),
- 'is_idcard' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '身份证资料',
- 'default' => '2',
- 'desc' => '身份证资料',
- 'match' => 'is_numeric',
- 'option' => $is_idcard,
- 'search' => 'select',
- //'order' => 'asc',
- //'update' => 'radio',
- 'list' => $search_auth == 1 ? 'Dever::load("option/lib/account.getIdcard", {id})' : false,
- 'list_order' => 3,
- 'list_header' => array('width' => '30%'),
- ),
- 'option-member-idcard'=> array
- (
- 'name' => '身份证号码',
- 'default' => '',
- 'desc' => '身份证号码',
- 'match' => 'option',
- 'search' => array
- (
- 'api' => 'option/member-getOne',
- 'col' => 'idcard',
- 'result' => 'id',
- 'search' => 'mid',
- ),
- # 读取另外表的关联方式
- 'sync' => array('mid', 'id'),
- //'list' => $search_auth == 2 ? 'Dever::load("option/lib/account.getCash#daijiaofu", {id})' : false,
- 'list' => $search_auth == 2 ? 'Dever::load("option/lib/account.getCashInfo", {id}, {mid})' : false,
- 'list_name' => '账户信息',
- 'list_order' => 4,
- ),
- 'idcard_front' => array
- (
- 'type' => 'varchar-150',
- 'name' => '身份证正面',
- 'default' => '',
- 'desc' => '身份证正面',
- 'match' => 'option',
- 'update' => $col ? 'image' : false,
- 'key' => '8',
- //'place' => '660*660',
- //'list' => $search_auth == 2 ? 'Dever::load("option/lib/account.getCash#qiquan", {id})' : false,
- //'list_name' => '期权',
- //'list_order' => 5,
- ),
- 'idcard_back' => array
- (
- 'type' => 'varchar-150',
- 'name' => '身份证背面',
- 'default' => '',
- 'desc' => '身份证背面',
- 'match' => 'option',
- 'update' => $col ? 'image' : false,
- 'key' => '8',
- //'place' => '660*660',
- //'list' => $search_auth == 2 ? 'Dever::load("option/lib/account.getCash#yuanshiqiquan", {id})' : false,
- //'list_name' => '原始期权',
- //'list_order' => 6,
- ),
- 'idcard_path' => array
- (
- 'type' => 'varchar-800',
- 'name' => '身份证信息',
- 'default' => '',
- 'desc' => '身份证信息',
- 'match' => 'is_string',
- 'update' => 'text',
- ),
- 'audit' => array
- (
- 'type' => 'tinyint-1',
- 'name' => $search_auth == 1 ? '审核状况' : '账户认证',
- 'default' => $col ? '3' : '1',
- 'desc' => '审核状况',
- 'match' => 'is_numeric',
- 'option' => $col ? $audit_manage : $audit_search,
- 'search' => 'select',
- 'update' => $col ? 'radio' : false,
- 'list' => 'Dever::load("option/lib/account.getAudit", {id})',
- 'list_order' => $search_auth == 1 ? 5 : 3,
- 'value' => $col ? '3' : '1',
- 'control' => 'audit',
- ),
- 'audit_desc' => array
- (
- 'type' => 'varchar-500',
- 'name' => '审核备注',
- 'default' => '',
- 'desc' => '审核备注',
- 'match' => 'option',
- 'update' => $col ? 'textarea' : false,
- 'show' => 'audit=4',
- ),
- 'audit_date' => array
- (
- 'type' => 'int-11',
- 'name' => '审核时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '审核时间',
- ),
- 'up_date' => array
- (
- 'type' => 'int-11',
- 'name' => '上传时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'order' => 'desc',
- 'desc' => '上传时间',
- 'search' => 'date,order',
- 'list' => '("{up_date}" ? date("Y-m-d H:i", {up_date}) : "-") . "<br />" . (date("Y-m-d H:i", {cdate}))',
- 'list_order' => 2,
- ),
- 'option-agreement-status'=> array
- (
- 'name' => '名称',
- 'default' => '',
- 'desc' => '手机号',
- 'match' => 'option',
- 'search' => $search_auth == 3 ? array
- (
- 'api' => 'option/agreement-select',
- 'col' => 'audit',
- 'result' => 'aid',
- 'search' => 'id',
- 'option' => $agreement_status,
- 'no' => '(select aid from churen_option_agreement)',
- ) : 'hidden',
- # 读取另外表的关联方式
- 'sync' => array('id', 'aid'),
- 'list_name' => '合同审核状态',
- 'list' => $search_auth == 3 ? 'Dever::load("option/lib/account.getAgreementStatus", {id})' : false,
- 'list_order' => 10,
- ),
- 'status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '状态',
- 'match' => 'is_numeric',
- 'option' => $status,
- 'search' => 'select',
- 'list' => $search_auth == 1 ? false : true,
- 'list_order' => 100,
- ),
- 'stype' => array
- (
- 'type' => 'int-11',
- 'name' => '类型-仅用于展示类型',
- 'default' => '-1',
- 'desc' => '类型',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'hidden',
- ),
- 'dever_auth' => array
- (
- 'name' => '权限',
- 'default' => '',
- 'desc' => '类型',
- 'match' => 'is_string',
- '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' => 'date',
- //'list' => 'date("Y-m-d H:i", {cdate})',
- //'list_order' => 2,
- ),
- ),
- 'manage' => array
- (
- 'insert' => false,
- 'delete' => false,
- 'edit' => false,
- 'button' => $button,
- 'list_button' => $list_button,
- 'excel' => $excel,
- 'company' => array
- (
- 'col' => 'company_id',
- 'join' => array
- (
- 'table' => 'option/member',
- 'type' => 'left join',
- 'on' => array('mid', 'id'),
- ),
- ),
- ),
- 'request' => array
- (
- 'list' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'id' => array('yes', 'in'),
- 'mid' => 'yes',
- 'is_email' => 'yes',
- 'is_idcard' => 'yes',
- 'email' => array('yes', 'like'),
- 'audit' => array('yes', 'in'),
- 'start_cdate' => array('yes-cdate', '>='),
- 'end_cdate' => array('yes-cdate', '<='),
- //'no' => 'yes-NOT EXISTS (select * from churen_option_agreement as a where a.aid = churen_option_account.id)',
- /*
- 'not' => array
- (
- 'table' => 'option/agreement',
- 'on' => array('aid','id'),
- ),
- */
- 'no' => array('yes-id', 'not in'),
- 'status' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('id' => 'desc'),
- 'page' => array(20, 'list'),
- 'col' => '*',
- ),
- 'getInfo' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'status' => 2,
- 'state' => 1,
- ),
- 'order' => array('id' => 'desc'),
- 'type' => 'one',
- 'col' => '*',
- ),
- 'getData' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'idcard' => 'yes',
- 'id' => array('yes', '!='),
- 'status' => 2,
- 'state' => 1,
- ),
- 'order' => array('id' => 'desc'),
- 'type' => 'all',
- 'page' => array(20, 'list'),
- 'col' => '*',
- ),
- 'upCash' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'cash' => array('yes', '+='),
- ),
- ),
- 'upSell' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'cash' => array('yes', '+='),
- 'upcol' => array('yes-sell', '+='),
- 'level_id' => 'yes',
- ),
- ),
- 'upGroupSell' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'cash' => array('yes', '+='),
- 'upcol' => array('yes-group_sell', '+='),
- 'level_id' => 'yes',
- ),
- ),
- 'upGroupSellOne' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'group_sell' => array('yes', '+='),
- ),
- ),
- # 获取订单数量
- 'getNum' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'status' => 'yes',
- 'company' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'count',
- 'col' => '*',
- ),
- #获取所有数据
- 'getCount' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'status' => 'yes',
- 'state' => 1,
- 'audit' => 'yes',
- ),
- // 'order' => array('id' => 'desc'),
- 'type' => 'count',
- 'col' => '*',
- ),
- ),
- );
|