bill_jiaofu.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  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. $col = Dever::input('col');
  19. $aid = Dever::input('search_option_aid');
  20. $mid = Dever::input('search_option_mid');
  21. $oper_table = Dever::input('oper_table');
  22. $button = array();
  23. if (!$oper_table && $aid) {
  24. $option_aid = $aid;
  25. $search_auth = Dever::input('search_auth');
  26. if ($search_auth) {
  27. $option_aid .= '&search_auth=' . $search_auth;
  28. }
  29. $button = array
  30. (
  31. // '返回上一页' => array('location', 'l=project/database/list&project=option&table=cash&page_type=1&aid=' . $option_aid),
  32. );
  33. }
  34. return array
  35. (
  36. # 表名
  37. 'name' => 'bill_jiaofu',
  38. # 显示给用户看的名称
  39. 'lang' => '期权交付记录',
  40. 'order' => 90,
  41. 'end' => array
  42. (
  43. //'update' => 'option/lib/manage.setJiaofu',
  44. ),
  45. 'config_audit' => $audit,
  46. # 数据结构
  47. 'struct' => array
  48. (
  49. 'id' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => 'ID',
  53. 'default' => '',
  54. 'desc' => '',
  55. 'match' => 'is_numeric',
  56. 'search' => 'order',
  57. //'list' => true,
  58. ),
  59. 'order_num' => array
  60. (
  61. 'type' => 'varchar-100',
  62. 'name' => '流水号',
  63. 'default' => '',
  64. 'desc' => '流水号',
  65. 'match' => 'is_string',
  66. 'update' => 'text',
  67. //'search' => 'fulltext',
  68. //'list' => true,
  69. //'list_order' => 1,
  70. ),
  71. 'type' => array
  72. (
  73. 'type' => 'tinyint-1',
  74. 'name' => '交易类型',
  75. 'default' => '1',
  76. 'desc' => '交易类型',
  77. 'match' => 'is_numeric',
  78. 'option' => $type,
  79. 'update' => 'radio',
  80. 'list' => true,
  81. 'list_order' => 4,
  82. ),
  83. 'aid' => array
  84. (
  85. 'type' => 'int-11',
  86. 'name' => '主账号手机号',
  87. 'default' => '-1',
  88. 'desc' => '期权登录账户',
  89. 'match' => 'is_string',
  90. 'update' => 'text',
  91. 'search' => $aid ? 'hidden' : array
  92. (
  93. 'api' => 'option/member-getMain',
  94. 'col' => 'mobile',
  95. 'result' => 'aid',
  96. 'search' => 'aid',//本表的字段,默认为当前的字段
  97. ),
  98. 'list_name' => '主账户',
  99. 'list' => 'Dever::load("option/lib/account.getInfo", {aid})',
  100. 'list_order' => 3,
  101. ),
  102. 'mid' => array
  103. (
  104. 'type' => 'int-11',
  105. 'name' => '子账号手机号',
  106. 'default' => '-1',
  107. 'desc' => '期权账户',
  108. 'match' => 'is_string',
  109. 'update' => 'text',
  110. 'search' => $mid ? 'hidden' : array
  111. (
  112. 'api' => 'option/member-getChild',
  113. 'col' => 'mobile',
  114. 'result' => 'id',
  115. 'search' => 'mid',//本表的字段,默认为当前的字段
  116. ),
  117. 'list_name' => '子账户',
  118. 'list' => 'Dever::load("option/lib/member.getInfo", {mid})',
  119. 'list_order' => 3,
  120. ),
  121. 'cash' => array
  122. (
  123. 'type' => 'decimal-11,2',
  124. 'name' => '期权操作',
  125. 'default' => '0',
  126. 'desc' => '期权操作',
  127. 'match' => 'is_numeric',
  128. //'update' => 'text',
  129. 'list' => '"+{cash}"',
  130. 'list_order' => 4,
  131. ),
  132. 'sign' => array
  133. (
  134. 'type' => 'varchar-150',
  135. 'name' => '签字',
  136. 'default' => '',
  137. 'desc' => '签字',
  138. 'match' => 'option',
  139. 'update' => 'image',
  140. 'key' => '7',
  141. //'list' => '"<img src=\'{sign}\' width=\'150\'>"',
  142. //'list_order' => 5,
  143. ),
  144. 'agreement_id' => array
  145. (
  146. 'type' => 'int-11',
  147. 'name' => '合同id',
  148. 'default' => '',
  149. 'desc' => '合同id',
  150. 'match' => 'is_numeric',
  151. ),
  152. 'status' => array
  153. (
  154. 'type' => 'tinyint-1',
  155. 'name' => '交付确认',
  156. 'default' => '2',
  157. 'desc' => '交付确认',
  158. 'match' => 'is_numeric',
  159. 'option' => $status,
  160. 'search' => 'select',
  161. 'update' => 'radio',
  162. 'list' => true,
  163. 'list_order' => 4,
  164. ),
  165. 'audit' => array
  166. (
  167. 'type' => 'tinyint-1',
  168. 'name' => '审核',
  169. 'default' => $col ? '3' : '1',
  170. 'desc' => '审核',
  171. 'match' => 'is_numeric',
  172. 'option' => $col ? $audit_manage : $audit,
  173. 'update' => 'radio',
  174. 'control' => 'audit',
  175. 'value' => $col ? '3' : '1',
  176. //'list' => true,
  177. 'list_order' => 7,
  178. ),
  179. 'audit_desc' => array
  180. (
  181. 'type' => 'varchar-500',
  182. 'name' => '审核备注',
  183. 'default' => '',
  184. 'desc' => '备注',
  185. 'match' => 'option',
  186. 'update' => 'textarea',
  187. //'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  188. 'list_order' => 9,
  189. ),
  190. 'audit_date' => array
  191. (
  192. 'type' => 'int-11',
  193. 'name' => '审核时间',
  194. 'match' => 'is_numeric',
  195. 'desc' => '审核时间',
  196. 'default' => '',
  197. ),
  198. 'audit_admin' => array
  199. (
  200. 'type' => 'int-11',
  201. 'name' => '操作人',
  202. 'default' => '',
  203. 'match' => 'is_numeric',
  204. 'desc' => '操作人',
  205. //'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  206. //'list_order' => 6,
  207. ),
  208. 'desc' => array
  209. (
  210. 'type' => 'varchar-500',
  211. 'name' => '备注说明',
  212. 'default' => '',
  213. 'desc' => '备注说明',
  214. 'match' => 'option',
  215. 'update' => 'textarea',
  216. 'list' => true,
  217. 'list_order' => 10,
  218. ),
  219. 'qdate' => array
  220. (
  221. 'type' => 'int-11',
  222. 'name' => '确认时间',
  223. 'default' => '',
  224. 'match' => 'is_numeric',
  225. 'desc' => '',
  226. ),
  227. 'state' => array
  228. (
  229. 'type' => 'tinyint-1',
  230. 'name' => '状态',
  231. 'default' => '1',
  232. 'desc' => '请选择状态',
  233. 'match' => 'is_numeric',
  234. ),
  235. 'cdate' => array
  236. (
  237. 'type' => 'int-11',
  238. 'name' => '处理时间',
  239. 'match' => array('is_numeric', time()),
  240. 'desc' => '',
  241. 'default' => '',
  242. # 只有insert时才生效
  243. 'insert' => true,
  244. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  245. 'list_order' => 2,
  246. ),
  247. ),
  248. 'alter' => array
  249. (
  250. 5 => array
  251. (
  252. array('update', 'cash', 'cash', 'decimal-11,2 0 期权操作'),
  253. ),
  254. 'version' => 5,
  255. ),
  256. 'manage' => array
  257. (
  258. 'insert' => false,
  259. 'delete' => false,
  260. 'edit' => false,
  261. 'button' => $button,
  262. 'list_button' => array
  263. (
  264. //'list' => array('查看详情', '"member_area&mid={id}&page_type=1"'),
  265. //'edit' => array('审核', 'audit,audit_desc', '{audit} == 2'),
  266. //'delete' => array('删除', '', '{status} == 1'),
  267. ),
  268. ),
  269. 'request' => array
  270. (
  271. 'getData' => array
  272. (
  273. # 匹配的正则或函数 选填项
  274. 'option' => array
  275. (
  276. 'aid' => 'yes',
  277. 'mid' => 'yes',
  278. 'type' => 'yes',
  279. 'audit' => 'yes',
  280. 'status' => 'yes',
  281. 'state' => 1,
  282. ),
  283. 'order' => array('id' => 'desc'),
  284. 'page' => array(10, 'list'),
  285. 'type' => 'all',
  286. 'col' => '*',
  287. ),
  288. 'getTotal' => array
  289. (
  290. # 匹配的正则或函数 选填项
  291. 'where' => array
  292. (
  293. 'aid' => 'yes',
  294. 'mid' => 'yes',
  295. 'type' => 'yes',
  296. 'end' => array('yes-cdate', '<='),
  297. 'status' => 'yes',
  298. 'state' => 1,
  299. ),
  300. 'type' => 'one',
  301. 'col' => 'sum(cash) as total',
  302. ),
  303. 'upYes' => array
  304. (
  305. # 匹配的正则或函数 选填项
  306. 'where' => array
  307. (
  308. 'aid' => 'yes',
  309. 'mid' => 'yes',
  310. 'type' => 'yes',
  311. 'end' => array('yes-cdate', '<='),
  312. 'status' => 'yes',
  313. 'state' => 1,
  314. ),
  315. 'set' => array
  316. (
  317. 'status' => 'yes',
  318. 'qdate' => 'yes',
  319. 'agreement_id' => 'yes',
  320. ),
  321. 'type' => 'update',
  322. ),
  323. #获取所有数据
  324. 'getCount' => array
  325. (
  326. # 匹配的正则或函数 选填项
  327. 'option' => array
  328. (
  329. 'state' => 1,
  330. 'status' =>'yes',
  331. ),
  332. // 'order' => array('id' => 'desc'),
  333. 'type' => 'count',
  334. 'group' => 'mid',
  335. 'col' => '*',
  336. ),
  337. 'getCash' => array
  338. (
  339. # 匹配的正则或函数 选填项
  340. 'option' => array
  341. (
  342. 'type' => 'yes',
  343. 'status' => 'yes',
  344. 'state' => 1,
  345. ),
  346. 'type' => 'one',
  347. 'col' => 'sum(cash) as total',
  348. ),
  349. ),
  350. );