info_log.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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 = 'hidden';
  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. 'value' => Dever::input('search_option_uid'),
  85. 'list_name' => '用户名称',
  86. 'list' => 'Dever::load("account/lib/info.getName", {uid}, {config_id})',
  87. 'list' => true,
  88. ),
  89. 'config_id' => array
  90. (
  91. 'type' => 'int-11',
  92. 'name' => '账户名称',
  93. 'default' => '1',
  94. 'desc' => '账户名称',
  95. 'match' => 'is_numeric',
  96. 'update' => 'select',
  97. 'option' => $config,
  98. 'search' => 'select',
  99. 'list' => true,
  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. 'type_id' => array
  113. (
  114. 'type' => 'int-11',
  115. 'name' => '交易类型',
  116. 'default' => '1',
  117. 'desc' => '交易类型',
  118. 'match' => 'is_numeric',
  119. 'update' => 'radio',
  120. 'option' => $type,
  121. 'list' => true,
  122. ),
  123. 'source' => array
  124. (
  125. 'type' => 'varchar-150',
  126. 'name' => '来源表名',
  127. 'default' => '',
  128. 'desc' => '来源表名',
  129. 'match' => 'is_numeric',
  130. ),
  131. 'source_id' => array
  132. (
  133. 'type' => 'int-11',
  134. 'name' => '来源表id',
  135. 'default' => '',
  136. 'desc' => '来源表id',
  137. 'match' => 'is_string',
  138. 'update' => 'text',
  139. ),
  140. 'cash' => array
  141. (
  142. 'type' => 'decimal-11,2',
  143. 'name' => '金额',
  144. 'default' => '0',
  145. 'desc' => '金额',
  146. 'match' => 'is_numeric',
  147. 'update' => 'text',
  148. 'list_name' => '金额',
  149. 'list' => true,
  150. ),
  151. 'yue' => array
  152. (
  153. 'type' => 'decimal-11,2',
  154. 'name' => '操作后余额',
  155. 'default' => '0',
  156. 'desc' => '操作后余额',
  157. 'match' => 'is_numeric',
  158. 'update' => 'text',
  159. 'list' => true,
  160. ),
  161. 'desc' => array
  162. (
  163. 'type' => 'varchar-600',
  164. 'name' => '资金说明',
  165. 'default' => '',
  166. 'desc' => '资金说明',
  167. 'match' => 'is_string',
  168. 'update' => 'text',
  169. 'list' => true,
  170. ),
  171. 'admin_id' => array
  172. (
  173. 'type' => 'int-11',
  174. 'name' => '操作人',
  175. 'default' => '',
  176. 'desc' => '操作人',
  177. 'match' => 'is_string',
  178. 'update' => 'text',
  179. 'list' => '"{admin_id}" > 0 ? Dever::load("manage/admin-find#username", {admin_id}) : "-"',
  180. ),
  181. 'method' => array
  182. (
  183. 'type' => 'tinyint-1',
  184. 'name' => '方式',
  185. 'default' => '1',
  186. 'desc' => '方式',
  187. 'match' => 'is_numeric',
  188. 'update' => 'radio',
  189. 'option' => $method,
  190. ),
  191. 'state' => array
  192. (
  193. 'type' => 'tinyint-1',
  194. 'name' => '状态',
  195. 'default' => '1',
  196. 'desc' => '请选择状态',
  197. 'match' => 'is_numeric',
  198. ),
  199. 'cdate' => array
  200. (
  201. 'type' => 'int-11',
  202. 'name' => '交易时间',
  203. 'match' => array('is_numeric', time()),
  204. 'desc' => '',
  205. # 只有insert时才生效
  206. 'insert' => true,
  207. 'search' => 'date',
  208. 'list_name' => '交易时间',
  209. 'list' => 'date("Y-m-d H:i", {cdate})',
  210. ),
  211. ),
  212. 'manage' => array
  213. (
  214. 'insert' => false,
  215. 'delete' => false,
  216. 'edit' => false,
  217. ),
  218. 'request' => array
  219. (
  220. ),
  221. );