sell.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <?php
  2. $pay_account = function()
  3. {
  4. $array = array
  5. (
  6. -1 => '其他',
  7. );
  8. $info = Dever::db('pay/account')->select();
  9. if($info)
  10. {
  11. $array += $info;
  12. }
  13. return $array;
  14. };
  15. $status = array
  16. (
  17. 1 => '待支付',
  18. 2 => '待处理',
  19. 3 => '处理中',
  20. 4 => '待收货确认',
  21. 5 => '已完成',
  22. 6 => '已完成(有退款)',
  23. 7 => '已取消',
  24. 8 => '已退款',
  25. 11 => '已过期',
  26. );
  27. return array
  28. (
  29. # 表名
  30. 'name' => 'sell',
  31. # 显示给用户看的名称
  32. 'lang' => '销售订单',
  33. 'order' => 100,
  34. 'set' => array
  35. (
  36. 'status' => $status,
  37. ),
  38. 'ends' => array
  39. (
  40. 'insert' => 'shop/lib/manage.sellOrderUpdate',
  41. 'update' => 'shop/lib/manage.sellOrderUpdate',
  42. 'updatemul' => 'shop/lib/manage.setSellOrderStatusMul_commit',
  43. ),
  44. # 数据结构
  45. 'struct' => array
  46. (
  47. 'id' => array
  48. (
  49. 'type' => 'int-11',
  50. 'name' => 'ID',
  51. 'default' => '',
  52. 'desc' => '',
  53. 'match' => 'is_numeric',
  54. 'search' => 'order',
  55. //'list' => true,
  56. ),
  57. 'order_num' => array
  58. (
  59. 'type' => 'varchar-100',
  60. 'name' => '订单号',
  61. 'default' => '',
  62. 'desc' => '订单号',
  63. 'match' => 'is_string',
  64. 'update' => 'text',
  65. 'search' => 'fulltext',
  66. 'list_name' => '订单信息',
  67. 'list' => 'Dever::load("scm_order/lib/sell.info#order", {id})',
  68. ),
  69. 'seller_id' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '销售商',
  73. 'default' => '',
  74. 'desc' => '销售商',
  75. 'match' => 'is_numeric',
  76. 'update' => 'hidden',
  77. 'search' => array
  78. (
  79. 'api' => 'scm_role/seller-like',
  80. 'col' => 'name',
  81. 'result' => 'id',
  82. ),
  83. 'value' => Dever::input('search_option_seller_id'),
  84. ),
  85. 'uid' => array
  86. (
  87. 'type' => 'int-11',
  88. 'name' => '购买人',
  89. 'default' => '0',
  90. 'desc' => '购买人',
  91. 'match' => 'is_numeric',
  92. 'update' => 'text',
  93. 'search' => array
  94. (
  95. 'api' => 'passport/user-like',
  96. 'col' => 'username',
  97. 'result' => 'id',
  98. ),
  99. ),
  100. 'info' => array
  101. (
  102. 'type' => 'varchar-300',
  103. 'name' => '订单备注',
  104. 'default' => '',
  105. 'desc' => '订单备注',
  106. 'match' => 'option',
  107. 'update' => 'textarea',
  108. ),
  109. 'status' => array
  110. (
  111. 'type' => 'tinyint-1',
  112. 'name' => '订单状态',
  113. 'default' => '1',
  114. 'desc' => '订单状态',
  115. 'match' => 'is_numeric',
  116. 'option' => $status,
  117. 'search' => 'select',
  118. //'search_after' => '<br />',
  119. //'mul' => true,
  120. //'mul_option' => array(2 => '批量审核', 5 => '确认收货'),
  121. ),
  122. 'pay_date' => array
  123. (
  124. 'type' => 'int-11',
  125. 'name' => '付款时间',
  126. 'default' => '',
  127. 'match' => 'is_numeric',
  128. 'desc' => '',
  129. 'list' => '"{paydate}" > 0 ? date("Y-m-d H:i", {paydate}) : "-"',
  130. ),
  131. 'finish_date' => array
  132. (
  133. 'type' => 'int-11',
  134. 'name' => '完成时间',
  135. 'default' => '',
  136. 'match' => 'is_numeric',
  137. 'desc' => '',
  138. 'search' => 'date',
  139. 'list' => '"{finish_date}" ? date("Y-m-d H:i", {finish_date}) : "-"',
  140. ),
  141. 'oper_date' => array
  142. (
  143. 'type' => 'int-11',
  144. 'name' => '审核时间',
  145. 'default' => '',
  146. 'match' => 'is_numeric',
  147. 'desc' => '',
  148. //'list' => '"{operdate}" > 0 ? date("Y-m-d H:i:s", {operdate}) : "-"',
  149. //'list_name' => '发货时间',
  150. //'list_order' => 8,
  151. ),
  152. 'fa_date' => array
  153. (
  154. 'type' => 'int-11',
  155. 'name' => '发货时间',
  156. 'default' => '',
  157. 'match' => 'is_numeric',
  158. 'desc' => '',
  159. 'search' => 'date',
  160. 'list' => '"{fa_date}" > 0 ? date("Y-m-d H:i:s", {fa_date}) : "-"',
  161. ),
  162. 'state' => array
  163. (
  164. 'type' => 'tinyint-1',
  165. 'name' => '状态',
  166. 'default' => '1',
  167. 'desc' => '请选择状态',
  168. 'match' => 'is_numeric',
  169. ),
  170. 'cdate' => array
  171. (
  172. 'type' => 'int-11',
  173. 'name' => '下单时间',
  174. 'match' => array('is_numeric', time()),
  175. 'desc' => '',
  176. # 只有insert时才生效
  177. 'insert' => true,
  178. 'search' => 'sdate',
  179. 'list' => 'date("Y-m-d H:i", {cdate})',
  180. ),
  181. ),
  182. 'manage' => array
  183. (
  184. 'delete' => false,
  185. 'edit' => false,
  186. 'insert' => false,
  187. //'excel' => $excel,
  188. //'mul' => $mul,
  189. 'button' => array
  190. (
  191. //'导出订单明细' => array('excel', 'shop/excel.sell_order'),
  192. ),
  193. 'list_button' => array
  194. (
  195. //fast_list
  196. /*
  197. 'list' => array('查看详情', '"sell_order_goods&project=shop&order_id={id}&page_type=&search_option_shop_type='.$search_option_shop_type.'"'),
  198. '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'),
  199. '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'),
  200. 'oper' => array('确认收货', '"shop/lib/manage.setSellOrderStatus?shop_id={shop_id}&order_id={id}"', '{status} == 4 && {shop_type} == 2'),
  201. */
  202. ),
  203. ),
  204. 'request' => array
  205. (
  206. 'getList' => array
  207. (
  208. # 匹配的正则或函数 选填项
  209. 'option' => array
  210. (
  211. 'shop_id' => 'yes',
  212. 'uid' => 'yes',
  213. 'status' => 'yes',
  214. 'state' => 1,
  215. ),
  216. 'type' => 'all',
  217. 'order' => array('cdate' => 'desc'),
  218. 'page' => array(5, 'list'),
  219. 'col' => '*',
  220. ),
  221. 'getAll' => array
  222. (
  223. # 匹配的正则或函数 选填项
  224. 'option' => array
  225. (
  226. 'uid' => 'yes',
  227. 'name' => array('yes', 'like'),
  228. 'shop_id' => 'yes',
  229. 'method' => 'yes',
  230. 'pay_method' => 'yes',
  231. 'start' => array('yes-cdate', '>='),
  232. 'end' => array('yes-cdate', '<='),
  233. 'status' => array('yes', 'in'),
  234. 'state' => 1,
  235. ),
  236. 'type' => 'all',
  237. 'order' => array('cdate' => 'desc'),
  238. 'page' => array(10, 'list'),
  239. 'col' => '*',
  240. ),
  241. ),
  242. );