push.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. $uid = Dever::input('uid');
  3. $config = function() {
  4. $config = Dever::input('config', 1);
  5. return Dever::db('account/config')->getData(array('ids' => $config));
  6. };
  7. $type = function() use($config) {
  8. $config = $config();
  9. return Dever::db('account/config_type')->getData(array('project_id' => '-1,' . $config[0]['project_id']));
  10. };
  11. return array
  12. (
  13. # 表名
  14. 'name' => 'push',
  15. # 显示给用户看的名称
  16. 'lang' => '发放资金',
  17. 'order' => 99,
  18. 'menu' => false,
  19. 'end' => array
  20. (
  21. 'insert' => 'account/lib/manage.push',
  22. ),
  23. # 数据结构
  24. 'struct' => array
  25. (
  26. 'id' => array
  27. (
  28. 'type' => 'int-11',
  29. 'name' => 'ID',
  30. 'default' => '',
  31. 'desc' => '',
  32. 'match' => 'is_numeric',
  33. 'search' => 'order',
  34. //'list' => true,
  35. ),
  36. 'uid' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => '用户ID',
  40. 'default' => '0',
  41. 'desc' => '用户名称',
  42. 'match' => 'is_numeric',
  43. 'update' => 'hidden',
  44. 'value' => $uid,
  45. ),
  46. 'config_id' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '选择账户',
  50. 'default' => '1',
  51. 'desc' => '选择账户',
  52. 'match' => 'is_numeric',
  53. 'update' => 'radio',
  54. 'option' => $config,
  55. ),
  56. 'type_id' => array
  57. (
  58. 'type' => 'int-11',
  59. 'name' => '交易类型',
  60. 'default' => '1',
  61. 'desc' => '交易类型',
  62. 'match' => 'is_numeric',
  63. 'update' => 'radio',
  64. 'option' => $type,
  65. ),
  66. 'cash' => array
  67. (
  68. 'type' => 'decimal-11,2',
  69. 'name' => '发放金额-金额单位为元',
  70. 'default' => '',
  71. 'desc' => '发放金额',
  72. 'match' => 'is_numeric',
  73. 'update' => 'text',
  74. ),
  75. 'desc' => array
  76. (
  77. 'type' => 'varchar-600',
  78. 'name' => '资金说明',
  79. 'default' => '',
  80. 'desc' => '资金说明',
  81. 'match' => 'option',
  82. 'update' => 'textarea',
  83. ),
  84. 'state' => array
  85. (
  86. 'type' => 'tinyint-1',
  87. 'name' => '状态',
  88. 'default' => '1',
  89. 'desc' => '请选择状态',
  90. 'match' => 'is_numeric',
  91. ),
  92. 'cdate' => array
  93. (
  94. 'type' => 'int-11',
  95. 'name' => '交易时间',
  96. 'match' => array('is_numeric', time()),
  97. 'desc' => '',
  98. # 只有insert时才生效
  99. //'insert' => true,
  100. 'search' => 'date',
  101. 'list' => 'date("Y-m-d H:i", {cdate})',
  102. 'list_order' => 2,
  103. ),
  104. ),
  105. 'manage' => array
  106. (
  107. 'insert' => false,
  108. 'delete' => false,
  109. 'edit' => false,
  110. 'list_button' => array
  111. (
  112. ),
  113. ),
  114. 'request' => array
  115. (
  116. ),
  117. );