shop_stat.php 6.3 KB

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