order.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <?php
  2. $type = array
  3. (
  4. 1 => '购买',
  5. 2 => '兑换',
  6. );
  7. $status = array
  8. (
  9. 1 => '待支付',
  10. 2 => '已支付',
  11. 3 => '支付失败',
  12. );
  13. $fastatus = array
  14. (
  15. 1 => '未发货',
  16. 2 => '已发货',
  17. 3 => '已收货',
  18. );
  19. $product = function()
  20. {
  21. return Dever::db('product/info')->state();
  22. };
  23. return array
  24. (
  25. # 表名
  26. 'name' => 'order',
  27. # 显示给用户看的名称
  28. 'lang' => '订单管理',
  29. 'order' => 100,
  30. /*
  31. 'end' => array
  32. (
  33. 'update' => 'service/lib/manage.order',
  34. ),
  35. */
  36. # 数据结构
  37. 'struct' => array
  38. (
  39. 'id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => 'ID',
  43. 'default' => '',
  44. 'desc' => '',
  45. 'match' => 'is_numeric',
  46. 'search' => 'order',
  47. //'list' => true,
  48. ),
  49. 'order_id' => array
  50. (
  51. 'type' => 'varchar-100',
  52. 'name' => '订单id',
  53. 'default' => '',
  54. 'desc' => '付款订单id',
  55. 'match' => 'is_string',
  56. 'update' => 'text',
  57. 'list' => true,
  58. 'list' => '"{order_id}" ? "{order_id}" : "{code}"',
  59. ),
  60. 'name' => array
  61. (
  62. 'type' => 'varchar-80',
  63. 'name' => '订单名称',
  64. 'default' => '',
  65. 'desc' => '订单名称',
  66. 'match' => 'is_string',
  67. 'update' => 'text',
  68. 'search' => 'fulltext',
  69. 'list_name' => '订单信息',
  70. 'list' => 'Dever::load("product/lib/manage.showOrderUser", "{id}")',
  71. ),
  72. 'uid' => array
  73. (
  74. 'type' => 'int-11',
  75. 'name' => '用户信息',
  76. 'default' => '',
  77. 'desc' => '用户信息',
  78. 'match' => 'is_numeric',
  79. 'update' => 'text',
  80. ),
  81. 'invite_uid' => array
  82. (
  83. 'type' => 'int-11',
  84. 'name' => '邀请人',
  85. 'default' => '',
  86. 'desc' => '邀请人',
  87. 'match' => 'is_numeric',
  88. 'update' => 'text',
  89. ),
  90. 'product_id' => array
  91. (
  92. 'type' => 'varchar-800',
  93. 'name' => '产品名',
  94. 'default' => '',
  95. 'desc' => '产品名',
  96. 'match' => 'is_string',
  97. 'update' => 'select',
  98. 'option' => $product,
  99. //'search' => 'select',
  100. 'list' => true,
  101. ),
  102. 'type' => array
  103. (
  104. 'type' => 'int-11',
  105. 'name' => '支付方式',
  106. 'default' => '1',
  107. 'desc' => '支付方式',
  108. 'match' => 'is_numeric',
  109. 'option' => $type,
  110. 'search' => 'select',
  111. 'update' => 'checkbox',
  112. //'list' => true,
  113. ),
  114. 'notice' => array
  115. (
  116. 'type' => 'int-11',
  117. 'name' => '模板消息提醒次数',
  118. 'default' => '0',
  119. 'desc' => '模板消息提醒次数',
  120. 'match' => 'is_numeric',
  121. ),
  122. 'num' => array
  123. (
  124. 'type' => 'varchar-50',
  125. 'name' => '数量',
  126. 'default' => '1',
  127. 'desc' => '数量',
  128. 'match' => 'is_string',
  129. 'update' => 'text',
  130. //'list' => true,
  131. ),
  132. 'cash' => array
  133. (
  134. 'type' => 'varchar-50',
  135. 'name' => '支付金额',
  136. 'default' => '',
  137. 'desc' => '支付金额',
  138. 'match' => 'is_string',
  139. 'update' => 'text',
  140. //'list' => true,
  141. ),
  142. 'code' => array
  143. (
  144. 'type' => 'varchar-50',
  145. 'name' => '使用的兑换码',
  146. 'default' => '',
  147. 'desc' => '使用的兑换码',
  148. 'match' => 'is_string',
  149. 'update' => 'text',
  150. //'list' => true,
  151. ),
  152. 'status' => array
  153. (
  154. 'type' => 'tinyint-1',
  155. 'name' => '订单状态',
  156. 'default' => '1',
  157. 'desc' => '请选择订单状态',
  158. 'match' => 'is_numeric',
  159. 'option' => $status,
  160. 'search' => 'select',
  161. 'update' => 'radio',
  162. 'list' => true,
  163. ),
  164. 'address_name' => array
  165. (
  166. 'type' => 'varchar-80',
  167. 'name' => '收货姓名',
  168. 'default' => '',
  169. 'desc' => '请输入收货姓名',
  170. 'match' => 'is_string',
  171. 'update' => 'text',
  172. //'search' => 'fulltext',
  173. //'list' => true,
  174. ),
  175. 'address_mobile' => array
  176. (
  177. 'type' => 'varchar-80',
  178. 'name' => '联系电话',
  179. 'default' => '',
  180. 'desc' => '请输入联系电话',
  181. 'match' => 'is_string',
  182. 'update' => 'text',
  183. //'search' => 'fulltext',
  184. //'list' => true,
  185. ),
  186. 'address_address' => array
  187. (
  188. 'type' => 'varchar-800',
  189. 'name' => '收货地址',
  190. 'default' => '',
  191. 'desc' => '请输入收货地址',
  192. 'match' => 'is_string',
  193. 'update' => 'text',
  194. //'search' => 'fulltext',
  195. //'list' => true,
  196. ),
  197. 'fastatus' => array
  198. (
  199. 'type' => 'tinyint-1',
  200. 'name' => '发货状态',
  201. 'default' => '1',
  202. 'desc' => '发货状态',
  203. 'match' => 'is_numeric',
  204. 'option' => $fastatus,
  205. 'search' => 'select',
  206. 'update' => 'radio',
  207. 'list' => true,
  208. //'edit' => true,
  209. ),
  210. 'fa_desc' => array
  211. (
  212. 'type' => 'varchar-300',
  213. 'name' => '发货快递号',
  214. 'default' => '',
  215. 'desc' => '发货快递号',
  216. 'match' => 'option',
  217. 'update' => 'textarea',
  218. ),
  219. 'state' => array
  220. (
  221. 'type' => 'tinyint-1',
  222. 'name' => '状态',
  223. 'default' => '1',
  224. 'desc' => '请选择状态',
  225. 'match' => 'is_numeric',
  226. ),
  227. 'cdate' => array
  228. (
  229. 'type' => 'int-11',
  230. 'name' => '申请时间',
  231. 'match' => array('is_numeric', time()),
  232. 'desc' => '',
  233. # 只有insert时才生效
  234. 'insert' => true,
  235. 'search' => 'date',
  236. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  237. ),
  238. ),
  239. 'manage' => array
  240. (
  241. 'delete' => false,
  242. 'edit' => false,
  243. 'insert' => false,
  244. 'list_button' => array
  245. (
  246. 'edit' => array('发货', 'fastatus,order_id,fa_desc', '{status} > 1'),
  247. )
  248. ),
  249. 'request' => array
  250. (
  251. 'getAll' => array
  252. (
  253. # 匹配的正则或函数 选填项
  254. 'option' => array
  255. (
  256. 'uid' => 'yes',
  257. 'state' => 1,
  258. ),
  259. 'type' => 'all',
  260. 'order' => array('cdate' => 'desc'),
  261. 'page' => array(10, 'list'),
  262. 'col' => '*',
  263. ),
  264. 'getYes' => array
  265. (
  266. # 匹配的正则或函数 选填项
  267. 'option' => array
  268. (
  269. 'product_id' => 'yes',
  270. 'feedback_status' => array('yes', '>='),
  271. 'state' => 1,
  272. ),
  273. 'type' => 'all',
  274. 'order' => array('cdate' => 'desc'),
  275. 'col' => '*',
  276. ),
  277. # 获取提交订单超过12个小时并且没有提交问卷的
  278. 'getDataByTime' => array
  279. (
  280. # 匹配的正则或函数 选填项
  281. 'option' => array
  282. (
  283. 'cdate' => array('yes', '>='),
  284. 'feedback_status' => array(2, '<='),
  285. 'notice' => array(1, '<'),
  286. 'state' => 1,
  287. ),
  288. 'type' => 'all',
  289. 'order' => array('cdate' => 'desc'),
  290. 'col' => '*',
  291. ),
  292. ),
  293. );