'area_stat', # 显示给用户看的名称 'lang' => '区域分润管理统计', 'order' => 79, 'menu' => 'agent', # 数据结构 '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' => '', 'search' => 'month', 'list' => 'date("Y-m", {month})', ), 'area' => array ( 'type' => 'varchar-500', 'name' => '区域', 'default' => '', 'desc' => '区域', 'match' => 'option', 'update' => 'linkage', 'list' => 'Dever::load("area/api.string", "{area}")', ), 'mid' => array ( 'type' => 'int-11', 'name' => '收益代理商', 'default' => '-1', 'desc' => '代理商', 'match' => 'is_string', 'update' => 'text', 'search' => array ( 'api' => 'agent/member-find', 'col' => 'mobile', 'result' => 'id', 'search' => 'mid', ), 'list_name' => '收益代理商', 'list' => 'Dever::load("mail/lib/manage.area_member", {id})', 'list_order' => 10, ), 'num' => array ( 'type' => 'decimal-11', 'name' => '店铺数量', 'default' => '0', 'desc' => '店铺数量', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, ), 'c_price' => array ( 'type' => 'decimal-11,2', 'name' => '采购金额', 'default' => '0', 'desc' => '采购金额', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, 'list_order' => 4, ), 't_num' => array ( 'type' => 'decimal-11', 'name' => '体验店数量', 'default' => '0', 'desc' => '体验店数量', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, ), 't_price' => array ( 'type' => 'decimal-11,2', 'name' => '体验店采购金额', 'default' => '0', 'desc' => '体验店采购金额', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, ), 'price' => array ( 'type' => 'decimal-11,2', 'name' => '分润金额', 'default' => '0', 'desc' => '分润金额', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, 'list_order' => 5, ), '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, ), '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, ), ), );