bill_jiaofu.php 9.7 KB

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