yspay_cash.php 7.0 KB

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