content.config.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import { ContentConfig } from "/@/components/PageContent";
  2. import { httpList, httpAdd } from "/@/api/InvoiceSales/refund";
  3. import dayjs from "dayjs";
  4. import { ElTag, ElImage } from "element-plus";
  5. import { h } from "vue";
  6. import { RETRUN_STATUS } from "/@/utils/details/refund";
  7. import { refund_type } from "./search.config";
  8. const columns = [
  9. {
  10. type: "selection",
  11. width: 55,
  12. hide: ({ checkList }) => !checkList.includes("勾选列")
  13. },
  14. {
  15. label: "序号",
  16. type: "index",
  17. width: 70,
  18. hide: ({ checkList }) => !checkList.includes("序号列")
  19. },
  20. {
  21. label: "退款编号",
  22. prop: "returnCode"
  23. },
  24. {
  25. label: "资金编号",
  26. prop: "tradNo"
  27. },
  28. {
  29. label: "资金认领编号",
  30. prop: "logNo"
  31. },
  32. {
  33. label: "退款回执",
  34. prop: "return_img",
  35. cellRenderer: ({ row }) => {
  36. return h(ElImage, {
  37. src: row.return_img,
  38. style: { height: "20px" },
  39. previewSrcList: [row.return_img],
  40. previewTeleported: true
  41. });
  42. }
  43. },
  44. {
  45. label: "退款原因",
  46. prop: "return_reason"
  47. },
  48. {
  49. label: "申请人id",
  50. prop: "apply_id"
  51. },
  52. {
  53. label: "申请人",
  54. prop: "apply_name"
  55. },
  56. {
  57. label: "退款类型",
  58. prop: "status",
  59. cellRenderer: ({ row }) => {
  60. return h(ElTag, null, {
  61. default: () =>
  62. refund_type.find(s => s.value === row.type)?.label || "--"
  63. });
  64. }
  65. },
  66. {
  67. label: "状态",
  68. prop: "status",
  69. cellRenderer: ({ row }) => {
  70. return h(ElTag, null, {
  71. default: () =>
  72. RETRUN_STATUS.find(s => s.value === row.status)?.label || "--"
  73. });
  74. }
  75. },
  76. {
  77. label: "退款时间",
  78. prop: "addtime",
  79. formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
  80. },
  81. {
  82. label: "操作",
  83. fixed: "right",
  84. width: 80,
  85. slot: "operation"
  86. }
  87. ];
  88. const contentConfig: ContentConfig = {
  89. title: "退款申请管理",
  90. powers: ["001", "002", "003", "004", "005", "006", "007", "008"],
  91. columns,
  92. apis: {
  93. httpList,
  94. httpAdd
  95. }
  96. };
  97. export default contentConfig;