order.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <?php
  2. $status = array
  3. (
  4. 1 => '待支付',
  5. 2 => '待发货',
  6. 3 => '待收货',
  7. 4 => '已完成',
  8. 5 => '已取消',
  9. );
  10. return array
  11. (
  12. # 表名
  13. 'name' => 'order',
  14. # 显示给用户看的名称
  15. 'lang' => '礼品卡订单',
  16. 'status' => $status,
  17. # 后台菜单排序
  18. 'order' => 100,
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => 'ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. 'search' => 'order',
  30. 'list' => true,
  31. 'order' => 'desc',
  32. ),
  33. 'uid' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '购买人名称',
  37. 'default' => '0',
  38. 'desc' => '请选择用户',
  39. 'match' => 'is_numeric',
  40. 'update' => 'text',
  41. //'search' => 'select',
  42. 'search' => array
  43. (
  44. 'api' => 'passport/user-one',
  45. 'col' => 'username',
  46. 'result' => 'id',
  47. ),
  48. 'list' => 'Dever::load("card/lib/manage.user", {id})',
  49. ),
  50. 'mobile' => array
  51. (
  52. 'type' => 'varchar-300',
  53. 'name' => '下单手机号',
  54. 'default' => '',
  55. 'desc' => '手机号',
  56. 'match' => 'option',
  57. 'search' => 'fulltext',
  58. ),
  59. 'shop_id' => array
  60. (
  61. 'type' => 'int-11',
  62. 'name' => '兑换门店',
  63. 'default' => '',
  64. 'desc' => '兑换门店',
  65. 'match' => 'is_numeric',
  66. ),
  67. 'address_id' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '送货地址',
  71. 'default' => '',
  72. 'desc' => '送货地址',
  73. 'match' => 'is_numeric',
  74. //'list' => 'Dever::load("passport/address-find#address", {address_id})';
  75. ),
  76. 'order_num' => array
  77. (
  78. 'type' => 'varchar-100',
  79. 'name' => '订单号',
  80. 'default' => '',
  81. 'desc' => '订单号',
  82. 'match' => 'is_string',
  83. 'update' => 'text',
  84. 'search' => 'fulltext',
  85. 'list' => true,
  86. ),
  87. 'oprice' => array
  88. (
  89. 'type' => 'varchar-50',
  90. 'name' => '原价',
  91. 'default' => '0',
  92. 'desc' => '原价',
  93. 'match' => 'option',
  94. 'update' => 'text',
  95. //'list' => true,
  96. ),
  97. 'price' => array
  98. (
  99. 'type' => 'varchar-50',
  100. 'name' => '支付金额',
  101. 'default' => '0',
  102. 'desc' => '支付金额',
  103. 'match' => 'option',
  104. 'update' => 'text',
  105. 'list' => true,
  106. ),
  107. 'num' => array
  108. (
  109. 'type' => 'int-11',
  110. 'name' => '购买数量',
  111. 'default' => '',
  112. 'desc' => '购买数量',
  113. 'match' => 'is_numeric',
  114. 'search' => 'select',
  115. //'list' => true,
  116. ),
  117. 'status' => array
  118. (
  119. 'type' => 'int-11',
  120. 'name' => '状态',
  121. 'default' => '1',
  122. 'desc' => '状态',
  123. 'match' => 'is_numeric',
  124. 'option' => $status,
  125. 'search' => 'select',
  126. 'update' => 'select',
  127. 'list' => true,
  128. 'mul' => array(4 => '批量完成'),
  129. ),
  130. 'fdate' => array
  131. (
  132. 'type' => 'int-11',
  133. 'name' => '完成时间',
  134. 'default' => '',
  135. 'match' => 'is_numeric',
  136. 'desc' => '',
  137. ),
  138. 'operdate' => array
  139. (
  140. 'type' => 'int-11',
  141. 'name' => '操作时间',
  142. 'default' => '',
  143. 'match' => 'is_numeric',
  144. 'desc' => '',
  145. ),
  146. 'state' => array
  147. (
  148. 'type' => 'tinyint-1',
  149. 'name' => '状态',
  150. 'default' => '1',
  151. 'desc' => '请选择状态',
  152. 'match' => 'is_numeric',
  153. ),
  154. 'cdate' => array
  155. (
  156. 'type' => 'int-11',
  157. 'name' => '生成时间',
  158. 'match' => array('is_numeric', time()),
  159. 'desc' => '',
  160. # 只有insert时才生效
  161. 'insert' => true,
  162. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  163. ),
  164. ),
  165. 'manage' => array
  166. (
  167. //'excel' => true,
  168. 'delete' => false,
  169. 'edit' => false,
  170. 'insert' => false,
  171. //'mul' => '{status} == 3',
  172. 'list_button' => array
  173. (
  174. 'list' => array('查看详情', '"order_card&project=card&order_id={id}&page_type=1"'),
  175. 'new' => array('手动查单', 'https://www.kuaidi100.com/?from=openv'),
  176. 'fast1' => array('发货', '"order_ps&where_id={id}&search_option_order_id={id}&oper_save_jump=order&oper_table=order&oper_parent=order"', '{status} == 2'),
  177. 'oper1' => array('确认收货', '"card/lib/manage.send?order_id={id}"', '{status} == 3'),
  178. //'oper' => array('作废', 'goods/lib/manage.drop?id={id}', '{type} == 1'),
  179. //'oper2' => array('恢复使用', 'goods/lib/manage.recovery?id={id}', '{type} == 4'),
  180. ),
  181. ),
  182. 'request' => array
  183. (
  184. 'getAll' => array
  185. (
  186. # 匹配的正则或函数 选填项
  187. 'option' => array
  188. (
  189. 'uid' => 'yes',
  190. 'name' => array('yes', 'like'),
  191. 'order_num' => array('yes', 'like'),
  192. 'start' => array('yes-cdate', '>='),
  193. 'end' => array('yes-cdate', '<='),
  194. 'status' => array('yes', 'in'),
  195. 'state' => 1,
  196. ),
  197. 'type' => 'all',
  198. 'order' => array('cdate' => 'desc'),
  199. 'page' => array(20, 'list'),
  200. 'col' => '*',
  201. ),
  202. 'getData' => array
  203. (
  204. # 匹配的正则或函数 选填项
  205. 'option' => array
  206. (
  207. 'uid' => 'yes',
  208. 'name' => array('yes', 'like'),
  209. 'order_num' => array('yes', 'like'),
  210. 'start' => array('yes-cdate', '>='),
  211. 'end' => array('yes-cdate', '<='),
  212. 'status' => array('yes', 'in'),
  213. 'state' => 1,
  214. ),
  215. 'type' => 'all',
  216. 'order' => array('cdate' => 'desc'),
  217. 'col' => '*',
  218. ),
  219. ),
  220. );