<?php
return array
(
    'list' => array
    (
        'type' => 'table',
        'field'      => array
        (
            'id',
            'name',
            'mobile' => array
            (
                'sort' => true,
            ),
            'role',
            'status' => array
            (
                'type' => 'switch',
                'show'  => '{status}',
                'active_value' => 1,
                'inactive_value' => 2,
            ),
            'cdate',
        ),
        'height' => 'auto',
        
        'button' => array
        (
            '新增' => 'add',
            //'删除' => 'recycle',
        ),
        'data_button' => array
        (
            '编辑' => 'edit',
            '删除' => 'delete',
        ),
        'export' => array
        (
            'out' => '导出',
        ),
        'search'    => array
        (
            'name',
            'mobile',
            'role' => 'group',
        ),
    ),
    
    'update' => array
    (
        'desc' => '',
        'field'    => array
        (
            'name' => array
            (
                'type' => 'text',
                'maxlength' => 30,
                'desc' => '',
            ),
            'mobile' => array
            (
                'name'      => '手机号',
                'type'      => 'text',
                'disable'   => false,
                'placeholder' => '',
                'rules'     => array
                (
                    array
                    (
                        'required' => true,
                        'trigger' => 'blur',
                        'message' => '请输入手机号',
                    ),
                    array
                    (
                        'len' => 11,
                        'pattern' => Dever::rule('mobile', ''),
                        'trigger' => 'blur',
                        'message' => '手机号错误',
                        'type' => 'string',
                    ),
                ),
            ),
            'password' => array
            (
                'type' => 'password',
                'update' => '',
                'handle' => 'manage/common.createPwd',
                'empty'  => false,
                'rules'     => array
                (
                    array
                    (
                        'only' => 'add',
                        'required' => true,
                        'trigger' => 'blur',
                        'message' => '请输入密码',
                    ),
                    array
                    (
                        'min' => 6,
                        'max' => 18,
                        'trigger' => 'blur',
                        'message' => '密码长度不能超过18或者少于6个字符',
                    ),
                ),
            ),
            'channel' => array
            (
                'type' => 'radio',
                'tips' => '开启后，将拥有源主供货能力',
            ),
            'role' => array
            (
                'type' => 'checkbox',
                //'remote' => 'manage/admin.getModuleData',
            ),
            /*
            'module_data' => array
            (
                'type' => 'tree',
                'desc' => '',
            ),*/
        ),
        'check' => 'mobile',
    ),

    # 详情页配置
    //'view' => 'common.view',
);