bill_fafang.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <?php
  2. $type = Dever::db('option/cash')->config['config_type'];
  3. $status = array
  4. (
  5. 1 => '已生效',
  6. 2 => '未生效',
  7. );
  8. $audit = array
  9. (
  10. 1 => '正常',
  11. 2 => '作废',
  12. );
  13. $audit_manage = array
  14. (
  15. //1 => '正常',
  16. 2 => '作废',
  17. );
  18. $aid = Dever::input('search_option_aid');
  19. $button = array();
  20. if ($aid) {
  21. $option_aid = $aid;
  22. $search_type = Dever::input('search_type');
  23. if ($search_type) {
  24. $option_aid .= '&search_type=' . $search_type;
  25. }
  26. $button = array
  27. (
  28. '返回上一页' => array('location', 'l=project/database/list&project=option&table=cash&page_type=1&aid=' . $option_aid),
  29. );
  30. }
  31. return array
  32. (
  33. # 表名
  34. 'name' => 'bill_fafang',
  35. # 显示给用户看的名称
  36. 'lang' => '期权发放记录',
  37. 'order' => 89,
  38. 'end' => array
  39. (
  40. 'update' => 'option/lib/manage.setFafang',
  41. ),
  42. 'config_audit' => $audit,
  43. # 数据结构
  44. 'struct' => array
  45. (
  46. 'id' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => 'ID',
  50. 'default' => '',
  51. 'desc' => '',
  52. 'match' => 'is_numeric',
  53. 'search' => 'order',
  54. //'list' => true,
  55. ),
  56. 'order_num' => array
  57. (
  58. 'type' => 'varchar-100',
  59. 'name' => '流水号',
  60. 'default' => '',
  61. 'desc' => '流水号',
  62. 'match' => 'is_string',
  63. 'update' => 'text',
  64. 'search' => 'fulltext',
  65. 'list' => true,
  66. 'list_order' => 1,
  67. ),
  68. 'type' => array
  69. (
  70. 'type' => 'tinyint-1',
  71. 'name' => '交易类型',
  72. 'default' => '1',
  73. 'desc' => '交易类型',
  74. 'match' => 'is_numeric',
  75. 'option' => $type,
  76. 'update' => 'radio',
  77. 'list' => true,
  78. 'list_order' => 7,
  79. ),
  80. 'aid' => array
  81. (
  82. 'type' => 'int-11',
  83. 'name' => '手机号',
  84. 'default' => '-1',
  85. 'desc' => '代理商',
  86. 'match' => 'is_string',
  87. 'update' => 'text',
  88. 'search' => array
  89. (
  90. 'api' => 'option/account-find',
  91. 'col' => 'mobile',
  92. 'result' => 'id',
  93. ),
  94. 'list_name' => '期权账户',
  95. 'list' => 'Dever::load("option/lib/account.getInfo", {aid})',
  96. 'list_order' => 3,
  97. ),
  98. 'cash' => array
  99. (
  100. 'type' => 'float-11,2',
  101. 'name' => '发放价值',
  102. 'default' => '0',
  103. 'desc' => '发放价值',
  104. 'match' => 'is_numeric',
  105. //'update' => 'text',
  106. 'list' => '"+{cash}"',
  107. 'list_order' => 5,
  108. ),
  109. 'yue' => array
  110. (
  111. 'type' => 'float-11,2',
  112. 'name' => '发放后价值',
  113. 'default' => '0',
  114. 'desc' => '发放后价值',
  115. 'match' => 'is_numeric',
  116. //'update' => 'text',
  117. 'list' => true,
  118. 'list_order' => 6,
  119. ),
  120. 'status' => array
  121. (
  122. 'type' => 'tinyint-1',
  123. 'name' => '是否生效',
  124. 'default' => '2',
  125. 'desc' => '是否生效',
  126. 'match' => 'is_numeric',
  127. 'option' => $status,
  128. 'update' => 'radio',
  129. 'search' => 'hidden',
  130. //'list' => true,
  131. //'list_order' => 4,
  132. ),
  133. 'audit' => array
  134. (
  135. 'type' => 'tinyint-1',
  136. 'name' => '审核',
  137. 'default' => '1',
  138. 'desc' => '审核',
  139. 'match' => 'is_numeric',
  140. 'option' => $audit_manage,
  141. 'update' => 'radio',
  142. 'control' => 'audit',
  143. ),
  144. 'audit_desc' => array
  145. (
  146. 'type' => 'varchar-500',
  147. 'name' => '备注',
  148. 'default' => '',
  149. 'desc' => '备注',
  150. 'match' => 'option',
  151. 'update' => 'textarea',
  152. 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  153. 'list_order' => 9,
  154. ),
  155. 'audit_date' => array
  156. (
  157. 'type' => 'int-11',
  158. 'name' => '审核时间',
  159. 'match' => 'is_numeric',
  160. 'desc' => '审核时间',
  161. 'default' => '',
  162. ),
  163. 'audit_admin' => array
  164. (
  165. 'type' => 'int-11',
  166. 'name' => '操作人',
  167. 'default' => '',
  168. 'match' => 'is_numeric',
  169. 'desc' => '操作人',
  170. 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#name", {audit_admin}) : "-"',
  171. 'list_order' => 8,
  172. ),
  173. 'desc' => array
  174. (
  175. 'type' => 'varchar-500',
  176. 'name' => '备注说明',
  177. 'default' => '',
  178. 'desc' => '备注说明',
  179. 'match' => 'option',
  180. 'update' => 'textarea',
  181. 'list' => true,
  182. 'list_order' => 10,
  183. ),
  184. 'state' => array
  185. (
  186. 'type' => 'tinyint-1',
  187. 'name' => '状态',
  188. 'default' => '1',
  189. 'desc' => '请选择状态',
  190. 'match' => 'is_numeric',
  191. ),
  192. 'cdate' => array
  193. (
  194. 'type' => 'int-11',
  195. 'name' => '处理时间',
  196. 'match' => array('is_numeric', time()),
  197. 'desc' => '',
  198. 'default' => '',
  199. # 只有insert时才生效
  200. 'insert' => true,
  201. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  202. 'list_order' => 2,
  203. ),
  204. ),
  205. 'manage' => array
  206. (
  207. 'insert' => false,
  208. 'delete' => false,
  209. 'edit' => false,
  210. 'button' => $button,
  211. 'list_button' => array
  212. (
  213. //'list' => array('查看详情', '"member_area&mid={id}&page_type=1"'),
  214. 'edit' => array('作废', 'audit,audit_desc', '{audit} == 1'),
  215. //'delete' => array('删除', '', '{status} == 1'),
  216. ),
  217. ),
  218. 'request' => array
  219. (
  220. 'getData' => array
  221. (
  222. # 匹配的正则或函数 选填项
  223. 'option' => array
  224. (
  225. 'aid' => 'yes',
  226. 'type' => 'yes',
  227. 'status' => 'yes',
  228. 'state' => 1,
  229. ),
  230. 'order' => array('id' => 'desc'),
  231. 'page' => array(10, 'list'),
  232. 'type' => 'all',
  233. 'col' => '*',
  234. ),
  235. ),
  236. );