cash_in_stat.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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' => 'float-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' => 'float-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' => 'float-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' => 'float-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' => 'float-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' => 'float-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' => 'float-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' => 'float-11,2',
  115. 'name' => '市场培训费',
  116. 'default' => '0',
  117. 'desc' => '市场培训费',
  118. 'match' => 'is_numeric',
  119. 'search' => 'order',
  120. 'list' => true,
  121. ),
  122. 'state' => array
  123. (
  124. 'type' => 'tinyint-1',
  125. 'name' => '数据状态',
  126. 'default' => '1',
  127. 'desc' => '请选择状态',
  128. 'match' => 'is_numeric',
  129. ),
  130. 'cdate' => array
  131. (
  132. 'type' => 'int-11',
  133. 'name' => '发布时间',
  134. 'match' => array('is_numeric', time()),
  135. 'desc' => '',
  136. # 只有insert时才生效
  137. 'insert' => true,
  138. //'search' => 'date',
  139. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  140. ),
  141. ),
  142. 'manage' => array
  143. (
  144. 'insert' => false,
  145. 'edit' => false,
  146. 'delete' => false,
  147. 'num' => false,
  148. 'excel' => true,
  149. ),
  150. # request 请求接口定义
  151. 'request' => array
  152. (
  153. 'list' => array
  154. (
  155. # 匹配的正则或函数 选填项
  156. 'option' => array
  157. (
  158. 'start_day' => array('yes-day', '>='),
  159. 'end_day' => array('yes-day', '<='),
  160. 'state' => 1,
  161. ),
  162. 'type' => 'all',
  163. 'order' => array('time' => 'desc', 'cdate' => 'desc'),
  164. 'page' => array(20, 'list'),
  165. 'group' => 'day',//cash,daili_cash,soft_cash,goods_cash,zt_cash,sc_cash
  166. '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',
  167. ),
  168. ),
  169. );
  170. return $config;