member.php 8.8 KB

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