member.php 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082
  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. 'order' => 'desc',
  210. ),
  211. 'avatar' => array
  212. (
  213. 'type' => 'varchar-150',
  214. 'name' => '头像',
  215. 'default' => '',
  216. 'desc' => '请选择头像',
  217. 'match' => 'option',
  218. 'update' => 'image',
  219. 'key' => '1',
  220. //'place' => '150',
  221. ),
  222. 'mobile' => array
  223. (
  224. 'type' => 'bigint-11',
  225. 'name' => '手机号',
  226. 'default' => '',
  227. 'desc' => '请输入手机号',
  228. 'match' => Dever::rule('mobile'),
  229. 'update' => 'text',
  230. //'search' => 'fulltext',
  231. 'list' => $search_auth == 2 ? true : false,
  232. ),
  233. 'email' => array
  234. (
  235. 'type' => 'varchar-150',
  236. 'name' => '邮箱',
  237. 'default' => '',
  238. 'desc' => '请输入邮箱',
  239. 'match' => 'option||' . Dever::rule('email'),
  240. 'update' => 'text',
  241. ),
  242. 'username' => array
  243. (
  244. 'type' => 'varchar-100',
  245. 'name' => '昵称',
  246. 'default' => '',
  247. 'desc' => '昵称',
  248. 'match' => 'is_string',
  249. 'update' => 'text',
  250. ),
  251. 'birthday' => array
  252. (
  253. 'type' => 'int-11',
  254. 'name' => '生日',
  255. 'default' => '',
  256. 'match' => 'option',
  257. 'desc' => '生日',
  258. 'update' => 'time',
  259. 'callback' => 'maketime',
  260. ),
  261. 'password' => array
  262. (
  263. 'type' => 'varchar-50',
  264. 'name' => '密码',
  265. 'default' => '',
  266. 'desc' => '请输入密码',
  267. 'match' => 'option',
  268. 'update' => 'password',
  269. 'callback' => 'sha1',
  270. ),
  271. 'parent_mid' => array
  272. (
  273. 'type' => 'int-11',
  274. 'name' => '上级姓名/手机号',
  275. 'default' => '-1',
  276. 'desc' => '邀请人',
  277. 'match' => 'is_string',
  278. //'update' => 'text',
  279. 'search' => $search_auth == 1 ? array
  280. (
  281. 'api' => 'agent/member-getSearch',
  282. 'col' => 'col',
  283. 'result' => 'id',
  284. 'search' => 'parent_mid',
  285. ) : false,
  286. 'list_name' => '上级信息',
  287. 'list' => $search_auth == 1 ? 'Dever::load("agent/lib/member.getOne", {parent_mid})' : false,
  288. ),
  289. 'source_id' => array
  290. (
  291. 'type' => 'int-11',
  292. 'name' => '注册来源',
  293. 'default' => '-1',
  294. 'desc' => '注册来源',
  295. 'match' => 'is_numeric',
  296. 'search' => 'select',
  297. //'update' => 'checkbox',
  298. 'option' => $source_id,
  299. ),
  300. 'code' => array
  301. (
  302. 'type' => 'varchar-50',
  303. 'name' => '邀请码',
  304. 'default' => '',
  305. 'desc' => '代理商邀请码',
  306. 'match' => 'option',
  307. //'update' => 'text',
  308. 'list_order'=>1,
  309. ),
  310. 'role' => array
  311. (
  312. 'type' => 'int-11',
  313. 'name' => '代理角色',
  314. 'default' => '',
  315. 'desc' => '代理角色',
  316. 'match' => 'is_numeric',
  317. 'search' => 'select',
  318. 'update' => 'select',
  319. 'option' => $role,
  320. 'list' => $search_auth == 2 ? true : false,
  321. ),
  322. 'level_id' => array
  323. (
  324. 'type' => 'int-11',
  325. 'name' => '代理商等级',
  326. 'default' => '-1',
  327. 'desc' => '代理商等级',
  328. 'match' => 'is_numeric',
  329. 'search' => 'select',
  330. 'update' => 'select',
  331. 'option' => $level,
  332. //'list' => true,
  333. ),
  334. 'title_id' => array
  335. (
  336. 'type' => 'varchar-100',
  337. 'name' => '代理商头衔',
  338. 'default' => '1',
  339. 'desc' => '代理商头衔',
  340. 'match' => 'option',
  341. 'search' => 'selects',
  342. 'update' => 'checkbox',
  343. 'option' => $title,
  344. 'list' => $search_auth == 2 ? true : false,
  345. ),
  346. 'is_area' => array
  347. (
  348. 'type' => 'tinyint-1',
  349. 'name' => '是否有代理区域',
  350. 'default' => '1',
  351. 'desc' => '是否有代理区域',
  352. 'match' => 'is_numeric',
  353. 'option' => $is_area,
  354. 'update' => 'radio',
  355. ),
  356. 'area' => array
  357. (
  358. 'type' => 'varchar-500',
  359. 'name' => '代理区域',
  360. 'default' => '',
  361. 'desc' => '代理区域',
  362. 'match' => 'option',
  363. 'search' => 'linkage',
  364. 'update' => 'linkage',
  365. 'option' => Dever::url('api.get?level_total=4', 'area'),
  366. ),
  367. 'is_shop' => array
  368. (
  369. 'type' => 'tinyint-1',
  370. 'name' => '门店是否可以修改',
  371. 'default' => '2',
  372. 'desc' => '门店是否可以修改',
  373. 'match' => 'is_numeric',
  374. 'option' => $is_shop,
  375. 'update' => 'radio',
  376. ),
  377. 'shop_id' => array
  378. (
  379. 'type' => 'int-11',
  380. 'name' => '所属门店',
  381. 'default' => '',
  382. 'desc' => '所属门店',
  383. 'match' => 'is_numeric',
  384. 'update' => 'select',
  385. 'update_search' => 'shop/lib/manage.search',
  386. ),
  387. 'type' => array
  388. (
  389. 'type' => 'tinyint-1',
  390. 'name' => '类型',
  391. 'default' => '1',
  392. 'desc' => '类型',
  393. 'match' => 'is_numeric',
  394. 'option' => $type,
  395. 'update' => 'radio',
  396. 'control' => 'type',
  397. ),
  398. 'sign' => array
  399. (
  400. 'type' => 'varchar-150',
  401. 'name' => '手写签名',
  402. 'default' => '',
  403. 'desc' => '手写签名',
  404. 'match' => 'option',
  405. 'update' => 'image',
  406. 'key' => '7',
  407. ),
  408. 'idcard' => array
  409. (
  410. 'type' => 'varchar-32',
  411. 'name' => '身份证号码',
  412. 'default' => '',
  413. 'desc' => '身份证号码',
  414. 'match' => Dever::rule('idcard'),
  415. 'update' => 'text',
  416. ),
  417. 'idcard_front' => array
  418. (
  419. 'type' => 'varchar-150',
  420. 'name' => '身份证正面',
  421. 'default' => '',
  422. 'desc' => '身份证正面',
  423. 'match' => 'option',
  424. 'update' => 'image',
  425. 'key' => '8',
  426. //'place' => '660*660',
  427. ),
  428. 'idcard_back' => array
  429. (
  430. 'type' => 'varchar-150',
  431. 'name' => '身份证背面',
  432. 'default' => '',
  433. 'desc' => '身份证背面',
  434. 'match' => 'option',
  435. 'update' => 'image',
  436. 'key' => '8',
  437. //'place' => '660*660',
  438. ),
  439. 'company_name' => array
  440. (
  441. 'type' => 'varchar-100',
  442. 'name' => '公司名称',
  443. 'default' => '',
  444. 'desc' => '公司名称',
  445. 'match' => 'is_string',
  446. 'update' => 'text',
  447. //'search' => 'fulltext',
  448. //'list' => true,
  449. 'show' => 'type=2',
  450. ),
  451. 'company_pic' => array
  452. (
  453. 'type' => 'varchar-150',
  454. 'name' => '营业执照',
  455. 'default' => '',
  456. 'desc' => '营业执照',
  457. 'match' => 'option',
  458. 'update' => 'image',
  459. 'key' => '8',
  460. //'place' => '660*660',
  461. 'show' => 'type=2',
  462. ),
  463. 'company_number' => array
  464. (
  465. 'type' => 'varchar-80',
  466. 'name' => '营业执照号码',
  467. 'default' => '',
  468. 'desc' => '营业执照号码',
  469. 'match' => 'is_string',
  470. 'update' => 'text',
  471. 'show' => 'type=2',
  472. ),
  473. 'address' => array
  474. (
  475. 'type' => 'varchar-800',
  476. 'name' => '地址',
  477. 'default' => '',
  478. 'desc' => '地址',
  479. 'match' => 'is_string',
  480. 'update' => 'text',
  481. ),
  482. 'cash' => array
  483. (
  484. 'type' => 'decimal-11,2',
  485. 'name' => '余额',
  486. 'default' => '0',
  487. 'desc' => '余额',
  488. 'match' => 'is_numeric',
  489. 'search' => 'exp',
  490. 'update' => 'text',
  491. 'list_name' => '余额<br />直推业绩<br />团队业绩',
  492. 'list' => $search_auth == 1 ?'"{cash}<br />{sell}<br />{group_sell}"' : false,
  493. ),
  494. 'sell' => array
  495. (
  496. 'type' => 'decimal-11,2',
  497. 'name' => '直推业绩',
  498. 'default' => '0',
  499. 'desc' => '销售业绩',
  500. 'search' => 'exp',
  501. 'match' => 'is_numeric',
  502. 'update' => 'text',
  503. 'list' => $search_auth == 2 ? true : false,
  504. ),
  505. 'group_sell' => array
  506. (
  507. 'type' => 'decimal-11,2',
  508. 'name' => '团队业绩',
  509. 'default' => '0',
  510. 'desc' => '团队销售业绩',
  511. 'match' => 'is_numeric',
  512. 'search' => 'exp',
  513. 'update' => 'text',
  514. 'list' => $search_auth == 2 ? true : false,
  515. ),
  516. 'old_group_sell' => array
  517. (
  518. 'type' => 'decimal-11,2',
  519. 'name' => '历史团队业绩',
  520. 'default' => '0',
  521. 'desc' => '历史团队业绩',
  522. 'match' => 'is_numeric',
  523. 'update' => 'text',
  524. 'list_name' => $search_auth == 2 ? '新增业绩' : false,
  525. 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_money",{id})': false,
  526. ),
  527. 'old_agentdownnum' => array
  528. (
  529. 'type' => 'int-11',
  530. 'name' => '历史直推人数',
  531. 'default' => '0',
  532. 'desc' => '历史团队业绩',
  533. 'match' => 'is_numeric',
  534. 'update' => 'text',
  535. 'list_name' => $search_auth == 2 ? '新增正常业绩' : false,
  536. 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_zmoney",{id})': false,
  537. ),
  538. 'old_pwd' => array
  539. (
  540. 'type' => 'varchar-32',
  541. 'name' => 'pwd',
  542. 'default' => '',
  543. 'desc' => 'pwd',
  544. 'match' => 'is_string',
  545. 'update' => 'text',
  546. ),
  547. 'old_salt' => array
  548. (
  549. 'type' => 'varchar-32',
  550. 'name' => 'salt',
  551. 'default' => '',
  552. 'desc' => 'salt',
  553. 'match' => 'is_string',
  554. 'update' => 'text',
  555. ),
  556. 'status' => array
  557. (
  558. 'type' => 'tinyint-1',
  559. 'name' => '状态',
  560. 'default' => '1',
  561. 'desc' => '状态',
  562. 'match' => 'is_numeric',
  563. 'option' => $status,
  564. 'search' => 'select',
  565. 'list' => $search_auth == 1 ? true : false,
  566. ),
  567. 'import' => array
  568. (
  569. 'type' => 'tinyint-1',
  570. 'name' => '是否导入',
  571. 'default' => '1',
  572. 'desc' => '是否导入',
  573. 'match' => 'is_numeric',
  574. 'option' => $import,
  575. 'update' => 'radio',
  576. ),
  577. 'prize_type' => array
  578. (
  579. 'type' => 'tinyint-1',
  580. 'name' => '是否名额内',
  581. 'default' => '1',
  582. 'desc' => '是否名额内',
  583. 'match' => 'is_numeric',
  584. 'option' => $prize_type,
  585. ),
  586. 'dever_auth' => array
  587. (
  588. 'name' => '业绩时间',
  589. 'default' => '',
  590. 'desc' => '类型',
  591. 'match' => 'is_string',
  592. 'search' => 'hidden',
  593. ),
  594. 'dever_time' => array
  595. (
  596. 'name' => '业绩时间',
  597. 'default' => '',
  598. 'desc' => '类型',
  599. 'match' => 'is_string',
  600. // 'search' => 'hidden',
  601. 'search' => $search_auth == 2 ? 'date' : false,
  602. ),
  603. 'idcard_path' => array
  604. (
  605. 'type' => 'varchar-800',
  606. 'name' => '身份证信息',
  607. 'default' => '',
  608. 'desc' => '身份证信息',
  609. 'match' => 'is_string',
  610. 'update' => 'text',
  611. ),
  612. 'reorder' => array
  613. (
  614. 'type' => 'int-11',
  615. 'name' => '排序(数值越大越靠前)',
  616. 'default' => '1',
  617. 'desc' => '请输入排序',
  618. 'match' => 'option',
  619. //'update' => 'text',
  620. //'search' => 'order',
  621. //'list' => true,
  622. //'order' => 'desc',
  623. //'edit' => true,
  624. ),
  625. 'state' => array
  626. (
  627. 'type' => 'tinyint-1',
  628. 'name' => '状态',
  629. 'default' => '1',
  630. 'desc' => '请选择状态',
  631. 'match' => 'is_numeric',
  632. 'update' => 'hidden',
  633. ),
  634. 'cdate' => array
  635. (
  636. 'type' => 'int-11',
  637. 'name' => '加入日期',
  638. 'match' => array('is_numeric', time()),
  639. 'desc' => '',
  640. // 'search' => $search_auth == 2 ? 'date' : false,
  641. # 只有insert时才生效
  642. 'insert' => true,
  643. //'search' => 'date',
  644. ),
  645. ),
  646. 'alter' => array
  647. (
  648. 5 => array
  649. (
  650. array('update', 'cash', 'cash', 'decimal-11,2 0 余额'),
  651. array('update', 'sell', 'sell', 'decimal-11,2 0 直推业绩'),
  652. array('update', 'group_sell', 'group_sell', 'decimal-11,2 0 团队业绩'),
  653. array('update', 'old_group_sell', 'old_group_sell', 'decimal-11,2 0 历史团队业绩'),
  654. ),
  655. 6 => array
  656. (
  657. array('update', 'title_id', 'title_id', 'varchar-100 1 代理商头衔'),
  658. ),
  659. 'version' => 6,
  660. ),
  661. 'index' => array
  662. (
  663. 1 => array
  664. (
  665. 'parent_mid' => 'parent_mid',
  666. ),
  667. # 版本号 更改版本号会更新当前表的索引
  668. 'version' => 1,
  669. ),
  670. 'manage' => array
  671. (
  672. //'list_table' => 'js',
  673. 'insert' => false,
  674. 'delete' => false,
  675. 'edit' => false,
  676. 'excel' => $excel,
  677. 'button' => $button,
  678. 'list_button' => $list_button,
  679. ),
  680. 'request' => array
  681. (
  682. 'getInfo' => array
  683. (
  684. # 匹配的正则或函数 选填项
  685. 'option' => array
  686. (
  687. 'status' => 2,
  688. 'state' => 1,
  689. ),
  690. 'order' => array('id' => 'desc'),
  691. 'type' => 'one',
  692. 'col' => '*',
  693. ),
  694. 'getData' => array
  695. (
  696. # 匹配的正则或函数 选填项
  697. 'option' => array
  698. (
  699. 'idcard' => 'yes',
  700. 'id' => array('yes', '!='),
  701. 'status' => array('yes', 'in'),
  702. 'state' => 1,
  703. ),
  704. 'order' => array('id' => 'desc'),
  705. 'type' => 'all',
  706. 'page' => array(20, 'list'),
  707. 'col' => '*',
  708. ),
  709. 'upCash' => array
  710. (
  711. 'type' => 'update',
  712. 'where' => array
  713. (
  714. 'id' => 'yes',
  715. ),
  716. 'set' => array
  717. (
  718. 'cash' => array('yes', '+='),
  719. ),
  720. ),
  721. 'upSell' => array
  722. (
  723. 'type' => 'update',
  724. 'where' => array
  725. (
  726. 'id' => 'yes',
  727. ),
  728. 'set' => array
  729. (
  730. 'cash' => array('yes', '+='),
  731. 'upcol' => array('yes-sell', '+='),
  732. 'level_id' => 'yes',
  733. ),
  734. ),
  735. 'upGroupSell' => array
  736. (
  737. 'type' => 'update',
  738. 'where' => array
  739. (
  740. 'id' => 'yes',
  741. ),
  742. 'set' => array
  743. (
  744. 'cash' => array('yes', '+='),
  745. 'upcol' => array('yes-group_sell', '+='),
  746. 'level_id' => 'yes',
  747. ),
  748. ),
  749. 'upGroupSellOne' => array
  750. (
  751. 'type' => 'update',
  752. 'where' => array
  753. (
  754. 'id' => 'yes',
  755. ),
  756. 'set' => array
  757. (
  758. 'sell' => array('yes', '+='),
  759. 'group_sell' => array('yes', '+='),
  760. ),
  761. ),
  762. # 获取订单数量
  763. 'getNum' => array
  764. (
  765. # 匹配的正则或函数 选填项
  766. 'option' => array
  767. (
  768. 'start' => array('yes-cdate', '>='),
  769. 'end' => array('yes-cdate', '<='),
  770. 'fstart' => array('yes-rdate', '>='),
  771. 'fend' => array('yes-rdate', '<='),
  772. 'status' => 'yes',
  773. 'role' => 'yes',
  774. 'parent_mid' =>'yes',
  775. 'state' => 1,
  776. ),
  777. 'type' => 'count',
  778. 'col' => '*',
  779. ),
  780. # 获取余额
  781. 'getCash' => array
  782. (
  783. # 匹配的正则或函数 选填项
  784. 'option' => array
  785. (
  786. 'start' => array('yes-cdate', '>='),
  787. 'end' => array('yes-cdate', '<='),
  788. 'fstart' => array('yes-rdate', '>='),
  789. 'fend' => array('yes-rdate', '<='),
  790. 'status' => 'yes',
  791. 'role' => 'yes',
  792. 'parent_mid' =>'yes',
  793. 'state' => 1,
  794. ),
  795. 'type' => 'one',
  796. 'col' => 'sum(cash) as total',
  797. ),
  798. 'getSearch' => array
  799. (
  800. # 匹配的正则或函数 选填项
  801. 'option' => array
  802. (
  803. 'col' => array('yes-mobile,name', 'like'),
  804. ),
  805. 'type' => 'all',
  806. 'col' => '*|id',
  807. ),
  808. 'getShopAll' => array
  809. (
  810. # 匹配的正则或函数 选填项
  811. 'option' => array
  812. (
  813. 'shop_id' => array('yes','>='),
  814. 'state' => 1,
  815. ),
  816. 'type' => 'all',
  817. 'col' => '*',
  818. ),
  819. 'getCount' => array
  820. (
  821. # 匹配的正则或函数 选填项
  822. 'option' => array
  823. (
  824. 'id' => 'yes',
  825. 'role' => array('yes','in'),
  826. 'prize_type' => 'yes',
  827. 'state' => 1,
  828. ),
  829. 'type' => 'count',
  830. 'col' => '*',
  831. ),
  832. 'getOutAll' => array
  833. (
  834. # 匹配的正则或函数 选填项
  835. 'option' => array
  836. (
  837. 'id' => 'yes',
  838. 'role' => 'yes',
  839. 'prize_type' => 'yes',
  840. 'state' => 1,
  841. ),
  842. 'type' => 'all',
  843. 'col' => '*',
  844. ),
  845. 'getCountByRole' => array
  846. (
  847. # 匹配的正则或函数 选填项
  848. 'option' => array
  849. (
  850. 'role' => 'yes',
  851. 'parent_mid' => 'yes',
  852. 'status' => 2,
  853. 'state' => 1,
  854. ),
  855. 'type' => 'count',
  856. 'col' => '*',
  857. ),
  858. 'search' => array
  859. (
  860. 'option' => array
  861. (
  862. 'ids' => array('yes-id', 'in'),
  863. 'name' => array('yes-name,mobile', 'like'),
  864. 'id' => 'yes',
  865. 'state' => 1,
  866. ),
  867. 'type' => 'all',
  868. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  869. 'limit' => '0,20',
  870. 'col' => 'concat(name, "(", mobile , ")") as name, id, id as value, "" as selected, "" as disabled|id',
  871. ),
  872. 'getAll' => array
  873. (
  874. # 匹配的正则或函数 选填项
  875. 'option' => array
  876. (
  877. 'start' => array('yes-rdate', '>='),
  878. 'end' => array('yes-rdate', '<='),
  879. 'status' => 'yes',
  880. 'state' => 1,
  881. ),
  882. 'type' => 'all',
  883. // 'limit' => 10,
  884. 'page' => array(20, 'list'),
  885. 'col' => 'id,name,mobile,idcard,role,group_sell',
  886. ),
  887. 'getNewParent' => array
  888. (
  889. # 匹配的正则或函数 选填项
  890. 'option' => array
  891. (
  892. 'start' => array('yes-rdate','>='),
  893. 'end' => array('yes-rdate','<='),
  894. 'parent_mid' => 'yes',
  895. 'state' => 1,
  896. ),
  897. 'type' => 'all',
  898. 'col' => 'id,group_sell,sell',
  899. ),
  900. 'getDataByArea' => array
  901. (
  902. # 匹配的正则或函数 选填项
  903. 'option' => array
  904. (
  905. 'area' => array('yes', 'like'),
  906. 'state' => 1,
  907. ),
  908. 'order' => array('id' => 'desc'),
  909. 'type' => 'all',
  910. 'col' => '*',
  911. ),
  912. 'getDataByRole' => array
  913. (
  914. # 匹配的正则或函数 选填项
  915. 'option' => array
  916. (
  917. 'role' => array('yes', 'in'),
  918. 'state' => 1,
  919. ),
  920. 'order' => array('id' => 'desc'),
  921. 'type' => 'all',
  922. 'col' => '*',
  923. ),
  924. 'getExcelAll' => array
  925. (
  926. # 匹配的正则或函数 选填项
  927. 'option' => array
  928. (
  929. 'start' => array('yes-rdate','>='),
  930. 'end' => array('yes-rdate','<='),
  931. 'area' => array('yes','like'),
  932. 'role' =>'yes',
  933. 'source_id' => 'yes',
  934. 'title_id' =>'yes',
  935. 'level_id' => 'yes',
  936. 'id' => 'yes',
  937. 'state' => 1,
  938. 'status' => 'yes',
  939. ),
  940. 'type' => 'all',
  941. 'col' => '*',
  942. ),
  943. 'getAreaAll' => array
  944. (
  945. # 匹配的正则或函数 选填项
  946. 'option' => array
  947. (
  948. 'area' => array('yes','='),
  949. 'role' => 'yes',
  950. 'state' => 1,
  951. ),
  952. // 'order' => array('id' => 'desc'),
  953. 'type' => 'one',
  954. 'col' => 'id',
  955. ),
  956. 'getOne' => array
  957. (
  958. # 匹配的正则或函数 选填项
  959. 'option' => array
  960. (
  961. 'role' => 'yes',
  962. 'area' => 'yes',
  963. 'status' => 2,
  964. 'state' => 1,
  965. ),
  966. 'type' => 'one',
  967. 'col' => '*',
  968. ),
  969. 'guidian' => array
  970. (
  971. # 匹配的正则或函数 选填项
  972. 'option' => array
  973. (
  974. 'role' => 'yes',
  975. 'start' => array('yes-cdate','>='),
  976. 'parent_mid' => 'yes',
  977. 'prize_type' => 'yes',
  978. 'state' => 1,
  979. ),
  980. 'type' => 'all',
  981. 'col' => '*',
  982. ),
  983. 'getDataByName' => array
  984. (
  985. # 匹配的正则或函数 选填项
  986. 'option' => array
  987. (
  988. 'name' =>'yes',
  989. 'state' => 1,
  990. ),
  991. 'type' => 'all',
  992. 'order' => array('role' => 'asc', 'id' => 'desc'),
  993. 'col' => '*',
  994. ),
  995. ),
  996. );