checkFunc('bill.shop_stat', 'editSout', '导出数据')) {
    $button['数据导出'] = array('excel','bill/lib/manage.out_shop_stat');
}
$shop = function()
{
    $array = array();
    $data = Dever::db('shop/info-state');
    if($data)
    {
        $array += $data;
    }
    return $array;
};
$config = array
(
    # 表名
    'name' => 'shop_stat',
    # 显示给用户看的名称
    'lang' => '归店统计',
    'order' => -10,
    # 数据结构 不同的字段放这里
    'struct' => array
    (
        'id'        => array
        (
            'type'      => 'int-11',
            'name'      => 'ID',
            'default'   => '',
            'desc'      => '',
            'match'     => 'is_numeric',
            //'list'        => true,
        ),
        'month'     => array
        (
            'type'      => 'int-11',
            'name'      => '月份',
            'default'   => '',
            'match'     => 'is_numeric',
            'desc'      => '',
            'search'    => 'month',
            'list'      => 'date("Y-m", {month})',
            'list_order' => 1,
        ),
        'mids'      => array
        (
            'type'      => 'text-255',
            'name'      => '代理商id',
            'default'   => '',
            'desc'      => '代理商id',
            'match'     => 'is_numeric',
            // 'option'    => $shop,
            // 'list'      => true,
            //'list_order' => 6,
        ),
        'shop_id'      => array
        (
            'type'      => 'int-11',
            'name'      => '店铺名称',
            'default'   => '',
            'desc'      => '店铺名称',
            'match'     => 'is_numeric',
            'option'    => $shop,
            'list_name' => '门店名称
门店编号
所属代理商',
            'list'      => 'Dever::load("bill/lib/manage.shop_stat", {id})',
            'list_order' => 2,
        ),
        'c_money'      => array
        (
            'type'      => 'decimal-11,2',
            'name'      => '采购金额',
            'default'   => '0',
            'desc'      => '采购金额',
            'match'     => 'is_numeric',
            'update'    => 'text',
            'list'      => true,
            'list_order' => 3,
        ),
        'num'        => array
        (
            'type'      => 'int-11',
            'name'      => '代理商总数量',
            'default'   => '0',
            'desc'      => '代理商总数量',
            'match'     => 'is_numeric',
            'search'    => 'order',
            // 'list'      => true,
        ),
        'dl_num'        => array
        (
            'type'      => 'int-11',
            'name'      => '代理商
数量-除掉创v的数量',
            'default'   => '0',
            'desc'      => '代理商数量',
            'match'     => 'is_numeric',
            // 'search'    => 'order',
            'list'      => true,
        ),
        'ck_num'        => array
        (
            'type'      => 'int-11',
            'name'      => '创客数',
            'default'   => '0',
            'desc'      => '创客数',
            'match'     => 'is_numeric',
            // 'search'    => 'order',
            'list'      => true,
            'list_order' => 5,
        ),
        'v_num'        => array
        (
            'type'      => 'int-11',
            'name'      => '创V数',
            'default'   => '0',
            'desc'      => '创V总数量',
            'match'     => 'is_numeric',
            // 'search'    => 'order',
            'list'      => true,
            'list_order' => 6,
        ),
        'out_num'        => array
        (
            'type'      => 'int-11',
            'name'      => '名额外创V',
            'default'   => '0',
            'desc'      => '创V名额外数量',
            'match'     => 'is_numeric',
            // 'search'    => 'order',
            'list'      => true,
            'list_order' => 7,
        ),
        'money'      => array
        (
            'type'      => 'decimal-11,2',
            'name'      => '代理商的总业绩',
            'default'   => '0',
            'desc'      => '代理商的总业绩',
            'match'     => 'is_numeric',
            'update'    => 'text',
            // 'list'      => true,
        ),
        'dl_money'      => array
        (
            'type'      => 'decimal-11,2',
            'name'      => '归店业绩
(除创V)',
            'default'   => '0',
            'desc'      => '代理商业绩',
            'match'     => 'is_numeric',
            'update'    => 'text',
            'list'      => true,
            'list_order' => 4,
        ),
        'v_money'      => array
        (
            'type'      => 'decimal-11,2',
            'name'      => '创V总业绩',
            'default'   => '0',
            'desc'      => '创V总业绩',
            'match'     => 'is_numeric',
            'update'    => 'text',
            // 'list'      => true,
        ),
        'out_money'      => array
        (
            'type'      => 'decimal-11,2',
            'name'      => '名额外创V
业绩',
            'default'   => '0',
            'desc'      => '创V名额外业绩',
            'match'     => 'is_numeric',
            'update'    => 'text',
            'list'      => true,
            'list_order' => 8,
        ),
        '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})',
        ),
    ),
    'manage' => array
    (
        'insert' => false,
        'edit' => false,
        'delete' => false,
        'num' => false,
        // 'excel' => $excel,
        'button' => $button,
        
    ),
    # request 请求接口定义
    'request' => array
    (
        'getExcelAll' => array
        (
            # 匹配的正则或函数 选填项
            'option' => array
            (
                'start' => array('yes-month', '>='),
                'end' => array('yes-month', '<='),
                'state' => 1,
            ),
            'type' => 'all',
            'col' => '*',
        ),
    ),
);
return $config;