account.php 11 KB

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