sell_order.php 31 KB

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