cash_in_stat.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <?php
  2. $config = array
  3. (
  4. # 表名
  5. 'name' => 'cash_in_stat',
  6. # 显示给用户看的名称
  7. 'lang' => '财务收入报表',
  8. 'order' => -10,
  9. # 数据结构 不同的字段放这里
  10. 'struct' => array
  11. (
  12. 'id' => array
  13. (
  14. 'type' => 'int-11',
  15. 'name' => 'ID',
  16. 'default' => '',
  17. 'desc' => '',
  18. 'match' => 'is_numeric',
  19. //'list' => true,
  20. ),
  21. 'day' => array
  22. (
  23. 'type' => 'int-11',
  24. 'name' => '日期',
  25. 'default' => '',
  26. 'match' => 'is_numeric',
  27. 'desc' => '',
  28. 'search' => 'day',
  29. 'search_button' => array
  30. (
  31. 'sum' => 'cash,daili_cash,soft_cash,goods_cash,zt_cash,sc_cash,hd_cash,sd_cash',
  32. 'option' => array(
  33. 'day' => '按天',
  34. 'week' => '按周',
  35. 'month' => '按月',
  36. ),
  37. 'group' => '',
  38. ),
  39. 'order' => 'desc',
  40. 'list' => 'Dever::showDay("{day}")',
  41. ),
  42. 'cash' => array
  43. (
  44. 'type' => 'decimal-11,2',
  45. 'name' => '总收入',
  46. 'default' => '0',
  47. 'desc' => '总收入',
  48. 'match' => 'is_numeric',
  49. 'search' => 'order',
  50. 'list' => true,
  51. ),
  52. 'daili_cash' => array
  53. (
  54. 'type' => 'decimal-11,2',
  55. 'name' => '代理费',
  56. 'default' => '0',
  57. 'desc' => '代理费',
  58. 'match' => 'is_numeric',
  59. 'search' => 'order',
  60. 'list' => true,
  61. ),
  62. 'soft_cash' => array
  63. (
  64. 'type' => 'decimal-11,2',
  65. 'name' => '软件服务费',
  66. 'default' => '0',
  67. 'desc' => '代软件服务费理费',
  68. 'match' => 'is_numeric',
  69. 'search' => 'order',
  70. 'list' => true,
  71. ),
  72. 'goods_cash' => array
  73. (
  74. 'type' => 'decimal-11,2',
  75. 'name' => '赠送商品价值',
  76. 'default' => '0',
  77. 'desc' => '赠送商品价值',
  78. 'match' => 'is_numeric',
  79. 'search' => 'order',
  80. 'list' => true,
  81. ),
  82. 'zt_cash' => array
  83. (
  84. 'type' => 'decimal-11,2',
  85. 'name' => '直推佣金',
  86. 'default' => '0',
  87. 'desc' => '直推佣金',
  88. 'match' => 'is_numeric',
  89. 'search' => 'order',
  90. 'list' => true,
  91. ),
  92. 'sc_cash' => array
  93. (
  94. 'type' => 'decimal-11,2',
  95. 'name' => '市场培训费',
  96. 'default' => '0',
  97. 'desc' => '市场培训费',
  98. 'match' => 'is_numeric',
  99. 'search' => 'order',
  100. 'list' => true,
  101. ),
  102. 'hd_cash' => array
  103. (
  104. 'type' => 'decimal-11,2',
  105. 'name' => '活动佣金',
  106. 'default' => '0',
  107. 'desc' => '活动佣金',
  108. 'match' => 'is_numeric',
  109. 'search' => 'order',
  110. 'list' => true,
  111. ),
  112. 'sd_cash' => array
  113. (
  114. 'type' => 'decimal-11,2',
  115. 'name' => '手动发放',
  116. 'default' => '0',
  117. 'desc' => '手动发放',
  118. 'match' => 'is_numeric',
  119. 'search' => 'order',
  120. 'list' => true,
  121. ),
  122. 'jt_cash' => array
  123. (
  124. 'type' => 'decimal-11,2',
  125. 'name' => '区域管理收益',
  126. 'default' => '0',
  127. 'desc' => '区域管理收益',
  128. 'match' => 'is_numeric',
  129. 'search' => 'order',
  130. 'list' => true,
  131. ),
  132. 'state' => array
  133. (
  134. 'type' => 'tinyint-1',
  135. 'name' => '数据状态',
  136. 'default' => '1',
  137. 'desc' => '请选择状态',
  138. 'match' => 'is_numeric',
  139. ),
  140. 'cdate' => array
  141. (
  142. 'type' => 'int-11',
  143. 'name' => '发布时间',
  144. 'match' => array('is_numeric', time()),
  145. 'desc' => '',
  146. # 只有insert时才生效
  147. 'insert' => true,
  148. //'search' => 'date',
  149. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  150. ),
  151. ),
  152. 'manage' => array
  153. (
  154. 'insert' => false,
  155. 'edit' => false,
  156. 'delete' => false,
  157. 'num' => false,
  158. 'excel' => true,
  159. ),
  160. # request 请求接口定义
  161. 'request' => array
  162. (
  163. 'list' => array
  164. (
  165. # 匹配的正则或函数 选填项
  166. 'option' => array
  167. (
  168. 'start_day' => array('yes-day', '>='),
  169. 'end_day' => array('yes-day', '<='),
  170. 'state' => 1,
  171. ),
  172. 'type' => 'all',
  173. 'order' => array('time' => 'desc', 'cdate' => 'desc'),
  174. 'page' => array(20, 'list'),
  175. 'group' => 'day',//cash,daili_cash,soft_cash,goods_cash,zt_cash,sc_cash
  176. 'col' => '*,min(day) as time, sum(cash) as cash, sum(daili_cash) as daili_cash, sum(soft_cash) as soft_cash, sum(zt_cash) as zt_cash, sum(goods_cash) as goods_cash, sum(sc_cash) as sc_cash, sum(hd_cash) as hd_cash, sum(sd_cash) as sd_cash',
  177. ),
  178. 'all' => array
  179. (
  180. # 匹配的正则或函数 选填项
  181. 'option' => array
  182. (
  183. 'start_day' => array('yes-day', '>='),
  184. 'end_day' => array('yes-day', '<='),
  185. 'state' => 1,
  186. ),
  187. 'type' => 'all',
  188. 'order' => array('time' => 'desc', 'cdate' => 'desc'),
  189. 'group' => 'day',//cash,daili_cash,soft_cash,goods_cash,zt_cash,sc_cash
  190. 'col' => '*,min(day) as time, sum(cash) as cash, sum(daili_cash) as daili_cash, sum(soft_cash) as soft_cash, sum(zt_cash) as zt_cash, sum(goods_cash) as goods_cash, sum(sc_cash) as sc_cash, sum(hd_cash) as hd_cash, sum(sd_cash) as sd_cash',
  191. ),
  192. ),
  193. );
  194. return $config;