shop_stat.php 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <?php
  2. // if (Dever::load('manage/auth')->checkFunc('bill.member_stat', 'edit1', '导出数据')) {
  3. // $excel = true;
  4. // }else{
  5. // $excel = false;
  6. // }
  7. $shop = function()
  8. {
  9. $array = array();
  10. $data = Dever::db('shop/info-state');
  11. if($data)
  12. {
  13. $array += $data;
  14. }
  15. return $array;
  16. };
  17. $config = array
  18. (
  19. # 表名
  20. 'name' => 'shop_stat',
  21. # 显示给用户看的名称
  22. 'lang' => '归店统计',
  23. 'order' => -10,
  24. # 数据结构 不同的字段放这里
  25. 'struct' => array
  26. (
  27. 'id' => array
  28. (
  29. 'type' => 'int-11',
  30. 'name' => 'ID',
  31. 'default' => '',
  32. 'desc' => '',
  33. 'match' => 'is_numeric',
  34. //'list' => true,
  35. ),
  36. 'month' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => '月份',
  40. 'default' => '',
  41. 'match' => 'is_numeric',
  42. 'desc' => '',
  43. 'search' => 'month',
  44. 'list' => 'date("Y-m", {month})',
  45. ),
  46. 'shop_id' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '店铺名称',
  50. 'default' => '',
  51. 'desc' => '店铺名称',
  52. 'match' => 'is_numeric',
  53. 'option' => $shop,
  54. 'list' => true,
  55. //'list_order' => 6,
  56. ),
  57. 'num' => array
  58. (
  59. 'type' => 'int-11',
  60. 'name' => '代理商总数量',
  61. 'default' => '0',
  62. 'desc' => '代理商总数量',
  63. 'match' => 'is_numeric',
  64. 'search' => 'order',
  65. // 'list' => true,
  66. ),
  67. 'dl_num' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '代理商<br/>数量-除掉创v的数量',
  71. 'default' => '0',
  72. 'desc' => '代理商数量',
  73. 'match' => 'is_numeric',
  74. // 'search' => 'order',
  75. 'list' => true,
  76. ),
  77. 'v_num' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '创V总数量',
  81. 'default' => '0',
  82. 'desc' => '创V总数量',
  83. 'match' => 'is_numeric',
  84. // 'search' => 'order',
  85. // 'list' => true,
  86. ),
  87. 'out_num' => array
  88. (
  89. 'type' => 'int-11',
  90. 'name' => '创V名额<br/>外数量',
  91. 'default' => '0',
  92. 'desc' => '创V名额外数量',
  93. 'match' => 'is_numeric',
  94. // 'search' => 'order',
  95. 'list' => true,
  96. ),
  97. 'nei_num' => array
  98. (
  99. 'type' => 'int-11',
  100. 'name' => '创V名额<br/>内数量',
  101. 'default' => '0',
  102. 'desc' => '创V名额内数量',
  103. 'match' => 'is_numeric',
  104. // 'search' => 'order',
  105. 'list' => true,
  106. ),
  107. 'money' => array
  108. (
  109. 'type' => 'decimal-11,2',
  110. 'name' => '代理商的总业绩',
  111. 'default' => '0',
  112. 'desc' => '代理商的总业绩',
  113. 'match' => 'is_numeric',
  114. 'update' => 'text',
  115. // 'list' => true,
  116. ),
  117. 'dl_money' => array
  118. (
  119. 'type' => 'decimal-11,2',
  120. 'name' => '代理商<br/>业绩',
  121. 'default' => '0',
  122. 'desc' => '代理商业绩',
  123. 'match' => 'is_numeric',
  124. 'update' => 'text',
  125. 'list' => true,
  126. ),
  127. 'v_money' => array
  128. (
  129. 'type' => 'decimal-11,2',
  130. 'name' => '创V总业绩',
  131. 'default' => '0',
  132. 'desc' => '创V总业绩',
  133. 'match' => 'is_numeric',
  134. 'update' => 'text',
  135. // 'list' => true,
  136. ),
  137. 'out_money' => array
  138. (
  139. 'type' => 'decimal-11,2',
  140. 'name' => '创V名额<br/>外业绩',
  141. 'default' => '0',
  142. 'desc' => '创V名额外业绩',
  143. 'match' => 'is_numeric',
  144. 'update' => 'text',
  145. 'list' => true,
  146. ),
  147. 'nei_money' => array
  148. (
  149. 'type' => 'decimal-11,2',
  150. 'name' => '创V名额<br/>内业绩',
  151. 'default' => '0',
  152. 'desc' => '创V名额内业绩',
  153. 'match' => 'is_numeric',
  154. 'update' => 'text',
  155. 'list' => true,
  156. ),
  157. 'state' => array
  158. (
  159. 'type' => 'tinyint-1',
  160. 'name' => '数据状态',
  161. 'default' => '1',
  162. 'desc' => '请选择状态',
  163. 'match' => 'is_numeric',
  164. ),
  165. 'cdate' => array
  166. (
  167. 'type' => 'int-11',
  168. 'name' => '发布时间',
  169. 'match' => array('is_numeric', time()),
  170. 'desc' => '',
  171. # 只有insert时才生效
  172. 'insert' => true,
  173. //'search' => 'date',
  174. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  175. ),
  176. ),
  177. 'manage' => array
  178. (
  179. 'insert' => false,
  180. 'edit' => false,
  181. 'delete' => false,
  182. 'num' => false,
  183. // 'excel' => $excel,
  184. 'button' => array
  185. (
  186. '数据导出' => array('excel','bill/lib/manage.out_shop_stat'),
  187. ),
  188. ),
  189. # request 请求接口定义
  190. 'request' => array
  191. (
  192. 'getExcelAll' => array
  193. (
  194. # 匹配的正则或函数 选填项
  195. 'option' => array
  196. (
  197. 'start' => array('yes-month', '>='),
  198. 'end' => array('yes-month', '<='),
  199. 'state' => 1,
  200. ),
  201. 'type' => 'all',
  202. 'col' => '*',
  203. ),
  204. ),
  205. );
  206. return $config;