salepeople.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <?php
  2. $list_button = array();
  3. if (Dever::load('manage/auth')->checkFunc('clue.salepeople', 'edit', '回收全部线索')) {
  4. $list_button['oper'] = array('回收全部线索','clue/lib/info.back_people?id={id}');
  5. }
  6. $button = array();
  7. if (Dever::load('manage/auth')->checkFunc('clue.salepeople', 'cluesource', '线索来源设置'))
  8. {
  9. $button['线索来源设置'] = array('location', 'l=project/database/list&project=clue&table=source&&oper_table=salepeople');
  10. }
  11. if (Dever::load('manage/auth')->checkFunc('clue.salepeople', 'cluesalestatus', '线索状态设置'))
  12. {
  13. $button['线索状态设置'] = array('location', 'l=project/database/list&project=clue&table=sale_status&&oper_table=salepeople');
  14. }
  15. return array
  16. (
  17. # 表名
  18. 'name' => 'salepeople',
  19. # 显示给用户看的名称
  20. 'lang' => '线索销售员设置',
  21. # 后台菜单排序
  22. 'order' => 1,
  23. // 'menu' => false,
  24. // 'auto' => 100000,
  25. // 'check' => 'group_id',
  26. 'start' => array
  27. (
  28. 'insert' => 'clue/lib/info.insertSell',
  29. 'update' => 'clue/lib/info.insertSell',
  30. ),
  31. 'end' => array
  32. (
  33. 'insert' => 'clue/lib/info.updateSell',
  34. 'update' => 'clue/lib/info.updateSell',
  35. ),
  36. # 数据结构
  37. 'struct' => array
  38. (
  39. 'id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => 'ID',
  43. 'default' => '',
  44. 'desc' => '',
  45. 'match' => 'is_numeric',
  46. 'search' => 'order',
  47. 'list' => true,
  48. 'order' => 'desc',
  49. ),
  50. 'company_id' => array
  51. (
  52. 'type' => 'int-11',
  53. 'name' => '所属公司',
  54. 'default' => '1',
  55. 'desc' => '所属公司',
  56. 'match' => 'is_numeric',
  57. 'update' => 'hidden',
  58. //'search' => $company ? 'select' : false,
  59. //'list' => true,
  60. ),
  61. 'group' => array
  62. (
  63. 'type' => 'varchar-100',
  64. 'name' => '销售员和部门',
  65. 'default' => '-1',
  66. 'desc' => '部门名称',
  67. 'match' => 'is_string',
  68. // 'option' => $group,
  69. 'update' => 'linkage',
  70. 'option' => Dever::url('lib/appoint.get?level_total=2', 'work'),
  71. 'list' => 'Dever::load("clue/lib/manage.getSale#name",{id})',
  72. ),
  73. 'group_id' => array
  74. (
  75. 'type' => 'int-11',
  76. 'name' => '部门',
  77. 'default' => '-1',
  78. 'desc' => '部门id',
  79. 'match' => 'is_string',
  80. // 'option' => $cadre,
  81. 'update' => 'hidden',
  82. ),
  83. 'reorder' => array
  84. (
  85. 'type' => 'int-11',
  86. 'name' => '排序-数值越大越靠前',
  87. 'default' => '1',
  88. 'desc' => '请输入排序',
  89. 'match' => 'option',
  90. 'update' => 'text',
  91. 'search' => 'order',
  92. ),
  93. 'state' => array
  94. (
  95. 'type' => 'tinyint-1',
  96. 'name' => '状态',
  97. 'default' => '1',
  98. 'desc' => '请选择状态',
  99. 'match' => 'is_numeric',
  100. ),
  101. 'cdate' => array
  102. (
  103. 'type' => 'int-11',
  104. 'name' => '创建时间',
  105. 'match' => array('is_numeric', time()),
  106. 'desc' => '',
  107. # 只有insert时才生效
  108. 'insert' => true,
  109. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  110. ),
  111. ),
  112. 'manage' => array
  113. (
  114. //'insert' => false,
  115. // 'delete' => false,
  116. // 'edit' => false,
  117. 'list_button' => $list_button,
  118. 'button' => $button,
  119. # 设置公司权限
  120. 'company' => 'company_id',
  121. ),
  122. 'request' => array
  123. (
  124. 'getAll' => array
  125. (
  126. # 匹配的正则或函数 选填项
  127. 'option' => array
  128. (
  129. // 'id' => array('yes','>'),
  130. 'state' => 1,
  131. ),
  132. 'type' => 'all',
  133. 'order' => array('reorder' => 'desc', 'id' => 'asc'),
  134. 'col' => '*',
  135. ),
  136. 'getState' => array
  137. (
  138. # 匹配的正则或函数 选填项
  139. 'option' => array
  140. (
  141. // 'id' => array('yes','>'),
  142. 'state' => 1,
  143. ),
  144. 'type' => 'all',
  145. 'order' => array('reorder' => 'desc', 'id' => 'asc'),
  146. 'col' => '*|group_id',
  147. ),
  148. ),
  149. );