sell_order.php 31 KB

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