cash.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <?php
  2. $type = array
  3. (
  4. 1 => '期权账户',
  5. 2 => '原始期权账户',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'cash',
  11. # 显示给用户看的名称
  12. 'lang' => '期权账户数据',
  13. 'order' => 100,
  14. 'menu' => false,
  15. 'config_type' => $type,
  16. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. 'search' => 'order',
  27. //'list' => true,
  28. ),
  29. 'type' => array
  30. (
  31. 'type' => 'tinyint-1',
  32. 'name' => '类型',
  33. 'default' => '1',
  34. 'desc' => '类型',
  35. 'match' => 'is_numeric',
  36. 'option' => $type,
  37. 'update' => 'radio',
  38. ),
  39. 'aid' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => '主账号手机号',
  43. 'default' => '-1',
  44. 'desc' => '期权登录账户',
  45. 'match' => 'is_string',
  46. 'update' => 'text',
  47. 'search' => array
  48. (
  49. 'api' => 'option/member-getMain',
  50. 'col' => 'mobile',
  51. 'result' => 'id',
  52. 'search' => 'aid',//本表的字段,默认为当前的字段
  53. ),
  54. 'list_name' => '主账户',
  55. 'list' => 'Dever::load("option/lib/account.getInfo", {aid})',
  56. 'list_order' => 3,
  57. ),
  58. 'daijiaofu_date' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => '最新的交付时间',
  62. 'match' => 'is_numeric',
  63. 'desc' => '最新的交付时间',
  64. ),
  65. 'daijiaofu' => array
  66. (
  67. 'type' => 'float-11,2',
  68. 'name' => '待交付额度',
  69. 'default' => '0.00',
  70. 'desc' => '待交付额度',
  71. 'match' => 'is_numeric',
  72. //'update' => 'text',
  73. 'list' => true,
  74. ),
  75. 'jiaofu' => array
  76. (
  77. 'type' => 'float-11,2',
  78. 'name' => '已交付额度',
  79. 'default' => '0.00',
  80. 'desc' => '交付额度',
  81. 'match' => 'is_numeric',
  82. //'update' => 'text',
  83. 'list' => true,
  84. ),
  85. 'fafang' => array
  86. (
  87. 'type' => 'float-11,2',
  88. 'name' => '发放额度',
  89. 'default' => '0.00',
  90. 'desc' => '发放额度',
  91. 'match' => 'is_numeric',
  92. //'update' => 'text',
  93. 'list' => true,
  94. ),
  95. 'duifu' => array
  96. (
  97. 'type' => 'float-11,2',
  98. 'name' => '兑付额度',
  99. 'default' => '0.00',
  100. 'desc' => '兑付额度',
  101. 'match' => 'is_numeric',
  102. //'update' => 'text',
  103. 'list' => true,
  104. ),
  105. 'state' => array
  106. (
  107. 'type' => 'tinyint-1',
  108. 'name' => '状态',
  109. 'default' => '1',
  110. 'desc' => '请选择状态',
  111. 'match' => 'is_numeric',
  112. ),
  113. 'cdate' => array
  114. (
  115. 'type' => 'int-11',
  116. 'name' => '创建时间',
  117. 'match' => array('is_numeric', time()),
  118. 'desc' => '',
  119. # 只有insert时才生效
  120. 'insert' => true,
  121. 'search' => 'date',
  122. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  123. 'list_order' => 2,
  124. ),
  125. ),
  126. 'manage' => array
  127. (
  128. 'insert' => false,
  129. 'delete' => false,
  130. 'edit' => false,
  131. 'page_list' => 'cash',
  132. ),
  133. 'request' => array
  134. (
  135. 'upCash_daijiaofu' => array
  136. (
  137. 'type' => 'update',
  138. 'where' => array
  139. (
  140. 'id' => 'yes',
  141. ),
  142. 'set' => array
  143. (
  144. 'cash' => array('yes-daijiaofu', '+='),
  145. 'daijiaofu_date' => 'yes',
  146. ),
  147. ),
  148. 'upCash_jiaofu' => array
  149. (
  150. 'type' => 'update',
  151. 'where' => array
  152. (
  153. 'id' => 'yes',
  154. ),
  155. 'set' => array
  156. (
  157. 'cash' => array('yes-jiaofu', '+='),
  158. ),
  159. ),
  160. 'upCash_fafang' => array
  161. (
  162. 'type' => 'update',
  163. 'where' => array
  164. (
  165. 'id' => 'yes',
  166. ),
  167. 'set' => array
  168. (
  169. 'cash' => array('yes-fafang', '+='),
  170. 'jiaofu' => array('yes', '-='),
  171. ),
  172. ),
  173. 'upCash_duifu' => array
  174. (
  175. 'type' => 'update',
  176. 'where' => array
  177. (
  178. 'id' => 'yes',
  179. ),
  180. 'set' => array
  181. (
  182. 'cash' => array('yes-duifu', '+='),
  183. 'fafang' => array('yes', '-='),
  184. ),
  185. ),
  186. ),
  187. );