account.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. <?php
  2. $status = array
  3. (
  4. 1 => '未激活',
  5. 2 => '正常',
  6. 3 => '停用',
  7. );
  8. $audit_manage = array
  9. (
  10. //1 => '未开始审核',
  11. //2 => '待审核',
  12. 3 => '审核通过',
  13. 4 => '审核未通过',
  14. );
  15. $audit = array
  16. (
  17. 1 => '未开始审核',
  18. 2 => '待审核',
  19. 3 => '审核通过',
  20. 4 => '审核未通过',
  21. );
  22. $type = array
  23. (
  24. 1 => '子账号',
  25. 2 => '主账号',
  26. );
  27. $is_email = array
  28. (
  29. 1 => '邮箱已验证',
  30. 2 => '邮箱未验证',
  31. );
  32. $is_idcard = array
  33. (
  34. 1 => '已上传',
  35. 2 => '未上传',
  36. );
  37. $col = Dever::input('col');
  38. return array
  39. (
  40. # 表名
  41. 'name' => 'account',
  42. # 显示给用户看的名称
  43. 'lang' => '期权账户认证审核',
  44. 'order' => 100,
  45. 'set' => array
  46. (
  47. 'status' => $status,
  48. 'type' => $type,
  49. 'audit' => $audit,
  50. 'is_email' => $is_email,
  51. 'is_idcard' => $is_idcard,
  52. ),
  53. 'start' => array
  54. (
  55. 'insert' => 'option/lib/manage.updateAccountAudit',
  56. ),
  57. 'end' => array
  58. (
  59. 'update' => 'option/lib/manage.updateAccount',
  60. ),
  61. 'check' => 'mobile',
  62. # 数据结构
  63. 'struct' => array
  64. (
  65. 'id' => array
  66. (
  67. 'type' => 'int-11',
  68. 'name' => 'ID',
  69. 'default' => '',
  70. 'desc' => '',
  71. 'match' => 'is_numeric',
  72. 'search' => 'order',
  73. //'list' => true,
  74. ),
  75. 'type' => array
  76. (
  77. 'type' => 'tinyint-1',
  78. 'name' => '账号类型',
  79. 'default' => '1',
  80. 'desc' => '账号类型',
  81. 'match' => 'is_numeric',
  82. 'option' => $type,
  83. 'search' => 'hidden',
  84. 'update' => 'radio',
  85. ),
  86. 'key' => array
  87. (
  88. 'type' => 'int-11',
  89. 'name' => '账户索引-通过账户索引来判断同一个人',
  90. 'default' => '',
  91. 'desc' => '账户索引',
  92. 'match' => 'is_string',
  93. 'update' => 'text',
  94. ),
  95. 'name' => array
  96. (
  97. 'type' => 'varchar-100',
  98. 'name' => '姓名',
  99. 'default' => '',
  100. 'desc' => '姓名',
  101. 'match' => 'is_string',
  102. 'update' => 'text',
  103. 'search' => 'fulltext',
  104. 'list' => 'Dever::load("option/lib/account.getInfo", {id})',
  105. 'list_order' => 1,
  106. ),
  107. 'mobile' => array
  108. (
  109. 'type' => 'bigint-11',
  110. 'name' => '手机号',
  111. 'default' => '',
  112. 'desc' => '请输入手机号',
  113. 'match' => Dever::rule('mobile'),
  114. 'update' => 'text',
  115. 'search' => 'fulltext',
  116. //'list' => true,
  117. ),
  118. 'is_email' => array
  119. (
  120. 'type' => 'tinyint-1',
  121. 'name' => '邮箱是否验证',
  122. 'default' => '2',
  123. 'desc' => '邮箱是否验证',
  124. 'match' => 'is_numeric',
  125. 'option' => $is_email,
  126. ),
  127. 'email' => array
  128. (
  129. 'type' => 'varchar-150',
  130. 'name' => '邮箱',
  131. 'default' => '',
  132. 'desc' => '请输入邮箱',
  133. 'match' => 'option||' . Dever::rule('email'),
  134. //'update' => 'text',
  135. ),
  136. 'is_idcard' => array
  137. (
  138. 'type' => 'tinyint-1',
  139. 'name' => '身份证资料',
  140. 'default' => '2',
  141. 'desc' => '身份证资料',
  142. 'match' => 'is_numeric',
  143. 'option' => $is_idcard,
  144. //'update' => 'radio',
  145. 'list' => true,
  146. 'list_order' => 3,
  147. ),
  148. 'idcard' => array
  149. (
  150. 'type' => 'varchar-32',
  151. 'name' => '身份证号码',
  152. 'default' => '',
  153. 'desc' => '身份证号码',
  154. 'match' => Dever::rule('idcard'),
  155. 'match' => 'is_string',
  156. 'update' => 'text',
  157. ),
  158. 'idcard_front' => array
  159. (
  160. 'type' => 'varchar-150',
  161. 'name' => '身份证正面',
  162. 'default' => '',
  163. 'desc' => '身份证正面',
  164. 'match' => 'option',
  165. //'update' => 'image',
  166. 'key' => '8',
  167. //'place' => '660*660',
  168. ),
  169. 'idcard_back' => array
  170. (
  171. 'type' => 'varchar-150',
  172. 'name' => '身份证背面',
  173. 'default' => '',
  174. 'desc' => '身份证背面',
  175. 'match' => 'option',
  176. //'update' => 'image',
  177. 'key' => '8',
  178. //'place' => '660*660',
  179. ),
  180. 'sign' => array
  181. (
  182. 'type' => 'varchar-150',
  183. 'name' => '合同签字',
  184. 'default' => '',
  185. 'desc' => '合同签字',
  186. 'match' => 'option',
  187. //'update' => 'image',
  188. 'key' => '7',
  189. ),
  190. 'audit' => array
  191. (
  192. 'type' => 'tinyint-1',
  193. 'name' => '审核状况',
  194. 'default' => $col ? '3' : '1',
  195. 'desc' => '审核状况',
  196. 'match' => 'is_numeric',
  197. 'option' => $audit_manage,
  198. 'search' => 'select',
  199. 'update' => $col ? 'radio' : false,
  200. 'list' => 'Dever::load("option/lib/account.getAudit", {id})',
  201. 'list_order' => 5,
  202. 'value' => $col ? '3' : '1',
  203. 'control' => 'audit',
  204. ),
  205. 'audit_desc' => array
  206. (
  207. 'type' => 'varchar-500',
  208. 'name' => '审核备注',
  209. 'default' => '',
  210. 'desc' => '审核备注',
  211. 'match' => 'option',
  212. 'update' => $col ? 'textarea' : false,
  213. 'show' => 'audit=4',
  214. ),
  215. 'audit_date' => array
  216. (
  217. 'type' => 'int-11',
  218. 'name' => '审核时间',
  219. 'match' => 'is_numeric',
  220. 'desc' => '审核时间',
  221. ),
  222. 'status' => array
  223. (
  224. 'type' => 'tinyint-1',
  225. 'name' => '状态',
  226. 'default' => '1',
  227. 'desc' => '状态',
  228. 'match' => 'is_numeric',
  229. 'option' => $status,
  230. //'search' => 'select',
  231. //'list' => true,
  232. ),
  233. 'state' => array
  234. (
  235. 'type' => 'tinyint-1',
  236. 'name' => '状态',
  237. 'default' => '1',
  238. 'desc' => '请选择状态',
  239. 'match' => 'is_numeric',
  240. ),
  241. 'cdate' => array
  242. (
  243. 'type' => 'int-11',
  244. 'name' => '创建时间',
  245. 'match' => array('is_numeric', time()),
  246. 'desc' => '',
  247. # 只有insert时才生效
  248. 'insert' => true,
  249. 'search' => 'date',
  250. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  251. 'list_order' => 2,
  252. ),
  253. ),
  254. 'manage' => array
  255. (
  256. //'insert' => false,
  257. 'delete' => false,
  258. //'edit' => false,
  259. 'list_button' => array
  260. (
  261. 'list' => array('查看详情', '"cash&aid={id}&page_type=1"'),
  262. 'edit' => array('审核', 'audit,audit_desc', '{audit} == 2'),
  263. //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin,tk_status', '{status} == 6'),
  264. //'delete' => array('删除', '', '{status} == 1'),
  265. ),
  266. ),
  267. 'request' => array
  268. (
  269. 'getInfo' => array
  270. (
  271. # 匹配的正则或函数 选填项
  272. 'option' => array
  273. (
  274. 'status' => 2,
  275. 'state' => 1,
  276. ),
  277. 'order' => array('id' => 'desc'),
  278. 'type' => 'one',
  279. 'col' => '*',
  280. ),
  281. 'getData' => array
  282. (
  283. # 匹配的正则或函数 选填项
  284. 'option' => array
  285. (
  286. 'idcard' => 'yes',
  287. 'id' => array('yes', '!='),
  288. 'status' => 2,
  289. 'state' => 1,
  290. ),
  291. 'order' => array('id' => 'desc'),
  292. 'type' => 'all',
  293. 'page' => array(20, 'list'),
  294. 'col' => '*',
  295. ),
  296. 'upCash' => array
  297. (
  298. 'type' => 'update',
  299. 'where' => array
  300. (
  301. 'id' => 'yes',
  302. ),
  303. 'set' => array
  304. (
  305. 'cash' => array('yes', '+='),
  306. ),
  307. ),
  308. 'upSell' => array
  309. (
  310. 'type' => 'update',
  311. 'where' => array
  312. (
  313. 'id' => 'yes',
  314. ),
  315. 'set' => array
  316. (
  317. 'cash' => array('yes', '+='),
  318. 'upcol' => array('yes-sell', '+='),
  319. 'level_id' => 'yes',
  320. ),
  321. ),
  322. 'upGroupSell' => array
  323. (
  324. 'type' => 'update',
  325. 'where' => array
  326. (
  327. 'id' => 'yes',
  328. ),
  329. 'set' => array
  330. (
  331. 'cash' => array('yes', '+='),
  332. 'upcol' => array('yes-group_sell', '+='),
  333. 'level_id' => 'yes',
  334. ),
  335. ),
  336. 'upGroupSellOne' => array
  337. (
  338. 'type' => 'update',
  339. 'where' => array
  340. (
  341. 'id' => 'yes',
  342. ),
  343. 'set' => array
  344. (
  345. 'group_sell' => array('yes', '+='),
  346. ),
  347. ),
  348. # 获取订单数量
  349. 'getNum' => array
  350. (
  351. # 匹配的正则或函数 选填项
  352. 'option' => array
  353. (
  354. 'start' => array('yes-cdate', '>='),
  355. 'end' => array('yes-cdate', '<='),
  356. 'status' => 'yes',
  357. 'role' => 'yes',
  358. 'state' => 1,
  359. ),
  360. 'type' => 'count',
  361. 'col' => '*',
  362. ),
  363. ),
  364. );