yspay_cash.php 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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. $merchant_id = Dever::input('search_option_merchant_id');
  15. $account_id = Dever::input('search_option_account_id');
  16. $info = '';
  17. if ($merchant_id) {
  18. $info = Dever::load('pay/yspay/cash')->getInfo($merchant_id);
  19. if (Dever::load('manage/auth')->checkFunc('pay.account', 'huafu', '账户提现')) {
  20. $button = array
  21. (
  22. '账户提现' => array('fast', '', 'yspay_cash_tixian&search_option_merchant_id=' . $merchant_id),
  23. );
  24. }
  25. $button['账户日志'] = array('location', 'l=project/database/list&project=pay&table=yspay_merchant_log&search_option_state=1&search_option_account_id=' . $account_id . '&search_option_merchant_id=' . $merchant_id . '&[refer]');
  26. }
  27. return array
  28. (
  29. # 表名
  30. 'name' => 'yspay_cash',
  31. # 显示给用户看的名称
  32. 'lang' => '银联资金记录表',
  33. 'menu' => false,
  34. 'info' => $info,
  35. # 数据结构
  36. 'struct' => array
  37. (
  38. 'id' => array
  39. (
  40. 'type' => 'int-11',
  41. 'name' => 'ID',
  42. 'default' => '',
  43. 'desc' => '',
  44. 'match' => 'is_numeric',
  45. 'search' => 'order',
  46. 'update' => 'hidden',
  47. //'list' => true,
  48. ),
  49. 'account_id' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => '账户id',
  53. 'default' => '',
  54. 'desc' => '账户id',
  55. 'match' => 'option',
  56. 'search' => 'hidden',
  57. 'update' => 'hidden',
  58. 'value' => $account_id,
  59. ),
  60. 'merchant_id' => array
  61. (
  62. 'type' => 'int-11',
  63. 'name' => '商户id',
  64. 'default' => '',
  65. 'desc' => '商户id',
  66. 'match' => 'option',
  67. 'search' => 'hidden',
  68. 'update' => 'hidden',
  69. 'value' => $merchant_id,
  70. 'list_name' => '商户名称',
  71. 'list' => 'Dever::load("pay/yspay_merchant-one#name", "{merchant_id}")',
  72. ),
  73. 'order_num' => array
  74. (
  75. 'type' => 'varchar-800',
  76. 'name' => '流水号',
  77. 'default' => '',
  78. 'desc' => '流水号',
  79. 'match' => 'is_string',
  80. 'update' => 'text',
  81. 'search' => 'fulltext',
  82. 'list' => true,
  83. ),
  84. 'source_order_num' => array
  85. (
  86. 'type' => 'varchar-800',
  87. 'name' => '关联订单号',
  88. 'default' => '',
  89. 'desc' => '关联订单号',
  90. 'match' => 'is_string',
  91. 'update' => 'text',
  92. 'search' => 'fulltext',
  93. 'list' => true,
  94. ),
  95. 'ycash' => array
  96. (
  97. 'type' => 'int-11',
  98. 'name' => '交易金额',
  99. 'default' => '0',
  100. 'desc' => '交易金额',
  101. 'match' => 'option',
  102. 'list' => 'Dever::number({ycash}/100, 2)',
  103. ),
  104. 'yl_cash' => array
  105. (
  106. 'type' => 'int-11',
  107. 'name' => '银联手续费',
  108. 'default' => '0',
  109. 'desc' => '银联手续费',
  110. 'match' => 'option',
  111. 'list' => 'Dever::number({yl_cash}/100, 2)',
  112. ),
  113. 'pt_cash' => array
  114. (
  115. 'type' => 'int-11',
  116. 'name' => '平台手续费',
  117. 'default' => '0',
  118. 'desc' => '平台手续费',
  119. 'match' => 'option',
  120. 'list' => 'Dever::number({pt_cash}/100, 2)',
  121. ),
  122. 'cash' => array
  123. (
  124. 'type' => 'int-11',
  125. 'name' => '实际金额',
  126. 'default' => '0',
  127. 'desc' => '实际金额',
  128. 'match' => 'option',
  129. 'list' => 'Dever::number({cash}/100, 2)',
  130. ),
  131. 'hf_cash' => array
  132. (
  133. 'type' => 'int-11',
  134. 'name' => '商户划付金额',
  135. 'default' => '0',
  136. 'desc' => '划付金额',
  137. 'match' => 'option',
  138. //'update' => 'text',
  139. 'list' => 'Dever::number({hf_cash}/100, 2)',
  140. ),
  141. 'fz_cash' => array
  142. (
  143. 'type' => 'int-11',
  144. 'name' => '平台分账金额',
  145. 'default' => '0',
  146. 'desc' => '分账金额',
  147. 'match' => 'option',
  148. //'update' => 'text',
  149. 'list' => 'Dever::number({fz_cash}/100, 2)',
  150. ),
  151. 'fdate' => array
  152. (
  153. 'type' => 'int-11',
  154. 'name' => '入账时间',
  155. 'default' => '',
  156. 'match' => 'is_numeric',
  157. 'desc' => '',
  158. 'search' => 'date',
  159. 'list' => '"{fdate}" ? date("Y-m-d H:i", \'{fdate}\') : "-"',
  160. 'list_order' => 100,
  161. ),
  162. 'rdate' => array
  163. (
  164. 'type' => 'int-11',
  165. 'name' => '分账时间',
  166. 'default' => '',
  167. 'match' => 'is_numeric',
  168. 'desc' => '',
  169. 'search' => 'date',
  170. 'list' => '"{rdate}" ? date("Y-m-d H:i", \'{rdate}\') : "-"',
  171. 'list_order' => 100,
  172. ),
  173. 'tdate' => array
  174. (
  175. 'type' => 'int-11',
  176. 'name' => '提现时间',
  177. 'default' => '',
  178. 'match' => 'is_numeric',
  179. 'desc' => '',
  180. //'search' => 'date',
  181. //'list' => '"{tdate}" ? date("Y-m-d H:i", \'{tdate}\') : "-"',
  182. //'list_order' => 101,
  183. ),
  184. 'status' => array
  185. (
  186. 'type' => 'tinyint-1',
  187. 'name' => '订单状态',
  188. 'default' => '1',
  189. 'desc' => '订单状态',
  190. 'match' => 'is_numeric',
  191. 'option' => $status,
  192. 'search' => 'select',
  193. 'list' => true,
  194. ),
  195. 'fenzhang_status' => array
  196. (
  197. 'type' => 'tinyint-1',
  198. 'name' => '分账状态',
  199. 'default' => '1',
  200. 'desc' => '分账状态',
  201. 'match' => 'is_numeric',
  202. 'option' => $fenzhang_status,
  203. 'search' => 'select',
  204. 'list' => true,
  205. ),
  206. 'state' => array
  207. (
  208. 'type' => 'tinyint-1',
  209. 'name' => '状态',
  210. 'default' => '1',
  211. 'desc' => '请选择状态',
  212. 'match' => 'is_numeric',
  213. ),
  214. 'cdate' => array
  215. (
  216. 'type' => 'int-11',
  217. 'name' => '下单时间',
  218. 'match' => array('is_numeric', time()),
  219. 'desc' => '',
  220. # 只有insert时才生效
  221. 'insert' => true,
  222. 'search' => 'date',
  223. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  224. ),
  225. ),
  226. 'manage' => array
  227. (
  228. 'edit' => false,
  229. 'insert' => false,
  230. 'delete' => false,
  231. 'button' => $button,
  232. ),
  233. 'request' => array
  234. (
  235. 'getTotal' => array
  236. (
  237. 'option' => array
  238. (
  239. 'merchant_id' => 'yes',
  240. 'status' => array('yes', '>='),
  241. 'state' => 1,
  242. ),
  243. 'type' => 'one',
  244. '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',
  245. ),
  246. 'getList' => array
  247. (
  248. 'option' => array
  249. (
  250. 'start' => array('yes-cdate', '>='),
  251. 'end' => array('yes-cdate', '<='),
  252. 'fdate_start' => array('yes-fdate', '>='),
  253. 'fdate_end' => array('yes-fdate', '<='),
  254. 'order_num' => array('yes', 'like'),
  255. 'source_order_num' => array('yes', 'like'),
  256. 'merchant_id' => 'yes',
  257. 'status' => 'yes',
  258. 'state' => 1,
  259. ),
  260. 'type' => 'all',
  261. 'page' => array(20, 'list'),
  262. 'order' => array('id' => 'desc'),
  263. 'col' => '*',
  264. ),
  265. ),
  266. );