sell_order.php 31 KB

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