refund.data.ts 3.6 KB

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