order.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <?php
  2. $pay_status = Dever::config('base', 'pay')->pay['status'];
  3. $status = array
  4. (
  5. 1 => '待支付',
  6. 2 => '待审核',
  7. 3 => '待发货',
  8. 4 => '待收货确认',
  9. 5 => '已完成',
  10. 6 => '已完成(有退款)',
  11. 7 => '已取消',
  12. );
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'order',
  17. # 显示给用户看的名称
  18. 'lang' => '订货单',
  19. 'order' => 99,
  20. 'menu' => false,
  21. # 数据结构
  22. 'struct' => array
  23. (
  24. 'id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => 'ID',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_numeric',
  31. 'search' => 'order',
  32. //'list' => true,
  33. ),
  34. 'factory_id' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => '所属工厂',
  38. 'default' => '',
  39. 'desc' => '所属工厂',
  40. 'match' => 'is_numeric',
  41. 'update' => 'hidden',
  42. 'value' => Dever::input('search_option_factory_id'),
  43. 'list' => 'Dever::load("factory/info-find#name", {factory_id})',
  44. ),
  45. 'store_id' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '所属仓库',
  49. 'default' => '-1',
  50. 'desc' => '所属仓库',
  51. 'match' => 'is_numeric',
  52. 'list' => 'Dever::load("store/info-find#name", {store_id})',
  53. ),
  54. 'store_order_id' => array
  55. (
  56. 'type' => 'int-11',
  57. 'name' => '仓库订单id',
  58. 'default' => '',
  59. 'desc' => '仓库订单id',
  60. 'match' => 'is_numeric',
  61. ),
  62. 'shop_id' => array
  63. (
  64. 'type' => 'int-11',
  65. 'name' => '所属门店',
  66. 'default' => '',
  67. 'desc' => '所属门店',
  68. 'match' => 'is_numeric',
  69. 'list' => 'Dever::load("shop/info-find#name", {shop_id})',
  70. ),
  71. 'shop_order_id' => array
  72. (
  73. 'type' => 'int-11',
  74. 'name' => '门店订单id',
  75. 'default' => '',
  76. 'desc' => '门店订单id',
  77. 'match' => 'is_numeric',
  78. ),
  79. 'name' => array
  80. (
  81. 'type' => 'varchar-80',
  82. 'name' => '订单名称',
  83. 'default' => '',
  84. 'desc' => '订单名称',
  85. 'match' => 'is_string',
  86. 'update' => 'text',
  87. ),
  88. 'order_num' => array
  89. (
  90. 'type' => 'varchar-100',
  91. 'name' => '订单编号',
  92. 'default' => '',
  93. 'desc' => '订单编号',
  94. 'match' => 'is_string',
  95. 'update' => 'text',
  96. 'search' => 'fulltext',
  97. 'list' => true,
  98. ),
  99. 'price' => array
  100. (
  101. 'type' => 'varchar-50',
  102. 'name' => '购买价格',
  103. 'default' => '',
  104. 'desc' => '购买价格',
  105. 'match' => 'option',
  106. 'update' => 'text',
  107. 'list' => true,
  108. ),
  109. 'num' => array
  110. (
  111. 'type' => 'int-11',
  112. 'name' => '购买数量',
  113. 'default' => '',
  114. 'desc' => '购买数量',
  115. 'match' => 'is_numeric',
  116. 'search' => 'select',
  117. 'list' => true,
  118. ),
  119. 'pay_id' => array
  120. (
  121. 'type' => 'varchar-100',
  122. 'name' => '支付订单ID',
  123. 'default' => '',
  124. 'desc' => '付款订单id',
  125. 'match' => 'is_string',
  126. //'update' => 'text',
  127. //'search' => 'fulltext',
  128. //'list' => true,
  129. ),
  130. 'pay_status' => array
  131. (
  132. 'type' => 'tinyint-1',
  133. 'name' => '支付状态',
  134. 'default' => '1',
  135. 'desc' => '请选择支付状态',
  136. 'match' => 'is_numeric',
  137. 'option' => $pay_status,
  138. ),
  139. 'pay_price' => array
  140. (
  141. 'type' => 'varchar-50',
  142. 'name' => '付款金额',
  143. 'default' => '',
  144. 'desc' => '付款金额',
  145. 'match' => 'option',
  146. 'update' => 'text',
  147. ),
  148. 'info' => array
  149. (
  150. 'type' => 'varchar-300',
  151. 'name' => '订单备注',
  152. 'default' => '',
  153. 'desc' => '订单备注',
  154. 'match' => 'option',
  155. 'update' => 'textarea',
  156. ),
  157. 'note' => array
  158. (
  159. 'type' => 'tinyint-1',
  160. 'name' => '是否发送状态提醒-1未发送,2已发送',
  161. 'default' => '1',
  162. 'desc' => '请选择状态',
  163. 'match' => 'is_numeric',
  164. ),
  165. 'notice' => array
  166. (
  167. 'type' => 'int-11',
  168. 'name' => '模板消息提醒次数',
  169. 'default' => '0',
  170. 'desc' => '模板消息提醒次数',
  171. 'match' => 'is_numeric',
  172. ),
  173. 'tk_pic' => array
  174. (
  175. 'type' => 'varchar-150',
  176. 'name' => '退款截图',
  177. 'default' => '',
  178. 'desc' => '退款截图',
  179. 'match' => 'is_string',
  180. 'update' => 'image',
  181. 'key' => 1
  182. ),
  183. 'tk_time' => array
  184. (
  185. 'type' => 'int-11',
  186. 'name' => '退款时间',
  187. 'default' => '',
  188. 'desc' => '退款时间',
  189. 'match' => 'option',
  190. //'list' => true,
  191. //'update' => 'date',
  192. 'callback' => 'maketime',
  193. 'show' => 'status=5',
  194. ),
  195. 'tk_admin' => array
  196. (
  197. 'type' => 'int-11',
  198. 'name' => '退款审核人',
  199. 'default' => '1',
  200. 'desc' => '退款审核人',
  201. 'match' => 'option',
  202. //'list' => true,
  203. 'show' => 'status=5',
  204. ),
  205. 'tk_desc' => array
  206. (
  207. 'type' => 'varchar-300',
  208. 'name' => '退款备注',
  209. 'default' => '',
  210. 'desc' => '退款备注',
  211. 'match' => 'option',
  212. 'update' => 'textarea',
  213. //'show' => 'status=5',
  214. ),
  215. 'state' => array
  216. (
  217. 'type' => 'tinyint-1',
  218. 'name' => '状态',
  219. 'default' => '1',
  220. 'desc' => '请选择状态',
  221. 'match' => 'is_numeric',
  222. ),
  223. 'cdate' => array
  224. (
  225. 'type' => 'int-11',
  226. 'name' => '下单时间',
  227. 'match' => array('is_numeric', time()),
  228. 'desc' => '',
  229. # 只有insert时才生效
  230. 'insert' => true,
  231. 'search' => 'date',
  232. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  233. //'list' => 'Dever::load("service/lib/manage.showOrderTime", "{id}")',
  234. ),
  235. ),
  236. 'manage' => array
  237. (
  238. 'delete' => false,
  239. 'edit' => false,
  240. 'insert' => false,
  241. 'button' => array
  242. (
  243. //'导出订单' => array('location', 'user/lib/manage.out'),
  244. ),
  245. 'list_button' => array(
  246. //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin', '{status} == 2'),
  247. //'delete' => array('删除', '', '{status} == 1'),
  248. ),
  249. ),
  250. 'request' => array
  251. (
  252. ),
  253. );