order.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  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. $source_id = function()
  13. {
  14. $array = array
  15. (
  16. -1 => array
  17. (
  18. 'id' => '-1',
  19. 'name' => '无来源',
  20. ),
  21. );
  22. $data = Dever::load('setting/source-state');
  23. if($data)
  24. {
  25. $array += $data;
  26. }
  27. return $array;
  28. };
  29. $status = array
  30. (
  31. -2 => array('name' => '待签名', 'style' => 'font-weight:bold;color:#00FFFF'),
  32. 1 => array('name' => '待业务初审', 'style' => 'font-weight:bold;color:#436EEE'),
  33. 2 => array('name' => '待财务终审', 'style' => 'font-weight:bold;color:#003366'),
  34. 3 => array('name' => '待权益发放', 'style' => 'font-weight:bold;color:#993333'),
  35. 4 => array('name' => '已完成', 'style' => 'font-weight:bold;color:green'),
  36. 5 => array('name' => '驳回', 'style' => 'font-weight:bold;color:#CD3700'),
  37. 6 => array('name' => '挂起', 'style' => 'font-weight:bold;color:#436EEE'),
  38. 7 => array('name' => '关闭', 'style' => 'font-weight:bold;color:#000000'),
  39. );
  40. $pay_status = array
  41. (
  42. 1 => '待支付',
  43. 2 => '已支付',
  44. 3 => '已退款',
  45. );
  46. $goods_status = array
  47. (
  48. 1 => array('name' => '未发放', 'style' => 'font-weight:bold;color:#436EEE'),
  49. 2 => array('name' => '无权益', 'style' => 'font-weight:bold;'),
  50. 3 => array('name' => '已发放', 'style' => 'font-weight:bold;color:green'),
  51. );
  52. $type = array
  53. (
  54. 1 => '个人',
  55. 2 => '公司',
  56. );
  57. $pay_type = array
  58. (
  59. 1 => '在线支付',
  60. 2 => '汇款',
  61. 3 => '个人转账',
  62. );
  63. $get_type = array
  64. (
  65. 1 => '购买',
  66. 2 => '赠送',
  67. );
  68. $level = function()
  69. {
  70. $array = array
  71. (
  72. -1 => array
  73. (
  74. 'id' => -1,
  75. 'name' => '普通',
  76. ),
  77. );
  78. $data = Dever::load('setting/level-state');
  79. if($data)
  80. {
  81. $array += $data;
  82. }
  83. return $array;
  84. };
  85. $import = array
  86. (
  87. 1 => '最新系统',
  88. 2 => 'v2旧系统导入',
  89. 3 => 'v1旧系统导入',
  90. );
  91. $order_type = array
  92. (
  93. 1 => '新购',
  94. 2 => '升级',
  95. );
  96. $button = array();
  97. $parent_mid = Dever::input('search_option_parent_mid');
  98. $mid = Dever::input('search_option_mid');
  99. $pmid = '';
  100. if ($parent_mid) {
  101. $pmid = $parent_mid;
  102. }
  103. if ($mid) {
  104. $pmid = $mid;
  105. }
  106. if ($pmid) {
  107. $button = array
  108. (
  109. '返回上一页' => array('location', 'l=project/database/list&project=agent&table=member_area&page_type=1&mid=' . $pmid),
  110. );
  111. }else{
  112. if(Dever::load('manage/auth')->checkFunc('agent.order', 'editorderout', '数据导出')){
  113. $button = array
  114. (
  115. '数据导出' => array('excel', 'agent/lib/order.out_order'),
  116. );
  117. }
  118. }
  119. $invite_type = array
  120. (
  121. 1 => '邀请人',
  122. 2 => '来源',
  123. );
  124. # id小于50000为导入的数据
  125. return array
  126. (
  127. # 表名
  128. 'name' => 'order',
  129. # 显示给用户看的名称
  130. 'lang' => '代理商订单',
  131. 'auto' => 50000,
  132. 'set' => array
  133. (
  134. 'status' => $status,
  135. 'pay_status' => $pay_status,
  136. 'goods_status' => $goods_status,
  137. 'type' => $type,
  138. 'pay_type' => $pay_type,
  139. 'order_type' => $order_type,
  140. ),
  141. 'start' => array
  142. (
  143. 'update' => 'agent/lib/manage.orderUpdateParent',
  144. ),
  145. 'order' => 99,
  146. # 数据结构
  147. 'struct' => array
  148. (
  149. 'id' => array
  150. (
  151. 'type' => 'int-11',
  152. 'name' => 'ID',
  153. 'default' => '',
  154. 'desc' => '',
  155. 'match' => 'is_numeric',
  156. 'search' => 'order',
  157. //'list' => true,
  158. ),
  159. 'mid' => array
  160. (
  161. 'type' => 'int-11',
  162. 'name' => '代理商姓名/手机号',
  163. 'default' => '-1',
  164. 'desc' => '代理商',
  165. 'match' => 'is_string',
  166. 'update' => 'text',
  167. 'search' => array
  168. (
  169. 'api' => 'agent/member-getSearch',
  170. 'col' => 'col',
  171. 'result' => 'id',
  172. 'search' => 'mid',
  173. ),
  174. 'list_name' => '代理商信息',
  175. 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  176. 'list_order' => 3,
  177. ),
  178. 'order_num' => array
  179. (
  180. 'type' => 'varchar-100',
  181. 'name' => '订单号',
  182. 'default' => '',
  183. 'desc' => '订单号',
  184. 'match' => 'is_string',
  185. 'update' => 'text',
  186. //'search' => 'fulltext',
  187. //'list' => true,
  188. //'list_order' => 1,
  189. ),
  190. 'order_type' => array
  191. (
  192. 'type' => 'tinyint-1',
  193. 'name' => '订单类型',
  194. 'default' => '1',
  195. 'desc' => '订单类型',
  196. 'match' => 'is_numeric',
  197. 'option' => $order_type,
  198. ),
  199. 'mobile' => array
  200. (
  201. 'type' => 'bigint-11',
  202. 'name' => '手机号',
  203. 'default' => '',
  204. 'desc' => '请输入手机号',
  205. 'match' => Dever::rule('mobile'),
  206. 'update' => 'text',
  207. //'search' => 'fulltext',
  208. //'list' => true,
  209. ),
  210. 'invite_type' => array
  211. (
  212. 'type' => 'tinyint-1',
  213. 'name' => '邀请类型',
  214. 'default' => '1',
  215. 'desc' => '邀请类型',
  216. 'match' => 'is_numeric',
  217. //'search' => 'select',
  218. 'update' => 'radio',
  219. 'option' => $invite_type,
  220. //'list' => true,
  221. //'list_order' => 7,
  222. 'control' => 'invite_type',
  223. ),
  224. 'parent_code' => array
  225. (
  226. 'type' => 'varchar-100',
  227. 'name' => '上级邀请码',
  228. 'default' => '',
  229. 'desc' => '上级邀请码',
  230. 'match' => 'is_string',
  231. 'update' => 'text',
  232. # 绑定js脚本,更新时使用,第一个参数是执行的方式,第二个参数执行的方法,第三个参数是传值。
  233. 'bind' => array('onblur', 'loading', array('url' => Dever::url("lib/member.search", 'agent'))),
  234. 'show' => 'invite_type=1',
  235. ),
  236. 'parent_mid' => array
  237. (
  238. 'type' => 'int-11',
  239. 'name' => '上级姓名/手机号',
  240. 'default' => '-1',
  241. 'desc' => '邀请人',
  242. 'match' => 'is_string',
  243. //'update' => 'text',
  244. 'search' => array
  245. (
  246. 'api' => 'agent/member-getSearch',
  247. 'col' => 'col',
  248. 'result' => 'id',
  249. 'search' => 'parent_mid',
  250. ),
  251. 'list_name' => '上级信息',
  252. 'list' => 'Dever::load("agent/lib/member.getOne", {parent_mid})',
  253. ),
  254. 'source_id' => array
  255. (
  256. 'type' => 'int-11',
  257. 'name' => '注册来源',
  258. 'default' => '-1',
  259. 'desc' => '注册来源',
  260. 'match' => 'is_numeric',
  261. 'search' => 'select',
  262. 'update' => 'radio',
  263. 'option' => $source_id,
  264. // 'list' => true,
  265. // 'list_order' => 5,
  266. // 'show' => 'invite_type=2',
  267. ),
  268. 'name' => array
  269. (
  270. 'type' => 'varchar-100',
  271. 'name' => '姓名',
  272. 'default' => '',
  273. 'desc' => '姓名',
  274. 'match' => 'is_string',
  275. 'update' => 'text',
  276. //'search' => 'fulltext',
  277. ),
  278. 'role' => array
  279. (
  280. 'type' => 'int-11',
  281. 'name' => '代理角色',
  282. 'default' => '',
  283. 'desc' => '代理角色',
  284. 'match' => 'is_numeric',
  285. 'search' => 'select',
  286. 'update' => 'select',
  287. 'option' => $role,
  288. ),
  289. 'area' => array
  290. (
  291. 'type' => 'varchar-500',
  292. 'name' => '代理区域',
  293. 'default' => '',
  294. 'desc' => '代理区域',
  295. 'match' => 'option',
  296. 'search' => 'linkage',
  297. 'update' => 'linkage',
  298. 'option' => Dever::url('api.get?level_total=4', 'area'),
  299. ),
  300. 'desc' => array
  301. (
  302. 'type' => 'varchar-600',
  303. 'name' => '付款备注',
  304. 'default' => '',
  305. 'desc' => '付款备注',
  306. 'match' => 'is_string',
  307. 'update' => 'text',
  308. ),
  309. 'f_price' => array
  310. (
  311. 'type' => 'decimal-11,2',
  312. 'name' => '原价',
  313. 'default' => '0',
  314. 'desc' => '原价',
  315. 'match' => 'option',
  316. 'update' => 'text',
  317. ),
  318. 'price' => array
  319. (
  320. 'type' => 'decimal-11,2',
  321. 'name' => '金额',
  322. 'default' => '0',
  323. 'desc' => '金额',
  324. 'match' => 'option',
  325. 'update' => 'text',
  326. // 'list' => true,
  327. //'list_name' => '应付金额<br />实付金额<br />代理费<br />软件服务费<br />',
  328. 'list_name' => '实付金额',
  329. 'list' => true,
  330. //'list' =>'Dever::load("agent/lib/order.set_price", {id})',
  331. 'list_order' => 10,
  332. ),
  333. 'pay_type' => array
  334. (
  335. 'type' => 'tinyint-1',
  336. 'name' => '支付方式',
  337. 'default' => '1',
  338. 'desc' => '支付方式',
  339. 'match' => 'is_numeric',
  340. //'search' => 'select',
  341. //'update' => 'select',
  342. 'option' => $pay_type,
  343. //'list' => true,
  344. //'list_order' => 7,
  345. ),
  346. 'pay_pic' => array
  347. (
  348. 'type' => 'varchar-2000',
  349. 'name' => '打款凭证',
  350. 'default' => '',
  351. 'desc' => '打款凭证',
  352. 'match' => 'option',
  353. 'update' => 'images',
  354. 'key' => '1',
  355. //'place' => '150',
  356. ),
  357. 'pay_price' => array
  358. (
  359. 'type' => 'decimal-11,2',
  360. 'name' => '交款金额',
  361. 'default' => '0',
  362. 'desc' => '交款金额',
  363. 'match' => 'option',
  364. 'update' => 'text',
  365. ),
  366. 'option_price' => array
  367. (
  368. 'type' => 'decimal-11,2',
  369. 'name' => '赠送期权价值',
  370. 'default' => '0',
  371. 'desc' => '金额',
  372. 'match' => 'option',
  373. 'update' => 'text',
  374. // 'value' => Dever::input('soft_price', '0'),
  375. // 'show' => 'cstatus=2',
  376. ),
  377. 'bank_id' => array
  378. (
  379. 'type' => 'int-11',
  380. 'name' => '所属银行',
  381. 'default' => '',
  382. 'desc' => '所属银行',
  383. 'match' => 'is_numeric',
  384. ),
  385. 'bank_card' => array
  386. (
  387. 'type' => 'int-11',
  388. 'name' => '银行卡号',
  389. 'default' => '',
  390. 'desc' => '银行卡号',
  391. 'match' => 'is_numeric',
  392. ),
  393. 'type' => array
  394. (
  395. 'type' => 'tinyint-1',
  396. 'name' => '类型',
  397. 'default' => '1',
  398. 'desc' => '类型',
  399. 'match' => 'is_numeric',
  400. 'option' => $type,
  401. 'update' => 'radio',
  402. 'control' => 'type',
  403. ),
  404. 'sign' => array
  405. (
  406. 'type' => 'varchar-150',
  407. 'name' => '手写签名',
  408. 'default' => '',
  409. 'desc' => '手写签名',
  410. 'match' => 'option',
  411. 'update' => 'image',
  412. 'key' => '7',
  413. ),
  414. 'idcard' => array
  415. (
  416. 'type' => 'varchar-100',
  417. 'name' => '身份证号码',
  418. 'default' => '',
  419. 'desc' => '身份证号码',
  420. 'match' => 'is_string',
  421. 'match' => Dever::rule('idcard'),
  422. 'update' => 'text',
  423. //'search' => 'fulltext',
  424. ),
  425. 'idcard_front' => array
  426. (
  427. 'type' => 'varchar-150',
  428. 'name' => '身份证正面',
  429. 'default' => '',
  430. 'desc' => '身份证正面',
  431. 'match' => 'option',
  432. 'update' => 'image',
  433. 'key' => '8',
  434. //'place' => '660*660',
  435. ),
  436. 'idcard_back' => array
  437. (
  438. 'type' => 'varchar-150',
  439. 'name' => '身份证背面',
  440. 'default' => '',
  441. 'desc' => '身份证背面',
  442. 'match' => 'option',
  443. 'update' => 'image',
  444. 'key' => '8',
  445. //'place' => '660*660',
  446. ),
  447. 'company_name' => array
  448. (
  449. 'type' => 'varchar-100',
  450. 'name' => '公司名称',
  451. 'default' => '',
  452. 'desc' => '公司名称',
  453. 'match' => 'is_string',
  454. 'update' => 'text',
  455. //'search' => 'fulltext',
  456. //'list' => true,
  457. 'show' => 'type=2',
  458. ),
  459. 'company_pic' => array
  460. (
  461. 'type' => 'varchar-150',
  462. 'name' => '营业执照',
  463. 'default' => '',
  464. 'desc' => '营业执照',
  465. 'match' => 'option',
  466. 'update' => 'image',
  467. 'key' => '8',
  468. //'place' => '660*660',
  469. 'show' => 'type=2',
  470. ),
  471. 'company_number' => array
  472. (
  473. 'type' => 'varchar-80',
  474. 'name' => '营业执照号码',
  475. 'default' => '',
  476. 'desc' => '营业执照号码',
  477. 'match' => 'is_string',
  478. 'update' => 'text',
  479. 'show' => 'type=2',
  480. ),
  481. 'address' => array
  482. (
  483. 'type' => 'varchar-800',
  484. 'name' => '地址',
  485. 'default' => '',
  486. 'desc' => '地址',
  487. 'match' => 'is_string',
  488. 'update' => 'text',
  489. ),
  490. 'audit_desc' => array
  491. (
  492. 'type' => 'varchar-400',
  493. 'name' => '审核备注-从order_process中同步过来',
  494. 'default' => '',
  495. 'desc' => '审核备注',
  496. 'match' => 'is_string',
  497. //'update' => 'textarea',
  498. ),
  499. 'admin_desc' => array
  500. (
  501. 'type' => 'varchar-800',
  502. 'name' => '管理员备注',
  503. 'default' => '',
  504. 'desc' => '管理员备注',
  505. 'match' => 'is_string',
  506. 'update' => 'textarea',
  507. ),
  508. 'status' => array
  509. (
  510. 'type' => 'tinyint-1',
  511. 'name' => '订单状态',
  512. 'default' => '1',
  513. 'desc' => '状态',
  514. 'match' => 'is_numeric',
  515. 'option' => $status,
  516. 'search' => 'select',
  517. 'list' => true,
  518. 'list_order' => 8,
  519. ),
  520. 'history_status' => array
  521. (
  522. 'type' => 'tinyint-1',
  523. 'name' => '记录挂起之前的状态',
  524. 'default' => '1',
  525. 'desc' => '状态',
  526. 'match' => 'is_numeric',
  527. 'option' => $status,
  528. ),
  529. 'goods_status' => array
  530. (
  531. 'type' => 'tinyint-1',
  532. 'name' => '权益状态',
  533. 'default' => '1',
  534. 'desc' => '权益状态',
  535. 'match' => 'is_numeric',
  536. 'option' => $goods_status,
  537. 'search' => 'select',
  538. 'list' => true,
  539. 'list_order' => 9,
  540. ),
  541. 'pay_status' => array
  542. (
  543. 'type' => 'tinyint-1',
  544. 'name' => '支付状态',
  545. 'default' => '1',
  546. 'desc' => '状态',
  547. 'match' => 'is_numeric',
  548. 'option' => $pay_status,
  549. ),
  550. 'get_type' => array
  551. (
  552. 'type' => 'tinyint-1',
  553. 'name' => '获取方式',
  554. 'default' => '1',
  555. 'desc' => '获取方式',
  556. 'match' => 'is_numeric',
  557. 'update' => 'radio',
  558. 'option' => $get_type,
  559. ),
  560. 'agent_cash' => array
  561. (
  562. 'type' => 'decimal-11,2',
  563. 'name' => '代理费',
  564. 'default' => '0',
  565. 'desc' => '代理费',
  566. 'match' => 'option',
  567. 'update' => 'text',
  568. ),
  569. 'soft_cash' => array
  570. (
  571. 'type' => 'decimal-11,2',
  572. 'name' => '软件服务费',
  573. 'default' => '0',
  574. 'desc' => '软件服务费',
  575. 'match' => 'option',
  576. 'update' => 'text',
  577. ),
  578. 'goods_cash' => array
  579. (
  580. 'type' => 'decimal-11,2',
  581. 'name' => '商品价值-名额不算,商品价值第一次分配后保持不变',
  582. 'default' => '0',
  583. 'desc' => '商品价值',
  584. 'match' => 'option',
  585. 'update' => 'text',
  586. ),
  587. 'import' => array
  588. (
  589. 'type' => 'tinyint-1',
  590. 'name' => '是否导入',
  591. 'default' => '1',
  592. 'desc' => '是否导入',
  593. 'match' => 'is_numeric',
  594. 'option' => $import,
  595. 'update' => 'radio',
  596. ),
  597. 'state' => array
  598. (
  599. 'type' => 'tinyint-1',
  600. 'name' => '状态',
  601. 'default' => '1',
  602. 'desc' => '请选择状态',
  603. 'match' => 'is_numeric',
  604. ),
  605. 'fdate' => array
  606. (
  607. 'type' => 'int-11',
  608. 'name' => '完成时间',
  609. 'default' => '',
  610. 'match' => 'is_numeric',
  611. 'search' => 'date',
  612. 'desc' => '',
  613. ),
  614. 'udate' => array
  615. (
  616. 'type' => 'int-11',
  617. 'name' => '更新时间',
  618. 'default' => '',
  619. 'match' => 'is_numeric',
  620. 'desc' => '',
  621. 'order' => 'desc',
  622. ),
  623. 'cdate' => array
  624. (
  625. 'type' => 'int-11',
  626. 'name' => '注册时间',
  627. 'match' => array('is_numeric', time()),
  628. 'default' => '',
  629. 'desc' => '',
  630. # 只有insert时才生效
  631. 'insert' => true,
  632. 'search' => 'date',
  633. // 'list' => 'date("Y-m-d H:i:s", {cdate})',
  634. 'list_name' => '注册时间<br />初审时间<br />终审时间<br />完成时间<br />',
  635. 'list' => 'Dever::load("agent/lib/order.set_cdate", {id})',
  636. 'list_order' => 200,
  637. ),
  638. ),
  639. 'alter' => array
  640. (
  641. 10 => array
  642. (
  643. array('update', 'price', 'price', 'decimal-11,2 0 实付金额'),
  644. array('update', 'f_price', 'f_price', 'decimal-11,2 0 原价'),
  645. array('update', 'agent_cash', 'agent_cash', 'decimal-11,2 0 代理费'),
  646. array('update', 'soft_cash', 'soft_cash', 'decimal-11,2 0 软件服务费'),
  647. array('update', 'goods_cash', 'goods_cash', 'decimal-11,2 0 商品价值'),
  648. array('update', 'pay_price', 'pay_price', 'decimal-11,2 0 交款金额'),
  649. array('update', 'option_price', 'option_price', 'decimal-11,2 0 赠送期权价值'),
  650. ),
  651. 'version' => 10,
  652. ),
  653. 'manage' => array
  654. (
  655. 'insert' => false,
  656. 'delete' => false,
  657. 'edit' => false,
  658. 'button' => $button,
  659. 'list_button' => array
  660. (
  661. //fast_list
  662. 'list' => array('查看详情', '"order_process&project=agent&order_id={id}&page_type=1&[refer]"'),
  663. //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin,tk_status', '{status} == 6'),
  664. //'delete' => array('删除', '', '{status} == 1'),
  665. ),
  666. ),
  667. 'request' => array
  668. (
  669. 'getNew' => array
  670. (
  671. # 匹配的正则或函数 选填项
  672. 'option' => array
  673. (
  674. 'mid' => 'yes',
  675. 'status' => array('yes', 'in'),
  676. 'state' => 1,
  677. ),
  678. 'order' => array('id' => 'desc'),
  679. 'type' => 'one',
  680. 'col' => '*',
  681. ),
  682. 'getTotal' => array
  683. (
  684. # 匹配的正则或函数 选填项
  685. 'option' => array
  686. (
  687. 'mid' => 'yes',
  688. 'status' => array('yes', 'in'),
  689. 'state' => 1,
  690. ),
  691. 'order' => array('id' => 'desc'),
  692. 'type' => 'count',
  693. 'col' => '*',
  694. ),
  695. 'getData' => array
  696. (
  697. # 匹配的正则或函数 选填项
  698. 'option' => array
  699. (
  700. 'mid' => 'yes',
  701. 'status' => array('yes', 'in'),
  702. 'state' => 1,
  703. ),
  704. 'order' => array('id' => 'desc'),
  705. 'page' => array(10, 'list'),
  706. 'type' => 'all',
  707. 'col' => '*',
  708. ),
  709. # 获取订单数量
  710. 'getNum' => array
  711. (
  712. # 匹配的正则或函数 选填项
  713. 'option' => array
  714. (
  715. 'start' => array('yes-cdate', '>='),
  716. 'end' => array('yes-cdate', '<='),
  717. 'fstart' => array('yes-fdate', '>='),
  718. 'fend' => array('yes-fdate', '<='),
  719. 'status' => array('yes', 'in'),
  720. 'state' => 1,
  721. ),
  722. 'type' => 'count',
  723. 'col' => '*',
  724. ),
  725. # 获取订单数量
  726. 'getCash' => array
  727. (
  728. # 匹配的正则或函数 选填项
  729. 'option' => array
  730. (
  731. 'start' => array('yes-cdate', '>='),
  732. 'end' => array('yes-cdate', '<='),
  733. 'fstart' => array('yes-fdate', '>='),
  734. 'fend' => array('yes-fdate', '<='),
  735. 'status' => array('yes', 'in'),
  736. 'state' => 1,
  737. ),
  738. 'type' => 'one',
  739. 'col' => 'sum(price) as total',
  740. ),
  741. 'getDailiCash' => array
  742. (
  743. # 匹配的正则或函数 选填项
  744. 'option' => array
  745. (
  746. 'start' => array('yes-cdate', '>='),
  747. 'end' => array('yes-cdate', '<='),
  748. 'fstart' => array('yes-fdate', '>='),
  749. 'fend' => array('yes-fdate', '<='),
  750. 'status' => array('yes', 'in'),
  751. 'state' => 1,
  752. ),
  753. 'type' => 'one',
  754. 'col' => 'sum(agent_cash) as total',
  755. ),
  756. #期权价值
  757. 'getOptionPrice' => array
  758. (
  759. # 匹配的正则或函数 选填项
  760. 'option' => array
  761. (
  762. 'start' => array('yes-cdate', '>='),
  763. 'end' => array('yes-cdate', '<='),
  764. 'fstart' => array('yes-fdate', '>='),
  765. 'fend' => array('yes-fdate', '<='),
  766. 'status' => array('yes', 'in'),
  767. 'role' => 'yes',
  768. 'state' => 1,
  769. ),
  770. 'type' => 'one',
  771. 'col' => 'sum(option_price) as total',
  772. ),
  773. 'getSoftCash' => array
  774. (
  775. # 匹配的正则或函数 选填项
  776. 'option' => array
  777. (
  778. 'start' => array('yes-cdate', '>='),
  779. 'end' => array('yes-cdate', '<='),
  780. 'fstart' => array('yes-fdate', '>='),
  781. 'fend' => array('yes-fdate', '<='),
  782. 'status' => array('yes', 'in'),
  783. 'role' => 'yes',
  784. 'state' => 1,
  785. ),
  786. 'type' => 'one',
  787. 'col' => 'sum(soft_cash) as total',
  788. ),
  789. 'getGoodsCash' => array
  790. (
  791. # 匹配的正则或函数 选填项
  792. 'option' => array
  793. (
  794. 'start' => array('yes-cdate', '>='),
  795. 'end' => array('yes-cdate', '<='),
  796. 'fstart' => array('yes-fdate', '>='),
  797. 'fend' => array('yes-fdate', '<='),
  798. 'status' => array('yes', 'in'),
  799. 'state' => 1,
  800. ),
  801. 'type' => 'one',
  802. 'col' => 'sum(goods_cash) as total',
  803. ),
  804. 'getFindOne' => array
  805. (
  806. # 匹配的正则或函数 选填项
  807. 'option' => array
  808. (
  809. 'id' => array('yes','!='),
  810. 'mid' => 'yes',
  811. 'order_type' => 'yes',
  812. 'state' => 1,
  813. ),
  814. 'type' => 'one',
  815. 'order' => array('cdate' => 'desc'),
  816. 'col' => '*',
  817. ),
  818. 'getPrice' => array
  819. (
  820. # 匹配的正则或函数 选填项
  821. 'option' => array
  822. (
  823. 'mid' => 'yes',
  824. 'status' => 4,
  825. 'state' => 1,
  826. ),
  827. 'type' => 'one',
  828. 'col' => 'sum(price) as total',
  829. ),
  830. 'getCount' => array
  831. (
  832. # 匹配的正则或函数 选填项
  833. 'option' => array
  834. (
  835. 'start' => array('yes-cdate','>='),
  836. 'end' => array('yes-cdate','<='),
  837. 'mid' => 'yes',
  838. 'state' => 1,
  839. ),
  840. 'type' => 'one',
  841. 'col' => 'sum(price) as total',
  842. ),
  843. 'getVCount' => array
  844. (
  845. # 匹配的正则或函数 选填项
  846. 'option' => array
  847. (
  848. 'start' => array('yes-cdate','>='),
  849. 'end' => array('yes-cdate','<='),
  850. 'mid' => 'yes',
  851. 'role' => array('yes','in'),
  852. 'state' => 1,
  853. ),
  854. 'type' => 'one',
  855. 'col' => 'sum(price) as total',
  856. ),
  857. 'getExcelAll' => array
  858. (
  859. # 匹配的正则或函数 选填项
  860. 'option' => array
  861. (
  862. 'start' => array('yes-cdate', '>='),
  863. 'end' => array('yes-cdate', '<='),
  864. 'fstart' => array('yes-fdate', '>='),
  865. 'fend' => array('yes-fdate', '<='),
  866. 'status' => array('yes', 'in'),
  867. 'state' => 1,
  868. ),
  869. 'type' => 'all',
  870. 'col' => '*',
  871. ),
  872. 'getSum' => array
  873. (
  874. # 匹配的正则或函数 选填项
  875. 'option' => array
  876. (
  877. 'start' => array('yes-fdate', '>='),
  878. 'end' => array('yes-fdate', '<='),
  879. 'fstart' => array('yes-fdate', '>='),
  880. 'fend' => array('yes-fdate', '<='),
  881. 'status' => array('yes', 'in'),
  882. 'role' => 'yes',
  883. 'state' => 1,
  884. ),
  885. 'type' => 'one',
  886. 'col' => 'sum(price) as total',
  887. ),
  888. ),
  889. );