<?php
$config = array
(
    'list' => array
    (
        'field'      => array
        (
            'info_id' => array
            (
                'name' => '商品名称',
                'show' => 'Dever::call("goods/info-find", array({info_id}))["name"]',
            ),
            'sku_id' => array
            (
                'name' => '商品规格',
                'show' => 'Dever::load("sku", "api")->getName(Dever::call("goods/sku-find", array({sku_id}))["key"], "goods")',
            ),
            'total',
            'sell',
            'out',
            'yue' => array
            (
                'name' => '当前库存',
                'show' => 'Dever::call("goods/stock.yue", array({info_id}, {sku_id}))',
            ),
        ),
        'button' => array
        (
            '新增' => array('fastadd'),
        ),
        'data_button' => array
        (
            //'编辑' => 'fastedit',
            '日志' => array('route', array
            (
                'path' => 'goods_manage/stock_log',
                'param' => array
                (
                    'set' => array('stock_id' => 'id', 'menu' => 'goods_manage/stock', 'parent' => 'goods_manage/stock'),
                ),
            )),
        ),
        'search'    => array
        (
            'info' => array
            (
                'type' => 'cascader',
                'clearable' => true,
                'remote'    => 'goods/manage.getInfo',
            ),
        ),
    ),
    'update' => array
    (
        'start' => 'goods/stock.update',
        'field'    => array
        (
            'info' => array
            (
                'rules' => true,
                'type' => 'cascader',
                'remote'    => 'goods/manage.getInfo',
                'clearable' => true,
            ),
            'type' => array
            (
                'rules' => true,
                'name' => '类型',
                'type' => 'radio',
                'default' => 1,
                'option' => array
                (
                    1 => '入库',
                    2 => '出库',
                ),
            ),
            'num' => array
            (
                'name' => '数量',
                'rules' => true,
            ),
            'desc' => array
            (
                'name' => '备注',
                'rules' => true,
                'type' => 'textarea',
            ),
            
        ),
    ),
);

return $config;