sell_stat.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'sell_stat',
  6. # 显示给用户看的名称
  7. 'lang' => '业绩统计',
  8. 'order' => 79,
  9. 'menu' => 'agent',
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. 'search' => 'order',
  21. //'list' => true,
  22. ),
  23. 'month' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '月份',
  27. 'default' => '',
  28. 'match' => 'is_numeric',
  29. 'desc' => '',
  30. 'search' => 'month',
  31. 'list' => 'date("Y-m", {month})',
  32. ),
  33. 'mid' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '手机号',
  37. 'default' => '-1',
  38. 'desc' => '代理商',
  39. 'match' => 'is_string',
  40. 'update' => 'text',
  41. 'search' => array
  42. (
  43. 'api' => 'agent/member-find',
  44. 'col' => 'mobile',
  45. 'result' => 'id',
  46. ),
  47. 'list_name' => '手机号',
  48. 'list' => 'Dever::load("agent/member-find#mobile", {mid})',
  49. 'list_order' => 4,
  50. ),
  51. 'agent-member-name'=> array
  52. (
  53. 'name' => '姓名',
  54. 'default' => '',
  55. 'desc' => '姓名',
  56. 'match' => 'option',
  57. # 读取另外表的关联方式
  58. 'sync' => array('mid', 'id'),
  59. 'list' => true,
  60. 'search' => 'fulltext',
  61. 'list_name' => '代理商信息',
  62. 'list' => 'Dever::load("agent/lib/member.daili", {id})',
  63. 'list_order' => 3,
  64. ),
  65. 'agent-member-mobile'=> array
  66. (
  67. 'name' => '姓名',
  68. 'default' => '',
  69. 'desc' => '姓名',
  70. 'match' => 'option',
  71. # 读取另外表的关联方式
  72. 'sync' => array('mid', 'id'),
  73. 'list' => true,
  74. 'search' => 'fulltext',
  75. 'list_name' => '上级代理商信息',
  76. 'list' => 'Dever::load("agent/lib/member.sdaili", {id})',
  77. 'list_order' => 4,
  78. ),
  79. 'agent-member-role'=> array
  80. (
  81. 'name' => '代理角色',
  82. 'default' => '',
  83. 'desc' => '代理角色',
  84. 'match' => 'option',
  85. # 读取另外表的关联方式
  86. 'sync' => array('mid', 'id'),
  87. 'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
  88. 'list_order' => 5,
  89. ),
  90. 'num' => array
  91. (
  92. 'type' => 'float-11,2',
  93. 'name' => '团队业绩',
  94. 'default' => '0',
  95. 'desc' => '团队业绩',
  96. 'match' => 'is_numeric',
  97. 'update' => 'text',
  98. 'list' => true,
  99. ),
  100. 'new_num' => array
  101. (
  102. 'type' => 'float-11,2',
  103. 'name' => '本⽉新增业绩',
  104. 'default' => '0',
  105. 'desc' => '本⽉新增业绩',
  106. 'match' => 'is_numeric',
  107. 'update' => 'text',
  108. 'list' => true,
  109. //'list' => 'Dever::load("bill/lib/manage.getSellNewNum", "{num}", "{month}", "{mid}")',
  110. ),
  111. 'state' => array
  112. (
  113. 'type' => 'tinyint-1',
  114. 'name' => '状态',
  115. 'default' => '1',
  116. 'desc' => '请选择状态',
  117. 'match' => 'is_numeric',
  118. ),
  119. 'cdate' => array
  120. (
  121. 'type' => 'int-11',
  122. 'name' => '统计时间',
  123. 'match' => array('is_numeric', time()),
  124. 'desc' => '',
  125. ),
  126. ),
  127. 'manage' => array
  128. (
  129. 'insert' => false,
  130. 'delete' => false,
  131. 'edit' => false,
  132. ),
  133. 'request' => array
  134. (
  135. 'getData' => array
  136. (
  137. # 匹配的正则或函数 选填项
  138. 'option' => array
  139. (
  140. 'mid' => 'yes',
  141. 'state' => 1,
  142. ),
  143. 'order' => array('id' => 'desc'),
  144. 'page' => array(10, 'list'),
  145. 'type' => 'all',
  146. 'col' => '*',
  147. ),
  148. 'prev' => array
  149. (
  150. # 匹配的正则或函数 选填项
  151. 'option' => array
  152. (
  153. 'month' => array('yes-month', '<'),
  154. 'mid' => 'yes',
  155. 'state' => 1,
  156. ),
  157. 'order' => array('time' => 'desc', 'id' => 'desc'),
  158. 'type' => 'one',
  159. 'col' => '*,min(month) as time, sum(num) as num',
  160. # 允许自定义以上配置
  161. 'config' => true,
  162. ),
  163. ),
  164. );