order.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <?php
  2. $excel = false;
  3. $excel[] = array('数据导出','数据导出','active/lib/excel.out_active_order');
  4. $list_button = array();
  5. if (Dever::load('manage/auth')->checkFunc('active.order', 'editRefund', '退款')) {
  6. $list_button['fast'] = array('退款', '"info_refund&project=active&search_option_order_id={id}"');
  7. // $list_button['oper'] = array('退款', '"active/lib/manage.refund?id={id}"', '{status} == 2');
  8. }
  9. $list_button['list'] = array('查看详情','"info_code&project=active&id={id}&page_type=1&[refer]"');
  10. $pay_type = array
  11. (
  12. 1 => '在线支付',
  13. );
  14. $status = array
  15. (
  16. 1 => '待支付',
  17. 2 => '已支付',
  18. 3 => '已关闭',#超时未支付
  19. 4 => '已完成',
  20. 5 => '已完成(有退款)',
  21. 6 => '已退款',#(全部退款)
  22. );
  23. $active = function()
  24. {
  25. $array = array();
  26. $info = Dever::load('active/info-state');
  27. if($info)
  28. {
  29. $array += $info;
  30. }
  31. return $array;
  32. };
  33. return array
  34. (
  35. # 表名
  36. 'name' => 'order',
  37. # 显示给用户看的名称
  38. 'lang' => '活动订单',
  39. 'order' => 100,
  40. 'config_status' => $status,
  41. 'config_pay_type' => $pay_type,
  42. # 数据结构
  43. 'struct' => array
  44. (
  45. 'id' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => 'ID',
  49. 'default' => '',
  50. 'desc' => '',
  51. 'match' => 'is_numeric',
  52. 'search' => 'order',
  53. // 'list' => true,
  54. ),
  55. 'order_num' => array
  56. (
  57. 'type' => 'varchar-100',
  58. 'name' => '订单单号',
  59. 'default' => '',
  60. 'desc' => '订单单号',
  61. 'match' => 'is_string',
  62. 'update' => 'text',
  63. 'search' => 'fulltext',
  64. 'list' => true,
  65. ),
  66. 'mid' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '代理商姓名/手机号',
  70. 'default' => '-1',
  71. 'desc' => '代理商',
  72. 'match' => 'is_string',
  73. 'update' => 'text',
  74. 'search' => array
  75. (
  76. 'api' => 'agent/member-getSearch',
  77. 'col' => 'col',
  78. 'result' => 'id',
  79. 'search' => 'mid',
  80. ),
  81. 'list_name' => '代理商信息',
  82. 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  83. ),
  84. 'uid' => array
  85. (
  86. 'type' => 'int-11',
  87. 'name' => '用户名称',
  88. 'default' => '-1',
  89. 'desc' => '用户名称',
  90. 'match' => 'is_string',
  91. // 'option' => $user,
  92. // 'update' => 'text',
  93. // 'search' => 'text',
  94. // 'list' => true,
  95. ),
  96. 'active_id' => array
  97. (
  98. 'type' => 'int-11',
  99. 'name' => '活动名称',
  100. 'default' => '-1',
  101. 'desc' => '活动名称',
  102. 'match' => 'is_string',
  103. 'option' => $active,
  104. 'update' => 'text',
  105. // 'search' => 'text',
  106. 'list' => true,
  107. ),
  108. 'num' => array
  109. (
  110. 'type' => 'varchar-100',
  111. 'name' => '数量',
  112. 'default' => '',
  113. 'desc' => '数量',
  114. 'match' => 'option',
  115. 'list' => true,
  116. ),
  117. 'price' => array
  118. (
  119. 'type' => 'varchar-50',
  120. 'name' => '金额',
  121. 'default' => '0',
  122. 'desc' => '金额',
  123. 'match' => 'option',
  124. 'update' => 'text',
  125. 'list' => true,
  126. ),
  127. 'status' => array
  128. (
  129. 'type' => 'tinyint-1',
  130. 'name' => '支付状态',
  131. 'default' => '1',
  132. 'desc' => '支付状态',
  133. 'match' => 'is_numeric',
  134. 'option' => $status,
  135. 'search' => 'select',
  136. 'list' => true,
  137. ),
  138. 'pay_type' => array
  139. (
  140. 'type' => 'tinyint-1',
  141. 'name' => '支付类型',
  142. 'default' => '1',
  143. 'desc' => '支付类型',
  144. 'match' => 'is_numeric',
  145. 'option' => $pay_type,
  146. 'search' => 'select',
  147. 'list' => true,
  148. ),
  149. 'path' => array
  150. (
  151. 'type' => 'varchar-300',
  152. 'name' => '自定义字段',
  153. 'default' => '',
  154. 'desc' => '自定义字段',
  155. 'match' => 'option',
  156. // 'update' => 'textarea',
  157. ),
  158. 'remark' => array
  159. (
  160. 'type' => 'varchar-300',
  161. 'name' => '订单备注',
  162. 'default' => '',
  163. 'desc' => '订单备注',
  164. 'match' => 'option',
  165. 'update' => 'textarea',
  166. ),
  167. 'url' => array
  168. (
  169. 'type' => 'varchar-3000',
  170. 'name' => '支付链接',
  171. 'default' => '',
  172. 'desc' => '支付链接',
  173. 'match' => 'is_string',
  174. // 'update' => 'fulltext',
  175. //'search' => 'fulltext',
  176. //'list' => true,
  177. ),
  178. 'refund_admin' => array
  179. (
  180. 'type' => 'int-11',
  181. 'name' => '退款操作人',
  182. 'default' => '',
  183. 'desc' => '',
  184. 'match' => 'is_numeric',
  185. // 'search' => 'order',
  186. 'list_name' => '退款操作人<br>退款时间',
  187. 'list' => 'Dever::load("active/lib/manage.show",{id})',
  188. ),
  189. 'rdate' => array
  190. (
  191. 'type' => 'int-11',
  192. 'name' => '退款时间',
  193. 'default' => '',
  194. 'match' => 'is_numeric',
  195. 'search' => 'date',
  196. // 'desc' => '',
  197. // 'list' => 'date("Y-m-d H:i:s", {zdate})',
  198. ),
  199. 'state' => array
  200. (
  201. 'type' => 'tinyint-1',
  202. 'name' => '状态',
  203. 'default' => '1',
  204. 'desc' => '请选择状态',
  205. 'match' => 'is_numeric',
  206. ),
  207. 'cdate' => array
  208. (
  209. 'type' => 'int-11',
  210. 'name' => '下单时间',
  211. 'match' => array('is_numeric', time()),
  212. 'desc' => '',
  213. # 只有insert时才生效
  214. 'insert' => true,
  215. //'search' => 'date',
  216. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  217. //'list' => 'Dever::load("service/lib/manage.showOrderTime", "{id}")',
  218. ),
  219. ),
  220. 'manage' => array
  221. (
  222. 'delete' => false,
  223. 'edit' => false,
  224. 'insert' => false,
  225. 'excel' => $excel,
  226. 'list_button' => $list_button,
  227. ),
  228. 'request' => array
  229. (
  230. // # 获取数量
  231. 'getNum' => array
  232. (
  233. # 匹配的正则或函数 选填项
  234. 'option' => array
  235. (
  236. 'mid' => 'yes',
  237. 'uid' => 'yes',
  238. 'active_id' => 'yes',
  239. 'status' =>2,
  240. 'state' => 1,
  241. ),
  242. 'type' => 'one',
  243. 'col' => 'sum(num) as total',
  244. ),
  245. 'getAll' => array
  246. (
  247. # 匹配的正则或函数 选填项
  248. 'option' => array
  249. (
  250. 'mid' => 'yes',
  251. 'uid' => 'yes',
  252. 'status' => array('yes','!='),
  253. 'state' => 1,
  254. ),
  255. 'type' => 'all',
  256. 'order' => array('cdate'=>'desc'),
  257. 'page' => array(20,'list'),
  258. 'col' => '*',
  259. ),
  260. ),
  261. );