account.php 11 KB

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