member_account_log.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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. $role = function()
  11. {
  12. $array = array();
  13. $data = Dever::load('setting/role-state');
  14. if($data)
  15. {
  16. $array += $data;
  17. }
  18. return $array;
  19. };
  20. $type = array
  21. (
  22. // 1 => '购买',
  23. 1 => '客户自己修改',
  24. 3 => '后台修改',
  25. );
  26. return array
  27. (
  28. # 表名
  29. 'name' => 'member_account_log',
  30. # 显示给用户看的名称
  31. 'lang' => '账户升级变更记录',
  32. 'order' => 9,
  33. # 数据结构
  34. 'struct' => array
  35. (
  36. 'id' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => 'ID',
  40. 'default' => '',
  41. 'desc' => '',
  42. 'match' => 'is_numeric',
  43. 'search' => 'order',
  44. 'update' => 'hidden',
  45. //'list' => true,
  46. ),
  47. 'mid' => array
  48. (
  49. 'type' => 'int-11',
  50. 'name' => '手机号',
  51. 'default' => '-1',
  52. 'desc' => '代理商',
  53. 'match' => 'is_string',
  54. 'update' => 'text',
  55. 'search' => $mid ? 'hidden' : array
  56. (
  57. 'api' => 'agent/member-find',
  58. 'col' => 'mobile',
  59. 'result' => 'id',
  60. ),
  61. 'list_name' => '代理商',
  62. 'list' => 'Dever::load("agent/lib/member.getOne", {mid})',
  63. 'list_order' => 1,
  64. ),
  65. 'order_id' => array
  66. (
  67. 'type' => 'int-11',
  68. 'name' => '关联订单',
  69. 'default' => '',
  70. 'desc' => '关联订单',
  71. 'match' => 'is_numeric',
  72. // 'list' => 'Dever::db("agent/order-find#order_num", {order_id})',
  73. // 'list' => true,
  74. // 'list_order' => 6,
  75. ),
  76. 'agent-member-name'=> array
  77. (
  78. 'name' => '代理商',
  79. 'default' => '',
  80. 'desc' => '代理商',
  81. 'match' => 'option',
  82. # 读取另外表的关联方式
  83. 'sync' => array('mid', 'id'),
  84. //'list' => $mid ? false : true,
  85. //'list_order' => 3,
  86. ),
  87. // 'agent-member-role'=> array
  88. // (
  89. // 'name' => '角色',
  90. // 'default' => '',
  91. // 'desc' => '角色',
  92. // 'match' => 'option',
  93. // # 读取另外表的关联方式
  94. // 'sync' => array('mid', 'id'),
  95. // //'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
  96. // //'list_order' => 5,
  97. // ),
  98. 'price' => array
  99. (
  100. 'type' => 'float-11,2',
  101. 'name' => '实付金额',
  102. 'default' => '0',
  103. 'desc' => '金额',
  104. 'match' => 'option',
  105. 'update' => 'text',
  106. 'list' => true,
  107. ),
  108. 'old_role' => array
  109. (
  110. 'type' => 'int-11',
  111. 'name' => '升级前代理角色',
  112. 'default' => '',
  113. 'desc' => '升级前代理角色',
  114. 'match' => 'is_numeric',
  115. 'search' => 'select',
  116. 'update' => 'checkbox',
  117. 'option' => $role,
  118. 'list' => true,
  119. ),
  120. 'new_role' => array
  121. (
  122. 'type' => 'int-11',
  123. 'name' => '升级后代理角色',
  124. 'default' => '',
  125. 'desc' => '升级后代理角色',
  126. 'match' => 'is_numeric',
  127. 'search' => 'select',
  128. 'update' => 'checkbox',
  129. 'option' => $role,
  130. 'list' => true,
  131. ),
  132. 'area' => array
  133. (
  134. 'type' => 'varchar-500',
  135. 'name' => '升级后区域',
  136. 'default' => '',
  137. 'desc' => '新区域',
  138. 'match' => 'option',
  139. 'search' => 'linkage',
  140. 'update' => 'linkage',
  141. 'option' => Dever::url('api.get?level_total=4', 'old_area'),
  142. 'list' => 'Dever::load("area/api.string", "{old_area}")',
  143. ),
  144. // 'audit_date' => array
  145. // (
  146. // 'type' => 'int-11',
  147. // 'name' => '审核时间',
  148. // 'match' => 'is_numeric',
  149. // 'desc' => '审核时间',
  150. // 'default' => '',
  151. // ),
  152. // 'audit_admin' => array
  153. // (
  154. // 'type' => 'int-11',
  155. // 'name' => '操作人',
  156. // 'default' => '',
  157. // 'match' => 'is_numeric',
  158. // 'desc' => '操作人',
  159. // 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  160. // // 'list_order' => 8,
  161. // ),
  162. 'state' => array
  163. (
  164. 'type' => 'tinyint-1',
  165. 'name' => '状态',
  166. 'default' => '1',
  167. 'desc' => '请选择状态',
  168. 'match' => 'is_numeric',
  169. ),
  170. 'cdate' => array
  171. (
  172. 'type' => 'int-11',
  173. 'name' => '更改时间',
  174. 'match' => array('is_numeric', time()),
  175. 'desc' => '',
  176. # 只有insert时才生效
  177. 'insert' => true,
  178. 'search' => 'date',
  179. 'list' => 'date("Y-m-d H:i", {cdate})',
  180. 'list_order' => 2,
  181. ),
  182. ),
  183. 'manage' => array
  184. (
  185. 'edit' => false,
  186. 'insert' => false,
  187. 'delete' => false,
  188. 'button' => $button,
  189. ),
  190. 'request' => array
  191. (
  192. 'getData' => array
  193. (
  194. # 匹配的正则或函数 选填项
  195. 'option' => array
  196. (
  197. 'mid' => 'yes',
  198. 'type' => 'yes',
  199. 'state' => 1,
  200. ),
  201. 'order' => array('type' => 'asc', 'id' => 'desc'),
  202. 'type' => 'all',
  203. 'col' => '*, total_num-sell_num as num',
  204. ),
  205. ),
  206. );