tixian.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. <?php
  2. $status = array
  3. (
  4. -1 => '未审核待发放',
  5. 1 => '已审核待发放',
  6. 2 => '已发放',
  7. );
  8. $cash_status = array
  9. (
  10. 1 => '待审核',
  11. 2 => '已审核',
  12. 3 => '已作废',
  13. );
  14. $manage_status = array
  15. (
  16. //1 => '待发放',
  17. 2 => '已发放',
  18. );
  19. $list_button = array();
  20. $list_button['list'] = array('查看详情', '"push_cash&project=bill&id={cash_id}&page_type=1"');
  21. if (Dever::load('manage/auth')->checkFunc('bill.tixian', 'edit1', '发放')) {
  22. $list_button['fast'] = array('发放', '"tixian&where_id={id}&col=audit,audit_desc,pic&oper_save_jump=tixian&oper_table=tixian&oper_parent=tixian"', '{status} == 1 && "{bill-cash-status}" == 2');
  23. }
  24. $mid = Dever::input('search_option_mid');
  25. return array
  26. (
  27. # 表名
  28. 'name' => 'tixian',
  29. # 显示给用户看的名称
  30. 'lang' => '提现管理',
  31. 'auto' => 100000,
  32. 'set' => array
  33. (
  34. 'status' => $status,
  35. ),
  36. 'end' => array
  37. (
  38. 'update' => 'bill/lib/manage.tixianAuditUpdate',
  39. ),
  40. 'order' => 80,
  41. # 数据结构
  42. 'struct' => array
  43. (
  44. 'id' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => 'ID',
  48. 'default' => '',
  49. 'desc' => '',
  50. 'match' => 'is_numeric',
  51. 'search' => 'order',
  52. //'list' => true,
  53. ),
  54. 'mid' => array
  55. (
  56. 'type' => 'int-11',
  57. 'name' => '手机号',
  58. 'default' => '-1',
  59. 'desc' => '代理商',
  60. 'match' => 'is_string',
  61. 'update' => 'text',
  62. 'search' => $mid ? 'hidden' : array
  63. (
  64. 'api' => 'agent/member-find',
  65. 'col' => 'mobile',
  66. 'result' => 'id',
  67. ),
  68. // 'list_name' => '手机号',
  69. // 'list' => 'Dever::load("agent/member-find#mobile", {mid})',
  70. // 'list_order' => 4,
  71. ),
  72. 'agent-member-name'=> array
  73. (
  74. 'name' => '姓名',
  75. 'default' => '',
  76. 'desc' => '姓名',
  77. 'match' => 'option',
  78. # 读取另外表的关联方式
  79. 'sync' => array('mid', 'id'),
  80. 'list' => true,
  81. 'search' => 'fulltext',
  82. 'list_name' => '姓名<br />手机号<br />代理角色',
  83. 'list' =>'Dever::load("agent/lib/member.getOne", {mid})',
  84. 'list_order' => 3,
  85. ),
  86. 'agent-member-role'=> array
  87. (
  88. 'name' => '代理角色',
  89. 'default' => '',
  90. 'desc' => '代理角色',
  91. 'match' => 'option',
  92. # 读取另外表的关联方式
  93. 'sync' => array('mid', 'id'),
  94. // 'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
  95. // 'list_order' => 5,
  96. ),
  97. 'order_num' => array
  98. (
  99. 'type' => 'varchar-100',
  100. 'name' => '流水号',
  101. 'default' => '',
  102. 'desc' => '流水号',
  103. 'match' => 'is_string',
  104. 'update' => 'text',
  105. 'search' => 'fulltext',
  106. 'list' => true,
  107. 'list_name' => '流水号<br />交易时间<br />发放时间',
  108. 'list' => 'Dever::load("bill/lib/tixian.order_num#name",{id})',
  109. 'list_order' => 1,
  110. ),
  111. 'ycash' => array
  112. (
  113. 'type' => 'float-11,2',
  114. 'name' => '提现金额',
  115. 'default' => '0',
  116. 'desc' => '金额',
  117. 'match' => 'is_numeric',
  118. 'update' => 'text',
  119. 'list' => true,
  120. 'list_name' => '提现金额<br />实际提现金额<br />提现后余额',
  121. 'list' => 'Dever::load("bill/lib/tixian.order_num#money",{id})',
  122. 'list_order' => 6,
  123. ),
  124. 'cash' => array
  125. (
  126. 'type' => 'float-11,2',
  127. 'name' => '实际提现金额',
  128. 'default' => '0',
  129. 'desc' => '提现金额',
  130. 'match' => 'is_numeric',
  131. 'update' => 'text',
  132. // 'list' => true,
  133. // 'list_order' => 7,
  134. ),
  135. 'yue' => array
  136. (
  137. 'type' => 'float-11,2',
  138. 'name' => '提现后余额',
  139. 'default' => '0',
  140. 'desc' => '提现后余额',
  141. 'match' => 'is_numeric',
  142. 'update' => 'text',
  143. // 'list' => true,
  144. // 'list_order' => 8,
  145. ),
  146. 'cash_id' => array
  147. (
  148. 'type' => 'int-11',
  149. 'name' => '资金表id',
  150. 'default' => '',
  151. 'desc' => '资金表id',
  152. 'match' => 'is_string',
  153. 'update' => 'text',
  154. ),
  155. 'bill-cash-status'=> array
  156. (
  157. 'name' => '交易状态',
  158. 'default' => '',
  159. 'desc' => '交易状态',
  160. 'match' => 'option',
  161. # 读取另外表的关联方式
  162. 'sync' => array('cash_id', 'id'),
  163. 'search' => 'select',
  164. 'list' => true,
  165. 'option' => $cash_status,
  166. 'list_order' => 9,
  167. ),
  168. 'status' => array
  169. (
  170. 'type' => 'int-11',
  171. 'name' => '发放状态',
  172. 'default' => '1',
  173. 'desc' => '发放状态',
  174. 'match' => 'is_numeric',
  175. 'update' => 'hidden',
  176. 'option' => $status,
  177. 'search' => 'select',
  178. 'list' => true,
  179. 'list_order' => 10,
  180. ),
  181. 'audit' => array
  182. (
  183. 'type' => 'int-11',
  184. 'name' => '审核状态',
  185. 'default' => '2',
  186. 'desc' => '审核状态',
  187. 'match' => 'is_numeric',
  188. 'update' => 'radio',
  189. 'option' => $manage_status,
  190. 'mul' => true,
  191. 'control' => 'audit',
  192. ),
  193. 'audit_desc' => array
  194. (
  195. 'type' => 'varchar-600',
  196. 'name' => '备注',
  197. 'default' => '',
  198. 'desc' => '审核说明',
  199. 'match' => 'is_string',
  200. 'update' => 'textarea',
  201. 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  202. 'list_order' => 12,
  203. 'show' => 'audit=3',
  204. ),
  205. 'pic' => array
  206. (
  207. 'type' => 'text-255',
  208. 'name' => '凭证',
  209. 'default' => '',
  210. 'desc' => '请选择凭证',
  211. 'match' => 'option',
  212. 'update' => 'images',
  213. 'key' => '1',
  214. 'place' => '150',
  215. ),
  216. 'sign' => array
  217. (
  218. 'type' => 'varchar-150',
  219. 'name' => '手写签名',
  220. 'default' => '',
  221. 'desc' => '手写签名',
  222. 'match' => 'option',
  223. 'update' => 'image',
  224. 'key' => '7',
  225. 'list' => '"<img src=\'{sign}\' width=\'150\'>"',
  226. ),
  227. 'operdate' => array
  228. (
  229. 'type' => 'int-11',
  230. 'name' => '发放时间',
  231. 'default' => '',
  232. 'match' => 'is_numeric',
  233. 'desc' => '',
  234. // 'list' => '"{operdate}" > 0 ? date("Y-m-d H:i", {operdate}) : "-"',
  235. // 'list_order' => 11,
  236. ),
  237. 'state' => array
  238. (
  239. 'type' => 'tinyint-1',
  240. 'name' => '状态',
  241. 'default' => '1',
  242. 'desc' => '请选择状态',
  243. 'match' => 'is_numeric',
  244. ),
  245. 'cdate' => array
  246. (
  247. 'type' => 'int-11',
  248. 'name' => '交易时间',
  249. 'match' => array('is_numeric', time()),
  250. 'desc' => '',
  251. # 只有insert时才生效
  252. //'insert' => true,
  253. 'search' => 'date',
  254. // 'list' => 'date("Y-m-d H:i", {cdate})',
  255. // 'list_order' => 2,
  256. ),
  257. ),
  258. 'manage' => array
  259. (
  260. 'insert' => false,
  261. 'delete' => false,
  262. 'edit' => false,
  263. 'mul' => true,
  264. 'list_button' => $list_button,
  265. ),
  266. 'request' => array
  267. (
  268. 'getData' => array
  269. (
  270. # 匹配的正则或函数 选填项
  271. 'option' => array
  272. (
  273. 'mid' => 'yes',
  274. 'state' => 1,
  275. ),
  276. 'order' => array('id' => 'desc'),
  277. 'page' => array(10, 'list'),
  278. 'type' => 'all',
  279. 'col' => '*',
  280. ),
  281. 'getNew' => array
  282. (
  283. # 匹配的正则或函数 选填项
  284. 'option' => array
  285. (
  286. 'mid' => 'yes',
  287. 'state' => 1,
  288. ),
  289. 'order' => array('id' => 'desc'),
  290. 'type' => 'one',
  291. 'col' => '*',
  292. ),
  293. 'gettxCash' => array
  294. (
  295. # 匹配的正则或函数 选填项
  296. 'option' => array
  297. (
  298. 'start' => array('yes-cdate', '>='),
  299. 'end' => array('yes-cdate', '<='),
  300. 'status' => array('yes', 'in'),
  301. 'state' => 1,
  302. ),
  303. 'type' => 'one',
  304. 'col' => 'sum(cash) as total',
  305. ),
  306. 'getdfCash' => array
  307. (
  308. # 匹配的正则或函数 选填项
  309. 'option' => array
  310. (
  311. 'start' => array('yes-cdate', '>='),
  312. 'end' => array('yes-cdate', '<='),
  313. 'status' => array('yes', 'in'),
  314. 'state' => 1,
  315. ),
  316. 'type' => 'one',
  317. 'col' => 'sum(cash) as total',
  318. ),
  319. 'getwsCash' => array
  320. (
  321. # 匹配的正则或函数 选填项
  322. 'option' => array
  323. (
  324. 'start' => array('yes-cdate', '>='),
  325. 'end' => array('yes-cdate', '<='),
  326. 'bill-cash-status' => array('yes', 'in'),
  327. 'state' => 1,
  328. ),
  329. 'type' => 'one',
  330. 'col' => 'mid as mid',
  331. ),
  332. 'upStatus' => array
  333. (
  334. 'type' => 'update',
  335. 'where' => array
  336. (
  337. 'id' => 'yes',
  338. ),
  339. 'set' => array
  340. (
  341. 'status' =>'yes',
  342. 'bill-cash-status'=>'yes',
  343. ),
  344. ),
  345. ),
  346. );