area_stat.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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. 'price' => 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. 'list_order' => 5,
  133. ),
  134. 'l_num' => array
  135. (
  136. 'type' => 'decimal-11',
  137. 'name' => '零售店数量',
  138. 'default' => '0',
  139. 'desc' => '零售店数量',
  140. 'match' => 'is_numeric',
  141. // 'update' => 'text',
  142. 'list' => true,
  143. ),
  144. 'l_price' => array
  145. (
  146. 'type' => 'decimal-11,2',
  147. 'name' => '零售店采购金额',
  148. 'default' => '0',
  149. 'desc' => '零售店采购金额',
  150. 'match' => 'is_numeric',
  151. // 'update' => 'text',
  152. 'list' => true,
  153. ),
  154. 'state' => array
  155. (
  156. 'type' => 'tinyint-1',
  157. 'name' => '状态',
  158. 'default' => '1',
  159. 'desc' => '请选择状态',
  160. 'match' => 'is_numeric',
  161. ),
  162. 'cdate' => array
  163. (
  164. 'type' => 'int-11',
  165. 'name' => '统计时间',
  166. 'match' => array('is_numeric', time()),
  167. 'desc' => '',
  168. ),
  169. ),
  170. 'manage' => array
  171. (
  172. 'insert' => false,
  173. 'delete' => false,
  174. 'edit' => false,
  175. 'excel' => true,
  176. ),
  177. 'request' => array
  178. (
  179. 'getData' => array
  180. (
  181. # 匹配的正则或函数 选填项
  182. 'option' => array
  183. (
  184. 'mid' => 'yes',
  185. 'state' => 1,
  186. ),
  187. 'order' => array('id' => 'desc'),
  188. 'page' => array(10, 'list'),
  189. 'type' => 'all',
  190. 'col' => '*',
  191. ),
  192. 'prev' => array
  193. (
  194. # 匹配的正则或函数 选填项
  195. 'option' => array
  196. (
  197. 'month' => array('yes-month', '<'),
  198. 'mid' => 'yes',
  199. 'state' => 1,
  200. ),
  201. 'order' => array('time' => 'desc', 'id' => 'desc'),
  202. 'type' => 'one',
  203. 'col' => '*,min(month) as time, sum(num) as num',
  204. # 允许自定义以上配置
  205. 'config' => true,
  206. ),
  207. ),
  208. );