member.php 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  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_add2' => array('期权价值作废', 'push_cash&search_option_aid={aid}&search_option_mid={id}&search_option_company_id={company_id}&type=10'),
  25. 'fast_add1' => array('期权价值发放', 'push_cash&search_option_aid={aid}&search_option_mid={id}&search_option_company_id={company_id}&type=2'),
  26. 'br3' => array('<br />'),
  27. 'list1' => array('交付记录', '"bill_jiaofu&search_option_main=2&search_option_aid={aid}&search_option_mid={id}&top_table=account"'),
  28. 'list4' => array('作废记录', '"bill_zuofei&search_option_main=2&search_option_aid={aid}&search_option_mid={id}&top_table=account"'),
  29. 'list2' => array('发放记录', '"bill_fafang&search_option_main=2&search_option_aid={aid}&search_option_mid={id}&top_table=account"'),
  30. 'list3' => array('兑付记录', '"bill_duifu&search_option_main=2&search_option_aid={aid}&search_option_mid={id}&top_table=account"'),
  31. );
  32. }
  33. return array
  34. (
  35. # 表名
  36. 'name' => 'member',
  37. # 显示给用户看的名称
  38. 'lang' => '期权账户列表',
  39. 'order' => 100,
  40. 'menu' => false,
  41. 'check' => 'key,mobile',
  42. 'start' => array
  43. (
  44. 'insert' => 'option/lib/manage.checkMember',
  45. //'update' => 'option/lib/manage.checkMember',
  46. ),
  47. 'end' => array
  48. (
  49. 'insert' => 'option/lib/manage.updateMember',
  50. 'update' => 'option/lib/manage.updateMember',
  51. 'update_main' => 'option/lib/manage.updateMain',
  52. ),
  53. 'set' => array
  54. (
  55. 'main' => $main,
  56. ),
  57. # 数据结构
  58. 'struct' => array
  59. (
  60. 'id' => array
  61. (
  62. 'type' => 'int-11',
  63. 'name' => 'ID',
  64. 'default' => '',
  65. 'desc' => '',
  66. 'match' => 'is_numeric',
  67. 'search' => 'order',
  68. //'list' => true,
  69. ),
  70. 'company_id' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '所属公司',
  74. 'default' => '1',
  75. 'desc' => '所属公司',
  76. 'match' => 'is_numeric',
  77. 'update' => 'hidden',
  78. //'search' => $company ? 'select' : false,
  79. //'list' => true,
  80. ),
  81. 'main' => array
  82. (
  83. 'type' => 'tinyint-1',
  84. 'name' => '账号类型',
  85. 'default' => '1',
  86. 'desc' => '账号类型',
  87. 'match' => 'is_numeric',
  88. 'option' => $main,
  89. //'search' => 'hidden',
  90. 'update' => 'radio',
  91. 'order' => 'asc',
  92. 'list' => true,
  93. 'edit' => true,
  94. ),
  95. 'key' => array
  96. (
  97. 'type' => 'int-11',
  98. 'name' => '账户索引-通过账户索引来判断同一个人',
  99. 'default' => '',
  100. 'desc' => '账户索引',
  101. 'match' => 'is_string',
  102. 'update' => 'text',
  103. # 绑定js脚本,更新时使用,第一个参数是执行的方式,第二个参数执行的方法,第三个参数是传值。
  104. 'bind' => array('onblur', 'loading', array('url' => Dever::url("lib/member.search", 'option'))),
  105. 'list' => true,
  106. ),
  107. 'aid' => array
  108. (
  109. 'type' => 'int-11',
  110. 'name' => '期权登录账户',
  111. 'default' => '-1',
  112. 'desc' => '期权登录账户',
  113. 'match' => 'is_string',
  114. 'update' => 'hidden',
  115. ),
  116. 'name' => array
  117. (
  118. 'type' => 'varchar-100',
  119. 'name' => '姓名',
  120. 'default' => '',
  121. 'desc' => '姓名',
  122. 'match' => 'is_string',
  123. 'update' => 'text',
  124. 'search' => 'fulltext',
  125. 'list' => 'Dever::load("option/lib/member.getInfo", {id})',
  126. 'list' => true,
  127. ),
  128. 'mobile' => array
  129. (
  130. 'type' => 'bigint-11',
  131. 'name' => '手机号',
  132. 'default' => '',
  133. 'desc' => '请输入手机号',
  134. 'match' => Dever::rule('mobile'),
  135. 'update' => 'text',
  136. 'search' => 'fulltext',
  137. 'list' => true,
  138. ),
  139. 'idcard' => array
  140. (
  141. 'type' => 'varchar-32',
  142. 'name' => '身份证号码',
  143. 'default' => '',
  144. 'desc' => '身份证号码',
  145. 'match' => Dever::rule('idcard'),
  146. 'match' => 'is_string',
  147. 'search' => 'fulltext',
  148. 'update' => 'text',
  149. 'list' => true,
  150. ),
  151. 'idcard_bind' => array
  152. (
  153. 'type' => 'tinyint-1',
  154. 'name' => '身份证是否绑定',
  155. 'default' => '2',
  156. 'desc' => '身份证是否绑定',
  157. 'match' => 'is_numeric',
  158. 'option' => $idcard_bind,
  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. 'company' => 'company_id',
  207. ),
  208. 'request' => array
  209. (
  210. 'getOne' => array
  211. (
  212. # 匹配的正则或函数 选填项
  213. 'option' => array
  214. (
  215. 'main' => 1,
  216. 'company_id' => 'yes',
  217. 'key' => 'yes',
  218. 'mobile' => array('yes', 'like'),
  219. 'name' => array('yes', 'like'),
  220. 'idcard' => array('yes', 'like'),
  221. 'state' => 1,
  222. ),
  223. 'type' => 'all',
  224. 'col' => '*|id',
  225. ),
  226. 'getList' => array
  227. (
  228. # 匹配的正则或函数 选填项
  229. 'option' => array
  230. (
  231. 'company_id' => 'yes',
  232. 'main' => 'yes',
  233. 'key' => 'yes',
  234. 'state' => 1,
  235. ),
  236. 'order' => array('main' => 'asc','id' => 'desc'),
  237. 'type' => 'all',
  238. 'col' => '*',
  239. ),
  240. 'getData' => array
  241. (
  242. # 匹配的正则或函数 选填项
  243. 'option' => array
  244. (
  245. 'company_id' => 'yes',
  246. 'main' => 'yes',
  247. 'state' => 1,
  248. ),
  249. 'order' => array('id' => 'desc'),
  250. 'type' => 'all',
  251. 'col' => '*',
  252. ),
  253. # 获取主账号
  254. 'getMain' => array
  255. (
  256. # 匹配的正则或函数 选填项
  257. 'option' => array
  258. (
  259. 'company_id' => 'yes',
  260. 'mobile' => 'yes',
  261. 'key' => 'yes',
  262. 'main' => 1,
  263. 'state' => 1,
  264. ),
  265. 'type' => 'one',
  266. 'col' => '*',
  267. ),
  268. # 获取子账号
  269. 'getChild' => array
  270. (
  271. # 匹配的正则或函数 选填项
  272. 'option' => array
  273. (
  274. 'company_id' => 'yes',
  275. 'mobile' => 'yes',
  276. 'key' => 'yes',
  277. 'main' => 2,
  278. 'state' => 1,
  279. ),
  280. 'type' => 'one',
  281. 'col' => '*',
  282. ),
  283. 'getDataByKeys' => array
  284. (
  285. # 匹配的正则或函数 选填项
  286. 'option' => array
  287. (
  288. 'company_id' => 'yes',
  289. 'main' => 1,
  290. 'start' => array('yes-key', '>='),
  291. 'end' => array('yes-key', '<='),
  292. 'state' => 1,
  293. ),
  294. 'order' => array('main' => 'asc','id' => 'desc'),
  295. 'type' => 'all',
  296. 'col' => '*',
  297. ),
  298. #获取所有数据
  299. 'getCount' => array
  300. (
  301. # 匹配的正则或函数 选填项
  302. 'option' => array
  303. (
  304. 'company_id' => 'yes',
  305. 'state' => 1,
  306. ),
  307. // 'order' => array('id' => 'desc'),
  308. 'type' => 'count',
  309. 'col' => '*',
  310. ),
  311. ),
  312. );