area_stat.php 8.7 KB

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