area_stat.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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-start',
  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. 'search' => 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. 'list_order' => 15,
  147. ),
  148. 'status' => array
  149. (
  150. 'type' => 'int-11',
  151. 'name' => '确认状态',
  152. 'default' => '2',
  153. 'desc' => '确认状态',
  154. 'match' => 'is_numeric',
  155. 'option' => $status,
  156. 'list' => true,
  157. ),
  158. 'cash_status' => array
  159. (
  160. 'type' => 'int-11',
  161. 'name' => '发放状态',
  162. 'default' => '2',
  163. 'desc' => '发放状态',
  164. 'match' => 'is_numeric',
  165. 'option' => $cash_status,
  166. 'list' => true,
  167. ),
  168. 'state' => array
  169. (
  170. 'type' => 'tinyint-1',
  171. 'name' => '状态',
  172. 'default' => '1',
  173. 'desc' => '请选择状态',
  174. 'match' => 'is_numeric',
  175. ),
  176. 'cdate' => array
  177. (
  178. 'type' => 'int-11',
  179. 'name' => '统计时间',
  180. 'match' => array('is_numeric', time()),
  181. 'desc' => '',
  182. ),
  183. ),
  184. 'manage' => array
  185. (
  186. 'insert' => false,
  187. 'delete' => false,
  188. 'edit' => false,
  189. 'excel' => true,
  190. 'list_type' => 'tree',
  191. ),
  192. 'request' => array
  193. (
  194. 'getData' => array
  195. (
  196. # 匹配的正则或函数 选填项
  197. 'option' => array
  198. (
  199. 'mid' => 'yes',
  200. 'state' => 1,
  201. ),
  202. 'order' => array('id' => 'desc'),
  203. 'page' => array(10, 'list'),
  204. 'type' => 'all',
  205. 'col' => '*',
  206. ),
  207. 'prev' => array
  208. (
  209. # 匹配的正则或函数 选填项
  210. 'option' => array
  211. (
  212. 'month' => array('yes-month', '<'),
  213. 'mid' => 'yes',
  214. 'state' => 1,
  215. ),
  216. 'order' => array('time' => 'desc', 'id' => 'desc'),
  217. 'type' => 'one',
  218. 'col' => '*,min(month) as time, sum(num) as num',
  219. # 允许自定义以上配置
  220. 'config' => true,
  221. ),
  222. 'getMoney' => array
  223. (
  224. # 匹配的正则或函数 选填项
  225. 'option' => array
  226. (
  227. 'mid' => 'yes',
  228. 'state' => 1,
  229. ),
  230. 'type' => 'one',
  231. 'col' => 'sum(price) as price',
  232. ),
  233. 'getTy' => array
  234. (
  235. # 匹配的正则或函数 选填项
  236. 'option' => array
  237. (
  238. 'mid' => 'yes',
  239. 'state' => 1,
  240. ),
  241. 'type' => 'one',
  242. 'group' => 'mid',
  243. 'col' => 'sum(t_fprice) as t_fprice,sum(l_fprice) as l_fprice',
  244. ),
  245. 'getTiyan' => array
  246. (
  247. # 匹配的正则或函数 选填项
  248. 'option' => array
  249. (
  250. 'mid' => 'yes',
  251. 'state' => 1,
  252. ),
  253. 'type' => 'all',
  254. 'order' => array('month'=>'desc'),
  255. 'page' => array(20, 'list'),
  256. 'col' => 't_fprice,l_fprice,month',
  257. ),
  258. ),
  259. );