info_log.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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. $type = function()
  13. {
  14. $array = array();
  15. $data = Dever::load('account/config_type-state');
  16. if($data)
  17. {
  18. $array += $data;
  19. }
  20. return $array;
  21. };
  22. $config = function()
  23. {
  24. $array = array();
  25. $data = Dever::load('account/config-state');
  26. if($data)
  27. {
  28. $array += $data;
  29. }
  30. return $array;
  31. };
  32. $user = '用户ID';
  33. $search = 'fulltext';
  34. $config_id = Dever::input('search_option_config_id');
  35. if ($config_id) {
  36. $search_config = Dever::load('account/lib/info')->getSearch($config_id);
  37. if ($search_config) {
  38. $search = $search_config;
  39. $user = '用户名称';
  40. }
  41. }
  42. $method = array
  43. (
  44. 1 => '自动',
  45. 2 => '手动',
  46. );
  47. return array
  48. (
  49. # 表名
  50. 'name' => 'info_log',
  51. # 显示给用户看的名称
  52. 'lang' => '用户资金流水',
  53. 'menu' => false,
  54. 'order' => 99,
  55. # 数据结构
  56. 'struct' => array
  57. (
  58. 'id' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => 'ID',
  62. 'default' => '',
  63. 'desc' => '',
  64. 'match' => 'is_numeric',
  65. 'search' => 'order',
  66. //'list' => true,
  67. ),
  68. 'info_id' => array
  69. (
  70. 'type' => 'int-11',
  71. 'name' => '账户id',
  72. 'default' => '',
  73. 'desc' => '账户id',
  74. 'match' => 'is_numeric',
  75. ),
  76. 'uid' => array
  77. (
  78. 'type' => 'int-11',
  79. 'name' => $user,
  80. 'default' => '0',
  81. 'desc' => '用户名称',
  82. 'match' => 'is_numeric',
  83. 'search' => $search,
  84. 'list_name' => '用户名称',
  85. 'list' => 'Dever::load("account/lib/info.getName", {uid}, {config_id})',
  86. ),
  87. 'config_id' => array
  88. (
  89. 'type' => 'int-11',
  90. 'name' => '账户名称',
  91. 'default' => '1',
  92. 'desc' => '账户名称',
  93. 'match' => 'is_numeric',
  94. 'update' => 'select',
  95. 'option' => $config,
  96. 'search' => 'select',
  97. 'list' => true,
  98. ),
  99. 'project_id' => array
  100. (
  101. 'type' => 'int-11',
  102. 'name' => '所属项目',
  103. 'default' => '1',
  104. 'desc' => '所属项目',
  105. 'match' => 'is_numeric',
  106. 'update' => 'radio',
  107. 'option' => $project,
  108. 'list' => true,
  109. ),
  110. 'type_id' => array
  111. (
  112. 'type' => 'int-11',
  113. 'name' => '交易类型',
  114. 'default' => '1',
  115. 'desc' => '交易类型',
  116. 'match' => 'is_numeric',
  117. 'update' => 'radio',
  118. 'option' => $type,
  119. 'list' => true,
  120. ),
  121. 'source' => array
  122. (
  123. 'type' => 'varchar-150',
  124. 'name' => '来源表名',
  125. 'default' => '',
  126. 'desc' => '来源表名',
  127. 'match' => 'is_numeric',
  128. ),
  129. 'source_id' => array
  130. (
  131. 'type' => 'int-11',
  132. 'name' => '来源表id',
  133. 'default' => '',
  134. 'desc' => '来源表id',
  135. 'match' => 'is_string',
  136. 'update' => 'text',
  137. ),
  138. 'cash' => array
  139. (
  140. 'type' => 'decimal-11,2',
  141. 'name' => '金额',
  142. 'default' => '0',
  143. 'desc' => '金额',
  144. 'match' => 'is_numeric',
  145. 'update' => 'text',
  146. 'list_name' => '金额',
  147. 'list' => true,
  148. ),
  149. 'yue' => array
  150. (
  151. 'type' => 'decimal-11,2',
  152. 'name' => '操作后余额',
  153. 'default' => '0',
  154. 'desc' => '操作后余额',
  155. 'match' => 'is_numeric',
  156. 'update' => 'text',
  157. 'list' => true,
  158. ),
  159. 'desc' => array
  160. (
  161. 'type' => 'varchar-600',
  162. 'name' => '资金说明',
  163. 'default' => '',
  164. 'desc' => '资金说明',
  165. 'match' => 'is_string',
  166. 'update' => 'text',
  167. 'list' => true,
  168. ),
  169. 'admin_id' => array
  170. (
  171. 'type' => 'int-11',
  172. 'name' => '操作人',
  173. 'default' => '',
  174. 'desc' => '操作人',
  175. 'match' => 'is_string',
  176. 'update' => 'text',
  177. 'list' => '"{admin_id}" > 0 ? Dever::load("manage/admin-find#username", {admin_id}) : "-"',
  178. ),
  179. 'method' => array
  180. (
  181. 'type' => 'tinyint-1',
  182. 'name' => '方式',
  183. 'default' => '1',
  184. 'desc' => '方式',
  185. 'match' => 'is_numeric',
  186. 'update' => 'radio',
  187. 'option' => $method,
  188. ),
  189. 'state' => array
  190. (
  191. 'type' => 'tinyint-1',
  192. 'name' => '状态',
  193. 'default' => '1',
  194. 'desc' => '请选择状态',
  195. 'match' => 'is_numeric',
  196. ),
  197. 'cdate' => array
  198. (
  199. 'type' => 'int-11',
  200. 'name' => '交易时间',
  201. 'match' => array('is_numeric', time()),
  202. 'desc' => '',
  203. # 只有insert时才生效
  204. 'insert' => true,
  205. 'search' => 'date',
  206. 'list_name' => '交易时间',
  207. 'list' => 'date("Y-m-d H:i", {cdate})',
  208. ),
  209. ),
  210. 'manage' => array
  211. (
  212. 'insert' => false,
  213. 'delete' => false,
  214. 'edit' => false,
  215. ),
  216. 'request' => array
  217. (
  218. ),
  219. );