tixian.php 12 KB

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