yspay_cash.php 9.8 KB

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