bill_duifu.php 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  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. 'option-member-company_id'=> array
  59. (
  60. 'name' => '所属公司',
  61. 'default' => '',
  62. 'desc' => '所属公司',
  63. 'match' => 'option',
  64. # 读取另外表的关联方式
  65. 'sync' => array('mid', 'id'),
  66. ),
  67. 'order_num' => array
  68. (
  69. 'type' => 'varchar-100',
  70. 'name' => '流水号',
  71. 'default' => '',
  72. 'desc' => '流水号',
  73. 'match' => 'is_string',
  74. 'update' => 'text',
  75. //'search' => 'fulltext',
  76. //'list' => true,
  77. //'list_order' => 1,
  78. ),
  79. 'type' => array
  80. (
  81. 'type' => 'tinyint-1',
  82. 'name' => '交易类型',
  83. 'default' => '1',
  84. 'desc' => '交易类型',
  85. 'match' => 'is_numeric',
  86. 'option' => $type,
  87. 'update' => 'radio',
  88. 'list' => true,
  89. 'list_order' => 7,
  90. ),
  91. 'aid' => array
  92. (
  93. 'type' => 'int-11',
  94. 'name' => '主账号手机号',
  95. 'default' => '-1',
  96. 'desc' => '期权登录账户',
  97. 'match' => 'is_string',
  98. 'update' => 'text',
  99. 'search' => $aid ? 'hidden' : array
  100. (
  101. 'api' => 'option/member-getMain',
  102. 'col' => 'mobile',
  103. 'result' => 'aid',
  104. 'search' => 'aid',//本表的字段,默认为当前的字段
  105. ),
  106. 'list_name' => '主账户',
  107. 'list' => 'Dever::load("option/lib/account.getInfo", {aid})',
  108. 'list_order' => 3,
  109. ),
  110. 'mid' => array
  111. (
  112. 'type' => 'int-11',
  113. 'name' => '子账号手机号',
  114. 'default' => '-1',
  115. 'desc' => '期权账户',
  116. 'match' => 'is_string',
  117. 'update' => 'text',
  118. 'search' => $mid ? 'hidden' : array
  119. (
  120. 'api' => 'option/member-getChild',
  121. 'col' => 'mobile',
  122. 'result' => 'id',
  123. 'search' => 'mid',//本表的字段,默认为当前的字段
  124. ),
  125. 'list_name' => '子账户',
  126. 'list' => 'Dever::load("option/lib/member.getInfo", {mid})',
  127. 'list_order' => 3,
  128. ),
  129. 'cash' => array
  130. (
  131. 'type' => 'decimal-11,2',
  132. 'name' => '兑付价值',
  133. 'default' => '0',
  134. 'desc' => '兑付价值',
  135. 'match' => 'is_numeric',
  136. //'update' => 'text',
  137. 'list' => '"{cash}"',
  138. 'list_order' => 5,
  139. ),
  140. 'yue' => array
  141. (
  142. 'type' => 'decimal-11,2',
  143. 'name' => '兑付后价值',
  144. 'default' => '0',
  145. 'desc' => '兑付后价值',
  146. 'match' => 'is_numeric',
  147. //'update' => 'text',
  148. //'list' => true,
  149. //'list_order' => 6,
  150. ),
  151. 'status' => array
  152. (
  153. 'type' => 'tinyint-1',
  154. 'name' => '是否生效',
  155. 'default' => '2',
  156. 'desc' => '是否生效',
  157. 'match' => 'is_numeric',
  158. 'option' => $status,
  159. 'update' => 'radio',
  160. 'search' => 'hidden',
  161. //'list' => true,
  162. //'list_order' => 4,
  163. ),
  164. 'audit' => array
  165. (
  166. 'type' => 'tinyint-1',
  167. 'name' => '审核',
  168. 'default' => '1',
  169. 'desc' => '审核',
  170. 'match' => 'is_numeric',
  171. 'option' => $audit_manage,
  172. 'update' => 'radio',
  173. 'control' => 'audit',
  174. ),
  175. 'audit_desc' => array
  176. (
  177. 'type' => 'varchar-500',
  178. 'name' => '备注',
  179. 'default' => '',
  180. 'desc' => '备注',
  181. 'match' => 'option',
  182. 'update' => 'textarea',
  183. 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  184. 'list_order' => 9,
  185. ),
  186. 'audit_date' => array
  187. (
  188. 'type' => 'int-11',
  189. 'name' => '审核时间',
  190. 'match' => 'is_numeric',
  191. 'desc' => '审核时间',
  192. 'default' => '',
  193. ),
  194. 'audit_admin' => array
  195. (
  196. 'type' => 'int-11',
  197. 'name' => '操作人',
  198. 'default' => '',
  199. 'match' => 'is_numeric',
  200. 'desc' => '操作人',
  201. 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  202. 'list_order' => 8,
  203. ),
  204. 'desc' => array
  205. (
  206. 'type' => 'varchar-500',
  207. 'name' => '备注说明',
  208. 'default' => '',
  209. 'desc' => '备注说明',
  210. 'match' => 'option',
  211. 'update' => 'textarea',
  212. 'list' => true,
  213. 'list_order' => 10,
  214. ),
  215. 'state' => array
  216. (
  217. 'type' => 'tinyint-1',
  218. 'name' => '状态',
  219. 'default' => '1',
  220. 'desc' => '请选择状态',
  221. 'match' => 'is_numeric',
  222. ),
  223. 'cdate' => array
  224. (
  225. 'type' => 'int-11',
  226. 'name' => '处理时间',
  227. 'match' => array('is_numeric', time()),
  228. 'desc' => '',
  229. 'default' => '',
  230. # 只有insert时才生效
  231. 'insert' => true,
  232. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  233. 'list_order' => 2,
  234. ),
  235. ),
  236. 'alter' => array
  237. (
  238. 5 => array
  239. (
  240. array('update', 'cash', 'cash', 'decimal-11,2 0 兑付价值'),
  241. array('update', 'yue', 'yue', 'decimal-11,2 0 兑付后价值'),
  242. ),
  243. 'version' => 5,
  244. ),
  245. 'manage' => array
  246. (
  247. 'insert' => false,
  248. 'delete' => false,
  249. 'edit' => false,
  250. 'button' => $button,
  251. 'list_button' => array
  252. (
  253. //'list' => array('查看详情', '"member_area&mid={id}&page_type=1"'),
  254. 'edit' => array('作废', 'audit,audit_desc', '{audit} == 1'),
  255. //'delete' => array('删除', '', '{status} == 1'),
  256. ),
  257. 'company' => array
  258. (
  259. 'col' => 'company_id',
  260. 'join' => array
  261. (
  262. 'table' => 'option/member',
  263. 'type' => 'left join',
  264. 'on' => array('mid', 'id'),
  265. ),
  266. ),
  267. ),
  268. 'request' => array
  269. (
  270. 'getData' => array
  271. (
  272. # 匹配的正则或函数 选填项
  273. 'option' => array
  274. (
  275. 'aid' => 'yes',
  276. 'type' => 'yes',
  277. 'status' => 'yes',
  278. 'state' => 1,
  279. ),
  280. 'order' => array('id' => 'desc'),
  281. 'page' => array(10, 'list'),
  282. 'type' => 'all',
  283. 'col' => '*',
  284. ),
  285. 'getSearch' => array
  286. (
  287. # 匹配的正则或函数 选填项
  288. 'option' => array
  289. (
  290. 'mid' => 'yes',
  291. 'aid' => 'yes',
  292. 'status' => 'yes',
  293. 'state' => 1,
  294. ),
  295. 'type' => 'one',
  296. 'col' => 'sum(cash) as total',
  297. ),
  298. ),
  299. );