yspay_cash.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <?php
  2. $status = array
  3. (
  4. 1 => '未确认',
  5. 2 => '待入账',
  6. 3 => '已入账',
  7. 4 => '申请提现',
  8. 5 => '已提现',
  9. 6 => '提现失败',
  10. );
  11. $button = array();
  12. if (Dever::load('manage/auth')->checkFunc('pay.account', 'huafu', '资金划付')) {
  13. $button = array
  14. (
  15. '资金划付' => array('oper', 'pay/yspay/cash.huafu_commit?account_id=' . Dever::input('search_option_account_id') . '&merchant_id=' . Dever::input('search_option_merchant_id')),
  16. );
  17. }
  18. return array
  19. (
  20. # 表名
  21. 'name' => 'yspay_cash',
  22. # 显示给用户看的名称
  23. 'lang' => '银联资金记录表',
  24. 'menu' => false,
  25. # 数据结构
  26. 'struct' => array
  27. (
  28. 'id' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => 'ID',
  32. 'default' => '',
  33. 'desc' => '',
  34. 'match' => 'is_numeric',
  35. 'search' => 'order',
  36. 'update' => 'hidden',
  37. //'list' => true,
  38. ),
  39. 'account_id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => '账户id',
  43. 'default' => '',
  44. 'desc' => '账户id',
  45. 'match' => 'option',
  46. 'search' => 'hidden',
  47. 'update' => 'hidden',
  48. 'value' => Dever::input('search_option_account_id'),
  49. ),
  50. 'merchant_id' => array
  51. (
  52. 'type' => 'int-11',
  53. 'name' => '商户id',
  54. 'default' => '',
  55. 'desc' => '商户id',
  56. 'match' => 'option',
  57. 'search' => 'hidden',
  58. 'update' => 'hidden',
  59. 'value' => Dever::input('search_option_merchant_id'),
  60. 'list_name' => '商户名称',
  61. 'list' => 'Dever::load("pay/yspay_merchant-one#name", "{merchant_id}")',
  62. ),
  63. 'order_num' => array
  64. (
  65. 'type' => 'varchar-800',
  66. 'name' => '流水号',
  67. 'default' => '',
  68. 'desc' => '流水号',
  69. 'match' => 'is_string',
  70. 'update' => 'text',
  71. 'list' => true,
  72. ),
  73. 'source_order_num' => array
  74. (
  75. 'type' => 'varchar-800',
  76. 'name' => '关联订单号',
  77. 'default' => '',
  78. 'desc' => '关联订单号',
  79. 'match' => 'is_string',
  80. 'update' => 'text',
  81. 'list' => true,
  82. ),
  83. 'ycash' => array
  84. (
  85. 'type' => 'int-11',
  86. 'name' => '交易金额',
  87. 'default' => '0',
  88. 'desc' => '交易金额',
  89. 'match' => 'option',
  90. 'list' => 'Dever::number({ycash}/100, 2)',
  91. ),
  92. 'yl_cash' => array
  93. (
  94. 'type' => 'int-11',
  95. 'name' => '银联手续费',
  96. 'default' => '0',
  97. 'desc' => '银联手续费',
  98. 'match' => 'option',
  99. 'list' => 'Dever::number({yl_cash}/100, 2)',
  100. ),
  101. 'pt_cash' => array
  102. (
  103. 'type' => 'int-11',
  104. 'name' => '平台手续费',
  105. 'default' => '0',
  106. 'desc' => '平台手续费',
  107. 'match' => 'option',
  108. 'list' => 'Dever::number({pt_cash}/100, 2)',
  109. ),
  110. 'cash' => array
  111. (
  112. 'type' => 'int-11',
  113. 'name' => '实际金额',
  114. 'default' => '0',
  115. 'desc' => '实际金额',
  116. 'match' => 'option',
  117. 'list' => 'Dever::number({cash}/100, 2)',
  118. ),
  119. 'hf_cash' => array
  120. (
  121. 'type' => 'int-11',
  122. 'name' => '商户划付金额',
  123. 'default' => '0',
  124. 'desc' => '划付金额',
  125. 'match' => 'option',
  126. //'update' => 'text',
  127. 'list' => 'Dever::number({hf_cash}/100, 2)',
  128. ),
  129. 'fz_cash' => array
  130. (
  131. 'type' => 'int-11',
  132. 'name' => '平台分账金额',
  133. 'default' => '0',
  134. 'desc' => '分账金额',
  135. 'match' => 'option',
  136. //'update' => 'text',
  137. 'list' => 'Dever::number({fz_cash}/100, 2)',
  138. ),
  139. 'rdate' => array
  140. (
  141. 'type' => 'int-11',
  142. 'name' => '入账时间',
  143. 'default' => '',
  144. 'match' => 'is_numeric',
  145. 'desc' => '',
  146. 'search' => 'date',
  147. 'list' => '"{rdate}" ? date("Y-m-d H:i", \'{rdate}\') : "-"',
  148. 'list_order' => 100,
  149. ),
  150. 'tdate' => array
  151. (
  152. 'type' => 'int-11',
  153. 'name' => '提现时间',
  154. 'default' => '',
  155. 'match' => 'is_numeric',
  156. 'desc' => '',
  157. 'search' => 'date',
  158. 'list' => '"{tdate}" ? date("Y-m-d H:i", \'{tdate}\') : "-"',
  159. 'list_order' => 101,
  160. ),
  161. 'status' => array
  162. (
  163. 'type' => 'tinyint-1',
  164. 'name' => '状态',
  165. 'default' => '1',
  166. 'desc' => '状态',
  167. 'match' => 'is_numeric',
  168. 'option' => $status,
  169. 'search' => 'select',
  170. 'list' => true,
  171. ),
  172. 'state' => array
  173. (
  174. 'type' => 'tinyint-1',
  175. 'name' => '状态',
  176. 'default' => '1',
  177. 'desc' => '请选择状态',
  178. 'match' => 'is_numeric',
  179. ),
  180. 'cdate' => array
  181. (
  182. 'type' => 'int-11',
  183. 'name' => '创建时间',
  184. 'match' => array('is_numeric', time()),
  185. 'desc' => '',
  186. # 只有insert时才生效
  187. //'insert' => true,
  188. //'search' => 'date',
  189. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  190. ),
  191. ),
  192. 'manage' => array
  193. (
  194. 'edit' => false,
  195. 'insert' => false,
  196. 'delete' => false,
  197. 'button' => $button,
  198. ),
  199. 'request' => array
  200. (
  201. 'getTotal' => array
  202. (
  203. 'option' => array
  204. (
  205. 'merchant_id' => 'yes',
  206. 'status' => array('yes', '>='),
  207. 'state' => 1,
  208. ),
  209. 'type' => 'one',
  210. 'col' => 'sum(cash) as cash,sum(hf_cash) as hf_cash,sum(fz_cash) as fz_cash,sum(yl_cash) as yl_cash,sum(pt_cash) as pt_cash',
  211. ),
  212. ),
  213. );