pay.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <?php
  2. $config = function()
  3. {
  4. $array = array();
  5. $info = Dever::db('account/config')->state();
  6. if($info)
  7. {
  8. $array += $info;
  9. }
  10. return $array;
  11. };
  12. $project = function()
  13. {
  14. $array = array();
  15. $data = Dever::load('account/config_project-state');
  16. if($data)
  17. {
  18. $array += $data;
  19. }
  20. return $array;
  21. };
  22. $status = Dever::config('base', 'pay')->pay['status'];
  23. return array
  24. (
  25. # 表名
  26. 'name' => 'pay',
  27. # 显示给用户看的名称
  28. 'lang' => '充值订单',
  29. 'order' => 30,
  30. 'menu' => false,
  31. # 数据结构
  32. 'struct' => array
  33. (
  34. 'id' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => 'ID',
  38. 'default' => '',
  39. 'desc' => '',
  40. 'match' => 'is_numeric',
  41. 'search' => 'order',
  42. //'list' => true,
  43. ),
  44. 'order_num' => array
  45. (
  46. 'type' => 'varchar-100',
  47. 'name' => '订单号',
  48. 'default' => '',
  49. 'desc' => '订单号',
  50. 'match' => 'is_string',
  51. 'search' => 'fulltext',
  52. 'list' => true,
  53. ),
  54. 'config_id' => array
  55. (
  56. 'type' => 'int-11',
  57. 'name' => '账户名称',
  58. 'default' => '1',
  59. 'desc' => '账户名称',
  60. 'match' => 'is_numeric',
  61. 'update' => 'select',
  62. 'option' => $config,
  63. //'search' => 'select',
  64. 'list' => true,
  65. ),
  66. 'info_id' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '账户id',
  70. 'default' => '',
  71. 'desc' => '账户id',
  72. 'match' => 'is_numeric',
  73. ),
  74. 'card_id' => array
  75. (
  76. 'type' => 'int-11',
  77. 'name' => '充值卡',
  78. 'default' => '',
  79. 'desc' => '充值卡',
  80. 'match' => 'is_numeric',
  81. 'list' => '"{card_id}" ? Dever::load("account/config_card-find#name", {card_id}) : "-"',
  82. ),
  83. 'uid' => array
  84. (
  85. 'type' => 'int-11',
  86. 'name' => '购买人-输入用户手机号或者用户名',
  87. 'default' => '',
  88. 'desc' => '购买人',
  89. 'match' => 'is_numeric',
  90. 'search' => array
  91. (
  92. 'api' => 'user/info-like',
  93. 'col' => 'search',
  94. 'result' => 'id',
  95. ),
  96. 'update' => 'select',
  97. 'update_search' => 'user/lib/info.manage_search',
  98. 'list' => '"{uid}" ? Dever::load("user/lib/info.get#aname", {uid}) : "暂无"',
  99. ),
  100. 'name' => array
  101. (
  102. 'type' => 'varchar-800',
  103. 'name' => '充值信息',
  104. 'default' => '',
  105. 'desc' => '充值信息',
  106. 'match' => 'is_string',
  107. 'update' => 'text',
  108. 'search' => 'fulltext',
  109. 'list' => true,
  110. ),
  111. 'cash' => array
  112. (
  113. 'type' => 'decimal-11,2',
  114. 'name' => '充值金额',
  115. 'default' => '',
  116. 'desc' => '充值金额',
  117. 'match' => 'option',
  118. //'update' => 'text',
  119. 'list' => true,
  120. ),
  121. 'price' => array
  122. (
  123. 'type' => 'decimal-11,2',
  124. 'name' => '实付金额',
  125. 'default' => '',
  126. 'desc' => '实付金额',
  127. 'match' => 'option',
  128. //'update' => 'text',
  129. 'list' => true,
  130. ),
  131. 'yue' => array
  132. (
  133. 'type' => 'decimal-11,2',
  134. 'name' => '充值后余额',
  135. 'default' => '',
  136. 'desc' => '充值后余额',
  137. 'match' => 'option',
  138. //'update' => 'text',
  139. 'list' => true,
  140. ),
  141. 'status' => array
  142. (
  143. 'type' => 'tinyint-1',
  144. 'name' => '订单状态',
  145. 'default' => '1',
  146. 'desc' => '订单状态',
  147. 'match' => 'is_numeric',
  148. 'option' => $status,
  149. 'search' => 'select',
  150. 'list' => true,
  151. ),
  152. 'state' => array
  153. (
  154. 'type' => 'tinyint-1',
  155. 'name' => '状态',
  156. 'default' => '1',
  157. 'desc' => '请选择状态',
  158. 'match' => 'is_numeric',
  159. ),
  160. 'cdate' => array
  161. (
  162. 'type' => 'int-11',
  163. 'name' => '下单时间',
  164. 'match' => array('is_numeric', time()),
  165. 'desc' => '',
  166. # 只有insert时才生效
  167. 'insert' => true,
  168. 'search' => 'sdate',
  169. 'list' => 'date("Y-m-d H:i", {cdate})',
  170. ),
  171. ),
  172. 'manage' => array
  173. (
  174. 'delete' => false,
  175. 'edit' => false,
  176. 'insert' => false,
  177. ),
  178. 'request' => array
  179. (
  180. ),
  181. );