member.php 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097
  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. 'start' => array('yes-rdate','>='),
  905. 'end' => array('yes-rdate','<='),
  906. 'parent_mid' => 'yes',
  907. 'state' => 1,
  908. ),
  909. 'type' => 'all',
  910. 'order' => array('group_sell'=>'desc'),
  911. 'col' => 'id,group_sell,sell',
  912. ),
  913. 'getDataByArea' => array
  914. (
  915. # 匹配的正则或函数 选填项
  916. 'option' => array
  917. (
  918. 'area' => array('yes', 'like'),
  919. 'state' => 1,
  920. ),
  921. 'order' => array('id' => 'desc'),
  922. 'type' => 'all',
  923. 'col' => '*',
  924. ),
  925. 'getDataByRole' => array
  926. (
  927. # 匹配的正则或函数 选填项
  928. 'option' => array
  929. (
  930. 'role' => array('yes', 'in'),
  931. 'state' => 1,
  932. ),
  933. 'order' => array('id' => 'desc'),
  934. 'type' => 'all',
  935. 'col' => '*',
  936. ),
  937. 'getExcelAll' => array
  938. (
  939. # 匹配的正则或函数 选填项
  940. 'option' => array
  941. (
  942. 'start' => array('yes-rdate','>='),
  943. 'end' => array('yes-rdate','<='),
  944. 'area' => array('yes','like'),
  945. 'role' =>'yes',
  946. 'source_id' => 'yes',
  947. 'title_id' =>'yes',
  948. 'level_id' => 'yes',
  949. 'id' => 'yes',
  950. 'state' => 1,
  951. 'status' => 'yes',
  952. ),
  953. 'type' => 'all',
  954. 'col' => '*',
  955. ),
  956. 'getAreaAll' => array
  957. (
  958. # 匹配的正则或函数 选填项
  959. 'option' => array
  960. (
  961. 'area' => array('yes','='),
  962. 'role' => 'yes',
  963. 'state' => 1,
  964. ),
  965. // 'order' => array('id' => 'desc'),
  966. 'type' => 'one',
  967. 'col' => 'id',
  968. ),
  969. 'getOne' => array
  970. (
  971. # 匹配的正则或函数 选填项
  972. 'option' => array
  973. (
  974. 'role' => 'yes',
  975. 'area' => 'yes',
  976. 'status' => 2,
  977. 'state' => 1,
  978. ),
  979. 'type' => 'one',
  980. 'col' => '*',
  981. ),
  982. 'guidian' => array
  983. (
  984. # 匹配的正则或函数 选填项
  985. 'option' => array
  986. (
  987. 'role' => 'yes',
  988. 'start' => array('yes-cdate','>='),
  989. 'parent_mid' => 'yes',
  990. 'prize_type' => 'yes',
  991. 'state' => 1,
  992. ),
  993. 'type' => 'all',
  994. 'col' => '*',
  995. ),
  996. 'getDataByName' => array
  997. (
  998. # 匹配的正则或函数 选填项
  999. 'option' => array
  1000. (
  1001. 'name' =>'yes',
  1002. 'state' => 1,
  1003. ),
  1004. 'type' => 'all',
  1005. 'order' => array('role' => 'asc', 'id' => 'desc'),
  1006. 'col' => '*',
  1007. ),
  1008. ),
  1009. );