order.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <?php
  2. $type = Dever::config('base', 'pay')->pay['type'];
  3. $account = function()
  4. {
  5. return Dever::db('pay/account')->state();
  6. };
  7. $project = function()
  8. {
  9. return Dever::db('pay/project')->state();
  10. };
  11. $status = Dever::config('base', 'pay')->pay['status'];
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'order',
  16. # 显示给用户看的名称
  17. 'lang' => '订单管理',
  18. 'order' => 1,
  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. ),
  32. 'uid' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '用户',
  36. 'default' => '1',
  37. 'desc' => '用户',
  38. 'match' => 'is_numeric',
  39. 'update' => 'text',
  40. ),
  41. 'username' => array
  42. (
  43. 'type' => 'varchar-200',
  44. 'name' => '用户名称',
  45. 'default' => '',
  46. 'desc' => '用户名称',
  47. 'match' => 'is_string',
  48. 'update' => 'text',
  49. 'search' => 'fulltext',
  50. 'list' => true,
  51. ),
  52. 'name' => array
  53. (
  54. 'type' => 'varchar-200',
  55. 'name' => '订单名称',
  56. 'default' => '',
  57. 'desc' => '订单名称',
  58. 'match' => 'is_string',
  59. 'update' => 'text',
  60. 'search' => 'fulltext',
  61. 'list' => true,
  62. ),
  63. 'order_id' => array
  64. (
  65. 'type' => 'varchar-600',
  66. 'name' => '订单号',
  67. 'default' => '',
  68. 'desc' => '订单号',
  69. 'match' => 'is_numeric',
  70. 'update' => 'text',
  71. 'search' => 'fulltext',
  72. 'list' => true,
  73. ),
  74. 'type' => array
  75. (
  76. 'type' => 'varchar-30',
  77. 'name' => '支付类型',
  78. 'default' => 'wechat',
  79. 'desc' => '支付类型',
  80. 'match' => 'is_string',
  81. 'update' => 'radio',
  82. 'option' => $type,
  83. 'search' => 'select',
  84. 'list' => true,
  85. 'control' => 'type',
  86. ),
  87. 'product_id' => array
  88. (
  89. 'type' => 'varchar-800',
  90. 'name' => '产品id-可能为多个',
  91. 'default' => '',
  92. 'desc' => '产品id',
  93. 'match' => 'is_string',
  94. 'update' => 'text',
  95. ),
  96. 'account_id' => array
  97. (
  98. 'type' => 'int-11',
  99. 'name' => '支付账户',
  100. 'default' => '1',
  101. 'desc' => '支付账户',
  102. 'match' => 'is_numeric',
  103. 'update' => 'select',
  104. 'option' => $account,
  105. 'search' => 'select',
  106. 'list' => true,
  107. ),
  108. 'project_id' => array
  109. (
  110. 'type' => 'int-11',
  111. 'name' => '所属项目',
  112. 'default' => '0',
  113. 'desc' => '所属项目',
  114. 'match' => 'is_numeric',
  115. 'update' => 'select',
  116. 'option' => $project,
  117. 'search' => 'select',
  118. 'list' => true,
  119. ),
  120. 'cash' => array
  121. (
  122. 'type' => 'varchar-11',
  123. 'name' => '金额',
  124. 'default' => '',
  125. 'desc' => '金额',
  126. 'match' => 'is_string',
  127. 'update' => 'text',
  128. 'list' => true,
  129. ),
  130. 'refund_cash' => array
  131. (
  132. 'type' => 'varchar-11',
  133. 'name' => '退款金额',
  134. 'default' => '',
  135. 'desc' => '退款金额',
  136. 'match' => 'is_string',
  137. 'update' => 'text',
  138. 'list' => true,
  139. ),
  140. 'status' => array
  141. (
  142. 'type' => 'tinyint-1',
  143. 'name' => '支付状态',
  144. 'default' => '1',
  145. 'desc' => '支付状态',
  146. 'match' => 'is_numeric',
  147. 'update' => 'radio',
  148. 'option' => $status,
  149. 'search' => 'select',
  150. 'list' => 'Dever::load("pay/lib/manage.showOrderStatus", "{id}")',
  151. 'control' => 'status',
  152. ),
  153. 'status_desc' => array
  154. (
  155. 'type' => 'varchar-300',
  156. 'name' => '支付状态说明',
  157. 'default' => '',
  158. 'desc' => '请输入支付状态说明',
  159. 'match' => 'option',
  160. //'update' => 'textarea',
  161. 'show' => 'status=3',
  162. ),
  163. 'tk_pic' => array
  164. (
  165. 'type' => 'varchar-150',
  166. 'name' => '退款截图',
  167. 'default' => '',
  168. 'desc' => '退款截图',
  169. 'match' => 'is_string',
  170. 'update' => 'image',
  171. 'key' => 1
  172. ),
  173. 'tk_time' => array
  174. (
  175. 'type' => 'int-11',
  176. 'name' => '退款时间',
  177. 'default' => '',
  178. 'desc' => '退款时间',
  179. 'match' => 'option',
  180. //'list' => true,
  181. //'update' => 'date',
  182. 'callback' => 'maketime',
  183. 'show' => 'status=5',
  184. ),
  185. 'tk_admin' => array
  186. (
  187. 'type' => 'int-11',
  188. 'name' => '退款审核人',
  189. 'default' => '1',
  190. 'desc' => '退款审核人',
  191. 'match' => 'option',
  192. //'list' => true,
  193. 'show' => 'status=5',
  194. ),
  195. 'tk_desc' => array
  196. (
  197. 'type' => 'varchar-300',
  198. 'name' => '退款备注',
  199. 'default' => '',
  200. 'desc' => '退款备注',
  201. 'match' => 'option',
  202. 'update' => 'textarea',
  203. //'show' => 'status=5',
  204. ),
  205. 'param' => array
  206. (
  207. 'type' => 'text-255',
  208. 'name' => '支付信息-用于二次支付',
  209. 'default' => '',
  210. 'desc' => '支付信息',
  211. 'match' => 'option',
  212. ),
  213. 'state' => array
  214. (
  215. 'type' => 'tinyint-1',
  216. 'name' => '状态',
  217. 'default' => '1',
  218. 'desc' => '请选择状态',
  219. 'match' => 'is_numeric',
  220. ),
  221. 'pay_time' => array
  222. (
  223. 'type' => 'int-11',
  224. 'name' => '付款时间',
  225. 'default' => '',
  226. 'desc' => '付款时间',
  227. 'match' => 'option',
  228. //'list' => true,
  229. //'update' => 'date',
  230. 'callback' => 'maketime',
  231. ),
  232. 'cdate' => array
  233. (
  234. 'type' => 'int-11',
  235. 'name' => '申请时间',
  236. 'match' => array('is_numeric', time()),
  237. 'desc' => '',
  238. # 只有insert时才生效
  239. 'insert' => true,
  240. 'search' => 'date',
  241. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  242. ),
  243. ),
  244. 'manage' => array
  245. (
  246. 'insert' => false,
  247. 'edit' => false,
  248. 'delete' => false,
  249. 'excel' => true,
  250. /*
  251. 'list_button' => array(
  252. 'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin', '{status} > 1'),
  253. ),
  254. */
  255. ),
  256. );