tixian.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  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_order' => 3,
  83. ),
  84. 'agent-member-role'=> array
  85. (
  86. 'name' => '代理角色',
  87. 'default' => '',
  88. 'desc' => '代理角色',
  89. 'match' => 'option',
  90. # 读取另外表的关联方式
  91. 'sync' => array('mid', 'id'),
  92. 'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
  93. 'list_order' => 5,
  94. ),
  95. 'order_num' => array
  96. (
  97. 'type' => 'varchar-100',
  98. 'name' => '流水号',
  99. 'default' => '',
  100. 'desc' => '流水号',
  101. 'match' => 'is_string',
  102. 'update' => 'text',
  103. 'search' => 'fulltext',
  104. 'list' => true,
  105. 'list_order' => 1,
  106. ),
  107. 'ycash' => array
  108. (
  109. 'type' => 'float-11,2',
  110. 'name' => '提现金额',
  111. 'default' => '0',
  112. 'desc' => '金额',
  113. 'match' => 'is_numeric',
  114. 'update' => 'text',
  115. 'list' => true,
  116. 'list_order' => 6,
  117. ),
  118. 'cash' => array
  119. (
  120. 'type' => 'float-11,2',
  121. 'name' => '实际提现金额',
  122. 'default' => '0',
  123. 'desc' => '提现金额',
  124. 'match' => 'is_numeric',
  125. 'update' => 'text',
  126. 'list' => true,
  127. 'list_order' => 7,
  128. ),
  129. 'yue' => array
  130. (
  131. 'type' => 'float-11,2',
  132. 'name' => '提现后余额',
  133. 'default' => '0',
  134. 'desc' => '提现后余额',
  135. 'match' => 'is_numeric',
  136. 'update' => 'text',
  137. 'list' => true,
  138. 'list_order' => 8,
  139. ),
  140. 'cash_id' => array
  141. (
  142. 'type' => 'int-11',
  143. 'name' => '资金表id',
  144. 'default' => '',
  145. 'desc' => '资金表id',
  146. 'match' => 'is_string',
  147. 'update' => 'text',
  148. ),
  149. 'bill-cash-status'=> array
  150. (
  151. 'name' => '交易状态',
  152. 'default' => '',
  153. 'desc' => '交易状态',
  154. 'match' => 'option',
  155. # 读取另外表的关联方式
  156. 'sync' => array('cash_id', 'id'),
  157. 'search' => 'select',
  158. 'list' => true,
  159. 'option' => $cash_status,
  160. 'list_order' => 9,
  161. ),
  162. 'status' => array
  163. (
  164. 'type' => 'int-11',
  165. 'name' => '发放状态',
  166. 'default' => '1',
  167. 'desc' => '发放状态',
  168. 'match' => 'is_numeric',
  169. 'update' => 'hidden',
  170. 'option' => $status,
  171. 'search' => 'select',
  172. 'list' => true,
  173. 'list_order' => 10,
  174. ),
  175. 'audit' => array
  176. (
  177. 'type' => 'int-11',
  178. 'name' => '审核状态',
  179. 'default' => '2',
  180. 'desc' => '审核状态',
  181. 'match' => 'is_numeric',
  182. 'update' => 'radio',
  183. 'option' => $manage_status,
  184. 'mul' => true,
  185. 'control' => 'audit',
  186. ),
  187. 'audit_desc' => array
  188. (
  189. 'type' => 'varchar-600',
  190. 'name' => '备注',
  191. 'default' => '',
  192. 'desc' => '审核说明',
  193. 'match' => 'is_string',
  194. 'update' => 'textarea',
  195. 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  196. 'list_order' => 12,
  197. 'show' => 'audit=3',
  198. ),
  199. 'pic' => array
  200. (
  201. 'type' => 'text-255',
  202. 'name' => '凭证',
  203. 'default' => '',
  204. 'desc' => '请选择凭证',
  205. 'match' => 'option',
  206. 'update' => 'images',
  207. 'key' => '1',
  208. 'place' => '150',
  209. ),
  210. 'sign' => array
  211. (
  212. 'type' => 'varchar-150',
  213. 'name' => '手写签名',
  214. 'default' => '',
  215. 'desc' => '手写签名',
  216. 'match' => 'option',
  217. 'update' => 'image',
  218. 'key' => '7',
  219. 'list' => '"<img src=\'{sign}\' width=\'150\'>"',
  220. ),
  221. 'operdate' => array
  222. (
  223. 'type' => 'int-11',
  224. 'name' => '发放时间',
  225. 'default' => '',
  226. 'match' => 'is_numeric',
  227. 'desc' => '',
  228. 'list' => '"{operdate}" > 0 ? date("Y-m-d H:i", {operdate}) : "-"',
  229. 'list_order' => 11,
  230. ),
  231. 'state' => array
  232. (
  233. 'type' => 'tinyint-1',
  234. 'name' => '状态',
  235. 'default' => '1',
  236. 'desc' => '请选择状态',
  237. 'match' => 'is_numeric',
  238. ),
  239. 'cdate' => array
  240. (
  241. 'type' => 'int-11',
  242. 'name' => '交易时间',
  243. 'match' => array('is_numeric', time()),
  244. 'desc' => '',
  245. # 只有insert时才生效
  246. //'insert' => true,
  247. 'search' => 'date',
  248. 'list' => 'date("Y-m-d H:i", {cdate})',
  249. 'list_order' => 2,
  250. ),
  251. ),
  252. 'manage' => array
  253. (
  254. 'insert' => false,
  255. 'delete' => false,
  256. 'edit' => false,
  257. 'mul' => true,
  258. 'list_button' => $list_button,
  259. ),
  260. 'request' => array
  261. (
  262. 'getData' => array
  263. (
  264. # 匹配的正则或函数 选填项
  265. 'option' => array
  266. (
  267. 'mid' => 'yes',
  268. 'state' => 1,
  269. ),
  270. 'order' => array('id' => 'desc'),
  271. 'page' => array(10, 'list'),
  272. 'type' => 'all',
  273. 'col' => '*',
  274. ),
  275. 'getNew' => array
  276. (
  277. # 匹配的正则或函数 选填项
  278. 'option' => array
  279. (
  280. 'mid' => 'yes',
  281. 'state' => 1,
  282. ),
  283. 'order' => array('id' => 'desc'),
  284. 'type' => 'one',
  285. 'col' => '*',
  286. ),
  287. 'gettxCash' => array
  288. (
  289. # 匹配的正则或函数 选填项
  290. 'option' => array
  291. (
  292. 'start' => array('yes-cdate', '>='),
  293. 'end' => array('yes-cdate', '<='),
  294. 'status' => array('yes', 'in'),
  295. 'state' => 1,
  296. ),
  297. 'type' => 'one',
  298. 'col' => 'sum(cash) as total',
  299. ),
  300. 'getdfCash' => array
  301. (
  302. # 匹配的正则或函数 选填项
  303. 'option' => array
  304. (
  305. 'start' => array('yes-cdate', '>='),
  306. 'end' => array('yes-cdate', '<='),
  307. 'status' => array('yes', 'in'),
  308. 'state' => 1,
  309. ),
  310. 'type' => 'one',
  311. 'col' => 'sum(cash) as total',
  312. ),
  313. 'getwsCash' => array
  314. (
  315. # 匹配的正则或函数 选填项
  316. 'option' => array
  317. (
  318. 'start' => array('yes-cdate', '>='),
  319. 'end' => array('yes-cdate', '<='),
  320. 'bill-cash-status' => array('yes', 'in'),
  321. 'state' => 1,
  322. ),
  323. 'type' => 'one',
  324. 'col' => 'mid as mid',
  325. ),
  326. 'upStatus' => array
  327. (
  328. 'type' => 'update',
  329. 'where' => array
  330. (
  331. 'id' => 'yes',
  332. ),
  333. 'set' => array
  334. (
  335. 'status' =>'yes',
  336. 'bill-cash-status'=>'yes',
  337. ),
  338. ),
  339. ),
  340. );