<?php
return array
(
    'list' => array
    (
        'field'      => array
        (
            'id',
            'name',
            'type',
            //'connect_id',
            'host',
            'cash',
            'status' => array
            (
                'type' => 'switch',
                'show'  => '{status}',
                'active_value' => 1,
                'inactive_value' => 2,
            ),
        ),
        'data_button' => array
        (
            '编辑' => 'edit',
            '卡密列表' => array('route', array
            (
                'path' => 'supplier/card',
                'param' => array
                (
                    'set' => array('channel_id' => 'id', 'menu' => 'supplier/info', 'parent' => 'supplier/card'),
                ),
            ), 'ChatLineSquare', 'type=2'),
        ),
        'button' => array
        (
            '新增' => 'add',
        ),
        'search' => array
        (
            'name',
            'type',
        ),
    ),
    'update' => array
    (
        'tab' => array
        (
            '基本设置' => 'name,type,discount,connect_id,appkey,appsecret,host,channel/set',
            '商品设置' => 'channel/goods',
        ),
        'field'    => array
        (
            'name',
            'type' => array
            (
                'type' => 'radio',
                'control' => true,
            ),
            'discount' => array
            (
                'name' => '默认折扣',
                'type' => 'text',
            ),
            'connect_id',
            'appkey',
            'appsecret',
            'host',
            'channel/set' => array
            (
                'name' => '其他参数',
                'where'  => array('channel_id' => 'id'),
            ),
            'channel/goods' => array
            (
                'name' => '商品设置',
                'where'  => array('channel_id' => 'id'),
            ),
        ),

        'control' => array
        (
            'connect_id' => array
            (
                'type' => 1,
            ),
            'appkey' => array
            (
                'type' => 1,
            ),
            'appsecret' => array
            (
                'type' => 1,
            ),
            'channel/set' => array
            (
                'type' => 1,
            ),
        ),
    ),
);