push.php 3.4 KB

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