member_area_log.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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_area_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. 'old_area' => array
  88. (
  89. 'type' => 'varchar-500',
  90. 'name' => '变更前区域',
  91. 'default' => '',
  92. 'desc' => '变更前区域',
  93. 'match' => 'option',
  94. //'search' => 'linkage',
  95. 'update' => 'linkage',
  96. 'option' => Dever::url('api.get?level_total=4', 'area'),
  97. 'list' => 'Dever::load("area/api.string", "{old_area}")',
  98. ),
  99. 'area' => array
  100. (
  101. 'type' => 'varchar-500',
  102. 'name' => '变更后区域',
  103. 'default' => '',
  104. 'desc' => '变更后区域',
  105. 'match' => 'option',
  106. //'search' => 'linkage',
  107. 'update' => 'linkage',
  108. 'option' => Dever::url('api.get?level_total=4', 'area'),
  109. 'list' => 'Dever::load("area/api.string", "{area}")',
  110. ),
  111. 'type' => array
  112. (
  113. 'type' => 'tinyint-1',
  114. 'name' => '类型',
  115. 'default' => '1',
  116. 'desc' => '类型',
  117. 'match' => 'is_numeric',
  118. 'update' => 'radio',
  119. 'option' => $type,
  120. ),
  121. 'audit_date' => array
  122. (
  123. 'type' => 'int-11',
  124. 'name' => '审核时间',
  125. 'match' => 'is_numeric',
  126. 'desc' => '审核时间',
  127. 'default' => '',
  128. ),
  129. 'audit_admin' => array
  130. (
  131. 'type' => 'int-11',
  132. 'name' => '操作人',
  133. 'default' => '',
  134. 'match' => 'is_numeric',
  135. 'desc' => '操作人',
  136. 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  137. // 'list_order' => 8,
  138. ),
  139. 'state' => array
  140. (
  141. 'type' => 'tinyint-1',
  142. 'name' => '状态',
  143. 'default' => '1',
  144. 'desc' => '请选择状态',
  145. 'match' => 'is_numeric',
  146. ),
  147. 'cdate' => array
  148. (
  149. 'type' => 'int-11',
  150. 'name' => '更改时间',
  151. 'match' => array('is_numeric', time()),
  152. 'desc' => '',
  153. # 只有insert时才生效
  154. 'insert' => true,
  155. 'search' => 'date',
  156. 'list' => 'date("Y-m-d H:i", {cdate})',
  157. 'list_order' => 2,
  158. ),
  159. ),
  160. 'manage' => array
  161. (
  162. 'edit' => false,
  163. 'insert' => false,
  164. 'delete' => false,
  165. 'button' => $button,
  166. ),
  167. 'request' => array
  168. (
  169. 'getData' => array
  170. (
  171. # 匹配的正则或函数 选填项
  172. 'option' => array
  173. (
  174. 'mid' => 'yes',
  175. 'type' => 'yes',
  176. 'state' => 1,
  177. ),
  178. 'order' => array('type' => 'asc', 'id' => 'desc'),
  179. 'type' => 'all',
  180. 'col' => '*, total_num-sell_num as num',
  181. ),
  182. ),
  183. );