yspay_tixian.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <?php
  2. $status = array
  3. (
  4. 4 => array('name' => '提现完成', 'style' => 'font-weight:bold;color:green'),
  5. 5 => array('name' => '提现失败', 'style' => 'font-weight:bold;color:#CD3700'),
  6. );
  7. $merchant_id = Dever::input('search_option_merchant_id');
  8. $button = array();
  9. $info = '';
  10. $tixian = Dever::input('tixian', 1);
  11. if ($merchant_id) {
  12. # 申请提现和查看提现日志
  13. $account = Dever::db('pay/yspay_merchant')->find($merchant_id);
  14. if ($account) {
  15. $info = $account['name'] . ',当前余额:' . round($account['yue']/100, 2) . '元,总提现金额:' . round($account['tx_cash']/100, 2) . '元';
  16. }
  17. if ($tixian == 1) {
  18. $button['手动申请提现'] = array('fast', 1,'yspay_tixian_apply&search_option_merchant_id=' . $merchant_id);
  19. $button['提现申请记录'] = array('location', 'l=project/database/list&project=pay&table=yspay_tixian_log&search_option_state=1&search_option_merchant_id='.$merchant_id.'&oper_table=yspay_tixian&top_table=yspay_merchant');
  20. }
  21. }
  22. return array
  23. (
  24. # 表名
  25. 'name' => 'yspay_tixian',
  26. # 显示给用户看的名称
  27. 'lang' => '银联提现列表',
  28. 'order' => -200,
  29. 'info' => $info,
  30. 'menu' => false,
  31. # 数据结构
  32. 'struct' => array
  33. (
  34. 'id' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => 'ID',
  38. 'default' => '',
  39. 'desc' => '',
  40. 'match' => 'is_numeric',
  41. 'search' => 'order',
  42. 'update' => 'hidden',
  43. //'list' => true,
  44. ),
  45. 'account_id' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '账户id',
  49. 'default' => '',
  50. 'desc' => '账户id',
  51. 'match' => 'option',
  52. 'search' => 'hidden',
  53. 'update' => 'hidden',
  54. 'value' => Dever::input('search_option_account_id'),
  55. ),
  56. 'merchant_id' => array
  57. (
  58. 'type' => 'int-11',
  59. 'name' => '商户id',
  60. 'default' => '',
  61. 'desc' => '商户id',
  62. 'match' => 'option',
  63. 'search' => 'hidden',
  64. 'update' => 'hidden',
  65. 'value' => Dever::input('search_option_merchant_id'),
  66. 'list_name' => '商户名称',
  67. 'list' => 'Dever::load("pay/yspay_merchant-one#name", "{merchant_id}")',
  68. ),
  69. 'mid' => array
  70. (
  71. 'type' => 'varchar-50',
  72. 'name' => '分账商户号',
  73. 'default' => '',
  74. 'desc' => '分账商户号',
  75. 'match' => 'option',
  76. 'update' => 'text',
  77. 'search' => 'fulltext',
  78. 'list' => true,
  79. ),
  80. 'order_num' => array
  81. (
  82. 'type' => 'varchar-100',
  83. 'name' => '订单号',
  84. 'default' => '',
  85. 'desc' => '订单号',
  86. 'match' => 'is_string',
  87. 'update' => 'text',
  88. 'list' => true,
  89. ),
  90. 'type' => array
  91. (
  92. 'type' => 'varchar-10',
  93. 'name' => '类型',
  94. 'default' => '',
  95. 'desc' => '类型',
  96. 'match' => 'is_numeric',
  97. 'update' => 'text',
  98. ),
  99. 'cash' => array
  100. (
  101. 'type' => 'int-11',
  102. 'name' => '提现金额',
  103. 'default' => '0',
  104. 'desc' => '提现金额',
  105. 'match' => 'option',
  106. 'update' => 'text',
  107. 'list' => 'round({cash}/100, 2)',
  108. ),
  109. 'cardNo' => array
  110. (
  111. 'type' => 'varchar-100',
  112. 'name' => '到账银行卡号',
  113. 'default' => '',
  114. 'desc' => '到账银行卡号',
  115. 'match' => 'is_string',
  116. 'update' => 'text',
  117. //'list' => true,
  118. ),
  119. 'tdate' => array
  120. (
  121. 'type' => 'int-11',
  122. 'name' => '提现到账时间',
  123. 'default' => '',
  124. 'match' => 'is_numeric',
  125. 'desc' => '',
  126. 'search' => 'date',
  127. 'list' => '"{tdate}" ? date("Y-m-d H:i", \'{tdate}\') : "-"',
  128. 'order' => 'desc',
  129. ),
  130. 'status' => array
  131. (
  132. 'type' => 'tinyint-1',
  133. 'name' => '提现状态',
  134. 'default' => '1',
  135. 'desc' => '提现状态',
  136. 'match' => 'is_numeric',
  137. 'option' => $status,
  138. 'search' => 'select',
  139. 'list' => true,
  140. ),
  141. 'state' => array
  142. (
  143. 'type' => 'tinyint-1',
  144. 'name' => '状态',
  145. 'default' => '1',
  146. 'desc' => '请选择状态',
  147. 'match' => 'is_numeric',
  148. ),
  149. 'cdate' => array
  150. (
  151. 'type' => 'int-11',
  152. 'name' => '创建时间',
  153. 'match' => array('is_numeric', time()),
  154. 'desc' => '',
  155. # 只有insert时才生效
  156. //'insert' => true,
  157. //'search' => 'date',
  158. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  159. ),
  160. ),
  161. 'manage' => array
  162. (
  163. 'edit' => false,
  164. 'insert' => false,
  165. 'delete' => false,
  166. 'button' => $button,
  167. ),
  168. 'request' => array
  169. (
  170. 'getTotal' => array
  171. (
  172. 'option' => array
  173. (
  174. 'merchant_id' => 'yes',
  175. 'status' => 'yes',
  176. 'state' => 1,
  177. ),
  178. 'type' => 'one',
  179. 'col' => 'sum(cash) as cash',
  180. ),
  181. ),
  182. );