bill_fafang.php 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  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_fafang',
  37. # 显示给用户看的名称
  38. 'lang' => '期权发放记录',
  39. 'order' => 89,
  40. 'end' => array
  41. (
  42. 'update' => 'option/lib/manage.setFafang',
  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' => 'select',
  152. 'search' => 'hidden',
  153. //'list' => true,
  154. //'list_order' => 4,
  155. ),
  156. 'audit' => array
  157. (
  158. 'type' => 'tinyint-1',
  159. 'name' => '审核',
  160. 'default' => '1',
  161. 'desc' => '审核',
  162. 'match' => 'is_numeric',
  163. 'option' => $audit_manage,
  164. 'update' => 'radio',
  165. 'control' => 'audit',
  166. ),
  167. 'audit_desc' => array
  168. (
  169. 'type' => 'varchar-500',
  170. 'name' => '备注',
  171. 'default' => '',
  172. 'desc' => '备注',
  173. 'match' => 'option',
  174. 'update' => 'textarea',
  175. 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  176. 'list_order' => 9,
  177. ),
  178. 'audit_date' => array
  179. (
  180. 'type' => 'int-11',
  181. 'name' => '审核时间',
  182. 'match' => 'is_numeric',
  183. 'desc' => '审核时间',
  184. 'default' => '',
  185. ),
  186. 'audit_admin' => array
  187. (
  188. 'type' => 'int-11',
  189. 'name' => '操作人',
  190. 'default' => '',
  191. 'match' => 'is_numeric',
  192. 'desc' => '操作人',
  193. 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  194. 'list_order' => 8,
  195. ),
  196. 'desc' => array
  197. (
  198. 'type' => 'varchar-500',
  199. 'name' => '备注说明',
  200. 'default' => '',
  201. 'desc' => '备注说明',
  202. 'match' => 'option',
  203. 'update' => 'textarea',
  204. 'list' => true,
  205. 'list_order' => 10,
  206. ),
  207. 'state' => array
  208. (
  209. 'type' => 'tinyint-1',
  210. 'name' => '状态',
  211. 'default' => '1',
  212. 'desc' => '请选择状态',
  213. 'match' => 'is_numeric',
  214. ),
  215. 'cdate' => array
  216. (
  217. 'type' => 'int-11',
  218. 'name' => '处理时间',
  219. 'match' => array('is_numeric', time()),
  220. 'desc' => '',
  221. 'default' => '',
  222. # 只有insert时才生效
  223. 'insert' => true,
  224. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  225. 'list_order' => 2,
  226. ),
  227. ),
  228. 'alter' => array
  229. (
  230. 5 => array
  231. (
  232. array('update', 'cash', 'cash', 'decimal-11,2 0 发放价值'),
  233. array('update', 'yue', 'yue', 'decimal-11,2 0 发放后价值'),
  234. ),
  235. 'version' => 5,
  236. ),
  237. 'manage' => array
  238. (
  239. 'insert' => false,
  240. 'delete' => false,
  241. 'edit' => false,
  242. 'button' => $button,
  243. 'list_button' => array
  244. (
  245. //'list' => array('查看详情', '"member_area&mid={id}&page_type=1"'),
  246. 'edit' => array('作废', 'audit,audit_desc', '{audit} == 1'),
  247. //'delete' => array('删除', '', '{status} == 1'),
  248. ),
  249. ),
  250. 'request' => array
  251. (
  252. 'getData' => array
  253. (
  254. # 匹配的正则或函数 选填项
  255. 'option' => array
  256. (
  257. 'aid' => 'yes',
  258. 'type' => 'yes',
  259. 'status' => 'yes',
  260. 'state' => 1,
  261. ),
  262. 'order' => array('id' => 'desc'),
  263. 'page' => array(10, 'list'),
  264. 'type' => 'all',
  265. 'col' => '*',
  266. ),
  267. 'getCash' => array
  268. (
  269. # 匹配的正则或函数 选填项
  270. 'option' => array
  271. (
  272. 'type' => 'yes',
  273. 'status' => 'yes',
  274. 'state' => 1,
  275. ),
  276. 'type' => 'one',
  277. 'col' => 'sum(cash) as total',
  278. ),
  279. ),
  280. );