area_stat.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'area_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. 'area' => array
  34. (
  35. 'type' => 'varchar-500',
  36. 'name' => '区域',
  37. 'default' => '',
  38. 'desc' => '区域',
  39. 'match' => 'option',
  40. 'update' => 'linkage',
  41. 'list' => 'Dever::load("area/api.string", "{area}")',
  42. ),
  43. 'mid' => array
  44. (
  45. 'type' => 'int-11',
  46. 'name' => '收益代理商',
  47. 'default' => '-1',
  48. 'desc' => '代理商',
  49. 'match' => 'is_string',
  50. 'update' => 'text',
  51. 'search' => array
  52. (
  53. 'api' => 'agent/member-find',
  54. 'col' => 'mobile',
  55. 'result' => 'id',
  56. 'search' => 'mid',
  57. ),
  58. 'list_name' => '收益代理商',
  59. 'list' => 'Dever::load("mail/lib/manage.area_member", {id})',
  60. 'list_order' => 10,
  61. ),
  62. 'num' => array
  63. (
  64. 'type' => 'decimal-11',
  65. 'name' => '店铺数量',
  66. 'default' => '0',
  67. 'desc' => '店铺数量',
  68. 'match' => 'is_numeric',
  69. 'update' => 'text',
  70. 'list' => true,
  71. ),
  72. 'c_price' => array
  73. (
  74. 'type' => 'decimal-11,2',
  75. 'name' => '采购金额',
  76. 'default' => '0',
  77. 'desc' => '采购金额',
  78. 'match' => 'is_numeric',
  79. 'update' => 'text',
  80. 'list' => true,
  81. 'list_order' => 4,
  82. ),
  83. 't_num' => array
  84. (
  85. 'type' => 'decimal-11',
  86. 'name' => '体验店数量',
  87. 'default' => '0',
  88. 'desc' => '体验店数量',
  89. 'match' => 'is_numeric',
  90. 'update' => 'text',
  91. 'list' => true,
  92. ),
  93. 't_price' => array
  94. (
  95. 'type' => 'decimal-11,2',
  96. 'name' => '体验店采购金额',
  97. 'default' => '0',
  98. 'desc' => '体验店采购金额',
  99. 'match' => 'is_numeric',
  100. 'update' => 'text',
  101. 'list' => true,
  102. ),
  103. 'price' => array
  104. (
  105. 'type' => 'decimal-11,2',
  106. 'name' => '分润金额',
  107. 'default' => '0',
  108. 'desc' => '分润金额',
  109. 'match' => 'is_numeric',
  110. 'update' => 'text',
  111. 'list' => true,
  112. 'list_order' => 5,
  113. ),
  114. 'state' => array
  115. (
  116. 'type' => 'tinyint-1',
  117. 'name' => '状态',
  118. 'default' => '1',
  119. 'desc' => '请选择状态',
  120. 'match' => 'is_numeric',
  121. ),
  122. 'cdate' => array
  123. (
  124. 'type' => 'int-11',
  125. 'name' => '统计时间',
  126. 'match' => array('is_numeric', time()),
  127. 'desc' => '',
  128. ),
  129. ),
  130. 'manage' => array
  131. (
  132. 'insert' => false,
  133. 'delete' => false,
  134. 'edit' => false,
  135. 'excel' => true,
  136. ),
  137. 'request' => array
  138. (
  139. 'getData' => array
  140. (
  141. # 匹配的正则或函数 选填项
  142. 'option' => array
  143. (
  144. 'mid' => 'yes',
  145. 'state' => 1,
  146. ),
  147. 'order' => array('id' => 'desc'),
  148. 'page' => array(10, 'list'),
  149. 'type' => 'all',
  150. 'col' => '*',
  151. ),
  152. 'prev' => array
  153. (
  154. # 匹配的正则或函数 选填项
  155. 'option' => array
  156. (
  157. 'month' => array('yes-month', '<'),
  158. 'mid' => 'yes',
  159. 'state' => 1,
  160. ),
  161. 'order' => array('time' => 'desc', 'id' => 'desc'),
  162. 'type' => 'one',
  163. 'col' => '*,min(month) as time, sum(num) as num',
  164. # 允许自定义以上配置
  165. 'config' => true,
  166. ),
  167. ),
  168. );