<?php
$extend = Dever::load('common', 'manage')->extend();
$seller_id = $extend['data_id'];
return array
(
    'source' => 'seller/order',
    'list' => array
    (
        'where' => array('seller_id' => $seller_id),
        //'expand' => 'seller/manage.showOrderExpand',
        //'stat' => 'seller/manage.showOrderStat',
        'field'      => array
        (
            'seller_order_num' => array
            (
                'show' => '"{seller_order_num}" ? "<span>{seller_order_num}</span>" : "-"',
            ),
            'order_num' => array
            (
                //'fixed' => true,
                'width' => '230',
                'show' => '"{order_num}" ? "{order_num}" : "-"',
            ),
            'account' => array
            (
                'show' => 'Dever::load("manage", "seller")->showOrderAccount("{status}", "{account}")',
                'type' => 'show',
                'remote' => 'seller/manage.showOrderExpandKm',
            ),
            /*
            'cash' => array
            (
                'width' => '230',
                'name' => '商品 / 面值 / 实付',
                'show' => 'Dever::load("manage", "seller")->showOrderCash("{cate_id}", "{goods_id}", "{sku_id}", "{cash}", "{price}")',
            ),
            */
            'goods_id' => array
            (
                'name' => '商品',
                'show' => 'Dever::load("manage", "seller")->showOrderGoods("{cate_id}", "{goods_id}", "{sku_id}")',
            ),
            'cash' => array
            (
                'width' => '60',
                'name' => '面值',
            ),
            'num' => array
            (
                'width' => '60',
                'name' => '数量',
            ),
            //'price',
            //'channel_id',
            'status' => array
            (
                'width' => '100',
                'type' => 'tag',
                'style' => 'info',
                'show' => 'Dever::load("manage", "seller")->showOrderStatus("{status}")',
            ),
            'cdate' => array
            (
                'name' => '下单时间',
            ),
            'finish_date' => array
            (
                'name' => '完成时间',
                'type' => 'show',
                'show' => '{finish_date} > 0 ? date("Y-m-d H:i", {finish_date}) : "-"',
            ),
        ),
        'data_button' => array
        (
            
        ),
        'button' => array
        (
            '手动下单' => array('fastadd', array
            (
                'path' => 'seller_order/seller_order_push',
                'param' => array(),
            )),
        ),
        'export' => array
        (
            //'seller/manage.outKm' => '导出卡密',
            //'out' => '导出',
            //'manage/common.out' => '自定义导出',
        ),
        'search' => array
        (
            'status',
            'order_num',
            'seller_order_num',
            //'channel_order_num',
            'account',
            'sku_id' => array
            (
                'name' => '商品',
                'placeholder' => '请选择商品',
                'type' => 'cascader',
                'option'    => 'Dever::call("goods/manage.getGoodsSku")',
                'search' => function($key, $type, $value) {
                    $value = end($value);
                    return $value;
                }
            ),
            'finish_date' => array
            (
                'name' => '完成时间',
                'type' => 'date',
                'date_type' => 'datetimerange',
                'value_format' => 'YYYY-MM-DD HH:mm:ss',
                'start_placeholder' => '完成时间',
                'end_placeholder' => '完成时间',
                'range_separator' => '至',
            ),
            'cdate' => array
            (
                'name' => '下单时间',
                'type' => 'date',
                'date_type' => 'datetimerange',
                'value_format' => 'YYYY-MM-DD HH:mm:ss',
                'start_placeholder' => '下单时间',
                'end_placeholder' => '下单时间',
                'range_separator' => '至',
            ),
        ),
    ),
);