cash_up_stat.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <?php
  2. $config = array
  3. (
  4. # 表名
  5. 'name' => 'cash_up_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,xc_cash,ws_cash,df_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. 'xc_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. 'ws_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. 'df_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. '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(xc_cash) as xc_cash, sum(ws_cash) as ws_cash, sum(df_cash) as df_cash',
  167. ),
  168. 'all' => array
  169. (
  170. # 匹配的正则或函数 选填项
  171. 'option' => array
  172. (
  173. 'start_day' => array('yes-day', '>='),
  174. 'end_day' => array('yes-day', '<='),
  175. 'state' => 1,
  176. ),
  177. 'type' => 'all',
  178. 'order' => array('time' => 'desc', 'cdate' => 'desc'),
  179. 'group' => 'day',//cash,daili_cash,soft_cash,goods_cash,zt_cash,sc_cash
  180. 'col' => '*,min(day) as time, sum(cash) as cash, sum(xc_cash) as xc_cash, sum(ws_cash) as ws_cash, sum(df_cash) as df_cash',
  181. ),
  182. ),
  183. );
  184. return $config;