shop_stat.php 6.9 KB

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