sell_stat.php 6.5 KB

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