member.php 9.2 KB

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