area_stat.php 8.8 KB

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