bill_duifu.php 8.1 KB

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