bill_fafang.php 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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. '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' => 'select',
  161. 'search' => 'hidden',
  162. //'list' => true,
  163. //'list_order' => 4,
  164. ),
  165. 'audit' => array
  166. (
  167. 'type' => 'tinyint-1',
  168. 'name' => '审核',
  169. 'default' => '1',
  170. 'desc' => '审核',
  171. 'match' => 'is_numeric',
  172. 'option' => $audit_manage,
  173. 'update' => 'radio',
  174. 'control' => 'audit',
  175. ),
  176. 'audit_desc' => array
  177. (
  178. 'type' => 'varchar-500',
  179. 'name' => '备注',
  180. 'default' => '',
  181. 'desc' => '备注',
  182. 'match' => 'option',
  183. 'update' => 'textarea',
  184. 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  185. 'list_order' => 9,
  186. ),
  187. 'audit_date' => array
  188. (
  189. 'type' => 'int-11',
  190. 'name' => '审核时间',
  191. 'match' => 'is_numeric',
  192. 'desc' => '审核时间',
  193. 'default' => '',
  194. ),
  195. 'audit_admin' => array
  196. (
  197. 'type' => 'int-11',
  198. 'name' => '操作人',
  199. 'default' => '',
  200. 'match' => 'is_numeric',
  201. 'desc' => '操作人',
  202. 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  203. 'list_order' => 8,
  204. ),
  205. 'desc' => array
  206. (
  207. 'type' => 'varchar-500',
  208. 'name' => '备注说明',
  209. 'default' => '',
  210. 'desc' => '备注说明',
  211. 'match' => 'option',
  212. 'update' => 'textarea',
  213. 'list' => true,
  214. 'list_order' => 10,
  215. ),
  216. 'state' => array
  217. (
  218. 'type' => 'tinyint-1',
  219. 'name' => '状态',
  220. 'default' => '1',
  221. 'desc' => '请选择状态',
  222. 'match' => 'is_numeric',
  223. ),
  224. 'cdate' => array
  225. (
  226. 'type' => 'int-11',
  227. 'name' => '处理时间',
  228. 'match' => array('is_numeric', time()),
  229. 'desc' => '',
  230. 'default' => '',
  231. # 只有insert时才生效
  232. 'insert' => true,
  233. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  234. 'list_order' => 2,
  235. ),
  236. ),
  237. 'alter' => array
  238. (
  239. 5 => array
  240. (
  241. array('update', 'cash', 'cash', 'decimal-11,2 0 发放价值'),
  242. array('update', 'yue', 'yue', 'decimal-11,2 0 发放后价值'),
  243. ),
  244. 'version' => 5,
  245. ),
  246. 'manage' => array
  247. (
  248. 'insert' => false,
  249. 'delete' => false,
  250. 'edit' => false,
  251. 'button' => $button,
  252. 'list_button' => array
  253. (
  254. //'list' => array('查看详情', '"member_area&mid={id}&page_type=1"'),
  255. 'edit' => array('作废', 'audit,audit_desc', '{audit} == 1'),
  256. //'delete' => array('删除', '', '{status} == 1'),
  257. ),
  258. 'company' => array
  259. (
  260. 'col' => 'company_id',
  261. 'join' => array
  262. (
  263. 'table' => 'option/member',
  264. 'type' => 'left join',
  265. 'on' => array('mid', 'id'),
  266. ),
  267. ),
  268. ),
  269. 'request' => array
  270. (
  271. 'getData' => array
  272. (
  273. # 匹配的正则或函数 选填项
  274. 'option' => array
  275. (
  276. 'aid' => 'yes',
  277. 'type' => 'yes',
  278. 'status' => 'yes',
  279. 'state' => 1,
  280. ),
  281. 'order' => array('id' => 'desc'),
  282. 'page' => array(10, 'list'),
  283. 'type' => 'all',
  284. 'col' => '*',
  285. ),
  286. 'getCash' => array
  287. (
  288. # 匹配的正则或函数 选填项
  289. 'option' => array
  290. (
  291. 'type' => 'yes',
  292. 'status' => 'yes',
  293. 'state' => 1,
  294. ),
  295. 'type' => 'one',
  296. 'col' => 'sum(cash) as total',
  297. ),
  298. 'getSearch' => array
  299. (
  300. # 匹配的正则或函数 选填项
  301. 'option' => array
  302. (
  303. 'mid' => 'yes',
  304. 'aid' => 'yes',
  305. 'status' => 'yes',
  306. 'state' => 1,
  307. ),
  308. 'type' => 'one',
  309. 'col' => 'sum(cash) as total',
  310. ),
  311. ),
  312. );