member.php 6.6 KB

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