member.php 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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. # 绑定js脚本,更新时使用,第一个参数是执行的方式,第二个参数执行的方法,第三个参数是传值。
  87. 'bind' => array('onblur', 'loading', array('url' => Dever::url("lib/member.search", 'option'))),
  88. 'list' => true,
  89. ),
  90. 'aid' => array
  91. (
  92. 'type' => 'int-11',
  93. 'name' => '期权登录账户',
  94. 'default' => '-1',
  95. 'desc' => '期权登录账户',
  96. 'match' => 'is_string',
  97. 'update' => 'hidden',
  98. ),
  99. 'name' => array
  100. (
  101. 'type' => 'varchar-100',
  102. 'name' => '姓名',
  103. 'default' => '',
  104. 'desc' => '姓名',
  105. 'match' => 'is_string',
  106. 'update' => 'text',
  107. 'search' => 'fulltext',
  108. 'list' => 'Dever::load("option/lib/member.getInfo", {id})',
  109. 'list' => true,
  110. ),
  111. 'mobile' => array
  112. (
  113. 'type' => 'bigint-11',
  114. 'name' => '手机号',
  115. 'default' => '',
  116. 'desc' => '请输入手机号',
  117. 'match' => Dever::rule('mobile'),
  118. 'update' => 'text',
  119. 'search' => 'fulltext',
  120. 'list' => true,
  121. ),
  122. 'idcard' => array
  123. (
  124. 'type' => 'varchar-32',
  125. 'name' => '身份证号码',
  126. 'default' => '',
  127. 'desc' => '身份证号码',
  128. 'match' => Dever::rule('idcard'),
  129. 'match' => 'is_string',
  130. 'search' => 'fulltext',
  131. 'update' => 'text',
  132. 'list' => true,
  133. ),
  134. 'idcard_bind' => array
  135. (
  136. 'type' => 'tinyint-1',
  137. 'name' => '身份证是否绑定',
  138. 'default' => '2',
  139. 'desc' => '身份证是否绑定',
  140. 'match' => 'is_numeric',
  141. 'option' => $idcard_bind,
  142. ),
  143. 'status' => array
  144. (
  145. 'type' => 'tinyint-1',
  146. 'name' => '添加方式',
  147. 'default' => '1',
  148. 'desc' => '添加方式',
  149. 'match' => 'is_numeric',
  150. 'option' => $status,
  151. 'search' => 'select',
  152. // 'list' => true
  153. ),
  154. 'dever_auth' => array
  155. (
  156. 'name' => '权限',
  157. 'default' => '',
  158. 'desc' => '类型',
  159. 'match' => 'is_string',
  160. 'search' => 'hidden',
  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:s", {cdate})',
  180. ),
  181. ),
  182. 'manage' => array
  183. (
  184. 'insert' => false,
  185. 'delete' => false,
  186. 'edit' => false,
  187. 'list_button' => $list_button,
  188. ),
  189. 'request' => array
  190. (
  191. 'getOne' => array
  192. (
  193. # 匹配的正则或函数 选填项
  194. 'option' => array
  195. (
  196. 'main' => 1,
  197. 'key' => 'yes',
  198. 'mobile' => array('yes', 'like'),
  199. 'name' => array('yes', 'like'),
  200. 'idcard' => array('yes', 'like'),
  201. 'state' => 1,
  202. ),
  203. 'type' => 'all',
  204. 'col' => '*',
  205. ),
  206. 'getList' => array
  207. (
  208. # 匹配的正则或函数 选填项
  209. 'option' => array
  210. (
  211. 'main' => 'yes',
  212. 'key' => 'yes',
  213. 'state' => 1,
  214. ),
  215. 'order' => array('main' => 'asc','id' => 'desc'),
  216. 'type' => 'all',
  217. 'col' => '*',
  218. ),
  219. 'getData' => array
  220. (
  221. # 匹配的正则或函数 选填项
  222. 'option' => array
  223. (
  224. 'main' => 'yes',
  225. 'state' => 1,
  226. ),
  227. 'order' => array('id' => 'desc'),
  228. 'type' => 'all',
  229. 'col' => '*',
  230. ),
  231. # 获取主账号
  232. 'getMain' => array
  233. (
  234. # 匹配的正则或函数 选填项
  235. 'option' => array
  236. (
  237. 'mobile' => 'yes',
  238. 'key' => 'yes',
  239. 'main' => 1,
  240. 'state' => 1,
  241. ),
  242. 'type' => 'one',
  243. 'col' => '*',
  244. ),
  245. # 获取子账号
  246. 'getChild' => array
  247. (
  248. # 匹配的正则或函数 选填项
  249. 'option' => array
  250. (
  251. 'mobile' => 'yes',
  252. 'key' => 'yes',
  253. 'main' => 2,
  254. 'state' => 1,
  255. ),
  256. 'type' => 'one',
  257. 'col' => '*',
  258. ),
  259. 'getDataByKeys' => array
  260. (
  261. # 匹配的正则或函数 选填项
  262. 'option' => array
  263. (
  264. 'main' => 1,
  265. 'start' => array('yes-key', '>='),
  266. 'end' => array('yes-key', '<='),
  267. 'state' => 1,
  268. ),
  269. 'order' => array('main' => 'asc','id' => 'desc'),
  270. 'type' => 'all',
  271. 'col' => '*',
  272. ),
  273. ),
  274. );