array ( 'field' => array ( 'sort' => array ( 'type' => 'input', ), 'name' => array ( //'tip' => false, ), 'cate' => array ( 'show' => 'Dever::call("content/cate.getInfo", array("goods", "{cate}"))', ), 'status' => array ( 'type' => 'switch', 'show' => '{status}', 'active_value' => 1, 'inactive_value' => 2, ), 'cdate', ), 'button' => array ( '新增' => array('add'), ), 'data_button' => array ( '编辑' => 'edit', ), 'search' => array ( 'name' => 'like', 'cate' => array ( 'type' => 'cascader', 'option' => 'Dever::call("content/cate.getList", array("goods"))', ), 'cdate' => array ( 'name' => '创建时间', 'type' => 'date', 'date_type' => 'datetimerange', 'value_format' => 'YYYY-MM-DD HH:mm:ss', 'start_placeholder' => '开始日期', 'end_placeholder' => '结束日期', 'range_separator' => '至', ), 'status', ), ), 'update' => array ( 'end' => 'content/cate.update', 'control' => array ( 'goods/sku' => array ( 'spec_type' => 2, ), 'goods/sku#' => array ( 'spec_type' => 3, ), ), 'tab' => array ( '基本信息' => 'name,cate,pic,info,content', '规格设置' => 'spec_type,goods/sku,goods/sku#', ), //'desc' => '原创声明:', 'field' => array ( 'name' => array ( 'rules' => true, ), 'cate' => array ( 'rules' => true, 'type' => 'cascader', 'option' => 'Dever::call("content/cate.getList", array("goods"))', ), 'pic' => array ( 'type' => 'upload', 'upload' => '1', 'multiple' => true, 'style' => 'pic', ), 'info' => array ( 'type' => 'textarea', //'rows' => 4, 'autosize' => array('minRows' => 4), ), 'content' => array ( 'type' => 'editor', 'editorMenu' => array ( 'uploadImage' => 1, 'uploadVideo' => 3, ), ), 'spec_type' => array ( 'type' => 'radio', 'control' => true, ), 'goods/sku' => array ( 'name' => '单规格设置', 'where' => array('info_id' => 'id', 'key' => '-1'), # 默认值,如果有默认值则无法添加和删除 'default' => array ( # 默认值 array ( 'key' => '-1', 'code' => '', 'm_price' => '', 'price' => '', ), ), 'desc' => '如需设置商品库存,请到“商品库存”中设置,不设置库存则商品无库存', ), 'goods/sku#' => array ( 'name' => '多规格设置', 'where' => array('info_id' => 'id', 'key' => array('!=', '-1')), 'type' => 'sku', # 设置规格表名 'spec' => 'goods/spec', # 设置规格表关联字段 'spec_field' => 'info_id', # 获取规格数据的接口 'spec_data' => 'api/spec.manage', 'desc' => '如需设置商品库存,请到“商品库存”中设置,不设置库存则商品无库存', ), ), ), );