tixian.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. <?php
  2. $status = array
  3. (
  4. -1 => array('name' => '未审核待发放', 'style' => 'font-weight:bold;color:#436EEE'),
  5. 1 => array('name' => '已审核待发放', 'style' => 'font-weight:bold;color:green'),
  6. //2 => array('name' => '已审核待发放', 'style' => 'font-weight:bold;color:green'),
  7. 2 => array('name' => '已发放', 'style' => 'font-weight:bold;color:#CD3700'),
  8. 3 => array('name' => '已作废','style' => 'font-weight:bold;color:#CD3700'),
  9. );
  10. $cash_status = array
  11. (
  12. 1 => array('name' => '待审核', 'style' => 'font-weight:bold;color:#436EEE'),
  13. 2 => array('name' => '已审核', 'style' => 'font-weight:bold;color:green'),
  14. 3 => array('name' => '已作废', 'style' => 'font-weight:bold;color:#CD3700'),
  15. );
  16. $manage_status = array
  17. (
  18. //1 => '待发放',
  19. 2 => '已发放',
  20. 3 => '已作废',
  21. );
  22. $type = array
  23. (
  24. 1 => '代理商提现',
  25. 2 => '门店提现',
  26. 3 => '用户钱包提现',
  27. );
  28. $list_button = array();
  29. $list_button['list'] = array('查看详情', '"push_cash&project=bill&id={cash_id}&page_type=1&[refer]"', '{type} == 1');
  30. $list_button['list1'] = array('查看详情', '"record&project=shop&id={cash_id}&page_type=1&[refer]"', '{type} == 2');
  31. $list_button['list2'] = array('查看详情', '"user_money_sign&project=shop&id={cash_id}&page_type=1&[refer]"', '{type} == 3');
  32. if (Dever::load('manage/auth')->checkFunc('bill.tixian', 'edit1', '发放')) {
  33. $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');
  34. }
  35. $mid = Dever::input('search_option_mid');
  36. $mul = false;
  37. if (Dever::load('manage/auth')->checkFunc('bill.tixian', 'fafangedit', '批量发放')) {
  38. $mul = '{status} == 1';
  39. }
  40. return array
  41. (
  42. # 表名
  43. 'name' => 'tixian',
  44. # 显示给用户看的名称
  45. 'lang' => '提现管理',
  46. 'auto' => 100000,
  47. 'set' => array
  48. (
  49. 'status' => $status,
  50. ),
  51. 'end' => array
  52. (
  53. 'update' => 'bill/lib/manage.tixianAuditUpdate',
  54. 'updatemul' => 'bill/lib/manage.tixianAuditUpdate',
  55. ),
  56. 'order' => 80,
  57. # 数据结构
  58. 'struct' => array
  59. (
  60. 'id' => array
  61. (
  62. 'type' => 'int-11',
  63. 'name' => 'ID',
  64. 'default' => '',
  65. 'desc' => '',
  66. 'match' => 'is_numeric',
  67. 'search' => 'order',
  68. //'list' => true,
  69. ),
  70. 'type' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '提现类型',
  74. 'default' => '1',
  75. 'desc' => '提现类型',
  76. 'match' => 'is_numeric',
  77. 'search' => 'select',
  78. 'option' => $type,
  79. ),
  80. 'mid' => array
  81. (
  82. 'type' => 'int-11',
  83. 'name' => '代理商姓名/手机号',
  84. 'default' => '-1',
  85. 'desc' => '代理商',
  86. 'match' => 'is_string',
  87. 'update' => 'text',
  88. 'search' => array
  89. (
  90. 'api' => 'agent/member-getSearch',
  91. 'col' => 'col',
  92. 'result' => 'id',
  93. 'search' => 'mid',
  94. ),
  95. 'list_name' => '提现用户信息',
  96. 'list' => 'Dever::load("bill/lib/tixian.getInfo", {type}, {mid})',
  97. 'list_order' => 3,
  98. ),
  99. 'agent-member-name'=> array
  100. (
  101. 'name' => '姓名',
  102. 'default' => '',
  103. 'desc' => '姓名',
  104. 'match' => 'option',
  105. # 读取另外表的关联方式
  106. 'sync' => array('mid', 'id'),
  107. ),
  108. 'agent-member-role'=> array
  109. (
  110. 'name' => '代理角色',
  111. 'default' => '',
  112. 'desc' => '代理角色',
  113. 'match' => 'option',
  114. # 读取另外表的关联方式
  115. 'sync' => array('mid', 'id'),
  116. // 'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
  117. // 'list_order' => 5,
  118. ),
  119. 'order_num' => array
  120. (
  121. 'type' => 'varchar-100',
  122. 'name' => '流水号',
  123. 'default' => '',
  124. 'desc' => '流水号',
  125. 'match' => 'is_string',
  126. 'update' => 'text',
  127. 'search' => 'fulltext',
  128. 'list' => true,
  129. 'list_name' => '流水号<br />交易时间<br />发放时间',
  130. 'list' => 'Dever::load("bill/lib/tixian.order_num#name",{id})',
  131. 'list_order' => 1,
  132. ),
  133. 'ycash' => array
  134. (
  135. 'type' => 'decimal-11,2',
  136. 'name' => '提现金额',
  137. 'default' => '0',
  138. 'desc' => '金额',
  139. 'match' => 'is_numeric',
  140. 'update' => 'text',
  141. 'list' => true,
  142. 'list_name' => '提现金额<br />实际提现金额<br />提现后余额',
  143. 'list' => 'Dever::load("bill/lib/tixian.order_num#money",{id})',
  144. 'list_order' => 6,
  145. ),
  146. 'cash' => array
  147. (
  148. 'type' => 'decimal-11,2',
  149. 'name' => '实际提现金额',
  150. 'default' => '0',
  151. 'desc' => '提现金额',
  152. 'match' => 'is_numeric',
  153. 'update' => 'text',
  154. // 'list' => true,
  155. // 'list_order' => 7,
  156. ),
  157. 'yue' => array
  158. (
  159. 'type' => 'decimal-11,2',
  160. 'name' => '提现后余额',
  161. 'default' => '0',
  162. 'desc' => '提现后余额',
  163. 'match' => 'is_numeric',
  164. 'update' => 'text',
  165. // 'list' => true,
  166. // 'list_order' => 8,
  167. ),
  168. 'cash_id' => array
  169. (
  170. 'type' => 'int-11',
  171. 'name' => '资金表id',
  172. 'default' => '',
  173. 'desc' => '资金表id',
  174. 'match' => 'is_string',
  175. 'update' => 'text',
  176. ),
  177. 'bill-cash-status'=> array
  178. (
  179. 'name' => '交易状态',
  180. 'default' => '',
  181. 'desc' => '交易状态',
  182. 'match' => 'option',
  183. # 读取另外表的关联方式
  184. 'sync' => array('cash_id', 'id'),
  185. // 'search' => 'select',
  186. //'list' => true,
  187. 'option' => $cash_status,
  188. //'list_name' => '交易状态<br />发放状态',
  189. //'list' => 'Dever::load("bill/lib/tixian.order_num#status",{id})',
  190. //'list_order' => 9,
  191. ),
  192. 'status' => array
  193. (
  194. 'type' => 'int-11',
  195. 'name' => '发放状态',
  196. 'default' => '1',
  197. 'desc' => '发放状态',
  198. 'match' => 'is_numeric',
  199. 'update' => 'hidden',
  200. 'option' => $status,
  201. 'search' => 'select',
  202. // 'list' => true,
  203. // 'list_order' => 10,
  204. 'list_name' => '交易状态',
  205. 'list' => true,
  206. 'list_order' => 9,
  207. ),
  208. 'audit' => array
  209. (
  210. 'type' => 'int-11',
  211. 'name' => '审核状态',
  212. 'default' => '2',
  213. 'desc' => '审核状态',
  214. 'match' => 'is_numeric',
  215. 'update' => 'radio',
  216. 'option' => $manage_status,
  217. 'mul' => true,
  218. 'control' => 'audit',
  219. ),
  220. 'audit_desc' => array
  221. (
  222. 'type' => 'varchar-600',
  223. 'name' => '备注',
  224. 'default' => '',
  225. 'desc' => '审核说明',
  226. 'match' => 'is_string',
  227. 'update' => 'textarea',
  228. 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  229. 'list_order' => 12,
  230. 'show' => 'audit=3',
  231. ),
  232. 'pic' => array
  233. (
  234. 'type' => 'text-255',
  235. 'name' => '凭证',
  236. 'default' => '',
  237. 'desc' => '请选择凭证',
  238. 'match' => 'option',
  239. 'update' => 'images',
  240. 'key' => '1',
  241. 'place' => '150',
  242. 'show' => 'audit=2',
  243. ),
  244. 'sign' => array
  245. (
  246. 'type' => 'varchar-150',
  247. 'name' => '手写签名',
  248. 'default' => '',
  249. 'desc' => '手写签名',
  250. 'match' => 'option',
  251. 'update' => 'image',
  252. 'key' => '7',
  253. 'list' => '"<img src=\'{sign}\' width=\'150\'>"',
  254. ),
  255. 'operdate' => array
  256. (
  257. 'type' => 'int-11',
  258. 'name' => '发放时间',
  259. 'default' => '',
  260. 'match' => 'is_numeric',
  261. 'desc' => '',
  262. // 'list' => '"{operdate}" > 0 ? date("Y-m-d H:i", {operdate}) : "-"',
  263. // 'list_order' => 11,
  264. ),
  265. 'audit_admin' => array
  266. (
  267. 'type' => 'int-11',
  268. 'name' => '操作人',
  269. 'default' => '',
  270. 'match' => 'is_numeric',
  271. 'desc' => '操作人',
  272. 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  273. // 'list_order' => 8,
  274. ),
  275. 'state' => array
  276. (
  277. 'type' => 'tinyint-1',
  278. 'name' => '状态',
  279. 'default' => '1',
  280. 'desc' => '请选择状态',
  281. 'match' => 'is_numeric',
  282. ),
  283. 'cdate' => array
  284. (
  285. 'type' => 'int-11',
  286. 'name' => '交易时间',
  287. 'match' => array('is_numeric', time()),
  288. 'desc' => '',
  289. # 只有insert时才生效
  290. 'insert' => true,
  291. 'search' => 'date',
  292. // 'list' => 'date("Y-m-d H:i", {cdate})',
  293. // 'list_order' => 2,
  294. ),
  295. ),
  296. 'manage' => array
  297. (
  298. 'insert' => false,
  299. 'delete' => false,
  300. 'edit' => false,
  301. 'mul' => $mul,
  302. 'list_button' => $list_button,
  303. 'excel' => array
  304. (
  305. array('数据导出','提现数据导出', 'bill/lib/manage.tixian_out'),
  306. ),
  307. ),
  308. 'request' => array
  309. (
  310. 'getData' => array
  311. (
  312. # 匹配的正则或函数 选填项
  313. 'option' => array
  314. (
  315. 'mid' => 'yes',
  316. 'state' => 1,
  317. ),
  318. 'order' => array('id' => 'desc'),
  319. 'page' => array(10, 'list'),
  320. 'type' => 'all',
  321. 'col' => '*',
  322. ),
  323. 'getNew' => array
  324. (
  325. # 匹配的正则或函数 选填项
  326. 'option' => array
  327. (
  328. 'mid' => 'yes',
  329. 'state' => 1,
  330. ),
  331. 'order' => array('id' => 'desc'),
  332. 'type' => 'one',
  333. 'col' => '*',
  334. ),
  335. 'gettxCash' => array
  336. (
  337. # 匹配的正则或函数 选填项
  338. 'option' => array
  339. (
  340. 'start' => array('yes-cdate', '>='),
  341. 'end' => array('yes-cdate', '<='),
  342. 'status' => array('yes', 'in'),
  343. 'state' => 1,
  344. ),
  345. 'type' => 'one',
  346. 'col' => 'sum(cash) as total',
  347. ),
  348. // 'getdfCash' => array
  349. // (
  350. // # 匹配的正则或函数 选填项
  351. // 'option' => array
  352. // (
  353. // 'start' => array('yes-cdate', '>='),
  354. // 'end' => array('yes-cdate', '<='),
  355. // 'status' => array('yes', 'in'),
  356. // 'state' => 1,
  357. // ),
  358. // 'type' => 'one',
  359. // 'col' => 'sum(cash) as total',
  360. // ),
  361. 'getwsCash' => array
  362. (
  363. # 匹配的正则或函数 选填项
  364. 'option' => array
  365. (
  366. 'start' => array('yes-cdate', '>='),
  367. 'end' => array('yes-cdate', '<='),
  368. 'status' => array('yes', 'in'),
  369. 'state' => 1,
  370. ),
  371. 'type' => 'one',
  372. 'col' => 'sum(cash) as total',
  373. ),
  374. 'upStatus' => array
  375. (
  376. 'type' => 'update',
  377. 'where' => array
  378. (
  379. 'id' => 'yes',
  380. ),
  381. 'set' => array
  382. (
  383. 'status' =>'yes',
  384. 'bill-cash-status'=>'yes',
  385. ),
  386. ),
  387. 'getExcelAll' => array
  388. (
  389. # 匹配的正则或函数 选填项
  390. 'option' => array
  391. (
  392. 'start' => array('yes-cdate', '>='),
  393. 'end' => array('yes-cdate', '<='),
  394. 'status' => array('yes', 'in'),
  395. 'state' => 1,
  396. ),
  397. 'type' => 'All',
  398. 'order' => array('cdate' => 'desc'),
  399. 'col' => '*',
  400. ),
  401. 'getdfCash' => array
  402. (
  403. 'option' => array
  404. (
  405. 'start' => array('yes-t_2.operdate', '>='),
  406. 'end' => array('yes-t_2.operdate', '<='),
  407. 'status' => array('yes-t_1.status', 'in'),
  408. 'state' => 'yes-t_1.state',
  409. ),
  410. 'join' => array
  411. (
  412. array
  413. (
  414. 'table' => 'bill/cash',
  415. 'type' => 'left join',
  416. 'on' => array('cash_id','id'),
  417. 'col' => 't_2.id as cid',
  418. ),
  419. ),
  420. 'type' => 'one',
  421. // 'limit' => '0,5',
  422. // 'order' => array('t_2.sdate' => 'desc','id' => 'desc'),
  423. // 'col' => 'id,t_1.name,t_1.content,t_2.name as company_name',
  424. 'col' => 'id,sum(t_1.cash) as total',
  425. ),
  426. ),
  427. );