sell_stat.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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. 'search' => 'mid',
  47. ),
  48. // 'list_name' => '手机号',
  49. // 'list' => 'Dever::load("agent/member-find#mobile", {mid})',
  50. // 'list_order' => 4,
  51. ),
  52. 'agent-member-name'=> array
  53. (
  54. 'name' => '姓名',
  55. 'default' => '',
  56. 'desc' => '姓名',
  57. 'match' => 'option',
  58. # 读取另外表的关联方式
  59. 'sync' => array('mid', 'id'),
  60. 'list' => true,
  61. // 'search' => 'fulltext',
  62. 'search' => array
  63. (
  64. 'api' => 'agent/member-find',
  65. 'col' => 'name',
  66. 'result' => 'id',
  67. 'search' => 'mid',
  68. ),
  69. 'list_name' => '代理商',
  70. 'list' => 'Dever::load("agent/lib/member.daili", {mid})',
  71. 'list_order' => 3,
  72. ),
  73. 'agent-member-mobile'=> array
  74. (
  75. 'name' => '上级代理商信息',
  76. 'default' => '',
  77. 'desc' => '姓名',
  78. 'match' => 'option',
  79. # 读取另外表的关联方式
  80. 'sync' => array('mid', 'id'),
  81. // 'list' => true,
  82. // 'search' => 'fulltext',
  83. 'search' => array
  84. (
  85. 'api' => 'agent/member-find',
  86. 'col' => 'name',
  87. 'result' => 'id',
  88. 'search' => 'mid',
  89. ),
  90. 'list_name' => '上级代理商',
  91. 'list' => 'Dever::load("agent/lib/member.sdaili", {mid})',
  92. 'list_order' => 4,
  93. ),
  94. 'agent-member-role'=> array
  95. (
  96. 'name' => '代理角色',
  97. 'default' => '',
  98. 'desc' => '代理角色',
  99. 'match' => 'option',
  100. # 读取另外表的关联方式
  101. 'sync' => array('mid', 'id'),
  102. // 'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
  103. // 'list_order' => 5,
  104. ),
  105. 'num' => array
  106. (
  107. 'type' => 'decimal-11,2',
  108. 'name' => '团队业绩',
  109. 'default' => '0',
  110. 'desc' => '团队业绩',
  111. 'match' => 'is_numeric',
  112. 'update' => 'text',
  113. 'list' => true,
  114. ),
  115. 'new_num' => array
  116. (
  117. 'type' => 'decimal-11,2',
  118. 'name' => '本⽉新增团队业绩',
  119. 'default' => '0',
  120. 'desc' => '本⽉新增团队业绩',
  121. 'match' => 'is_numeric',
  122. 'update' => 'text',
  123. 'list' => true,
  124. //'list' => 'Dever::load("bill/lib/manage.getSellNewNum", "{num}", "{month}", "{mid}")',
  125. ),
  126. 'zt_num' => array
  127. (
  128. 'type' => 'decimal-11,2',
  129. 'name' => '直推业绩',
  130. 'default' => '0',
  131. 'desc' => '直推业绩',
  132. 'match' => 'is_numeric',
  133. 'update' => 'text',
  134. 'list' => true,
  135. ),
  136. 'new_ztnum' => array
  137. (
  138. 'type' => 'decimal-11,2',
  139. 'name' => '本⽉新增直推业绩',
  140. 'default' => '0',
  141. 'desc' => '本⽉新增直推业绩',
  142. 'match' => 'is_numeric',
  143. 'update' => 'text',
  144. 'list' => true,
  145. //'list' => 'Dever::load("bill/lib/manage.getSellNewNum", "{num}", "{month}", "{mid}")',
  146. ),
  147. 'state' => array
  148. (
  149. 'type' => 'tinyint-1',
  150. 'name' => '状态',
  151. 'default' => '1',
  152. 'desc' => '请选择状态',
  153. 'match' => 'is_numeric',
  154. ),
  155. 'cdate' => array
  156. (
  157. 'type' => 'int-11',
  158. 'name' => '统计时间',
  159. 'match' => array('is_numeric', time()),
  160. 'desc' => '',
  161. ),
  162. ),
  163. 'manage' => array
  164. (
  165. 'insert' => false,
  166. 'delete' => false,
  167. 'edit' => false,
  168. ),
  169. 'request' => array
  170. (
  171. 'getData' => array
  172. (
  173. # 匹配的正则或函数 选填项
  174. 'option' => array
  175. (
  176. 'mid' => 'yes',
  177. 'state' => 1,
  178. ),
  179. 'order' => array('id' => 'desc'),
  180. 'page' => array(10, 'list'),
  181. 'type' => 'all',
  182. 'col' => '*',
  183. ),
  184. 'prev' => array
  185. (
  186. # 匹配的正则或函数 选填项
  187. 'option' => array
  188. (
  189. 'month' => array('yes-month', '<'),
  190. 'mid' => 'yes',
  191. 'state' => 1,
  192. ),
  193. 'order' => array('time' => 'desc', 'id' => 'desc'),
  194. 'type' => 'one',
  195. 'col' => '*,min(month) as time, sum(num) as num',
  196. # 允许自定义以上配置
  197. 'config' => true,
  198. ),
  199. ),
  200. );