tixian.php 11 KB

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