member_account_log.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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' => array
  56. (
  57. 'api' => 'agent/member-getSearch',
  58. 'col' => 'col',
  59. 'result' => 'id',
  60. 'search' => 'mid',
  61. ),
  62. 'list_name' => '代理商信息',
  63. 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  64. 'list_order' => 1,
  65. ),
  66. 'order_id' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '关联订单',
  70. 'default' => '',
  71. 'desc' => '关联订单',
  72. 'match' => 'is_numeric',
  73. // 'list' => 'Dever::db("agent/order-find#order_num", {order_id})',
  74. // 'list' => true,
  75. // 'list_order' => 6,
  76. ),
  77. 'agent-member-name'=> array
  78. (
  79. 'name' => '代理商',
  80. 'default' => '',
  81. 'desc' => '代理商',
  82. 'match' => 'option',
  83. # 读取另外表的关联方式
  84. 'sync' => array('mid', 'id'),
  85. //'list' => $mid ? false : true,
  86. //'list_order' => 3,
  87. ),
  88. // 'agent-member-role'=> array
  89. // (
  90. // 'name' => '角色',
  91. // 'default' => '',
  92. // 'desc' => '角色',
  93. // 'match' => 'option',
  94. // # 读取另外表的关联方式
  95. // 'sync' => array('mid', 'id'),
  96. // //'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
  97. // //'list_order' => 5,
  98. // ),
  99. 'price' => array
  100. (
  101. 'type' => 'float-11,2',
  102. 'name' => '实付金额',
  103. 'default' => '0',
  104. 'desc' => '金额',
  105. 'match' => 'option',
  106. 'update' => 'text',
  107. 'list' => true,
  108. ),
  109. 'old_role' => array
  110. (
  111. 'type' => 'int-11',
  112. 'name' => '升级前代理角色',
  113. 'default' => '',
  114. 'desc' => '升级前代理角色',
  115. 'match' => 'is_numeric',
  116. 'search' => 'select',
  117. 'update' => 'checkbox',
  118. 'option' => $role,
  119. 'list' => true,
  120. ),
  121. 'new_role' => array
  122. (
  123. 'type' => 'int-11',
  124. 'name' => '升级后代理角色',
  125. 'default' => '',
  126. 'desc' => '升级后代理角色',
  127. 'match' => 'is_numeric',
  128. 'search' => 'select',
  129. 'update' => 'checkbox',
  130. 'option' => $role,
  131. 'list' => true,
  132. ),
  133. 'area' => array
  134. (
  135. 'type' => 'varchar-500',
  136. 'name' => '升级后区域',
  137. 'default' => '',
  138. 'desc' => '新区域',
  139. 'match' => 'option',
  140. 'search' => 'linkage',
  141. 'update' => 'linkage',
  142. 'option' => Dever::url('api.get?level_total=4', 'area'),
  143. 'list' => 'Dever::load("area/api.string", "{area}")',
  144. ),
  145. // 'audit_date' => array
  146. // (
  147. // 'type' => 'int-11',
  148. // 'name' => '审核时间',
  149. // 'match' => 'is_numeric',
  150. // 'desc' => '审核时间',
  151. // 'default' => '',
  152. // ),
  153. // 'audit_admin' => array
  154. // (
  155. // 'type' => 'int-11',
  156. // 'name' => '操作人',
  157. // 'default' => '',
  158. // 'match' => 'is_numeric',
  159. // 'desc' => '操作人',
  160. // 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  161. // // 'list_order' => 8,
  162. // ),
  163. 'state' => array
  164. (
  165. 'type' => 'tinyint-1',
  166. 'name' => '状态',
  167. 'default' => '1',
  168. 'desc' => '请选择状态',
  169. 'match' => 'is_numeric',
  170. ),
  171. 'cdate' => array
  172. (
  173. 'type' => 'int-11',
  174. 'name' => '更改时间',
  175. 'match' => array('is_numeric', time()),
  176. 'desc' => '',
  177. # 只有insert时才生效
  178. 'insert' => true,
  179. 'search' => 'date',
  180. 'list' => 'date("Y-m-d H:i", {cdate})',
  181. 'list_order' => 2,
  182. ),
  183. ),
  184. 'manage' => array
  185. (
  186. 'edit' => false,
  187. 'insert' => false,
  188. 'delete' => false,
  189. 'button' => $button,
  190. ),
  191. 'request' => array
  192. (
  193. 'getData' => array
  194. (
  195. # 匹配的正则或函数 选填项
  196. 'option' => array
  197. (
  198. 'mid' => 'yes',
  199. 'type' => 'yes',
  200. 'state' => 1,
  201. ),
  202. 'order' => array('type' => 'asc', 'id' => 'desc'),
  203. 'type' => 'all',
  204. 'col' => '*, total_num-sell_num as num',
  205. ),
  206. ),
  207. );