tixian.php 11 KB

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