sell_order.php 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991
  1. <?php
  2. $pay_status = Dever::config('base', 'pay')->pay['status'];
  3. $method = array
  4. (
  5. 1 => '自提',
  6. 2 => '外送',
  7. );
  8. $pay_method = array
  9. (
  10. 1 => '平台结算',
  11. 2 => '门店代下单',
  12. 3 => '礼品卡',
  13. );
  14. $audit = array
  15. (
  16. //1 => '待审核',
  17. 2 => '审核通过',
  18. 3 => '审核未通过',
  19. );
  20. $pay_type = array
  21. (
  22. 1 => '微信',
  23. 2 => '现金',
  24. );
  25. $status = array
  26. (
  27. 1 => '待支付',
  28. 2 => '待处理',
  29. 3 => '处理中',
  30. 4 => '待收货确认',
  31. 5 => '已完成',
  32. 6 => '已完成(有退款)',
  33. 7 => '已取消',
  34. 8 => '已取消',//已退款
  35. 11 => '已取消',//已过期
  36. );
  37. $status_manage = array
  38. (
  39. 1 => '待支付',
  40. 2 => '待处理',
  41. 3 => '处理中',
  42. 4 => '待收货确认',
  43. 5 => '已完成',
  44. 6 => '已完成(有退款)',
  45. 7 => '已取消',
  46. 8 => '已退款',//已退款
  47. 11 => '已过期',//已过期
  48. );
  49. //1待支付2支付成功3处理中4待确认5已完成6已完成(有退款)7已取消8已退款11已过期
  50. $refund_status = array
  51. (
  52. 1 => '未申请',
  53. 2 => '申请中',
  54. 3 => '有退款',
  55. 4 => '已退款',
  56. );
  57. $shop = function()
  58. {
  59. $array = array();
  60. $info = Dever::db('shop/info')->select();
  61. if($info)
  62. {
  63. $array += $info;
  64. }
  65. return $array;
  66. };
  67. $store = function()
  68. {
  69. $array = array();
  70. $info = Dever::db('store/info')->select();
  71. if($info)
  72. {
  73. $array += $info;
  74. }
  75. return $array;
  76. };
  77. $withdraw = array
  78. (
  79. 1 => '未提现',
  80. 2 => '已提现',
  81. );
  82. $shop_type = array
  83. (
  84. 1 => '普通店',
  85. 2 => '平台店',
  86. );
  87. $search_option_shop_type = Dever::input('search_option_shop_type', 1);
  88. if ($search_option_shop_type == 1) {
  89. $excel = array
  90. (
  91. array('导出订单', '门店零售订单', ''),
  92. array('导出订单明细', '门店零售订单明细', 'shop/excel.sell_order'),
  93. );
  94. $refund_search = false;
  95. } elseif ($search_option_shop_type == 2) {
  96. $excel = array
  97. (
  98. array('导出订单', '平台商城订单', ''),
  99. array('导出订单明细', '平台商城订单明细', 'shop/excel.p_sell_order'),
  100. );
  101. $refund_search = 'select';
  102. }
  103. return array
  104. (
  105. # 表名
  106. 'name' => 'sell_order',
  107. # 显示给用户看的名称
  108. 'lang' => '销售订单',
  109. 'order' => 100,
  110. 'status' => $status,
  111. 'status_manage' => $status_manage,
  112. 'pay_method' => $pay_method,
  113. 'pay_type' => $pay_type,
  114. 'method' => $method,
  115. 'end' => array
  116. (
  117. 'insert' => 'shop/lib/manage.sellOrderUpdate',
  118. 'update' => 'shop/lib/manage.sellOrderUpdate',
  119. ),
  120. # 数据结构
  121. 'struct' => array
  122. (
  123. 'id' => array
  124. (
  125. 'type' => 'int-11',
  126. 'name' => 'ID',
  127. 'default' => '',
  128. 'desc' => '',
  129. 'match' => 'is_numeric',
  130. 'search' => 'order',
  131. //'list' => true,
  132. ),
  133. 'shop-info-sid'=> array
  134. (
  135. 'name' => '门店编号',
  136. 'default' => '',
  137. 'desc' => '门店编号',
  138. 'match' => 'option',
  139. # 读取另外表的关联方式
  140. 'sync' => array('shop_id', 'id'),
  141. 'list' => $search_option_shop_type == 1 ? true : false,
  142. 'list_order' => 1,
  143. ),
  144. 'shop_id' => array
  145. (
  146. 'type' => 'int-11',
  147. 'name' => '门店名称',
  148. 'default' => '',
  149. 'desc' => '门店名称',
  150. 'match' => 'is_numeric',
  151. 'search' => 'select',
  152. 'option' => $shop,
  153. 'update' => 'hidden',
  154. 'search' => 'hidden',
  155. 'search' => $search_option_shop_type == 1 ? array
  156. (
  157. 'api' => 'shop/info-like',
  158. 'col' => 'name',
  159. 'result' => 'id',
  160. ) : 'hidden',
  161. 'value' => Dever::input('search_option_shop_id'),
  162. 'list' => $search_option_shop_type == 1 ? 'Dever::load("shop/info-one#name", {shop_id})' : false,
  163. 'list_order' => 2,
  164. ),
  165. 'store_id' => array
  166. (
  167. 'type' => 'int-11',
  168. 'name' => '发货仓库-废弃',
  169. 'default' => '',
  170. 'desc' => '发货仓库',
  171. 'match' => 'is_numeric',
  172. 'option' => $store,
  173. 'update' => 'select',
  174. 'searchs' => $search_option_shop_type == 2 ? array
  175. (
  176. 'api' => 'store/info-like',
  177. 'col' => 'name',
  178. 'result' => 'id',
  179. ) : 'hidden',
  180. //'list' => $search_option_shop_type == 2 ? '"{store_id}" > 0 ? Dever::load("store/info-one#name", {store_id}) : ""' : false,
  181. 'list_order' => 6,
  182. ),
  183. 'shop-info-type'=> array
  184. (
  185. 'name' => '门店类型',
  186. 'default' => '',
  187. 'desc' => '门店类型',
  188. 'match' => 'option',
  189. # 读取另外表的关联方式
  190. 'sync' => array('shop_id', 'id'),
  191. 'list' => $search_option_shop_type == 1 ? 'Dever::load("shop/lib/manage.shopInfoType", {shop-info-type})' : false,
  192. 'list_order' => 3,
  193. ),
  194. 'area' => array
  195. (
  196. 'type' => 'varchar-500',
  197. 'name' => '所在街道',
  198. 'default' => '',
  199. 'desc' => '所在街道',
  200. 'match' => 'option',
  201. 'search' => $search_option_shop_type == 1 ? 'linkage' : false,
  202. 'update' => 'linkage',
  203. 'option' => Dever::url('lib/area.get', 'shop'),
  204. //'list' => 'Dever::load("area/api.string", "{area}")',
  205. ),
  206. 'uid' => array
  207. (
  208. 'type' => 'int-11',
  209. 'name' => $search_option_shop_type == 1 ? '购买人' : '收件人',
  210. 'default' => '0',
  211. 'desc' => '请选择用户',
  212. 'match' => 'is_numeric',
  213. 'update' => 'text',
  214. //'search' => 'select',
  215. 'search' => $search_option_shop_type == 1 ? array
  216. (
  217. 'api' => 'passport/user-one',
  218. 'col' => 'username',
  219. 'result' => 'id',
  220. ) : array
  221. (
  222. 'api' => 'passport/address-one',
  223. 'col' => 'contact',
  224. 'result' => 'uid',
  225. ),
  226. 'list' => $search_option_shop_type == 1 ? 'Dever::load("shop/lib/manage.user", {id})' : 'Dever::load("passport/address-one#contact", {address_id})',
  227. 'list_order' => 5,
  228. ),
  229. 'mobile' => array
  230. (
  231. 'type' => 'varchar-300',
  232. 'name' => $search_option_shop_type == 1 ? '下单手机号' : '收件人手机',
  233. 'default' => '',
  234. 'desc' => '手机号',
  235. 'match' => 'option',
  236. 'search' => 'fulltext',
  237. 'search' => $search_option_shop_type == 1 ? 'fulltext' : array
  238. (
  239. 'api' => 'passport/address-one',//接口地址,最好是获取多条数据的地址
  240. 'col' => 'mobile',//要查询的字段
  241. 'result' => 'uid',//返回的字段
  242. 'search' => 'uid',//本表的字段,默认为当前的字段
  243. ),
  244. 'list' => $search_option_shop_type == 1 ? false : 'Dever::load("passport/address-one#mobile", {address_id})',
  245. 'list_order' => 6,
  246. ),
  247. 'address_id' => array
  248. (
  249. 'type' => 'int-11',
  250. 'name' => '送货地址',
  251. 'default' => '',
  252. 'desc' => '送货地址',
  253. 'match' => 'is_numeric',
  254. //'list' => 'Dever::load("passport/address-find#address", {address_id})';
  255. ),
  256. 'invoice_id' => array
  257. (
  258. 'type' => 'int-11',
  259. 'name' => '发票信息',
  260. 'default' => '',
  261. 'desc' => '发票信息',
  262. 'match' => 'is_numeric',
  263. //'list' => 'Dever::load("passport/address-find#address", {address_id})';
  264. ),
  265. 'name' => array
  266. (
  267. 'type' => 'varchar-800',
  268. 'name' => '订单名称',
  269. 'default' => '',
  270. 'desc' => '订单名称',
  271. 'match' => 'is_string',
  272. 'update' => 'text',
  273. ),
  274. 'order_num' => array
  275. (
  276. 'type' => 'varchar-100',
  277. 'name' => '订单号',
  278. 'default' => '',
  279. 'desc' => '订单号',
  280. 'match' => 'is_string',
  281. 'update' => 'text',
  282. 'search' => 'fulltext',
  283. 'list' => true,
  284. 'list_order' => 4,
  285. ),
  286. 'oprice' => array
  287. (
  288. 'type' => 'varchar-50',
  289. 'name' => '原价',
  290. 'default' => '0',
  291. 'desc' => '原价',
  292. 'match' => 'option',
  293. 'update' => 'text',
  294. 'list_name' => '合计金额',
  295. //'list' => $search_option_shop_type == 1 ? 'Dever::load("shop/lib/manage.getTotalCash", {id})' : false,
  296. 'list' => 'Dever::load("shop/lib/manage.getTotalCash", {id})',
  297. 'list_order' => 10,
  298. ),
  299. 'price' => array
  300. (
  301. 'type' => 'varchar-50',
  302. //'name' => $search_option_shop_type == 1 ? '实付金额' : '订单总金额',
  303. 'name' => '实付金额',
  304. 'default' => '0',
  305. 'desc' => '实付金额',
  306. 'match' => 'option',
  307. 'update' => 'text',
  308. 'list' => 'Dever::load("cash/lib/set.getCash", "{price}")',
  309. 'list_order' => 11,
  310. ),
  311. 'num' => array
  312. (
  313. 'type' => 'int-11',
  314. 'name' => '购买总数量',
  315. 'default' => '',
  316. 'desc' => '购买总数量',
  317. 'match' => 'is_numeric',
  318. 'search' => 'select',
  319. 'list' => $search_option_shop_type == 2 ? true : false,
  320. 'list_order' => 10,
  321. ),
  322. 'refund_num' => array
  323. (
  324. 'type' => 'int-11',
  325. 'name' => '退款数量',
  326. 'default' => '0',
  327. 'desc' => '退款数量',
  328. 'match' => 'is_numeric',
  329. ),
  330. 'refund_cash' => array
  331. (
  332. 'type' => 'varchar-50',
  333. 'name' => $search_option_shop_type == 1 ? '已退订单金额' : '退款金额',
  334. 'default' => '0',
  335. 'desc' => '已退订单金额',
  336. 'match' => 'option',
  337. 'update' => 'text',
  338. 'list' => true,
  339. 'list_order' => $search_option_shop_type == 1 ? 12 : 19,
  340. ),
  341. 'refund_status' => array
  342. (
  343. 'type' => 'tinyint-1',
  344. 'name' => '退款状态',
  345. 'default' => '1',
  346. 'desc' => '申请退款状态',
  347. 'match' => 'is_numeric',
  348. 'option' => $refund_status,
  349. 'search' => $refund_search,
  350. 'list' => $search_option_shop_type == 2 ? 'Dever::load("shop/lib/manage.buyInfoRefundStatus", "{id}", "sell_order")' : false,
  351. 'list_name' => '退款状态',
  352. 'list_order' => 18,
  353. ),
  354. 'kou_cash' => array
  355. (
  356. 'type' => 'varchar-50',
  357. 'name' => '抹零金额',
  358. 'default' => '0',
  359. 'desc' => '抹零金额',
  360. 'match' => 'option',
  361. 'update' => 'text',
  362. ),
  363. 'ps_cash' => array
  364. (
  365. 'type' => 'varchar-50',
  366. 'name' => '配送费',
  367. 'default' => '0',
  368. 'desc' => '配送费',
  369. 'match' => 'option',
  370. 'update' => 'text',
  371. ),
  372. 'card_code_id' => array
  373. (
  374. 'type' => 'int-11',
  375. 'name' => '礼品卡id',
  376. 'default' => '',
  377. 'desc' => '礼品卡id',
  378. 'match' => 'option',
  379. ),
  380. 'card_code_card' => array
  381. (
  382. 'type' => 'varchar-800',
  383. 'name' => '礼品卡卡号',
  384. 'default' => '',
  385. 'desc' => '礼品卡卡号',
  386. 'match' => 'option',
  387. 'update' => 'text',
  388. ),
  389. 'card_code_cash' => array
  390. (
  391. 'type' => 'varchar-50',
  392. 'name' => '礼品卡抵扣金额',
  393. 'default' => '0',
  394. 'desc' => '礼品卡抵扣金额',
  395. 'match' => 'option',
  396. 'update' => 'text',
  397. ),
  398. 'wallet_cash' => array
  399. (
  400. 'type' => 'varchar-50',
  401. 'name' => '钱包抵扣金额',
  402. 'default' => '0',
  403. 'desc' => '钱包抵扣金额',
  404. 'match' => 'option',
  405. 'update' => 'text',
  406. ),
  407. 'coupon_id' => array
  408. (
  409. 'type' => 'int-11',
  410. 'name' => '门店的优惠券id',
  411. 'default' => '',
  412. 'desc' => '门店的优惠券id',
  413. 'match' => 'option',
  414. ),
  415. 'user_coupon_id' => array
  416. (
  417. 'type' => 'int-11',
  418. 'name' => '用户的优惠券id',
  419. 'default' => '',
  420. 'desc' => '用户的优惠券id',
  421. 'match' => 'option',
  422. ),
  423. 'coupon_cash' => array
  424. (
  425. 'type' => 'varchar-300',
  426. 'name' => '优惠金额',
  427. 'default' => '0',
  428. 'desc' => '优惠金额',
  429. 'match' => 'option',
  430. 'update' => 'text',
  431. ),
  432. 'discount_id' => array
  433. (
  434. 'type' => 'int-11',
  435. 'name' => '折扣ID',
  436. 'default' => '',
  437. 'desc' => '折扣ID',
  438. 'match' => 'option',
  439. ),
  440. 'discount_cash' => array
  441. (
  442. 'type' => 'varchar-300',
  443. 'name' => '折扣优惠金额',
  444. 'default' => '0',
  445. 'desc' => '折扣优惠金额',
  446. 'match' => 'option',
  447. 'update' => 'text',
  448. ),
  449. 'method' => array
  450. (
  451. 'type' => 'int-11',
  452. 'name' => '配送类型',
  453. 'default' => '1',
  454. 'desc' => '配送类型',
  455. 'match' => 'is_numeric',
  456. 'update' => 'radio',
  457. 'search' => $search_option_shop_type == 1 ? 'select' : false,
  458. 'option' => $method,
  459. 'list' => $search_option_shop_type == 1 ? true : false,
  460. 'list_order' => 5,
  461. ),
  462. 'code' => array
  463. (
  464. 'type' => 'varchar-100',
  465. 'name' => '自提码或者核销码',
  466. 'default' => '',
  467. 'desc' => '自提码或者核销码',
  468. 'match' => 'is_numeric',
  469. ),
  470. 'pay_method' => array
  471. (
  472. 'type' => 'int-11',
  473. 'name' => '订单类型',
  474. 'default' => '1',
  475. 'desc' => '订单类型',
  476. 'match' => 'is_numeric',
  477. 'update' => 'radio',
  478. 'search' => $search_option_shop_type == 1 ? 'select' : false,
  479. 'option' => $pay_method,
  480. 'list' => $search_option_shop_type == 1 ? true : false,
  481. 'list_order' => 6,
  482. ),
  483. 'pay_type' => array
  484. (
  485. 'type' => 'int-11',
  486. 'name' => '支付渠道',
  487. 'default' => '1',
  488. 'desc' => '支付渠道',
  489. 'match' => 'is_numeric',
  490. 'update' => 'radio',
  491. 'option' => $pay_type,
  492. 'list' => $search_option_shop_type == 1 ? true : false,
  493. 'list_order' => 13,
  494. ),
  495. 'info' => array
  496. (
  497. 'type' => 'varchar-300',
  498. 'name' => '订单备注',
  499. 'default' => '',
  500. 'desc' => '订单备注',
  501. 'match' => 'option',
  502. 'update' => 'textarea',
  503. ),
  504. 'withdraw' => array
  505. (
  506. 'type' => 'tinyint-1',
  507. 'name' => '是否提现',
  508. 'default' => '1',
  509. 'desc' => '是否提现',
  510. 'match' => 'is_numeric',
  511. 'option' => $withdraw,
  512. //'search' => 'select',
  513. ),
  514. 'shop_type' => array
  515. (
  516. 'type' => 'tinyint-1',
  517. 'name' => '门店类型',
  518. 'default' => '1',
  519. 'desc' => '门店类型',
  520. 'match' => 'is_numeric',
  521. 'option' => $shop_type,
  522. 'search' => 'hidden',
  523. //'search' => 'select',
  524. ),
  525. 'status' => array
  526. (
  527. 'type' => 'tinyint-1',
  528. 'name' => '订单状态',
  529. 'default' => '1',
  530. 'desc' => '订单状态',
  531. 'match' => 'is_numeric',
  532. 'option' => $status_manage,
  533. 'search' => 'select',
  534. //'search_after' => '<br />',
  535. 'list' => true,
  536. 'list_order' => 14,
  537. ),
  538. 'audit' => array
  539. (
  540. 'type' => 'tinyint-1',
  541. 'name' => '审核状态',
  542. 'default' => '2',
  543. 'desc' => '审核状态',
  544. 'match' => 'is_numeric',
  545. 'option' => $audit,
  546. //'search' => 'select',
  547. 'update' => 'radio',
  548. ),
  549. 'audit_desc' => array
  550. (
  551. 'type' => 'varchar-500',
  552. 'name' => '审核备注',
  553. 'default' => '',
  554. 'desc' => '审核备注',
  555. 'match' => 'option',
  556. 'update' => 'textarea',
  557. ),
  558. 'notice' => array
  559. (
  560. 'type' => 'tinyint-1',
  561. 'name' => '是否发送通知',
  562. 'default' => '1',
  563. 'desc' => '是否发送通知',
  564. 'match' => 'is_numeric',
  565. ),
  566. 'fdate' => array
  567. (
  568. 'type' => 'int-11',
  569. 'name' => '完成时间',
  570. 'default' => '',
  571. 'match' => 'is_numeric',
  572. 'desc' => '',
  573. 'list_name' =>'收货时间',
  574. 'list' => '"{fdate}" ? date("Y-m-d H:i", \'{fdate}\') : "-"',
  575. 'list_order' => 8,
  576. ),
  577. 'paydate' => array
  578. (
  579. 'type' => 'int-11',
  580. 'name' => '付款时间',
  581. 'default' => '',
  582. 'match' => 'is_numeric',
  583. 'desc' => '',
  584. 'list' => '"{paydate}" > 0 ? date("Y-m-d H:i", {paydate}) : "-"',
  585. 'list_order' => 9,
  586. ),
  587. 'operdate' => array
  588. (
  589. 'type' => 'int-11',
  590. 'name' => '操作时间',
  591. 'default' => '',
  592. 'match' => 'is_numeric',
  593. 'desc' => '',
  594. //'list' => '"{operdate}" > 0 ? date("Y-m-d H:i:s", {operdate}) : "-"',
  595. //'list_name' => '发货时间',
  596. //'list_order' => 8,
  597. ),
  598. 'shop-sell_order_ps-cdate'=> array
  599. (
  600. 'name' => '发货时间',
  601. 'default' => '',
  602. 'desc' => '发货时间',
  603. 'match' => 'option',
  604. # 读取另外表的关联方式
  605. 'sync' => array('id', 'order_id'),
  606. 'list' => '"{shop-sell_order_ps-cdate}" ? date("Y-m-d H:i", \'{shop-sell_order_ps-cdate}\') : "-"',
  607. 'list_order' => 8,
  608. ),
  609. 'state' => array
  610. (
  611. 'type' => 'tinyint-1',
  612. 'name' => '状态',
  613. 'default' => '1',
  614. 'desc' => '请选择状态',
  615. 'match' => 'is_numeric',
  616. ),
  617. 'cdate' => array
  618. (
  619. 'type' => 'int-11',
  620. 'name' => '下单时间',
  621. 'match' => array('is_numeric', time()),
  622. 'desc' => '',
  623. # 只有insert时才生效
  624. 'insert' => true,
  625. 'search' => 'sdate',
  626. 'list' => 'date("Y-m-d H:i", {cdate})',
  627. //'list' => 'Dever::load("service/lib/manage.showOrderTime", "{id}")',
  628. 'list_order' => 7,
  629. ),
  630. ),
  631. 'manage' => array
  632. (
  633. 'delete' => false,
  634. 'edit' => false,
  635. 'insert' => false,
  636. 'excel' => $excel,
  637. # 表格使用html模式,默认是js渲染模式
  638. 'list_table' => 'html',
  639. 'button' => array
  640. (
  641. //'导出订单明细' => array('excel', 'shop/excel.sell_order'),
  642. ),
  643. 'list_button' => array
  644. (
  645. //fast_list
  646. 'list' => array('查看详情', '"sell_order_goods&project=shop&order_id={id}&page_type=&search_option_shop_type='.$search_option_shop_type.'"'),
  647. 'list11' => array('查看采购单', '"buy_order&project=shop&search_option_type=1&&search_option_parent_type=2&search_option_parent_order_id={id}&oper_table=sell_order&search_option_shop_type='.$search_option_shop_type.'"', '{status} >= 3 && {audit} == 2 && {shop_type} == 2'),
  648. //'location2' => array('分配仓库', Dever::url('lib/set.store', 'shop')),
  649. //'edit' => array('分配仓库', 'store_id', '{status} == 2 && {shop_type} == 2'),
  650. //'fast1' => array('发货', '"sell_order_ps&where_id={id}&search_option_order_id={id}&oper_save_jump=sell_order&oper_table=sell_order&oper_parent=sell_order"', '{status} == 2 && {shop_type} == 2'),
  651. //'fast' => array('审核', '"sell_order&where_id={id}&col=audit,audit_desc&oper_save_jump=sell_order&oper_table=sell_order&oper_parent=sell_order"', '{status} == 2 && {shop_type} == 2'),
  652. 'list1' => array('审核', '"sell_order_goods&project=shop&order_id={id}&audit=1&page_type=&search_option_shop_type='.$search_option_shop_type.'"', '{status} == 2 && {shop_type} == 2'),
  653. 'oper' => array('确认收货', '"shop/lib/manage.setSellOrderStatus?shop_id={shop_id}&order_id={id}"', '{status} == 4 && {shop_type} == 2'),
  654. //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin,tk_status', '{status} == 6'),
  655. //'delete' => array('删除', '', '{status} == 1'),
  656. ),
  657. ),
  658. 'request' => array
  659. (
  660. 'getList' => array
  661. (
  662. # 匹配的正则或函数 选填项
  663. 'option' => array
  664. (
  665. 'shop_id' => 'yes',
  666. 'uid' => 'yes',
  667. 'status' => 'yes',
  668. 'state' => 1,
  669. ),
  670. 'type' => 'all',
  671. 'order' => array('cdate' => 'desc'),
  672. 'page' => array(5, 'list'),
  673. 'col' => '*',
  674. ),
  675. 'getAll' => array
  676. (
  677. # 匹配的正则或函数 选填项
  678. 'option' => array
  679. (
  680. 'uid' => 'yes',
  681. 'name' => array('yes', 'like'),
  682. 'shop_id' => 'yes',
  683. 'mobile' => 'yes',
  684. 'method' => 'yes',
  685. 'pay_method' => 'yes',
  686. 'start' => array('yes-cdate', '>='),
  687. 'end' => array('yes-cdate', '<='),
  688. 'status' => array('yes', 'in'),
  689. 'state' => 1,
  690. ),
  691. 'type' => 'all',
  692. 'order' => array('cdate' => 'desc'),
  693. 'page' => array(10, 'list'),
  694. 'col' => '*',
  695. ),
  696. 'getYes' => array
  697. (
  698. # 匹配的正则或函数 选填项
  699. 'option' => array
  700. (
  701. 'shop_id' => 'yes',
  702. 'state' => 1,
  703. ),
  704. 'type' => 'all',
  705. 'order' => array('cdate' => 'desc'),
  706. 'col' => '*',
  707. ),
  708. # 获取提交订单超过12个小时
  709. 'getDataByTime' => array
  710. (
  711. # 匹配的正则或函数 选填项
  712. 'option' => array
  713. (
  714. 'id' => 'yes',
  715. 'cdate' => array('yes', '<='),
  716. 'status' => array('yes', 'in'),
  717. 'withdraw' => 'yes',
  718. 'notice' => 'yes',
  719. 'state' => 1,
  720. ),
  721. 'type' => 'all',
  722. 'order' => array('cdate' => 'desc'),
  723. 'col' => '*',
  724. ),
  725. # 获取1,2
  726. 'getBuy' => array
  727. (
  728. # 匹配的正则或函数 选填项
  729. 'option' => array
  730. (
  731. 'status' => 'yes',
  732. 'shop_id' => 'yes',
  733. 'order_num' => 'yes',
  734. 'uid' => 'yes',
  735. 'state' => 1,
  736. ),
  737. 'type' => 'all',
  738. 'order' => array('id' => 'desc'),
  739. 'col' => '*',
  740. ),
  741. 'getMyAll' => array
  742. (
  743. # 匹配的正则或函数 选填项
  744. 'option' => array
  745. (
  746. 'uid' => 'yes',
  747. 'status' => 'yes',
  748. 'cate_id' => 'yes',
  749. 'state' => 1,
  750. ),
  751. 'type' => 'all',
  752. 'order' => array('id' => 'desc'),
  753. 'page' => array(10, 'list'),
  754. 'col' => 'id,order_num,name,buy_num,cdate,cash,shop_id,buy_id',
  755. ),
  756. # 删除未支付订单
  757. 'drop' => array
  758. (
  759. # 匹配的正则或函数 选填项
  760. 'where' => array
  761. (
  762. 'time' => array('yes-cdate', '<='),
  763. 'status' => 1,
  764. 'state' => 1,
  765. ),
  766. 'type' => 'delete',
  767. 'col' => 'id,order_num',
  768. ),
  769. # 获取数据
  770. 'getAllByDate' => array
  771. (
  772. # 匹配的正则或函数 选填项
  773. 'where' => array
  774. (
  775. 'start' => array('yes-cdate', '>='),
  776. 'end' => array('yes-cdate', '<='),
  777. 'status' => array('yes', 'in'),
  778. 'state' => 1,
  779. ),
  780. 'type' => 'all',
  781. 'col' => 'id,order_num,mobile,shop_id,cdate,price-refund_cash as total,num-refund_num as num',
  782. ),
  783. # 获取订单数量
  784. 'getOrderNum' => array
  785. (
  786. # 匹配的正则或函数 选填项
  787. 'option' => array
  788. (
  789. 'start' => array('yes-cdate', '>='),
  790. 'end' => array('yes-cdate', '<='),
  791. 'shop_id' => 'yes',
  792. 'status' => array('yes', 'in'),
  793. 'state' => 1,
  794. ),
  795. 'type' => 'count',
  796. 'col' => '*',
  797. ),
  798. # 获取总金额
  799. 'getCashNum' => array
  800. (
  801. # 匹配的正则或函数 选填项
  802. 'option' => array
  803. (
  804. 'start' => array('yes-cdate', '>='),
  805. 'end' => array('yes-cdate', '<='),
  806. 'shop_id' => 'yes',
  807. 'status' => array('yes', 'in'),
  808. 'state' => 1,
  809. ),
  810. 'type' => 'one',
  811. 'col' => 'sum(price-refund_cash) as total',
  812. ),
  813. # 获取商品数量
  814. 'getGoodsNum' => array
  815. (
  816. # 匹配的正则或函数 选填项
  817. 'option' => array
  818. (
  819. 'start' => array('yes-cdate', '>='),
  820. 'end' => array('yes-cdate', '<='),
  821. 'shop_id' => 'yes',
  822. 'status' => array('yes', 'in'),
  823. 'state' => 1,
  824. ),
  825. 'type' => 'one',
  826. 'col' => 'sum(num-refund_num) as total',
  827. ),
  828. # 获取订单数量
  829. 'getUser' => array
  830. (
  831. # 匹配的正则或函数 选填项
  832. 'option' => array
  833. (
  834. 'start' => array('yes-cdate', '>='),
  835. 'end' => array('yes-cdate', '<='),
  836. 'shop_id' => 'yes',
  837. 'status' => array('yes', 'in'),
  838. 'state' => 1,
  839. ),
  840. 'type' => 'all',
  841. 'group' => 'mobile',
  842. 'col' => 'count(mobile) as total',
  843. ),
  844. 'getUserNum' => array
  845. (
  846. # 匹配的正则或函数 选填项
  847. 'option' => array
  848. (
  849. 'start' => array('yes-cdate', '>='),
  850. 'end' => array('yes-cdate', '<='),
  851. 'shop_id' => 'yes',
  852. 'status' => array('yes', 'in'),
  853. 'state' => 1,
  854. ),
  855. 'type' => 'count',
  856. 'col' => '*',
  857. ),
  858. 'getSumCdate' => array
  859. (
  860. # 匹配的正则或函数 选填项
  861. 'where' => array
  862. (
  863. 'start' => array('yes-cdate', '>='),
  864. 'end' => array('yes-cdate', '<='),
  865. 'card_code_id' => 'yes',
  866. // 'status' => array('yes', 'in'),
  867. 'state' => 1,
  868. ),
  869. 'type' => 'one',
  870. 'col' => 'sum(card_code_cash) as total',
  871. ),
  872. 'getCardAll' => array
  873. (
  874. # 匹配的正则或函数 选填项
  875. 'where' => array
  876. (
  877. 'start' => array('yes-cdate', '>='),
  878. 'end' => array('yes-cdate', '<='),
  879. 'card_code_id' => 'yes',
  880. // 'status' => array('yes', 'in'),
  881. 'state' => 1,
  882. ),
  883. 'type' => 'one',
  884. 'col' => 'sum(card_code_cash) as total',
  885. ),
  886. 'getCardAlls' => array
  887. (
  888. # 匹配的正则或函数 选填项
  889. 'option' => array
  890. (
  891. 'start' => array('yes-cdate', '>='),
  892. 'end' => array('yes-cdate', '<='),
  893. 'card_code_id' => 'yes',
  894. // 'status' => array('yes', 'in'),
  895. 'state' => 1,
  896. ),
  897. 'type' => 'one',
  898. 'col' => 'sum(card_code_cash) as total',
  899. ),
  900. ),
  901. );