account.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  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_search = array
  16. (
  17. //1 => '未开始审核',
  18. 2 => '待审核',
  19. 3 => '审核通过',
  20. 4 => '审核未通过',
  21. );
  22. $audit = array
  23. (
  24. 1 => '未开始审核',
  25. 2 => '待审核',
  26. 3 => '审核通过',
  27. 4 => '审核未通过',
  28. );
  29. $is_email = array
  30. (
  31. 1 => '邮箱已验证',
  32. 2 => '邮箱未验证',
  33. );
  34. $send_email = array
  35. (
  36. 1 => '不发送邮件',
  37. 2 => '发送邮件',
  38. );
  39. $is_idcard = array
  40. (
  41. 1 => '已上传',
  42. 2 => '未上传',
  43. );
  44. $agreement_status = array
  45. (
  46. 0 => '合同审核状态',
  47. 'no' => '未签署',
  48. 2 => '待审核',
  49. 3 => '审核通过',
  50. 4 => '审核未通过',
  51. );
  52. $col = Dever::input('col');
  53. # 权限设置 1是审核列表、2是账户列表、3是展示列表
  54. $search_auth = Dever::input('search_option_dever_auth', 1);
  55. $button = $list_button = array();
  56. if ($search_auth <= 2) {
  57. $list_button = array
  58. (
  59. 'list' => array('查看详情', '"cash&mid={mid}&page_type=1&search_auth='.$search_auth.'"'),
  60. );
  61. }
  62. if ($search_auth == 1) {
  63. $list_button['edit'] = array('审核', 'audit,audit_desc', '{audit} == 2');
  64. } elseif ($search_auth == 2) {
  65. $button = array
  66. (
  67. '创建账户' => array('fast', '', 'member'),
  68. );
  69. $list_button['list1'] = array('账户列表', '"member&search_option_aid={id}&search_option_dever_auth='.$search_auth.'"');
  70. } elseif ($search_auth == 3) {
  71. $list_button['list1'] = array('账户列表', '"member&search_option_aid={id}&search_option_dever_auth='.$search_auth.'"');
  72. }
  73. $excel = false;
  74. if(Dever::load('manage/auth')->checkFunc('option.account', 'editCardMout', '数据导出')){
  75. $excel[] = array('数据导出','数据导出', 'mail/lib/manage.out_option_qiquan');
  76. }
  77. // if (Dever::load('manage/auth')->checkFunc('menu_279.menu_290','setmessage','发送短信')) {
  78. // $list_button['fast'] = array('发送短信','Dever::load("option/lib/account.send_sms",{mid})');
  79. // }
  80. return array
  81. (
  82. # 表名
  83. 'name' => 'account',
  84. # 显示给用户看的名称
  85. 'lang' => '期权登录账户',
  86. 'order' => 100,
  87. 'set' => array
  88. (
  89. 'status' => $status,
  90. 'audit' => $audit,
  91. 'is_email' => $is_email,
  92. 'is_idcard' => $is_idcard,
  93. ),
  94. 'end' => array
  95. (
  96. 'update' => 'option/lib/manage.updateAccount',
  97. ),
  98. 'check' => 'mid',
  99. # 数据结构
  100. 'struct' => array
  101. (
  102. 'id' => array
  103. (
  104. 'type' => 'int-11',
  105. 'name' => 'ID',
  106. 'default' => '',
  107. 'desc' => '',
  108. 'match' => 'is_numeric',
  109. //'search' => 'order',
  110. //'list' => true,
  111. ),
  112. 'mid' => array
  113. (
  114. 'type' => 'int-11',
  115. 'name' => '姓名',
  116. 'default' => '',
  117. 'desc' => '期权账户',
  118. 'match' => 'is_numeric',
  119. 'update' => 'text',
  120. 'search' => array
  121. (
  122. 'api' => 'option/member-getOne',
  123. 'col' => 'name',
  124. 'result' => 'id',
  125. 'search' => 'mid',//本表的字段,默认为当前的字段
  126. ),
  127. 'list_name' => '期权账户',
  128. 'list' => 'Dever::load("option/lib/member.getInfo", {mid})',
  129. 'list_order' => 1,
  130. ),
  131. 'option-member-mobile'=> array
  132. (
  133. 'name' => '手机号',
  134. 'default' => '',
  135. 'desc' => '手机号',
  136. 'match' => 'option',
  137. 'search' => array
  138. (
  139. 'api' => 'option/member-getOne',
  140. 'col' => 'mobile',
  141. 'result' => 'id',
  142. 'search' => 'mid',
  143. ),
  144. # 读取另外表的关联方式
  145. 'sync' => array('mid', 'id'),
  146. ),
  147. 'option-member-key'=> array
  148. (
  149. 'name' => '索引号',
  150. 'default' => '',
  151. 'desc' => '索引号',
  152. 'match' => 'option',
  153. 'search' => array
  154. (
  155. 'api' => 'option/member-getOne',
  156. 'col' => 'key',
  157. 'result' => 'id',
  158. 'search' => 'mid',
  159. ),
  160. # 读取另外表的关联方式
  161. 'sync' => array('mid', 'id'),
  162. ),
  163. 'is_email' => array
  164. (
  165. 'type' => 'tinyint-1',
  166. 'name' => '邮箱认证',
  167. 'default' => '2',
  168. 'desc' => '邮箱是否验证',
  169. 'match' => 'is_numeric',
  170. 'search' => 'select',
  171. 'option' => $is_email,
  172. 'list' => 'Dever::load("option/lib/account.getEmail", {id})',
  173. 'list_order' => 3,
  174. ),
  175. 'send_email' => array
  176. (
  177. 'type' => 'tinyint-1',
  178. 'name' => '是否发送邮件',
  179. 'default' => '2',
  180. 'desc' => '是否发送邮件',
  181. 'match' => 'is_numeric',
  182. 'update' => 'radio',
  183. 'option' => $send_email,
  184. ),
  185. 'email' => array
  186. (
  187. 'type' => 'varchar-150',
  188. 'name' => '邮箱',
  189. 'default' => '',
  190. 'desc' => '请输入邮箱',
  191. 'search' => 'fulltext',
  192. 'match' => 'option||' . Dever::rule('email'),
  193. 'update' => 'text',
  194. ),
  195. 'is_idcard' => array
  196. (
  197. 'type' => 'tinyint-1',
  198. 'name' => '身份证资料',
  199. 'default' => '2',
  200. 'desc' => '身份证资料',
  201. 'match' => 'is_numeric',
  202. 'option' => $is_idcard,
  203. 'search' => 'select',
  204. //'order' => 'asc',
  205. //'update' => 'radio',
  206. 'list' => $search_auth == 1 ? 'Dever::load("option/lib/account.getIdcard", {id})' : false,
  207. 'list_order' => 3,
  208. 'list_header' => array('width' => '30%'),
  209. ),
  210. 'option-member-idcard'=> array
  211. (
  212. 'name' => '身份证号码',
  213. 'default' => '',
  214. 'desc' => '身份证号码',
  215. 'match' => 'option',
  216. 'search' => array
  217. (
  218. 'api' => 'option/member-getOne',
  219. 'col' => 'idcard',
  220. 'result' => 'id',
  221. 'search' => 'mid',
  222. ),
  223. # 读取另外表的关联方式
  224. 'sync' => array('mid', 'id'),
  225. 'list' => $search_auth == 2 ? 'Dever::load("option/lib/account.getCash#daijiaofu", {id})' : false,
  226. 'list_name' => '待交付',
  227. 'list_order' => 4,
  228. ),
  229. 'idcard_front' => array
  230. (
  231. 'type' => 'varchar-150',
  232. 'name' => '身份证正面',
  233. 'default' => '',
  234. 'desc' => '身份证正面',
  235. 'match' => 'option',
  236. 'update' => $col ? 'image' : false,
  237. 'key' => '8',
  238. //'place' => '660*660',
  239. 'list' => $search_auth == 2 ? 'Dever::load("option/lib/account.getCash#qiquan", {id})' : false,
  240. 'list_name' => '期权',
  241. 'list_order' => 5,
  242. ),
  243. 'idcard_back' => array
  244. (
  245. 'type' => 'varchar-150',
  246. 'name' => '身份证背面',
  247. 'default' => '',
  248. 'desc' => '身份证背面',
  249. 'match' => 'option',
  250. 'update' => $col ? 'image' : false,
  251. 'key' => '8',
  252. //'place' => '660*660',
  253. 'list' => $search_auth == 2 ? 'Dever::load("option/lib/account.getCash#yuanshiqiquan", {id})' : false,
  254. 'list_name' => '原始期权',
  255. 'list_order' => 6,
  256. ),
  257. 'idcard_path' => array
  258. (
  259. 'type' => 'varchar-800',
  260. 'name' => '身份证信息',
  261. 'default' => '',
  262. 'desc' => '身份证信息',
  263. 'match' => 'is_string',
  264. 'update' => 'text',
  265. ),
  266. 'audit' => array
  267. (
  268. 'type' => 'tinyint-1',
  269. 'name' => $search_auth == 1 ? '审核状况' : '账户认证',
  270. 'default' => $col ? '3' : '1',
  271. 'desc' => '审核状况',
  272. 'match' => 'is_numeric',
  273. 'option' => $col ? $audit_manage : $audit_search,
  274. 'search' => 'select',
  275. 'update' => $col ? 'radio' : false,
  276. 'list' => 'Dever::load("option/lib/account.getAudit", {id})',
  277. 'list_order' => $search_auth == 1 ? 5 : 3,
  278. 'value' => $col ? '3' : '1',
  279. 'control' => 'audit',
  280. ),
  281. 'audit_desc' => array
  282. (
  283. 'type' => 'varchar-500',
  284. 'name' => '审核备注',
  285. 'default' => '',
  286. 'desc' => '审核备注',
  287. 'match' => 'option',
  288. 'update' => $col ? 'textarea' : false,
  289. 'show' => 'audit=4',
  290. ),
  291. 'audit_date' => array
  292. (
  293. 'type' => 'int-11',
  294. 'name' => '审核时间',
  295. 'default' => '',
  296. 'match' => 'is_numeric',
  297. 'desc' => '审核时间',
  298. ),
  299. 'up_date' => array
  300. (
  301. 'type' => 'int-11',
  302. 'name' => '上传时间',
  303. 'default' => '',
  304. 'match' => 'is_numeric',
  305. 'order' => 'desc',
  306. 'desc' => '上传时间',
  307. 'search' => 'date,order',
  308. 'list' => '("{up_date}" ? date("Y-m-d H:i", {up_date}) : "-") . "<br />" . (date("Y-m-d H:i", {cdate}))',
  309. 'list_order' => 2,
  310. ),
  311. 'option-agreement-status'=> array
  312. (
  313. 'name' => '名称',
  314. 'default' => '',
  315. 'desc' => '手机号',
  316. 'match' => 'option',
  317. 'search' => $search_auth == 3 ? array
  318. (
  319. 'api' => 'option/agreement-select',
  320. 'col' => 'audit',
  321. 'result' => 'aid',
  322. 'search' => 'id',
  323. 'option' => $agreement_status,
  324. 'no' => '(select aid from churen_option_agreement)',
  325. ) : 'hidden',
  326. # 读取另外表的关联方式
  327. 'sync' => array('id', 'aid'),
  328. 'list_name' => '合同审核状态',
  329. 'list' => $search_auth == 3 ? 'Dever::load("option/lib/account.getAgreementStatus", {id})' : false,
  330. 'list_order' => 10,
  331. ),
  332. 'status' => array
  333. (
  334. 'type' => 'tinyint-1',
  335. 'name' => '状态',
  336. 'default' => '1',
  337. 'desc' => '状态',
  338. 'match' => 'is_numeric',
  339. 'option' => $status,
  340. 'search' => 'select',
  341. 'list' => $search_auth == 1 ? false : true,
  342. 'list_order' => 100,
  343. ),
  344. 'stype' => array
  345. (
  346. 'type' => 'int-11',
  347. 'name' => '类型-仅用于展示类型',
  348. 'default' => '-1',
  349. 'desc' => '类型',
  350. 'match' => 'is_string',
  351. 'update' => 'text',
  352. 'search' => 'hidden',
  353. ),
  354. 'dever_auth' => array
  355. (
  356. 'name' => '权限',
  357. 'default' => '',
  358. 'desc' => '类型',
  359. 'match' => 'is_string',
  360. 'search' => 'hidden',
  361. ),
  362. 'state' => array
  363. (
  364. 'type' => 'tinyint-1',
  365. 'name' => '状态',
  366. 'default' => '1',
  367. 'desc' => '请选择状态',
  368. 'match' => 'is_numeric',
  369. ),
  370. 'cdate' => array
  371. (
  372. 'type' => 'int-11',
  373. 'name' => '创建时间',
  374. 'match' => array('is_numeric', time()),
  375. 'desc' => '',
  376. # 只有insert时才生效
  377. 'insert' => true,
  378. 'search' => 'date',
  379. //'list' => 'date("Y-m-d H:i", {cdate})',
  380. //'list_order' => 2,
  381. ),
  382. ),
  383. 'manage' => array
  384. (
  385. 'insert' => false,
  386. 'delete' => false,
  387. 'edit' => false,
  388. 'button' => $button,
  389. 'list_button' => $list_button,
  390. 'excel' => $excel,
  391. ),
  392. 'request' => array
  393. (
  394. 'list' => array
  395. (
  396. # 匹配的正则或函数 选填项
  397. 'option' => array
  398. (
  399. 'id' => array('yes', 'in'),
  400. 'mid' => 'yes',
  401. 'is_email' => 'yes',
  402. 'is_idcard' => 'yes',
  403. 'email' => array('yes', 'like'),
  404. 'audit' => array('yes', 'in'),
  405. 'start_cdate' => array('yes-cdate', '>='),
  406. 'end_cdate' => array('yes-cdate', '<='),
  407. //'no' => 'yes-NOT EXISTS (select * from churen_option_agreement as a where a.aid = churen_option_account.id)',
  408. /*
  409. 'not' => array
  410. (
  411. 'table' => 'option/agreement',
  412. 'on' => array('aid','id'),
  413. ),
  414. */
  415. 'no' => array('yes-id', 'not in'),
  416. 'status' => 'yes',
  417. 'state' => 1,
  418. ),
  419. 'type' => 'all',
  420. 'order' => array('id' => 'desc'),
  421. 'page' => array(20, 'list'),
  422. 'col' => '*',
  423. ),
  424. 'getInfo' => array
  425. (
  426. # 匹配的正则或函数 选填项
  427. 'option' => array
  428. (
  429. 'status' => 2,
  430. 'state' => 1,
  431. ),
  432. 'order' => array('id' => 'desc'),
  433. 'type' => 'one',
  434. 'col' => '*',
  435. ),
  436. 'getData' => array
  437. (
  438. # 匹配的正则或函数 选填项
  439. 'option' => array
  440. (
  441. 'idcard' => 'yes',
  442. 'id' => array('yes', '!='),
  443. 'status' => 2,
  444. 'state' => 1,
  445. ),
  446. 'order' => array('id' => 'desc'),
  447. 'type' => 'all',
  448. 'page' => array(20, 'list'),
  449. 'col' => '*',
  450. ),
  451. 'upCash' => array
  452. (
  453. 'type' => 'update',
  454. 'where' => array
  455. (
  456. 'id' => 'yes',
  457. ),
  458. 'set' => array
  459. (
  460. 'cash' => array('yes', '+='),
  461. ),
  462. ),
  463. 'upSell' => array
  464. (
  465. 'type' => 'update',
  466. 'where' => array
  467. (
  468. 'id' => 'yes',
  469. ),
  470. 'set' => array
  471. (
  472. 'cash' => array('yes', '+='),
  473. 'upcol' => array('yes-sell', '+='),
  474. 'level_id' => 'yes',
  475. ),
  476. ),
  477. 'upGroupSell' => array
  478. (
  479. 'type' => 'update',
  480. 'where' => array
  481. (
  482. 'id' => 'yes',
  483. ),
  484. 'set' => array
  485. (
  486. 'cash' => array('yes', '+='),
  487. 'upcol' => array('yes-group_sell', '+='),
  488. 'level_id' => 'yes',
  489. ),
  490. ),
  491. 'upGroupSellOne' => array
  492. (
  493. 'type' => 'update',
  494. 'where' => array
  495. (
  496. 'id' => 'yes',
  497. ),
  498. 'set' => array
  499. (
  500. 'group_sell' => array('yes', '+='),
  501. ),
  502. ),
  503. # 获取订单数量
  504. 'getNum' => array
  505. (
  506. # 匹配的正则或函数 选填项
  507. 'option' => array
  508. (
  509. 'start' => array('yes-cdate', '>='),
  510. 'end' => array('yes-cdate', '<='),
  511. 'status' => 'yes',
  512. 'role' => 'yes',
  513. 'state' => 1,
  514. ),
  515. 'type' => 'count',
  516. 'col' => '*',
  517. ),
  518. #获取所有数据
  519. 'getCount' => array
  520. (
  521. # 匹配的正则或函数 选填项
  522. 'option' => array
  523. (
  524. 'status' => 'yes',
  525. 'state' => 1,
  526. 'audit' => 'yes',
  527. ),
  528. // 'order' => array('id' => 'desc'),
  529. 'type' => 'count',
  530. 'col' => '*',
  531. ),
  532. ),
  533. );