refund.data.ts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
  2. const { t } = useI18n() // 国际化
  3. // CrudSchema
  4. const crudSchemas = reactive<VxeCrudSchema>({
  5. primaryKey: 'id',
  6. primaryType: 'seq',
  7. primaryTitle: '序号',
  8. action: true,
  9. columns: [
  10. {
  11. title: '商户编号',
  12. field: 'merchantId',
  13. isSearch: true
  14. },
  15. {
  16. title: '应用编号',
  17. field: 'appId',
  18. isSearch: true
  19. },
  20. {
  21. title: '渠道编号',
  22. field: 'channelId',
  23. isSearch: true
  24. },
  25. {
  26. title: '渠道编码',
  27. field: 'channelCode',
  28. dictType: DICT_TYPE.PAY_CHANNEL_CODE_TYPE,
  29. dictClass: 'number',
  30. isSearch: true
  31. },
  32. {
  33. title: '支付订单编号',
  34. field: 'orderId',
  35. isSearch: true
  36. },
  37. {
  38. title: '交易订单号',
  39. field: 'tradeNo',
  40. isSearch: true
  41. },
  42. {
  43. title: '商户订单号',
  44. field: 'merchantOrderId',
  45. isSearch: true
  46. },
  47. {
  48. title: '商户退款单号',
  49. field: 'merchantRefundNo',
  50. isSearch: true
  51. },
  52. {
  53. title: '回调地址',
  54. field: 'notifyUrl',
  55. isSearch: true
  56. },
  57. {
  58. title: '回调状态',
  59. field: 'notifyStatus',
  60. dictType: DICT_TYPE.PAY_ORDER_NOTIFY_STATUS,
  61. dictClass: 'number',
  62. isSearch: true
  63. },
  64. {
  65. title: '退款类型',
  66. field: 'type',
  67. dictType: DICT_TYPE.PAY_REFUND_ORDER_TYPE,
  68. dictClass: 'number',
  69. isSearch: true
  70. },
  71. {
  72. title: t('common.status'),
  73. field: 'status',
  74. dictType: DICT_TYPE.PAY_REFUND_ORDER_STATUS,
  75. dictClass: 'number',
  76. isSearch: true
  77. },
  78. {
  79. title: '支付金额',
  80. field: 'payAmount',
  81. formatter: 'formatAmount',
  82. isSearch: true
  83. },
  84. {
  85. title: '退款金额',
  86. field: 'refundAmount',
  87. formatter: 'formatAmount',
  88. isSearch: true
  89. },
  90. {
  91. title: '退款原因',
  92. field: 'reason',
  93. isSearch: true
  94. },
  95. {
  96. title: '用户IP',
  97. field: 'userIp',
  98. isSearch: true
  99. },
  100. {
  101. title: '渠道订单号',
  102. field: 'channelOrderNo',
  103. isSearch: true
  104. },
  105. {
  106. title: '渠道退款单号',
  107. field: 'channelRefundNo',
  108. isSearch: true
  109. },
  110. {
  111. title: '渠道调用报错时',
  112. field: 'channelErrorCode'
  113. },
  114. {
  115. title: '渠道调用报错时',
  116. field: 'channelErrorMsg'
  117. },
  118. {
  119. title: '支付渠道的额外参数',
  120. field: 'channelExtras'
  121. },
  122. {
  123. title: '退款失效时间',
  124. field: 'expireTime',
  125. formatter: 'formatDate',
  126. isForm: false,
  127. search: {
  128. show: true,
  129. itemRender: {
  130. name: 'XDataTimePicker'
  131. }
  132. }
  133. },
  134. {
  135. title: '退款成功时间',
  136. field: 'successTime',
  137. formatter: 'formatDate',
  138. isForm: false,
  139. search: {
  140. show: true,
  141. itemRender: {
  142. name: 'XDataTimePicker'
  143. }
  144. }
  145. },
  146. {
  147. title: '退款通知时间',
  148. field: 'notifyTime',
  149. formatter: 'formatDate',
  150. isForm: false,
  151. search: {
  152. show: true,
  153. itemRender: {
  154. name: 'XDataTimePicker'
  155. }
  156. }
  157. },
  158. {
  159. title: t('common.createTime'),
  160. field: 'createTime',
  161. formatter: 'formatDate',
  162. isForm: false,
  163. search: {
  164. show: true,
  165. itemRender: {
  166. name: 'XDataTimePicker'
  167. }
  168. }
  169. }
  170. ]
  171. })
  172. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)