member.php 8.4 KB

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