buy.php 8.3 KB

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