member_level_log.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <?php
  2. $mid = Dever::input('search_option_mid');
  3. $button = array();
  4. if ($mid) {
  5. $button = array
  6. (
  7. '返回上一页' => array('location', 'l=project/database/list&project=agent&table=member_area&page_type=1&mid=' . $mid),
  8. );
  9. }
  10. $level = function()
  11. {
  12. $array = array
  13. (
  14. -1 => array
  15. (
  16. 'id' => -1,
  17. 'name' => '普通',
  18. ),
  19. );
  20. $data = Dever::load('setting/level-state');
  21. if($data)
  22. {
  23. $array += $data;
  24. }
  25. return $array;
  26. };
  27. $type = array
  28. (
  29. 1 => '客户修改',
  30. 2 => '后台修改',
  31. );
  32. return array
  33. (
  34. # 表名
  35. 'name' => 'member_level_log',
  36. # 显示给用户看的名称
  37. 'lang' => '等级变更记录',
  38. 'order' => 9,
  39. # 数据结构
  40. 'struct' => array
  41. (
  42. 'id' => array
  43. (
  44. 'type' => 'int-11',
  45. 'name' => 'ID',
  46. 'default' => '',
  47. 'desc' => '',
  48. 'match' => 'is_numeric',
  49. 'search' => 'order',
  50. 'update' => 'hidden',
  51. //'list' => true,
  52. ),
  53. 'mid' => array
  54. (
  55. 'type' => 'int-11',
  56. 'name' => '代理商姓名/手机号',
  57. 'default' => '-1',
  58. 'desc' => '代理商',
  59. 'match' => 'is_string',
  60. 'update' => 'text',
  61. 'search' => array
  62. (
  63. 'api' => 'agent/member-getSearch',
  64. 'col' => 'col',
  65. 'result' => 'id',
  66. 'search' => 'mid',
  67. ),
  68. 'list_name' => '代理商信息',
  69. 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  70. 'list_order' => 1,
  71. ),
  72. 'order_id' => array
  73. (
  74. 'type' => 'int-11',
  75. 'name' => '关联订单',
  76. 'default' => '',
  77. 'desc' => '关联订单',
  78. 'match' => 'is_numeric',
  79. //'list' => 'Dever::db("agent/order-find#order_num", {order_id})',
  80. //'list' => true,
  81. //'list_order' => 6,
  82. ),
  83. 'agent-member-name'=> array
  84. (
  85. 'name' => '代理商',
  86. 'default' => '',
  87. 'desc' => '代理商',
  88. 'match' => 'option',
  89. # 读取另外表的关联方式
  90. 'sync' => array('mid', 'id'),
  91. //'list' => $mid ? false : true,
  92. //'list_order' => 3,
  93. ),
  94. 'agent-member-role'=> array
  95. (
  96. 'name' => '角色',
  97. 'default' => '',
  98. 'desc' => '角色',
  99. 'match' => 'option',
  100. # 读取另外表的关联方式
  101. 'sync' => array('mid', 'id'),
  102. //'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
  103. //'list_order' => 5,
  104. ),
  105. 'order_num' => array
  106. (
  107. 'type' => 'varchar-100',
  108. 'name' => '日志单号',
  109. 'default' => '',
  110. 'desc' => '日志单号',
  111. 'match' => 'is_string',
  112. 'update' => 'text',
  113. //'search' => 'fulltext',
  114. //'list' => true,
  115. //'list_order' => 2,
  116. ),
  117. 'old_level' => array
  118. (
  119. 'type' => 'int-11',
  120. 'name' => '变更前等级',
  121. 'default' => '-1',
  122. 'desc' => '原级别',
  123. 'match' => 'is_numeric',
  124. 'update' => 'radio',
  125. 'option' => $level,
  126. 'search' => 'select',
  127. 'list' => true,
  128. 'list_order' => 3,
  129. ),
  130. 'new_level' => array
  131. (
  132. 'type' => 'int-11',
  133. 'name' => '变更后等级',
  134. 'default' => '-1',
  135. 'desc' => '新级别',
  136. 'match' => 'is_numeric',
  137. 'update' => 'radio',
  138. 'option' => $level,
  139. 'search' => 'select',
  140. 'list' => true,
  141. 'list_order' => 4,
  142. ),
  143. 'new_sell' => array
  144. (
  145. 'type' => 'decimal-11,2',
  146. 'name' => '新增业绩',
  147. 'default' => '0',
  148. 'desc' => '新增业绩',
  149. 'match' => 'is_numeric',
  150. 'update' => 'text',
  151. //'list' => true,
  152. //'list_order' => 5,
  153. ),
  154. 'sell' => array
  155. (
  156. 'type' => 'decimal-11,2',
  157. 'name' => '升级时业绩',
  158. 'default' => '0',
  159. 'desc' => '总业绩',
  160. 'match' => 'is_numeric',
  161. 'update' => 'text',
  162. 'list' => true,
  163. 'list_order' => 5,
  164. ),
  165. 'group_num' => array
  166. (
  167. 'type' => 'int-11',
  168. 'name' => '代理商团队数',
  169. 'default' => '0',
  170. 'desc' => '代理商团队数',
  171. 'match' => 'is_numeric',
  172. 'update' => 'text',
  173. 'list' => true,
  174. 'list_order' => 9,
  175. ),
  176. 'type' => array
  177. (
  178. 'type' => 'tinyint-1',
  179. 'name' => '类型',
  180. 'default' => '1',
  181. 'desc' => '类型',
  182. 'match' => 'is_numeric',
  183. 'update' => 'radio',
  184. 'option' => $type,
  185. ),
  186. 'audit_date' => array
  187. (
  188. 'type' => 'int-11',
  189. 'name' => '审核时间',
  190. 'match' => 'is_numeric',
  191. 'desc' => '审核时间',
  192. 'default' => '',
  193. ),
  194. 'audit_admin' => array
  195. (
  196. 'type' => 'int-11',
  197. 'name' => '操作人',
  198. 'default' => '',
  199. 'match' => 'is_numeric',
  200. 'desc' => '操作人',
  201. 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  202. // 'list_order' => 8,
  203. ),
  204. 'state' => array
  205. (
  206. 'type' => 'tinyint-1',
  207. 'name' => '状态',
  208. 'default' => '1',
  209. 'desc' => '请选择状态',
  210. 'match' => 'is_numeric',
  211. ),
  212. 'cdate' => array
  213. (
  214. 'type' => 'int-11',
  215. 'name' => '更改时间',
  216. 'match' => array('is_numeric', time()),
  217. 'desc' => '',
  218. # 只有insert时才生效
  219. 'insert' => true,
  220. 'search' => 'date',
  221. 'list' => 'date("Y-m-d H:i", {cdate})',
  222. 'list_order' => 2,
  223. ),
  224. ),
  225. 'alter' => array
  226. (
  227. 5 => array
  228. (
  229. array('update', 'new_sell', 'new_sell', 'decimal-11,2 0 新增业绩'),
  230. array('update', 'sell', 'sell', 'decimal-11,2 0 升级时业绩'),
  231. ),
  232. 'version' => 5,
  233. ),
  234. 'manage' => array
  235. (
  236. 'edit' => false,
  237. 'insert' => false,
  238. 'delete' => false,
  239. 'button' => $button,
  240. ),
  241. 'request' => array
  242. (
  243. 'getData' => array
  244. (
  245. # 匹配的正则或函数 选填项
  246. 'option' => array
  247. (
  248. 'mid' => 'yes',
  249. 'type' => 'yes',
  250. 'state' => 1,
  251. ),
  252. 'order' => array('type' => 'asc', 'id' => 'desc'),
  253. 'type' => 'all',
  254. 'col' => '*, total_num-sell_num as num',
  255. ),
  256. ),
  257. );