area_stat.php 8.4 KB

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