refund.data.ts 3.6 KB

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