cash.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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/account-find',
  50. 'col' => 'mobile',
  51. 'result' => 'id',
  52. ),
  53. 'list_name' => '姓名',
  54. 'list' => 'Dever::load("option/lib/account.getInfo", {aid})',
  55. 'list_order' => 4,
  56. ),
  57. 'daijiaofu' => array
  58. (
  59. 'type' => 'float-11,2',
  60. 'name' => '待交付额度',
  61. 'default' => '0.00',
  62. 'desc' => '待交付额度',
  63. 'match' => 'is_numeric',
  64. //'update' => 'text',
  65. 'list' => true,
  66. ),
  67. 'jiaofu' => array
  68. (
  69. 'type' => 'float-11,2',
  70. 'name' => '已交付额度',
  71. 'default' => '0.00',
  72. 'desc' => '交付额度',
  73. 'match' => 'is_numeric',
  74. //'update' => 'text',
  75. 'list' => true,
  76. ),
  77. 'fafang' => array
  78. (
  79. 'type' => 'float-11,2',
  80. 'name' => '发放额度',
  81. 'default' => '0.00',
  82. 'desc' => '发放额度',
  83. 'match' => 'is_numeric',
  84. //'update' => 'text',
  85. 'list' => true,
  86. ),
  87. 'duifu' => array
  88. (
  89. 'type' => 'float-11,2',
  90. 'name' => '兑付额度',
  91. 'default' => '0.00',
  92. 'desc' => '兑付额度',
  93. 'match' => 'is_numeric',
  94. //'update' => 'text',
  95. 'list' => true,
  96. ),
  97. 'state' => array
  98. (
  99. 'type' => 'tinyint-1',
  100. 'name' => '状态',
  101. 'default' => '1',
  102. 'desc' => '请选择状态',
  103. 'match' => 'is_numeric',
  104. ),
  105. 'cdate' => array
  106. (
  107. 'type' => 'int-11',
  108. 'name' => '创建时间',
  109. 'match' => array('is_numeric', time()),
  110. 'desc' => '',
  111. # 只有insert时才生效
  112. 'insert' => true,
  113. 'search' => 'date',
  114. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  115. 'list_order' => 2,
  116. ),
  117. ),
  118. 'manage' => array
  119. (
  120. 'insert' => false,
  121. 'delete' => false,
  122. 'edit' => false,
  123. 'page_list' => 'cash',
  124. ),
  125. 'request' => array
  126. (
  127. 'upCash_daijiaofu' => array
  128. (
  129. 'type' => 'update',
  130. 'where' => array
  131. (
  132. 'id' => 'yes',
  133. ),
  134. 'set' => array
  135. (
  136. 'cash' => array('yes-daijiaofu', '+='),
  137. ),
  138. ),
  139. 'upCash_jiaofu' => array
  140. (
  141. 'type' => 'update',
  142. 'where' => array
  143. (
  144. 'id' => 'yes',
  145. ),
  146. 'set' => array
  147. (
  148. 'cash' => array('yes-jiaofu', '+='),
  149. ),
  150. ),
  151. 'upCash_fafang' => array
  152. (
  153. 'type' => 'update',
  154. 'where' => array
  155. (
  156. 'id' => 'yes',
  157. ),
  158. 'set' => array
  159. (
  160. 'cash' => array('yes-fafang', '+='),
  161. 'jiaofu' => array('yes', '-='),
  162. ),
  163. ),
  164. 'upCash_duifu' => array
  165. (
  166. 'type' => 'update',
  167. 'where' => array
  168. (
  169. 'id' => 'yes',
  170. ),
  171. 'set' => array
  172. (
  173. 'cash' => array('yes-duifu', '+='),
  174. 'fafang' => array('yes', '-='),
  175. ),
  176. ),
  177. ),
  178. );