order.data.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
  2. const { t } = useI18n() // 国际化
  3. // 表单校验
  4. export const rules = reactive({
  5. merchantId: [required],
  6. appId: [required],
  7. merchantOrderId: [required],
  8. subject: [required],
  9. body: [required],
  10. notifyUrl: [required],
  11. notifyStatus: [required],
  12. amount: [required],
  13. status: [required],
  14. userIp: [required],
  15. expireTime: [required],
  16. refundStatus: [required],
  17. refundTimes: [required],
  18. refundAmount: [required]
  19. })
  20. // CrudSchema
  21. const crudSchemas = reactive<VxeCrudSchema>({
  22. primaryKey: 'id',
  23. primaryType: 'seq',
  24. primaryTitle: '岗位编号',
  25. action: true,
  26. columns: [
  27. {
  28. title: '商户编号',
  29. field: 'merchantId',
  30. isSearch: true
  31. },
  32. {
  33. title: '应用编号',
  34. field: 'appId',
  35. isSearch: true
  36. },
  37. {
  38. title: '渠道编号',
  39. field: 'channelId'
  40. },
  41. {
  42. title: '渠道编码',
  43. field: 'channelCode',
  44. isSearch: true
  45. },
  46. {
  47. title: '渠道订单号',
  48. field: 'merchantOrderId',
  49. isSearch: true
  50. },
  51. {
  52. title: '商品标题',
  53. field: 'subject'
  54. },
  55. {
  56. title: '商品描述',
  57. field: 'body'
  58. },
  59. {
  60. title: '异步通知地址',
  61. field: 'notifyUrl'
  62. },
  63. {
  64. title: '回调状态',
  65. field: 'notifyStatus',
  66. dictType: DICT_TYPE.PAY_ORDER_NOTIFY_STATUS,
  67. dictClass: 'number'
  68. },
  69. {
  70. title: '支付金额',
  71. field: 'amount',
  72. isSearch: true
  73. },
  74. {
  75. title: '渠道手续费',
  76. field: 'channelFeeRate',
  77. isSearch: true
  78. },
  79. {
  80. title: '渠道手续金额',
  81. field: 'channelFeeAmount',
  82. isSearch: true
  83. },
  84. {
  85. title: '支付状态',
  86. field: 'status',
  87. dictType: DICT_TYPE.PAY_ORDER_STATUS,
  88. dictClass: 'number',
  89. isSearch: true
  90. },
  91. {
  92. title: '用户 IP',
  93. field: 'userIp'
  94. },
  95. {
  96. title: '订单失效时间',
  97. field: 'expireTime',
  98. formatter: 'formatDate'
  99. },
  100. {
  101. title: '支付时间',
  102. field: 'successTime',
  103. formatter: 'formatDate'
  104. },
  105. {
  106. title: '支付通知时间',
  107. field: 'notifyTime',
  108. formatter: 'formatDate'
  109. },
  110. {
  111. title: '拓展编号',
  112. field: 'successExtensionId'
  113. },
  114. {
  115. title: '退款状态',
  116. field: 'refundStatus',
  117. dictType: DICT_TYPE.PAY_ORDER_REFUND_STATUS,
  118. dictClass: 'number',
  119. isSearch: true
  120. },
  121. {
  122. title: '退款次数',
  123. field: 'refundTimes'
  124. },
  125. {
  126. title: '退款总金额',
  127. field: 'refundAmount'
  128. },
  129. {
  130. title: '渠道用户编号',
  131. field: 'channelUserId'
  132. },
  133. {
  134. title: '渠道订单号',
  135. field: 'channelOrderNo'
  136. },
  137. {
  138. title: t('common.createTime'),
  139. field: 'createTime',
  140. formatter: 'formatDate',
  141. isForm: false,
  142. search: {
  143. show: true,
  144. itemRender: {
  145. name: 'XDataTimePicker'
  146. }
  147. }
  148. }
  149. ]
  150. })
  151. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)