yspay_cash.php 9.0 KB

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