member.php 9.6 KB

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