order.php 27 KB

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