bill_jiaofu.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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. $button = array();
  21. if ($aid) {
  22. $option_aid = $aid;
  23. $search_type = Dever::input('search_type');
  24. if ($search_type) {
  25. $option_aid .= '&search_type=' . $search_type;
  26. }
  27. $button = array
  28. (
  29. '返回上一页' => array('location', 'l=project/database/list&project=option&table=cash&page_type=1&aid=' . $option_aid),
  30. );
  31. }
  32. return array
  33. (
  34. # 表名
  35. 'name' => 'bill_jiaofu',
  36. # 显示给用户看的名称
  37. 'lang' => '期权交付记录',
  38. 'order' => 90,
  39. 'end' => array
  40. (
  41. //'update' => 'option/lib/manage.setJiaofu',
  42. ),
  43. 'config_audit' => $audit,
  44. # 数据结构
  45. 'struct' => array
  46. (
  47. 'id' => array
  48. (
  49. 'type' => 'int-11',
  50. 'name' => 'ID',
  51. 'default' => '',
  52. 'desc' => '',
  53. 'match' => 'is_numeric',
  54. 'search' => 'order',
  55. //'list' => true,
  56. ),
  57. 'order_num' => array
  58. (
  59. 'type' => 'varchar-100',
  60. 'name' => '流水号',
  61. 'default' => '',
  62. 'desc' => '流水号',
  63. 'match' => 'is_string',
  64. 'update' => 'text',
  65. 'search' => 'fulltext',
  66. 'list' => true,
  67. 'list_order' => 1,
  68. ),
  69. 'type' => array
  70. (
  71. 'type' => 'tinyint-1',
  72. 'name' => '交易类型',
  73. 'default' => '1',
  74. 'desc' => '交易类型',
  75. 'match' => 'is_numeric',
  76. 'option' => $type,
  77. 'update' => 'radio',
  78. 'list' => true,
  79. 'list_order' => 4,
  80. ),
  81. 'aid' => array
  82. (
  83. 'type' => 'int-11',
  84. 'name' => '手机号',
  85. 'default' => '-1',
  86. 'desc' => '代理商',
  87. 'match' => 'is_string',
  88. 'update' => 'text',
  89. 'search' => array
  90. (
  91. 'api' => 'option/account-find',
  92. 'col' => 'mobile',
  93. 'result' => 'id',
  94. ),
  95. 'list_name' => '期权账户',
  96. 'list' => 'Dever::load("option/lib/account.getInfo", {aid})',
  97. 'list_order' => 2,
  98. ),
  99. 'cash' => array
  100. (
  101. 'type' => 'float-11,2',
  102. 'name' => '期权操作',
  103. 'default' => '0',
  104. 'desc' => '期权操作',
  105. 'match' => 'is_numeric',
  106. //'update' => 'text',
  107. 'list' => '"+{cash}"',
  108. 'list_order' => 3,
  109. ),
  110. 'sign' => array
  111. (
  112. 'type' => 'varchar-150',
  113. 'name' => '签字',
  114. 'default' => '',
  115. 'desc' => '签字',
  116. 'match' => 'option',
  117. 'update' => 'image',
  118. 'key' => '7',
  119. 'list' => '"<img src=\'{sign}\' width=\'150\'>"',
  120. 'list_order' => 5,
  121. ),
  122. 'status' => array
  123. (
  124. 'type' => 'tinyint-1',
  125. 'name' => '交付确认',
  126. 'default' => '2',
  127. 'desc' => '交付确认',
  128. 'match' => 'is_numeric',
  129. 'option' => $status,
  130. 'update' => 'radio',
  131. 'list' => true,
  132. 'list_order' => 4,
  133. ),
  134. 'audit' => array
  135. (
  136. 'type' => 'tinyint-1',
  137. 'name' => '审核',
  138. 'default' => $col ? '3' : '1',
  139. 'desc' => '审核',
  140. 'match' => 'is_numeric',
  141. 'option' => $col ? $audit_manage : $audit,
  142. 'update' => 'radio',
  143. 'control' => 'audit',
  144. 'value' => $col ? '3' : '1',
  145. //'list' => true,
  146. 'list_order' => 7,
  147. ),
  148. 'audit_desc' => array
  149. (
  150. 'type' => 'varchar-500',
  151. 'name' => '审核备注',
  152. 'default' => '',
  153. 'desc' => '备注',
  154. 'match' => 'option',
  155. 'update' => 'textarea',
  156. //'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  157. 'list_order' => 9,
  158. ),
  159. 'audit_date' => array
  160. (
  161. 'type' => 'int-11',
  162. 'name' => '审核时间',
  163. 'match' => 'is_numeric',
  164. 'desc' => '审核时间',
  165. 'default' => '',
  166. ),
  167. 'audit_admin' => array
  168. (
  169. 'type' => 'int-11',
  170. 'name' => '操作人',
  171. 'default' => '',
  172. 'match' => 'is_numeric',
  173. 'desc' => '操作人',
  174. //'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#name", {audit_admin}) : "-"',
  175. //'list_order' => 6,
  176. ),
  177. 'desc' => array
  178. (
  179. 'type' => 'varchar-500',
  180. 'name' => '备注说明',
  181. 'default' => '',
  182. 'desc' => '备注说明',
  183. 'match' => 'option',
  184. 'update' => 'textarea',
  185. 'list' => true,
  186. 'list_order' => 10,
  187. ),
  188. 'qdate' => array
  189. (
  190. 'type' => 'int-11',
  191. 'name' => '确认时间',
  192. 'default' => '',
  193. 'match' => 'is_numeric',
  194. 'desc' => '',
  195. ),
  196. 'state' => array
  197. (
  198. 'type' => 'tinyint-1',
  199. 'name' => '状态',
  200. 'default' => '1',
  201. 'desc' => '请选择状态',
  202. 'match' => 'is_numeric',
  203. ),
  204. 'cdate' => array
  205. (
  206. 'type' => 'int-11',
  207. 'name' => '操作时间',
  208. 'match' => array('is_numeric', time()),
  209. 'desc' => '',
  210. 'default' => '',
  211. # 只有insert时才生效
  212. 'insert' => true,
  213. 'list' => 'Dever::load("option/lib/manage.getJiaofuDate", {id})',
  214. 'list_order' => 18,
  215. ),
  216. ),
  217. 'manage' => array
  218. (
  219. 'insert' => false,
  220. 'delete' => false,
  221. 'edit' => false,
  222. 'button' => $button,
  223. 'list_button' => array
  224. (
  225. //'list' => array('查看详情', '"member_area&mid={id}&page_type=1"'),
  226. //'edit' => array('审核', 'audit,audit_desc', '{audit} == 2'),
  227. //'delete' => array('删除', '', '{status} == 1'),
  228. ),
  229. ),
  230. 'request' => array
  231. (
  232. 'getData' => array
  233. (
  234. # 匹配的正则或函数 选填项
  235. 'option' => array
  236. (
  237. 'aid' => 'yes',
  238. 'type' => 'yes',
  239. 'audit' => 'yes',
  240. 'status' => 'yes',
  241. 'state' => 1,
  242. ),
  243. 'order' => array('id' => 'desc'),
  244. 'page' => array(10, 'list'),
  245. 'type' => 'all',
  246. 'col' => '*',
  247. ),
  248. 'getTotal' => array
  249. (
  250. # 匹配的正则或函数 选填项
  251. 'where' => array
  252. (
  253. 'aid' => 'yes',
  254. 'type' => 'yes',
  255. 'end' => array('yes-cdate', '<='),
  256. 'status' => 'yes',
  257. 'state' => 1,
  258. ),
  259. 'type' => 'one',
  260. 'col' => 'sum(cash) as total',
  261. ),
  262. 'upYes' => array
  263. (
  264. # 匹配的正则或函数 选填项
  265. 'where' => array
  266. (
  267. 'aid' => 'yes',
  268. 'end' => array('yes-cdate', '<='),
  269. 'status' => 'yes',
  270. 'state' => 1,
  271. ),
  272. 'set' => array
  273. (
  274. 'status' => 'yes',
  275. 'qdate' => 'yes',
  276. ),
  277. 'type' => 'update',
  278. ),
  279. ),
  280. );