member.php 33 KB

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