config.php 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <?php
  2. $project = function()
  3. {
  4. $array = array();
  5. $data = Dever::load('account/config_project-state');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. $money = function()
  13. {
  14. $array = array();
  15. $data = Dever::load('account/money-state');
  16. if($data)
  17. {
  18. $array += $data;
  19. }
  20. return $array;
  21. };
  22. $is_withdraw = array
  23. (
  24. 1 => '可以提现',
  25. 2 => '不可以提现',
  26. );
  27. $type = array
  28. (
  29. 1 => '主账户',
  30. 2 => '普通账户',
  31. );
  32. return array
  33. (
  34. # 表名
  35. 'name' => 'config',
  36. # 显示给用户看的名称
  37. 'lang' => '账户名称设置',
  38. # 是否显示在后台菜单
  39. 'check' => 'key',
  40. 'order' => 1,
  41. 'end' => array
  42. (
  43. 'insert' => 'account/lib/manage.config',
  44. 'update' => 'account/lib/manage.config',
  45. ),
  46. # 数据结构
  47. 'struct' => array
  48. (
  49. 'id' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => 'ID',
  53. 'default' => '',
  54. 'desc' => '',
  55. 'match' => 'is_numeric',
  56. //'list' => true,
  57. ),
  58. 'name' => array
  59. (
  60. 'type' => 'varchar-32',
  61. 'name' => '账户名称',
  62. 'default' => '',
  63. 'desc' => '请输入账户名称',
  64. 'match' => 'is_string',
  65. 'update' => 'text',
  66. 'search' => 'fulltext',
  67. 'list' => true,
  68. ),
  69. 'key' => array
  70. (
  71. 'type' => 'varchar-50',
  72. 'name' => '账户唯一标识',
  73. 'default' => '',
  74. 'desc' => '账户唯一标识',
  75. 'match' => 'is_string',
  76. 'update' => 'text',
  77. 'search' => 'fulltext',
  78. 'list' => true,
  79. ),
  80. 'type' => array
  81. (
  82. 'type' => 'int-11',
  83. 'name' => '是否主账户-只能有一个主账户,主主账户将作为用户主要账户显示在用户信息中',
  84. 'default' => '2',
  85. 'desc' => '是否主账户',
  86. 'match' => 'is_numeric',
  87. 'update' => 'radio',
  88. 'option' => $type,
  89. 'search' => 'select',
  90. 'list' => true,
  91. ),
  92. 'info' => array
  93. (
  94. 'type' => 'varchar-800',
  95. 'name' => '账户名称介绍',
  96. 'default' => '',
  97. 'desc' => '账户名称介绍',
  98. 'match' => 'option',
  99. 'update' => 'textarea',
  100. ),
  101. 'project_id' => array
  102. (
  103. 'type' => 'int-11',
  104. 'name' => '所属项目',
  105. 'default' => '1',
  106. 'desc' => '所属项目',
  107. 'match' => 'is_numeric',
  108. 'update' => 'radio',
  109. 'option' => $project,
  110. 'list' => true,
  111. ),
  112. 'money_id' => array
  113. (
  114. 'type' => 'int-11',
  115. 'name' => '关联法定货币',
  116. 'default' => '1',
  117. 'desc' => '关联法定货币',
  118. 'match' => 'is_numeric',
  119. 'update' => 'radio',
  120. 'option' => $money,
  121. 'list' => true,
  122. ),
  123. 'balance_alert' => array
  124. (
  125. 'type' => 'varchar-11',
  126. 'name' => '消耗下限-输入100,就是当余额小于等于100时,无法继续消耗,以元为单位,一般为限制授信账户',
  127. 'default' => '0',
  128. 'desc' => '消耗下限',
  129. 'match' => 'option',
  130. 'update' => 'text',
  131. ),
  132. 'is_withdraw' => array
  133. (
  134. 'type' => 'tinyint-1',
  135. 'name' => '是否可提现',
  136. 'default' => '1',
  137. 'desc' => '是否可提现',
  138. 'match' => 'is_numeric',
  139. 'update' => 'radio',
  140. 'option' => $is_withdraw,
  141. 'control' => 'is_withdraw',
  142. 'tab' => 1,
  143. ),
  144. 'withdraw_up' => array
  145. (
  146. 'type' => 'varchar-11',
  147. 'name' => '提现上限-每次提现的上限,0不限制,以元为单位',
  148. 'default' => '0',
  149. 'desc' => '提现上限',
  150. 'match' => 'option',
  151. 'update' => 'text',
  152. 'show' => 'is_withdraw=1',
  153. 'tab' => 1,
  154. ),
  155. 'withdraw_down' => array
  156. (
  157. 'type' => 'varchar-11',
  158. 'name' => '提现下限-每次提现的下限,0不限制,输入100,就是余额至少有100才能提现,以元为单位',
  159. 'default' => '0',
  160. 'desc' => '提现下限',
  161. 'match' => 'option',
  162. 'update' => 'text',
  163. 'show' => 'is_withdraw=1',
  164. 'tab' => 1,
  165. ),
  166. 'withdraw_fee' => array
  167. (
  168. 'type' => 'varchar-11',
  169. 'name' => '提现手续费-输入10%就是百分之10%',
  170. 'default' => '10%',
  171. 'desc' => '提现手续费',
  172. 'match' => 'option',
  173. 'update' => 'text',
  174. 'show' => 'is_withdraw=1',
  175. 'tab' => 1,
  176. ),
  177. 'withdraw_audit' => array
  178. (
  179. 'type' => 'tinyint-1',
  180. 'name' => '提现审核',
  181. 'default' => '1',
  182. 'desc' => '提现审核',
  183. 'match' => 'is_numeric',
  184. 'update' => 'radio',
  185. 'option' => array(1 => '需要审核', 2 => '不需要审核'),
  186. 'show' => 'is_withdraw=1',
  187. 'tab' => 1,
  188. ),
  189. 'withdraw_grant' => array
  190. (
  191. 'type' => 'tinyint-1',
  192. 'name' => '发放审核',
  193. 'default' => '1',
  194. 'desc' => '发放审核',
  195. 'match' => 'is_numeric',
  196. 'update' => 'radio',
  197. 'option' => array(1 => '需要审核', 2 => '不需要审核'),
  198. 'show' => 'is_withdraw=1',
  199. 'tab' => 1,
  200. ),
  201. 'withdraw_check' => array
  202. (
  203. 'type' => 'varchar-1500',
  204. 'name' => '提现验证接口-提现时,可以自定义验证接口,仅支持dever::load方法',
  205. 'default' => '',
  206. 'desc' => '提现验证接口',
  207. 'match' => 'option',
  208. 'update' => 'textarea',
  209. 'show' => 'is_withdraw=1',
  210. 'tab' => 1,
  211. ),
  212. 'reorder' => array
  213. (
  214. 'type' => 'int-11',
  215. 'name' => '优先级-扣款时,优先级数字大优先使用',
  216. 'default' => '1',
  217. 'desc' => '优先级',
  218. 'match' => 'option',
  219. 'update' => 'text',
  220. 'search' => 'order',
  221. 'list' => true,
  222. 'order' => 'desc',
  223. 'edit' => true,
  224. ),
  225. 'state' => array
  226. (
  227. 'type' => 'tinyint-1',
  228. 'name' => '状态',
  229. 'default' => '1',
  230. 'desc' => '请选择状态',
  231. 'match' => 'is_numeric',
  232. ),
  233. 'cdate' => array
  234. (
  235. 'type' => 'int-11',
  236. 'name' => '录入时间',
  237. 'match' => array('is_numeric', time()),
  238. 'desc' => '',
  239. # 只有insert时才生效
  240. 'insert' => true,
  241. //'search' => 'date',
  242. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  243. ),
  244. ),
  245. 'manage' => array
  246. (
  247. 'tab' => array('基本配置', '提现配置'),
  248. 'button' => array
  249. (
  250. '项目配置' => array('list', 'config_project&parent=config'),
  251. '交易类型配置' => array('list', 'config_type&parent=config'),
  252. ),
  253. 'list_button' => array
  254. (
  255. 'list' => array('账户列表', '"info&search_option_config_id={id}&parent=config"'),
  256. 'list1' => array('充值卡列表', '"config_card&search_option_config_id={id}&parent=config"'),
  257. )
  258. ),
  259. /*
  260. 'default' => array
  261. (
  262. 'col' => 'name,project_id,state,cdate',
  263. 'value' => array
  264. (
  265. '"默认账户", 1, 1,' . DEVER_TIME,
  266. ),
  267. ),
  268. */
  269. 'request' => array
  270. (
  271. 'getData' => array
  272. (
  273. 'type' => 'all',
  274. 'option' => array
  275. (
  276. 'ids' => array('yes-id', 'in'),
  277. 'state' => 1,
  278. ),
  279. 'col' => '*',
  280. ),
  281. )
  282. );