|
@@ -0,0 +1,194 @@
|
|
|
+<?php
|
|
|
+$type = array
|
|
|
+(
|
|
|
+ 1 => '普通代理',
|
|
|
+ 2 => '区域门店代理',
|
|
|
+ 3 => '特殊代理',
|
|
|
+);
|
|
|
+
|
|
|
+$area = array
|
|
|
+(
|
|
|
+ 1 => '城市',
|
|
|
+ 2 => '区县',
|
|
|
+ 3 => '街道',
|
|
|
+);
|
|
|
+
|
|
|
+$opset = array
|
|
|
+(
|
|
|
+ 1 => '是',
|
|
|
+ 2 => '否',
|
|
|
+);
|
|
|
+
|
|
|
+return array
|
|
|
+(
|
|
|
+ # 表名
|
|
|
+ 'name' => 'role',
|
|
|
+ # 显示给用户看的名称
|
|
|
+ 'lang' => '代理商角色',
|
|
|
+ # 后台菜单排序
|
|
|
+ 'order' => 2,
|
|
|
+ # 数据结构
|
|
|
+ 'struct' => array
|
|
|
+ (
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => 'ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'search' => 'order',
|
|
|
+ 'list' => true,
|
|
|
+ 'order' => 'desc',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'name' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-200',
|
|
|
+ 'name' => '名称',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '名称',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'search' => 'fulltext',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'short_name' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-100',
|
|
|
+ 'name' => '简称',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '简称',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'search' => 'fulltext',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'desc' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-500',
|
|
|
+ 'name' => '描述',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '描述',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'textarea',
|
|
|
+ //'search' => 'fulltext',
|
|
|
+ //'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'type' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '代理类型',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '代理类型',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ //'update' => 'radio',
|
|
|
+ 'option' => $type,
|
|
|
+ 'search' => 'select',
|
|
|
+ 'list' => true,
|
|
|
+ 'control' => 'type',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'area' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '区域',
|
|
|
+ 'default' => '-1',
|
|
|
+ 'desc' => '区域',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ //'update' => 'radio',
|
|
|
+ 'option' => $area,
|
|
|
+ 'show' => 'type=2',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'profit' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-15',
|
|
|
+ 'name' => '收益-区域内门店利润百分比,这里直接输入数字即可,如输入10,就是10%',
|
|
|
+ 'default' => '0',
|
|
|
+ 'desc' => '收益',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => Dever::input('area') > 0 ? 'text' : false,
|
|
|
+ 'show' => 'type=2',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'opset' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '用户可升级-是否允许用户升级该角色',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '用户可升级',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ //'update' => 'radio',
|
|
|
+ 'option' => $opset,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'state' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '状态',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '请选择状态',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'cdate' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '创建时间',
|
|
|
+ 'match' => array('is_numeric', time()),
|
|
|
+ 'desc' => '',
|
|
|
+ # 只有insert时才生效
|
|
|
+ 'insert' => true,
|
|
|
+ 'list' => 'date("Y-m-d H:i:s", {cdate})',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'default' => array
|
|
|
+ (
|
|
|
+ 'col' => 'id,name,short_name,`desc`,type,area,opset,state,cdate',
|
|
|
+ 'value' => array
|
|
|
+ (
|
|
|
+ '1,"普通用户", "用户", "注册但未注册成功代理商角色的用户", 1, -1, 2, 1,' . DEVER_TIME,
|
|
|
+ '2,"街道代理商", "街道", "一个街道区域的代理商。获得区域内门店利润5%收益。", 2, 1, 1, 1,' . DEVER_TIME,
|
|
|
+ '3,"区县代理商", "区县", "一线城市的区,与二三线城市的县级代理商。获得区域内门店利润3%收益。", 2, 2, 1, 1,' . DEVER_TIME,
|
|
|
+ '4,"城市代理商", "城市", "一个城市代理商,有一二三线城市的区分。获得区域内门店利润1%收益。", 2, 3, 1, 1,' . DEVER_TIME,
|
|
|
+ '5,"创服代理商", "创服", "在开创本系统时的一个代理商角色,以后此角色不新增,要保留,因为其中还有一些权益未兑换。", 3, -1, 2, 1,' . DEVER_TIME,
|
|
|
+ '6,"创客会员", "创客", "有分销能力的会员,但不产生代理商收益。", 1, -1, 1, 1,' . DEVER_TIME,
|
|
|
+ '7,"消客会员", "消客", "能带动产品销售量的会员。", 1, -1, 1, 1,' . DEVER_TIME,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'manage' => array
|
|
|
+ (
|
|
|
+ 'insert' => false,
|
|
|
+ 'delete' => false,
|
|
|
+ 'edit' => false,
|
|
|
+ 'list_button' => array
|
|
|
+ (
|
|
|
+ 'fast' => array('编辑', '"role&where_id={id}&oper_save_jump=role&oper_table=role&oper_parent=role&area={area}"'),
|
|
|
+
|
|
|
+ 'list1' => array('奖励', '"role_reward&search_option_role_id={id}&oper_table=role"'),
|
|
|
+
|
|
|
+ //'list2' => array('权益', '"role_goods&search_option_role_id={id}&oper_table=role"'),
|
|
|
+ )
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'request' => array
|
|
|
+ (
|
|
|
+ 'getAll' => array
|
|
|
+ (
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'type' => array('yes', 'in'),
|
|
|
+ //'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'col' => '*|id',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+);
|