area_stat.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <?php
  2. $status = array
  3. (
  4. 1 => '已确认',
  5. 2 => '未确认',
  6. );
  7. $cash_status = array
  8. (
  9. 1 => '已发放',
  10. 2 => '未发放',
  11. );
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'area_stat',
  16. # 显示给用户看的名称
  17. 'lang' => '区域分润管理统计',
  18. 'order' => 79,
  19. 'menu' => 'agent',
  20. // 'end' => array
  21. // (
  22. // 'insert' => 'mail/lib/manage.updateArea_stat',
  23. // ),
  24. # 数据结构
  25. 'struct' => array
  26. (
  27. 'id' => array
  28. (
  29. 'type' => 'int-11',
  30. 'name' => 'ID',
  31. 'default' => '',
  32. 'desc' => '',
  33. 'match' => 'is_numeric',
  34. 'search' => 'order',
  35. //'list' => true,
  36. ),
  37. 'month' => array
  38. (
  39. 'type' => 'int-11',
  40. 'name' => '月份',
  41. 'default' => '',
  42. 'match' => 'is_numeric',
  43. 'desc' => '',
  44. 'update' => 'month',
  45. 'search' => 'month_eq',
  46. 'search_default' => '',
  47. 'list' => 'date("Y-m", {month})',
  48. ),
  49. 'name' => array
  50. (
  51. 'type' => 'varchar-500',
  52. 'name' => '区域',
  53. 'default' => '',
  54. 'desc' => '区域',
  55. 'match' => 'option',
  56. 'update' => 'linkage',
  57. //'search' => 'linkage',
  58. 'list' => 'Dever::load("mail/lib/manage.getArea", "{name}")',
  59. 'option' => Dever::url('api.get?level_total=4', 'area'),
  60. ),
  61. 'parent_id' => array
  62. (
  63. 'type' => 'int-11',
  64. 'name' => '上级id',
  65. 'default' => -1,
  66. 'desc' => '请选择上级id',
  67. 'match' => 'is_numeric',
  68. ),
  69. 't_cash' => array
  70. (
  71. 'type' => 'decimal-11,2',
  72. 'name' => '体验店分润金额',
  73. 'default' => '0',
  74. 'desc' => '体验店分润金额',
  75. 'match' => 'is_numeric',
  76. // 'update' => 'text',
  77. 'list' => true,
  78. ),
  79. 'l_cash' => array
  80. (
  81. 'type' => 'decimal-11,2',
  82. 'name' => '零售店分润金额',
  83. 'default' => '0',
  84. 'desc' => '零售店分润金额',
  85. 'match' => 'is_numeric',
  86. // 'update' => 'text',
  87. 'list' => true,
  88. ),
  89. 't_num' => array
  90. (
  91. 'type' => 'int-11',
  92. 'name' => '体验店数量',
  93. 'default' => '0',
  94. 'desc' => '体验店数量',
  95. 'match' => 'is_numeric',
  96. // 'update' => 'text',
  97. 'list' => true,
  98. ),
  99. 'l_num' => array
  100. (
  101. 'type' => 'int-11',
  102. 'name' => '零售店数量',
  103. 'default' => '0',
  104. 'desc' => '零售店数量',
  105. 'match' => 'is_numeric',
  106. // 'update' => 'text',
  107. 'list' => true,
  108. ),
  109. 't_buy' => array
  110. (
  111. 'type' => 'decimal-11,2',
  112. 'name' => '体验店采购毛利',
  113. 'default' => '0',
  114. 'desc' => '体验店采购毛利',
  115. 'match' => 'is_numeric',
  116. // 'update' => 'text',
  117. 'list' => true,
  118. ),
  119. 'l_buy' => array
  120. (
  121. 'type' => 'decimal-11,2',
  122. 'name' => '零售店采购毛利',
  123. 'default' => '0',
  124. 'desc' => '零售店采购毛利',
  125. 'match' => 'is_numeric',
  126. // 'update' => 'text',
  127. 'list' => true,
  128. ),
  129. 'mid' => array
  130. (
  131. 'type' => 'int-11',
  132. 'name' => '收益代理商姓名/电话',
  133. 'default' => '-1',
  134. 'desc' => '代理商',
  135. 'match' => 'is_string',
  136. // 'update' => 'text',
  137. 'searchs' => array
  138. (
  139. 'api' => 'agent/member-getSearch',
  140. 'col' => 'col',
  141. 'result' => 'id',
  142. 'search' => 'mid',
  143. ),
  144. 'list_name' => '收益代理商',
  145. 'list' => 'Dever::load("mail/lib/manage.area_member", {id})',
  146. ),
  147. 'status' => array
  148. (
  149. 'type' => 'int-11',
  150. 'name' => '确认状态',
  151. 'default' => '2',
  152. 'desc' => '确认状态',
  153. 'match' => 'is_numeric',
  154. 'option' => $status,
  155. 'list' => true,
  156. ),
  157. 'cash_status' => array
  158. (
  159. 'type' => 'int-11',
  160. 'name' => '发放状态',
  161. 'default' => '2',
  162. 'desc' => '发放状态',
  163. 'match' => 'is_numeric',
  164. 'option' => $cash_status,
  165. 'list' => true,
  166. ),
  167. 'state' => array
  168. (
  169. 'type' => 'tinyint-1',
  170. 'name' => '状态',
  171. 'default' => '1',
  172. 'desc' => '请选择状态',
  173. 'match' => 'is_numeric',
  174. ),
  175. 'cdate' => array
  176. (
  177. 'type' => 'int-11',
  178. 'name' => '统计时间',
  179. 'match' => array('is_numeric', time()),
  180. 'desc' => '',
  181. ),
  182. ),
  183. 'manage' => array
  184. (
  185. 'insert' => false,
  186. 'delete' => false,
  187. 'edit' => false,
  188. 'excel' => true,
  189. 'list_type' => 'tree',
  190. ),
  191. 'request' => array
  192. (
  193. 'getData' => array
  194. (
  195. # 匹配的正则或函数 选填项
  196. 'option' => array
  197. (
  198. 'mid' => 'yes',
  199. 'state' => 1,
  200. ),
  201. 'order' => array('id' => 'desc'),
  202. 'page' => array(10, 'list'),
  203. 'type' => 'all',
  204. 'col' => '*',
  205. ),
  206. 'prev' => array
  207. (
  208. # 匹配的正则或函数 选填项
  209. 'option' => array
  210. (
  211. 'month' => array('yes-month', '<'),
  212. 'mid' => 'yes',
  213. 'state' => 1,
  214. ),
  215. 'order' => array('time' => 'desc', 'id' => 'desc'),
  216. 'type' => 'one',
  217. 'col' => '*,min(month) as time, sum(num) as num',
  218. # 允许自定义以上配置
  219. 'config' => true,
  220. ),
  221. 'getMoney' => array
  222. (
  223. # 匹配的正则或函数 选填项
  224. 'option' => array
  225. (
  226. 'mid' => 'yes',
  227. 'state' => 1,
  228. ),
  229. 'type' => 'one',
  230. 'col' => 'sum(price) as price',
  231. ),
  232. 'getTy' => array
  233. (
  234. # 匹配的正则或函数 选填项
  235. 'option' => array
  236. (
  237. 'mid' => 'yes',
  238. 'state' => 1,
  239. ),
  240. 'type' => 'one',
  241. 'group' => 'mid',
  242. 'col' => 'sum(t_fprice) as t_fprice,sum(l_fprice) as l_fprice',
  243. ),
  244. 'getTiyan' => array
  245. (
  246. # 匹配的正则或函数 选填项
  247. 'option' => array
  248. (
  249. 'mid' => 'yes',
  250. 'state' => 1,
  251. ),
  252. 'type' => 'all',
  253. 'order' => array('month'=>'desc'),
  254. 'page' => array(20, 'list'),
  255. 'col' => 't_fprice,l_fprice,month',
  256. ),
  257. ),
  258. );