member.php 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095
  1. <?php
  2. $role = function()
  3. {
  4. $array = array();
  5. $data = Dever::load('setting/role-state');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. $status = array
  13. (
  14. 1 => array('name' => '未认证', 'style' => 'font-weight:bold;color:#436EEE'),
  15. 2 => array('name' => '正常', 'style' => 'font-weight:bold;color:green'),
  16. //3 => '驳回',
  17. //4 => '已删除',
  18. 5 => array('name' => '已禁用', 'style' => 'font-weight:bold;color:#CD3700'),
  19. );
  20. $type = array
  21. (
  22. 1 => '个人',
  23. 2 => '公司',
  24. );
  25. $prize_type = array
  26. (
  27. 1 => '名额外',
  28. 2 => '名额内',
  29. );
  30. $is_shop = array
  31. (
  32. 1 => '无法修改',
  33. 2 => '可以修改',
  34. );
  35. $import = array
  36. (
  37. 1 => '最新系统',
  38. 2 => 'v2旧系统导入',
  39. 3 => 'v1旧系统导入',
  40. );
  41. $is_area = array
  42. (
  43. 1 => '是',
  44. 2 => '否',
  45. );
  46. $source_id = function()
  47. {
  48. $array = array
  49. (
  50. -1 => array
  51. (
  52. 'id' => '-1',
  53. 'name' => '无来源',
  54. ),
  55. );
  56. $data = Dever::load('setting/source-state');
  57. if($data)
  58. {
  59. $array += $data;
  60. }
  61. return $array;
  62. };
  63. $level = function()
  64. {
  65. $array = array
  66. (
  67. -1 => array
  68. (
  69. 'id' => -1,
  70. 'name' => '普通',
  71. ),
  72. );
  73. $data = Dever::load('setting/level-state');
  74. if($data)
  75. {
  76. $array += $data;
  77. }
  78. return $array;
  79. };
  80. $excel = false;
  81. if (Dever::load('manage/auth')->checkFunc('agent.member', 'agent_member_excel1', '代理商数据导出')) {
  82. $excel[] = array('代理商数据导出', '代理商列表', 'agent/lib/manage.agentOut');
  83. }
  84. if (Dever::load('manage/auth')->checkFunc('agent.member', 'agent_member_excel12', '代理商资金数据导出')) {
  85. $excel[] = array('代理商资金数据导出', '代理商资金列表', 'agent/lib/manage.agentCashOut');
  86. }
  87. if (Dever::load('manage/auth')->checkFunc('agent.member', 'agent_member_excel13', '代理商直推奖励导出')) {
  88. $excel[] = array('代理商直推奖励导出', '代理商直推奖励列表', 'agent/lib/manage.out_zhitui');
  89. }
  90. # 权限设置 1是查看详情、2是头衔统计
  91. $search_auth = Dever::input('search_option_dever_auth', 1);
  92. $info = '';
  93. $button = array();
  94. $list_button = array();
  95. if($search_auth == 1){
  96. $list_button['list'] = array('查看详情', '"member_area&mid={id}&page_type=1&[refer]"');
  97. }
  98. if($search_auth == 2){
  99. if(Dever::load('manage/auth')->checkFunc('agent.member_title', 'editTitleout', '头衔数据导出')){
  100. $excel[] = array('头衔数据导出', '头衔数据导出', 'agent/lib/member.out_member');
  101. }
  102. }
  103. if(Dever::load('manage/auth')->checkFunc('agent.member', 'editCardMout', '权益数据导出')){
  104. $excel[] = array('权益数据导出','权益数据导出', 'agent/lib/dhorder.out_equity');
  105. }
  106. $title = function() use($search_auth)
  107. {
  108. $array = array();
  109. if ($search_auth == 2) {
  110. $data = Dever::load('setting/title-getData');
  111. } else {
  112. $data = Dever::load('setting/title-getData', array('id' => 1));
  113. }
  114. if($data)
  115. {
  116. $array += $data;
  117. }
  118. return $array;
  119. };
  120. /*
  121. if (Dever::load('manage/auth')->checkFunc('agent.member', 'edit6', '查看关系图谱')) {
  122. $list_button['list1'] = array('查看关系图谱',Dever::url('lib/manage.relation?mid={id}&[refer].manage', 'agent'));
  123. }
  124. */
  125. # id小于50000为导入的数据
  126. return array
  127. (
  128. # 表名
  129. 'name' => 'member',
  130. # 显示给用户看的名称
  131. 'lang' => '代理商管理',
  132. 'order' => 100,
  133. 'auto' => 50000,
  134. 'config_type' => $type,
  135. 'config_status' => $status,
  136. 'info' => $info,
  137. # 同步更新另外一个或多个表的多条关联数据,以逗号隔开
  138. 'sync' => array
  139. (
  140. 'agent/member_title' => array
  141. (
  142. # 更新时的条件,另外一个表的字段 => 本表的字段
  143. 'where' => array('mid', 'id'),
  144. # 要更新的数据
  145. 'update' => array('title_id' => 'title_id'),
  146. # 同步更新的类型,delete为先删再插入,update为先查询是否存在,存在直接更新,不存在则插入, only为仅更新
  147. 'type' => 'delete',
  148. )
  149. ),
  150. 'start' => array
  151. (
  152. 'update' => 'agent/lib/manage.updateArea',
  153. ),
  154. # 数据结构
  155. 'struct' => array
  156. (
  157. 'id' => array
  158. (
  159. 'type' => 'int-11',
  160. 'name' => '代理商姓名/手机号',
  161. 'default' => '',
  162. 'desc' => '',
  163. 'match' => 'is_numeric',
  164. 'search' => 'order',
  165. //'list' => true,
  166. 'search' => array
  167. (
  168. 'api' => 'agent/member-getSearch',
  169. 'col' => 'col',
  170. 'result' => 'id',
  171. 'search' => 'id',
  172. ),
  173. 'list_name' => '代理商信息',
  174. 'list' => $search_auth == 1 ? 'Dever::load("agent/lib/member.getOne", {id}, "agent/member", true)' : false,
  175. ),
  176. 'name' => array
  177. (
  178. 'type' => 'varchar-100',
  179. 'name' => '代理商姓名',
  180. 'default' => '',
  181. 'desc' => '姓名',
  182. 'match' => 'is_string',
  183. 'update' => 'text',
  184. 'list_name' => $search_auth == 2 ? '姓名': false,
  185. 'list' => $search_auth == 2 ? true : false,
  186. ),
  187. 'rdate' => array
  188. (
  189. 'type' => 'int-11',
  190. 'name' => '认证时间',
  191. 'match' => 'option',
  192. 'default' => '0',
  193. 'desc' => '',
  194. 'update' => 'date',
  195. 'callback' => 'maketime',
  196. 'search' => 'date',
  197. // 'list' => '{rdate} > 0 ? date("Y-m-d H:i", {rdate}) : "无"',
  198. 'list' => $search_auth == 1 ? 'Dever::load("agent/lib/member.set_rdate", {id})' : false,
  199. 'list_order' => 100,
  200. ),
  201. 'udate' => array
  202. (
  203. 'type' => 'int-11',
  204. 'name' => '终审时间',
  205. 'default' => '',
  206. 'match' => 'is_numeric',
  207. 'desc' => '',
  208. 'search' => 'date',
  209. ),
  210. 'avatar' => array
  211. (
  212. 'type' => 'varchar-150',
  213. 'name' => '头像',
  214. 'default' => '',
  215. 'desc' => '请选择头像',
  216. 'match' => 'option',
  217. 'update' => 'image',
  218. 'key' => '1',
  219. //'place' => '150',
  220. ),
  221. 'mobile' => array
  222. (
  223. 'type' => 'bigint-11',
  224. 'name' => '手机号',
  225. 'default' => '',
  226. 'desc' => '请输入手机号',
  227. 'match' => Dever::rule('mobile'),
  228. 'update' => 'text',
  229. //'search' => 'fulltext',
  230. 'list' => $search_auth == 2 ? true : false,
  231. ),
  232. 'email' => array
  233. (
  234. 'type' => 'varchar-150',
  235. 'name' => '邮箱',
  236. 'default' => '',
  237. 'desc' => '请输入邮箱',
  238. 'match' => 'option||' . Dever::rule('email'),
  239. 'update' => 'text',
  240. ),
  241. 'username' => array
  242. (
  243. 'type' => 'varchar-100',
  244. 'name' => '昵称',
  245. 'default' => '',
  246. 'desc' => '昵称',
  247. 'match' => 'is_string',
  248. 'update' => 'text',
  249. ),
  250. 'birthday' => array
  251. (
  252. 'type' => 'int-11',
  253. 'name' => '生日',
  254. 'default' => '',
  255. 'match' => 'option',
  256. 'desc' => '生日',
  257. 'update' => 'time',
  258. 'callback' => 'maketime',
  259. ),
  260. 'password' => array
  261. (
  262. 'type' => 'varchar-50',
  263. 'name' => '密码',
  264. 'default' => '',
  265. 'desc' => '请输入密码',
  266. 'match' => 'option',
  267. 'update' => 'password',
  268. 'callback' => 'sha1',
  269. ),
  270. 'parent_mid' => array
  271. (
  272. 'type' => 'int-11',
  273. 'name' => '上级姓名/手机号',
  274. 'default' => '-1',
  275. 'desc' => '邀请人',
  276. 'match' => 'is_string',
  277. //'update' => 'text',
  278. 'search' => $search_auth == 1 ? array
  279. (
  280. 'api' => 'agent/member-getSearch',
  281. 'col' => 'col',
  282. 'result' => 'id',
  283. 'search' => 'parent_mid',
  284. ) : false,
  285. 'list_name' => '上级信息',
  286. 'list' => $search_auth == 1 ? 'Dever::load("agent/lib/member.getOne", {parent_mid})' : false,
  287. ),
  288. 'source_id' => array
  289. (
  290. 'type' => 'int-11',
  291. 'name' => '注册来源',
  292. 'default' => '-1',
  293. 'desc' => '注册来源',
  294. 'match' => 'is_numeric',
  295. 'search' => 'select',
  296. //'update' => 'checkbox',
  297. 'option' => $source_id,
  298. ),
  299. 'code' => array
  300. (
  301. 'type' => 'varchar-50',
  302. 'name' => '邀请码',
  303. 'default' => '',
  304. 'desc' => '代理商邀请码',
  305. 'match' => 'option',
  306. //'update' => 'text',
  307. 'list_order'=>1,
  308. ),
  309. 'role' => array
  310. (
  311. 'type' => 'int-11',
  312. 'name' => '代理角色',
  313. 'default' => '',
  314. 'desc' => '代理角色',
  315. 'match' => 'is_numeric',
  316. 'search' => 'select',
  317. 'update' => 'select',
  318. 'option' => $role,
  319. 'list' => $search_auth == 2 ? true : false,
  320. ),
  321. 'level_id' => array
  322. (
  323. 'type' => 'int-11',
  324. 'name' => '代理商等级',
  325. 'default' => '-1',
  326. 'desc' => '代理商等级',
  327. 'match' => 'is_numeric',
  328. 'search' => 'select',
  329. 'update' => 'select',
  330. 'option' => $level,
  331. //'list' => true,
  332. ),
  333. 'title_id' => array
  334. (
  335. 'type' => 'varchar-100',
  336. 'name' => '代理商头衔',
  337. 'default' => '1',
  338. 'desc' => '代理商头衔',
  339. 'match' => 'option',
  340. 'search' => 'selects',
  341. 'update' => 'checkbox',
  342. 'option' => $title,
  343. 'list' => $search_auth == 2 ? true : false,
  344. ),
  345. 'is_area' => array
  346. (
  347. 'type' => 'tinyint-1',
  348. 'name' => '是否有代理区域',
  349. 'default' => '1',
  350. 'desc' => '是否有代理区域',
  351. 'match' => 'is_numeric',
  352. 'option' => $is_area,
  353. 'update' => 'radio',
  354. ),
  355. 'area' => array
  356. (
  357. 'type' => 'varchar-500',
  358. 'name' => '代理区域',
  359. 'default' => '',
  360. 'desc' => '代理区域',
  361. 'match' => 'option',
  362. 'search' => 'linkage',
  363. 'update' => 'linkage',
  364. 'option' => Dever::url('api.get?level_total=4', 'area'),
  365. ),
  366. 'is_shop' => array
  367. (
  368. 'type' => 'tinyint-1',
  369. 'name' => '门店是否可以修改',
  370. 'default' => '2',
  371. 'desc' => '门店是否可以修改',
  372. 'match' => 'is_numeric',
  373. 'option' => $is_shop,
  374. 'update' => 'radio',
  375. ),
  376. 'shop_id' => array
  377. (
  378. 'type' => 'int-11',
  379. 'name' => '所属门店',
  380. 'default' => '',
  381. 'desc' => '所属门店',
  382. 'match' => 'is_numeric',
  383. 'update' => 'select',
  384. 'update_search' => 'shop/lib/manage.search',
  385. ),
  386. 'type' => array
  387. (
  388. 'type' => 'tinyint-1',
  389. 'name' => '类型',
  390. 'default' => '1',
  391. 'desc' => '类型',
  392. 'match' => 'is_numeric',
  393. 'option' => $type,
  394. 'update' => 'radio',
  395. 'control' => 'type',
  396. ),
  397. 'sign' => array
  398. (
  399. 'type' => 'varchar-150',
  400. 'name' => '手写签名',
  401. 'default' => '',
  402. 'desc' => '手写签名',
  403. 'match' => 'option',
  404. 'update' => 'image',
  405. 'key' => '7',
  406. ),
  407. 'idcard' => array
  408. (
  409. 'type' => 'varchar-32',
  410. 'name' => '身份证号码',
  411. 'default' => '',
  412. 'desc' => '身份证号码',
  413. 'match' => Dever::rule('idcard'),
  414. 'update' => 'text',
  415. ),
  416. 'idcard_front' => array
  417. (
  418. 'type' => 'varchar-150',
  419. 'name' => '身份证正面',
  420. 'default' => '',
  421. 'desc' => '身份证正面',
  422. 'match' => 'option',
  423. 'update' => 'image',
  424. 'key' => '8',
  425. //'place' => '660*660',
  426. ),
  427. 'idcard_back' => array
  428. (
  429. 'type' => 'varchar-150',
  430. 'name' => '身份证背面',
  431. 'default' => '',
  432. 'desc' => '身份证背面',
  433. 'match' => 'option',
  434. 'update' => 'image',
  435. 'key' => '8',
  436. //'place' => '660*660',
  437. ),
  438. 'company_name' => array
  439. (
  440. 'type' => 'varchar-100',
  441. 'name' => '公司名称',
  442. 'default' => '',
  443. 'desc' => '公司名称',
  444. 'match' => 'is_string',
  445. 'update' => 'text',
  446. //'search' => 'fulltext',
  447. //'list' => true,
  448. 'show' => 'type=2',
  449. ),
  450. 'company_pic' => array
  451. (
  452. 'type' => 'varchar-150',
  453. 'name' => '营业执照',
  454. 'default' => '',
  455. 'desc' => '营业执照',
  456. 'match' => 'option',
  457. 'update' => 'image',
  458. 'key' => '8',
  459. //'place' => '660*660',
  460. 'show' => 'type=2',
  461. ),
  462. 'company_number' => array
  463. (
  464. 'type' => 'varchar-80',
  465. 'name' => '营业执照号码',
  466. 'default' => '',
  467. 'desc' => '营业执照号码',
  468. 'match' => 'is_string',
  469. 'update' => 'text',
  470. 'show' => 'type=2',
  471. ),
  472. 'address' => array
  473. (
  474. 'type' => 'varchar-800',
  475. 'name' => '地址',
  476. 'default' => '',
  477. 'desc' => '地址',
  478. 'match' => 'is_string',
  479. 'update' => 'text',
  480. ),
  481. 'cash' => array
  482. (
  483. 'type' => 'decimal-11,2',
  484. 'name' => '余额',
  485. 'default' => '0',
  486. 'desc' => '余额',
  487. 'match' => 'is_numeric',
  488. 'search' => 'exp',
  489. 'update' => 'text',
  490. 'list_name' => '余额<br />直推业绩<br />团队业绩',
  491. 'list' => $search_auth == 1 ?'"{cash}<br />{sell}<br />{group_sell}"' : false,
  492. ),
  493. 'sell' => array
  494. (
  495. 'type' => 'decimal-11,2',
  496. 'name' => '直推业绩',
  497. 'default' => '0',
  498. 'desc' => '销售业绩',
  499. 'search' => 'exp',
  500. 'match' => 'is_numeric',
  501. 'update' => 'text',
  502. 'list' => $search_auth == 2 ? true : false,
  503. ),
  504. 'group_sell' => array
  505. (
  506. 'type' => 'decimal-11,2',
  507. 'name' => '团队业绩',
  508. 'default' => '0',
  509. 'desc' => '团队销售业绩',
  510. 'match' => 'is_numeric',
  511. 'search' => 'exp',
  512. 'update' => 'text',
  513. 'list' => $search_auth == 2 ? true : false,
  514. ),
  515. 'old_group_sell' => array
  516. (
  517. 'type' => 'decimal-11,2',
  518. 'name' => '历史团队业绩',
  519. 'default' => '0',
  520. 'desc' => '历史团队业绩',
  521. 'match' => 'is_numeric',
  522. 'update' => 'text',
  523. 'list_name' => $search_auth == 2 ? '新增业绩' : false,
  524. 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_money",{id})': false,
  525. ),
  526. 'old_agentdownnum' => array
  527. (
  528. 'type' => 'int-11',
  529. 'name' => '历史直推人数',
  530. 'default' => '0',
  531. 'desc' => '历史团队业绩',
  532. 'match' => 'is_numeric',
  533. 'update' => 'text',
  534. 'list_name' => $search_auth == 2 ? '新增正常业绩' : false,
  535. 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_zmoney",{id})': false,
  536. ),
  537. 'old_pwd' => array
  538. (
  539. 'type' => 'varchar-32',
  540. 'name' => 'pwd',
  541. 'default' => '',
  542. 'desc' => 'pwd',
  543. 'match' => 'is_string',
  544. 'update' => 'text',
  545. ),
  546. 'old_salt' => array
  547. (
  548. 'type' => 'varchar-32',
  549. 'name' => 'salt',
  550. 'default' => '',
  551. 'desc' => 'salt',
  552. 'match' => 'is_string',
  553. 'update' => 'text',
  554. ),
  555. 'status' => array
  556. (
  557. 'type' => 'tinyint-1',
  558. 'name' => '状态',
  559. 'default' => '1',
  560. 'desc' => '状态',
  561. 'match' => 'is_numeric',
  562. 'option' => $status,
  563. 'search' => 'select',
  564. 'list' => $search_auth == 1 ? true : false,
  565. ),
  566. 'import' => array
  567. (
  568. 'type' => 'tinyint-1',
  569. 'name' => '是否导入',
  570. 'default' => '1',
  571. 'desc' => '是否导入',
  572. 'match' => 'is_numeric',
  573. 'option' => $import,
  574. 'update' => 'radio',
  575. ),
  576. 'prize_type' => array
  577. (
  578. 'type' => 'tinyint-1',
  579. 'name' => '是否名额内',
  580. 'default' => '1',
  581. 'desc' => '是否名额内',
  582. 'match' => 'is_numeric',
  583. 'option' => $prize_type,
  584. ),
  585. 'dever_auth' => array
  586. (
  587. 'name' => '业绩时间',
  588. 'default' => '',
  589. 'desc' => '类型',
  590. 'match' => 'is_string',
  591. 'search' => 'hidden',
  592. ),
  593. 'dever_time' => array
  594. (
  595. 'name' => '业绩时间',
  596. 'default' => '',
  597. 'desc' => '类型',
  598. 'match' => 'is_string',
  599. // 'search' => 'hidden',
  600. 'search' => $search_auth == 2 ? 'date' : false,
  601. ),
  602. 'idcard_path' => array
  603. (
  604. 'type' => 'varchar-800',
  605. 'name' => '身份证信息',
  606. 'default' => '',
  607. 'desc' => '身份证信息',
  608. 'match' => 'is_string',
  609. 'update' => 'text',
  610. ),
  611. 'reorder' => array
  612. (
  613. 'type' => 'int-11',
  614. 'name' => '排序(数值越大越靠前)',
  615. 'default' => '1',
  616. 'desc' => '请输入排序',
  617. 'match' => 'option',
  618. //'update' => 'text',
  619. //'search' => 'order',
  620. //'list' => true,
  621. //'order' => 'desc',
  622. //'edit' => true,
  623. ),
  624. 'state' => array
  625. (
  626. 'type' => 'tinyint-1',
  627. 'name' => '状态',
  628. 'default' => '1',
  629. 'desc' => '请选择状态',
  630. 'match' => 'is_numeric',
  631. 'update' => 'hidden',
  632. ),
  633. 'cdate' => array
  634. (
  635. 'type' => 'int-11',
  636. 'name' => '加入日期',
  637. 'match' => array('is_numeric', time()),
  638. 'desc' => '',
  639. // 'search' => $search_auth == 2 ? 'date' : false,
  640. # 只有insert时才生效
  641. 'insert' => true,
  642. //'search' => 'date',
  643. ),
  644. ),
  645. 'alter' => array
  646. (
  647. 5 => array
  648. (
  649. array('update', 'cash', 'cash', 'decimal-11,2 0 余额'),
  650. array('update', 'sell', 'sell', 'decimal-11,2 0 直推业绩'),
  651. array('update', 'group_sell', 'group_sell', 'decimal-11,2 0 团队业绩'),
  652. array('update', 'old_group_sell', 'old_group_sell', 'decimal-11,2 0 历史团队业绩'),
  653. ),
  654. 6 => array
  655. (
  656. array('update', 'title_id', 'title_id', 'varchar-100 1 代理商头衔'),
  657. ),
  658. 'version' => 6,
  659. ),
  660. 'index' => array
  661. (
  662. 1 => array
  663. (
  664. 'parent_mid' => 'parent_mid',
  665. ),
  666. # 版本号 更改版本号会更新当前表的索引
  667. 'version' => 1,
  668. ),
  669. 'manage' => array
  670. (
  671. //'list_table' => 'js',
  672. 'insert' => false,
  673. 'delete' => false,
  674. 'edit' => false,
  675. 'excel' => $excel,
  676. 'button' => $button,
  677. 'list_button' => $list_button,
  678. ),
  679. 'request' => array
  680. (
  681. 'getInfo' => array
  682. (
  683. # 匹配的正则或函数 选填项
  684. 'option' => array
  685. (
  686. 'status' => 2,
  687. 'state' => 1,
  688. ),
  689. 'order' => array('id' => 'desc'),
  690. 'type' => 'one',
  691. 'col' => '*',
  692. ),
  693. 'getData' => array
  694. (
  695. # 匹配的正则或函数 选填项
  696. 'option' => array
  697. (
  698. 'idcard' => 'yes',
  699. 'id' => array('yes', '!='),
  700. 'status' => array('yes', 'in'),
  701. 'state' => 1,
  702. ),
  703. 'order' => array('id' => 'desc'),
  704. 'type' => 'all',
  705. 'page' => array(20, 'list'),
  706. 'col' => '*',
  707. ),
  708. 'upCash' => array
  709. (
  710. 'type' => 'update',
  711. 'where' => array
  712. (
  713. 'id' => 'yes',
  714. ),
  715. 'set' => array
  716. (
  717. 'cash' => array('yes', '+='),
  718. ),
  719. ),
  720. 'upSell' => array
  721. (
  722. 'type' => 'update',
  723. 'where' => array
  724. (
  725. 'id' => 'yes',
  726. ),
  727. 'set' => array
  728. (
  729. 'cash' => array('yes', '+='),
  730. 'upcol' => array('yes-sell', '+='),
  731. 'level_id' => 'yes',
  732. ),
  733. ),
  734. 'upGroupSell' => array
  735. (
  736. 'type' => 'update',
  737. 'where' => array
  738. (
  739. 'id' => 'yes',
  740. ),
  741. 'set' => array
  742. (
  743. 'cash' => array('yes', '+='),
  744. 'upcol' => array('yes-group_sell', '+='),
  745. 'level_id' => 'yes',
  746. ),
  747. ),
  748. 'upGroupSellOne' => array
  749. (
  750. 'type' => 'update',
  751. 'where' => array
  752. (
  753. 'id' => 'yes',
  754. ),
  755. 'set' => array
  756. (
  757. 'sell' => array('yes', '+='),
  758. 'group_sell' => array('yes', '+='),
  759. ),
  760. ),
  761. # 获取订单数量
  762. 'getNum' => array
  763. (
  764. # 匹配的正则或函数 选填项
  765. 'option' => array
  766. (
  767. 'start' => array('yes-cdate', '>='),
  768. 'end' => array('yes-cdate', '<='),
  769. 'fstart' => array('yes-rdate', '>='),
  770. 'fend' => array('yes-rdate', '<='),
  771. 'status' => 'yes',
  772. 'role' => 'yes',
  773. 'parent_mid' =>'yes',
  774. 'state' => 1,
  775. ),
  776. 'type' => 'count',
  777. 'col' => '*',
  778. ),
  779. # 获取余额
  780. 'getCash' => array
  781. (
  782. # 匹配的正则或函数 选填项
  783. 'option' => array
  784. (
  785. 'start' => array('yes-cdate', '>='),
  786. 'end' => array('yes-cdate', '<='),
  787. 'fstart' => array('yes-rdate', '>='),
  788. 'fend' => array('yes-rdate', '<='),
  789. 'status' => 'yes',
  790. 'role' => 'yes',
  791. 'parent_mid' =>'yes',
  792. 'state' => 1,
  793. ),
  794. 'type' => 'one',
  795. 'col' => 'sum(cash) as total',
  796. ),
  797. 'getSearch' => array
  798. (
  799. # 匹配的正则或函数 选填项
  800. 'option' => array
  801. (
  802. 'col' => array('yes-mobile,name', 'like'),
  803. ),
  804. 'type' => 'all',
  805. 'col' => '*|id',
  806. ),
  807. 'getShopAll' => array
  808. (
  809. # 匹配的正则或函数 选填项
  810. 'option' => array
  811. (
  812. 'shop_id' => array('yes','>='),
  813. 'state' => 1,
  814. ),
  815. 'type' => 'all',
  816. 'col' => '*',
  817. ),
  818. 'getCount' => array
  819. (
  820. # 匹配的正则或函数 选填项
  821. 'option' => array
  822. (
  823. 'id' => 'yes',
  824. 'role' => array('yes','in'),
  825. 'prize_type' => 'yes',
  826. 'state' => 1,
  827. ),
  828. 'type' => 'count',
  829. 'col' => '*',
  830. ),
  831. 'getOutAll' => array
  832. (
  833. # 匹配的正则或函数 选填项
  834. 'option' => array
  835. (
  836. 'id' => 'yes',
  837. 'role' => 'yes',
  838. 'prize_type' => 'yes',
  839. 'state' => 1,
  840. ),
  841. 'type' => 'all',
  842. 'col' => '*',
  843. ),
  844. 'getCountByRole' => array
  845. (
  846. # 匹配的正则或函数 选填项
  847. 'option' => array
  848. (
  849. 'role' => 'yes',
  850. 'parent_mid' => 'yes',
  851. 'status' => 2,
  852. 'state' => 1,
  853. ),
  854. 'type' => 'count',
  855. 'col' => '*',
  856. ),
  857. 'search' => array
  858. (
  859. 'option' => array
  860. (
  861. 'ids' => array('yes-id', 'in'),
  862. 'name' => array('yes-name,mobile', 'like'),
  863. 'id' => 'yes',
  864. 'state' => 1,
  865. ),
  866. 'type' => 'all',
  867. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  868. 'limit' => '0,20',
  869. 'col' => 'concat(name, "(", mobile , ")") as name, id, id as value, "" as selected, "" as disabled|id',
  870. ),
  871. 'getAll' => array
  872. (
  873. # 匹配的正则或函数 选填项
  874. 'option' => array
  875. (
  876. 'start' => array('yes-rdate', '>='),
  877. 'end' => array('yes-rdate', '<='),
  878. 'status' => 'yes',
  879. 'state' => 1,
  880. ),
  881. 'type' => 'all',
  882. // 'limit' => 10,
  883. 'page' => array(20, 'list'),
  884. 'col' => 'id,name,mobile,idcard,role,group_sell',
  885. ),
  886. 'getNewParent' => array
  887. (
  888. # 匹配的正则或函数 选填项
  889. 'option' => array
  890. (
  891. 'start' => array('yes-rdate','>='),
  892. 'end' => array('yes-rdate','<='),
  893. 'parent_mid' => 'yes',
  894. 'state' => 1,
  895. ),
  896. 'type' => 'all',
  897. 'col' => 'id,group_sell,sell',
  898. ),
  899. 'getNewMember' => array
  900. (
  901. # 匹配的正则或函数 选填项
  902. 'option' => array
  903. (
  904. 'parent_mid' => 'yes',
  905. 'state' => 1,
  906. ),
  907. 'type' => 'all',
  908. 'order' => array('group_sell'=>'desc'),
  909. 'col' => 'id,group_sell,sell',
  910. ),
  911. 'getDataByArea' => array
  912. (
  913. # 匹配的正则或函数 选填项
  914. 'option' => array
  915. (
  916. 'area' => array('yes', 'like'),
  917. 'state' => 1,
  918. ),
  919. 'order' => array('id' => 'desc'),
  920. 'type' => 'all',
  921. 'col' => '*',
  922. ),
  923. 'getDataByRole' => array
  924. (
  925. # 匹配的正则或函数 选填项
  926. 'option' => array
  927. (
  928. 'role' => array('yes', 'in'),
  929. 'state' => 1,
  930. ),
  931. 'order' => array('id' => 'desc'),
  932. 'type' => 'all',
  933. 'col' => '*',
  934. ),
  935. 'getExcelAll' => array
  936. (
  937. # 匹配的正则或函数 选填项
  938. 'option' => array
  939. (
  940. 'start' => array('yes-rdate','>='),
  941. 'end' => array('yes-rdate','<='),
  942. 'area' => array('yes','like'),
  943. 'role' =>'yes',
  944. 'source_id' => 'yes',
  945. 'title_id' =>'yes',
  946. 'level_id' => 'yes',
  947. 'id' => 'yes',
  948. 'state' => 1,
  949. 'status' => 'yes',
  950. ),
  951. 'type' => 'all',
  952. 'col' => '*',
  953. ),
  954. 'getAreaAll' => array
  955. (
  956. # 匹配的正则或函数 选填项
  957. 'option' => array
  958. (
  959. 'area' => array('yes','='),
  960. 'role' => 'yes',
  961. 'state' => 1,
  962. ),
  963. // 'order' => array('id' => 'desc'),
  964. 'type' => 'one',
  965. 'col' => 'id',
  966. ),
  967. 'getOne' => array
  968. (
  969. # 匹配的正则或函数 选填项
  970. 'option' => array
  971. (
  972. 'role' => 'yes',
  973. 'area' => 'yes',
  974. 'status' => 2,
  975. 'state' => 1,
  976. ),
  977. 'type' => 'one',
  978. 'col' => '*',
  979. ),
  980. 'guidian' => array
  981. (
  982. # 匹配的正则或函数 选填项
  983. 'option' => array
  984. (
  985. 'role' => 'yes',
  986. 'start' => array('yes-cdate','>='),
  987. 'parent_mid' => 'yes',
  988. 'prize_type' => 'yes',
  989. 'state' => 1,
  990. ),
  991. 'type' => 'all',
  992. 'col' => '*',
  993. ),
  994. 'getDataByName' => array
  995. (
  996. # 匹配的正则或函数 选填项
  997. 'option' => array
  998. (
  999. 'name' =>'yes',
  1000. 'state' => 1,
  1001. ),
  1002. 'type' => 'all',
  1003. 'order' => array('role' => 'asc', 'id' => 'desc'),
  1004. 'col' => '*',
  1005. ),
  1006. ),
  1007. );