member.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <?php
  2. $main = array
  3. (
  4. 1 => '主账号',
  5. 2 => '子账号',
  6. );
  7. $status = array
  8. (
  9. 1 => '手动添加',
  10. 2 => '系统导入',
  11. );
  12. $idcard_bind = array
  13. (
  14. 1 => '身份证已绑定',
  15. 2 => '身份证未绑定',
  16. );
  17. $search_auth = Dever::input('search_option_dever_auth', 1);
  18. $list_button = array();
  19. if ($search_auth <= 2) {
  20. $list_button = array
  21. (
  22. //'list' => array('查看详情', '"cash&mid={id}&page_type=1&search_audit=-1"'),
  23. 'fast_add' => array('期权价值交付', 'push_cash&search_option_aid={aid}&search_option_mid={id}&type=1'),
  24. 'fast_add1' => array('期权价值发放', 'push_cash&search_option_aid={aid}&search_option_mid={id}type=2'),
  25. 'list1' => array('交付记录', '"bill_jiaofu&search_option_main=2&search_option_aid={aid}&search_option_mid={id}&oper_table=member&top_table=account"'),
  26. 'list2' => array('发放记录', '"bill_fafang&search_option_main=2&search_option_aid={aid}&search_option_mid={id}&oper_table=member&top_table=account"'),
  27. 'list3' => array('兑付记录', '"bill_duifu&search_option_main=2&search_option_aid={aid}&search_option_mid={id}&oper_table=member&top_table=account"'),
  28. );
  29. }
  30. return array
  31. (
  32. # 表名
  33. 'name' => 'member',
  34. # 显示给用户看的名称
  35. 'lang' => '期权账户列表',
  36. 'order' => 100,
  37. 'menu' => false,
  38. 'check' => 'key,mobile',
  39. 'start' => array
  40. (
  41. 'insert' => 'option/lib/manage.checkMember',
  42. //'update' => 'option/lib/manage.checkMember',
  43. ),
  44. 'end' => array
  45. (
  46. 'insert' => 'option/lib/manage.updateMember',
  47. 'update' => 'option/lib/manage.updateMember',
  48. ),
  49. 'set' => array
  50. (
  51. 'main' => $main,
  52. ),
  53. # 数据结构
  54. 'struct' => array
  55. (
  56. 'id' => array
  57. (
  58. 'type' => 'int-11',
  59. 'name' => 'ID',
  60. 'default' => '',
  61. 'desc' => '',
  62. 'match' => 'is_numeric',
  63. 'search' => 'order',
  64. //'list' => true,
  65. ),
  66. 'main' => array
  67. (
  68. 'type' => 'tinyint-1',
  69. 'name' => '账号类型',
  70. 'default' => '1',
  71. 'desc' => '账号类型',
  72. 'match' => 'is_numeric',
  73. 'option' => $main,
  74. //'search' => 'hidden',
  75. 'update' => 'radio',
  76. //'list' => true,
  77. ),
  78. 'key' => array
  79. (
  80. 'type' => 'int-11',
  81. 'name' => '账户索引-通过账户索引来判断同一个人',
  82. 'default' => '',
  83. 'desc' => '账户索引',
  84. 'match' => 'is_string',
  85. 'update' => 'text',
  86. 'list' => true,
  87. ),
  88. 'aid' => array
  89. (
  90. 'type' => 'int-11',
  91. 'name' => '期权登录账户',
  92. 'default' => '-1',
  93. 'desc' => '期权登录账户',
  94. 'match' => 'is_string',
  95. 'update' => 'hidden',
  96. ),
  97. 'name' => array
  98. (
  99. 'type' => 'varchar-100',
  100. 'name' => '姓名',
  101. 'default' => '',
  102. 'desc' => '姓名',
  103. 'match' => 'is_string',
  104. 'update' => 'text',
  105. 'search' => 'fulltext',
  106. 'list' => 'Dever::load("option/lib/member.getInfo", {id})',
  107. 'list' => true,
  108. ),
  109. 'mobile' => array
  110. (
  111. 'type' => 'bigint-11',
  112. 'name' => '手机号',
  113. 'default' => '',
  114. 'desc' => '请输入手机号',
  115. 'match' => Dever::rule('mobile'),
  116. 'update' => 'text',
  117. 'search' => 'fulltext',
  118. 'list' => true,
  119. ),
  120. 'idcard' => array
  121. (
  122. 'type' => 'varchar-32',
  123. 'name' => '身份证号码',
  124. 'default' => '',
  125. 'desc' => '身份证号码',
  126. 'match' => Dever::rule('idcard'),
  127. 'match' => 'is_string',
  128. 'search' => 'fulltext',
  129. 'update' => 'text',
  130. 'list' => true,
  131. ),
  132. 'idcard_bind' => array
  133. (
  134. 'type' => 'tinyint-1',
  135. 'name' => '身份证是否绑定',
  136. 'default' => '2',
  137. 'desc' => '身份证是否绑定',
  138. 'match' => 'is_numeric',
  139. 'option' => $idcard_bind,
  140. ),
  141. 'status' => array
  142. (
  143. 'type' => 'tinyint-1',
  144. 'name' => '添加方式',
  145. 'default' => '1',
  146. 'desc' => '添加方式',
  147. 'match' => 'is_numeric',
  148. 'option' => $status,
  149. 'search' => 'select',
  150. 'list' => true
  151. ),
  152. 'dever_auth' => array
  153. (
  154. 'name' => '权限',
  155. 'default' => '',
  156. 'desc' => '类型',
  157. 'match' => 'is_string',
  158. 'search' => 'hidden',
  159. ),
  160. 'state' => array
  161. (
  162. 'type' => 'tinyint-1',
  163. 'name' => '状态',
  164. 'default' => '1',
  165. 'desc' => '请选择状态',
  166. 'match' => 'is_numeric',
  167. ),
  168. 'cdate' => array
  169. (
  170. 'type' => 'int-11',
  171. 'name' => '创建时间',
  172. 'match' => array('is_numeric', time()),
  173. 'desc' => '',
  174. # 只有insert时才生效
  175. 'insert' => true,
  176. 'search' => 'date',
  177. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  178. ),
  179. ),
  180. 'manage' => array
  181. (
  182. 'insert' => false,
  183. 'delete' => false,
  184. 'edit' => false,
  185. 'list_button' => $list_button,
  186. ),
  187. 'request' => array
  188. (
  189. 'getData' => array
  190. (
  191. # 匹配的正则或函数 选填项
  192. 'option' => array
  193. (
  194. 'main' => 'yes',
  195. 'state' => 1,
  196. ),
  197. 'order' => array('id' => 'desc'),
  198. 'type' => 'all',
  199. 'col' => '*',
  200. ),
  201. # 获取主账号
  202. 'getMain' => array
  203. (
  204. # 匹配的正则或函数 选填项
  205. 'option' => array
  206. (
  207. 'mobile' => 'yes',
  208. 'key' => 'yes',
  209. 'main' => 1,
  210. 'state' => 1,
  211. ),
  212. 'type' => 'one',
  213. 'col' => '*',
  214. ),
  215. # 获取子账号
  216. 'getChild' => array
  217. (
  218. # 匹配的正则或函数 选填项
  219. 'option' => array
  220. (
  221. 'mobile' => 'yes',
  222. 'key' => 'yes',
  223. 'main' => 2,
  224. 'state' => 1,
  225. ),
  226. 'type' => 'one',
  227. 'col' => '*',
  228. ),
  229. ),
  230. );