'已确认', 2 => '未确认', ); $cash_status = array ( 1 => '已发放', 2 => '未发放', ); return array ( # 表名 'name' => 'area_stat', # 显示给用户看的名称 'lang' => '区域分润管理统计', 'order' => 79, 'menu' => 'agent', // 'end' => array // ( // 'insert' => 'mail/lib/manage.updateArea_stat', // ), # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', //'list' => true, ), 'month' => array ( 'type' => 'int-11', 'name' => '月份', 'default' => '', 'match' => 'is_numeric', 'desc' => '', 'update' => 'month', 'search' => 'month_eq', 'search_default' => '', 'list' => 'date("Y-m", {month})', ), 'name' => array ( 'type' => 'varchar-500', 'name' => '区域', 'default' => '', 'desc' => '区域', 'match' => 'option', 'update' => 'linkage', //'search' => 'linkage', 'list' => 'Dever::load("mail/lib/manage.getArea", "{name}")', 'option' => Dever::url('api.get?level_total=4', 'area'), ), 'parent_id' => array ( 'type' => 'int-11', 'name' => '上级id', 'default' => -1, 'desc' => '请选择上级id', 'match' => 'is_numeric', ), 't_cash' => array ( 'type' => 'decimal-11,2', 'name' => '体验店分润金额', 'default' => '0', 'desc' => '体验店分润金额', 'match' => 'is_numeric', // 'update' => 'text', 'list' => true, ), 'l_cash' => array ( 'type' => 'decimal-11,2', 'name' => '零售店分润金额', 'default' => '0', 'desc' => '零售店分润金额', 'match' => 'is_numeric', // 'update' => 'text', 'list' => true, ), 't_num' => array ( 'type' => 'int-11', 'name' => '体验店数量', 'default' => '0', 'desc' => '体验店数量', 'match' => 'is_numeric', // 'update' => 'text', 'list' => true, ), 'l_num' => array ( 'type' => 'int-11', 'name' => '零售店数量', 'default' => '0', 'desc' => '零售店数量', 'match' => 'is_numeric', // 'update' => 'text', 'list' => true, ), 't_buy' => array ( 'type' => 'decimal-11,2', 'name' => '体验店采购毛利', 'default' => '0', 'desc' => '体验店采购毛利', 'match' => 'is_numeric', // 'update' => 'text', 'list' => true, ), 'l_buy' => array ( 'type' => 'decimal-11,2', 'name' => '零售店采购毛利', 'default' => '0', 'desc' => '零售店采购毛利', 'match' => 'is_numeric', // 'update' => 'text', 'list' => true, ), 'mid' => array ( 'type' => 'int-11', 'name' => '收益代理商姓名/电话', 'default' => '-1', 'desc' => '代理商', 'match' => 'is_string', // 'update' => 'text', 'searchs' => array ( 'api' => 'agent/member-getSearch', 'col' => 'col', 'result' => 'id', 'search' => 'mid', ), 'list_name' => '收益代理商', 'list' => 'Dever::load("mail/lib/manage.area_member", {id})', ), 'status' => array ( 'type' => 'int-11', 'name' => '确认状态', 'default' => '2', 'desc' => '确认状态', 'match' => 'is_numeric', 'option' => $status, 'list' => true, ), 'cash_status' => array ( 'type' => 'int-11', 'name' => '发放状态', 'default' => '2', 'desc' => '发放状态', 'match' => 'is_numeric', 'option' => $cash_status, 'list' => true, ), 'data' => array ( 'type' => 'text-255', 'name' => '明细数据', 'default' => '', 'desc' => '明细数据', 'match' => 'is_string', ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', ), 'cdate' => array ( 'type' => 'int-11', 'name' => '统计时间', 'match' => array('is_numeric', time()), 'desc' => '', ), ), 'manage' => array ( 'insert' => false, 'delete' => false, 'edit' => false, 'excel' => true, 'list_type' => 'tree', ), 'request' => array ( 'getData' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'mid' => 'yes', 'state' => 1, ), 'order' => array('id' => 'desc'), 'page' => array(10, 'list'), 'type' => 'all', 'col' => '*', ), 'prev' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'month' => array('yes-month', '<'), 'mid' => 'yes', 'state' => 1, ), 'order' => array('time' => 'desc', 'id' => 'desc'), 'type' => 'one', 'col' => '*,min(month) as time, sum(num) as num', # 允许自定义以上配置 'config' => true, ), 'getOne' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'mid' => 'yes', 'state' => 1, ), 'type' => 'count', 'col' => '*', ), 'getData' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'mid' => 'yes', 'state' => 1, ), 'type' => 'all', 'order' => array('month' => 'desc', 'id' => 'desc'), 'page' => array(20, 'list'), 'col' => '*', ), ), );