<?php
$config = array
(
    'list' => array
    (
        'field'      => array
        (
            'info_id' => array
            (
                'name' => '名称',
                'show' => 'Dever::call("place_source/info-find", array({info_id}))["name"]',
            ),
            'sku_id' => array
            (
                'name' => '规格',
                'show' => 'Dever::load("sku", "api")->getName(Dever::call("place_source/sku-find", array({sku_id}))["key"], "place_source")',
            ),
            'total',
            'sell',
            'out',
            'yue' => array
            (
                'name' => '当前库存',
                'show' => 'Dever::call("place_source/stock.yue", array({info_id}, {sku_id}))',
            ),
        ),
        'button' => array
        (
            '新增' => array('fastadd'),
        ),
        'data_button' => array
        (
            //'编辑' => 'fastedit',
            '日志' => array('route', array
            (
                'path' => 'source_manage/stock_log',
                'param' => array
                (
                    'set' => array('stock_id' => 'id', 'menu' => 'source_manage/stock', 'parent' => 'source_manage/stock'),
                ),
            )),
        ),
        'search'    => array
        (
            'info' => array
            (
                'type' => 'cascader',
                'clearable' => true,
                'remote'    => 'place_source/manage.getInfo',
            ),
        ),
    ),
    'update' => array
    (
        'start' => 'place_source/stock.update',
        'field'    => array
        (
            'info' => array
            (
                'rules' => true,
                'type' => 'cascader',
                'remote'    => 'place_source/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;