123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- <?php
- $list_button = array();
- if (Dever::load('manage/auth')->checkFunc('clue.salepeople', 'edit', '回收全部线索')) {
- $list_button['oper'] = array('回收全部线索','clue/lib/info.back_people?id={id}');
- }
- $button = array();
- if (Dever::load('manage/auth')->checkFunc('clue.salepeople', 'cluesource', '线索来源设置'))
- {
- $button['线索来源设置'] = array('location', 'l=project/database/list&project=clue&table=source&&oper_table=salepeople');
- }
- if (Dever::load('manage/auth')->checkFunc('clue.salepeople', 'cluesalestatus', '线索状态设置'))
- {
- $button['线索状态设置'] = array('location', 'l=project/database/list&project=clue&table=sale_status&&oper_table=salepeople');
- }
- return array
- (
- # 表名
- 'name' => 'salepeople',
- # 显示给用户看的名称
- 'lang' => '线索销售员设置',
- # 后台菜单排序
- 'order' => 1,
- // 'menu' => false,
- // 'auto' => 100000,
- // 'check' => 'group_id',
- 'start' => array
- (
- 'insert' => 'clue/lib/info.insertSell',
- 'update' => 'clue/lib/info.insertSell',
- ),
- 'end' => array
- (
- 'insert' => 'clue/lib/info.updateSell',
- 'update' => 'clue/lib/info.updateSell',
- ),
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- 'list' => true,
- 'order' => 'desc',
- ),
- 'company_id' => array
- (
- 'type' => 'int-11',
- 'name' => '所属公司',
- 'default' => '1',
- 'desc' => '所属公司',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- //'search' => $company ? 'select' : false,
- //'list' => true,
- ),
- 'group' => array
- (
- 'type' => 'varchar-100',
- 'name' => '销售员和部门',
- 'default' => '-1',
- 'desc' => '部门名称',
- 'match' => 'is_string',
- // 'option' => $group,
- 'update' => 'linkage',
- 'option' => Dever::url('lib/appoint.get?level_total=2', 'work'),
- 'list' => 'Dever::load("clue/lib/manage.getSale#name",{id})',
- ),
- 'group_id' => array
- (
- 'type' => 'int-11',
- 'name' => '部门',
- 'default' => '-1',
- 'desc' => '部门id',
- 'match' => 'is_string',
- // 'option' => $cadre,
- 'update' => 'hidden',
- ),
- 'reorder' => array
- (
- 'type' => 'int-11',
- 'name' => '排序-数值越大越靠前',
- 'default' => '1',
- 'desc' => '请输入排序',
- 'match' => 'option',
- 'update' => 'text',
- 'search' => 'order',
- ),
- '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})',
- ),
- ),
- 'manage' => array
- (
- //'insert' => false,
- // 'delete' => false,
- // 'edit' => false,
- 'list_button' => $list_button,
- 'button' => $button,
-
- # 设置公司权限
- 'company' => 'company_id',
- ),
- 'request' => array
- (
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- // 'id' => array('yes','>'),
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('reorder' => 'desc', 'id' => 'asc'),
- 'col' => '*',
- ),
- 'getState' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- // 'id' => array('yes','>'),
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('reorder' => 'desc', 'id' => 'asc'),
- 'col' => '*|group_id',
- ),
- ),
- );
|