sell_stat.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. 'list_order' => 3,
  61. ),
  62. 'agent-member-role'=> array
  63. (
  64. 'name' => '代理角色',
  65. 'default' => '',
  66. 'desc' => '代理角色',
  67. 'match' => 'option',
  68. # 读取另外表的关联方式
  69. 'sync' => array('mid', 'id'),
  70. 'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
  71. 'list_order' => 5,
  72. ),
  73. 'num' => array
  74. (
  75. 'type' => 'float-11,2',
  76. 'name' => '团队业绩',
  77. 'default' => '0',
  78. 'desc' => '团队业绩',
  79. 'match' => 'is_numeric',
  80. 'update' => 'text',
  81. 'list' => true,
  82. ),
  83. 'new_num' => array
  84. (
  85. 'type' => 'float-11,2',
  86. 'name' => '新增业绩',
  87. 'default' => '0',
  88. 'desc' => '新增业绩',
  89. 'match' => 'is_numeric',
  90. 'update' => 'text',
  91. 'list' => true,
  92. //'list' => 'Dever::load("bill/lib/manage.getSellNewNum", "{num}", "{month}", "{mid}")',
  93. ),
  94. 'state' => array
  95. (
  96. 'type' => 'tinyint-1',
  97. 'name' => '状态',
  98. 'default' => '1',
  99. 'desc' => '请选择状态',
  100. 'match' => 'is_numeric',
  101. ),
  102. 'cdate' => array
  103. (
  104. 'type' => 'int-11',
  105. 'name' => '统计时间',
  106. 'match' => array('is_numeric', time()),
  107. 'desc' => '',
  108. ),
  109. ),
  110. 'manage' => array
  111. (
  112. 'insert' => false,
  113. 'delete' => false,
  114. 'edit' => false,
  115. ),
  116. 'request' => array
  117. (
  118. 'getData' => array
  119. (
  120. # 匹配的正则或函数 选填项
  121. 'option' => array
  122. (
  123. 'mid' => 'yes',
  124. 'state' => 1,
  125. ),
  126. 'order' => array('id' => 'desc'),
  127. 'page' => array(10, 'list'),
  128. 'type' => 'all',
  129. 'col' => '*',
  130. ),
  131. 'prev' => array
  132. (
  133. # 匹配的正则或函数 选填项
  134. 'option' => array
  135. (
  136. 'month' => array('yes-month', '<'),
  137. 'mid' => 'yes',
  138. 'state' => 1,
  139. ),
  140. 'order' => array('time' => 'desc', 'id' => 'desc'),
  141. 'type' => 'one',
  142. 'col' => '*,min(month) as time, sum(num) as num',
  143. # 允许自定义以上配置
  144. 'config' => true,
  145. ),
  146. ),
  147. );