array('name' => '待业务初审', 'style' => 'font-weight:bold;color:#436EEE'), 2 => array('name' => '待财务终审', 'style' => 'font-weight:bold;color:#436EEE'), 3 => array('name' => '已完成', 'style' => 'font-weight:bold;color:green'), 4 => array('name' => '驳回', 'style' => 'font-weight:bold;color:#CD3700'), 5 => array('name' => '订单取消', 'style' => 'font-weight:bold;color:#CD3700'), ); $manage_audit = array ( //1 => '待审核', 2 => '已审核', 3 => '已作废', ); $type = array ( 1 => '未签署', 2 => '已签署', 3 => '已作废', ); $role = function() { $array = array(); $data = Dever::load('setting/lib/manage.role'); if($data) { $array += $data; } return $array; }; # 权限设置 1是软件服务费 2是渠道SAAS账户 $search_auth = Dever::input('search_option_dever_auth', 1); $insert = false; $col = Dever::input('col'); $button = array(); $excel = false; $edit = false; $list_button = array(); if ($search_auth == 1) { $edit = true; if (Dever::load('manage/auth')->checkFunc('agent.soft_cash', 'editnew', '新增')) { $insert = true; } if(Dever::load('manage/auth')->checkFunc('agent.soft_cash', 'editSoftcash', '数据导出')){ $excel[] = array('数据导出','软件服务费', 'agent/lib/soft_cash.out_soft_cash'); } $list_button['edit'] = array('编辑', '', '{status} != 3'); $list_button['list'] = array('查看详情', '"member_prize&project=agent&id={id}&page_type=1&[refer]"'); $list_button['oper'] = array('删除订单', '"agent/lib/soft_cash.setOrderStatus?id={id}&value=4"', '{status} == 4'); } else { $date = date('Y-m-d H:i:s', time()); Dever::setInput('search_option_end_buy_date', $date); } $admin = Dever::load('manage/auth.info'); $admin_auth = false; if ($admin && $admin['role'] == 24){ $admin_auth = $admin['role']; } return array ( # 表名 'name' => 'soft_cash', # 显示给用户看的名称 'lang' => '软件服务费', 'menu' => true, 'config_status' => $status, 'config_type' => $type, 'start' => array ( 'insert' => 'agent/lib/soft_cash.insertSoft', ), 'end' => array ( 'insert' => 'agent/lib/soft_cash.updateSoft', 'update' => 'agent/lib/soft_cash.updateSoft', ), # 数据结构 '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' => $search_auth == 2 ? '姓名/手机号' : '代理商姓名/手机号', 'default' => '-1', 'desc' => '代理商', 'match' => 'is_string', // 'update' => 'text', 'search' => array ( 'api' => 'agent/member-getSearch', 'col' => 'col', 'result' => 'id', 'search' => 'mid', ), 'list' => $search_auth == 2 ? 'Dever::load("agent/member-one#name", {mid})' : ($admin_auth ? 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true,true)' : 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)'), 'list_name' => $search_auth == 2 ? '姓名' : '代理商信息', 'list_order' => $search_auth == 2 ? 1 : 2, ), 'mobile' => array ( 'type' => 'bigint-11', 'name' => '代理商手机号', 'default' => '', 'desc' => '请输入手机号', 'match' => Dever::rule('mobile'), 'update' => 'text', # 绑定js脚本,更新时使用,第一个参数是执行的方式,第二个参数执行的方法,第三个参数是传值。 'bind' => array('onblur', 'loading', array('url' => Dever::url("lib/soft_cash.search", 'agent'))), //'search' => 'fulltext', 'list_name' => '手机号', 'list' => $search_auth == 2 ? 'Dever::load("agent/member-one#mobile", {mid})' : false, 'list_order' => 2, ), 'order_num' => array ( 'type' => 'varchar-100', 'name' => '订单号', 'default' => '', 'desc' => '订单号', 'match' => 'is_string', // 'update' => 'text', 'search' => 'fulltext', 'list_name' => '订单号
购买时间
添加时间', 'list' => $search_auth == 2 ? false : 'Dever::load("agent/lib/soft_cash.soft_show#num",{id})', 'list_order' => 1, ), 'role' => array ( 'type' => 'int-11', 'name' => '代理角色', 'default' => '', 'desc' => '代理角色', 'match' => 'is_numeric', // 'search' => 'select', // 'update' => 'select', //'option' => $role, //'list' => $search_auth == 2 ? false : true, //'list_name' => '管理员备注', //'list' => $search_auth == 2 ? false : '{admin_desc}', ), 'agreement_id' => array ( 'type' => 'int-11', 'name' => '合同', 'default' => '-1', 'desc' => '合同', 'match' => 'is_string', // 'update' => 'text', ), 'cash' => array ( 'type' => 'decimal-11,2', 'name' => '软件服务费用', 'default' => '0', 'desc' => '费用', 'match' => 'option', 'update' => 'text', 'list_name' => $search_auth == 2 ? '费用' : '软件服务费用', 'list' => true, ), 'price' => array ( 'type' => 'decimal-11,2', 'name' => '原始期权价值', 'default' => '0', 'desc' => '原始期权价值', 'match' => 'option', 'update' => 'text', 'list_name' => $search_auth == 2 ? '已有用户数' : '原始期权价值', 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/member.getUserNum", {mid})' : true, ), 'pic' => array ( 'type' => 'text-255', 'name' => '支付凭证', 'default' => '', 'desc' => '多张图片', 'match' => 'is_string', 'update' => 'images', 'key' => '1', // 'place' => '759*562', 'list_name' => $search_auth == 2 ? '开户日期' : '支付凭证', 'list' => $search_auth == 2 ? '{buy_date} ? date("Y-m-d", {buy_date}) : "-"' : false, ), 'status' => array ( 'type' => 'tinyint-1', 'name' => '订单状态', 'default' => '2', 'desc' => '订单状态', 'match' => 'is_numeric', // 'update' => 'radio', 'option' => $status, 'search' => $search_auth == 2 ? false : 'select', 'list_name' => $search_auth == 2 ? '状态' : '订单状态', //'list' => $search_auth == 2 ? true : false, 'list_order' => 100, ), 'audit' => array ( 'type' => 'int-11', 'name' => '审核状态', 'default' => '2', 'desc' => '审核状态', 'match' => 'is_numeric', 'update' => $col ? 'radio' : false, 'option' => $manage_audit, 'mul' => true, 'control' => 'audit', 'list_name' => $search_auth == 2 ? '签署日期' : '订单状态
合同签署状态
终审时间
签署时间', 'list' => $search_auth == 2 ? '{fdate} ? date("Y-m-d", {fdate}) : "-"' : 'Dever::load("agent/lib/soft_cash.list",{id})', ), 'audit_desc' => array ( 'type' => 'varchar-600', 'name' => '备注', 'default' => '', 'desc' => '审核说明', 'match' => 'is_string', 'update' => $col ? 'textarea' : false, // 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"', // 'list_order' => 9, 'show' => 'audit=3', ), 'type' => array ( 'type' => 'tinyint-1', 'name' => '签署状态', 'default' => '1', 'desc' => '合同签署状态', 'match' => 'is_numeric', // 'update' => 'radio', 'option' => $type, 'search' => 'select', 'list_name' => $search_auth == 2 ? '状态' : '签署状态', 'list' => $search_auth == 2 ? true : false, ), 'admin_desc' => array ( 'type' => 'varchar-600', 'name' => '管理员备注', 'default' => '', 'desc' => '管理员备注', 'match' => 'option', 'update' => 'textarea', 'search' => 'exist', 'exist' => array ( 'yes|逾期' => '没有包含逾期的订单', '逾期' => '查找逾期的订单', ), 'list' => $search_auth == 2 ? false : true, ), 'buy_date' => array ( 'type' => 'int-11', 'name' => '购买时间', 'match' => 'option', 'default' => '0', 'desc' => '', 'match' => 'is_numeric', 'update' => 'day', //'search' => 'hidden', 'search' => 'date', //'order' => $search_auth == 2 ? 'desc' : false, 'callback' => 'maketime', // 'list' => '{buy_date} > 0 ? date("Y-m-d H:i", {buy_date}) : "无"', ), 'audit_admin' => array ( 'type' => 'int-11', 'name' => '创建人', 'default' => '-1', 'match' => 'is_numeric', 'desc' => '创建人', // 'update' => 'hidden', // 'value' => $admin_id, 'list' => 'Dever::load("agent/lib/soft_cash.admin_name",{audit_admin})', ), 'zdate' => array ( 'type' => 'int-11', 'name' => '终审时间', 'default' => '', 'match' => 'is_numeric', 'search' => $search_auth == 2 ? false : 'date', 'desc' => '', // 'list' => 'date("Y-m-d H:i:s", {zdate})', ), 'fdate' => array ( 'type' => 'int-11', 'name' => '签署时间', 'default' => '', 'match' => 'is_numeric', 'search' => 'date', 'desc' => '', // 'list' => 'date("Y-m-d H:i:s", {zdate})', ), '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:s", {cdate})', ), ), 'alter' => array ( 10 => array ( array('update', 'cash', 'cash', 'decimal-11,2 0 软件服务费'), array('update', 'price', 'price', 'decimal-11,2 0 期权价值'), ), 'version' => 10, ), 'manage' => array ( 'insert' => $insert, 'delete' => false, 'edit' => false, 'excel' => $excel, 'button' => $button, 'list_button' => $list_button, // array // ( // 'list' => array('查看详情', '"member_prize&project=agent&id={id}&page_type=1&[refer]"'), // 'list1'=> $list['oper'], // ), ), 'request' => array ( 'getList' => array ( # 匹配的正则或函数 选填项 'option' => array ( // 'main' => 'yes', 'mobile' => 'yes', 'state' => 1, ), 'order' => array('id' => 'desc'), 'type' => 'all', 'col' => '*', ), 'getTotal' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'fstart' => array('yes-zdate', '>='), 'fend' => array('yes-zdate', '<='), 'status' => array('yes', 'in'), 'role' =>'yes', 'mid' => 'yes', 'state' => 1, ), 'type' => 'one', 'col' => 'sum(cash) as total', ), 'getPrice' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'fstart' => array('yes-fdate', '>='), 'fend' => array('yes-fdate', '<='), 'status' => array('yes', 'in'), 'role' =>'yes', 'mid' => 'yes', 'state' => 1, ), 'type' => 'one', 'col' => 'sum(price) as total', ), 'getSoftCash' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'fstart' => array('yes-zdate', '>='), 'fend' => array('yes-zdate', '<='), 'status' => array('yes', 'in'), 'role' =>'yes', 'mid' => 'yes', 'state' => 1, ), 'type' => 'one', 'col' => 'sum(cash) as total', ), 'getSoftNoCash' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'fstart' => array('yes-cdate', '>='), 'fend' => array('yes-cdate', '<='), 'status' => array('yes', 'in'), 'state' => 1, ), 'type' => 'one', 'col' => 'sum(cash) as total', ), 'getSoftNum' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'fstart' => array('yes-zdate', '>='), 'fend' => array('yes-zdate', '<='), 'status' => array('yes','in'), 'state' => 1, ), 'type' => 'count', 'col' => '*', ), 'getSoftNoNum' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'fstart' => array('yes-cdate', '>='), 'fend' => array('yes-cdate', '<='), 'status' => array('yes','in'), 'state' => 1, ), 'type' => 'count', 'col' => '*', ), 'getExcelAll' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'fstart' => array('yes-zdate', '>='), 'fend' => array('yes-zdate', '<='), 'bstart' => array('yes-buy_date', '>='), 'bend' => array('yes-buy_date', '<='), 'start' => array('yes-fdate', '>='), 'end' => array('yes-fdate', '<='), 'status' => 'yes', 'type' => 'yes', 'state' => 1, ), 'type' => 'all', 'col' => '*', ), ), );