member_level_log.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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. return array
  28. (
  29. # 表名
  30. 'name' => 'member_level_log',
  31. # 显示给用户看的名称
  32. 'lang' => '等级变更记录',
  33. 'order' => 9,
  34. # 数据结构
  35. 'struct' => array
  36. (
  37. 'id' => array
  38. (
  39. 'type' => 'int-11',
  40. 'name' => 'ID',
  41. 'default' => '',
  42. 'desc' => '',
  43. 'match' => 'is_numeric',
  44. 'search' => 'order',
  45. 'update' => 'hidden',
  46. //'list' => true,
  47. ),
  48. 'mid' => array
  49. (
  50. 'type' => 'int-11',
  51. 'name' => '代理商姓名/手机号',
  52. 'default' => '-1',
  53. 'desc' => '代理商',
  54. 'match' => 'is_string',
  55. 'update' => 'text',
  56. 'search' => array
  57. (
  58. 'api' => 'agent/member-getSearch',
  59. 'col' => 'col',
  60. 'result' => 'id',
  61. 'search' => 'mid',
  62. ),
  63. 'list_name' => '代理商信息',
  64. 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  65. 'list_order' => 1,
  66. ),
  67. 'order_id' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '关联订单',
  71. 'default' => '',
  72. 'desc' => '关联订单',
  73. 'match' => 'is_numeric',
  74. //'list' => 'Dever::db("agent/order-find#order_num", {order_id})',
  75. //'list' => true,
  76. //'list_order' => 6,
  77. ),
  78. 'agent-member-name'=> array
  79. (
  80. 'name' => '代理商',
  81. 'default' => '',
  82. 'desc' => '代理商',
  83. 'match' => 'option',
  84. # 读取另外表的关联方式
  85. 'sync' => array('mid', 'id'),
  86. //'list' => $mid ? false : true,
  87. //'list_order' => 3,
  88. ),
  89. 'agent-member-role'=> array
  90. (
  91. 'name' => '角色',
  92. 'default' => '',
  93. 'desc' => '角色',
  94. 'match' => 'option',
  95. # 读取另外表的关联方式
  96. 'sync' => array('mid', 'id'),
  97. //'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
  98. //'list_order' => 5,
  99. ),
  100. 'order_num' => array
  101. (
  102. 'type' => 'varchar-100',
  103. 'name' => '日志单号',
  104. 'default' => '',
  105. 'desc' => '日志单号',
  106. 'match' => 'is_string',
  107. 'update' => 'text',
  108. //'search' => 'fulltext',
  109. //'list' => true,
  110. //'list_order' => 2,
  111. ),
  112. 'old_level' => array
  113. (
  114. 'type' => 'int-11',
  115. 'name' => '变更前等级',
  116. 'default' => '-1',
  117. 'desc' => '原级别',
  118. 'match' => 'is_numeric',
  119. 'update' => 'radio',
  120. 'option' => $level,
  121. 'search' => 'select',
  122. 'list' => true,
  123. 'list_order' => 3,
  124. ),
  125. 'new_level' => array
  126. (
  127. 'type' => 'int-11',
  128. 'name' => '变更后等级',
  129. 'default' => '-1',
  130. 'desc' => '新级别',
  131. 'match' => 'is_numeric',
  132. 'update' => 'radio',
  133. 'option' => $level,
  134. 'search' => 'select',
  135. 'list' => true,
  136. 'list_order' => 4,
  137. ),
  138. 'new_sell' => array
  139. (
  140. 'type' => 'float-11,2',
  141. 'name' => '新增业绩',
  142. 'default' => '0',
  143. 'desc' => '新增业绩',
  144. 'match' => 'is_numeric',
  145. 'update' => 'text',
  146. //'list' => true,
  147. //'list_order' => 5,
  148. ),
  149. 'sell' => array
  150. (
  151. 'type' => 'float-11,2',
  152. 'name' => '升级时业绩',
  153. 'default' => '0',
  154. 'desc' => '总业绩',
  155. 'match' => 'is_numeric',
  156. 'update' => 'text',
  157. 'list' => true,
  158. 'list_order' => 5,
  159. ),
  160. 'group_num' => array
  161. (
  162. 'type' => 'int-11',
  163. 'name' => '代理商团队数',
  164. 'default' => '0',
  165. 'desc' => '代理商团队数',
  166. 'match' => 'is_numeric',
  167. 'update' => 'text',
  168. 'list' => true,
  169. 'list_order' => 9,
  170. ),
  171. 'state' => array
  172. (
  173. 'type' => 'tinyint-1',
  174. 'name' => '状态',
  175. 'default' => '1',
  176. 'desc' => '请选择状态',
  177. 'match' => 'is_numeric',
  178. ),
  179. 'cdate' => array
  180. (
  181. 'type' => 'int-11',
  182. 'name' => '升级时间',
  183. 'match' => array('is_numeric', time()),
  184. 'desc' => '',
  185. # 只有insert时才生效
  186. 'insert' => true,
  187. 'search' => 'date',
  188. 'list' => 'date("Y-m-d H:i", {cdate})',
  189. 'list_order' => 2,
  190. ),
  191. ),
  192. 'manage' => array
  193. (
  194. 'edit' => false,
  195. 'insert' => false,
  196. 'delete' => false,
  197. 'button' => $button,
  198. ),
  199. 'request' => array
  200. (
  201. 'getData' => array
  202. (
  203. # 匹配的正则或函数 选填项
  204. 'option' => array
  205. (
  206. 'mid' => 'yes',
  207. 'type' => 'yes',
  208. 'state' => 1,
  209. ),
  210. 'order' => array('type' => 'asc', 'id' => 'desc'),
  211. 'type' => 'all',
  212. 'col' => '*, total_num-sell_num as num',
  213. ),
  214. ),
  215. );