member_account_log.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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/lib/manage.role');
  14. if($data)
  15. {
  16. $array += $data;
  17. }
  18. return $array;
  19. };
  20. $type = array
  21. (
  22. 1 => '客户修改',
  23. 2 => '后台修改',
  24. );
  25. return array
  26. (
  27. # 表名
  28. 'name' => 'member_account_log',
  29. # 显示给用户看的名称
  30. 'lang' => '账户升级变更记录',
  31. 'order' => 9,
  32. # 数据结构
  33. 'struct' => array
  34. (
  35. 'id' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => 'ID',
  39. 'default' => '',
  40. 'desc' => '',
  41. 'match' => 'is_numeric',
  42. 'search' => 'order',
  43. 'update' => 'hidden',
  44. //'list' => true,
  45. ),
  46. 'mid' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '代理商姓名/手机号',
  50. 'default' => '-1',
  51. 'desc' => '代理商',
  52. 'match' => 'is_string',
  53. 'update' => 'text',
  54. 'search' => array
  55. (
  56. 'api' => 'agent/member-getSearch',
  57. 'col' => 'col',
  58. 'result' => 'id',
  59. 'search' => 'mid',
  60. ),
  61. 'list_name' => '代理商信息',
  62. 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  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' => 'decimal-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', 'area'),
  142. 'list' => 'Dever::load("area/api.string", "{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. 'alter' => array
  184. (
  185. 5 => array
  186. (
  187. array('update', 'price', 'price', 'decimal-11,2 0 实付金额'),
  188. ),
  189. 'version' => 5,
  190. ),
  191. 'manage' => array
  192. (
  193. 'edit' => false,
  194. 'insert' => false,
  195. 'delete' => false,
  196. 'button' => $button,
  197. ),
  198. 'request' => array
  199. (
  200. 'getData' => array
  201. (
  202. # 匹配的正则或函数 选填项
  203. 'option' => array
  204. (
  205. 'mid' => 'yes',
  206. 'type' => 'yes',
  207. 'state' => 1,
  208. ),
  209. 'order' => array('type' => 'asc', 'id' => 'desc'),
  210. 'type' => 'all',
  211. 'col' => '*, total_num-sell_num as num',
  212. ),
  213. ),
  214. );