yspay_tixian.php 5.6 KB

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