yspay_cash.php 8.5 KB

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