yspay_cash.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <?php
  2. $status = array
  3. (
  4. 1 => '未确认',
  5. 2 => '待入账',
  6. 3 => '已入账',
  7. 4 => '不入账',
  8. );
  9. return array
  10. (
  11. # 表名
  12. 'name' => 'yspay_cash',
  13. # 显示给用户看的名称
  14. 'lang' => '银联资金记录表',
  15. 'menu' => false,
  16. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. 'search' => 'order',
  27. 'update' => 'hidden',
  28. //'list' => true,
  29. ),
  30. 'merchant_id' => array
  31. (
  32. 'type' => 'int-11',
  33. 'name' => '商户id',
  34. 'default' => '',
  35. 'desc' => '商户id',
  36. 'match' => 'option',
  37. 'update' => 'hidden',
  38. 'value' => Dever::input('search_option_merchant_id'),
  39. 'list_name' => '商户名称',
  40. 'list' => 'Dever::load("pay/yspay_merchant-one#name", "{merchant_id}")',
  41. ),
  42. 'order_num' => array
  43. (
  44. 'type' => 'varchar-800',
  45. 'name' => '流水号',
  46. 'default' => '',
  47. 'desc' => '流水号',
  48. 'match' => 'is_string',
  49. 'update' => 'text',
  50. 'list' => true,
  51. ),
  52. 'source_order_num' => array
  53. (
  54. 'type' => 'varchar-800',
  55. 'name' => '关联订单号',
  56. 'default' => '',
  57. 'desc' => '关联订单号',
  58. 'match' => 'is_string',
  59. 'update' => 'text',
  60. 'list' => true,
  61. ),
  62. 'cash' => array
  63. (
  64. 'type' => 'int-11',
  65. 'name' => '总金额',
  66. 'default' => '0',
  67. 'desc' => '总金额',
  68. 'match' => 'option',
  69. 'list' => 'round({cash}/100, 2)',
  70. ),
  71. 'hf_cash' => array
  72. (
  73. 'type' => 'int-11',
  74. 'name' => '商户划付金额',
  75. 'default' => '0',
  76. 'desc' => '划付金额',
  77. 'match' => 'option',
  78. //'update' => 'text',
  79. 'list' => 'round({hf_cash}/100, 2)',
  80. ),
  81. 'fz_cash' => array
  82. (
  83. 'type' => 'int-11',
  84. 'name' => '平台分账金额',
  85. 'default' => '0',
  86. 'desc' => '分账金额',
  87. 'match' => 'option',
  88. //'update' => 'text',
  89. 'list' => 'round({fz_cash}/100, 2)',
  90. ),
  91. 'rdate' => array
  92. (
  93. 'type' => 'int-11',
  94. 'name' => '入账时间',
  95. 'default' => '',
  96. 'match' => 'is_numeric',
  97. 'desc' => '',
  98. 'search' => 'date',
  99. 'list' => '"{rdate}" ? date("Y-m-d H:i", \'{rdate}\') : "-"',
  100. 'list_order' => 100,
  101. ),
  102. 'status' => array
  103. (
  104. 'type' => 'tinyint-1',
  105. 'name' => '状态',
  106. 'default' => '1',
  107. 'desc' => '状态',
  108. 'match' => 'is_numeric',
  109. 'option' => $status,
  110. 'search' => 'select',
  111. 'list' => true,
  112. ),
  113. 'state' => array
  114. (
  115. 'type' => 'tinyint-1',
  116. 'name' => '状态',
  117. 'default' => '1',
  118. 'desc' => '请选择状态',
  119. 'match' => 'is_numeric',
  120. ),
  121. 'cdate' => array
  122. (
  123. 'type' => 'int-11',
  124. 'name' => '创建时间',
  125. 'match' => array('is_numeric', time()),
  126. 'desc' => '',
  127. # 只有insert时才生效
  128. //'insert' => true,
  129. //'search' => 'date',
  130. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  131. ),
  132. ),
  133. 'manage' => array
  134. (
  135. 'edit' => false,
  136. 'insert' => false,
  137. 'delete' => false,
  138. ),
  139. 'request' => array
  140. (
  141. 'getTotal' => array
  142. (
  143. 'option' => array
  144. (
  145. 'merchant_id' => 'yes',
  146. 'status' => 'yes',
  147. 'state' => 1,
  148. ),
  149. 'type' => 'one',
  150. 'col' => 'sum(cash) as cash,sum(tx_cash) as tx_cash,sum(fz_cash) as fz_cash',
  151. ),
  152. ),
  153. );